From a09e091a5c996d46a398abb27b06fe504591673f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 22 Dec 2014 17:11:48 +0100 Subject: [PATCH 1/1] Imported Upstream version 1.15.1 --- COPYING | 1823 + ChangeLog | 133999 +++++++++++++++ INSTALL | 291 + Makefile.am | 118 + Makefile.in | 1153 + README | 38 + Xext/Makefile.am | 111 + Xext/Makefile.in | 927 + Xext/bigreq.c | 76 + Xext/dpms.c | 363 + Xext/dpmsproc.h | 15 + Xext/dpmsstubs.c | 47 + Xext/geext.c | 255 + Xext/geext.h | 81 + Xext/geint.h | 54 + Xext/hashtable.c | 295 + Xext/hashtable.h | 137 + Xext/panoramiX.c | 1298 + Xext/panoramiX.h | 79 + Xext/panoramiXSwap.c | 133 + Xext/panoramiXh.h | 73 + Xext/panoramiXprocs.c | 2555 + Xext/panoramiXsrv.h | 63 + Xext/saver.c | 1418 + Xext/security.c | 1091 + Xext/securitysrv.h | 82 + Xext/shape.c | 1240 + Xext/shm.c | 1515 + Xext/shmint.h | 93 + Xext/sleepuntil.c | 209 + Xext/sleepuntil.h | 42 + Xext/sync.c | 2877 + Xext/syncsdk.h | 46 + Xext/syncsrv.h | 152 + Xext/xace.c | 341 + Xext/xace.h | 128 + Xext/xacestr.h | 147 + Xext/xcmisc.c | 198 + Xext/xf86bigfont.c | 739 + Xext/xf86bigfontsrv.h | 33 + Xext/xres.c | 1192 + Xext/xselinux.h | 139 + Xext/xselinux_ext.c | 719 + Xext/xselinux_hooks.c | 943 + Xext/xselinux_label.c | 381 + Xext/xselinuxint.h | 564 + Xext/xtest.c | 694 + Xext/xvdisp.c | 1879 + Xext/xvdisp.h | 2 + Xext/xvdix.h | 267 + Xext/xvmain.c | 1093 + Xext/xvmc.c | 814 + Xext/xvmcext.h | 98 + Xi/Makefile.am | 110 + Xi/Makefile.in | 904 + Xi/allowev.c | 127 + Xi/allowev.h | 39 + Xi/chgdctl.c | 253 + Xi/chgdctl.h | 44 + Xi/chgfctl.c | 515 + Xi/chgfctl.h | 39 + Xi/chgkbd.c | 98 + Xi/chgkbd.h | 39 + Xi/chgkmap.c | 116 + Xi/chgkmap.h | 39 + Xi/chgprop.c | 142 + Xi/chgprop.h | 39 + Xi/chgptr.c | 99 + Xi/chgptr.h | 42 + Xi/closedev.c | 164 + Xi/closedev.h | 39 + Xi/devbell.c | 149 + Xi/devbell.h | 39 + Xi/exevents.c | 3066 + Xi/exglobals.h | 85 + Xi/extinit.c | 1352 + Xi/getbmap.c | 132 + Xi/getbmap.h | 44 + Xi/getdctl.c | 236 + Xi/getdctl.h | 44 + Xi/getfctl.c | 358 + Xi/getfctl.h | 44 + Xi/getfocus.c | 141 + Xi/getfocus.h | 44 + Xi/getkmap.c | 156 + Xi/getkmap.h | 44 + Xi/getmmap.c | 135 + Xi/getmmap.h | 44 + Xi/getprop.c | 184 + Xi/getprop.h | 51 + Xi/getselev.c | 176 + Xi/getselev.h | 44 + Xi/getvers.c | 132 + Xi/getvers.h | 44 + Xi/grabdev.c | 214 + Xi/grabdev.h | 52 + Xi/grabdevb.c | 153 + Xi/grabdevb.h | 39 + Xi/grabdevk.c | 151 + Xi/grabdevk.h | 39 + Xi/gtmotion.c | 173 + Xi/gtmotion.h | 44 + Xi/listdev.c | 422 + Xi/listdev.h | 46 + Xi/opendev.c | 172 + Xi/opendev.h | 44 + Xi/queryst.c | 188 + Xi/queryst.h | 44 + Xi/selectev.c | 183 + Xi/selectev.h | 39 + Xi/sendexev.c | 157 + Xi/sendexev.h | 39 + Xi/setbmap.c | 140 + Xi/setbmap.h | 44 + Xi/setdval.c | 147 + Xi/setdval.h | 44 + Xi/setfocus.c | 110 + Xi/setfocus.h | 39 + Xi/setmmap.c | 146 + Xi/setmmap.h | 44 + Xi/setmode.c | 147 + Xi/setmode.h | 44 + Xi/stubs.c | 145 + Xi/ungrdev.c | 108 + Xi/ungrdev.h | 39 + Xi/ungrdevb.c | 149 + Xi/ungrdevb.h | 39 + Xi/ungrdevk.c | 155 + Xi/ungrdevk.h | 39 + Xi/xiallowev.c | 138 + Xi/xiallowev.h | 36 + Xi/xibarriers.c | 931 + Xi/xibarriers.h | 48 + Xi/xichangecursor.c | 108 + Xi/xichangecursor.h | 36 + Xi/xichangehierarchy.c | 481 + Xi/xichangehierarchy.h | 44 + Xi/xigetclientpointer.c | 106 + Xi/xigetclientpointer.h | 38 + Xi/xigrabdev.c | 173 + Xi/xigrabdev.h | 41 + Xi/xipassivegrab.c | 354 + Xi/xipassivegrab.h | 40 + Xi/xiproperty.c | 1325 + Xi/xiproperty.h | 67 + Xi/xiquerydevice.c | 595 + Xi/xiquerydevice.h | 49 + Xi/xiquerypointer.c | 225 + Xi/xiquerypointer.h | 39 + Xi/xiqueryversion.c | 152 + Xi/xiqueryversion.h | 40 + Xi/xiselectev.c | 378 + Xi/xiselectev.h | 40 + Xi/xisetclientpointer.c | 102 + Xi/xisetclientpointer.h | 36 + Xi/xisetdevfocus.c | 127 + Xi/xisetdevfocus.h | 40 + Xi/xiwarppointer.c | 190 + Xi/xiwarppointer.h | 36 + aclocal.m4 | 3670 + autogen.sh | 14 + composite/Makefile.am | 15 + composite/Makefile.in | 807 + composite/compalloc.c | 694 + composite/compext.c | 948 + composite/compinit.c | 419 + composite/compint.h | 332 + composite/compositeext.h | 40 + composite/compoverlay.c | 173 + composite/compwindow.c | 792 + config.guess | 1530 + config.sub | 1773 + config/10-evdev.conf | 40 + config/10-quirks.conf | 54 + config/Makefile.am | 47 + config/Makefile.in | 855 + config/config-backends.h | 77 + config/config.c | 191 + config/dbus-core.c | 246 + config/dbus.c | 407 + config/fdi2iclass.py | 202 + config/hal.c | 672 + config/non-seat0.conf.multi-seat | 18 + config/udev.c | 502 + config/wscons.c | 262 + config/x11-input.fdi | 93 + config/xorg-server.conf | 13 + configure | 33810 ++++ configure.ac | 2528 + damageext/Makefile.am | 7 + damageext/Makefile.in | 740 + damageext/damageext.c | 779 + damageext/damageextint.h | 73 + dbe/Makefile.am | 12 + dbe/Makefile.in | 800 + dbe/dbe.c | 1464 + dbe/dbestruct.h | 202 + dbe/midbe.c | 687 + dbe/midbe.h | 56 + depcomp | 708 + devbook.am | 55 + dix/BuiltInAtoms | 329 + dix/Makefile.am | 74 + dix/Makefile.in | 922 + dix/Xserver-dtrace.h.in | 99 + dix/Xserver.d | 60 + dix/atom.c | 210 + dix/buildatoms | 43 + dix/colormap.c | 2555 + dix/cursor.c | 501 + dix/devices.c | 2832 + dix/dispatch.c | 3956 + dix/dispatch.h | 145 + dix/dixfonts.c | 2009 + dix/dixutils.c | 869 + dix/enterleave.c | 1558 + dix/enterleave.h | 71 + dix/eventconvert.c | 978 + dix/events.c | 6175 + dix/extension.c | 335 + dix/ffs.c | 49 + dix/gc.c | 1093 + dix/getevents.c | 2126 + dix/globals.c | 133 + dix/glyphcurs.c | 181 + dix/grabs.c | 719 + dix/initatoms.c | 153 + dix/inpututils.c | 1139 + dix/main.c | 382 + dix/pixmap.c | 271 + dix/privates.c | 776 + dix/property.c | 632 + dix/protocol.txt | 1103 + dix/ptrveloc.c | 1183 + dix/region.c | 1380 + dix/registry.c | 351 + dix/resource.c | 1247 + dix/selection.c | 310 + dix/stubmain.c | 35 + dix/swaprep.c | 1174 + dix/swapreq.c | 1012 + dix/tables.c | 973 + dix/touch.c | 1140 + dix/window.c | 3630 + doc/Makefile.am | 15 + doc/Makefile.in | 870 + doc/Xinput.xml | 1203 + doc/Xserver-spec.xml | 5116 + doc/dtrace/Makefile.am | 15 + doc/dtrace/Makefile.in | 792 + doc/dtrace/Xserver-DTrace.xml | 727 + doc/smartsched | 204 + docbook.am | 105 + dri3/Makefile.am | 13 + dri3/Makefile.in | 805 + dri3/dri3.c | 92 + dri3/dri3.h | 65 + dri3/dri3_priv.h | 80 + dri3/dri3_request.c | 395 + dri3/dri3_screen.c | 86 + exa/Makefile.am | 26 + exa/Makefile.in | 825 + exa/exa.c | 1163 + exa/exa.h | 820 + exa/exa_accel.c | 1300 + exa/exa_classic.c | 265 + exa/exa_driver.c | 230 + exa/exa_glyphs.c | 839 + exa/exa_migration_classic.c | 761 + exa/exa_migration_mixed.c | 270 + exa/exa_mixed.c | 330 + exa/exa_offscreen.c | 676 + exa/exa_priv.h | 740 + exa/exa_render.c | 1225 + exa/exa_unaccel.c | 736 + fb/Makefile.am | 54 + fb/Makefile.in | 1333 + fb/fb.h | 1660 + fb/fb24_32.c | 548 + fb/fb24_32.h | 44 + fb/fballpriv.c | 58 + fb/fbarc.c | 139 + fb/fbbits.c | 174 + fb/fbbits.h | 875 + fb/fbblt.c | 790 + fb/fbbltone.c | 802 + fb/fbcmap_mi.c | 117 + fb/fbcopy.c | 275 + fb/fbfill.c | 192 + fb/fbfillrect.c | 103 + fb/fbfillsp.c | 87 + fb/fbgc.c | 296 + fb/fbgetsp.c | 70 + fb/fbglyph.c | 416 + fb/fbimage.c | 278 + fb/fbline.c | 155 + fb/fboverlay.c | 389 + fb/fboverlay.h | 112 + fb/fbpict.c | 516 + fb/fbpict.h | 75 + fb/fbpixmap.c | 369 + fb/fbpoint.c | 146 + fb/fbpush.c | 188 + fb/fbrop.h | 137 + fb/fbscreen.c | 255 + fb/fbseg.c | 627 + fb/fbsetsp.c | 84 + fb/fbsolid.c | 179 + fb/fbstipple.c | 264 + fb/fbtile.c | 163 + fb/fbtrap.c | 185 + fb/fbutil.c | 371 + fb/fbwindow.c | 205 + fb/wfbrename.h | 170 + glx/Makefile.am | 89 + glx/Makefile.in | 854 + glx/clientinfo.c | 110 + glx/createcontext.c | 352 + glx/extension_string.c | 173 + glx/extension_string.h | 74 + glx/glxbyteorder.h | 61 + glx/glxcmds.c | 2531 + glx/glxcmdsswap.c | 1009 + glx/glxcontext.h | 141 + glx/glxdrawable.h | 77 + glx/glxdri2.c | 1039 + glx/glxdricommon.c | 323 + glx/glxdricommon.h | 46 + glx/glxdriswrast.c | 499 + glx/glxext.c | 615 + glx/glxext.h | 66 + glx/glxscreens.c | 424 + glx/glxscreens.h | 163 + glx/glxserver.h | 244 + glx/glxutil.h | 51 + glx/indirect_dispatch.c | 5102 + glx/indirect_dispatch.h | 1359 + glx/indirect_dispatch_swap.c | 5671 + glx/indirect_program.c | 146 + glx/indirect_reqsize.c | 794 + glx/indirect_reqsize.h | 151 + glx/indirect_size.h | 85 + glx/indirect_size_get.c | 1220 + glx/indirect_size_get.h | 93 + glx/indirect_table.c | 1810 + glx/indirect_table.h | 106 + glx/indirect_texture_compression.c | 119 + glx/indirect_util.c | 288 + glx/indirect_util.h | 53 + glx/render2.c | 267 + glx/render2swap.c | 389 + glx/renderpix.c | 67 + glx/renderpixswap.c | 85 + glx/rensize.c | 443 + glx/single2.c | 395 + glx/single2swap.c | 276 + glx/singlepix.c | 530 + glx/singlepixswap.c | 594 + glx/singlesize.c | 199 + glx/singlesize.h | 54 + glx/swap_interval.c | 89 + glx/unpack.h | 227 + glx/xfont.c | 183 + hw/Makefile.am | 41 + hw/Makefile.in | 828 + hw/dmx/Makefile.am | 87 + hw/dmx/Makefile.in | 1093 + hw/dmx/config/Canvas.c | 165 + hw/dmx/config/Canvas.h | 55 + hw/dmx/config/CanvasP.h | 65 + hw/dmx/config/Makefile.am | 71 + hw/dmx/config/Makefile.in | 1117 + hw/dmx/config/TODO | 7 + hw/dmx/config/dmxcompat.c | 236 + hw/dmx/config/dmxcompat.h | 44 + hw/dmx/config/dmxconfig.c | 561 + hw/dmx/config/dmxconfig.h | 61 + hw/dmx/config/dmxparse.c | 688 + hw/dmx/config/dmxparse.h | 292 + hw/dmx/config/dmxprint.c | 544 + hw/dmx/config/dmxprint.h | 43 + hw/dmx/config/dmxtodmx.c | 50 + hw/dmx/config/man/Makefile.am | 2 + hw/dmx/config/man/Makefile.in | 755 + hw/dmx/config/man/dmxtodmx.man | 41 + hw/dmx/config/man/vdltodmx.man | 95 + hw/dmx/config/man/xdmxconfig.man | 63 + hw/dmx/config/parser.c | 2036 + hw/dmx/config/parser.h | 103 + hw/dmx/config/parser.y | 226 + hw/dmx/config/scanner.c | 2029 + hw/dmx/config/scanner.l | 185 + hw/dmx/config/test-a.in | 1 + hw/dmx/config/test-a.out | 2 + hw/dmx/config/test-b.in | 1 + hw/dmx/config/test-b.out | 1 + hw/dmx/config/test-c.in | 1 + hw/dmx/config/test-c.out | 2 + hw/dmx/config/test-d.in | 1 + hw/dmx/config/test-d.out | 2 + hw/dmx/config/test-e.in | 1 + hw/dmx/config/test-e.out | 2 + hw/dmx/config/test-f.in | 2 + hw/dmx/config/test-f.out | Bin 0 -> 69 bytes hw/dmx/config/test-g.in | 4 + hw/dmx/config/test-g.out | 4 + hw/dmx/config/test-h.in | 7 + hw/dmx/config/test-h.out | 7 + hw/dmx/config/test-i.in | 3 + hw/dmx/config/test-i.out | 3 + hw/dmx/config/test-j.in | 13 + hw/dmx/config/test-j.out | 11 + hw/dmx/config/test-k.in | 3 + hw/dmx/config/test-k.out | 3 + hw/dmx/config/test-l.in | 12 + hw/dmx/config/test-l.out | 12 + hw/dmx/config/vdltodmx.c | 59 + hw/dmx/config/xdmxconfig.c | 1230 + hw/dmx/dmx-config.h | 75 + hw/dmx/dmx.c | 1201 + hw/dmx/dmx.h | 408 + hw/dmx/dmx_glxvisuals.c | 615 + hw/dmx/dmx_glxvisuals.h | 57 + hw/dmx/dmxcb.c | 232 + hw/dmx/dmxcb.h | 53 + hw/dmx/dmxclient.h | 139 + hw/dmx/dmxcmap.c | 222 + hw/dmx/dmxcmap.h | 65 + hw/dmx/dmxcursor.c | 1023 + hw/dmx/dmxcursor.h | 73 + hw/dmx/dmxdpms.c | 236 + hw/dmx/dmxdpms.h | 42 + hw/dmx/dmxextension.c | 1705 + hw/dmx/dmxextension.h | 115 + hw/dmx/dmxfont.c | 572 + hw/dmx/dmxfont.h | 59 + hw/dmx/dmxgc.c | 454 + hw/dmx/dmxgc.h | 85 + hw/dmx/dmxgcops.c | 637 + hw/dmx/dmxgcops.h | 95 + hw/dmx/dmxinit.c | 1126 + hw/dmx/dmxinit.h | 50 + hw/dmx/dmxinput.c | 125 + hw/dmx/dmxinput.h | 160 + hw/dmx/dmxlog.c | 446 + hw/dmx/dmxlog.h | 81 + hw/dmx/dmxpict.c | 1276 + hw/dmx/dmxpict.h | 116 + hw/dmx/dmxpixmap.c | 262 + hw/dmx/dmxpixmap.h | 63 + hw/dmx/dmxprop.c | 375 + hw/dmx/dmxprop.h | 45 + hw/dmx/dmxscrinit.c | 472 + hw/dmx/dmxscrinit.h | 48 + hw/dmx/dmxstat.c | 238 + hw/dmx/dmxstat.h | 55 + hw/dmx/dmxsync.c | 207 + hw/dmx/dmxsync.h | 43 + hw/dmx/dmxvisual.c | 146 + hw/dmx/dmxvisual.h | 47 + hw/dmx/dmxwindow.c | 1048 + hw/dmx/dmxwindow.h | 132 + hw/dmx/doc/DMXSpec-v1.txt | 458 + hw/dmx/doc/DMXSpec.txt | 875 + hw/dmx/doc/Makefile.am | 34 + hw/dmx/doc/Makefile.in | 691 + hw/dmx/doc/dmx.xml | 3417 + hw/dmx/doc/scaled.xml | 727 + hw/dmx/doxygen/Makefile.am | 36 + hw/dmx/doxygen/Makefile.in | 650 + hw/dmx/doxygen/doxygen.conf.in | 1559 + hw/dmx/doxygen/footer.html | 4 + hw/dmx/examples/Makefile.am | 70 + hw/dmx/examples/Makefile.in | 1203 + hw/dmx/examples/dmxaddinput.c | 85 + hw/dmx/examples/dmxaddscreen.c | 106 + hw/dmx/examples/dmxinfo.c | 256 + hw/dmx/examples/dmxreconfig.c | 161 + hw/dmx/examples/dmxresize.c | 103 + hw/dmx/examples/dmxrminput.c | 79 + hw/dmx/examples/dmxrmscreen.c | 81 + hw/dmx/examples/dmxwininfo.c | 477 + hw/dmx/examples/ev.c | 274 + hw/dmx/examples/evi.c | 87 + hw/dmx/examples/res.c | 101 + hw/dmx/examples/xbell.c | 101 + hw/dmx/examples/xinput.c | 355 + hw/dmx/examples/xled.c | 126 + hw/dmx/examples/xtest.c | 77 + hw/dmx/glxProxy/Makefile.am | 42 + hw/dmx/glxProxy/Makefile.in | 796 + hw/dmx/glxProxy/compsize.c | 641 + hw/dmx/glxProxy/compsize.h | 51 + hw/dmx/glxProxy/g_disptab.c | 610 + hw/dmx/glxProxy/g_disptab.h | 680 + hw/dmx/glxProxy/g_renderswap.c | 2663 + hw/dmx/glxProxy/global.c | 70 + hw/dmx/glxProxy/glxcmds.c | 3852 + hw/dmx/glxProxy/glxcmds.h | 37 + hw/dmx/glxProxy/glxcmdsswap.c | 1160 + hw/dmx/glxProxy/glxcontext.h | 111 + hw/dmx/glxProxy/glxdrawable.h | 65 + hw/dmx/glxProxy/glxerror.h | 51 + hw/dmx/glxProxy/glxext.c | 503 + hw/dmx/glxProxy/glxext.h | 69 + hw/dmx/glxProxy/glxfbconfig.c | 106 + hw/dmx/glxProxy/glxfbconfig.h | 39 + hw/dmx/glxProxy/glxscreens.c | 341 + hw/dmx/glxProxy/glxscreens.h | 53 + hw/dmx/glxProxy/glxserver.h | 300 + hw/dmx/glxProxy/glxsingle.c | 1068 + hw/dmx/glxProxy/glxsingle.h | 54 + hw/dmx/glxProxy/glxswap.c | 562 + hw/dmx/glxProxy/glxswap.h | 46 + hw/dmx/glxProxy/glxutil.h | 39 + hw/dmx/glxProxy/glxvendor.c | 620 + hw/dmx/glxProxy/glxvendor.h | 53 + hw/dmx/glxProxy/glxvisuals.c | 158 + hw/dmx/glxProxy/glxvisuals.h | 46 + hw/dmx/glxProxy/render2swap.c | 305 + hw/dmx/glxProxy/renderpixswap.c | 406 + hw/dmx/glxProxy/unpack.h | 223 + hw/dmx/input/ChkNotMaskEv.c | 106 + hw/dmx/input/ChkNotMaskEv.h | 40 + hw/dmx/input/Makefile.am | 67 + hw/dmx/input/Makefile.in | 831 + hw/dmx/input/atKeynames.h | 292 + hw/dmx/input/dmxarg.c | 190 + hw/dmx/input/dmxarg.h | 49 + hw/dmx/input/dmxbackend.c | 661 + hw/dmx/input/dmxbackend.h | 56 + hw/dmx/input/dmxcommon.c | 693 + hw/dmx/input/dmxcommon.h | 124 + hw/dmx/input/dmxconsole.c | 1090 + hw/dmx/input/dmxconsole.h | 59 + hw/dmx/input/dmxdetach.c | 60 + hw/dmx/input/dmxdummy.c | 88 + hw/dmx/input/dmxdummy.h | 43 + hw/dmx/input/dmxevents.c | 831 + hw/dmx/input/dmxevents.h | 46 + hw/dmx/input/dmxinputinit.c | 1390 + hw/dmx/input/dmxinputinit.h | 284 + hw/dmx/input/dmxmap.c | 127 + hw/dmx/input/dmxmap.h | 42 + hw/dmx/input/dmxmotion.c | 149 + hw/dmx/input/dmxmotion.h | 48 + hw/dmx/input/dmxsigio.c | 234 + hw/dmx/input/dmxsigio.h | 43 + hw/dmx/input/dmxxinput.c | 75 + hw/dmx/input/lnx-keyboard.c | 1194 + hw/dmx/input/lnx-keyboard.h | 63 + hw/dmx/input/lnx-ms.c | 348 + hw/dmx/input/lnx-ms.h | 55 + hw/dmx/input/lnx-ps2.c | 318 + hw/dmx/input/lnx-ps2.h | 55 + hw/dmx/input/usb-common.c | 492 + hw/dmx/input/usb-common.h | 54 + hw/dmx/input/usb-keyboard.c | 477 + hw/dmx/input/usb-keyboard.h | 47 + hw/dmx/input/usb-mouse.c | 133 + hw/dmx/input/usb-mouse.h | 47 + hw/dmx/input/usb-other.c | 166 + hw/dmx/input/usb-other.h | 47 + hw/dmx/input/usb-private.h | 117 + hw/dmx/man/Makefile.am | 2 + hw/dmx/man/Makefile.in | 755 + hw/dmx/man/Xdmx.man | 735 + hw/kdrive/Makefile.am | 30 + hw/kdrive/Makefile.in | 826 + hw/kdrive/ephyr/Makefile.am | 74 + hw/kdrive/ephyr/Makefile.in | 1012 + hw/kdrive/ephyr/README | 73 + hw/kdrive/ephyr/ephyr.c | 1345 + hw/kdrive/ephyr/ephyr.h | 210 + hw/kdrive/ephyr/ephyr_draw.c | 531 + hw/kdrive/ephyr/ephyrdri.c | 356 + hw/kdrive/ephyr/ephyrdri.h | 70 + hw/kdrive/ephyr/ephyrdriext.c | 1377 + hw/kdrive/ephyr/ephyrdriext.h | 40 + hw/kdrive/ephyr/ephyrglxext.c | 854 + hw/kdrive/ephyr/ephyrglxext.h | 34 + hw/kdrive/ephyr/ephyrhostglx.c | 490 + hw/kdrive/ephyr/ephyrhostglx.h | 75 + hw/kdrive/ephyr/ephyrinit.c | 424 + hw/kdrive/ephyr/ephyrlog.h | 67 + hw/kdrive/ephyr/ephyrvideo.c | 1268 + hw/kdrive/ephyr/hostx.c | 1180 + hw/kdrive/ephyr/hostx.h | 191 + hw/kdrive/ephyr/man/Makefile.am | 2 + hw/kdrive/ephyr/man/Makefile.in | 755 + hw/kdrive/ephyr/man/Xephyr.man | 93 + hw/kdrive/ephyr/os.c | 49 + hw/kdrive/fake/Makefile.am | 30 + hw/kdrive/fake/Makefile.in | 827 + hw/kdrive/fake/fake.c | 450 + hw/kdrive/fake/fake.h | 131 + hw/kdrive/fake/fakeinit.c | 119 + hw/kdrive/fake/kbd.c | 75 + hw/kdrive/fake/mouse.c | 65 + hw/kdrive/fake/os.c | 62 + hw/kdrive/fbdev/Makefile.am | 29 + hw/kdrive/fbdev/Makefile.in | 822 + hw/kdrive/fbdev/fbdev.c | 898 + hw/kdrive/fbdev/fbdev.h | 99 + hw/kdrive/fbdev/fbinit.c | 105 + hw/kdrive/linux/Makefile.am | 27 + hw/kdrive/linux/Makefile.in | 759 + hw/kdrive/linux/evdev.c | 519 + hw/kdrive/linux/keyboard.c | 782 + hw/kdrive/linux/linux.c | 372 + hw/kdrive/linux/mouse.c | 998 + hw/kdrive/linux/ms.c | 178 + hw/kdrive/linux/ps2.c | 180 + hw/kdrive/linux/tslib.c | 195 + hw/kdrive/src/Makefile.am | 28 + hw/kdrive/src/Makefile.in | 792 + hw/kdrive/src/fourcc.h | 132 + hw/kdrive/src/kcmap.c | 243 + hw/kdrive/src/kdrive.c | 1123 + hw/kdrive/src/kdrive.h | 600 + hw/kdrive/src/kinfo.c | 150 + hw/kdrive/src/kinput.c | 2260 + hw/kdrive/src/kmode.c | 378 + hw/kdrive/src/kshadow.c | 80 + hw/kdrive/src/kxv.c | 1885 + hw/kdrive/src/kxv.h | 277 + hw/vfb/InitInput.c | 152 + hw/vfb/InitOutput.c | 965 + hw/vfb/Makefile.am | 32 + hw/vfb/Makefile.in | 1039 + hw/vfb/man/Makefile.am | 2 + hw/vfb/man/Makefile.in | 755 + hw/vfb/man/Xvfb.man | 125 + hw/xfree86/Makefile.am | 133 + hw/xfree86/Makefile.in | 1048 + hw/xfree86/common/Makefile.am | 106 + hw/xfree86/common/Makefile.in | 941 + hw/xfree86/common/compiler.h | 1745 + hw/xfree86/common/dgaproc.h | 110 + hw/xfree86/common/extramodes | 27 + hw/xfree86/common/fourcc.h | 159 + hw/xfree86/common/modeline2c.awk | 93 + hw/xfree86/common/vesamodes | 111 + hw/xfree86/common/vidmodeproc.h | 84 + hw/xfree86/common/xaarop.h | 268 + hw/xfree86/common/xf86.h | 452 + hw/xfree86/common/xf86AutoConfig.c | 422 + hw/xfree86/common/xf86Build.h.in | 2 + hw/xfree86/common/xf86Bus.c | 686 + hw/xfree86/common/xf86Bus.h | 75 + hw/xfree86/common/xf86Config.c | 2522 + hw/xfree86/common/xf86Config.h | 72 + hw/xfree86/common/xf86Configure.c | 809 + hw/xfree86/common/xf86Cursor.c | 875 + hw/xfree86/common/xf86DGA.c | 2199 + hw/xfree86/common/xf86DPMS.c | 218 + hw/xfree86/common/xf86Events.c | 798 + hw/xfree86/common/xf86Extensions.c | 142 + hw/xfree86/common/xf86Extensions.h | 55 + hw/xfree86/common/xf86Globals.c | 206 + hw/xfree86/common/xf86Helper.c | 1912 + hw/xfree86/common/xf86InPriv.h | 43 + hw/xfree86/common/xf86Init.c | 1644 + hw/xfree86/common/xf86Mode.c | 2148 + hw/xfree86/common/xf86Module.h | 199 + hw/xfree86/common/xf86Opt.h | 158 + hw/xfree86/common/xf86Option.c | 919 + hw/xfree86/common/xf86Optionstr.h | 42 + hw/xfree86/common/xf86PM.c | 237 + hw/xfree86/common/xf86PciInfo.h | 732 + hw/xfree86/common/xf86Priv.h | 171 + hw/xfree86/common/xf86Privstr.h | 166 + hw/xfree86/common/xf86RandR.c | 476 + hw/xfree86/common/xf86VGAarbiter.c | 1026 + hw/xfree86/common/xf86VGAarbiter.h | 49 + hw/xfree86/common/xf86VGAarbiterPriv.h | 268 + hw/xfree86/common/xf86VidMode.c | 669 + hw/xfree86/common/xf86Xinput.c | 1472 + hw/xfree86/common/xf86Xinput.h | 204 + hw/xfree86/common/xf86cmap.c | 1179 + hw/xfree86/common/xf86cmap.h | 67 + hw/xfree86/common/xf86fbBus.c | 100 + hw/xfree86/common/xf86fbman.c | 1433 + hw/xfree86/common/xf86fbman.h | 171 + hw/xfree86/common/xf86noBus.c | 65 + hw/xfree86/common/xf86pciBus.c | 1516 + hw/xfree86/common/xf86pciBus.h | 55 + hw/xfree86/common/xf86platformBus.c | 534 + hw/xfree86/common/xf86platformBus.h | 68 + hw/xfree86/common/xf86sbusBus.c | 757 + hw/xfree86/common/xf86sbusBus.h | 111 + hw/xfree86/common/xf86str.h | 899 + hw/xfree86/common/xf86vmode.c | 2165 + hw/xfree86/common/xf86xv.c | 2160 + hw/xfree86/common/xf86xv.h | 266 + hw/xfree86/common/xf86xvmc.c | 222 + hw/xfree86/common/xf86xvmc.h | 141 + hw/xfree86/common/xf86xvpriv.h | 88 + hw/xfree86/common/xisb.c | 168 + hw/xfree86/common/xisb.h | 65 + hw/xfree86/common/xorgHelper.c | 22 + hw/xfree86/common/xorgVersion.h | 49 + hw/xfree86/ddc/DDC.HOWTO | 97 + hw/xfree86/ddc/Makefile.am | 11 + hw/xfree86/ddc/Makefile.in | 800 + hw/xfree86/ddc/ddc.c | 528 + hw/xfree86/ddc/ddcProperty.c | 86 + hw/xfree86/ddc/edid.h | 657 + hw/xfree86/ddc/interpret_edid.c | 714 + hw/xfree86/ddc/print_edid.c | 562 + hw/xfree86/ddc/xf86DDC.h | 101 + hw/xfree86/dixmods/Makefile.am | 50 + hw/xfree86/dixmods/Makefile.in | 967 + hw/xfree86/dixmods/fbmodule.c | 52 + hw/xfree86/dixmods/glxmodule.c | 96 + hw/xfree86/dixmods/shmodule.c | 53 + hw/xfree86/dixmods/xkbKillSrv.c | 54 + hw/xfree86/dixmods/xkbPrivate.c | 51 + hw/xfree86/dixmods/xkbVT.c | 64 + hw/xfree86/doc/Makefile.am | 18 + hw/xfree86/doc/Makefile.in | 675 + hw/xfree86/doc/README.DRIcomp | 554 + hw/xfree86/doc/README.modes | 473 + hw/xfree86/doc/Registry | 409 + hw/xfree86/doc/ddxDesign.xml | 9290 + hw/xfree86/doc/exa-driver.txt | 89 + hw/xfree86/dri/Makefile.am | 20 + hw/xfree86/dri/Makefile.in | 812 + hw/xfree86/dri/dri.c | 2517 + hw/xfree86/dri/dri.h | 361 + hw/xfree86/dri/dristruct.h | 124 + hw/xfree86/dri/sarea.h | 96 + hw/xfree86/dri/xf86dri.c | 619 + hw/xfree86/dri2/Makefile.am | 14 + hw/xfree86/dri2/Makefile.in | 805 + hw/xfree86/dri2/dri2.c | 1622 + hw/xfree86/dri2/dri2.h | 362 + hw/xfree86/dri2/dri2ext.c | 689 + hw/xfree86/dri2/dri2int.h | 26 + hw/xfree86/exa/Makefile.am | 18 + hw/xfree86/exa/Makefile.in | 958 + hw/xfree86/exa/examodule.c | 197 + hw/xfree86/exa/man/Makefile.am | 2 + hw/xfree86/exa/man/Makefile.in | 755 + hw/xfree86/exa/man/exa.man | 42 + hw/xfree86/fbdevhw/Makefile.am | 19 + hw/xfree86/fbdevhw/Makefile.in | 978 + hw/xfree86/fbdevhw/README | 16 + hw/xfree86/fbdevhw/fbdevhw.c | 925 + hw/xfree86/fbdevhw/fbdevhw.h | 66 + hw/xfree86/fbdevhw/fbdevhwstub.c | 218 + hw/xfree86/fbdevhw/fbpriv.h | 263 + hw/xfree86/fbdevhw/man/Makefile.am | 2 + hw/xfree86/fbdevhw/man/Makefile.in | 755 + hw/xfree86/fbdevhw/man/fbdevhw.man | 22 + hw/xfree86/i2c/Makefile.am | 43 + hw/xfree86/i2c/Makefile.in | 938 + hw/xfree86/i2c/bt829.c | 821 + hw/xfree86/i2c/bt829.h | 103 + hw/xfree86/i2c/bt829_module.c | 20 + hw/xfree86/i2c/fi1236.c | 686 + hw/xfree86/i2c/fi1236.h | 113 + hw/xfree86/i2c/fi1236_module.c | 24 + hw/xfree86/i2c/i2c_def.h | 6 + hw/xfree86/i2c/msp3430.c | 779 + hw/xfree86/i2c/msp3430.h | 116 + hw/xfree86/i2c/msp3430_module.c | 24 + hw/xfree86/i2c/tda8425.c | 83 + hw/xfree86/i2c/tda8425.h | 44 + hw/xfree86/i2c/tda8425_module.c | 24 + hw/xfree86/i2c/tda9850.c | 136 + hw/xfree86/i2c/tda9850.h | 43 + hw/xfree86/i2c/tda9850_module.c | 24 + hw/xfree86/i2c/tda9885.c | 100 + hw/xfree86/i2c/tda9885.h | 63 + hw/xfree86/i2c/tda9885_module.c | 24 + hw/xfree86/i2c/uda1380.c | 196 + hw/xfree86/i2c/uda1380.h | 81 + hw/xfree86/i2c/uda1380_module.c | 24 + hw/xfree86/i2c/xf86i2c.c | 880 + hw/xfree86/i2c/xf86i2c.h | 117 + hw/xfree86/int10/INT10.HOWTO | 344 + hw/xfree86/int10/Makefile.am | 46 + hw/xfree86/int10/Makefile.in | 887 + hw/xfree86/int10/generic.c | 432 + hw/xfree86/int10/helper_exec.c | 766 + hw/xfree86/int10/helper_mem.c | 324 + hw/xfree86/int10/stub.c | 69 + hw/xfree86/int10/x86emu.c | 12 + hw/xfree86/int10/xf86int10.c | 884 + hw/xfree86/int10/xf86int10.h | 191 + hw/xfree86/int10/xf86int10module.c | 32 + hw/xfree86/int10/xf86x86emu.c | 91 + hw/xfree86/int10/xf86x86emu.h | 54 + hw/xfree86/loader/Makefile.am | 20 + hw/xfree86/loader/Makefile.in | 756 + hw/xfree86/loader/loader.c | 214 + hw/xfree86/loader/loader.h | 77 + hw/xfree86/loader/loaderProcs.h | 93 + hw/xfree86/loader/loadmod.c | 1269 + hw/xfree86/loader/os.c | 72 + hw/xfree86/man/Makefile.am | 3 + hw/xfree86/man/Makefile.in | 756 + hw/xfree86/man/Xorg.man | 697 + hw/xfree86/man/xorg.conf.d.man | 1 + hw/xfree86/man/xorg.conf.man | 2435 + hw/xfree86/modes/Makefile.am | 33 + hw/xfree86/modes/Makefile.in | 835 + hw/xfree86/modes/xf86Crtc.c | 3385 + hw/xfree86/modes/xf86Crtc.h | 1021 + hw/xfree86/modes/xf86Cursors.c | 683 + hw/xfree86/modes/xf86DiDGA.c | 214 + hw/xfree86/modes/xf86DisplayIDModes.c | 444 + hw/xfree86/modes/xf86EdidModes.c | 1208 + hw/xfree86/modes/xf86Modes.c | 796 + hw/xfree86/modes/xf86Modes.h | 117 + hw/xfree86/modes/xf86RandR12.c | 1986 + hw/xfree86/modes/xf86RandR12.h | 43 + hw/xfree86/modes/xf86Rotate.c | 494 + hw/xfree86/modes/xf86cvt.c | 296 + hw/xfree86/modes/xf86gtf.c | 386 + hw/xfree86/os-support/Makefile.am | 18 + hw/xfree86/os-support/Makefile.in | 926 + hw/xfree86/os-support/bsd/Makefile.am | 76 + hw/xfree86/os-support/bsd/Makefile.in | 909 + hw/xfree86/os-support/bsd/alpha_video.c | 680 + hw/xfree86/os-support/bsd/arm_video.c | 628 + hw/xfree86/os-support/bsd/bsd_VTsw.c | 103 + hw/xfree86/os-support/bsd/bsd_apm.c | 139 + hw/xfree86/os-support/bsd/bsd_axp.c | 71 + hw/xfree86/os-support/bsd/bsd_bell.c | 80 + hw/xfree86/os-support/bsd/bsd_ev56.c | 99 + hw/xfree86/os-support/bsd/bsd_init.c | 663 + hw/xfree86/os-support/bsd/bsd_kmod.c | 29 + hw/xfree86/os-support/bsd/bsd_kqueue_apm.c | 201 + hw/xfree86/os-support/bsd/i386_video.c | 886 + hw/xfree86/os-support/bsd/memrange.h | 72 + hw/xfree86/os-support/bsd/ppc_video.c | 141 + hw/xfree86/os-support/bsd/sparc64_video.c | 85 + hw/xfree86/os-support/bus/Makefile.am | 24 + hw/xfree86/os-support/bus/Makefile.in | 810 + hw/xfree86/os-support/bus/Pci.c | 140 + hw/xfree86/os-support/bus/Pci.h | 148 + hw/xfree86/os-support/bus/Sbus.c | 723 + hw/xfree86/os-support/bus/bsd_pci.c | 55 + hw/xfree86/os-support/bus/nobus.c | 5 + hw/xfree86/os-support/bus/xf86Pci.h | 259 + hw/xfree86/os-support/bus/xf86Sbus.h | 69 + hw/xfree86/os-support/hurd/Makefile.am | 15 + hw/xfree86/os-support/hurd/Makefile.in | 808 + hw/xfree86/os-support/hurd/hurd_bell.c | 37 + hw/xfree86/os-support/hurd/hurd_init.c | 89 + hw/xfree86/os-support/hurd/hurd_mmap.c | 94 + hw/xfree86/os-support/hurd/hurd_video.c | 153 + hw/xfree86/os-support/int10Defines.h | 89 + hw/xfree86/os-support/linux/Makefile.am | 44 + hw/xfree86/os-support/linux/Makefile.in | 859 + hw/xfree86/os-support/linux/int10/linux.c | 546 + .../os-support/linux/int10/vm86/linux_vm86.c | 334 + hw/xfree86/os-support/linux/lnx_acpi.c | 182 + hw/xfree86/os-support/linux/lnx_agp.c | 371 + hw/xfree86/os-support/linux/lnx_apm.c | 198 + hw/xfree86/os-support/linux/lnx_axp.c | 103 + hw/xfree86/os-support/linux/lnx_bell.c | 46 + hw/xfree86/os-support/linux/lnx_ev56.c | 83 + hw/xfree86/os-support/linux/lnx_init.c | 344 + hw/xfree86/os-support/linux/lnx_kmod.c | 111 + hw/xfree86/os-support/linux/lnx_platform.c | 219 + hw/xfree86/os-support/linux/lnx_video.c | 881 + hw/xfree86/os-support/misc/Makefile.am | 12 + hw/xfree86/os-support/misc/Makefile.in | 741 + hw/xfree86/os-support/misc/SlowBcopy.c | 116 + hw/xfree86/os-support/shared/VTsw_noop.c | 60 + hw/xfree86/os-support/shared/VTsw_usl.c | 86 + hw/xfree86/os-support/shared/agp_noop.c | 102 + hw/xfree86/os-support/shared/bios_mmap.c | 135 + hw/xfree86/os-support/shared/ioperm_noop.c | 48 + hw/xfree86/os-support/shared/kmod_noop.c | 39 + hw/xfree86/os-support/shared/pm_noop.c | 45 + hw/xfree86/os-support/shared/posix_tty.c | 629 + hw/xfree86/os-support/shared/sigio.c | 291 + hw/xfree86/os-support/shared/sigiostubs.c | 70 + hw/xfree86/os-support/shared/vidmem.c | 259 + hw/xfree86/os-support/shared/xf86Axp.c | 60 + hw/xfree86/os-support/shared/xf86Axp.h | 33 + hw/xfree86/os-support/solaris/Makefile.am | 37 + hw/xfree86/os-support/solaris/Makefile.in | 938 + hw/xfree86/os-support/solaris/apSolaris.shar | 806 + hw/xfree86/os-support/solaris/solaris-amd64.S | 67 + hw/xfree86/os-support/solaris/solaris-ia32.S | 67 + .../os-support/solaris/solaris-sparcv8plus.S | 138 + hw/xfree86/os-support/solaris/sun_VTsw.c | 134 + hw/xfree86/os-support/solaris/sun_agp.c | 326 + hw/xfree86/os-support/solaris/sun_apm.c | 225 + hw/xfree86/os-support/solaris/sun_bell.c | 183 + hw/xfree86/os-support/solaris/sun_init.c | 424 + hw/xfree86/os-support/solaris/sun_inout.s | 124 + hw/xfree86/os-support/solaris/sun_vid.c | 247 + hw/xfree86/os-support/stub/Makefile.am | 19 + hw/xfree86/os-support/stub/Makefile.in | 820 + hw/xfree86/os-support/stub/stub_bell.c | 10 + hw/xfree86/os-support/stub/stub_bios.c | 12 + hw/xfree86/os-support/stub/stub_init.c | 26 + hw/xfree86/os-support/stub/stub_video.c | 13 + hw/xfree86/os-support/xf86OSpriv.h | 54 + hw/xfree86/os-support/xf86_OSlib.h | 371 + hw/xfree86/os-support/xf86_OSproc.h | 231 + hw/xfree86/parser/Configint.h | 210 + hw/xfree86/parser/DRI.c | 122 + hw/xfree86/parser/Device.c | 358 + hw/xfree86/parser/Extensions.c | 111 + hw/xfree86/parser/Files.c | 230 + hw/xfree86/parser/Flags.c | 496 + hw/xfree86/parser/Input.c | 204 + hw/xfree86/parser/InputClass.c | 433 + hw/xfree86/parser/Layout.c | 532 + hw/xfree86/parser/Makefile.am | 54 + hw/xfree86/parser/Makefile.in | 1063 + hw/xfree86/parser/Module.c | 268 + hw/xfree86/parser/Monitor.c | 862 + hw/xfree86/parser/Pointer.c | 223 + hw/xfree86/parser/Screen.c | 541 + hw/xfree86/parser/Vendor.c | 234 + hw/xfree86/parser/Video.c | 284 + hw/xfree86/parser/configProcs.h | 150 + hw/xfree86/parser/read.c | 290 + hw/xfree86/parser/scan.c | 1165 + hw/xfree86/parser/write.c | 204 + hw/xfree86/parser/xf86Optrec.h | 93 + hw/xfree86/parser/xf86Parser.h | 468 + hw/xfree86/parser/xf86tokens.h | 291 + hw/xfree86/ramdac/BT.c | 167 + hw/xfree86/ramdac/BT.h | 37 + hw/xfree86/ramdac/BTPriv.h | 20 + hw/xfree86/ramdac/CURSOR.NOTES | 191 + hw/xfree86/ramdac/IBM.c | 643 + hw/xfree86/ramdac/IBM.h | 418 + hw/xfree86/ramdac/IBMPriv.h | 27 + hw/xfree86/ramdac/Makefile.am | 12 + hw/xfree86/ramdac/Makefile.in | 807 + hw/xfree86/ramdac/TI.c | 725 + hw/xfree86/ramdac/TI.h | 106 + hw/xfree86/ramdac/TIPriv.h | 29 + hw/xfree86/ramdac/xf86Cursor.c | 481 + hw/xfree86/ramdac/xf86Cursor.h | 52 + hw/xfree86/ramdac/xf86CursorPriv.h | 50 + hw/xfree86/ramdac/xf86HWCurs.c | 551 + hw/xfree86/ramdac/xf86RamDac.c | 152 + hw/xfree86/ramdac/xf86RamDac.h | 88 + hw/xfree86/ramdac/xf86RamDacCmap.c | 71 + hw/xfree86/ramdac/xf86RamDacPriv.h | 13 + hw/xfree86/sdksyms.sh | 425 + hw/xfree86/shadowfb/Makefile.am | 10 + hw/xfree86/shadowfb/Makefile.in | 827 + hw/xfree86/shadowfb/sfbmodule.c | 20 + hw/xfree86/shadowfb/shadow.c | 1639 + hw/xfree86/shadowfb/shadowfb.h | 39 + hw/xfree86/utils/Makefile.am | 4 + hw/xfree86/utils/Makefile.in | 814 + hw/xfree86/utils/cvt/Makefile.am | 35 + hw/xfree86/utils/cvt/Makefile.in | 859 + hw/xfree86/utils/cvt/cvt.c | 294 + hw/xfree86/utils/gtf/Makefile.am | 27 + hw/xfree86/utils/gtf/Makefile.in | 819 + hw/xfree86/utils/gtf/gtf.c | 697 + hw/xfree86/utils/man/Makefile.am | 2 + hw/xfree86/utils/man/Makefile.in | 755 + hw/xfree86/utils/man/cvt.man | 41 + hw/xfree86/utils/man/gtf.man | 44 + hw/xfree86/vbe/Makefile.am | 14 + hw/xfree86/vbe/Makefile.in | 829 + hw/xfree86/vbe/vbe.c | 1096 + hw/xfree86/vbe/vbe.h | 357 + hw/xfree86/vbe/vbeModes.c | 451 + hw/xfree86/vbe/vbeModes.h | 94 + hw/xfree86/vbe/vbe_module.c | 22 + hw/xfree86/vgahw/Makefile.am | 9 + hw/xfree86/vgahw/Makefile.in | 825 + hw/xfree86/vgahw/vgaCmap.c | 276 + hw/xfree86/vgahw/vgaHW.c | 2077 + hw/xfree86/vgahw/vgaHW.h | 237 + hw/xfree86/vgahw/vgaHWmodule.c | 24 + hw/xfree86/x86emu/Makefile.am | 29 + hw/xfree86/x86emu/Makefile.in | 767 + hw/xfree86/x86emu/debug.c | 495 + hw/xfree86/x86emu/decode.c | 1102 + hw/xfree86/x86emu/fpu.c | 976 + hw/xfree86/x86emu/ops.c | 12307 ++ hw/xfree86/x86emu/ops2.c | 3008 + hw/xfree86/x86emu/prim_ops.c | 2859 + hw/xfree86/x86emu/sys.c | 550 + hw/xfree86/x86emu/validate.c | 769 + hw/xfree86/x86emu/x86emu.h | 197 + hw/xfree86/x86emu/x86emu/debug.h | 209 + hw/xfree86/x86emu/x86emu/decode.h | 87 + hw/xfree86/x86emu/x86emu/fpu.h | 60 + hw/xfree86/x86emu/x86emu/fpu_regs.h | 119 + hw/xfree86/x86emu/x86emu/ops.h | 45 + hw/xfree86/x86emu/x86emu/prim_asm.h | 1053 + hw/xfree86/x86emu/x86emu/prim_ops.h | 141 + hw/xfree86/x86emu/x86emu/prim_x86_gcc.h | 77 + hw/xfree86/x86emu/x86emu/regs.h | 345 + hw/xfree86/x86emu/x86emu/types.h | 80 + hw/xfree86/x86emu/x86emu/x86emui.h | 110 + hw/xfree86/xorgconf.cpp | 572 + hw/xnest/Args.c | 192 + hw/xnest/Args.h | 38 + hw/xnest/Color.c | 493 + hw/xnest/Color.h | 58 + hw/xnest/Cursor.c | 173 + hw/xnest/Display.c | 213 + hw/xnest/Display.h | 44 + hw/xnest/Drawable.h | 26 + hw/xnest/Events.c | 218 + hw/xnest/Events.h | 29 + hw/xnest/Font.c | 88 + hw/xnest/GC.c | 328 + hw/xnest/GCOps.c | 339 + hw/xnest/GCOps.h | 68 + hw/xnest/Handlers.c | 45 + hw/xnest/Handlers.h | 22 + hw/xnest/Init.c | 156 + hw/xnest/Init.h | 20 + hw/xnest/Keyboard.c | 267 + hw/xnest/Keyboard.h | 28 + hw/xnest/Makefile.am | 71 + hw/xnest/Makefile.in | 1095 + hw/xnest/Pixmap.c | 151 + hw/xnest/Pointer.c | 96 + hw/xnest/Pointer.h | 29 + hw/xnest/Screen.c | 426 + hw/xnest/Screen.h | 25 + hw/xnest/Visual.c | 69 + hw/xnest/Visual.h | 25 + hw/xnest/Window.c | 517 + hw/xnest/XNCursor.h | 52 + hw/xnest/XNFont.h | 34 + hw/xnest/XNGC.h | 43 + hw/xnest/XNPixmap.h | 40 + hw/xnest/XNWindow.h | 74 + hw/xnest/Xnest.h | 90 + hw/xnest/icon | 14 + hw/xnest/man/Makefile.am | 2 + hw/xnest/man/Makefile.in | 755 + hw/xnest/man/Xnest.man | 428 + hw/xnest/screensaver | 686 + hw/xnest/xnest-config.h | 36 + hw/xquartz/GL/Makefile.am | 17 + hw/xquartz/GL/Makefile.in | 755 + hw/xquartz/GL/capabilities.c | 571 + hw/xquartz/GL/capabilities.h | 68 + hw/xquartz/GL/indirect.c | 676 + hw/xquartz/GL/visualConfigs.c | 284 + hw/xquartz/GL/visualConfigs.h | 29 + hw/xquartz/Makefile.am | 55 + hw/xquartz/Makefile.in | 1000 + hw/xquartz/X11Application.h | 131 + hw/xquartz/X11Application.m | 1846 + hw/xquartz/X11Controller.h | 157 + hw/xquartz/X11Controller.m | 987 + hw/xquartz/applewm.c | 741 + hw/xquartz/applewmExt.h | 92 + hw/xquartz/bundle/Info.plist.cpp | 51 + hw/xquartz/bundle/Makefile.am | 183 + hw/xquartz/bundle/Makefile.in | 866 + hw/xquartz/bundle/PkgInfo | 1 + .../Resources/Dutch.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/Dutch.lproj/Localizable.strings | Bin 0 -> 4560 bytes .../Resources/Dutch.lproj/locversion.plist | 14 + .../Dutch.lproj/main.nib/designable.nib | 3666 + .../Dutch.lproj/main.nib/keyedobjects.nib | Bin 0 -> 34903 bytes .../Resources/English.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../English.lproj/Localizable.strings | Bin 0 -> 5454 bytes .../Resources/English.lproj/locversion.plist | 14 + .../English.lproj/main.nib/designable.nib | 3744 + .../English.lproj/main.nib/keyedobjects.nib | Bin 0 -> 44012 bytes .../Resources/French.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../French.lproj/Localizable.strings | Bin 0 -> 4536 bytes .../Resources/French.lproj/locversion.plist | 14 + .../French.lproj/main.nib/designable.nib | 3672 + .../French.lproj/main.nib/keyedobjects.nib | Bin 0 -> 37893 bytes .../Resources/German.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../German.lproj/Localizable.strings | Bin 0 -> 4590 bytes .../Resources/German.lproj/locversion.plist | 14 + .../German.lproj/main.nib/designable.nib | 3615 + .../German.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36935 bytes .../Resources/Italian.lproj/InfoPlist.strings | Bin 0 -> 278 bytes .../Italian.lproj/Localizable.strings | Bin 0 -> 4634 bytes .../Resources/Italian.lproj/locversion.plist | 14 + .../Italian.lproj/main.nib/designable.nib | 3666 + .../Italian.lproj/main.nib/keyedobjects.nib | Bin 0 -> 37627 bytes .../Japanese.lproj/InfoPlist.strings | Bin 0 -> 272 bytes .../Japanese.lproj/Localizable.strings | Bin 0 -> 3688 bytes .../Resources/Japanese.lproj/locversion.plist | 14 + .../Japanese.lproj/main.nib/designable.nib | 3620 + .../Japanese.lproj/main.nib/keyedobjects.nib | Bin 0 -> 34885 bytes .../Resources/Spanish.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../Spanish.lproj/Localizable.strings | Bin 0 -> 4452 bytes .../Resources/Spanish.lproj/locversion.plist | 14 + .../Spanish.lproj/main.nib/designable.nib | 3678 + .../Spanish.lproj/main.nib/keyedobjects.nib | Bin 0 -> 38773 bytes hw/xquartz/bundle/Resources/X11.icns | Bin 0 -> 189002 bytes .../Resources/ar.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../Resources/ar.lproj/Localizable.strings | Bin 0 -> 4190 bytes .../Resources/ar.lproj/locversion.plist | 14 + .../ar.lproj/main.nib/designable.nib | 3647 + .../ar.lproj/main.nib/keyedobjects.nib | Bin 0 -> 38042 bytes .../Resources/ca.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../Resources/ca.lproj/Localizable.strings | Bin 0 -> 4506 bytes .../Resources/ca.lproj/locversion.plist | 14 + .../ca.lproj/main.nib/designable.nib | 3640 + .../ca.lproj/main.nib/keyedobjects.nib | Bin 0 -> 39058 bytes .../Resources/cs.lproj/InfoPlist.strings | Bin 0 -> 272 bytes .../Resources/cs.lproj/Localizable.strings | Bin 0 -> 4386 bytes .../Resources/cs.lproj/locversion.plist | 14 + .../cs.lproj/main.nib/designable.nib | 3617 + .../cs.lproj/main.nib/keyedobjects.nib | Bin 0 -> 38656 bytes .../Resources/da.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../Resources/da.lproj/Localizable.strings | Bin 0 -> 4462 bytes .../Resources/da.lproj/locversion.plist | 14 + .../da.lproj/main.nib/designable.nib | 3662 + .../da.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36655 bytes .../Resources/el.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/el.lproj/Localizable.strings | Bin 0 -> 4844 bytes .../Resources/el.lproj/locversion.plist | 14 + .../el.lproj/main.nib/designable.nib | 3538 + .../el.lproj/main.nib/keyedobjects.nib | Bin 0 -> 38397 bytes .../Resources/fi.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/fi.lproj/Localizable.strings | Bin 0 -> 4392 bytes .../Resources/fi.lproj/locversion.plist | 14 + .../fi.lproj/main.nib/designable.nib | 3673 + .../fi.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36947 bytes .../Resources/he.lproj/InfoPlist.strings | Bin 0 -> 298 bytes .../Resources/he.lproj/Localizable.strings | Bin 0 -> 4086 bytes .../Resources/he.lproj/locversion.plist | 14 + .../he.lproj/main.nib/designable.nib | 3799 + .../he.lproj/main.nib/keyedobjects.nib | Bin 0 -> 35859 bytes .../Resources/hr.lproj/InfoPlist.strings | Bin 0 -> 286 bytes .../Resources/hr.lproj/Localizable.strings | Bin 0 -> 4488 bytes .../Resources/hr.lproj/locversion.plist | 14 + .../hr.lproj/main.nib/designable.nib | 3533 + .../hr.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36574 bytes .../Resources/hu.lproj/InfoPlist.strings | Bin 0 -> 278 bytes .../Resources/hu.lproj/Localizable.strings | Bin 0 -> 4542 bytes .../Resources/hu.lproj/locversion.plist | 14 + .../hu.lproj/main.nib/designable.nib | 3642 + .../hu.lproj/main.nib/keyedobjects.nib | Bin 0 -> 39344 bytes .../Resources/ko.lproj/InfoPlist.strings | Bin 0 -> 266 bytes .../Resources/ko.lproj/Localizable.strings | Bin 0 -> 3698 bytes .../Resources/ko.lproj/locversion.plist | 14 + .../ko.lproj/main.nib/designable.nib | 3623 + .../ko.lproj/main.nib/keyedobjects.nib | Bin 0 -> 34656 bytes .../Resources/no.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../Resources/no.lproj/Localizable.strings | Bin 0 -> 4480 bytes .../Resources/no.lproj/locversion.plist | 14 + .../no.lproj/main.nib/designable.nib | 3615 + .../no.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36223 bytes .../Resources/pl.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/pl.lproj/Localizable.strings | Bin 0 -> 4232 bytes .../Resources/pl.lproj/locversion.plist | 14 + .../pl.lproj/main.nib/designable.nib | 3691 + .../pl.lproj/main.nib/keyedobjects.nib | Bin 0 -> 38308 bytes .../Resources/pt.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/pt.lproj/Localizable.strings | Bin 0 -> 4554 bytes .../Resources/pt.lproj/locversion.plist | 14 + .../pt.lproj/main.nib/designable.nib | 3668 + .../pt.lproj/main.nib/keyedobjects.nib | Bin 0 -> 37113 bytes .../Resources/pt_PT.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/pt_PT.lproj/Localizable.strings | Bin 0 -> 4436 bytes .../Resources/pt_PT.lproj/locversion.plist | 14 + .../pt_PT.lproj/main.nib/designable.nib | 3662 + .../pt_PT.lproj/main.nib/keyedobjects.nib | Bin 0 -> 37202 bytes .../Resources/ro.lproj/InfoPlist.strings | Bin 0 -> 280 bytes .../Resources/ro.lproj/Localizable.strings | Bin 0 -> 4486 bytes .../Resources/ro.lproj/locversion.plist | 14 + .../ro.lproj/main.nib/designable.nib | 3485 + .../ro.lproj/main.nib/keyedobjects.nib | Bin 0 -> 37582 bytes .../Resources/ru.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/ru.lproj/Localizable.strings | Bin 0 -> 4582 bytes .../Resources/ru.lproj/locversion.plist | 14 + .../ru.lproj/main.nib/designable.nib | 3696 + .../ru.lproj/main.nib/keyedobjects.nib | Bin 0 -> 37349 bytes .../Resources/sk.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../Resources/sk.lproj/Localizable.strings | Bin 0 -> 4352 bytes .../Resources/sk.lproj/locversion.plist | 14 + .../sk.lproj/main.nib/designable.nib | 3508 + .../sk.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36773 bytes .../Resources/sv.lproj/InfoPlist.strings | Bin 0 -> 260 bytes .../Resources/sv.lproj/Localizable.strings | Bin 0 -> 4348 bytes .../Resources/sv.lproj/locversion.plist | 14 + .../sv.lproj/main.nib/designable.nib | 3881 + .../sv.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36778 bytes .../Resources/th.lproj/InfoPlist.strings | Bin 0 -> 270 bytes .../Resources/th.lproj/Localizable.strings | Bin 0 -> 4234 bytes .../Resources/th.lproj/locversion.plist | 14 + .../th.lproj/main.nib/designable.nib | 3758 + .../th.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36277 bytes .../Resources/tr.lproj/InfoPlist.strings | Bin 0 -> 272 bytes .../Resources/tr.lproj/Localizable.strings | Bin 0 -> 4526 bytes .../Resources/tr.lproj/locversion.plist | 14 + .../tr.lproj/main.nib/designable.nib | 3611 + .../tr.lproj/main.nib/keyedobjects.nib | Bin 0 -> 38842 bytes .../Resources/uk.lproj/InfoPlist.strings | Bin 0 -> 264 bytes .../Resources/uk.lproj/Localizable.strings | Bin 0 -> 4466 bytes .../Resources/uk.lproj/locversion.plist | 14 + .../uk.lproj/main.nib/designable.nib | 3492 + .../uk.lproj/main.nib/keyedobjects.nib | Bin 0 -> 37534 bytes .../Resources/zh_CN.lproj/InfoPlist.strings | Bin 0 -> 260 bytes .../Resources/zh_CN.lproj/Localizable.strings | Bin 0 -> 3420 bytes .../Resources/zh_CN.lproj/locversion.plist | 14 + .../zh_CN.lproj/main.nib/designable.nib | 3880 + .../zh_CN.lproj/main.nib/keyedobjects.nib | Bin 0 -> 33668 bytes .../Resources/zh_TW.lproj/InfoPlist.strings | Bin 0 -> 264 bytes .../Resources/zh_TW.lproj/Localizable.strings | Bin 0 -> 3416 bytes .../Resources/zh_TW.lproj/locversion.plist | 14 + .../zh_TW.lproj/main.nib/designable.nib | 3612 + .../zh_TW.lproj/main.nib/keyedobjects.nib | Bin 0 -> 33671 bytes hw/xquartz/bundle/X11.sh | 15 + hw/xquartz/bundle/Xquartz.plist | 27 + hw/xquartz/bundle/cpprules.in | 19 + hw/xquartz/bundle/mk_bundke.sh | 31 + hw/xquartz/console_redirect.c | 482 + hw/xquartz/console_redirect.h | 46 + hw/xquartz/darwin.c | 870 + hw/xquartz/darwin.h | 99 + hw/xquartz/darwinEvents.c | 695 + hw/xquartz/darwinEvents.h | 106 + hw/xquartz/darwinXinput.c | 149 + hw/xquartz/darwinfb.h | 57 + hw/xquartz/keysym2ucs.c | 911 + hw/xquartz/keysym2ucs.h | 38 + hw/xquartz/mach-startup/Makefile.am | 93 + hw/xquartz/mach-startup/Makefile.in | 947 + hw/xquartz/mach-startup/bundle-main.c | 857 + hw/xquartz/mach-startup/launchd_fd.c | 112 + hw/xquartz/mach-startup/launchd_fd.h | 37 + hw/xquartz/mach-startup/mach_startup.defs | 50 + hw/xquartz/mach-startup/mach_startup_types.h | 9 + hw/xquartz/mach-startup/stub.c | 384 + hw/xquartz/man/Makefile.am | 2 + hw/xquartz/man/Makefile.in | 755 + hw/xquartz/man/Xquartz.man | 192 + hw/xquartz/pbproxy/Makefile.am | 29 + hw/xquartz/pbproxy/Makefile.in | 860 + hw/xquartz/pbproxy/app-main.m | 129 + hw/xquartz/pbproxy/main.m | 164 + hw/xquartz/pbproxy/pbproxy.h | 110 + hw/xquartz/pbproxy/trick_autotools.c | 5 + hw/xquartz/pbproxy/x-input.m | 189 + hw/xquartz/pbproxy/x-selection.h | 111 + hw/xquartz/pbproxy/x-selection.m | 1565 + hw/xquartz/quartz.c | 548 + hw/xquartz/quartz.h | 163 + hw/xquartz/quartzCocoa.m | 70 + hw/xquartz/quartzCommon.h | 54 + hw/xquartz/quartzKeyboard.c | 1025 + hw/xquartz/quartzKeyboard.h | 65 + hw/xquartz/quartzRandR.c | 678 + hw/xquartz/quartzRandR.h | 85 + hw/xquartz/quartzStartup.c | 129 + hw/xquartz/sanitizedCarbon.h | 32 + hw/xquartz/sanitizedCocoa.h | 64 + hw/xquartz/xpr/Makefile.am | 33 + hw/xquartz/xpr/Makefile.in | 779 + hw/xquartz/xpr/appledri.c | 526 + hw/xquartz/xpr/appledri.h | 137 + hw/xquartz/xpr/appledristr.h | 250 + hw/xquartz/xpr/dri.c | 898 + hw/xquartz/xpr/dri.h | 141 + hw/xquartz/xpr/driWrap.c | 569 + hw/xquartz/xpr/driWrap.h | 36 + hw/xquartz/xpr/dristruct.h | 84 + hw/xquartz/xpr/x-hash.c | 321 + hw/xquartz/xpr/x-hash.h | 90 + hw/xquartz/xpr/x-hook.c | 97 + hw/xquartz/xpr/x-hook.h | 45 + hw/xquartz/xpr/x-list.c | 314 + hw/xquartz/xpr/x-list.h | 78 + hw/xquartz/xpr/xpr.h | 80 + hw/xquartz/xpr/xprAppleWM.c | 165 + hw/xquartz/xpr/xprCursor.c | 408 + hw/xquartz/xpr/xprEvent.c | 103 + hw/xquartz/xpr/xprEvent.h | 35 + hw/xquartz/xpr/xprFrame.c | 652 + hw/xquartz/xpr/xprScreen.c | 511 + hw/xwin/InitInput.c | 145 + hw/xwin/InitOutput.c | 1099 + hw/xwin/Makefile.am | 196 + hw/xwin/Makefile.in | 1370 + hw/xwin/X.ico | Bin 0 -> 25214 bytes hw/xwin/XWin.exe.manifest | 21 + hw/xwin/XWin.rc | 108 + hw/xwin/ddraw.h | 2322 + hw/xwin/glx/Makefile.am | 65 + hw/xwin/glx/Makefile.in | 867 + hw/xwin/glx/gen_gl_wrappers.py | 485 + hw/xwin/glx/glshim.c | 124 + hw/xwin/glx/glthunk.c | 87 + hw/xwin/glx/glwindows.h | 55 + hw/xwin/glx/indirect.c | 2435 + hw/xwin/glx/wgl_ext_api.c | 72 + hw/xwin/glx/wgl_ext_api.h | 83 + hw/xwin/glx/winpriv.c | 121 + hw/xwin/glx/winpriv.h | 11 + hw/xwin/man/Makefile.am | 3 + hw/xwin/man/Makefile.in | 756 + hw/xwin/man/XWin.man | 410 + hw/xwin/man/XWinrc.man | 253 + hw/xwin/propertystore.h | 83 + hw/xwin/system.XWinrc | 128 + hw/xwin/win.h | 1410 + hw/xwin/winSetAppUserModelID.c | 110 + hw/xwin/winallpriv.c | 176 + hw/xwin/winauth.c | 181 + hw/xwin/winblock.c | 98 + hw/xwin/winclip.c | 42 + hw/xwin/winclipboard.h | 126 + hw/xwin/winclipboardinit.c | 134 + hw/xwin/winclipboardtextconv.c | 147 + hw/xwin/winclipboardthread.c | 467 + hw/xwin/winclipboardwndproc.c | 529 + hw/xwin/winclipboardwrappers.c | 369 + hw/xwin/winclipboardxevents.c | 704 + hw/xwin/wincmap.c | 602 + hw/xwin/winconfig.c | 1007 + hw/xwin/winconfig.h | 264 + hw/xwin/wincreatewnd.c | 651 + hw/xwin/wincursor.c | 617 + hw/xwin/windialogs.c | 702 + hw/xwin/winengine.c | 317 + hw/xwin/winerror.c | 154 + hw/xwin/winfillsp.c | 842 + hw/xwin/winfont.c | 82 + hw/xwin/wingc.c | 235 + hw/xwin/wingetsp.c | 171 + hw/xwin/winglobals.c | 120 + hw/xwin/winglobals.h | 96 + hw/xwin/winkeybd.c | 545 + hw/xwin/winkeybd.h | 308 + hw/xwin/winkeyhook.c | 155 + hw/xwin/winkeynames.h | 206 + hw/xwin/winlayouts.h | 97 + hw/xwin/winmessages.h | 1031 + hw/xwin/winmisc.c | 143 + hw/xwin/winmonitors.c | 74 + hw/xwin/winmonitors.h | 43 + hw/xwin/winmouse.c | 350 + hw/xwin/winms.h | 52 + hw/xwin/winmsg.c | 184 + hw/xwin/winmsg.h | 65 + hw/xwin/winmsgwindow.c | 180 + hw/xwin/winmultiwindowclass.c | 300 + hw/xwin/winmultiwindowclass.h | 123 + hw/xwin/winmultiwindowicons.c | 634 + hw/xwin/winmultiwindowicons.h | 42 + hw/xwin/winmultiwindowshape.c | 199 + hw/xwin/winmultiwindowwindow.c | 1004 + hw/xwin/winmultiwindowwm.c | 1888 + hw/xwin/winmultiwindowwndproc.c | 1142 + hw/xwin/winnativegdi.c | 492 + hw/xwin/winpfbdd.c | 620 + hw/xwin/winpixmap.c | 223 + hw/xwin/winpolyline.c | 53 + hw/xwin/winprefs.c | 769 + hw/xwin/winprefs.h | 175 + hw/xwin/winprefslex.c | 2128 + hw/xwin/winprefslex.l | 129 + hw/xwin/winprefsyacc.c | 2310 + hw/xwin/winprefsyacc.h | 128 + hw/xwin/winprefsyacc.y | 457 + hw/xwin/winprocarg.c | 1168 + hw/xwin/winrandr.c | 217 + hw/xwin/winresource.h | 52 + hw/xwin/winrop.c | 142 + hw/xwin/winscrinit.c | 717 + hw/xwin/winsetsp.c | 175 + hw/xwin/winshaddd.c | 1221 + hw/xwin/winshadddnl.c | 1217 + hw/xwin/winshadgdi.c | 1160 + hw/xwin/wintaskbar.c | 92 + hw/xwin/wintrayicon.c | 197 + hw/xwin/winvalargs.c | 168 + hw/xwin/winvideo.c | 191 + hw/xwin/winwakeup.c | 55 + hw/xwin/winwin32rootless.c | 1031 + hw/xwin/winwin32rootlesswindow.c | 433 + hw/xwin/winwin32rootlesswndproc.c | 1303 + hw/xwin/winwindow.c | 600 + hw/xwin/winwindow.h | 166 + hw/xwin/winwindowswm.c | 596 + hw/xwin/winwndproc.c | 1290 + include/Makefile.am | 75 + include/Makefile.in | 894 + include/XIstubs.h | 46 + include/Xprintf.h | 81 + include/busfault.h | 48 + include/callback.h | 91 + include/client.h | 60 + include/closestr.h | 126 + include/closure.h | 56 + include/colormap.h | 170 + include/colormapst.h | 111 + include/cursor.h | 136 + include/cursorstr.h | 96 + include/dix-config-apple-verbatim.h | 8 + include/dix-config.h.in | 472 + include/dix.h | 608 + include/dixaccess.h | 54 + include/dixevents.h | 80 + include/dixfont.h | 147 + include/dixfontstr.h | 93 + include/dixfontstubs.h | 45 + include/dixgrabs.h | 64 + include/dixstruct.h | 194 + include/do-not-use-config.h.in | 808 + include/eventconvert.h | 39 + include/events.h | 42 + include/eventstr.h | 289 + include/exevents.h | 307 + include/extension.h | 102 + include/extinit.h | 189 + include/extnsionst.h | 112 + include/gc.h | 147 + include/gcstruct.h | 292 + include/globals.h | 53 + include/glx_extinit.h | 34 + include/hotplug.h | 75 + include/input.h | 697 + include/inputstr.h | 673 + include/inpututils.h | 69 + include/kdrive-config.h.in | 40 + include/list.h | 492 + include/misc.h | 447 + include/miscstruct.h | 65 + include/opaque.h | 78 + include/optionstr.h | 13 + include/os.h | 692 + include/pixmap.h | 131 + include/pixmapstr.h | 115 + include/privates.h | 361 + include/property.h | 85 + include/propertyst.h | 66 + include/protocol-versions.h | 156 + include/ptrveloc.h | 144 + include/region.h | 52 + include/regionstr.h | 376 + include/registry.h | 66 + include/resource.h | 287 + include/rgb.h | 52 + include/screenint.h | 93 + include/scrnintstr.h | 547 + include/selection.h | 100 + include/servermd.h | 365 + include/site.h | 126 + include/swaprep.h | 260 + include/swapreq.h | 106 + include/validate.h | 40 + include/version-config.h.in | 16 + include/window.h | 228 + include/windowstr.h | 221 + include/xkb-config.h.in | 32 + include/xkbfile.h | 276 + include/xkbrules.h | 120 + include/xkbsrv.h | 864 + include/xkbstr.h | 640 + include/xorg-config.h.in | 148 + include/xorg-server.h.in | 227 + include/xserver-properties.h | 205 + include/xsha1.h | 19 + include/xwin-config.h.in | 36 + install-sh | 527 + ltmain.sh | 9655 ++ m4/ac_define_dir.m4 | 49 + m4/libtool.m4 | 7986 + m4/ltoptions.m4 | 384 + m4/ltsugar.m4 | 123 + m4/ltversion.m4 | 23 + m4/lt~obsolete.m4 | 98 + m4/xorg-tls.m4 | 55 + man/Makefile.am | 6 + man/Makefile.in | 759 + man/Xserver.man | 605 + manpages.am | 42 + mi/Makefile.am | 63 + mi/Makefile.in | 893 + mi/mi.h | 540 + mi/miarc.c | 3398 + mi/mibitblt.c | 776 + mi/micmap.c | 631 + mi/micmap.h | 67 + mi/micoord.h | 69 + mi/micopy.c | 313 + mi/micursor.c | 68 + mi/midash.c | 87 + mi/midispcur.c | 543 + mi/mieq.c | 644 + mi/miexpose.c | 667 + mi/mifillarc.c | 712 + mi/mifillarc.h | 187 + mi/mifillrct.c | 132 + mi/mifpoly.h | 102 + mi/mifpolycon.c | 249 + mi/migc.c | 230 + mi/migc.h | 56 + mi/miglblt.c | 232 + mi/miinitext.c | 390 + mi/miline.h | 172 + mi/mioverlay.c | 1900 + mi/mioverlay.h | 28 + mi/mipointer.c | 720 + mi/mipointer.h | 124 + mi/mipointrst.h | 56 + mi/mipoly.c | 113 + mi/mipoly.h | 193 + mi/mipolycon.c | 235 + mi/mipolygen.c | 213 + mi/mipolypnt.c | 112 + mi/mipolyrect.c | 175 + mi/mipolyseg.c | 77 + mi/mipolytext.c | 134 + mi/mipolyutil.c | 369 + mi/mipushpxl.c | 249 + mi/miscanfill.h | 142 + mi/miscrinit.c | 291 + mi/mispans.c | 526 + mi/mispans.h | 87 + mi/misprite.c | 960 + mi/misprite.h | 48 + mi/mistruct.h | 62 + mi/mivalidate.h | 51 + mi/mivaltree.c | 752 + mi/miwideline.c | 1981 + mi/miwideline.h | 119 + mi/miwindow.c | 760 + mi/mizerarc.c | 767 + mi/mizerarc.h | 124 + mi/mizerclip.c | 614 + mi/mizerline.c | 358 + miext/Makefile.am | 8 + miext/Makefile.in | 812 + miext/damage/Makefile.am | 14 + miext/damage/Makefile.in | 800 + miext/damage/damage.c | 1944 + miext/damage/damage.h | 115 + miext/damage/damagestr.h | 111 + miext/rootless/Makefile.am | 16 + miext/rootless/Makefile.in | 755 + miext/rootless/README.txt | 334 + miext/rootless/rootless.h | 363 + miext/rootless/rootlessCommon.c | 460 + miext/rootless/rootlessCommon.h | 284 + miext/rootless/rootlessConfig.h | 62 + miext/rootless/rootlessGC.c | 1487 + miext/rootless/rootlessScreen.c | 751 + miext/rootless/rootlessValTree.c | 588 + miext/rootless/rootlessWindow.c | 1638 + miext/rootless/rootlessWindow.h | 63 + miext/shadow/Makefile.am | 37 + miext/shadow/Makefile.in | 853 + miext/shadow/c2p_core.h | 187 + miext/shadow/shadow.c | 252 + miext/shadow/shadow.h | 171 + miext/shadow/shafb4.c | 139 + miext/shadow/shafb8.c | 143 + miext/shadow/shalloc.c | 49 + miext/shadow/shiplan2p4.c | 136 + miext/shadow/shiplan2p8.c | 137 + miext/shadow/shpacked.c | 115 + miext/shadow/shplanar.c | 180 + miext/shadow/shplanar8.c | 170 + miext/shadow/shrot16pack.c | 30 + miext/shadow/shrot16pack_180.c | 31 + miext/shadow/shrot16pack_270.c | 31 + miext/shadow/shrot16pack_270YX.c | 31 + miext/shadow/shrot16pack_90.c | 31 + miext/shadow/shrot16pack_90YX.c | 31 + miext/shadow/shrot32pack.c | 30 + miext/shadow/shrot32pack_180.c | 31 + miext/shadow/shrot32pack_270.c | 31 + miext/shadow/shrot32pack_90.c | 31 + miext/shadow/shrot8pack.c | 30 + miext/shadow/shrot8pack_180.c | 31 + miext/shadow/shrot8pack_270.c | 31 + miext/shadow/shrot8pack_90.c | 31 + miext/shadow/shrotate.c | 304 + miext/shadow/shrotpack.h | 194 + miext/shadow/shrotpackYX.h | 152 + miext/sync/Makefile.am | 21 + miext/sync/Makefile.in | 805 + miext/sync/misync.c | 189 + miext/sync/misync.h | 100 + miext/sync/misyncfd.c | 99 + miext/sync/misyncfd.h | 45 + miext/sync/misyncshm.c | 186 + miext/sync/misyncshm.h | 28 + miext/sync/misyncstr.h | 97 + missing | 331 + os/Makefile.am | 59 + os/Makefile.in | 820 + os/WaitFor.c | 661 + os/access.c | 2014 + os/auth.c | 313 + os/backtrace.c | 324 + os/busfault.c | 150 + os/client.c | 397 + os/connection.c | 1312 + os/io.c | 1122 + os/log.c | 971 + os/mitauth.c | 178 + os/oscolor.c | 1598 + os/osdep.h | 257 + os/osinit.c | 327 + os/rpcauth.c | 191 + os/strcasecmp.c | 70 + os/strcasestr.c | 64 + os/strlcat.c | 58 + os/strlcpy.c | 55 + os/strndup.c | 53 + os/utils.c | 2124 + os/xdmauth.c | 487 + os/xdmcp.c | 1611 + os/xprintf.c | 278 + os/xsha1.c | 267 + os/xstrans.c | 17 + present/Makefile.am | 17 + present/Makefile.in | 815 + present/present.c | 911 + present/present.h | 127 + present/present_event.c | 247 + present/present_fake.c | 140 + present/present_fence.c | 139 + present/present_notify.c | 114 + present/present_priv.h | 302 + present/present_request.c | 331 + present/present_screen.c | 236 + present/presentext.h | 29 + pseudoramiX/Makefile.am | 7 + pseudoramiX/Makefile.in | 739 + pseudoramiX/pseudoramiX.c | 516 + pseudoramiX/pseudoramiX.h | 10 + randr/Makefile.am | 31 + randr/Makefile.in | 822 + randr/randr.c | 685 + randr/randrstr.h | 1056 + randr/rrcrtc.c | 1712 + randr/rrdispatch.c | 257 + randr/rrinfo.c | 324 + randr/rrmode.c | 375 + randr/rroutput.c | 590 + randr/rrpointer.c | 153 + randr/rrproperty.c | 735 + randr/rrprovider.c | 443 + randr/rrproviderproperty.c | 730 + randr/rrscreen.c | 1135 + randr/rrsdispatch.c | 475 + randr/rrtransform.c | 297 + randr/rrtransform.h | 79 + randr/rrxinerama.c | 494 + record/Makefile.am | 7 + record/Makefile.in | 739 + record/record.c | 2821 + record/set.c | 425 + record/set.h | 135 + render/Makefile.am | 20 + render/Makefile.in | 819 + render/animcur.c | 392 + render/filter.c | 360 + render/glyph.c | 696 + render/glyphstr.h | 142 + render/matrix.c | 86 + render/miindex.c | 332 + render/mipict.c | 609 + render/mipict.h | 160 + render/mirect.c | 168 + render/mitrap.c | 81 + render/mitri.c | 67 + render/picture.c | 1700 + render/picture.h | 232 + render/picturestr.h | 614 + render/render.c | 3315 + test/Makefile.am | 133 + test/Makefile.in | 1250 + test/README | 36 + test/ddxstubs.c | 113 + test/fixes.c | 354 + test/hashtabletest.c | 166 + test/input.c | 1851 + test/list.c | 386 + test/misc.c | 165 + test/os.c | 166 + test/signal-logging.c | 391 + test/string.c | 70 + test/touch.c | 279 + test/xfree86.c | 104 + test/xi2/Makefile.am | 70 + test/xi2/Makefile.in | 1073 + test/xi2/protocol-common.c | 271 + test/xi2/protocol-common.h | 155 + test/xi2/protocol-eventconvert.c | 1213 + test/xi2/protocol-xigetclientpointer.c | 163 + test/xi2/protocol-xigetselectedevents.c | 234 + test/xi2/protocol-xipassivegrabdevice.c | 254 + test/xi2/protocol-xiquerydevice.c | 343 + test/xi2/protocol-xiquerypointer.c | 214 + test/xi2/protocol-xiqueryversion.c | 297 + test/xi2/protocol-xiselectevents.c | 352 + test/xi2/protocol-xisetclientpointer.c | 148 + test/xi2/protocol-xiwarppointer.c | 212 + test/xi2/xi2.c | 141 + test/xkb.c | 170 + test/xtest.c | 132 + xfixes/Makefile.am | 16 + xfixes/Makefile.in | 808 + xfixes/cursor.c | 1083 + xfixes/region.c | 936 + xfixes/saveset.c | 69 + xfixes/select.c | 264 + xfixes/xfixes.c | 291 + xfixes/xfixes.h | 56 + xfixes/xfixesint.h | 300 + xkb/Makefile.am | 42 + xkb/Makefile.in | 865 + xkb/README.compiled | 13 + xkb/XKBAlloc.c | 358 + xkb/XKBGAlloc.c | 883 + xkb/XKBMAlloc.c | 932 + xkb/XKBMisc.c | 880 + xkb/ddxBeep.c | 350 + xkb/ddxCtrls.c | 83 + xkb/ddxKillSrv.c | 47 + xkb/ddxLEDs.c | 71 + xkb/ddxLoad.c | 426 + xkb/ddxPrivate.c | 14 + xkb/ddxVT.c | 44 + xkb/maprules.c | 1044 + xkb/xkb.c | 6855 + xkb/xkb.h | 30 + xkb/xkbAccessX.c | 792 + xkb/xkbActions.c | 1518 + xkb/xkbDflts.h | 471 + xkb/xkbEvents.c | 1093 + xkb/xkbInit.c | 784 + xkb/xkbLEDs.c | 1005 + xkb/xkbPrKeyEv.c | 191 + xkb/xkbSwap.c | 539 + xkb/xkbUtils.c | 2092 + xkb/xkbfmisc.c | 469 + xkb/xkbgeom.h | 563 + xkb/xkbout.c | 925 + xkb/xkbtext.c | 1324 + xkb/xkmread.c | 1292 + xorg-server.m4 | 49 + xorg-server.pc.in | 20 + xserver.ent.in | 3 + ylwrap | 226 + 1755 files changed, 975582 insertions(+) create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 README create mode 100644 Xext/Makefile.am create mode 100644 Xext/Makefile.in create mode 100644 Xext/bigreq.c create mode 100644 Xext/dpms.c create mode 100644 Xext/dpmsproc.h create mode 100644 Xext/dpmsstubs.c create mode 100644 Xext/geext.c create mode 100644 Xext/geext.h create mode 100644 Xext/geint.h create mode 100644 Xext/hashtable.c create mode 100644 Xext/hashtable.h create mode 100644 Xext/panoramiX.c create mode 100644 Xext/panoramiX.h create mode 100644 Xext/panoramiXSwap.c create mode 100644 Xext/panoramiXh.h create mode 100644 Xext/panoramiXprocs.c create mode 100644 Xext/panoramiXsrv.h create mode 100644 Xext/saver.c create mode 100644 Xext/security.c create mode 100644 Xext/securitysrv.h create mode 100644 Xext/shape.c create mode 100644 Xext/shm.c create mode 100644 Xext/shmint.h create mode 100644 Xext/sleepuntil.c create mode 100644 Xext/sleepuntil.h create mode 100644 Xext/sync.c create mode 100644 Xext/syncsdk.h create mode 100644 Xext/syncsrv.h create mode 100644 Xext/xace.c create mode 100644 Xext/xace.h create mode 100644 Xext/xacestr.h create mode 100644 Xext/xcmisc.c create mode 100644 Xext/xf86bigfont.c create mode 100644 Xext/xf86bigfontsrv.h create mode 100644 Xext/xres.c create mode 100644 Xext/xselinux.h create mode 100644 Xext/xselinux_ext.c create mode 100644 Xext/xselinux_hooks.c create mode 100644 Xext/xselinux_label.c create mode 100644 Xext/xselinuxint.h create mode 100644 Xext/xtest.c create mode 100644 Xext/xvdisp.c create mode 100644 Xext/xvdisp.h create mode 100644 Xext/xvdix.h create mode 100644 Xext/xvmain.c create mode 100644 Xext/xvmc.c create mode 100644 Xext/xvmcext.h create mode 100644 Xi/Makefile.am create mode 100644 Xi/Makefile.in create mode 100644 Xi/allowev.c create mode 100644 Xi/allowev.h create mode 100644 Xi/chgdctl.c create mode 100644 Xi/chgdctl.h create mode 100644 Xi/chgfctl.c create mode 100644 Xi/chgfctl.h create mode 100644 Xi/chgkbd.c create mode 100644 Xi/chgkbd.h create mode 100644 Xi/chgkmap.c create mode 100644 Xi/chgkmap.h create mode 100644 Xi/chgprop.c create mode 100644 Xi/chgprop.h create mode 100644 Xi/chgptr.c create mode 100644 Xi/chgptr.h create mode 100644 Xi/closedev.c create mode 100644 Xi/closedev.h create mode 100644 Xi/devbell.c create mode 100644 Xi/devbell.h create mode 100644 Xi/exevents.c create mode 100644 Xi/exglobals.h create mode 100644 Xi/extinit.c create mode 100644 Xi/getbmap.c create mode 100644 Xi/getbmap.h create mode 100644 Xi/getdctl.c create mode 100644 Xi/getdctl.h create mode 100644 Xi/getfctl.c create mode 100644 Xi/getfctl.h create mode 100644 Xi/getfocus.c create mode 100644 Xi/getfocus.h create mode 100644 Xi/getkmap.c create mode 100644 Xi/getkmap.h create mode 100644 Xi/getmmap.c create mode 100644 Xi/getmmap.h create mode 100644 Xi/getprop.c create mode 100644 Xi/getprop.h create mode 100644 Xi/getselev.c create mode 100644 Xi/getselev.h create mode 100644 Xi/getvers.c create mode 100644 Xi/getvers.h create mode 100644 Xi/grabdev.c create mode 100644 Xi/grabdev.h create mode 100644 Xi/grabdevb.c create mode 100644 Xi/grabdevb.h create mode 100644 Xi/grabdevk.c create mode 100644 Xi/grabdevk.h create mode 100644 Xi/gtmotion.c create mode 100644 Xi/gtmotion.h create mode 100644 Xi/listdev.c create mode 100644 Xi/listdev.h create mode 100644 Xi/opendev.c create mode 100644 Xi/opendev.h create mode 100644 Xi/queryst.c create mode 100644 Xi/queryst.h create mode 100644 Xi/selectev.c create mode 100644 Xi/selectev.h create mode 100644 Xi/sendexev.c create mode 100644 Xi/sendexev.h create mode 100644 Xi/setbmap.c create mode 100644 Xi/setbmap.h create mode 100644 Xi/setdval.c create mode 100644 Xi/setdval.h create mode 100644 Xi/setfocus.c create mode 100644 Xi/setfocus.h create mode 100644 Xi/setmmap.c create mode 100644 Xi/setmmap.h create mode 100644 Xi/setmode.c create mode 100644 Xi/setmode.h create mode 100644 Xi/stubs.c create mode 100644 Xi/ungrdev.c create mode 100644 Xi/ungrdev.h create mode 100644 Xi/ungrdevb.c create mode 100644 Xi/ungrdevb.h create mode 100644 Xi/ungrdevk.c create mode 100644 Xi/ungrdevk.h create mode 100644 Xi/xiallowev.c create mode 100644 Xi/xiallowev.h create mode 100644 Xi/xibarriers.c create mode 100644 Xi/xibarriers.h create mode 100644 Xi/xichangecursor.c create mode 100644 Xi/xichangecursor.h create mode 100644 Xi/xichangehierarchy.c create mode 100644 Xi/xichangehierarchy.h create mode 100644 Xi/xigetclientpointer.c create mode 100644 Xi/xigetclientpointer.h create mode 100644 Xi/xigrabdev.c create mode 100644 Xi/xigrabdev.h create mode 100644 Xi/xipassivegrab.c create mode 100644 Xi/xipassivegrab.h create mode 100644 Xi/xiproperty.c create mode 100644 Xi/xiproperty.h create mode 100644 Xi/xiquerydevice.c create mode 100644 Xi/xiquerydevice.h create mode 100644 Xi/xiquerypointer.c create mode 100644 Xi/xiquerypointer.h create mode 100644 Xi/xiqueryversion.c create mode 100644 Xi/xiqueryversion.h create mode 100644 Xi/xiselectev.c create mode 100644 Xi/xiselectev.h create mode 100644 Xi/xisetclientpointer.c create mode 100644 Xi/xisetclientpointer.h create mode 100644 Xi/xisetdevfocus.c create mode 100644 Xi/xisetdevfocus.h create mode 100644 Xi/xiwarppointer.c create mode 100644 Xi/xiwarppointer.h create mode 100644 aclocal.m4 create mode 100755 autogen.sh create mode 100644 composite/Makefile.am create mode 100644 composite/Makefile.in create mode 100644 composite/compalloc.c create mode 100644 composite/compext.c create mode 100644 composite/compinit.c create mode 100644 composite/compint.h create mode 100644 composite/compositeext.h create mode 100644 composite/compoverlay.c create mode 100644 composite/compwindow.c create mode 100755 config.guess create mode 100755 config.sub create mode 100644 config/10-evdev.conf create mode 100644 config/10-quirks.conf create mode 100644 config/Makefile.am create mode 100644 config/Makefile.in create mode 100644 config/config-backends.h create mode 100644 config/config.c create mode 100644 config/dbus-core.c create mode 100644 config/dbus.c create mode 100755 config/fdi2iclass.py create mode 100644 config/hal.c create mode 100644 config/non-seat0.conf.multi-seat create mode 100644 config/udev.c create mode 100644 config/wscons.c create mode 100644 config/x11-input.fdi create mode 100644 config/xorg-server.conf create mode 100755 configure create mode 100644 configure.ac create mode 100644 damageext/Makefile.am create mode 100644 damageext/Makefile.in create mode 100644 damageext/damageext.c create mode 100644 damageext/damageextint.h create mode 100644 dbe/Makefile.am create mode 100644 dbe/Makefile.in create mode 100644 dbe/dbe.c create mode 100644 dbe/dbestruct.h create mode 100644 dbe/midbe.c create mode 100644 dbe/midbe.h create mode 100755 depcomp create mode 100644 devbook.am create mode 100644 dix/BuiltInAtoms create mode 100644 dix/Makefile.am create mode 100644 dix/Makefile.in create mode 100644 dix/Xserver-dtrace.h.in create mode 100644 dix/Xserver.d create mode 100644 dix/atom.c create mode 100644 dix/buildatoms create mode 100644 dix/colormap.c create mode 100644 dix/cursor.c create mode 100644 dix/devices.c create mode 100644 dix/dispatch.c create mode 100644 dix/dispatch.h create mode 100644 dix/dixfonts.c create mode 100644 dix/dixutils.c create mode 100644 dix/enterleave.c create mode 100644 dix/enterleave.h create mode 100644 dix/eventconvert.c create mode 100644 dix/events.c create mode 100644 dix/extension.c create mode 100644 dix/ffs.c create mode 100644 dix/gc.c create mode 100644 dix/getevents.c create mode 100644 dix/globals.c create mode 100644 dix/glyphcurs.c create mode 100644 dix/grabs.c create mode 100644 dix/initatoms.c create mode 100644 dix/inpututils.c create mode 100644 dix/main.c create mode 100644 dix/pixmap.c create mode 100644 dix/privates.c create mode 100644 dix/property.c create mode 100644 dix/protocol.txt create mode 100644 dix/ptrveloc.c create mode 100644 dix/region.c create mode 100644 dix/registry.c create mode 100644 dix/resource.c create mode 100644 dix/selection.c create mode 100644 dix/stubmain.c create mode 100644 dix/swaprep.c create mode 100644 dix/swapreq.c create mode 100644 dix/tables.c create mode 100644 dix/touch.c create mode 100644 dix/window.c create mode 100644 doc/Makefile.am create mode 100644 doc/Makefile.in create mode 100644 doc/Xinput.xml create mode 100644 doc/Xserver-spec.xml create mode 100644 doc/dtrace/Makefile.am create mode 100644 doc/dtrace/Makefile.in create mode 100644 doc/dtrace/Xserver-DTrace.xml create mode 100644 doc/smartsched create mode 100644 docbook.am create mode 100644 dri3/Makefile.am create mode 100644 dri3/Makefile.in create mode 100644 dri3/dri3.c create mode 100644 dri3/dri3.h create mode 100644 dri3/dri3_priv.h create mode 100644 dri3/dri3_request.c create mode 100644 dri3/dri3_screen.c create mode 100644 exa/Makefile.am create mode 100644 exa/Makefile.in create mode 100644 exa/exa.c create mode 100644 exa/exa.h create mode 100644 exa/exa_accel.c create mode 100644 exa/exa_classic.c create mode 100644 exa/exa_driver.c create mode 100644 exa/exa_glyphs.c create mode 100644 exa/exa_migration_classic.c create mode 100644 exa/exa_migration_mixed.c create mode 100644 exa/exa_mixed.c create mode 100644 exa/exa_offscreen.c create mode 100644 exa/exa_priv.h create mode 100644 exa/exa_render.c create mode 100644 exa/exa_unaccel.c create mode 100644 fb/Makefile.am create mode 100644 fb/Makefile.in create mode 100644 fb/fb.h create mode 100644 fb/fb24_32.c create mode 100644 fb/fb24_32.h create mode 100644 fb/fballpriv.c create mode 100644 fb/fbarc.c create mode 100644 fb/fbbits.c create mode 100644 fb/fbbits.h create mode 100644 fb/fbblt.c create mode 100644 fb/fbbltone.c create mode 100644 fb/fbcmap_mi.c create mode 100644 fb/fbcopy.c create mode 100644 fb/fbfill.c create mode 100644 fb/fbfillrect.c create mode 100644 fb/fbfillsp.c create mode 100644 fb/fbgc.c create mode 100644 fb/fbgetsp.c create mode 100644 fb/fbglyph.c create mode 100644 fb/fbimage.c create mode 100644 fb/fbline.c create mode 100644 fb/fboverlay.c create mode 100644 fb/fboverlay.h create mode 100644 fb/fbpict.c create mode 100644 fb/fbpict.h create mode 100644 fb/fbpixmap.c create mode 100644 fb/fbpoint.c create mode 100644 fb/fbpush.c create mode 100644 fb/fbrop.h create mode 100644 fb/fbscreen.c create mode 100644 fb/fbseg.c create mode 100644 fb/fbsetsp.c create mode 100644 fb/fbsolid.c create mode 100644 fb/fbstipple.c create mode 100644 fb/fbtile.c create mode 100644 fb/fbtrap.c create mode 100644 fb/fbutil.c create mode 100644 fb/fbwindow.c create mode 100644 fb/wfbrename.h create mode 100644 glx/Makefile.am create mode 100644 glx/Makefile.in create mode 100644 glx/clientinfo.c create mode 100644 glx/createcontext.c create mode 100644 glx/extension_string.c create mode 100644 glx/extension_string.h create mode 100644 glx/glxbyteorder.h create mode 100644 glx/glxcmds.c create mode 100644 glx/glxcmdsswap.c create mode 100644 glx/glxcontext.h create mode 100644 glx/glxdrawable.h create mode 100644 glx/glxdri2.c create mode 100644 glx/glxdricommon.c create mode 100644 glx/glxdricommon.h create mode 100644 glx/glxdriswrast.c create mode 100644 glx/glxext.c create mode 100644 glx/glxext.h create mode 100644 glx/glxscreens.c create mode 100644 glx/glxscreens.h create mode 100644 glx/glxserver.h create mode 100644 glx/glxutil.h create mode 100644 glx/indirect_dispatch.c create mode 100644 glx/indirect_dispatch.h create mode 100644 glx/indirect_dispatch_swap.c create mode 100644 glx/indirect_program.c create mode 100644 glx/indirect_reqsize.c create mode 100644 glx/indirect_reqsize.h create mode 100644 glx/indirect_size.h create mode 100644 glx/indirect_size_get.c create mode 100644 glx/indirect_size_get.h create mode 100644 glx/indirect_table.c create mode 100644 glx/indirect_table.h create mode 100644 glx/indirect_texture_compression.c create mode 100644 glx/indirect_util.c create mode 100644 glx/indirect_util.h create mode 100644 glx/render2.c create mode 100644 glx/render2swap.c create mode 100644 glx/renderpix.c create mode 100644 glx/renderpixswap.c create mode 100644 glx/rensize.c create mode 100644 glx/single2.c create mode 100644 glx/single2swap.c create mode 100644 glx/singlepix.c create mode 100644 glx/singlepixswap.c create mode 100644 glx/singlesize.c create mode 100644 glx/singlesize.h create mode 100644 glx/swap_interval.c create mode 100644 glx/unpack.h create mode 100644 glx/xfont.c create mode 100644 hw/Makefile.am create mode 100644 hw/Makefile.in create mode 100644 hw/dmx/Makefile.am create mode 100644 hw/dmx/Makefile.in create mode 100644 hw/dmx/config/Canvas.c create mode 100644 hw/dmx/config/Canvas.h create mode 100644 hw/dmx/config/CanvasP.h create mode 100644 hw/dmx/config/Makefile.am create mode 100644 hw/dmx/config/Makefile.in create mode 100644 hw/dmx/config/TODO create mode 100644 hw/dmx/config/dmxcompat.c create mode 100644 hw/dmx/config/dmxcompat.h create mode 100644 hw/dmx/config/dmxconfig.c create mode 100644 hw/dmx/config/dmxconfig.h create mode 100644 hw/dmx/config/dmxparse.c create mode 100644 hw/dmx/config/dmxparse.h create mode 100644 hw/dmx/config/dmxprint.c create mode 100644 hw/dmx/config/dmxprint.h create mode 100644 hw/dmx/config/dmxtodmx.c create mode 100644 hw/dmx/config/man/Makefile.am create mode 100644 hw/dmx/config/man/Makefile.in create mode 100644 hw/dmx/config/man/dmxtodmx.man create mode 100644 hw/dmx/config/man/vdltodmx.man create mode 100644 hw/dmx/config/man/xdmxconfig.man create mode 100644 hw/dmx/config/parser.c create mode 100644 hw/dmx/config/parser.h create mode 100644 hw/dmx/config/parser.y create mode 100644 hw/dmx/config/scanner.c create mode 100644 hw/dmx/config/scanner.l create mode 100644 hw/dmx/config/test-a.in create mode 100644 hw/dmx/config/test-a.out create mode 100644 hw/dmx/config/test-b.in create mode 100644 hw/dmx/config/test-b.out create mode 100644 hw/dmx/config/test-c.in create mode 100644 hw/dmx/config/test-c.out create mode 100644 hw/dmx/config/test-d.in create mode 100644 hw/dmx/config/test-d.out create mode 100644 hw/dmx/config/test-e.in create mode 100644 hw/dmx/config/test-e.out create mode 100644 hw/dmx/config/test-f.in create mode 100644 hw/dmx/config/test-f.out create mode 100644 hw/dmx/config/test-g.in create mode 100644 hw/dmx/config/test-g.out create mode 100644 hw/dmx/config/test-h.in create mode 100644 hw/dmx/config/test-h.out create mode 100644 hw/dmx/config/test-i.in create mode 100644 hw/dmx/config/test-i.out create mode 100644 hw/dmx/config/test-j.in create mode 100644 hw/dmx/config/test-j.out create mode 100644 hw/dmx/config/test-k.in create mode 100644 hw/dmx/config/test-k.out create mode 100644 hw/dmx/config/test-l.in create mode 100644 hw/dmx/config/test-l.out create mode 100644 hw/dmx/config/vdltodmx.c create mode 100644 hw/dmx/config/xdmxconfig.c create mode 100644 hw/dmx/dmx-config.h create mode 100644 hw/dmx/dmx.c create mode 100644 hw/dmx/dmx.h create mode 100644 hw/dmx/dmx_glxvisuals.c create mode 100644 hw/dmx/dmx_glxvisuals.h create mode 100644 hw/dmx/dmxcb.c create mode 100644 hw/dmx/dmxcb.h create mode 100644 hw/dmx/dmxclient.h create mode 100644 hw/dmx/dmxcmap.c create mode 100644 hw/dmx/dmxcmap.h create mode 100644 hw/dmx/dmxcursor.c create mode 100644 hw/dmx/dmxcursor.h create mode 100644 hw/dmx/dmxdpms.c create mode 100644 hw/dmx/dmxdpms.h create mode 100644 hw/dmx/dmxextension.c create mode 100644 hw/dmx/dmxextension.h create mode 100644 hw/dmx/dmxfont.c create mode 100644 hw/dmx/dmxfont.h create mode 100644 hw/dmx/dmxgc.c create mode 100644 hw/dmx/dmxgc.h create mode 100644 hw/dmx/dmxgcops.c create mode 100644 hw/dmx/dmxgcops.h create mode 100644 hw/dmx/dmxinit.c create mode 100644 hw/dmx/dmxinit.h create mode 100644 hw/dmx/dmxinput.c create mode 100644 hw/dmx/dmxinput.h create mode 100644 hw/dmx/dmxlog.c create mode 100644 hw/dmx/dmxlog.h create mode 100644 hw/dmx/dmxpict.c create mode 100644 hw/dmx/dmxpict.h create mode 100644 hw/dmx/dmxpixmap.c create mode 100644 hw/dmx/dmxpixmap.h create mode 100644 hw/dmx/dmxprop.c create mode 100644 hw/dmx/dmxprop.h create mode 100644 hw/dmx/dmxscrinit.c create mode 100644 hw/dmx/dmxscrinit.h create mode 100644 hw/dmx/dmxstat.c create mode 100644 hw/dmx/dmxstat.h create mode 100644 hw/dmx/dmxsync.c create mode 100644 hw/dmx/dmxsync.h create mode 100644 hw/dmx/dmxvisual.c create mode 100644 hw/dmx/dmxvisual.h create mode 100644 hw/dmx/dmxwindow.c create mode 100644 hw/dmx/dmxwindow.h create mode 100644 hw/dmx/doc/DMXSpec-v1.txt create mode 100644 hw/dmx/doc/DMXSpec.txt create mode 100644 hw/dmx/doc/Makefile.am create mode 100644 hw/dmx/doc/Makefile.in create mode 100644 hw/dmx/doc/dmx.xml create mode 100644 hw/dmx/doc/scaled.xml create mode 100644 hw/dmx/doxygen/Makefile.am create mode 100644 hw/dmx/doxygen/Makefile.in create mode 100644 hw/dmx/doxygen/doxygen.conf.in create mode 100644 hw/dmx/doxygen/footer.html create mode 100644 hw/dmx/examples/Makefile.am create mode 100644 hw/dmx/examples/Makefile.in create mode 100644 hw/dmx/examples/dmxaddinput.c create mode 100644 hw/dmx/examples/dmxaddscreen.c create mode 100644 hw/dmx/examples/dmxinfo.c create mode 100644 hw/dmx/examples/dmxreconfig.c create mode 100644 hw/dmx/examples/dmxresize.c create mode 100644 hw/dmx/examples/dmxrminput.c create mode 100644 hw/dmx/examples/dmxrmscreen.c create mode 100644 hw/dmx/examples/dmxwininfo.c create mode 100644 hw/dmx/examples/ev.c create mode 100644 hw/dmx/examples/evi.c create mode 100644 hw/dmx/examples/res.c create mode 100644 hw/dmx/examples/xbell.c create mode 100644 hw/dmx/examples/xinput.c create mode 100644 hw/dmx/examples/xled.c create mode 100644 hw/dmx/examples/xtest.c create mode 100644 hw/dmx/glxProxy/Makefile.am create mode 100644 hw/dmx/glxProxy/Makefile.in create mode 100644 hw/dmx/glxProxy/compsize.c create mode 100644 hw/dmx/glxProxy/compsize.h create mode 100644 hw/dmx/glxProxy/g_disptab.c create mode 100644 hw/dmx/glxProxy/g_disptab.h create mode 100644 hw/dmx/glxProxy/g_renderswap.c create mode 100644 hw/dmx/glxProxy/global.c create mode 100644 hw/dmx/glxProxy/glxcmds.c create mode 100644 hw/dmx/glxProxy/glxcmds.h create mode 100644 hw/dmx/glxProxy/glxcmdsswap.c create mode 100644 hw/dmx/glxProxy/glxcontext.h create mode 100644 hw/dmx/glxProxy/glxdrawable.h create mode 100644 hw/dmx/glxProxy/glxerror.h create mode 100644 hw/dmx/glxProxy/glxext.c create mode 100644 hw/dmx/glxProxy/glxext.h create mode 100644 hw/dmx/glxProxy/glxfbconfig.c create mode 100644 hw/dmx/glxProxy/glxfbconfig.h create mode 100644 hw/dmx/glxProxy/glxscreens.c create mode 100644 hw/dmx/glxProxy/glxscreens.h create mode 100644 hw/dmx/glxProxy/glxserver.h create mode 100644 hw/dmx/glxProxy/glxsingle.c create mode 100644 hw/dmx/glxProxy/glxsingle.h create mode 100644 hw/dmx/glxProxy/glxswap.c create mode 100644 hw/dmx/glxProxy/glxswap.h create mode 100644 hw/dmx/glxProxy/glxutil.h create mode 100644 hw/dmx/glxProxy/glxvendor.c create mode 100644 hw/dmx/glxProxy/glxvendor.h create mode 100644 hw/dmx/glxProxy/glxvisuals.c create mode 100644 hw/dmx/glxProxy/glxvisuals.h create mode 100644 hw/dmx/glxProxy/render2swap.c create mode 100644 hw/dmx/glxProxy/renderpixswap.c create mode 100644 hw/dmx/glxProxy/unpack.h create mode 100644 hw/dmx/input/ChkNotMaskEv.c create mode 100644 hw/dmx/input/ChkNotMaskEv.h create mode 100644 hw/dmx/input/Makefile.am create mode 100644 hw/dmx/input/Makefile.in create mode 100644 hw/dmx/input/atKeynames.h create mode 100644 hw/dmx/input/dmxarg.c create mode 100644 hw/dmx/input/dmxarg.h create mode 100644 hw/dmx/input/dmxbackend.c create mode 100644 hw/dmx/input/dmxbackend.h create mode 100644 hw/dmx/input/dmxcommon.c create mode 100644 hw/dmx/input/dmxcommon.h create mode 100644 hw/dmx/input/dmxconsole.c create mode 100644 hw/dmx/input/dmxconsole.h create mode 100644 hw/dmx/input/dmxdetach.c create mode 100644 hw/dmx/input/dmxdummy.c create mode 100644 hw/dmx/input/dmxdummy.h create mode 100644 hw/dmx/input/dmxevents.c create mode 100644 hw/dmx/input/dmxevents.h create mode 100644 hw/dmx/input/dmxinputinit.c create mode 100644 hw/dmx/input/dmxinputinit.h create mode 100644 hw/dmx/input/dmxmap.c create mode 100644 hw/dmx/input/dmxmap.h create mode 100644 hw/dmx/input/dmxmotion.c create mode 100644 hw/dmx/input/dmxmotion.h create mode 100644 hw/dmx/input/dmxsigio.c create mode 100644 hw/dmx/input/dmxsigio.h create mode 100644 hw/dmx/input/dmxxinput.c create mode 100644 hw/dmx/input/lnx-keyboard.c create mode 100644 hw/dmx/input/lnx-keyboard.h create mode 100644 hw/dmx/input/lnx-ms.c create mode 100644 hw/dmx/input/lnx-ms.h create mode 100644 hw/dmx/input/lnx-ps2.c create mode 100644 hw/dmx/input/lnx-ps2.h create mode 100644 hw/dmx/input/usb-common.c create mode 100644 hw/dmx/input/usb-common.h create mode 100644 hw/dmx/input/usb-keyboard.c create mode 100644 hw/dmx/input/usb-keyboard.h create mode 100644 hw/dmx/input/usb-mouse.c create mode 100644 hw/dmx/input/usb-mouse.h create mode 100644 hw/dmx/input/usb-other.c create mode 100644 hw/dmx/input/usb-other.h create mode 100644 hw/dmx/input/usb-private.h create mode 100644 hw/dmx/man/Makefile.am create mode 100644 hw/dmx/man/Makefile.in create mode 100644 hw/dmx/man/Xdmx.man create mode 100644 hw/kdrive/Makefile.am create mode 100644 hw/kdrive/Makefile.in create mode 100644 hw/kdrive/ephyr/Makefile.am create mode 100644 hw/kdrive/ephyr/Makefile.in create mode 100644 hw/kdrive/ephyr/README create mode 100644 hw/kdrive/ephyr/ephyr.c create mode 100644 hw/kdrive/ephyr/ephyr.h create mode 100644 hw/kdrive/ephyr/ephyr_draw.c create mode 100644 hw/kdrive/ephyr/ephyrdri.c create mode 100644 hw/kdrive/ephyr/ephyrdri.h create mode 100644 hw/kdrive/ephyr/ephyrdriext.c create mode 100644 hw/kdrive/ephyr/ephyrdriext.h create mode 100644 hw/kdrive/ephyr/ephyrglxext.c create mode 100644 hw/kdrive/ephyr/ephyrglxext.h create mode 100644 hw/kdrive/ephyr/ephyrhostglx.c create mode 100644 hw/kdrive/ephyr/ephyrhostglx.h create mode 100644 hw/kdrive/ephyr/ephyrinit.c create mode 100644 hw/kdrive/ephyr/ephyrlog.h create mode 100644 hw/kdrive/ephyr/ephyrvideo.c create mode 100644 hw/kdrive/ephyr/hostx.c create mode 100644 hw/kdrive/ephyr/hostx.h create mode 100644 hw/kdrive/ephyr/man/Makefile.am create mode 100644 hw/kdrive/ephyr/man/Makefile.in create mode 100644 hw/kdrive/ephyr/man/Xephyr.man create mode 100644 hw/kdrive/ephyr/os.c create mode 100644 hw/kdrive/fake/Makefile.am create mode 100644 hw/kdrive/fake/Makefile.in create mode 100644 hw/kdrive/fake/fake.c create mode 100644 hw/kdrive/fake/fake.h create mode 100644 hw/kdrive/fake/fakeinit.c create mode 100644 hw/kdrive/fake/kbd.c create mode 100644 hw/kdrive/fake/mouse.c create mode 100644 hw/kdrive/fake/os.c create mode 100644 hw/kdrive/fbdev/Makefile.am create mode 100644 hw/kdrive/fbdev/Makefile.in create mode 100644 hw/kdrive/fbdev/fbdev.c create mode 100644 hw/kdrive/fbdev/fbdev.h create mode 100644 hw/kdrive/fbdev/fbinit.c create mode 100644 hw/kdrive/linux/Makefile.am create mode 100644 hw/kdrive/linux/Makefile.in create mode 100644 hw/kdrive/linux/evdev.c create mode 100644 hw/kdrive/linux/keyboard.c create mode 100644 hw/kdrive/linux/linux.c create mode 100644 hw/kdrive/linux/mouse.c create mode 100644 hw/kdrive/linux/ms.c create mode 100644 hw/kdrive/linux/ps2.c create mode 100644 hw/kdrive/linux/tslib.c create mode 100644 hw/kdrive/src/Makefile.am create mode 100644 hw/kdrive/src/Makefile.in create mode 100644 hw/kdrive/src/fourcc.h create mode 100644 hw/kdrive/src/kcmap.c create mode 100644 hw/kdrive/src/kdrive.c create mode 100644 hw/kdrive/src/kdrive.h create mode 100644 hw/kdrive/src/kinfo.c create mode 100644 hw/kdrive/src/kinput.c create mode 100644 hw/kdrive/src/kmode.c create mode 100644 hw/kdrive/src/kshadow.c create mode 100644 hw/kdrive/src/kxv.c create mode 100644 hw/kdrive/src/kxv.h create mode 100644 hw/vfb/InitInput.c create mode 100644 hw/vfb/InitOutput.c create mode 100644 hw/vfb/Makefile.am create mode 100644 hw/vfb/Makefile.in create mode 100644 hw/vfb/man/Makefile.am create mode 100644 hw/vfb/man/Makefile.in create mode 100644 hw/vfb/man/Xvfb.man create mode 100644 hw/xfree86/Makefile.am create mode 100644 hw/xfree86/Makefile.in create mode 100644 hw/xfree86/common/Makefile.am create mode 100644 hw/xfree86/common/Makefile.in create mode 100644 hw/xfree86/common/compiler.h create mode 100644 hw/xfree86/common/dgaproc.h create mode 100644 hw/xfree86/common/extramodes create mode 100644 hw/xfree86/common/fourcc.h create mode 100644 hw/xfree86/common/modeline2c.awk create mode 100644 hw/xfree86/common/vesamodes create mode 100644 hw/xfree86/common/vidmodeproc.h create mode 100644 hw/xfree86/common/xaarop.h create mode 100644 hw/xfree86/common/xf86.h create mode 100644 hw/xfree86/common/xf86AutoConfig.c create mode 100644 hw/xfree86/common/xf86Build.h.in create mode 100644 hw/xfree86/common/xf86Bus.c create mode 100644 hw/xfree86/common/xf86Bus.h create mode 100644 hw/xfree86/common/xf86Config.c create mode 100644 hw/xfree86/common/xf86Config.h create mode 100644 hw/xfree86/common/xf86Configure.c create mode 100644 hw/xfree86/common/xf86Cursor.c create mode 100644 hw/xfree86/common/xf86DGA.c create mode 100644 hw/xfree86/common/xf86DPMS.c create mode 100644 hw/xfree86/common/xf86Events.c create mode 100644 hw/xfree86/common/xf86Extensions.c create mode 100644 hw/xfree86/common/xf86Extensions.h create mode 100644 hw/xfree86/common/xf86Globals.c create mode 100644 hw/xfree86/common/xf86Helper.c create mode 100644 hw/xfree86/common/xf86InPriv.h create mode 100644 hw/xfree86/common/xf86Init.c create mode 100644 hw/xfree86/common/xf86Mode.c create mode 100644 hw/xfree86/common/xf86Module.h create mode 100644 hw/xfree86/common/xf86Opt.h create mode 100644 hw/xfree86/common/xf86Option.c create mode 100644 hw/xfree86/common/xf86Optionstr.h create mode 100644 hw/xfree86/common/xf86PM.c create mode 100644 hw/xfree86/common/xf86PciInfo.h create mode 100644 hw/xfree86/common/xf86Priv.h create mode 100644 hw/xfree86/common/xf86Privstr.h create mode 100644 hw/xfree86/common/xf86RandR.c create mode 100644 hw/xfree86/common/xf86VGAarbiter.c create mode 100644 hw/xfree86/common/xf86VGAarbiter.h create mode 100644 hw/xfree86/common/xf86VGAarbiterPriv.h create mode 100644 hw/xfree86/common/xf86VidMode.c create mode 100644 hw/xfree86/common/xf86Xinput.c create mode 100644 hw/xfree86/common/xf86Xinput.h create mode 100644 hw/xfree86/common/xf86cmap.c create mode 100644 hw/xfree86/common/xf86cmap.h create mode 100644 hw/xfree86/common/xf86fbBus.c create mode 100644 hw/xfree86/common/xf86fbman.c create mode 100644 hw/xfree86/common/xf86fbman.h create mode 100644 hw/xfree86/common/xf86noBus.c create mode 100644 hw/xfree86/common/xf86pciBus.c create mode 100644 hw/xfree86/common/xf86pciBus.h create mode 100644 hw/xfree86/common/xf86platformBus.c create mode 100644 hw/xfree86/common/xf86platformBus.h create mode 100644 hw/xfree86/common/xf86sbusBus.c create mode 100644 hw/xfree86/common/xf86sbusBus.h create mode 100644 hw/xfree86/common/xf86str.h create mode 100644 hw/xfree86/common/xf86vmode.c create mode 100644 hw/xfree86/common/xf86xv.c create mode 100644 hw/xfree86/common/xf86xv.h create mode 100644 hw/xfree86/common/xf86xvmc.c create mode 100644 hw/xfree86/common/xf86xvmc.h create mode 100644 hw/xfree86/common/xf86xvpriv.h create mode 100644 hw/xfree86/common/xisb.c create mode 100644 hw/xfree86/common/xisb.h create mode 100644 hw/xfree86/common/xorgHelper.c create mode 100644 hw/xfree86/common/xorgVersion.h create mode 100644 hw/xfree86/ddc/DDC.HOWTO create mode 100644 hw/xfree86/ddc/Makefile.am create mode 100644 hw/xfree86/ddc/Makefile.in create mode 100644 hw/xfree86/ddc/ddc.c create mode 100644 hw/xfree86/ddc/ddcProperty.c create mode 100644 hw/xfree86/ddc/edid.h create mode 100644 hw/xfree86/ddc/interpret_edid.c create mode 100644 hw/xfree86/ddc/print_edid.c create mode 100644 hw/xfree86/ddc/xf86DDC.h create mode 100644 hw/xfree86/dixmods/Makefile.am create mode 100644 hw/xfree86/dixmods/Makefile.in create mode 100644 hw/xfree86/dixmods/fbmodule.c create mode 100644 hw/xfree86/dixmods/glxmodule.c create mode 100644 hw/xfree86/dixmods/shmodule.c create mode 100644 hw/xfree86/dixmods/xkbKillSrv.c create mode 100644 hw/xfree86/dixmods/xkbPrivate.c create mode 100644 hw/xfree86/dixmods/xkbVT.c create mode 100644 hw/xfree86/doc/Makefile.am create mode 100644 hw/xfree86/doc/Makefile.in create mode 100644 hw/xfree86/doc/README.DRIcomp create mode 100644 hw/xfree86/doc/README.modes create mode 100644 hw/xfree86/doc/Registry create mode 100644 hw/xfree86/doc/ddxDesign.xml create mode 100644 hw/xfree86/doc/exa-driver.txt create mode 100644 hw/xfree86/dri/Makefile.am create mode 100644 hw/xfree86/dri/Makefile.in create mode 100644 hw/xfree86/dri/dri.c create mode 100644 hw/xfree86/dri/dri.h create mode 100644 hw/xfree86/dri/dristruct.h create mode 100644 hw/xfree86/dri/sarea.h create mode 100644 hw/xfree86/dri/xf86dri.c create mode 100644 hw/xfree86/dri2/Makefile.am create mode 100644 hw/xfree86/dri2/Makefile.in create mode 100644 hw/xfree86/dri2/dri2.c create mode 100644 hw/xfree86/dri2/dri2.h create mode 100644 hw/xfree86/dri2/dri2ext.c create mode 100644 hw/xfree86/dri2/dri2int.h create mode 100644 hw/xfree86/exa/Makefile.am create mode 100644 hw/xfree86/exa/Makefile.in create mode 100644 hw/xfree86/exa/examodule.c create mode 100644 hw/xfree86/exa/man/Makefile.am create mode 100644 hw/xfree86/exa/man/Makefile.in create mode 100644 hw/xfree86/exa/man/exa.man create mode 100644 hw/xfree86/fbdevhw/Makefile.am create mode 100644 hw/xfree86/fbdevhw/Makefile.in create mode 100644 hw/xfree86/fbdevhw/README create mode 100644 hw/xfree86/fbdevhw/fbdevhw.c create mode 100644 hw/xfree86/fbdevhw/fbdevhw.h create mode 100644 hw/xfree86/fbdevhw/fbdevhwstub.c create mode 100644 hw/xfree86/fbdevhw/fbpriv.h create mode 100644 hw/xfree86/fbdevhw/man/Makefile.am create mode 100644 hw/xfree86/fbdevhw/man/Makefile.in create mode 100644 hw/xfree86/fbdevhw/man/fbdevhw.man create mode 100644 hw/xfree86/i2c/Makefile.am create mode 100644 hw/xfree86/i2c/Makefile.in create mode 100644 hw/xfree86/i2c/bt829.c create mode 100644 hw/xfree86/i2c/bt829.h create mode 100644 hw/xfree86/i2c/bt829_module.c create mode 100644 hw/xfree86/i2c/fi1236.c create mode 100644 hw/xfree86/i2c/fi1236.h create mode 100644 hw/xfree86/i2c/fi1236_module.c create mode 100644 hw/xfree86/i2c/i2c_def.h create mode 100644 hw/xfree86/i2c/msp3430.c create mode 100644 hw/xfree86/i2c/msp3430.h create mode 100644 hw/xfree86/i2c/msp3430_module.c create mode 100644 hw/xfree86/i2c/tda8425.c create mode 100644 hw/xfree86/i2c/tda8425.h create mode 100644 hw/xfree86/i2c/tda8425_module.c create mode 100644 hw/xfree86/i2c/tda9850.c create mode 100644 hw/xfree86/i2c/tda9850.h create mode 100644 hw/xfree86/i2c/tda9850_module.c create mode 100644 hw/xfree86/i2c/tda9885.c create mode 100644 hw/xfree86/i2c/tda9885.h create mode 100644 hw/xfree86/i2c/tda9885_module.c create mode 100644 hw/xfree86/i2c/uda1380.c create mode 100644 hw/xfree86/i2c/uda1380.h create mode 100644 hw/xfree86/i2c/uda1380_module.c create mode 100644 hw/xfree86/i2c/xf86i2c.c create mode 100644 hw/xfree86/i2c/xf86i2c.h create mode 100644 hw/xfree86/int10/INT10.HOWTO create mode 100644 hw/xfree86/int10/Makefile.am create mode 100644 hw/xfree86/int10/Makefile.in create mode 100644 hw/xfree86/int10/generic.c create mode 100644 hw/xfree86/int10/helper_exec.c create mode 100644 hw/xfree86/int10/helper_mem.c create mode 100644 hw/xfree86/int10/stub.c create mode 100644 hw/xfree86/int10/x86emu.c create mode 100644 hw/xfree86/int10/xf86int10.c create mode 100644 hw/xfree86/int10/xf86int10.h create mode 100644 hw/xfree86/int10/xf86int10module.c create mode 100644 hw/xfree86/int10/xf86x86emu.c create mode 100644 hw/xfree86/int10/xf86x86emu.h create mode 100644 hw/xfree86/loader/Makefile.am create mode 100644 hw/xfree86/loader/Makefile.in create mode 100644 hw/xfree86/loader/loader.c create mode 100644 hw/xfree86/loader/loader.h create mode 100644 hw/xfree86/loader/loaderProcs.h create mode 100644 hw/xfree86/loader/loadmod.c create mode 100644 hw/xfree86/loader/os.c create mode 100644 hw/xfree86/man/Makefile.am create mode 100644 hw/xfree86/man/Makefile.in create mode 100644 hw/xfree86/man/Xorg.man create mode 100644 hw/xfree86/man/xorg.conf.d.man create mode 100644 hw/xfree86/man/xorg.conf.man create mode 100644 hw/xfree86/modes/Makefile.am create mode 100644 hw/xfree86/modes/Makefile.in create mode 100644 hw/xfree86/modes/xf86Crtc.c create mode 100644 hw/xfree86/modes/xf86Crtc.h create mode 100644 hw/xfree86/modes/xf86Cursors.c create mode 100644 hw/xfree86/modes/xf86DiDGA.c create mode 100644 hw/xfree86/modes/xf86DisplayIDModes.c create mode 100644 hw/xfree86/modes/xf86EdidModes.c create mode 100644 hw/xfree86/modes/xf86Modes.c create mode 100644 hw/xfree86/modes/xf86Modes.h create mode 100644 hw/xfree86/modes/xf86RandR12.c create mode 100644 hw/xfree86/modes/xf86RandR12.h create mode 100644 hw/xfree86/modes/xf86Rotate.c create mode 100644 hw/xfree86/modes/xf86cvt.c create mode 100644 hw/xfree86/modes/xf86gtf.c create mode 100644 hw/xfree86/os-support/Makefile.am create mode 100644 hw/xfree86/os-support/Makefile.in create mode 100644 hw/xfree86/os-support/bsd/Makefile.am create mode 100644 hw/xfree86/os-support/bsd/Makefile.in create mode 100644 hw/xfree86/os-support/bsd/alpha_video.c create mode 100644 hw/xfree86/os-support/bsd/arm_video.c create mode 100644 hw/xfree86/os-support/bsd/bsd_VTsw.c create mode 100644 hw/xfree86/os-support/bsd/bsd_apm.c create mode 100644 hw/xfree86/os-support/bsd/bsd_axp.c create mode 100644 hw/xfree86/os-support/bsd/bsd_bell.c create mode 100644 hw/xfree86/os-support/bsd/bsd_ev56.c create mode 100644 hw/xfree86/os-support/bsd/bsd_init.c create mode 100644 hw/xfree86/os-support/bsd/bsd_kmod.c create mode 100644 hw/xfree86/os-support/bsd/bsd_kqueue_apm.c create mode 100644 hw/xfree86/os-support/bsd/i386_video.c create mode 100644 hw/xfree86/os-support/bsd/memrange.h create mode 100644 hw/xfree86/os-support/bsd/ppc_video.c create mode 100644 hw/xfree86/os-support/bsd/sparc64_video.c create mode 100644 hw/xfree86/os-support/bus/Makefile.am create mode 100644 hw/xfree86/os-support/bus/Makefile.in create mode 100644 hw/xfree86/os-support/bus/Pci.c create mode 100644 hw/xfree86/os-support/bus/Pci.h create mode 100644 hw/xfree86/os-support/bus/Sbus.c create mode 100644 hw/xfree86/os-support/bus/bsd_pci.c create mode 100644 hw/xfree86/os-support/bus/nobus.c create mode 100644 hw/xfree86/os-support/bus/xf86Pci.h create mode 100644 hw/xfree86/os-support/bus/xf86Sbus.h create mode 100644 hw/xfree86/os-support/hurd/Makefile.am create mode 100644 hw/xfree86/os-support/hurd/Makefile.in create mode 100644 hw/xfree86/os-support/hurd/hurd_bell.c create mode 100644 hw/xfree86/os-support/hurd/hurd_init.c create mode 100644 hw/xfree86/os-support/hurd/hurd_mmap.c create mode 100644 hw/xfree86/os-support/hurd/hurd_video.c create mode 100644 hw/xfree86/os-support/int10Defines.h create mode 100644 hw/xfree86/os-support/linux/Makefile.am create mode 100644 hw/xfree86/os-support/linux/Makefile.in create mode 100644 hw/xfree86/os-support/linux/int10/linux.c create mode 100644 hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c create mode 100644 hw/xfree86/os-support/linux/lnx_acpi.c create mode 100644 hw/xfree86/os-support/linux/lnx_agp.c create mode 100644 hw/xfree86/os-support/linux/lnx_apm.c create mode 100644 hw/xfree86/os-support/linux/lnx_axp.c create mode 100644 hw/xfree86/os-support/linux/lnx_bell.c create mode 100644 hw/xfree86/os-support/linux/lnx_ev56.c create mode 100644 hw/xfree86/os-support/linux/lnx_init.c create mode 100644 hw/xfree86/os-support/linux/lnx_kmod.c create mode 100644 hw/xfree86/os-support/linux/lnx_platform.c create mode 100644 hw/xfree86/os-support/linux/lnx_video.c create mode 100644 hw/xfree86/os-support/misc/Makefile.am create mode 100644 hw/xfree86/os-support/misc/Makefile.in create mode 100644 hw/xfree86/os-support/misc/SlowBcopy.c create mode 100644 hw/xfree86/os-support/shared/VTsw_noop.c create mode 100644 hw/xfree86/os-support/shared/VTsw_usl.c create mode 100644 hw/xfree86/os-support/shared/agp_noop.c create mode 100644 hw/xfree86/os-support/shared/bios_mmap.c create mode 100644 hw/xfree86/os-support/shared/ioperm_noop.c create mode 100644 hw/xfree86/os-support/shared/kmod_noop.c create mode 100644 hw/xfree86/os-support/shared/pm_noop.c create mode 100644 hw/xfree86/os-support/shared/posix_tty.c create mode 100644 hw/xfree86/os-support/shared/sigio.c create mode 100644 hw/xfree86/os-support/shared/sigiostubs.c create mode 100644 hw/xfree86/os-support/shared/vidmem.c create mode 100644 hw/xfree86/os-support/shared/xf86Axp.c create mode 100644 hw/xfree86/os-support/shared/xf86Axp.h create mode 100644 hw/xfree86/os-support/solaris/Makefile.am create mode 100644 hw/xfree86/os-support/solaris/Makefile.in create mode 100644 hw/xfree86/os-support/solaris/apSolaris.shar create mode 100644 hw/xfree86/os-support/solaris/solaris-amd64.S create mode 100644 hw/xfree86/os-support/solaris/solaris-ia32.S create mode 100644 hw/xfree86/os-support/solaris/solaris-sparcv8plus.S create mode 100644 hw/xfree86/os-support/solaris/sun_VTsw.c create mode 100644 hw/xfree86/os-support/solaris/sun_agp.c create mode 100644 hw/xfree86/os-support/solaris/sun_apm.c create mode 100644 hw/xfree86/os-support/solaris/sun_bell.c create mode 100644 hw/xfree86/os-support/solaris/sun_init.c create mode 100644 hw/xfree86/os-support/solaris/sun_inout.s create mode 100644 hw/xfree86/os-support/solaris/sun_vid.c create mode 100644 hw/xfree86/os-support/stub/Makefile.am create mode 100644 hw/xfree86/os-support/stub/Makefile.in create mode 100644 hw/xfree86/os-support/stub/stub_bell.c create mode 100644 hw/xfree86/os-support/stub/stub_bios.c create mode 100644 hw/xfree86/os-support/stub/stub_init.c create mode 100644 hw/xfree86/os-support/stub/stub_video.c create mode 100644 hw/xfree86/os-support/xf86OSpriv.h create mode 100644 hw/xfree86/os-support/xf86_OSlib.h create mode 100644 hw/xfree86/os-support/xf86_OSproc.h create mode 100644 hw/xfree86/parser/Configint.h create mode 100644 hw/xfree86/parser/DRI.c create mode 100644 hw/xfree86/parser/Device.c create mode 100644 hw/xfree86/parser/Extensions.c create mode 100644 hw/xfree86/parser/Files.c create mode 100644 hw/xfree86/parser/Flags.c create mode 100644 hw/xfree86/parser/Input.c create mode 100644 hw/xfree86/parser/InputClass.c create mode 100644 hw/xfree86/parser/Layout.c create mode 100644 hw/xfree86/parser/Makefile.am create mode 100644 hw/xfree86/parser/Makefile.in create mode 100644 hw/xfree86/parser/Module.c create mode 100644 hw/xfree86/parser/Monitor.c create mode 100644 hw/xfree86/parser/Pointer.c create mode 100644 hw/xfree86/parser/Screen.c create mode 100644 hw/xfree86/parser/Vendor.c create mode 100644 hw/xfree86/parser/Video.c create mode 100644 hw/xfree86/parser/configProcs.h create mode 100644 hw/xfree86/parser/read.c create mode 100644 hw/xfree86/parser/scan.c create mode 100644 hw/xfree86/parser/write.c create mode 100644 hw/xfree86/parser/xf86Optrec.h create mode 100644 hw/xfree86/parser/xf86Parser.h create mode 100644 hw/xfree86/parser/xf86tokens.h create mode 100644 hw/xfree86/ramdac/BT.c create mode 100644 hw/xfree86/ramdac/BT.h create mode 100644 hw/xfree86/ramdac/BTPriv.h create mode 100644 hw/xfree86/ramdac/CURSOR.NOTES create mode 100644 hw/xfree86/ramdac/IBM.c create mode 100644 hw/xfree86/ramdac/IBM.h create mode 100644 hw/xfree86/ramdac/IBMPriv.h create mode 100644 hw/xfree86/ramdac/Makefile.am create mode 100644 hw/xfree86/ramdac/Makefile.in create mode 100644 hw/xfree86/ramdac/TI.c create mode 100644 hw/xfree86/ramdac/TI.h create mode 100644 hw/xfree86/ramdac/TIPriv.h create mode 100644 hw/xfree86/ramdac/xf86Cursor.c create mode 100644 hw/xfree86/ramdac/xf86Cursor.h create mode 100644 hw/xfree86/ramdac/xf86CursorPriv.h create mode 100644 hw/xfree86/ramdac/xf86HWCurs.c create mode 100644 hw/xfree86/ramdac/xf86RamDac.c create mode 100644 hw/xfree86/ramdac/xf86RamDac.h create mode 100644 hw/xfree86/ramdac/xf86RamDacCmap.c create mode 100644 hw/xfree86/ramdac/xf86RamDacPriv.h create mode 100755 hw/xfree86/sdksyms.sh create mode 100644 hw/xfree86/shadowfb/Makefile.am create mode 100644 hw/xfree86/shadowfb/Makefile.in create mode 100644 hw/xfree86/shadowfb/sfbmodule.c create mode 100644 hw/xfree86/shadowfb/shadow.c create mode 100644 hw/xfree86/shadowfb/shadowfb.h create mode 100644 hw/xfree86/utils/Makefile.am create mode 100644 hw/xfree86/utils/Makefile.in create mode 100644 hw/xfree86/utils/cvt/Makefile.am create mode 100644 hw/xfree86/utils/cvt/Makefile.in create mode 100644 hw/xfree86/utils/cvt/cvt.c create mode 100644 hw/xfree86/utils/gtf/Makefile.am create mode 100644 hw/xfree86/utils/gtf/Makefile.in create mode 100644 hw/xfree86/utils/gtf/gtf.c create mode 100644 hw/xfree86/utils/man/Makefile.am create mode 100644 hw/xfree86/utils/man/Makefile.in create mode 100644 hw/xfree86/utils/man/cvt.man create mode 100644 hw/xfree86/utils/man/gtf.man create mode 100644 hw/xfree86/vbe/Makefile.am create mode 100644 hw/xfree86/vbe/Makefile.in create mode 100644 hw/xfree86/vbe/vbe.c create mode 100644 hw/xfree86/vbe/vbe.h create mode 100644 hw/xfree86/vbe/vbeModes.c create mode 100644 hw/xfree86/vbe/vbeModes.h create mode 100644 hw/xfree86/vbe/vbe_module.c create mode 100644 hw/xfree86/vgahw/Makefile.am create mode 100644 hw/xfree86/vgahw/Makefile.in create mode 100644 hw/xfree86/vgahw/vgaCmap.c create mode 100644 hw/xfree86/vgahw/vgaHW.c create mode 100644 hw/xfree86/vgahw/vgaHW.h create mode 100644 hw/xfree86/vgahw/vgaHWmodule.c create mode 100644 hw/xfree86/x86emu/Makefile.am create mode 100644 hw/xfree86/x86emu/Makefile.in create mode 100644 hw/xfree86/x86emu/debug.c create mode 100644 hw/xfree86/x86emu/decode.c create mode 100644 hw/xfree86/x86emu/fpu.c create mode 100644 hw/xfree86/x86emu/ops.c create mode 100644 hw/xfree86/x86emu/ops2.c create mode 100644 hw/xfree86/x86emu/prim_ops.c create mode 100644 hw/xfree86/x86emu/sys.c create mode 100644 hw/xfree86/x86emu/validate.c create mode 100644 hw/xfree86/x86emu/x86emu.h create mode 100644 hw/xfree86/x86emu/x86emu/debug.h create mode 100644 hw/xfree86/x86emu/x86emu/decode.h create mode 100644 hw/xfree86/x86emu/x86emu/fpu.h create mode 100644 hw/xfree86/x86emu/x86emu/fpu_regs.h create mode 100644 hw/xfree86/x86emu/x86emu/ops.h create mode 100644 hw/xfree86/x86emu/x86emu/prim_asm.h create mode 100644 hw/xfree86/x86emu/x86emu/prim_ops.h create mode 100644 hw/xfree86/x86emu/x86emu/prim_x86_gcc.h create mode 100644 hw/xfree86/x86emu/x86emu/regs.h create mode 100644 hw/xfree86/x86emu/x86emu/types.h create mode 100644 hw/xfree86/x86emu/x86emu/x86emui.h create mode 100644 hw/xfree86/xorgconf.cpp create mode 100644 hw/xnest/Args.c create mode 100644 hw/xnest/Args.h create mode 100644 hw/xnest/Color.c create mode 100644 hw/xnest/Color.h create mode 100644 hw/xnest/Cursor.c create mode 100644 hw/xnest/Display.c create mode 100644 hw/xnest/Display.h create mode 100644 hw/xnest/Drawable.h create mode 100644 hw/xnest/Events.c create mode 100644 hw/xnest/Events.h create mode 100644 hw/xnest/Font.c create mode 100644 hw/xnest/GC.c create mode 100644 hw/xnest/GCOps.c create mode 100644 hw/xnest/GCOps.h create mode 100644 hw/xnest/Handlers.c create mode 100644 hw/xnest/Handlers.h create mode 100644 hw/xnest/Init.c create mode 100644 hw/xnest/Init.h create mode 100644 hw/xnest/Keyboard.c create mode 100644 hw/xnest/Keyboard.h create mode 100644 hw/xnest/Makefile.am create mode 100644 hw/xnest/Makefile.in create mode 100644 hw/xnest/Pixmap.c create mode 100644 hw/xnest/Pointer.c create mode 100644 hw/xnest/Pointer.h create mode 100644 hw/xnest/Screen.c create mode 100644 hw/xnest/Screen.h create mode 100644 hw/xnest/Visual.c create mode 100644 hw/xnest/Visual.h create mode 100644 hw/xnest/Window.c create mode 100644 hw/xnest/XNCursor.h create mode 100644 hw/xnest/XNFont.h create mode 100644 hw/xnest/XNGC.h create mode 100644 hw/xnest/XNPixmap.h create mode 100644 hw/xnest/XNWindow.h create mode 100644 hw/xnest/Xnest.h create mode 100644 hw/xnest/icon create mode 100644 hw/xnest/man/Makefile.am create mode 100644 hw/xnest/man/Makefile.in create mode 100644 hw/xnest/man/Xnest.man create mode 100644 hw/xnest/screensaver create mode 100644 hw/xnest/xnest-config.h create mode 100644 hw/xquartz/GL/Makefile.am create mode 100644 hw/xquartz/GL/Makefile.in create mode 100644 hw/xquartz/GL/capabilities.c create mode 100644 hw/xquartz/GL/capabilities.h create mode 100644 hw/xquartz/GL/indirect.c create mode 100644 hw/xquartz/GL/visualConfigs.c create mode 100644 hw/xquartz/GL/visualConfigs.h create mode 100644 hw/xquartz/Makefile.am create mode 100644 hw/xquartz/Makefile.in create mode 100644 hw/xquartz/X11Application.h create mode 100644 hw/xquartz/X11Application.m create mode 100644 hw/xquartz/X11Controller.h create mode 100644 hw/xquartz/X11Controller.m create mode 100644 hw/xquartz/applewm.c create mode 100644 hw/xquartz/applewmExt.h create mode 100644 hw/xquartz/bundle/Info.plist.cpp create mode 100644 hw/xquartz/bundle/Makefile.am create mode 100644 hw/xquartz/bundle/Makefile.in create mode 100644 hw/xquartz/bundle/PkgInfo create mode 100644 hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/Dutch.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/English.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/English.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/French.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/French.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/German.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/German.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/Italian.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/Italian.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/X11.icns create mode 100644 hw/xquartz/bundle/Resources/ar.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/ar.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/ar.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/ca.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/ca.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/ca.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/ca.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/ca.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/cs.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/cs.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/cs.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/cs.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/cs.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/da.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/da.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/el.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/el.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/el.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/el.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/el.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/fi.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/fi.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/he.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/he.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/he.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/he.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/he.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/hr.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/hr.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/hr.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/hr.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/hr.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/hu.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/hu.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/hu.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/hu.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/hu.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/ko.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/ko.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/no.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/no.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/no.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/pl.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/pt.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/pt.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/pt_PT.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/ro.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/ro.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/ro.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/ro.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/ro.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/ru.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/ru.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/sk.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/sk.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/sk.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/sk.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/sk.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/sv.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/th.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/th.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/th.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/th.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/th.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/tr.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/tr.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/tr.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/tr.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/tr.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/uk.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/uk.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/uk.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/uk.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/uk.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/zh_CN.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Resources/zh_TW.lproj/locversion.plist create mode 100644 hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/designable.nib create mode 100644 hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib create mode 100755 hw/xquartz/bundle/X11.sh create mode 100644 hw/xquartz/bundle/Xquartz.plist create mode 100644 hw/xquartz/bundle/cpprules.in create mode 100755 hw/xquartz/bundle/mk_bundke.sh create mode 100644 hw/xquartz/console_redirect.c create mode 100644 hw/xquartz/console_redirect.h create mode 100644 hw/xquartz/darwin.c create mode 100644 hw/xquartz/darwin.h create mode 100644 hw/xquartz/darwinEvents.c create mode 100644 hw/xquartz/darwinEvents.h create mode 100644 hw/xquartz/darwinXinput.c create mode 100644 hw/xquartz/darwinfb.h create mode 100644 hw/xquartz/keysym2ucs.c create mode 100644 hw/xquartz/keysym2ucs.h create mode 100644 hw/xquartz/mach-startup/Makefile.am create mode 100644 hw/xquartz/mach-startup/Makefile.in create mode 100644 hw/xquartz/mach-startup/bundle-main.c create mode 100644 hw/xquartz/mach-startup/launchd_fd.c create mode 100644 hw/xquartz/mach-startup/launchd_fd.h create mode 100644 hw/xquartz/mach-startup/mach_startup.defs create mode 100644 hw/xquartz/mach-startup/mach_startup_types.h create mode 100644 hw/xquartz/mach-startup/stub.c create mode 100644 hw/xquartz/man/Makefile.am create mode 100644 hw/xquartz/man/Makefile.in create mode 100644 hw/xquartz/man/Xquartz.man create mode 100644 hw/xquartz/pbproxy/Makefile.am create mode 100644 hw/xquartz/pbproxy/Makefile.in create mode 100644 hw/xquartz/pbproxy/app-main.m create mode 100644 hw/xquartz/pbproxy/main.m create mode 100644 hw/xquartz/pbproxy/pbproxy.h create mode 100644 hw/xquartz/pbproxy/trick_autotools.c create mode 100644 hw/xquartz/pbproxy/x-input.m create mode 100644 hw/xquartz/pbproxy/x-selection.h create mode 100644 hw/xquartz/pbproxy/x-selection.m create mode 100644 hw/xquartz/quartz.c create mode 100644 hw/xquartz/quartz.h create mode 100644 hw/xquartz/quartzCocoa.m create mode 100644 hw/xquartz/quartzCommon.h create mode 100644 hw/xquartz/quartzKeyboard.c create mode 100644 hw/xquartz/quartzKeyboard.h create mode 100644 hw/xquartz/quartzRandR.c create mode 100644 hw/xquartz/quartzRandR.h create mode 100644 hw/xquartz/quartzStartup.c create mode 100644 hw/xquartz/sanitizedCarbon.h create mode 100644 hw/xquartz/sanitizedCocoa.h create mode 100644 hw/xquartz/xpr/Makefile.am create mode 100644 hw/xquartz/xpr/Makefile.in create mode 100644 hw/xquartz/xpr/appledri.c create mode 100644 hw/xquartz/xpr/appledri.h create mode 100644 hw/xquartz/xpr/appledristr.h create mode 100644 hw/xquartz/xpr/dri.c create mode 100644 hw/xquartz/xpr/dri.h create mode 100644 hw/xquartz/xpr/driWrap.c create mode 100644 hw/xquartz/xpr/driWrap.h create mode 100644 hw/xquartz/xpr/dristruct.h create mode 100644 hw/xquartz/xpr/x-hash.c create mode 100644 hw/xquartz/xpr/x-hash.h create mode 100644 hw/xquartz/xpr/x-hook.c create mode 100644 hw/xquartz/xpr/x-hook.h create mode 100644 hw/xquartz/xpr/x-list.c create mode 100644 hw/xquartz/xpr/x-list.h create mode 100644 hw/xquartz/xpr/xpr.h create mode 100644 hw/xquartz/xpr/xprAppleWM.c create mode 100644 hw/xquartz/xpr/xprCursor.c create mode 100644 hw/xquartz/xpr/xprEvent.c create mode 100644 hw/xquartz/xpr/xprEvent.h create mode 100644 hw/xquartz/xpr/xprFrame.c create mode 100644 hw/xquartz/xpr/xprScreen.c create mode 100644 hw/xwin/InitInput.c create mode 100644 hw/xwin/InitOutput.c create mode 100644 hw/xwin/Makefile.am create mode 100644 hw/xwin/Makefile.in create mode 100644 hw/xwin/X.ico create mode 100755 hw/xwin/XWin.exe.manifest create mode 100644 hw/xwin/XWin.rc create mode 100644 hw/xwin/ddraw.h create mode 100644 hw/xwin/glx/Makefile.am create mode 100644 hw/xwin/glx/Makefile.in create mode 100755 hw/xwin/glx/gen_gl_wrappers.py create mode 100644 hw/xwin/glx/glshim.c create mode 100644 hw/xwin/glx/glthunk.c create mode 100644 hw/xwin/glx/glwindows.h create mode 100644 hw/xwin/glx/indirect.c create mode 100644 hw/xwin/glx/wgl_ext_api.c create mode 100644 hw/xwin/glx/wgl_ext_api.h create mode 100644 hw/xwin/glx/winpriv.c create mode 100644 hw/xwin/glx/winpriv.h create mode 100644 hw/xwin/man/Makefile.am create mode 100644 hw/xwin/man/Makefile.in create mode 100644 hw/xwin/man/XWin.man create mode 100644 hw/xwin/man/XWinrc.man create mode 100644 hw/xwin/propertystore.h create mode 100644 hw/xwin/system.XWinrc create mode 100644 hw/xwin/win.h create mode 100644 hw/xwin/winSetAppUserModelID.c create mode 100644 hw/xwin/winallpriv.c create mode 100644 hw/xwin/winauth.c create mode 100644 hw/xwin/winblock.c create mode 100644 hw/xwin/winclip.c create mode 100644 hw/xwin/winclipboard.h create mode 100644 hw/xwin/winclipboardinit.c create mode 100644 hw/xwin/winclipboardtextconv.c create mode 100644 hw/xwin/winclipboardthread.c create mode 100644 hw/xwin/winclipboardwndproc.c create mode 100644 hw/xwin/winclipboardwrappers.c create mode 100644 hw/xwin/winclipboardxevents.c create mode 100644 hw/xwin/wincmap.c create mode 100644 hw/xwin/winconfig.c create mode 100644 hw/xwin/winconfig.h create mode 100644 hw/xwin/wincreatewnd.c create mode 100644 hw/xwin/wincursor.c create mode 100644 hw/xwin/windialogs.c create mode 100644 hw/xwin/winengine.c create mode 100644 hw/xwin/winerror.c create mode 100644 hw/xwin/winfillsp.c create mode 100644 hw/xwin/winfont.c create mode 100644 hw/xwin/wingc.c create mode 100644 hw/xwin/wingetsp.c create mode 100644 hw/xwin/winglobals.c create mode 100644 hw/xwin/winglobals.h create mode 100644 hw/xwin/winkeybd.c create mode 100644 hw/xwin/winkeybd.h create mode 100644 hw/xwin/winkeyhook.c create mode 100644 hw/xwin/winkeynames.h create mode 100644 hw/xwin/winlayouts.h create mode 100644 hw/xwin/winmessages.h create mode 100644 hw/xwin/winmisc.c create mode 100644 hw/xwin/winmonitors.c create mode 100644 hw/xwin/winmonitors.h create mode 100644 hw/xwin/winmouse.c create mode 100644 hw/xwin/winms.h create mode 100644 hw/xwin/winmsg.c create mode 100644 hw/xwin/winmsg.h create mode 100644 hw/xwin/winmsgwindow.c create mode 100644 hw/xwin/winmultiwindowclass.c create mode 100644 hw/xwin/winmultiwindowclass.h create mode 100644 hw/xwin/winmultiwindowicons.c create mode 100644 hw/xwin/winmultiwindowicons.h create mode 100644 hw/xwin/winmultiwindowshape.c create mode 100644 hw/xwin/winmultiwindowwindow.c create mode 100644 hw/xwin/winmultiwindowwm.c create mode 100644 hw/xwin/winmultiwindowwndproc.c create mode 100644 hw/xwin/winnativegdi.c create mode 100644 hw/xwin/winpfbdd.c create mode 100644 hw/xwin/winpixmap.c create mode 100644 hw/xwin/winpolyline.c create mode 100644 hw/xwin/winprefs.c create mode 100644 hw/xwin/winprefs.h create mode 100644 hw/xwin/winprefslex.c create mode 100644 hw/xwin/winprefslex.l create mode 100644 hw/xwin/winprefsyacc.c create mode 100644 hw/xwin/winprefsyacc.h create mode 100644 hw/xwin/winprefsyacc.y create mode 100644 hw/xwin/winprocarg.c create mode 100644 hw/xwin/winrandr.c create mode 100644 hw/xwin/winresource.h create mode 100644 hw/xwin/winrop.c create mode 100644 hw/xwin/winscrinit.c create mode 100644 hw/xwin/winsetsp.c create mode 100644 hw/xwin/winshaddd.c create mode 100644 hw/xwin/winshadddnl.c create mode 100644 hw/xwin/winshadgdi.c create mode 100644 hw/xwin/wintaskbar.c create mode 100644 hw/xwin/wintrayicon.c create mode 100644 hw/xwin/winvalargs.c create mode 100644 hw/xwin/winvideo.c create mode 100644 hw/xwin/winwakeup.c create mode 100644 hw/xwin/winwin32rootless.c create mode 100644 hw/xwin/winwin32rootlesswindow.c create mode 100644 hw/xwin/winwin32rootlesswndproc.c create mode 100644 hw/xwin/winwindow.c create mode 100644 hw/xwin/winwindow.h create mode 100644 hw/xwin/winwindowswm.c create mode 100644 hw/xwin/winwndproc.c create mode 100644 include/Makefile.am create mode 100644 include/Makefile.in create mode 100644 include/XIstubs.h create mode 100644 include/Xprintf.h create mode 100644 include/busfault.h create mode 100644 include/callback.h create mode 100644 include/client.h create mode 100644 include/closestr.h create mode 100644 include/closure.h create mode 100644 include/colormap.h create mode 100644 include/colormapst.h create mode 100644 include/cursor.h create mode 100644 include/cursorstr.h create mode 100644 include/dix-config-apple-verbatim.h create mode 100644 include/dix-config.h.in create mode 100644 include/dix.h create mode 100644 include/dixaccess.h create mode 100644 include/dixevents.h create mode 100644 include/dixfont.h create mode 100644 include/dixfontstr.h create mode 100644 include/dixfontstubs.h create mode 100644 include/dixgrabs.h create mode 100644 include/dixstruct.h create mode 100644 include/do-not-use-config.h.in create mode 100644 include/eventconvert.h create mode 100644 include/events.h create mode 100644 include/eventstr.h create mode 100644 include/exevents.h create mode 100644 include/extension.h create mode 100644 include/extinit.h create mode 100644 include/extnsionst.h create mode 100644 include/gc.h create mode 100644 include/gcstruct.h create mode 100644 include/globals.h create mode 100644 include/glx_extinit.h create mode 100644 include/hotplug.h create mode 100644 include/input.h create mode 100644 include/inputstr.h create mode 100644 include/inpututils.h create mode 100644 include/kdrive-config.h.in create mode 100644 include/list.h create mode 100644 include/misc.h create mode 100644 include/miscstruct.h create mode 100644 include/opaque.h create mode 100644 include/optionstr.h create mode 100644 include/os.h create mode 100644 include/pixmap.h create mode 100644 include/pixmapstr.h create mode 100644 include/privates.h create mode 100644 include/property.h create mode 100644 include/propertyst.h create mode 100644 include/protocol-versions.h create mode 100644 include/ptrveloc.h create mode 100644 include/region.h create mode 100644 include/regionstr.h create mode 100644 include/registry.h create mode 100644 include/resource.h create mode 100644 include/rgb.h create mode 100644 include/screenint.h create mode 100644 include/scrnintstr.h create mode 100644 include/selection.h create mode 100644 include/servermd.h create mode 100644 include/site.h create mode 100644 include/swaprep.h create mode 100644 include/swapreq.h create mode 100644 include/validate.h create mode 100644 include/version-config.h.in create mode 100644 include/window.h create mode 100644 include/windowstr.h create mode 100644 include/xkb-config.h.in create mode 100644 include/xkbfile.h create mode 100644 include/xkbrules.h create mode 100644 include/xkbsrv.h create mode 100644 include/xkbstr.h create mode 100644 include/xorg-config.h.in create mode 100644 include/xorg-server.h.in create mode 100644 include/xserver-properties.h create mode 100644 include/xsha1.h create mode 100644 include/xwin-config.h.in create mode 100755 install-sh create mode 100644 ltmain.sh create mode 100644 m4/ac_define_dir.m4 create mode 100644 m4/libtool.m4 create mode 100644 m4/ltoptions.m4 create mode 100644 m4/ltsugar.m4 create mode 100644 m4/ltversion.m4 create mode 100644 m4/lt~obsolete.m4 create mode 100644 m4/xorg-tls.m4 create mode 100644 man/Makefile.am create mode 100644 man/Makefile.in create mode 100644 man/Xserver.man create mode 100644 manpages.am create mode 100644 mi/Makefile.am create mode 100644 mi/Makefile.in create mode 100644 mi/mi.h create mode 100644 mi/miarc.c create mode 100644 mi/mibitblt.c create mode 100644 mi/micmap.c create mode 100644 mi/micmap.h create mode 100644 mi/micoord.h create mode 100644 mi/micopy.c create mode 100644 mi/micursor.c create mode 100644 mi/midash.c create mode 100644 mi/midispcur.c create mode 100644 mi/mieq.c create mode 100644 mi/miexpose.c create mode 100644 mi/mifillarc.c create mode 100644 mi/mifillarc.h create mode 100644 mi/mifillrct.c create mode 100644 mi/mifpoly.h create mode 100644 mi/mifpolycon.c create mode 100644 mi/migc.c create mode 100644 mi/migc.h create mode 100644 mi/miglblt.c create mode 100644 mi/miinitext.c create mode 100644 mi/miline.h create mode 100644 mi/mioverlay.c create mode 100644 mi/mioverlay.h create mode 100644 mi/mipointer.c create mode 100644 mi/mipointer.h create mode 100644 mi/mipointrst.h create mode 100644 mi/mipoly.c create mode 100644 mi/mipoly.h create mode 100644 mi/mipolycon.c create mode 100644 mi/mipolygen.c create mode 100644 mi/mipolypnt.c create mode 100644 mi/mipolyrect.c create mode 100644 mi/mipolyseg.c create mode 100644 mi/mipolytext.c create mode 100644 mi/mipolyutil.c create mode 100644 mi/mipushpxl.c create mode 100644 mi/miscanfill.h create mode 100644 mi/miscrinit.c create mode 100644 mi/mispans.c create mode 100644 mi/mispans.h create mode 100644 mi/misprite.c create mode 100644 mi/misprite.h create mode 100644 mi/mistruct.h create mode 100644 mi/mivalidate.h create mode 100644 mi/mivaltree.c create mode 100644 mi/miwideline.c create mode 100644 mi/miwideline.h create mode 100644 mi/miwindow.c create mode 100644 mi/mizerarc.c create mode 100644 mi/mizerarc.h create mode 100644 mi/mizerclip.c create mode 100644 mi/mizerline.c create mode 100644 miext/Makefile.am create mode 100644 miext/Makefile.in create mode 100644 miext/damage/Makefile.am create mode 100644 miext/damage/Makefile.in create mode 100644 miext/damage/damage.c create mode 100644 miext/damage/damage.h create mode 100644 miext/damage/damagestr.h create mode 100644 miext/rootless/Makefile.am create mode 100644 miext/rootless/Makefile.in create mode 100644 miext/rootless/README.txt create mode 100644 miext/rootless/rootless.h create mode 100644 miext/rootless/rootlessCommon.c create mode 100644 miext/rootless/rootlessCommon.h create mode 100644 miext/rootless/rootlessConfig.h create mode 100644 miext/rootless/rootlessGC.c create mode 100644 miext/rootless/rootlessScreen.c create mode 100644 miext/rootless/rootlessValTree.c create mode 100644 miext/rootless/rootlessWindow.c create mode 100644 miext/rootless/rootlessWindow.h create mode 100644 miext/shadow/Makefile.am create mode 100644 miext/shadow/Makefile.in create mode 100644 miext/shadow/c2p_core.h create mode 100644 miext/shadow/shadow.c create mode 100644 miext/shadow/shadow.h create mode 100644 miext/shadow/shafb4.c create mode 100644 miext/shadow/shafb8.c create mode 100644 miext/shadow/shalloc.c create mode 100644 miext/shadow/shiplan2p4.c create mode 100644 miext/shadow/shiplan2p8.c create mode 100644 miext/shadow/shpacked.c create mode 100644 miext/shadow/shplanar.c create mode 100644 miext/shadow/shplanar8.c create mode 100644 miext/shadow/shrot16pack.c create mode 100644 miext/shadow/shrot16pack_180.c create mode 100644 miext/shadow/shrot16pack_270.c create mode 100644 miext/shadow/shrot16pack_270YX.c create mode 100644 miext/shadow/shrot16pack_90.c create mode 100644 miext/shadow/shrot16pack_90YX.c create mode 100644 miext/shadow/shrot32pack.c create mode 100644 miext/shadow/shrot32pack_180.c create mode 100644 miext/shadow/shrot32pack_270.c create mode 100644 miext/shadow/shrot32pack_90.c create mode 100644 miext/shadow/shrot8pack.c create mode 100644 miext/shadow/shrot8pack_180.c create mode 100644 miext/shadow/shrot8pack_270.c create mode 100644 miext/shadow/shrot8pack_90.c create mode 100644 miext/shadow/shrotate.c create mode 100644 miext/shadow/shrotpack.h create mode 100644 miext/shadow/shrotpackYX.h create mode 100644 miext/sync/Makefile.am create mode 100644 miext/sync/Makefile.in create mode 100644 miext/sync/misync.c create mode 100644 miext/sync/misync.h create mode 100644 miext/sync/misyncfd.c create mode 100644 miext/sync/misyncfd.h create mode 100644 miext/sync/misyncshm.c create mode 100644 miext/sync/misyncshm.h create mode 100644 miext/sync/misyncstr.h create mode 100755 missing create mode 100644 os/Makefile.am create mode 100644 os/Makefile.in create mode 100644 os/WaitFor.c create mode 100644 os/access.c create mode 100644 os/auth.c create mode 100644 os/backtrace.c create mode 100644 os/busfault.c create mode 100644 os/client.c create mode 100644 os/connection.c create mode 100644 os/io.c create mode 100644 os/log.c create mode 100644 os/mitauth.c create mode 100644 os/oscolor.c create mode 100644 os/osdep.h create mode 100644 os/osinit.c create mode 100644 os/rpcauth.c create mode 100644 os/strcasecmp.c create mode 100644 os/strcasestr.c create mode 100644 os/strlcat.c create mode 100644 os/strlcpy.c create mode 100644 os/strndup.c create mode 100644 os/utils.c create mode 100644 os/xdmauth.c create mode 100644 os/xdmcp.c create mode 100644 os/xprintf.c create mode 100644 os/xsha1.c create mode 100644 os/xstrans.c create mode 100644 present/Makefile.am create mode 100644 present/Makefile.in create mode 100644 present/present.c create mode 100644 present/present.h create mode 100644 present/present_event.c create mode 100644 present/present_fake.c create mode 100644 present/present_fence.c create mode 100644 present/present_notify.c create mode 100644 present/present_priv.h create mode 100644 present/present_request.c create mode 100644 present/present_screen.c create mode 100644 present/presentext.h create mode 100644 pseudoramiX/Makefile.am create mode 100644 pseudoramiX/Makefile.in create mode 100644 pseudoramiX/pseudoramiX.c create mode 100644 pseudoramiX/pseudoramiX.h create mode 100644 randr/Makefile.am create mode 100644 randr/Makefile.in create mode 100644 randr/randr.c create mode 100644 randr/randrstr.h create mode 100644 randr/rrcrtc.c create mode 100644 randr/rrdispatch.c create mode 100644 randr/rrinfo.c create mode 100644 randr/rrmode.c create mode 100644 randr/rroutput.c create mode 100644 randr/rrpointer.c create mode 100644 randr/rrproperty.c create mode 100644 randr/rrprovider.c create mode 100644 randr/rrproviderproperty.c create mode 100644 randr/rrscreen.c create mode 100644 randr/rrsdispatch.c create mode 100644 randr/rrtransform.c create mode 100644 randr/rrtransform.h create mode 100644 randr/rrxinerama.c create mode 100644 record/Makefile.am create mode 100644 record/Makefile.in create mode 100644 record/record.c create mode 100644 record/set.c create mode 100644 record/set.h create mode 100644 render/Makefile.am create mode 100644 render/Makefile.in create mode 100644 render/animcur.c create mode 100644 render/filter.c create mode 100644 render/glyph.c create mode 100644 render/glyphstr.h create mode 100644 render/matrix.c create mode 100644 render/miindex.c create mode 100644 render/mipict.c create mode 100644 render/mipict.h create mode 100644 render/mirect.c create mode 100644 render/mitrap.c create mode 100644 render/mitri.c create mode 100644 render/picture.c create mode 100644 render/picture.h create mode 100644 render/picturestr.h create mode 100644 render/render.c create mode 100644 test/Makefile.am create mode 100644 test/Makefile.in create mode 100644 test/README create mode 100644 test/ddxstubs.c create mode 100644 test/fixes.c create mode 100644 test/hashtabletest.c create mode 100644 test/input.c create mode 100644 test/list.c create mode 100644 test/misc.c create mode 100644 test/os.c create mode 100644 test/signal-logging.c create mode 100644 test/string.c create mode 100644 test/touch.c create mode 100644 test/xfree86.c create mode 100644 test/xi2/Makefile.am create mode 100644 test/xi2/Makefile.in create mode 100644 test/xi2/protocol-common.c create mode 100644 test/xi2/protocol-common.h create mode 100644 test/xi2/protocol-eventconvert.c create mode 100644 test/xi2/protocol-xigetclientpointer.c create mode 100644 test/xi2/protocol-xigetselectedevents.c create mode 100644 test/xi2/protocol-xipassivegrabdevice.c create mode 100644 test/xi2/protocol-xiquerydevice.c create mode 100644 test/xi2/protocol-xiquerypointer.c create mode 100644 test/xi2/protocol-xiqueryversion.c create mode 100644 test/xi2/protocol-xiselectevents.c create mode 100644 test/xi2/protocol-xisetclientpointer.c create mode 100644 test/xi2/protocol-xiwarppointer.c create mode 100644 test/xi2/xi2.c create mode 100644 test/xkb.c create mode 100644 test/xtest.c create mode 100644 xfixes/Makefile.am create mode 100644 xfixes/Makefile.in create mode 100644 xfixes/cursor.c create mode 100644 xfixes/region.c create mode 100644 xfixes/saveset.c create mode 100644 xfixes/select.c create mode 100644 xfixes/xfixes.c create mode 100644 xfixes/xfixes.h create mode 100644 xfixes/xfixesint.h create mode 100644 xkb/Makefile.am create mode 100644 xkb/Makefile.in create mode 100644 xkb/README.compiled create mode 100644 xkb/XKBAlloc.c create mode 100644 xkb/XKBGAlloc.c create mode 100644 xkb/XKBMAlloc.c create mode 100644 xkb/XKBMisc.c create mode 100644 xkb/ddxBeep.c create mode 100644 xkb/ddxCtrls.c create mode 100644 xkb/ddxKillSrv.c create mode 100644 xkb/ddxLEDs.c create mode 100644 xkb/ddxLoad.c create mode 100644 xkb/ddxPrivate.c create mode 100644 xkb/ddxVT.c create mode 100644 xkb/maprules.c create mode 100644 xkb/xkb.c create mode 100644 xkb/xkb.h create mode 100644 xkb/xkbAccessX.c create mode 100644 xkb/xkbActions.c create mode 100644 xkb/xkbDflts.h create mode 100644 xkb/xkbEvents.c create mode 100644 xkb/xkbInit.c create mode 100644 xkb/xkbLEDs.c create mode 100644 xkb/xkbPrKeyEv.c create mode 100644 xkb/xkbSwap.c create mode 100644 xkb/xkbUtils.c create mode 100644 xkb/xkbfmisc.c create mode 100644 xkb/xkbgeom.h create mode 100644 xkb/xkbout.c create mode 100644 xkb/xkbtext.c create mode 100644 xkb/xkmread.c create mode 100644 xorg-server.m4 create mode 100644 xorg-server.pc.in create mode 100644 xserver.ent.in create mode 100755 ylwrap diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..cc52a32 --- /dev/null +++ b/COPYING @@ -0,0 +1,1823 @@ +The following is the 'standard copyright' agreed upon by most contributors, +and is currently the canonical license preferred by the X.Org Foundation. +This is a slight variant of the common MIT license form published by the +Open Source Initiative at http://www.opensource.org/licenses/mit-license.php + +Copyright holders of new code should use this license statement where +possible, and insert their name to this list. Please sort by surname +for people, and by the full name for other entities (e.g. Juliusz +Chroboczek sorts before Intel Corporation sorts before Daniel Stone). + +Copyright © 2000-2001 Juliusz Chroboczek +Copyright © 1998 Egbert Eich +Copyright © 2006-2007 Intel Corporation +Copyright © 2006 Nokia Corporation +Copyright © 2006-2008 Peter Hutterer +Copyright © 2006 Adam Jackson +Copyright © 2009-2010 NVIDIA Corporation +Copyright © 1987, 2003-2006, 2008-2010 Oracle and/or its affiliates. +Copyright © 1999 Keith Packard +Copyright © 2007-2009 Red Hat, Inc. +Copyright © 2005-2008 Daniel Stone +Copyright © 2006-2009 Simon Thum +Copyright © 2003-2008, 2013 Geert Uytterhoeven +Copyright © 2006 Luc Verhaegen + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + + + +The following licenses are 'legacy': usually MIT/X11 licenses with the name +of the copyright holder(s) in the license statement, but also some BSD-like +licenses. + + +Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. +Copyright (C) Colin Harrison 2005-2008 + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. + + +Copyright 1997 by The XFree86 Project, Inc. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of the XFree86 Project, Inc. +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. The Xfree86 +Project, Inc. makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THE XFREE86 PROJECT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1985-1998, 2001 The Open Group +Copyright 2002 Red Hat Inc., Durham, North Carolina. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright (c) 1987, 1989-1990, 1992-1995 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright © 1999-2000 SuSE, Inc. +Copyright © 2007 Red Hat, Inc. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of SuSE not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. SuSE makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE +BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1987-1991, 1993 by Digital Equipment Corporation, Maynard, Massachusetts. +Copyright 1991 Massachusetts Institute of Technology, Cambridge, Massachusetts. +Copyright 1991, 1993 Olivetti Research Limited, Cambridge, England. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, +Copyright 1994 Quarterdeck Office Systems. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital and +Quarterdeck not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +DIGITAL AND QUARTERDECK DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT +OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1997 Digital Equipment Corporation. +All rights reserved. + +This software is furnished under license and may be used and copied only in +accordance with the following terms and conditions. Subject to these +conditions, you may download, copy, install, use, modify and distribute +this software in source and/or binary form. No title or ownership is +transferred hereby. + +1) Any source code used, modified or distributed must reproduce and retain + this copyright notice and list of conditions as they appear in the + source file. + +2) No right is granted to use any trade name, trademark, or logo of Digital + Equipment Corporation. Neither the "Digital Equipment Corporation" + name nor any trademark or logo of Digital Equipment Corporation may be + used to endorse or promote products derived from this software without + the prior written permission of Digital Equipment Corporation. + +3) This software is provided "AS-IS" and any express or implied warranties, + including but not limited to, any implied warranties of merchantability, + fitness for a particular purpose, or non-infringement are disclaimed. + In no event shall DIGITAL be liable for any damages whatsoever, and in + particular, DIGITAL shall not be liable for special, indirect, + consequential, or incidental damages or damages for lost profits, loss + of revenue or loss of use, whether such damages arise in contract, + negligence, tort, under statute, in equity, at law or otherwise, even + if advised of the possibility of such damage. + + +Copyright (c) 1991, 1996-1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + + +SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) +Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice including the dates of first publication and +either this permission notice or a reference to +http://oss.sgi.com/projects/FreeB/ +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 1994, 1995 Hewlett-Packard Company + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the Hewlett-Packard +Company shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization from the Hewlett-Packard Company. + + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +Copyright 2001-2004 Red Hat Inc., Durham, North Carolina. +Copyright (c) 2003 by the XFree86 Project, Inc. +Copyright 2004-2005 Red Hat Inc., Raleigh, North Carolina. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation on the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright © 2008 Red Hat, Inc. +Partly based on code Copyright © 2000 SuSE, Inc. + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without +fee, provided that the above copyright notice appear in all copies +and that both that copyright notice and this permission notice +appear in supporting documentation, and that the name of Red Hat +not be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. Red +Hat makes no representations about the suitability of this software +for any purpose. It is provided "as is" without express or implied +warranty. + +Red Hat DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL Red Hat BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of SuSE not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. SuSE makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE +BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright © 2006 Red Hat, Inc. +(C) Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sub license, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +RED HAT, INC, OR PRECISION INSIGHT AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Copyright (c) 1995 X Consortium +Copyright 2004 Red Hat Inc., Durham, North Carolina. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation on the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT, THE X CONSORTIUM, +AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in this Software without prior written +authorization from the X Consortium. + + +Copyright 1998-2000 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002, 2008, 2009 Apple Computer, Inc. +Copyright (c) 2003-2004 Torrey T. Lyons. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +(C) Copyright IBM Corporation 2003 +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + + +(C) Copyright IBM Corporation 2004-2005 +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sub license, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +IBM, +AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 1997 Metro Link Incorporated + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Except as contained in this notice, the name of the Metro Link shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from Metro Link. + + +Copyright 1995-1998 by Metro Link, Inc. +Copyright (c) 1997 Matthieu Herrb + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Metro Link, Inc. not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Metro Link, Inc. makes no +representations about the suitability of this software for any purpose. + It is provided "as is" without express or implied warranty. + +METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1998 by Metro Link Incorporated + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Metro Link +Incorporated not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. Metro Link Incorporated makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Except as contained in this notice, the name of Conectiva Linux shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from +Conectiva Linux. + + +Copyright (c) 2001, Andy Ritger aritger@nvidia.com +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +o Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +o Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. +o Neither the name of NVIDIA nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +Copyright 1992 Vrije Universiteit, The Netherlands + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of the Vrije Universiteit not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. The Vrije Universiteit makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +The Vrije Universiteit DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL The Vrije Universiteit BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1998 by Concurrent Computer Corporation + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Concurrent Computer +Corporation not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. Concurrent Computer Corporation makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +Copyright © 2004 Nokia + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Nokia not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Nokia makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +(c)Copyright 1988,1991 Adobe Systems Incorporated. +All rights reserved. + +Permission to use, copy, modify, distribute, and sublicense this software and its +documentation for any purpose and without fee is hereby granted, provided that +the above copyright notices appear in all copies and that both those copyright +notices and this permission notice appear in supporting documentation and that +the name of Adobe Systems Incorporated not be used in advertising or publicity +pertaining to distribution of the software without specific, written prior +permission. No trademark license to use the Adobe trademarks is hereby +granted. If the Adobe trademark "Display PostScript"(tm) is used to describe +this software, its functionality or for any other purpose, such use shall be +limited to a statement that this software works in conjunction with the Display +PostScript system. Proper trademark attribution to reflect Adobe's ownership +of the trademark shall be given whenever any such reference to the Display +PostScript system is made. + +ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY +PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ADOBE +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- +INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE TO YOU +OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE, STRICT +LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT PROVIDE ANY TRAINING OR OTHER +SUPPORT FOR THE SOFTWARE. + +Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems +Incorporated which may be registered in certain jurisdictions. + + +Copyright 1989 Network Computing Devices, Inc., Mountain View, California. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of N.C.D. not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. N.C.D. makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + + +Copyright (c) 1987 by the Regents of the University of California + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies. The University of California +makes no representations about the suitability of this +software for any purpose. It is provided "as is" without +express or implied warranty. + + +Copyright 1992, 1993 Data General Corporation; +Copyright 1992, 1993 OMRON Corporation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that the +above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and that +neither the name OMRON or DATA GENERAL be used in advertising or publicity +pertaining to distribution of the software without specific, written prior +permission of the party whose name is to be used. Neither OMRON or +DATA GENERAL make any representation about the suitability of this software +for any purpose. It is provided "as is" without express or implied warranty. + +OMRON AND DATA GENERAL EACH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, +IN NO EVENT SHALL OMRON OR DATA GENERAL BE LIABLE FOR ANY SPECIAL, INDIRECT +OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. + + +Copyright © 1998-2004, 2006 Keith Packard +Copyright © 2000-2002 Keith Packard, member of The XFree86 Project, Inc. +Copyright (c) 2002 Apple Computer, Inc. +Copyright (c) 2003 Torrey T. Lyons. +All Rights Reserved. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Keith Packard not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright © 1999 Keith Packard +Copyright © 2000 Compaq Computer Corporation +Copyright © 2002 MontaVista Software Inc. +Copyright © 2005 OpenedHand Ltd. +Copyright © 2006 Nokia Corporation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of the authors and/or copyright holders +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. The authors and/or +copyright holders make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THE AUTHORS AND/OR COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE AUTHORS AND/OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1993 by Davor Matic + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. Davor Matic makes no representations about +the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + + +Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. +Copyright (C) Colin Harrison 2005-2008 + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Harold L Hunt II +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +from Harold L Hunt II. + + +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Thomas Roell not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Thomas Roell makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany +Copyright 1993 by David Wexelblat + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Thomas Roell and David Wexelblat +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Thomas Roell and +David Wexelblat makes no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THOMAS ROELL AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID WEXELBLAT BE LIABLE FOR +ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1990,91,92,93 by Thomas Roell, Germany. +Copyright 1991,92,93 by SGCS (Snitily Graphics Consulting Services), USA. + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of Thomas Roell nor +SGCS be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. +Thomas Roell nor SGCS makes no representations about the suitability +of this software for any purpose. It is provided "as is" without +express or implied warranty. + +THOMAS ROELL AND SGCS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THOMAS ROELL OR SGCS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1998 by Alan Hourihane, Wigan, England. +Copyright 2000-2002 by Alan Hourihane, Flint Mountain, North Wales. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Alan Hourihane not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Alan Hourihane makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1995 Kaleb S. KEITHLEY + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES +OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Kaleb S. KEITHLEY +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +from Kaleb S. KEITHLEY + + +Copyright (c) 1997 Matthieu Herrb + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Matthieu Herrb not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Matthieu Herrb makes no +representations about the suitability of this software for any purpose. + It is provided "as is" without express or implied warranty. + +MATTHIEU HERRB DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL MATTHIEU HERRB BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 2004, Egbert Eich + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +EGBERT EICH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- +NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Egbert Eich shall not +be used in advertising or otherwise to promote the sale, use or other deal- +ings in this Software without prior written authorization from Egbert Eich. + + +Copyright 1993 by David Wexelblat +Copyright 2005 by Kean Johnston +Copyright 1993 by David McCullough + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of David Wexelblat not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. David Wexelblat makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1992 by Orest Zborowski +Copyright 1993 by David Wexelblat + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Orest Zborowski and David Wexelblat +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Orest Zborowski +and David Wexelblat make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1992 by Orest Zborowski +Copyright 1993 by David Dawes + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Orest Zborowski and David Dawes +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Orest Zborowski +and David Dawes make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +OREST ZBOROWSKI AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID DAWES BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1995-1999 by Frederic Lepied, France. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Frederic Lepied not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Frederic Lepied makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1992 by Rich Murphey +Copyright 1993 by David Wexelblat + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Rich Murphey and David Wexelblat +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Rich Murphey and +David Wexelblat make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR +ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1992 by Rich Murphey +Copyright 1993 by David Dawes + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Rich Murphey and David Dawes +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. Rich Murphey and +David Dawes make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +RICH MURPHEY AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID DAWES BE LIABLE FOR +ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright © 2003-2004 Anders Carlsson + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Anders Carlsson not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Anders Carlsson makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright (C) 2003 Anders Carlsson +Copyright © 2003-2004 Eric Anholt +Copyright © 2004 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Eric Anholt not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Eric Anholt makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright (c) 1998 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright © 2003-2004 Philip Blundell + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Philip Blundell not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Philip Blundell makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + + +Copyright (c) 1994-2003 by The XFree86 Project, Inc. +Copyright 1997 by Metro Link, Inc. +Copyright 2003 by David H. Dawes. +Copyright 2003 by X-Oz Technologies. +Copyright (c) 2004, X.Org Foundation + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the copyright holder(s) +and author(s) shall not be used in advertising or otherwise to promote +the sale, use or other dealings in this Software without prior written +authorization from the copyright holder(s) and author(s). + + +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany +Copyright 1993 by David Wexelblat +Copyright 1999 by David Holland +Copyright © 2000 Compaq Computer Corporation +Copyright © 2002 Hewlett-Packard Company +Copyright © 2004, 2005 Red Hat, Inc. +Copyright © 2004 Nicholas Miell +Copyright © 2005 Trolltech AS +Copyright © 2006 Intel Corporation +Copyright © 2006-2007 Keith Packard +Copyright © 2008 Red Hat, Inc +Copyright © 2008 George Sapountzis + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of the copyright holders not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no representations +about the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + 2005 Lars Knoll & Zack Rusin, Trolltech + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Keith Packard not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +Copyright 1987, 1998 The Open Group +Copyright © 1998-1999, 2001 The XFree86 Project, Inc. +Copyright © 2000 VA Linux Systems, Inc. +Copyright (c) 2000, 2001 Nokia Home Communications +Copyright © 2007, 2008 Red Hat, Inc. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL +INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING +FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + + +Copyright 1996 by Thomas E. Dickey + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright (c) 2001 Andreas Monitzer. +Copyright (c) 2001-2004 Greg Parker. +Copyright (c) 2001-2004 Torrey T. Lyons +Copyright (c) 2002-2003 Apple Computer, Inc. +Copyright (c) 2004-2005 Alexander Gottwald +Copyright (c) 2002-2009 Apple Inc. +Copyright (c) 2007 Jeremy Huddleston +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name(s) of the above copyright +holders shall not be used in advertising or otherwise to promote the sale, +use or other dealings in this Software without prior written authorization. + + +Copyright (C) 1999,2000 by Eric Sunshine +Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall not be used in +advertising or otherwise to promote the sale, use or other dealings in this +Software without prior written authorization from the author. + + +Copyright © 2002 David Dawes + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Except as contained in this notice, the name of the author(s) shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from +the author(s). + + +Copyright (C) 1996-1999 SciTech Software, Inc. +Copyright (C) David Mosberger-Tang +Copyright (C) 1999 Egbert Eich +Copyright (C) 2008 Bart Trojanowski, Symbio Technologies, LLC + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the authors not be used +in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. The authors makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright 2005-2006 Luc Verhaegen. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +Copyright 1995 by Robin Cutshaw +Copyright 2000 by Egbert Eich +Copyright 2002 by David Dawes + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of the above listed copyright holder(s) +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. The above listed +copyright holder(s) make(s) no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 1997-2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of Marc Aurele La France not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. Marc Aurele La France makes no representations +about the suitability of this software for any purpose. It is provided +"as-is" without express or implied warranty. + +MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. + + +Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany +Copyright 1992 by David Dawes +Copyright 1992 by Jim Tsillas +Copyright 1992 by Rich Murphey +Copyright 1992 by Robert Baron +Copyright 1992 by Orest Zborowski +Copyright 1993 by Vrije Universiteit, The Netherlands +Copyright 1993 by David Wexelblat +Copyright 1994, 1996 by Holger Veit +Copyright 1997 by Takis Psarogiannakopoulos +Copyright 1994-2003 by The XFree86 Project, Inc + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of the above listed copyright holders +not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. The above listed +copyright holders make no representations about the suitability of this +software for any purpose. It is provided "as is" without express or +implied warranty. + +THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 2001-2005 by J. Kean Johnston + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name J. Kean Johnston not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. J. Kean Johnston makes no +representations about the suitability of this software for any purpose. +It is provided "as is" without express or implied warranty. + +J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL J. KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Copyright 1997,1998 by UCHIYAMA Yasushi + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of UCHIYAMA Yasushi not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. UCHIYAMA Yasushi makes no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL UCHIYAMA YASUSHI BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright (C) 2000 Keith Packard + 2004 Eric Anholt + 2005 Zack Rusin + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of copyright holders not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Copyright holders make no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +(C) Copyright IBM Corporation 2002-2007 +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Copyright © 2007 OpenedHand Ltd + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of OpenedHand Ltd not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. OpenedHand Ltd makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +OpenedHand Ltd DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL OpenedHand Ltd BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +Copyright (c) 1987, 1990, 1993 + The Regents of the University of California. All rights reserved. + +This code is derived from software contributed to Berkeley by +Chris Torek. + +This code is derived from software contributed to Berkeley by +Michael Rendell of Memorial University of Newfoundland. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..83ced73 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,133999 @@ +commit 9182af8a09c326bb4b01d3645fb2936e93f02242 +Author: Matt Dew +Date: Sun Apr 13 20:55:40 2014 -0600 + + Bump version to 1.15.1 + +commit eec04d76a39a7334de4e00ef9f0f6e44c92b3d91 +Author: Eric Anholt +Date: Thu Mar 6 18:50:07 2014 -0800 + + glx: Clear new FBConfig attributes to 0 by default. + + The visualSelectGroup wasn't getting set (since our DRI drivers don't + use it), and and since it's the top priority in the sort order, you + got random sorting of your visuals unless malloc really returned you + new memory. This manifested as Xephyr -glamor rendering to a + multisampled window on my system, which as you might guess was + slightly lower performance than expected. + + Signed-off-by: Eric Anholt + Reviewed-by: Michel Dänzer + +commit d6268c25a8d33241d817977a84f127f8ef0cb9ee +Author: Julien Cristau +Date: Wed Mar 26 23:24:20 2014 +0100 + + Xephyr: restore initial window resize lost in xcb conversion + + The XResizeWindow call wasn't replaced by the xcb equivalent, so we + were no longer setting the initial window size, only wm size hints. + + Regression from commit a2b73da "Xephyr: start converting hostx.c over to + xcb" + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74849 + + Signed-off-by: Julien Cristau + Reported-by: Laércio de Sousa + Tested-by: Jon TURNEY + Reviewed-by: Jon TURNEY + Signed-off-by: Keith Packard + +commit 300458fb8ad0a7957e941cd65f47d204c7886e22 +Author: Matt Dew +Date: Fri Mar 21 23:49:41 2014 -0600 + + Bump bersion to 1.15.0.901 + +commit c971864565eb114e4b34f17b0d2244e8e6e1e005 +Author: Peter Hutterer +Date: Wed Feb 26 07:54:56 2014 +1000 + + config: search for PnPID on all parents (#75513) + + The PnPID for a device may not be on the immediate parent, so search up the + device tree until we find one. + + X.Org Bug 75513 + + Signed-off-by: Peter Hutterer + Tested-by: Benjamin Tissoires + (cherry picked from commit 795066477ee81b5b82e490eac8bed6b656d01f17) + +commit 2cbbe80efc485d2d05b06efe1e2e01f81f3e06f6 +Author: Peter Hutterer +Date: Thu Feb 20 13:18:05 2014 +1000 + + Xi: check for invalid modifiers for XI2 passive grabs + + The other values are checked correctly, but if a modifier was outside the + allowed range, it would go unnoticed and cause a out-of-bounds read error for + any mask equal or larger than 256. The DetailRec where we store the grab masks + is only sized to 8 * sizeof(Mask). + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + (cherry picked from commit 0f10cfd4b903d4db293ec47c8a9a0d8b33965803) + +commit b3656c0b52d57333c64f932676a237d0f3a97f36 +Author: Mark Kettenis +Date: Sun Dec 15 14:31:10 2013 +0100 + + sync: Avoid ridiculously long timeouts + + On OpenBSD, passing a timeout longer than 100000000 seconds to select(2) will + make it fail with EINVAL. As this is original 4.4BSD behaviour it is not + inconceivable that other systems suffer from the same problem. And Linux, + though not suffering from any 4.4BSD heritage, briefly did something similar: + + + + So avoid calling AdjustWaitForDelay() instead of setting the timeout to + (effectively) ULONG_MAX milliseconds. + + Signed-off-by: Mark Kettenis + Reviewed-by: Matthieu Herrb + (cherry picked from commit ddeca927498c9df3b5e62c7bf05e31e2a3aeaa52) + +commit b332cd20ee14049606e3656490d13a8efa6b23ee +Merge: f41ab8c 5e0432f +Author: Matt Dew +Date: Thu Mar 6 22:03:03 2014 -0700 + + Merge branch 'server-1.15-branch' of git://people.freedesktop.org/~jeremyhu/xserver into server-1.15-branch + +commit f41ab8c60780ea8f87354e536e5b73cb23878eb7 +Author: Peter Hutterer +Date: Fri Jan 24 18:32:54 2014 +1000 + + dix: prevent a driver from initializing or submitting buttons > MAX_BUTTONS + + The server internally relies on arrays with a MAX_BUTTONS maximum size (which + is the max the core protocol can transport). Make sure a driver adheres to + that. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + (cherry picked from commit 87ca80a7196949597113225405f3e4ee03bbee13) + +commit 4447d71b9a74afe91aaf4cc01eae12a44ef09306 +Author: Alan Coopersmith +Date: Tue Jan 28 20:27:51 2014 -0800 + + xf86DeleteScreen: move check for NULL pScrn before first dereference + + Flagged by cppcheck 1.62: + [hw/xfree86/common/xf86Helper.c:220] -> [hw/xfree86/common/xf86Helper.c:231]: + (warning) Possible null pointer dereference: pScrn - otherwise it is + redundant to check it against null. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + (cherry picked from commit c1ac89c793614797e08d3d8e7fc9ba55be899130) + +commit 2ac840a14958fe74170518ee2c3a6b2dd88b20bd +Author: Alan Coopersmith +Date: Tue Jan 28 20:27:50 2014 -0800 + + On realloc failure, free font_path_string instead of leaking it + + Flagged by cppcheck 1.62: + [dix/dixfonts.c:1792]: (error) Common realloc mistake: + 'font_path_string' nulled but not freed upon failure + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + (cherry picked from commit e6733ae91b7be52930f22a87de15fa05819ef948) + +commit 157cc02fc13c998bba70e1652907972015e15e8e +Author: Alan Coopersmith +Date: Fri Jan 24 23:42:49 2014 -0800 + + Check for calloc() failure in add_master() + + Reported-by: Ilja Van Sprundel + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + (cherry picked from commit 9fc19168e7ca6308275bf8769d1ccb982f88465b) + +commit f11c5938d732af717aeebbbf3b356138f3411bb7 +Author: Peter Hutterer +Date: Fri Jan 24 16:51:02 2014 +1000 + + Xi: fix modifier offset in XIPassiveGrab swapping function + + The request is followed by mask_len 4-byte units, then followed by the actual + modifiers. + + Also fix up the swapping test, which had the same issue. + + Reported-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + (cherry picked from commit 76b3be75b62657e346731444736f7e4d200beb5b) + + Conflicts: + test/xi2/protocol-xipassivegrabdevice.c + +commit 345b7ead1dd262020e10b4aeb71044d46d16e134 +Author: Peter Hutterer +Date: Mon Jan 13 17:00:23 2014 +1000 + + os: restrict display names to digits + + We call atoi() on the server's display to get the socket but otherwise use the + unmodified display for log file name, xkb paths, etc. This results in + Xorg :banana being the equivalent of Xorg :0, except for the log files being + in /var/log/Xorg.banana.log. I'm not sure there's a good use-case for this + behaviour. + + Check the display for something that looks reasonable, i.e. digits only, but + do allow for :0.0 (i.e. digits, followed by a period, followed by one or two + digits). + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + (cherry picked from commit 71baa466b1f6b02fe503f9a3089b7b9d61aa0f80) + +commit 940d6a8e9d3544696654d5e68c615ab887f81945 +Author: Carlos Garnacho +Date: Thu Jan 2 21:33:30 2014 +0100 + + Xi: Ensure DeviceChanged is emitted after grabs are deactivated + + When a grab on a slave device is deactivated, the master device must + be checked, just in case there were events from other devices while + the slave device was stolen away by the passive grab. This may + introduce misbehaviors on mismatching valuators and device features + later on UpdateDeviceState(). + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + (cherry picked from commit b2d5ee2e3684951b611fd2068d57cc65fd8305a3) + +commit 47da6e3f47a55aeeef2c849067dd2d09fc2fe481 +Author: Peter Hutterer +Date: Fri Jan 24 18:16:54 2014 +1000 + + dix: fix button state check before changing a button mapping + + dev->button->down is a bitmask, not a normal array. Use the helper function to + check, we technically allow the mapping to change after the physical button + has been pressed (but not yet processed yet), so only check BUTTON_PROCESSED. + + From XSetPointerMapping(3): + "If any of the buttons to be altered are logically in the down state, + XSetPointerMapping returns MappingBusy, and the mapping is not changed." + + Reported-by: Ilja Van Sprundel + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + (cherry picked from commit 25d10464f440b8b34594b7c988a99a830ea39a29) + +commit 5e0432f797d58fe1a69ef538694f65bbba38737f +Author: Jeremy Huddleston Sequoia +Date: Wed Jan 1 11:10:41 2014 -0800 + + XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 77df653ae3d8448be21221711851acde12c6bc1a) + +commit 859ced56d9ee168796c2fcf7fa6056e0c1491f3a +Author: Jeremy Huddleston Sequoia +Date: Wed Jan 1 11:04:07 2014 -0800 + + XQuartz: Check for allocated memory before using it in AppleWMSetWindowMenu + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 3bc608a361a01043b226fb9aaebf88f6fd852925) + +commit 9444955d16f85926c75ee8eafb0ca796dcf16439 +Author: Jeremy Huddleston Sequoia +Date: Wed Jan 1 11:00:40 2014 -0800 + + XQuartz: Silence a clang static analysis warning about a memory leak + + It seems the alanyzer can't comprehend dixSetPrivate(). + + quartz.c:119:12: warning: Potential leak of memory pointed to by 'displayInfo' + return quartzProcs->AddScreen(index, pScreen); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 64327226ddfba8f0653615cd678d2d4336fb993d) + +commit 64b0669d1c062e7e11fb0e3b8ea7fe56113fc86f +Author: Jeremy Huddleston Sequoia +Date: Wed Jan 1 10:55:10 2014 -0800 + + XQuartz: Silence a clang static analysis warning about a possible memory leak on exit + + stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv' + asl_log(aslc, NULL, ASL_LEVEL_ERR, + ^~~~~~~ + stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp' + asl_log(aslc, NULL, ASL_LEVEL_ERR, + ^~~~~~~ + 2 warnings generated. + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit b2f6b3497c33a4897afae80a2cf69c596b9f81e8) + +commit 472e8e5d1c26573cef4bd42451230ef47791ed6f +Author: Jeremy Huddleston Sequoia +Date: Wed Jan 1 10:47:52 2014 -0800 + + XQuartz: Validate length in appledri before swapping + + Avoids potential memory corruption from bad requests + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit a03f096a85537d9e881cedaa6cb71aca43a97086) + +commit 782fe5c174def75a9e4cb188c00c2fec72821472 +Author: Jeremy Huddleston Sequoia +Date: Wed Jan 1 10:39:56 2014 -0800 + + XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requests + + Return an error to the caller rather than crashing the server on + invalid screens. + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit b3572c0d1ab7888ac26d6b2b8be6d1d19ed9af3f) + +commit 045122566c0532378b50c1af3ffec3254e416fe2 +Author: Jeremy Huddleston Sequoia +Date: Sun Dec 29 12:45:23 2013 -0800 + + XQuartz: Simplify hook_run to quiet static analyzer + + x-hook.c:96:9: warning: Called function pointer is an uninitalized pointer value + (*fun[i])(arg, data[i]); + ^~~~~~~~~~~~~~~~~~~~~~~ + 1 warning generated. + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 959e8f23af7850fcaf40d6c67f5228241a36a9ab) + +commit 33b2ae0f3b4a80fd962d876f7437d98fcfc27791 +Author: Jeremy Huddleston Sequoia +Date: Sun Dec 29 12:41:18 2013 -0800 + + XQuartz: Mark applicationWillTerminate: noreturn + + X11Controller.m:938:1: warning: method 'applicationWillTerminate:' could be declared with attribute 'noreturn' + [-Wmissing-noreturn,Semantic Issue] + { + ^ + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit f79af1941776fd6f1ec26c50603fcc35ca7d514b) + +commit 404f26866147be1c26585e59d9795e87e0c3e5fa +Author: Jeremy Huddleston Sequoia +Date: Sun Dec 29 12:36:51 2013 -0800 + + XQuartz: Fix get_proc_address signature + + indirect.c:675:28: warning: incompatible pointer types passing 'glx_gpa_proc (*)(const char *)' to parameter of type + 'glx_gpa_proc' (aka 'glx_func_ptr (*)(const char *)') [-Wincompatible-pointer-types,Semantic Issue] + __glXsetGetProcAddress(&get_proc_address); + ^~~~~~~~~~~~~~~~~ + ../../../glx/glxserver.h:122:42: note: passing argument to parameter 'get_proc_address' here [Semantic Issue] + void __glXsetGetProcAddress(glx_gpa_proc get_proc_address); + ^ + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit ea80279e292e59a9fe9651489f03e9f2f39810d9) + +commit 7803c4075b824ece79af0425cee736025c41d901 +Author: Jeremy Huddleston Sequoia +Date: Sun Dec 29 12:31:23 2013 -0800 + + XQuartz: Fix darwinfb.h header guard + + ./darwinfb.h:28:9: warning: '_DARWIN_FB_H' is used as a header guard here, followed by #define of a different macro + [-Wheader-guard,Lexical or Preprocessor Issue] + ^~~~~~~~~~~~ + ./darwinfb.h:29:9: note: '_DARWIN_DB_H' is defined here; did you mean '_DARWIN_FB_H'? [Lexical or Preprocessor Issue] + ^~~~~~~~~~~~ + _DARWIN_FB_H + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 2e3ebec9520719a8e5c3c92390e83bcb5216f978) + +commit 6c055f0d78349ff08a570c5dcc92c6f7b6924993 +Author: Jeremy Huddleston Sequoia +Date: Sun Dec 29 12:22:55 2013 -0800 + + XQuartz: Silence some static analyzer warnings by annotating referencing counts + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 9da6c0918f40359f28fe8889d5b7cae7efcc8377) + +commit 2ea973e12f5d954211e1d10085a4c74581b43aca +Author: Keith Packard +Date: Fri Dec 27 09:50:55 2013 -0800 + + Bump version to 1.15.0 + + Signed-off-by: Keith Packard + +commit 2eb9915eea358f941702d3dad7434197991885c5 +Author: Keith Packard +Date: Thu Dec 12 15:48:08 2013 -0800 + + present: Set complete notify mode to Skip as needed + + Skipped present pixmap calls were not setting the mode to + PresentCompleteModeSkip for skipped operations. + + Signed-off-by: Keith Packard + +commit e487babd525ef1bd016ec7b283fa08cf9e6c6f4f +Author: Keith Packard +Date: Thu Dec 12 14:52:35 2013 -0800 + + present: Don't abandon presents which are already queued for flip + + Presents which are not marked 'queued' and are in the window present + list are waiting for the flip event; discarding those won't work very + well (it'll end up trashing displayed content for the next frame), so + skip over those when looking for duplicate frame presents + + Signed-off-by: Keith Packard + +commit ca3a5b2a8f9f627bbaa9883e16512a21c2a0b81d +Author: Keith Packard +Date: Thu Dec 12 14:17:40 2013 -0800 + + present: Handle PresentOptionAsync for copy mode + + Check for Async flag and execute immediately if set, otherwise wait + for the next appropriate vblank before copying. + + Signed-off-by: Keith Packard + +commit a68df147421da21528b5be2d34678383922fa352 +Author: Keith Packard +Date: Thu Dec 19 14:31:07 2013 -0800 + + Bump version to 1.14.99.905 (1.15 RC5) + + Another week, another RC. This should be the last before 1.15 final + + Signed-off-by: Keith Packard + +commit 4b1ead9d3400acc3402c2480d7cc0527750c32f0 +Merge: 4d62646 929795d +Author: Keith Packard +Date: Thu Dec 19 14:14:59 2013 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit 4d62646142718024b0981eb4f1fd0131e829161f +Merge: f4bfb14 81ba89d +Author: Keith Packard +Date: Mon Dec 16 09:27:57 2013 -0800 + + Merge remote-tracking branch 'jeremyhu/master' + +commit f4bfb14f53a939574da1f5995f0dad949898b86a +Author: Adam Jackson +Date: Thu Dec 12 10:57:40 2013 -0500 + + configure: Fix a typo near dri3/shmfence detection + + " is not the mate of ]. + + Reviewed-by: Jasper St. Pierre + Signed-off-by: Adam Jackson + +commit 8248b4af31ef71ac03158871b77f20eb456dbe38 +Author: Adam Jackson +Date: Fri Dec 13 15:07:48 2013 -0500 + + glx: Add null pointer protection to __glGetProcAddress + + This can't happen when GLX is the backing window system, but can + elsewhere. We may as well protect against it at a high level. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 128449dd6498a2f74c3770f89a9dae0f70e2b351 +Author: Adam Jackson +Date: Fri Dec 13 11:39:16 2013 -0500 + + present: Don't use the major/minor version from the protocol headers + + We want to advertise the version we implement, not the version the + protocol headers happen to describe. + + Reviewed-by: Jasper St. Pierre < + Signed-off-by: Adam Jackson + +commit ec6087bf070131bc3a26848fb9fb840f09b0e19d +Author: Adam Jackson +Date: Fri Dec 13 11:36:38 2013 -0500 + + dri3: Don't use the major/minor version from the protocol headers + + We want to advertise the version we implement, not the version the + protocol headers happen to describe. + + Reviewed-by: Jasper St. Pierre < + Signed-off-by: Adam Jackson + +commit e6fafd3de70d315130fb6e5732cfd02a5901b788 +Author: Adam Jackson +Date: Fri Dec 13 11:28:59 2013 -0500 + + dri3: Guard against buggy clients + + There's nothing to stop a client from sending these requests to screens + without DRI3 support, and if they do, we'll crash. Let's not do that. + + Reviewed-by: Jasper St. Pierre < + Signed-off-by: Adam Jackson + +commit 81ba89d6703a22178a153aa39478ba2d4bde262b +Author: Jeremy Huddleston Sequoia +Date: Fri Dec 13 01:39:44 2013 -0800 + + configure.ac: Add PRESENT_LIB to XQUARTZ_LIBS + + Undefined symbols for architecture x86_64: + "_present_extension_init", referenced from: + _staticExtensions in libXquartz.a(miinitext.o) + "_present_register_complete_notify", referenced from: + ___glXregisterPresentCompleteNotify in libglx.a(glxcmds.o) + + Signed-off-by: Jeremy Huddleston Sequoia + +commit d7c9235ee261b0f780320985233e00dec5e2689c +Author: Jeremy Huddleston Sequoia +Date: Sat Dec 7 01:36:33 2013 -0800 + + XQuartz: Use asl_log_descriptor to log stdout/stderr of child processes + + Signed-off-by: Jeremy Huddleston Sequoia + +commit ad8111d7c971ce448905c733d65ba0cfc72bdca4 +Author: Jeremy Huddleston Sequoia +Date: Sat Dec 7 01:14:37 2013 -0800 + + darwin: Don't leave stdin/stdout closed + + + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 929795d50d788358d6269ce423f72c6cc40e334b +Author: Peter Hutterer +Date: Tue Dec 3 10:14:51 2013 +1000 + + dix: fix check for grab type + + Signed-off-by: Peter Hutterer + +commit 23394c7fea0f5c33333198c87ecfecc9f6c6a791 +Author: Peter Hutterer +Date: Tue Dec 3 08:36:45 2013 +1000 + + Xi: ungrab device when releasing a passive grab without ButtonReleaseMask (#71878) + + If an touch triggers an async button grab and that grab does not have the + ButtonReleaseMask set, the TouchEnd is never delivered, deliveries is 0 and + the grab is never deactivated. + + If the grab is pointer async and keyboard sync, the keyboard events are stuck + in EnqueueEvent until some other pointer event terminates the grab. + + Change this to check for the number of listeners. If we're about to deliver a + TouchEnd to a passive pointer grab, the number of listeners is already 1 - + pointer grabs always accept so other listeners were removed. + + X.Org Bug 71878 + + Signed-off-by: Peter Hutterer + +commit c1d30b5bd7f90e68bc38404fd0cc32578d6d3018 +Author: Ben Gamari +Date: Thu Nov 21 21:24:20 2013 -0500 + + Xi: Don't ActivateEarlyAccept POINTER_REGULAR listeners + + Bug #71878 describes a bug resulting in the server ceasing to respond to + keyboard input after a touch event. The problem might be the following: + + DeliverTouchBeginEvent tries to deliver an event to a listener of type + LISTENER_POINTER_REGULAR, taking the following if branch, + + if (listener->type == LISTENER_POINTER_REGULAR || + listener->type == LISTENER_POINTER_GRAB) { + rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, + grab, xi2mask); + if (rc == Success) { + listener->state = LISTENER_IS_OWNER; + /* async grabs cannot replay, so automatically accept this touch */ + if (dev->deviceGrab.grab && + dev->deviceGrab.fromPassiveGrab && + dev->deviceGrab.grab->pointerMode == GrabModeAsync) + ActivateEarlyAccept(dev, ti); + } + goto out; + } + + DeliverTouchEmulatedEvent succeeds. The deviceGrab meets all + three of the conditions of the inner if, enters + ActivateEarlyAccept which then fails due to, + + BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB && + ti->listeners[0].type != LISTENER_POINTER_GRAB); + + That is, despite listener->type == LISTENER_POINTER_REGULAR. With my + non-existent knowledge of XINPUT, it seems like the solution here + might be to only ActivateEarlyAccept when listener->type == + LISTENER_POINTER_GRAB. + + Signed-off-by: Ben Gamari + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit fe07ec19e212a68076560d243a2a935c54589068 +Author: Keith Packard +Date: Tue Dec 10 11:27:47 2013 -0800 + + present: recursively set window pixmaps on flip + + Newly created windows inherit the pixmap of their parent, similarly, + reparenting a tree inherits the pixmap of the destination tree. + + Making present preserve the invariant that unredirected windows always + have the same pixmap as their parent ensures that the above cases work + correctly. + + v2: name the recursive function to 'set_tree_pixmap' instead of 'set_window_pixmap' + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit b3533d0b212b6747a8f9a01931253d6bdb648ee2 +Author: Keith Packard +Date: Tue Dec 10 10:29:11 2013 -0800 + + Bump version to 1.14.99.904 (1.15 RC4) + + Signed-off-by: Keith Packard + +commit 9a4d7572fe3be16bb5aded5f48d4217fdf725b1d +Author: Jon TURNEY +Date: Thu Sep 27 18:59:45 2012 +0100 + + hw/xwin/glx: Rewrite WGL wrappers after Xserver conversion to direct GL dispatch + + v1: Rewrite by Marc Haesen of the WGL wrapper function generation script to use + Khronos group XML. + + v2: Remove -dispatchheader option, since dispatch.h doesn't exist anymore, use + the private glapi interface to construct the GL dispatch table for the native + WGL thunks. + + v3: + Rewrite to generate shims for the OpenGL 1.2.1 (GL 1.2 + GL_ARB_imaging + +GL_ARB_multitexture + GL_ARB_texture_compression(?)) functions the server links + directly with rather than libGL. + + These shims dispatch to either the mesa GL DLL, or a thunking DLL containing + cdecl-to-stcall wrapper functions for the native GL DLL. + + Signed-off-by: Jon TURNEY + Reviewed-by: Adam Jackson + +commit cb48877a3c4cfb1ae2248000fcd3443e3092bdaa +Author: Jon TURNEY +Date: Fri Dec 6 14:00:21 2013 +0000 + + glx: Consistently use ARB-suffixed names for ARB_multitexture functions + + At the moment we have a mix of ARB and non-ARB suffixed forms for ARB_multitexture functions + e.g. glMultiTexCoord1fvARB and glMultiTexCoord1dv + + Consistently use the ARB-suffixed form, assuming that is present in all libGL + which provide the OpenGL 1.2.1 ABI we expect to be able to directly link with. + + Signed-off-by: Jon TURNEY + Reviewed-by: Adam Jackson + +commit 1a021f57a1e75ab63e8f87704f0394162402c4d4 +Author: Jon TURNEY +Date: Sun Dec 1 22:25:46 2013 +0000 + + ephyr: Fix compilation when ./configure'd with --enable-debug + + /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessMouseMotion’: + /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:946:188: error: ‘ephyrCurScreen’ undeclared (first use in this function) + /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonPress’: + /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:980:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) + /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonRelease’: + /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:1007:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) + + Fix ephyr compilation when ./configure'd with --enable-debug after commit + 46cf6bf5692ef751ec9d17ae2292565d4b13f14b, some instances of ephyrCurScreen were + not converted to screen->pScreen->myNum. + + v2: Don't use a trivial local variable which will be unused when ./configure'd + with --disable-debug + + Signed-off-by: Jon TURNEY + Reviewed-by: Adam Jackson + +commit 875dbcef5bfcb6a94ef8456be6151e133408793f +Author: Jon TURNEY +Date: Fri Nov 29 14:29:20 2013 +0000 + + configure.ac: Link XWin with present extension if we are building with it enabled + + Signed-off-by: Jon TURNEY + Reviewed-by: Adam Jackson + +commit e61e19959d9138d5b81b1f25b7aa3e257918170d +Author: Adam Jackson +Date: Tue Dec 3 13:45:43 2013 -0500 + + xquartz/glx: Convert to non-glapi dispatch + + CGL doesn't have anything like glXGetProcAddress, and the old code just + called down to dlsym in any case. It's a little mind-warping since + dlopening a framework actually loads multiple dylibs, but that's just + how OSX rolls. + + Signed-off-by: Adam Jackson + Reviewed-by: Jeremy Huddleston Sequoia + +commit a668aa0e41bc33ff2db7f9c53b6dc321a96926a9 +Author: Adam Jackson +Date: Tue Dec 3 15:03:13 2013 -0500 + + drisw: Wire up GetProcAddress + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + +commit 4fcdfeb7bc55d00d50d7f89788d9b929946ae3d9 +Author: Adam Jackson +Date: Tue Dec 3 15:02:57 2013 -0500 + + dri2: wire up GetProcAddress + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + +commit 47f00b3920be9d8df8b148263d744934f3a02cd4 +Author: Adam Jackson +Date: Tue Dec 3 15:01:44 2013 -0500 + + glx: Untangle the prototypes around the GetProcAddress thunk + + Signed-off-by: Adam Jackson + Reviewed-by: Jeremy Huddleston Sequoia + Reviewed-by: Jon TURNEY + +commit c1fd143f2847ef425ec9891d9e1cba44a1bb007d +Author: Adam Jackson +Date: Tue Dec 3 13:11:52 2013 -0500 + + glx: Remove function stubs + + Now that we're calling non-1.2 ABI things by function pointer this is no + longer needed. + + Signed-off-by: Adam Jackson + Reviewed-by: Jeremy Huddleston Sequoia + Reviewed-by: Jon TURNEY + +commit 6b93e1f5ff39c6ac5b0d97d4245aeac9113eed8b +Author: Adam Jackson +Date: Tue Dec 3 13:11:09 2013 -0500 + + glx: Convert non-generated function pointer thunking + + Same concept as the generated code conversion. + + Signed-off-by: Adam Jackson + Reviewed-by: Jon TURNEY + +commit c4567a376083eb7b142a7f003ddf8372d376ea86 +Author: Adam Jackson +Date: Tue Dec 3 12:40:24 2013 -0500 + + glx: Convert generated code function pointer thunking + + We're meant not to call these by name due to ABI. Rather than try to + generate a bunch of little stub functions that do the lookup, just + inline it all directly into the calling function. + + This does not cache results. That's fine, this is not a performance + path, and if we're atop WGL then we effectively have to do this every + time anyway because wglGetProcAddress results are context-dependent. + + Signed-off-by: Adam Jackson + Jon TURNEY + +commit f69f4f417c6807405e45289b39a80f1b9a55f9e6 +Author: Keith Packard +Date: Tue Dec 10 07:09:17 2013 -0800 + + Depend on latest glproto (1.4.17) + + Signed-off-by: Keith Packard + +commit 576f3d36dd324bd0d16c9968f1ded5c5eead3569 +Author: Adam Jackson +Date: Mon Dec 9 13:16:01 2013 -0500 + + damageext: Die if we can't create the Xinerama resource type + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit f10f36d91db1b21c2ce5a531b4fa5f96fcbdc2f0 +Author: Adam Jackson +Date: Mon Sep 16 15:17:26 2013 -0400 + + damageext: Xineramify (v7) + + v7: Don't bother making resources for the backing listeners. [keithp] + + This is now slightly unlike how other resources are xineramified. We + create N+1 internal damage listeners, one that's a real resource and + reflects the protocol view, and then one per backend screen where the + report function piles onto the protocol view. The internal listeners + are not stored in the resource database directly, they just hang off the + xinerama resource. We don't wrap Subtract at the dispatch level, but we + do extend it for the Xinerama case to clip to the root window geometry. + + As a result of the N+1 design here, the damage reports we generate are + not quite minimal. However they are indistinguishable from sequential + rendering events happening before the client hears damage, and we don't + need to add a post-dispatch callback just for this one extension. + + Add is probably (still) somewhat broken since it will only hit screen 0, + but Add really only exists for DRI1's sake, and DRI1 disables itself + with Xinerama enabled anyway. In the absence of a use case, I'm leaving + it unwrapped under Xinerama; if someone wants to define how it ought to + work, be my guest. + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit 808303fe5232ba0320ae5a4310b1ed1322e85f1d +Author: Adam Jackson +Date: Mon Nov 4 17:49:34 2013 -0500 + + fixes: Fix PanoramiXSetWindowShapeRegion for root windows (v2) + + Root windows in Xinerama are in the coordinate space of their root window + pixmap, not in protocol space. + + v2: Only translate for root windows, sice the window shape is + drawable-relative. + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit 5c10c7ea2129b70015e745523918d143cc29318d +Author: Adam Jackson +Date: Mon Nov 4 17:49:33 2013 -0500 + + fixes: Fix PanoramiXSetPictureClipRegion for root windows (v2) + + Root windows in Xinerama are in the coordinate space of their root + window pixmap, not in protocol space. This fixes 'xcompmgr -n' when + Xinerama is active. + + v2: Only translate for root windows, since the clip origin is + drawable-relative. + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit 1dd839a425adc6e5a1dc377003ed86a374d81f0b +Author: Adam Jackson +Date: Thu Nov 7 13:59:30 2013 -0500 + + composite: Fix COW creation for Xinerama (v2) + + Say you have two 800x600 screens left/right of each other. A window + that's 200x200 at +700+0 in protocol coordinate space will appear to be + at -100+0 in the coordinate space of the right hand screen. Put another + way: windows are in the coordinate space of their root window pixmap. + + We weren't doing this translation for the COW, so when rendering came in + to it you'd see the top-left chunk of the COW on all screens. Cool + effect and all, but wrong. + + v2: Only translate when Xinerama is active [keithp] + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit 8dbe456abae1a32fb6c5c74fa456bc7301cccabe +Author: Adam Jackson +Date: Tue Oct 29 10:44:07 2013 -0400 + + xinerama: Export the screen region + + damageext wants this so it can intersect subtract requests against the + root window geometry. + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit c6d4c2a24140feee4ceae48c4c74fedcae9b68b3 +Author: Adam Jackson +Date: Fri Nov 15 15:13:31 2013 -0500 + + xfree86: Prefer fbdev to vesa + + On UEFI machines you'd prefer fbdev to grab efifb instead of vesa trying + to initialize and failing in a way we can't unwind from. On BIOS + machines this is harmless: either there is an fbdev driver and it'll + probably be more capable, or there's not and vesa will kick in anyway. + + Reviewed-by: Alex Deucher + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 7b5d4f147fdef9edfeaa9c6565375111079efd11 +Author: Adam Jackson +Date: Tue Nov 5 10:12:28 2013 -0500 + + composite: Don't double-redirect if someone asks for backing store twice + + v2: Belt-and-suspenders the unredirection path [vsyrjala] + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit a2b2c271e0ca87d3188ba2741b6db9bbbdc599f5 +Author: Adam Jackson +Date: Tue Nov 5 10:08:17 2013 -0500 + + composite: Automatically enable backing store support on the screen + + ... unless you explicitly disabled it with -bs on the command line, or + with the corresponding thing in xorg.conf. + + v2: Drop a bogus hunk from compChangeWindowAttributes [vsyrjala] + v3: s/TRUE/WhenMapped/ [jcristau] + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit e0cac005608a2e5618c7be59701318d684e0bb93 +Author: Adam Jackson +Date: Tue Nov 5 09:58:17 2013 -0500 + + bs: Set the screen's bs support level to WhenMapped + + Since we're using RedirectAutomatic to do this, we don't actually + preserve contents when unmapped. + + v2: Don't say WhenMapped if Composite didn't initialize [vsyrjala] + + Reviewed-by: Julien Cristau + Signed-off-by: Adam Jackson + +commit b61ccd5d9d368f3fbbae27ce14ac02a3db1884c4 +Author: Adam Jackson +Date: Tue Nov 5 10:20:04 2013 -0500 + + smartsched: Tweak the default scheduler intervals + + A default timeslice of 20ms means a pathological client can ruin up to + two frames per scheduler tick. And a fifth of a second is just insane. + + Pick two different numbers out of the hat. A 5ms slice means you can + probably keep up with two or three abusive clients, and letting it burst + to 15ms should give you about all the timeslice you need for a + fullscreen game (that's doing server-side rendering for some reason). + + If you're running on a system with a 10ms granularity on SIGALRM, then + this effectively changes the intervals to 10ms and 30ms. Which is still + better, just not as better. + + I suspect this is about as good as we can do without actually going + preemptive, which is an entire other nightmare. + + Reviewed-by: Julien Cristau + Signed-off-by: Adam Jackson + +commit 66310ea2893811614b3c3aade8992624a95a6ee7 +Author: Adam Jackson +Date: Fri Nov 8 09:22:37 2013 -0500 + + dri3: Disable when Xinerama is active + + Pretty sure this can't work. + + Reviewed-by: Julien Cristau + Signed-off-by: Adam Jackson + +commit 793fd5eefb0e417614d77fe1522c6548587fbd4e +Author: Adam Jackson +Date: Fri Nov 8 09:20:29 2013 -0500 + + dri2: Disable when Xinerama is active + + Would only work on ScreenRec 0, which means it's broken. + + Reviewed-by: Julien Cristau + Signed-off-by: Adam Jackson + +commit 2bf92108294805c5c6fef249c2f7de6ecf4975d8 +Author: Adam Jackson +Date: Fri Nov 8 09:06:59 2013 -0500 + + present: Disable when Xinerama is active + + Among much else Present depends on RANDR types, and RANDR isn't properly + Xinerama-aware yet anyway. + + Reviewed-by: Julien Cristau + Signed-off-by: Adam Jackson + +commit ac772cb187ddf7e04b8f4b3a071b90f18f4488d0 +Author: Eric Anholt +Date: Thu Nov 14 17:40:47 2013 -0800 + + glx: Fix incorrect use of dri_interface.h version defines in driver probing. + + If we extend __DRI_CORE or __DRI_SWRAST in dri_interface.h to allow a + new version, it shouldn't make old server code retroactively require + the new version from swrast drivers. + + Notably, new Mesa defines __DRI_SWRAST version 4, but we still want to + be able to probe version 1 drivers, since we don't use any features + beyond version 1 of the struct. + + Signed-off-by: Keith Packard + Reviewed-by: Ian Romanick + +commit 6e926b18ca1b182253bac435a1d53caaff7ffff6 +Author: Eric Anholt +Date: Thu Nov 14 17:40:46 2013 -0800 + + glx: Fix incorrect use of dri_interface.h version defines in extensions. + + Those defines are so you can compile-time check "do I have a + dri_interface.h that defines this new field of the struct?" You don't + want the server to claim it implements the new struct just because you + installed a new copy of Mesa. + + Signed-off-by: Keith Packard + Reviewed-by: Ian Romanick + +commit 57a8ce927332e855dd29ff30210a211a907adb25 +Author: Jon TURNEY +Date: Fri Nov 29 12:26:43 2013 +0000 + + configure.ac: Fixup for "Require libpciaccess for int10" + + On 16/11/2013 01:00, Connor Behan wrote: + > A --disable-pciaccess build will fail with an int10 module other than + > stub. + > + > Signed-off-by: Connor Behan + > --- + > configure.ac | 3 +++ + > 1 file changed, 3 insertions(+) + > + > diff --git a/configure.ac b/configure.ac + > index 5e621e0..a843770 100644 + > --- a/configure.ac + > +++ b/configure.ac + > @@ -1822,6 +1822,9 @@ if test "x$XORG" = xyes; then + > if test "x$CONFIG_UDEV_KMS" = xyes; then + > AC_MSG_ERROR([Platform device enumeration requires libpciaccess]) + > fi + > + if test "x$INT10" != xstub; then + > + AC_MSG_ERROR([Cannot build int10 without libpciaccess]) + > + fi + > fi + > AC_MSG_RESULT([$PCI]) + > + + This causes my build to fail where --disable-int10-module --disable-pciaccess + is the default (as INT10 still has the default value 'x86emu') + + Signed-off-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston Sequoia + Tested-by: Jeremy Huddleston Sequoia + Signed-off-by: Keith Packard + +commit 653d33941b0808ef910aaa5f3aeab05d9c1a100b +Author: Keith Packard +Date: Tue Nov 26 12:18:12 2013 -0800 + + present: Report damage when flipping + + Limit damage to the 'update' region. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 5cf12c9569ac3d83fe1b7a8376c15f8f0b01655e +Author: Keith Packard +Date: Tue Nov 26 12:10:48 2013 -0800 + + present: Also set the root window pixmap when flipping + + This makes sure that things like software cursors continue to work + while the screen is flipped. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 4aa77378de69efdc10bced6ba650b0ebff50c112 +Author: Keith Packard +Date: Tue Nov 26 12:06:57 2013 -0800 + + present: Clear target_crtc if driver lacks Present support + + If the driver doesn't have the necessary hooks for Present, then the + target_crtc needs to be set to NULL to make sure the extension uses + the present_fake code. + + Signed-off-by: Keith Packard + Tested-by: Fredrik Höglund + Reviewed-by: Adam Jackson + +commit 3dd5bfe540b295bb37a2c2fd0ba4a31fb217612b +Author: Keith Packard +Date: Thu Nov 21 22:48:31 2013 -0800 + + present: Send GLX_BufferSwapComplete events from present extension + + This allows GL to support the GLX_INTEL_swap_event extension. + + v2: Return GLX_BLIT_COMPLETE_INTEL for unknown swap types + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit cde86e68fcb716f34c90f5a16eb868870f5c85e4 +Author: Keith Packard +Date: Mon Nov 25 23:06:08 2013 -0800 + + present: Set window pixmap to flipped pixmap + + This makes other drawing to the window appear on the screen. + + Note that no child windows can be affected because only full-screen + windows are eligible for flipping, and so we only need to set pixmap + for the window itself. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 04e138846e128670d409798aa2e797c3c5503a47 +Author: Keith Packard +Date: Mon Nov 25 23:10:17 2013 -0800 + + present: Leave vblank on window list until flip complete + + If the window is destroyed, then we've got cleanup work to do, even if + the vblank has already been executed -- we need to clear the window + pointer so that we don't try to deliver events to it. + + Leaving it on the window list meant that when walking that list, we + need to know whether the vblank is waiting to be executed or waiting + for the flip to complete, so a new 'queued' flag was added to the + vblank to distinguish between the two states. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit b121d62accb8c346b4e1b1bce99586e13712f04a +Author: Keith Packard +Date: Tue Nov 26 03:07:55 2013 -0800 + + present: Add a debug output line when skipping a pending present + + When an application provides two pixmaps for the same MSC, the + previous one is skipped. This just dumps out some information at that point + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit eafba23b34be31c141ddafb8380520ac9a0622ac +Author: Keith Packard +Date: Thu Nov 21 22:45:18 2013 -0800 + + miext/sync: Handle libxshmfence API change + + libxshmfence had an unfortunate 'int32_t' type for the mapped fence. + That changed to exposing a 'struct shmfence' instead, which is nice + and opaque and offers fine type checking across the API. + + This patch requires the newer version of the library and uses + the new interface type. + + Signed-off-by: Keith Packard + Reviewed-by: Julien Cristau + +commit b6d7ed4d787a652e8150532f384bfdf51760f3c2 +Author: Keith Packard +Date: Thu Nov 21 22:12:34 2013 -0800 + + miext: Move SyncShm FDs out of the way of clients + + Applications may end up allocating a bunch of shmfence objects, each + of which uses a file descriptor, which must be kept open lest some + other client ask for a copy of it later on. + + Lacking an API that can turn a memory mapping back into a file + descriptor, about the best we can do is push the file descriptors out + of the way of other X clients so that we don't run out of the ability + to accept new connections. + + This uses fcntl F_GETFD to push the FD up above MAXCLIENTS. + + Signed-off-by: Keith Packard + Reviewed-by: Julien Cristau + +commit cc63204926c6da83d9221c5f8c0dc8f5e2f2481d +Author: Keith Packard +Date: Wed Nov 13 14:16:33 2013 +0900 + + Xext: Use SHMDIR and O_TMPFILE when creating mapping files + + ShmCreateSegment asks for a file descriptor for a memory mapped file + created by the X server. This patch uses O_TMPFILE where available, + and also uses the SHMDIR directory to store the files, both for the + O_TMPFILE and mkstemp cases. + + Signed-off-by: Keith Packard + Reviewed-by: Julien Cristau + +commit 5a969f0928b84da5cfe0777dfb542caaacc915ad +Author: Keith Packard +Date: Wed Nov 13 12:17:10 2013 +0900 + + Select directory for MIT-SHM temp files at configure time + + By default, this looks through a list of directories to find one which + exists, but can be overridden with --with-shared-memory-dir=PATH + + This patch doesn't actually do anything with this directory, just + makes it available in the configuration + + Signed-off-by: Keith Packard + Reviewed-by: Julien Cristau + +commit d695cb7fb6bb8fd159a332d902673edbbd2237d7 +Author: Alan Coopersmith +Date: Mon Nov 25 22:19:34 2013 -0800 + + Xdmx: Initialize DMX extension even if not built with GLX support + + dmxAddExtensions takes an argument to determine if it should just + initialize the DMX extension, or both DMX & GLX, but if GLX wasn't + compiled in, the entire call was #ifdef'ed out, leaving the DMX + extension unavailable. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit bd70def07754357d26b86c287037eb3884631daf +Author: Connor Behan +Date: Fri Nov 15 17:00:40 2013 -0800 + + configure.ac: Require libpciaccess for int10 + + A --disable-pciaccess build will fail with an int10 module other than + stub. + + Signed-off-by: Connor Behan + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit a575c1dc64c10bc88bd0e963ebb8ab137f59a078 +Author: Connor Behan +Date: Fri Nov 15 17:00:20 2013 -0800 + + configure.ac: Require libpciaccess for platform bus support + + There is currently no reason to build with --enable-config-udev-kms and + --disable-pciaccess but anyone who tries this should know that the build + will fail. + + Signed-off-by: Connor Behan + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 361dfe74eaa2f1eddb54abdecca1d8b1b3f58704 +Author: Connor Behan +Date: Fri Nov 15 17:00:00 2013 -0800 + + configure.ac: Add whitespace near PCI configuration + + Signed-off-by: Connor Behan + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 80481267662c8687e73081237913fa561e7a6561 +Author: Keith Packard +Date: Sat Nov 23 22:22:37 2013 -0800 + + Bump release to 1.14.99.903 (1.15 RC3) + + Signed-off-by: Keith Packard + +commit f1604002a32b7f098c2a16b4a8649c694af570c8 +Author: Keith Packard +Date: Mon Nov 18 22:36:17 2013 -0800 + + miext: Ensure xshmfence is only called when driver supports it + + This provides a place for drivers to insert their own FD-based + SyncFence implementations, and prevents applications from using DRI3 + SyncFence creation functions unless the driver has some support for + them. + + Signed-off-by: Keith Packard + Tested-by: Fredrik Höglund + +commit 037566c57caff93fd7717f385d4b532b81f19c77 +Author: Keith Packard +Date: Mon Nov 18 22:33:27 2013 -0800 + + Xext: Recover from miSyncInitFenceFromFD failure without crashing + + miSyncDestroyFence must not be called unless miSyncInitFence has been + invoked, so if miSyncInitFenceFromFD fails, we must free the fence + manually. + + Signed-off-by: Keith Packard + Tested-by: Fredrik Höglund + +commit e7000534a456fdf9cd4eaada3193846c8525f740 +Author: Chris Wilson +Date: Sat Oct 5 08:47:03 2013 +0100 + + glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen + + In a similar spirit to + + commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b + Author: Keith Packard + Date: Mon Jul 12 16:01:34 2010 -0700 + + Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 + + we need to unwrap our pScrn->EnterVT/LeaveVT hooks around server + regeneration or else we cause an infinite recursion on the next VT + switch afterwards. + + Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1235516 + Signed-off-by: Chris Wilson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 6d5883bd7e5b765f8f0548501b825d9e56840799 +Author: Keith Packard +Date: Sat Nov 23 16:19:46 2013 -0800 + + xnest: Ignore GetImage() error in xnestGetImage() (v3) + + (I found an amended version of this patch and applied the difference + here - keithp) + + v3: Don't call Xsync before restoring error handler as any errors + generated by XGetImage() should be processed when this call + returns as suggested by Jamey Sharp + + Signed-off-by: Egbert Eich + Reviewed-by: Jamey Sharp + +commit 6403cbb143c67872ca9c58e3116ae7942def0ae1 +Author: Keith Packard +Date: Tue Nov 19 22:13:54 2013 -0800 + + present: When unflipping, copy to flip window rather than screen + + unflip happens after the clip lists have been updated, so instead of + smashing the whole screen and drawing over other windows, just draw to + the original flip window; it'll have the right clip list and so the + copy will work just fine. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 8bdd2ccc776ded3f527596b5009ef25129aa3287 +Author: Keith Packard +Date: Mon Nov 11 18:03:42 2013 -0800 + + present: Block for wait_fence in present_execute + + Pend presentation until wait_fence is also triggered by having the + SyncFence trigger invoke present_execute once triggered. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit e5a188cb919edee2e3a03054276bce0db02f7b62 +Author: Keith Packard +Date: Sat Nov 9 12:36:47 2013 -0800 + + present: Signal destroyed flip window with vblank->window == NULL + + This eliminates dereferencing freed window pointers when there is a + flip for that window in progress. The flip will complete, and then + immediately get undone (as we can't stop an in-progress flip). + + Remove the vblank->window_destroyed field as we can signal this with + vblank->window == NULL instead. + + Change check to vblank->window == NULL in: + + present_flip_notify + + Add check for vblank->window == NULL in: + present_vblank_notify + present_execute + + present_flip_notify was also using vblank->window->drawable.pScreen, + so stop doing that and use vblank->screen instead. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit a5bcc4f7b9499caf8993f0a6ef96088553399ca3 +Author: Keith Packard +Date: Sat Nov 9 12:33:02 2013 -0800 + + present: Ignore event_id 0 from driver vblank notify + + We use event_id 0 to mean 'no such event'; if a driver sends us that + event_id, make sure we don't accidentally match it. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 4f3c37a1f17ffcfbbff71d217e1caad3d0148c90 +Author: Keith Packard +Date: Thu Nov 7 14:17:12 2013 -0800 + + present: Round fake MSC computations intead of truncating + + If the timer fired too early, we'd sometimes mis-compute the MSC for + fake vblanks. Rounding the computation to the nearest MSC fixes this nicely. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit da9997f89f14ab619f244d5b2e80a423b028c789 +Author: Peter Hutterer +Date: Tue Nov 19 08:07:09 2013 +1000 + + configure: allow for --enable-libunwind and --disable-libunwind + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 29240e5cbf6e7f875b128fc7bfc4d56b2350835a +Merge: 0492deb 8ff7e32 +Author: Keith Packard +Date: Thu Nov 14 17:02:04 2013 +0900 + + Merge remote-tracking branch 'whot/for-keith' + +commit 0492deb8f8238b7782e5a706ec6219d88aa1091d +Author: Adam Jackson +Date: Tue Oct 29 12:09:27 2013 -0400 + + mieq: Bump default queue size to 512 + + Based on some bugzilla scraping I did around November 2012. Of xserver + bugs in Red Hat bugzilla with an EQ size message in the log, the + distribution looked like: + + String | Matches + ------------------------------------- + Increasing EQ size to 512 | 460 + Increasing EQ size to 1024 | 52 + Increasing EQ size to 2048 | 6 + Increasing EQ size to 4096 | 0 + + Most of the "512" ones appear to be mostly harmless, some relatively + expensive path in either rendering or resource destruction simply taking + too long due to external pressures like paging or CPU contention. So + let's raise the initial queue size, both to reduce the number of + spurious abrt reports and to drop fewer events in all but the most + pathological cases. + + Signed-off-by: Adam Jackson + Reviewed-by: Jasper St. Pierre + Signed-off-by: Keith Packard + +commit d1440783a7367ff0d0c47d256bbca3b3cf8a5034 +Author: Dave Airlie +Date: Tue Oct 29 12:09:26 2013 -0400 + + xfree86: return NULL for compat output if no outputs. + + With outputless GPUs showing up we crash here if there are not outputs + try and recover with a bit of grace. + + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit d7ee27e5e415778240919082c83a65226c6f17e6 +Author: Dan Horák +Date: Tue Oct 29 12:09:25 2013 -0400 + + test: build the touch test only when building Xorg + + Reviewed-by: Adam Jackson + Signed-off-by: Dan Horák + Signed-off-by: Keith Packard + +commit 8ff7e32c3ef7b0c13c4ab9664f651e9782d35a85 +Author: Peter Hutterer +Date: Wed Nov 13 17:14:11 2013 +1000 + + include: export key_is_down and friends + + VNC needs key_is_down to check if a key is processed as down before it + simulates various key releases. Make it available, because I seriously can't + be bothered thinking about how to rewrite VNC to not need that. + + Signed-off-by: Peter Hutterer + Acked-by: Keith Packard + +commit 0ba7fc8472f1227fd1cd51bd58048f164b8ea1ab +Author: Alan Coopersmith +Date: Tue Nov 12 14:46:04 2013 -0800 + + Stop including inline assembly .il file for Solaris Studio builds + + Since all the inb/outb/etc. use in the X server itself (except for + xf86SlowBcopy) has been replaced by calls to libpciaccess, we no + longer need to pass inline assembly files to replace the gcc inline + assembly from hw/xfree86/common/compiler.h when building Xorg itself. + + The .il files are still generated and installed in the SDK for the + benefit of drivers who may use them. + + Binary diff of before and after showed that xf86SlowBcopy was the + only function changed across the Xorg binary and all modules built + in the Xserver build, it just calls the outb() function now instead + of having the outb instructions inlined, making it a slightly slower + bcopy. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 550baf38f6096658f0bcf0ad647c4fedf93132f2 +Author: Peter Hutterer +Date: Fri Oct 4 10:55:52 2013 +1000 + + kdrive: fix cursor jumps on CursorOffScreen behavior + + This patch fixes cursor jumps when there is a grab on the Xephyr window and + the pointer moves outside the window. + + So on two side-by-side 640x480 screens, a coordinate of 0/481 + triggers KdCursorOffscreen. + + If the delta between two screens is 0, they share the same offset for + that dimension. When searching for the new screen, the loop always rules out + the current screen. So we get to the second screen, trigger the conditions + where dy <= 0 and decide that this new screen is the correct one. The result + is that whenever KdCursorOffScreen is called, the pointer jumps to the other + screen. + + Change to check for dy < 0 etc. so that the cursor stays on the same screen if + there is no other screen at the target location. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit a94d945065177d73f3ee8dc0b9147264ba281136 +Author: Peter Hutterer +Date: Tue Oct 29 14:24:41 2013 +1000 + + kdrive: modify ephyr events to use POINTER_DESKTOP and scale them to that + + A multi-head Xephyr instance has the pointer stuck on one screen + because of bad coordinate calculation. The coordinates passed to + GetPointerEvents are per-screen, so the cursor gets stuck on the left-most + screen by default. + + Adjust and mark the events as POINTER_DESKTOP, so the DIX + can adjust them accordingly. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit d66832a3b8a8675f1e5f3656dcb1bbe95598f0ea +Author: Keith Packard +Date: Thu Nov 14 13:21:54 2013 +1000 + + kdrive: handle WxH as valid geometry spec + + If a screen size was specified as WxH, the loop returned early and kdOrigin + was never advanced. Thus, screen->origin was always 0 (or whatever was given + at the -origin commandline flag). + + If a screen size was given with a bit depth (WxHxD), kdOrigin would always + advance by the current screen, offsetting the next screen. + + Signed-off-by: Keith Packard + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit c8c5105c1d5c093675d7f571f158147f22f7572b +Author: Peter Hutterer +Date: Tue Oct 29 14:33:56 2013 +1000 + + ephyr: xcb_connect returns an error, not NULL + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 2aa67ccef6ad8f51deb94b66defc668ddb7d226c +Author: Keith Packard +Date: Thu Nov 14 10:26:20 2013 +0900 + + Update to version 1.14.99.902 + + 1.15 RC2 + + Signed-off-by: Keith Packard + +commit 9309d2a009a6a3b6090fc377fc7a3eded1a34dc0 +Author: Keith Packard +Date: Wed Nov 13 07:01:45 2013 +0900 + + xext: Fix shmint.h to not use headers outside of sdk_HEADERS + + shmint.h is part of sdk_HEADERS, and so can't use anything not + included in sdk_HEADERS. + + busfault.h includes dix-config.h which is not. Leave the use of + struct busfault in shmint.h and move the include of busfault.h to + shm.c. + + protocol-versions.h is not part of sdk_HEADERS, so instead of using + that, just use XTRANS_SEND_FDS to choose whether to expose the fd + passing requests directly. + + Reported-by: Julien Cristau + Signed-off-by: Keith Packard + Tested-by: Knut Petersen + Reviewed-by: Julien Cristau + + v2: also avoid using protocol-versions.h + +commit 4a251f5883b042cd902c192060a0be2b11148f2b +Author: Jeremy Huddleston Sequoia +Date: Fri Nov 8 14:55:33 2013 -0800 + + xfree86: Fix build without libpciaccess + + Regression fix from commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Connor Behan + +commit 5b02d5b7aaabf1ba8dcbdfe4525b7995b4e79f92 +Author: Alan Coopersmith +Date: Thu Nov 7 21:08:56 2013 -0800 + + Enable XTRANS_SEND_FDS on Solaris too. + + Requires passing through the __EXTENSIONS__ and _XOPEN_SOURCE defines + in order to expose the msg_control members in struct msghdr. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + +commit c4c154d18ef42dc550f2675a9ee88e07b1ca6bed +Author: Alan Coopersmith +Date: Thu Nov 7 21:05:33 2013 -0800 + + Avoid conflicts with Solaris defines that clash with our names + + When building on Solaris with _XOPEN_SOURCE set to a recent XPG release, + and other core headers start including , which + has a bunch of unfortunately named macros such as "CS", "ES", etc. for + x86 & x64 registers which clash with existing variable & struct member + names in Xorg - so #undef these so they don't interfere with our use. + + (Yes, have filed a bug against the system headers for exposing these, + but this solves the problem for building on existing releases.) + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + +commit d7f9be0f8541368bf1a095ad1fbe7f38be6d3d15 +Author: Keith Packard +Date: Mon Nov 11 15:48:41 2013 -0800 + + Proper spelling of MAP_ANONYMOUS is MAP_ANON. + + The former doesn't exist on BSD and the latter is available everywhere + AFAIK (checked Solaris and Linux). + + You also might want to wrap that line ;). + + Reported-by: Mark Kettenis + Signed-off-by: Keith Packard + +commit fc84166e65c35ad75f566b135dcfc305ad5a2fde +Author: Keith Packard +Date: Thu Nov 7 15:18:28 2013 -0800 + + Get rid of the rest of the FD passing code when XTRANS_SEND_FDS isn't set + + req_fds and SetReqFds in include/dixstruct.h + + ReadFdFromClient, WriteFdToClient and the FD flushing in os/io.c + + Signed-off-by: Keith Packard + +commit a239e6faf3fce848ac0d10c48f8e817db68a493c +Merge: 43e5a43 f70a8bf +Author: Keith Packard +Date: Mon Nov 11 15:26:12 2013 -0800 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 43e5a43fa8994e50cf01dd954118f4ef2c4e7933 +Author: Adam Jackson +Date: Thu Nov 7 12:01:41 2013 -0500 + + present: Don't try to initialize when building without present support + + There's a --disable-present, so it'd be nice if it worked. + + Signed-off-by: Adam Jackson + Reviewed-by: Jasper St. Pierre + Reviewed-by: Mark Kettenis + Signed-off-by: Keith Packard + +commit 0822a23e048b12c98c654e8b6af711c5f2c97141 +Author: Keith Packard +Date: Thu Nov 7 03:19:42 2013 -0800 + + present: Change debug output a bit to help diagnose missing vblank signals + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 20bb49ae9ba11d3dccfba191483cd682d9c9d96c +Author: Keith Packard +Date: Wed Nov 6 23:56:26 2013 -0800 + + Present: Check for window/fence destroyed when idling pixmaps + + A client destroying objects in the middle of an unflip can end up + having the screen flip window or fence set to NULL in the unflip + notify path. Check for these and don't try to use those objects. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 41da295eb50fa08eaacd0ecde99f43a716fcb41a +Author: Keith Packard +Date: Sun Nov 3 13:12:40 2013 -0800 + + Trap SIGBUS to handle truncated shared memory segments + + If a client passes a section of memory via file descriptor and then + subsequently truncates that file, the underlying pages will be freed + and the addresses invalidated. Subsequent accesses to the page will + fail with a SIGBUS error. + + Trap that SIGBUS, figure out which segment was causing the error and + then allocate new pages to fill in for that region. Mark the offending + shared segment as invalid and free the resource ID so that the client + will be able to tell when subsequently attempting to use the segment. + + Signed-off-by: Keith Packard + + v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis) + v3: Also catch errors in ShmCreateSegment + + Conflicts: + include/dix-config.h.in + include/xorg-config.h.in + +commit 719e880d7698d92f9b854b217ef9680aaa446f2e +Author: Keith Packard +Date: Wed Nov 6 23:22:51 2013 -0800 + + Require libXtrans version 1.3.2 + + This has the FD passing support included + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit bee2ec54049377e0033d49abff20d7bd069c62aa +Author: Keith Packard +Date: Sun Nov 3 10:08:15 2013 -0800 + + Xext: Enable MIT-SHM FD-passing request definitions only when possible + + Check to see if xtrans FD passing is available and use that to + advertise the appropriate version of the SHM extension + + Signed-off-by: Keith Packard + Reviewed-by: Alan Coopersmith + +commit ea8acfe3e2f74a46c3f1e91809b4b99af18502b7 +Author: Keith Packard +Date: Wed Nov 6 23:06:28 2013 -0800 + + Require xextproto version 7.2.99.901 + + This includes the MIT-SHM FD passing requests + + Signed-off-by: Keith Packard + Reviewed-by: Alan Coopersmith + +commit 914672fefacc15386041e7c2bc3beed4faf45e9d +Author: Keith Packard +Date: Thu Nov 7 14:20:26 2013 -0800 + + Remove dix-config.h config variables from xorg-config.h + + xorg-config.h includes dix-config, so there's no need to duplicate. + + Signed-off-by: Keith Packard + +commit 7aad79c5a582ece301d950bd65f0bcb4b9956e86 +Author: Keith Packard +Date: Wed Nov 6 23:05:46 2013 -0800 + + Make XTrans FD passing support optional. Define only on Linux + + Until other operating systems have a libXtrans port for FD passing, + disable this on non-Linux systems. + + Note that this define affects how libXtrans gets built into the X + server, which is why it need only define the symbol + + Signed-off-by: Keith Packard + +commit f70a8bf3714d89bccaad36841ef9149e91ad3bba +Author: Jeremy Huddleston Sequoia +Date: Sun Nov 10 11:40:27 2013 -0800 + + XQuartz: Don't sleep forever on exit if usleep() returns an error + + Signed-off-by: Jeremy Huddleston Sequoia + +commit ebcc1c214c466582d7b92826b4860256fd9c582a +Author: Jeremy Huddleston Sequoia +Date: Sun Nov 10 11:26:49 2013 -0800 + + XQuartz: Update Info.plist copyright years + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 81c123ea2dd833864f7ba217791e59acca0f7c97 +Author: Jeremy Huddleston Sequoia +Date: Mon Nov 4 12:13:45 2013 -0800 + + configure.ac: Move GLX section after DRI + + The GLX section of configura.ac checks the state of DRI2, so it + needs to be after DRI2=auto is resolved. + + Also reset libgl requirement to 7.1.0 in non-dri2 case. + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Adam Jackson + +commit ab4b1fb38a61feb73d8336cc7a3399eb9d3d25be +Author: Andreas Schwab +Date: Thu Aug 15 12:03:42 2013 +0200 + + ARM64: Add support for aarch64 + + Signed-off-by: Andreas Schwab + Reviewed-by: Mark Kettenis + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 8fcf82cbf015609e00b3feb9bc567133c7aee5cf +Author: Keith Packard +Date: Tue Nov 5 18:39:11 2013 -0800 + + Use $GL_LIBS instead of -lGL for linking + + -lGL presumes that the GL library is in the system path, while + $GL_LIBS is auto-detected. + + Signed-off-by: Keith Packard + +commit f348935e7d2c84a438aba08eee2f2c4e0dc77d20 +Author: Keith Packard +Date: Tue Nov 5 18:37:12 2013 -0800 + + Link with xshmfence, reference miSyncShmScreenInit in sdksyms + + This gets the server to link with xshmfence again, and also ensures + that the miSyncShm code is linked into the server with the reference + from sdksyms. + + Signed-off-by: Keith Packard + +commit 5f1e832694e57986c0185048a941b3af51b2f85f +Author: Julien Cristau +Date: Tue Nov 5 07:08:21 2013 -0800 + + os: Actually use the computed clockid in GetTimeInMicros + + The selection of which clock to use for this function was not actually + getting used when fetching the final clock value. + + Reported-by: Julien Cristau + Signed-off-by: Keith Packard + +commit 903a058370645ea075ea98d380fd565efb6160c9 +Author: Keith Packard +Date: Mon Nov 4 19:01:26 2013 -0800 + + hw/xfree86: Link libdri3 only when DRI3 is defined + + Don't attempt to link non-existant libraries... + + Signed-off-by: Keith Packard + +commit aaf0e29619196a283fee7ead2020a91032d84f48 +Author: Keith Packard +Date: Sun Nov 3 09:56:02 2013 -0800 + + Disable DRI3 and sync fence FD functions if xshmfence isn't available + + Make sure the server can build when the xshmfence library isn't present + + Signed-off-by: Keith Packard + +commit 33c85beed521c9db140cadd8c5aa9992398ee1fe +Author: Keith Packard +Date: Fri Nov 1 01:01:58 2013 -0700 + + Set version to 1.14.99.901 (1.15 RC1) + + Signed-off-by: Keith Packard + +commit 9db1d66f6d2c6857de220d8f1c08965962fe1416 +Author: Keith Packard +Date: Fri Nov 1 01:43:59 2013 -0700 + + Add dri3 and present directorys to distribution + + Signed-off-by: Keith Packard + +commit 977e2644b1d9e13b44debcb9a372bbc832ee32a3 +Merge: 66c5ee0 f36f5a6 +Author: Keith Packard +Date: Fri Nov 1 00:34:18 2013 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 66c5ee0ff4690e630a69656331fd9d545c99c26c +Author: Egbert Eich +Date: Wed Aug 14 18:18:56 2013 +0200 + + config/APM: Add option to disable building of APM support on Linux + + APM support in the Xserver was used to restore the console mode + prior to a power management event. This was to ensure the mode + upon suspend/resume was one that the system firmware or kernel + could deal with. + APM support is now largely obsolete, KMS drivers don't require a + mode restoration anyhow. Therefore it should be possible to disable + this feature. + + (small modification by keithp - move test for XF86PM flag after check + for APM, then move XF86PM flag to xorg-config.h.in) + + Signed-off-by: Egbert Eich + Tested-by: Keith Packard + Signed-off-by: Keith Packard + +commit f36f5a65f639b6524191d888d5bf89e73027156c +Author: Peter Hutterer +Date: Wed Oct 30 15:40:58 2013 +1000 + + sync: fix corner-case in triggering idle alarms + + ProcessInputEvent() resets the device idle times. If idle time was higher than + the lower bracket, this should trigger an event in the idle time wakeup + handler. + + If processing is slow, the idle time may advance past the lower bracket + between the reset and the time the BlockHandler is called. In that case, we'd + never schedule a wakeup to handle the event, causing us to randomly miss + events. + + Ran tests with a neg transition trigger on 5ms with 200 repeats of the test + and it succeeded. Anything below that gets a bit tricky to make sure the + server sees the same idle time as the client usleeps for. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit f994d99539192a10a8c83047e11991f52e0ca677 +Author: Egbert Eich +Date: Wed Aug 14 18:18:39 2013 +0200 + + config/ACPI: Add option to disable building of ACPI support on Linux + + ACPI support in the Xserver was used to restore the console mode + prior to a power management event. This was to ensure the mode + upon suspend/resume was one that the system firmware or kernel + could deal with. + The feature depended on acpid to be running. Most of this functionality + is now take over by systemd, KMS drivers don't require a mode restoration + anyhow. Therefore it should be possible to disable this feature under + some circumstances. + + Tested-by: Keith Packard + Signed-off-by: Keith Packard + +commit 2aa5092b88174cb9988076ae96298217c97ad75f +Author: Egbert Eich +Date: Mon Aug 12 18:21:33 2013 +0200 + + DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched away + + A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to + crash when xf86SetViewport() which does not check if the hardware is + accessible. + Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that. + + Signed-off-by: Egbert Eich + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 508e05777aba823c93a2417cc26d18c9f061ca26 +Author: Egbert Eich +Date: Mon Aug 12 18:20:36 2013 +0200 + + DDX/Events: Distinguish between Input- and GeneralHandlers in xf86VTSwitch() + + When enabling/disabling input handlers in xf86VTSwitch() we treat Input- + and GeneralHandlers equally. The result is that after a VT switch the + masks for EnabledDevices and AllSockets are equal and the distiction + between both types is lost. + + Signed-off-by: Egbert Eich + Reviewed-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 0cb33ce34081d7d123ec565582d7d19bdb3964ad +Author: Egbert Eich +Date: Sat Oct 5 08:02:28 2013 +0200 + + DDX/modes: Add a sanity check when using screen sizes from EDID + + EDID sometimes lies about screen sizes. Since the screen size is used + by clients to determine the DPI a wrong ration will lead to terrible + looking fonts. + Add a sanity check for the h/v ratio cutting off at 2.4. This would + still accept the cinemascope aspect ratio as valid. + Also add message suggesting to add a quirk table entry. + + Signed-off-by: Egbert Eich + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 41d4beb2616ceb3f1a1b8694733e85bae70de59a +Author: Egbert Eich +Date: Wed Aug 14 11:50:26 2013 +0200 + + DDX/DPMS: Call dixSaveScreens() also when screen is turned on + + DMPS calls dixSaveScreens() when turned off but not when turned + on. In most cases this is irrelevant as DPMS is done when a + key is hit in which case dixSaveScreens() will be called to + unblank anyhow. This isn't the case if we use xset (or the + DPMS extension directly) to unblank. + Check screenIsSaved to make sure the state needs to be changed + before calling dixSaveScreens(). + + Signed-off-by: Egbert Eich + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 623c4147650d0404cfbea0f9b7df66dc7d928e00 +Author: Søren Sandmann Pedersen +Date: Mon Oct 21 17:11:56 2013 -0400 + + ephyr: Ensure stride of private framebuffer is multiple of 4 + + The fb layer of X can't deal with strides that are not a multiple of + 4, so when Xephyr allocates its own framebuffer it should make sure to + align it. + + This fixes crashes and rendering corruption when Xephyr runs in a + depth that is different from the host X server and its screen size is + not a multiple of 4 / depth. (This is particularly easy to trigger if + you use the -resizeable option). + + Reviewed-by: Eric Anholt + Signed-off-by: Soren Sandmann + Reviewed-by: Adam Jackson + +commit 97cf53cc2ad7ecfdd495133bad31d0ec7d939326 +Author: Søren Sandmann Pedersen +Date: Mon Oct 21 16:58:54 2013 -0400 + + ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_line + + When the depth of the Xephyr server matches that of the host X server, + Xephyr simply uses the buffer associated with the XImage as its + framebuffer. In this case, it is correct to get the bits_per_pixel and + bytes_per_line values returned from hostx_screen_init() from the XImage. + + However, when the depth doesn't match the host, Xephyr uses a private + framebuffer that is periodically copied to the XImage. In this case, + the returned values of bits_per_pixel and bytes_per_line should be + those of the private framebuffer, not those of the XImage. + + Reviewed-by: Eric Anholt + Signed-off-by: Soren Sandmann + Reviewed-by: Adam Jackson + +commit 55246b67b755d4c1039d54971fe3f77ea60d604e +Author: Søren Sandmann Pedersen +Date: Tue Oct 8 17:45:40 2013 -0400 + + xf86AddBusDeviceToConfigure(): Store device in DevToConfig[i].pVideo + + After fc3ab84d the pVideo field in DevToConfig[i] is no longer + initialized, so it's always NULL. This causes the duplicate finding + algorithm in the beginning of the function to not work anymore as it + is based on this field. + + The symptom of this bug is that X -configure reports + + Number of created screens does not match number of detected devices. + Configuration failed. + Server terminated with error (2). Closing log file. + + rather than producing a working config file. + + This patch fixes that bug by initializing the field before calling + xf86PciConfigureNewDev(). + + Cc: tvignatti@gmail.com + Signed-off-by: Soren Sandmann + Reviewed-by: Adam Jackson + +commit 95bf478b78e466002c382bcde7d4d62591e9215d +Merge: abf5d5a bb745f2 +Author: Keith Packard +Date: Thu Oct 31 18:18:19 2013 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit abf5d5ac12437ebe156b4dd500c2acd69eea3654 +Author: Jeremy Huddleston Sequoia +Date: Thu Oct 31 08:57:56 2013 -0700 + + miext/damage: Partial revert of "Only wrap into the GC ops chain if there's a listener (v3)" + + Fixes regression from: 4dc2a76740d921c824a4d8193f39dd373475f02a + + http://lists.x.org/archives/xorg-devel/2013-May/036241.html + https://trac.macports.org/ticket/38993 + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit e4636072949a76477fe7c9d54662a0b3536b1372 +Merge: 17ed7ac 5c5c1b7 +Author: Keith Packard +Date: Thu Oct 31 17:05:48 2013 -0700 + + Merge remote-tracking branch 'keithp/dri3' + +commit 17ed7ac1fe7426d66f688087c09da5ff1dbb41d3 +Author: Adam Jackson +Date: Thu Oct 31 18:39:22 2013 -0400 + + glx: Lie about GLX_Y_INVERTED_EXT + + Well, that was lame. The problem with reporting y inversion honestly is + that libGL asks the driver _its_ opinion of Y inversion, which it just + fabricates from whole cloth. So then when libGL goes to compare the + driver's idea of fbconfigs with that of the server - a fairly dumb idea + to begin with - nothing matches, and direct rendering fails, and + sadness. + + So until the DRI drivers are fixed we should just continue to lie about + Y inversion. GLX_DONT_CARE is what libGL would make up for that + attribute if we hadn't sent it, so just send that instead. + + Signed-off-by: Adam Jackson + Tested-by: Keith Packard + Signed-off-by: Keith Packard + +commit 5c5c1b77982a9af7279a90bc3c2be48adaa9c778 +Author: Keith Packard +Date: Thu Jul 11 16:11:57 2013 -0700 + + present: Add Present extension + + Provides both a software implementation using timers and driver hooks + to base everything on vblank intervals. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 563138298868f62501875d3016f03469dcffaad0 +Author: Keith Packard +Date: Tue Apr 9 19:59:39 2013 -0700 + + dri3: Add DRI3 extension + + Adds DRM compatible fences using futexes. + Uses FD passing to get pixmaps from DRM applications. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit fdec793cdc2ef9a6ea66b311cb1068a7bd4a3be3 +Author: Keith Packard +Date: Thu Jan 17 13:46:55 2013 -0800 + + Add support for MIT-SHM AttachFd request + + This passes a file descriptor from the client to the server, which is + then mmap'd + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 9fd35daa3160fd36f00ed354bfcbefefa1353cce +Author: Keith Packard +Date: Thu Jan 17 13:43:02 2013 -0800 + + Add interfaces to get FDs from clients over the socket + + This adds two interfaces: + + void SetReqFds(ClientPtr client, int req_fds) + + Marks the number of file descriptors expected for this + request. Call this before any request processing so that + any un-retrieved file descriptors will be closed + automatically. + + int ReadFdFromClient(ClientPtr client) + + Reads the next queued file descriptor from the connection. If + this request is not expecting any more file descriptors, or + if there are no more file descriptors available from the + connection, then this will return -1. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 264fc3abe5f18341d0cf9ddb6766e10e4154e447 +Author: Keith Packard +Date: Thu Oct 31 13:01:46 2013 -0700 + + misync: Don't smash custom screen sync functions + + There was a check to avoid smashing custom functions, but the sense + was backwards causing it to always smash them, and also not set them otherwise. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 2d96948ab5c952b68875ac63844cf7d778d4bf63 +Author: Keith Packard +Date: Thu Jul 11 16:10:34 2013 -0700 + + os: Add GetTimeInMicros + + 64-bit higher resolution current time value. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 0c33f47281c36726848daf513fb0483cdea57bff +Author: Keith Packard +Date: Thu Jul 11 16:09:34 2013 -0700 + + Add swapll to byte swap 64-bit datatypes + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 26f013ba45b08a02bb028a461af68288a86fadb1 +Author: Keith Packard +Date: Thu Jul 11 16:08:41 2013 -0700 + + Add a RegionDuplicate function + + This allocates a new region structure and copies a source region into + it in a single API rather than forcing the caller to do both steps themselves. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit d25c217964eb1fe54c3a54bca4cac7f47b4b9fdf +Author: Keith Packard +Date: Mon Jan 14 14:24:36 2013 -0800 + + Clean up a couple of warnings in os/ + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 7710f2b927ec8e3c631f72d66d494b523377b48e +Author: Keith Packard +Date: Fri Jan 18 21:43:40 2013 -0800 + + Xext: Move MIT-SHM 'ShmDesc' to shmint.h + + This data structure is required to use shared memory objects in any + extension. That includes the Xv extension, which (before this patch) + duplicated the definition of this structure in its own code. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit e8961b718d82f1c081ec110d8d962f64e8406b82 +Author: Peter Hutterer +Date: Tue Oct 22 14:24:52 2013 +1000 + + os: use a constant for backtrace array size + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit f12a9ed870017f35cf6d2a82b1405e843aae42ac +Author: Peter Hutterer +Date: Tue Oct 29 15:24:11 2013 +1000 + + configure: remove a comment + + 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so + this comment is outdated. since no-one noticed and it's easier to just grep + than update file references, remove the comment. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit bb745f2b45768d0936f3960951e1a5cee8b03194 +Author: Jeremy Huddleston Sequoia +Date: Thu Oct 31 08:50:57 2013 -0700 + + XQuartz: Bump bundle version to 2.7.6 + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 2eedf42c229e2251035d716a96b654222155cd51 +Author: Adam Jackson +Date: Thu Oct 31 09:23:52 2013 -0400 + + dri: Fix GLX_Y_INVERTED_EXT fbconfig attribute + + We're Y-inverted from GL's coordinates, so this is correct. gnome-shell + doesn't seem to check this - somewhat reasonable since the only server + that answered the other way around was Xglx - but kwin does, and + upside-down hilarity ensues. + + Tested-by: maelcum on #xorg-devel + Signed-off-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa +Author: Adam Jackson +Date: Tue Oct 29 12:58:14 2013 -0400 + + xfree86: Bump video/input/extension ABIs for 1.15 + + Signed-off-by: Adam Jackson + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit 899451ae595f5f51a500295c624bf7ad14aca602 +Author: Keith Packard +Date: Wed Oct 30 08:54:24 2013 -0700 + + kdrive/ephyr: Don't discard one-time driver structure at server reset + + KdScreenInfo is constructed at server startup time, and not + re-generated at server reset time. Freeing the 'driver' element at + reset time means this information is lost, and the server crashes + pretty quickly afterwards. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 85ae44f07fa21b4a48d95d736dc8135bd4f751d0 +Author: Michal Srb +Date: Wed Oct 30 13:33:51 2013 +0200 + + randr: deliver Output and Crtc events of attached output providers. + + Consider all attached output providers when looking for changed outputs and + crtcs. + + Reviewed-by: Dave Airlie + Signed-off-by: Michal Srb + Signed-off-by: Keith Packard + +commit a9ca93dcf9a711b3d60fbad31cbd44e0c82b6f42 +Author: Michal Srb +Date: Wed Oct 30 13:33:50 2013 +0200 + + randr: send RRResourceChangeNotify event + + Send RRResourceChangeNotify event when provider, output or crtc was created or + destroyed. I.e. when the list of resources returned by RRGetScreenResources and + RRGetProviders changes. + + Reviewed-by: Dave Airlie + Signed-off-by: Michal Srb + Signed-off-by: Keith Packard + +commit 4b39ea8a918fe6117bf34dc1cba67a4e56d0d1fb +Author: Michal Srb +Date: Wed Oct 30 13:33:49 2013 +0200 + + randr: send RRProviderChangeNotify event + + Send RRProviderChangeNotify event when a provider becomes output source or + offload sink. + + Reviewed-by: Dave Airlie + Signed-off-by: Michal Srb + Signed-off-by: Keith Packard + +commit 1470c0a132806fb2ce817515ad4ddfe66eb7c98f +Merge: 04ab07c 9f4afe7 +Author: Keith Packard +Date: Tue Oct 29 21:00:13 2013 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 9f4afe7e835cf9c513387ae01eaf8b7a6ba4aac9 +Author: Gaetan Nadon +Date: Mon Oct 28 18:32:36 2013 -0400 + + config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES + + Fix Automake warning: AC_OUTPUT should be used without arguments. + www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files + + Signed-off-by: Gaetan Nadon + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit e16dea72d6f45dd6d7788362bb7dbe76263719b1 +Author: Peter Hutterer +Date: Wed Oct 23 15:16:25 2013 +1000 + + dmx: queue button events with a flags of 0 + + Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set + the flags to 0 so we don't generate any motion on a button event. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 +Author: Connor Behan +Date: Thu Oct 17 18:26:28 2013 -0700 + + xfree86: Find primary entity when bus types are nominally different + + As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as + their primary bus type. However, drivers not implementing a + platformProbe function will still create entities of type BUS_PCI. We + need to account for this when checking for the primary entity. + + Signed-off-by: Connor Behan + Acked-by: Tormod Volden + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit b32a4c91ccd479638c2bd2c0143b6ea170c717d1 +Merge: be66809 c671e93 +Author: Keith Packard +Date: Tue Oct 29 09:37:30 2013 -0700 + + Merge remote-tracking branch 'idr/glx-float-fbconfig' + +commit be6680967a479eedbcab2fe1718c5f981e1029c7 +Author: Adam Jackson +Date: Wed Jul 10 10:00:46 2013 -0400 + + glx: convert to direct GL dispatch (v2) + + We now expect to be linked against something that provides the GL API, + instead of manually grubbing about in the DRI driver's dispatch table. + Since the GLX we expose calls GL functions that are meant to be looked + up dynamically, also add a way to thunk through to GetProcAddress. + + This includes a refresh of the generated sources, which requires a + correspondingly new Mesa. + + The GetProcAddress stubs are at the moment merely enough to make this + link against Mesa 9.2, but should really be provided for everything not + in the OpenGL 1.2 ABI. + + v2: Explicitly hide the GetProcAddress stubs so we can't conflict with + libGL symbols; fix leading tab/space issues [anholt] + + Reviewed-by: Keith Packard + Signed-off-by: Adam Jackson + +commit 8aacf47e1778d8b72811b025a82452b933d3c1f2 +Author: Adam Jackson +Date: Fri Oct 4 12:58:19 2013 -0400 + + glx: Remove DRI1 AIGLX (v2) + + Mesa doesn't ship DRI1 drivers as of 8.0, which is about 18 months and + three releases ago. The main reason to have wanted DRI1 AIGLX was to + get a GLX compositor working, but DRI1's (lack of) memory management API + meant that the cost of a GLX compositor was breaking direct GLX apps, + which isn't a great tradeoff. + + Of the DRI1 drivers Mesa has dropped, I believe only mga stands to lose + some functionality here, since it and only it has support for + NV_texture_rectangle. Since that's required for every extant GLX + compositor I know of, I conclude that anybody with a savage, say, would + probably not notice AIGLX going away, since they wouldn't be running a + GLX compositor in the first place. + + In the future we'd like to use GL in the server in a more natural way, + as just another EGL client, including in the GLX implementation itself. + Since there's no EGL implemented for DRI1 drivers, this would already + doom AIGLX on DRI1 (short of entirely forking the GLX implementation, + which I'm not enthusiastic about). + + v2: Remove DRI1 from AIGLX conditionals in configure.ac [anholt] + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 7f5adf73a0f9a951a6df201532b4031d38054369 +Author: Adam Jackson +Date: Wed Oct 2 17:38:05 2013 -0400 + + glx: Simplify glXDestroyContext + + We can just free the resource unconditionally here. ContextGone (which + FreeResourceByType will call) already does: + + cx->idExists = GL_FALSE; + if (!cx->currentClient) { + __glXFreeContext(cx); + } + + Reviewed-by: Ian Romanick + Signed-off-by: Adam Jackson + +commit 53653f4889dcaea0cf67f8a4180af71eeb4b2f6b +Author: Adam Jackson +Date: Mon Aug 5 15:46:11 2013 -0400 + + glx: Fix a corner case in DrawableGone + + Losing the drawable does not change our notion of current client. Since + the GL under us doesn't understand having a current context without + current drawables (sigh), we do still need to loseCurrent so that we + re-bind the context on the next request. + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65030 + Reviewed-by: Ian Romanick + Signed-off-by: Adam Jackson + +commit 276d8057aa7f6e36c9c874257a6383f416c5cedd +Author: Adam Jackson +Date: Sat Aug 3 09:47:55 2013 -0400 + + glx: Fix memory leak in context garbage collection (v2) + + I broke this, back in: + + commit a48dadc98a28c969741979b70b7a639f24f4cbbd + Author: Adam Jackson + Date: Mon Mar 21 11:59:29 2011 -0400 + + glx: Reimplement context tags + + In that, I changed the glx client state to not explicitly track the list + of current contexts for the client (since that was what we were deriving + tags from). The bug was that I removed the code for same from + glxClientCallback without noticing that it had the side effect of + effectively de-currenting those contexts, so that ContextGone could free + them. So, if you had a client exit with a context still current, the + context's memory would leak. Not a huge deal for direct clients, but + viciously bad for indirect, since the swrast context state at the bottom + of Mesa is like 15M. + + Fix this by promoting Bool isCurrent to ClientPtr currentClient, so that + we have a back-pointer to chase when walking the list of contexts when + ClientStateGone happens. + + v2: Explicitly call __glXFreeContext on the ClientStateGone path. Our + current context might be one we got from EXT_import_context and whose + creating client has since died. Without the explicit call, the creating + client's FreeClientResources would not free the context because it's + still current, and the using client's FreeClientResources would not free + the context because it's not an XID it created. This matches the logic + from a48dadc. + + Reviewed-by: Ian Romanick + Signed-off-by: Adam Jackson + +commit 75b362763cca8b6139582ad85e3b58f0b2e30a1c +Author: Adam Jackson +Date: Tue Oct 8 15:02:44 2013 -0400 + + glx: Only take a Pixmap reference if creating the GLXPixmap succeeded + + Reviewed-by: Julien Cristau + Signed-off-by: Adam Jackson + +commit 4292a39c8014f9f4920bed3001802e4a3e523c5e +Author: Peter Hutterer +Date: Mon Oct 28 12:10:10 2013 +1000 + + Xi: fix logic error when calculating emulated motion events + + gcc -Wlogical-op + exevents.c: In function 'DeliverEmulatedMotionEvent': + exevents.c:1480:13: warning: logical 'or' of collectively exhaustive + tests is always true [-Wlogical-op] + + The relevant snippet of exevents.c: + + 1479 if (ti->listeners[0].type != LISTENER_POINTER_REGULAR || + 1480 ti->listeners[0].type != LISTENER_POINTER_GRAB) + 1481 return; + + This condition was always true, causing dropped motion events. + + Reported-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit c671e935e7c44d4711ba9588ee96cb9796b879e6 +Author: Daniel Czarnowski +Date: Mon Oct 21 19:48:38 2013 +0200 + + glx: Enable GLX_ARB_fbconfig_float for DRI2 drivers + + v2 (idr): Maintain sort order of extension list. Fixed rebase error + (comment header for initializeExtensions was in front of + __glXDRIinvalidateBuffers). Re-write commit message. + + Signed-off-by: Daniel Czarnowski + Signed-off-by: Ian Romanick + Reviewed-by: Ian Romanick + +commit ccc8bb1153ec669f7540a174a81a8ec0e0d6dd67 +Author: Daniel Czarnowski +Date: Wed Oct 23 12:53:59 2013 +0200 + + glx: Handle float config types in glxConvertConfigs + + Replaces old use of floatMode attribute with new, extended range of + values in __DRI_ATTRIB_RENDER_TYPE. Also adds new conditions, where the + float modes support requires it. Enables support for not only float + configs, but packed float configs as well. + + v2 (idr): Whitespace and formatting fixes. Refactor render type + vs. pbuffer checking to a separate function that includes a quote from + the spec. Re-write commit message. Fix compiler warnings: + + glxdricommon.c: In function 'glxConvertConfigs': + glxdricommon.c:212:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] + glxdricommon.c:212:35: note: expected 'unsigned int *' but argument is of type 'int *' + glxdricommon.c:230:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] + glxdricommon.c:230:35: note: expected 'unsigned int *' but argument is of type 'int *' + + Signed-off-by: Daniel Czarnowski + Signed-off-by: Ian Romanick + Reviewed-by: Ian Romanick + +commit 4e5eb15b4cc170499cf87e6633c1737f0b1c514b +Author: Daniel Czarnowski +Date: Mon Oct 21 19:57:53 2013 +0200 + + glx: Correctly set render type enum + + The type specified is bits, but the context wants an enum. + + v2 (idr): Fix various whitespace and formatting problems. Rename + convFBconfRenderTypeBits2CtxRenderType to + renderTypeBitsToRenderTypeEnum. Re-write commit message. + + Signed-off-by: Daniel Czarnowski + Signed-off-by: Ian Romanick + Reviewed-by: Ian Romanick + +commit eabb523aa45f3d8940cadac197ef1225fbfd5c56 +Author: Daniel Czarnowski +Date: Mon Oct 21 19:45:35 2013 +0200 + + glx: Allow float renderType in glXCreateContextAttribsARB + + This enables GLX_RGBA_FLOAT_TYPE_ARB and + GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT as valid renderType parameters to + glXCreateContextAttribsARB. + + v2 (idr) : Use C-style comments and fix word wrapping. Re-write commit + message. + + Signed-off-by: Daniel Czarnowski + Signed-off-by: Ian Romanick + Reviewed-by: Ian Romanick + +commit 7ecfab47eb221dbb996ea6c033348b8eceaeb893 +Author: Eric Anholt +Date: Tue Oct 22 14:22:04 2013 -0700 + + glx: Add support for the new DRI loader entrypoint. + + This is going to be exposed (and not the old entrypoint) for some DRI + drivers once the megadrivers series lands, and the plan is to + eventually transition all drivers to that. Hopefully this is + unobtrusive enough to merge to stable X servers so that they can be + compatible with new Mesa versions. + + v2: typo fix in the comment + + Signed-off-by: Eric Anholt + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 83bb366e71ef41165998eed2934208f84714a37e +Author: Strake +Date: Thu Oct 17 23:20:20 2013 -0500 + + unbreak KdEnableInput + + pi = ki = 0 here, so not follow them. + + Signed-off-by: Strake + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 8db4121a3c7104548fd4a138ac1d1bdea5fd22d9 +Author: Keith Packard +Date: Fri Oct 18 17:31:01 2013 -0700 + + Update to version 1.14.99.3 + + Signed-off-by: Keith Packard + +commit e3220d7bae4548bf64e5879c981ad070ac1f78f7 +Merge: 73b2660 2523a44 +Author: Keith Packard +Date: Fri Oct 18 17:22:52 2013 -0700 + + Merge commit '2523a445a09a75a8baf642608d099a5e12d5437f' + + This is merging the commits along Peter's for-keith branch, without + also merging in the spurious merge at the top of that branch. + +commit f8662a133690773692dfa392ecfa3b8b56af8fa9 +Merge: 7cf1b59 2523a44 +Author: Peter Hutterer +Date: Fri Oct 18 16:50:12 2013 +1000 + + Merge branch 'xsync-transition-bug-59644' into for-keith + +commit 2523a445a09a75a8baf642608d099a5e12d5437f +Author: Peter Hutterer +Date: Thu Oct 17 12:02:27 2013 +1000 + + sync: split updating and triggering a counter up + + Now that the brackets are always the nearest change points (regardless of + transition) we need to update the counters whenever we check for any updates. + + Otherwise we end up with a situation where counter->value is out of date and + an alarm doesn't trigger because we're still using the value from last time + something actually triggered. + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + +commit e57ec99b03b2ad840c384a97ab2766ce9da0f5cc +Author: Peter Hutterer +Date: Wed Oct 16 16:31:15 2013 +1000 + + sync: always set the brackets (#59644) + + The current code sets bracket_greater to the first trigger after the current + value, and bracket_less to the last trigger before the current value. + + For example, the idle timer with three negative and three positive transitions + would set this: + + nt1 nt2 nt3 + |--------|------|--|------- idle --|---|--|-----> t + pt1 pt2 pt3 + bracket_less == nt2 + bracket_greater == pt2 + + This is an optimization so we can skip code paths in the block/wakeup handlers + if the current value doesn't meet any of the trigger requirements. Those + handlers largely do a + if (bracket_less is less than current value && + bracket_greater is greater than current value) + return, nothing to do + + However, unless the bracket values are updated at the correct time, the + following may happen: + + nt + |--------------|---------- idle ------|--------> t + pt + + In this case, neither bracket is set, we're past the pos transition and not + yet at the neg transition. idle may now go past nt, but the brackets are not + updated. If idle is then reset to 0, no alarm is triggered for nt. Likewise, + idle may now go past pt and no alarm is triggered. + + Changing an alarm or triggering an alarm will re-calculate the brackets, so + this bug is somewhat random. If any other client triggers an alarm when the + brackets are wrongly NULL, the recalculation will set them this bug may not + appear. + + This patch changes the behavior, so that the brackets are always the nearest + positive or negative transitions to the current counter value. In the example + above, nt will trigger a wakeup and a re-calculation of the brackets, so that + going past it in the negative direction will then cause the proper alarm + triggers. + + Or, in Keith's words: + + Timer currently past a positive trigger + No bracket values, because no trigger in range + + Timer moves backwards before the positive trigger + Brackets not reset, even though there is now a trigger in range + + Timer moves forward past the positive trigger + Trigger doesn't fire because brackets not set + + Setting the LT bracket in this case will cause everything to get + re-evaluated when the sync value moves backwards before the trigger + value. + + X.Org Bug 59644 + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + +commit 06b87aa528d7a739ba20101a1f83b1a428691a01 +Author: Peter Hutterer +Date: Wed Oct 16 10:08:46 2013 +1000 + + sync: if the idle time was reset, force alarms to trigger (#70476) + + The time between the idle reset and the IdleTimeWakeupHandler to be called is + indeterminate. Clients with an PositiveTransition or NegativeTransition alarm + on a low threshold may miss an alarm. + + Work around this by keeping a reset flag for each device. When the + WakeupHandler triggers and the reset flag is set, we force a re-calculation of + everything and pretend the current idle time is zero. Immediately after is the + next calculation with the real idle time. + + Relatively reproducible test case: Set up a XSyncNegativeTransition alarm for + a threshold of 1 ms. May trigger, may not. + + X.Org Bug 70476 + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + +commit efc1035ca958f2c9d266338a308518a0834b1773 +Author: Peter Hutterer +Date: Wed Oct 16 09:36:01 2013 +1000 + + dix: provide accessor methods for the last device event time + + And now that we have the accessors, localize it. No functional changes, just + preparing for a future change. + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + +commit b7c9bd9cf276e92a73be57ff2ed32b47a80f13fb +Author: Peter Hutterer +Date: Wed Oct 16 09:21:47 2013 +1000 + + sync: supply the counter from IdleTimeBlockHandler + + The main idletime counter has an initialized deviceid, might as well be + supplying it properly. Without this, we'd only ever check the XIAllDevices + counter, so the wait would never be adjusted for the device-specific triggers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + +commit 2efe49c1029f959fe80879bcf50df42e8b80451d +Author: Peter Hutterer +Date: Wed Oct 16 13:01:01 2013 +1000 + + sync: always call BracketValues when recalculating upper/lower brackets + + Both ServertimeBracketValues and IdleTimeBracketValues copy the value into + there SysCounter privates. Call it for a NULL set as well, so we don't end up + with stale pointers and we can remove the block/wakeup handlers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + +commit 5c7cfd4c6978834551848e1be62af240102e39b5 +Author: Peter Hutterer +Date: Tue Oct 15 10:11:20 2013 +1000 + + sync: compress two if statements + + No functional changes, just merges a > and == condition into a >= condition. + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + +commit 73b2660d7273d175d279d22f8ca0c3932a14ff1c +Author: Alan Coopersmith +Date: Mon Sep 16 21:47:16 2013 -0700 + + Avoid use-after-free in dix/dixfonts.c: doImageText() [CVE-2013-4396] + + Save a pointer to the passed in closure structure before copying it + and overwriting the *c pointer to point to our copy instead of the + original. If we hit an error, once we free(c), reset c to point to + the original structure before jumping to the cleanup code that + references *c. + + Since one of the errors being checked for is whether the server was + able to malloc(c->nChars * itemSize), the client can potentially pass + a number of characters chosen to cause the malloc to fail and the + error path to be taken, resulting in the read from freed memory. + + Since the memory is accessed almost immediately afterwards, and the + X server is mostly single threaded, the odds of the free memory having + invalid contents are low with most malloc implementations when not using + memory debugging features, but some allocators will definitely overwrite + the memory there, leading to a likely crash. + + Reported-by: Pedro Ribeiro + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + +commit 8afe20d4e34adcfd29bdf43a01d55335ea2c5dba +Author: Alan Coopersmith +Date: Mon Sep 16 21:45:29 2013 -0700 + + Update GLX dependencies now that DRI & DRI2 are builtins, not modules + + Signed-off-by: Alan Coopersmith + +commit 2704bdb24a2c7bac65b90e05f1a68438b34ecf58 +Author: Alan Coopersmith +Date: Tue Sep 3 22:53:28 2013 -0700 + + DMX glxproxy: Don't allocate & copy data just to free it unused + + Two functions in the DMX glxproxy code loop over all the backend + screens, starting at the highest numbered and counting down to + the lowest. + + Previously, for each screen, the code would allocate a buffer + large enough to read the reply from the backend, copy that reply + into the buffer, and then if it wasn't the final screen, free it. + Only the buffer from the final screen is used, to pass on to the + client in the reply. + + This modifies it to just immediately discard the responses from + the screens as we loop through it, only doing the allocate & copy + work for the one buffer we pass back to the client. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Alex Deucher + +commit 6c06c268adbab63ebe7490489aa030724cbdc54b +Author: Alan Coopersmith +Date: Sun Aug 18 18:02:49 2013 -0700 + + Skip damage calls if DamageCreate fails in exa functions + + Fixes parfait errors such as: + Null pointer dereference (CWE 476): Write to null pointer pDamage + at line 1833 of miext/damage/damage.c in function 'DamageRegister'. + Function DamageCreate may return constant 'NULL' at line 1775, + called at line 232 of exa/exa_migration_mixed.c + in function 'exaPrepareAccessReg_mixed'. + Constant 'NULL' passed into function DamageRegister, + argument pDamage, from call at line 237. + Null pointer introduced at line 1775 of miext/damage/damage.c + in function 'DamageCreate'. + Null pointer dereference (CWE 476): Write to null pointer pDamage + at line 1833 of miext/damage/damage.c in function 'DamageRegister'. + Function DamageCreate may return constant 'NULL' at line 1775, + called at line 104 of exa/exa_mixed.c + in function 'exaCreatePixmap_mixed'. + Constant 'NULL' passed into function DamageRegister, + argument pDamage, from call at line 109. + Null pointer introduced at line 1775 of miext/damage/damage.c + in function 'DamageCreate'. + + Checks are similar to handling results of other calls to DamageCreate. + + [ This bug was found by the Parfait 1.3.0 bug checking tool. + http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ] + + Signed-off-by: Alan Coopersmith + +commit 7cf1b595c8c8f9776a39559d2878cf90af3f2859 +Author: Peter Hutterer +Date: Wed Sep 4 15:34:29 2013 +1000 + + dix: only deliver for the current grab type + + Use the grabtype to determine which type of event to send - all other events + are pointless and may result in erroneous events being delivered. + + Signed-off-by: Peter Hutterer + +commit 78944d62ffc7fec6f75b6f514ab7a139ba9bc77b +Author: Peter Hutterer +Date: Wed Sep 4 15:34:28 2013 +1000 + + dix: don't attempt to deliver an event for a different grabtype + + For an active grab, grab->eventMask can be either the core or the XI1 mask. + With the overlap of event filters, calling DeliverOneGrabbedEvent(XI1) for a + ProximityOut event will trigger if the client has selected for enter events - + the filter is the same for both. + + Thus, we end up delivering a proximity event to a client not expecting one. + + Signed-off-by: Peter Hutterer + +commit 6159811a1aaf848016dbfa7bde68df097027870c +Author: Peter Hutterer +Date: Wed Sep 4 15:34:27 2013 +1000 + + include: change grabtypes to start at 1 + + Avoid erroneous detection of an unset grabtype as CORE + + Signed-off-by: Peter Hutterer + +commit be6ea80b79b3d6eb97106ea142e01acbdf059995 +Author: Peter Hutterer +Date: Wed Sep 4 15:34:26 2013 +1000 + + dix: only allow button and key events to freeze a sync'd pointer + + If a client calls XAllowEvents(SyncPointer) it expects events as normal until + the next button press or release event - that freezes the device. An e.g. + proximity event must thus not freeze the pointer. + + As per the spec, only button and key events may do so, so narrow it to these + cases. + + Signed-off-by: Peter Hutterer + +commit 93a27b2dd0d7ed51120f42456a91a7c59902ebc2 +Author: Michele Baldessari +Date: Sun Sep 15 19:30:38 2013 +0100 + + Xephyr: restore cursor visibility + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69388 + + Commit c100211034ab69ce453a1644fb61c6808d7e3eda (dix: only show the cursor + if a window defines one (#58398)) broke the default cursor behaviour in + Xephyr (unless run with -retro). Restore the default cursor visibility + so that '-retro' or '-host-cursor' are not needed to have a visible + cursor. + + Signed-off-by: Michele Baldessari + Reviewed-by: Peter Hutterer + + as of ba387cf21f7d95987211f75d8024601e7d64e322 "ephyr: Use host (HW) cursors + by default." this only applies if -sw-cursor is given on the cmdline. + + Signed-off-by: Peter Hutterer + +commit 70efc799cbeec26f19831b3b14c0d4646198a077 +Author: Michele Baldessari +Date: Sun Sep 15 19:56:34 2013 +0100 + + Fix Xephyr compilation when DEBUG is enabled + + When DEBUG is enabled Xephyr compilation fails: + ephyrdriext.c:343:133: error: 'is_ok' undeclared (first use in this + function) + EPHYR_LOG("leave. is_ok:%d\n", is_ok); + + Just reemove bogus is_ok variable. + + Signed-off-by: Michele Baldessari + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 5ac4bfca64bd75474e550b26bc1195a5ca245752 +Author: Adam Jackson +Date: Tue Sep 10 14:18:18 2013 -0400 + + input: calloc minimization for xi2mask_new + + There's no reason to do this as (nmasks + 2) callocs, and it's a + surprisingly hot path. Turns out you hit this ~once per passive grab, + and you do a few bajillion passive grab changes every time you enter or + leave the overview in gnome-shell. According to a callgrind of Xorg + with gnome-shell-perf-tool run against it: + + Ir before: 721437275 + Ir after: 454227086 + + Signed-off-by: Adam Jackson + Reviewed-by: Jasper St. Pierre + Signed-off-by: Peter Hutterer + +commit 44d502c6f1d03a9e548f0941cde0228b6fde8394 +Author: Jon TURNEY +Date: Sun Oct 6 16:45:52 2013 +0100 + + hw/xwin: Fix for "glx: Remove screen number from __GLXconfig" + + Fix compilation after commit c3c976f54c3c282d6fa6c8360688e036bc43d210 "glx: + Remove screen number from __GLXconfig" + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Adam Jackson + +commit 6a9bd103cb993e873cb82664b677ceed73c0bd85 +Merge: ea3b7db 8aae28e +Author: Keith Packard +Date: Mon Oct 7 17:29:38 2013 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit ea3b7db4b747f883ef7b8b524ee13bf8a63add14 +Author: Emil Velikov +Date: Mon Oct 7 18:29:25 2013 +0100 + + configure.ac: Include missing proto declarations in SDK_REQUIRED_MODULES + + Commits a1d41e311c21e, 7d859bd87834d & 3ed2c6e11298c made extinit.h require + the XF86 Big Font, XRes & ScrnSaver proto headers, but failed to add them + to the SDK_REQUIRED_MODULES so pkg-config would find them for driver builds. + + Signed-off-by: Emil Velikov + Reviewed-by: Daniel Stone + Signed-off-by: Keith Packard + +commit 8aae28e3cbdd49bfa8d940a4a517c94a53b94f86 +Author: Jeremy Huddleston Sequoia +Date: Sun Oct 6 09:20:45 2013 -0700 + + XQuartz: Dont't set screen on __GLXConfig + + Fixes regression introduced by c3c976f54c3c282d6fa6c8360688e036bc43d210 + + Signed-off-by: Jeremy Huddleston Sequoia + +commit c5f8eb968efa970201712105a1ac880b517e7b6d +Author: Jeremy Huddleston Sequoia +Date: Sun Oct 6 09:18:15 2013 -0700 + + rootless: Use miCopyRegion instead of fbCopyRegion + + Fixes regression introduced by e657635dbe6b92875b0e88370557c2cbab673a49 + + Signed-off-by: Jeremy Huddleston Sequoia + +commit ccbe17b1c6da1ad9d085fc8133cdd15dc7004a4a +Author: Pino Toscano +Date: Wed Aug 28 17:15:03 2013 +0200 + + os: move for any !win32 system + + It is needed in IPv6 configurations (for inet_pton) also when + SIOCGIFCONF is not defined. + + Signed-off-by: Pino Toscano + Acked-by: Samuel Thibault + Signed-off-by: Julien Cristau + +commit c079b8e675dd2762c9e07fe5d8c07612299dceb7 +Author: Pino Toscano +Date: Wed Aug 28 17:04:48 2013 +0200 + + xfree86/hurd: include + + Needed for using get_privileged_port. + + Signed-off-by: Pino Toscano + Acked-by: Samuel Thibault + Signed-off-by: Julien Cristau + +commit f0659a7f68a5a334879af01a6a63742eab1bf5de +Author: Keith Packard +Date: Fri Oct 4 16:44:46 2013 -0700 + + Bump version to 1.14.99.2 + + Signed-off-by: Keith Packard + +commit f2d149b6d10edea7233d93c7e19f71decf11dc62 +Author: Keith Packard +Date: Fri Oct 4 16:43:41 2013 -0700 + + kdrive/ephyr: Remove duplicate ephyrExtensions and ephyrExtensionInit decls + + These were duplicated when GLX support was re-added on two different branches. + + Signed-off-by: Keith Packard + +commit e0a678f0596f3547b98d74d5f0438b484b059458 +Author: Gaetan Nadon +Date: Sat Sep 28 15:26:38 2013 -0400 + + xfree86: add a comment as to why the logdir is created + + Without the logdir, the xserver will write the content of the log file on the + terminal stating that it cannot be written and will stop. + + Refer to https://bugs.freedesktop.org/show_bug.cgi?id=3889 + + Reviewed-By: Matt Dew + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 5bdbf2dba3f7da4a593b286020eab0c7857e940c +Author: Gaetan Nadon +Date: Sat Sep 28 15:26:37 2013 -0400 + + xfree86: Use $(MKDIR_P) for better code portability + + Still true that we should not use the lower case $(mkdir_p) version. + However, remove the 2005 comment as the MKDIR_P is widely used now. + + Reviewed-By: Matt Dew + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit b8cfb0dc8426754b477b561bc158b8a24c143ddf +Author: Gaetan Nadon +Date: Sat Sep 28 15:26:36 2013 -0400 + + Uninstall X link and CYGWIN libXorg.exe.a in local install targets + + It is our duty to uninstall any files and/or directories that we installed + through install-data-local and install-exec-hook. + + Currently the X symbolic link to Xorg remains on disk after running + make uninstall. + + Note the exception for logdir which is usually shared by other modules. + + Reviewed-By: Matt Dew + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 35a528e49269c3df75486cc606e51a8c1c083c06 +Author: Gaetan Nadon +Date: Sat Sep 28 15:26:35 2013 -0400 + + Xorg binary: use install-exec-hook rather than install-exec-local + + The former was explicitly designed to execute additional code after the binary + has been installed. The latter can be executed in any order, hence it's + current dependency on install-binPROGRAMS as a workaround. + + The CYGWIN libXorg.exe.a target is an installation target rather than + a post-installation one, so it should not be done as a hook. It does not depend + on the Xorg executable being installed. + + Automake: + "These hooks are run after all other install rules of the appropriate type, + exec or data, have completed. So, for instance, it is possible to perform + post-installation modifications using an install hook". + + "With the -local targets, there is no particular guarantee of execution order; + typically, they are run early, but with parallel make, there is no way + to be sure of that". + + Reviewed-by: Eric Anholt + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit a1d87576a30008253eb0cc92b44c9718f6665062 +Author: Gaetan Nadon +Date: Sat Sep 28 15:26:34 2013 -0400 + + Use $(LN_S) provided by AC_PROG_LN_S macro to create links + + For better code portability. + + Reviewed-By: Matt Dew + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 28c8e1910797970dbf1d40794f1804a8fcc812bc +Author: Gaetan Nadon +Date: Sat Sep 28 15:26:33 2013 -0400 + + The Xorg binary is missing the extension $(EXEEXT) in the makefile + + This is not a problem on UNIX platforms, but on CYGWIN it creates a broken + link to Xorg rather than a link to Xorg.exe. + + From the CYGWIN log on tinderbox, we can see that the executable Xorg.exe is + installed correctly. We can see the command used to create the link: + + (cd /jhbuild/install/[...]/install/bin && rm -f X && ln -s Xorg X) + + Note that the "relink" makefile target correctly appends $(EXEEXT) to Xorg. + + Reviewed-By: Matt Dew + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit f3b529bf25db2700addbafc7aa4fc5b126ba9929 +Merge: 4399bd3 abc2bfc +Author: Keith Packard +Date: Fri Oct 4 14:04:48 2013 -0700 + + Merge remote-tracking branch 'anholt/ephyr-fixes' + +commit 4399bd38326b81f7b92365346504d7c6354772a9 +Author: Gaetan Nadon +Date: Mon Sep 30 13:30:46 2013 -0400 + + miext/shadow: missing c2p_core.h breaks "make distcheck" target. + + Reviewed-by: Julien Cristau + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 9ccb4a63982942fdce19609d2cadbd8e51708462 +Merge: 5d2ec69 da5e201 +Author: Keith Packard +Date: Fri Oct 4 13:54:55 2013 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 5d2ec6933f6bb5116666ca1bfb07f0f20bf2a0b5 +Merge: 7d3d4ae 6ee4d9f +Author: Keith Packard +Date: Fri Oct 4 13:50:04 2013 -0700 + + Merge remote-tracking branch 'ajax/xserver-next' + +commit da5e20127a5b6e11a47eb6e61f3ea87b056cdf5f +Author: Gaetan Nadon +Date: Thu Sep 19 19:13:35 2013 -0400 + + test: add new os executable to .gitignore + + Signed-off-by: Gaetan Nadon + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit c73c36b537f996574628e69681833ea37dec2b6e +Author: Laércio de Sousa +Date: Wed Sep 18 13:42:17 2013 -0300 + + xserver: enable InputClass option "GrabDevice" by default for non-seat0 seats (#69478) + + This patch contributes to fill the remaining gaps which make + systemd-multi-seat-x wrapper still necessary in some multiseat setups. + + This also replaces previous evdev patch that does the same thing + for that particular driver. + + When option "-seat" is passed with an argument different from "seat0", + option "GrabDevice" for input devices is enabled by default + (no need of enabling it in xorg.conf's "InputClass" section). + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69478 + + Signed-off-by: Laércio de Sousa + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 160c2db32d0b9ee5316a44179a6af4f4722e3d0a +Author: Peter Hutterer +Date: Wed Sep 18 16:04:44 2013 +1000 + + dmx: provide enough space for axis mappings + + relmap/absmap is used as a evdev-axis-to-x-axis mapping. ABS_X maps to + axis 0, ABS_Y to 1, etc. skipping over non-existing axes so that the third bit + set in the ABS_* range is axis 2, and so on. This requires us to actually have + enough space to have all the ABS_*/REL_* range. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 7d3d4ae55dd6ee338439e2424ac423b1df80501b +Author: Keith Packard +Date: Fri Sep 20 14:43:41 2013 -0500 + + damage: Must translate initial window damage by window offset + + Damage is reported relative to the drawable origin, but the window + borderClip is absolute. Translate the region by the window position + before reporting damage to adjust. + + Reported-by: Adam Jackson + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 8010d3a48bd0b224dcb0883e39c2351ad364d846 +Author: Jeremy Huddleston Sequoia +Date: Sun Sep 15 08:10:33 2013 -0700 + + XQuartz: pbproxy: Fix build with -DDEBUG + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 39c548da0cf0522ad246630605b96751ab6d39c0 +Author: Jeremy Huddleston Sequoia +Date: Sun Sep 15 08:07:44 2013 -0700 + + XQuartz: Fix build with moved pseudoramiX + + Regression from: e716baedc4d8e52a60f43ef21aba771b340d8c8b + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Jon TURNEY + +commit 6ee4d9f94ae2cc27c39381d7554134d9b4807a65 +Author: Adam Jackson +Date: Tue Jul 9 11:19:11 2013 -0400 + + glx: Fill in some missing attributes from DoGetFBConfigs + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit b257fabff00ae925bb7e70364dd1d738634087c9 +Author: Adam Jackson +Date: Thu Jul 4 10:31:40 2013 -0400 + + glx: Remove a dead comment + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit abd086502123086ce3d1fba25c159bb022d2750f +Author: Adam Jackson +Date: Mon Jul 8 17:01:13 2013 -0400 + + glx: Catch another failure case in drawable creation + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit c3c976f54c3c282d6fa6c8360688e036bc43d210 +Author: Adam Jackson +Date: Mon Jul 8 12:28:56 2013 -0400 + + glx: Remove screen number from __GLXconfig + + Not used. There's no real reason to match against this instead of + matching against fbconfig or visual ID anyway. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 1d1484e9bd55d1fa8316b1574754f28d5d31a076 +Author: Adam Jackson +Date: Mon Jul 8 12:09:13 2013 -0400 + + glx: Remove pixmapMode from __GLXconfig + + This has never been filled in with anything meaningful afaict, and you + can't get to it from the client in any event. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 34e6e60105796ad015469c10921c5ff09acf7eb0 +Author: Adam Jackson +Date: Tue Jul 2 12:33:36 2013 -0400 + + glx: Remove support for NV_vertex_program and NV_fragment_program + + Mesa doesn't implement these anymore, never really did outside of swrast + anyway. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit acf14c1de766c4ea206cd7ce7f25b780a589d33c +Author: Adam Jackson +Date: Tue Jul 2 10:35:19 2013 -0400 + + glx: realloc style fix in RenderLarge + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 9ebf739a6864c9ec38bf72f63ef2e3b9cd1951db +Author: Adam Jackson +Date: Tue Jul 2 10:30:40 2013 -0400 + + glx: Eliminate a small malloc from QueryContext + + No reason to have that be a failure path. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit b99f7975407f111b99d772cd28224d7dc1b34fe4 +Author: Adam Jackson +Date: Fri Nov 9 18:05:27 2012 -0500 + + glx: Handle failure to create the pixmap backing the pbuffer + + We happen not to sanitize the width/height we pass to CreatePixmap here, + oops. It's not exploitable, but it's certainly a crash, so let's just + throw BadAlloc instead. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 22fbfdcb31f335c22053a0e29f0e73c03cd70a76 +Author: Adam Jackson +Date: Fri Nov 9 17:52:12 2012 -0500 + + glx: Implement GLX_PRESERVED_CONTENTS drawable attribute + + We back pixmaps with pbuffers so they're never actually clobbered. Say + so when asked. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 2e20b8382cdf37ae5a2802f85b8f06a370f9645d +Author: Adam Jackson +Date: Fri Nov 9 17:12:49 2012 -0500 + + glx: Implement GLX_FBCONFIG_ID in GetDrawableAttributes + + Required by GLX 1.4, section 3.3.6, "Querying Attributes". + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 0d76191baeee005982754ac18ca995742e32d8c1 +Author: Adam Jackson +Date: Fri Nov 9 17:10:57 2012 -0500 + + glx: Implement GLX_{WIDTH,HEIGHT} in GetDrawableAttributes + + Required by GLX 1.4, section 3.3.6, "Querying Attributes". + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit d11f13e383dda1e9cabe32793d261d46edc44418 +Author: Adam Jackson +Date: Fri Nov 9 17:07:20 2012 -0500 + + glx: Compute number of attributes in GetDrawableAttributes on the fly + + This doesn't have any effect yet, but is needed to properly build the + reply for pbuffers. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 468b57324f838144d79e3a9d85a0bde853578c4b +Author: Adam Jackson +Date: Fri Nov 9 16:48:16 2012 -0500 + + glx: Style fixes + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 2b181ad0952851f47f23dcb1a36471685313c13e +Author: Adam Jackson +Date: Fri Nov 9 16:33:54 2012 -0500 + + glx: Pull GLX vendor string out of __GLXscreen + + Given how we're currently implementing GLX this can't meaningfully vary + per-screen. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit b9c489cf13e1ad35b7d9bea9de8d85e929374d17 +Author: Adam Jackson +Date: Wed Oct 31 10:05:24 2012 -0400 + + glx: Remove unused bits from the context struct + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit f579cc85c29f52b575c62e6ae1e16eb87c506bd3 +Author: Adam Jackson +Date: Thu Jul 4 10:08:40 2013 -0400 + + glxproxy: Don't track GLCLientm{aj,in}orVersion + + Basically just a port of 62f06b0d to glxproxy. + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit e549ffb5f19cf044bc3e2d368a6f081f8b84bfaa +Author: Adam Jackson +Date: Tue Oct 30 18:20:43 2012 -0400 + + dmx/glx: Remove unused __glXNop + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit d962b8ed272d4a8921c0dadf16cd926484e30d10 +Author: Adam Jackson +Date: Thu Aug 22 16:42:23 2013 -0400 + + damageext: Style fix + + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit c90add0f1ce0c85aea7a60635de765848d778266 +Author: Adam Jackson +Date: Wed Aug 21 11:57:24 2013 -0400 + + damage: Remove "post-rendering" hooks + + This is a revert of 974db58f5b730c3770ee461665a02dd4334d1dea. There are + no consumers of this API, we must not need it. + + Reviewed-by: Chris Wilson + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 0f3f8e4295d4c05f33b93e0ffd2f6f8cd5759bf7 +Author: Adam Jackson +Date: Wed Aug 21 11:13:11 2013 -0400 + + damage: Don't rewrite Text ops to GlyphBlt ops + + There's no particularly good reason to, and it breaks Xnest. + + Bugzilla: http://bugs.freedesktop.org/2454 + Reviewed-by: Chris Wilson + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit d08966227e7d567df8d26eebc80f35f886e59a4a +Author: Adam Jackson +Date: Mon Aug 26 14:03:51 2013 -0400 + + damage: Simplify DamageUnregister + + You can only register one drawable on a given damage, so there's no + reason to require the caller to specify the drawable, the damage is + enough. The implementation would do something fairly horrible if you + _did_ pass mismatched drawable and damage, so let's avoid the problem + entirely. + + v2: Simplify xf86RotateDestroy even more [anholt] + + Reviewed-by: Chris Wilson + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit 28708a045de7d9043d20fb06b61c44a46eb5526b +Author: Adam Jackson +Date: Mon Aug 26 13:52:14 2013 -0400 + + damage: Implicitly unregister on destroy + + There's no reason not to, and it simplifies quite a few callers. + + Reviewed-by: Chris Wilson + Reviewed-by: Eric Anholt + Signed-off-by: Adam Jackson + +commit e657635dbe6b92875b0e88370557c2cbab673a49 +Author: Adam Jackson +Date: Thu Oct 18 14:24:23 2012 -0400 + + fb: Remove unused compatibility wrappers + + Originally added in early 2009, not being used elsewhere anymore. + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit e4b15125bb06c97f1f34f7074fcdb597e718399c +Author: Adam Jackson +Date: Thu Oct 18 14:24:22 2012 -0400 + + mipointer: Remove deprecated miPointerCurrentScreen + + The only remaining use was in some debugging code in DMX. + + Reviewed-by: Peter Hutterer + Reviewed-by: Mark Kettenis + Signed-off-by: Adam Jackson + +commit b5d66b9513a0f1e13f5c5bc9e0958f4eac9bf6c3 +Author: Adam Jackson +Date: Thu Oct 18 14:24:21 2012 -0400 + + xfree86: Remove deprecated unimplemented xf86MapReadSideEffects + + Reviewed-by: Peter Hutterer + Reviewed-by: Mark Kettenis + Signed-off-by: Adam Jackson + +commit abbd85742a390e18497b96902a0c0d976739e3bd +Author: Adam Jackson +Date: Thu Oct 18 14:24:20 2012 -0400 + + dix: FIXES is not optional + + It's already not optional at configure time, this just makes it so at + build time too. + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit dff81687f5eac3eac9b49f58d4654cc30add2547 +Author: Adam Jackson +Date: Thu Oct 18 14:24:19 2012 -0400 + + vbe: Don't try to load the ddc submodule + + DDC is built into the server now. + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit bb82191bcfa8042f8d98ec8b1c6616dc31d2c5c8 +Author: Adam Jackson +Date: Thu Oct 18 14:24:18 2012 -0400 + + misprite: Delete some dead private storage + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit 3639ab4ce25dc82a3f8592b7322198f1d2aca5f9 +Author: Adam Jackson +Date: Tue Oct 16 14:56:25 2012 -0400 + + dri2: Don't bother with xf86LoaderCheckSymbol("DRI2Connect") + + The DRI2 code is now built-in to the server, even for Xorg. The only + thing this could protect against is trying to run a libglx built with + DRI2 support against an Xorg built without it, which is firmly in + "doctor it hurts when I do this" territory. + + Reviewed-by: Peter Hutterer + Reviewed-by: Ian Romanick + Signed-off-by: Adam Jackson + +commit 13b507409f9e01adebba50e7eb801b52e52692ba +Author: Adam Jackson +Date: Tue Oct 16 14:56:23 2012 -0400 + + list: Avoid using X types + + In particular, Bool. This is not an ABI break: + + /usr/include/X11/Xdefs.h:typedef int Bool; + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit dbe10ef0e35659ee0e5db73f29670a3894a3e3f5 +Author: Adam Jackson +Date: Tue Oct 16 14:56:22 2012 -0400 + + dbe: Fold the window private private into the window private + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit 1489637d567b0034a916f88079b5f360e7fce99c +Author: Adam Jackson +Date: Tue Oct 16 14:56:21 2012 -0400 + + dbe: Fold midbe reset into dix + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit 44d770750069486a8452fb2384f9b85745268e61 +Author: Adam Jackson +Date: Tue Oct 16 14:56:20 2012 -0400 + + dbe: Drop the unused idiom support + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit 8cce0cf4d378f6fa52bc2cd277737b8986ab683c +Author: Adam Jackson +Date: Tue Oct 16 14:56:19 2012 -0400 + + damage: Remove the 'damage window' resource type. + + Note that the existing code never actually creates a resource of this + type, so it can't possibly do anything. This is clearly meant to track + window destruction and clean up any associated Damages, but that's + already handled by miext/damage's DestroyWindow wrapper. + + Previous discussion: + http://lists.freedesktop.org/archives/xorg-devel/2011-March/020847.html + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit e674815e0a217ac01ec2d6a8517f8466b27fb39f +Author: Adam Jackson +Date: Tue Oct 16 14:56:18 2012 -0400 + + dmx: Remove ShadowFB support + + This has been listed as deprecated ever since DMX was merged. + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit 19d3a7cb5db3188210830efa746987ba50d839e9 +Author: Adam Jackson +Date: Tue Oct 16 14:56:17 2012 -0400 + + dix: Remove a dead parameter from DoGetImage + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit 4dca026880da90cff9734cf5787c5b57c02e7310 +Author: Adam Jackson +Date: Tue Oct 16 14:56:16 2012 -0400 + + mipointer: Remove EnqueueEvent from miPointerScreenFuncRec + + No DDX overrode this, and we never actually called through that slot + anyway. + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit ad076dc6e82019defa422500710b3b42c6309e39 +Author: Adam Jackson +Date: Tue Oct 16 14:56:15 2012 -0400 + + mipointer: Flatten calls to mieqSwitchScreen + + No DDX was overriding this. + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit e2b14a1d3bb27e86ff1d7aaf59af850d06263ef5 +Author: Adam Jackson +Date: Tue Oct 16 14:56:14 2012 -0400 + + os: Factor out some common code in input buffer handling + + Reviewed-by: Peter Hutterer + Signed-off-by: Adam Jackson + +commit 65fca558848acd907483d3c85c7cd4db5560f1b4 +Author: Radek Doulik +Date: Tue Aug 13 08:45:47 2013 +0200 + + xnest: Ignore GetImage() error in xnestGetImage() + + When an Xnest instance is not viewable it will crash when a client in + that instance calls GetImage. This is because the Xnest server will + itself receives a BadMatch error. + This patch ignores the error. The application which has requested the + image will receive garbage - this however is fully legal according + to the specs as obscured areas will always contain garbage if there + isn't some sort of backing store as discussed in + https://bugs.freedesktop.org/show_bug.cgi?id=9488 + The applied patch is a version from Dadek Doulik. + + v2: Call XSync() before changing error handlers as suggested by + Daniel Stone . + + Reviewed-by: Daniel Stone + Signed-off-by: Egbert Eich + +commit b902c8abb6d03e68c93e13881a350523b5ac900c +Author: Michal Srb +Date: Tue Aug 6 16:56:53 2013 +0200 + + Xnest: Implement xnestModifyPixmapHeader + + Xnest variant of ModifyPixmapHeader that creates new Pixmap in parent X + server if it's size is modified from 0x0 to anything bigger. + + xnestCreatePixmap doesn't create pixmap in parent X server if it has + dimensions 0x0. If it is later resized and accessed, Xnest will be + aborted with BadDrawable error from parent X server because it will + use XID 0. This happens with ScratchPixmap, for example as used from + XaceCensorImage. Applications using XACE crash Xnest. + + Reviewed-by: Adam Jackson + +commit 132507eba93e4dfd466d5c30c9b818cdc6f8536e +Author: Peter Harris +Date: Mon Jul 15 19:44:45 2013 -0400 + + security: Don't count RetainPermanent clients twice + + If a RetainPermanent client is subsequently killed by a KillClient + request, the reference count is decremented twice. This can cause the + server to prematurely kill other clients using the same Authorization. + + Reviewed-by: Adam Jackson + Signed-off-by: Peter Harris + +commit 20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10 +Author: Peter Harris +Date: Mon Jul 15 19:44:29 2013 -0400 + + mi: Avoid stack smash when drawing dashed lines + + X.org Bug 54013 + + Reviewed-by: Adam Jackson + Signed-off-by: Peter Harris + +commit 9bf46610a9d20962854016032de4567974e87957 +Author: Chris Wilson +Date: Fri Jun 21 22:58:31 2013 +0100 + + os: Immediately queue initial WriteToClient + + If we immediately put the WriteToClient() buffer into the socket's write + queue, not only do we benefit from sending the response back to client + earlier, but we also avoid the overhead of copying the data into our own + staging buffer and causing extra work in the next select(). The write is + effectively free as typically we may only send one reply per client per + select() call, so the cost of the FlushClient() is the same. + + shmget10: 26400 -> 110000 + getimage10: 25000 -> 108000 + + shmget500: 3160 -> 13500 + getimage500: 1000 -> 1010 + + The knock-on effect is that on a mostly idle composited desktop, the CPU + overhead is dominated by the memmove in WriteToClient, which is in turn + eliminated by this patch. + + Reviewed-by: Adam Jackson + Signed-off-by: Chris Wilson + +commit ceffb34774d44ada83cc1994d20c8d65b46bd555 +Author: Laurent Carlier +Date: Sat Jun 8 00:43:56 2013 +0200 + + ephyr: restore GLX support + + It was removed since version 1.13 + + Signed-off-by: Sebastien Bacher + Acked-by: Daniel Stone + +commit f37972f4a67b49ba9649310a6778bd1bf31e0130 +Author: Keith Packard +Date: Wed Apr 24 14:58:27 2013 -0700 + + miext/sync: Fix multi-screen support in SyncFence initialization + + miSyncSetup was checking to see if the screen private key had been + registered, and if so, skipping the setup of the provided screen. + + Instead, it should register the private index only once, but then + initialize the screen unless it has already been initialized. This + latter step allows drivers to initialize the sync private structures + before the Sync extension itself is initialized. + + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 1c8beedfe4343377fa3504f8ab71430cc137b22c +Author: Adam Jackson +Date: Wed Aug 21 14:12:52 2013 -0400 + + randr: Fix a copypasta bug in CRTC confinement + + Reviewed-by: Michel Dänzer + Signed-off-by: Adam Jackson + +commit 47ff382d1fce25a8b097d45b79489e891f1f1228 +Merge: 6f89ae3 3752a81 +Author: Keith Packard +Date: Mon Sep 9 15:13:42 2013 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 6f89ae3e64c4dfeea508813e546c10ba1da3ea8e +Author: Thomas Klausner +Date: Wed Sep 4 20:06:07 2013 +0200 + + Fix typo in configure warning. + + Signed-off-by: Thomas Klausner + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 47218a6e09549781fd61dbf5e0d3d5c81da64323 +Author: Thomas Klausner +Date: Wed Sep 4 20:05:51 2013 +0200 + + Fix bug in cursor handling. + + CreateCursor (Xlib call XCreatePixmapCursor) with a non-bitmap + source pixmap and a None mask is supposed to error out with BadMatch, + but didn't. + + From der Mouse , changed following + comments by Alan Coopersmith . + + Signed-off-by: Thomas Klausner + Reviewed-by: Jasper St. Pierre + Signed-off-by: Peter Hutterer + +commit 1110b71e360195aab040d835b54540ab558638c5 +Author: Chris Clayton +Date: Wed Sep 4 15:42:04 2013 +1000 + + kdrive: fix build error on gcc 4.8 for out-of-bounds array access + + I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot + of gcc-4.8: + + input.c:225:43: error: array subscript is above array bounds + [-Werror=array-bounds] + + This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in + KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can + be beyond the end of the array. + + Signed-off-by: Chris Clayton + Reviewed-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit abc2bfca16adcd1e5657d4ce54f4e1335d5ed53f +Author: Sebastien Bacher +Date: Fri Aug 23 21:21:44 2013 +0200 + + kdrive: initialize GLX for xephyr + + Like commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29, re-add + initialization of GLX after it was accidentally dropped from non-Xorg + servers in 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86. + + Signed-off-by: Sebastien Bacher + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62346 + Reviewed-by: Eric Anholt + Reviewed-by: Adam Jackson + Reviewed-by: Julien Cristau + Signed-off-by: Eric Anholt + +commit aa5534ec6931ffcc81cca76b98785d57de8e0e52 +Author: Eric Anholt +Date: Fri Aug 23 11:23:00 2013 -0700 + + ephyr: Do grab/ungrab for ctrl+shift, not just shift+ctrl. + + Given that the window title says "ctrl+shift", having pressing those + keys in that order not ungrab you is fairly mean. + + Signed-off-by: Eric Anholt + Reviewed-by: Adam Jackson + Reviewed-by: Julien Cristau + +commit 5cc15e1c427bacd73db7381df3474a23f7616624 +Author: Eric Anholt +Date: Fri Aug 23 11:19:17 2013 -0700 + + ephyr: Flush the X connection when updating the window title. + + Otherwise when you're doing the ctrl-shift mouse grab thing, you + don't know what state you're in until the next rendering occurs. + + Signed-off-by: Eric Anholt + Reviewed-by: Adam Jackson + Reviewed-by: Julien Cristau + +commit ba387cf21f7d95987211f75d8024601e7d64e322 +Author: Eric Anholt +Date: Fri Aug 23 11:17:14 2013 -0700 + + ephyr: Use host (HW) cursors by default. + + Unless you're working on the sw cursor rendering code, you surely want + to have real hardware cursors. + + Signed-off-by: Eric Anholt + Reviewed-by: Adam Jackson + Reviewed-by: Julien Cristau + +commit 0f5a2f13dc284dd5f0f28e2c4323b2e08d253a7d +Author: Eric Anholt +Date: Fri Aug 23 11:04:22 2013 -0700 + + ephyr: Garbage collect some DOA host window clipping code. + + Introduced in 79782726617d4b5a4f9b376f21936d035fc870e1 but never used. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 090de17d361dc9828203a2562565d6499998db46 +Author: Eric Anholt +Date: Fri Aug 23 10:56:22 2013 -0700 + + ephyr: Garbage collect some dead XV clipping code. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 347d0fa6961c2b3dc4efd4e7cca8ef98cd3ea06e +Author: Eric Anholt +Date: Fri Aug 23 10:44:23 2013 -0700 + + ephyr: Remove the helper libs for each of the optional components. + + Note that EXTRA_DIST was always unnecessary, because automake notices + conditional compile of source files and includes them. + + Copyright header is added because git noted that this was a 61% + rewrite. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 74dff87790dbb3dcb23634f1e8cd54018e5ddc9d +Author: Eric Anholt +Date: Fri Aug 23 10:40:52 2013 -0700 + + ephyr: Remove the remaining bits of host/server XV split. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 2f994dfe9d1add9ea8cb9c88ddb0d15843854788 +Author: Eric Anholt +Date: Fri Aug 23 10:14:36 2013 -0700 + + ephyr: Remove the host/server split of the actual XV video operations. + + I suspect there's more cleanup possible in ephyrHostXVPutImage() by + sticking a bunch of the args in the port priv earlier. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 0b7ce74315213ccd31802847e5a83e67090ded14 +Author: Eric Anholt +Date: Fri Aug 23 10:01:23 2013 -0700 + + ephyr: Remove another host/server split for XV image formats. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 1dcc28bcb402d7286d18b41b469062a5c176d7eb +Author: Eric Anholt +Date: Thu Aug 22 17:00:41 2013 -0700 + + ephyr: Remove the host/server split for video encodings. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 28a37757e11068b4594f4128a0d64c6bc9a53ee0 +Author: Eric Anholt +Date: Thu Aug 22 17:26:21 2013 -0700 + + ephyr: Remove the host/server split for XV formats. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 41134d393a37dd5b971b018a3888fbfea0b9c736 +Author: Eric Anholt +Date: Thu Aug 22 17:21:37 2013 -0700 + + ephyr: Remove the host/server split for XV attributes. + + v2: Fix leaks of xcb replies (caught by Julien) + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 1342a93c49beb6e4924534304119d57fa587ad0f +Author: Eric Anholt +Date: Thu Aug 22 17:26:08 2013 -0700 + + ephyr: Remove the host/server split for XV adaptors. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit fad79d2e3e53de4f25b3d1dd7accb558464a4a46 +Author: Eric Anholt +Date: Sun Aug 18 20:08:32 2013 +0200 + + ephyr: Refactor XV adaptor feature detection. + + This obviously wanted a helper function beforehand, but even more so + now that we have XCB. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 7a9c311add62026972419ef0b04a55680072bfeb +Author: Eric Anholt +Date: Sun Aug 18 20:02:53 2013 +0200 + + ephyr: Remove some pointless indirection in the XV code. + + Now that we have XCB on the server side, we don't need to split these + functions out. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b +Author: Eric Anholt +Date: Sun Aug 18 18:38:29 2013 +0200 + + ephyr: Move event processing into ephyr.c. + + No more extra event structure to translate between hostx.c and + ephyr.c! + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 847c856effde482c13cdefcdca8176cee3bf67c4 +Author: Eric Anholt +Date: Sun Aug 18 17:28:08 2013 +0200 + + ephyr: Move the host screen info into the kdrive screen private. + + We can include xcb bits from the same place as server headers, so + there's no need to hide them any more. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 8dadc78e233f341f1ecb8d404de03d98ab210620 +Author: Eric Anholt +Date: Sun Aug 18 16:45:06 2013 +0200 + + ephyr: Rename and use the proper type for what was host_screen->info. + + Now that we can include server headers in talking to host X, we don't + need to hide any more. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 18d836f6dde46bcac8b794d34f76032688c28851 +Author: Eric Anholt +Date: Sun Aug 18 14:12:45 2013 +0200 + + ephyr: Expose a single function for detecting extensions. + + v2: Fix trying to include xcb-dri in the non-dri-build case (Noted by + Julien) + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 3aacb22d6473480c31fb08f0b2527747dbf5be57 +Author: Eric Anholt +Date: Sun Aug 18 14:01:53 2013 +0200 + + ephyr: Drop dead ephyrHostAtomToLocal code. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 4aaad0bfbcef018eb36839b1d034c3f60022694a +Author: Julien Cristau +Date: Wed Oct 20 20:10:43 2010 +0200 + + Xephyr: we're not using Xlib anymore, no need to undef _XSERVER64 + + Drop obsolete comments about interaction between Xlib code and that + macro, and stop undefining it. + + Signed-off-by: Julien Cristau + Reviewed-by: Eric Anholt + +commit 0fc2f9f04a44599f598380d4df992bec60c0e3a1 +Author: Julien Cristau +Date: Sat Sep 25 16:05:07 2010 +0200 + + Xephyr: handle errors in event loop + + Signed-off-by: Julien Cristau + Reviewed-by: Eric Anholt + Reviewed-by: Mikhail Gusarov + +commit 3309a73c826f02c4b2e14180a3254546314ec323 +Author: Julien Cristau +Date: Fri Jun 25 14:20:57 2010 +0100 + + Xephyr: drop remaining Xlib dependency + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit 7da2174cf93f59b7e0372a6dc9d37a510076e187 +Author: Julien Cristau +Date: Mon Jun 21 14:39:03 2010 +0100 + + Xephyr: move glx code to xcb + + v2: Rebase on master, notably adding XCB for + X_GLXvop_MakeCurrentReadSGI (anholt). + v3: Fix use-after-free (caught by Julien). + + Reviewed-by: Mikhail Gusarov (v1) + Signed-off-by: Julien Cristau + Signed-off-by: Eric Anholt + +commit 19c2699b954e2978301c4449dfccc7ca40bf6ae6 +Author: Julien Cristau +Date: Wed Jun 23 18:36:00 2010 +0100 + + Xephyr: remove unused DRI1 code + + Reviewed-by: Mikhail Gusarov + Signed-off-by: Julien Cristau + +commit 68b7db19e8d3c1ac55a811327d3058f4c8fb45ec +Author: Julien Cristau +Date: Sun Jun 20 00:07:08 2010 +0100 + + Xephyr: move ephyrdri over to xcb + + Require new xcb-xf86dri to get fixed GetDrawableInfo. + + Reviewed-by: Mikhail Gusarov + Signed-off-by: Julien Cristau + +commit aea119cd05807ed77336f96a40f8e4607c6ce169 +Author: Julien Cristau +Date: Sun Jun 20 11:13:26 2010 +0100 + + Xephyr: use xcb-xv instead of libXv + + v2: Massive, conflict-filled rebase. I think I resolved everything + right, but this host xv code makes my eyes bleed. Touch-tested XV + after the rebase (anholt). + + Reviewed-by: Mikhail Gusarov (v1) + Signed-off-by: Julien Cristau + Signed-off-by: Eric Anholt + +commit 3ea75a59d5fec3c4099388724942e216f2344328 +Author: Julien Cristau +Date: Mon Jun 21 17:20:32 2010 +0100 + + Xephyr: use xcb for event handling + + v2: Rebase on indentation changes, squash in a simpler variant of the + later event compression patch, fix server hang or segfault on + window close by reimplementing the x_io_error_handler in the new + XCB event loop (anholt). + + Reviewed-by: Mikhail Gusarov (v1) + Signed-off-by: Julien Cristau + Signed-off-by: Eric Anholt + +commit ff26845252889f7cc3258a0d3aa116189acc6aae +Author: Julien Cristau +Date: Thu Jun 24 23:45:16 2010 +0100 + + Xephyr: some more hostx.c xcb-ification + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit 9b55f76a265aab0d9943a40208a38800e5782ba5 +Author: Julien Cristau +Date: Thu Jun 24 23:35:15 2010 +0100 + + Xephyr: move HostX.visual to xcb + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit 126312fb4a6e06024a306341e675163108426390 +Author: Julien Cristau +Date: Thu Jun 24 23:26:48 2010 +0100 + + Xephyr: replace XKeycodeToKeysym with xcb-keysyms + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit 8543d3fdfd47d2a0423f3ef8e7429c23c5d6b053 +Author: Julien Cristau +Date: Thu Jun 24 23:17:32 2010 +0100 + + Xephyr: delete unused hostx_get_extension_info function + + v2: Also remove the prototype (anholt) + + Reviewed-by: Mikhail Gusarov (v1) + Signed-off-by: Julien Cristau + Signed-off-by: Eric Anholt + +commit d72c11b9df4a98fd80cb6635d34964483e33bc41 +Author: Julien Cristau +Date: Mon Jun 21 14:25:11 2010 +0100 + + Xephyr: delete unused proxy code + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit a71ea3f96769da157dde82a591e43264820772ac +Author: Julien Cristau +Date: Sun Jun 20 23:34:54 2010 +0100 + + Xephyr: xcb-ify visual list construction + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit ac2b0348c00d692ec1bd8d6c8ab99e9198e755a7 +Author: Julien Cristau +Date: Sun Jun 20 23:34:39 2010 +0100 + + Xephyr: xcb-ify pointer/keyboard grab + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit 1f93e6b350d1b9a058009052a666a2e8796708cb +Author: Julien Cristau +Date: Sun Jun 20 23:34:03 2010 +0100 + + Xephyr: no need for XDisplayKeycodes + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit 73398e5bf61c30e69a40a19a1057c2263fbb91ef +Author: Julien Cristau +Date: Thu Jun 24 23:00:38 2010 +0100 + + Xephyr: use xcb-shape instead of XShape* + + Reviewed-by: Mikhail Gusarov + Reviewed-by: Eric Anholt + Signed-off-by: Julien Cristau + +commit a2b73da78de4e627965213d24a6c33f243a60eb6 +Author: Julien Cristau +Date: Sun Jun 20 00:05:40 2010 +0100 + + Xephyr: start converting hostx.c over to xcb + + v2: Dropped the hostx_load_keymap changes, now that that function is + gutted (anholt). + + Reviewed-by: Mikhail Gusarov (v1) + Signed-off-by: Julien Cristau + Signed-off-by: Eric Anholt + +commit 762606b4cdfb57c5202ae128ce4dbb8afe172d4e +Author: Julien Cristau +Date: Fri Jun 25 17:59:13 2010 +0100 + + Xephyr: stop loading the host's keymap + + This isn't used anywhere. + + v2: Rebase to the top of the patch series (anholt) + + Reviewed-by: Mikhail Gusarov (v1) + Signed-off-by: Julien Cristau + Signed-off-by: Eric Anholt + +commit 3752a815800626ae93f64a856f5889aa6636344e +Author: Marc Haesen +Date: Sat Aug 10 17:38:38 2013 +0100 + + hw/xwin: Remove unnecessary and incorrect HWND casts + + Signed-off-by: Marc Haesen + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 34932cef6cc800fbdf2f375506057ed8cd1e07f6 +Author: Jon TURNEY +Date: Mon Apr 1 13:43:00 2013 +0100 + + hw/xwin: Fix compilation of winauth.c with -Werror=implicit-function-declaration + + /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c: In function ‘MitGenerateCookie’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c:87:5: error: implicit declaration of function ‘MitAddCookie’ [-Werror=implicit-function-declaration] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit 2a08554a0bf80b862c15676c31ecd463b616518c +Author: Jon TURNEY +Date: Mon Jun 17 23:54:01 2013 +0100 + + hw/xwin: Remove unused extern g_fUseUnicode from winclipboardwndproc.c + + Signed-off-by: Jon TURNEY + Reviewed-by: Marc Haesen + +commit 69401f38a697c941ea58351028f4cd4b810f9188 +Author: Jon TURNEY +Date: Mon Jun 17 18:37:26 2013 +0100 + + hw/xwin: Remove unneeded forward declaration of winProcessXEventsTimeout() + + Remove unneeded forward declaration of winProcessXEventsTimeout(), the actual + definition immediately follows. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit 9c45a1ad44f12ac25e1c3b7a18a3bceb85a2cf38 +Author: Jon TURNEY +Date: Mon Jun 17 16:58:47 2013 +0100 + + hw/xwin: Remove prototype for non-existent winDeinitClipboard() + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit acc46fc217352b94f77a6b5b14808ea89875a2a1 +Author: Jon TURNEY +Date: Mon Jun 17 00:40:13 2013 +0100 + + hw/xwin: Remove unused externs from winclipboardwrappers.c + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit fcc7767f8cd6c318861b1060ef6a3936750a0dd2 +Author: Jon TURNEY +Date: Mon Jun 10 17:31:12 2013 +0100 + + hw/xwin: Remove unused winProcQueryTreeOrig variable + + Unused since 47c7b6d3e626497747ae2780f259a15b8e6c846f "Remove no-longer needed + tricks used to prevent the clipboard client from being killed" + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit 8fa882a980abea6f05b4b59447a187aea2c793a1 +Author: Jon TURNEY +Date: Sat Aug 10 12:41:07 2013 +0100 + + hw/xwin: Fix ARGB cursor conversion on x86_64 + + Fix erroneous use of unsigned long * for lpBits in winXCursorToHCURSOR() which + leads to ARGB cursors being vertically streched on x86_64 by interleaving blank + rows of pixels. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit 4bfb2dce5eea4923eaf86eca33b96087b28235f5 +Author: Jon TURNEY +Date: Sun Apr 7 23:59:44 2013 +0100 + + hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds + + The BITMAPINFO local only has room for a single RBGQUAD in bmiColors, but we + access two (black and white for a mono-color DIB). Fix by changing to a dynamic + allocation big enough for a BITMAPINFO and a RGBQUAD. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit 784c006adb22c6693ad30dd0b1b05369cfaa7b5e +Author: Jon TURNEY +Date: Sat Aug 10 11:55:23 2013 +0100 + + hw/xwin: Fix -Warray-bounds warning in winXCursorToHCURSOR() + + Rewrite winXCursorToHCURSOR() so access to BITMAPINFO bmiColors member doesn't + trigger an -Warray-bounds warning. + + Note that the underlying storage is allocated as a BITMAPV4HEADER, so has + sufficent room for the extra RGBQUADs bmiColors after the BITMAPINFO bmiHeader. + + wincursor.c: In function 'winSetCursor': + wincursor.c:293:24: error: array subscript is above array bounds [-Werror=array-bounds] + wincursor.c:294:24: error: array subscript is above array bounds [-Werror=array-bounds] + wincursor.c:295:24: error: array subscript is above array bounds [-Werror=array-bounds] + wincursor.c:296:24: error: array subscript is above array bounds [-Werror=array-bounds] + wincursor.c:297:24: error: array subscript is above array bounds [-Werror=array-bounds] + wincursor.c:298:24: error: array subscript is above array bounds [-Werror=array-bounds] + wincursor.c:299:24: error: array subscript is above array bounds [-Werror=array-bounds] + wincursor.c:300:24: error: array subscript is above array bounds [-Werror=array-bounds] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit 41d03c9ccce665b919b180bbb819b78c750aa325 +Author: Marc Haesen +Date: Fri Aug 2 18:19:22 2013 +0100 + + hw/xwin: Correct size of _WINDOWSWM_NATIVE_HWND property on x86_64 + + Use the correct size of a HWND on x86_64 in XChangeProperty() and + XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property. + + Signed-off-by: Marc Haesen + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 390cfec10ef7d52391f890c7593ac82a7d77d856 +Author: Colin Harrison +Date: Fri Aug 9 16:48:12 2013 +0100 + + hw/xwin: Correct winprefs.c function signatures for x64. + + Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and + HandleCustomWM_COMMAND() function signatures which use unsigned long parameters, + where just a specific HWND or HMENU handle type should have been used. + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + Reviewed-by: Marc Haesen + +commit e716baedc4d8e52a60f43ef21aba771b340d8c8b +Author: Jon TURNEY +Date: Sat Mar 31 14:42:45 2012 +0100 + + Move pseudoramiX code where it can be shared between Xwin and Xquartz + + Move pseudoramiX code to a separate top-level directory. Link Xwin and Xquartz + with libPseudoramiX + + I'm not sure moving this to a top-level directory is appropriate, but I'm not + sure where else it fits. + + Future work: pseudoramiX can probably be consolidated with the rrxinerama code + (which I think provides fake xinerama data when real XINERAMA is disabled and we + only have one screen) + + v2: fix distcheck + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit ce0217b98261dcf8b20cfb743831965dda1950ec +Author: Jon TURNEY +Date: Sat Aug 10 12:35:55 2013 +0100 + + hw/xwin: Fix winglobals.h for MinGW64 build + + Include pthread.h in winglobals.h to fix build with latest MinGW64 headers + + In file included from + winmultiwindowicons.c:47:0: + winglobals.h:92:1: error: unknown type name ‘pthread_mutex_t’ + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit b27756dbe6a1be4633ec47a8fe92a4c217f68f93 +Author: Jon TURNEY +Date: Sun Aug 11 12:15:11 2013 +0100 + + hw/xwin: Fix inclusion of shlobj.h in MinGW64 build + + Fix build with latest MinGW64 headers by wrapping Status type in shlobj.h as well + + In file included from InitOutput.c:51:0: + /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1231:44: error: expected identifier or ‘(’ before ‘int’ + /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1248:44: error: expected identifier or ‘(’ before ‘int’ + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Reviewed-by: Marc Haesen + +commit 94d4e29aedc69431fa9b299ca1b67947173d7a24 +Author: Peter Hutterer +Date: Mon Aug 26 15:51:46 2013 +1000 + + Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554) + + XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi + causes libXi to always use the new request length if the server supports + 2.2, regardless of the client's XIQueryVersion request. + + The server takes the client's XIQueryVersion request into account though, + resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a + XI 2.2+ server. + + Can't fix this in libXi, so work around this in the server. + + X.Org Bug 68554 + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + +commit 82939e02392cbb880313fe92957091ff89ce2f2b +Author: Peter Hutterer +Date: Fri Aug 16 15:30:59 2013 +1000 + + dix: check for grab type before checking XI2 mask + + if the grab type isn't XI2, grab->xi2mask is random. That random data may + have the enter/leave mask set, leading to events sent to the client that the + client can't handler. + + Source of these errors: + _xgeWireToEvent: Unknown extension 131, this should never happen. + + Simplest reproducer: + Start Xephyr, press button inside window, move out. As the pointer leaves + the Xephyr window, the errors appear. + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + +commit 16894df1ffb6fe21bf723dd954578e8d934799ca +Author: Peter Hutterer +Date: Fri Aug 16 10:55:09 2013 +1000 + + Xi: replace loop with memset + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + +commit 8f2292b683f591052da2fe94fb3831a3c9a5aa61 +Author: Peter Hutterer +Date: Fri Aug 16 11:05:49 2013 +1000 + + include: wrap EMASKSIZE in parentheses + + Otherwise things like EMASKSIZE * foo will yield interesting results. + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + +commit d803f296c616ccf55711cf0af9e7d3eae2edda16 +Author: Peter Hutterer +Date: Fri Aug 23 09:04:01 2013 +1000 + + test: fix the gcc diagnostics pragma + + pop without push restores the commandline options. The proper way is to + push, then ignore, then pop. + + And while we're at it, change the pop argument to a comment - pop ignores + the argument, but be proper about it. + + Signed-off-by: Peter Hutterer + +commit 05ea6307fa4f0bee3d3bf536396059f3906791a0 +Author: Egbert Eich +Date: Fri Aug 16 19:52:16 2013 +0200 + + DIX/Xi: Pass correct client to CheckDeviceGrabAndHintWindow() + + If we have a client which has registered for a DeviceButton grab + be sure to pass this to CheckDeviceGrabAndHintWindow(). Since the + order of clients is arbitrary there is no guarantee that the last + client in the list is the one that belongs to this class. + + Signed-off-by: Egbert Eich + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit e01a3f65d3e6d92f92ef2992b338cc9625bde082 +Author: Eric Anholt +Date: Sat Aug 17 14:50:37 2013 +0200 + + ephyr: Fix warning about XID vs unsigned long * by changing function args + + There's no reason to pass the data back out to the caller, since the + caller was dropping it on the floor. The original data is a CARD32, + so no need to mess with weird unsigned longs. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit f1cefe020bd21c07dfcc9f204e79939499abbd35 +Author: Eric Anholt +Date: Sat Aug 17 14:38:08 2013 +0200 + + ephyr: Drop is_ok logging. + + The only cases that lead to !is_ok are already EPHYR_LOG_ERROR, and it + fixes set-but-unused compiler warnings. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 77c7a2014e3942b55c0b78308edf02eab33f2e60 +Author: Eric Anholt +Date: Sat Aug 17 14:36:09 2013 +0200 + + kdrive: Fix const cast warnings in arguments processing. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 7107937e473a3557c37d719cb100b2e9b09075dd +Author: Eric Anholt +Date: Sat Aug 17 13:11:17 2013 +0200 + + kdrive: Fix const cast warnings in driver name handling. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 56c405d46a86853771a0b808da4c8a9ef626960c +Author: Eric Anholt +Date: Sat Aug 17 13:07:23 2013 +0200 + + kdrive: Fix a few easy cast warnings. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit a9c48a07eea50468fa47ab178cdd91edb0b5727f +Author: Eric Anholt +Date: Sat Aug 17 13:06:23 2013 +0200 + + kdrive: Drop dead code. + + This is unused as of the introduction of a helper in + e7150db5350bc2113ff4126019b489847a4dc217 + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 873ae962bdb7559c952b5955ba262285701982a8 +Author: Eric Anholt +Date: Sat Aug 17 13:01:57 2013 +0200 + + ephyr: Fix dead code warning. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 34af2eebe19e2f8afe35a5614d4d44fa4fd89d6b +Author: Eric Anholt +Date: Sat Aug 17 13:01:32 2013 +0200 + + ephyr: Fix const-cast warnings for setting window title. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit 7edf5066db48434739ac64e0576fbb4fdf0f37f9 +Author: Eric Anholt +Date: Sat Aug 17 12:54:33 2013 +0200 + + ephyr: Fix const cast warnings in ephyrhostvideo. + + Signed-off-by: Eric Anholt + Reviewed-by: Julien Cristau + +commit fe7463b8ce0de301c2f82b108c93963424f77219 +Author: Julien Cristau +Date: Sat Jul 27 12:09:07 2013 +0200 + + dix: add missing include for DeleteWindowFromAnySelections + + Fixes build error with XACE disabled: + window.c:886:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration] + DeleteWindowFromAnySelections(pWin); + ^ + + Debian bug#701372 + + Reported-by: Matthias Klose + Signed-off-by: Julien Cristau + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 6a49f8836a649322d38a364d9ae084be40fb2305 +Author: Keith Packard +Date: Sat Aug 17 12:17:36 2013 +0200 + + Add .dir-locals.el + + Enforce X.org style with an emacs configuration file + + Signed-off-by: Keith Packard + +commit f67d022523c59a27f3bf8791aa9ca6624318b1fd +Merge: 5a36cdd 9680f6a +Author: Keith Packard +Date: Tue Aug 6 07:12:12 2013 +0200 + + Merge commit '9680f6a12d642c2e4bfa09bf459d678214059d74' + +commit 5a36cdd91530d27627e39159a89b53f9fbb75280 +Author: Alan Coopersmith +Date: Mon Aug 5 20:46:45 2013 -0700 + + Allow disabling XFree86-DGA, DRI, VidModeExtension extensions + + Code to recognize these in extension enable/disable options was wrapped + in #ifdef XorgLoader, but that's not defined when building miinitext.c + since the great module merge of 1.13. Change to an #ifdef that is defined. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Robert Hooker + Reviewed-by: Daniel Stone + Signed-off-by: Keith Packard + +commit 9680f6a12d642c2e4bfa09bf459d678214059d74 +Author: Peter Hutterer +Date: Tue Aug 6 13:14:56 2013 +1000 + + xfree86: de-duplicate some AM_CPPFLAGS + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit bbef8e46f2fed8f823ee4b97e96c3fcee28f3b75 +Author: Peter Hutterer +Date: Tue Aug 6 13:08:13 2013 +1000 + + Replace INCLUDES with AM_CPPFLAGS + + newer automake gets quite noisy about this. + hw/xfree86/ddc/Makefile.am:7: warning: + 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') + and many more of these. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit c218ba8423a73a7a643cb17789db8a1dd0901ca6 +Author: Julien Cristau +Date: Fri Aug 2 20:07:36 2013 +0200 + + xfree86: improve check for posix saved ids + + Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and + the _POSIX_SAVED_IDS macro. + + Suggested-by: Mark Kettenis + Signed-off-by: Julien Cristau + Reviewed-by: Alan Coopersmith + Reviewed-by: Mark Kettenis . + Signed-off-by: Peter Hutterer + +commit 930c6ff15d437dfb0f897e8cb4253abba70819cc +Author: Julien Cristau +Date: Fri Aug 2 23:46:00 2013 +0200 + + test: include dix-config.h in hashtabletest.c + + Missing _XSERVER64 define caused inconsistent sizeof(XID) between the + test and hashtable code, leading to test failures on 64bit big endian + archs like s390x or ppc64. + + Signed-off-by: Julien Cristau + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit b6e5c4669e0db391966deb397e8c975ec7f0124d +Author: Maarten Lankhorst +Date: Tue Jul 30 15:31:24 2013 +0200 + + test/xi2: fix protocol-xiqueryversion test + + The old code was broken and allowed setting client version >= XIVersion, + this was fixed in the previous patch, but updating the value for XIVersion + broke the tests, so fix the tests too. + + Signed-off-by: Maarten Lankhorst + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 500e844a24962c9e70abb3d614f1973013b2de73 +Author: Maarten Lankhorst +Date: Tue Jul 30 14:45:21 2013 +0200 + + Xi: Clamp XIClient maximal version to XIVersion + + Do not allow setting client version to an arbitrary value >= XIVersion. + Fixes a test error with test/xi2/protocol-xiqueryversion.c, introduced by + commit 4360514d1c "Xi: Allow clients to ask for 2.3 and then 2.2 without failing" + + Signed-off-by: Maarten Lankhorst + Reviewed-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit e1ab8f239bdc6af17ef6cd0e9c6187c4e2e2f5bc +Author: Dave Airlie +Date: Wed Jul 31 11:35:44 2013 +1000 + + xfree86/man: document AutoAddGPU + + This at least mentions AutoAddGPU and hints at when you might + want to disable it. + + Signed-off-by: Dave Airlie + Reviewed-by: Alex Deucher + Signed-off-by: Peter Hutterer + +commit ff38bbe81ace85bf675bbaa0a9ca5f3b32ede449 +Merge: bdd1e22 4360514 +Author: Keith Packard +Date: Thu Jul 25 22:50:27 2013 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 4360514d1cc8e3132f93f56172d291074e8c770f +Author: Keith Packard +Date: Wed Jul 10 22:42:55 2013 -0700 + + Xi: Allow clients to ask for 2.3 and then 2.2 without failing + + This allows different sub-systems within the same application to + request different Xi versions without either getting old behaviour + everywhere or simply failing with a BadValue. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit bdd1e22cbde9ea2324e4e1991c9e152f22f88151 +Author: Aaron Plattner +Date: Tue Apr 30 14:14:23 2013 -0700 + + xfree86: detach scanout pixmaps when detaching output GPUs + + Commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 fixed a bit of a + chicken-and-egg problem by detaching GPU screens when their providers + are destroyed, which happens before CloseScreen is called. However, + this created a new problem: the GPU screen tears down its RandR crtc + objects during CloseScreen and if one of them is active, it tries to + detach the scanout pixmap then. This crashes because + RRCrtcDetachScanoutPixmap tries to get the master screen's screen + pixmap, but crtc->pScreen->current_master is already NULL at that + point. + + It doesn't make sense for an unbound GPU screen to still be scanning + out its former master screen's pixmap, so detach them first when the + provider is destroyed. + + Signed-off-by: Aaron Plattner + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 3d8756631070c440cefa31b35fea3d407f187810 +Author: Peter Hutterer +Date: Mon Jul 22 13:43:07 2013 +1000 + + dix: set the valuator mask to ensure XI 1.x events have data + + XI 1.x only allows for first + num valuators, so if a device sends data for + valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get + the data for that from somewhere. + XI 1.x uses the hack of an unset valuator mask to get the right coordinates, + i.e. we set the value but don't set the mask for it so XI2 events have the + right mask. + + For an absolute device in relative mode, this broke in b28a1af55cf, the + value was now always 0. This wasn't visible on the cursor, only in an XI 1.x + client. The GIMP e.g. sees jumps to x/0 every few events. + + Drop the condition introduced in b28a1af55cf, data in valuators is always + absolute, regardless of the mode. + + Signed-off-by: Peter Hutterer + +commit 4fb686d6a6777950f0e0d55b848cd2af4cbad372 +Author: Peter Hutterer +Date: Wed Jul 24 11:50:00 2013 +1000 + + dix: check the xi2mask, not the grab type for touch listeners + + grab->type is only non-zero for passive grabs. We're checking an active grab + here, so we need to check if the touch mask is set on the grab. + + Test case: grab the device, then start two simultaneous touches. The + grabbing client won't see the second touchpoints because grab->type is 0 + and the second touch is not an emulating pointer. + + Signed-off-by: Peter Hutterer + +commit 43ac0491e36cdbb716b5c9d39c97d0aba3bebd75 +Author: Jon TURNEY +Date: Mon Apr 8 01:28:36 2013 +0100 + + hw/xwin: Fix numerous 64-bit format/type cast issues with debug printing of pointers + + Numerous pieces of debug output cast a pointer to an int and then use a "%08x" + printf format. + + Use "%p" format for 64-bit portability. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit e95bb97073ca77193e4c51bd1504403fbe245533 +Author: Colin Harrison +Date: Tue Jun 25 21:34:43 2013 +0100 + + hw/xwin: Fix possible crash in winMultiWindowGetClassHint + + Fix a possible crash in winMultiWindowGetClassHint() when an application doesn't + null terminate the WM_CLASS property class name (which is an ICCCM conformance + bug in the application) + + (Reported for running the contiki cooja simulator in multiwindow mode, although + it seems that many Java clients may have this problem, see [1]) + + Based on a patch by Marc Haesen. + + v2: Avoid using strnlen() which is missing on MinGW + v3: Align with Xming patch + + [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6961123 + + Signed-off-by: Colin Harrison + Reviewed-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + +commit 4bc375aa2f08bd092f60d3e358d345fc9a0d3637 +Author: Jon TURNEY +Date: Tue Jun 18 19:21:02 2013 +0100 + + hw/xwin: Remove obsolete WIN_XEVENTS_SHUTDOWN + + Remove obsolete WIN_XEVENTS_SHUTDOWN. This event is never generated. + + (I think the idea was to listen for WM_DELETE_WINDOW, but that's not a very + useful thing to do for a hidden window.) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 2663203cd6994166e107e796c4724a4ed3b59370 +Author: Jon TURNEY +Date: Tue Jun 18 18:03:05 2013 +0100 + + configure.ac: Check for python at configure time when building XWin with AIGLX + + Check for python at configure time when building XWin with AIGLX, it's used to + generate the wrapper code for native GL functions. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9fe360bf2be5c959fb21835955ef550098ccbbf0 +Author: Jon TURNEY +Date: Sun Jun 16 00:07:57 2013 +0100 + + hw/xwin: Avoid a null dereference if CreateDIBSection() fails in NetWMToWinIconAlpha() + + Avoid a null dereference of DIB_pixels if CreateDIBSection() fails in + NetWMToWinIconAlpha() + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 71b5f56302bbd8be62f63f0dd62cbcd33aab3ac5 +Author: Jon TURNEY +Date: Thu Feb 21 17:12:17 2013 +0000 + + hw/xwin: Handle WM_MOUSEHWHEEL + + Handle WM_MOUSEHWHEEL tilt wheel messages, similarly to WM_MOUSEWHEEL scroll + wheel messages, to generate X button 6 and 7 presses and releases. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit cf9c777ee094d660e0c95559373fd23ee910362e +Author: Jon TURNEY +Date: Thu Feb 21 17:10:45 2013 +0000 + + hw/xwin: Map extra mouse buttons 1 and 2 to X buttons 8 and 9 + + Map extra mouse buttons 1 and 2 to X buttons 8 and 9, as conventional, leaving X + buttons 6 and 7 for tilt wheel. + + Also add button labels for buttons 6, 7, 8 and 9 and change btn_labels in from a + dynamic allocation to a fixed one of the required size for all the labels we + use. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c9d7b9516f4a04cb9012c6c1e9466491a468aa07 +Author: Jon TURNEY +Date: Tue Feb 19 14:38:40 2013 +0000 + + hw/xwin: Remove unneeded WM_XBUTTON message defines + + Remove unneeded WM_XBUTTON message defines, they have been provided by w32api + for a long time now. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 5dccfc63f9c7056e7cd30884e1d3ccea86a2f419 +Author: Jon TURNEY +Date: Mon Dec 17 22:38:00 2012 +0000 + + hw/xwin: Change winTranslateKey() to return it's result as it's return value + + Change winTranslateKey() to return it's result as it's return value, and change + it's uses as well. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9b4cec76f1d7792d4bf64fa069ea6b64bc42da0d +Author: Oliver Schmidt +Date: Mon Nov 5 15:05:32 2012 +0000 + + hw/xwin: Consider left and right modifier keys independently on gaining focus + + Handle left and right ctrl and shift keys independently + + Assume that all modifiers are cleared when all keys are released on focus lost, + as internalKeyState doesn't record which modifier key was pressed. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 235149d0b4af9097e47b3af0ba56d4eb0179518c +Author: Jon TURNEY +Date: Mon Apr 5 14:22:39 2010 +0100 + + hw/xwin: Remove an extra '\n' from some log messages + + Remove an extra '\n' from internal client IOError log messages + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c7aa9f7578e721b0c9e565e7a085b6aeb30bf2ac +Author: Jon TURNEY +Date: Sat Feb 4 17:04:11 2012 +0000 + + hw/xwin: _NET_WM_STATE is ATOM[] not ATOM + + _NET_WM_STATE is ATOM[] not ATOM, a list of window state hints, so check all of + the atoms, not just the first one + + See EWMH specifcation, section "Application Window Properties" + + v2: Actually use [] on the returned atom data + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 682ccac90b18f293520f77db5b163fcb40328e2b +Author: Jon TURNEY +Date: Wed Aug 31 21:35:14 2011 +0100 + + hw/xwin: Improve WM_ENDSESSION handling using separate messaging window thread + + Currently, WM_ENDSESSION just calls GiveUp() to set the DE_TERMINATE flag. But + for the X server to exit cleanly, we also need the X server dispatch loop to be + unblocked so it can notice that DE_TERMINATE has been set and exit, removing + it's lock file and any unix domain socket. + + It appears that the system will terminate the process when the last UI thread in + that process returns from processing WM_ENDSESSION for the last top-level + window. + + Since WM_ENDSESSION appears to sent by the system via SendMessage() + (synchronously) and the wndproc is called to process it in the message thread + for that window (the X server thread), we can't easily terminate the X server + dispatch loop from inside the WM_ENDSESSION message processing. + + So, create a messaging window, a hidden, top-level window, with a separate + thread to catch this message, and process it by calling GiveUp() and then + blocking on a mutex until the X server dispatch loop exits. + + Also, notice when this is a shutdown cancel WM_ENDSESSION message and take no + action. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 15febb05d77cc7e7185c942f35459838f75cfdc0 +Author: Jon TURNEY +Date: Mon Sep 3 15:19:43 2012 +0100 + + Allow DDX to provide a main() + + XQuartz already conditionally renames main() as dix_main() so it can provide + it's own main(). This isn't the ideal way of doing this, as it prevents libdix + built this way from being useful with any other DDX. + + So instead, always name that function dix_main(), and also provide a stub main() + which just calls dix_main(), which can be overriden in the DDX. + + Add a main() to XWin (XQuartz already has one, of course). + + It's no longer neccessary to link XWin and XQuartz with libmain. + + v2: Remove unneeded stub main hw/xwin/InitOutput.c + + Signed-off-by: Jon TURNEY + Reviewed-by: Julien Cristau + Reviewed-by: Colin Harrison + +commit d5ebe20f9ba9569351c4a41449866679fd60ba45 +Merge: 21ea7eb 33f7e60 +Author: Keith Packard +Date: Mon Jul 22 20:34:41 2013 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit 21ea7ebb6a1ad56f3060747af0df235ca6ff27fa +Author: Peter Hutterer +Date: Fri Jul 19 08:56:38 2013 +1000 + + dix: scale y back instead of x up when pre-scaling coordinates + + The peculiar way we handle coordinates results in relative coordinates on + absolute devices being added to the last value, then that value is mapped to + the screen (taking the device dimensions into account). From that mapped + value we get the final coordinates, both screen and device coordinates. + + To avoid uneven scaling on relative coordinates, they are pre-scaled by + screen ratio:resolution:device ratio factor before being mapped. This + ensures that a circle drawn on the device is a circle on the screen. + + Previously, we used the ratio to scale x up. Synaptics already does its own + scaling based on the resolution and that is done by scaling y down by the + ratio. So we can remove the code from the driver and get approximately the + same behaviour here. + + Minor ABI bump, so we can remove this from synaptics. + + Signed-off-by: Peter Hutterer + Tested-by: Emmanuel Benisty + +commit 33f7e60785f12770ce10558c2ca7ce1323eefc59 +Author: Thomas Klausner +Date: Fri Jul 12 08:21:19 2013 +0200 + + Fix typo in header guard. + + Signed-off-by: Thomas Klausner + Reviewed-by: Alan Coopersmith + Signed-off-by: Alan Coopersmith + +commit ddc52b9cbae017f04c7a232af4e8b16c9f96823d +Author: Alan Coopersmith +Date: Fri Jul 5 22:43:17 2013 -0700 + + Xephyr: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData + + Simplifies code and reduces risk of overflow from converting length + field in X replies from words to bytes. + + One call to _XEatData is left in ephyrHostGLXGetStringFromServer where + it's already been checked for overflow, and other values have been + subtracted from it to reduce the size of data remaining to be eaten. + + Signed-off-by: Alan Coopersmith + +commit a3d43edf71847f4b486f971405d2b457f81b73d1 +Author: Alan Coopersmith +Date: Fri Jul 5 22:35:32 2013 -0700 + + glxproxy: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData + + Reduces risk of overflow from converting length field in X replies + from words to bytes. (Also seems to be what several calls were + already incorrectly passing to _XEatData.) + + Signed-off-by: Alan Coopersmith + +commit 87b0cabc145a9b5f6faffdfb544ce1c647b8ab72 +Author: Alan Coopersmith +Date: Fri Jul 5 22:32:10 2013 -0700 + + glxproxy: Use _XReadPad instead of _XEatData to clean up the slop + + Xlib already provides a function to eat padding bytes after the + data read, so use it instead of calculating it ourselves. + + Signed-off-by: Alan Coopersmith + +commit 1cb182cbdc11fc1c97507c57875f1d2453f27328 +Author: Alan Coopersmith +Date: Mon Apr 15 08:41:14 2013 -0700 + + Xephyr: integer overflow in XF86DRIGetClientDriverName() + + clientDriverNameLength is a CARD32 and needs to be bounds checked before + adding one to it to come up with the total size to allocate, to avoid + integer overflow leading to underallocation and writing data from the + network past the end of the allocated buffer. + + Reported-by: Ilja Van Sprundel + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + +commit 20644e53b385c54d73242c86a7d3f981d18a3843 +Author: Alan Coopersmith +Date: Mon Apr 15 08:39:03 2013 -0700 + + Xephyr: integer overflow in XF86DRIOpenConnection() + + busIdStringLength is a CARD32 and needs to be bounds checked before adding + one to it to come up with the total size to allocate, to avoid integer + overflow leading to underallocation and writing data from the network past + the end of the allocated buffer. + + Reported-by: Ilja Van Sprundel + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + +commit c37ceda76bf9ec6f5166122e864663e10f106546 +Author: Alan Coopersmith +Date: Sun Apr 14 10:50:50 2013 -0700 + + Xephyr: integer overflow in ephyrHostGLXGetStringFromServer() + + reply.length & reply.size are CARD32s and need to be bounds checked before + multiplying or adding to come up with the total size to allocate, to avoid + integer overflow leading to underallocation and writing data from the + network past the end of the allocated buffer. + + Reported-by: Ilja Van Sprundel + Signed-off-by: Alan Coopersmith + +commit 5fbd8c45b46ab93522e417240aa770466c30b735 +Author: Alan Coopersmith +Date: Sun Apr 14 09:45:26 2013 -0700 + + Xdmx: integer overflow in GetGLXFBConfigs() + + numFBConfigs & numAttribs are CARD32s and need to be bounds checked before + multiplying by structure sizes to come up with the total size to allocate, + to avoid integer overflow leading to underallocation and writing data from + the network past the end of the allocated buffer. + + Reported-by: Ilja Van Sprundel + Signed-off-by: Alan Coopersmith + +commit c89bcd12f4fc7233830a8dbe7863c312f657da3c +Author: Alan Coopersmith +Date: Sun Apr 14 09:33:57 2013 -0700 + + Xdmx: integer overflow in GetGLXVisualConfigs() + + numVisuals & numProps are both CARD32 and need to be bounds checked before + multiplying by structure sizes to come up with the total size to allocate, + to avoid integer overflow leading to underallocation and writing data from + the network past the end of the allocated buffer. + + Reported-by: Ilja Van Sprundel + Signed-off-by: Alan Coopersmith + +commit 74469895e39fa38337f59edd64c4031ab9bb51d8 +Author: Peter Hutterer +Date: Mon Jul 15 13:06:28 2013 +1000 + + dix: allow a ConstantDeceleration between 0 and 1 (#66134) + + A constant deceleration of x simply means (delta * 1/x). We limited that to + values >= 1.0f for obvious reasons, but can also allow values from 0-1. + That means that ConstantDeceleration is actually a ConstantAcceleration, but + hey, if someone needs it... + + X.Org Bug 66134 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 0e3be0b25fcfeff386bad132526352c2e45f1932 +Author: Peter Hutterer +Date: Fri Jul 12 14:10:10 2013 +1000 + + dix: UpdateTouchesForGrab must only free the listener grab if it is non-NULL + + If a client calls XIGrabDevice in response to a ButtonPress event (regular + event selection), the device will have a grab, but listener->grab is NULL. + + Check for that, to avoid logspam. + + [ 26293.863] (EE) BUG: triggered 'if (!pGrab)' + [ 26293.863] (EE) BUG: grabs.c:256 in FreeGrab() + [ 26293.863] (EE) + [ 26293.863] (EE) Backtrace: + [ 26293.864] (EE) 0: /usr/bin/Xorg (FreeGrab+0x54) [0x45d3fc] + [ 26293.864] (EE) 1: /usr/bin/Xorg (UpdateTouchesForGrab+0x135) [0x447d4e] + [ 26293.864] (EE) 2: /usr/bin/Xorg (ActivatePointerGrab+0x1ba) [0x447f3d] + [ 26293.864] (EE) 3: /usr/bin/Xorg (GrabDevice+0x3e6) [0x4503bc] + [ 26293.864] (EE) 4: /usr/bin/Xorg (ProcXIGrabDevice+0x1f9) [0x5981b1] + [ 26293.865] (EE) 5: /usr/bin/Xorg (ProcIDispatch+0x78) [0x58aa17] + [ 26293.865] (EE) 6: /usr/bin/Xorg (Dispatch+0x30d) [0x43347e] + [ 26293.865] (EE) 7: /usr/bin/Xorg (main+0x61d) [0x498175] + [ 26293.865] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3df5621b75] + [ 26293.865] (EE) 9: /usr/bin/Xorg (_start+0x29) [0x423a19] + [ 26293.866] (EE) 10: ? (?+0x29) [0x29] + [ 26293.866] (EE) + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 24cbb47ca80cd7a47749ece0ff3a98657ddf3ae3 +Author: Peter Hutterer +Date: Fri Jul 12 12:17:47 2013 +1000 + + config: provide example configuration for multi-seat setups + + Seats other than seat0 need custom configuration. Provide that with a + default configuration file so we can share it across distros. + + This file intentionally does not end in .conf so it won't get picked up by + the server after a normal installation. gdm, or whatever starts up the + servers will have to explicitly specifiy this config file. + + This file replaces the one currently written by systemd's multi-seat-x + binary: + http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c + + CC: Lennart Poettering + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit 791121e00692e12cb4c38c8d018bd72eb5081eb7 +Author: François Tigeot +Date: Mon Jul 15 21:54:26 2013 +0200 + + Fix mouse header include on DragonFly and FreeBSD + + * __FreeBSD_kernel_version doesn't exist anymore + + * The removed check was for FreeBSD versions from before September 2000 + which are no longer supported anyway + + * Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66045 + + Signed-off-by: François Tigeot + Signed-off-by: Peter Hutterer + +commit 59a6d3f1eb03010ab831b32b03706a1d6143c732 +Author: Jon TURNEY +Date: Thu Nov 8 13:41:13 2012 +0000 + + os: Remove any old logfile before trying to write to it + + If we are not backing up logfiles, remove the old logfile before trying to write + a new logfile, as otherwise the operation may fail if the previous logfile was + created by a different user. + + This change is useful when: + - The DDX doesn't use the logfile backup mechanism (i.e. not Xorg) + - The DDX is run by a non-root user, and then by a different non-root user + - The logfile directory doesn't have the restricted-deletion flag set + + Signed-off-by: Jon TURNEY + Acked-by: Yaakov Selkowitz + Reviewed-by: Yaakov Selkowitz + Signed-off-by: Peter Hutterer + +commit 8eeaa74bc241acb41f1d3ed64971e0b01e794776 +Author: Peter Hutterer +Date: Tue Jul 9 13:27:19 2013 +1000 + + dix: when ungrabbing an active grab, accept pointer grabs (#66720) + + Ungrabbing a device during an active touch grab rejects the grab. Ungrabbing + a device during an active pointer grab accepts the grab. + + Rejection is not really an option for a pointer-emulated grab, if a client + has a button mask on the window it would get a ButtonPress emulated after + UngrabDevice. That is against the core grab behaviour. + + X.Org Bug 66720 + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit a2d6932ad48f2cbfcc4c5fb8272e47106d08ac78 +Author: Julien Cristau +Date: Mon Jul 1 19:39:30 2013 +0200 + + xkb: don't call atoi(NULL) when parsing argv + + If the -ardelay or -arinterval options have no argument, there's no + point trying to read it. + + See + http://www.forallsecure.com/bug-reports/feb3db57fc206d8df22ca53a6907f74973876272/ + + Reported-by: Alexandre Rebert + Signed-off-by: Julien Cristau + Reviewed-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit 77e51d5bbb97eb5c9d9dbff9a7c44d7e53620e68 +Author: Eric Anholt +Date: Mon Jun 17 15:51:19 2013 -0700 + + Revert "DRI2: re-allocate DRI2 drawable if pixmap serial changes" + + This reverts commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f. After a + long debug session by Paul Berry, it appears that this was the commit + that has been producing sporadic failures in piglit front buffer + rendering tests for the last several years. + + GetBuffers may return fresh buffers with invalid contents at a couple + reasonable times: + + - When first asked for a non-fake-front buffer. + - When the drawable size is changed, an Invalidate has been sent, and + obviously the app needs to redraw the whole buffer. + - After a glXSwapBuffers(), GL allows the backbuffer to be undefined, + and an Invalidate was sent to tell the GL that it should grab these + appropriate new buffers to avoid stalling. + + But with the patch being reverted, GetBuffers would also return fresh + invalid buffers when the drawable serial number changed, which is + approximately "whenever, for any reason". The app is not expecting + invalid buffer contents "whenever", nor is it valid. Because the GL + usually only GetBuffers after an Invalidate is sent, and the new + buffer allocation only happened during a GetBuffers, most apps saw no + problems. But apps that do (fake-)frontbuffer rendering do frequently + ask the server for the front buffer (since we drop the fake front + allocation when we're not doing front buffer rendering), and if the + drawable serial got bumped midway through a draw, the server would + pointlessly ditch the front *and* backbuffer full of important + drawing, resulting in bad rendering. + + The patch was originally to fix bugzilla: + https://bugs.freedesktop.org/show_bug.cgi?id=28365 + Specifically: + + To reproduce, start with a large-ish display (i.e. 1680x1050 on my + laptop), use the patched glxgears from bug 28252 to add the + -override option. Then run glxgears -override -geometry 640x480 + to create a 640x480 window in the top left corner, which will work + fine. Next, run xrandr -s 640x480 and watch the fireworks. + + I've tested with an override-redirect glxgears, both with vblank sync + enabled and disabled, both with gnome-shell and no window manager at + all, before and after this patch. The only problem observed was that + before and after the revert, sometimes when alt-tabbing to kill my + gears after completing the test gnome-shell would get confused about + override-redirectness of the glxgears window (according to a log + message) and apparently not bother doing any further compositing. + + Signed-off-by: Eric Anholt + Reviewed-by: Keith Packard + Reviewed-by: Chris Wilson + Tested-by: Chris Wilson + Signed-off-by: Keith Packard + +commit 227015d6544115258b74c31b700f9bd163540e24 +Merge: d9005d5 80054fc +Author: Keith Packard +Date: Tue Jun 18 10:53:08 2013 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 80054fcafb095aff76f6df00d348c7fd85e8ddbc +Author: Jon TURNEY +Date: Sat Mar 30 19:44:14 2013 +0000 + + hw/xwin: Update manifest to target all architectures, not just x86 + + Update manifest to target all architectures, not just x86 + + Also: Write explicit dependencies for Xwin.rc. XWin.exe.manifest and X.ico are + included the resource compiler output, so add a dependency on them to cause it + to be recompiled if they change. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 689e7ad9b0fccd582cd63796cc90a999f141f589 +Author: Jon TURNEY +Date: Sun Mar 31 18:36:37 2013 +0100 + + hw/xwin: Win32 Windows properties are of pointer type HANDLE, not an integer type + + Win32 Windows properties are of pointer type HANDLE, not an integer type, but we + use the Windows property WINDOW_WID_PROP to store the X window XID. + + Add appropriate casts to show it doesn't matter that an XID is smaller than a + pointer on 64-bit build. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit e1a0945e8d4a3858838a14e64022524efd73c905 +Author: Jon TURNEY +Date: Sun Mar 31 18:35:35 2013 +0100 + + hw/xwin: winMultiWindowGetTransientFor() returns an XID not a WindowPtr + + winMultiWindowGetTransientFor() accesses the WM_TRANSIENT_FOR property, which is + an X window XID (which we compare with WINDOW_WID_PROP) and not a WindowPtr. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit be201ac257687355bf0916d7c525d598ed9b1282 +Author: Jon TURNEY +Date: Sat Mar 30 19:47:16 2013 +0000 + + hw/xwin: Change winIconIsOverride() to take a HICON parameter + + Change winIconIsOverride() to take a HICON parameter, so some unneccessary + casts, which weren't portable to 64-bit Cygwin, can be removed. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit fc40f9a92cf5981bccc45bbc0b959cc06c5accc2 +Author: Jon TURNEY +Date: Sat Mar 30 19:41:06 2013 +0000 + + hw/xwin: Fix uses of CreateDialogParam() for 64-bit builds + + Fix uses of CreateDialogParam() to be more strictly correct, for 64-bit builds + + dwInitParam parameter is LPARAM, not int + Return type of DLGPROC is INT_PTR, not WINBOOL + + Also: Reporting the value of g_hDlgDepthChange is completely uninteresting, we + are just interested in GetLastError() if it is NULL + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit b542976846eb5d4c82910272af32ec8298da4177 +Author: Jon TURNEY +Date: Sat Mar 30 19:40:31 2013 +0000 + + hw/xwin: deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin + + The deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit + cygwin, but both the ID_ABOUT_CHANGELOG control and the referenced file who's + path we are converting haven't existed for a while, so just remove this unused, + cygwin-specific code. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 5a47c6420cfe298143310938f08cc36a503e8d3d +Author: Jon TURNEY +Date: Mon Apr 8 01:27:26 2013 +0100 + + hw/xwin: Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer + + Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() + to an integer: Since HINSTANCE is a pointer type, use INT_PTR rather than int. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit d9005d58c0413dcc3a99150c13d05163881cf782 +Author: Peter Hutterer +Date: Tue Jun 4 14:39:33 2013 +1000 + + config: add a quirks file for devices needing special configuration + + This is the fedora quirks file configuring the special handling some devices + need. Rather than keeping this distro-specific add it to the tree so we can + share these quirks. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + +commit 04ce6f6f6c880281e42c9ebf21d6f980ddae79b4 +Author: Maarten Lankhorst +Date: Thu May 30 11:23:07 2013 +0200 + + dix: add missing dixFreeRegistry define + + Fixes a build failure on debian's udeb builds. + + Signed-off-by: Maarten Lankhorst + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit c21344add2fc589df83b29be5831c36a372201bd +Author: Peter Hutterer +Date: Mon May 27 13:46:49 2013 +1000 + + dix: remove logspam in RefCursor() + + This shouldn't have been in the patch + + Reported-by: Colin Harrison + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit cb3018d8a15add48efb3335e1f79b66378166008 +Merge: c76a1b3 6589f3b +Author: Keith Packard +Date: Thu May 23 19:58:46 2013 -0600 + + Merge remote-tracking branch 'whot/unreviewed' + +commit c76a1b343d6a56aa9529e87f0eda8d61355d562b +Merge: 891123c 9a5ad65 +Author: Keith Packard +Date: Thu May 23 19:58:36 2013 -0600 + + Merge remote-tracking branch 'whot/touch-grab-race-condition-56578-v3' + +commit 891123ce9dac5e52685b9a921b33d8279ba52956 +Merge: 7e97166 49521ed +Author: Keith Packard +Date: Thu May 23 10:30:15 2013 -0600 + + Merge remote-tracking branch 'whot/for-keith' + +commit 6589f3b55e335eef6c658c8ba1fe15a062f7e31c +Author: Peter Hutterer +Date: Tue May 14 08:31:19 2013 +1000 + + dix: devices must have valuators before touch is initialized + + Signed-off-by: Peter Hutterer + +commit 756ab88d93542f0589c9bf46f40ccc57df64f0fd +Author: Peter Hutterer +Date: Fri Apr 26 15:10:08 2013 +1000 + + dix: fix device scaling to use a [min,max[ range. + + defmin/defmax are screen coords and thus use a min-inclusive, max-exclusive + range. device axes ranges are inclusive, so bump the max up by one to get the + scaling right. + + This fixes off-by-one coordinate errors if the coordinate matrix is used to + bind the device to a fraction of the screen. It introduces an off-by-one + scaling error in the device coordinate range, but since most devices have a + higher resolution than the screen (e.g. a Wacom I4 has 5080 dpi) the effect + of this should be limited. + + This error manifests when we have numScreens > 1, as the scaling from + desktop size back to screen size drops one device unit. + + Signed-off-by: Peter Hutterer + +commit 5cc2c96f824dbb28b9f8da61efc41596f8bd0561 +Author: Peter Hutterer +Date: Sat Mar 9 20:43:51 2013 +1000 + + dix: pre-scale x by the screen:device:resolution ratio + + commit 61a99aff9d33728a0b67920254d2d4d79f80cf39 + dix: pre-scale relative events from abs devices to desktop ratio (#31636) + + added pre-scaling of relative coordinates coming from absolute devices to + undo uneven scaling based on the screen dimensions. + + Devices have their own device width/height ratio as well (in a specific + resolution) and this must be applied for relative devices as well to avoid + scaling of the relative events into the device's ratio. + + e.g. a Wacom Intuos4 6x9 is in 16:10 format with equal horiz/vert + resolution (dpi). A movement by 1000/1000 coordinates is a perfect diagonal + on the tablet and must be reflected as such on the screen. + + However, we map the relative device-coordinate events to absolute screen + coordinates based on the axis ranges. This results in an effective scaling + of 1000/(1000 * 1.6) and thus an uneven x/y axis movement - the y + axis is always faster. + + So we need to pre-scale not only by the desktop dimenstions but also by the + device width/height ratio _and_ the resolution ratio. + + Signed-off-by: Peter Hutterer + +commit 9a5ad65330693b3273972b63d10f2907d9ab954a +Author: Peter Hutterer +Date: Wed May 15 19:01:11 2013 +1000 + + Abstract cursor refcounting + + Too many callers relied on the refcnt being handled correctly. Use a simple + wrapper to handle that case. + + Signed-off-by: Peter Hutterer + +commit 35c2e263db01b2b61354298e5e85aa3cae8ac317 +Author: Peter Hutterer +Date: Tue May 14 14:51:31 2013 +1000 + + dix: call UpdateDeviceState() for emulated TouchEndEvents + + ProcessTouchEvents() calls UDS for all touch events, but if the event type + was switched to TouchUpdate(pending end) UDS is a noop. + + Daniel Drake found this can cause stuck buttons if a touch grab is + activated, rejected and the touch event is passed to a regular listener. + This sequence causes the TouchEnd to be changed to TouchUpdate(pending end). + + The actual TouchEnd event is later generated by the server once it is passed + to the next listener. UDS is never called for this event, thus the button + remains logically down. + + A previous patch suggested for UDS to handle TouchUpdate events [1], however + this would release the button when the first TouchEvent is processed, not + when the last grab has been released (as is the case for sync pointer + grabs). A client may thus have the grab on the device, receive a ButtonPress + but see the button logically up in an XQueryPointer request. + + This patch adds a call to UDS to TouchEmitTouchEnd(). The device state must + be updated once a TouchEnd event was sent to the last grabbing listener and + the number of grabs on the touchpoint is 0. + + [1] http://patchwork.freedesktop.org/patch/13464/ + + Signed-off-by: Peter Hutterer + +commit 8b9dc2628115dcb3f3601ad19b1ae157df21b9ee +Author: Peter Hutterer +Date: Tue May 14 07:46:25 2013 +1000 + + dix: devices must have valuators before touch is initialized + + Signed-off-by: Peter Hutterer + +commit fd5ea0237db6d725a48f76b706135df9d3246b82 +Author: Peter Hutterer +Date: Mon May 13 15:22:12 2013 +1000 + + Xi: fix warning - remove unused 'rc' + + Signed-off-by: Peter Hutterer + +commit 481702101b86fff003430e952dc65fb41eb56400 +Author: Peter Hutterer +Date: Fri May 3 15:07:58 2013 +1000 + + dix: fix cursor refcounting + + The cursor is referenced during CopyGrab(), thus doesn't need to be handled + manually anymore. It does need to be refcounted for temp grabs though. + + The oldGrab handling in ProcGrabPointer is a leftover from the cursor in the + grab being refcounted, but the grab itself being a static struct in the + DeviceIntRec. Now that all grabs are copied, this lead to a double-free of + the cursor (Reproduced in Thunderbird, dragging an email twice (or more + often) causes a crash). + + Signed-off-by: Peter Hutterer + +commit 49521edaf8930b335afac2185209e26e7000820b +Author: Peter Hutterer +Date: Wed May 15 08:51:51 2013 +1000 + + ephyr: add -resizeable to the man page + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 7a4bbfd9f2ce7aad23148ba01bb3f1071da606a3 +Author: Peter Hutterer +Date: Wed May 15 08:46:38 2013 +1000 + + ephyr: fix typo in man page + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 7e97166c4fc38076b6224e4dbdd632b43444149f +Author: Geert Uytterhoeven +Date: Tue May 14 13:04:53 2013 +0200 + + Shadow: Switch the Amiga/Atari bitplane code to the canonical X.Org license + + Also add my name to the list of authors in COPYING + + Reviewed-by: Alan Coopersmith + Signed-off-by: Geert Uytterhoeven + Signed-off-by: Keith Packard + +commit 3093f78d17e48a506aab170a9089cd10e21af299 +Author: Peter Hutterer +Date: Fri May 3 15:02:05 2013 +1000 + + dix: free the old grab when activating a new grab + + A client may call XIGrabDevice twice, overwriting the existing grab. Thus, + make sure we free the old copy after we copied it. Free it last, to make + sure our refcounts don't run to 0 and inadvertantly free something on the + way. + + Signed-off-by: Peter Hutterer + +commit 2566bdd8bc996cccde77b846819808c6239a89d2 +Author: Peter Hutterer +Date: Wed Apr 24 14:46:06 2013 +1000 + + Xi: check for HAS_ACCEPTED only for grab listeners + + If we have one listener left but it's not a grab, it cannot be in + LISTENER_HAS_ACCEPTED state. + + Signed-off-by: Peter Hutterer + +commit 5b00fc52270e9cfdfe7ac1838a21defe50fc3d31 +Author: Peter Hutterer +Date: Wed Apr 24 14:40:31 2013 +1000 + + Move TouchListenerGone call to CloseDownClient + + TouchListenerGone cleans up if a client disappears. Having this in + FreeGrab() triggers cyclic removal of grabs, emitting wrong events. In + particular, it would clean up a passive grab record while that grab is + active. + + Move it to CloseDownClient() instead, cleaning up before we go. + + Signed-off-by: Peter Hutterer + +commit 34c9b39d9937c2e19c2dffc9748605f90d40f965 +Author: Peter Hutterer +Date: Wed Apr 24 12:53:52 2013 +1000 + + dix: remove all listeners when freeing a touch + + Signed-off-by: Peter Hutterer + +commit 395124bd2782823de37e5c5b2f15dba49cff05f6 +Author: Peter Hutterer +Date: Wed Apr 17 20:15:35 2013 +1000 + + dix: always copy grabs, don't reference them + + Introduced in xorg-server-1.13.99.901-2-g9ad0fdb. Storing the grab pointer + in the listener turns out to be a bad idea. If the grab is not an active + grab or an implicit grab, the pointer stored is the one to the grab attached + on the window. This grab may be removed if the client calls UngrabButton or + similar while the touch is still active, leaving a dangling pointer. + + To avoid this, copy the grab wherever we need to reference it later. This + is also what we do for pointer/keyboard grabs, where we copy the grab as + soon as it becomes active. + + Reported-by: Maarten Lankhorst + Signed-off-by: Peter Hutterer + +commit 925e35122ebad877395bcf13676e9dbeb254bdfa +Author: Peter Hutterer +Date: Tue Apr 23 15:52:18 2013 +1000 + + dix: AllocGrab can copy if an argument is passed in + + Signed-off-by: Peter Hutterer + +commit 4980bcef9973ba1f90f53028f061669ee5d2661b +Author: Peter Hutterer +Date: Tue Apr 23 15:46:04 2013 +1000 + + dix: freeing a null grab is a bug, complain if doing so + + Signed-off-by: Peter Hutterer + +commit ccfa0f2d5de557546815a5e4f59552e2af46b578 +Author: Peter Hutterer +Date: Tue Apr 23 15:39:32 2013 +1000 + + dix: use a temporary variable for listeners[0] + + no functional changes + + Signed-off-by: Peter Hutterer + +commit 5363433a5cc64e2f83859aa1c32a89e5e1ddf9e4 +Author: Peter Hutterer +Date: Thu Apr 18 10:32:11 2013 +1000 + + dix: drop DeviceIntRec's activeGrab struct + + Obsolete since 4bc2761ad5ec2d0668aec639780ffb136605fbc8. This struct + existed so copying a passive grab could be simply done by + activeGrab = *grab + + and thus have a copy of the GrabPtr we'd get from various sources but still + be able to check device->grab for NULL. + + Since 4bc2761 activeGrab is a pointer itself and points to the same memory + as grabinfo->grab, leaving us with the potential of dangling pointers if + either calls FreeGrab() and doesn't reset the other one. + + There is no reader of activeGrab anyway, so simply removing it is + sufficient. + + Note: field is merely renamed to keep the ABI. Should be removed in the + future. + + Signed-off-by: Peter Hutterer + +commit 7dbf61817d3bd4b1fc71710677e56c5d8cfcdb4e +Author: Peter Hutterer +Date: Wed Apr 17 20:14:56 2013 +1000 + + dix: use a tmp variable for the to-be-removed touch listener + + No functional changes. + + Signed-off-by: Peter Hutterer + +commit a71a283934406d870bcd8dc376eb1c9ce1c8bbb4 +Author: Peter Hutterer +Date: Wed Apr 17 20:13:34 2013 +1000 + + dix: invert a loop condition + + Change the single if condition in the loop body to a + if (!foo) continue; + and re-indent the rest. + + No functional changes. + + Signed-off-by: Peter Hutterer + +commit 5174b1f98204beee79eba74c4cda5f2be0a60a8f +Author: Peter Hutterer +Date: Thu Feb 28 11:02:40 2013 +1000 + + dix: XAllowEvents() on a touch event means accepting it + + A sync grab is the owner once it gets events. If it doesn't replay the + event it will get all events from this touch, equivalent to accepting it. + + If the touch has ended before XAllowEvents() is called, we also now need to + send the TouchEnd event and clean-up since we won't see anything more from + this touch. + + Signed-off-by: Peter Hutterer + +commit e7f79c48b0faea910dc881034c00eb807fcd6210 +Author: Peter Hutterer +Date: Fri Mar 1 12:52:35 2013 +1000 + + dix: move EmitTouchEnd to touch.c + + No functional changes, this just enables it to be re-used easier. + + Signed-off-by: Peter Hutterer + +commit 0eb9390f6048049136347d5a5834d88bfc67cc09 +Author: Peter Hutterer +Date: Fri Mar 1 10:41:01 2013 +1000 + + Xi: Don't emit a TouchEnd event to a frozen device + + EmitTouchEnd calls DeliverTouchEvents directly instead of through + public.processInputProc. If a device is frozen, the TouchEnd is + processed while the device is waiting for a XAllowEvents and thus ends the + touch point (and the grab) before the client decided what to do with it. In + the case of ReplayPointer, this loses the event. + + This is a hack, but making EmitTouchEnd use processInputProc breaks + approximately everything, especially the touch point is cleaned up during + ProcessTouchEvents. Working around that is a bigger hack than this. + + Signed-off-by: Peter Hutterer + +commit a7d989d335f903ffd8b168cd2beeb82c78d30c21 +Author: Peter Hutterer +Date: Thu Feb 28 13:07:26 2013 +1000 + + Xi: use public.processInputProc to replay the touch history + + If a device is frozen in results to a grab, we need to enqueue the events. + + This makes things complicated, and hard to follow since touch events are now + replayed in the history, pushed into EnqueueEvent, then replayed later + during PlayReleasedEvents in response to an XAllowEvents. + + While the device is frozen, no touch events are processed, so if there is a + touch client with ownership mask _below_ the grab this will delay the + delivery and potentially screw gesture recognition. However, this is the + behaviour we have already anyway if the top-most client is a sync pgrab or + there is a sync grab active on the device when the TouchBegin was generated. + + (also note, such a client would only reliably work in case of ReplayPointer + anyway) + + Signed-off-by: Peter Hutterer + +commit 214d11d3fcdac51fc7afbf3770516ec14f9e13c1 +Author: Peter Hutterer +Date: Wed Feb 27 15:05:54 2013 +1000 + + Xi: when punting to a new owner, always create TouchEnd events + + If a touch is pending_finish and we just punted it to the next owner, that + client must receive a TouchEnd event. + + If we just punted to the last owner and that owner not a touch grab, we need + to end the touch since this is the last event to be sent, and the client + cannot accept/reject this. + + Signed-off-by: Peter Hutterer + +commit 026627fe19aad007544eccf209f0dea05e67a7a7 +Author: Peter Hutterer +Date: Fri Mar 1 09:15:37 2013 +1000 + + Xi: save state for early acceptance + + Delivering an event changes the state to LISTENER_IS_OWNER and we thus lose + the information of early acceptance. + + Signed-off-by: Peter Hutterer + +commit d905348134c80f19793eefb761731b00559ddf3a +Author: Peter Hutterer +Date: Thu Feb 28 15:28:46 2013 +1000 + + Xi: if a passive async grab is activated from an emulated touch, accept + + Async grabs cannot replay events, they cannot reject, so we can do an early + accept here. + + Signed-off-by: Peter Hutterer + +commit 8b0d21044956f3810199d5e2f38ce33069e97be7 +Author: Peter Hutterer +Date: Thu Feb 28 13:04:36 2013 +1000 + + Xi: fix lookup in ActivateEarlyAccept + + ActivateEarlyAccept() can only be called from a grabbing client, so we can + ignore the rest. And it's easy enough to get the client from that since + 9ad0fdb135a1c336771aee1f6eab75a6ad874aff. + + Signed-off-by: Peter Hutterer + +commit d08bae297f9d7651edb1923d6b0d6b14b3d674fc +Author: Peter Hutterer +Date: Thu Feb 28 13:08:27 2013 +1000 + + Xi: update the core listener state if we delivered the touch event + + If a TouchBegin is sent to a core client, that client is now the owner. + + By the time the TouchEnd is being processed, the client cannot replay + anymore, so we can assume that this is the final touch end and we can clean + up the touch record. + + Note: DeliverTouchEmulatedEvent is called for all listeners and immediately + bails out if the client is not the owner and thus shouldn't yet get the + event. Thus, check the return code. + + Signed-off-by: Peter Hutterer + +commit 81554d274f04951c55ea7f2e38d0455e2025e08d +Author: Peter Hutterer +Date: Mon Feb 25 11:21:07 2013 +1000 + + Xi: if we delivered a TouchEnd to a passive grab, end it + + ef64b5ee97099618cf2e2cbbd3e471095695ae24 (which introduced the + TOUCH_CLIENT_ID check) has a wrong assumption that generated touch events + (TOUCH_CLIENT_ID) should not terminate passive grabs. + This is untrue, a TouchEnd may be generated in response to a TouchReject + higher up. If we _deliver_ an event to a client, terminate the passive grab. + + This requires us to count the actually delivered events too (first hunk). + + Signed-off-by: Peter Hutterer + +commit 363b6387da6e669099a2da3861c73a29808295a6 +Author: Peter Hutterer +Date: Wed Feb 13 11:26:11 2013 +1000 + + dix: don't prepend an activated passive grab to the listeners + + If the device is currently grabbed as the result of a passive grab + activating, do not prepend that grab to the listeners (unlike active grabs). + Otherwise, a client with a passive pointer grab will prevent touch grabs + from activating higher up in the window stack. + + Signed-off-by: Peter Hutterer + +commit 9cc45c18ad1511adf3fb163dd4cefbef106edb23 +Author: Peter Hutterer +Date: Wed Feb 13 10:49:23 2013 +1000 + + Xi: not having an ownership mask does not mean automatic acceptance + + If we only have a single touch-grabbing client, setting the client as owner + would clean up the touch once the TouchEnd was processed. If the client then + calls XIAllowTouches() it will receive a BadValue for the touch ID (since + the internal record is already cleaned up). + + Signed-off-by: Peter Hutterer + +commit 2f1aedcaed8fd99b823d451bf1fb02330c078f67 +Author: Peter Hutterer +Date: Thu May 9 14:30:50 2013 +1000 + + input: print warnings if drivers don't initialize properly + + If drivers supply incorrect values don't just quietly return False, spew to + the log so we can detect what's going on. All these cases are driver bugs + and should be fixed immediately. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 8a88b0ab52ba375ae84463a90503db88af10e368 +Author: Peter Hutterer +Date: Thu May 9 14:30:49 2013 +1000 + + dix: don't overwrite proximity/focus classes + + InitPointerClassDeviceStruct/InitKeyboardDeviceStruct allocate a + proximity/focus class, respectively. If a driver calls + InitFocusClassDeviceStruct or InitProximityClassDeviceStruct beforehand, + the previously allocated class is overwritten, leaking the memory. + + Neither takes a parameter other than the device, so we can simply skip + initialising it if we already have one. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 34b0d07ebf4a7874fe7fd336bef5bbdd8debda1c +Author: Peter Hutterer +Date: Fri May 10 09:44:29 2013 +1000 + + dix: reset the OsBuffers after killing all clients + + ==21860== 24 bytes in 1 blocks are still reachable in loss record 85 of 397 + ==21860== at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + ==21860== by 0x61ED93: AllocateOutputBuffer (io.c:1037) + ==21860== by 0x61E15A: WriteToClient (io.c:764) + ==21860== by 0x457B30: ProcQueryExtension (extension.c:275) + ==21860== by 0x43596B: Dispatch (dispatch.c:432) + ==21860== by 0x425DAB: main (main.c:295) + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 67c66606c760c263d7a4c2d1bba43ed6225a4e7c +Author: Robert Morell +Date: Thu May 9 13:09:02 2013 -0700 + + os: Reset input buffer's 'ignoreBytes' field + + If a client sends a request larger than maxBigRequestSize, the server is + supposed to ignore it. + + Before commit cf88363d, the server would simply disconnect the client. After + that commit, it attempts to gracefully ignore the request by remembering how + long the client specified the request to be, and ignoring that many bytes. + However, if a client sends a BigReq header with a large size and disconnects + before actually sending the rest of the specified request, the server will + reuse the ConnectionInput buffer without resetting the ignoreBytes field. This + makes the server ignore new X clients' requests. + + This fixes that behavior by resetting the ignoreBytes field when putting the + ConnectionInput buffer back on the FreeInputs list. + + Signed-off-by: Robert Morell + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit ddc11397a56c745b5d1fb377e9d9b1fcc73802c8 +Author: Peter Hutterer +Date: Mon Feb 27 18:36:39 2012 +1000 + + dix: delete all callbacks before reset + + DeleteCallbackManager() introduced for better symmetry in the caller, they + do the same thing. + + ==20085== 24 bytes in 1 blocks are still reachable in loss record 11 of 103 + ==20085== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) + ==20085== by 0x43A097: CreateCallbackList (dixutils.c:837) + ==20085== by 0x43A1D3: AddCallback (dixutils.c:869) + ==20085== by 0x4B1736: GEExtensionInit (geext.c:209) + ==20085== by 0x41C8A8: InitExtensions (miinitext.c:389) + ==20085== by 0x5AC918: main (main.c:208) + + ==2042== 8 bytes in 1 blocks are still reachable in loss record 2 of 97 + ==2042== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) + ==2042== by 0x4C2A657: realloc (vg_replace_malloc.c:525) + ==2042== by 0x4802F5: XNFrealloc (utils.c:1095) + ==2042== by 0x43A17A: CreateCallbackList (dixutils.c:855) + ==2042== by 0x43A1EF: AddCallback (dixutils.c:870) + ==2042== by 0x4B1752: GEExtensionInit (geext.c:209) + ==2042== by 0x41C8A8: InitExtensions (miinitext.c:389) + ==2042== by 0x5AC9E4: main (main.c:208) + ==2042== + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 6993f8b459e25b1a7a0a03e209688a28ce6c2c56 +Author: Peter Hutterer +Date: Wed Apr 24 14:59:11 2013 +1000 + + Xi: free barrier code at reset time + + ==29423== 16 bytes in 1 blocks are definitely lost in loss record 73 of 328 + ==29423== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) + ==29423== by 0x5987C0: XIBarrierInit (xibarriers.c:908) + ==29423== by 0x58F370: XInputExtensionInit (extinit.c:1300) + ==29423== by 0x4F33C3: InitExtensions (miinitext.c:337) + ==29423== by 0x4997DB: main (main.c:208) + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 042c6d861f7bb7038ddcdd6b59766fd9094d0e52 +Author: Peter Hutterer +Date: Tue Apr 30 15:44:37 2013 +1000 + + os: Use ErrorFSigSafe from FatalError and it's friends + + Backtrace logging etc. is already sigsafe, but the actual FatalError message + in response is not yet, leading to amusing logs like this: + + (EE) Segmentation fault at address 0x0 + (EE) BUG: triggered 'if (inSignalContext)' + (EE) BUG: log.c:499 in LogVMessageVerb() + (EE) Warning: attempting to log data in a signal unsafe manner while in + signal context. + Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or + ErrorFSigSafe(). + The offending log format message is: + + Fatal server error: + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit d9848fb4b182ca21bacf28ed7410d1a502cb000e +Author: Peter Hutterer +Date: Thu Feb 14 16:24:53 2013 +1000 + + os: complain about unsupported pnprintf directives + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit d903d17d7f006fa333265b8476063b189c20d082 +Author: Peter Hutterer +Date: Thu Feb 14 16:19:34 2013 +1000 + + os: support %c in pnprintf + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf +Author: Peter Hutterer +Date: Thu Feb 14 16:13:22 2013 +1000 + + os: support %% in pnprintf + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 5ea21560dd071ea4ab87430000d087fd5fe1f092 +Author: Peter Hutterer +Date: Thu Feb 14 15:34:32 2013 +1000 + + os: support pnprintf length modifiers for integers + + Mainly for %ld, smaller than int is propagated anyway, and %lld isn't really + used. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit d3d4af5f9e505d444b6c82c6ea238206433fd24b +Author: Peter Hutterer +Date: Mon Feb 27 18:59:45 2012 +1000 + + dix: reset the registry before quitting + + Heaps of these: + ==2042== 15,360 bytes in 120 blocks are still reachable in loss record 94 of + 97 + ==2042== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) + ==2042== by 0x4C2A657: realloc (vg_replace_malloc.c:525) + ==2042== by 0x45FB91: double_size (registry.c:65) + ==2042== by 0x45FC97: RegisterRequestName (registry.c:85) + ==2042== by 0x460095: RegisterExtensionNames (registry.c:179) + ==2042== by 0x460729: dixResetRegistry (registry.c:334) + ==2042== by 0x5AC992: main (main.c:201) + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 6f44d672aa34d343f63f0ea81ad58154a66b57ec +Author: Peter Hutterer +Date: Mon Feb 27 17:17:41 2012 +1000 + + xkb: free XkbRulesUsed and XkbRulesDflt on extension cleanup + + ==2547== 1 bytes in 1 blocks are still reachable in loss record 1 of 111 + ==2547== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) + ==2547== by 0x64D1551: strdup (strdup.c:43) + ==2547== by 0x4802FB: Xstrdup (utils.c:1113) + ==2547== by 0x585B6C: XkbSetRulesUsed (xkbInit.c:219) + ==2547== by 0x58700F: InitKeyboardDeviceStruct (xkbInit.c:595) + ==2547== by 0x419FA3: vfbKeybdProc (InitInput.c:74) + ==2547== by 0x425A3D: ActivateDevice (devices.c:540) + ==2547== by 0x425F65: InitAndStartDevices (devices.c:713) + ==2547== by 0x5ACA57: main (main.c:259) + + and a few more of the above. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 623981ddaeb8836f3b0939e527c0e943f9c4e974 +Author: Peter Hutterer +Date: Fri Feb 1 09:06:20 2013 +1000 + + If neither HAL nor udev backends are enabled, warn the user + + If both are missing, input device hotplugging will not work out of the box. + While we still have a DBus-API or the user may want to set AAD off all the + time, the most likely source of this is misconfiguration (i.e. lack of the + udev/hal devel packages). + + Message printed last to make it more obvious to the user. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit dce40e2266200421647044ec7e856656d2ef952d +Author: Peter Hutterer +Date: Tue Feb 26 12:34:21 2013 +1000 + + Xi: always return BadMatch for XTest devices ChangeDeviceControl requests + + The only controls that still do something are DEVICE_RESOLUTION and + DEVICE_ENABLE. + + XTest devices have no resolution to change, and they cannot be disabled. So + skip the lot, and prevent a crash in the DDX when it's trying to + de-reference pInfo->control_proc on device with no pInfo struct. + + Likewise, don't allow setting device mode or the valuators. + XTest pointers are always relative, they don't have a mode. + + Test cases: + xts5/XI/ChangeDeviceControl (1/10) + xts5/XI/SetDeviceValuators (1/6) + and a few others + + Reported-by: Knut Petersen + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 23d1bc69f305edd5a6e2cfec3dfc84befda0881c +Author: Peter Hutterer +Date: Thu Mar 14 11:07:57 2013 +1000 + + dix: send the current axis value in DeviceChangedEvents (#62321) + + X.Org Bug 62321 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 27b11f5c19d67e2f6784d86cb7df86bbab3b58bb +Author: Peter Hutterer +Date: Fri Feb 15 11:19:10 2013 +1000 + + Xi: fix comment - XI2 grabs aren't keysym grabs + + Comment dates back to a pre-release version of XI2 that supported keysym + grabs. That never made it into a release, it was ditched before. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 2746c681639f9512e6e45fb8d0151b996b6aff7f +Merge: 1e6cf8e 9878e09 +Author: Keith Packard +Date: Mon May 6 10:52:40 2013 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit 1e6cf8ec20d07b73a11116564aba71b4e4291dcd +Merge: dbfeaf7 5860408a +Author: Keith Packard +Date: Mon May 6 10:20:21 2013 -0700 + + Merge remote-tracking branch 'jturney/unused-but-set-variable-warning-fix' + +commit dbfeaf70623a83e1a3f3255c94d52e0e04702837 +Author: Aaron Plattner +Date: Tue Apr 30 14:30:18 2013 -0700 + + xfree86: don't enable anything in xf86InitialConfiguration for GPU screens + + There's no point in turning on outputs connected to GPU screens during initial + configuration. Not only does this cause them to just display black, it also + confuses clients when these screens are attached to a master screen and RandR + reports that the outputs are already on. + + Also, don't print the warning about no outputs being found on GPU screens, + since that's expected. + + Signed-off-by: Aaron Plattner + Reviewed-by: Dave Airlie + +commit 5860408a19d956f8cebb7ae39cfdbfcebd5e6360 +Author: Jon TURNEY +Date: Wed Apr 3 18:43:26 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in ProcWindowsWMFrameGetRect() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c: In function ‘ProcWindowsWMFrameGetRect’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c:322:12: error: variable ‘ir’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit bcfd523c150b34e9304d174ba812160c611f270d +Author: Jon TURNEY +Date: Wed Apr 3 18:34:38 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winMWExtWMUpdateWindowDecoration() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c: In function ‘winMWExtWMUpdateWindowDecoration’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c:189:11: error: variable ‘dwStyle’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit fbf819c24dc080f166cff29bf46b0feb604c6b8c +Author: Jon TURNEY +Date: Wed Apr 3 16:40:35 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winHotKeyAltTabPrimaryDD() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c: In function ‘winHotKeyAltTabPrimaryDD’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c:518:20: error: variable ‘rcSrc’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 7dae1e59ce6077f475c04a41fa00096a74114064 +Author: Jon TURNEY +Date: Wed Apr 3 16:33:39 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winMinimizeWindow() when built !XWIN_MULTIWINDOWEXTWM + + /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c: In function ‘winMinimizeWindow’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c:813:20: error: variable ‘pScreenInfo’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit b284666f09b77f9c2f048fee22015a353152a57f +Author: Jon TURNEY +Date: Wed Apr 3 16:27:45 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winClipboardProc() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c: In function ‘winClipboardProc’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c:88:25: error: variable ‘atomClipboardManager’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit d414a09bb7f8d4440b36cbc6f0b4ca0eaefe5cbf +Author: Jon TURNEY +Date: Wed Apr 3 16:25:54 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winWindowProc() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c: In function ‘winWindowProc’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c:65:22: error: variable ‘s_hInstance’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 7726102671690eb28138d032c8398ac903b97606 +Author: Jon TURNEY +Date: Wed Apr 3 16:24:08 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winCopyWindowNativeGDI() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c: In function ‘winCopyWindowNativeGDI’: + /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c:131:15: error: variable ‘pwinRoot’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit b9a2566a6e2f56a0335cd4a089b2066c06a67455 +Author: Jon TURNEY +Date: Wed Apr 3 16:50:38 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winFinishScreenInitFB() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winscrinit.c:264:11: error: variable ‘pbits’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c97fbd39adbc0a8cb8537f40b12c091aee29221a +Author: Jon TURNEY +Date: Wed Apr 3 16:18:27 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warning in winIsFakeCtrl_L() + + /jhbuild/checkout/xorg/xserver/hw/xwin/winkeybd.c:331:17: error: variable ‘lastMessage’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit cdb74fe17dcb3b5a9c61951f897deaf07f86775f +Author: Jon TURNEY +Date: Wed Apr 3 16:16:06 2013 +0100 + + hw/xwin: Fix unused-but-set-variable warnings in windialog.c + + /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winChangeDepthDlgProc’: + /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:432:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] + /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winAboutDlgProc’: + /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:564:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit f2fd8ec3725a61abbc831f0a9ec28fa2b7020c47 +Author: Dave Airlie +Date: Wed Jan 9 12:52:13 2013 +1000 + + gpu: call CreateScreenResources for GPU screens + + I didn't think we needed this before, but after doing some more + work with reverse optimus it seems like it should be called. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 8fcb9d91b69abc72ddef31b9f2e8585580c6cad2 +Author: Dave Airlie +Date: Wed Jan 9 12:52:08 2013 +1000 + + dix: allow pixmap dirty helper to be used for non-shared pixmaps + + this allows the pixmap dirty helper to be used for reverse optimus, + where the GPU wants to copy from the shared pixmap to its VRAM copy. + + [airlied: slave_dst is wrong name now but pointless ABI churn at this point] + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 16077b81c502e04d77f81f683e0c213b9fe75393 +Author: Dave Airlie +Date: Wed Jan 9 12:52:03 2013 +1000 + + xf86crtc: don't use scrn->display for gpu screens + + scrn->display is a property of the main screen really, and we don't + want to have the GPU screens use it for anything when picking modes + or a front buffer size. + + This fixes a bug where when you plugged a display link device, it + would try and allocate a screen the same size as the current running + one (3360x1050 in this case), which was too big for the device. Avoid + doing this and just pick sizes based on whats plugged into this device. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit f0d0d75bfe62553dde353f89e46ff13dd863fbe8 +Author: Dave Airlie +Date: Wed Jan 9 12:51:55 2013 +1000 + + dix/gpu: remove asserts for output/offload from same slave + + We should have no problem allowing output/offload from the same slave, + I asserted here, but in order to implement reverse optimus this makes + perfect sense. (reverse optimus is intel outputting to nvidia). + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 9d26e8eaf5a2d7c3e65670ac20254c60f665c463 +Author: Dave Airlie +Date: Wed Jan 9 14:26:35 2013 +1000 + + randr: report changes when we disconnect a GPU slave + + When we disconnect an output/offload slave set the changed bits, + so a later TellChanged can do something. + + Then when we remove a GPU slave device, sent change notification + to the protocol screen. + + This allows hot unplugged USB devices to disappear in clients. + + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit b724324252d13ff95f62eebd12d125b194d2ccc2 +Author: Dave Airlie +Date: Wed Jan 9 14:25:43 2013 +1000 + + randr: only respected changed on the protocol screen + + We don't want to know about changes on the non-protocol screen, + we will fix up setchanged to make sure non-protocol screens update + the protocol screens when they have a change. + + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit b3f70f38edebac87afe9351538365292f1aaaff3 +Author: Dave Airlie +Date: Wed Jan 9 14:29:47 2013 +1000 + + randr: make SetChanged modify the main protocol screen not the gpu screen + + When SetChanged is called we now modify the main protocol screen, + not the the gpu screen. Since changed stuff should work at the protocol level. + + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit f9c8248b8326ad01f33f31531c6b2479baf80f02 +Author: Dave Airlie +Date: Wed Jan 9 14:23:57 2013 +1000 + + randr: don't directly set changed bits in randr screen + + Introduce a wrapper interface so we can fix things up for multi-gpu + situations later. + + This just introduces the API for now. + + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b +Author: Chris Wilson +Date: Thu Jan 10 03:26:33 2013 +0000 + + hw/xfree86: Only report SetDesiredModes() failed if at least one modeset fails + + commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be + Author: Keith Packard + Date: Tue Jan 8 20:24:32 2013 -0800 + + hw/xfree86: Require only one working CRTC to start the server. + + changed the logic to try to set the mode on all connected outputs rather + than abort upon the first failure. The return error code was then + tweaked such that it reported success if it set a mode on any crtc. + However, this confuses the headless case where we never enable any crtcs + and also, importantly, never fail to set a crtc. + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190 + + Signed-off-by: Chris Wilson + Also-written-by: Maarten Lankhorst + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 9878e097a7de2f86eff0dcfd9fe5d83b162197ec +Author: Alan Coopersmith +Date: Wed Apr 24 15:24:31 2013 -0700 + + Only call xf86platformVTProbe() when it's defined + + Fixes build on non-udev systems, since XSERVER_PLATFORM_BUS is only + defined in configure.ac if $CONFIG_UDEV_KMS is true. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Dave Airlie + +commit e779402d531625ba4ed5d628d06c6b1e06b2ec7b +Author: Keith Packard +Date: Thu Apr 25 09:02:31 2013 -0700 + + shadow: Define c2p_unsupported + + Just make this call BUG_WARN(1) to indicate that something unexpected + happened + + Signed-off-by: Keith Packard + +commit 2b361fbda536f0125e4b87a6d455acc58f4e8690 +Author: Alan Coopersmith +Date: Sun Feb 10 10:24:59 2013 -0800 + + sparcPromPathname2Node: free name when returning error, instead of leaking it + + Reported with other leaks found by cppcheck in bugzilla #50281 + https://bugs.freedesktop.org/show_bug.cgi?id=50281 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 174ccd84931ece5a92a09c4a1d6a47e0958ebf7e +Author: Alan Coopersmith +Date: Sun Feb 10 10:24:59 2013 -0800 + + xf86SbusCmapLoadPalette: Delay malloc until needed, avoiding leak on error + + Reported with other leaks found by cppcheck in bugzilla #50281 + https://bugs.freedesktop.org/show_bug.cgi?id=50281 + + V2: check for malloc failure + + Signed-off-by: Alan Coopersmith + +commit 6bca0184d167388cd417d113031317990489987d +Author: Alan Coopersmith +Date: Sun Feb 10 10:18:02 2013 -0800 + + dmxVDLRead: if we opened a file, close it instead of leaking it + + Reported with other leaks found by cppcheck in bugzilla #50281 + https://bugs.freedesktop.org/show_bug.cgi?id=50281 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 8c5ff2e93f73b24adff741b25fc1e31b2f5dd0ac +Author: Alan Coopersmith +Date: Sun Feb 10 10:24:59 2013 -0800 + + __glXDRIscreenProbe: free screen when DRI2Connect fails, instead of leaking it + + Reported with other leaks found by cppcheck in bugzilla #50281 + https://bugs.freedesktop.org/show_bug.cgi?id=50281 + + V2: goto existing error handler, instead of replicating more of it here + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 9567fa9a7269765bc59ac71b931e16df261d794d +Author: Alan Coopersmith +Date: Sun Feb 10 10:24:59 2013 -0800 + + __glXDRIscreenCreateContext: free context on failure, instead of leaking it + + Reported with other leaks found by cppcheck in bugzilla #50281 + https://bugs.freedesktop.org/show_bug.cgi?id=50281 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Ian Romanick + +commit 7ab98bafc9a3426fd40f8ae693430491333ba4fc +Merge: 53da26a 5ab2603 +Author: Keith Packard +Date: Wed Apr 24 14:14:45 2013 -0700 + + Merge remote-tracking branch 'geertu/master' + +commit 53da26afb76bcce70b91c5df23d25e7e85c010cf +Merge: 5ece86e d8d3c78 +Author: Keith Packard +Date: Wed Apr 24 10:27:19 2013 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 5ece86e921a1df457a9baab6a2357ccda4ad6957 +Merge: ef0a726 22cab8a +Author: Keith Packard +Date: Wed Apr 24 10:23:51 2013 -0700 + + Merge remote-tracking branch 'airlied/for-keithp-gpu-vt-owner' + +commit ef0a726bc8d5c415244cb4f86d664938b0127a5d +Author: Jeremy White +Date: Thu Mar 21 10:58:42 2013 -0500 + + Eliminate the use of xf86Rename.h + + Signed-off-by: Jeremy White + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 2b539239e465faa9e8c6d96f1c6f00e593d46c18 +Author: Keith Packard +Date: Wed Apr 24 10:11:03 2013 -0700 + + Bump to 1.14.99.1 + + Snapshot with fix for CVE-2013-1940. + + Signed-off-by: Keith Packard + +commit d8d3c78b6ebdf63836951d2dbd2d3d621ff26da2 +Author: Andreas Müller +Date: Tue Apr 16 14:30:43 2013 +0200 + + dixstruct.h: fix segfaults - char is unsigned for ARM and PowerPC architectures + + see ARM related bug reports [1-3] + + [1] https://github.com/archlinuxarm/PKGBUILDs/issues/446I + [2] http://www.raspberrypi.org/phpBB3/viewtopic.php?t=38568&p=321673 + [3] http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037805.html + + Signed-off-by: Andreas Müller + Reviewed-by: Mark Kettenis + Signed-off-by: Peter Hutterer + +commit 7d722796c678532e8c5897c673c43184da353f44 +Author: Peter Hutterer +Date: Wed Apr 17 19:47:42 2013 +1000 + + dix: plug memory leak in freeing TouchClass + + ==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330 + ==15562== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) + ==15562== by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644) + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 5ab260317ad3b2aafff31a97df21620db52eacd1 +Author: Geert Uytterhoeven +Date: Sun Mar 10 21:04:19 2013 +0100 + + Xfbdev: Wire up Amiga afb4 and afb8 support + + Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel. + + Signed-off-by: Geert Uytterhoeven + Acked-by: Keith Packard + +commit 672bc5bb38918304cf68114a1112cd48651a5e83 +Author: Geert Uytterhoeven +Date: Sun Mar 10 17:17:26 2013 +0100 + + Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support + + Add support for Atari-style interleaved bitplanes, with 2 bytes interleave + and 4 or 8 bits per pixel. + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit 95a3c7536c1a4afe97aaf955980034cc69af9c2f +Author: Geert Uytterhoeven +Date: Sun Mar 10 17:17:26 2013 +0100 + + Xfbdev: Force shadowfb for frame buffers with non-packed pixels + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit 0e808110df216649e05503baecd06cd5a3e50421 +Author: Geert Uytterhoeven +Date: Sun Mar 10 17:17:26 2013 +0100 + + Xfbdev: Reject unsupported frame buffer types + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit cfd10576812c36f5844805eb95ed1f2d093d1691 +Author: Geert Uytterhoeven +Date: Sun Mar 10 21:03:44 2013 +0100 + + Shadow: Add support for Amiga afb8 + + Add support for Amiga-style bitplanes, with 8 bits per pixel. + + Signed-off-by: Geert Uytterhoeven + Acked-by: Keith Packard + +commit a1b8e7f1e6118b611ba9d332b8763ee2b44f550c +Author: Geert Uytterhoeven +Date: Wed Mar 27 09:37:02 2013 +0100 + + Shadow: Add support for Amiga afb4 + + Add support for Amiga-style bitplanes, with 4 bits per pixel. + + Signed-off-by: Geert Uytterhoeven + Acked-by: Keith Packard + +commit d7181e567d1629c387b834da7eecdf618d14718e +Author: Geert Uytterhoeven +Date: Sun Mar 10 17:16:17 2013 +0100 + + Shadow: Add support for Atari iplan2p8 + + Add support for Atari-style interleaved bitplanes, with 2 bytes interleave + and 8 bits per pixel. + + Signed-off-by: Geert Uytterhoeven + Acked-by: Keith Packard + +commit 3f7506b0fca72b2462b85bc4f613de809ae95859 +Author: Geert Uytterhoeven +Date: Sun Mar 10 21:01:02 2013 +0100 + + Shadow: Add support for Atari iplan2p4 + + Add support for Atari-style interleaved bitplanes, with 2 bytes interleave + and 4 bits per pixel. + + Signed-off-by: Geert Uytterhoeven + Acked-by: Keith Packard + +commit 87af9ab7d52578b0ea315fc4f8dfd906d19755fb +Author: Geert Uytterhoeven +Date: Sun Mar 10 17:15:05 2013 +0100 + + Shadow: Add c2p core + + Add Chunky-to-Planar core functionality, to be used by the Atari and Amiga + (interleaved) bitplanes code. + + Signed-off-by: Geert Uytterhoeven + Acked-by: Keith Packard + +commit 4ee2566c3e420a717be36f79126a14e15edac30f +Author: Geert Uytterhoeven +Date: Tue Mar 12 18:10:40 2013 +0100 + + Xfbdev: Treat 1 bpp pseudocolor as monochrome + + miCreateDefColormap() only preallocates black and white pixels if + depth > 1. + Hence override the visual, so fbdevCreateColormap() takes care of it. + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit 6dfb94a891ed445f47832ba1364fcbf1de018f4a +Author: Geert Uytterhoeven +Date: Tue Mar 12 14:16:10 2013 +0100 + + Xfbdev: Add support for monochrome visuals + + Monochrome supports StaticGray, with hardcoded black and white pixels. + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit 1049b32166760bdc00106625e213d31a8fc60bad +Author: Geert Uytterhoeven +Date: Tue Mar 12 14:19:25 2013 +0100 + + Xfbdev: Handle unset fix.line_length + + Older frame buffer devices may not fill in fix.line_length, in which + case it must be calculated by the application. + + Signed-off-by: Geert Uytterhoeven + +commit 5c509c360d97bea78ef461596ab4b7bde69020ac +Author: Geert Uytterhoeven +Date: Fri Feb 22 13:21:28 2013 +0100 + + Xfbdev: Make char *fbdevDevicePath const + + This fixes: + + hw/kdrive/fbdev/fbdev.c: In function 'fbdevInitialize': + hw/kdrive/fbdev/fbdev.c:41:25: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit b08afbc53c1d583c3913b92e67db44823077b112 +Author: Geert Uytterhoeven +Date: Tue Mar 12 15:20:00 2013 +0100 + + KDrive: Bail out if screen initialization failed + + Else we may get a segmentation fault later. + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit e7045c9dd208a1afe36526ab21ef15f8b01c8bd2 +Author: Geert Uytterhoeven +Date: Sat Feb 23 20:09:22 2013 +0100 + + test/input: Fix double-aligned test in dix_valuator_alloc() on m68k + + On m68k, doubles are not 64-bit aligned, just like on i386 and sh. + + Signed-off-by: Geert Uytterhoeven + +commit 8bb0616cc2799c2c34448da6337ea8cb9438cda7 +Author: Geert Uytterhoeven +Date: Fri Feb 22 21:10:07 2013 +0100 + + miext/shadow/shpacked.c: Remove unused PickBit() define + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Keith Packard + +commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f +Author: Dave Airlie +Date: Wed Apr 10 16:09:01 2013 +1000 + + xf86: fix flush input to work with Linux evdev devices. + + So when we VT switch back and attempt to flush the input devices, + we don't succeed because evdev won't return part of an event, + since we were only asking for 4 bytes, we'd only get -EINVAL back. + + This could later cause events to be flushed that we shouldn't have + gotten. + + This is a fix for CVE-2013-1940. + + Signed-off-by: Dave Airlie + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit ddc149beaf708e84fb5573c4322d4f859c517917 +Author: Peter Hutterer +Date: Mon Feb 27 18:50:46 2012 +1000 + + Stop the shouting + + Meanwhile, here in the future lowercase letters have been invented. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 27356a45b4f6bad4d0bbf356e6d976d0c8dd257b +Author: Peter Hutterer +Date: Mon Feb 27 17:22:16 2012 +1000 + + dix: only allocate unused classes for master devices + + Slave devices don't need these and the matching code in CloseDevice() has a + IsMaster() condition on freeing these, causing a leak. + + ==16111== 384 bytes in 4 blocks are definitely lost in loss record 72 of 105 + ==16111== at 0x4C28BB4: calloc (vg_replace_malloc.c:467) + ==16111== by 0x42AEE2: AllocDevicePair (devices.c:2707) + ==16111== by 0x4BAA27: AllocXTestDevice (xtest.c:617) + ==16111== by 0x4BA89A: InitXTestDevices (xtest.c:570) + ==16111== by 0x425F5E: InitCoreDevices (devices.c:690) + ==16111== by 0x5ACB2D: main (main.c:257) + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 98b94c36d6b1d286bbd4cb414e54b4b95a1484b0 +Author: Maarten Lankhorst +Date: Mon Apr 15 16:53:48 2013 +0200 + + dix: copy event in TouchConvertToPointerEvent correctly + + Fixes reading random memory read beyond the end of original event. + + sizeof device_event: 424 + sizeof internal_event: 2800 + + Signed-off-by: Maarten Lankhorst + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac +Author: Knut Petersen +Date: Tue Feb 26 07:52:59 2013 +0100 + + Never try to execute BellProcPtr NULL. + + This prevents xts XI/XDeviceBell-2 test + from segfaulting the server. + + Signed-off-by: Knut Petersen + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 9003399708936481083424b4ff8f18a16b88b7b3 +Author: Rui Matos +Date: Sat Apr 13 04:22:54 2013 +0200 + + Xi: fix swapped grab mode args for keyboard devices in XIGrabDevice + + The protocol says that the grab_mode argument applies to the device + being grabbed and paired_device_mode to the paired master + device. GrabDevice() however takes in a pointer mode and a keyboard + mode and so we have to swap the values according the type of device + being grabbed. + + Signed-off-by: Rui Matos + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit d16284687ddeffde32a561b8c67b2e2e3d66aeaa +Author: Bryce Harrington +Date: Wed Apr 10 23:05:40 2013 -0700 + + xfree86: Revert workaround for drm race condition. + + Revert 70739e817b2d64bc020ea491f23a3574bdb6155e and mostly revert + c31eac647a9ecf0fb20dc98266cadf0ba923ba14. + + Further investigation shows the encountered race condition is between + lightdm and plymouth-splash, as implemented in the Ubuntu distribution + within the limitations of upstart's job coordination logic, and can (and + should) be fixed within those limiations. Not in xserver itself. + + This leaves some of the diagnostic improvements from the recent patch + series, in case others run into a similar situation. + + Signed-off-by: Bryce Harrington + Signed-off-by: Peter Hutterer + +commit 131f883f85b9b734e5e5652f16ba1d3b5f4de12f +Author: Peter Hutterer +Date: Fri Apr 12 09:14:53 2013 +1000 + + xfree86: change a log message + + This path is technically executed through config/udev, but having two + messages in the form "config/udev: Adding drm device" makes it appear as if + the udev filters are wrong and it's trying to add the same device twice. In + fact, it's only one device, only added once, but a duplicate log message. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 22cab8a28a433d03a4e6ba97f9a160271d73cb52 +Author: Dave Airlie +Date: Wed Apr 10 16:32:15 2013 +1000 + + xf86: don't hotplug output devices while VT switched. + + We don't want to hotplug output devices while we are VT switched, + as we get races between multiple X servers on the device open, and + drm device master status. This just queues device opens until we return + from VT switch. + + Reviewed-by: Chris Wilson + Signed-off-by: Dave Airlie + +commit 5b359cf6135ca173d8f65cb92926332f07f91efe +Author: Dave Airlie +Date: Wed Apr 10 16:32:11 2013 +1000 + + xf86: use new xf86VTOwner interface in a few places + + This replaces some previous uses of direct xf86Screens[0] accesses. + + Reviewed-by: Chris Wilson + Signed-off-by: Dave Airlie + +commit d61ea1f64db45201c1a2b39c39293c5768d98092 +Author: Dave Airlie +Date: Wed Apr 10 16:32:02 2013 +1000 + + xfree86: add VT owner interface + + This is just a simple interface to avoid accessing x86Screens[0] + directly. + + Reviewed-by: Chris Wilson + Signed-off-by: Dave Airlie + +commit 7347f39f94d8cebbf73ce1a2f94d1abdaf7ff383 +Author: Maarten Lankhorst +Date: Tue Apr 9 11:19:07 2013 +0200 + + Xi: Do not handle ET_TouchOwnership in ProcessTouchEvent + + The event struct is different, causing memory corruption on 1.13 and 1.14, + + as can be witnessed in https://bugs.freedesktop.org/show_bug.cgi?id=56578 + + Signed-off-by: Maarten Lankhorst + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit dbba50a1280cbda9ecff6f37884b4c5756c30bab +Author: Keith Packard +Date: Tue Apr 9 16:23:19 2013 -0700 + + Xi: Use correct destination when swapping barrier events + + Write the swapped values to the destination rather than the source. + + Signed-off-by: Keith Packard + Reviewed-by: Jasper St. Pierre + Signed-off-by: Peter Hutterer + +commit b86b3d10bb2fee1a922b8831e8bb415c339f3d99 +Author: Peter Hutterer +Date: Mon Mar 4 07:58:41 2013 +1000 + + dix: don't set non-exisiting flags on touch events + + Unlike pointer/keyboard events, the flags field for ET_Touch* is a set of + server-internal defines that we need to convert to XI protocol defines. + Currently only two of those defines actually translate to the protocol, so + make sure we don't send internal garbage down the wire. + + No effect to current clients since they shouldn't look at undefined bits + anyway. + + Signed-off-by: Peter Hutterer + +commit ecf62755086fd65898998d5a509aee5f29a9583d +Author: Jeremy White +Date: Thu Mar 21 10:58:57 2013 -0500 + + Define prototypes for hw/xfree86/modes/xf86Modes.c only in xf86Modes.h. + + This removes a large number of redundant declaration warnings. + + Signed-off-by: Jeremy White + Reviewed-by: Robert Morell + Signed-off-by: Keith Packard + +commit e13f29984251dbbe6076264ed710c2922312eed1 +Author: Bryce Harrington +Date: Tue Mar 19 12:12:46 2013 -0700 + + xfree86: Be verbose if waiting on opening the drm device + + Signed-off-by: Bryce Harrington + Reviewed-by: Chris Wilson + Signed-off-by: Keith Packard + +commit 70739e817b2d64bc020ea491f23a3574bdb6155e +Author: Bryce Harrington +Date: Tue Mar 19 12:12:45 2013 -0700 + + xfree86: Fix race condition failure opening drm. + + If other processes have had drm open previously, xserver may attempt to + open the device too early and fail, with xserver error exit "Cannot + run in framebuffer mode" or Xorg.0.log messages about "setversion 1.4 + failed". + + In this situation, we're receiving back -EACCES from libdrm. To address + this we need to re-set ourselves as the drm master, and keep trying to + set the interface until it works (or until we give up). + + See https://bugs.launchpad.net/ubuntu/+source/libdrm/+bug/982889 + + Signed-off-by: Bryce Harrington + Reviewed-by: Chris Wilson + Signed-off-by: Keith Packard + +commit c31eac647a9ecf0fb20dc98266cadf0ba923ba14 +Author: Bryce Harrington +Date: Tue Mar 19 12:12:44 2013 -0700 + + xfree86: Keep trying to set interface on drm for 2 seconds. + + And if we've had to delay booting due to not being able to set the + interface, fess up. + + Signed-off-by: Bryce Harrington + Reviewed-by: Chris Wilson + Signed-off-by: Keith Packard + +commit d1cc210de8c13f2db9f6f284ecc652305c28801e +Author: Bryce Harrington +Date: Tue Mar 19 12:12:43 2013 -0700 + + xfree86: Provide more details on failure + + Signed-off-by: Bryce Harrington + Reviewed-by: Chris Wilson + Signed-off-by: Keith Packard + +commit f059d0dabc553a5f748d86de9115da00be5997d5 +Author: Bryce Harrington +Date: Tue Mar 19 12:12:42 2013 -0700 + + xfree86: Track error code and add label for error handling. + + Signed-off-by: Bryce Harrington + Reviewed-by: Chris Wilson + Signed-off-by: Keith Packard + +commit 4d7052bd7bbf49b573dc4d34ad14e7f058a0d884 +Author: Bryce Harrington +Date: Tue Mar 19 12:12:41 2013 -0700 + + xfree86: (Cleanup) Close fd if drm interface 1.4 could not be set. + + Signed-off-by: Bryce Harrington + Reviewed-by: Chris Wilson + Signed-off-by: Keith Packard + +commit 8928f8fa0bb154ce437af703ff702016f0dcf127 +Author: Geert Uytterhoeven +Date: Mon Mar 18 21:38:10 2013 +0100 + + kdrive/fbdev: revive randr new screen size logic + + hw/kdrive/fbdev/fbdev.c: In function 'fbdevRandRSetConfig': + hw/kdrive/fbdev/fbdev.c:470:19: warning: variable 'newheight' set but not used [-Wunused-but-set-variable] + hw/kdrive/fbdev/fbdev.c:470:9: warning: variable 'newwidth' set but not used [-Wunused-but-set-variable] + + Signed-off-by: Geert Uytterhoeven + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 808c87bff710263f5a7b3c12a7e7fec54672fecd +Author: Peter Hutterer +Date: Mon Mar 25 14:51:58 2013 +1000 + + Revert "kdrive: fix "set but not used" warnings" + + Partial revert of commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997, better + fix coming up. + + Signed-off-by: Peter Hutterer + +commit ac4c2abe985ce6816a3389c41eb23462c6ac2486 +Author: vdb@picaros.org +Date: Thu Mar 7 16:07:31 2013 +0100 + + xserver: add monitor Option "ZoomModes" [v2] + + Section "Monitor" + Identifier "a21inch" + Option "PreferredMode" "1600x1200" + Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480" + EndSection + + The option's effect is to search for and mark once each named mode in + the output modes list. So the specification order is free and the zoom + modes sequence follows the order of the output modes list. All marked + modes are available via the Ctrl+Alt+Keypad-{Plus,Minus} key + combination. + + See also http://bugs.freedesktop.org/show_bug.cgi?id=17954. + + This option has its use for combined monitor and television setups. + It allows for easy switching between 60 Hz and 50 Hz modes even when a + monitor refuses to display the input signal. + + (Includes a few minor changes suggested by Aaron for v2) + + Signed-off-by: Servaas Vandenberghe + Reviewed-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit 2967391c6d35f03121afa8003e0fb94b62495129 +Author: Peter Hutterer +Date: Thu Feb 28 10:43:05 2013 +1000 + + Xi: add a comment to make a condition a bit clearer + + The commit message to 676447190190d8546165e21be242cf16dd69f5ae explains it, + but that doesn't stop the WTF moment when reading the code. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 2fdde2c40d83695438b6f5615f98bd7ae801b43d +Author: Peter Hutterer +Date: Mon Feb 25 15:21:32 2013 +1000 + + dix: update coords for touch events in PlayReleasedEvents + + Note: this is only hit for #ifdef PANORAMIX + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 697071ab2b7f8910e01ed74618138538291cd1e8 +Author: Peter Hutterer +Date: Thu Feb 28 10:30:15 2013 +1000 + + Xi: compress two if statements with the same body + + We do the same thing here, compress them into one body. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 11bead1fa205a1353e6a33c6024c7e8ace80be7c +Author: Peter Hutterer +Date: Mon Feb 25 11:13:52 2013 +1000 + + dix: fix a comment + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit fc504a44d12d537d4e07f659f1863f200a0272ad +Author: Peter Hutterer +Date: Fri Mar 1 08:26:06 2013 +1000 + + Xi: use a temp variable for the new listener + + Instead of accessing ti->listener[0] all the time. + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 9978b57b8d94f061d72a67b99a02b0ba16a11429 +Author: Peter Hutterer +Date: Fri Mar 1 08:43:58 2013 +1000 + + Xi: return !Success from DeliverTouchEmulatedEvent if we didn't deliver + + All callers currently ignore the new value, so this patch has no effect. + Inverse call graph: + + DeliverTouchEmulatedEvent + DeliverEmulatedMotionEvent Ignores value + DeliverTouchBeginEvent + DeliverTouchEvent + DeliverTouchEvents Ignores value + DeliverTouchEndEvent + DeliverTouchEvent + DeliverTouchEvents Ignores value + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit cc3d1a5a6120e721a46c67446ba68f5596055633 +Author: Piotr Dziwinski +Date: Sat Feb 23 13:14:45 2013 +0100 + + glx: fix uninitialized var in __glXDRIscreenProbe + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59825 + + Signed-off-by: Piotr Dziwinski + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit c2ede8f92f0d6f15b1b2a04889cb54cd1728780b +Merge: 190b032 7050aae +Author: Keith Packard +Date: Mon Mar 18 11:26:24 2013 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 190b0321510b99d4738915f540cea5c0c51e07e2 +Author: Zack Rusin +Date: Thu Feb 14 15:06:57 2013 -0800 + + GLX/DRI2: Do not expose INTEL_swap_event without swap control + + Swap events depent on the implementation of ScheduleSwap. By + unconditionally enabling GLX_INTEL_swap_event we're breaking + the system with drivers that don't support it because the apps + are forever stuck waiting for an event that will never be + delivered. So lets enable the extension only if the hooks it + depends on are actually there. + + Signed-off-by: Zack Rusin + Reviewed-by: Ian Romanick + Signed-off-by: Keith Packard + +commit 116f020102fd6c2a603069a639b113dfa31b48b7 +Merge: cf89aa5 0f537da +Author: Keith Packard +Date: Mon Mar 18 11:18:58 2013 -0700 + + Merge remote-tracking branch 'whot/next' + +commit cf89aa53748b964f9d9eceaa12a7d6f1a076d1ee +Author: Tomasz Lis +Date: Mon Mar 11 10:21:28 2013 +0100 + + Full support of sRGB capable fbconfigs. + + Changes to correctly initialize the sRGB capability attribute and + transfer it between XServer and the client. Modifications include + extension string, transferring visual config attribs and fbconfig + attribs. Also, attribute is initialized in the modules which do not + really use it (xquartz and xwin). + This version advertises both ARB and EXT strings, and initializes + the capability to default value of FALSE. It has corrected required + GLX version and does not influence swrast. The sRGB capable attribute + is attached only to those configs which do have this capability. + Both ARB and EXT versions share the same GLX extension enabling bit. + + Signed-off-by: Tomasz Lis + Reviewed-by: Ian Romanick + Signed-off-by: Keith Packard + +commit 679ccecd8bc6d797e99f3b707f8041b727ca7a49 +Author: Keith Packard +Date: Mon Mar 18 10:01:20 2013 -0700 + + Bump release to 1.14.99.0 + + Get us off the release number so that we don't conflict with the + stable branch. + + Signed-off-by: Keith Packard + +commit 7050aae69c2a55dfdbb5c6af7882307e90ba4275 +Author: Robert Morell +Date: Tue Mar 12 09:40:16 2013 -0700 + + list.h: Make xorg_list_init inline + + Otherwise this file is emitted in every unit that includes it. + + Signed-off-by: Robert Morell + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 31595b528645a7e4903eb81da0fc332d78407f25 +Author: Robert Morell +Date: Tue Mar 12 09:37:43 2013 -0700 + + configure.ac: Require inputproto 2.3 + + This picks up support for Xi pointer barriers in the protocol. + + Signed-off-by: Robert Morell + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 3ac2e61705432951f9e1b96b42b4214e7f748f94 +Author: Peter Hutterer +Date: Sat Mar 9 17:12:53 2013 +1000 + + xfixes: ifdef PanoramiXFixes* (#62015) + + Fixes build failure with --disable-xinerama introduced by + 482e0cb cursor: Move pointer barrier code over to XI + + Reason is new include order: sdksyms.sh includes xfixes.h, which previously + did not include xfixesint.h. + + As of 482e0cb xfixes.h includes xibarriers.h which includes xfixesint.h + + X.Org Bug 62015 + + Signed-off-by: Peter Hutterer + Tested-by: Daniel Martin + +commit 5047810a4c20fab444b8c6eb146c55dcdb0d4219 +Author: Aaron Plattner +Date: Wed Mar 6 09:40:28 2013 -0800 + + fb: Rename wfbDestroyGlyphCache + + Renaming this function was missed in commit + 9cbcb5bd6a5360a128d15b77a02d8d3351f74366, so both libfb.so and libwfb.so define + functions named fbDestroyGlyphCache. + + Signed-off-by: Aaron Plattner + Reviewed-by: Søren Sandmann + Signed-off-by: Keith Packard + +commit 103b77c59e3638a45179bf6d7908f5c738d2d872 +Author: Keith Packard +Date: Tue Mar 5 22:31:17 2013 -0800 + + Version bumped to 1.14 + + Signed-off-by: Keith Packard + +commit 0f537da72d414ed84e3cd14e3bb7e08565136bd7 +Author: Andreas Wettstein +Date: Sun Mar 3 20:25:44 2013 +0100 + + xkb: Fixes to LatchMods/LatchGroup + + The main problem this patch addresses is that if a latch is put on + multi-level key with a Latch/Lock/Set, it is possible that after all + keys are released, still base modifiers are set, which typically will + make the keyboard unusable. To see how it happens (without the patch), + assume that key AltGr sets Mod5 when pressed by itself, and latches Mod3 + when pressed together with Shift. Now press Shift, then AltGr and + release both keys in reverse order. Mod3 is now latched, and the + LatchMods filter remains active as the second filter. Now press AltGr; + Mod5 base modifier gets set, and the SetMods filter will become active + as the first filter. Release AltGr: First, the SetMods filter will set + clearMods to Mod5, then the LatchMods filter will overwrite clearMods + with Mod3. Result: the Mod5 base modifier will remain set. This + example becomes practically relevant for the revised German standard + layout (DIN 2137-1:2012-06). + + Other changes implement the latch behaviour more accurately according to + the specification. For example, releasing a modifier latching key can + at the same time clear a locked modifier, promote another modifier that + is latched to locked, and latch a third modifier. Overall, what the + code does should be straightforward to compare what the XKB protocol + specification demands, see the table in section 6.3. + + Finally, releasing a key no longer cancels a latch that has not become + pending yet. In my opinion, the specification is not clear; it speaks + of "operating" a key, which the patch effectivly interprets as "press" + rather than "press or release". From my experience, using the latter + interpretation makes latches on higher levels practically unusable. In + the example given above, one would have to release AltGr always before + Shift to get the Mod3-Latch. The practical relevance of latches on + higher levels is once more given by the revised German standard layout. + + Signed-off-by: Andreas Wettstein + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit eadda231091aa6feb68207ee22f6bc3a390d4556 +Author: Peter Hutterer +Date: Fri Feb 15 11:19:09 2013 +1000 + + xephyr: fix "set but not used warnings" + + ephyrvideo.c: In function 'ephyrPutVideo': + ephyrvideo.c:1009:42: warning: variable 'drw_h' set but not used + ephyrvideo.c:1009:31: warning: variable 'drw_w' set but not used + ephyrvideo.c:1009:20: warning: variable 'drw_y' set but not used + ephyrvideo.c:1009:9: warning: variable 'drw_x' set but not used + ephyrvideo.c: In function 'ephyrGetVideo': + ephyrvideo.c:1058:42: warning: variable 'drw_h' set but not used + ephyrvideo.c:1058:31: warning: variable 'drw_w' set but not used + ephyrvideo.c:1058:20: warning: variable 'drw_y' set but not used + ephyrvideo.c:1058:9: warning: variable 'drw_x' set but not used + ephyrvideo.c: In function 'ephyrPutStill': + ephyrvideo.c:1107:42: warning: variable 'drw_h' set but not used + ephyrvideo.c:1107:31: warning: variable 'drw_w' set but not used + ephyrvideo.c:1107:20: warning: variable 'drw_y' set but not used + ephyrvideo.c:1107:9: warning: variable 'drw_x' set but not used + ephyrvideo.c: In function 'ephyrGetStill': + ephyrvideo.c:1156:42: warning: variable 'drw_h' set but not used + ephyrvideo.c:1156:31: warning: variable 'drw_w' set but not used + ephyrvideo.c:1156:20: warning: variable 'drw_y' set but not used + ephyrvideo.c:1156:9: warning: variable 'drw_x' set but not used + + Signed-off-by: Peter Hutterer + Reviewed-by: Robert Morell + +commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997 +Author: Peter Hutterer +Date: Fri Feb 15 11:19:08 2013 +1000 + + kdrive: fix "set but not used" warnings + + kinput.c: In function 'KdEnqueueKeyboardEvent': + kinput.c:1845:16: warning: variable 'ctrl' set but not used + kinput.c:1844:17: warning: variable 'keyc' set but not used + + kinput.c: In function 'KdEnqueuePointerEvent': + kinput.c:1887:12: warning: variable 'ms' set but not used + + kxv.c: In function 'KdXVDisable': + kxv.c:1181:19: warning: variable 'ScreenPriv' set but not used + + mouse.c: In function 'ps2SkipInit': + mouse.c:444:9: warning: variable 'skipping' set but not used + mouse.c: In function 'ps2Init': + mouse.c:473:10: warning: variable 'waiting' set but not used + mouse.c:472:9: warning: variable 'skipping' set but not used + + fbdev.c: In function 'fbdevRandRSetConfig': + fbdev.c:468:19: warning: variable 'newheight' set but not used + fbdev.c:468:9: warning: variable 'newwidth' set but not used + + Signed-off-by: Peter Hutterer + Reviewed-by: Robert Morell + +commit 44fc062f85df7288c17d2d64b73aa4957b91fd6d +Author: Peter Hutterer +Date: Mon Feb 18 14:57:58 2013 +1000 + + os: document pnprintf as sigsafe snprintf + + Signed-off-by: Peter Hutterer + +commit c100211034ab69ce453a1644fb61c6808d7e3eda +Author: Peter Hutterer +Date: Tue Dec 18 14:12:40 2012 +1000 + + dix: only show the cursor if a window defines one (#58398) + + e02f864fdf "Suppress cursor display until the first XDefineCursor() request" + disabled cursor display a priori unless -retro is given. + + On a plain server, caling XFixesHideCursor() and XFixesShowCursor() would + show the default root cursor, despite no client actually defining a cursor. + + Change the logic, disable CursorVisible by default and only enable it from + the window's CWCursor logic. If no window ever defines a cursor, said cursor + stays invisible. + + X.Org Bug 58398 + + Signed-off-by: Peter Hutterer + Tested-by: Bastien Nocera + Reviewed-by: Daniel Martin + +commit 6238bd68bd71323f8b4f1808f34dabe2ae447fe3 +Author: Aaron Plattner +Date: Tue Mar 5 13:04:46 2013 -0800 + + DPMS: include GPU screens in DPMS code + + Otherwise, displays driven by GPU screens remain on all the time. + + Signed-off-by: Aaron Plattner + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit dd4ab8b572956f9457616869d6e383c8ed964c73 +Author: Peter Hutterer +Date: Tue Mar 5 10:14:29 2013 +1000 + + Xi: force dtime to 0 on the first BarrierHit + + dtime to the previous event is 0 on the first BarrierHit event. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + Signed-off-by: Keith Packard + +commit 604169af8b67afc74a292cdb9070a3a1f2d7c536 +Merge: 8f4640b 6ea59dc +Author: Keith Packard +Date: Mon Mar 4 21:09:59 2013 -0800 + + Merge commit '6ea59dc2d8887102bfd8d7c838d2e7ab17645aec' + +commit 6ea59dc2d8887102bfd8d7c838d2e7ab17645aec +Author: Jasper St. Pierre +Date: Sun Mar 3 04:50:55 2013 -0500 + + xibarriers: Remove accidental use of the comma operator + + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349 +Author: Daniel Martin +Date: Thu Dec 20 13:50:17 2012 +0100 + + ephyr: Fix crash on 24bpp host framebuffer + + Use bytes_per_line and bits_per_pixel from the created XImage to fix + https://bugzilla.redhat.com/show_bug.cgi?id=518960 + + Signed-off-by: Daniel Martin + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 +Author: Dave Airlie +Date: Wed Jan 9 12:58:28 2013 +1000 + + randr: cleanup provider properly + + So in the cold plug server shutdown case, we reap the resources + before we call CloseScreen handlers, so the config->randr_provider + is a dangling pointer when the xf86CrtcCloseScreen handler is called, + + however in the hot screen unplug case, we can't rely on automatically + reaped resources, so we need to clean up the provider in the xf86CrtcCloseScreen + case. + + This patch provides a cleanup callback from the randr provider removal + into the DDX so it can cleanup properly, this then gets called by the automatic + code for cold plug, or if hot unplug it gets called explicitly. + + Fixes a number of random server crashes on shutdown + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58174 + Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=891140 + + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit 3ec35c45ca17f5ed6fd02c50fc49ae7b8d128dcb +Author: Dave Airlie +Date: Wed Jan 9 12:53:14 2013 +1000 + + xf86: actually set the compat output in the failure case + + The previous fix for the previous fix, didn't fully work, + + If we don't set compat_output we end up doing derferences + of arrays with -1, leading to valgrind warnings. + + Reviewed-by: Chris Wilson + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit da8ee26023fc2868fe970471195a5f3c86fb574b +Author: Dave Airlie +Date: Wed Jan 9 12:51:45 2013 +1000 + + xfree86/hotplug: cleanup properly if the screen fails to initialise + + Due to another bug, the modesetting/udl driver would fail to init properly + on hotplug, when it did the code didn't clean up properly, and on removing + the device the server could crash. + + Found in F18 testing. + + Signed-off-by: Dave Airlie + Reviewed-by: Aaron Plattner + +commit e21e183059df5975e7086850d1931edb2c1bbd06 +Author: Marcin Slusarz +Date: Thu Feb 21 09:02:44 2013 +1000 + + os: use libunwind to generate backtraces + + Libunwind generates backtraces much more reliably than glibc's "backtrace". + + Before: + 0: /opt/xserver/bin/X (0x400000+0x18ce36) [0x58ce36] + 1: /opt/xserver/bin/X (xorg_backtrace+0x9) [0x58d119] + 2: /opt/xserver/bin/X (0x400000+0x190d69) [0x590d69] + 3: /lib64/libpthread.so.0 (0x7fb904268000+0x10a90) [0x7fb904278a90] + 4: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987] + 5: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8] + 6: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b] + 7: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719] + 8: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (0x7fb90220e000+0x76f3) [0x7fb9022156f3] + 9: /opt/xserver/lib/xorg/modules/libexa.so (0x7fb9019c7000+0xbae0) [0x7fb9019d2ae0] + 10: /opt/xserver/bin/X (0x400000+0x17d2b3) [0x57d2b3] + 11: /opt/xserver/bin/X (0x400000+0xc9930) [0x4c9930] + 12: /opt/xserver/bin/X (0x400000+0x3a81a) [0x43a81a] + 13: /opt/xserver/bin/X (0x400000+0x3d6a1) [0x43d6a1] + 14: /opt/xserver/bin/X (0x400000+0x2c2ca) [0x42c2ca] + 15: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5] + 16: /opt/xserver/bin/X (0x400000+0x2c60d) [0x42c60d] + 17: ?? [0x0] + + After: + 0: /opt/xserver/bin/X (OsSigHandler+0x39) [0x590d69] + 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7fb904278a8f] + 2: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987] + 3: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8] + 4: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b] + 5: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719] + 6: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (nouveau_exa_download_from_screen+0x1a3) [0x7fb9022156f3] + 7: /opt/xserver/lib/xorg/modules/libexa.so (exaGetImage+0x1f0) [0x7fb9019d2ae0] + 8: /opt/xserver/bin/X (miSpriteGetImage+0x173) [0x57d2b3] + 9: /opt/xserver/bin/X (compGetImage+0xb0) [0x4c9930] + 10: /opt/xserver/bin/X (ProcGetImage+0x55a) [0x43a81a] + 11: /opt/xserver/bin/X (Dispatch+0x341) [0x43d6a1] + 12: /opt/xserver/bin/X (main+0x3ba) [0x42c2ca] + 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5] + 14: /opt/xserver/bin/X (_start+0x29) [0x42c60d] + 15: ? (?+0x29) [0x29] + + Signed-off-by: Marcin Slusarz + Reviewed-by: Peter Hutterer + Tested-by: Knut Petersen + +commit e27b2e61632b220ddc36d0d0387581a9f4774f21 +Author: Peter Harris +Date: Tue Feb 19 16:08:52 2013 -0500 + + xkb: Set nIndicators in XkbGetIndicatorMap + + Xlib doesn't use this value (it computes it from the reply length + instead) which is why nobody has noticed yet. But the spec + http://www.x.org/releases/X11R7.7/doc/kbproto/xkbproto.html + says that it should be set. + + Signed-off-by: Peter Harris + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 3aac7a59dc6ef2d8bbf46ba5d37acdf6013e9450 +Author: Daniel Martin +Date: Tue Dec 11 17:23:55 2012 +0100 + + ephyr: Add -resizeable option + + With this option passed, ephyr windows can be resized like normal + windows on the fly, without the need of an explicit parent window. + + Signed-off-by: Daniel Martin + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit f9198e278becec158b570204cf9fc1de822ac76b +Author: Peter Hutterer +Date: Mon Feb 27 16:43:10 2012 +1000 + + dix: FreeAllAtoms() on reset + + ==5712== 6 bytes in 1 blocks are still reachable in loss record 17 of 585 + ==5712== at 0x4A074CD: malloc (vg_replace_malloc.c:236) + ==5712== by 0x3D1DE885B1: strndup (strndup.c:46) + ==5712== by 0x41CB71: MakeAtom (atom.c:121) + ==5712== by 0x55AE3E: XIGetKnownProperty (xiproperty.c:401) + ==5712== by 0x4251C9: AddInputDevice (devices.c:312) + ==5712== by 0x42AC0C: AllocDevicePair (devices.c:2657) + ==5712== by 0x425E6E: InitCoreDevices (devices.c:677) + ==5712== by 0x5ACA05: main (main.c:257) + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 88517ced1fa2e621be2d05a319b522b3111da516 +Merge: 82425c6 73974dd +Author: Peter Hutterer +Date: Fri Feb 15 11:58:52 2013 +1000 + + Merge branch 'master' of git+ssh://people.freedesktop.org/~alanc/xserver into next + +commit 82425c66e7a8c436b5be7ad44880dd4be6c1f06a +Author: Peter Hutterer +Date: Thu Feb 14 10:21:47 2013 +1000 + + xfree86: remove redundant declaration of inputInfo + + xf86Cursor.c:19:18: warning: redundant redeclaration of 'inputInfo' + [-Wredundant-decls] + In file included from xf86Cursor.c:18:0: + ../../../include/inputstr.h:614:57: note: previous declaration of + 'inputInfo' was here + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 6133c417595a9c8fc158b0d68fd4a7a2c58fdc47 +Author: Peter Hutterer +Date: Thu Feb 14 10:15:33 2013 +1000 + + xkb: remove unused variable 'names' + + xkb.c: In function '_XkbSetNamesCheck': + xkb.c:3987:18: warning: variable 'names' set but not used + [-Wunused-but-set-variable] + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 63d00c6b146d7f5fb80f20f19066088059042a5e +Author: Peter Hutterer +Date: Thu Feb 14 10:13:53 2013 +1000 + + Xext: rename two shadowing variables + + panoramiX.c: In function 'PanoramiXCreateConnectionBlock': + panoramiX.c:599:10: warning: declaration of 'disableBackingStore' shadows a + global declaration [-Wshadow] + In file included from ../include/windowstr.h:60:0, + from panoramiX.c:47: + ../include/opaque.h:56:52: warning: shadowed declaration is here [-Wshadow] + + panoramiX.c: In function 'PanoramiXConsolidate': + panoramiX.c:834:19: warning: declaration of 'pScreen' shadows a previous + local [-Wshadow] + panoramiX.c:813:15: warning: shadowed declaration is here [-Wshadow] + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 8bbea9f48f43e54c55c8b60ea36bda3134a86af2 +Author: Peter Hutterer +Date: Thu Feb 14 10:09:53 2013 +1000 + + Xext: renaming shadowing variable + + xvdisp.c: In function 'ProcXvStopVideo': + xvdisp.c:712:11: warning: declaration of 'rc' shadows a previous local + [-Wshadow] + xvdisp.c:705:17: warning: shadowed declaration is here [-Wshadow] + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 7b79a2e4a11b5c5f0ebaa495828725e235d2b08e +Author: Peter Hutterer +Date: Thu Feb 14 10:06:55 2013 +1000 + + fb: drop two unneeded shadowing variables + + fbpict.c: In function 'fbGlyphs': + fbpict.c:188:6: warning: declaration of 'x' shadows a previous local + [-Wshadow] + fbpict.c:111:9: warning: shadowed declaration is here [-Wshadow] + fbpict.c:188:9: warning: declaration of 'y' shadows a previous local + [-Wshadow] + fbpict.c:111:12: warning: shadowed declaration is here [-Wshadow] + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Soren Sandmann + Reviewed-by: Mark Kettenis + +commit 858d8b19b3a5bb59e5c5f9a9e68adce2495b5e31 +Author: Peter Hutterer +Date: Thu Feb 14 10:04:06 2013 +1000 + + xfree86: drop unused prevSIGIO + + Unused as of 5d309af2ed93e91c7d72f548a11052051efbb40f + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 592d35aef0a8089a344543cf5a425e0537c0431b +Author: Peter Hutterer +Date: Thu Feb 14 10:02:02 2013 +1000 + + randr: fix "set but unused" warnings + + rrcrtc.c: In function 'RRCrtcDetachScanoutPixmap': + rrcrtc.c:366:9: warning: variable 'ret' set but not used + [-Wunused-but-set-variable] + rrcrtc.c: In function 'rrCheckPixmapBounding': + rrcrtc.c:505:13: warning: variable 'ret' set but not used + [-Wunused-but-set-variable] + rrcrtc.c:445:9: warning: unused variable 'i' [-Wunused-variable] + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 90642948cc78834d95f7a3bddaac7ff77b68ed7e +Merge: 9a35d42 eda7dbf +Author: Keith Packard +Date: Thu Feb 14 11:05:48 2013 -0800 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 9a35d4240e2aa91ac104f0f9f86f83ff9a2d3d04 +Author: Peter Hutterer +Date: Thu Feb 14 16:31:13 2013 +1000 + + os: fix pnprintf OOB buffer read for unterminated length modifiers + + Format strings with length modifiers but missing format specifier like "%0" + will read one byte past the array size. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit eda7dbff5a9f35fefe1e3dedacb82daadbf5945e +Author: Jeremy Huddleston Sequoia +Date: Sat Feb 9 20:53:02 2013 -0800 + + XORG_TLS: Pick the first option that works (ie: prefer __thread) + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 5da82f872daf25939a8fa04f1561b01f0315a623 +Author: Jeremy Huddleston Sequoia +Date: Sat Feb 9 20:40:10 2013 -0800 + + os: Ensure is included in strndup.c + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Alan Coopersmith + +commit 67eaf4b46f678bc904f47dfcab6655e170d843e0 +Author: Jeremy Huddleston Sequoia +Date: Sat Feb 9 20:34:33 2013 -0800 + + XQuartz: Ensure is included in capabilities.c + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Alan Coopersmith + +commit 955d434f4d755d00a24ae4068b9957765989d672 +Author: Keith Packard +Date: Wed Feb 13 21:39:37 2013 -0800 + + Update to version 1.3.99.902 (1.14 RC2) + + Signed-off-by: Keith Packard + +commit 7115f6c709898a5124b67e19c61dc01334471358 +Author: Aaron Plattner +Date: Wed Jan 23 16:58:47 2013 -0800 + + randr: unref the provider shared pixmap the appropriate number of times + + When an RandR shared pixmap is created in rrCreateSharedPixmap, it has a refcnt + of 1. Then, PixmapShareToSlave bumps the refcnt to 2. However, there's no + corresponding PixmapUnshareFromSlave where the refcnt can be decreased again, + and there's no convenient common place where the refcnt can be decremented when + the slave pixmap is destroyed. + + Fix this by just unreffing the pixmap twice in RRCrtcDetachScanoutPixmap. + + Signed-off-by: Aaron Plattner + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit da92690107d90061205340d4cdc98b73b59db9b2 +Author: Aaron Plattner +Date: Mon Feb 11 14:31:56 2013 -0800 + + xf86: use nt_list_for_each_entry_safe to walk InputHandlers in xf86Wakeup + + This is necessary when the input handler deletes itself from the + list. Bug found by Maarten Lankhorst, this patch uses the list macros + instead of open-coding the fix. + + Signed-off-by: Keith Packard + Reviewed-by: Peter Hutterer + +commit d0a14877872b6a33172fb8c8f335792a28b9499b +Author: Bryce Harrington +Date: Fri Feb 8 15:56:02 2013 -0800 + + xfree86: Man page shouldn't say Device is mandatory anymore + + man xorg.conf states that the 'Device' identifier is required in the + 'Screen' section, yet current xserver defaults properly and boots up + fine without it. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=20742 + Signed-off-by: Bryce Harrington + Signed-off-by: Keith Packard + +commit 5e91054aa070ea09b61325b7ec479d767b02730e +Author: Bryce Harrington +Date: Fri Feb 8 15:56:01 2013 -0800 + + xfree86: Use fbdev/vesa driver on Oaktrail, Medfield, CDV rather than -intel + + Instead of defaulting to -intel for Oaktrail, Medfield, and CDV chips, + default to -fbdev. For Poulsbo (only), attempt to use -psb if it's + installed, and fallback to fbdev otherwise. All other Intel chips + should use -intel. + + This fixed an issue where -intel would load on these chips and cause a + boot failure. Newer -intel drivers avoid the boot hang, but it's still + the wrong driver to load, so why take chances. + + The patch was originally created by Stefan Dirsch for OpenSUSE. We have + included it in our stable release (Ubuntu "quantal" 12.10) since + December. + + ref: https://bugzilla.novell.com/show_bug.cgi?id=772279 + ref: https://bugs.launchpad.net/ubuntu/+bug/1069031 + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60514 + Signed-off-by: Bryce Harrington + Signed-off-by: Keith Packard + +commit c1602d1c17967bdd4db9db19b3a9c0dfca6a58aa +Author: Dave Airlie +Date: Tue Feb 5 07:46:06 2013 -0800 + + randr: bump advertised RandR version to 1.4 + + Signed-off-by: Dave Airlie + Reviewed-by: Aaron Plattner + Tested-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit 9f79e93b6b3416055d08a0e8f9f16d5fd0649e36 +Author: Peter Hutterer +Date: Wed Jan 30 03:20:07 2013 +0000 + + Short-cut the input device cleanup process during AbortServer() + + If we're about to abort, we're already in the signal handler and cannot call + down to the default device cleanup routines (which reset, free, alloc, and + do a bunch of other things). + + Add a new DEVICE_ABORT mode to signal a driver's DeviceProc that it must + reset the hardware if needed but do nothing else. An actual HW reset is only + required for some drivers dealing with the HW directly. + + This is largely backwards-compatible, hence the input ABI minor bump only. + + Drivers we care about either return BadValue on a mode that's not + DEVICE_{INIT|ON|OFF|CLOSE} or print an error and return BadValue. Exception + here is vmmouse, which currently ignores it and would not reset anything. + This should be fixed if the reset is required. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit b58221f9da8c549d979215271359c6cd88b5568a +Author: Peter Hutterer +Date: Fri Feb 8 14:52:02 2013 +1000 + + dix: support the transformation matrix for relative devices. + + The transformation matrix we previously stored was a scaled matrix based on + the axis ranges of the device. For relative movements, the scaling is not + required (or desired). + + Store two separate matrices, one as requested by the client, one as the + product of [scale . matrix . inv_scale]. Depending on the type of movement, + apply the respective matrix. + + For relative movements, also drop the translation component since it doesn't + really make sense to use that bit. + + Input ABI 19 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit b173eb2ae3349c557db1ff9e424fa540b8289bb2 +Author: Keith Packard +Date: Fri Feb 8 08:57:43 2013 -0800 + + os: Round fraction in pnprintf %f format + + Truncating the fraction part leads to a test failure where -1203.30 is + printed as -1203.29. Round this to the nearest value instead by adding + 0.5 before converting to an integer + + Signed-off-by: Keith Packard + +commit 509b3c3dc82e7abce1900d5e1cddd90f23be5a87 +Author: Carlos Garnacho +Date: Wed Feb 6 14:07:22 2013 +0100 + + dix: Set focus field on XI2 crossing events + + Set on DeviceEnterLeaveEvent() the xXIEnterEvent->focus field + similarly to how the CoreEnterLeaveEvent() function above does + for core events. + + This fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=677329 + reported to GTK+, where focus handling on window managers with + sloppy focus or no window manager present was broken due to this + field being always set to FALSE. + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 3e4be4033aed78b2bb3a18d51f0963989efd1af3 +Author: Peter Hutterer +Date: Fri Jan 25 11:47:32 2013 +1000 + + dix: when shutting down slave devices, shut down xtest devices last + + XTest devices are the first ones in the list, being initialised together + with the master devices. If we disable the devices in-order and a device has + a button down when being disabled, the XTest device is checked for a + required button release (xkbAccessX.c's ProcessPointerEvent). This fails if + the device is already NULL. + + Instead of putting the check there, disable the devices in the reverse order + they are initialised. Disable physical slaves first, then xtest devices, + then the master devices. + + Testcase: shut down server with a button still held down on a physical + device + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 0d5bb882600ee7734af034fbea935a79d21d1e70 +Merge: b33fcb1 61a99af +Author: Peter Hutterer +Date: Fri Feb 8 14:10:52 2013 +1000 + + Merge branch 'ptraccel-fixes' into for-keith + +commit 61a99aff9d33728a0b67920254d2d4d79f80cf39 +Author: Peter Hutterer +Date: Fri Jan 11 14:22:07 2013 +1000 + + dix: pre-scale relative events from abs devices to desktop ratio (#31636) + + Absolute devices may send relative events depending on the mode (synaptics + by default, wacom per option). The relative events are added to the previous + position, converted into device coordinates and then scaled into desktop + coordinates for pointer movement. + + Because the device range must be mapped into the desktop coordinate range, + this results in uneven scaling depending dimensions, e.g. on a setup with + width == 2 * height, a relative movement of 10/10 in device coordinates + results in a cursor movement of 20/10 (+ acceleration) + + Other commonly user-visible results: + * the touchpad changing acceleration once an external monitor as added. + * drawing a circle on a wacom tablet in relative mode gives an ellipsis in + the same ratio as the desktop dimensions. + + Solution: pre-scale the incoming relative x/y coordinates by width/height + ratio of the total desktop size. Then add them to the previous + coordinates and scale back with the previous mapping, which will undo the + pre-scaling and give us the right movement. + + X.Org Bug 31636 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit a6ba2b79ae8ad0fdee3f208d5e030b012df48785 +Author: Peter Hutterer +Date: Fri Jan 11 08:53:24 2013 +1000 + + dix: unify prefix for ptraccel debugging in DebugAccelF macro + + If we're already using our own custom macro, might as well use it properly. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 0d7d79406011169ad95e23c6e937f6d15a5ec3cc +Author: Peter Hutterer +Date: Fri Jan 11 08:52:08 2013 +1000 + + dix: use BUG_RETURN_VAL for an error message + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit a0c38ea6cbad61edcfefff0e5dd6330edb706f13 +Author: Peter Hutterer +Date: Fri Jan 11 08:49:15 2013 +1000 + + dix: add some more info to a ptraccel debug msg + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 95125a7c0cbbbae40216a0497acdd863ddc645ed +Author: Peter Hutterer +Date: Thu Jan 10 13:19:27 2013 +1000 + + dix: fix ptraccel debugging printfs + + This is mostly sigsafe code, so use sigsave printf. And update some fields + to double that used to be int. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit b33fcb149710a28fd8767b2307a97bf367de695e +Author: Andreas Wettstein +Date: Tue Jan 29 21:49:20 2013 +0100 + + xkb: Fix repeat behaviour of redirect and message actions + + The redirect and the message action filter functions implicitly assumed that + when they receive an event for the same keycode they were activated for, that + this is the a release of the key that activated the filter. This is not true + if the key autorepeats. Due to the incorrect assumption, the effective key + repeat rate was effectively halved. + + Signed-off-by: Andreas Wettstein + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 8571c648a79444bcee9a0fe6e395129116372f49 +Author: Peter Hutterer +Date: Sat Jan 26 15:53:08 2013 +1000 + + Xext: if a root window is given in XTestFakeInput, move to that + + For absolute events, if the client specifies a screen number offset the + coordinates by that. And add a new flag so we know when _not_ to add the + screen offset in GPE. + + Without this offset and the flag, GPE would simply add the offset of the + current screen if POINTER_SCREEN is set. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 9fd6cb89539fde44a41ae5183c89ef9c8831c8dd +Author: Peter Hutterer +Date: Tue Jan 29 15:13:44 2013 +1000 + + Xext: pass the current screen to miProcessDeviceEvent() from xtest calls + + Not passing in a screen means we skip the screen crossing updates, so a + xtest event that changes between ScreenRecs won't do so until the next + physical event comes in or never, whichever comes earlier. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit a191dbfe850ed9c6440346f59cb0078e0e844edc +Author: Sybren van Elderen +Date: Tue Jan 29 15:43:57 2013 +1000 + + dix: when scaling from desktop coord, take the total desktop size (#51904) + + Scaled is already in desktop coordinates, take the total width into account, + not just the current screen's width. + + Fixes Xdmx pointer position calculation. + + X.Org Bug 51904 + + Signed-off-by: Sybren van Elderen + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 1cb19803f0f8dfd1e0fb9d189afe2262e24a0be5 +Author: Peter Hutterer +Date: Tue Jan 29 12:51:15 2013 +1000 + + include: fix typo in list description + + Signed-off-by: Peter Hutterer + +commit 3d35dfcf5bad1b0a028fbecd65cb6cf6ebf12503 +Author: Ted Felix +Date: Tue Jan 29 16:36:48 2013 +1000 + + xfree86: bail on misformed acpi strings (#73227) + + If acpid sends a string in a format that we can't parse, bail out instead of + potentially dereferencing a NULL-pointer. + + X.Org Bug 73227 + + Signed-off-by: Ted Felix + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit fdc451588816c4bc798d54e56316530e9066be80 +Author: Peter Hutterer +Date: Tue Jan 29 11:01:29 2013 +1000 + + Xi: limit valuator copy to valuator array size (#59939) + + mask[(MAX_VALUATORS + 7)/8] is larger than data[MAX_VALUATORS], so static + code checkers think we may be running OOB on the data array. Mask is + initialized to 0, so this should not happen, but change it anyway to shut up + code analyzer noise. + + X.Org Bug 59939 + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 48bc30c5413a1be0039fa77affcbbb4fe677479f +Author: Alan Coopersmith +Date: Tue Jan 29 10:24:32 2013 +1000 + + Xext: avoid null-pointer dereference in XTestFakeInput (#59937) + + dv is still NULL at this point, so return firstValuator instead (which is + the same value dv->firstValuator would be once initialized) + + X.Org Bug 59937 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 1058fcf57fdcb94d92e7b5f4483b347853d5f8e6 +Author: Peter Hutterer +Date: Sat Jan 26 14:13:33 2013 +1000 + + dmx: don't include dmx-config.h from xdmxconfig (#37502) + + dmx-config.h is a server header which includes dix-config.h. That again + defines a bunch of server-specifics, including setting the size of XID to + 32 bit. + + libX11 uses unsigned long (8 bits on x86_64). XGCValues thus ends up being + 16 bytes smaller in xdmxconfig than in the library, causing garbage to be + sent to the server. + + X.Org Bug 37502 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 73974dd7ea9ca4d4cdd5464cb813088a6ee9770b +Author: Alan Coopersmith +Date: Sun Jan 27 15:42:02 2013 -0800 + + Avoid memory leak in ddc resort() if find_header() fails + + Call find_header first, returning on failure before calling malloc. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit b1129a1f1771c9d1653cc15aae94a614f081638a +Author: Alan Coopersmith +Date: Sun Jan 27 14:00:54 2013 -0800 + + xf86XvMCScreenInit: Avoid leak if dixRegisterPrivateKey fails + + Found by parfait 1.1 memory analyser: + Memory leak of pointer 'pAdapt' allocated with malloc((88 * num_adaptors)) + at line 162 of hw/xfree86/common/xf86xvmc.c in function 'xf86XvMCScreenInit'. + 'pAdapt' allocated at line 158 with malloc((88 * num_adaptors)). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit 563db909bcf965b6103c1807bf9f00ede957077d +Author: Alan Coopersmith +Date: Sun Jan 27 13:55:50 2013 -0800 + + Avoid memory leak on realloc failure in localRegisterFreeBoxCallback + + Also avoids leaving invalid pointers in structures if realloc had to + move them elsewhere to make them larger. + + Found by parfait 1.1 code analyzer: + Memory leak of pointer 'newCallbacks' allocated with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))) + at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'. + 'newCallbacks' allocated at line 320 with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))). + newCallbacks leaks when newCallbacks != NULL at line 327. + Memory leak of pointer 'newPrivates' allocated with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))) + at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'. + 'newPrivates' allocated at line 324 with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))). + newPrivates leaks when newCallbacks == NULL at line 327. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit 08f75d3a9661c6c32800e1b4f150626200b889d9 +Author: Alan Coopersmith +Date: Sun Jan 27 13:50:30 2013 -0800 + + Avoid NULL pointer dereference in xf86TokenToOptinfo if token not found + + Reported by parfait 1.1 code analyzer: + + Error: Null pointer dereference (CWE 476) + Read from null pointer 'p' + at line 746 of hw/xfree86/common/xf86Option.c in function 'xf86TokenToOptName'. + Function 'xf86TokenToOptinfo' may return constant 'NULL' at line 721, called at line 745. + Null pointer introduced at line 721 in function 'xf86TokenToOptinfo'. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit c1c01e350834a23161b33bd34b2fa9c01d02a65b +Author: Alan Coopersmith +Date: Sun Jan 27 13:10:08 2013 -0800 + + Make xf86ValidateModes actually copy clock range list to screen pointer + + Our in-house parfait 1.1 code analysis tool complained that every exit + path from xf86ValidateModes() in hw/xfree86/common/xf86Mode.c leaks the + storeClockRanges allocation made at line 1501 with XNFalloc. + + Investigating, it seems that this code to copy the clock range list to + the clockRanges list in the screen pointer is just plain insane, and + according to git, has been since we first imported it from XFree86. + + We start at line 1495 by walking the linked list from scrp->clockRanges + until we find the end. But that was just a diversion, since we've found + the end and immediately forgotten it, and thus at 1499 we know that + storeClockRanges is NULL, but that's not a problem since we're going to + immediately overwrite that value as the first thing in the loop. + + So we move on through this loop at 1499, which takes us through the + linked list from the clockRanges variable, and for every entry in + that list allocates a new structure and copies cp to it. If we've + not filled in the screen's clockRanges pointer yet, we set it to + the first storeClockRanges we copied from cp. Otherwise, as best + I can tell, we just drop it into memory and let it leak away, as + parfait warned. + + And then we hit the loop action, which if we haven't hit the end of + the cp list, advances cp to the next item in the list, and then just + for the fun of it, also sets storeClockRanges to the ->next pointer it + has just copied from cp as well, even though it's going to overwrite + it as the very first instruction in the loop body. + + v2: rewritten using nt_list_* macros from Xorg's list.h header + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit 89badba082c81d20fe35cb064c16e131ff288ca3 +Author: Alan Coopersmith +Date: Sun Jan 27 12:08:47 2013 -0800 + + Free keymap on error in Xephyr's hostx_load_keymap + + Found by parfait 1.1 code analyser: + Memory leak of pointer 'keymap' allocated with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width) + at line 861 of hw/kdrive/ephyr/hostx.c in function 'hostx_load_keymap'. + 'keymap' allocated at line 845 with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit 48b94651205b175760904e448f94111d1ab85e13 +Author: Alan Coopersmith +Date: Sun Jan 27 11:20:45 2013 -0800 + + Stop leaking overlayWin in PanoramiXCompositeGetOverlayWindow error paths + + Found by parfait 1.1 code analyzer: + + Error: Memory leak (CWE 401) + Memory leak of pointer 'overlayWin' allocated with malloc(72) + at line 806 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. + pointer allocated at line 794 with malloc(72). + leaks when rc != 0 at line 804. + at line 816 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. + pointer allocated at line 794 with malloc(72). + leaks when pOc == NULL at line 815. + at line 825 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. + pointer allocated at line 794 with malloc(72). + leaks when cs->pOverlayWin == NULL at line 822 + and compCreateOverlayWindow(pScreen) == 0 at line 823. + at line 834 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. + pointer allocated at line 794 with malloc(72). + leaks when rc != 0 at line 832. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit f4a9332ad149ed15353a9c482563bdd042d0b403 +Author: Alan Coopersmith +Date: Sun Jan 27 10:06:42 2013 -0800 + + Handle failure to create counter in init_system_idle_counter + + Check for NULL pointer (which can be returned for multiple reasons) + before trying to dereference it to add privates. To avoid memory leak + in error path, delay malloc of privates until we're ready to add them. + + In case we do return NULL up through SyncInitDeviceIdleTime, handle the + possibility of getting NULL passed back down to SyncRemoveDeviceIdleTime. + + As reported by parfait 1.1: + Error: Null pointer dereference (CWE 476) + Read from null pointer 'idle_time_counter' + at line 2764 of xserver/Xext/sync.c in function 'init_system_idle_counter'. + Function 'SyncCreateSystemCounter' may return constant 'NULL' at line 952, called at line 2756. + Null pointer introduced at line 952 in function 'SyncCreateSystemCounter'. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit 7fe5e6dfa5c1e71d8b7540b28c1d508687a2fbee +Author: Jasper St. Pierre +Date: Wed Jan 23 13:11:55 2013 -0500 + + protocol-versions: Bump minor version of XI + + This was accidentally excluded when we added barriers. + + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 70b127c9f1c53bdb42f078265e67f76b464deae2 +Author: Aaron Plattner +Date: Thu Jan 10 17:01:17 2013 -0800 + + config/udev: fix "removing GPU device" format string mistake + + udev.c: In function 'device_removed': + udev.c:270:9: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char *' [-Wformat] + + Signed-off-by: Aaron Plattner + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 605dfc6804a05ff2bda5692fec26c37344fd95cb +Author: Dave Airlie +Date: Tue Jan 22 07:39:53 2013 +1000 + + xserver: fix build regression since 91ab237358c6e33da854914d3de493a9cbea7637 + + inputstr, double defines TouchListener typedef, maybe some gcc handles it, + but not all. + + fixes tinderbox + + Reported-by: Jon TURNEY + Signed-off-by: Dave Airlie + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 069d8ed3eb659c48dd2b0f8b7b8c11f092fdb362 +Merge: 591c062 d6dcde7 +Author: Keith Packard +Date: Sun Jan 20 15:58:38 2013 -0800 + + Merge remote-tracking branch 'jturney/xserver-next' + +commit 591c06277bb120ab9615633f2d28addbd3a2aa5f +Merge: 6703a7c fa6ab7d +Author: Keith Packard +Date: Sun Jan 20 15:52:26 2013 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit cde7cbe9674e8a771f9a4e646c1772a46a8230fb +Author: Peter Hutterer +Date: Thu Jan 10 13:20:12 2013 +1000 + + os: add support for %f to pnprintf + + This is the lazy man's %f support. Print the decimal part of the number, + then append a decimal point, then print the first two digits of the + fractional part. So %f in sigsafe printing is really %.2f. + + No boundary checks in place here. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 20def57632583aef095ca18792c7fce16d2d9004 +Author: Peter Hutterer +Date: Thu Jan 10 13:24:05 2013 +1000 + + os: silently ignore length modifiers in pnprintf + + Until we have support for them, ignore any length modifiers so we don't need + to update all callers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit f53b2012f39085d866f267dda1442a48ace3c5a5 +Author: Peter Hutterer +Date: Thu Jan 17 16:19:51 2013 +1000 + + test/signal-logging: simplify tests using sprintf + + Ever looked at your own code and thought 'WTF was I thinking?'. yeah, that. + + Instead of passing in the expected string just use sprintf to print the + number for us and compare. In the end we're just trying to emulate printf + behaviour anyway. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit d6dcde7a03bb38c17ffc4ec5f0ca1c161e54569f +Author: Jon TURNEY +Date: Sat Feb 11 12:22:17 2012 +0000 + + hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOW + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 56e94403f8f9182e05428d895a983371c7737d2a +Author: Jon TURNEY +Date: Wed Jan 9 20:15:01 2013 +0000 + + hw/xwin: Use ITaskBarList interface to ensure show-on-taskbar state is updated correctly + + Use ITaskBarList interface to ensure that the taskbar notices if the window has + changed it's style in a way which affects if the taskbar shows it or not. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c94d1cb0a49106f44714f4511720a197cc549164 +Author: Jon TURNEY +Date: Thu Jan 10 14:35:56 2013 +0000 + + hw/xwin: Ensure full styling is applied when the window is mapped + + Move styling update code from WM_WM_HINTS_EVENT to a function UpdateStyle(), + which is also invoked from WM_WM_MAP3, so everything which needs to be done + to style the window happens when it is mapped + + (Otherwise, the appearance of the window is sensitive to the timing of the + notification of the windows appearance hint properties being set relative to + window creation. e.g. see [1]) + + [1] http://sourceware.org/ml/cygwin-xfree/2012-06/msg00004.html + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit ef61f8cacc84080c9156675f9ce26a27e8a90ac1 +Author: Jon TURNEY +Date: Sat Mar 31 18:45:28 2012 +0100 + + hw/xwin: Make sure that WM_WM_HINTS_EVENT does nothing for override-redirect windows + + Future work: It looks like this code could be rationalized quite a lot: It might + make sense to pull the checking for override-redirect up out of UpdateIcon() and + UpdateName() and consolidate WM_WM_MAP2 and WM_WM_MAP3 + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3628559e594fcbdfcc14b1e8fa60aa841f184e19 +Author: Jon TURNEY +Date: Sun Feb 5 11:25:39 2012 +0000 + + hw/xwin: Add a new WM_WM_HINTS_EVENT event to update window style + + Add a new WM_WM_HINTS_EVENT event to update window style if any of the + properties which affect window style change + + Check PropertyNotify events for any of the window properties which we consider + to decide on the window style, and update the window style by sending a + WM_WM_HINTS_EVENT message to the WM. + + This allows the styling of the window to change during it's lifetime. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 066ecbd11d516ea68d7ebc7470232d01c5717546 +Author: Jon TURNEY +Date: Thu Jan 10 14:37:45 2013 +0000 + + hw/xwin: Move reshape code from winUpdateWindowPosition() to the map event handler + + Move reshape code, which was only used when handling a map event, from + winUpdateWindowPosition(), to put it explicitly in the map event handler. + + Remove 'reshape' parameter from winUpdatePosition(). + + (Note that there's no handling of the ShapeNotify event to notice when the + window shape changes, instead we hook the screen SetShape procedure and reshape + the native window then) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 852d1fb042f4160fe023a015f1c9a34126bf911a +Author: Ryan Pavlik +Date: Sat Dec 1 16:58:40 2012 +0000 + + hw/xwin: Add missing include xwin-config.h to winglobals.h + + winglobals.h checks if RELOCATE_PROJECTROOT is defined to see if a declaration + of g_fLogFileChanged is needed, so must include xwin-config.h + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit ab686ce029208abf970a4bcd1435bf8411a44de9 +Author: Ryan Pavlik +Date: Wed Oct 26 17:03:25 2011 -0500 + + include: Add RELOCATE_PROJECTROOT to xwin-config.h header + + RELOCATE_PROJECTROOT is AC_DEFINED in configure.ac, but currently has no effect + as it doesn't appear in any AC_CONFIG_HEADER header. + + When packaged for Windows, we do not have a unix-style filesystem tree, where + file needed by the X server can be found in fixed, absolute paths under the + prefix (PROJECTROOT). + + Instead, the filesystem tree containing files needed by the X server and clients + will be installed with the directory containing the X server executable as the + root directory of that tree. + + (Typically, this will be in the Program Files directory, which does not have a + fixed name, as it can be moved, localized, or added to to indicate x86 or x64 + binaries) + + So, RELOCATE_PROJECTROOT is used to make a native Windows build of the X server + look for various files (fonts, xkb data) in locations relative to the X server + rather than at absolute paths, by translating those paths at run-time. + + Additionally the XKEYSYMDB, XERRORDB, XLOCALEDIR env vars checked by libX11 are + set appropriately for clients started by the X server. + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit fa6ab7d9b2d7fd8184f1e068360607845f5c33ab +Merge: adde4e6 0e1ab43 +Author: Peter Hutterer +Date: Fri Jan 11 14:58:17 2013 +1000 + + Merge branch 'pointer-emulation-fixes-56558-v2' into for-keith + +commit adde4e64480315dc5b47a727ee37d86f5cd8584f +Author: Peter Hutterer +Date: Thu Jan 10 10:33:05 2013 +1000 + + dix: typo fix in comment + + Signed-off-by: Peter Hutterer + +commit 05ed095dd8d6cf939b4ebd9a59d70ce32705df7c +Author: Benjamin Tissoires +Date: Wed Jan 9 19:32:19 2013 +0100 + + dix: fix error logging occuring in signal context of GetTouchEvents + + GetTouchEvents is usually called in a signal context. + Calling ErrorF for the error messages leads to X complaining about log: + + (EE) BUG: triggered 'if (inSignalContext)' + (EE) BUG: log.c:484 in LogVMessageVerb() + (EE) Warning: attempting to log data in a signal unsafe manner while in signal context. + Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or ErrorFSigSafe(). + The offending log format message is: + %s: Attempted to start touch without x/y (driver bug) + + Signed-off-by: Benjamin Tissoires + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit f4a58469a298c226668fd8dce375bf22331c902d +Author: Peter Hutterer +Date: Wed Jan 9 13:58:56 2013 +1000 + + xfree86: don't access the old input handler after freeing it + + Introduced in 323869f3298cbbfe864af9404a8aed1bf7995d79 + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 205cfbd6d9824fb9a67c21b19bc8f1e66c9df4d2 +Author: Dave Airlie +Date: Sat Jan 5 18:35:42 2013 +1000 + + xf86: bump input ABI version to 19 + + The changes to miPointerSetPosition interface from int->double breaks + the SIS driver build, so time to bump this. + + Signed-off-by: Dave Airlie + Signed-off-by: Peter Hutterer + +commit ad3bc571348a7007a2960bf87ae739397c5511ee +Author: Peter Hutterer +Date: Tue Jan 8 11:19:09 2013 +1000 + + xfree86: update the device state for all DGA events (#59100) + + DGA only handles master devices but it does intercept slave device events as + well (since the event handlers are per event type, not per device). + + The DGA code must thus call into UpdateDeviceState to reset the button/key + state on the slave device before it discards the remainder of the event. + + Test case: + - Passive GrabModeSync on VCP + - Press button + - Enable DGA after ButtonPress + - AllowEvents(SyncPointer) + - Release button + + The button release is handled by DGAProcessPointerEvent but the device state + is never updated, so the slave ends up with the button permanently down. + And since the master's button state is the union of the slave states, the + master has the button permanently down. + + X.Org Bug 59100 + + Reported-by: Steven Elliott + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit c5f2818edbec2f87383baa6c6be5c389b73ca6f9 +Author: Peter Hutterer +Date: Tue Jan 8 10:13:53 2013 +1000 + + xfree86: set event->detail for DGA pointer events + + Reported-by: Steven Elliott + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 519d183d78e0b0eaf47a473e94f5d8611baf8463 +Author: Peter Hutterer +Date: Mon Jan 7 10:44:33 2013 +1000 + + Fix two typos "requires an string value" + + Signed-off-by: Peter Hutterer + +commit 4e13dd90144dde47550aceea4db4b4329e531279 +Author: Peter Hutterer +Date: Wed Aug 22 10:34:07 2012 +1000 + + dix: don't filter RawEvents if the grab window is not the root window (#53897) + + If a XI2.1+ client has a grab on a non-root window, it must still receive + raw events on the root window. + + Test case: register for XI_ButtonPress on window and XI_RawMotion on root. + No raw events are received once the press activates an implicit grab on the + window. + + X.Org Bug 53897 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit a2037d7080ae64ea55f7d76971716346aa3ec6d3 +Author: Jon TURNEY +Date: Wed Nov 28 22:25:35 2012 +0000 + + hw/xwin: Fix MinGW build of winSetAppModelID.c + + Add missing #include + + In file included from /jhbuild/checkout/xorg/xserver/hw/xwin/winSetAppUserModelID.c:31:0: + /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:140:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ + /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:141:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ + /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:142:11: error: expected declaration specifiers or ‘...’ before ‘pthread_mutex_t’ + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit f57100bb36eae3b4d75f3c315973405f705b8de6 +Author: Jon TURNEY +Date: Tue Feb 23 13:38:48 2010 +0000 + + hw/xwin: Process one Windows message per wakeup, rather than all of them. + + De-queuing Windows messages and X events happens in the same thread of + execution. Draining the windows message queue can lead to the X event queue + overflowing if lots of those windows messages cause X events (e.g. if a keyboard + macro program has just dumped thousands of keypresses into the Windows message + queue). See the mailing list thread [1] for more details. + + Processing one Windows message per wakeup, rather than all of them gives the X + server a chance to do stuff as well after each message. + + [1] http://cygwin.com/ml/cygwin-xfree/2010-01/msg00056.html + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit e30e1ea98720acc583f34c830a1c1b7e3e88f694 +Author: Jon TURNEY +Date: Mon Dec 17 22:38:25 2012 +0000 + + hw/xwin: Fix some comments in winkeybd.c + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 6f4a48f8a55bc54b6d3e9d80734be05750c024de +Author: Jon TURNEY +Date: Thu Apr 1 15:08:26 2010 +0100 + + hw/xwin: Bring the X screen window to the front on a single left-click on the tray icon + + Bring the X screen window to the front on a single left click on the tray icon, + like the comment says we do + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be +Author: Keith Packard +Date: Tue Jan 8 20:24:32 2013 -0800 + + hw/xfree86: Require only one working CRTC to start the server. + + Instead of requiring every mode set to complete successfully, start up + as long as at least one CRTC is working. This avoids failures when one + or more CRTCs can't start due to mode setting conflicts. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 0e1ab433f4048b3367bb2f01d16cd00502538e4d +Author: Peter Hutterer +Date: Fri Jan 4 12:26:58 2013 +1000 + + dix: remove already-moved hunk + + Should've been removed in bc1f90a615018c05994fae3e678dd2341256cd82a, but got + left here due to a botched rebase. + + Fixes stray button events sent to clients after deactivating an async + pointer grab on a pointer-emulating-touch. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 32a6d8a6b59c42f8d65002d7ca1cafb1957b656f +Author: Peter Hutterer +Date: Thu Dec 20 16:25:43 2012 +1000 + + dix: check for the right device's xi2 mask + + events.c: In function 'DeactivatePointerGrab': + events.c:1524:51: warning: 'dev' may be used uninitialized in this function + [-Wuninitialized + + dev is unset when we get here, the device to check is "mouse". + Introduced in ece8157a59751b3ed492fb2e1eb8d5f20221e195. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit f59499b5d05fde83813709e9848152951592120d +Author: Peter Hutterer +Date: Tue Oct 30 12:44:08 2012 +1000 + + dix: add resource type to touch listeners + + Instead of guessing what resource type the listener is and what property to + retrieve, store the resource type in the listener directly. + + Breaks XIT test cases: + TouchGrabTestMultipleTaps.PassiveGrabPointerEmulationMultipleTouchesFastSuccession + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56557 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Reviewed-by: Chase Douglas + +commit 9ad0fdb135a1c336771aee1f6eab75a6ad874aff +Author: Keith Packard +Date: Tue Nov 27 11:21:17 2012 -0800 + + input: Record grab pointer in TouchListener + + This places a pointer to the grab related to a TouchListener directly + in the TouchListener structure rather than hoping to find the grab + later on using the resource ID. + + Passive grabs have resource ID in the resource DB so they can be + removed when a client exits, and those resource IDs get copied when + activated, but implicit grabs are constructed on-the-fly and have no + resource DB entry. + + Signed-off-by: Keith Packard + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 91ab237358c6e33da854914d3de493a9cbea7637 +Author: Keith Packard +Date: Tue Nov 27 11:21:16 2012 -0800 + + input: Pull TouchListener declaration to top-level + + No reason to have a struct declared inside another struct + + Signed-off-by: Keith Packard + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 3578cc3c2e1b5cb8eb191e2d12ad88e1bc9e6e1e +Author: Andreas Wettstein +Date: Wed Dec 19 18:13:21 2012 +0100 + + xkb: Do not use base group as an array index. + + The base group is not brought into range and, therefore, using it as an array + index crashed the X server. Also, at this place, we should ignore locked + groups, but not latched groups. Therefore, use sum of base and latched groups, + brought into range. + + Reproducible with: + key { + type= "ONE_LEVEL", + symbols[Group1]= [ NoSymbol ], + actions[Group1]= [ LatchGroup(group=-1, clearLocks) ] + }; + + And hitting F7 will exceed the group level and access arbitrary memory. + + Signed-off-by: Andreas Wettstein + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit df746a73410b892a4d41a2934cf9cd2e8ad7ba51 +Author: Carlos Garnacho +Date: Wed Dec 19 18:42:39 2012 +0100 + + render: Unwrap early on the animated cursor BlockHandler + + The loop above the previous call may end up triggering other + handlers attaching to the same function slot, so unwrapping + the handler after that could leave the just attached handler + in a dangling but not unset state. + + This issue was most visible on the XO, where destroying a + window with an animated cursor set and running would trigger + this inconsistent state, never calling the miSpriteBlockHandler + again after the animated cursor is unset. + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 0fbd779a82919d5dbf8776be9b57a76c0eae6b14 +Author: Carlos Garnacho +Date: Wed Dec 19 18:42:38 2012 +0100 + + mi: Ensure pointer emulating touch events update the sprite + + Different miPointerSpriteFuncRec implementations do a varying + business at ultimately calling miPointerUpdateSprite(), this + particularly fails when using the plain mi sprite on touch events, + where the sprite is just moved/updated on cursor changes. + + So, ensure miPointerUpdateSprite() is called generically for + pointer emulating touch events as with regular motion events. + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 8b328d4ee3873bc0a7a34f2cb9d301827244b98c +Author: Aaron Plattner +Date: Fri Dec 21 07:37:33 2012 -0800 + + dix: Make small bitfields that store enums unsigned + + Commit 31bf81772e146af79b0c456aae2159eba8b0280f changed the clientState field + from a signed int to a signed int 2-bit bitfield. The ClientState enum that is + expected to be assigned to this field has four values: ClientStateInitial (0), + ClientStateRunning (1), ClientStateRetained (2), and ClientStateGone (3). + However, because this bitfield is signed, ClientStateRetained becomes -2 when + assigned, and ClientStateGone becomes -1. This causes warnings: + + test.c:54:10: error: case label value exceeds maximum value for type [-Werror] + test.c:55:10: error: case label value exceeds maximum value for type [-Werror] + + The code here is a switch statement: + + 53 switch (client->clientState) { + 54 case ClientStateGone: + 55 case ClientStateRetained: + 56 [...] + 57 break; + 58 + 59 default: + 60 [...] + 61 break; + 62 } + + It also causes bizarre problems like this: + + client->clientState = ClientStateGone; + assert(client->clientState == ClientStateGone); // this assert fails + + Also change the signedness of nearby bitfields to match. + + Signed-off-by: Aaron Plattner + Reviewed-by: Alex Deucher + Reviewed-by: Colin Harrison + Signed-off-by: Keith Packard + +commit 8f4820be7a2e0f6e286ddc85c4b75bccdbe8a730 +Author: Peter Hutterer +Date: Thu Dec 20 12:44:16 2012 +1000 + + test/xi2: fix compiler warning + + protocol-xiwarppointer.c: In function ‘ScreenSetCursorPosition’: + protocol-xiwarppointer.c:71:53: warning: declaration of ‘screen’ shadows a + global declaration [-Wshadow] + + Signed-off-by: Peter Hutterer + +commit bd91b05b631f13afd1f7a9d6cbc4f0c5408b523a +Author: Keith Packard +Date: Wed Dec 19 12:47:35 2012 -0800 + + Update to version 1.13.99.901 (1.14 RC1) + + Signed-off-by: Keith Packard + +commit 2a0b544f5c09f79e4ab04ea8103a5ecf59ee2e7b +Merge: 0eb1559 ba4bb3b +Author: Keith Packard +Date: Wed Dec 19 12:26:00 2012 -0800 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 0eb1559eb29d11e63c2b33e317590a88d86fe313 +Merge: 386e4d7 ea1d76d +Author: Keith Packard +Date: Wed Dec 19 12:21:31 2012 -0800 + + Merge remote-tracking branch 'yselkowitz/master' + + I checked this patch with diff -w to check that it only affected + whitespace. + +commit 386e4d76baaffe226d2d561ff936509454eb0ac2 +Merge: 014a5c8 9ff2e83 +Author: Keith Packard +Date: Wed Dec 19 12:17:59 2012 -0800 + + Merge remote-tracking branch 'alanc/master' + +commit 014a5c8a9d86f2f992183bff9106354fac2c3b0e +Merge: f793b5f 2eefa5d +Author: Keith Packard +Date: Wed Dec 19 12:09:31 2012 -0800 + + Merge remote-tracking branch 'whot/barriers' + + Conflicts: + Xi/xichangehierarchy.c + + Small conflict with the patch from + + Xi: don't use devices after removing them + + Was easily resolved by hand. + + Signed-off-by: Keith Packard + +commit 9ff2e831517875f96477862f979abff394e8d551 +Author: Alan Coopersmith +Date: Tue Dec 18 00:41:08 2012 -0800 + + EnableDisableExtensionError: Use ARRAY_SIZE rather than sentinel + + d785368e0e converted the other miinitext functions to use ARRAY_SIZE, + and removed the sentinel, but missed EnableDisableExtensionError so + passing an invalid extension name could cause the server to walk off + the end off the list looking for a sentinel that wasn't there. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit ba4bb3bc1b87eb57cc34d2ad1f302c9d2a15c847 +Author: Jeremy Huddleston Sequoia +Date: Tue Dec 18 01:29:12 2012 -0800 + + XQuartz: Don't add the 15bit visual any more + + Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts + + Signed-off-by: Jeremy Huddleston Sequoia + +commit c298f9c42ec05486ac88fc91a84739d7c3e3ea9e +Author: Jeremy Huddleston Sequoia +Date: Tue Dec 18 01:28:02 2012 -0800 + + XQuartz: Revert some unfortunate auto-indenting mishaps with our super-nested for-loops + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 07a91fa6c6d535f3f05d4c3bd9c4d2b8c382c475 +Author: Rob Clark +Date: Wed Dec 5 23:21:27 2012 +0000 + + hw/dmx: fix build without GLX + + Fixes this compile break that showed up on arm recently: + + dmxinit.c:746:26: error: 'glxSupported' undeclared (first use in this function) + dmxinit.c:746:26: note: each undeclared identifier is reported only once for each function it appears in + + Signed-off-by: Rob Clark + Reviewed-by: Alex Deucher + +commit 5692a1e8f5befd3698134b1a5516a4dadda00115 +Author: Alan Coopersmith +Date: Thu Dec 6 16:15:50 2012 -0800 + + Support compilers with alternate spellings of typeof + + The AC_C_TYPEOF adds a #undef typeof to its autogenerated config.h.in + template, but b8ab93dfbc7f292 didn't copy that to dix-config.h.in + when HAVE_TYPEOF was, so the macro could claim typeof support but not + make it work, when used with compilers like Solaris Studio 12.1 which + only recognize it as __typeof__. + + Signed-off-by: Alan Coopersmith + Acked-by: Peter Hutterer + +commit f793b5fd3eb16a2ada130367c2ffebeede69a322 +Author: Peter Hutterer +Date: Tue Dec 11 13:36:02 2012 +1000 + + dix: don't copy the wrong event mask when activating a passive grab + + GrabMask is a union of core, XI1 and XI2 masks. If a XI2 grab is activated, + the value is a random pointer value, using it as mask has unpredictable + effects. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + Reviewed-by: Keith Packard + +commit dd3242c87a0a58cba055eb99c0c3fcf03153e4b8 +Author: Peter Hutterer +Date: Fri Dec 14 11:34:15 2012 +1000 + + dix: don't allow overriding a grab with a different type of grab (#58255) + + If a client has a core grab, don't allow re-grabbing with type XI2, etc. + This was the intent of the original commit + xorg-server-1.5.99.1-782-g09f9a86, but ineffective. + + X.Org Bug 58255 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 2eefa5d6e870c57ac6a5930883d8cfe3a3882a43 +Author: Peter Hutterer +Date: Thu Dec 13 14:42:32 2012 +1000 + + Xi: if a MD is removed, send a barrier leave event (if applicable) + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit e2423b627ef7e4d08ea0685af5e771ddd2b511ce +Author: Peter Hutterer +Date: Thu Dec 13 14:04:13 2012 +1000 + + Xi: don't store the window pointer in barriers, store the window ID + + When a client shuts down and resources are being freed, the window may have + been freed already, so accessing it to get the window ID is bad. Plus, we + never care about the window anyway other than for stuffing it into the + event. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit f71c2f895c9e2f9d0d42feaac2a3e1d2deb71f67 +Author: Peter Hutterer +Date: Wed Dec 12 15:41:32 2012 +1000 + + Xi: fix per-device barrier handling + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 58bff17e43a80eb21b3ff6d4bb1596230e61f707 +Author: Peter Hutterer +Date: Thu Dec 13 11:49:54 2012 +1000 + + Xi: don't use devices after removing them + + RemoveDevice() frees the DeviceIntPtr, we shouldn't use the pointer after + that + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 3420a7778c7d5eaa638327f31dd460554c257bb1 +Author: Peter Hutterer +Date: Wed Dec 12 11:02:19 2012 +1000 + + xfree86: print message to the log when zapping the server + + Signed-off-by: Peter Hutterer + Reviewed-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit 6d508b81857edaed03c7ee06410434ea56d9b701 +Merge: d982d87 bb6f351 +Author: Keith Packard +Date: Mon Dec 17 11:45:45 2012 -0800 + + Merge remote-tracking branch 'whot/for-keith' + + I've looked at these patches, but I can't say I've actually + reviewed them... + +commit d982d877436377597b8ed04bca1438d2edaf53ee +Merge: da3eaf6 6b4aa8a +Author: Keith Packard +Date: Mon Dec 17 10:56:12 2012 -0800 + + Merge remote-tracking branch 'airlied/for-keithp' + +commit da3eaf6bdbd7ce3bebf2c490cbe2448b4c402dba +Author: Dave Airlie +Date: Mon Dec 17 15:40:17 2012 +1000 + + glx/dri2: initialise api to avoid indirect rendering failing randomly + + Running glxinfo under indirect rendering would randomly fail against the + intel driver, as it would create a context with no attribs, and then the + api value would be passed to the driver uninitialised. + + Signed-off-by: Dave Airlie + Reviewed-by: Keith Packard + Reviewed-by: Ian Romanick + Signed-off-by: Keith Packard + +commit cc10ac8f0e07854647e1fd7cc70b7e9f8d919fd1 +Author: Peter Hutterer +Date: Mon Dec 10 11:00:46 2012 +1000 + + Xi: fix swapping for barrier events + + Protocol events don't contain pointers, so it's easier to copy everything + over, then swap in-place. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 151d44149a09dd125e25b3d94f22a609f0221548 +Author: Peter Hutterer +Date: Mon Dec 10 10:53:49 2012 +1000 + + Xi: swap sequence number and evtype in barrier events + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit d4065493b211e90b46f9d4178f23f347afd8043f +Author: Peter Hutterer +Date: Mon Dec 10 11:02:32 2012 +1000 + + tests/xi2: at protocol conversion test for barrier events + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 938187f2fec006daf4cc677df26d5b0b6999b54b +Author: Peter Hutterer +Date: Fri Dec 7 15:55:59 2012 +1000 + + Require inputproto 2.2.99.1 + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 78376a9217058aa66e52a0399fc2be469d70ce32 +Author: Peter Hutterer +Date: Fri Dec 7 09:26:13 2012 +1000 + + mi: rename mipointer's internal event list + + Avoid name shadowing warnings, change the event list to a more specific + name. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 88a2cccc37cac4e171f9bfc020017ddfa66ae417 +Author: Peter Hutterer +Date: Fri Dec 7 09:11:13 2012 +1000 + + Xi: if the device is currently grabbed, flag the barrier event + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 353aa515922e1095047161ec47a2722772218f20 +Author: Peter Hutterer +Date: Thu Dec 6 15:09:27 2012 +1000 + + Xi: deliver barrier events as grabbed events where necessary + + If the grab_window is the barrier window and the client owns the grab, + deliver as normal grabbed event (respecting owner_events). Otherwise, + deliver as usual. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 3b161401700a2d916da0f81f99b39e75fdbe78df +Author: Peter Hutterer +Date: Thu Dec 6 14:13:26 2012 +1000 + + dix: ignore barrier events in FixUpEventFromWindow + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit a1eeb6fbecf0bd9665a9158b27c273e83b3ab351 +Author: Peter Hutterer +Date: Thu Dec 6 13:25:29 2012 +1000 + + dix: handle barrier events properly when converting to core/XI 1.x + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 1b83775f6712a7e48c49a3411a87103e8e906e67 +Author: Peter Hutterer +Date: Thu Dec 6 12:39:04 2012 +1000 + + dix: skip delivery if it's not the right pointer barrier client + + Only deliver to the client that created the barrier, not to other clients. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit c50db6faba4ee1c27b735c6e9c98a4276ba3c7ff +Author: Peter Hutterer +Date: Thu Dec 6 12:58:55 2012 +1000 + + Xi: fill in barrier root x/y after clamping to RandR outputs + + x/y for barrier events should contain the actual pointer position. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 21a15f9a04ec0a6c8f654eef943561e98db2475d +Author: Peter Hutterer +Date: Mon Dec 3 10:41:16 2012 +1000 + + Pass the event list through to the pointer barrier code to return it + + Instead of having the pointer barrier code enqueue events separately from + GetPointerEvents, pass the event list through and let it add to it. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 707b4dc61f18960611409ef5ad8947be189f7296 +Author: Jasper St. Pierre +Date: Tue Nov 27 15:31:52 2012 -0500 + + barriers: Support line and ray barriers + + This allows clients to add barriers that extend to the edge of the + screen. Clients are encouraged to use these instead of precise coordinates + in these cases to help prevent pointer leaks. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 0a5a0d7c242add4d79721c1b90073b603a475534 +Author: Jasper St. Pierre +Date: Tue Nov 27 14:29:52 2012 -0500 + + barriers: Replace complex intersection test with simpler math + + Since barriers are axis-aligned, we can do the intersection test with + simple interpolation rather than line-segment intersection. This also + helps us out in the future when we want the barriers to extend to be + rays and lines rather than just segments. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 6401317bdcf58b2717214ac65c8f47b0c384a7db +Author: Jasper St. Pierre +Date: Sun Dec 9 19:45:48 2012 -0500 + + barriers: Send an XI_BarrierLeave event when a barrier is destroyed + + This ensures that we always complete an event sequence. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 207e8dee00dd26ff4363edb72058b48b8a76b824 +Author: Jasper St. Pierre +Date: Sun Dec 9 19:44:13 2012 -0500 + + barriers: Clean up code + + Rename a variable. This is to make the diff in the next commit cleaner. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 7fabecd8e3efe76caeb740d905a02ae4256e3246 +Author: Jasper St. Pierre +Date: Wed Dec 5 19:58:05 2012 -0500 + + barriers: Send a BarrierLeave event when we leave the hitbox + + Additionally, add flags when the pointer is released. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit dac9e13a6c874f3b99ba4cf9085ed0e63beb0871 +Author: Jasper St. Pierre +Date: Mon Nov 26 20:37:56 2012 -0500 + + barriers: Increment event ID on hit box leave + + We eventually want to send a new notify event on hitbox leave, + which signifies the dawn of a new barrier event ID, so it's + convenient if we can put the code here. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Jasper St. Pierre + +commit e3a734d081ebda4460e6c1eb7dcdd0f7c10ba9b4 +Author: Jasper St. Pierre +Date: Sat Nov 24 21:42:56 2012 -0500 + + barriers: Add a couple pixels of elbow room for the hit detection + + Pointers (and the hands that drive them) aren't very precise, and the + slightest amount of nudging to either side might be enough to reset + the event ID, making clients think they have an entirely new hit. Allow + for a slightly bigger "hit box" before these barriers get reset. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Jasper St. Pierre + +commit 3b2fbcfa6c75ab072926ab9659adf785b324ce28 +Author: Jasper St. Pierre +Date: Thu Nov 8 01:17:40 2012 -0500 + + barriers: Add support for edge cases when releasing barriers + + If we release a barrier, we want to ensure that we block all + other barriers afterwards, rather than capping the limit to + the two nearest barriers. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Jasper St. Pierre + +commit a1ee26e624e6a7030ecb37a608190cb8e3d1f65b +Author: Peter Hutterer +Date: Thu Dec 6 12:06:28 2012 +1000 + + barriers: Don't allow releasing the pointer on other client's barriers + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit 2884b249294e3e8fc749bbb81e2a897314fa0818 +Author: Peter Hutterer +Date: Thu Dec 6 11:59:53 2012 +1000 + + barriers: Don't allow destroying other client's barriers + + Signed-off-by: Peter Hutterer + Reviewed-by: Jasper St. Pierre + +commit e130a46ab45839f91b29ee75bf19a597dfe3da28 +Author: Jasper St. Pierre +Date: Thu Nov 1 16:06:40 2012 -0400 + + Add support for XI2.3: Pointer barrier events and releases. + + This adds support for clients that would like to get a notification + every time a barrier is hit, and allows clients to temporarily release + a barrier so that pointers can go through them, without having to + destroy and recreate barriers. + + Based on work by Chris Halse Rogers + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 85a37ddcc2ff49adaec4075532b60e7d015f901c +Author: Jasper St. Pierre +Date: Sun Dec 9 22:48:18 2012 -0500 + + barriers: Reindent the constrainment hook + + This is to make future diffs much cleaner. Best viewed with -w. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 97da74c80e8b8eb03f7c1e34180cf5cd343bd608 +Author: Jasper St. Pierre +Date: Sun Dec 9 22:19:14 2012 -0500 + + barriers: Switch to finding the nearest barrier client + + When we add events, we eventually want to add more state to the + PointerBarrierClient, so return one of these instead of the dummy + public structure that's not very interesting. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 7e16dd3628334a5991b6713d778a46c1ce3b8b78 +Author: Jasper St. Pierre +Date: Sat Nov 24 19:39:47 2012 -0500 + + barriers: Switch to an explicit hook for barrier constrainment + + Rather than riding on the ConstrainCursorHarder hook, which has + several issues, move to an explicit hook, which will help us with + some RANDR interaction issues. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 2868a93945f043e1efd897d56543fe673e341faf +Author: Jasper St. Pierre +Date: Sun Dec 9 18:41:52 2012 -0500 + + barriers: Don't loop over the server to destroy a barrier + + This is completely pointless as far as I can tell. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit 482e0cb35225dc3b0664f9429db19c61b0c98ef6 +Author: Jasper St. Pierre +Date: Thu Nov 1 14:14:13 2012 -0400 + + cursor: Move pointer barrier code over to XI + + In order to send events to specific windows associated with the barrier, + we need to move the code that handles barriers to somewhere where it's + easier to construct and send events. Rather than duplicating XSync with + its XSyncSelectAlarm, re-use the existing XI infrastructure. + + For now, just move a bunch of code over, rename some things, and initialize + the new structures, but still consider it a separate codebase. Pointer barrier + requests are still handled by XFixes, so this is a weird intermediate state. + It's unknown whether we'll add explicit requests to pointer barriers inside + XI. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + +commit bb6f3514ca17d993c1af380e8d4480d61e5bbcae +Merge: f961c3a 08da994 +Author: Peter Hutterer +Date: Wed Dec 12 17:25:28 2012 +1000 + + Merge branch 'stack-smash-on-touchpoint' into for-keith + +commit f961c3a3b9dfbe1201da317c24797ba7f979731e +Merge: 36740d0 39f19b3 +Author: Peter Hutterer +Date: Wed Dec 12 17:25:23 2012 +1000 + + Merge branch 'touch-selection-conflict-fixes' into for-keith + +commit 39f19b3f3b8c9b714e70e339dfb0083ff629ab2a +Author: Peter Hutterer +Date: Tue Nov 20 11:48:31 2012 +1000 + + Xi: fix touch event selction conflicts (#57301) + + There are limits on which client may select for touch events on a given + window, with restrictions being that no two clients can select on the same + device, but narrower selections are allowed, i.e. if one client has + XIAllDevices, a second client may still select for device X. + + The current code had a dependency on which client selected first and which + device, resulting in inconsistencies when selecting for events. Fix that, + responding with the right errors regardless of who selected what first. + + X.Org Bug 57301 + + Signed-off-by: Peter Hutterer + +commit a7c97d737ef0d14ec97869082decd049637cfe7a +Author: Peter Hutterer +Date: Tue Nov 20 11:38:39 2012 +1000 + + dix: split xi2_mask_isset into a per-device function + + For touch selection conflicts, we need to check not only if the mask is set + for the device, but if it is set for only that specific device (regardless + of XIAll*Devices) + + Signed-off-by: Peter Hutterer + +commit 08da994a08bb74afae81176c56fb525d0439274b +Author: Peter Hutterer +Date: Mon Nov 26 12:33:29 2012 +1000 + + dix: add FIXME, TouchRemovePointerGrab does nothing + + Signed-off-by: Peter Hutterer + +commit 00def5144557cfe8bf535f926212a8e084dc7cf6 +Author: Peter Hutterer +Date: Mon Nov 26 14:55:13 2012 +1000 + + Xi: if a TouchEnd appears on a actively grabbing client, always accept + + Once the TouchEnd appears on the device, the touch is done. If the client + still has a pointer grab, accept it to avoid clients with TouchOwnership + selections to wait indefinitely for the actual touch event. + + Signed-off-by: Peter Hutterer + +commit ece8157a59751b3ed492fb2e1eb8d5f20221e195 +Author: Peter Hutterer +Date: Mon Nov 26 15:14:19 2012 +1000 + + dix: when deactivating pointer-only grabs, don't emulate TouchEnd events + + A client with a pointer grab on a touch device must reject the touch when + detactivating the grab while the touch is active. However, such a rejecting + must not trigger a ButtonRelease event to be emulated and sent to the + client. + Set the grabbing listener's state to HAS_END, so we simply skip delivery to + that client. + + Signed-off-by: Peter Hutterer + +commit bc1f90a615018c05994fae3e678dd2341256cd82 +Author: Peter Hutterer +Date: Mon Nov 26 12:23:54 2012 +1000 + + dix: only reject active grabs on ungrab and do it before actually ungrabbing + + An active grab ungrabbing is the same as rejecting the grab, since the + client is no longer interested in those events. So reject any touch grab, + but do so before actually deactivating since we're interested in the + TouchEnd for the current grabbing client. + + A passive grab otoh is _not_ like rejecting a grab, since it deactivates + automatically when the touch ends. + + Signed-off-by: Peter Hutterer + +commit 146f48c2934fc85ec095496da5c8f0102bc7f5b5 +Author: Peter Hutterer +Date: Thu Nov 22 13:49:34 2012 +1000 + + dix: don't call ProcessInputEvents() when accepting/rejecting touches + + TouchListenerAcceptReject may be called during normal event processing, but + ProcessInputEvents is not reentrant and calling it here smashes the event + queue. + + Signed-off-by: Peter Hutterer + +commit ead21f9426122536adfb4787ac181008ae83cd4b +Author: Peter Hutterer +Date: Mon Nov 19 16:16:10 2012 +1000 + + Xi: fix typo "mechansims" → "mechanisms" + + Signed-off-by: Peter Hutterer + +commit 6b4aa8a359822cc70666de3b18744f05dd9b5f45 +Author: Dave Airlie +Date: Wed Dec 12 12:56:46 2012 +1000 + + Revert "xf86: Fix non-PCI configuration-less setups" + + This reverts commit 76d9c62eb2be2010a19bf36285012d086cdd180b. + + This breaks multi-GPU setups here, so lets drop it for now. + + Signed-off-by: Dave Airlie + +commit 785af88ab0120036e0ce3d0139f3c560ff71e10b +Author: Dave Airlie +Date: Wed Sep 26 16:16:40 2012 +1000 + + dri1: fix dri1 startup since 459c6da0f907ba33d733c7e62a116184ba2f14e5 + + This commit regresses dri1 since it moves the drmSetServerInfo from being + called at module load time to extension init time. However DRIScreenInit + relies on this being called before it gets control. + + This patches moves the call into DRIScreenInit and seems to work here. + + Signed-off-by: Dave Airlie + +commit 36740d02b9ca117f1404e077367fbbbe271a17d6 +Author: Daniel Martin +Date: Fri Dec 7 19:38:55 2012 +0100 + + xfixes: Fix minor number in QueryVersion + + Due to a typo the major version number was passed as minor version to + version_compare(). + + Regression-from: ffd4874798ba54f86acac75779a15b4babeaa5f3 + + Signed-off-by: Daniel Martin + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit b34cffd27b9ef46e1dd477219cbb90e36d5609e3 +Author: Peter Hutterer +Date: Mon Dec 3 11:39:08 2012 +1000 + + include: fix comment + + Signed-off-by: Peter Hutterer + +commit ea1d76d1b68c7cbcedcaa1f967c5027e0cc1c7a2 +Author: Yaakov Selkowitz +Date: Mon Nov 5 23:50:58 2012 -0600 + + Fix formatting of address operators + + The formatter confused address operators preceded by casts with + bitwise-and expressions, placing spaces on either side of both. + That syntax isn't used by ordinary address operators, however, + so fix them for consistency. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 5daa442fe15d9a87112a2def673c99a5f2506dcf +Author: Peter Hutterer +Date: Tue Dec 4 15:28:14 2012 +1000 + + xkb: only post a XTest release if the XTest device has the button down + + Signed-off-by: Peter Hutterer + +commit c4fee9d2ecd6fdd4c05b04c9f02b23f10f2938b8 +Author: Peter Hutterer +Date: Tue Dec 4 15:03:37 2012 +1000 + + xkb: always post XTest button up when the physical button released (#28808) + + Regression introduced by commit 2decff6393a44b56d80d53570718f95354fde454 + xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP + + XTest buttons must be released when a physical button is released. This was + fixed in 14327858391ebe929b806efb53ad79e789361883, but + 2decff6393a44b56d80d53570718f95354fde454 changed a condition that this code + didn't get triggered anymore. + + "dev" for pointer events is now always the VCP which doesn't have a xkbi + struct. So move this condition out and always trigger the XTest released for + button events. + + Signed-off-by: Peter Hutterer + Tested-by: Frank Roscher + +commit b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 +Merge: e9ea96d ce6b652 +Author: Keith Packard +Date: Fri Nov 30 09:31:46 2012 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit e9ea96d6a88f197928c82b008953f1810de6f792 +Author: Dave Airlie +Date: Fri Nov 30 20:54:38 2012 +1000 + + randr: call RRProviderInit in the proper place. + + No idea where this got lost across development cycles, but its + definitely missing. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=57448 + + Signed-off-by: Dave Airlie + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit ce6b6529290f7d42717aad3fd8a83aaaaf8962de +Merge: 6e18599 3b9f1c7 +Author: Peter Hutterer +Date: Thu Nov 29 14:49:22 2012 +1000 + + Merge branch 'high-resolution-touch-devices' into for-keith + +commit 6e18599d691036eca6ff082c17727d9ffb926984 +Author: Sybren van Elderen +Date: Tue Nov 27 19:27:10 2012 +0100 + + hw/dmx: add update_desktop_dimensions() call + + The Xdmx server did not update the desktop dimensions when computing screen + origins. + + Signed-off-by: Sybren van Elderen + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 59d70b30e93f8be93db9e873423353f7e4419811 +Author: Peter Hutterer +Date: Fri Nov 23 10:05:02 2012 +1000 + + dix: use pixman for fp1616 conversions + + Signed-off-by: Peter Hutterer + Reviewed-by: Søren Sandmann > + +commit 2c4388a00ec308bc2d48ba751ff510cd5c1b2384 +Author: Peter Hutterer +Date: Tue Jun 26 10:30:35 2012 +1000 + + xkb: fill in keycode and event type for slow keys enablement + + eventType is set for the type that triggered a XkbControlsNotify event. + Technically, SlowKeys is triggered by a timer which doesn't have a matching + core event type. So we used to use 0 here. + + Practically, the timer is triggered by a key press + hold and cancelled when + the key is released before the timeout expires. So we might as well set + KeyPress (keycode) in the ControlsNotify to give clients a chance to differ + between timer-triggered SlowKeys and client-triggered ones. + + This is a chance in behaviour, though I suspect with little impact. + + Signed-off-by: Peter Hutterer + Acked-by: Daniel Stone + +commit 2dc6d9228456cbc274a1fcea478258e5ae4dc629 +Author: Peter Hutterer +Date: Thu Nov 15 14:00:57 2012 +1000 + + When resetting device idle time, reset XIAll(Master)Devices too (#56649) + + When the screen saver is forcibly deactivated, the idle time counter is + reset for all devices but not for the fake XIAllDevices and + XIAllMasterDevices. XScreenSaverQueryInfo uses XIAlldevices to fill the + "idle" field, thus returning the wrong value. + + Regression introduced in + commit 6aef209ebc2e54f5465da505a780f7b4cc273ee0 + Author: Peter Hutterer + Date: Mon Mar 12 13:51:02 2012 +1000 + + Change lastDeviceIdleTime to be per-device + + X.Org Bug 56649 + + Signed-off-by: Peter Hutterer + Tested-by: Giacomo Perale + Reviewed-by: Keith Packard + +commit a51b2c3913fc8556f6bd1c76805d045fc424c4bb +Author: Jasper St. Pierre +Date: Tue Nov 20 14:50:41 2012 -0500 + + cursor: Revise edge cases for the pointer moving towards barriers + + Since barriers block the invisible line between pixels, that means + that we need to explicitly check the boundaries, or else we'll have + a potential off-by-one error. This fixes issues when trying to move + down or right across a barrier and having the pointer visibly bounce. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 1712a45422a63f11b2146541279616fcfda09ec6 +Merge: e54f71a 338bec3 +Author: Keith Packard +Date: Wed Nov 28 07:54:13 2012 -0800 + + Merge remote-tracking branch 'jturney/mingw-patches' + +commit 338bec30054bb5d41cb6fdb5d37439f3c8124cad +Author: Yaakov Selkowitz +Date: Fri Nov 9 12:19:31 2012 -0600 + + hw/xwin: Fix for MinGW-w64 DirectDraw headers + + mingw-w64 headers handle NONAMELESSUNION earlier than mingw.org's, so it must be + defined before including any headers. It also provides a ddraw.h, so use it. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Keith Packard + +commit fb170498abc746a850864b59db2ddcba7ee29215 +Author: Jon TURNEY +Date: Tue Nov 13 13:22:44 2012 +0000 + + dix/dispatch.c, os/utils.c: Disable smart scheduler on WIN32 + + setitimer() and SIGALRM aren't available on WIN32, so smart scheduler + code cannot be built. Provide only stubs for smart scheduler timer + code, and disable smart scheduler by default. + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Tested-by: Yaakov Selkowitz + Reviewed-by: Keith Packard + +commit b20d2998cd9a1320ef0e45ab6b741c7e25f646e0 +Author: Ryan Pavlik +Date: Thu Nov 3 19:25:57 2011 -0500 + + os/osinit.c: no getpgrp() and setpgrp() on WIN32 + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Tested-by: Yaakov Selkowitz + Reviewed-by: Keith Packard + +commit 2c712d094a49de0b96e2e9f5bcc1043b54ad0f61 +Author: Yaakov Selkowitz +Date: Sun Oct 14 23:05:30 2012 -0500 + + hw/xwin: use raise() instead of kill() + + MinGW doesn't have kill(), so use raise() instead + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Keith Packard + +commit 98d5acc1213b2ec71c2a7bd3a3b77a1b5536e963 +Author: Jon TURNEY +Date: Fri Aug 17 13:43:29 2012 +0100 + + os/utils.c: Fix compilation of OsBlockSIGIO when SIGIO isn't defined + + Fix compilation of OsBlockSIGIO with -Werror=return-type when SIGIO isn't + defined. + + /jhbuild/checkout/xorg/xserver/os/utils.c: In function 'OsBlockSIGIO': + /jhbuild/checkout/xorg/xserver/os/utils.c:1248:1: error: control reaches end of non-void function [-Wreturn-type] + + v2: Shuffle around to avoid writing unreachable code + + Signed-off-by: Jon TURNEY + Tested-by: Yaakov Selkowitz + Reviewed-by: Keith Packard + +commit 8e2bac0a69173b51e17a39d70e1d154b47fd0139 +Author: Ryan Pavlik +Date: Fri Apr 20 13:46:21 2012 +0100 + + os/osinit.c, os/utils.c: Exclude sigaction code when building for MinGW + + MinGW doesn't have sigaction, so this patch is needed for building. + + No attempt is made to actually install the fatal error signal handler, as MinGW + will simply terminate the process rather than deliver a fatal signal. + + Also avoid using strsignal + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Tested-by: Yaakov Selkowitz + Reviewed-by: Keith Packard + +commit e54f71a2c7a1677a5c5032d1e7dc099d5204144b +Author: Chris Wilson +Date: Sat Nov 10 10:26:08 2012 +0000 + + xf86: select a fake output for headless servers + + Following commit 37d956e3ac9513b74078882dff489f9b0a7a5a28 + Author: Keith Packard + Date: Mon Sep 10 11:14:20 2012 +1000 + + xf86: fix compat output selection for no output GPUs + + headless servers can no longer startup as we no longer select a compat + output for the fake framebuffer. + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56343 + Signed-off-by: Chris Wilson + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 76d9c62eb2be2010a19bf36285012d086cdd180b +Author: Thierry Reding +Date: Wed Oct 17 12:06:47 2012 +0200 + + xf86: Fix non-PCI configuration-less setups + + For non-PCI video devices, such as those found on many ARM embedded + systems, the X server currently requires the BusID option to specify the + full path to the DRM device's sysfs node in order to properly match it + against the probed platform devices. + + In order to allow X to start up properly if either the BusID option was + omitted or no configuration is present at all, the first video device is + used by default. + + Signed-off-by: Thierry Reding + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit d50a94568e06a06df682a0028579d37a7b209d15 +Merge: 87b60ef cf05db8 +Author: Keith Packard +Date: Tue Nov 27 15:14:26 2012 -0800 + + Merge remote-tracking branch 'daniels/master' + +commit 87b60efb859d86fd9e96306112bc5453a549fa69 +Author: Colin Harrison +Date: Sun Sep 2 22:39:32 2012 +0100 + + hw/xwin: Don't spam MotionNotify events when the mouse hasn't moved + + Don't spam MotionNotify events when the mouse hasn't moved, when polling the + mouse position outside any X window + + (Test with 'xev -root' after mouse polling has started.) + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 886f4c389266bf759414f15a5e25e50b5935dc9d +Author: Jon TURNEY +Date: Mon Jun 25 15:58:21 2012 +0100 + + hw/xwin: Don't log all fbConfigs and GL/WGL extensions + + Don't log all fbConfigs and GL/WGL extensions, unless verbose logging + is requested + Log the number of pixelFormats which gave rise to the fbConfigs + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9b10f20f472e6b0d6114fb61c88906e349e47f2b +Author: Jon TURNEY +Date: Fri Feb 10 13:36:46 2012 +0000 + + hw/xwin: Use pre-computed extent of damage for creating GDI region + + When -clipupdates option is specified, use the pre-computed extent of damage, + rather than computing a GDI region which combines all the individual boxes in + the damage. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3ab95a2a5c848e8ce4c39be243fd5e2ac6bb1c1a +Author: Jon TURNEY +Date: Fri Feb 24 15:32:26 2012 +0000 + + hw/xwin: Ensure we own the clipboard before checking the format of it's contents + + Ensure we own the clipboard before checking the format of it's contents, this + prevents the contents from changing underneath us. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit a4f357c620ae9e2270316197a61fb8e1d5183a51 +Author: Colin Harrison +Date: Mon Apr 9 15:48:08 2012 +0100 + + hw/xwin: Disable minimize button on window with skip-taskbar state + + If a window has had its taskbar button removed, disable its minimize + button to prevent it becoming lost + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit a2983452ee1e2051ab54cded7a3a7735be020db6 +Author: Jon TURNEY +Date: Wed Jul 8 17:48:03 2009 +0100 + + hw/xwin: Process _NET_WM_STATE_SKIP_TASKBAR hint in multiwindow mode. + + Set WS_EX_TOOLWINDOW style to hide window from Alt-Tab switcher + + Use ITaskBarList interface to ensure that the taskbar notices if the window has + changed it's style in a way which affects if the taskbar shows it or not + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit de759cc38ccc8a7811923eb9620f01301aedc10e +Author: Jon TURNEY +Date: Sun Feb 5 17:57:04 2012 +0000 + + hw/xwin: Add a simple interface to the ITaskbarList COM interface + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 19d875187a113ca7772a770767ea2ceb2ade5a43 +Author: Jon TURNEY +Date: Wed Jan 4 17:40:14 2012 +0000 + + hw/xwin: Enable RANDR resize by default + + Also fix erroneous use of '--resize' not '-resize', and document '-noresize' in man page + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 444580673221bf3f89dfa3cbc518b5ed4ecabc23 +Author: Yaakov Selkowitz +Date: Sat Dec 31 22:11:18 2011 -0600 + + hw/xwin: Enable AIGLX by default + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 11bb32e561b3f1c657a99b3902f9beea786babbb +Author: Oliver Schmidt +Date: Sun Jan 8 20:30:02 2012 +0000 + + hw/xwin: Restore non-latching modifier key state when an X window gains focus + + In multiwindow mode, the state of the modifier keys was lost when a window is + created (or raised) and focus moved to that window. + + For example: In window A Ctrl + some key opens a window B, then in window B Ctrl + + some other key triggers the next action. However after the opening of window B + the Ctrl key has to be released and pressed again. If the user keeps the Ctrl + key held down when the window B is opened, the next key press X will be + interpreted as X and not as Ctrl+X. + + Extended the function winRestoreModeKeyStates in winkeybd.c to consider not only + the latching modifier keys but also the modifiers Ctrl, Shift, Alt/AltGr by + using the Windows function GetAsyncKeyState. + + A combined Ctrl+AltGr modifier state cannot be restored correctly, as Windows + always fakes a Ctrl-L when AltGr is pressed. + + Signed-off-by: Oliver Schmidt + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 47291d0b7d7bfee74156f83badae15a0818c68ad +Author: Jon TURNEY +Date: Mon Nov 5 14:54:51 2012 +0000 + + hw/xwin: Give our logical xor operator a more logical name + + Also, rather than a comment about why we need a logical operator, let's have a + comment about what we are doing to the keyboard state... + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 8aa27ae82109e4fab0ff3ed86ad1d152438a2585 +Author: Tobias Häußler +Date: Mon Jul 18 14:48:23 2011 +0100 + + hw/xwin: Add correct taskbar grouping of X windows on Windows 7 + + I created a small patch for XWin that adds correct grouping of taskbar icons + when 'Always combine, hide labels' is set in the taskbar properties. It uses the + new taskbar APIs introduced in Windows 7 to set an application id for each + window. The id is based on the X11 class hints. + + v2: Add file to _SOURCES to fix distcheck + + v3 : Fix compilation with mingw-w64 w32api headers + Include propkey.h, propsys.h rather than defining necessary stuff ourselves + + v4: Fix up names taskbar->propertystore, AppID->AppUserModelID, etc. + Link directly with ole32 for PropVariantClear(), prototyping it if neccessary. + + v5: Put winSetAppUserModelID()-related code in a separate file. + Drop a superfluous assign to hr of ignored HRESULT of SetValue() + + Signed-off-by: Tobias Häußler + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit f3aef7f9561d2723da0d1438a8b276b77a1e672e +Author: Jon TURNEY +Date: Sun Sep 2 16:04:25 2012 +0100 + + hw/xwin: Fix function name in log message + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 127a7068b75258d396776cc101aba0bef10a5cef +Author: Jon TURNEY +Date: Thu Apr 14 23:10:23 2011 +0100 + + hw/xwin: Allow XScreenSaverSuspend() to effect Windows screen saver or monitor power off + + Reset the idle timer in the block handler if screenSaverSuspended is set. + + This isn't quite a complete solution. We should also set the block timeout to + something less than the idle timer timeout to ensure we will reset the idle + timer before it times out if we are blocking. + + The idle timer timeout is presumably the first one to expire of the screen saver + activation or monitor low power or power down timeout, depending on + configuration. + + Unfortunately this is probably not straightforward to do. Whilst + SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT) is portable, apparently + SPI_GETLOWPOWERTIMEOUT and SPI_GETPOWEROFFTIMEOUT are not supported by Windows + versions 6.0 or later, and the interface for discovering equivalent value is + complex. + + This doesn't matter in the case where a media player or similar application is + the one making the XScreenSaverSuspend() requests, as it will be continuously + drawing, causing the X server to become unblocked often. + + In the case where slide show presentation application or similar is the one + making the XScreenSaverSuspend() request, this might be a problem. + + Since "Powerpoint is Evil" [1], I think we'll leave it like this till someone + complains :-) + + [1] http://www.edwardtufte.com/tufte/books_pp + + v2: conditionalize on SCREENSAVER + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 190f165317c4a58adf38e3e32acfe7cf04850e91 +Author: Jon TURNEY +Date: Mon Nov 5 13:02:46 2012 +0000 + + hw/xwin: Avoid logging an extra blank line if BUILDERSTRING is empty + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit ef9dbea24f5ce7e1e400463ab2a333076d98a28e +Author: Jon TURNEY +Date: Wed Aug 31 20:57:05 2011 +0100 + + hw/xwin: Report which drawing engines are being enabled when checking for support + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 5824166256c8e96c91e225f4ccb2b094b8fb045b +Author: Jon TURNEY +Date: Fri Mar 12 14:38:51 2010 +0000 + + hw/xwin: Show any fatal error message + + Report the fatal error message in the dialog we pop up, rather than just + referring the user to the logfile. + + v2: Do this a better way since the "Pass the FatalError message to + OsVendorFatalError" patch has landed, and OsVendorFatalError() now gets passed + the fatal error message + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit cf05db8ddec948d907915e1c9569d743e8771def +Author: Sjoerd Simons +Date: Tue Oct 30 17:02:58 2012 +0100 + + Ephyr: Find the right host screen when embedded + + When Xephyr is embedded into another application (e.g. in xoo), the + input events may come from the parent Window instead of our own. So make + sure we find the host screen in that case as well instead of crashing. + + Signed-off-by: Sjoerd Simons + Reviewed-by: Daniel Stone + +commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29 +Author: Raphael Kubo da Costa +Date: Fri Nov 16 19:51:58 2012 +0200 + + vfb: Initialize the GLX extension again. + + This should fix a regression in the 1.13.0 release: commit + 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 removed a code path used by Xvfb + and made it use the default one when initializing extensions. However, this + meant the GLX extension was not initialized anymore since it is not part of + the `staticExtensions' array. + + Since it is not possible to just add it to that array after commit + aad428b8e21c77397c623b78706eb64b1fea77c9, adopt an approach similar to + xwin's and xquartz's and initialize the extension from vfb's `InitOutput'. + + Signed-off-by: Raphael Kubo da Costa + Reviewed-by: Daniel Stone + +commit 353b14ea77324b3f7b3ea29d6f03618fd9916d5f +Author: Daniel Stone +Date: Mon Nov 19 15:00:22 2012 +1100 + + DMX: Add DMX and GLX extensions + + Unfortunately this also got lost in the extmod fallout, leaving the DMX + server not exposing the DMX or GLX extensions. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + +commit 3556d43010f0a37bf30aa2e0ceee9a8bbcad311d +Author: Daniel Stone +Date: Mon Nov 19 15:29:34 2012 +1100 + + Constify extensions in LoadExtension users + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + +commit db83830eef38a86a471378121213162da180537d +Author: Daniel Stone +Date: Mon Nov 19 15:28:07 2012 +1100 + + Constify argument to LoadExtension + + Since we never modify it. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + +commit 3b9f1c701787965246638c1a6fd99fb2b6078114 +Author: Yuly Novikov +Date: Mon Nov 19 21:04:57 2012 -0500 + + dix: Save touchpoint last coordinates before transform. #49347 + + DDXTouchPointInfoRec.valuators used to store axis values after transform. + This resulted in Coordinate Transformation Matrix + being applied multiple times to the last coordinates, + in the case when only pressure changes in the last touch event. + + Changed DDXTouchPointInfoRec.valuators to store values before transform. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=49347 + + Signed-off-by: Yuly Novikov + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit d0fd592fc7be1706084923f43fa057e50122562c +Author: Thomas Jaeger +Date: Sat Oct 13 23:18:50 2012 -0400 + + Simplify GetTouchEvents + + With only one callee left, we are free to assume that + !(flags & TOUCH_CLIENT_ID) + + Signed-off-by: Thomas Jaeger + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit fe59774c55e5d423633405e0869c22f4ce382548 +Author: Thomas Jaeger +Date: Sat Oct 13 23:08:27 2012 -0400 + + Don't use GetTouchEvents in EmitTouchEnd + + As before GetTouchEvents causes unwanted side effects. Add a new + function GetDixTouchEnd, which generates a touch event from the touch + point. We fill in the event's screen coordinates from the MD's current + sprite position. + + Signed-off-by: Thomas Jaeger + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit cc79107a5b60d2926e16ddbee04149e8d5acc969 +Author: Thomas Jaeger +Date: Sat Oct 13 22:51:24 2012 -0400 + + Don't use GetTouchEvents when replaying events + + GetTouchEvents has plenty of side effects such as moving the pointer or + updating the master device, which we don't want to happen when + replaying. The only reason for calling it was to generate a DCCE event, + but GetTouchEvents doesn't even do that right (we might need a DCCE + event even when replaying a master event, or clients could interpret + valuator data incorrectly). + + This discussion is moot at the moment anyway, since DeliverTouchEvents + doesn't appear to deliver DCCE events. + + Signed-off-by: Thomas Jaeger + Reviewed-by: Peter Hutterer + + [Added call to processInputProc instead of direct call to DeliverTouchEvents] + + Signed-off-by: Peter Hutterer + +commit 90b177e5cbb9047453af426d2abfe9c0514fe866 +Author: Thomas Jaeger +Date: Sat Oct 13 22:43:26 2012 -0400 + + Update the MD's position when a touch event is received + + Signed-off-by: Thomas Jaeger + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 6a6c3afe71ac82a93d9fd0034dd5bbdcf0eae1ea +Merge: 14c9e24 6f14508 +Author: Keith Packard +Date: Sun Nov 18 21:50:20 2012 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit 6f145084d5b9ca4a023dfc538a69bbf30edeac4a +Author: Adam Jackson +Date: Fri Nov 16 13:46:32 2012 -0500 + + linux: Prefer ioctl(KDSKBMUTE, 1) over ioctl(KDSKBMODE, K_OFF) + + K_OFF is a slightly broken interface, since if some other process + (cough, systemd) sets the console state to K_UNICODE then it undoes + K_OFF, and now Alt-F2 will switch terminals instead of summoning the + Gnome "run command" dialog. + + KDSKBMUTE separates the "don't enqueue events" logic from the keymap, so + doesn't have this problem. Try it first, then continue falling back to + older methods. + + Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=859485 + Tested-by: Josh Boyer + Signed-off-by: Adam Jackson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 0ff1c77b17062a3a3ff520709ef719316bc1d8bb +Author: Peter Hutterer +Date: Fri Nov 16 14:21:47 2012 +1000 + + xfixes: let PointerBarrierClient->device_ids point to allocated memory + + "Fixed" up Jasper's original patch [1] to use pointers instead of + zero-length arrays but didn't actually set the pointer to anywhere. + + [1] 9a536820f6174befb22431bab375ef1af0a1ec29 + + Signed-off-by: Peter Hutterer + Reviewed-By: Jasper St. Pierre + +commit aa9a9ad08b8a6e7e95de7c2bf45d93dd50f9ca87 +Author: Daniel Martin +Date: Wed Nov 7 11:31:01 2012 +0100 + + Xi: Fix modifier swapping in XIPassiveGrabDevice + + XIPassiveGrabDevice uses a list of uint32_t as modifier sets. + + The ModifierInfo struct represents the current modifier states and is + therefor used in XIQueryPointer and various events. + + Signed-off-by: Daniel Martin + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit aa9da5eae109154edf740a5c1eee4bf98e8fbd4f +Author: Thomas Jaeger +Date: Sat Oct 13 22:39:27 2012 -0400 + + remove init_event + + The function is identical to init_device_event from inpututils.c with + the first two arguments swapped. + + Signed-off-by: Thomas Jaeger + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 710065da37b68a9ec7a0c9dc995247f39e3d01e9 +Author: Daniel Stone +Date: Mon Nov 5 15:58:25 2012 +1100 + + XKB: Remove component listing support + + No-one uses this - not xkbcomp, not GNOME, not KDE. The preferred way + to deal with component listing (which gives you RMLVO rather than + KcCGST) is to use the XML files on the client side. + + Indeed, a couple of hours after making this commit, it emerged that all + *.dir files built with xkbcomp 1.1.1 (released two years ago) and later + have been catastrophically broken and nearly empty. So I think that's + reasonable proof that no-one uses them. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit fd214aabf77c44ba0ca3fd438f0c3c8eb22c7211 +Author: Peter Hutterer +Date: Tue Nov 6 10:27:25 2012 +1000 + + input: drop FP1616 macro + + The double_to_f1616() functions do the same thing, and they're tested. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 14c9e245bae2447f0e57a3ea4daa8d2085fa8b8f +Author: Jeremy Huddleston Sequoia +Date: Sat Nov 17 11:52:10 2012 -0500 + + XQuartz: Opt-in to NSSupportsAutomaticGraphicsSwitching + + http://xquartz.macosforge.org/trac/ticket/668 + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 011f8458805e443ac9130865d2840a929a00cabf +Merge: 54ba26c b4e44b2 +Author: Keith Packard +Date: Mon Nov 5 17:16:07 2012 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit b4e44b285ed0eee1d06514215a4b01d54f40094b +Author: Carlos Garnacho +Date: Wed Oct 31 19:29:45 2012 +0100 + + Xi: Set modifier mask on touch events + + Button mask should be out-of-band with the emulated + pointer events as touch devices don't truly have + "buttons". Even though, it's handy to have the modifier + mask from the paired keyboard on touch events. + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 863f32c930d71073ee5f78452b78bd459d024867 +Author: Carlos Garnacho +Date: Wed Oct 31 19:32:57 2012 +0100 + + Xi: Update the device after delivering the emulated pointer event(#56558) + + Ensure emulated pointer events contain the state that applies before the + event was processed, so the device state must be updated after delivering + such emulated events. + + Co-authored-by: Peter Hutterer + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 9a536820f6174befb22431bab375ef1af0a1ec29 +Author: Jasper St. Pierre +Date: Sat Nov 3 20:23:46 2012 -0400 + + cursor: Fix up implementation for per-device barriers + + Support multiple mast devices being specified as a parameter to the + barrier. This should implement all parts of the XFixes specification, + minus the existing non-specification detail where specifying no devices + is the same as specifying XIAllDevices. + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 944213bbc7099f1e0238f39973653d459efdc2c9 +Author: Jasper St. Pierre +Date: Sat Nov 3 20:23:45 2012 -0400 + + cursor: Clean up barrier finding code a bit + + The current code manually unrolls the loop, by finding a barrier, + clamping it, and then repeaing the code. Since we want to modify + both passes of the loop to support device-specific barriers, make + it into an actual loop. + + Signed-off-by: Jasper St. Pierre + Signed-off-by: Peter Hutterer + +commit 1536bc2d213713af45541a15b5e49c552d8d0592 +Author: Jasper St. Pierre +Date: Sat Nov 3 20:23:44 2012 -0400 + + cursor: Clean up pointer barrier creation code a tiny bit + + This will make it much simpler when we add more error paths to the code + that constructs pointer barrier clients. + + Signed-off-by: Jasper St. Pierre + Signed-off-by: Peter Hutterer + +commit 04c885de715a7c989e48fc8cf2e61db2b401de2d +Author: Jasper St. Pierre +Date: Sat Nov 3 20:23:43 2012 -0400 + + cursor: CreatePointerBarrier has a variable request length + + Support this, and swap the devices in the SProc as well. Don't + actually do anything with the devices just yet -- specifying any + should still emit a BadImplementation. + + Based on a patch by Peter Hutterer + + Signed-off-by: Jasper St. Pierre + Signed-off-by: Peter Hutterer + +commit d74b63f95fc622afe83c53580f1b55346d55fa7a +Author: Jasper St. Pierre +Date: Sat Nov 3 20:23:42 2012 -0400 + + cursor: Fix a minor unused variable warning + + Signed-off-by: Jasper St. Pierre + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit aad65415bff12c6860c19beac42e4165e598a40f +Author: Peter Hutterer +Date: Thu Oct 11 13:02:27 2012 +1000 + + dix: don't allow disabling XTest devices + + Disabling a XTest device followed by an XTest API call crashes the server. + This could be fixed elsewhere but disabled devices must not send events + anyway. The use-case for disabled XTest devices is somewhat limited, so + simply disallow disabling the devices. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 5b7384a3154a95a805b040e1910e276b52aada96 +Author: Alexey Ten (Lynn) +Date: Tue Oct 23 12:32:31 2012 +0400 + + Apply partial matches for option (#25873) + + Rules which match star (*) and option, like one below, should be applied + + layout[2] option = symbols + * misc:typo = +typo(base) + + This is port of patch from #19563 (https://bugs.freedesktop.org/19563) + because here we have own copy of maprules.c + + X.Org Bug 25873 + + Signed-off-by: Alexey Ten (Lynn) + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 54ba26cb1f9c59559cc3c449abeb31b2ce23bdba +Author: Yaakov Selkowitz +Date: Mon Oct 29 22:37:37 2012 -0500 + + os: Add libnettle as a choice of SHA1 implementation + + libnettle is smaller than libgcrypt, currently being released more + frequently, and has replaced the latter in gnutls-3.x (which is used + by TigerVNC, so they can avoid pulling in two crypto libraries + simultaneously). + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Julien Cristau + +commit 2ff56033de2b493a11d2bdf411b7057b1b3a22d7 +Author: Yaakov Selkowitz +Date: Tue Oct 16 02:11:59 2012 -0500 + + Xi: fix fprint format warning + + exevents.c: In function 'ProcessTouchEvent': + exevents.c:1601:20: warning: too many arguments for format + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit d631dbe9b6a1faa4cd18ab7a4a0276db02b84b77 +Author: Yaakov Selkowitz +Date: Sat Oct 27 21:50:01 2012 -0500 + + Xext: fix shadow warnings + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 20cf7918ed954a932a4cc404b3d0c4ca87a6ae16 +Author: Yaakov Selkowitz +Date: Tue Oct 16 21:08:52 2012 -0500 + + Xext: fix redundant redeclaration warnings + + panoramiX.c:595:13: warning: redundant redeclaration of 'CreateConnectionBlock' + ../include/dix.h:167:23: note: previous declaration of 'CreateConnectionBlock' was here + xres.c:193:13: warning: redundant redeclaration of 'ResExtensionInit' + ../include/extinit.h:109:13: note: previous declaration of 'ResExtensionInit' + xtest.c:60:12: warning: redundant redeclaration of 'DeviceValuator' + ../Xi/exglobals.h:61:12: note: previous declaration of 'DeviceValuator' was here + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 89447e1b50d2fb0e046102664045d1f9d4efc542 +Author: Yaakov Selkowitz +Date: Mon Oct 15 01:33:05 2012 -0500 + + Xext: fix unused variable warnings in xf86bigfont.c + + These were rendered unused by commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 344eea237fc07dedfd733d14f95ed0ad26bb5f81 +Author: Yaakov Selkowitz +Date: Tue Oct 16 02:04:34 2012 -0500 + + xkb: fix shadow warnings + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 7f1d74e8a906210eafc637df81ded62c3adff748 +Author: Yaakov Selkowitz +Date: Tue Oct 16 02:06:54 2012 -0500 + + render: fix shadow warnings + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 8e86123998d26d26f0f60dcbb9836c38e5a4c3a5 +Author: Yaakov Selkowitz +Date: Tue Oct 16 01:19:12 2012 -0500 + + randr: export more provider property symbols + + These were added as part of commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5 + but never declared or exported. Fixes warnings: + + rrproviderproperty.c:255:1: warning: no previous prototype for 'RRPostProviderPendingProperties' + rrproviderproperty.c:327:1: warning: no previous prototype for 'RRConfigureProviderProperty' + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Dave Airlie + Reviewed-by: Peter Hutterer + +commit f02e27e4fcc34413b2051e5a01edc92172fa8612 +Author: Yaakov Selkowitz +Date: Tue Oct 16 02:16:17 2012 -0500 + + mi: fix shadow warnings + + mibitblt.c: In function 'miGetImage': + mibitblt.c:617:20: warning: declaration of 'pt' shadows a previous local + mibitblt.c:609:17: warning: shadowed declaration is here + mispans.c: In function 'miFillUniqueSpanGroup': + mispans.c:456:33: warning: declaration of 'i' shadows a previous local + mispans.c:382:9: warning: shadowed declaration is here + mispans.c:488:17: warning: declaration of 'i' shadows a previous local + mispans.c:382:9: warning: shadowed declaration is here + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 1fe30c00679bd36a6355b48b94b87564d528ff28 +Author: Yaakov Selkowitz +Date: Tue Oct 16 02:21:04 2012 -0500 + + fb: fix shadow warnings + + fbblt.c: In function 'fbBlt': + fbblt.c:76:16: warning: declaration of 'src' shadows a previous local + fbblt.c:52:13: warning: shadowed declaration is here + fbblt.c:77:16: warning: declaration of 'dst' shadows a previous local + fbblt.c:52:19: warning: shadowed declaration is here + fbbltone.c: In function 'fbBltPlane': + fbbltone.c:742:13: warning: declaration of 'w' shadows a previous local + fbbltone.c:725:9: warning: shadowed declaration is here + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit e8d45f301845f70b76407577b92363934ca4f19e +Author: Yaakov Selkowitz +Date: Tue Oct 16 20:54:56 2012 -0500 + + dix: fix shadow warnings + + dispatch.c: In function 'ProcCopyArea': + dispatch.c:1608:5: warning: declaration of 'rc' shadows a previous local + dispatch.c:1604:9: warning: shadowed declaration is here + dispatch.c: In function 'ProcCopyPlane': + dispatch.c:1647:5: warning: declaration of 'rc' shadows a previous local + dispatch.c:1643:9: warning: shadowed declaration is here + events.c: In function 'GetClientsForDelivery': + events.c:2030:68: warning: declaration of 'clients' shadows a global declaration + ../include/dix.h:124:28: warning: shadowed declaration is here + events.c: In function 'DeliverEventToWindowMask': + events.c:2113:19: warning: declaration of 'clients' shadows a global declaration + ../include/dix.h:124:28: warning: shadowed declaration is here + events.c: In function 'EventSuppressForWindow': + events.c:4420:12: warning: declaration of 'free' shadows a global declaration + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 1aa783754e21a263b0973516850656b13fd18f0d +Author: Yaakov Selkowitz +Date: Tue Oct 16 14:06:30 2012 -0500 + + dix: fix redundant redeclaration warnings in dixfont + + These functions are already declared in . + Redeclaring them just for _X_EXPORT causes tons of warnings throughout + xserver, but they need to be declared somewhere to be picked up by + sdksyms.sh. Doing so in a private header limits the warnings to + sdksyms.c; fixing those as well would require changes to fontsproto. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 27c5966de35d4726dd9795b4828d4236851f6a88 +Author: Yaakov Selkowitz +Date: Mon Oct 15 01:25:17 2012 -0500 + + xfree86: os-support: fix old-style function definition warnings + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit 64b961bb21369aaea694d883f361a36bc23b19b9 +Author: Yaakov Selkowitz +Date: Wed Oct 24 23:57:11 2012 -0500 + + macros: clarify documentation + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Peter Hutterer + +commit 04f980ead5e9af066143a921e0a0e98f26f28ee5 +Merge: a194630 a4941ce +Author: Keith Packard +Date: Mon Nov 5 08:45:21 2012 -0800 + + Merge remote-tracking branch 'jturney/mingw-w64-w32api' + +commit a4941ce4961f254ac31e2cef6dd0863866246bab +Author: Jon TURNEY +Date: Tue Aug 21 15:31:16 2012 +0100 + + hw/xwin: Wrap 'Status' when including ddraw.h + + Status is #defined as an alias for a type in xkbsrv.h, which conflicts with it's + use as a parameter name in rpcdce.h + + This fixes compilation with MinGW-w64 w32api headers + + (The MinGW-w64 w32api headers actually provide a ddraw.h, so this fix tries to + do things in a way which will still work if our private copy of ddraw.h is + eventually removed) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 57bbf6e2aead6cce76a9f5d43829b58868a26059 +Author: Jon TURNEY +Date: Mon Oct 29 14:35:45 2012 +0000 + + hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL() + + Remove pointless winFinishCreateWindowsWindowDDNL() and the useless DirectDraw + surface pointers in the window privates + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 5bc4c53d23d02d3d7297a8f00a92b6e4d5e0d6fe +Author: Jon TURNEY +Date: Tue Sep 4 17:28:16 2012 +0100 + + hw/xwin: Link with libdxguid rather than defining the DirectX GUIDs ourselves + + Decruftify by linking with libdxguid rather than defining the DirectX GUIDs + ourselves. This fixes compilation with MinGW-w64 w32api headers, which do not + provide GUID_SECT (which only ever did anything for gcc prior to 2.95, anyhow) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit a194630f7f7b287cb4ea4a459df0745f4c0d4c1a +Merge: 74a3130 d511a30 +Author: Keith Packard +Date: Thu Nov 1 13:38:54 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit d511a3016a79c50cb38e7504d4831a9ae128e422 +Author: Benjamin Tissoires +Date: Fri Oct 26 16:27:34 2012 +0200 + + Add missing labels for multitouch valuators + + ABS_MT_DISTANCE exists since kernel v2.6.38, + ABS_MT_TOOL_X|Y appeared in v3.6. + + Signed-off-by: Benjamin Tissoires + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit ced56f322ead10d1bc93fcd1f8e0ec3ae51292a3 +Author: Carlos Garnacho +Date: Thu Oct 25 15:03:50 2012 +0200 + + Sync TouchListener memory allocation with population in TouchSetupListeners() + + The allocated TouchListener array may fall short by 1 if hitting the worst case + situation where there's an active grab, passive grabs on each window in the + sprite trace and event selection for touch in one of the windows. This may lead + to memory corruptions as the array is overflown. + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 74a3130426d7e1b456e45daa517769cd3e4b58c0 +Merge: 1ca096d f32ad6d +Author: Keith Packard +Date: Mon Oct 29 09:09:16 2012 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 1ca096d5e07221025c4c4110528772b7d94f15ee +Author: Michel Dänzer +Date: Mon Oct 29 12:57:54 2012 +0100 + + EXA: Track source/mask pixmaps more explicitly for Composite fallback regions. + + In particular, make sure pExaScr->src/maskPix are cleared when the + corresponding pictures aren't associated with drawables, i.e. solid or gradient + pictures. Without this, we would in some cases associate the source/mask region + with unrelated pixmaps from previous Composite fallbacks, resulting in random + corruption. + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47266 + + Signed-off-by: Michel Dänzer + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit f32ad6dd314a587c301b7f1a6e4ee74e5d8cc06c +Author: Ryan Pavlik +Date: Fri Oct 21 12:32:49 2011 -0500 + + os/utils.c: Provide only stubs for Lock/UnlockServer on WIN32 + + MinGW and MSVC lack the POSIX functions to compile the lock file code. + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Reviewed-by: Yaakov Selkowitz + +commit 74735c5ebff15db8891808068fe8569d8ccde9e7 +Author: Colin Harrison +Date: Sat Feb 18 20:37:19 2012 +0000 + + hw/xwin: fmemopen is available on cygwin but not MinGW + + This is a follow-up to commit 0659437f5ec0e3f646373394f5f9c5461e2170f3. + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + Reviewed-by: Yaakov Selkowitz + +commit 748be9da20a8bf3dd99701a95eac7ee3895a28de +Author: Jon TURNEY +Date: Tue May 1 20:08:41 2012 +0100 + + doc: Update documentation about Windows platforms support a bit + + Update what c-extensions says about Windows platforms support a bit: + - Document that MinGW Win32 gets let off being POSIX-compilant + - Document the minimum Windows version supported + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 760be785eb49fed4652950fb55dc07b0a41d87de +Author: Peter Hutterer +Date: Wed Oct 24 11:20:54 2012 +1000 + + xfree86: remove unused variable sigstate + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit e7cd5cce740e653000fb1192b600268dcf77dde2 +Author: Peter Hutterer +Date: Thu Oct 18 15:11:31 2012 +1000 + + dix: fix zaphod screen scrossing (#54654) + + POINTER_SCREEN coordinates are screen-relative. For a Zaphod setup, the + coordinates after a screen crossing are already relative to the new screen's + origin. Add that offset to the coordinates before re-setting. + + regression introduced by + commit bafbd99080be49a17be97d2cc758fbe623369945 + Author: Peter Hutterer + Date: Wed Aug 8 11:34:32 2012 +1000 + + dix: work around scaling issues during WarpPointer (#53037) + + X.Org Bug 54654 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 676447190190d8546165e21be242cf16dd69f5ae +Author: Peter Hutterer +Date: Wed Oct 17 14:13:29 2012 +1000 + + Xi: don't deliver TouchEnd to a client waiting for TouchBegin (#55738) + + If a client is still waiting for the TouchBegin, don't deliver a TouchEnd + event. + + X.Org Bug 55738 + + Signed-off-by: Peter Hutterer + Tested-by: Thomas Jaeger + Reviewed-by: Keith Packard + +commit 3018f9c1e5109680dcf69b8f2d7807696a473bde +Author: Peter Hutterer +Date: Fri Oct 12 13:48:27 2012 +1000 + + Xi: set xChangeDeviceControlReply.status to Success by default + + If the status is other than Success, the code will set it to the required + value. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 2decff6393a44b56d80d53570718f95354fde454 +Author: Peter Hutterer +Date: Thu Oct 11 16:03:33 2012 +1000 + + xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP + + For button release events, the current code picks the VCK. Because that has + a XKB struct, it thinks this is a PointerKeys event and proceeds to send the + release event through the XTest pointer. That has no effect in normal + operation as the button is never down and an attempt is silently discarded + (normal event processing continues with the VCP). + + On server shutdown, the XTest device is already removed, leading to a + null-pointer derefernce when the device is checked for whether buttons are + down (XkbFakeDeviceButton → button_is_down(xtest pointer)). + + The current state has only worked by accident, the right approach here is to + handle the VCP's event as such and not switch to the keyboard. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit cc1d8fa8a4ef2e34e9837a44945094fd77e40a0b +Author: Yaakov Selkowitz +Date: Sun Oct 14 23:38:20 2012 -0500 + + Configure fixes for MinGW + + As for Cygwin, define FD_SETSIZE for uses of select() to be correct. + Link with libpthread. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + +commit 53830281b4da096f9c13107d73ec9c76ff1d14cc +Merge: abc2ef5 9cbcb5b +Author: Keith Packard +Date: Fri Oct 26 18:04:34 2012 -0700 + + Merge remote-tracking branch 'sandmann/for-keithp' + +commit abc2ef590c7cb33ebe21726f83b7347406975f95 +Merge: 0e85e5e c5396ec +Author: Keith Packard +Date: Fri Oct 26 17:11:58 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 9cbcb5bd6a5360a128d15b77a02d8d3351f74366 +Author: Søren Sandmann Pedersen +Date: Wed May 30 05:19:08 2012 -0400 + + Use new pixman_glyph_cache_t API that will be in pixman 0.28.0 + + This new API allows glyphs to be cached in a data structure in pixman, + and entire glyph strings to be composited in one go. + + Also bump pixman dependency to 0.27.2. + + Results from the cairo peformance test suite running against Xvfb with + a screen size of 1680x1050@32bpp: + + Speedups + ======== + xlib firefox-talos-gfx 12416.63 -> 3603.93 3.45x speedup + ██▌ + xlib xfce4-terminal-a1 1727.57 -> 1048.85: 1.65x speedup + ▋ + xlib evolution 1370.49 -> 869.34: 1.58x speedup + ▋ + xlib gnome-terminal-vim 1832.83 -> 1251.94: 1.46x speedup + ▌ + xlib poppler 1519.70 -> 1204.05: 1.26x speedup + ▎ + xlib firefox-planet-gnome 6982.55 -> 5598.16: 1.25x speedup + ▎ + xlib ocitysmap 1142.77 -> 1071.53: 1.07x speedup + ▏ + + No slowdowns were reported. + + Results of x11perf -aa10text: + + Before: + + 8000000 reps @ 0.0007 msec (1450000.0/sec) + 8000000 reps @ 0.0007 msec (1460000.0/sec) + 8000000 reps @ 0.0007 msec (1460000.0/sec) + 8000000 reps @ 0.0007 msec (1470000.0/sec) + 8000000 reps @ 0.0007 msec (1480000.0/sec) + 40000000 trep @ 0.0007 msec (1460000.0/sec) + + After: + + 32000000 reps @ 0.0002 msec (4910000.0/sec) + 32000000 reps @ 0.0002 msec (4830000.0/sec) + 32000000 reps @ 0.0002 msec (4890000.0/sec) + 32000000 reps @ 0.0002 msec (4830000.0/sec) + 32000000 reps @ 0.0002 msec (4900000.0/sec) + 160000000 trep @ 0.0002 msec (4870000.0/sec) + + Version 2: Destroy the glyph cache at server regen time + + Acked-by: Aaron Plattner + Reviewed-by: Keith Packard + Signed-off-by: Soren Sandmann + +commit c5396ec05a5c6cab6608ba677f703c5227b1de13 +Author: Thierry Reding +Date: Wed Oct 17 12:11:49 2012 +0200 + + xf86: Fix build against recent Linux kernel + + Recent Linux kernels reworked the linux/input.h header file, which is + now part of the "user-space API". The include guard therefore has an + additional additional _UAPI prefix. + + Instead of adding another case to the #ifdef, drop any include guard + checks and instead always undefine the BUS_* definitions on Linux. + + Signed-off-by: Thierry Reding + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 7d89eb4978a6649be22747c3de2886781e311647 +Author: Colin Walters +Date: Wed Jan 4 17:37:06 2012 -0500 + + autogen.sh: Honor NOCONFIGURE=1 + + (Also while we have the patient open, use exec instead of hanging + around uselessly in waitpid) + + http://people.gnome.org/~walters/docs/build-api.txt + + Reviewed-by: Adam Jackson + Signed-off-by: Colin Walters + Signed-off-by: Peter Hutterer + +commit c0a752d2864872023216005375a6a1973fadeffe +Author: Lionel Elie Mamane +Date: Tue Oct 9 03:17:49 2012 +0200 + + dix: fix Ungrab action #55785 + + UngrabAllDevices(Bool kill_client): + If we are not going to kill the client (kill_clients false), + we need to deactivate grabs of active clients, too. + (If we are going to kill the client, + no need to deactivate the grab, + as this will be done as part of the client kill.) + + Fixes: X.Org Bug 55785 + + Signed-off-by: Lionel Elie Mamane + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 3b67cd26149eb991b5f015061a818af65369e668 +Author: Chase Douglas +Date: Thu Jun 7 14:12:06 2012 -0700 + + End physically active touches when device is disabled + + Otherwise: + + * We can't end the touches while device is disabled + * New touches after enabling the device may erroneously be mapped to old + logical touches + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 0e85e5e62819c9e516d6e19836f9f5d7a5d53e87 +Author: Colin Harrison +Date: Thu Oct 11 18:05:47 2012 +0100 + + hw/xwin: Fix no return value warning in winClipboardProc() + + winclipboardthread.c: In function ‘winClipboardProc’: + winclipboardthread.c:415:9: warning: ‘return’ with no value, in function returning non-void + winclipboardthread.c:424:13: warning: ‘return’ with no value, in function returning non-void + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 51ed6a7d46c6cc19eb9aaf838be41eb57fd8230a +Author: Colin Harrison +Date: Thu Oct 11 17:57:37 2012 +0100 + + hw/xwin: Remove unused variable in winmultiwindowwm.c + + winmultiwindowwm.c: In function ‘UpdateName’: + winmultiwindowwm.c:522:14: warning: unused variable ‘pszName’ [-Wunused-variable] + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 5886b1dc4d2ce12a238a2e3600fdb576abc6e419 +Author: Colin Harrison +Date: Thu Oct 11 17:56:11 2012 +0100 + + hw/xwin: Remove unused variables in winwindow.c + + winwindow.c: In function ‘winCreateWindowNativeGDI’: + winwindow.c:62:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] + winwindow.c: In function ‘winDestroyWindowNativeGDI’: + winwindow.c:85:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] + winwindow.c: In function ‘winPositionWindowNativeGDI’: + winwindow.c:108:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] + winwindow.c: In function ‘winChangeWindowAttributesNativeGDI’: + winwindow.c:213:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] + winwindow.c: In function ‘winUnmapWindowNativeGDI’: + winwindow.c:241:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] + winwindow.c: In function ‘winMapWindowNativeGDI’: + winwindow.c:265:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 08b33882f34fed0c23d54ff7361efc5833868a4b +Author: Colin Harrison +Date: Thu Oct 11 17:52:11 2012 +0100 + + hw/xwin: Remove unused variables in winvalargs.c + + winvalargs.c: In function ‘winValidateArgs’: + winvalargs.c:62:10: warning: unused variable ‘fImplicitScreenFound’ [-Wunused-variable] + winvalargs.c:60:9: warning: unused variable ‘iMaxConsecutiveScreen’ [-Wunused-variable] + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 7e665f1a21468118dababdbf6d8573f1ce1ebd47 +Author: Colin Harrison +Date: Thu Oct 11 17:50:42 2012 +0100 + + hw/xwin: Remove unused variables in winwindowswm.c + + winwindowswm.c: In function ‘ProcWindowsWMQueryVersion’: + winwindowswm.c:85:9: warning: unused variable ‘n’ [-Wunused-variable] + winwindowswm.c: In function ‘SProcWindowsWMQueryVersion’: + winwindowswm.c:565:9: warning: unused variable ‘n’ [-Wunused-variable] + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit e893d570aa3e9ae8df6a30ac4adaf0949a2fc733 +Author: Jon TURNEY +Date: Thu Oct 11 19:36:13 2012 +0100 + + Use X_ATTRIBUTE_PRINTF where suggested for os.h + + InitOutput.c: In function ‘OsVendorInit’: + InitOutput.c:630:29: warning: assignment left-hand side might be a candidate for a format attribute [-Wmissing-format-attribute] + winprocarg.c: In function ‘ddxProcessArgument’: + winprocarg.c:231:29: warning: assignment left-hand side might be a candidate for a format attribute [-Wmissing-format-attribute] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit e59cc83bcdca6b64c1bfb2de395d741757f615f6 +Author: Jon TURNEY +Date: Thu Oct 11 19:35:19 2012 +0100 + + hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winmsg.c + + winmsg.c: In function ‘winVMsg’: + winmsg.c:47:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winmsg.c: In function ‘winDrvMsg’: + winmsg.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winmsg.c: In function ‘winMsg’: + winmsg.c:66:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winmsg.c: In function ‘winDrvMsgVerb’: + winmsg.c:77:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winmsg.c: In function ‘winMsgVerb’: + winmsg.c:87:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winmsg.c: In function ‘winErrorFVerb’: + winmsg.c:97:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winmsg.c: In function ‘winDebug’: + winmsg.c:107:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winmsg.c: In function ‘winTrace’: + winmsg.c:117:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3d6e6a394ea2d5dcb77aa706f751423315d8a7ed +Author: Jon TURNEY +Date: Thu Oct 11 19:32:24 2012 +0100 + + hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winerror.c + + Also, fix the typoed name OsVenderVErrorF (sic), so it actually gets prototyped + and remove redundant declarations of it's prototype. + + winerror.c: In function ‘OsVendorVErrorF’: + winerror.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + winerror.c: In function ‘winMessageBoxF’: + winerror.c:104:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 13fb6b36b8742a79b9768944eee6d1ad66d7e4d9 +Author: Jon TURNEY +Date: Thu Oct 11 16:20:35 2012 +0100 + + hw/xwin: Use char strings in winClipboardUNIXtoDOS for consistency with the rest of the clipboard code + + winclipboardxevents.c: In function ‘winClipboardFlushXEvents’: + winclipboardxevents.c:575:13: warning: passing argument 1 of ‘winClipboardUNIXtoDOS’ from incompatible pointer type + winclipboard.h:102:2: note: expected ‘unsigned char **’ but argument is of type ‘char **’ + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit fa36a7cd488e4f7fb91beed8a87764b8e0c1a72f +Author: Jon TURNEY +Date: Thu Oct 11 15:51:39 2012 +0100 + + hw/xwin: Fix warning about discarding const in initializing winKBLayouts + + winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type + winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type + winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type + [repeated for each layout] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 0ea65df8a5f97a6fe5225226493aa01380080d2f +Author: Jon TURNEY +Date: Thu Sep 27 17:23:43 2012 +0100 + + hw/xwin: Fix some of the warnings in generated gl wrapper code + + Fix some of the warnings in generated gl wrapper code: + - glWinResolveHelper takes a const char * argument + - ensure formal parameter names don't collide with reserved names or shadow + global declarations (e.g. near, far, index (from string.h), remainder (from + math.h), pointer (from Xdefs.h) by postpending a '_'. + + generated_gl_wrappers.c:13:3: warning: passing argument 2 of 'glWinResolveHelper' discards qualifiers from pointer target type + glwrap.c:70:1: note: expected 'char *' but argument is of type 'const char *' + [repeated many times] + generated_gl_wrappers.c: In function 'glVertexAttrib1dARBWrapper': generated_gl_wrappers.c:6884:47: warning: declaration of 'index' shadows a global declaration [-Wshadow] + generated_gl_wrappers.c:6886:3: warning: passing argument 2 of 'glWinResolveHelper' discards qualifiers from pointer target type + [repeated many times] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit f7f0739311927ad177dece7119272481b75b73b4 +Author: Colin Harrison +Date: Tue Oct 19 23:42:53 2010 +0100 + + hw/xwin: Warning fix in ProcWindowsWMFrameSetTitle() + + winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’: + winwindowswm.c:514: error: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness + + If you're going to stick random casts into your code, at least use the goddammed + right ones. :-) + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 97c9ed026a7f7efe5fca02c188bcbdbcd7c594e9 +Author: Jon TURNEY +Date: Wed Jan 25 19:01:55 2012 +0000 + + hw/xwin: Fix shadowed local variable i in HandleCustomWM_COMMAND() + + Fix shadowed local variable i in HandleCustomWM_COMMAND() + + Also, fds are meant to be representable as an int + + winprefs.c: In function ‘HandleCustomWM_COMMAND’: + winprefs.c:346:23: error: declaration of ‘i’ shadows a previous local + winprefs.c:322:7: error: shadowed declaration is here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit b55d0b92fc536793a877f6073754801a7c3c2dd5 +Author: Jon TURNEY +Date: Wed Jan 25 18:56:22 2012 +0000 + + hw/xwin: Fix shadowed local variables in winLoadCursor() + + Move shadowed local variables x and y to the places they are used + + wincursor.c: In function ‘winLoadCursor’: + wincursor.c:212:11: error: declaration of ‘x’ shadows a previous local + wincursor.c:166:7: error: shadowed declaration is here + wincursor.c:212:14: error: declaration of ‘y’ shadows a previous local + wincursor.c:166:10: error: shadowed declaration is here + wincursor.c:228:11: error: declaration of ‘x’ shadows a previous local + wincursor.c:166:7: error: shadowed declaration is here + wincursor.c:228:14: error: declaration of ‘y’ shadows a previous local + wincursor.c:166:10: error: shadowed declaration is here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit a8c9c3699e6dfde29eeec058d903740a499dcf3b +Author: Jon TURNEY +Date: Thu Oct 11 19:11:36 2012 +0100 + + hw/xwin/glx: Fix using Mask as a formal parameter shadows a global typedef of the same name + + Fix using Mask as a formal parameter shadows the typedef of the same name from X.h + + indirect.c: In function 'GetShift': + indirect.c:1629:14: warning: declaration of 'Mask' shadows a global declaration [-Wshadow] + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 47df98c7851fd9e97a54f0b4950340506d4a9244 +Author: Jon TURNEY +Date: Wed Jan 25 19:17:16 2012 +0000 + + hw/xwin: Fix using screenInfo as a formal parameter to InitOutput() shadows a global declaration + + Using screenInfo as a formal parameter to InitOutput() shadows a global declaration of screenInfo. + Change the formal parameter name from screenInfo to pScreenInfo, as everywhere else uses. + + InitOutput.c: In function ‘InitOutput’: + InitOutput.c:891:25: error: declaration of ‘screenInfo’ shadows a global declaration + ../../include/scrnintstr.h:570:19: error: shadowed declaration is here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 97e9c34687f7dc05ee0bdef097a19e7623fb59a3 +Author: Jon TURNEY +Date: Wed Jan 25 19:07:49 2012 +0000 + + hw/xwin: Fix using menu as a formal parameter shadows a global variable of the same name + + Using menu as a formal parameter shadows a global variable of the same name + + winprefsyacc.y: In function ‘SetRootMenu’: + winprefsyacc.y:286:20: error: declaration of ‘menu’ shadows a global declaration + winprefsyacc.y:55:19: error: shadowed declaration is here + winprefsyacc.y: In function ‘SetDefaultSysMenu’: + winprefsyacc.y:293:26: error: declaration of ‘menu’ shadows a global declaration + winprefsyacc.y:55:19: error: shadowed declaration is here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit efe96a17bd741f222ccb226d306b5c1dc1f25ade +Author: Jon TURNEY +Date: Wed Jan 25 18:54:57 2012 +0000 + + hw/xwin: Fix using index as a formal parameter shadows index() + + Using index as a formal parameter shadows index() from strings.h + + winallpriv.c: In function ‘winInitCmapPrivates’: + winallpriv.c:119:45: error: declaration of ‘index’ shadows a global declaration + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 451c5d9175cdeb36fd614502ff0317f968490dfc +Author: Jon TURNEY +Date: Wed Jan 25 19:09:12 2012 +0000 + + hw/xwin: Fix using index as a formal parameter in winscrinit.c shadows index() + + Using index as a local variable shadows index() from strings.h + + winscrinit.c: In function ‘winFinishScreenInitFB’: + winscrinit.c:274:28: error: declaration of ‘index’ shadows a global declaration + winscrinit.c: In function ‘winFinishScreenInitNativeGDI’: + winscrinit.c:623:35: error: declaration of ‘index’ shadows a global declaration + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 21faee4b383a12bef58f300b4ad1a3bd34d6de2d +Author: Jon TURNEY +Date: Wed Jan 25 19:05:42 2012 +0000 + + hw/xwin: Fix using index as a local variable shadows index() + + Using index as a local variable shadows index() from strings.h + + winprefs.c: In function ‘LoadImageComma’: + winprefs.c:574:7: error: declaration of ‘index’ shadows a global declaration + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 2d9123fd0c89c1a72e7281e56985196bc53507bf +Author: Jon TURNEY +Date: Wed Jan 25 18:59:21 2012 +0000 + + hw/xwin: Fix using index as a formal parameter in winmonitors.c shadows index() + + Fix using index as a local variable shadows global declaration of index() from strings.h + + winmonitors.c: In function ‘QueryMonitor’: + winmonitors.c:59:23: error: declaration of ‘index’ shadows a global declaration + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 5b0435dbdaa47404629800e4e9c5a6952a7bb260 +Author: Jon TURNEY +Date: Wed Jan 25 18:53:02 2012 +0000 + + hw/xwin: Fix using system as a local variable in winCheckMount() shadows system() + + Using system as local variable in winCheckMount() shadows the global declaration of system() from stdlib.h + + InitOutput.c: In function ‘winCheckMount’: + InitOutput.c:296:10: error: declaration of ‘system’ shadows a global declaration + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 17d84c743d6b52f32c4ca0341aebaff972522945 +Author: Jon TURNEY +Date: Wed Jan 25 17:18:12 2012 +0000 + + hw/xwin: Remove obsolete redundant declarations of winPushPixels() + + winPushPixels() and winpushpxl.c was removed in it's entirety in commit + f31bd087e8a7f65cd588bd1d022bb18e72b2a60c "Death to mfb" + + wingc.c:37:1: error: redundant redeclaration of ‘winPushPixels’ + win.h:1104:1: note: previous declaration of ‘winPushPixels’ was here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit f06b468d96afd323e28645dde44170ab367da4f1 +Author: Jon TURNEY +Date: Wed Jan 25 17:09:18 2012 +0000 + + hw/xwin: Fix redundant declarations in winmultiwindowwm.c + + winmultiwindowwm.c:139:14: error: redundant redeclaration of ‘display’ + ../../include/opaque.h:52:14: note: previous declaration of ‘display’ was here + winmultiwindowwm.c:140:13: error: redundant redeclaration of ‘ErrorF’ + ../../include/os.h:558:13: note: previous declaration of ‘ErrorF’ was here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3e8269177ee01fe107830032b60a8d311d4b4b0e +Author: Jon TURNEY +Date: Wed Jan 25 17:08:17 2012 +0000 + + hw/xwin: Fix redundant declarations in winclipboardwrappers.c + + Fix redundant declarations in winclipboardwrappers.c. + Also remove obsolete winProcQueryTree() prototype. + + winclipboardwrappers.c:64:12: error: redundant redeclaration of ‘g_iNumScreens’ + winglobals.h:33:12: note: previous declaration of ‘g_iNumScreens’ was here + winclipboardwrappers.c:67:13: error: redundant redeclaration of ‘g_fXdmcpEnabled’ + winglobals.h:45:13: note: previous declaration of ‘g_fXdmcpEnabled’ was here + winclipboardwrappers.c:75:27: error: redundant redeclaration of ‘winProcEstablishConnectionOrig’ + winglobals.h:66:27: note: previous declaration of ‘winProcEstablishConnectionOrig’ was here + winclipboardwrappers.c:76:27: error: redundant redeclaration of ‘winProcQueryTreeOrig’ + winglobals.h:67:27: note: previous declaration of ‘winProcQueryTreeOrig’ was here + winclipboardwrappers.c:77:27: error: redundant redeclaration of ‘winProcSetSelectionOwnerOrig’ + winglobals.h:68:27: note: previous declaration of ‘winProcSetSelectionOwnerOrig’ was here + + winclipboardwrappers.c:56:5: warning: redundant redeclaration of ‘winProcEstablishConnection’ [-Wredundant-decls] + winclipboardwrappers.c:52:5: note: previous declaration of ‘winProcEstablishConnection’ was here + winclipboardwrappers.c:57:5: warning: redundant redeclaration of ‘winProcSetSelectionOwner’ [-Wredundant-decls] + winclipboardwrappers.c:54:5: note: previous declaration of ‘winProcSetSelectionOwner’ was here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 0975fa0b391d7b8d7e8a127ebf7a863e53fcab7d +Author: Jon TURNEY +Date: Wed Jan 25 17:06:27 2012 +0000 + + hw/xwin: Fix redundant declaration in winclipboardthread.c + + winclipboardthread.c:51:22: error: redundant redeclaration of ‘serverGeneration’ + ../../include/misc.h:362:22: note: previous declaration of ‘serverGeneration’ was here + winclipboardthread.c: In function ‘winClipboardProc’: + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 4a1da00c495706e0fbcec2b30aef3ad7acf5b703 +Author: Jon TURNEY +Date: Wed Jan 25 17:05:25 2012 +0000 + + hw/xwin: Fix redundant declaration in winclipboardinit.c + + In file included from winclipboardinit.c:35:0: + winclipboard.h:81:13: error: redundant redeclaration of ‘ErrorF’ + ../../include/os.h:558:13: note: previous declaration of ‘ErrorF’ was here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 30f31b80f0105676359105c895bc195b9f3e704c +Author: Jon TURNEY +Date: Wed Jan 25 16:48:45 2012 +0000 + + hw/xwin: Fix various warnings in code generated by lex/yacc + + Remove various redundant declarations. + + Instruct lex not to generate code which isn't going to be used, thus avoiding + some unused function warnings. + + Note that bison <2.5 expects stdlib.h to define _STDLIB_H if it's been included, + and avoids prototyping free/malloc in that case. Some stdlib.h (e.g. newlib) may + not match precisely (e.g. defining _STDLIB_H_), so we define it after including + stdlib.h to be sure, and avoid a redudant declaration warning for those symbols. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 4231b9541c6fd26f43b605ecc9dd76622dd786f7 +Author: Jon TURNEY +Date: Wed Jan 25 16:38:49 2012 +0000 + + hw/xwin: Fix redundant declaration in winprefs.c + + winprefs.c:63:14: error: redundant redeclaration of ‘display’ + ../../include/opaque.h:52:14: note: previous declaration of ‘display’ was here + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 70087c55fffc3cbc52f550418e6b1230bbb1b3b3 +Author: Jon TURNEY +Date: Wed Jan 25 16:36:40 2012 +0000 + + hw/xwin: Fix redundant declaration warnings in winmonitors.c + + Include xwin-config.h so HAVE_STRLCPY and HAVE_STRNDUP are defined, so + duplicate declarations of strlcpy(), strlcat() and strndup() aren't made + by os.h + + In file included from ../../include/misc.h:111:0, + from ../../include/screenint.h:51, + from ../../include/scrnintstr.h:51, + from win.h:157, + from winmonitors.c:31: + ../../include/os.h:491:15: error: redundant redeclaration of ‘strlcpy’ + /usr/include/string.h:86:35: note: previous declaration of ‘strlcpy’ was here + ../../include/os.h:492:15: error: redundant redeclaration of ‘strlcat’ + /usr/include/string.h:85:35: note: previous declaration of ‘strlcat’ was here + ../../include/os.h:496:15: error: redundant redeclaration of ‘strndup’ + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9904c8fe75c96cf84d8885aa95f2743c1b25ea37 +Author: Jon TURNEY +Date: Wed Jan 25 16:09:59 2012 +0000 + + hw/xwin: Remove completely unused winregistry.c + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit a69429a17bf4630f6e26f61630a1c2b287202627 +Author: Jon TURNEY +Date: Fri Sep 7 14:58:06 2012 +0100 + + Fix 'make distcheck' for hw/xwin + + Add some missing header files to _SOURCES so they get distributed properly + + Signed-off-by: Jon TURNEY + Reviewed-by: Yaakov Selkowitz + +commit 1d9fd7ffb03ff6e44f3a8736a94e4558203ce607 +Author: Jon TURNEY +Date: Thu Sep 6 13:51:38 2012 +0100 + + Fix compilation of Xorg DDX without XF86VIDMODE + + Fix compilation of Xorg DDX without XF86VIDMODE since 6e74fdda, by putting + xf86vmode.c back under the XF86VIDMODE automake conditional it was accidentally + taken out of. + + Signed-off-by: Jon TURNEY + Tested-by: Yaakov Selkowitz + Reviewed-by: Daniel Stone + +commit 25741b1aa3a0fb39cb842a43ab52935673cfdefa +Author: Jon TURNEY +Date: Sun Sep 2 15:17:05 2012 +0100 + + hw/xwin: Only add GLX extension once. + + Using of LoadExtension() to add GLX onto to the end of the list of extensions on + every server regeneration leads to hilarious consequences (i.e. crashing) after + the first regeneration :-) + + Possibly xf86ExtensionInit() and QuartzExtensionInit() need a similar fix. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + Tested-by: Colin Harrison + +commit 7ceb85481280fecbf033f147f0f7834cad3890c6 +Author: Jon TURNEY +Date: Sun Sep 2 14:55:25 2012 +0100 + + Correct description of -displayfd option in man page. + + A display number, not a port number, is written to the specified fd. + + Signed-off-by: Jon TURNEY + Reviewed-by: Alan Coopersmith + +commit 4b7f00346daed20c96f3e8ea13ae411858a5424b +Author: Peter Hutterer +Date: Wed Oct 10 13:33:48 2012 +1000 + + dix: fix crash on shutdown if a disabled device is still grabbed (XI1 grab) + + A disabled device doesn't have a sprite (less so a sprite->win) and triggers + a NULL-pointer dereference on shutdown when all active grabs are released as + part of the cleanup. + + Fix this by checking for sprite being non-null and setting the focus window + to the NullWindow if it is. The rest of the patch just attempts to make + things more readable. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 0c7109f3215378bb3ed6c00c71129a63ffb4e787 +Author: Denys Vlasenko +Date: Mon Oct 8 14:18:02 2012 +1000 + + os: fix typo in OsSigHandler() error message + + Recieved → Received + + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 0a75bd640b3dc26b89d9e342999a7f4b7e98edbf +Author: Peter Hutterer +Date: Wed Oct 3 13:12:27 2012 +1000 + + xfree86: add xf86UpdateDesktopDimensions() + + This call is required for external drivers (specifically NVIDIA) that do + not share the xfree86 infrastructure to update the desktop dimensions. + Without it, the driver would update the ScreenRecs but not update the total + dimensions the input code relies on for transformation. + + This call is a thin wrapper around the already-existing internal call and + should be backported to all stable series servers, with the minor ABI bump. + + Signed-off-by: Peter Hutterer + CC: Andy Ritger + Reviewed-by: Aaron Plattner + +commit 09f1e5b15b769e1122f0a8d7cae0820038992312 +Author: Julien Cristau +Date: Sun Oct 7 18:40:35 2012 +0200 + + Revert "kinput: allocate enough space for null character." + + This reverts commit 531785dd746d64ef7f473a83ca73bb20e74b6fca. + + The above commit breaks Xephyr option parsing. Andrzej writes: + + Xephyr -retro -keybd evdev,,device=/dev/input/event2,xkbrules=evdev,xkbmodel=evdev,xkblayout=pl -mouse evdev,,device=/dev/input/event1 :3 + + results in: + + + Pointer option key (device=) of value (/dev/input/event1) not assigned! + Kbd option key (device=) of value (/dev/input/event2) not assigned! + Kbd option key (xkbrules=) of value (evdev) not assigned! + Kbd option key (xkbmodel=) of value (evdev) not assigned! + Kbd option key (xkblayout=) of value (pl) not assigned! + + + The effect of the patch is that the "key=value" pairs are parsed in such + a way that the key is added an "equals" sign to it and we end up with + keys like "device=" instead of "device". This in turn has effect on + KdParsePointerOptions and KdParseKbdOptions: the key does not match + any choice presented in the "switch" statement, and so "Pointer/Kbd + option key (...) of value (...) not assigned!" happens, making all + "key=value" options inaccessible to the user. Reverting the patch makes + them available again. + + Reference: http://bugs.debian.org/689246 + Reported-by: Andrzej Pietrasiewicz + Signed-off-by: Julien Cristau + Cc: Dave Airlie + Reviewed-by: Søren Sandmann + Signed-off-by: Keith Packard + +commit 7f9d78d8ffb1a312f9b3d69c05323f601571e162 +Author: Keith Packard +Date: Thu Oct 4 22:51:06 2012 -0700 + + os: Don't re-declare ConnectionInputPtr and ConnectionOutputPtr + + They're declared in osdep.h, so don't redeclare them in io.c as + well. Keeps the compiler happier. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit d5bf6f95f31037bd49b11348b500c3c13b7e0c99 +Author: Keith Packard +Date: Thu Oct 4 14:42:37 2012 -0700 + + Fix FlushClient to write extraBuf when provided (regression fix) + + In commit: + + commit 092c57ab173c8b71056f6feb3b9d04d063a46579 + Author: Adam Jackson + Date: Fri Jun 17 14:03:01 2011 -0400 + + os: Hide the Connection{In,Out}put implementation details + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + + the check for an empty output buffer was moved from one calling + location into the FlushClient implementation itself. However, this + neglected the possibility that additional data, in the form of + 'extraBuf' would be passed to FlushClient from other code paths. If the + output buffer happened to be empty at that time, the extra data would + never be written to the client. + + This is fixed by checking the total data to be written, which includes + both pending and extra data, instead of just the pending data. + + Signed-off-by: Keith Packard + Reviewed-by: Julien Cristau + +commit 8367dd9736d74eca971da345c2bf559ce5bbf649 +Merge: 36c18bb 7998e26 +Author: Keith Packard +Date: Thu Oct 4 13:08:35 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 36c18bb81be619df712778bcb99dd6f1fa38701a +Author: Stephan Schreiber +Date: Wed Aug 29 20:03:58 2012 +0200 + + int10: fix pci_device_read_rom usage + + I noticed that the build-in int10 driver always reports + "Unable to retrieve all of segment 0x0C0000." + even though the entire BIOS data is retrieved with success. + + The associated code is in hw/xfree86/int10/generic.c, in the function + xf86ExtendedInitInt10(): + + if (pci_device_read_rom(pInt->dev, vbiosMem) < V_BIOS_SIZE) { + xf86DrvMsg(screen, X_WARNING, + "Unable to retrieve all of segment 0x0C0000.\n"); + } + + The function pci_device_read_rom() is from libpciaccess; its return + value is not a size but an error status code: 0 means success. + If pci_device_read_rom() returns 0 for success, the warning is generated. + + The proposed patch corrects the evaluation of the return value of + pci_device_read_rom() and of the supplied BIOS size. + + Debian bug#686153 + + Signed-off-by: Julien Cristau + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 4bf3eac5fe20fb203b917a486f69514c55be595a +Author: Adam Jackson +Date: Thu Sep 27 17:12:19 2012 -0400 + + configure: Stop using AM_MAINTAINER_MODE + + All this does is make it so editing configure.ac or Makefile.am doesn't + rebuild the makefiles. Which is just stupid. + + v2: Remove --enable-maintainer-mode from autogen.sh + + Signed-off-by: Adam Jackson + Reviewed-by: Eric Anholt + Reviewed-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit 262679d436941580485a10e30938974958f7d588 +Author: Keith Packard +Date: Thu Oct 4 11:42:22 2012 -0700 + + Set version to 1.14 development branch (1.13.99.0) + + Signed-off-by: Keith Packard + +commit f179b13b91c8891254d31345ee04e773839e6b87 +Merge: 4dd5989 3d2b768 +Author: Keith Packard +Date: Thu Oct 4 11:39:46 2012 -0700 + + Merge remote-tracking branch 'daniels/master' + +commit 7998e26159893674be69183a73a89a53f5608d58 +Author: Jason Gerecke +Date: Fri Sep 28 15:03:42 2012 -0700 + + Fix additional gcc -Wwrite-strings warning in xf86 ddx + + Commit 09e4b78f missed a case. + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit f64254d85e731d0b4369d871a9a735b03f283ba6 +Author: Peter Hutterer +Date: Thu Aug 23 15:00:24 2012 +1000 + + mi: drop two useless conditions in miPointerSetPosition + + pDev cannot be NULL here since fill_pointer_events is the only caller. + And if the screen is NULL, then the device tries to send events before it is + fully initialised. That certainly shouldn't happen and would be a bug + elsewhere. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 314776eb369ca2e438907795ae030dd743c281fc +Author: Daniel Stone +Date: Fri Sep 7 18:30:23 2012 +0100 + + Touch: Fix duplicate TouchBegin selection with virtual devices + + Given the following scenario: + 1) client A selects for TouchBegin on window W for device D + 2) client B selects for TouchBegin on window W for XIAllDevices + 3) client C selects for TouchBegin on window W with device E + + Step 3 will fail with BadImplementation, because attempting to look up + XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work. + This should succeed (or, if it was selecting for device D, fail with + BadAccess as it would be a duplicate selection). + + Fix this by performing the appropriate lookup for virtual devices. + + Signed-off-by: Daniel Stone + Cc: Peter Hutterer + Cc: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 3e6358ee6c33979329b78fe2097a1fdf76fb69cd +Author: Daniel Drake +Date: Fri Sep 7 21:48:35 2012 -0400 + + Xi: Don't check for TOUCH_END, it's never set + + This flag is never set, so checking for it here means that we'll + never release the simulated mouse button press after the user touches + (and releases) the touchscreen for the first time. + + Fixes a problem where the XO laptop touchpad became totally + unusable after touching the screen for the first time (since X then + behaved as if the mouse button was held down all the time). + + Signed-off-by: Daniel Drake + Reviewed-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 9d6b8365702e4648e793fea21ad22f7174558680 +Author: Peter Hutterer +Date: Fri Sep 28 11:49:29 2012 +1000 + + dix: fix crash on XI 1.x grabs on disabled devices. (#54934) + + If the device is disabled, the sprite window is NULL and dereferencing + crashes the server. + + This is only triggered for XI 1.x grabs (ProcXGrabDevice) as XI2 grabs would + trigger another code path, creating a sprite for the disabled device as if + detaching it (which is wrong and fixed with this patch too). + + Grabbing a disabled device doesn't make sense as it won't send events + anyway. However, the protocol specs do not prohibit it, so we need to keep + it working. + Luckily, oldWin is only used for focus out events, which aren't necessary + given that the device is disabled. + + X.Org Bug 54934 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 3d2b768efae9936c6929c2bc13c7a1acc074ecd3 +Author: Daniel Stone +Date: Fri Sep 7 18:17:46 2012 +0100 + + Touch: Fix duplicate TouchBegin selection with virtual devices + + Given the following scenario: + 1) client A selects for TouchBegin on window W for device D + 2) client B selects for TouchBegin on window W for XIAllDevices + 3) client C selects for TouchBegin on window W with device E + + Step 3 will fail with BadImplementation, because attempting to look up + XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work. + This should succeed (or, if it was selecting for device D, fail with + BadAccess as it would be a duplicate selection). + + Fix this by performing the appropriate lookup for virtual devices. + + Signed-off-by: Daniel Stone + Reviewed-by: Chase Douglas + +commit e3903a9383351b061b1a99dfc653ca50de764ec4 +Author: Frederic Plourde +Date: Wed Sep 12 10:48:32 2012 -0400 + + Add glXCreateNewContext support in Xephyr #54798 + + Similar to how we intercept and pass through CreateContext, also pass + through newer CreateNewContext requests. + + Fixes Clutter → Xephyr → VirtualBox. + + Signed-off-by: Frederic Plourde + Reviewed-by: Daniel Stone + +commit 11afebc92ce1a7462ff2886286504425b1c8f0ba +Author: Daniel Stone +Date: Fri Sep 7 18:10:35 2012 +0100 + + Xephyr: GLX: Support MakeContextCurrent and MakeCurrentReadSGI + + We need to pass these requests through to the host server in the same + way we do glXMakeCurrent. Generalise the existing MakeCurrent + submission into once that will send MakeCurrent, MakeContextCurrent or + MakeCurrentReadSGI, depending on the request and the host server's + capabilities, and add decoding/hijack support for incoming + MakeContextCurrent and MakeCurrentReadSGI requests. + + Fixes Clutter → Xephyr → VirtualBox. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Reviewed-by: Ian Romanick + +commit 4dd5989d15465f3f3480b521d4e36673972fa24a +Merge: 0b02150 506e343 +Author: Keith Packard +Date: Mon Sep 24 11:43:01 2012 -0700 + + Merge remote-tracking branch 'ajax/server-1.14-abi-churn' + +commit 0b02150c27e98f996e10d7489f9f67a30e4e3497 +Author: Yufeng Shen +Date: Mon Sep 24 14:03:31 2012 -0400 + + dix: fix scale_to_desktop for edge ABS events + + Scale_to_desktop() converts ABS events from device coordinates + to screen coordinates: + [dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max] + [dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max] + + An edge ABS event with X = dev_X_max (e.g., generated from the + edge of a touchscreen) will be converted to have screen X value + = screen_X_max, which, however, will be filterd out when xserver + tries to find proper Window to receive the event, because the + range check for a Window to receive events is + window_X_min <= event_screen_X < window_X_max + Events with event_screen_X = screen_X_max will fail the test get + and rejected by the Window. + + To fix this, we change the device to screen coordinates mapping to + [dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max-1] + [dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max-1] + + Reviewed-by: Chase Douglas + Reviewed-by: Jeremy Huddleston Sequoia + Signed-off-by: Yufeng Shen + Signed-off-by: Keith Packard + +commit 7722bcbab2507d263c7685b15cccbfdd52fc3a24 +Merge: 4dc2a76 f54987d +Author: Keith Packard +Date: Sun Sep 23 16:04:13 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 4dc2a76740d921c824a4d8193f39dd373475f02a +Author: Adam Jackson +Date: Thu Sep 20 17:57:00 2012 -0400 + + miext/damage: Only wrap into the GC ops chain if there's a listener (v3) + + before after Operation + -------- ----------------- ----------------- + 1148346.9 1191807.5 ( 1.04) PutImage 10x10 square + 2091666.1 2180983.0 ( 1.04) ShmPutImage 10x10 square + + v3: In miDamage{R,Unr}egister, bump the serial number of the affected + drawable (and all children if it's a window) so subsequent drawing + against the damage will trigger another ValidateGC pass and we wrap + in/out correctly. Spotted by Aaron Plattner. + + Signed-off-by: Adam Jackson + Reviewed-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit ad0156c369a40762df6b70780358ce14e5f2c9b1 +Author: Adam Jackson +Date: Thu Sep 20 11:16:26 2012 -0400 + + dix: Remove MapUnmapEventsEnabled and friends + + This hack was added to suppress events generated by Composite's internal + unmap/map cycle on redirection state change. Since that cycle was + removed in 193ecc8b4, these can go. + + Signed-off-by: Adam Jackson + Reviewed-by: Ville Syrjälä + Signed-off-by: Keith Packard + +commit 387b1ac33ca63d27e42d4f61cf248bafb7c43c17 +Author: Adam Jackson +Date: Thu Sep 20 11:16:25 2012 -0400 + + dix: Factor out DeliverUnmapNotify + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit d20cc0fca4e36ad9bdbda8950c4466b1976e70a1 +Author: Adam Jackson +Date: Thu Sep 20 11:16:24 2012 -0400 + + dix: Factor out DeliverMapNotify + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 63843cb70030812bb3a311b2e8dfb0d1b0a75176 +Author: Adam Jackson +Date: Thu Sep 20 11:16:23 2012 -0400 + + dix: Factor out MaybeDeliverMapRequest + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit dab7a1ec7fd97e07405e0b01dc1f1ec6e5fc2e7c +Author: Adam Jackson +Date: Thu Sep 20 11:16:22 2012 -0400 + + dix: Fix some indentation + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 3d1051aecbb1955084804133cacd12c7f696833a +Author: Peter Hutterer +Date: Thu Sep 20 05:56:39 2012 +1000 + + dix: set the device transformation matrix + + The property handler is registered after setting the property, so + dev->transform remains as all-zeros. That causes pixman_f_transform_invert() + to fail (in transformAbsolute()) and invert remains as garbage. This + may then cause a cursor jump to 0,0. + + Since the axes are not yet initialized here and we need to allow for drivers + changing the matrix, we cannot use the property handler for matrix + initialization, essentially duplicating the code. + + Triggered by the fix to (#49347) in 749a593e49adccdf1225be28a521412ec85333f4 + + https://bugzilla.redhat.com/show_bug.cgi?id=852841 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Signed-off-by: Keith Packard + +commit 1cb0261ef54b7dd6a7ef84e1c3959e424706228b +Author: Daniel Martin +Date: Thu Sep 6 00:38:26 2012 +0200 + + dix: Delete mibstore.h + + Since Nov 2010 (commit c4c4676) the only purpose of mibstore.h was to + define an empty function (miInitializeBackingStore()) for backward + compatibility. Time to say goodbye. + + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 08a9ed2524679ed939fa0ad466ee3faf905b8ac4 +Author: Daniel Martin +Date: Thu Sep 6 00:38:25 2012 +0200 + + dix: Remove refs to mi backing store from docs + + Remove any reference to mibstore.h and miInitializeBackingStore() from + the documentation. + + Reviewed-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 76d8739b1f4ed07b874ae56a492d1e0aa0fd9b04 +Author: Daniel Martin +Date: Thu Sep 6 00:38:24 2012 +0200 + + dix: Remove #includes of mibstore.h + + Remove more backing store leftovers. + + Reviewed-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 056fd15deaa85d3ed936df9a3b2e0cdcfa599da8 +Author: Daniel Martin +Date: Thu Sep 6 00:38:23 2012 +0200 + + dix: Delete mibstore.c + + The only reference to mibstore.c was removed with commit c4c4676. Remove the + file itself too. + + Reviewed-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit f54987de97720200ee94eba1c7a737d4ad8c55c8 +Author: Jeremy Huddleston Sequoia +Date: Thu Sep 20 21:11:21 2012 -0700 + + XQuartz: Add some verbose logging to debug xp_lock_window being unbalanced + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 25d26875bc9bd6fd23ae1b5280f015abf1b033b7 +Author: Jeremy Huddleston Sequoia +Date: Thu Sep 20 21:49:40 2012 -0700 + + XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS X 10.8.2 + + + http://bugs.winehq.org/show_bug.cgi?id=31751 + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 506e3437c73e5ae935ff7c056d7808fbb0c7e614 +Author: Adam Jackson +Date: Thu Sep 20 14:22:48 2012 -0400 + + dix: Fix types in WindowOptRec + + No reason for these to be 64 bits on LP64. + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit 092c57ab173c8b71056f6feb3b9d04d063a46579 +Author: Adam Jackson +Date: Fri Jun 17 14:03:01 2011 -0400 + + os: Hide the Connection{In,Out}put implementation details + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit e2c7d70e5ddb8b17676a13ceebfbb87d14d63243 +Author: Adam Jackson +Date: Fri Jun 17 13:43:38 2011 -0400 + + dix: Extend initial connection handshake for forwarding proxies + + Forwarding proxies like sshd will appear to be local, even though they + aren't really. This leads to weird behaviour for extensions that truly + require running under the same OS services as the client, like MIT-SHM + and DRI2. + + Add two new legal values for the initial connection's byteOrder field, + 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side + effect of forcing the client to be treated as non-local. Forwarding + proxies should attempt to munge the first packet of the connection + accordingly; older servers will reject connections thusly munged, so the + proxy should fall back to passthrough if the munged connection attempt + fails. + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit 31bf81772e146af79b0c456aae2159eba8b0280f +Author: Adam Jackson +Date: Thu Sep 20 14:00:09 2012 -0400 + + dix: Repack ClientRec + + Pick smaller types where possible, including bitfielding some Bools and + small enums, then shuffle the result to be hole-free. 192 -> 128 bytes + on LP64, 144 -> 96 bytes on ILP32. + + Signed-off-by: Adam Jackson + +commit ff8e3ad8074cd2c8bed49b39c40c2b4892118270 +Author: Adam Jackson +Date: Thu Sep 20 13:16:59 2012 -0400 + + dix: Pull client-is-local flag up to the ClientRec + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit 3f7bc222638d5d38324ecbc8c2c4e39af17d110e +Author: Adam Jackson +Date: Thu Jun 16 17:40:24 2011 -0400 + + os: Repack ConnectionOutput for LP64 + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit d01921ec18c21f21d377b60626cc2d3418b84a7c +Merge: 70e5766 245e7e0 +Author: Keith Packard +Date: Thu Sep 20 17:26:48 2012 +0200 + + Merge remote-tracking branch 'ajax/ioperm' + +commit 5109c7f6581b3e4e23700bfd03b4daf0ba97630e +Author: Adam Jackson +Date: Thu Sep 20 11:19:39 2012 -0400 + + xfree86: Bump video ABI to 14 + + Signed-off-by: Adam Jackson + +commit 245e7e0361b18766583ae391a2ac1231bb1a1f84 +Author: Adam Jackson +Date: Tue Jun 26 14:32:31 2012 -0400 + + xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES) + + This is a really awkward interface, since we're calling it well before + the driver knows what device it's going to drive. Drivers with both KMS + and UMS support therefore don't know whether to say they need I/O port + access or not, and have to assume they do. + + With this change we now call it only to query whether port access might + be needed; we don't use that to determine whether to call a driver's + probe function or not, instead we call them unconditionally. If the + driver doesn't check whether port access was enabled, they might crash + ungracefully. To accomodate this, we move xorgHWAccess to be explicitly + intentionally exported (sigh xf86Priv.h) so that drivers can check that + before they attempt port access. + + v2: Move initial xf86EnableIO() nearer the logic that determines whether + to call it, suggested by Simon Farnsworth. + + Reviewed-by: Alex Deucher + Reviewed-by: Simon Farnsworth + Signed-off-by: Adam Jackson + +commit d88fb00d791c2b19cf9dd244276838aba3a6b442 +Author: Adam Jackson +Date: Tue Jun 26 13:15:45 2012 -0400 + + linux: Make failure to iopl non-fatal + + We load the driver list, then enable I/O, then call driver probe based + on whether I/O enable succeeded. That's bad, because the loaded + security policy might forbid port access. We happen to treat that as + fatal for some reason, which means even drivers that don't need I/O + access (like kms and fbdev) don't get the chance to run. Facepalm. + + How about we just make that non-fatal instead, that sounds like a much + better plan. + + Reviewed-by: Alex Deucher + Reviewed-by: Simon Farnsworth + Signed-off-by: Adam Jackson + +commit 048674a6aeb61149a1b5f6b0bc3762ddf57f38ee +Author: Adam Jackson +Date: Tue Jun 26 13:12:45 2012 -0400 + + linux: Refactor xf86{En,Dis}ableIO + + Pull platform methods into their own sections for legibility, and + rewrite the ifdefs to be more concise. + + Reviewed-by: Alex Deucher + Reviewed-by: Simon Farnsworth + Signed-off-by: Adam Jackson + +commit 70e5766874a919039678bb2ed75f2ccea0cb4345 +Author: Dave Airlie +Date: Mon Aug 27 15:22:44 2012 +1000 + + xf86: fix multi-seat video device support. (v2) + + If we are not seat 0 the following apply: + + don't probe any bus other than platform + don't probe any drivers other than platform + assume the first platform device we match on the bus is the primary GPU. + + This just adds checks in the correct places to ensure this, and + with this X can now start on a secondary seat for an output device. + + v2: fix Seat0 macros + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 37d956e3ac9513b74078882dff489f9b0a7a5a28 +Author: Keith Packard +Date: Mon Sep 10 11:14:20 2012 +1000 + + xf86: fix compat output selection for no output GPUs + + This should work properly with dynamic outputs. + + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit e0b92f5f86f8ce71ab4c80e9902e51e2525f9705 +Author: Dave Airlie +Date: Thu Sep 13 18:44:06 2012 +1000 + + config/udev: ignore change on drm devices + + for input devices we handle change like remove/add, but for + drm devices we get change events when we hotplug outputs, + so lets just ignore change at this level, and let the drivers + handle it. We may in the future want to route driver udev + from here instead. + + Reported-by: Timo Aaltonen + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 10672a5abe7d4e924844d7e41c86c24d6367a52b +Author: Dave Airlie +Date: Mon Sep 10 14:48:37 2012 +1000 + + xf86/platform: scan pci after probing devices + + This solves a race if we are trying to dynamically power off + secondary GPUs. Its not the greatest fix ever but it probably + as good as we can do for now. + + The GPU probing causes the devices to be powered up, then when + we scan the PCI bus we get the correct information from the kernel, + rather than a bunch of 0xff due to the device being powered off. + + drop gratuitous '&'. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 22746df15b5f75dc85f5cf5b73932eb8a44cb89b +Author: Dave Airlie +Date: Thu Sep 6 16:33:54 2012 +1000 + + dri2: invalidate drawable after sharing pixmap + + After we share the pixmap, the backing storage may have changed, + and we need to invalidate and buffers pointing at it. + + This fixes GL compositors and prime windows lacking contents initially. + + Reviewed-by: Chris Wilson + Signed-off-by: Dave Airlie + +commit f0bad69edd57facd6cffde8cb0863d1a735e2492 +Author: Keith Packard +Date: Wed Sep 5 14:45:08 2012 -0700 + + Version bumped to 1.13 + + Signed-off-by: Keith Packard + +commit 856f80c8d7f22b979c72d9c70b70187df6004a03 +Merge: 0db936a b8ab93d +Author: Keith Packard +Date: Wed Sep 5 11:02:58 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 0db936a5b7125d9b73633733cb34e5e4b72f01e8 +Author: Dave Airlie +Date: Mon Sep 3 15:09:36 2012 +1000 + + xf86: call enter/leave VT for gpu screens as well + + Otherwise we can't do fast user switch properly for multiple GPUs. + + Reviewed-by: Alex Deucher + Signed-off-by: Dave Airlie + +commit 18deac48db0d2387242461025904eb28a0f71fac +Author: Dave Airlie +Date: Mon Aug 27 15:17:21 2012 +1000 + + config/udev: respect seat for hotplugged video devices. + + This respects the seat tag for hotplugged video devices at X start. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit ec740cffeba59216f4293fba829097654cde3b11 +Author: Dave Airlie +Date: Mon Aug 27 15:15:19 2012 +1000 + + config/udev: add wrapper around check if server is not seat 0 + + this is a simple clean-up that is useful to stop further propogation + of this construct. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 49ec57d5094be0dd2b67435ac7bb04ead780f36d +Author: Dave Airlie +Date: Fri Aug 24 13:23:01 2012 +1000 + + dix: free default colormap before screen deletion + + If we don't free this here, it gets freed later in the resource + cleanups, however it then looks up up pmap->pScreen, which we + freed already in this function. So free the default colormap + when we should. + + This fixes a bug after a couple of hotplug cycles when you try + to exit the X server and it crashes. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 20f601a0fbc01a4f8ab85e54ee45f78f7817cdb5 +Author: Dave Airlie +Date: Fri Aug 24 12:56:18 2012 +1000 + + xf86/crtc: don't free config->name + + This is set by pre_init not screen init, so if we free it here + and then recycle the server, we lose all the providers. + + I think we need to wrap FreeScreen here to do this properly, + will investigate for 1.14 most likely, safer to just leak this + on server exit for now. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit b8ab93dfbc7f292b5bfe7e9113e1af824ccbd1a8 +Author: Jeremy Huddleston Sequoia +Date: Tue Aug 28 10:06:51 2012 -0700 + + list: Use offsetof() and typeof() to determine member offsets within a structure + + Some compilers have difficulty with the previous implementation which + relies on undefined behavior according to the C standard. Using + offsetof() from (which most likely just uses + __builtin_offsetof on modern compilers) allows us to accomplish this + without ambiguity. + + This fix also requires support for typeof(). If your compiler does not + support typeof(), then the old implementation will be used. If you see + failures in test/list, please try a more modern compiler. + + v2: Added fallback if typeof() is not present. + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Peter Hutterer + +commit 148583d62b84832369e9df39b3e527b99ca96761 +Author: Peter Hutterer +Date: Wed Aug 29 09:11:35 2012 +1000 + + tests: move GCC diagnostics pragma outside of function + + This is a a gcc 4.6+ feature. + + signal-logging.c:210: error: #pragma GCC diagnostic not allowed inside + functions + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit c75c947b6e9bc725821b28835f3667c4aabef9ee +Author: Jeremy Huddleston Sequoia +Date: Tue Aug 28 12:43:55 2012 -0700 + + test/list: Fix test_xorg_list_del test + + We never use child[2], so it's state is undefined. + + This issue seems to have existed since the test was first + written: 92788e677be79bd04e5ef140f4ced50ad8b1bf8e + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Peter Hutterer + +commit 486038fe16957b39d39842365c5409c494c9a8df +Author: Jeremy Huddleston Sequoia +Date: Mon Aug 27 22:35:51 2012 -0700 + + XQuartz: Bump Info.plist version to 2.7.4 + + Signed-off-by: Jeremy Huddleston Sequoia + +commit b90b3f6eac34616c46ab693fafbf6b73a04f407b +Author: Jeremy Huddleston Sequoia +Date: Mon Aug 27 17:15:19 2012 -0700 + + test: Make os test more compliant + + sighandler_t is not UNIX. + + Regression from: 7f09126e068015db54c56bb982b8f91065375700 + + Signed-off-by: Jeremy Huddleston Sequoia + Reviewed-by: Peter Hutterer + +commit a557edca6152ad09c685a00e01534c35a1f00f2e +Merge: 6619f5c 24ffcfc +Author: Keith Packard +Date: Mon Aug 27 08:06:09 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 24ffcfcded6b4b024958801e8a6cecad36d9a3e3 +Author: Peter Hutterer +Date: Mon Aug 20 10:28:26 2012 +1000 + + os: fix typo, fsync when WIN32 is _not_ defined + + Introduced in 164b38c72fe9c69d13ea4f9c46d4ccc46566d826 + + Reported-by: Jon TURNEY + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit d53e6e02a2595ced1882f5fcd34d08ea039b3b85 +Author: Peter Hutterer +Date: Thu Aug 16 13:54:42 2012 +1000 + + mi: don't check for core events in miPointerSetPosition (#53568) + + As of 81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d, miPointerSetPosition now + returns the screen pointer of the device. This broke floating slave devices, + as soon as a motion event was submitted, miPointerSetPosition returned NULL, + crashing the server. + + dev->coreEvents is only false if the device is a floating slave, in which + case it has a sprite. + + X.Org Bug 53568 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 6619f5c0e1086b57888ff7146e8ed5897b50d440 +Author: Keith Packard +Date: Tue Aug 21 13:46:34 2012 -0700 + + Relase 1.12.99.905 + + RC with updated ABI version numbers. + + Signed-off-by: Keith Packard + +commit bafbd99080be49a17be97d2cc758fbe623369945 +Author: Peter Hutterer +Date: Wed Aug 8 11:34:32 2012 +1000 + + dix: work around scaling issues during WarpPointer (#53037) + + In WarpPointer calls, we get input in screen coordinates. They must be + scaled to device coordinates, and then back to screen coordinates for screen + crossing and root coordinates in events. + + The rounding errors introduced (and clipping in core/XI 1.x events) can lead + to the actual position being different to the requested input coordinates. + e.g. 200 scales to 199.9999, truncated to 199 in the event. + + Avoid this by simply overwriting the scaled screen coordinates with the + input coordinates for the POINTER_SCREEN case. + + X.Org Bug 53037 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 1ebba43052d68d874148e63c9ae38489ddfc5ec1 +Author: Peter Hutterer +Date: Wed Aug 15 14:49:04 2012 +1000 + + os: don't block signal-unsafe logging, merely warn about it. + + Throw an error into the log file, but continue anyway. And after three + warnings, stop complaining. Not all input drivers will be fixed in time (or + ever) and our printf implementation is vastly inferior, so there is still a + use-case for non-sigsafe logging. + + This also adds more linebreaks to the message. + + CC: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4912b4adb666dad96b832ab2d7caaae49808723e +Author: Peter Hutterer +Date: Mon Aug 13 14:44:44 2012 +1000 + + os: add support for %d and %i to pnprintf + + The mouse driver uses %i in some debug messages + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 7f8c39c8b5ef89153ecd84d16331e96d8feb18ef +Author: Peter Hutterer +Date: Mon Aug 13 14:24:36 2012 +1000 + + Add FormatInt64 to convert signed integers in signal-safe manner + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 36c1d92ec0ef0f3927034a12d4cb79dcc22bd185 +Author: Peter Hutterer +Date: Mon Aug 13 12:24:39 2012 +1000 + + test: add a few tests for signal-safe logging + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit b69536b475118a8787c1726355b504207bf83f8f +Author: Peter Hutterer +Date: Mon Aug 13 11:15:54 2012 +1000 + + test: assert from signal-safe number conversion + + Throw an assert when the conversion fails instead of just returning. Asserts + are more informative. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 3e091e1075dc29120e54ab2ef110b04ce7383ffd +Author: Aaron Plattner +Date: Fri Aug 17 11:26:05 2012 -0700 + + xfree86: Bump extension ABI to 7.0 + + Commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 added an array of + DevPrivateSetRec structures in the middle of the ScreenRec, which throws off + extension modules trying to call things like pScreen->DestroyPixmap. + + Signed-off-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit ac616d8ed5a634c6b32775eb7b071a13c575fd97 +Author: Jeremy Huddleston Sequoia +Date: Thu Aug 16 19:09:42 2012 -0700 + + XQuartz: Use asl_log_descriptor for children as well + + This change is #if'd out due to a bug in asl_log_descriptor, but + it is left here as reference to be enabled in the future. + + Signed-off-by: Jeremy Huddleston Sequoia + +commit ad123071e54d890d36d1373f59b8a6eb4937e936 +Author: Jeremy Huddleston Sequoia +Date: Thu Aug 16 13:02:28 2012 -0700 + + XQuartz: Use asl_log_descriptor on Mountain Lion + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 7c3d2e4828deb4e8ec38e8ef88d6f92b2d931033 +Author: Jeremy Huddleston Sequoia +Date: Thu Aug 16 19:42:54 2012 -0700 + + XQuartz: console_redirect: Properly zero-out the tail of the array on realloc() + + We forgot to multiply by sizeof(), so it wasn't fully zeroed out. + + Signed-off-by: Jeremy Huddleston Sequoia + +commit a32e01802ff1c938c0afe0cc007a273b9ada8610 +Author: Jeremy Huddleston Sequoia +Date: Thu Aug 16 15:43:34 2012 -0700 + + XQuartz: console_redirect: Set the correct location for reading into the buffer + + Prior to this change, it was possible that a large message would have some + of its data prepended to subsequent messages due to our not incorrectly + setting the location to write into the buffer. + + Signed-off-by: Jeremy Huddleston Sequoia + +commit ad5fe2d9614959b68bf71e23abf7e5abac9c2734 +Merge: 16d8da5 99b94af +Author: Keith Packard +Date: Wed Aug 15 13:29:17 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 16d8da5ca99211bd180f532d78d7c5943d38c8ad +Author: Paul Berry +Date: Tue Jul 31 15:15:56 2012 -0700 + + glx: Skip multisampled configs when matching pre-existing X visuals. + + In __glXScreenInit() we generate the set of GLX visuals in two steps: + first we match each pre-existing X visual with a corresponding + FBConfig, then we generate a new X visual to correspond to all the + remaining FBConfigs. + + The first step is used for the two default 24-bit visuals (true color + and direct color) and for the 32-bit visual. If windowsystem + multisampling is enabled in Mesa, we need to ensure that none of these + three visuals gets matched to a multisampled config. + + Fixes a bug with windowsystem multisampling in gnome-shell. If the X + server happens to match up a multisampled FBConfig to the 32-bit + visual, gnome-shell will try to use it to read pixels from + alpha-blended windows (such as gnome-terminal), resulting in no window + appearing on screen. + + Reviewed-by: Ian Romanick + Reviewed-by: Chad Versace + Signed-off-by: Keith Packard + +commit 99b94af1ffbef7047f88e7d6c594242d172bec02 +Author: Jeremy Huddleston +Date: Wed Aug 15 10:28:16 2012 -0700 + + XQuartz: Fix build regression for GlxExtensionInit + + quartz.c:153:6: error: use of undeclared identifier 'GlxExtensionInit'; did you mean 'GEExtensionInit'? [Semantic Issue] + {GlxExtensionInit, "GLX", &noGlxExtension}, + + Regression-from: aad428b8e21c77397c623b78706eb64b1fea77c9 + Signed-off-by: Jeremy Huddleston + +commit c0540b4c8db676d18a9a09828f1590b0b16f9ebc +Author: Keith Packard +Date: Tue Aug 7 17:49:48 2012 -0700 + + Kludge -- Call RandR screen before cleaning up xf86 crtcs + + The core RandR screen cleanup now involves cleaning up any GPU screen + associations, and those call down into DDX to clean up the driver. If + the pointers from the xf86 structures back to the core randr + structures are set to NULL at that point, bad things happen. + + This patch "knows" that the core RandR close screen is underneath the + xf86 randr close screen function, and so makes sure it gets called + first. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 288b87e42cbb5db34cda848143655e84af8455da +Author: Keith Packard +Date: Tue Aug 7 17:49:47 2012 -0700 + + Close GPU screens before core screens + + This should make cleaning up the GPU screens easier as the core + screens they are associated with will still be around. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 19772670e3041fe1c7f5bbf32fa039a6d8245ccb +Author: Keith Packard +Date: Tue Aug 7 17:49:46 2012 -0700 + + Only free Render filter names on last screen close + + Hotplugging screens causes the render filter names to get freed while + still in use; wait for the last core screen to be closed before + freeing them. That only happens at server reset, when we want them to + be freed. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 863d528a9f76d0e8f122aebf19f8564a4c67a938 +Author: Simon Schubert <2@0x2c.org> +Date: Sun Aug 12 09:40:16 2012 -0700 + + fb: reorder Bresenham error correction to avoid overshoot. + + When fbBresSolid draws a line, it can happen that after the last + pixel, the Bresenham error term overflows, and fbBresSolid paints + another pixel before adjusting the error term. + + However, if this happens on the last pixel (len=0), this extra pixel + might overshoot the boundary, and, in rare cases, lead to a segfault. + + Fix this issue by adjusting for the Bresenham error term before + drawing the main pixel, not after. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24274 + Signed-off-by: Simon Schubert <2@0x2c.or> + Tested-by: Mitch Davis + Signed-off-by: Matt Turner + Signed-off-by: Keith Packard + +commit c22c936b35cee60609041ccb7ee52c00b0634d7b +Author: Keith Packard +Date: Tue Aug 7 16:04:25 2012 -0700 + + Release 1.12.99.904 + + Closing the non-critical bug window for 1.13 + + Signed-off-by: Keith Packard + +commit f94ec283efc922106e7ea1d85771950c66ee8f3b +Author: Keith Packard +Date: Tue Aug 7 16:18:21 2012 -0700 + + Distribute include/glx_extinit.h + + This changed should have been in aad428b8e21c77397c623b78706eb64b1fea77c9 + + Signed-off-by: Keith Packard + +commit 9ca67de8feab59fcf7d6e3fdec8d8a7cfbb21651 +Author: Julien Cristau +Date: Sat Jul 14 16:07:51 2012 +0200 + + Bump glproto requirement to 1.4.16 + + Signed-off-by: Julien Cristau + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 02f94b2d446f6700f791f318c551ac835af8445a +Merge: 360fa77 7f09126 +Author: Keith Packard +Date: Mon Aug 6 16:52:12 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 360fa7736b214cae3ccd39feb4dc87b9e7e9734c +Merge: 2100e72 ac09a4a +Author: Keith Packard +Date: Mon Aug 6 16:42:34 2012 -0700 + + Merge remote-tracking branch 'airlied/for-keithp' + +commit 2100e72388a3dc174093d80c9723f021b4614d17 +Merge: 4a6f42d c37c650 +Author: Keith Packard +Date: Mon Aug 6 16:40:54 2012 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit 7f09126e068015db54c56bb982b8f91065375700 +Author: Peter Hutterer +Date: Fri Aug 3 15:36:34 2012 +1000 + + os: don't unconditionally unblock SIGIO in OsReleaseSignals() + + Calling OsReleaseSignal() inside the signal handler releases SIGIO, causing + the signal handler to be called again from within the handler. + + Practical use-case: when synaptics calls TimerSet in the signal handler, + this causes the signals to be released, eventually hanging the server. + + Regression introduced in 08962951de. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit cb306a8f174bec9ded95191b91797f59250e6808 +Author: Peter Hutterer +Date: Tue Jul 31 16:09:38 2012 +1000 + + dix: make sure the mask is set for emulated scroll events (#52508) + + If a device has smooth scrolling axes, but submits scroll button events, we + convert those to motion events and update the valuators. For legacy button + events, the valuator mask is likely unset though, causing + add_to_scroll_valuator() to return early, leaving us with an empty mask. + That again skipped the rest of the code and no events were generated. + + Fix it by making sure that the scroll valuator in the mask is at least + initialized to 0. + + Broke evdev wheel emulation, introduced by + 54476b5e4461ff523e935961affabcf0de12c556. + + X.Org Bug 52508 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4a6f42dda00ba3b5616f8a86f0d4c9a652c7d9d4 +Author: Adam Jackson +Date: Mon Jul 23 16:34:28 2012 -0400 + + sync: Fix logic error from b55bf248581dc66321b24b29f199f6dc8d02db1b + + That commit adds two hunks, and I _think_ they're backwards. It adds + code to modify bracket_greater on NegativeTransition triggers, and + bracket_less on PositiveTransition triggers. That breaks symmetry with + the surrounding code; the code as of this commit could probably be + simplified further. + + I can't keep the sync trigger rules in my head for more than about five + minutes at a time, so I'm sending this on for more eyes. RHEL 6.3's + xserver is shipping with b55bf248 reverted: + + https://bugzilla.redhat.com/show_bug.cgi?id=748704#c33 + + And there appear to be some upstream reports of the same issue: + + https://bugzilla.gnome.org/show_bug.cgi?id=658955 + + So I'd like to get this sorted out. + + Signed-off-by: Adam Jackson + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 454d0e3a1bb14d7f2579ccb5e513cec5686160e7 +Author: Dave Airlie +Date: Thu Jul 26 12:56:51 2012 +1000 + + randr: fix xinerama output for output slaves + + This fixes the xinerama geometry when output slaves are enabled. + + Tested with xdpyinfo -ext XINERAMA before after slave added. + + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit ac09a4a091a43188241365152e1244fd8fd93ee7 +Author: Dave Airlie +Date: Fri Aug 3 16:43:22 2012 +1000 + + dri2: fix master pixmap free and reset pointer + + These are two minor changes, one to reset the pointer to NULL, + after freeing the pixmaps, one to make sure we use the right API for + the master pixmap, though I doubt it'll ever really matter. + + Signed-off-by: Dave Airlie + Reviewed-by: Alex Deucher + +commit 64623ef90db649e89345f71871affe7a9606f6ea +Author: Dave Airlie +Date: Fri Aug 3 16:42:44 2012 +1000 + + dri2: free slave pixmap on app exit + + When the drawable disappears we need to free the prime master/slave combos. + + This fixes a leak after a prime app is run. + + Signed-off-by: Dave Airlie + Reviewed-by: Alex Deucher + +commit 1a465fef9bc21142eecca3999f0761a3c0501a09 +Author: Dave Airlie +Date: Fri Aug 3 16:41:45 2012 +1000 + + pixmap: have slave pixmap take a reference on master pixmap + + Since the free routines free the master pixmap then the slave, we should + be taking a reference when we bind them together. + + Fixes a use-after-free when resizing a primed gears. + + Signed-off-by: Dave Airlie + Reviewed-by: Alex Deucher + +commit c37c65052f674cd58894ad0b9ec22928a62c624e +Author: Alan Coopersmith +Date: Mon Jul 16 21:12:06 2012 -0700 + + Make indentation of dix/tables.c much more consistent and readable + + Signed-off-by: Alan Coopersmith + Acked-by: Daniel Stone + +commit 9f7ef7f7f0566f6319d8328ce0a1e6d0fa866720 +Author: Alan Coopersmith +Date: Mon Jul 16 20:53:00 2012 -0700 + + Fix up formatting of initializers for arrays of structs + + The indenter seems to have gotten confused by initializing arrays of + structs with the struct defined inline - for predefined structs it did + a better job, so match that. + + Signed-off-by: Alan Coopersmith + +commit c7b7abfaa068042e396d19538215402cfbb4f1e4 +Author: Alan Coopersmith +Date: Sat Jul 14 11:21:15 2012 -0700 + + RRModeCreate: plug memory leak of newModes if AddResource fails + + Reported by parfait 1.0: + + Error: Memory leak (CWE 401) + Memory leak of pointer 'newModes' allocated with realloc(((char*)modes), ((num_modes + 1) * 8)) + at line 93 of randr/rrmode.c in function 'RRModeCreate'. + pointer allocated at line 82 with realloc(((char*)modes), ((num_modes + 1) * 8)). + Error: Memory leak (CWE 401) + Memory leak of pointer 'newModes' allocated with malloc(8) + at line 93 of randr/rrmode.c in function 'RRModeCreate'. + pointer allocated at line 84 with malloc(8). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 1eb7be863353be2cf3e83738253eb60c5fe49d19 +Author: Alan Coopersmith +Date: Sat Jul 14 09:29:52 2012 -0700 + + rrproperty.c: free newly allocated prop in more error paths + + Reported by parfait 1.0: + + Error: Memory leak (CWE 401) + Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) + at line 220 of randr/rrproperty.c in function 'RRChangeOutputProperty'. + 'prop' allocated at line 154 with RRCreateOutputProperty(property). + prop leaks when pending != 0 at line 160. + Error: Memory leak (CWE 401) + Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) + at line 346 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. + 'prop' allocated at line 334 with RRCreateOutputProperty(property). + at line 350 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. + 'prop' allocated at line 334 with RRCreateOutputProperty(property). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 42e655de4d95cb108aec50efec6bbdb709bb13d7 +Author: Alan Coopersmith +Date: Tue Jul 10 23:29:53 2012 -0700 + + rrproviderproperty.c: free newly allocated prop in more error paths + + Reported by parfait 1.0: + + Error: Memory leak (CWE 401) + Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) + at line 221 of randr/rrproviderproperty.c in function 'RRChangeProviderProperty'. + 'prop' allocated at line 155 with RRCreateProviderProperty(property). + prop leaks when pending != 0 at line 161. + + Error: Memory leak (CWE 401) + Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) + at line 345 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. + 'prop' allocated at line 333 with RRCreateProviderProperty(property). + at line 349 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. + 'prop' allocated at line 333 with RRCreateProviderProperty(property). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 94b514d5e4b376d05e106eb3853da511256e8545 +Merge: 7d87545 7328900 +Author: Keith Packard +Date: Mon Aug 6 15:13:17 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 7d87545ba7395ade507cca7bdca7052b26ed18d8 +Merge: ad707a7 988d7ac +Author: Keith Packard +Date: Mon Aug 6 15:11:13 2012 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit ad707a7dcc65c30e030c7600b54f734090e56a91 +Merge: 5a51cb8 884f51e +Author: Keith Packard +Date: Mon Aug 6 15:08:01 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 5a51cb86f39a6809305c403beea54c3625e36259 +Author: Keith Packard +Date: Tue Jul 10 23:09:47 2012 -0700 + + xfree86: When xf86CrtcCloseScreen is called, the randr CRTCs are gone + + The RandR CRTC structures are freed when their resource IDs are + destroyed during server shut down, which is before the screen is + closed. Calling back into RandR with stale pointers just segfaults the + server. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + Tested-by: Knut Petersen + +commit 1bf81af4a6be1113bcc3b940ab264d5c9e0f0c5d +Author: Rui Matos +Date: Mon Jul 30 14:32:12 2012 -0400 + + xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabled + + Panning is at odds with CRTC cursor confinement. This disables CRTC cursor + confinement as long as panning is enabled. + + Fixes regression introduced in 56c90e29f04727c903bd0f084d23bf44eb1a0a11. + + Reviewed-by: Adam Jackson + Signed-off-by: Rui Matos + Signed-off-by: Keith Packard + +commit ff56f88616aa63797384c2c484b2bd0f194df96a +Author: Adam Jackson +Date: Mon Jul 30 14:32:11 2012 -0400 + + randr: Fix up yet another corner case in preferred mode selection + + Let's say - purely for the sake of argument, mind you - that you had a + server GPU with anemic memory bandwidth, and you walked up to it and + plugged in a monitor that was 1920x1080 because that's what happened to + be on the crash cart. Say the memory bandwidth is such that anything + larger than 1280x1024 gets filtered away. Now you're in trouble, + because the established timings section includes a 720x400 mode because + that's what DOS 80x25 is, and that happens to just about match the + physical aspect ratio. + + Instead let's reuse the logic from the existing aspect-match path: pick + the larger mode of either the physical aspect ratio or 4:3. + + Reviewed-by: Julien Cristau + Signed-off-by: Adam Jackson + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit 531785dd746d64ef7f473a83ca73bb20e74b6fca +Author: Dave Airlie +Date: Mon Jul 30 14:32:10 2012 -0400 + + kinput: allocate enough space for null character. + + This code wasn't allocating enough space and was assigning the NULL + one past the end. + + Pointed out by coverity. + + Reviewed-by: Jeremy Huddleston + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 8843aed82e7d69422e7763a35832a2be8f26723f +Author: Vic Lee +Date: Mon Jul 30 14:32:09 2012 -0400 + + ephyr: Resize screen automatically when parent window is resized + + Bugzilla: https://bugs.freedesktop.org/25804 + Reviewed-by: Adam Jackson + Signed-off-by: Vic Lee + Signed-off-by: Keith Packard + +commit b46bbafae6d0a8b3f2f7853d5c1475fc223b1ed6 +Author: Adam Jackson +Date: Mon Jul 30 14:32:08 2012 -0400 + + ephyr: Fix up some bizarre formatting + + Signed-off-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 7328900042b9c1312aed48753fd6054e64613e4c +Author: Alan Coopersmith +Date: Mon Jul 30 23:37:06 2012 -0700 + + XIChangeDeviceProperty: free newly allocated prop when SetProperty fails + + Reported by parfait 1.0: + + Error: Memory leak (CWE 401) + Memory leak of pointer 'prop' allocated with XICreateDeviceProperty(property) + at line 774 of Xi/xiproperty.c in function 'XIChangeDeviceProperty'. + 'prop' allocated at line 700 with XICreateDeviceProperty(property). + prop leaks when handler != NULL at line 768 + and handler->SetProperty != NULL at line 769 + and checkonly != 0 at line 772 + and rc != 0 at line 772. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 4dbbcdf64563cb95f83c04b2442cb7e868384264 +Author: Daniel d'Andrada +Date: Thu Jul 26 17:31:57 2012 -0300 + + Do sent TouchEnd to listeners that don't own an accepted touch + + When the owner of a touch accepts it, the other listeners must + receive a TouchEnd. + + Even though there's code implementing the logic above in + ProcessTouchOwnershipEvent(), DeliverTouchEndEvent() was refusing to send + those TouchEnd events in this situatuation. + + Signed-off-by: Daniel d'Andrada + Reviewed-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 02d91ccb0955252153206061a44340f051077624 +Author: Peter Hutterer +Date: Thu Jun 21 15:42:17 2012 +1000 + + test: always add DIX_LIB and OS_LIB on XORG builds + + With --disable-xorg, We also disabled a bunch of tests because of their + perceived reliance on a DDX. The cause was libtool missing some object files + that never ended up in libxservertest.la. Only the xfree86 test has a true + dependency on XORG. + + DIX_LIB was pointing to dix.O (instead of libdix.la) when + DTRACE_SPECIAL_OBJECTS was defined. libdix.la should be part of XSERVER_LIBS + but dix.O is not a recognised libtool object, so it got skipped for + libxservertest.a. Only in the XORG case would we add DIX_LIB and OS_LIB + manually, thus forcing linkage with the dtrace-generated objects. + + Fixing this by packaging up the dtrace-generated files as part of + libdix.la/libos.la doesn't work for Solaris (and possible others), so simply + always force linkage against the DIX_LIB/OS_LIB in the case of dtrace objects. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Tested-by: Alan Coopersmith + +commit 988d7ace19a009991a4528e783d1a94c2444c66a +Author: Jon TURNEY +Date: Thu Jul 5 09:38:44 2012 +0100 + + glx: Do not report the GLX_INTEL_swap_event extension for indirect swrast + + Commit 84956ca4 bogusly adds GLX_INTEL_swap_event to the extensions reported + by swrast. + + "DRI2 supports this now - and already enables it explicitly - but drisw does + not and should not. Otherwise toolkits like clutter will only ever SwapBuffers + once and wait forever for an event that's not coming." + + (A similar bug for direct swrast is already fixed in mesa commit 25620eb1) + + (Note that this may be papering over the cracks somewhat, as if we do report + GLX_INTEL_swap_event, some clutter apps fail with GLXBadDrawable calling + GLXChangeDrawableAttributes to change the setting of GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK + in the GLX_EVENT_MASK, apparently after the drawable is destroyed, which suggests + a bug with GLXDrawable lifetimes) + + Signed-off-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston Sequoia + +commit fd3d45c137bb849aa9030d732ea9277292e01d3d +Author: Jon TURNEY +Date: Thu Jul 5 09:34:24 2012 +0100 + + glx: Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't. + + Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't. + (This data is not currently used in the server) + + (A similar change is made in mesa commit d3f7597bc9f6d5) + + Signed-off-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston Sequoia + +commit a8464dfa28dea78201e3e4398eb3bcb745e10087 +Author: Colin Harrison +Date: Sun Jul 22 13:15:02 2012 +0100 + + os: Fix TMP fall-back in Win32TempDir() + + Fix Win32TempDir() in the case where we fell back to checking the TMP + environment variable. It looks like this has been wrong since forever. + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit f6e7b82acadfca8239edc0f7e72cd0f3f9cfc2c4 +Author: Marc Haesen +Date: Sat Jul 21 21:18:44 2012 +0100 + + hw/xwin: Fixes to pixelFormat <-> fbConfig conversion in WGL mode + + Fix FIXME in fbConfigToPixelFormat() to correctly populate RGBA-mask shift + parameters. Also request colourindex pixelFormats correctly. + + Now that they are requested correctly, don't skip colorindex visuals when + converting pixelFormats to fbConfigs. + + Populate transparent colour information when converting pixelFormat from + DescribePixelFormats() to a fbConfig. + + Signed-off-by: Marc Haesen + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 45c432871d6a244e9e558a6a4e7c36e90764135e +Author: Jon TURNEY +Date: Sat Jul 21 14:13:37 2012 +0100 + + hw/xwin: Introduce winProcessXEventsTimeout() to the concept of fractions of a second + + Oh this is terrible. + + Currently we only compute the select timeout in whole seconds. This means if we + have less than 1 second remaining, we select with a timeout of 0 (i.e. poll) + which causes the task to spin, burning 100% CPU for the remaining timeout (and + possibly preventing the process we are waiting for from running :S) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 23cd4d0174194e10721d2e465fd1a1c52f001520 +Author: Jon TURNEY +Date: Sat Jul 21 12:33:05 2012 +0100 + + hw/xwin: Fix winUpdateWindowPosition() not to assume WS_EX_APPWINDOW style + + Also improve it's debug output a bit + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 527cf13135cfd279733060e0028bbfbe02be5167 +Author: Jon TURNEY +Date: Sat Jul 21 14:09:16 2012 +0100 + + hw/xwin: Make winOverrideIcon() thread-safe for icon data access + + winOverrideIcon() is called from the internal WM client thread. + + Accessing server-internal data structures to get icon data or window hints is + not safe, as there is no lock to ensure we do not collide with these data + structures being updated in the server thread. + + Rewrite so the internal client thread uses X client calls to obtain this data + safely + + We used to also set the icon inside the server when the window was initially + created. For simplicity, we simply send a message to the internal WM to update + the icon when the window is created (rather than writing different icon update + code which can work in the server thread for that one case...) + + extwm mode used to do the icon update in the server. I'm not sure that actually + made much sense. Let's assume the external WM client can do it instead... + + v2 + Make sure that WM_WM_ICON_EVENT does nothing for override-redirect windows + + v3 + Reinstate check that native window actually has expected properties for an X + window before trying to update it's icon; some auxiliary windows owned by the + XWin process don't, which would cause a crash + + v4 + Various fixes to pixmap icon conversion: + - remove left-over malloc in winScaleXimageToWindowsIcon causing a memory leak + - don't recalculate DDBitmap stride in winScaleXimageToWindowsIcon, when we already have worked it out + - properly check that XGetWindowProperty(NET_WM_ICON) returned some data + - don't try to retrieve WM_HINTS icon_mask if it isn't set + - restore accidentally dropped calculation of effBpp, stride, maskStride of output DDBitmap + - make sure imageMask is zero-initalized before we use it to mask the DDBitmap + + v5 + Remove a left-over unused variable + + v6 + Avoid XDestroyImage(NULL) crash if XGetImage failed for icon_pixmap + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 2677d89823b851fea31036f51589985bb86864b7 +Author: Jon TURNEY +Date: Sun Jul 22 17:38:55 2012 +0100 + + hw/xwin: Also update icon when _NET_WM_ICON property changes + + _NET_WM_ICON property is also considered to decide on the window icon, so also + send a WM_WM_ICON_EVENT message to the WM if the PropertyNotify event is for + _NET_WM_ICON property + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit a07541f1ffc28c57a762beefb96c7bf0ac40b0a4 +Author: Jon TURNEY +Date: Sun Jul 22 16:15:12 2012 +0100 + + hw/xwin: Rename WM_WM_HINTS_EVENT to WM_WM_ICON_EVENT + + WM_WM_HINTS_EVENT only updates the icon, so rename it to WM_WM_ICON_EVENT + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 2a47c91eb382d1ff0fb009a39efa7dc9c6fd5112 +Author: Jon TURNEY +Date: Fri Jul 20 13:51:35 2012 +0100 + + hw/xwin: Refactor Xutf8TextPropertyToString() from GetWindowName() as a separate utility function + + Simplify GetWindowName() by moving UTF-8 to wchar conversion out to it's call + site. This allows us to do extra processing on the window name in future. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 884f51e9770c9ccd3b38a14ea393ea2c7a5ef235 +Author: Jeremy Huddleston Sequoia +Date: Wed Aug 1 18:46:08 2012 -0700 + + XQuartz: Fix xp_window_bring_all_to_front linking on OS versions with older libXplugin + + Found-by: Tinderbox + Signed-off-by: Jeremy Huddleston Sequoia + +commit b4c2358e0a388730f1beda5d3a12e79755208ce6 +Author: Jeremy Huddleston Sequoia +Date: Wed Aug 1 18:45:43 2012 -0700 + + pbproxy: Fix a warning about a bad method prototype + + x-selection.m:1502:1: warning: method has no return type specified; defaults to 'id' + [-Wmissing-method-return-type,Semantic Issue] + - init + ^ + (id) + 1 warning generated. + + Signed-off-by: Jeremy Huddleston Sequoia + +commit f193907f1b2f8d17dac9b59b7e93ddbb0f4e31ca +Author: Jon TURNEY +Date: Fri Jun 22 14:56:22 2012 +0100 + + Fix pseudoramiX.c compilation without darwin.h + + Signed-off-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston Sequoia + +commit 067931ccce592e319baffa26d4f7380d8d924537 +Author: Jon TURNEY +Date: Mon Jul 23 12:16:36 2012 +0100 + + hw/xquartz: Various fixes for pseudoramiX.c + + Various fixes, applied to panoramiX.c in commit 2b266eda, also need applying to pseudoramiX.c: + Fix panoramiX request and reply swapping + Set window and screen values in panoramix replies + Prevent buffer overrun in ProcPanoramiXGetScreenSize + + These fixes seem to be necessary in order to compile pseudoramiX.c with gcc + + pseudoramiX.c: In function 'ProcPseudoramiXGetState': + pseudoramiX.c:221:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap + pseudoramiX.c: In function 'ProcPseudoramiXGetScreenCount': + pseudoramiX.c:250:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap + pseudoramiX.c: In function 'ProcPseudoramiXGetScreenSize': + pseudoramiX.c:283:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap + pseudoramiX.c:284:57: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap + + Signed-off-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston Sequoia + +commit aad428b8e21c77397c623b78706eb64b1fea77c9 +Author: Dave Airlie +Date: Thu Jul 26 09:54:08 2012 +1000 + + glx: drop GLX_LIBS from X server and workaround sdksyms. + + We've had reports of two copies of the GLX bits, one in the server + and one in libglx.so causing problems, I didn't understand why the + X server needed a copy so drop it, however then we have to fix a missing + GlxExtensionInit that comes from sdksyms, so work around it by moving + that one declaration into a header that sdksyms doesn't scan. + + Thanks to Jon Turney for debugging the actual problem. + (copyright header from extinit.h that seems most appropriate put on top). + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52402 + Tested-by: Peter Hutterer + Reviewed-by: Daniel Stone + Tested-by: Jon TURNEY + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit afa53fe7cffd430cf11f25ca818cb955a78c0c1c +Author: Keith Packard +Date: Wed Jul 25 14:29:48 2012 -0700 + + Version 1.12.99.903 (1.13 RC3) + + Signed-off-by: Keith Packard + +commit 98e3f3fde35ca805d44ee38394bfd86058f9f4b8 +Author: Adam Jackson +Date: Thu Jul 19 15:00:05 2012 -0400 + + doc: Drop XAA references from xorg.conf man page + + Signed-off-by: Adam Jackson + Reviewed-by: Dave Airlie + Reviewed-by: Alan Coopersmith + Reviewed-by: Alex Deucher + Reviewed-by: Daniel Stone + Acked-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit dea928477bf835a13b2bd2b16c0dbaaf5468130c +Author: Adam Jackson +Date: Thu Jul 19 15:00:04 2012 -0400 + + xfree86: Drop some dead XAA decls from SDK headers + + Signed-off-by: Adam Jackson + Reviewed-by: Dave Airlie + Reviewed-by: Alan Coopersmith + Reviewed-by: Alex Deucher + Reviewed-by: Daniel Stone + Acked-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit a44a379a2a4c198dbd6ffd6cc0db376f8fb64327 +Author: Adam Jackson +Date: Thu Jul 19 15:00:03 2012 -0400 + + cw: Remove + + XAA was the only consumer. + + Signed-off-by: Adam Jackson + Reviewed-by: Dave Airlie + Reviewed-by: Alan Coopersmith + Reviewed-by: Alex Deucher + Reviewed-by: Daniel Stone + Acked-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit 20b4d90f32b3ca5def5be2fdf04a91ae6c47f125 +Merge: 83df169 fd228d3 +Author: Keith Packard +Date: Wed Jul 25 13:52:35 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit fd228d318428d0d9dea52ca560a9b66660dd2d02 +Author: Jeremy Huddleston +Date: Wed Jul 25 11:40:33 2012 -0700 + + XQuartz: Call xp_window_bring_all_to_front if available in libXplugin + + Signed-off-by: Jeremy Huddleston + +commit 83df169538bddcf3a61e2c5e02a4f3e10af93b60 +Author: Aaron Plattner +Date: Fri Jul 20 00:59:20 2012 -0700 + + dix: don't use "new" as a parameter name + + "new" is a reserved word in C++. + + Signed-off-by: Aaron Plattner + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 3b7f313b3d74f9df876152c55d55cbb339bf2d02 +Author: Jeremy Huddleston +Date: Tue Jul 24 00:32:30 2012 -0700 + + XQuartz: Fix runtime regressions introduced by extension loading changes + + * GLX is now loaded + * PseudoramiX loading is back in miinitext. It needs to be loaded + before RandR. + + Regression-from: 27a624bee66d2797eacf90317054207dcf248028 + Regression-from: 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 + + Signed-off-by: Jeremy Huddleston + +commit 0d64e881a31d89d28f2ded9b8e83e93632870a16 +Author: Jeremy Huddleston +Date: Mon Jul 23 23:16:29 2012 -0700 + + XQuartz: Build fix for __GLXscreen::createContext changes + + Regression-from: 96d74138b1c0273e88933220d99a893858b649cd + + Signed-off-by: Jeremy Huddleston + +commit 77de2994774e7be24a0bad521180628feb1027c6 +Author: Keith Packard +Date: Tue Jul 17 15:47:39 2012 -0700 + + Bump to version 1.12.99.902 + + Signed-off-by: Keith Packard + +commit beeea70495a8d5c4afc1b1eb2cc06a24ab1a986d +Merge: 6e438a0 6910280 +Author: Keith Packard +Date: Tue Jul 17 12:17:39 2012 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit 6e438a0e183f5a6c22070746c038af53d5b935ca +Merge: 5884e7d 75966a4 +Author: Keith Packard +Date: Tue Jul 17 12:12:53 2012 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 75966a4186955f3a4625e93796145036c5986d2e +Author: Keith Packard +Date: Fri Jul 13 14:36:25 2012 -0700 + + xwin: Clean up os wrappers for System, Popen and Pclose on Windows + + Popen and Pclose are never used on Windows, so don't bother to even + try to define them. + + System(s) was defined as system(s), but the two users of that + function are in xkb, which carefully redefines that as + Win32System. Move Win32System and Win32TempDir to os/utils.c, renaming + Win32System to be just System, which simplifies the xkb code + + Signed-off-by: Keith Packard + Reviewed-by: Jon TURNEY + +commit 6910280297ab610100dd8e7fbe5bb5cc08968f2f +Author: Alan Coopersmith +Date: Sat Jul 14 10:54:36 2012 -0700 + + Use C99 designated initializers in DRI2GetParam replies + + DRI2GetParam was going through review in parallel with main batch of + C99 initialization changes - sync up now that both have landed. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit a6c5b8d3ee053cadf685b0e4de96407ad6df4dd4 +Author: Alan Coopersmith +Date: Sat Jul 14 10:50:41 2012 -0700 + + Use C99 designated initializers in RandR 1.4 extension Events + + RandR 1.4 was going through review in parallel with main batch of + C99 initialization changes - sync up now that both have landed. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit ada04ef0ca8a1213e865ba2c000ccd6ed6d0e371 +Author: Alan Coopersmith +Date: Sat Jul 14 10:45:29 2012 -0700 + + Use C99 designated initializers in RandR 1.4 extension Replies + + RandR 1.4 was going through review in parallel with main batch of + C99 initialization changes - sync up now that both have landed. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit fb73f7f40fa46458990038332017d4496caa0691 +Author: Alan Coopersmith +Date: Sat Jul 14 10:02:52 2012 -0700 + + Fix two more C99 initialization mistakes using members of same struct + + Similar to 34cf559bcf99dad, use temporary variables instead of + referencing members of the struct being initialized in the middle + of the initialization. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 5884e7dedecdd82ddbb037360cf9c85143e094b5 +Author: Aaron Plattner +Date: Mon Jul 16 17:40:31 2012 -0700 + + xf86: Re-export extension disable flags + + These flags were unexported by commit a1d41e311c21eb6627caa0d168e070ceaf90806f, + which moved the declarations around and lost the _X_EXPORT attributes in the + process. Since drivers need these and it's late in the release cycle, just + re-export them for now. + + Signed-off-by: Aaron Plattner + Reviewed-by: Andy Ritger + Signed-off-by: Keith Packard + +commit 357ec54f46d31ff77c441c15c322152e04f89a11 +Author: Jon TURNEY +Date: Wed Mar 14 13:58:32 2012 +0000 + + hw/xwin: Refer to xkeyboard-config man page for XKB configuration option values + + Also polish the keyboard configuration text a bit + Include man section number in references to setxkbmap + Consistently refer to 'manual page' rather using both that and 'man page' + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 5940580f8c12145c1ef4c3eee898676b48d95879 +Author: Jörg Mensmann +Date: Tue Apr 17 10:48:19 2012 +0100 + + hw/xwin: Fix command line arguments for multiple monitors. + + Moving Xwin to a certain monitor using "-screen 0 @2" would fail, + printing "ddxProcessArgument - screen - Querying monitors failed". + + This happened since commit 3ead1d810b0e157078db39712e02ea6dc85216d8, + because EnumDisplayMonitor() returns FALSE if its callback function + returns FALSE (which is not clearly documented), and QueryMonitor() + would then also return FALSE. + + Moving back to the old behaviour, where the return value of + EnumDisplayMonitors() is ignored. + + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 18801f5e5a98d80f4811ade8c98df65175b1935a +Author: Jon TURNEY +Date: Fri Feb 10 09:27:16 2012 +0000 + + hw/xwin: Remove unused WindowExposuresProcPtr storage in screen private + + We don't wrap the WindowExposures screen function + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 8fd30859c293035fe505da76d8d7e64131bd5bc0 +Author: Jon TURNEY +Date: Fri Feb 10 13:25:32 2012 +0000 + + hw/xwin: Remove long obsolete README for hw/xwin + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3568d4af4ff2490e79286d242916e81afed57b58 +Author: Jon TURNEY +Date: Thu Feb 23 22:32:09 2012 +0000 + + hw/xwin: Remove a pointless OS version check in winInstallKeyboardHookLL() + + Checking for OS later than NT4 SP3 (which we didn't do correctly anyhow, + just checking for NT) is pointless when other code in hw/xwin assumes at + least NT 5.0 + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 0ed0d3979050c4ee7bef64441d50c494d58d93b0 +Author: Jon TURNEY +Date: Thu Jul 5 22:08:38 2012 +0100 + + hw/xwin: Remove winClipboardDetectUnicodeSupport() + + This code for detecting if the Windows clipboard can support unicode + is long obsolete. + + All NT versions of Windows support unicode clipboard, so any version + of Windows we can run on must support unicode clipboard. + + The -nounicodeclipboard flag to disable use of unicode on the clipboard + is retained. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c98471fad7d85fc9d9959b1c48edd90415f7bf15 +Author: Jon TURNEY +Date: Thu Jul 5 18:00:06 2012 +0100 + + hw/xwin: Consolidate duplicated code as getHwnd() function + + Consolidate code to find the native HWND of an X window, stored in the _WINDOWSWM_NATIVE_HWND + property, duplicated in UpdateName() and PreserveWin32Stack() as getHwnd() + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit df7636dddb4981e14ee7d128c43bb08bdf6a8727 +Author: Jon TURNEY +Date: Thu Jul 5 14:20:52 2012 +0100 + + hw/xwin: Correct function name in log message + + Correct function name in log message winInitializeDefaultScreens -> winInitializeScreenDefaults + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9cdd3ed07425b222e8197b9a2f57ec1525c6fd54 +Author: Jon TURNEY +Date: Fri Mar 16 12:56:45 2012 +0000 + + hw/xwin: Tidy up some more pointless output which is always emitted + + It's not very useful to log lines like the below when the About.. dialog is used + + winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL + winAboutDlgProc - WM_CLOSE + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit eb5b4d8d809712053701f057a35bbf5348ac9059 +Author: Colin Harrison +Date: Thu Jul 5 14:03:44 2012 +0100 + + hw/xwin: RANDR resize didn't occur when screen window was maximized or restored + + In windowed mode, with option -resize, RANDR resize was missing when the screen + window was maximized or restored. + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 7e07d61857c5d2ee6e3c36c81b51bb4fe378b5a0 +Author: Jon TURNEY +Date: Thu Jul 5 14:01:03 2012 +0100 + + hw/xwin: Bug fixes for screen sizing when the screen window is on a non-primary monitor + + There is a bug that when the -screen option is used to specify a monitor for + the screen window to be located on, but no explicit size is specified + (and the -multiplemonitors option isn't specified), the screen + window size is always constrained to fit the work area of the primary + monitor (rather than the work area of the specified monitor) + + This gives incorrect results if you want a screen the same size as your + non-primary monitor (e.g. by using -screen 0 @2) and your non-primary + monitor is larger than your primary monitor. + + (This can be worked around by specifying -multiplemonitors and an explicit + screen size the same size as the monitor (e.g. -multiplemonitors -screen 0 + 1600x1200@2)) + + Fix to use work area for the monitor specified for the screen, rather than the + primary monitor work area (unless -multiplemonitors is used, in which case we + continue to use the virtual desktop work area instead) + + Also fix the adjustment for an autohide taskbar, so that it is only done if the + taskbar is on the same monitor as the screen (or -multiplemonitors is used) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 090856b55b5895ce07f36ddebe6d8f7cb86c1826 +Author: Jon TURNEY +Date: Thu Jul 5 13:19:02 2012 +0100 + + hw/xwin: Tidy up some pointless output which is always emitted + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9fe9c5f868886abf671b3be3964af1965dd92472 +Author: Jon TURNEY +Date: Sun Feb 13 18:52:52 2011 +0000 + + hw/xwin: Don't bother reporting XORG_VERSION_CURRENT + + Don't bother reporting XORG_VERSION_CURRENT, when we also + report the version number broken down into it's components + XORG_VERSION_MAJOR, XORG_VERSION_MINOR, etc. as well. + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit d5977e5bd2c8ee77db08d5f948f266c9661b9fb5 +Author: Dave Airlie +Date: Fri Jul 13 00:28:19 2012 +1000 + + xf86: include xf86platformBus.h in xf86AutoConfig.c + + This fixes an implicit declaration, + xf86AutoConfig.c:202:5: error: implicit declaration of function 'xf86PlatformMatchDriver' [-Werror=implicit-function-declaration] + xf86AutoConfig.c:202:5: warning: nested extern declaration of 'xf86PlatformMatchDriver' [-Wnested-externs] + + Signed-off-by: Dave Airlie + Reviewed-by: Keith Packard + +commit afa3b9ccd27ff9c58f536cb3b727e85feb6a6f6a +Author: Bartosz Brachaczek +Date: Fri Jul 6 02:52:40 2012 +0200 + + glx: Fix checking GL version + + Signed-off-by: Bartosz Brachaczek + Reviewed-by: Ian Romanick + Signed-off-by: Dave Airlie + +commit 743ccf6fa0a9a4579d6de6d10e2e6040640772d9 +Author: Dave Airlie +Date: Thu Jul 12 19:09:15 2012 +1000 + + glx/dri2: don't return NULL in a function with no return. + + Reported by gcc. + + Reviewed-by: Ian Romanick + Reviewed-by: Matt Turner + Signed-off-by: Dave Airlie + +commit d1a00c26becdc2490ab4660abf108eca09c30d23 +Author: Dave Airlie +Date: Thu Jul 12 19:05:41 2012 +1000 + + glx/dri2: use correct define from dri attribs. + + Looks like idr renamed this and pushed the wrong one. + + Reviewed-by: Ian Romanick + Reviewed-by: Matt Turner + Signed-off-by: Dave Airlie + +commit c62205adcd48d497450655d0136f8ca5bd5cbae7 +Author: Dave Airlie +Date: Thu Jul 12 19:04:13 2012 +1000 + + glx/dri2: fix incorrect == vs = + + glxdri2.c:486: warning: statement with no effect + + Reviewed-by: Ian Romanick + Reviewed-by: Matt Turner + Signed-off-by: Dave Airlie + +commit defca4c192bd7f4af2b273c7cb1fe8665888772a +Author: Dave Airlie +Date: Thu Jul 12 18:52:34 2012 +1000 + + glx/dri2: fix typo in the notification reset for robustness. + + Reviewed-by: Ian Romanick + Reviewed-by: Matt Turner + Signed-off-by: Dave Airlie + +commit d1cae6bb804f7dfc889fd3c5d5eb116f4baf5149 +Author: Dave Airlie +Date: Thu Jul 12 18:51:52 2012 +1000 + + glx: pass screen into the convert function + + when robustness is enabled, this is required. + + Reviewed-by: Ian Romanick + Signed-off-by: Dave Airlie + +commit ea74e381ae91f45ec195a5505262e2e5a3c0e1c9 +Author: Dave Airlie +Date: Fri Jul 13 00:47:24 2012 +1000 + + xtest: add extinit.h for SyncExtensionInit + + This adds the decl for SyncExtenionInit. + + Signed-off-by: Dave Airlie + Tested-by: Keith Packard + Signed-off-by: Keith Packard + +commit 746193a7f10f11cccae05c98b933aadf58fc7375 +Merge: a2d0829 2b74949 +Author: Keith Packard +Date: Thu Jul 12 15:10:51 2012 -0700 + + Merge remote-tracking branch 'jturney/xwin-extmod-removal-fixes' + +commit a2d0829531249e24dbca25fc20ed30a2bb2d8ed8 +Author: Michel Dänzer +Date: Thu Jul 12 13:16:37 2012 +0200 + + glx: Free DRI2 drawable reference to destroyed GLX drawable. + + Otherwise the reference can lead to use after free in + __glXDRIinvalidateBuffers(). + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50019 + + Signed-off-by: Michel Dänzer + Reviewed-by: Kristian Høgsberg + Signed-off-by: Keith Packard + +commit 8a87acc9e57be740e3bd252567622246051a0723 +Author: Michel Dänzer +Date: Thu Jul 12 13:16:36 2012 +0200 + + dri2: Add DRI2CreateDrawable2. + + Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the + DRI2 drawable reference to the base drawable. + + Signed-off-by: Michel Dänzer + Reviewed-by: Kristian Høgsberg + Signed-off-by: Keith Packard + +commit 2b74949ad02bd916c3ac502db3f28057f12a8117 +Author: Jon TURNEY +Date: Thu Jul 12 00:36:43 2012 +0100 + + Restore GLX extension to XWin + + - Add an XwinExtensionInit(), similar in spirit to QuartzExtensionInit() + and xf86ExtensionInit() + - Load the GLX extension (I'm guessing XQuartz needs this adding somewhere + as well) + - Also, since we now have a proper place to install the native GL provider + where it will take priority over the the swrast provider, do so + + Signed-off-by: Jon TURNEY + Reviewed-by: Daniel Stone + Reviewed-by: Colin Harrison + +commit 656e5fea6c9ca15f932889edcc590dd01c881945 +Merge: 8b820f2 1720cd9 +Author: Keith Packard +Date: Thu Jul 12 08:26:35 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 8b820f221ad54eb96a16c7060048abc8824371b6 +Author: Daniel Stone +Date: Wed Jul 11 17:31:53 2012 +0100 + + sdksyms: Fix build with --disable-xv + + I hate this [redacted] script. + + Signed-off-by: Daniel Stone + Tested-by: Keith Packard + Signed-off-by: Keith Packard + +commit 06ac7937fc37cdf073b77386bed47e14cff23628 +Author: Jon TURNEY +Date: Thu Jul 12 12:37:05 2012 +0100 + + Restore extern to the declaration of __glXDRISWRastProvider + + b86aa74 dropped the 'extern' from the declaration of __glXDRISWRastProvider + + This turns out to be important to me, as without it, the final link only gets + the tentative definition of __glXDRISWRastProvider implied by the declaration, + and not the proper one from glxdriswrast.c, presumably because nothing else + references anything in the object that file generates. + + Signed-off-by: Jon TURNEY + Reviewed-by: Daniel Stone + Reviewed-by: Colin Harrison + +commit bcbf95b1bafa6ffe724768b9309295e2fdb4b860 +Author: Jon TURNEY +Date: Thu Jul 12 00:36:10 2012 +0100 + + Revert bogus GlxPushProvider() in commit a1d41e3 + + a1d41e3 "Move extension initialisation prototypes into extinit.h" + also includes a change to GlxExtensionInit to install the swrast GLX + provider. + + Since b86aa74 "GLX: Insert swrast provider from GlxExtensionInit" + already does this (correctly, by installing the swrast provider + at the end of the chain, rather than at the beginning), and since this + would seem to have the effect of making the swrast provider the most + preferred provider, I'm guessing this wasn't intended. + + Signed-off-by: Jon TURNEY + Reviewed-by: Daniel Stone + Reviewed-by: Colin Harrison + +commit 1720cd9badf21e5d6b2c6c929e609ab3b0b92fd2 +Author: Jeremy Huddleston +Date: Wed Jul 11 23:54:27 2012 -0700 + + XQuartz: Re-add prototype for DRIExtensionInit + + Regression from: a1d41e311c21eb6627caa0d168e070ceaf90806f + + Signed-off-by: Jeremy Huddleston + CC: Daniel Stone + +commit 1a64d3cc9c319d5e9ab2365b60469fb5b83407fc +Author: Jeremy Huddleston +Date: Wed Jul 11 23:49:59 2012 -0700 + + XQuartz: Fix build failure due to incorrect PseudoramiXExtensionInit prototype + + pseudoramiX.c:129:1: error: conflicting types for 'PseudoramiXExtensionInit' [Semantic Issue] + PseudoramiXExtensionInit(int argc, char *argv[]) + ^ + ../../include/extinit.h:175:13: note: previous declaration is here + extern void PseudoramiXExtensionInit(void); + ^ + + Signed-off-by: Jeremy Huddleston + +commit 228f8bfe81890770f1ba109a0acca1c81a2ffee9 +Author: Jeremy Huddleston +Date: Wed Jul 11 23:49:33 2012 -0700 + + XQuartz: Silence an unused-variable warning + + Signed-off-by: Jeremy Huddleston + +commit deb08658e2a6b1647a7213a316c6f3019bcdce48 +Author: Maarten Lankhorst +Date: Wed Jul 11 16:27:46 2012 +0200 + + xfree86: Strip dangling pointers from desiredMode + + Based on the original patch by Chris Wilson, which was a better fix than mine. + + We stash a copy of the desiredMode on the crtc so that we can restore it + after a vt switch. This copy is a simple memcpy and so also stashes a + references to the pointers contained within the desiredMode. Those + pointers are freed the next time the outputs are probed and mode list + rebuilt, resulting in us chasing those dangling pointers on the next + mode switch. + + ==22787== Invalid read of size 1 + ==22787== at 0x40293C2: __GI_strlen (in + /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + ==22787== by 0x668F875: strdup (strdup.c:42) + ==22787== by 0x5DBA00: XNFstrdup (utils.c:1124) + ==22787== by 0x4D72ED: xf86DuplicateMode (xf86Modes.c:209) + ==22787== by 0x4CA848: xf86CrtcSetModeTransform (xf86Crtc.c:276) + ==22787== by 0x4D05B4: xf86SetDesiredModes (xf86Crtc.c:2677) + ==22787== by 0xA7479D0: sna_create_screen_resources + (sna_driver.c:220) + ==22787== by 0x4CB914: xf86CrtcCreateScreenResources (xf86Crtc.c:725) + ==22787== by 0x425498: main (main.c:216) + ==22787== Address 0x72c60e0 is 0 bytes inside a block of size 9 free'd + ==22787== at 0x4027AAE: free (in + /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + ==22787== by 0x4A547E: xf86DeleteMode (xf86Mode.c:1984) + ==22787== by 0x4CD84F: xf86ProbeOutputModes (xf86Crtc.c:1578) + ==22787== by 0x4DC405: xf86RandR12GetInfo12 (xf86RandR12.c:1537) + ==22787== by 0x518119: RRGetInfo (rrinfo.c:202) + ==22787== by 0x51D997: rrGetScreenResources (rrscreen.c:335) + ==22787== by 0x51E0D0: ProcRRGetScreenResources (rrscreen.c:475) + ==22787== by 0x513852: ProcRRDispatch (randr.c:493) + ==22787== by 0x4346DB: Dispatch (dispatch.c:439) + ==22787== by 0x4256E4: main (main.c:287) + + Signed-off-by: Maarten Lankhorst + Reported-by: Zdenek Kabelac + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36108 + Reviewed-by: Chris Wilson + Signed-off-by: Keith Packard + +commit 59c2c4f645b4d782599c274f4bc752de9623d308 +Author: Daniel Stone +Date: Tue Jul 10 09:10:22 2012 +0100 + + AllocDevicePair: Ensure XKB privates are initialised + + Since we call directly into XKB and may be doing so before the extension + has been initialised, make sure its privates are set up first. XTest + had a hack to do this itself, but seems cleaner to just make sure we do + it in AllocDevicePair. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit f937c3d50157a9a42d2f2f10590b6b139ce18a29 +Author: Daniel Stone +Date: Tue Jul 10 09:10:21 2012 +0100 + + Sync: Always initialise system counter list + + Sync is designed to let you add system counters before the extension has + been initialised, which means the system counter list may well be full + of bees. Make sure it's initialised before we add to it, to avoid the + risk of fatal injury. + + Signed-off-by: Daniel Stone + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 34cf559bcf99dad550527b5ff53f247f0e8e73ee +Author: Keith Packard +Date: Tue Jul 10 15:58:48 2012 -0700 + + ProcGetPointerMapping uses rep.nElts before it is initialized + + In: + + commit d792ac125a0462a04a930af543cbc732f8cdab7d + Author: Alan Coopersmith + Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in dix Replies + + the initializer for the .length element of the xGetPointerMappingReply + structure uses the value of rep.nElts, but that won't be set until + after this initializer runs, so we get garbage in the length element + and clients using it will generally wedge. + + Easy to verify: + + $ xmodmap -pp + + Fixed by creating a local nElts variable and using that. + + Signed-off-by: Keith Packard + Reviewed-by: Alan Coopersmith + +commit 44bd27cdd13b6e6c4e6fd3873361e3308ef25ffe +Author: Keith Packard +Date: Tue Jul 10 01:14:13 2012 -0700 + + Version 1.12.99.901 (1.13 RC1) + + Signed-off-by: Keith Packard + +commit 6e12cb147da58bd12a158807b2cd5afac32ae70f +Merge: 532fbc2 0231279 +Author: Keith Packard +Date: Tue Jul 10 00:52:11 2012 -0700 + + Merge branch 'local-fixes' + +commit 532fbc29c900469ef4867ccb7eabb953019dcab5 +Author: Daniel Stone +Date: Tue Jul 10 02:03:38 2012 +0100 + + GE: Remove unused RT_GECLIENT + + Remove remnants of an earlier experiment which had the GE extension + handling event delivery directly. Nothing's used the resource since, so + purge it. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 0e70b333d4846b166bf4a0a0c5d1a80623ba08dc +Author: Daniel Stone +Date: Tue Jul 10 02:03:37 2012 +0100 + + XFree86: os-support: Remove unused xf86MakeNewMapping + + No drivers used this, so it got unexported, and now it's so unused it + got culled during the link. Take the poor function out behind the shed + and put it out of its misery. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Acked-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 43f2393746c44e9d35be6a2a3555205f8e1b4ddf +Author: Daniel Stone +Date: Tue Jul 10 02:03:36 2012 +0100 + + Xinerama: Reset Composite request vector on close + + Similar (identical) to how it interacts with Render and XFixes, also + call PanoramiXCompositeReset() to restore the Composite dispatch table + to how it was when it started, on reset. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Acked-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 766a403bc7ff249fdc6b9049329b633e73738329 +Author: Daniel Stone +Date: Tue Jul 10 02:03:35 2012 +0100 + + XvMC: Remove unused XvMCGeneration + + I wonder if this even works across multiple generations. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Acked-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 7cef23a6dd7a5d76983cf20979e845ea6ae63a10 +Author: Daniel Stone +Date: Tue Jul 10 02:03:34 2012 +0100 + + Render: Remove unused glyphDepths + + No-one has used this since 0a71e154. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Acked-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 65011064d7e70aed59fb716f9ed3d76d196244ce +Author: Daniel Stone +Date: Tue Jul 10 02:03:33 2012 +0100 + + Xi: Remove dead Device{Enter,Leave}WindowMask + + These were an unused remnant of earlier MPX work; their only users got + cleared out in dc153271, but the mask declarations remained. Remove + them, and move DevicePropertyNotify's mask up to be contiguous with the + rest of the range. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit fadfc2947075c832cd1107d2c0866ad13fa756c4 +Author: Daniel Stone +Date: Tue Jul 10 02:03:32 2012 +0100 + + GLX: Remove unused noGlxVisualInit + + No-one ever did anything with this variable except assign its default + value to it. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Acked-by: Peter Hutterer + Reviewed-by: Ian Romanick + Signed-off-by: Keith Packard + +commit 06e4ba8b26fb974bdd84144b3e002f0f7589e7f7 +Author: Daniel Stone +Date: Tue Jul 10 02:03:31 2012 +0100 + + XKB: Geom: Remove unused code + + These codepaths were never called by anyone. Shame there weren't more + of them. + + Signed-off-by: Daniel Stone + Reviewed-by: Adam Jackson + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit e191e296e6e7861978ea4a0ae9aa7b780e52732b +Author: Daniel Stone +Date: Mon Jul 9 20:04:15 2012 +0100 + + Remove XAA + + Commit 0c6987df in June 2008 disabled XAA offscreen pixmaps per default, + as they were broken, leaving XAA only able to accelerate operations + directly on the screen pixmap and nowhere else, eliminating acceleration + for basically every modern toolkit, and any composited environment. + + So, it hasn't worked for over four years. No-one's even come close to + fixing it. + + RIP. + + Signed-off-by: Daniel Stone + Reviewed-by: Dave Airlie + Reviewed-by: Alex Deucher + +commit 66362441867f68dac97de33744bd0ca478fb65d3 +Author: Daniel Stone +Date: Tue Jul 10 02:03:29 2012 +0100 + + Remove last renmants of XFree86LOADER define + + Not to be confused with XFree86Loader or XorgLoader. Which are both now + dead too. + + Signed-off-by: Daniel Stone + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit a15dac550918c55b08bbe0007f068cc5096ebaa1 +Author: Daniel Stone +Date: Tue Jul 10 02:03:28 2012 +0100 + + Remove unused setupFunc from extensions + + setupFunc was used as an early callback for half-modular extensions such + as Xv, XvMC and DGA to set up hooks between the core server and the + modular component. Now we've rid ourselves of that, we can also bin + setupFunc. + + Signed-off-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 710318e803c6d5c6b8ae170d38c8253f5d780472 +Author: Daniel Stone +Date: Tue Jul 10 02:03:27 2012 +0100 + + Replace NO_HW_ONLY_EXTS with Xorg DDX test + + Turns out the only thing we use NO_HW_ONLY_EXTS for is to check whether + or not we're building inside the Xorg DDX. Replace it with an + XorgLoader test instead, and remove all its users. + + Signed-off-by: Daniel Stone + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 +Author: Daniel Stone +Date: Tue Jul 10 02:03:26 2012 +0100 + + Unify miinitext.c + + Rather than having a non-Xorg and an Xorg-specific path which basically + just duplicated each other for no reason, we could ... just have one. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 147967f67d4976a87ed07fe11b59b174907f5d43 +Author: Daniel Stone +Date: Tue Jul 10 02:03:25 2012 +0100 + + Remove Xorg-specific extensions from non-Xorg miinitext + + miinitext.c had a completely separate codepath for non-Xorg servers, + which included tests for Xorg-specific extensions such as + XFree86-VidMode, which were external even to the Xorg DDX. So we can + just remove them, and the associated #undefs. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 27a624bee66d2797eacf90317054207dcf248028 +Author: Daniel Stone +Date: Tue Jul 10 02:03:24 2012 +0100 + + Quartz: Move PseudoramiX initialisation to DDX + + As PseudoramiX is a DDX-specific extension, move its loading and + initialisation to hw/xquartz. This creates a QuartzExtensionInit() + similar in spirit to xf86ExtensionInit. + + Signed-off-by: Daniel Stone + Acked-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit 79d14d9fc3d92ba866864d3a5910a8c6c8e9b64f +Author: Daniel Stone +Date: Tue Jul 10 02:03:23 2012 +0100 + + Move the remnants of loadext.c to miinitext.c + + There was nothing XFree86-specific or loader-specific about this, aside + from using xf86MsgVerb instead of ErrorF. + + Signed-off-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit a089af3477dd01a831b89c06f982679c60e42975 +Author: Daniel Stone +Date: Tue Jul 10 02:03:22 2012 +0100 + + Loader: Move ExtensionModule types to DIX + + In preparation for gutting loadext.c, move the ExtensionModule struct to + the DIX, and unexport ExtensionModuleList (why, why, why, why was this + ever exported in the first place, tbqh). + + Signed-off-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 8171108602556446f12c1cfbc37c6abf3b0195eb +Author: Daniel Stone +Date: Tue Jul 10 02:03:21 2012 +0100 + + Loader: Remove extension initialisation sorting + + Extensions could previously declare initialisation dependencies on other + extensions, which would then get nicely sorted by the loader. We only + had one user for this, GLX, which had one pointless (Composite) and one + possibly useful dependency (DBE). As DBE is now a built-in, it will + always be sorted by GLX, so we no longer have any users for it. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit d52ab85c7ef5058dcbd8a75eb84058908dc22906 +Author: Daniel Stone +Date: Tue Jul 10 02:03:20 2012 +0100 + + GLX: Remove extension init dependencies + + GLX was the only user of extension init order dependencies, using them + to depend on Composite, which has always been built-in anyway, and DBE, + which is now built-in. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 2fba9445a0357f67641e41ac334b5529c37774a2 +Author: Daniel Stone +Date: Tue Jul 10 02:03:19 2012 +0100 + + Add static extensions before those in modules + + Make sure we add static extensions before anything in a module. This is + more or less a no-op at the moment, but will come in handy later when + extension dependency sorting is removed. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 9a953e0e9dcb8a8e43cc27ffaef460268fbe1916 +Author: Daniel Stone +Date: Tue Jul 10 02:03:18 2012 +0100 + + Move DRI2 from external module to built-in + + Instead of keeping a tiny amount of code in an external module, just man + up and build it into the core server. + + v2: Fix test/Makefile.am to only link libdri2.la if DRI2 is set + + Signed-off-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit b8a3267c36e2e335b888bd4f2ef2f2c477cdfdce +Author: Daniel Stone +Date: Tue Jul 10 02:03:17 2012 +0100 + + DRI2: Remove prototype for DRI2DestroyDrawable + + DRI2DestroyDrawable() was still being _X_EXPORTed, but hasn't existed + since 1da1f33f last year. + + Signed-off-by: Daniel Stone + Reviewed-by: Cyril Brulebois + Reviewed-by: Jamey Sharp + Reviewed-by: Ian Romanick + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 7025a909bfe4d1f5518ec6fc5f89e2c3fb6501fd +Author: Daniel Stone +Date: Tue Jul 10 02:03:16 2012 +0100 + + XFree86: DRI: Don't use per-target CFLAGS + + AM_CFLAGS will suffice, given we only have one target in this directory. + + Signed-off-by: Daniel Stone + Reviewed-by: Cyril Brulebois + Signed-off-by: Keith Packard + +commit 459c6da0f907ba33d733c7e62a116184ba2f14e5 +Author: Daniel Stone +Date: Tue Jul 10 02:03:15 2012 +0100 + + Move DRI1 from external module to built-in + + Rather than building the tiny amount of code required for XFree86-DRI as + an external module, build it in if it's enabled at configure time. + + v2: Fix test/Makefile.am to only link libdri.la if DRI is set + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + + fixup for DRI1 move + + Signed-off-by: Keith Packard + +commit b905d87ba0a9b045ea41bb1ad36a4f9f1170a1b8 +Author: Daniel Stone +Date: Tue Jul 10 02:03:14 2012 +0100 + + Xext: Only build one library + + Now that libXextmodule.la is both empty and unused, we can just build + the one libXext.la for everyone, rather than having Xorg be special and + unique. + + Signed-off-by: Daniel Stone + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit a7a2f9f66ddc27df96557093f3dd266e24eb653b +Author: Daniel Stone +Date: Tue Jul 10 02:03:13 2012 +0100 + + Remove the last remnants of extmod + + extmod was originally a big pointless module. Now it's an empty, + pointless module. This commit makes it unexist. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 6e74fdda42fb4bd80fd48e1ae6471bffbb837804 +Author: Daniel Stone +Date: Wed Jun 22 00:28:18 2011 +0100 + + Move XFree86-VidMode from extmod to built-in + + As with DGA, move VidMode from being part of extmod to a built-in part + of the server, if compiled as such. This is initialised from + xf86ExtensionInit rather than miinitext because it's wholly dependent on + the Xorg DDX. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 60f53e3012be795eee741ecd4be858552c5e86c8 +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:11 2012 +0100 + + DGA: Remove excessive module-induced indirection + + The DGA event base used to have to be passed through a function pointer, + as the code was cleaved in two with half in a module, and half in the + core server. Now that's not the case, just access DGAEventBase + directly. + + v2: Deal with Alan's event initialization cleanups + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 7a5880bc3b47e1f90a638f056ad4d40be6931977 +Author: Daniel Stone +Date: Tue Jul 10 02:03:10 2012 +0100 + + Move DGA from extmod to built-in + + Rather than leave DGA languishing in extmod, move it to be a built-in + extension. As it's quite specific to the Xorg DDX, just move it + sideways to the rest of the DGA code in hw/xfree86/common, and + initialise it from xf86ExtensionInit, rather than miinitext. + + Signed-off-by: Daniel Stone + Acked-by: Keith Packard + Signed-off-by: Keith Packard + +commit 6fb481d1251626456914d0012d6ca5a342bfdf71 +Author: Daniel Stone +Date: Tue Jul 10 02:03:09 2012 +0100 + + Move SELinux from extmod to built-in + + Instead of letting it languish in extmod just because we want to + configure bits of it from xf86, move XSELinux to the builtin part of + Xext, and do its configuration from xf86ExtensionInit. + + Signed-off-by: Daniel Stone + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 5d92ee4081a23a6b4d1f9ba2a98985f539f99312 +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:08 2012 +0100 + + Xv: Remove excessive module-induced indirection + + Xv used to call XvScreenInit and co. through function pointers, as + XvScreenInit may have been sitting on the other side of a module + boundary from xf86XvScreenInit. Why this was so is a mystery, but make + it not so any more. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Acked-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 2e6c5f959153cdcea4bcf719621ebec408250f54 +Author: Daniel Stone +Date: Tue Jul 10 02:03:07 2012 +0100 + + XFree86: sdksyms: Remove unused -DXorgLoader + + We no longer have anything in the tree that checks for XorgLoader. This + was a fairly monumental hack: xvdi.h used to hide all its functions + behind #ifndef XorgLoader, solely to avoid sdksyms.sh picking up its + symbols, as it was previously a module rather than built-in. + + This is no longer the case, so we can remove the define. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 7a11b817e770cd2196814f1ac6264c6d87b76c6a +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:06 2012 +0100 + + Move Xv and XvMC from extmod to built-in + + Always build these extensions into the core server, rather than letting + them languish in extmod. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 7d859bd87834dd79c7fa3792075496ece698c082 +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:05 2012 +0100 + + Move XRes from extmod to built-in + + Always build XRes support into the core server, rather than letting it + languish in extmod. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit ba21fc29587e4f11320b88a70433beb1fe22cdf3 +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:04 2012 +0100 + + Move DPMS from extmod to built-in + + Always build DPMS support into the core server, rather than letting it + languish in extmod. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 3ed2c6e11298c4299042cfe4578f6cc02e441d58 +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:03 2012 +0100 + + Move MIT-SCREEN-SAVER from extmod to built-in + + If we've built MIT-SCREEN-SAVER support, then just build it into the + main binary, rather than leaving it in extmod. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit b8c9ab0fea0be299d9f48ac0c4ed0474104a7556 +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:02 2012 +0100 + + Move RECORD from external module to built-in + + Rather than languishing in its own special module, move RECORD into the + core server. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit bf61bf69b2b4f9e9993ca771de100079c7696bea +Author: Tomas Carnecky +Date: Tue Jul 10 02:03:01 2012 +0100 + + Move DBE from an external module to built-in + + If DBE support is compiled in the server, just man up and build it into + the server, rather than having it as an external module. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Jamey Sharp + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit d785368e0e171080fea5447c87e81c93f515ff21 +Author: Daniel Stone +Date: Tue Jul 10 02:03:00 2012 +0100 + + miinitext: Use ARRAY_SIZE rather than sentinel + + NULL sentinels are totally lame. + + v2: numExtensionModules isn't public, so keep using the provided + sentinal - Keith Packard + + Signed-off-by: Daniel Stone + Reviewed-by: Stéphane Marchesin + Signed-off-by: Keith Packard + +commit f48d8f58b39af0036365368d6ac35319d6d856d5 +Author: Daniel Stone +Date: Tue Jul 10 02:02:59 2012 +0100 + + extmod: Use ARRAY_SIZE rather than sentinel + + When the array gets down to size zero (which it does in later patches), + gcc complains that the index is out of bounds. Avoid this by using + ARRAY_SIZE on extensionModules instead. + + Signed-off-by: Daniel Stone + Reviewed-by: Stéphane Marchesin + Signed-off-by: Keith Packard + +commit d35884da2f5a250ff6dd5131dc23ac629eccdd0c +Author: Daniel Stone +Date: Tue Jul 10 02:02:58 2012 +0100 + + Add xf86ExtensionInit for DDX extension configuration + + xf86ExtensionInit is called after configuration file parsing, so it can + perform the two parts of extension initialisation currently done by + extmod: enabling and disabling of extensions through an 'omit' option, + and SELinux configuration. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 4170e4e1f8e879394c896c490d9f08a38ecfdefd +Author: Daniel Stone +Date: Tue Jul 10 02:02:57 2012 +0100 + + Loader: Drop EXTERN_MODULE flag + + EXTERN_MODULE was used to specify that we shouldn't worry about modules + lacking a ModuleData object. It was also completely unused. *shrug* + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit a1d41e311c21eb6627caa0d168e070ceaf90806f +Author: Daniel Stone +Date: Tue Jul 10 02:02:56 2012 +0100 + + Move extension initialisation prototypes into extinit.h + + Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to + hold all our extension initialisation prototypes, rather than + duplicating them everywhere. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit b86aa74cafddf9bca5addfeb458a23f46ddcf132 +Author: Daniel Stone +Date: Tue Jul 10 02:02:55 2012 +0100 + + GLX: Insert swrast provider from GlxExtensionInit + + Rather than making poor old miinitext.c do it, including making DMX + have fake symbols just to keep it happy. + + Signed-off-by: Daniel Stone + Reviewed-by: Stéphane Marchesin + Signed-off-by: Keith Packard + +commit 13552a5c4701097a1507a99ed8366ab1438844b6 +Author: Daniel Stone +Date: Tue Jul 10 02:02:54 2012 +0100 + + Reorder extension initialisation for non-Xorg + + Reorder static extension initialisation in miinitext for non-Xorg + servers to match Xorg's order. + + Tested with Xephyr; checked that the extension list was identical before + and after. + + Signed-off-by: Daniel Stone + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 5079db78aea8fa42e781dd876c1ee1c31571b3ae +Author: Tomas Carnecky +Date: Tue Jul 10 02:02:53 2012 +0100 + + Replace INITARGS with void + + INITARGS was a hardcoded define to void. Since knowing the function + signature for your extensions is kinda useful, just replace it with a + hardcoded void, but leave the define there for API compatibility. + + Signed-off-by: Tomas Carnecky + Reviewed-by: Daniel Stone + Reviewed-by: Cyril Brulebois + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit bddb8c6cbe52ba9923b1d36d01f5ac9391b0ec0e +Author: Daniel Stone +Date: Tue Jul 10 02:02:52 2012 +0100 + + Xinerama: Fix ExtensionInit prototype + + Huh, so I guess INITARGS used to be int argc, char *argv then. Either + way, it's now void, so fix that ... + + Signed-off-by: Daniel Stone + Reviewed-by: Cyril Brulebois + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit eb9661fef9f59587f898371f97a0952ac14d125f +Author: Daniel Stone +Date: Tue Jul 10 02:02:51 2012 +0100 + + Make extension.h self-contained, remove C++ externs + + externsion.h required bits from Xfuncproto.h and dixstruct.h, but + included neither; fix that. + + It also had _XFUNCPROTOBEGIN and _XFUNCPROTOEND wrappers, which is a bit + pointless for a server-only library, as it's only needed for C++. + + Signed-off-by: Daniel Stone + Reviewed-by: Cyril Brulebois + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 854c1fa4a1e90288d1e2f3777fac3e1a9acb1235 +Author: Daniel Stone +Date: Tue Jul 10 02:02:50 2012 +0100 + + Add a common ARRAY_SIZE macro to dix.h + + Does what it says on the box, replacing those from Xi/ and glx/. + + Signed-off-by: Daniel Stone + Reviewed-by: Cyril Brulebois + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 67953d6975ef2ee573b95e7641aaf3d72e9f8379 +Author: Daniel Stone +Date: Tue Jul 10 02:02:49 2012 +0100 + + Xorg: Link XKB DDX library after core server libs + + libxorgxkb.a contains a number of libraries which are used by XKB action + code to call back into the DDX, e.g. for VT switching, termination, grab + breaking, et al. Make sure libxkb.a comes first in the link order, so + it can mark XkbDDX* as used in order for the linker to not discard them. + + Signed-off-by: Daniel Stone + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 656af2c7e73d948338683675e14cd827b46a97c4 +Author: Daniel Stone +Date: Tue Jul 10 02:02:46 2012 +0100 + + Don't make failure to -nolisten fatal + + If failing to disable a protocol specified by -nolisten failed, we'd + throw a FatalError and bomb startup entirely. From poking at xtrans, it + looks like the only way we can get a failure here is because we've + specified a protocol name which doesn't exist, which probably doesn't + constitute a security risk. + + And it makes it possible to start gdm even though you've built with + --disable-tcp-transport. + + Signed-off-by: Daniel Stone + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit dc0c2dd92d5eb314582ea10830678753824375d9 +Author: Daniel Stone +Date: Tue Jul 10 02:02:45 2012 +0100 + + Xext: Add hashtable.h to sources to fix distcheck + + Signed-off-by: Daniel Stone + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit ad4092cf7d59a89b1b2922440eef65be5c0c5ebd +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:44 2012 -0700 + + Replace padlength tables with inline functions from misc.h + + Adds new function padding_for_int32() and uses existing pad_to_int32() + depending on required results. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Reviewed-by: Peter Hutterer + Tested-by: Daniel Stone + +commit 2b1c1300cc23912ee1c59f8dde938dd4d7287f4a +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:44 2012 -0700 + + ephyrGLXQueryServerString: Stop making an unused copy of server_string + + ephyrGLXQueryServerString() carefully allocated a buffer padded to the + word-aligned string length for sending to the client, copied the string + to it, and then forgot to use it, potentially reading a few bytes of + garbage past the end of the server_string buffer. + + Since WriteToClient already handles the necessary padding, just send + it the actual length of the original server_string, and don't bother + making a padded copy. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 7a29f6878284e2d65e69fcd157aa9ec01d21b3c0 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:44 2012 -0700 + + Initialize padding bits to 0 in ErrorConnMax() + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit bed610fcae41ddfe21fa9acde599b17d1d15f5d1 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:44 2012 -0700 + + Set padding bytes to 0 in WriteToClient + + Clear them out when needed instead of leaving whatever values were + present in previously sent messages. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 1622dd8ab24d2fe7b9908110eb237774d4e03568 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:44 2012 -0700 + + Use C99 designated initializers in dix registry + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 9805cedf7b0f76d3b75f94e956c4cc2dcf0d8b64 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:44 2012 -0700 + + Use C99 designated initializers in extension Events + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 0af79b124e1317c36d1613d28755c5a8ce612e2a +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:44 2012 -0700 + + Use C99 designated initializers in dix Events + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 483266a583b0fd8a552303f318a71502ce3ff1d2 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in xf86 extension Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 14501fd33ee89acf9fc1d908003ed62f383d8bae +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in Xephyr Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit e4e827ec36fd20b7aea608db09790f76fb87e519 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in dmx Replies + + v2: fix in __glXGetVisualConfigs to not re-declare local 'reply' variable + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + + Fixup for Use C99 designated initializeres in dmx Replies + + Signed-off-by: Keith Packard + +commit bd6f948c41865c2c9d3fba1000bf5f7458d3afc1 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in randr Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit a406bd07593edb69285cf2fd91a6af4a5d956817 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in xkb Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 26efa09d0c7ee2f6a18547205c84be75376e688b +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in glx Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit cc5f09c86f7bea23b7546c3491b2c52ce8100a71 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in various extension Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 2f5caeaddb3616dc9ff57d784f7feba589c536e7 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in Xinput Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 6a721e3af5e11bae1d59ca551a02470f35d9e844 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in Xext Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit d792ac125a0462a04a930af543cbc732f8cdab7d +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in dix Replies + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 69fa5630b5902aaad267fc67d0da4ca93625886a +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:43 2012 -0700 + + Use C99 designated initializers in SendErrorToClient + + Let the compiler worry about 0-filling the rest of the fields, + instead of memsetting the whole struct and then going back to + overwrite some of the fields. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit cdf5bcd420e5bcf4a4a24a275d3133a4e16ce41e +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + Use calloc to zero fill buffers being allocated for replies & events + + Ensures padding bytes are zero-filled + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit ef0f701c9245b0373eb0c7a84dd804af4738bb29 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + xf86dga2.c & xf86vmode.c: Move REQUEST_SIZE_MATCH checks before using stuff + + Seems silly waiting to check if the client failed to send us enough bytes + until after we've already tried using them. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 2e739a8870d91fbac7f536ffa8f6d2cee0f66cec +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + ProcRRListOutputProperties: skip atom walk if the list is empty + + pAtoms is only allocated if numProps was non-zero, so move the walk + through the property list to copy atoms to it inside the if (numProps) + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 15bc13c8d088e05f14c7262348e0066929c29251 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + ProcRRGetScreenInfo: swap configTimestamp as well + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 3a013b8816bc0bb765c99e8a2bf2ea536dc62c3b +Author: Jaroslav Šmíd +Date: Mon Jul 9 19:12:42 2012 -0700 + + Bug 51375: Xorg doesn't set status for RRGetOutputInfo + + https://bugs.freedesktop.org/show_bug.cgi?id=51375 + https://bugs.freedesktop.org/attachment.cgi?id=63397 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 5b86c072d1d586ce040d8831a05cf97ff8b17821 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + Use temporary variables instead of parts of reply structures + + When passing variable pointers to functions or otherwise doing long + sequences to compute values for replies, create & use some new + temporary variables, to allow for simpler initialization of reply + structures in the following patches. + + Move memsets & other initializations to group with the rest of the + filling in of the reply structure, now that they're not needed so + early in the code path. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit c2fb1a7b2ab58d70b38ee03ab2fdeb4e7183a356 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + ProcQueryKeymap: rework logic around permission to copy key states + + Always initialize to zero, and then if permission is granted, copy + the current key state maps, instead of always copying and then + zeroing out if permission was denied. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit dccb0858d71341e1258800b37d1bb78c0115838d +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + Core events: invert check for permission to copy key states + + Always initialize to zero, and then if permission is granted, copy + the current key state maps. Use memcpy instead of memmove for the + copy, since we're always copying to a newly allocated event on the + stack, so guaranteed not to overlap with the device map structure. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit db69212df8a0bf09140368356d2d430c54afe346 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + Rework reply initialization in ProcGetProperty & NullPropertyReply + + Don't need to pass an empty reply to NullPropertyReply, let it make + it's own. Move reply initialization code in remaining replies in + ProcGetProperty to group with the rest of the fields. (Prepares + for coming C99 designated initializer conversion.) + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 6be74a9080e30fc502421cd438cd0c73fb8eb0b0 +Author: Alan Coopersmith +Date: Mon Jul 9 19:12:42 2012 -0700 + + Fix more poorly indented/wrapped comments & code + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 789d64e19a3b3d98b88bc80f677e0c37bfb5c631 +Author: Alan Coopersmith +Date: Sun May 13 00:03:35 2012 -0700 + + Remove unneccesary casts from WriteToClient calls + + Casting return to (void) was used to tell lint that you intended + to ignore the return value, so it didn't warn you about it. + + Casting the third argument to (char *) was used as the most generic + pointer type in the days before compilers supported C89 (void *) + (except for a couple places it's used for byte-sized pointer math). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + Tested-by: Daniel Stone + +commit 023127915e6922bc53e4c768de760d8a4f25c07c +Author: Keith Packard +Date: Mon Jul 9 16:34:39 2012 -0700 + + Reliably reset signals at server init time + + Each DDX currently calls OsReleaseSIGIO in case it was suspended when + the server regen started. This causes a BUG to occur if SIGIO was + *not* blocked at that time. Instead of relying on each DDX, make the + OS layer reliably reset all signal state at server init time, ensuring + that signals are suitably unblocked and that the various signal state + counting variables are set back to zero. + + Signed-off-by: Keith Packard + +commit d6756e0298e660a0aca58d75bcf79471ce07a634 +Author: Keith Packard +Date: Mon Jul 9 16:33:11 2012 -0700 + + xfree86: In InitOutput, only call OsReleaseSIGIO if OsBlockSIGIO was called + + Otherwise, OsReleaseSIGIO will complain, or perhaps something worse + will happen (if SIGIO actually needs to be blocked here). + + Signed-off-by: Keith Packard + +commit ea8b04507e5464e4817791db516a20cfed2a6724 +Author: Keith Packard +Date: Mon Jul 9 16:30:24 2012 -0700 + + privates: Resize GPU screen-specific privates too + + When allocating new global privates, make sure the gpu + screens get their private offsets updated. + + This only affects GPU screens that enumerate before the non-GPU + screens, which generally requires that the related device be present + when the system boots so that it can get an earlier DRM filename. + + Signed-off-by: Keith Packard + +commit d1c639c006526b8cab14dac582508f3f54848967 +Author: Keith Packard +Date: Mon Jul 9 16:29:04 2012 -0700 + + Add 'install-headers' target in the top-level Makefile + + This target recursively locates directories with sdk headers and + installs them all. Useful when you want to build a complete new X + server and drivers without having to install the X server before the + drivers are actually working. + + Signed-off-by: Keith Packard + +commit 329db3292223cccd4887062956622285c45a1523 +Author: Dave Airlie +Date: Sat Jul 7 10:10:08 2012 +0100 + + dri2/prime: allocate prime id at screen allocation time + + Add a static mask of prime id and allocate them at screen time, + if the driver supports the prime interfaces and is a gpu screen. + + This is instead of them changing due to user controlled randr commands, + as suggested by Keith. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 30298012162de7f76e8a4c7b0362e98703f80011 +Author: Dave Airlie +Date: Tue Jun 26 10:20:52 2012 +0100 + + dri2: add initial prime support. (v1.2) + + This adds the initial prime support for dri2 offload. The main thing is + when we get a connection from a prime client, we stored the information + and mark all drawables from that client as prime. We then create all + buffers for that drawable on the prime device dri2screen. + + Then DRI2UpdatePrime is provided which drivers can call to get a shared + pixmap which they can use as the front buffer. The driver is then + responsible for doing the back->front copy to the shared buffer. + + prime requires a compositing manager be run, but it handles the case where + a window get un-redirected by allocating a new pixmap and pointing the crtc + at it while the client is in that state. + + Currently prime can't handle pageflipping, so always does straight copy swap, + + v1.1: renumber on top of master. + v1.2: fix auth on top of master. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 234022cfb3ad2a1b16ab7981ce69f9cd5ba0fbeb +Author: Dave Airlie +Date: Sat Jul 7 10:20:58 2012 +0100 + + configure: bump dri2proto to 2.8 + + This is required for the prime macros. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit c41922940adbc8891575b3321fadf01ff4cb5854 +Author: Dave Airlie +Date: Tue Jun 26 10:00:21 2012 +0100 + + dix/randr: add a hook into screen to replace scanout pixmap + + For DRI2 in some offload cases we need to set a new pixmap on the crtc, + this hook allows dri2 to call into randr to do the necessary work to set + a pixmap as the scanout pixmap for the crtc the drawable is currently on. + + This is really only to be used for unredirected full screen apps in composited + environments. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit e2fd447e76c4a1233374c9d8fa9cae54a55dad50 +Author: Dave Airlie +Date: Thu Jul 5 15:50:56 2012 +0100 + + xf86: add callback for offloak sink setting support. + + This adds support for setting the offload sink to the xf86 ddx. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 22f02120eb4092e1c283f81c8040f178693ff0a4 +Author: Dave Airlie +Date: Tue Jun 26 09:53:54 2012 +0100 + + xf86: store scanout pixmap in the xf86 struct as well. + + This is so we can tell the scanout pixmap has changed between calls + to the crtc set function. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 426bc0a28edbe0e9153f692a02dd25f744ffa034 +Author: Dave Airlie +Date: Thu Jul 5 15:41:38 2012 +0100 + + randr: add hooks for offload sink provider protocol + + This adds the protocol handler and associated providers handling + for the offload slaves, it allows two providers to be connected as + offload sink/source. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 12905dfaf01088a00f4a0a78cffba03329e7b724 +Author: Dave Airlie +Date: Sat May 26 13:11:01 2012 +0100 + + dix/xf86: initial offload slave tracking (v1.1) + + add the linked list and provider hooks. + + v1.1: add another assert in the add path. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit a7c01da54ab43f9d29333ccbd79dfc001f9dc5e3 +Author: Dave Airlie +Date: Thu Jul 5 20:34:54 2012 +0100 + + xf86: make sure rotate calcs are done on the right screen boundaries + + This fixes a segfault where this code believes we are outside the screen + boundaries on a slave device, but we aren't. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit cc02f4ef3e407be794132d004c947c9a4e14f4c2 +Author: Dave Airlie +Date: Tue Jun 19 16:01:16 2012 +0100 + + xf86/cursor: fallback to sw cursor if we have slaves present. + + Current USB devices have no hw rendered cursors, so we need the + master GPU to render the cursor, so whenever we plug in a + slave device, fallback to sw rendered cursors. + + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 98686512cbe1affb75222a63136854af79f1411b +Author: Dave Airlie +Date: Thu Jul 5 15:50:24 2012 +0100 + + xf86: add output source setting callback (v2) + + This adds support for the randr callback for setting the output source + for a device. + + v2: drop root clip change on detach + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 4c92eb00f97f7b8258de8e366226880382cc9ce9 +Author: Dave Airlie +Date: Thu Jul 5 15:41:22 2012 +0100 + + randr: add output source setup + + This adds the output sources to the associated list and adds the protocol + handler for the randr SetProviderOutputSource. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit bec4cb72c55bb6dee09c65c0844af201067a090f +Author: Dave Airlie +Date: Thu May 24 15:47:22 2012 +0100 + + randr: hook up output slave to screen resources return + + When the client asks for the screen resources list, it will now + get a list of crtc/outputs for the master + all attached slaves, + this will let randr configure all attached slave devices properly. + + Keith asked I merge the two functions, but not just yet, the current + multi screen code doesn't handle primary yet properly, will fix it up later. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 88bc02bfaae2c15a30c606d34cf7940e6ad5ea14 +Author: Dave Airlie +Date: Mon Jun 18 14:11:24 2012 +0100 + + xf86/crtc: add new interface to detach slave crtcs + + This will detach any scanout pixmaps attached to slave crtcs. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 9b8217f9ef6279fff6628631d18497bed0343ef9 +Author: Dave Airlie +Date: Thu Jun 14 15:24:46 2012 +0100 + + dix/pixmap: track dirty pixmaps in server. (v4) + + This adds two functions for drivers to use directly to keep a + linked list of slave pixmaps to do damage tracking on and keep + updated. It also adds a helper function that drivers may optionally + call to do a simple copy area damage update. + + v2: use damage.h not damagestr.h, fixes ephyr build. + + v3: address ajax review: use slave_dst, drop unused dst member. + + v4: check DamageCreate return, add SourceValidate comment, + add a comment addressing possible optimisation possibility + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit c5cc2a8243c5e6bf454af989b7512ec7e20fc3f2 +Author: Dave Airlie +Date: Tue May 29 14:41:39 2012 +0100 + + randr: check the screen size bounds against the master + + The master contains the complete screen size bounds, so check + the width/height against it. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 26d848cb916c8a85f2c69d2aeb004665ba07bf00 +Author: Dave Airlie +Date: Tue May 29 14:35:24 2012 +0100 + + randr: fix tellchanged to work with slave scanouts + + Tell changed need to tell only for the master pixmap, + however it gets called from various places for slave screens, + so convert to telling clients about changes on the master screen. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 4bf0192d810e01c89a1903cc4bc5e639fc13a547 +Author: Dave Airlie +Date: Tue May 29 14:37:11 2012 +0100 + + randr: fixup constrain to work with slave screens. + + Current code constrains the cursor to the crtcs on the master + device, for slave outputs to work we have to include their crtcs + in the constrain calculations. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 2ed3f64d9d453628ab5c03b8aee006093019c933 +Author: Dave Airlie +Date: Wed Jun 20 12:37:26 2012 +0100 + + xf86: add initial scanout pixmap support (v2) + + Add the simple passthrough interface for drivers to use, + so they can set scanout pixmaps. + + v2: detach scanout pixmap properly. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit f2da2c12042d3447b1c954e7301632d174a08b4f +Author: Dave Airlie +Date: Wed Jun 20 12:37:12 2012 +0100 + + randr: add initial scanout pixmap support (v3) + + When randr notices a crtc configuration request for a slave device, + it checks if the slave allocated pixmap exists and is suitable, + if not it allocates a new shared pixmap from the master, shares + it to the slave, and starts the master tracking damage to it, + to keep it updated from the current front pixmap. + + If the resize means the crtc is no longer used it will destroy + the slave pixmap. + + This adds the concept of a scanout_pixmap to the randr_crtc object, + and also adds a master pixmap pointer to the pixmap object, along + with defining some pixmap helper functions for getting pixmap box/regions. + + v2: split out pixmap sharing to a separate function. + + v3: update for void * + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 0b0e7148925e1f835d4f4f06e402a97023531828 +Author: Dave Airlie +Date: Thu May 24 16:03:31 2012 +0100 + + exa: pixmap sharing infrastructure (v3) + + This just adds exa interfaces for mixed exa so drivers can + share and set shared pixmaps up correctly. + + v2: update for passing slave screen. + v3: update for void * + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit fd6c1bf0a3efced3ad4623dbd4716230a5f2419e +Author: Dave Airlie +Date: Thu May 24 16:03:19 2012 +0100 + + dix: pixmap sharing infrastructure (v3) + + This is a hooks for pixmap sharing and tracking. + + The pixmap sharing ones get an integer handle for the pixmap + and use a handle to be the backing for a pixmap. + + The tracker interface is to be used when a GPU needs to + track pixmaps to be updated for another GPU. + + v2: pass slave to sharing so it can use it to work out driver. + + v3: use void * as per keithp's suggestion. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 382dd45bb88fa92764bf0ecd655cb9890eb84960 +Author: Dave Airlie +Date: Thu May 24 15:39:05 2012 +0100 + + dix: add ability to link output slave gpus to the current gpu (v1.1) + + Just add the interfaces to attach/detach output slaves, and + a linked list to keep track of them. Hook up the randr providers + list to include these slaves. + + v1.1: add another assert to the add path. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 05d2472cd242293a5fa205efff5734a3380072b4 +Author: Dave Airlie +Date: Thu Jun 14 15:03:02 2012 +0100 + + xf86dga: handle DGAAvailable for gpu screens. (v2) + + v2: Split out DGAAvailable into two interfaces, one for calls from protocol + decoding and one for internal usage, after discussion with ajax and keithp. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 3cbc4c10b52896324fe14d2ab56bd54577c9294c +Author: Dave Airlie +Date: Wed Jun 13 14:35:49 2012 +0100 + + randr: expose unattached providers to the clients. + + This provides the unattached provider list to the clients. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit d0e138c3f3e58ef127dad6c6aef48b1713b5ce58 +Author: Dave Airlie +Date: Wed Jun 13 14:32:05 2012 +0100 + + dix: attach unbound screens to protocol screen 0 (v2) + + This is the default attachment, unbound gpu screens get + attached to the 0 protocol screen. + + detach on hotunplug. + + v2: detach after tearing down crtc/outputs. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 4caad34c932115dc0a9fd9c2995ebb2d38b9359c +Author: Dave Airlie +Date: Wed Jun 13 14:27:42 2012 +0100 + + dix: add unattached list for attaching screens to initially. (v1.1) + + This list is meant for attaching unbound gpu screens to initially, + before the client side rebinds them. + + v1.1: add another assert in the add path. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 9b5cf2ed76b00937af12304e0e8dbd60df62067e +Author: Dave Airlie +Date: Wed Jun 13 14:17:06 2012 +0100 + + xfree86: add framework for provider support in ddx. (v4) + + This adds the framework for DDX provider support. + + v2: as per keithp's suggestion remove the xf86 provider object + and just store it in the toplevel object. + + v3: update for new protocol + + v4: drop devPrivate, free name + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5 +Author: Dave Airlie +Date: Wed Jun 13 14:03:04 2012 +0100 + + randr: add provider object and provider property support (v6) + + This adds the initial provider object and provider property + support to the randr dix code. + + v2: destroy provider in screen close + v2.1: fix whitespace + + v3: update for latest rev of protocol + renumber after 1.4 tearout. + + v4: fix logic issue, thanks Samsagax on irc + + v5: keithp's review: fix current_role, fix copyrights, fix master + reporting crtc/outputs. + + v6: port to new randr interface, drop all set role bits for now + + v7: drop devPrivate in provider, not needed, add BadMatch returns + for NULL SetProviderOffloadSink and SetProviderOutputSource, drop + the old typedef. + + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 44eae69f1df2d00e0c9f1ea8d3c4fae06bcacfbc +Author: Dave Airlie +Date: Thu Jul 5 21:11:16 2012 +0100 + + configure: bump randrproto min requirements to 1.4.0 + + Needed to build latest randr stuff. + + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 4d24192bd24fb20d16d0054d77bffda883faeb79 +Merge: 7c9d8cb 74b786f +Author: Keith Packard +Date: Fri Jul 6 12:17:17 2012 -0700 + + Merge remote-tracking branch 'airlied/for-keithp-stage1' + +commit 7c9d8cbd368cac53e7aed9308292614337db3be2 +Author: Torsten Kaiser +Date: Fri Jul 6 12:10:25 2012 -0700 + + xfree86: EDID Est III parsing skips some modes + + This loop needs to count from 7 to 0, not only from 7 to 1. + The current code always skips the modes {1152, 864, 75, 0}, {1280, 1024, 85, 0}, + {1400, 1050, 75, 0}, {1600, 1200, 70, 0} and {1920, 1200, 60, 0}. + + Signed-off-by: Torsten Kaiser + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 0b3abacb6430e6593c4358420ba457d8149bd32b +Author: Torsten Kaiser +Date: Fri Jul 6 12:06:13 2012 -0700 + + xfree86: EDID Est III parsing can walk off end of array + + Using -O3 gcc notes that m could reach beyound the end of the EstIIIModes array, + if the last bits of the 11s byte where set. + Fix this, by extending the array to cover all possible bits from est. + + https://bugs.freedesktop.org/show_bug.cgi?id=45623 + + Signed-off-by: Torsten Kaiser + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 74b786f7cee5723468bba251a2155a65770b2ad4 +Author: Dave Airlie +Date: Tue Jun 5 17:45:03 2012 +0100 + + xfree86: add autoAddGPU option (v2) + + This option is to stop the X server adding non-primary devices as + gpu screens. + + v2: fix per Keith's suggestion. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit ef6686480ad1de6582b9ef5d13e5d4ffb3b3918c +Author: Dave Airlie +Date: Tue Jun 5 17:30:39 2012 +0100 + + xfree86: add platform bus hotplug support (v3) + + This provides add/remove support for platform devices at xfree86 ddx level. + + v2: cleanup properly if no driver found. + + v3: load the modesetting driver before checking driver list. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit b27cf30995e05da11e827ec41060051673336a7b +Author: Dave Airlie +Date: Tue Jun 5 17:29:56 2012 +0100 + + xserver/config: add udev/drm hotplug callbacks. (v2) + + This adds callbacks into the ddx for udev gpu hotplug. + + v2: fix some strncmp returns. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 53b66c084fbf5bf47f8121632fabdc39b9fe8337 +Author: Dave Airlie +Date: Tue Jun 5 17:18:10 2012 +0100 + + xfree86: add DDX gpu screen support. (v3) + + This just adds the structures and interfaces required for adding/deleteing + gpu screens at the DDX level. The platform probe can pass a new flag + to the driver, so they can call xf86AllocateScreen and pass back the new + gpu screen flag. + + It also calls the gpu screens preinit and screeninit routines at + startup. + + v2: fix delete screen use after free. + + v3: split out pScrn into separate patch + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 726d467b534a30d8cbaafb858339c638c9f83195 +Author: Dave Airlie +Date: Mon Jun 25 11:51:26 2012 +0100 + + xf86: cleanup helper code to use a pointer. (v1.1) + + This is in preparation for gpu screens in here, just use + a pScrn pointer to point at the new screen. + + suggested by Keith. + v1.1: fix spacing as suggested by Aaron. + + Reviewed-by: Keith Packard + Reviewed-by: Aaron Plattner + Signed-off-by: Dave Airlie + +commit 9d179818293b466ec6f1777f0b792e1fbbeb318c +Author: Dave Airlie +Date: Tue Jun 5 17:09:38 2012 +0100 + + dix: introduce gpu screens. (v5) + + This patch introduces gpu screens into screenInfo. It adds interfaces + for adding and removing gpu screens, along with adding private fixup, + block handler support, and scratch pixmap init. + + GPU screens have a myNum that is offset by GPU_SCREEN_OFFSET (256), + this is used for logging etc. + + RemoveGPUScreen isn't used until "xfree86: add platform bus hotplug support". + + v2: no glyph pictures for GPU screens for now. + v3: introduce MAXGPUSCREENS, fix return value check + v4: fixup myNum when renumbering screens (ajax) + v5: drop cursor privates for now. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 3478af3374abffa0c226ee077fda1fcfc0751e74 +Author: Dave Airlie +Date: Tue Jun 5 17:01:21 2012 +0100 + + screen: split out screen init code. (v2) + + This is a precursor for reusing this code to init gpu screens. + + v2: fixup int check as per Keith's review. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit cf66471353ac5899383b573a3cfca407e90d501e +Author: Dave Airlie +Date: Tue May 8 14:26:47 2012 +0100 + + xfree86: use udev to provide device enumeration for kms devices (v10) + + On Linux in order for future hotplug work, we are required to interface + to udev to detect device creation/removal. In order to try and get + some earlier testing on this, this patch adds the ability to use + udev for device enumeration on Linux. + + At startup the list of drm/kms devices is probed and this info is + used to load drivers. + + A new driver probing method is introduced that passes the udev + device info to the driver for probing. + + The probing integrates with the pci probing code and will fallback + to the pci probe and old school probe functions in turn. + + The flags parameter to the probe function will be used later + to provide hotplug and gpu screen flags for the driver to behave + in a different way. + + This patch changes the driver ABI, all drivers should at least + be set with a NULL udev probe function after this commit. + + v2: rename to platform bus, now with 100% less udev specific, + + this version passes config_odev_attribs around which are an array + of id/string pairs, then the udev code can attach the set of attribs + it understands, the OS specific code can attach its attrib, and then + the core/drivers can lookup the required attribs. + + also add MATCH_PCI_DEVICES macro. + + This version is mainly to address concerns raised by ajax. + + v3: Address comments from Peter. + fix whitespace that snuck in. + rework to use a linked list with some core functions that + xf86 wraps. + + v4: add free list, fix struct whitespace. + ajax this address most of your issues? + + v5: drop probe ifdef, fix logic issue + + v6: some overhaul after more testing. + + Implement primaryBus for platform devices. + document hotplug.h dev attribs - drop sysname attrib + fix build with udev kms disabled + make probing work like the PCI probe code, + match against bus id if one exists, or primary device. + + RFC: add new bus id support "PLAT:syspath". we probably + want to match on this a bit different, or use a different + property maybe. I was mainly wanting this for use with + specifying usb devices in xorg.conf directly, but PLAT:path + could also work I suppose. + + v6.1: add missing noop platform function + + v7: fix two interactions with pci probing and slot claiming, prevents + pci and platform trying to load two drivers for same slot. + + v8: test with zaphod mode on -ati driver, fixup resulting issue + clean up common probe code into another function, change busid + matching to allow dropping end of strings. + + v9: fix platform probing logic so it actually works. + v9.1: fix pdev init to NULL properly. + + v10: address most of Keith's concerns. + + v4 was thanks to Reviewed-by: Adam Jackson + v5 was Reviewed-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 2c52d776a42a28bb3e1463edf0cfe0672d0c08a9 +Author: Dave Airlie +Date: Tue Jun 19 16:01:08 2012 +0100 + + xf86: cursor code got mangled by indenting + + This fixes some really ugly code that got mangled by the indenting. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 9e4b8b74b008dd72d1da7074bd7ecae677cefd20 +Author: Keith Packard +Date: Thu Jul 5 11:31:55 2012 -0700 + + privates: Allow device privates to be allocated after server start + + This will permit midispcur to allocate its privates for hotplug outputs + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 493ad833233707b0a42e5fbdd957a24fc6e52917 +Author: Keith Packard +Date: Thu Jul 5 11:31:29 2012 -0700 + + dix: Allocate device privates separate from devices + + This will allow device privates to be resized. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit f38b2b628322f4d763b0c7f8387d5ab0472a7d2b +Author: Keith Packard +Date: Thu Jul 5 11:15:18 2012 -0700 + + mi: Don't save midispcur rendering resources for each cursor + + Instead, only save them for the most recently drawn cursor. This saves + a bunch of storage for idle cursors. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 7651176b0093cf3a4cff2277f6918a7d0451af41 +Author: Keith Packard +Date: Tue Jul 3 16:12:59 2012 -0700 + + Use screen-specific privates for exa pixmap and gc privates + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 7ca32f1c282cb6d4d7255f118a1e2e6f54e6b3fa +Author: Keith Packard +Date: Tue Jul 3 16:05:42 2012 -0700 + + Use new screen-specific privates for fb window and gc privates + + This ensures that only screens using fb will have this space allocated. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 +Author: Keith Packard +Date: Tue Jul 3 15:45:09 2012 -0700 + + Add screen-specific privates. + + Screen-specific privates areas are only allocated for objects related + to the target screen; objects allocated for other screens will not + have the private space reserved. This saves memory in these objects + while also allowing hot-plug screens to have additional private + allocation space beyond what the core screens are using. + + Drivers are encouraged to switch to this mechanism as it will reduce + memory usage in multi-GPU environments, but it is only required for + drivers which will be loaded after the server starts, like + modesetting. + + Objects providing screen-specific privates *must* be managed by the + screen-specific private API when allocating or initializing privates + so that the per-screen area can be initialized properly. + + The objects which support screen-specific privates are: + + Windows + Pixmaps + GCs + Pictures + + Extending this list to include Colormaps would be possible, but + require slightly more work as the default colormap is created before + all colormap privates are allocated during server startup, and hence + gets a bunch of special treatment. + + Of particular note, glyphs are *not* capable of supporting + screen-specific privates as they are global objects, not allocated on + a screen-specific basis, and so each driver must be able to see their + privates within the glyph. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + +commit ed6daa15a7dcf8dba930f67401f4c1c8ca2e6fac +Author: Ian Romanick +Date: Wed Jul 4 15:21:09 2012 -0700 + + glx/dri2: Enable GLX_ARB_create_context_robustness + + If the driver supports __DRI2_ROBUSTNESS, then enable + GLX_ARB_create_cotnext_robustness as well. If robustness values are + passed to glXCreateContextAttribsARB and the driver doesn't support + __DRI2_ROBUSTNESS, existing drivers will already generate the correct + error values (so that the correct GLX errors are generated). + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 90aa2486e394c0344aceb2a70432761665a79333 +Author: Ian Romanick +Date: Wed Jul 4 15:21:08 2012 -0700 + + glx: Allow attributes and flags from GLX_ARB_create_context_robustness + + The assumtion is that if the underlying provider (e.g., glxdri2.c) doesn't + support this extension, it will generate BadMatch for these flags and + attributes. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit aef0b4593e165634ca7fa0745882dad12a54ebed +Author: Ian Romanick +Date: Wed Jul 4 15:21:07 2012 -0700 + + glx: Track the reset notification strategy for a context + + Also require that the reset notification for a new context and the other + context in the share group match. There isn't yet any way to specify a + non-default reset notification strategy, but that will come. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit f8198285cfc4704bc4d56922e5a2e99030a83778 +Author: Ian Romanick +Date: Wed Jul 4 15:21:06 2012 -0700 + + glx: Add extension string tracking for GLX_ARB_create_context_robustness + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 4ffbc984eac8a15925094614021de30dc8084e65 +Author: Ian Romanick +Date: Wed Jul 4 15:21:05 2012 -0700 + + glx: Reject creations of indirect contexts with unsupportable versions. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 41d5120eaf2bdf308eb904cac9b5027b003fea8d +Author: Ian Romanick +Date: Wed Jul 4 15:21:04 2012 -0700 + + glx: Implement GLX_EXT_create_context_es2_profile + + This patch builds on the infrastucture put in place for + GLX_ARB_create_context_profile. If GLX_CONTEXT_ES2_PROFILE_BIT_EXT is + specified and the requested version is 2.0, create a context with the + __DRI_API_GLES2 API. + + This change assumes that any DRI2 driver can handle (possibly by saying "no + seeing an API setting other than __DRI_API_OPENGL or __DRI_API_OPENGL_CORE. + This allows enabling the extension any time GLX_ARB_create_context (and + GLX_ARB_create_context_profile) is enabled. + + v2: Clean up some comments. Note that our behavior for + GLX_CONTEXT_ES2_PROFILE_BIT_EXT w/version != 2.0 matches NVIDIA's. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit cef0b808d3152a20cd98d32457dde08bd5434e7c +Author: Ian Romanick +Date: Wed Jul 4 15:21:03 2012 -0700 + + glx: Implement GLX_ARB_create_context_profile + + Most of the infrastructure was already in place. This just adds: + + * Validate values specified with the GLX_CONTEXT_PROFILE_MASK_ARB + attribute. + + * Select a DRI2 "api" based on the setting of + GLX_CONTEXT_PROFILE_MASK_ARB. + + * Enable GLX_ARB_create_context_profile extension. + + This change assumes that any DRI2 driver can handle (possibly by saying "no") + seeing an API setting other than __DRI_API_OPENGL. This allows enabling this + extension any time GLX_ARB_create_context is enabled. + + Also, the validation code in __glXDisp_CreateContextAttribsARB is structured + in a very verbose manner (using a switch-statement) to ease the addition of + GLX_EXT_create_context_es2_profile. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 09a8a169d5929665778ae33e58e345fe1192b64c +Author: Ian Romanick +Date: Wed Jul 4 15:21:02 2012 -0700 + + glx: Implement GLX SetClientInfo2ARB protocol + + The protocol is almost identical to SetClientInfoARB. The only + difference is the GL versions include an extra 4 bytes for the supported + profile. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 167993254a5cbe11a1f44fad1e8ae042089c1619 +Author: Peter Hutterer +Date: Thu Jul 5 16:17:56 2012 +1000 + + list.h: don't crash when removing an element from a NULL list + + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 8aa6d49d46dacc31a85023d0159c1fb67401df73 +Author: Ian Romanick +Date: Wed Jul 4 15:21:01 2012 -0700 + + glx: Don't request prototypes for GL extension functions + + The server does not want GL extension prototypes. It never links with + anything that could possibly provide implementations of these functions. It + *is* the provide, and it does not provde these symbols. All this does is + create hundreds of warnings like: + + incude/GL/glext.h:5570:45: warning: redundant redeclaration of 'glMultTransposeMatrixd' [-Wredundant-decls] + include/GL/gl.h:1940:45: note: previous declaration of 'glMultTransposeMatrixd' was here + + I believe this was necessary back before the AIGLX days, but that was a long, + long time ago. The warnings recently showed up with the addition of + -Wredundant-decls to the CWARNFLAGS. + + v2: Update the commit message, no code changes. + + Signed-off-by: Ian Romanick + Cc: Adam Jackson + Cc: Dave Airlie + Acked-by: Keith Packard + Signed-off-by: Keith Packard + +commit 258abbf823f753757e4dddc13ef495f4024680db +Author: Michal Srb +Date: Thu Jun 28 17:17:12 2012 +0200 + + Look for ModuleData only in appropriate library + + LoaderSymbol calls dlsym with RTLD_DEFAULT pseudo handle making it search in + every loaded library. In addition glibc adds NODELETE flag to the library + containing the symbol. + + It's used in doLoadModule to locate ModuleData symbol, the + module's library gets the flag and is kept in memory even after it is + unloaded. + + This patch adds LoaderSymbolFromModule function that looks for symbol only in + library specified by handle. That way the NODELETE flag isn't added. + + This glibc behavior doesn't seem to be documented, but even if other + implementations differ, there is no reason to search ModuleData symbol outside + the module's library. + + Signed-off-by: Michal Srb + Reviewed-by: Daniel Stone + + v2: Switch LoaderSymbolFromModule arguments order. + Correct description. + Reviewed-by: Adam Jackson + Signed-off-by: Peter Hutterer + +commit d84f0f823eeeecdf0498aadd3fbb1d11dabc0837 +Merge: 12bfb4c d04dfe3 +Author: Peter Hutterer +Date: Wed Jul 4 21:23:48 2012 +1000 + + Merge branch 'sigio-vt-switch-issues' into for-keith + + Conflicts: + test/Makefile.am + + Signed-off-by: Peter Hutterer + +commit 12bfb4cf1bebb66d2c2eb76b93c18a2915b865e5 +Author: Peter Hutterer +Date: Tue Jun 26 09:19:33 2012 +1000 + + Xi: extend PropagateMask to EMASKSIZE + + Number of devices is 2 + MAXDEVICES, with index 0 and 1 reserved for + XIAll{Master}Devices. At the current size, PropagateMask would be overrun in + RecalculateDeviceDeliverableEvents(). + + Found by Coverity. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit a9c09f8f8e2a97e4bfe927bc4c7f29b04ee3403a +Author: Peter Hutterer +Date: Mon Jun 25 14:24:11 2012 +1000 + + dix: fix memory leak in TouchEventHistoryReplay + + Don't leak if ti->history is NULL. + + Found by coverity. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 55ff20eb37f00a3ad07b5acff19d4497ab513a97 +Author: Peter Hutterer +Date: Mon Jun 25 14:22:31 2012 +1000 + + dix: fix dereference before null check + + Found by Coverity. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit e3f47be9fbc489e3eb5832445924810b2ff300f7 +Author: Peter Hutterer +Date: Mon Oct 24 10:01:26 2011 +1000 + + xfree86: fix use-after-free issue in checkInput + + *dev is the condition of the while loop we're in, reset to NULL after + freeing + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + +commit 252a69b592001b34714d0fe7508e1898883f9d01 +Author: Peter Hutterer +Date: Wed Jun 20 14:25:54 2012 +1000 + + xkb: use local variable instead of casting arg + + No functional changes. + + Signed-off-by: Peter Hutterer + +commit d04dfe3f754ad3a5f158057175cbd44319c1ae51 +Author: Peter Hutterer +Date: Fri Jun 22 15:18:53 2012 +1000 + + Drop custom sigio block/unblock functions from kdrive, ephyr and dmx + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 5d309af2ed93e91c7d72f548a11052051efbb40f +Author: Peter Hutterer +Date: Fri Jun 22 14:56:25 2012 +1000 + + xfree86: drop ddx-specific SIGIO blocking + + The hooks are left for this cycle, we can drop it next cycle once the + drivers that need it (e.g. wacom) have been updated. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit ff67135bec3ecea8cebeb46b42ece0a6671e231d +Author: Peter Hutterer +Date: Fri Jun 22 13:09:35 2012 +1000 + + xfree86: use OsBlockSIGIO from the ddx + + We can ignore the "wasset" argument now since the DIX will keep proper + refcounting. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 6bf356ef2831baeccd7a650ed3fde0831e33c6c0 +Author: Peter Hutterer +Date: Fri Jun 22 13:02:40 2012 +1000 + + os: add OsBlockSIGIO and OsReleaseSIGIO + + Let the dix be in charge of changing the sigprocmask so we only have one + entity that changes it. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 24525d96a3b9dba67eb75042500b2f208a2cc246 +Merge: 4cd91bd 35e3d22 +Author: Keith Packard +Date: Mon Jul 2 22:35:39 2012 -0700 + + Merge branch 'sigsafe-logging-varargs' + + This merge includes a minor fixup for '%p' arguments; must cast to + uintptr_t instead of uint64_t as we use -Werror=pointer-to-int-cast + which complains when doing a cast (even explicitly) from a pointer + to an integer of different size. + +commit 35e3d229150395a222a0f53318daf5dbeb8f6eb6 +Author: Peter Hutterer +Date: Thu May 24 14:04:42 2012 +1000 + + Bump to ABI_XINPUT_VERSION 18 + + The input ABI hasn't changed, but input drivers need something to hook on if + they want to log from within signal handlers and the input ABI is the + simplest way of doing so. + + Signed-off-by: Peter Hutterer + +commit 541934168dbeb17059542bb5a1da8eba7995fa05 +Author: Peter Hutterer +Date: Mon May 28 10:10:30 2012 +1000 + + xfree86: constify InputDriverPtr->driverName and default_options + + Already treated as const anyway by all drivers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit c66089d2206bafc01307a8327ff6089edcb4ed2d +Author: Peter Hutterer +Date: Mon May 28 09:57:33 2012 +1000 + + xfree86: constify InputInfoPtr->type_name + + This corresponds to XListInputDevice(3)'s "type" field (after being + converted to an Atom). Input drivers use the XI_KEYBOARD and similar + defines, even Wacom which falls out of the common defines uses constant + strings here. The use-case for having this non-const is small. + + Input ABI break technically, since we never freed this information anyway it + is not a noticable change. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 505c8a2b2cae0318db1148417ec850d54b38f7df +Author: Chase Douglas +Date: Mon Apr 9 09:41:38 2012 -0700 + + Log in OsVendorFatalError() in a signal safe manner + + The function can be called from a fatal signal handler. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit d51aebdbf99a9f240f7c318a70ba40e61cd43049 +Author: Chase Douglas +Date: Mon Apr 9 08:30:50 2012 -0700 + + Log in LoaderUnload() in a signal safe manner + + The function may be called from a fatal signal handler. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit c3e1168778ec20beeac9979dc57e36400c70dd63 +Author: Chase Douglas +Date: Mon Apr 9 08:28:17 2012 -0700 + + Log in UnloadModuleOrDriver() in a signal safe manner + + The function may be called from a fatal signal handler. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 89e3ac07aca1def155299aff6f7a57ccafb68fd7 +Author: Chase Douglas +Date: Mon Apr 9 08:23:32 2012 -0700 + + Log safely in fatal signal handler + + While we probably don't need to be signal safe here since we will never + return to the normal context, the logging signal context check will + cause unsafe logging to be unhandled. Using signal safe logging here + resolves the issue. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 6fd5add005d0660b591d808583d1a6c6a85f1277 +Author: Chase Douglas +Date: Fri Apr 6 16:17:41 2012 -0700 + + Log mieq enqueue overflow in a signal safe manner + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 7f4a69b628a6246855054a0b94d6d6dd14e8842c +Author: Chase Douglas +Date: Fri Apr 13 16:01:38 2012 -0700 + + Log messages in TouchBeginDDXTouch() in a signal-safe manner + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit f752226e40890643df213a62f0c96e6a0243e754 +Author: Chase Douglas +Date: Fri Apr 6 10:21:14 2012 -0700 + + Log messages in GetTouchEvents() in a signal safe manner + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 82d1c6b310eaa5095eed9ee4ea958261a46a78e1 +Author: Chase Douglas +Date: Fri Apr 6 08:32:28 2012 -0700 + + Warn when attempting to log in a signal unsafe manner from signal context + + Also, print out the offending message format. This will hopefully help + developers track down unsafe logging. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 512bec06be6c79ca263da9de8f40430b8095b57b +Author: Chase Douglas +Date: Mon Apr 16 09:47:42 2012 -0700 + + Make BUG_WARN* signal safe + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 0fa5217836cf7fd3872fccc9f3ff9ff32426c25b +Author: Chase Douglas +Date: Fri Apr 6 16:09:05 2012 -0700 + + Print backtrace in a signal-safe manner + + Backtraces are often printed in signal context, such as when a segfault + occurs. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + + os: print offset as unsigned int, not long unsigned int + + pnprintf() takes unsigned int for %u + + Signed-off-by: Peter Hutterer + +commit ac20815d5235e7a8e7b331365aabf5a489fc5e34 +Author: Chase Douglas +Date: Tue Jun 5 15:39:41 2012 +1000 + + Add ErrorFSigSafe() alternative to ErrorF() + + ErrorF() is not signal safe. Use ErrorSigSafe() whenever an error + message may be logged in signal context. + + [whot: edited to "ErrorFSigSafe"] + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 164b38c72fe9c69d13ea4f9c46d4ccc46566d826 +Author: Chase Douglas +Date: Fri Apr 6 08:28:40 2012 -0700 + + Add LogMessageVerbSigSafe() for logging messages while in signal context + + [whot: edited to use varargs, squashed commit below] + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + + os: fix vararg length calculation + + Make %u and %x sizeof(unsigned int), %p sizeof(void*). This is printf + behaviour and we can't guarantee that void* is uint64_t anyway. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4cd91bd4c6325b2e617ca90a725f02ac124c2372 +Author: Alan Coopersmith +Date: Sat May 12 10:11:33 2012 -0700 + + Enable no-undefined symbols mode in Solaris builds if -z parent is in ld + + The Solaris linker recently added a -z parent flag for easier checking + of symbol definitions in plugins against the program that loads them. + If that's present, this enables it, along with -z defs to error on + undefined symbols to alert us if any modules call symbols that won't + be found at runtime. + + This builds upon, and requires, the recent Cygwin work to build Xorg. + It moves a couple more modules to be after the Xorg binary in the build + order so that they can find the binary to check against, much as the + Cygwin changes did (these would be modules built on Solaris but not + Cygwin). + + v2: This version only sets the flags for the xorg-server build itself, + and does not yet export them in xorg-server.pc to the drivers, since + most of the drivers are not ready to build with -no-undefined yet. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Yaakov Selkowitz + +commit d31942e15c619e9355ef8183223f9165902a9d56 +Author: Alan Coopersmith +Date: Sat May 12 10:10:49 2012 -0700 + + Add pixman to module dependencies for pixman_region_* functions + + Signed-off-by: Alan Coopersmith + Reviewed-by: Yaakov Selkowitz + +commit 339f38ef380d750c4c7afd60331a559845e4184e +Author: Alan Coopersmith +Date: Sat May 12 10:09:41 2012 -0700 + + Build tda9885.c functions into fi1236 to avoid libtool relinking problems + + Signed-off-by: Alan Coopersmith + Reviewed-by: Yaakov Selkowitz + +commit a00066d2916b6910429cc1c7feedafbaee0d4750 +Author: Alan Coopersmith +Date: Thu Jun 28 15:15:53 2012 -0700 + + Add dixGetGlyphs to replace GetGlyphs from libXfont to simplify linking + + No other Xfont consumer used it, and this saves us from having to link + callers against libXfont for one simple function when doing + -no-undefined symbols builds. + + The function is given a new name to avoid clashing with existing libXfont + binaries, but a #define is provided to preserve the API so we don't have + to fix all the callers at the same time. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Yaakov Selkowitz + +commit 212b9803238d2de2e77cbe5de62d3f616ae50daf +Author: Aaron Plattner +Date: Fri Jun 29 13:33:58 2012 -0700 + + randr: Fix REQUEST vs. REQUEST_SIZE_MATCH mismatch + + ProcRRGetScreenSizeRange uses REQUEST(xRRGetScreenSizeRangeReq) followed by + REQUEST_SIZE_MATCH(xRRGetScreenInfoReq). This happens to work out because both + requests have the same size, so this is not a functional change, just a cosmetic + one. + + Signed-off-by: Aaron Plattner + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 957bf959fb577b292a3e4f6bb67740ca09e7aeb9 +Author: Dave Airlie +Date: Wed Jun 27 14:36:04 2012 +0100 + + dix/render: consolidate window format matching code. + + This code existed in 3 different forms, perhaps it should be + consolidated. + + Reviewed-by: Keith Packard + Reviewed-by: Alex Deucher + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit a7b97b0fa85d695ae19d194cfa3267159d149e5d +Author: Christopher James Halse Rogers +Date: Thu Jun 28 12:07:11 2012 +1000 + + dri2: Fix authentication for < v8 clients (v2). + + The legacy logic was embarassingly wrong; AuthMagic should return errno, + so returning FALSE only when AuthMagic returns nonzero is exactly wrong. + + v2: Match drmAuthMagic by returning -EINVAL rather than EINVAL + Fix trailing whitespace + + https://bugs.freedesktop.org/show_bug.cgi?id=51400 + Signed-off-by: Christopher James Halse Rogers + Tested-by: Chris Wilson + Reviewed-by: Michel Dänzer + Tested-by: Knut Petersen + Signed-off-by: Keith Packard + +commit 8b4f0a4fdd6c15f49458bc3a8c3135b8c389240d +Merge: 59294a2 d642e71 +Author: Keith Packard +Date: Thu Jun 28 10:38:26 2012 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 59294a2179bd5bb996693af004b470932df00ac6 +Merge: 855003c 191b630 +Author: Keith Packard +Date: Thu Jun 28 10:11:44 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 855003c333a0ead1db912695bc9705ef2b3144b4 +Author: Keith Packard +Date: Thu Jun 21 18:45:18 2012 -0700 + + randr: Catch two more potential unset rrScrPriv uses + + Ricardo Salveti found one place where the + randr code could use the randr screen private data without checking + for null first. This happens when the X server is running with + multiple screens, some of which are randr enabled and some of which + are not. Applications making protocol requests to the non-randr + screens can cause segfaults where the server touches the unset private + structure. + + I audited the code and found two more possible problem spots; the + trick to auditing for this issue was to look for functions not taking + a RandR data structure and where there was no null screen private + check above them in the call graph. + + Signed-off-by: Keith Packard + +commit 32603f57ca03b6390b109960f8bb5ea53ac95ecb +Author: Ricardo Salveti de Araujo +Date: Thu Jun 21 00:55:53 2012 -0300 + + randr: first check pScrPriv before using the pointer at RRFirstOutput + + Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo, + which later calls RRFirstOutput. + + Signed-off-by: Ricardo Salveti de Araujo + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit d642e7128790ec6b709df8d1a91333ab87598077 +Author: Yaakov Selkowitz +Date: Thu Jun 21 20:01:49 2012 +0100 + + configure.ac: link XWIN with GLX_SYS_LIBS + + Link XWIN with GLX_SYS_LIBS, just like all the other DDXs + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9f1edced9abc066f0ba47672d006fe50fb206371 +Author: Peter Hutterer +Date: Fri Jun 15 10:00:51 2012 +1000 + + xfree86: always enable SIGIO on OsVendorInit (#50957) + + Drivers call xf86InstallSIGIOHandler() for their fd on DEVICE_ON. That + function does not actually enable the signal if it was blocked to begin + with. As a result, if one vt-switches away from the server (SIGIO is + blocked) and then triggers a server regeneration, the signal remains + blocked and input devices are dead. + + Avoid this by always unblocking SIGIO when we start the server. + + X.Org Bug 50957 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 4ba340cfaa8d430c808566495f8deda0ff1b4424 +Author: Keith Packard +Date: Thu Jun 21 18:42:46 2012 -0700 + + randr: Clean up compiler warnings about unused and shadowing variables + + set but not used variables + shadowing a previous local + + A hidden problem was that the VERIFY_RR_* macros define local 'rc' + variables, any other local definitions for those would be shadowed and + generate warnings from gcc. I've renamed the other locals 'ret' + instead of 'rc'. + + Signed-off-by: Keith Packard + +commit 191b630656ba206ad78b7803c3a76f7d9567d9d8 +Author: Peter Hutterer +Date: Thu Jun 21 11:25:24 2012 +1000 + + include: document _XkbErrCode2 macros + + Why sending the number of the (implementation-dependent) error statement to + the client is a good idea is a bit beyond me, but at least document it so we + can all share the despair. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 7100118c8d3314d73bfef0a262af56686b227055 +Author: Peter Hutterer +Date: Mon Jun 18 11:28:52 2012 +1000 + + AC_SUBST the GLX_SYS_LIBS + + libxservertest needs -lpthread from glxapi.c's pthread_once() call. Usually + this would be pulled in by the XORG_LIBS but not when building without Xorg. + + This commit has no visible effect on the current tree, preparation for test + cleanups. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 014ad46f1b353a95e2c4289443ee857cfbabb3ae +Author: Peter Hutterer +Date: Thu Jun 21 14:26:15 2012 +1000 + + os: print newline after printing display name + + Much easier for scripts that try to read the display value off the file + descriptor. Plus, this restores the behaviour we had for this patch in + Fedora since server 1.6 (April 2009). + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + Reviewed-by: Chase Douglas + +commit e1f86a7c77ed49e001ea42ef76ab83e87dbdf126 +Author: Sergei Trofimovich +Date: Mon Jun 18 01:13:21 2012 +0300 + + test/.gitignore: add hashtabletest + + Signed-off-by: Sergei Trofimovich + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit c9bbf8fe574591c8e191eeef20f8994781718772 +Author: Jon TURNEY +Date: Thu Jun 21 19:38:55 2012 +0100 + + hw/xwin/glx: Fix glxWinCreateContext() function pointer mismatch + + Fix glxWinCreateContext() function signature to align with commit 96d74138 + "glx: Extend __GLXscreen::createContext to take attributes", which added more + parameters to the screen createContext function for implementing GLX_ARB_create_context + + indirect.c: In function 'glxWinScreenProbe': + indirect.c:683:36: warning: assignment from incompatible pointer type + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 6e85660c7503c7e88e24003562444dffde6c88ff +Author: Jon TURNEY +Date: Mon Mar 5 23:07:56 2012 +0000 + + hw/xwin/glx: Update gen_gl_wrappers.py for the current glx/dispatch.h + + Fix the code generator for the dispatch table initialization after + the whitespace/coding style changes to glx/dispatch.h + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit cb638ed9c81f07d8603b07db395e31a41fed8685 +Author: Jon TURNEY +Date: Thu Jun 21 18:55:57 2012 +0100 + + hw/xwin/glx: Blacklist 'GDI generic' GL renderer + + If the native GL renderer is the GDI generic renderer (as can happen + if we are in safe mode, or the video driver is VGA, or we have hybrid + graphics which hasn't noticed that xwin requires 3d acceleration), don't + use it. It's not accelerated and we will probably get better conformance + and perfomance from swrast. + + Fix so we don't install screen function wrappers in glxWinScreenProbe + unless we are succesful. + + Also, move fbConfig dumping to after GLX version has been determined + from extensions + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 8c24d20933ba9c2ef0e9a81815c3be23fa896aea +Author: Jon TURNEY +Date: Thu Jun 21 18:05:24 2012 +0100 + + hw/xwin/glx: Fix glxLogExtensions to handle a null string without crashing + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c08c7c8f655d7721c1e02bfeeb965b6379f72553 +Author: Jon TURNEY +Date: Fri Jun 24 13:32:10 2011 +0100 + + hw/xwin/glx: Create a new dispatch table rather than modifying the existing one + + Create a new dispatch table rather than modifying the existing one + + struct _glapi_table is not a complete type after including glapi.h, so we use + glapi_get_dispatch_table_size() to determine it's size (alternatively, we could + include glapitable.h, to complete the type) + + This could possibly be written to use _glapi_create_table_from_handle() instead, but + that requires making all the wrapper functions exports + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3ef3ce069d52dcfa932c90ccd30854a8d9daa15a +Merge: a0c8716 ff541e0 +Author: Keith Packard +Date: Thu Jun 21 08:52:34 2012 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit 704b847abfd29e9adde27127a15a963414f8bcf4 +Author: Chase Douglas +Date: Fri Apr 6 10:13:45 2012 -0700 + + Add FormatUInt64{,Hex}() for formatting numbers in a signal safe manner + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit bc85c81687a24aea738094ff11f4448fb3b3afbb +Author: Chase Douglas +Date: Fri Apr 6 08:03:09 2012 -0700 + + Save log file file descriptor for signal context logging + + None of the FILE based functions are signal safe, including fileno(), so + we need to save the file descriptor for when we are in signal context. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit d3725549f0276487fba1d419094209d18e86669f +Author: Chase Douglas +Date: Fri Apr 6 07:43:57 2012 -0700 + + Add global variable inSignalContext + + This will be used for checking for proper logging when in signal + context. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit a0c8716cdca139059e7aec8a3cb75726dd37a4a1 +Author: Peter Hutterer +Date: Thu Jun 21 13:45:06 2012 +1000 + + kdrive: adjust BlockHandler/WakeupHandler to new API + + Missing API update caused Xephyr to crash on startup, garbage memory + dereference when accessing timeout. + Introduced in 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 + + kdrive.c:868:27: warning: assignment from incompatible pointer type + kdrive.c:869:28: warning: assignment from incompatible pointer type + + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit ff541e0a1f84bd98966148793f35afeaf71c271b +Author: Alan Coopersmith +Date: Wed Jun 13 21:20:51 2012 -0700 + + Remove obsolete tab stop comments from hw/xfree86/parser/*.c + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit 687536b1044a3297f6b9a45f6a2d2987daa7be59 +Author: Alan Coopersmith +Date: Tue Jun 12 22:38:46 2012 -0700 + + Fix some overly indented/poorly line wrapped comments in dix/events.c + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 93a378aad4a4a03f37ddafccfedeb9d6e2be2a6a +Author: Alan Coopersmith +Date: Tue Jun 12 22:29:51 2012 -0700 + + OtherClientGone: Remove unreachable return statement + + Now that FatalError is marked as _X_NORETURN, the compilers know we + can't get here, and the return statement added to make them happy in + the past now makes them unhappy. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 3f97284b10c250457888902debd4d793cb4544d4 +Author: Christopher James Halse Rogers +Date: Wed Jun 20 13:53:53 2012 +1000 + + dri2: Pass a ScreenPtr through to the driver's AuthMagic function. (v3) + + xwayland drivers need access to their screen private data to authenticate. + Now that drivers no longer have direct access to the global screen arrays, + this needs to be passed in as function context. + + v2: Don't break ABI + v3: Paint the bikeshed blue; drop fd from AuthMagic2ProcPtr prototype + + Signed-off-by: Christopher James Halse Rogers + Reviewed-by: Kristian Høgsberg + Signed-off-by: Keith Packard + +commit dae317e7265007b38012244722e3b3a06e904ed5 +Author: Andy Ritger +Date: Thu Jun 14 09:15:37 2012 -0700 + + randr: Don't recurse into mieqProcessInputEvents() from RRTellChanged(). + + Call UpdateCurrentTimeIf(), not UpdateCurrentTime(), from RRTellChanged(). + The latter calls ProcessInputEvents(), which can trigger a recursion + into mieqProcessInputEvents(). The former omits the call to + ProcessInputEvents(). + + Signed-off-by: Andy Ritger + Reviewed-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit 54476b5e4461ff523e935961affabcf0de12c556 +Author: Peter Hutterer +Date: Thu Jun 7 16:52:20 2012 +1000 + + dix: if the scroll valuator reaches INT_MAX, reset to 0 + + Too much scrolling down may eventually trigger an overflow of the valuator. + If this happens, reset the valuator to 0 and skip this event for button + emulation. Clients will have to figure out a way to deal with this, but a + scroll event from (close to) INT_MAX to 0 is a hint of that it needs to be + ignored. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 8dc70acbf3d82611ac9ec1ec2a52edcc01934850 +Merge: ffb47a1 b59adc9 +Author: Keith Packard +Date: Thu Jun 14 13:04:29 2012 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit ffb47a123ddd1233fb4229cf23483652065c5e82 +Merge: db9d2b8 b840ba5 +Author: Keith Packard +Date: Thu Jun 14 13:01:17 2012 -0700 + + Merge remote-tracking branch 'idr/GLX_ARB_create_context' + +commit db9d2b8a508ab812e5c717a41310faad81879b09 +Author: Dave Airlie +Date: Thu Jun 7 15:01:59 2012 +0100 + + xserver: fix build on arm tinderbox + + Rob Clark got an ARM tinderbox up and running, and this code is built there + but not here, this should fix it, though I hope that code never gets executed. + + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 6d86b64dbaef5a16712fd1fdc3157f716d238877 +Merge: 812786f 4c68f5d +Author: Keith Packard +Date: Thu Jun 14 11:05:22 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit b59adc9c2427e5efac3513c20992723e23f92691 +Author: Alan Coopersmith +Date: Thu Jun 7 20:58:01 2012 -0700 + + Make stub version of fbdevHWAdjustFrame match new prototype in fbdevhw.h + + Removed flags argument to match api rework in commit 1f0e8bd5eb1a55 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Dave Airlie + +commit 4c68f5d395c66f28b56e488cb3cd12f36820357b +Author: Peter Hutterer +Date: Wed May 9 09:21:28 2012 +1000 + + dix: disable all devices before shutdown + + f3410b97cf9b48a47bee3d15d232f8a88e75f4ef introduced a regression on server + shutdown. If any button or key was held on shutdown (ctrl, alt, backspace + are usually still down) sending a raw event will segfault the server. The + the root windows are set to NULL before calling CloseDownDevices(). + + Avoid this by disabling all devices first when shutting down. Disabled + devices won't send events anymore. + + Master keyboards must be disabled first, otherwise disabling the pointer + will trigger DisableDevice(keyboard) and the keyboard is removed from the + inputInfo.devices list and moved to inputInfo.off_devices. A regular loop + through inputInfo.devices would thus jump to off_devices and not recover. + + Signed-off-by: Peter Hutterer + Acked-by: Chase Douglas + Reviewed-by: Chase Douglas + +commit 9c0e820216cd1631f75b037b7908d55ac091692c +Author: Peter Hutterer +Date: Thu May 10 12:55:44 2012 +1000 + + Xi: drop forced unpairing when changing the hierarchy + + Devices are unpaired as needed on DisableDevice now. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e433d1046c222f9d969c2c28a4651ff9097614f4 +Author: Peter Hutterer +Date: Thu May 10 12:42:59 2012 +1000 + + dix: disable non-sprite-owners first when disabling paired devices + + If a sprite-owner is to be disabled but still paired, disable the paired + device first. i.e. disabling a master pointer will disable the master + keyboard first. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit df1704365e700d3cf1d36a241bdfc479159a8df7 +Author: Peter Hutterer +Date: Thu May 10 15:33:15 2012 +1000 + + dix: free the sprite when disabling the device + + Disabled devices don't need sprites (they can't send events anyway) and the + device init process is currently geared to check for whether sprite is + present to check if the device should be paired/attached. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e57d6a89027c55fef987cdc259668c48a8b4ea1b +Author: Peter Hutterer +Date: Thu May 10 15:32:20 2012 +1000 + + dix: move freeing the sprite into a function + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 46adcefb0e08515195d8e49985a4e210395700b3 +Author: Peter Hutterer +Date: Thu May 10 12:10:12 2012 +1000 + + dix: return early from DisableDevice if the device is already disabled + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 076f9d3a6660fa7fef4ae9decaffd2feebdd32c4 +Author: Peter Hutterer +Date: Thu May 10 12:20:37 2012 +1000 + + dix: drop client argument from PairDevices - unused + + This is a leftover from early MPX days where any keyboard could be paired + with any pointer (before the device hierarchy). + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit d034605f3914e41e0d636eafff9278be1c041b2c +Author: Peter Hutterer +Date: Thu May 10 14:13:20 2012 +1000 + + dix: rename shadowing loop variable in TouchResizeQueue + + second 'i' shadows the function-wide one, rename to 'j' + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit a86f3ef511db16be5ddc723bf14e770dad23ee45 +Author: Peter Hutterer +Date: Thu May 10 11:55:21 2012 +1000 + + dix: change "still paired warning" to use BUG_RETURN_VAL + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4bcf43919a14cd2cd20af4099cd213ce25792edb +Author: Peter Hutterer +Date: Thu May 10 15:32:47 2012 +1000 + + dix: use BUG_RETURN_VAL for pairing errors + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Alan Coopersmith + +commit 642569fc79a1814acca1c8f529539b054bf36907 +Author: Peter Hutterer +Date: Thu May 10 12:11:57 2012 +1000 + + Replace a few BUG_WARN with BUG_RETURN_VAL + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 11ecfb8884b7c4def0863a57868a6b9fa1b63ae5 +Author: Peter Hutterer +Date: Thu May 10 11:48:05 2012 +1000 + + include: add BUG_RETURN_* macros + + Helper functions to avoid things like + + if (foo) { + BUG_WARN(foo); + return 1; + } + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Alan Coopersmith + +commit ff41753b1bee414b16c0f1e8d183776e87c94065 +Author: Peter Hutterer +Date: Wed Jun 6 14:38:49 2012 +1000 + + xkb: warn if XKB SlowKeys have been automatically enabled + + Slow keys are enabled when the XKB AccessX features are generally enabled + (ctrls->enabled_ctrls & XkbAccessXKeysMask) and either shift key is held for + 8 seconds. For the unsuspecting user this appears as if the keyboard + suddenly stops working. + + Print a warning to the log, so we can later tell them "told you so". + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit f20a532ba3c7b7d74530f3906c7bacf016bb8faf +Author: Alan Coopersmith +Date: Sun May 20 00:00:59 2012 -0700 + + Fix statement not reached warning in _DMXXineramaActive + + Signed-off-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + +commit 1be317c4e5d99d11a124ad4e7a90a5dcae591e20 +Author: Alan Coopersmith +Date: Wed May 23 19:27:23 2012 -0700 + + Provide prototypes for Mmio functions for Solaris Studio on SPARC + + Actual inline implementations are provided via external *.il files + generated from *.S files in hw/xfree86/os-support/solaris + + Fixes missing prototype warnings that xorg-macros has recently elevated + to build-breaking errors. + + Signed-off-by: Alan Coopersmith + Signed-off-by: Henry Zhao + Reviewed-by: Dave Airlie + +commit 812786f4d4306cb16f8ed57fa4a1a32bb1d13fe3 +Author: Dave Airlie +Date: Tue Jun 5 19:55:52 2012 +0100 + + xwin: fixup block/wakeup handlers + + These got missed out in the api changeover. + + Reported-by: Colin Harrison + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit 3cbaf621782fb5f5679acf9104571d3ae2b48b72 +Author: Dave Airlie +Date: Tue Jun 5 17:54:02 2012 +0100 + + xfree86: fix new warnings introduced in rebase. + + Spotted these in tinderbox: + xf86xv.c: In function 'xf86XVScreenInit': + xf86xv.c:282: warning: assignment from incompatible pointer type + xf86xv.c: In function 'xf86XVCloseScreen': + xf86xv.c:1275: warning: assignment from incompatible pointer type + xf86xv.c: In function 'xf86XVAdjustFrame': + xf86xv.c:1366: warning: assignment from incompatible pointer type + + Missed removing one flags. + + Signed-off-by: Dave Airlie + Tested-by: Keith Packard + Signed-off-by: Keith Packard + +commit 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 +Author: Dave Airlie +Date: Tue Jun 5 13:22:18 2012 +0100 + + api: rework the X server driver API to avoid global arrays. + + This is a squash merge containing all the API changes, as + well as the video ABI bump. + + Its been squashed to make bisection easier. + + Full patch log below: + + commit b202738bbf0c5a1c1172767119c2c71f1e7f8070 + Author: Aaron Plattner + Date: Mon May 14 15:16:11 2012 -0700 + + xfree86: Bump video ABI to 13.0 + + The ABI was broken by changes to convert from screen index numbers to ScreenPtr + / ScrnInfoPtr in various structures and function signatures. + + Signed-off-by: Aaron Plattner + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + + commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3 + Author: Dave Airlie + Date: Thu May 24 10:56:57 2012 +0100 + + xf86: xf86ClearEntityListForScreen should take a pScrn + + When adding GPU screens this make life easier. + + (also fix comment, as pointed out by Alan) + + Reviewed-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + + commit afee8b5ab4501597ecc1ade34124d7ca227ab055 + Author: Dave Airlie + Date: Thu May 24 07:07:32 2012 +0100 + + xf86i2c: add pscrn for drivers to use + + This just adds a pScrn pointer into the struct for the drivers to use + instead of scrnIndex. Mostly scrnIndex is used for logging, but some + drivers use it to lookup xf86Screens, so let them stash a pScrn instead. + + Removing the scrnIndex is a bit more involved and I'm not sure its worth + the effort. Doing i2c in the X server is legacy code as far as I'm concerned. + + Reviewed-by: Alex Deucher + Signed-off-by: Dave Airlie + + commit ea5092f1f679691d187f1eee9427e6057beec56e + Author: Dave Airlie + Date: Wed May 23 19:25:20 2012 +0100 + + dix/gc: consolidate GC object creation in one place + + The standard GC create and scratch GC create were 90% the same really, + and I have a need in the future for creating GC objects without the + other bits, so wanted to avoid a third copy. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + + commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1 + Author: Dave Airlie + Date: Wed May 23 10:24:06 2012 +0100 + + xf86: add a define to denote the new non-index interfaces are being used + + This can be used by drivers to provide compatible APIs. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + + commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3 + Author: Dave Airlie + Date: Wed May 23 15:09:12 2012 +0100 + + dix: make Create/Free scratch pixmaps take a ScreenPtr + + While technically an API/ABI change I doubt anyone uses it, + but it helps in splitting screens up. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + + commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60 + Author: Dave Airlie + Date: Wed May 23 14:57:55 2012 +0100 + + xf86/xv: remove scrnIndexfrom xf86FindXvOptions. + + Move this interface to taking an ScrnInfoPtr. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + + commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843 + Author: Dave Airlie + Date: Wed May 23 14:53:59 2012 +0100 + + xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2) + + stop passing indices into this function. + + v2: drop flags argument. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + + commit 58824e414f35682435f15bfe6c4b656bd90b9235 + Author: Dave Airlie + Date: Wed May 23 14:48:09 2012 +0100 + + xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI) + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + + commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd + Author: Dave Airlie + Date: Tue Apr 10 14:18:59 2012 +0100 + + xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2) + + Instead of passing an index, pass the actual ScreenPtr. This allows + more moving towards not abusing xf86Screens + screenInfo. + + v2: drop the blockData/wakeupData args as per ajax's suggestion., + fix docs. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + + commit 790d003de20fb47674420a24dadd92412d78620d + Author: Dave Airlie + Date: Wed Apr 11 09:53:14 2012 +0100 + + xf86/common: remove some more pScrn->pScreen uses + + remove some more conversions that appeared after api cleanups. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f + Author: Dave Airlie + Date: Tue Apr 10 16:34:53 2012 +0100 + + ddc: change API to take ScrnInfoPtr (v2) + + This removes all xf86Screens usage from ddc code, + it modifies the API for some functions to avoid taking indices. + + v2: address Alan's comments about dropping DDC2Init parameter. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit fe3f57b6eaf6860a33876a54f9439f69578f03a5 + Author: Dave Airlie + Date: Tue Apr 10 16:31:26 2012 +0100 + + vbe: don't use index for VBEInterpretPanelID (API) + + Remove use of xf86screens from vbe module. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit abf1965f4ed91529036d3fdb470d6a3ce6f29675 + Author: Dave Airlie + Date: Tue Apr 10 16:25:11 2012 +0100 + + int10/vbe: don't use xf86Screens. (ABI) (v3) + + Pass the ScrnInfoPtr instead of the index in the int10 struct. + + This saves us using it to dereference xf86Screens. + + v2: address Alan's comment to fix struct alignment. + + v3: squash in all the int10 fixes, test the vm86 code builds, + after comments by Keith. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 23cca612b4fb5efc33683c7624b803b457387e3d + Author: Dave Airlie + Date: Tue Apr 10 15:30:18 2012 +0100 + + xserver: drop index argument to ScreenInit (ABI/API) (v2) + + This drops the index argument, its the same as pScreen->myNum, + and its the last major index abuse I can find. + + v2: address Alan's review - update docs, fix xwin/xnest/darwin + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960 + Author: Dave Airlie + Date: Tue Apr 10 15:23:01 2012 +0100 + + xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API) + + This migrates PointerMoved from an index to ScrnInfoPtr. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9 + Author: Dave Airlie + Date: Tue Apr 10 15:20:46 2012 +0100 + + xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API) + + This migrates the PMEvent from index to ScrnInfoPtr. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2 + Author: Dave Airlie + Date: Tue Apr 10 15:18:30 2012 +0100 + + xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API) + + This migrates the SetDGAMode callback from an index to ScrnInfoPtr. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit baf5e4818a74f2b68c3dfdcc56f54322351039a0 + Author: Dave Airlie + Date: Tue Apr 10 15:14:11 2012 +0100 + + xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2) + + This migrates the ChangeGamma interface to avoid passing a index. + + v2: fix xf86RandR12.c + xf86cmap.c call + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 51e5f90ada929d6b23176090badbb42fdb3fa550 + Author: Dave Airlie + Date: Tue Apr 10 15:11:09 2012 +0100 + + xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API) + + The EXA interface migrates to ScreenPtr, + and the xf86 interface migrated to ScrnInfoPtr. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 94f1f21d17e86f96d4a54292a399160950087675 + Author: Dave Airlie + Date: Tue Apr 10 15:02:11 2012 +0100 + + xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API) + + This migrates the ValidMode to passing a ScrnInfoPtr instead + of an index. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 3f8f18198fed4f39ec805b508a3482e91eea26b2 + Author: Dave Airlie + Date: Tue Apr 10 14:59:46 2012 +0100 + + xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2) + + This migrate the SwitchMode interface to take a ScrnInfoPtr + instead of an index. + + v2: drop flags. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit d06a038a5c49328ab3a8d969d24f9fcd22c63202 + Author: Dave Airlie + Date: Tue Apr 10 14:50:37 2012 +0100 + + xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2) + + This converts AdjustFrame code paths to passing a ScrnInfoPtr + instead of an integer index. + + v2: drop flags args. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90 + Author: Dave Airlie + Date: Tue Apr 10 14:41:27 2012 +0100 + + xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2) + + Another index->pScrn conversion. + + v2: drop flags arg. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3 + Author: Dave Airlie + Date: Tue Apr 10 14:35:41 2012 +0100 + + xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2) + + This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr + instead of an index into xf86Screens. This allows dropping more + public dereferences of the xf86Screens and screenInfo. + + v2: drop flags args as suggested by Keith, fix docs. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + + commit 06729dbbc804a20242e6499f446acb5d94023c3c + Author: Dave Airlie + Date: Tue Apr 10 14:04:59 2012 +0100 + + xserver: remove index from CloseScreen (API/ABI breakage) + + This drops the index from the CloseScreen callback, + its always been useless really, since the pScreen contains it. + + Reviewed-by: Alan Coopersmith + Acked-by: Aaron Plattner + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 12f9aaff38ac2cf528387ce610e41fbd448698e2 +Author: Chase Douglas +Date: Fri Apr 6 12:44:07 2012 -0700 + + test/touch: Initialize device name + + Without this change, the test will segfault when we switch to signal- + safe logging. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 3476eb38063473a7a5fcd78e2095e284118de839 +Merge: 78f0d9c 42ae2e8 +Author: Keith Packard +Date: Sun Jun 3 20:24:24 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 42ae2e8199fe875319978249963de7499607988b +Author: Siddhesh Poyarekar +Date: Tue May 29 10:17:50 2012 +0530 + + xkb: Allocate size_syms correctly when width of a type increases + + The current code seems to skip syms with width less than + type->num_levels when calculating the total size for the new + size_syms. This leads to less space being allocated than necessary + during the next phase, which is to copy over the syms to the new + location. This results in an overflow leading to a crash. + + Signed-off-by: Siddhesh Poyarekar + Signed-off-by: Peter Hutterer + +commit 88c767edb01ed7efb19ffe3a453e16107b27130b +Author: Michal Suchanek +Date: Wed May 23 11:22:05 2012 +0200 + + Fix crash for motion events from devices without valuators + + A WarpPointer request may trigger a motion event on a device without + valuators. That request is ignored by GetPointerEvents but during smooth + scroll emulation we dereference dev->valuators to get the number of axes. + + Break out early if the device doesn't have valuators. + + Signed-off-by: Michal Suchanek + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 78f0d9cdc441a575e15e5f7200ce74750d2f7ad2 +Author: Chad Versace +Date: Wed May 2 16:18:49 2012 -0700 + + dri2: Add DRI2GetParam request (v2) + + Bump dri2proto dependency to 2.7. + Bump DRI2INFOREC_VERSION to 7. + + This new protocol request effectively allows clients to perform feature + detection on the DDX. The request was added in DRI2 protocol 1.4. + + If I had DRI2GetParam in June 2011, when I was implementing support in the + Intel DDX and Mesa for new hardware that required a new DRI2 attachment + format, then I could have avoided a week of pain caused by the necessity + to write a horrid feature detection hack [1] in Mesa. In the future, when + the work begins to add MSAA support to the Intel DDX, having a clean way + to do feature detection will allow us to avoid revisiting and expanding + that hack. + + [1] mesa, commit aea2236a, function intel_verify_dri2_has_hiz + + v2: If driver doesn't define ds->GetParam, dont' crash. Fall back to + default behavior, per keithp. + + Reviewed-by: Keith Packard + Reviewed-by: Eric Anholt (v1) + Reviewed-by: Ian Romanick (v1) + Signed-off-by: Chad Versace + +commit 594b4a4f0601066d09e49a84c5af8c2eb6f07240 +Author: Peter Hutterer +Date: Thu May 24 13:34:11 2012 +1000 + + Xext: include dix-config.h + + silences + In file included from ../include/misc.h:111:0, from hashtable.c:2: + ./include/os.h:559:1: warning: redundant redeclaration of 'strndup' [-Wredundant-decls] + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit d348ab06aae21c153ecbc3511aeafc8ab66d8303 +Author: Julien Cristau +Date: Fri May 11 21:31:50 2012 +0200 + + Xvfb: destroy the screen pixmap in CloseScreen + + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit e4153c1d9138ed40de1c615525066a0f5bb599dc +Author: Julien Cristau +Date: Fri May 11 21:31:49 2012 +0200 + + Xi: make stub DeleteInputDeviceRequest call RemoveDevice + + DeleteInputDeviceRequest is called from CloseDownDevices on reset, so + call RemoveDevice to avoid leaking devices in Xvfb/Xnest/Xwin. + + Signed-off-by: Julien Cristau + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit b840ba5f54de5b00a7700ca49e51308b8cc66f92 +Author: Ian Romanick +Date: Fri Dec 16 14:44:55 2011 -0800 + + glx: Implement protocol for glXCreateContextAttribsARB + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Reviewed-by: Christopher James Halse Rogers + +commit 23612a63fc12be13442a63193a19f883d7a87e5d +Author: Ian Romanick +Date: Fri Dec 16 14:42:51 2011 -0800 + + glx: Make several functions available outside the glxcmds.c compilation unit + + validGlxScreen, validGlxFBConfig, validGlxContext, and + __glXdirectContextCreate will soon be used by createcontext.c. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Reviewed-by: Christopher James Halse Rogers + +commit cd5689cac5ed722e9dc1a3fab9a260b798062ee6 +Author: Ian Romanick +Date: Sat Dec 10 15:15:18 2011 -0800 + + glx: Use one function to add a context to all global tables + + Instead of having separate __glXAddContextToList and AddResource + functions, just have one function that does both steps. + + Signed-off-by: Ian Romanick + Reviewed-by: Jesse Barnes + Reviewed-by: Christopher James Halse Rogers + +commit c1d91ab37025d3e0df7e8f647fb21816fe0e8420 +Author: Ian Romanick +Date: Sat Dec 10 15:11:57 2011 -0800 + + glx: Initialize remaining context fields + + There is no reason to assume the screen's context allocated + initialized these fields, so don't. + + Signed-off-by: Ian Romanick + Reviewed-by: Jesse Barnes + Reviewed-by: Christopher James Halse Rogers + +commit 0db76e5f771fb964e67de716a254850a38e02f19 +Author: Ian Romanick +Date: Sat Dec 10 15:09:57 2011 -0800 + + glx: Initialize all context fields together + + v2: Fix whitespace error noticed by Christopher James Halse Rogers. + + Signed-off-by: Ian Romanick + Reviewed-by: Jesse Barnes + Reviewed-by: Christopher James Halse Rogers + +commit befa76d251eb5de85edb621056eed52784722bc7 +Author: Ian Romanick +Date: Fri Dec 9 17:28:21 2011 -0800 + + glx: Implement GLX SetClientInfoARB protocol + + v2: Bump glproto version to 1.4.15. This patch uses structure names + that only exist in that glproto version and later. Noticed by + Christopher James Halse Rogers. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Reviewed-by: Christopher James Halse Rogers + +commit 8b8cd6f6f4dbf9d058ace638221f31801da7df9f +Author: Ian Romanick +Date: Mon Dec 5 13:52:01 2011 -0800 + + glx: Optionally call DRI2 createContextAttribs from __glXDRIscreenCreateContext + + Signed-off-by: Ian Romanick + Reviewed-by: Christopher James Halse Rogers + +commit 0a9226376c9a44c3b50baad25f2b7d2b9fecb708 +Author: Ian Romanick +Date: Mon Dec 5 13:48:19 2011 -0800 + + glx: Add tracking for GLX_ARB_create_context and GLX_ARB_create_context_profile + + The formatting of the extension data table was mangled by indent. + This patch also undoes that and adds approripate control comments so + that indent won't do it again. + + Signed-off-by: Ian Romanick + Reviewed-by: Dave Airlie + Reviewed-by: Christopher James Halse Rogers + +commit 96d74138b1c0273e88933220d99a893858b649cd +Author: Ian Romanick +Date: Mon Dec 5 10:56:07 2011 -0800 + + glx: Extend __GLXscreen::createContext to take attributes + + The attributes will be used for glXCreateContextAttribsARB additions + in follow-on patches. + + v2: Add missing 'int *error' parameters noticed by Christopher James + Halse Rogers. + + v3: Remove redundant 'int err;' declaration noticed by Christopher + James Halse Rogers. This was supposed to be in v2, but I missed it. + + v4: Add comma missing from additions in v2. Ugh. + + Signed-off-by: Ian Romanick + Reviewed-by: Jesse Barnes + Reviewed-by: Christopher James Halse Rogers + +commit 62f06b0dcde13cb87bc3d0c5ff86d8db7e3ff0ef +Author: Ian Romanick +Date: Fri Dec 2 21:14:46 2011 -0800 + + glx: Don't track GLClientmajorVersion or GLClientminorVersion + + Nothing uses these fields anywhere in the server. + + Signed-off-by: Ian Romanick + Reviewed-by: Jesse Barnes + Reviewed-by: Christopher James Halse Rogers + +commit 724176a87afdb9a79ce6307214bc2e869530aef3 +Author: Ian Romanick +Date: Mon Dec 5 10:55:20 2011 -0800 + + glx: Fix mishandling of shared contexts + + Signed-off-by: Ian Romanick + Reviewed-by: Eric Anholt + Reviewed-by: Christopher James Halse Rogers + +commit 2d4fda4b09e67e47d3e6fc4743fc6e81bfe40f28 +Author: Marcin Slusarz +Date: Mon May 21 21:39:43 2012 +0200 + + xfree86: fix mouse wheel support for DGA clients + + xf86-input-evdev (since "smooth scrolling" support was added) can send mouse + motion and wheel events in one batch, so we need to handle it properly. + Otherwise mouse wheel events which come with motion events are lost + and separate mouse wheel events are handled through non-DGA path. + + Signed-off-by: Marcin Slusarz + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 9bc53d8cb04af2be3feeebb1b10774c2d599a76b +Author: Michal Srb +Date: Tue May 22 21:19:40 2012 -0700 + + dri2: SProcDRI2Connect - send the response. + + The swapped implementation of DRI2Connect is always responding with empty + device and driver values. However the response was only prepared and never + sent (also had undefined .type member), causing e.g. glxinfo get stuck waiting + for response when started remotely from machine with different endianity. + + Signed-off-by: Michal Srb + Reviewed-by: Jeremy Huddleston + Tested-by: Michel Dänzer + Signed-off-by: Keith Packard + +commit 457fc77691b2df66f6dd3ba10ce7c1b61b9b42a3 +Merge: 2e237c8 5a3a98f +Author: Keith Packard +Date: Tue May 22 10:32:29 2012 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit 2e237c838fe1780c2fcbd2306f35fd15b6747831 +Author: Dave Airlie +Date: Wed Apr 11 10:02:25 2012 +0100 + + xf86: reimplement XF86SCRNINFO macro using new functions. + + This macro did lookups via privates but we can just use the ScreenToScrn + conversion instead. + + This patch drops all in-server uses, we should drop the macro later, + once drivers have been converted to not use it. + + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 8da35202f390cd8a0410814911017d99fa9dddcb +Author: Dave Airlie +Date: Wed Apr 11 09:53:35 2012 +0100 + + xf86/modes: drop more pScrn->pScreen usages + + Just simple conversion to use the lookup function. + + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit e7a9e30fd20a7c2a526783726d0a76b8a04b053a +Author: Dave Airlie +Date: Wed Apr 11 09:52:37 2012 +0100 + + xaa: convert pScrn->pScreen to use accessor. + + This uses a standard conversion function to do the conversion. + + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 738367ac9b6179593a38074d0105de206cbed296 +Author: Dave Airlie +Date: Wed Apr 11 09:46:39 2012 +0100 + + xf86/modes: drop two uses of screenInfo + + Just use new macros to access scrn->screen. + + Reviewed-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit cc4fe613d0b0891ea9502340801b37e64301f573 +Author: Dave Airlie +Date: Sat May 5 09:47:24 2012 +0100 + + render/exa: use glyph picture accessors + + use the glyph picture accessors in the X server, render and EXA code. + + Reviewed-by: Aaron Plattner + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit a45e1d6cc6f2a5f31ed737294351cfa251caa030 +Author: Dave Airlie +Date: Sat May 5 09:38:28 2012 +0100 + + render: add GetGlyphPicture accessor. + + This is a new API to stop the drivers directly looking up the glyph pictures + in a global array. It provides a define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR for + drivers to work in a compat way. + + Reviewed-by: Aaron Plattner + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 41151f88a62f01b00c1912822b8b430df1eb307e +Author: Dave Airlie +Date: Tue Apr 10 15:47:33 2012 +0100 + + xf86: migrate to using xf86ScreenToScrn wrapper (v2) + + migrate to new helper API. + + This just wraps all the obvious uses of xf86Screens[pScreen->myNum], + and should be fairly simple to review. + + v2: remove commented out lines. + + Reviewed-by: Aaron Plattner + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 53932b3803fa2c02949fd7d4d0e433ea58fa89f1 +Author: Dave Airlie +Date: Tue Apr 10 15:47:32 2012 +0100 + + xf86: add helper functions to convert to from ScrnInfoPtr/ScreenPtr (v2) + + These are just simple functions that we should start migrating drivers + to using. + + The end goal is to remove xf86Screens and screenInfo from the ABI. + + This includes a define XF86_HAS_SCRN_CONV that drivers can ifdef to provide + their own copies. I'll probably post a generic compat.h file for drivers later. + + v2: add asserts. + + Reviewed-by: Aaron Plattner + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + +commit 39f73e813f7d404498629f6104a9003d092af28d +Author: Dave Airlie +Date: Tue May 8 13:01:12 2012 +0100 + + xf86/pci: fix slot claiming counting. + + Currently if we claim a slot for a PCI driver, we never let it go properly, + this prevents the fallback probe from reusing the slot, even though it + isn't claimed for that pci slot. + + So if you set the modesetting driver to point at a specific kms device, + that isn't a PCI device (i.e. USB dongle), then the modesetting driver + loads, the pci probe tries to bind the config slot to the primary PCI + device, however we then check the kms device bus id to discover it + isn't valid. However we don't remove the claim on the slot. Next the + old probe function is called and there is no slots to claim. + + This patch fixes that and converts the pciSlotClaimed boolean into + a counter, and changes the unclaim api to take a device pointer + to remove from the entity. + + Reviewed-by: Adam Jackson + Signed-off-by: Dave Airlie + +commit 07dcc3f1a98dff2ee374a15ac5beac778d2ccc97 +Author: Dave Airlie +Date: Sun May 6 17:13:02 2012 +0100 + + config/udev: add pre_init stage to config and udev. + + In order to use udev for gpu enumeration, we need to init udev earlier + than input initialisations. This splits the config init stuff so that udev + pre init sets up before output initialisation. + + this is just a prepatory patch, doesn't change anything major. + + Reviewed-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit a2a02882ab65133e6c0c69db1f38bc20b406236f +Author: Dave Airlie +Date: Sun May 6 17:35:34 2012 +0100 + + xfree86: add modesetting driver to fallback list on Linux + + Add the modesetting driver to the fallback list on Linux, after vesa + before fbdev. + + Acked-by: Peter Hutterer + Signed-off-by: Dave Airlie + +commit 5a3a98fcb799c2ac8fa7494645ad9030f1cac837 +Author: Alan Coopersmith +Date: Fri Apr 27 13:35:32 2012 -0700 + + Undocument Font Module loading + + Code was deleted in commit affec10635343668839994ea2bac16c1d4524200 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Dave Airlie + Reviewed-by: Adam Jackson + +commit afcb7ba24ebd9968d48a192df438e7f1c0ecb770 +Author: Alan Coopersmith +Date: Fri Apr 27 13:31:56 2012 -0700 + + Undocument mandatory loadable modules + + The code to implement was deleted when BaseModules[] was emptied by + the replacement of the "pcidata" module with libpciaccess calls + in commit 46f55f5dead5d70cdff30531d80a72f6be042315. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Dave Airlie + Reviewed-by: Adam Jackson + +commit c3180a74a4fc6304bcfe676e3285d707874a9fea +Author: Alan Coopersmith +Date: Fri Apr 6 21:51:37 2012 -0700 + + cvt man page should use Hz, not kHz, for vertical refresh rate + + https://bugs.freedesktop.org/show_bug.cgi?id=48311 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + +commit 96e0ab54962ab59f03275a098ee02c1f0f86b94e +Author: Alan Coopersmith +Date: Thu Jan 26 15:44:40 2012 -0800 + + Convert sbusPaletteKey to latest DevPrivate API + + Signed-off-by: Alan Coopersmith + Reviewed-by: Mark Kettenis + Reviewed-by: Dave Airlie + +commit ba883a0f3435d5da82a8134e696c4905eea70f23 +Merge: ae1c48e acdc4f5 +Author: Keith Packard +Date: Thu May 17 16:49:19 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit acdc4f54ee5784d26c251ff8c941b4360ae80e9b +Author: Jeremy Huddleston +Date: Thu May 17 10:08:02 2012 -0700 + + XQuartz: Avoid a race in initialization of darwinPointer + + http://xquartz.macosforge.org/trac/ticket/579 + + Signed-off-by: Jeremy Huddleston + +commit c495211373a118acee02a29c6eb25a332abc856c +Author: Jeremy Huddleston +Date: Thu May 17 16:20:30 2012 -0700 + + XQuartz: Declare noPseudoramiXExtension for miinitext.c + + Regression-from: 6699f54fe0b3f4952a75e46fb6c3a643988e65dd + + Signed-off-by: Jeremy Huddleston + +commit f5fc5334116ad2b0c8930ac68c52bf0f7a2f1417 +Author: Jeremy Huddleston +Date: Mon May 7 17:07:27 2012 -0700 + + XQuartz: Provide fls implementation for Tiger + + Regression-from: 30623d6ff7bca223f9e1a825e86bd317eef8bf16 + Signed-off-by: Jeremy Huddleston + +commit e0097ce9719f9b0aeccf7102630c0299f8acdf93 +Author: Jeremy Huddleston +Date: Mon May 7 16:31:38 2012 -0700 + + XQuartz: Tiger build fix + + http://trac.macports.org/ticket/34364 + + Regression-from: 662d41acdde1dcb9774fbe4054e251c708acaffe + + Reported-by: Peter Dyballa + Signed-off-by: Jeremy Huddleston + +commit 4acbaa3027d89728ed932616f6ef66d93537b101 +Author: Jeremy Huddleston +Date: Mon May 7 16:16:20 2012 -0700 + + XQuartz: Workaround an SDK bug on Leopard/x86_64 + + Signed-off-by: Jeremy Huddleston + +commit ae1c48ebc8a3c0b32b3d732e8a340bfe00bb9f79 +Author: Peter Hutterer +Date: Wed May 16 10:54:48 2012 +1000 + + Xi: fix "discards ''const' qualifier" warnings + + extinit.c: In function 'XInputExtensionInit': + extinit.c:1301:29: warning: assignment discards 'const' qualifier from + pointer target type [enabled by default] + extinit.c:1303:36: warning: assignment discards 'const' qualifier from + pointer target type [enabled by default] + + property.c: In function 'XIChangeDeviceProperty': + xiproperty.c:757:39: warning: cast discards '__attribute__((const))' + qualifier from pointer target type [-Wcast-qual] + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e42bf98283ddc4eac2213c96e8ebcd711583e6b1 +Author: Peter Hutterer +Date: Wed May 16 10:47:45 2012 +1000 + + Xi: fix "shadows previous local" warnings + + exevents.c: In function 'DeepCopyFeedbackClasses': + exevents.c:272:20: warning: declaration of 'classes' shadows a previous + local [-Wshadow] + exevents.c:245:16: warning: shadowed declaration is here [-Wshadow] + (and a few more like this) + + exevents.c: In function 'DeliverTouchEmulatedEvent': + exevents.c:1442:27: warning: declaration of 'win' shadows a parameter + [-Wshadow] + exevents.c:1404:55: warning: shadowed declaration is here [-Wshadow] + exevents.c:1475:28: warning: declaration of 'listener' shadows a parameter + [-Wshadow] + exevents.c:1403:62: warning: shadowed declaration is here [-Wshadow] + + xiselectev.c: In function 'ProcXISelectEvents': + xiselectev.c:178:34: warning: declaration of 'dummy' shadows a previous + local [-Wshadow] + xiselectev.c:91:18: warning: shadowed declaration is here [-Wshadow] + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit ca6d25ad2d1fb4efae9d40c7e74c8494f9918625 +Author: Peter Hutterer +Date: Wed May 16 10:10:11 2012 +1000 + + dix: Move DeviceFocusEvent from Xi into enterleave.c + + This is only called from the enterleave implementation, so move it and its + helper functions to there. No functional changes. + + Fixes build error introduced in 31174565ec0090b4c03c9334c82878be2455f938 if + building with '-Werror=implicit-function-declaration' + + Signed-off-by: Peter Hutterer + Reviewed-by: Dave Airlie + Reviewed-by: Jeremy Huddleston + +commit 749a593e49adccdf1225be28a521412ec85333f4 +Author: Peter Hutterer +Date: Wed May 9 11:30:46 2012 +1000 + + dix: undo transformation for missing valuators (#49347) + + last.valuators contains the transformed valuators of the device. If the + device submits events with x/y missing, we need to get that from + last.valuators and undo the transformation to that axis. + + X.Org Bug 49347 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 03318835a5a87a8a5cb3515130b5380d565c0d91 +Author: Peter Hutterer +Date: Mon May 14 15:06:56 2012 +1000 + + include: don't redeclare device events in xkbsrv.h + + ../../include/xkbsrv.h:308:51: warning: redundant redeclaration of + ‘DeviceKeyPress’ [-Wredundant-decls] + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 43754803c13c232fd5c37eb3d4b1ca2898d6a6cd +Author: Peter Hutterer +Date: Mon May 14 15:07:57 2012 +1000 + + test: don't shadow parameter 'len' + + protocol-xiquerydevice.c:226:25: warning: declaration of ‘len’ shadows a + parameter [-Wshadow] + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 1bafc9f26bef0997c98b97efa888ed5e2a54f6f0 +Author: Peter Hutterer +Date: Mon May 14 15:01:09 2012 +1000 + + test: fix redundant declaration of "BadDevice" + + In file included from protocol-common.c:36:0: + protocol-common.h:36:12: warning: redundant redeclaration of ‘BadDevice’ + [-Wredundant-decls] + In file included from protocol-common.c:30:0: + ../../Xi/exglobals.h:41:12: note: previous declaration of ‘BadDevice’ was + here + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 47e1d0ea43eb7a6caf774f375f11849d0d515e14 +Author: Peter Hutterer +Date: Mon May 14 14:56:02 2012 +1000 + + test: fix "userdata shadows global declaration" warnings + + protocol-xiquerypointer.c:124:72: warning: declaration of + ‘userdata’ shadows a global declaration [-Wshadow] + + and similar + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e6da635826bdda7f67bd492dda8dba8a97809213 +Author: Peter Hutterer +Date: Mon May 14 14:51:58 2012 +1000 + + test: fix "redundant declaration of devices" warning + + In file included from protocol-xiwarppointer.c:41:0: + protocol-common.h:91:23: warning: redundant redeclaration of ‘devices’ + [-Wredundant-decls] + protocol-common.h:86:3: note: previous declaration of ‘devices’ was here + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 693a31e704c0745b209e69711522417c4fa8541e +Author: Simon Thum +Date: Mon Apr 2 18:49:53 2012 +0200 + + dix: indentation fixes for pointer acceleration + + Signed-off-by: Simon Thum + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 31174565ec0090b4c03c9334c82878be2455f938 +Author: Michal Suchanek +Date: Wed Apr 25 15:03:31 2012 +0200 + + dix: Remove redundant declarations. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit f1cec791d1def506b99b0e6c160e9e8be107bd13 +Author: Michal Suchanek +Date: Tue Apr 24 20:08:02 2012 +0200 + + xfree86: Add ifdef wrapper to xvmodproc.h + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit d2f71b13946a14d9698d0355cc45b114b236e73b +Author: Michal Suchanek +Date: Tue Apr 24 18:44:48 2012 +0200 + + Xi: Remove redundant declaration. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit a4f87f885a55373a6daf56fd540e10c5f1db5a5c +Author: Michal Suchanek +Date: Tue Apr 24 18:43:31 2012 +0200 + + kdrive: Remove redundant declarations. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit 369edd78769fa1a174e4091d0fa0722350df5d68 +Author: Michal Suchanek +Date: Tue Apr 24 18:41:07 2012 +0200 + + dix: don't duplicate DoFocusEvents declaration. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit 36377fb0e88a6d237d98805e802ab3793582c976 +Author: Michal Suchanek +Date: Tue Apr 24 18:37:30 2012 +0200 + + dix: Remove redundant declarations. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit ea9ed83f8f0da241099d0a11c3460d46c5114dea +Author: Michal Suchanek +Date: Tue Apr 24 18:32:53 2012 +0200 + + xfree86: don't include xvmodproc.h when not needed + + The functions are already declared in xf86xv.h + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit 1927e5ab25c9c9bf481e75ac50f4b140a96e634a +Author: Michal Suchanek +Date: Tue Apr 24 18:24:19 2012 +0200 + + xserver: Remove duplicate declaration in resource.h + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit 1339681e4fbd4f5981e6246eedb23e8a9c5d10f4 +Author: Michal Suchanek +Date: Tue Apr 24 18:19:43 2012 +0200 + + miext: Remove redundant declaration. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit 6699f54fe0b3f4952a75e46fb6c3a643988e65dd +Author: Michal Suchanek +Date: Tue Apr 24 18:18:43 2012 +0200 + + mi: Remove redundant declarations. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit b4bf90f9fb20e0e56d2451096d4f62ecfc24a962 +Author: Michal Suchanek +Date: Tue Apr 24 18:16:30 2012 +0200 + + exa: Remove redundant declaration. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit 5595e7ce0735db6f82e1fe9df45434826019bf9e +Author: Michal Suchanek +Date: Tue Apr 24 18:15:17 2012 +0200 + + randr: Remove redundant declaration. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit c59c9dac84301f8eb2a0e4a09a8839146aa5a069 +Author: Michal Suchanek +Date: Tue Apr 24 18:13:22 2012 +0200 + + xkb: Remove redundant declarations. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit d0a83460451df1a4c5667b2f414c35ee81b4ffa4 +Author: Michal Suchanek +Date: Tue Apr 24 18:11:16 2012 +0200 + + xfixes: remove redundant declaration. + + Signed-off-by: Michal Suchanek + Reviewed-by: Dave Airlie + Signed-off-by: Dave Airlie + +commit 3a94b338aaa48b656aae1bb3a5a9d64300c0a093 +Merge: afc153a c91d00e +Author: Keith Packard +Date: Wed May 9 21:17:16 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit afc153a5b4fc58ae70dc214f61a71b1a8c855f06 +Author: James Cloos +Date: Tue May 8 17:55:10 2012 -0400 + + Fix RANDR’s gamma_to_ramp(). + + In order to generate a 256-entry ramp in [0,65535] which covers the full + range, one must mupliply eight-bit values not by 256 but rather by 257. + + Many years back – well before the RANDR extension was written, and + before xorg@fdo – a similar bug fix was made to the DIX for converting + client-supplied eight-bit color values into sixteen-bit values. + + Noticed by: Elle Stone and Graeme Gill. + + Signed-off-by: James Cloos + +commit e501c34d4937d5e6f19abd29f1ec7f95faa3bb55 +Author: Yaakov Selkowitz +Date: Tue May 1 22:03:24 2012 -0500 + + hw/xwin/glx: Use silent rules + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + +commit 026d402fef623a0bda0bedd9c0938ba787bf9829 +Author: Yaakov Selkowitz +Date: Fri Mar 30 14:33:18 2012 -0500 + + xfree86: use silent rules with sdksyms generation + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + +commit 3d98dac46c17bc6e03546b8a532bfb55f00e5084 +Author: Yaakov Selkowitz +Date: Sun Apr 29 20:45:17 2012 -0500 + + xfree86: respect EXEEXT in relink target + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + +commit e6461db6dcb437cfa7d4b23008c2c12f8169ff79 +Author: Yaakov Selkowitz +Date: Thu Apr 26 01:49:06 2012 -0500 + + os: Add CryptoAPI as a choice of SHA1 implementation + + Both Cygwin and MinGW can use Windows' native CryptoAPI for SHA1, + saving a dependency on libgcrypt or OpenSSL. The necessary functions + are in ADVAPI32.DLL, which is among the default lib flags and is + already used in hw/xwin for accessing the registry. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Mikhail Gusarov + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + Tested-by: Colin Harrison + +commit c91d00e0f330b9de604068e1bfcb0a307096434f +Author: Daniel Kurtz +Date: Wed Apr 18 17:51:53 2012 +0800 + + os/log: refactor logging + + It is not safe to ever use an arbitrary (possibly user supplied) string as + part of the format for a *sprintf() call. + + For example: + 1. Name a Bluetooth keyboard "%n%n%n%n%n%n%n%n" + 2. Pair it with a computer running X and try to use it + 3. X is not happy when trying to do the following in xf86-input-evdev: + xf86IDrvMsg(pInfo, X_CONFIG, "Device: \"%s\"\n", device); + because LogVHdrMessageVerb() has put the %n from the device name + into a format string of the form: + "evdev: %n%n%n%n%n%n%n%n: Device: \"%s\"\n" + + Instead, build up a log message in place by appending successive formatted + strings by sncprintf'ing to the end of the previous. + + Signed-off-by: Daniel Kurtz + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 6ce0eac4f8a05f6d7401445cab95027709d3a479 +Author: Daniel Kurtz +Date: Wed Apr 18 17:51:52 2012 +0800 + + os/log: only write timestamp if a message is actually written to logfile + + The current code will write a timestamps into the logFile whenever + the last message ended with a '\n' - even if the verb for that timestamp + is at too high a level. This timestamp will sit there with no matching + message until the next call to LogVWrite with a valid verb. + + In other words, in some cases, timestamps in the X.org.log are for some + completely unrelated message that was previously ignored due to + insufficient verbosity, and not for the message that appears next to it + in the log file. + + We keep the current policy which appears to be to only apply timestamps if + a message is actually written to a log file. That is, no timestamps on + stderr, or in the mem buffer. Therefore, the timestamp stringification + is moved to the conditional where it is used. + + Since logging uses a fixed length buffer, this patch also forces a '\n' + whenever a buffer is terminated due to a too-long write request. This + allows the newline detection to work even on overflow, and also cleans up + the log a bit in the overflow case. + + Signed-off-by: Daniel Kurtz + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 5c2e2a164d615ab06be28a663734e782614b5cc7 +Author: Daniel Kurtz +Date: Wed Apr 18 09:51:51 2012 +0000 + + os/xprintf: add Xvscnprintf and Xscnprintf + + Normal snprintf() usually returns the number of bytes that would have been + written into a buffer had the buffer been long enough. + + The scnprintf() variants return the actual number of bytes written, + excluding the trailing '\0'. + + Signed-off-by: Daniel Kurtz + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit c30862879d2c766519780bb7f353f35edf0daa9b +Author: Daniel Kurtz +Date: Wed Apr 18 17:51:50 2012 +0800 + + os/log: trivial cleanups + + * space->tab + * remove comment that doesn't make any sense + + Signed-off-by: Daniel Kurtz + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 97041364a6acb2b66b5cfd06757c90a006ad50e9 +Merge: 1908272 ee542b8 +Author: Keith Packard +Date: Wed May 2 20:47:25 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + + No conflicts here + +commit ee542b85590814ee25369babce1ad14feeb137af +Author: Chase Douglas +Date: Tue May 1 10:21:12 2012 -0700 + + Report touch emulated buttons in XIQueryPointer for XI 2.1 and earlier + + XInput 2.1 and earlier clients do not know about touches. We must report + touch emulated button presses for these clients. For later clients, we + only report true pointer button presses. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 19082726cb2c69f53e9720904521e3c98f788bff +Author: Ryan Pavlik +Date: Fri Oct 21 12:47:38 2011 -0500 + + configure.ac: on MinGW, link with ws2_32 instead of winsock2 + + ws2_32 is the correct name for the libary (even on 64 bit Windows :-)) + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Reviewed-by: Yaakov Selkowitz + +commit ad9605a3e21b20fa8565dc6701610712ac6dd9e1 +Author: Ryan Pavlik +Date: Fri Nov 4 13:26:14 2011 -0500 + + configure.ac: MinGW doesn't have setuid binaries either. + + If the target platform isn't in a list of platforms we know don't use a + setuid binary, we try to test if we can chown something to root. + + This test possibly won't give the right answer if we are cross-compiling, + which is common for the MinGW target. This patch adds MinGW to the list + of platforms we know don't use a setuid binary. + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Reviewed-by: Yaakov Selkowitz + +commit 2225208c2ef9857f14813376ce85d305f19263dd +Author: Ryan Pavlik +Date: Fri Nov 4 13:30:43 2011 -0500 + + configure.ac: auto-disable MITSHM if we lack IPC + + The MITSHM extension uses SYSV IPC, but even if configure's test + for IPC failed, MITSHM was still enabled by default, breaking + MinGW builds by default. + + Unfortunately, fixing this exposes the fact that the HAVE_SYSV_IPC + test wasn't being used for anything before and so we hadn't noticed it + was failing on Cygwin. + + Change from using SHM_W|SHM_R flags (which aren't required by POSIX) to + S_IRUSR|S_IWUSR flags (which are) + + Signed-off-by: Ryan Pavlik + Reviewed-by: Jon TURNEY + Reviewed-by: Yaakov Selkowitz + +commit 1e7b500a8e1d79b91a4e857a2da06194efe8cf69 +Author: Chase Douglas +Date: Tue May 1 10:21:11 2012 -0700 + + Report logical button state in ProcXIQueryPointer + + Physical button state is usually meaningless to an X client. + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit 0426e6d65b6598edfbcb2fc66ee65fb08256469e +Author: Jon TURNEY +Date: Tue Jan 3 00:14:32 2012 +0000 + + configure.ac: Make default configuration for MinGW disable unsupported extensions and DDXs + + Same as the default configuration for Cygwin, --disable-xorg and --disable-dmx DDX by default, + and force --disable-xv and other unsupported extensions + + Signed-off-by: Jon TURNEY + Reviewed-by: Yaakov Selkowitz + +commit f3410b97cf9b48a47bee3d15d232f8a88e75f4ef +Author: Peter Hutterer +Date: Mon Apr 30 10:01:48 2012 +1000 + + dix: when disabling a device, release all buttons and keys + + A suspend-induced device disable may happen before the device gets to see + the button release event. On resume, the server's internal state still has + some buttons pressed, causing inconsistent behaviour. + + Force the release and the matching events to be sent to the client. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit af88b43f9e604157b74270d609c08bdfa256a792 +Author: Peter Hutterer +Date: Fri Apr 27 16:31:17 2012 +1000 + + dix: don't emulate scroll events for non-existing axes (#47281) + + Test case: + - create a device with REL_HWHEEL and ABS_X and ABS_Y. evdev 2.7.0 will set + that up as device with 1 relative axis + - move pointer to VGA1 + - xrandr --output VGA1 --off + + Warps the pointer to the new spot and calls GPE with the x/y mask bits set. + When running through the loop to check for scroll event, this overruns the + axes and may try to emulate scroll events based on random garbage in the + memory. If that memory contained non-zero for the scroll type but near-zero + for the increment field, the server would hang in an infinite loop. + + This was the trigger for this suggested, never-merged, patch here: + http://patchwork.freedesktop.org/patch/9543/ + + X.Org Bug 47281 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 08962951de969b9d8c870af8b6e47303dc0decfd +Author: Peter Hutterer +Date: Fri Apr 27 10:52:39 2012 +1000 + + os: make timers signal-safe + + If TimerSet() is called from a signal handler (synaptics tap handling code) + may result in list corruption if we're currently inside TimerSet(). + + See backtrace in + https://bugzilla.redhat.com/show_bug.cgi?id=814869 + + Block signals for all list manipulations in the timers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit d662fa2450856777b59c4b62b912395a8bfd52fd +Author: Michal Suchanek +Date: Thu Apr 26 15:11:20 2012 +0200 + + dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN + + and fix resulting printf warning in dmxLogVisual + + Signed-off-by: Michal Suchanek + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 5c361d59c5031d9b3f7f9093a52d2b1ff4d9ae5f +Author: Chase Douglas +Date: Fri Apr 20 11:08:15 2012 -0700 + + TouchListenerAcceptReject: Warn and return early on bad listener index + + Signed-off-by: Chase Douglas + Reviewed-by: Bryce Harrington + Signed-off-by: Peter Hutterer + +commit 88bacc49f06da5927f716869f5a32672a8297ed0 +Author: Chase Douglas +Date: Wed Apr 4 15:29:42 2012 -0700 + + os: Add -displayfd option + + This option specifies a file descriptor in the launching process. X + will scan for an available display number and write that number back to + the launching process, at the same time as SIGUSR1 generation. This + means display managers don't need to guess at available display numbers. + As a consequence, if X fails to start when using -displayfd, it's not + because the display was in use, so there's no point in retrying the X + launch on a higher display number. + + Signed-off-by: Adam Jackson + Signed-off-by: Chase Douglas + Reviewed-by: Julien Cristau + Tested-by: Julien Cristau + Reviewed-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit 1d82ec95942b88dd01f0ac6b883368360a0b5fe6 +Author: Michal Suchanek +Date: Mon Apr 23 13:52:40 2012 +0200 + + xserver: Fix out-of-tree build + + Fixes regression caused by ccb3e78124fb05defd0c9b438746b79d84dfc3ae + + Signed-off-by: Michal Suchanek + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit ea51e9b2877df60135edaf2a8f88d0f2a2b41060 +Author: Peter Hutterer +Date: Mon Apr 23 10:35:53 2012 +1000 + + Xi: return BadValue on XIQueryVersion if the version is less than first call + + Clients that use plugin systems may require multiple calls to + XIQueryVersion from different plugins. The current error handling requires + client-side synchronisation of version numbers. + + The first call to XIQueryVersion defines the server behaviour. Once cached, + always return that version number to any clients. Unless a client requests a + version lower than the first defined one, then a BadValue must be returned + to be protocol-compatible. + + Introduced in 2c23ef83b0e03e163aeeb06133538606886f4e9c + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit 93d6ba5b711cbd3f502d83e54c9739856d2e6f2a +Author: Jeremy Huddleston +Date: Thu Apr 26 21:17:54 2012 -0700 + + XQuartz: Make sure we tell startx the correct server binary to use in our fallback path + + With multiple servers installed, we can't be certain if X is Xorg or Xquartz + + Signed-off-by: Jeremy Huddleston + +commit fa6dddc6ce51c1b7a43fb379fb2a19550f6c8683 +Author: Michal Suchanek +Date: Wed Mar 28 18:12:39 2012 -0700 + + xfree86: workaround crash on close + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 + + Signed-off-by: Michal Suchanek + Reviewed-by: Jeremy Huddleston + Tested-by: Knut Petersen + +commit adcb48a29dcb3f32ff570551de4b014775c1e147 +Author: Jonas Maebe +Date: Sun Apr 22 20:52:47 2012 -0700 + + glapi: Correct size of allocated _glapi_table struct + + The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct + as an array of _glapi_get_dispatch_table_size() pointers, so we have to + allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather than + sizeof(struct _glapi_struct) bytes. + + Signed-off-by: Jonas Maebe + Reviewed-by: Jeremy Huddleston + +commit e34519e525559b01a63d26639f13f0487468de28 +Author: Jeremy Huddleston +Date: Thu Apr 19 16:38:06 2012 -0700 + + XQuartz: darwinPointer now sends both absolute and relative motion + + This should hopefully help out wine clients that were continuing to + have issues after the earlier changes. + + http://xquartz.macosforge.org/trac/ticket/548 + + Signed-off-by: Jeremy Huddleston + +commit 662d41acdde1dcb9774fbe4054e251c708acaffe +Author: Jeremy Huddleston +Date: Thu Apr 19 18:48:22 2012 -0700 + + XQuartz: Add a hack to better handle clicky wheel scroll mice + + We loose information from AppKit being in our way. Before adopting + smooth scrolling, we always rounded-up the number of scroll button + clicks per NSEvent. Now, the scroll value is accumulated in the + dix, and clicky scroll wheels with legacy X11 clients are seeing + an accumulation of error due to so many translations (button press + to smooth scrolling value in AppKit, passed to the dix, and then + synthesized into a button press). This attempts to make the + situation better. + + http://xquartz.macosforge.org/trac/ticket/562 + + Signed-off-by: Jeremy Huddleston + +commit eda85290ae47d8dd497ef9335d10268bbe3e02a0 +Author: Jeremy Huddleston +Date: Thu Apr 19 16:20:30 2012 -0700 + + XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen + + Signed-off-by: Jeremy Huddleston + +commit b99586c9086ac29df144ef75df92f8c0c7554651 +Author: Jeremy Huddleston +Date: Wed Apr 18 17:50:55 2012 -0700 + + XQuartz: Separate out tablet and mouse event delivery into separate functions + + This should have no immediate impact aside from fake mouse buttons no longer + working with tablets (where they aren't needed or desired anyways). This + prepares us for future changes. + + Signed-off-by: Jeremy Huddleston + +commit 30623d6ff7bca223f9e1a825e86bd317eef8bf16 +Author: Jeremy Huddleston +Date: Thu Apr 19 16:06:45 2012 -0700 + + XQuartz: Correct calculation of the size of our file descriptor array in console_redirect + + Reported-by: Joe Rohde + Signed-off-by: Jeremy Huddleston + +commit b4c4c65a35640e7274ccd4228f62110147878b72 +Author: Jeremy Huddleston +Date: Wed Apr 18 01:01:44 2012 -0700 + + XQuartz: Fix a deadlock in pre-dispatch code + + The fact that this has been in place so long makes me really wonder if + anybody cares about this running in Tiger or Leopard. + + Signed-off-by: Jeremy Huddleston + +commit d1ef0d4964e43a4ab777750ad214d1092fd1ffda +Author: Jeremy Huddleston +Date: Sat Apr 7 15:26:53 2012 -0700 + + test: Fix make dist + + It seems like make dist should be doing te right thing without this commit, + but it's not in some cases. Don't ask me to explain why. + + Signed-off-by: Jeremy Huddleston + +commit d97868d934fd1a00f9e9ef23a1154a70c7bc0464 +Author: Jeremy Huddleston +Date: Thu Apr 19 16:39:23 2012 -0700 + + os: Annotate OsVendorFatalError as _X_ATTRIBUTE_PRINTF + + Signed-off-by: Jeremy Huddleston + Tested-By: Michal Suchanek + +commit 0ba1794fe2896395875f62e911720c7585687444 +Author: Jeremy Huddleston +Date: Thu Apr 19 16:51:46 2012 -0700 + + xres: Fix build without composite + + Regression from: b8d0d19a6d410776b53a41e7cae90f68d4b22bb7 + Signed-off-by: Jeremy Huddleston + Reviewed-by: Rami Ylimäki + Tested-By: Michal Suchanek + +commit d77eb7ee49ef19c2c4c7381d56e9d0f9c3fbc890 +Merge: 31e3c0f c7b1625 +Author: Keith Packard +Date: Thu Apr 19 15:48:34 2012 -0500 + + Merge remote-tracking branch 'yselkowitz/master' + + Pull in Cygwin for XFree86 + +commit 31e3c0ff7f5fb36421be8de06e5f6e675ec26ddc +Author: Keith Packard +Date: Thu Apr 19 15:25:41 2012 -0500 + + Export CompositeClientWindowType + + Make sure CompositeClientWindowType is visible for XResource v1.2 + + Signed-off-by: Keith Packard + +commit e6308e32fe2b5f74133d4d238ffa512257f6327c +Merge: 3720aa3 51a8d8d +Author: Keith Packard +Date: Thu Apr 19 10:45:07 2012 -0500 + + Merge remote-tracking branch 'whot/for-keith' + + Touch input changes from Chase + +commit 51a8d8dd19d7496fe84b37a1f0a7a03658120539 +Merge: ebf2148 00cf1c4 +Author: Peter Hutterer +Date: Thu Apr 19 17:03:54 2012 +1000 + + Merge branch 'input-fixes' of git://people.freedesktop.org/~cndougla/xserver into for-keith + +commit 00cf1c40b28417d7035c2917d048553eb720023c +Author: Chase Douglas +Date: Wed Apr 18 18:21:54 2012 -0700 + + Replay original touch begin event instead of generated begin event + + The generated event does not have axes other than X and Y and has a + newer timestamp. In particular, the newer timestamp may be newer than + the real touch end event, which may be stuck in the syncEvents queue. If + a client uses the timestamps for grabbing bad things may happen. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 312910b4e34215aaa50fc0c6092684d5878dc32f +Author: Chase Douglas +Date: Wed Apr 18 11:15:40 2012 -0700 + + Update currentTime in dispatch loop + + A request, like input device grabs, may check a request timestamp + against currentTime. It is possible for currentTime to lag a previously + sent event timestamp. If the client makes a request based on such an + event timestamp, the request may fail the validity check against + currentTime unless we always update the time before processing the + request. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit a986f2f30cbe2a00e72ded7315c4951d7703e549 +Author: Chase Douglas +Date: Tue Apr 17 11:40:15 2012 -0700 + + Update device state including when touch record does not exist + + If a touch is physically active, the pointer core state should reflect + that the first button is pressed. Currently, this only occurs when there + are active listeners of the touch sequence. By moving the device state + updating to the beginning of touch processing we ensure it is updated + according to the processed physical state no matter what. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit ec9c4295830c3de610e65aca17f4da4a7af3c4c5 +Author: Chase Douglas +Date: Wed Apr 18 12:04:58 2012 -0700 + + Check other clients' core masks properly when adding touch listener + + The current code checks the core event mask as though it were an XI + mask. This change fixes the checks so the proper client and event masks + are used. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit e175971a6f44d94aa8306dc6b9228ccb2c8a0b4d +Author: Chase Douglas +Date: Tue Apr 17 11:39:10 2012 -0700 + + Ensure touch is ended when last listener is rejected + + Currently, the touch is only logically ended if the touch has physically + ended. If the touch hasn't physically ended, the touch record is never + ended. If there aren't any more listeners, we don't need to keep the dix + touch record around any more. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit d0449851d1233543c3133d77e0ab7233319cdf5f +Author: Chase Douglas +Date: Tue Apr 17 10:49:14 2012 -0700 + + Create a new dix touch record for an emulated touch with no listeners + + As a special case, if a still physically active pointer emulated touch + has no listeners and the device is explicitly grabbed for pointer + events, create a new dix touch record for the grab only. + + This allows for clients to "hand off" grabs. For example, when dragging + a window under compiz the window decorator sees the button press and + then ungrabs the implicit grab. It then tells compiz to grab the device, + and compiz then moves the window with the pointer motion. This is racy, + but is allowed by the input protocol for pointer events when there are + no other clients with a grab on the device. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 3d06bfe93d33cfe6150d8fb0058ee7bc8d80622b +Author: Chase Douglas +Date: Tue Apr 17 13:56:08 2012 -0700 + + Rename TouchEnsureSprite to TouchBuildSprite and event type checks + + The function will be used for building a sprite for pointer emulation + after an explicit device grab. This commit refactors the code so that + TouchBuildSprite will function with any event type and moves the checks + to the caller. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 2efbed23c29020f9994ab7c3155ce7386950dc7a +Author: Chase Douglas +Date: Tue Apr 17 08:39:38 2012 -0700 + + When activating an explicit grab, update owning listener + + Pointer passive grabs may be changed by the grabbing client. This allows + for a selecting client to change an implicit grab to an active grab, + which is the mechanism used for pop-up windows like application menus. + + We need to do the same thing with touches. If the grabbing client is the + owner of a touch sequence, change the listener record to reflect the new + grab. If the grabbing client is not the owner, nothing changes for the + touch. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit ef64b5ee97099618cf2e2cbbd3e471095695ae24 +Author: Chase Douglas +Date: Mon Apr 16 15:53:51 2012 -0700 + + Don't deactivate implicit pointer grab on fake touch end event + + Fake touch end events are generated by touch acceptance and rejection. + These should not cause implicit pointer grabs to be deactivated. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit fc518cd9f59060cc19bb90361767c0f47f0e25eb +Author: Chase Douglas +Date: Mon Apr 16 15:31:47 2012 -0700 + + End a pointer emulated touch event only on a "real" end event + + Fake end events are generated by touch acceptance or rejection. These + should not end the touch point. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 80d7d1ec6a9d61aa96e7d019dc1bee29d90cea34 +Author: Chase Douglas +Date: Mon Apr 16 14:19:59 2012 -0700 + + On touch accept, only process end event for owner if it has seen the end + + We still need to generate the touch ownership event to process the + ending of the touch event in the case where the owner has the end + already. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 8dfd98245d2c44a1eb4c8b7c275e6cfc10fe40f1 +Author: Chase Douglas +Date: Wed Apr 11 11:14:51 2012 -0700 + + Fix copy/paste error from before git history in UpdateCurrentTimeIf() + + See UpdateCurrentTime() for reference. I don't know what bug this might + trigger, but it wouldn't hurt to fix this. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 6ca30cb33e829b4edd01822367e44ffe6f0951b0 +Author: Chase Douglas +Date: Wed Apr 11 08:17:25 2012 -0700 + + When deactivating an explicit pointer grab, reject all grabs on touches + + Explicit pointer grabs are placed at the head of the touch listener + array for pointer emulated touches. If the grab is deactivated, we must + remove it from all touches for the device. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit cacdb9a74065ccba7d50a82e14abdf04b36c5309 +Author: Chase Douglas +Date: Wed Apr 11 08:13:17 2012 -0700 + + Accept touch sequence for pointer listener after second event delivery + + This is a bit of unimplemented code for touchscreen pointer emulation. A + pointer grabbing client currently never accepts the touch sequence. The + sequence must be accepted once any touch-derived event is irrevocably + delivered to a client. + + The first pointer event, derived from a touch begin event, may be caught + in a sync grab and then replayed. This is essentially a revocable + delivery of an event. Thus, we must wait till a non-begin event is + delivered. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 447fe7a1a72513aa68145962c47894242c589cc9 +Author: Chase Douglas +Date: Wed Apr 11 08:12:08 2012 -0700 + + Split out helper function TouchListenerAcceptReject() + + This will be used for accepting and rejecting touches in the future. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + +commit 93c33403642a3de3c9d141ad7940a7b880846aad +Author: Chase Douglas +Date: Wed Apr 4 12:59:55 2012 -0700 + + Only set XI2 mask if pointer emulation is for XI2 client + + The current code returns a reference to memory that may not actually be + an XI2 mask. Instead, only return a value when an XI2 client has + selected for events. + + Signed-off-by: Chase Douglas + Reviewed-by: Jeremy Huddleston + Acked-by: Peter Hutterer + +commit 4c1dfd21937efc6a85fb204a73dd7d7151d54daa +Author: Chase Douglas +Date: Wed Apr 4 12:57:40 2012 -0700 + + Check core event mask properly for pointer emulated touch events + + The current code checks the core event mask as though it were an XI2 + mask. This change fixes the checks so the proper client and event masks + are used. + + Signed-off-by: Chase Douglas + Reviewed-by: Jeremy Huddleston + Acked-by: Peter Hutterer + +commit 3720aa33ee50788dd3d4acc9bbf8dfcb72c8f5ce +Author: Erkki Seppälä +Date: Thu Apr 7 12:53:51 2011 +0300 + + Added resourceproto version dependency, >= 1.2.0 now required + + Signed-off-by: Erkki Seppälä + +commit 233eab4d05cae1fdb4129a2e9905961b78693f74 +Author: Erkki Seppälä +Date: Wed Dec 8 17:09:30 2010 +0200 + + dix: add reference count of the resource to ResourceSizeRec + + The ResourceSizeRec now contains the number of references to the + resource. For example a Pixmap knows this value and it can be useful + for determining the "weight" of the resource. Typically this value + is 1. + + Reviewed-by: Rami Ylimäki + Signed-off-by: Erkki Seppälä + +commit ccb3e78124fb05defd0c9b438746b79d84dfc3ae +Author: Erkki Seppälä +Date: Tue Dec 14 12:18:23 2010 +0200 + + Xext: add a generic hashtable implementation + + The generic hashtable implementation adds a key-value container, that + keeps the key and value inside the hashtable structure and manages + their memory by itself. This data structure is best suited for + fixed-length keys and values. + + One creates a new hash table with ht_create and disposes it with + ht_destroy. ht_create accepts the key and value sizes (in bytes) in + addition to the hashing and comparison functions to use. When adding + keys with ht_add, they will be copied into the hash and a pointer to + the value will be returned: data may be put into this structure (or if + the hash table is to be used as a set, one can just not put anything + in). + + The hash table comes also with one generic hashing function plus a + comparison function to facilitate ease of use. It also has a custom + hashing and comparison functions for hashing resource IDs with + HashXID. + + Reviewed-by: Rami Ylimäki + Signed-off-by: Erkki Seppälä + +commit a2ac01a8ea8508ed35aa844a589672c1165e05e4 +Author: Erkki Seppälä +Date: Wed Apr 6 10:16:53 2011 +0300 + + dix: don't use a local wrapper for calling HashResourceID + + Calls to Hash(client, id) were replaced with calls directly to + HashResourceID(id, clientTable[client].hashsize) and the Hash-function + was removed. + + Signed-off-by: Erkki Seppälä + +commit a0b0fb83f91bb82534a0d83fdd6c0222567b098d +Author: Erkki Seppälä +Date: Mon Dec 20 12:58:37 2010 +0200 + + dix: add hashing functions to resource.h for others to use. + + The public hashing function HashResourceID uses the same hashing + hashing algorithm as resource.c uses internally, but it provides an + interface that will is usable by external modules. It provides a + parameter for the number of bits for the hash, instead of finding the + size from its internal hash table. + + Signed-off-by: Erkki Seppälä + +commit 3ba0decb4b55a1fd122d269e15b2b2da8ced8624 +Author: Erkki Seppälä +Date: Wed Dec 8 15:30:57 2010 +0200 + + dix: add a mechanism for iterating through all subresources + + The mechanism allows iterating even through subresources that don't + have specific XID's. When such 'resources' are iterated, the XID for + them will be zero. A resource type can assign an iteration function + for its subresources with SetResourceTypeFindSubResFunc; by default + resources are assumed not to contain subresources. + + The purpose of this extension is to enable accurate accounting of + the resources a resource consumes or uses. + + This patch provides the subresource iteration functions for Windows + and GCs. + + Reviewed-by: Rami Ylimäki + Signed-off-by: Erkki Seppälä + +commit b8d0d19a6d410776b53a41e7cae90f68d4b22bb7 +Author: Rami Ylimäki +Date: Wed Oct 27 17:25:50 2010 +0300 + + composite: Report pixmap usage of client windows to resource extension. + + Signed-off-by: Erkki Seppälä + Signed-off-by: Rami Ylimäki + Reviewed-by: Mikhail Gusarov + Reviewed-by: Tiago Vignatti + +commit e83388cc70e21e7f377ed2e417d04469e23eb706 +Author: Rami Ylimäki +Date: Wed Oct 27 16:59:06 2010 +0300 + + render: Report pixmap usage of pictures to resource extension. + + Signed-off-by: Erkki Seppälä + Signed-off-by: Rami Ylimäki + Reviewed-by: Mikhail Gusarov + Reviewed-by: Tiago Vignatti + +commit 96864bfa951ea8bf4ab697753fc62c6a97598bc0 +Author: Erkki Seppälä +Date: Mon Nov 29 12:40:56 2010 +0200 + + Implemented first part of XResource extension v1.2: X_XResQueryClientIds + + This patch implements a part of the XResource extension v1.2 (as specified in + http://patchwork.freedesktop.org/patch/2720/ ). The request implemented is + X_XResQueryClientIds. + + This patch depends on the feature introduced by + 1e933665bef26c74196bb7c59910e6a78bcacf0e "dix: Add facilities for + client ID tracking." . + + This latest version also adds Doxygen-formatted comments and takes a better + notice of coding conventions (as in http://www.x.org/wiki/CodingStyle ). + + Signed-off-by: Erkki Seppälä + +commit ebf214876a4885a98ded4f5525925b69005fae05 +Author: Peter Hutterer +Date: Wed Apr 18 15:56:37 2012 +1000 + + dix: indentation fix + + Signed-off-by: Peter Hutterer + +commit 80fefc42f5e67e6b4a4b440d8991bee7e5f38359 +Merge: 9779b90 12188c8 +Author: Keith Packard +Date: Sun Apr 15 21:05:30 2012 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 12188c8a8a537b38b1ca4cf8c0de5447e19c886a +Author: Chase Douglas +Date: Tue Apr 3 17:31:01 2012 -0700 + + Use touch state when querying pointer through core protocol + + QueryPointer is part of the core protocol. As such, it knows nothing + about touch devices. Touches are converted to button 1 press, pointer + motion, and button 1 release for core clients, so we should ensure the + pointer state mask has button 1 set when XQueryPointer is used. + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 32ece7c09bf0ebc3d99b4078aacebbd44314776a +Author: Chase Douglas +Date: Tue Apr 10 17:12:42 2012 -0700 + + Ensure sequential touches are pointer emulated sequentially + + Issue: + * Two sequential touches (i.e. down, up, down, up) + * Both are grabbed by a touch grab + * Both have a second listener in the form of a pointer grab or selection + * The second and first touches are rejected in that order + + The first touch must be pointer emulated before the second touch, so the + second touch must be paused until the first touch is rejected or + accepted and all events are delivered to pointer clients. + + This change ensures all pointer emulated events are emitted + sequentially. It necessarily imposes a delay on further touch events + when pointer grabs and selections are used, but there is no way around + it. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 163b0f375d73c05873fb341652de3ed347337828 +Author: Chase Douglas +Date: Tue Apr 10 17:12:41 2012 -0700 + + Update event type when delivering end event to a pointer listener + + Just like when we deliver to a touch listener, we must convert a touch + end event to an update event for further clients. This also ensures that + the touch record is not deleted at the end of ProcessTouchEvent(). + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 210cd12c47d063f97915ff23292b61d09abfd73a +Author: Chase Douglas +Date: Tue Apr 10 17:12:40 2012 -0700 + + Don't update listener after deactivating implicit pointer grab + + After the pointer grab is deactivated, the touch listener record is + updated at the end of DeliverTouchEmulatedEvent. However, the touch + record is ended when the grab is deactivated, so the update to the + listener record is in an array of memory that has been freed. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 82a1ae0af3b136371638659c3e909880a99f721c +Author: Peter Hutterer +Date: Thu Apr 12 15:54:00 2012 +1000 + + xfree86: after VT switching back, only enable previously enabled devices + + If a device was enabled before the VT switch, re-enabled it. Otherwise leave + it as is, there was probably a reason why it was disabled. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Daniel Stone + +commit c5a45b0f7658c77725adce2b64a0fbd62f208328 +Author: Daniel Kurtz +Date: Thu Apr 12 10:11:10 2012 +1000 + + dix: don't BUG_WARN for button events from button-only device + + Events from button-only devices still need coordinates, and they get them + from scale_to_desktop(). Therefore, a dev without valuators is not a bug. + However, a dev with valuators, but less than two of them still is a bug. + + This was noticed when unplugging a "Creative Technology SB Arena Headset", + which has some BTNs and some KEYs, but no REL or ABS valuators. + It emits [BTN_3] = 0 on unplug, which would trigger the BUG_WARN. + + Signed-off-by: Daniel Kurtz + Reviewed-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 9779b904c7c0b49c74054c22c420012c40595cdc +Author: Keith Packard +Date: Wed Apr 11 09:33:54 2012 -0700 + + hw/xfree86: Re-indent xf86vmode.c + + This is the result of re-running the 'x-indent.sh' script over + xf86vmode.c to clean up the disaster caused by broken syntax in the + file. + + Signed-off-by: Keith Packard + +commit 592bd0ae2b60cd6f6afd3efc40f5f659b12900b4 +Author: Keith Packard +Date: Wed Apr 11 09:28:21 2012 -0700 + + hw/xfree86: Spurious ');' in xf86vmode.c messed up indentation badly + + Inside the unfinished XF86VIDMODE_EVENTS #ifdef block the + function definition for xf86VidModeNotifyEvent had an extra ');' + before the prototype argument declarations. This was harmless for the + compiler as the code never gets used, but completely messed up the + file re-indentation. This patch removes the spurious characters in + preparation for re-indenting the file. + + Signed-off-by: Keith Packard + +commit 72cfc1a097dc1e09d2cd9415ef7855a2cef92351 +Author: Peter Hutterer +Date: Wed Apr 11 09:43:23 2012 +1000 + + Xi: fix XITouchClass sourceid assignment + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 10cd6fdc431d2d0835c313b2f5bdda6dcea281fd +Author: Keith Packard +Date: Sun Apr 8 00:16:54 2012 -0700 + + Revert "xfree86: workaround crash on close" + + This reverts commit 55f552adb651715d2620db7248cd5b9b8187654a. + + This appears to cause a crash at init time instead of close. + + Reported-by: Knut Petersen + Acked-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit c7b162555849ab2d4cb195d02d98a40494c5ce55 +Author: Yaakov Selkowitz +Date: Thu Mar 29 02:26:41 2012 -0500 + + xfree86: link modules against Xorg symbols on Cygwin + + As a PE platform, all symbols in both EXEs and DLLs must be resolved + at link time. As Xorg modules depend on symbols in the Xorg + executable, we must build Xorg before its modules, creating an implib + from the former which is used to link the latter. This implib must + then be installed in order to build the drivers. + + Currently only two drivers are supported on Cygwin: xf86-video-dummy + (to replace Xvfb/Xfake) and xf86-video-nested (to replace Xnest/Xephyr). + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit 2dffdcd60f70f534ad730830fe97f0bb1a192e2a +Author: Yaakov Selkowitz +Date: Thu Mar 29 02:23:17 2012 -0500 + + xf86Config: load DIX libraries before drivers on Cygwin + + Cygwin doesn't have ELF rpath capabilities, so these libraries need + to be loaded before the drivers (namely dummy and nested) which + depend on their symbols. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit 5dd3d2dbbafee28142552640ac6ef3eef2e6d9d3 +Author: Yaakov Selkowitz +Date: Thu Mar 29 02:21:01 2012 -0500 + + xf86Init: provide ddxBeforeReset ifdef DDXBEFORERESET + + This is necessary when building Xorg and XWin simultaneously, otherwise + undefined symbol errors result in sdksyms.c. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit 96186bc7219a88e549928707b3da4b8bfc16c54d +Author: Yaakov Selkowitz +Date: Thu Mar 29 02:18:41 2012 -0500 + + loader: add Cygwin support + + Cygwin libraries use the .dll extension and "cyg" prefix in place of "lib". + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit 0ce48729d34ab610ff119303355883048b651500 +Author: Yaakov Selkowitz +Date: Thu Mar 29 02:17:22 2012 -0500 + + os-support: add Cygwin support + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit fd115ee114e95b4e7b96f789d3ad67e2e15555de +Author: Yaakov Selkowitz +Date: Thu Mar 29 02:13:27 2012 -0500 + + xfree86: allow modules to be built without undefined symbols + + This will be necessary to port Xorg to Cygwin, but other platforms may + find this useful as well. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit 12cd7ca83c35bc61fbda7e61535692e3ec78194c +Author: Yaakov Selkowitz +Date: Thu Mar 29 02:06:36 2012 -0500 + + Cygwin/X: disable all unused or unapplicable extensions in configure + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit cb5661e86d4a428ec0ca4efc30a1a165d94d7215 +Author: Yaakov Selkowitz +Date: Tue Mar 27 22:16:08 2012 -0500 + + xf86Crtc: include "xf86xv.h" only if XV + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Alan Coopersmith + Reviewed-by: Jon TURNEY + Reviewed-by: Jeremy Huddleston + +commit 1110facdfeb95b1ad47d03c0ca3d73933b86dbd6 +Author: Chase Douglas +Date: Thu Mar 29 18:06:03 2012 -0700 + + Implement passive touch ungrabbing + + Whoops. Forgot to implement this. The code currently generates an error + due to the unhandled grab type. + + X.Org Bug 48069 + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit e9d3848d7bda7f7de4c0f497aee4482d0b30ad49 +Author: Jeremy Huddleston +Date: Thu Apr 5 14:03:35 2012 -0700 + + XQuartz: Automatically start our virtual tablet devices + + Fixes: https://bugs.launchpad.net/inkscape/+bug/972914 + Regression introduced by: 7790dc86384cc451ac44663737fde84dd81ad4e1 + + Signed-off-by: Jeremy Huddleston + +commit 6cb83b78c47b80556cb4d573524d60f0cd1a64ac +Author: Jeremy Huddleston +Date: Fri Mar 30 14:29:48 2012 -0700 + + XQuartz: Tiger build fix + + Fixes: https://trac.macports.org/ticket/33818 + + Signed-off-by: Jeremy Huddleston + +commit eca58ee4db43d85e5940919be094c38ad166d5d0 +Author: Jeremy Huddleston +Date: Wed Mar 28 15:07:51 2012 -0700 + + os: Fix regression with FatalError not calling va_start + + Regression From: a818b305989bbcde4e585112a7ee70cbc0b14a92 + + Found-by: Colin Harrison + Signed-off-by: Jeremy Huddleston + +commit 55f552adb651715d2620db7248cd5b9b8187654a +Author: Michal Suchanek +Date: Wed Mar 28 18:12:39 2012 -0700 + + xfree86: workaround crash on close + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 + + Signed-off-by: Michal Suchanek + Reviewed-by: Jeremy Huddleston + +commit 641a1b9363d59808d2586f9e84847ccc69701482 +Author: Peter Hutterer +Date: Mon Mar 26 10:34:34 2012 +1000 + + test: reset the client before checking the swapped version + + As of 2c23ef83b0e03e163aeeb06133538606886f4e9c, the server returns BadValue + for the same client with multiple versions. Avoid this by resetting the + client before we issue the same request as a fake swap client. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + +commit 17f33ca0e5bff45a2d03e4d3b4753a714ce25baf +Author: Peter Hutterer +Date: Mon Mar 26 10:28:32 2012 +1000 + + test: init the sync extensions for tests to pass again + + Introduced in d645edd11e7482f98c8b7e0d6c8693285c484907 + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + +commit 8053faa7b81520b0a46459ba6e3b98f2599d5bbf +Author: Peter Hutterer +Date: Fri Mar 23 08:20:22 2012 +1000 + + Bump input ABI to 17 for per-device idlecounters + + Signed-off-by: Peter Hutterer + +commit 7f3997b01a8813c1d7055317eb06111aed8572c9 +Merge: 92d50c3 31646d8 +Author: Keith Packard +Date: Mon Mar 26 16:41:52 2012 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 92d50c38b2bfeb82e7374a1966a53235e3f8275e +Author: Gaetan Nadon +Date: Sun Feb 26 12:15:31 2012 -0500 + + man: s/__xservername__/Xorg/g - no longer required + + Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html: + + The Xorg & xorg.conf substitutions are leftover from the transitional + period where some distros were building our sources with the XFree86 + and XF86config names until they had time to adjust the rest of their + packages/installer/config code to the new names. + + This will fix inconsistencies and prevent the creation of new unneeded + sed patterns. + + Reviewed-by: Alan Coopersmith + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 9e880cd2e36236e466fda0adadee34a407ae3341 +Author: Gaetan Nadon +Date: Sun Feb 26 12:15:30 2012 -0500 + + man: s/__xconfigfile__/xorg.conf/g - no longer required + + Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html: + + The Xorg & xorg.conf substitutions are leftover from the transitional + period where some distros were building our sources with the XFree86 + and XF86config names until they had time to adjust the rest of their + packages/installer/config code to the new names. + + This will fix inconsistencies and prevent the creation of new unneeded + sed patterns. + + Reviewed-by: Alan Coopersmith + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 31646d8fa9524adca1d7bc2cd2db90d47c2eb96e +Author: Jeremy Huddleston +Date: Sun Mar 25 23:33:54 2012 -0700 + + XQuartz: Use scrolling valuators + + This lets use send more accurate data to Xi clients and uses dix + for legacy scroll buttons rather than reinventing the wheel. + + Signed-off-by: Jeremy Huddleston + Acked-by: Peter Hutterer + +commit 7790dc86384cc451ac44663737fde84dd81ad4e1 +Author: Jeremy Huddleston +Date: Sun Mar 25 22:30:55 2012 -0700 + + XQuartz: Use AllocDevicePair to allocate our keyboard and mouse at the same time + + Also correct isMaster to FALSE while we're here. + + Signed-off-by: Jeremy Huddleston + Acked-by: Peter Hutterer + +commit 74fb534bf15687610367248071341fe4bfd1d8bf +Author: Jeremy Huddleston +Date: Sun Mar 25 22:16:22 2012 -0700 + + XQuartz: Call update_desktop_dimensions() after updating our screen coordinates + + Fixes: http://xquartz.macosforge.org/trac/ticket/555 + Regression from: 8bebb4b4896d8b6ba3309b5b28fce883bb9f8a96 + + Signed-off-by: Jeremy Huddleston + Acked-by: Peter Hutterer + +commit 41a46546e92b66fed323b5845dd71a6385feb418 +Author: Jeremy Huddleston +Date: Sun Mar 25 23:05:43 2012 -0700 + + XQuartz: Formatting cleanup for sendX11NSEvent + + Signed-off-by: Jeremy Huddleston + +commit 5324557c7b12dcacddac830bdb65769cb622c6cf +Author: Jeremy Huddleston +Date: Fri Mar 23 19:58:49 2012 -0700 + + XQuartz: Source formatting cleanup + + indent butchered Objective-C formatting. This patch was created by: + + 1) Reverting the indent changes in hw/xquartz + 2) Editing X11Application.m and chaning some #ifdef logic to work + with uncrustify + 3) Hand edited some (c) notifications + 4) Opened all XQuartz sources in XCode and re-indented (^I) + 5) Ran uncrustify with this configuration + (as close to the indent rules as I could get): + + tok_split_gte=false + utf8_byte=true + utf8_force=true + indent_cmt_with_tabs=false + indent_align_string=false + indent_braces=false + indent_braces_no_func=false + indent_braces_no_class=false + indent_braces_no_struct=false + indent_brace_parent=false + indent_namespace=false + indent_extern=false + indent_class=false + indent_class_colon=false + indent_else_if=false + indent_var_def_cont=false + indent_func_call_param=false + indent_func_def_param=false + indent_func_proto_param=false + indent_func_class_param=false + indent_func_ctor_var_param=false + indent_template_param=false + indent_func_param_double=false + indent_relative_single_line_comments=false + indent_col1_comment=false + indent_access_spec_body=false + indent_paren_nl=false + indent_comma_paren=false + indent_bool_paren=false + indent_first_bool_expr=false + indent_square_nl=false + indent_preserve_sql=false + indent_align_assign=true + sp_balance_nested_parens=false + align_keep_tabs=false + align_with_tabs=false + align_on_tabstop=false + align_number_left=false + align_func_params=false + align_same_func_call_params=false + align_var_def_colon=true + align_var_def_attribute=true + align_var_def_inline=true + align_right_cmt_mix=false + align_on_operator=false + align_mix_var_proto=false + align_single_line_func=false + align_single_line_brace=false + align_nl_cont=false + align_left_shift=true + align_oc_decl_colon=true + nl_collapse_empty_body=true + nl_assign_leave_one_liners=true + nl_class_leave_one_liners=true + nl_enum_leave_one_liners=true + nl_getset_leave_one_liners=true + nl_func_leave_one_liners=true + nl_if_leave_one_liners=true + nl_multi_line_cond=false + nl_multi_line_define=false + nl_before_case=true + nl_after_case=true + nl_after_return=false + nl_after_semicolon=true + nl_after_brace_open=true + nl_after_brace_open_cmt=false + nl_after_vbrace_open=false + nl_after_vbrace_open_empty=false + nl_after_brace_close=false + nl_after_vbrace_close=false + nl_define_macro=false + nl_squeeze_ifdef=false + nl_ds_struct_enum_cmt=false + nl_ds_struct_enum_close_brace=false + nl_create_if_one_liner=false + nl_create_for_one_liner=false + nl_create_while_one_liner=false + ls_for_split_full=false + ls_func_split_full=false + nl_after_multiline_comment=false + eat_blanks_after_open_brace=false + eat_blanks_before_close_brace=false + mod_full_brace_if_chain=false + mod_pawn_semicolon=false + mod_full_paren_if_bool=false + mod_remove_extra_semicolon=false + mod_sort_import=false + mod_sort_using=false + mod_sort_include=false + mod_move_case_break=false + mod_remove_empty_return=false + cmt_indent_multi=true + cmt_c_group=false + cmt_c_nl_start=false + cmt_c_nl_end=false + cmt_cpp_group=false + cmt_cpp_nl_start=false + cmt_cpp_nl_end=false + cmt_cpp_to_c=false + cmt_star_cont=false + cmt_multi_check_last=true + cmt_insert_before_preproc=false + pp_indent_at_level=false + pp_region_indent_code=false + pp_if_indent_code=false + pp_define_at_level=false + indent_columns=4 + indent_brace=0 + indent_switch_case=0 + align_struct_init_span=2 + align_pp_define_gap=0 + align_pp_define_span=2 + align_oc_msg_colon_span=16 + nl_end_of_file_min=1 + nl_func_var_def_blk=0 + code_width=78 + nl_max=2 + newlines=auto + indent_with_tabs=0 + sp_arith=force + sp_assign=force + sp_assign_default=force + sp_before_assign=force + sp_after_assign=force + sp_enum_assign=force + sp_enum_before_assign=force + sp_enum_after_assign=force + sp_pp_stringify=add + sp_bool=force + sp_compare=force + sp_inside_paren=remove + sp_paren_paren=remove + sp_paren_brace=force + sp_before_ptr_star=ignore + sp_before_unnamed_ptr_star=force + sp_before_byref=force + sp_before_unnamed_byref=force + sp_after_byref=remove + sp_after_type=force + sp_before_sparen=force + sp_inside_sparen=remove + sp_inside_sparen_close=remove + sp_after_sparen=force + sp_sparen_brace=force + sp_special_semi=force + sp_before_semi=remove + sp_after_semi=force + sp_after_semi_for=force + sp_after_semi_for_empty=remove + sp_before_square=remove + sp_inside_square=remove + sp_after_comma=force + sp_before_comma=remove + sp_paren_comma=force + sp_before_ellipsis=force + sp_after_class_colon=force + sp_before_class_colon=force + sp_before_case_colon=remove + sp_after_cast=remove + sp_inside_paren_cast=remove + sp_sizeof_paren=remove + sp_inside_braces_enum=force + sp_inside_braces_struct=force + sp_inside_braces=force + sp_inside_braces_empty=remove + sp_func_proto_paren=remove + sp_func_def_paren=remove + sp_inside_fparens=remove + sp_inside_fparen=remove + sp_square_fparen=remove + sp_fparen_brace=force + sp_func_call_paren=remove + sp_func_call_paren_empty=remove + sp_return_paren=force + sp_attribute_paren=remove + sp_defined_paren=remove + sp_macro=force + sp_macro_func=force + sp_else_brace=force + sp_brace_else=force + sp_brace_typedef=force + sp_not=remove + sp_inv=remove + nl_start_of_file=remove + nl_end_of_file=force + nl_assign_square=remove + nl_after_square_assign=remove + nl_fcall_brace=remove + nl_enum_brace=remove + nl_struct_brace=remove + nl_union_brace=remove + nl_if_brace=remove + nl_brace_else=force + nl_elseif_brace=remove + nl_else_brace=remove + nl_else_if=remove + nl_for_brace=remove + nl_do_brace=remove + nl_brace_while=remove + nl_switch_brace=remove + nl_case_colon_brace=force + nl_func_type_name=force + nl_func_type_name_class=force + nl_func_proto_type_name=force + nl_func_paren=remove + nl_func_def_paren=remove + nl_func_decl_start=remove + nl_func_def_start=remove + nl_func_decl_args=remove + nl_func_decl_end=remove + nl_func_def_end=remove + nl_func_decl_end_single=remove + nl_func_def_end_single=remove + nl_func_decl_empty=remove + nl_func_def_empty=remove + nl_fdef_brace=force + nl_return_expr=remove + nl_before_if=ignore + nl_after_if=ignore + nl_before_for=ignore + nl_after_for=ignore + nl_before_while=ignore + nl_after_while=ignore + nl_before_switch=ignore + nl_after_switch=ignore + nl_before_do=ignore + nl_after_do=ignore + pp_space=remove + + Signed-off-by: Jeremy Huddleston + +commit 3505e1faadddeeec85a0d3f823c877ea33f86e00 +Author: Jeremy Huddleston +Date: Fri Feb 17 13:15:12 2012 -0800 + + XQuartz: Detect FatalErrors on startup to prevent tight crash loops + + If a FatalError occurs before the server finishes launching, it will + not have drained the launchd-owned DISPLAY socket, so launchd will + just relaunch it. This can cause the server to crash in a tight loop + which will spam the user with CrashReporter windows that claim focus on + appearance. + + This allows users stuck in this loop to "deal" with the problem without + popping up a crash report every 10 seconds. + + Signed-off-by: Jeremy Huddleston + +commit a818b305989bbcde4e585112a7ee70cbc0b14a92 +Author: Jeremy Huddleston +Date: Fri Feb 17 12:35:02 2012 -0800 + + os: Pass the FatalError message to OsVendorFatalError + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jon TURNEY + +commit 0bb8a2566debd6cd11164df9ddca534150ec440a +Author: Jeremy Huddleston +Date: Tue Mar 13 00:15:55 2012 -0700 + + XQuartz: Add a defaults option to disable the RENDER extension + + RENDER has some ugly issues on XQuartz, so add an option to disable RENDER. + + Enables workaround for: https://bugs.freedesktop.org/show_bug.cgi?id=26124 + + Signed-off-by: Jeremy Huddleston + +commit 5ff46d651ac0cd396be2053b79675997ed7af765 +Author: Jeremy Huddleston +Date: Sat Mar 17 00:04:27 2012 -0700 + + XQuartz: Use doubles for input valuators + + Signed-off-by: Jeremy Huddleston + +commit cd84c0949a9f397d8b803d3b87c9d02b260d4795 +Author: Jeremy Huddleston +Date: Sat Mar 17 00:08:19 2012 -0700 + + XQuartz: Xi: darwinPointer is now Relative + + There is really no real reason why this should be necessary, but wine + developers are stuborn, so doing this to try to work around this wine + issue: + + http://bugs.winehq.org/show_bug.cgi?id=29732 + + Signed-off-by: Jeremy Huddleston + +commit 87939bf8311c0e7d168741fe57bc8fac414811d8 +Author: Jeremy Huddleston +Date: Tue Mar 13 00:25:53 2012 -0700 + + XQuartz: Move our logs into an X11 subdirectory + + Signed-off-by: Jeremy Huddleston + +commit df327f98f6b8e02fadcfd313a85f906722acc572 +Author: Jeremy Huddleston +Date: Mon Mar 5 00:05:48 2012 -0800 + + test: Fix 'make dist' for configurations that build the Xorg DDX + + Signed-off-by: Jeremy Huddleston + +commit a7eac500e652f30deffd9dc5e623fab701077738 +Merge: bf876c8 d645edd +Author: Peter Hutterer +Date: Thu Mar 22 13:13:07 2012 +1000 + + Merge branch 'per-device-sync-counters' into for-keith + +commit d645edd11e7482f98c8b7e0d6c8693285c484907 +Author: Peter Hutterer +Date: Mon Mar 12 16:36:31 2012 +1000 + + Xext: Add per-device SyncCounters + + Previously, we only had one idle alarm that was triggered for all devices, + whenever the user used any device, came back from suspend, etc. + + Add system SyncCounters for each device (named "DEVICEIDLETIME x", with x + being the device id) that trigger on that device only. This allows for + enabling/disabling devices based on interaction with other devices. + + Popular use-case: disable the touchpad when the keyboard just above the + touchpad stops being idle. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit 6aef209ebc2e54f5465da505a780f7b4cc273ee0 +Author: Peter Hutterer +Date: Mon Mar 12 13:51:02 2012 +1000 + + Change lastDeviceIdleTime to be per-device + + Preparation work for per-device idle counters. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit 20cf0ef825e3f14b0688b691691e0aeba0a4860a +Author: Peter Hutterer +Date: Tue Mar 13 10:21:23 2012 +1000 + + Xext: strdup() the SystemSyncCounter name + + Required for future dynamic names. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit f1b28aea4156f0381ea733ad2afbdd1f34f75599 +Author: Peter Hutterer +Date: Tue Mar 13 09:31:09 2012 +1000 + + Xext: store the bracket values for idle counters in the private + + And drop the three global variables, we have a reference to the counter + everywhere now. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit d9553b2bbe06fba0b209218ffed9465edd79b4d2 +Author: Peter Hutterer +Date: Tue Mar 13 09:29:39 2012 +1000 + + Xext: pass the counter into block/wakeup handlers + + No functional changes, currently unused. Preparation work, we don't need a + global variable if we can pass the counters around anyway. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit 90e6dc6de1ac339212989fd8e54131b196ebb369 +Author: Peter Hutterer +Date: Tue Mar 13 09:28:15 2012 +1000 + + Xext: add a private field to SyncSystemCounters + + Will be used to store counter-specific data. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit 3ddae647c307005309daa2d5dfe4bc6acb8170ab +Author: Peter Hutterer +Date: Mon Mar 12 15:31:39 2012 +1000 + + Xext: localise pIdleTimeValueLess/Greater + + Cleanup for future features, no functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit 43eb2f2758dfc6ca5a49afce97cc5baea8caf9f5 +Author: Peter Hutterer +Date: Mon Mar 12 15:27:56 2012 +1000 + + Xext: localise use of IdleTimeCounter + + Instead of referring to the global IdleTimeCounter everywhere, only do it + once and use a local variable for the rest. + + Cleanup for future features, no functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: James Jones + +commit 1f12f059ef994e0b9b68fbd1f1556d0285c96b8b +Author: Jamey Sharp +Date: Wed Mar 14 17:22:18 2012 -0700 + + sync: Use a linked list instead of an array for SysCounterList. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit bf876c87a9099fdfa63ed599f8ed9a954dd023d9 +Merge: 908ab3d c0b0a9b +Author: Peter Hutterer +Date: Thu Mar 22 11:34:43 2012 +1000 + + Merge branch 'dtrace-input-abi' into for-keith + +commit c0b0a9bce9237b0abe150c1a7b54939affecc751 +Author: Peter Hutterer +Date: Mon Mar 5 14:12:52 2012 +1000 + + dix: add dtrace probes to input API + + For driver debugging, it is helpful to know whether the driver has actually + submitted an event to the server. dtrace hooks can help here. + + Note that GetPointerEvents and friends may also be triggered by the server + for other emulated devices, some care must be taken when analysing the + results. + + Additional difficulty: proximity events have a run-time assigned type, so + this may make automatic detection a tad harder. If in doubt, go for any + event > 64 since the only two that can have that value are ProximityIn and + ProximityOut. + + An example systemtap script is below: + + # Compile+run with + # stap -g xorg.stp /usr/bin/Xorg + # + + function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{ + int i; + unsigned char *mask = (unsigned char*)THIS->mask_in; + double *valuators = (double*)THIS->valuators_in; + char str[128] = {0}; + char *s = str; + + #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7))) + + s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators); + for (i = 0; i < THIS->nvaluators; i++) + { + s += sprintf(s, " %d: ", i); + if (BitIsSet(mask, i)) + s += sprintf(s, "%d", (int)valuators[i]); + } + + sprintf(THIS->__retvalue, "%s", str); + %} + + probe process(@1).mark("input__event") + { + deviceid = $arg1 + type = $arg2 + detail = $arg3 + flags = $arg4 + nvaluators = $arg5 + + str = print_valuators(nvaluators, $arg6, $arg7) + printf("Event: device %d type %d detail %d flags %#x %s\n", + deviceid, type, detail, flags, str); + } + + Signed-off-by: Peter Hutterer + Acked-by: Jeremy Huddleston + +commit 61cb98da1c6199964825de158d9eee7682d9c983 +Author: Peter Hutterer +Date: Mon Mar 12 16:03:50 2012 +1000 + + Xext: SyncCreateSystemCounter returns a SyncCounter* + + type safety++ + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Bryce Harrington + +commit 908ab3d580188533168c8cdfd2cab9dc689b4218 +Author: Peter Hutterer +Date: Wed Mar 21 14:05:29 2012 +1000 + + dix: set raw event values before adding up relative values (#46976) + + Regression introduced in 4e52cc0ef48145134cd58d357fb7289e6f8bb709 + + Raw event values are values as-is from the driver, modified only be + transformation or acceleration. 4e52cc caused the mask to be updated from + relative to absolute coordinates which then got written into the raw events. + + Move the raw event update into the respective branches for absolute/relative + events. + + X.Org Bug 46976 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Daniel Stone + Tested-by: Sven Arvidsson + Reviewed-by: Simon Thum + +commit 45fe3085f8f45e529383025414fdd263d86dfd2b +Author: Peter Hutterer +Date: Mon Mar 12 14:08:39 2012 +1000 + + Xext: remove needless /* parameter */ comments in declaration + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Bryce Harrington + +commit 9c3bd3ae652af386b6821b197d24528f20ba867d +Author: Peter Hutterer +Date: Wed Mar 21 14:03:27 2012 +1000 + + dix: fix compiler warning "unused variable 'scr'" + + getevents.c: In function 'updateSlaveDeviceCoords': + getevents.c:326:15: warning: unused variable 'scr' [-Wunused-variable] + + Signed-off-by: Peter Hutterer + +commit e21ffff4761d2b75815391c6947adcba425ab11e +Author: Peter Hutterer +Date: Mon Mar 12 14:07:44 2012 +1000 + + Xext: typedef QueryValue and BracketValue prototypes + + No functional changes, just for readability + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Bryce Harrington + +commit 14e3ea730eed344e6ed69c873f918d6f076d13dc +Author: Peter Hutterer +Date: Wed Mar 14 13:48:56 2012 +1000 + + include: add an X_DEBUG message type + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + +commit 5910f2df58beaae2187438fef0b62c29a563e853 +Author: Peter Hutterer +Date: Mon Mar 12 16:26:29 2012 +1000 + + Xext: drop InitServertime() declaration. + + Not implemented anywhere. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Bryce Harrington + +commit 31df08a449cf9b6e1740e1c02257997490630d93 +Author: Chase Douglas +Date: Wed Mar 7 16:06:27 2012 -0800 + + Use a new sprite trace for indirect touches when all touches have physically ended + + All touches of an indirect device, such as a trackpad, are sent to the + same window set. When there are no active touches, a new window set is + created; otherwise, the window set of an existing touch is copied. + + The current code checks for any logically active touches. This includes + touches that have physically ended but are still logically active due to + unhandled touch grabs. Instead, we want a new window set whenever there + are no physically active touches. + + This change skips over logically active but pending end touches, which + are touches that have physically ended. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 58427e08a4a36ce9e213e4b4fe5249d5db2c764d +Author: Chase Douglas +Date: Wed Mar 7 16:06:26 2012 -0800 + + Xi: Fix TouchEnd to TouchUpdate change for one accepted grab + + If there is only one listener of a touch, the listener is a grab, and is + accepted before the touch has ended, the current code will not end the + touch record when the touch does end. + + This change adds a listener state for when a touch is accepted but has + not yet ended. We now keep the touch record alive in this state, but end + it when the touch ends. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit e884ff8ad4df2b3272a3d8ece772906207af5142 +Author: Peter Hutterer +Date: Wed Mar 7 19:08:33 2012 +1000 + + xfree86: remove out-of-date comment + + No idea what this was referring to but it goes past git history. + + Signed-off-by: Peter Hutterer + +commit 5497ce3da442d27c2dc7796bfef6ccd670bbadc4 +Author: Peter Hutterer +Date: Mon Feb 20 12:09:33 2012 +1000 + + dix: IsFloating() on master devices is always false + + There are a few subtle bugs during startup where IsFloating() returns true + if the device is a master device that is not yet paired with its keyboard + device. + + Force IsFloating() to always return FALSE for master devices, that was the + intent after all and any code that relies on the other behaviour should be + fixed instead. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Tested-by: Jon TURNEY + +commit 2c23ef83b0e03e163aeeb06133538606886f4e9c +Author: Peter Hutterer +Date: Mon Feb 27 08:01:07 2012 +1000 + + Xi: prohibit multiple XIQueryVersion requests with different versions + + Return BadValue if major or minor differs on the second call. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit eb84c154ed38194c32651727b6dfe2d1bde4c599 +Author: Peter Hutterer +Date: Mon Feb 27 10:09:44 2012 +1000 + + dix: when rescaling from master, rescale from desktop dimensions (#46657) + + master->last.valuators[] is in desktop dimensions, so use those as + rescale axis ranges, not the screen. Otherwise, a rescale on any screen + not the top-left will cause out-of-bounds coordinates which will always + map to the bottom-right screen, causing the device to be stuck on that + screen. + + X.Org Bug 46657 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 6b6afd3d013e3f4910fae3520d1d786df2b0e47a +Author: Peter Hutterer +Date: Thu Feb 16 15:11:40 2012 +1000 + + Xext: return BadAccess if PickPointer fails (#45796) + + PickPointer or PickKeyboard return NULL, all MDs are currently disabled and + we cannot emulate a core event. This wasn't anticipated by the protocol, so + we don't really have an error code we may use here - BadAccess is simply the + least bad of the possible ones. + + And returning BadAccess beats crashing the server. + + X.Org Bug 45796 + + Signed-off-by: Peter Hutterer + +commit 9e017cf0cf1f0c9d0d9c2cfeb82ea5dc0eb5905e +Author: Andreas Wettstein +Date: Sat Feb 25 20:48:17 2012 +0100 + + XKB: Redirect actions defunct with Gtk3 (XInput?) + + When redirect actions are used with Gtk3, Gtk3 complained about + events not holding a GdkDevice. This was caused by device IDs + not being set for redirect actions. + + More seriously, Gtk3 did not receive state changes redirect + actions might specify. This was because event_set_state in + dix/inpututils.c accesses the prev_state field, but the changes + for the redirect action were only put into the state field. + + Signed-off-by: Andreas Wettstein + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit ab3a815a75ab5695753fa37a98b0ea5293d4cb91 +Author: Daniel Stone +Date: Thu Mar 15 15:18:29 2012 +0000 + + Indentation: Change '& stuff' to '&stuff' + + If the typedef wasn't perfect, indent would get confused and change: + foo = (SomePointlessTypedef *) &stuff[1]; + to: + foo = (SomePointlessTypedef *) & stuff[1]; + + Fix this up with a really naïve sed script, plus some hand-editing to + change some false positives in XKB back. + + Signed-off-by: Daniel Stone + +commit 58b1f739d73b03ff7952ca986ed8746a7307fffe +Author: Daniel Stone +Date: Thu Mar 15 15:13:51 2012 +0000 + + Xinerama: Fix up obnoxiously-indented code + + Comments inside of conditionals confuse indent to death. Which is fair + enough really. + + Signed-off-by: Daniel Stone + +commit 9838b7032ea9792bec21af424c53c07078636d21 +Author: Keith Packard +Date: Wed Mar 21 12:55:09 2012 -0700 + + Introduce a consistent coding style + + This is strictly the application of the script 'x-indent-all.sh' + from util/modular. Compared to the patch that Daniel posted in + January, I've added a few indent flags: + + -bap + -psl + -T PrivatePtr + -T pmWait + -T _XFUNCPROTOBEGIN + -T _XFUNCPROTOEND + -T _X_EXPORT + + The typedefs were needed to make the output of sdksyms.sh match the + previous output, otherwise, the code is formatted badly enough that + sdksyms.sh generates incorrect output. + + The generated code was compared with the previous version and found to + be essentially identical -- "assert" line numbers and BUILD_TIME were + the only differences found. + + The comparison was done with this script: + + dir1=$1 + dir2=$2 + + for dir in $dir1 $dir2; do + (cd $dir && find . -name '*.o' | while read file; do + dir=`dirname $file` + base=`basename $file .o` + dump=$dir/$base.dump + objdump -d $file > $dump + done) + done + + find $dir1 -name '*.dump' | while read dump; do + otherdump=`echo $dump | sed "s;$dir1;$dir2;"` + diff -u $dump $otherdump + done + + Signed-off-by: Keith Packard + Acked-by: Daniel Stone + Acked-by: Alan Coopersmith + +commit 75199129c603fc8567185ac31866c9518193cb78 +Author: Keith Packard +Date: Wed Mar 21 12:33:19 2012 -0700 + + Handle blank betweeen type and name in sdksyms.sh + + indent sometimes adds a blank line between the type and the name in a + function declaration that includes _X_EXPORT, so handle that before + the files are re-indented. + + Signed-off-by: Keith Packard + +commit a615b90cab7569fae9d123e4da1d3373c871d84b +Author: Keith Packard +Date: Wed Mar 14 11:32:36 2012 -0700 + + Bump version number to 1.12.99.0 + + Now that 1.12 has branched, reset the version on master to a + development number. + + Signed-off-by: Keith Packard + +commit b1be72c5ca6cb98ba64637990b142be0f1710a19 +Author: Keith Packard +Date: Sun Mar 4 20:26:18 2012 -0800 + + Version bumped to 1.12 + + Signed-off-by: Keith Packard + +commit e08ed0b757b9b48344a301f612fabb3e39ffec78 +Author: Gaetan Nadon +Date: Sun Feb 26 17:51:50 2012 -0500 + + test: add new test cases to .gitignore + + Reviewed-by: Peter Hutterer + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 2416ee4a015068359807a10f433e8c54192c78a9 +Author: Peter Hutterer +Date: Wed Feb 22 15:32:56 2012 +1000 + + dix: avoid NULL-pointer dereference on button-only devices (#38313) + + And for such devices simply take the last.valuators[] which must be valid at + all times anyway. UpdateSlaveDeviceCoords takes care of that. + + X.Org Bug 38313 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 38000e7d1f958f5944e641de3e716944a5876d41 +Author: Jeremy Huddleston +Date: Tue Jan 31 11:06:21 2012 -0800 + + Revert "dix: don't XWarpPointer through the last slave anymore (#38313)" + + This reverts commit 2bfb802839688ecf328119c4c6979390fc60348d. + + This commit caused a regression. + + See: http://xquartz.macosforge.org/trac/ticket/517#comment:10 + + Acked-by: Peter Hutterer + +commit cb6a32da27f09261c4d561c19d1877c750d98cc3 +Author: Jeremy Huddleston +Date: Fri Feb 17 13:44:12 2012 -0800 + + XQuartz: Short-circuit activateX: + + This also avoids a deadlock when calling activateX: before the server + thread has initialized + + Signed-off-by: Jeremy Huddleston + +commit 1562c4a1ca748d2c4a8c69d57ba09ff7ca9cc453 +Author: Jeremy Huddleston +Date: Fri Feb 17 13:54:57 2012 -0800 + + XQuartz: Actually install the new locales + + Signed-off-by: Jeremy Huddleston + +commit 71594746c7da32e1c7986341a0da30f241a7a2be +Merge: d53235a eaba06a +Author: Keith Packard +Date: Wed Feb 22 18:07:20 2012 +1300 + + Merge remote-tracking branch 'whot/for-keith' + +commit eaba06a27c5520a02f08431ac1e4b0e0bdc22cd8 +Author: Chase Douglas +Date: Mon Feb 13 16:00:48 2012 -0800 + + Keep virtual core pointer touch class around if new slave doesn't have one + + The VCP may have active touch grabs. The touch records must be kept so + these touch grabs may be accepted/rejected in the future. This means the + touch class list will not represent the touch class of the attached + slave device if it does not have a touch class, but we already were + breaking that assumption by keeping a separate touches array for the + VCP. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 8573b3519af138a3a12a2e77098718165f9fd8ff +Author: Peter Hutterer +Date: Mon Feb 13 16:00:47 2012 -0800 + + Don't clobber virtual core pointer touches array length + + The VCP has its own touches array, don't overwrite it when the class is + copied from the SD to the master. + + Reported-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 03d32fe7a718d9016053cdb5d57f51a74ef99b59 +Author: Chase Douglas +Date: Mon Feb 13 12:09:32 2012 -0800 + + Don't dereference a touch after it has been ended when punting to next owner + + In this case, we have ended the touch because the last owner has + rejected it. We need to return from the function right now so we don't + attempt to dereference another touch client for early acceptance + processing. + + Signed-off-by: Chase Douglas + Reviewed-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 1ecb7aaf2adedad1996cd26176ef5802113e3ad9 +Author: Chase Douglas +Date: Sat Feb 11 07:58:38 2012 -0800 + + Focus event button state must show the logical buttons, not physical buttons + + Similar to the fix in fcda98c48610fd507ca0b89c6006a5497d9dc1c9. This + ensures we show the correct logical state of the buttons in device focus + events too. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 6f28388187cffae9e5bc9bfc9425acff4f478b59 +Author: Peter Hutterer +Date: Sat Feb 11 01:29:26 2012 +1000 + + dix: reset last.scroll when resetting the valuator (#45611) + + last.scroll remained on the last-submitted scrolling value but last.valuator + was changed whenever the slave device changed. The first scrolling delta + after a switch was then calculated as (last.scroll - new abs value), causing + erroneous scrolling events. + + Test case: + - synaptics with a scrolling method enabled, other device with 3+ axes (e.g. + wacom) + - scroll on touchpad + - use other device + - scroll on touchpad + + The second scroll caused erroneous button press/release events. + + X.Org Bug 45611 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit d53235af85d50774c68347720ce132daf9a5bc49 +Author: Jeremy Huddleston +Date: Mon Feb 13 23:06:07 2012 -0800 + + XQuartz: Build fix for possible conflict of BOOL type + + Signed-off-by: Jeremy Huddleston + +commit 62edd970f6f36058fcb31de4555eb7c1329cce74 +Author: Keith Packard +Date: Sat Feb 11 16:13:44 2012 +1300 + + Bump to version 1.11.99.903 (1.12 RC3) + + Signed-off-by: Keith Packard + +commit 42b6756463ee0476340656707f1088dc6c2fd220 +Merge: 7674d00 ca64912 +Author: Keith Packard +Date: Sat Feb 11 15:36:43 2012 +1300 + + Merge remote-tracking branch 'alanc/master' + +commit 7674d00b04da5cf73cfa5c7ed1d3a9f42b59960e +Author: Peter Hutterer +Date: Fri Jan 27 12:41:09 2012 +1000 + + Xi: handle new XIAllowEvents request in inputproto 2.1.99.6 + + grab_window and touchid were removed from the struct for ABI compatibility + reasons, we need to pull in the new, XI 2.2-specific struct. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit ceb026c6a6f1eea8b34e745f06f1ebcd652c0ba1 +Author: Peter Hutterer +Date: Fri Jan 27 12:41:09 2012 +1000 + + Xi: handle new XIAllowEvents request in inputproto 2.1.99.6 + + grab_window and touchid were removed from the struct for ABI compatibility + reasons, we need to pull in the new, XI 2.2-specific struct. + + Signed-off-by: Peter Hutterer + +commit b96275c4cdb164aa71f7aa9fbf88be18886d1936 +Author: Benjamin Otte +Date: Tue Feb 7 18:01:25 2012 +1000 + + dix: fix an out-of-memory crash + + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 6241b5e4fdbdb08d30cc8787d858ac27122d2d49 +Author: Chase Douglas +Date: Fri Feb 3 16:19:11 2012 -0800 + + Implement touch early accept + + This doesn't really implement early accept as it should. Ideally, the + server should send end events to all subsequent touch clients as soon as + an early accept comes in. However, this implementation is still protocol + compliant. We can always improve it later. + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit b0c54856df71f9cabf9dad176fdade960ef8c5d9 +Author: Chase Douglas +Date: Fri Feb 3 16:19:10 2012 -0800 + + Implement early touch reject + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit 656ab879f20892975510723ce8fe78faf64aadb4 +Author: Chase Douglas +Date: Fri Feb 3 16:19:09 2012 -0800 + + Check for proper window ID when processing touch allow requests + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit 9a260e9af83feb5c53ffd3b2da2dc3adf06240a1 +Author: Chase Douglas +Date: Fri Feb 3 16:19:08 2012 -0800 + + Move AllowTouch to dix/touch.c, and rename to TouchAcceptReject + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit 192b2c9a2ec04522655675ddfe71de5cf974cc7b +Author: Chase Douglas +Date: Fri Feb 3 16:19:07 2012 -0800 + + Export TouchEventRejected as TouchRejected + + This function is mostly correct for early reject usage. With a small + change to pass the client resource explicitly and making the + TouchOwnership event optional, it is usable for all rejection scenarios. + This change exports it for use outside Xi/exevents.c and modifies the + name accordingly. + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit 19073425e5df1317f73f74ce0b95ab24e0e0da14 +Author: Chase Douglas +Date: Fri Feb 3 16:19:06 2012 -0800 + + Factor out TouchEnd generation and delivery + + The server often needs to generate and deliver TouchEnd events for + circumstances including touch grab acceptance and rejection. This change + refactors the code so it can be used more easily. + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit ab60cadc2afb9d8882144e30fde11c3ef0f999cd +Author: Chase Douglas +Date: Fri Feb 3 16:19:05 2012 -0800 + + Store window pointer in touch listener record + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit f92ba92adfce0e1975feb54ab0e1165b7c2a7bea +Author: Peter Hutterer +Date: Sat Feb 4 19:27:21 2012 +1000 + + Revert "dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents" + + This call was supposed to have no functional changes but in some cases + DeliverDeviceEvents() was called with a uninitialised win variable. + Revert, safer than trying to sort this out otherwise. + + This reverts commit 6eff14a789341d366b3013c5aa020e959c954651. + + Reported-by: Mathieu Taillefumier + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit ca64912c02bdff486fee420a49b11f54f8f5ba08 +Author: Alan Coopersmith +Date: Thu Jan 26 16:41:25 2012 -0800 + + Namespace list api to reduce conflicts with similar system headers + + Rename functions/macros from list_* to xorg_list_* + Rename struct from struct list to struct xorg_list. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + In-sed-I-trust: Peter Hutterer + +commit 1541e242d1607d0db57b0cc12faca9b1c2850c67 +Author: Alan Coopersmith +Date: Fri Dec 23 15:17:28 2011 -0800 + + Stop including from xf86_OSlib.h on Solaris + + We don't need anything from that header (which defines /proc & kernel + structures for process information), and it causes some namespace conflicts. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Keith Packard + +commit 85cecd981191f9c3dab0fb13310d91eff643d423 +Author: Jeremy Huddleston +Date: Sat Jan 28 16:06:28 2012 -0800 + + XQuartz: Release all buttons and keys when deactivating + + http://xquartz.macosforge.org/trac/ticket/486 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Peter Hutterer + +commit 47b457541b33f00807fd495f5b0b24d5f143bf84 +Author: Jeremy Huddleston +Date: Sat Jan 28 23:11:44 2012 -0800 + + XQuartz: Toggle off fullscreen mode when XQuartz is hidden + + http://xquartz.macosforge.org/trac/ticket/478 + + Signed-off-by: Jeremy Huddleston + +commit c2ba3f339f089c595386c4c579935c7984a2a545 +Author: Jeremy Huddleston +Date: Sun Jan 29 14:26:47 2012 -0800 + + XQuartz: Localization Updates + + Signed-off-by: Jeremy Huddleston + +commit 052ca3f22eadd0aa60dd24ac7d5d76137273926f +Author: Keith Packard +Date: Fri Jan 27 22:08:08 2012 -0800 + + Bump version to 1.11.99.902 (1.12 RC2) + + Signed-off-by: Keith Packard + +commit bafedb7e9bcff31e2963eeb54669b2492214fae7 +Author: Jeremy Huddleston +Date: Wed Jan 18 11:52:04 2012 -0800 + + XQuartz: Bump bundle version to 2.7.2 + + Signed-off-by: Jeremy Huddleston + +commit 8e78bbb2d2dc5b18f127540b63b45ba293bbdd25 +Author: Colin Harrison +Date: Thu Jan 26 13:28:24 2012 +0000 + + hw/xwin: Fix spelling of 'Canadian' in winkeybd.h + + The Mounties always get their typo + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 80c073352a276bad3722263629de3cd61df758ab +Author: Colin Harrison +Date: Wed Jan 4 17:16:36 2012 +0000 + + hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition() + + Commit 3b36fd1b49030ead44358945f62e5abe7f4609ce changed miPointerSetPosition() + to take co-ordinates as doubles, not ints, so this code as it stands is now wrong + (if it ever was correct in the first place :-)) + + It's unclear that we can safely promote x,y to doubles, apply miPointerSetPosition() + which potentially constrains the cursor, and then convert back to ints. + + Fortunately, this whole dance seems to be unnecessary, and we can simply remove the + call to miPointerSetPosition() entirely, and just QueuePointerEvents() like any other + input driver. + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit ced9db65950e402d7ddc663225b888e8482b8c57 +Author: Colin Harrison +Date: Wed Jan 25 01:37:16 2012 +0000 + + hw/xwin: Ignore WM_DISPLAYCHANGE messages with 0 bpp + + Ignore WM_DISPLAYCHANGE messages which indicate bpp is changing to 0. + That has no defined meaning I can find, but some graphics card drivers + appear to generate it on suspend/resume or screensaver activate/deactivate. + + Signed-off-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit bea6fb6c7af551778cfe1c0e8412ef4ccf560808 +Author: Jon TURNEY +Date: Sun Jan 22 19:31:51 2012 +0000 + + hw/xwin: Avoid WIN_WINDOW_PROP races during Windows window destruction + + The WIN_WINDOW_PROP is removed during WM_DESTROY handling, so it is not neccessary to + remove it in winDestroyWindowsWindow(), and doing so opens a race condition, as we may + attempt to access that property in the wndproc before the WM_DESTROY has completed. + + A specific example of that race is if a WM_KILLFOCUS occurs in the window between property + removal and WM_DESTROY processing, where we will attempt to apply DeleteWindowFromAnyEvents() + on an invalid (null) WindowPtr. + + Also guard against null WindowPtr in the WM_KILLFOCUS handler + + See http://cygwin.com/ml/cygwin-xfree/2012-01/msg00009.html + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 9a709d5028094fcbeb7a49f47cb85e22cd772f36 +Author: Jon TURNEY +Date: Thu Sep 29 15:05:27 2011 +0100 + + hw/xwin: Handle more motif window decoration hinting + + Handle the MWM_DECOR_MINIMIZE, MWM_DECOR_MAXIMIZE and MWM_DECOR_MENU + decoration hints in a _MOTIF_WM_HINTS window property + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit b8b0b841a0e7cfcecaf0b6a5aa67e1b4499374d9 +Author: Oliver Schmidt +Date: Mon Sep 5 13:32:01 2011 +0100 + + hw/xwin: Fix AltGr key sometimes firing an additional Ctrl-L key + + I also had problems with the AltGr key. These could reliably + be reproduced by holding the AltGr for some seconds (causing + Windows generating auto repeat events) + + I discovered that the mechanism in winkeybd.c function + winIsFakeCtrl_L had a problem if PeekMessage cannot obtain + the next Alt_R message because it is not there yet. + + I prepared a patch that remembers the last Ctrl_L event and + reacts on a later Alt_R. + + It was also necessary to alter the order in winWindowProc() in + winwndproc.c: the invocation of winIsFakeCtrl_L had to be done + before discarding auto-repeated key presses, as winIsFakeCtrl_L() + now has an internal state which must be updated by all key events. + + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3d3114d55a2a323f8d49c3549a0dfdf9d4acf89d +Author: Jon TURNEY +Date: Thu Jun 30 14:19:01 2011 +0100 + + hw/xwin: Handle the virtual key code generated by the Fn key on IBM Lenovo laptops + + Apparently, IBM Leonovo laptops can generate a key-press event for the Fn + key, with virtual key code 0xFF and scan code extended 0x63 + + Handle this specially, rather than just passing on key code 0x63 (delete), + so you don't delete what you just typed when you adjust the screen brightness, + etc. :-) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 74af860f9a59332f6ed1ac9b3e7867fbbb3d7305 +Author: Jon TURNEY +Date: Wed Mar 24 22:41:22 2010 +0000 + + hw/xwin: turn on -emulate3buttons if less than 3 mouse buttons are reported + + Try to be more intelligent with default options, turn on -emulate3buttons by + default if less than 3 mouse buttons are reported by Windows + + Also, add -noemulate3buttons option so this default setting can be reversed + if desired + + Also, correctly report the number of mouse buttons windows is reporting, rather + than always at least 3 + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c0f3709501a0afd3bf77e783f11d2c2e5f489d3b +Author: Jon TURNEY +Date: Thu Mar 24 20:19:47 2011 +0000 + + hw/xwin: In multiwindow mode, don't grab native input focus for new windows which hint they don't want it + + In multiwindow mode, avoid grabbing the input focus for newly + created windows which have InputHint FALSE + + (this is used by e.g. glean to avoid every test window grabbing + the focus) + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 25caa8565d7d10f4c254bca5bb9efa05a77542ad +Author: Jon TURNEY +Date: Wed Jan 25 13:33:39 2012 +0000 + + hw/xwin: Remove some redundant OS version reporting + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit a9aca218f557c723e637287272819a7c17174e1e +Author: Roland Cassard +Date: Sat Oct 23 18:12:36 2010 +0100 + + hw/xwin: Don't assume we'll always have converted the clipboard selection after 2 attempts + + Rather than knowing we have to call winProcessXEventsTimeout() for up to 2 WIN_XEVENTS_CONVERT messages, process + all messages in winProcessXEventsTimeout() until either: (i) the time out expired, (ii) an error occurred, or + (iii) received a WIN_XEVENTS_NOTIFY messaage indicating the data has been to put on the clipboard. + + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 75fe336b6c903133ae386f5cb8d308a0e9e2768e +Author: Michel Hummel +Date: Fri Aug 6 15:23:52 2010 +0100 + + hw/xwin: Mitigate a race condition in clipboard thread initialization + + Remove the variables g_fClipboardLaunched and g_fClipboardStarted from + winInitializeGlobals(), as their re-initialization is handled in the + file hw/xwin/InitOutput.c. + + Re-initializing g_fClipboardLaunched and g_fClipboardStarted during + the server reset procedure can lead to the clipboard thread being + launched two times and sometimes leads to a crash of the X server... + + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 95b1391fe3d3192abdfbad4140513b2112cfa02a +Author: Jon TURNEY +Date: Mon Apr 5 13:57:24 2010 +0100 + + hw/xwin: Chain IOError handlers to avoid longjmp across threads + + Avoid crashes on shutdown due to the undefined behaviour of calling longjmp() on the + result of setjmp() from a different thread, by chaining IOError handlers and only + jumping back up to the frame for this thread + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 0659437f5ec0e3f646373394f5f9c5461e2170f3 +Author: Yaakov Selkowitz +Date: Sat Feb 20 23:40:53 2010 -0600 + + hw/xwin: Improve XWinrc loading and error recovery + + If $HOME/.XWinrc is present but badly formed, ignore it and try + system.XWinrc instead. If neither file is present or both are badly + formed, provide a built-in default which gives the user the chance to + load their new or fixed configuration without restarting. + + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 47c7b6d3e626497747ae2780f259a15b8e6c846f +Author: Michel Hummel +Date: Sat Oct 23 18:35:57 2010 +0100 + + hw/xwin: Remove no-longer needed tricks used to prevent the clipboard client from being killed + + Remove no-longer needed tricks used to hide the clipboard client from XDM to prevent + it from being killed + + - Delete XQuery wrapper used to hide clipboard client + - Delete XDMCP mode heuristic which waits until some magic number of connections have + been established before starting the clipboard + + We still need the EstablishConnection wrapper to ensure that the clipboard client isn't + the first client (causing a server restart if it disconnects) + + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit c1bf3baa44fbd8af33a2b3ce045324485b85a7a7 +Author: Michel Hummel +Date: Sun Oct 31 14:53:02 2010 +0000 + + hw/xwin: Automatically restart clipboard thread + + Automatically restart clipboard thread on unexpected exit + + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit ae981341a98f7a1ee5d6f3bc8ebde04e42042dc5 +Author: Jon TURNEY +Date: Mon Feb 8 22:37:30 2010 +0000 + + hw/xwin: Give the X window for the clipboard integration client a name + + This makes it a bit easier to find when staring at the output of + 'xwininfo -tree -root' + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit b1093241f3e28223a139e7cb5c3ae85182bdf545 +Author: Jon TURNEY +Date: Tue Oct 19 20:47:21 2010 +0100 + + Xext: Warning fix for shm.c + + shm.c: In function 'CheckForShmSyscall': + shm.c:182:5: warning: function declaration isn't a prototype [-Wstrict-prototypes] + + Signed-off-by: Jon TURNEY + Reviewed-by: Alan Coopersmith + Reviewed-by: Colin Harrison + +commit 02775efb8930291cc62fc84086c97da75b912a55 +Author: Adam Jackson +Date: Tue Jan 24 17:35:04 2012 -0500 + + int10: Fix unmapping of the BIOS scratch area + + 342f3eac8460fc48cfad1f1d7be939d671e6e1cd introduced a bug, 'base' is + incremented before use. The old code corrected this when unmapping, so + the new code should too. + + Signed-off-by: Adam Jackson + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit e1085a0da0b9299f48b3dc41dee5e33bf022bea5 +Author: Chase Douglas +Date: Wed Jan 18 19:09:21 2012 -0800 + + Don't set X and Y valuators for indirect touch events + + For expediency, it made sense to always have the X and Y axes set for + direct touch device event propagation. The last X and Y values are + stored internally. However, indirect device touch event propagation + does not depend on the touch's X and Y values. Thus, we don't need to + set the values for every indirect touch event. + + On top of this, the previous X and Y values aren't stored for indirect + touches, so without this change the axes get erroneously set to 0. + + Signed-off-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit 5201310559fe8708ba8278bdef77cdc1673fff71 +Author: Daniel Stone +Date: Thu Jan 19 22:40:32 2012 +1100 + + UngrabAllDevices: Don't kill clients if not told to + + The kill_client argument to UngrabAllClients specifies if we want to + kill the client holding the grab or just deactivate the grab. + + Signed-off-by: Daniel Stone + Reported-by: Julien Cristau + Reviewed-by: Cyril Brulebois + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 9b1e18f42a05a79d9ebec372a37b47442e397ca9 +Author: Chase Douglas +Date: Wed Jan 18 18:04:14 2012 -0800 + + Only update pointer motion data for pointer emulated touch events + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit f00e5b02f5d9928cd88961e761da91b5faff1b32 +Author: Chase Douglas +Date: Wed Jan 18 18:04:13 2012 -0800 + + Only scale direct device touch coordinates + + Indirect touch devices provide valuator values in pure device + coordinates. They also don't need to be fixed up for screen crossings. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 24dc0389da3970e83e4908039957567e55f9ea05 +Author: Peter Hutterer +Date: Mon Jan 16 12:53:39 2012 +1000 + + include: Fix comment typo + + Signed-off-by: Peter Hutterer + +commit 954bb994842aa43a0f272858e65036c016b729a4 +Author: Jeremy Huddleston +Date: Mon Jan 9 00:40:10 2012 -0800 + + configure.ac: Remove MIEXT_SHADOW_LIB from XORG_LIBS + + This is provided by dixmods/libshadow.so and is not part of the main binary. + + This addresses a build failure on darwin due to MIEXT_SHADOW_LIB having + unsatisfied dependencies (FB_LIB) in XORG_LIBS. + + Signed-off-by: Jeremy Huddleston + +commit ba0f5cc1961bfcfb5e7d66ac5df19d429952631d +Author: Jeremy Huddleston +Date: Mon Jan 9 00:14:29 2012 -0800 + + xfree86: Don't link libxorgxkb against libdix.la + + libdix.a is already provided by XSERVER_LIBS. Including it in libxorgxkb + results can result in duplicate symbols landing in the Xorg binary on some + configurations (buggy glibtool on darwin). + + Signed-off-by: Jeremy Huddleston + +commit 2387fb23858d645f15061bc7bcbe4654386ba116 +Author: Jeremy Huddleston +Date: Fri Jan 13 12:00:14 2012 -0800 + + sdksyms.sh: Exit on error rather than building an empty symbol table + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Keith Packard + +commit cd89482088f71ed517c2e88ed437e4752070c3f4 +Author: Jeremy Huddleston +Date: Wed Jan 11 12:17:06 2012 -0800 + + test: Fix linking issues when building unit tests without the Xorg DDX + + This allows unit tests to build and run successfully on darwin when + only the Xvfb or XQuartz DDX is built. + + Signed-off-by: Jeremy Huddleston + Signed-off-by: Jon TURNEY + Reviewed-by: Jon TURNEY + +commit 78d39b3222a4b0b92d840137f5455d3a20dd6906 +Author: Jeremy Huddleston +Date: Sun Jan 15 02:26:43 2012 -0800 + + Revert "glx: don't leak fbconfigs" + + This reverts commit d26fae246d7c451b4d5ffe24fdb959d4bd00b107. + + This patch free()s memory in __glXScreenDestroy which was allocated in + glxdricommon (which isn't in every DDX). That breaks abstraction and + causes a crash when XQuartz quits, because it results in freeing a pointer + that was never allocated. + + The correct fix is to do this cleanup in __glXDRIscreenDestroy. + + Signed-off-by: Jeremy Huddleston + +commit f9e6858d5c10be6a8439c0f18bfb2325fa0ee070 +Author: Chase Douglas +Date: Wed Jan 11 07:38:12 2012 -0800 + + Use event time instead of CurrentTime for grab times + + When {XI,X,}AllowEvents is called, the timestamp is compared against the + grab time to ensure that the request pertains to the current grab in the + server. While many clients may use CurrentTime (client-side), the + timestamp of the event causing the grab is also valid. + + This change ensures that the server's notion of the grab time is the + time of the event that activated the grab rather than the time that the + grab is actually activated. + + This bug was exposed through nested touch then pointer grabs. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit a6273cc85c01fc020643a68e49ca4e7a2d2ae898 +Author: Peter Hutterer +Date: Thu Jan 12 10:17:34 2012 +1000 + + xfree86: mention udev in the xorg.conf manpage AutoAddDevices section + + And point out what "hotplugging" means. + + Signed-off-by: Peter Hutterer + Reviewed-by: Julien Cristau + +commit a60d87ffe6d9a15fa830c8da2947c72487863c2b +Author: Peter Hutterer +Date: Wed Jan 11 09:04:02 2012 +1000 + + os: prettify backtrace output + + Changes to output: + * "Backtrace:" now appears on a separate line _with_ a timestamp + * A blank line is inserted after the last backtrace line + + Signed-off-by: Peter Hutterer + Reviewed-by: Julien Cristau + +commit c495a839ace7fcc1f1fe414d3d3ba04f08885434 +Author: Peter Hutterer +Date: Wed Jan 11 09:01:05 2012 +1000 + + include: prettify BUG_WARN output + + ErrorF output is prefixed with a timestamp, so the previous output would + look like this: + + [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' + BUG: getevents.c:842 in scale_to_desktop() + + Change this to have the prefix on both lines: + [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' + [ 50.423] BUG: getevents.c:842 in scale_to_desktop() + + Signed-off-by: Peter Hutterer + Reviewed-by: Julien Cristau + +commit bbb6b8c834e0e1491ca14403b5d0840dd14380d3 +Author: Peter Hutterer +Date: Fri Jan 6 13:20:45 2012 +1000 + + render: don't bother with animated cursors on floating slaves (#39989) + + X.Org Bug 39989 + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit 35bd77e9d0701daae87d681900d749604fc6471f +Author: Peter Hutterer +Date: Mon Jan 9 15:04:10 2012 +1000 + + dix: Update pointer limits for floating devices too (#43635) + + When the screen is restructured, the pointer limits need to be reset for + floating slave devices as well, not just for master pointers. Only skip + devices that don't have a cursor (attached slaves and keyboard) + + Bug reproducer: float an absolute slave device, rotate the screen - the + device is now confined to a section of the screen only. + + X.Org Bug 43635 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 5de0c2582f9c80874b4f4a5b86d250059bfaa85b +Author: Keith Packard +Date: Thu Jan 12 12:10:07 2012 -0800 + + Revert "os: Repack ConnectionOutput for LP64" + + This reverts commit d5f724544afd2949cebfcf4f0b4510ec0c701bec. + + ABI change pended for 1.13 + +commit 11331305d4acd117b71502e45c0e86684fa9280b +Author: Keith Packard +Date: Thu Jan 12 12:10:03 2012 -0800 + + Revert "dix: Repack ClientRec" + + This reverts commit f702372822dadb1fef92cfc25086481f640147b3. + + ABI change pended for 1.13 + +commit d9eeede52f2d5ba9dd6368d988a5d2abb3b8b4e5 +Author: Keith Packard +Date: Thu Jan 12 12:09:59 2012 -0800 + + Revert "dix: Pull client-is-local flag up to the ClientRec" + + This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96. + + ABI change pended for 1.13 + +commit 3be37375eed9eb9cfb9c42821deda4213af4057b +Author: Keith Packard +Date: Thu Jan 12 12:09:55 2012 -0800 + + Revert "dix: Extend initial connection handshake for forwarding proxies" + + This reverts commit 78fa121f4097d29458e5453c13473595df06e26e. + + ABI change pended for 1.13 + +commit 5b9f5c8a53aca03c3c73bc10bd362987621a9d72 +Author: Keith Packard +Date: Thu Jan 12 12:09:44 2012 -0800 + + Revert "os: Hide the Connection{In,Out}put implementation details" + + This reverts commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b. + + ABI change pended for 1.13 + +commit 5867d453cebebec6b4f10409af86b603755fbf51 +Author: Keith Packard +Date: Thu Jan 12 12:09:34 2012 -0800 + + Revert "dix: Fix types in WindowOptRec" + + This reverts commit a4553019a10b4e01cc06f3081db71a83338697b4. + + ABI change pended for 1.13 + +commit e722ad6c3efa57b806ca0f2dc13114bd3619a88c +Merge: e476af4 4e44580 +Author: Keith Packard +Date: Mon Jan 9 13:22:28 2012 -0800 + + Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes' + +commit e476af417d83730b11054f4e5b127ab5540bb332 +Merge: f4956fa 1460083 +Author: Keith Packard +Date: Mon Jan 9 13:17:37 2012 -0800 + + Merge remote-tracking branch 'whot/multitouch' + +commit f4956faab9ccf9aba6cf9603f4489f5dad19a347 +Author: Zhigang Gong +Date: Wed Jan 4 07:01:19 2012 +0000 + + mi/mibitblt: Fix an overflow bug of bit shift. + + When depth equal to 32 and planeMask equal to 0, the overflow will + occur and cause the pixmap can't be cleared. There are some test + cases in XTS hit this bug, and this fix can eliminate the corresponding + failures. + + Signed-off-by: Zhigang Gong + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 6d6d4cb6043905d850834946e9bfc526ed5a9ef7 +Author: Matthieu Herrb +Date: Mon Jan 2 13:23:59 2012 +0000 + + Add OpenBSD support to DetermineClientCmd() + + Uses kvm_getargv() from libkvm. + + Signed-off-by: Matthieu Herrb + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit a55214d11916b707b7c8c65c555cc0cbb59ac503 +Author: Adam Jackson +Date: Tue Jan 3 06:22:24 2012 +0000 + + Always install xaa sdk headers + + Always install XAA SDK headers so drivers still build even with + --disable-xaa + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit dafc327f3c75205cf7e5360e9ccd71c7457f61a5 +Author: Matthieu Herrb +Date: Mon Jan 2 13:11:41 2012 +0000 + + UnloadSubModule(): accept pointer value '1' and ignore it. + + Some driver modules try to unload submodules that are now built-in. + + Signed-off-by: Matthieu Herrb + Reviewed-by: Julien Cristau + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 8db029064bcbe378061e812bb8136608e3123226 +Author: Adam Jackson +Date: Wed Jan 4 16:39:33 2012 +0000 + + vgahw: Fix DACDelay() macro to use the driver's vtable + + We don't want to unconditionally use I/O routines here, since if the + driver is using mmap'd VGA ports then the I/O handle won't be set up. + + Tested-by: Jeff Chua + Signed-off-by: Adam Jackson + Reviewed-by: Mark Kettenis + Signed-off-by: Keith Packard + +commit 63a8012947fc44ccb3d661dec88dbda14e7f3c04 +Author: Chris Halse Rogers +Date: Thu Jan 5 01:22:40 2012 +0000 + + Revert "dix: don't return BadMatch from GetProperty (#23562)" + + This reverts commit f04fe06ae244b851b38be824b1a80f2f8a030591. + + dixLookupWindow no longer returns BadMatch. No other caller was checking + for it, so this problem is now fixed in the utility function. + + Signed-off-by: Christopher James Halse Rogers + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit ef492e9797b6d4f6bbc25e86bedc24477819fde7 +Author: Chris Halse Rogers +Date: Thu Jan 5 01:22:39 2012 +0000 + + dix: Return BadWindow rather than BadMatch from dixLookupWindow + + dixLookupWindow uses dixLookupDrawable internally, which returns + BadMatch when the XID matches a non-Window drawable. Users + of dixLookupWindow don't care about this, just that it's not + a valid Window. + + This is a generalised version of the fix for X.Org Bug 23562, + where GetProperty was incorrectly returning BadMatch. Auditing other + window requests, all that I checked would incorrectly return BadMatch + in these circumstances. An incomplete list of calls that could + incorrectly return BadMatch is: ListProperties, SetSelectionOwner, + {Destroy,Map,Unmap}{,Sub}Window. + + None of the callers of dixLookupWindow, except for GetProperty, check + for BadMatch + + Signed-off-by: Christopher James Halse Rogers + Reviewed-by: Daniel Stone + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit ff891bbf68caefc22cabb541b6b56af086ac2280 +Author: Arthur Taylor +Date: Fri Jan 6 07:21:37 2012 +0000 + + linux: Use K_OFF VT KB mode over K_RAW if available. + + Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in + which special keys (like Ctrl+C) are not interpreted and input is not + buffered. Use of this mode over K_RAW removes the need for a + xf86ConsoleHandler to drain the VT input buffer, removing the grief it + causes when it goes wrong or is (de)initialized out-of-order. (This + also saves a few needless context switches per key event.) + + If K_OFF is not defined or not understood by the kernel, K_RAW and the + previous method is used as a fall-back. + + Reviewed-by: Adam Jackson + Signed-off-by: Arthur Taylor + Signed-off-by: Keith Packard + +commit 0b113f7cdf5228dccd51a749a339c8669e3f20ff +Merge: 0b2c649 777bf90 +Author: Keith Packard +Date: Mon Jan 9 13:07:25 2012 -0800 + + Merge commit '777bf90abeac37087a3d0538b847742523d5acf2' + +commit 0b2c6491c5e5e1c9ba067299f3de61f5acee263b +Merge: 1f5587e 6b19436 +Author: Keith Packard +Date: Mon Jan 9 11:40:23 2012 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit 1f5587e14406c083687203030db6a11691ac9d9f +Merge: a97252d 6269977 +Author: Keith Packard +Date: Mon Jan 9 11:37:59 2012 -0800 + + Merge remote-tracking branch 'kibi/master' + +commit a97252db24669a3e26a935024ea38b8a28d30586 +Author: Jeremy Huddleston +Date: Tue Dec 20 19:49:47 2011 -0800 + + XQuartz: GL: Buildfix for recent GLX changes + + dispatch.h was leftover from an earlier implementation and is no longer + needed, so remove it since including it causes a build failure due to + conflicts between GL/gl.h and OpenGL/gl.h + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: Ian Romanick + +commit 6b194365364cb7a74c2b19f4a8c5e0e0404339da +Author: Andreas Wettstein +Date: Wed Nov 30 20:20:21 2011 +0100 + + xkb: Message actions suppress other key presses #28575 + + When a key to which a message action is mapped is held down, presses of + other keys were not registered. + + Signed-off-by: Andreas Wettstein + Reviewed-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 4e44580efd4522ced644c698336d2f6ea54f3917 +Author: Ryan Pavlik +Date: Fri Nov 4 14:29:01 2011 -0500 + + hw/xwin: Include manifest file in the dist tarball + + Commit c02638fd added the manifest file, but didn't add it to EXTRA_DIST. + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit c763fe51b8ff18e204caab9cf97376a1b72324f0 +Author: Ryan Pavlik +Date: Fri Nov 4 13:17:50 2011 -0500 + + hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW + + hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW + but still provide it if building for Win32 without autotools + + xserver/hw/xwin/winclipboard.h:42:0: warning: "HAS_WINSOCK" redefined + ../../include/xwin-config.h:11:0: note: this is the location of the previous definition + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 3d80f202b06227f7fc03b674f5fbf809c2d1efb2 +Author: Ryan Pavlik +Date: Fri Oct 28 09:56:19 2011 -0500 + + hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow() + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit c824004b4592b3d86b3514be7cab37b36642b13a +Author: Ryan Pavlik +Date: Fri Oct 28 09:56:11 2011 -0500 + + hw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame() + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 3c501691a0a9fa17da4e2cc84f55010ef2a4790d +Author: Ryan Pavlik +Date: Fri Oct 28 09:52:34 2011 -0500 + + hw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD() + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit a492c02649de4c60ac21a7fcb6b7c730b558dca6 +Author: Ryan Pavlik +Date: Fri Oct 28 09:49:00 2011 -0500 + + hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI() + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit b907079596bc8600d3420c189409053b0b5016f6 +Author: Ryan Pavlik +Date: Fri Oct 28 09:46:56 2011 -0500 + + hw/xwin: Clarify an if statement mixed with ifdef in winSetEngine() + + Use the same pattern as elsewhere so it's a bit clearer what we + are checking + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 5c35dd7be716a3464f012c92866919a3606f9beb +Author: Ryan Pavlik +Date: Thu Oct 27 15:49:59 2011 -0500 + + hw/xwin: Fix rrScreenSetSize function pointer mismatch + + winrandr.c: In function ‘winRandRInit’: + winrandr.c:218:31: warning: assignment from incompatible pointer type + + Fix winRandRScreenSetSize() function signature to match RRScreenSetSizeProcPtr type, + to align with commit fd9331f6 'Revert "Separate out screen size and screen pixmap + sizes in RRScreenSizeSet"' + + This is fall-out from the late revert of RANDR 1.4 in the 1.10 release cycle, it will + probably need to be reverted if/when that goes back in again. + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit aa07d82908c28f4d083c0c55846a5b34f0e1ef31 +Author: Ryan Pavlik +Date: Fri Oct 28 09:56:26 2011 -0500 + + hw/xwin: Remove an empty #if 0/#endif + + Um... yeah + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit d459f42e64f2bafef5124a456d2ad6fa2cd92a7f +Author: Ryan Pavlik +Date: Fri Oct 28 09:52:37 2011 -0500 + + hw/xwin: Fix double-free in error path in winQueryRGBBitsAndMasks() + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit cc7dedd6b51a01996ddab10fe8b84e30700d1570 +Author: Ryan Pavlik +Date: Fri Oct 28 09:46:45 2011 -0500 + + hw/xwin: Fix a memory leak in error path in winInitWM() + + Signed-off-by: Ryan Pavlik + Reviewed-by: Colin Harrison + Reviewed-by: Jon TURNEY + +commit 777bf90abeac37087a3d0538b847742523d5acf2 +Author: Adam Jackson +Date: Mon Jul 18 15:07:07 2011 -0400 + + xfree86: Remove the pretense of EDID v2 support + + We don't do anything with EDID v2 blocks besides publish them on the + root window. Worse, the check deleted by this patch would attempt to + take a checksum of arbitrary memory if the rawData array isn't 256+ + bytes long (and, for the monitors mentioned, it probably is only 128). + + Reviewed-by: Mark Kettenis + Signed-off-by: Adam Jackson + +commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51 +Author: Adam Jackson +Date: Tue Dec 13 21:23:12 2011 -0500 + + dix: Tune dixLookupDrawable for success + + The vast vast vast majority of resource lookups are successful. Move some + work to the error paths so we don't punish success. + + Before: + 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square + + After: + 40000000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square + + Reviewed-by: Alan Coopersmith + Signed-off-by: Adam Jackson + +commit 83a98543b58c661a22574a6f8d8f9d777c0955b8 +Author: Adam Jackson +Date: Tue Dec 13 20:23:40 2011 -0500 + + dix: Tune dtrace hooks around Dispatch + + Don't call LookupMajorName if the hooks aren't active, it's quite expensive. + + Before: + 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square + + After: + 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square + + Reviewed-by: Alan Coopersmith + Signed-off-by: Adam Jackson + +commit 11977fab546da35d579ebe285e3c26864007805e +Author: Adam Jackson +Date: Tue Dec 13 21:00:05 2011 -0500 + + xace: ricer tuning for XaceHook + + gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the + varargs code for some reason, so do it ourselves. + + Before: + 40000000 trep @ 0.0010 msec (1050420.2/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square + + After: + 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square + + Reviewed-by: Alan Coopersmith + Signed-off-by: Adam Jackson + +commit a4553019a10b4e01cc06f3081db71a83338697b4 +Author: Adam Jackson +Date: Fri Jun 17 14:30:06 2011 -0400 + + dix: Fix types in WindowOptRec + + No reason for these to be 64 bits on LP64. + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit c44ef2e1ff7bad168c348da63477b4636b3054fd +Author: Adam Jackson +Date: Fri Jun 17 14:17:09 2011 -0400 + + os: Minor header cleanup + + Move some constants near their only users, and remove some + getdtablesize() logic that's second-guessing configure. + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b +Author: Adam Jackson +Date: Fri Jun 17 14:03:01 2011 -0400 + + os: Hide the Connection{In,Out}put implementation details + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit 78fa121f4097d29458e5453c13473595df06e26e +Author: Adam Jackson +Date: Fri Jun 17 13:43:38 2011 -0400 + + dix: Extend initial connection handshake for forwarding proxies + + Forwarding proxies like sshd will appear to be local, even though they + aren't really. This leads to weird behaviour for extensions that truly + require running under the same OS services as the client, like MIT-SHM + and DRI2. + + Add two new legal values for the initial connection's byteOrder field, + 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side + effect of forcing the client to be treated as non-local. Forwarding + proxies should attempt to munge the first packet of the connection + accordingly; older servers will reject connections thusly munged, so the + proxy should fall back to passthrough if the munged connection attempt + fails. + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96 +Author: Adam Jackson +Date: Fri Jun 17 13:22:41 2011 -0400 + + dix: Pull client-is-local flag up to the ClientRec + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit f702372822dadb1fef92cfc25086481f640147b3 +Author: Adam Jackson +Date: Fri Jun 17 12:58:25 2011 -0400 + + dix: Repack ClientRec + + sizeof(ClientRec) ILP32 LP64 + before 120 184 + after 104 136 + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit d5f724544afd2949cebfcf4f0b4510ec0c701bec +Author: Adam Jackson +Date: Thu Jun 16 17:40:24 2011 -0400 + + os: Repack ConnectionOutput for LP64 + + Reviewed-by: Daniel Stone + Signed-off-by: Adam Jackson + +commit ed8f3c4bd17bddf1369d050ea8e63b9451d887ce +Author: Peter Hutterer +Date: Fri Jan 6 10:10:16 2012 +1000 + + Xi: change XIChangeDeviceProperty from const pointer to const void * + + According to Daniel Kurtz, a typedef void *pointer is a atomic type. So a + 'const pointer' is equivalent to 'void* const' instead of the intended + 'const void*'. + + This technically changes the ABI, but we don't bump it for this. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 146008358e9dd9b178bd5305bcc1680ca16c328d +Author: Chase Douglas +Date: Thu Jan 5 16:43:40 2012 -0800 + + Remove last listener on touch reject + + The current code short-circuits around the block that removes the + rejecting listener if it is the only listener left. It also does not + delete the touchpoint record if the touch has not physically ended. + + This change ensures the listener is removed under these circumstances. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit e30c3c5c59abba9713cf3be532a46220aa9aeeca +Author: Chase Douglas +Date: Wed Jan 4 15:50:40 2012 -0800 + + Don't end touchpoint if owning client hasn't accepted/rejected + + A touchpoint is ended when no further processing will take place for it. + This includes the situation where there is only one grabbing client, and + the client receives a touch end before it has accepted/rejected the + touchpoint. + + This change ensures that a delivered touch end event is converted into a + touch update event under the above scenario. If the event is left as a + touch end event, the touchpoint will be ended in ProcessTouchEvent(). + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 075a473e538efb771497b762101694b6c0c45c2b +Author: Carlos Garnacho +Date: Tue Jan 3 02:43:40 2012 +0100 + + dix: Set XITouchEmulatingPointer on events from the touch sequence emulating pointer events + + The internal flag is kept around, merely translated to XITouchEmulatingPointer + when creating the XI2 events that will be delivered to the client. + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Reviewed-by: Chase Douglas + Signed-off-by: Peter Hutterer + +commit e8db10a033491059ddf2b4777c9fafed14c403e8 +Author: Peter Hutterer +Date: Fri Jan 6 13:49:04 2012 +1000 + + Require inputproto 2.1.99.5 + + Signed-off-by: Peter Hutterer + +commit 223ba8b46eacbc8e573bc5136a3d6677f3e39099 +Author: Peter Hutterer +Date: Thu Jan 5 15:55:04 2012 +1000 + + dix: fix wrong condition checking for attached slave (#44003) + + We need to update the master if the device is not a master _and_ it is not + floating. + + X.Org Bug 44003 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 3ce102c362cadcd7087bdcf48440d9498eaf77d0 +Author: Peter Hutterer +Date: Thu Jan 5 07:08:01 2012 -0500 + + dix: on PointerRootWin send a FocusIn to the sprite window too + + XTS XSetDeviceFocus-7 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit a125aabda3a5cf27aa98cb61f16e49280b66f451 +Author: Peter Hutterer +Date: Thu Jan 5 07:02:51 2012 -0500 + + dix: send focus events to the immediate parent (#44079) + + For a transition from windows A to B, A->parent did not receive an event. + DeviceFocusOutEvents sends to windows ]from, to[, so start with the actual + window, not it's parent. + + X.Org Bug 44079 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Keith Packard + +commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae +Author: Peter Hutterer +Date: Tue Jan 3 10:45:45 2012 +1000 + + xfree86: split warning about missing identifier or input driver + + Check for identifier first and bail if it's missing (also remove the current + identifier check after we've already bailed due to missing identifiers) + + If a driver is missing, warn but also say that we may have added this device + already. I see too many bugreports with incorrectly shortened log files. + + Signed-off-by: Peter Hutterer + Reviewed-by: Cyril Brulebois + +commit 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf +Author: Julien Cristau +Date: Fri Dec 30 20:41:25 2011 +0100 + + os: don't ignore failure from dladdr + + If dladdr returns 0, don't go and use the returned Dl_info, it may + contain garbage. + + X.Org bug#44315 + + Reported-and-tested-by: Cyril Brulebois + Reviewed-by: Jeremy Huddleston + Reviewed-by: Cyril Brulebois + Signed-off-by: Julien Cristau + +commit 644efb43e0639af648dd46d9729c2cabd9511238 +Author: Cyril Brulebois +Date: Fri Dec 30 02:34:36 2011 +0000 + + linux/ia64: Fix regression after domain I/O support code removal. + + Side effect of aa0bfb0f133481c57762012e8e30c05ffa151423: + | CCLD Xorg + | sdksyms.o:(.data.rel+0x27d8): undefined reference to `outl' + | collect2: ld returned 1 exit status + + Since the linux/ia64 domain I/O support code got removed in that + commit, there's no reason to keep on declaring those functions + (inb, inl, inw, outb, outl, outw). + + Bugzilla: https://bugs.freedesktop.org/43985 + + Reviewed-by: Jeremy Huddleston + Signed-off-by: Cyril Brulebois + +commit 98cde254acb9b98337ddecf64c138d38c14ec2bf +Author: Keith Packard +Date: Tue Dec 27 13:42:21 2011 -0800 + + Bump version to 1.11.99.901 (1.12 RC1) + + Signed-off-by: Keith Packard + +commit 5037c9af78da6652189de7202e70e1b833395af5 +Author: Keith Packard +Date: Tue Dec 27 14:02:01 2011 -0800 + + glx/glapioffsets.h is no longer part of the build, remove it + + Signed-off-by: Keith Packard + +commit 8dedf9831bd80514d800f0085213296a3726dba7 +Merge: cfc4c3d cf96183 +Author: Keith Packard +Date: Tue Dec 27 13:13:48 2011 -0800 + + Merge remote-tracking branch 'kibi/master' + +commit cfc4c3d7fa8bd4da4c08b2ab8e6f85435f75353a +Author: Alan Coopersmith +Date: Sat Dec 24 10:00:56 2011 -0800 + + Add Solaris support to DetermineClientCmd + + Uses /proc/pid/psinfo to read command & partial arguments. + + Moves cmdsize & argsize variables into non-Solaris #else clause + to avoid unused variable warnings. + + Fixes format mismatch errors when building with DEBUG defined on + a 64-bit platform (where Mask is defined as CARD32). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Rami Ylimäki + Signed-off-by: Keith Packard + +commit a28ff2cf92c2b35e02eacca21af929afabbf6b83 +Author: Chase Douglas +Date: Thu Dec 22 12:00:37 2011 -0800 + + test/xi2: Really fix infinite loop in test_convert_XITouchOwnershipEvent + + long i; + for (i = 1; ; i <<= 1) + if (i == (1 << 31)) + break; + + (1 << 31) is compiled as an int, and thus is equal to -2147483648. We + are trying to compare it against a long, which on 64-bit machines is + 2147483648. This results in an infinite loop. + + Signed-off-by: Chase Douglas + Signed-off-by: Keith Packard + +commit e7df42ab68e30588a5e32ed543b0711821daf009 +Author: Keith Packard +Date: Thu Dec 22 09:35:51 2011 -0800 + + test/xi2: Fix infinite loop in test_convert_XITouchOwnershipEvent + + The touchid test was using a loop like: + + for(i = 1; i < 0xffffffff; i <<= 1) + + When 'i' is a 32-bit variable, this infinite loops as it goes from + 0x80000000 to 0. 'i' is declared as 'long', which is 32-bit in 32-bit mode. + + Signed-off-by: Keith Packard + +commit cf96183122a85e3376e560f0360b38b5676e57a9 +Author: Cyril Brulebois +Date: Wed Nov 2 12:41:20 2011 +0100 + + xorg.conf.man: Fix bad whatis entry. + + Debian's QA tool “lintian” reported a bad whatis entry for the + xorg.conf(.d) manpages. + + It comes with the following pointers: + For manual pages that document multiple programs, functions, files, or + other things, the part before "\-" should list each separated by a + comma and a space. […] + + Refer to the lexgrog(1) manual page, the groff_man(7) manual page, and + the groff_mdoc(7) manual page for details. + + Indeed, the current situation is: + $ whatis xorg.conf; whatis xorg.conf.d + xorg.conf (5) - (unknown subject) + xorg.conf.d (5) - (unknown subject) + + With this patch: + xorg.conf (5) - configuration files for Xorg X server + xorg.conf.d (5) - configuration files for Xorg X server + + Reviewed-by: Alan Coopersmith + Signed-off-by: Cyril Brulebois + +commit f75bdf7fbe757f4603e39139acc3c90538a45e15 +Author: Peter Hutterer +Date: Thu Dec 22 10:00:15 2011 +1000 + + test: fix grab mode value tests for new XIGrabModeTouch + + This test checks that last-valid-mode + 1 returns a BadValue. With the + addition of XIGrabModeTouch, that value has changed - sync it up again. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e395efc25f9fd60377f32c2bf1a9153d70908236 +Merge: 2bb282c fcda98c +Author: Peter Hutterer +Date: Thu Dec 22 09:29:59 2011 +1000 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into multitouch + + Conflicts: + configure.ac + dix/inpututils.c + + Signed-off-by: Peter Hutterer + +commit 2bb282cd45cb8149b39d72397ef5bbcfebca11d2 +Author: Peter Hutterer +Date: Wed Dec 21 14:45:27 2011 +1000 + + Xi: only activate the device grab if we don't already have one + + If the device is already grabbed, don't activate the passive grab, it screws + with our event masks. Just deliver to the grabbing client instead. + + Reported-by: Carlos Garnacho + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 475ef5cc8339fac3696fe654ef683f92f0b0cc2c +Author: Carlos Garnacho +Date: Wed Dec 21 01:08:40 2011 +0100 + + dix: fix xi2 mask/filter when delivering grabbed events + + Signed-off-by: Carlos Garnacho + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 4551510f752624592f9201f73db89ac1325a234a +Author: Peter Hutterer +Date: Mon Dec 19 09:08:05 2011 +1000 + + test: add a basic test for ownership event values + + Signed-off-by: Peter Hutterer + +commit 0c661dc478b4b436a3e61066d31bc510c7a08456 +Author: Peter Hutterer +Date: Mon Dec 19 08:31:37 2011 +1000 + + test: drop printfs from protocol-eventconvert.c + + The test outputs are noisy enough, no need having these here too. + + Signed-off-by: Peter Hutterer + +commit 8080d785b2c1e5791312ed0975efd1b8aea58d98 +Author: Peter Hutterer +Date: Wed Dec 21 11:11:48 2011 +1000 + + dix: remove requirement for client_id be the first element + + Leftover code from an earlier version of GetTouchEvents. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 552de314bf0c8e4de5d002bdd1c12388c2f42283 +Author: Peter Hutterer +Date: Mon Dec 19 14:52:41 2011 +1000 + + dix: don't retrieve the syncEvents tail on an empty list + + An empty list points to itself but syncEvents has the list head only and is + of a different format than the elements. Thus, casting it to a QdEventPtr + gives us garbage. + + Segfaults with XTS test case Xlib13/XGrabKeyboard + + Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb. + + Reported-by: Aaron Plattner + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 76c11e0872dedcd360cbe02cf62bb9de3b212957 +Author: Peter Hutterer +Date: Fri Dec 16 12:41:08 2011 +1000 + + dix: button state must show the logical buttons, not physical buttons + + If the device is mapped 3 2 1, a click on physical button 1 sends a button 3 + press, but the state was set for button 1. Fix this, the state must be set + for that button's logical mapping. + + https://bugzilla.gnome.org/show_bug.cgi?id=655928 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 8a32c39c00789c16006de61112627722ce548be1 +Author: Peter Hutterer +Date: Thu Dec 15 07:59:06 2011 +1000 + + mi: handle screen switching on pointer emulated touch events + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 48547068b115b1f5e5f46a70110454a2175fb9a4 +Author: Peter Hutterer +Date: Thu Dec 15 07:57:47 2011 +1000 + + mi: split move to new screen logic to a helper function + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 3b1e2035cc4740711360c845cfcdff07f7b60558 +Author: Daniel Stone +Date: Thu Dec 15 07:52:28 2011 +1000 + + dix: Remove touch grabs if the grab disappears + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit cd3de8324e8908955a2e4be3000c8ffee8684c68 +Author: Peter Hutterer +Date: Thu Dec 15 07:48:49 2011 +1000 + + dix: hook up passive grabs and pointer emulated passive grabs + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 5b169cb695bd450d7f64e3800f00c9237ee67f96 +Author: Carlos Garnacho +Date: Tue Dec 13 15:41:23 2011 +0100 + + Xi: assign correct grab_mode/other_device_mode in XI2 passive grabs + + CreateGrab() expects the keyboard mode to be stored in grab_mode, and the + pointer mode in other_device_mode, so respect this in passive XI2 grabs, + and switch modes if needed. + + Signed-off-by: Carlos Garnacho + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4469430b109fa2da7ba3d2fadf66eca78b7156a0 +Author: Peter Hutterer +Date: Thu Dec 15 07:42:12 2011 +1000 + + Xi: add the hooks for passive touch grabs + + Co-authored-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit bb0af002dc9ad5b464dc6793aedb6d1ff65d001d +Author: Peter Hutterer +Date: Thu Dec 15 07:21:38 2011 +1000 + + Xi: handle grab accept/reject requests + + Consists mostly of generating an ownership event and processing it. + + Co-authored-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 209b3d613a7bed126c81daedbad6461e4391e9e6 +Author: Peter Hutterer +Date: Tue Dec 20 16:34:43 2011 -0800 + + Xi: hook up touch ownership handling + + Ownership changes don't get processed directly when they happen, instead the + DIX submits an ownership event which goes through ProcessTouchEvents and + ProcessTouchOwnershipEvents. + Then on the required events are generated and sent to clients. + + Co-authored-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Chase Douglas + +commit 1894468c2b9788efa70ef4fb5fc911711402f3a7 +Author: Peter Hutterer +Date: Tue Dec 20 16:33:33 2011 -0800 + + Xi: hook up pointer emulation for emulating touches + + Includes a hack for implicit grab activation, because integrating this + requires a larger rewrite and I'm not sleeping enough as it is. + Right now, we deliver the event and check before/after if there is an + implicit grab on. If one activated, then store the event in the grab and + switch the listener type to a grab listener. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Chase Douglas + +commit 753c4dca1e42035e29fb21458a746e484ed93ca3 +Author: Peter Hutterer +Date: Wed Dec 14 17:04:38 2011 +1000 + + dix: add touch to pointer event conversion helper + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit c3843f5498a849920ab68cca3557411ad8ab3454 +Author: Peter Hutterer +Date: Wed Dec 14 17:02:30 2011 +1000 + + dix: add real_event parameter to ActivatePassiveGrab + + For touch events with pointer emulation, the event that triggers the grab + (the pointer event) is not the same as the actual event (the touch event). + For replaying, we need to store the real event then. + + No effective changes at this point, for the current caller event and + real_event are identical. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e389a19a730055d4550ff708da83c78099a516fd +Author: Peter Hutterer +Date: Tue Dec 20 16:32:52 2011 -0800 + + Process and deliver touch events + + Does not include pointer emulation handling. + Does include partial ownership handling but not the actual processing of + ownership events. + + Note: this commit is a retroactive commit extracted from a series of ~50 + commits and may thus appear a bit more complicated than what you'd write out + from scratch. + + Pointer processing tree is roughly: + - ProcessOtherEvents + - ProcessTouchEvents + - DeliverTouchEvents + - DeliverTouchBeginEvent|DeliverTouchEndEvent|... + - DeliverOneTouchEvent + + Also hooks up the event history playing to the right function now. + + Co-authored-by: Daniel Stone + Co-authored-by: Chase Douglas + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Chase Douglas + +commit 634b0da9a83076d0e9e0fc44dc5dc77b0c368bc1 +Author: Peter Hutterer +Date: Thu Dec 15 07:53:19 2011 +1000 + + dix: set core and button state based on the touch state + + If a pointer-emulating touch caused a button to be logically down, set that + state in the input events. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit dbfd7b37a0ba21899d8ebb7e0b324301bd466c49 +Author: Peter Hutterer +Date: Wed Dec 14 16:33:05 2011 +1000 + + Xi: make UpdateDeviceState aware of touch events + + Update the logical button state for pointer-emulating events. Button state + must be kept separate from the ButtonClassRec to avoid clearing the button + state on a touch end if there is a physical button still down. + + And obviously don't change the button state if we're currently replaying the + event history for some client. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 593c3e2eb3da5c5fb957b68c8025dfdbe1139639 +Author: Peter Hutterer +Date: Wed Dec 14 16:30:05 2011 +1000 + + dix: add TouchResourceIsOwner helper function + + The first listener in the sequence is the owner of the touch sequence. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 5d0260cc986e8c1f0907870b851d47fd73bb1b7d +Author: Peter Hutterer +Date: Wed Dec 14 16:24:17 2011 +1000 + + dix: add helper functions for adding/removing touch listeners + + The DIX will call TouchSetupListeners once for a new touch. After that + the listener list remains static, with listeners only dropping out when they + either reject the grab or disappear. + + Exception: if grabs activate they are prefixed to the listeners. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 6a68f97ce6704dd2ff2a50f91acd2da72c9995bd +Author: Chase Douglas +Date: Wed Dec 14 16:26:04 2011 +1000 + + dix: add TouchGetPointerEventType helper function + + Returns the respective pointer event type for a given touch event type. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 8e58ce73c8b79cb86e890369d0216cdd850c52a5 +Author: Daniel Stone +Date: Wed Dec 14 16:53:04 2011 +1000 + + dix: when a window disappears, remove it from the touch sprite trace + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit c18a173cf5f53778356c5e8f25ab132956f8c27d +Author: Daniel Stone +Date: Wed Dec 14 16:03:01 2011 +1000 + + dix: add helper functions to build up/verify the sprite trace + + Touch events' sprite trace stays the same for the duration of the touch + sequence. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Chase Douglas + +commit 40475261eacabb79a824db1138407a9d0f9fe37f +Author: Peter Hutterer +Date: Wed Dec 14 15:56:05 2011 +1000 + + dix: add touch event history helper functions + + If touch client has not registered for ownership events and a grab above + that client is rejected, the client needs to receive the complete event + history. + + The history currently doesn't really do fancy overflow handling. We assume + that the first TOUCH_HISTORY_SIZE events are the important ones and anything + after that is dropped. If that is a problem, fix the client that takes > 100 + event to decide whether to accept or reject. + + Events marked with TOUCH_CLIENT_ID or TOUCH_REPLAYING must not be stored in + the history, they are events created by the DIX to comply with the protocol. + Any such event should already be in the history anyway. + + A fixme in this patch: we don't have a function to actually deliver the + event yet. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit b274c472a5ad700aea5fe651d677e8cb34ffc976 +Author: Peter Hutterer +Date: Wed Oct 26 09:08:17 2011 +1000 + + Support XI 2.2 officially + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit d2af968cb65873780a6e61342d5d3c23b9654e2a +Author: Daniel Stone +Date: Wed Dec 14 15:45:19 2011 +1000 + + Xi: allow selecting for touch events + + Selecting for any of XI_TouchBegin/Update/End/Ownership requires the three + bits for begin/update/end to be set. + + Only one client at a time may select for XI_TouchBegin event + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit f3df3ad668fcd417ffb5afa3bea79a73a348bc1a +Author: Peter Hutterer +Date: Wed Dec 14 16:45:04 2011 +1000 + + dix: handle DIX-submitted touch events + + The DIX needs to submit touch events for e.g. TouchEnd after an + acceptance/rejection. These have the TOUCH_CLIENT_ID flag set. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit fcda98c48610fd507ca0b89c6006a5497d9dc1c9 +Author: Peter Hutterer +Date: Fri Dec 16 12:41:08 2011 +1000 + + dix: button state must show the logical buttons, not physical buttons + + If the device is mapped 3 2 1, a click on physical button 1 sends a button 3 + press, but the state was set for button 1. Fix this, the state must be set + for that button's logical mapping. + + https://bugzilla.gnome.org/show_bug.cgi?id=655928 + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 47da6b6b2c2e9245422655f94770146fb8cd430b +Author: Peter Hutterer +Date: Mon Dec 19 14:52:41 2011 +1000 + + dix: don't retrieve the syncEvents tail on an empty list + + An empty list points to itself but syncEvents has the list head only and is + of a different format than the elements. Thus, casting it to a QdEventPtr + gives us garbage. + + Segfaults with XTS test case Xlib13/XGrabKeyboard + + Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb. + + Reported-by: Aaron Plattner + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 2d34b34ed7547b829979756ccfb2cff79368d0a4 +Merge: e4b4d83 1deede3 +Author: Keith Packard +Date: Tue Dec 20 00:23:33 2011 -0800 + + Merge remote-tracking branch 'jeremyhu/master' + +commit e4b4d83fad37bb737e25f7226dbcd15b892f9528 +Merge: 4df65d2 d26cb70 +Author: Keith Packard +Date: Mon Dec 19 22:36:31 2011 -0800 + + Merge remote-tracking branch 'idr/glx-fixes' + +commit 4df65d247b56c6b1b06e17a61236d6637312cdbb +Author: Ville Syrjälä +Date: Sun Dec 18 18:29:41 2011 +0200 + + dri2: Invalidate window pixmaps + + While a redirected window is flipped, its pixmap may still be used as + and EGL image and should also get invalidated. When sending invalidate + events for a window, also send the events for its pixmap. + + Signed-off-by: Ville Syrjälä + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit e8fd23fad046877ca0ee08c1e147557756debc8e +Author: Keith Packard +Date: Sun Dec 18 18:29:40 2011 +0200 + + dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swap + + Without this, when a compositing manager unredirects a fullscreen window which + uses DRI2 and page flipping, the DRI2 buffer information for the compositing + manager's output window (typically the Composite Overlay Window or root window) + may become stale, resulting in all kinds of hilarity. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35452 . + + [Original patch by Michel Dänzer ] + [Tree walk optimized version by Keith Packard ] + + Signed-off-by: Ville Syrjälä + Signed-off-by: Keith Packard + +commit 6f916ffec7767eeab62132eb6575043969104c81 +Author: Michel Dänzer +Date: Sun Dec 18 18:29:39 2011 +0200 + + dri2: Always re-generate front buffer information when asked for it. + + Otherwise we might keep stale cached information, e.g. after the driver + performed page flipping. + + This is part of the fix for + https://bugs.freedesktop.org/show_bug.cgi?id=35452 . + + Signed-off-by: Michel Dänzer + Reviewed-by: Ville Syrjälä + Reviewed-by: Mario Kleiner + Signed-off-by: Keith Packard + +commit 603fcb3abf155e91fd3250f4a7aa16f289506e8e +Author: Rami Ylimäki +Date: Sun Dec 18 18:29:38 2011 +0200 + + dri2: Initialize needInvalidate member of DRI2Drawable. + + If the client is not behaving correctly and swaps buffers before + getting them, Valgrind will complain about uninitialized memory being + used in DRI2InvalidateDrawable. + + Signed-off-by: Rami Ylimäki + Reviewed-by: Ville Syrjälä + Signed-off-by: Keith Packard + +commit 3aca8199405cff5097ee5813605ec78b5ae44a43 +Author: Peter Hutterer +Date: Fri Dec 16 09:15:25 2011 -0500 + + dmx: force -fno-strict-aliasing for xinput example + + Compiler warning: + xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing + rules + + The code itself is the usual XInput client-side code: + XEvent event; + XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event; + XNextEvent(display, &event); + printf("%d\n", e->type); + + Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients + must use pointer aliasing as above when using the XNextEvent API. Disable + strict aliasing for this example. + + Reviewed-by: Peter Hutterer + Reviewed-by: Gaetan Nadon + Signed-off-by: Peter Hutterer + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 1deede3c48d5ac91f50774c79f02afc6e036614e +Author: Jeremy Huddleston +Date: Sat Dec 17 12:56:59 2011 -0800 + + kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast + + Reported-by: Arkadiusz Miśkiewicz + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit d0170d54c71fc761b8f1ae7a0e555dc2ca23cf9c +Author: Jeremy Huddleston +Date: Sat Dec 17 12:25:26 2011 -0800 + + configure.ac: Make Xephyr dependency error message more informative + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit 511beddffab3c4fd43c75556132159117b6ba884 +Author: Jeremy Huddleston +Date: Fri Nov 25 09:45:25 2011 -0800 + + XQuartz: Provide in-tree implementation of strndup(3) if needed + + This function was added to Mac OS X 10.7, so we need to provide it + for earlier releases. + + Signed-off-by: Jeremy Huddleston + +commit 9ce8463a3334f76f128bb35b541aa6e67b4e4374 +Author: Daniel Stone +Date: Wed Dec 14 15:41:07 2011 +1000 + + dix: generate touchpoints from driver-submitted data + + The touchpoints are generated, enqueued but not processed since we don't + handle them in the event processing yet. + + Co-authored-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit bec51f5ec6575a1971ae5371a4b6d8563933032c +Author: Daniel Stone +Date: Wed Dec 14 15:29:48 2011 +1000 + + dix: add GetTouchOwnership event API + + No callers yet. This API is not to be used by drivers, it's an API for the + DIX which will create ownership events mainly on touch acceptance/rejection. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 5c63dc6dbcbebbb19d79575a9f1ec9878e6537f1 +Author: Peter Hutterer +Date: Wed Dec 14 14:57:46 2011 +1000 + + dix: add DIX API to create touchpoints + + The DIX touchpoints are the ones used for event processing. + + Co-authored-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 7f8127d203394cae45c3ded0d063030d7c5fdb70 +Author: Peter Hutterer +Date: Wed Dec 14 14:53:52 2011 +1000 + + dix: if we run out of space for new touch events, resize the queue + + The SIGIO handler forces us to drop the current touch and schedule the + actual resize for later. Should not happen if the device sets up the + TouchClassRec with the correct number of touchpoints. + + Co-authored-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit d26cb70272a1245a7b1db639cebeddafd8ed4c40 +Author: Ian Romanick +Date: Thu Dec 8 12:07:38 2011 -0800 + + glx: use dispatch.h instead of glapioffsets.h + + Signed-off-by: Ian Romanick + Reviewed-by: Adam Jackson + +commit 66e6037c334c2bcfe6e60d24cac83a8d6087fdd5 +Author: Ian Romanick +Date: Mon Dec 5 15:27:08 2011 -0800 + + glx: Regenerate GL API files from Mesa + + Adam reviewed the underlying changes in the Mesa generated scripts. + + Signed-off-by: Ian Romanick + Reviewed-by: Adam Jackson + +commit e8485768c1f1d9d9fb7ca9e52ff61175b7bb80e1 +Author: Ian Romanick +Date: Tue Dec 6 12:30:17 2011 -0800 + + glx: Add stub implementations of next GLX extension functions + + Generated code from Mesa contains dispatch for GLX_ARB_create_context + and GLX_ARB_create_context_profile. Provide stub implementations of + these functions so that the GLX extension will link. + + Signed-off-by: Ian Romanick + Reviewed-by: Adam Jackson + +commit 2df539c0bc3300ea858f8bc7d52e95e67ff379b8 +Author: Ian Romanick +Date: Mon Dec 5 14:42:35 2011 -0800 + + glx: Only declare GlxExtensionInit in one header file + + This silences the GCC warning: + + In file included from singlepixswap.c:36:0: + glxext.h:47:13: warning: redundant redeclaration of 'GlxExtensionInit' [-Wredundant-decls] + glxserver.h:80:6: note: previous declaration of 'GlxExtensionInit' was here + + Signed-off-by: Ian Romanick + Reviewed-by: Adam Jackson + +commit 758bc57ba5a89f765d83f0b169aa09e79a89bf89 +Author: Peter Hutterer +Date: Wed Dec 14 14:48:56 2011 +1000 + + dix: add helper functions to create DDX touch recs + + DDX touch points are the ones that keep records of the driver-submitted + touchpoints. They're unaffected by the grab state and terminate on a + TouchEnd submitted by the driver. + + The client ID assigned is server-global. + + Since drivers usually submit in the SIGIO handler, we cannot allocate in the + these functions. + + Co-authored-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 1a133eb8b1ddbe0da7c2fbf7f6a686ec4512373e +Author: Peter Hutterer +Date: Thu Dec 15 08:30:02 2011 +1000 + + xfree86: bump the input ABI for the touch changes + + New additions to the API: + - InitTouchClassDeviceStruct + - xf86PostTouchEvent + + Changes to the ABI: + - DeviceIntRec now contains a TouchClassPtr + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 3fb258ca28850c998097b55884774cb95f476f69 +Author: Daniel Stone +Date: Wed Dec 14 12:46:40 2011 +1000 + + input: add a TouchClassRec to the devices + + These structs will be used to store touch-related data, events and + information. + + Drivers must call InitTouchClassDeviceStruct to set up a multi-touch capable + device. + + Touchpoints for the DDX and the DIX are handled separately - touchpoints + submitted by the driver/DDX will be stored in the DDXTouchPointInfoRec. Once + the touchpoints are processed by the DIX, new TouchPointInfoRecs are created + and stored. This process is already used for pointer events with the + last.valuators field. + + Note that this patch does not actually add the generation of touch events, + only the required structs. + + TouchListeners are (future) recipients of touch or emulated pointer events. + Each listener is in a state, depending which event they have already + received. The type of listener defines how the listener got to be one. + + Co-authored-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 098b837440e40bbc485368ec9658e12efd6ef581 +Author: Daniel Stone +Date: Wed Dec 14 14:41:48 2011 +1000 + + Add the touch input API stubs + + xf86PostTouchEvent is the driver API to submit touch events to the server. + This API doesn't do anything yet though but now we can at least bump the + API. + + For valuators, drivers should use the existing xf86InitValuatorAxisStruct + function. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 93c2a1628a9f6e7480d834bf55c080997fd18911 +Author: Peter Hutterer +Date: Wed Dec 14 13:51:12 2011 +1000 + + Hook up the ownership events + + This patch applies most of the protocol conversions and the internal event + type for ownership events. + + Note that ownership events are generated by the DIX only, they do not pass + through the event queue. + + Co-authored-by: Daniel Stone + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit c065f7b16329e30cb976359e0a807c2adaf50123 +Author: Keith Packard +Date: Sat Dec 17 17:22:45 2011 -0800 + + Version 1.11.99.2 (1.12 snapshot 2) + + Signed-off-by: Keith Packard + +commit ead968a4300c0adeff89b9886e888b6d284c75cc +Author: Antoine Martin +Date: Sat Dec 17 01:36:51 2011 +0700 + + xserver: check for elevated privileges not uid=0 + + This allows us to run the server as a normal user whilst still + being able to use the -modulepath, -logfile and -config switches + We define a xf86PrivsElevated which will do the checks and cache + the result in case it is called more than once. + Also renamed the paths #defines to match their new meaning. + Original discussion which led to this patch can be found here: + http://lists.freedesktop.org/archives/xorg-devel/2011-September/025853.html + + Signed-off-by: Antoine Martin + Tested-by: Michal Suchanek + Reviewed-by: Jamey Sharp + Reviewed-by: Adam Jackson + +commit 3390d3fc0347947796aa245d70fefecf59b7bfe4 +Author: Peter Hutterer +Date: Wed Dec 14 13:21:59 2011 +1000 + + Xi: process raw touch events + + No-one can generated them yet, but if they could, we'd be processing them + like there was no tomorrow. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 84db813b9db34975b5fe288a8a551bb98f0cc1c1 +Author: Peter Hutterer +Date: Wed Dec 14 12:45:28 2011 +1000 + + Hook up TouchBegin/Update/End events + + The are the same as device events internally but require the touch ID + separately from the detail.button field (the protocol uses the detail field + for the touch id). + For simpler integration of pointer emulation we need to set the + detail.button field while keeping the touchid around. + + Add the three new touch event types to the various places in the server + where they need to be handled. The actual handling of the events is somewhat + more complicated in most places. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 92a5862d0c120b009a688237ec7142b7c21ae272 +Author: Peter Hutterer +Date: Wed Dec 14 15:00:33 2011 +1000 + + include: add a bunch of flags for GetTouchEvent processing + + TOUCH_CLIENT_ID is set if the touch was generated from a client ID instead + of a DDX/driver touch ID. i.e. submitted by the dix. + + TOUCH_END is a special flag that's required to force the touch to end. + Since the protocol with grab replaying and pointer emulation is rather + complex, it's quite hard to know otherwise when a touch sequence should + really die. + + The others do what it says on the imaginary box. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 956a97487beada8cf5f354550ff779635cc64361 +Author: Peter Hutterer +Date: Wed Dec 14 12:19:27 2011 +1000 + + include: RawTouchEnd is the last event now + + Plus, use the actual definition from the protocol instead of the numeric + values. Turns out not everyone knows the protocol event IDs by heart. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 92c6c0c1d2d6a8882ed97b0e7f2952978ee5ce82 +Author: Peter Hutterer +Date: Wed Dec 14 12:15:29 2011 +1000 + + tests: update for touch support + + Touch event mask must be set for all three event types. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Chase Douglas + +commit 731b1db2fcc82c0a8afd28d7f28363c1db0a20ce +Author: Peter Hutterer +Date: Wed Dec 14 10:41:17 2011 +1000 + + Require inputproto 2.1.99.3 + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Chase Douglas + +commit 4c825eae89063fdc2241f92ab4101ba682b5b4b7 +Author: Peter Hutterer +Date: Wed Nov 2 10:38:26 2011 +1000 + + Xi: add a FIXME + + All the DeepCopy stuff really needs to be shared between the init calls the + drivers use and this code here. Too many bugs by not keeping the two in + sync. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Chase Douglas + +commit 0b9d2e426defabbf6df7e872e158b080a6a5e0be +Author: Peter Hutterer +Date: Wed Dec 14 13:21:03 2011 +1000 + + Xi: split ProcessOtherEvent into ProcessDeviceEvent + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Chase Douglas + +commit 190a6f45ee7412870b3d95c5db6c1079a285bc59 +Author: Peter Hutterer +Date: Fri Dec 16 09:52:43 2011 +1000 + + dix: split positionSprite into scale_to_desktop and positionSprite + + For future touch points, we need positionSprite to calculate the coordinates + but we don't want to actually change the cursor position for non-emulating + touches. + + No functional changes at this point. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Chase Douglas + +commit 2c1d0a539c0fb1860ac89a00d1fb609f1959e1b6 +Author: Gaetan Nadon +Date: Fri Dec 9 07:45:02 2011 -0500 + + dmx: fix distcheck failure, missing compsize.h in Makefile.am + + which was added in commit: + dmx: Build fix for -Werror=implicit-function-declaration + + Reviewed-by: Peter Hutterer + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit ff6d9c79c1aa502f1aef81d8063425e5fc002534 +Author: Peter Hutterer +Date: Thu Dec 15 10:19:26 2011 +1000 + + include: fix BUG_WARN_MSG for constant messages only + + Previous declaration required the use of a message + printf varargs. We + obviously want to allow the use of just a message. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit f7ea7a324520844beaac8be7503ac50e20da5ab1 +Author: Peter Hutterer +Date: Wed Dec 14 10:34:19 2011 +1000 + + configure: split the required modules up + + We do the same thing for libraries and optional modules already, and it's + much easier to read when one of them changes + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 7da7aa96a0acb895e1fe57a9d3f2d093479cf2a2 +Merge: b79de3f 7528a6b +Author: Keith Packard +Date: Wed Dec 14 11:40:10 2011 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit 4c80dc1394344dc10cffe4f757c980944312dc3d +Author: Peter Hutterer +Date: Wed Dec 14 10:31:23 2011 +1000 + + configure: split the required modules up + + We do the same thing for libraries and optional modules already, and it's + much easier to read when one of them changes + + Signed-off-by: Peter Hutterer + +commit 7528a6b88eb32098af4369a8bd9d70a808fa6f1c +Merge: f0de5e3 898d976 +Author: Peter Hutterer +Date: Tue Dec 13 14:19:54 2011 +1000 + + Merge branch 'for-whot' of git://people.freedesktop.org/~alanc/xserver into for-keith + +commit f0de5e3990b70df9899b7dd17d7ee6ff7c768183 +Author: Peter Hutterer +Date: Sun Dec 11 07:31:43 2011 +1000 + + dix: add a MAXEVENTS define for the number of core + extension events + + Not including GenericEvents + + Signed-off-by: Peter Hutterer + Reviewed-by: Walter Harms + Reviewed-by: Chase Douglas + +commit adf8a0d62c0643f4c44a3b6d2e3c6c9b02532915 +Author: Peter Hutterer +Date: Fri Dec 9 18:38:53 2011 +1000 + + dix: move event filter retrieval helpers to inpututils.c + + No functional changes + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Chase Douglas + +commit a03fe819506fbcbfcb299d4919d16061603fd4ec +Author: Peter Hutterer +Date: Fri Dec 9 18:02:49 2011 +1000 + + dix: switch EventIsDeliverable to take the event type only + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Chase Douglas + +commit 10a8c428fac0d4ff8f8a3e3487c13dd349d27ed7 +Author: Peter Hutterer +Date: Fri Dec 9 15:49:04 2011 +1000 + + dix: move storing last.valuators into a helper function + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit a15abf82ddb5a209dbc30c4d12e1dc23c4adf3e4 +Author: Peter Hutterer +Date: Thu Dec 8 15:38:44 2011 +1000 + + dix: always allocate and set the grab's sync.event + + Allocate the memory at device creation time and always store the event, even + if we're not frozen. This way we know which event triggered the grab. + Since the event was never freed anyway except on device shutdown, this + doesn't really change things much. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 218752bdc5d9323d1e6202e762573a925cf8a4eb +Author: Peter Hutterer +Date: Thu Dec 8 14:27:01 2011 +1000 + + input: replace GRABTYPE_* with the InputLevel enums + + They achieve the same thing, re-use the more generic InputLevel so we can + convert to/fro easier. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit cd56bd7b3ee34a4b10eb3a57a6e94cac7512167a +Author: Peter Hutterer +Date: Thu Dec 8 14:59:06 2011 +1000 + + Add GrabIsPointerGrab and GrabIsKeyboardGrab helpers + + No functional changes + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 47734b2ba2e1f9246fd1a3b7059ca60b0e15acb2 +Author: Peter Hutterer +Date: Thu Dec 8 12:00:34 2011 +1000 + + dix: move delivery stop condition out of event mask + + Previously, this was only called if there was a mask match, so even if we + had a no-propagate flag set or a stopAt window specified, if no mask + triggered on the window we would recurse up to the root window and + eventually deliver. + Move this, so that the stopAt and do-not-propagate mask is honoured. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 1d01e861b69d7ca8fe2335270b8286bc115fb6e9 +Author: Peter Hutterer +Date: Thu Dec 8 10:22:26 2011 +1000 + + dix: split out core state and event state setting into helper functions + + no functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit fb010c543696b781a83b945f72865b7d7b75bf95 +Author: Peter Hutterer +Date: Wed Dec 7 14:41:18 2011 +1000 + + dix: move grab matching code into a helper function + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit d253a262c2c690357a4db7e235c48ab5dd0b77f8 +Author: Peter Hutterer +Date: Wed Dec 7 13:57:25 2011 +1000 + + dix: split core grab interference check into helper function + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 97d79dd740ed1ac4eb02b0d4135850f953716278 +Author: Peter Hutterer +Date: Wed Dec 7 13:54:28 2011 +1000 + + dix: compare the grab type, not the tempGrab type + + No functional change. To get here, GrabMatchesSecond() needs to be TRUE and + for that the two grab types must be identical. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit b9d6ae42b686287d7d23c2eefe2b12da98fe6ff8 +Author: Peter Hutterer +Date: Wed Dec 7 15:43:31 2011 +1000 + + dix: remove event type check + + Can't remember why this is there but we'll need to pass in XI2 events soon, + so this check is obsolete. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 80816366aa77f1730a1b6ddabfa55a946d76d494 +Author: Chase Douglas +Date: Fri Nov 25 13:57:03 2011 -0800 + + dix: Split ActivatePassiveGrab() from CheckPassiveGrab() + + The changed logic means we don't require the explicit grab = NULL setting + and early exit anymore. Not 100% of it, but if we see that message pop up in + a log we know it's broken. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 9ee62cd8ce3c3effc3663f3d56b322385ce12fdb +Author: Chase Douglas +Date: Thu Nov 17 17:40:24 2011 -0800 + + dix: Move grab check and activation logic to CheckPassiveGrab() + + This is needed for future pointer emulation work. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit c53651dabc66aeb9882819a404a799a364f00a29 +Author: Peter Hutterer +Date: Tue Dec 6 12:57:38 2011 +1000 + + dix: move EventDeliveryState into a header file, we'll need it elsewhere + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 86c3137c81e924bacd919e9d65809e07afeabbff +Author: Peter Hutterer +Date: Tue Dec 6 12:04:11 2011 +1000 + + Xi: split updating button count and state into helper functions + + Functional change: for a button mapped to 0, the motionHintWindow is not + updated to the NullWindow anymore. Before it got updated unconditionally to + the button mapping. I have no idea what the practical effect of this is, but + I guess it's closer to the correct behaviour: pressing a button that's + logically disabled now does not disrupt the motion hint delivery. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e0f37250ffff5dcb3bc0e8cad63439995ce01a20 +Author: Peter Hutterer +Date: Tue Dec 6 11:40:33 2011 +1000 + + Xi: deduplicate button motion mask setting + + No functional changes + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 6eff14a789341d366b3013c5aa020e959c954651 +Author: Peter Hutterer +Date: Mon Dec 5 18:54:30 2011 +1000 + + dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents + + No functional change. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 93945b0a74aa8156a88f52b8ba77f1210042f396 +Author: Peter Hutterer +Date: Mon Dec 5 18:42:05 2011 +1000 + + dix: split grab event conversion and delivery into a helper function + + Effective functional change: XI2 events are checked with XACE now. + + DeliverOneGrabbedEvent is exported for future use by touch events. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit c81cdb0862e2184f033b3933e6bacbe0809ef2c0 +Author: Peter Hutterer +Date: Mon Dec 5 18:29:27 2011 +1000 + + dix: replace conversion errors with BUG_WARN_MSG + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 6368c2aa4613a7c7eb0e8afca8d41f1a9bc4fc4d +Author: Peter Hutterer +Date: Mon Dec 5 16:46:18 2011 +1000 + + dix: deduplicate event delivery code + + Move all the event delivery code into DeliverOneEvent, based on the + InputLevel we're sending to. + + Functional change: we now check XI2 events with XACE too. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 7e2207548b3173afc9accb5ccd532c181a7b94ed +Author: Chase Douglas +Date: Wed Dec 7 20:32:28 2011 +1000 + + include: Add an InputLevel enum + + Currently unused, but will be in the future. + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 898d97672907a8074031d0d1038cd44bb5caf40d +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + verify_internal_event: preserve constness of data pointer + + All we're using it for is ErrorF calls, so make it a const char * + to stop gcc from warning: + + inpututils.c: In function 'verify_internal_event': + inpututils.c:629:9: warning: cast discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 79d09647d878e66721a778979a9eb1f4bba5f8d6 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + Use const cast in BitIsOn macro to avoid angering gcc + + Fixes gcc warnings such as: + inpututils.c: In function 'valuator_mask_isset': + inpututils.c:498:5: warning: cast discards qualifiers from pointer target type + inpututils.c: In function 'CountBits': + inpututils.c:613:9: warning: cast discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 99dfe9b1de09cb481e95bd4c45dcf7493480798b +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:32 2011 -0800 + + Fix deconstifying cast warning in xi2_get_type + + Since we're just comparing values in the struct, cast it to a + const xGenericEvent * to clear gcc warning of: + + events.c: In function 'xi2_get_type': + events.c:193:5: warning: cast discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit dd80156bf05c9eb4000d0981e00d0d9fb69a94f6 +Author: Alan Coopersmith +Date: Wed Dec 7 22:58:45 2011 -0800 + + Include client name if available in PrintDeviceGrabInfo + + Also adds missing newline to first line of output. + + Before patch: + + [3581472.414] (II) Printing all currently active device grabs: + [3581472.414] Active grab 0x1800000 (core) on device 'Virtual core pointer' (2): + client pid 26174 uid 0 gid 10 + [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) + [3581472.415] core event mask 0x0 + [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 + [3581472.415] Active grab 0x1800000 (core) on device 'Virtual core keyboard' (3) + : client pid 26174 uid 0 gid 10 + [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) + [3581472.415] core event mask 0x3 + [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 + [3581472.415] (II) End list of active device grabs + + After patch: + [3581736.601] (II) Printing all currently active device grabs: + [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core pointer' (2): + [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash + [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) + [3581736.601] core event mask 0x0 + [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 + [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core keyboard' (3) + : + [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash + [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) + [3581736.601] core event mask 0x3 + [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 + [3581736.601] (II) End list of active device grabs + + Signed-off-by: Alan Coopersmith + Reviewed-by: Rami Ylimäki + +commit b79de3f42ff8412dcabf2f2a805cbcbd1c6907c3 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:35 2011 -0800 + + xf86 parser: convert Error to a varargs macro to clear gcc format warnings + + Previously it always passed a format string with exactly one argument, + using NULL when the format string needed none. Now pass the right number + of arguments to clear gcc warnings of 'too many arguments for format'. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 7801b3dcd6501e3de93a6d2cee93b2593806e922 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:35 2011 -0800 + + Add some printf format attributes suggested by gcc + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit f68df9dfd2c7ca03c24aaa0a895b7191ecb81e85 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + xf86Priv.h: Add some noreturn attributes suggested by gcc + + Both functions call exit() at the end and have no other return path. + Also correct comment/heading to reflect commit 6450f6ca7ee0 moving + DoShowOptions into xf86Configure.c. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 3823eedf3c124d3a20360480ba349bea72de3069 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + Remove duplicate declarations of KdAdd*Driver in kdrive.h + + Clears gcc warnings in every file that includes kdrive.h: + kdrive.h:507:1: warning: redundant redeclaration of 'KdAddPointerDriver' + kdrive.h:225:6: note: previous declaration of 'KdAddPointerDriver' was here + kdrive.h:510:1: warning: redundant redeclaration of 'KdAddKeyboardDriver' + kdrive.h:284:6: note: previous declaration of 'KdAddKeyboardDriver' was here + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 471e5373b6f87336dac3b9de9b3852f63a2b10dc +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + Remove duplicate declaration of xf86ValidateModesFlags in xf86Modes.h + + Clears gcc warning in every file that includes xf86Modes.h: + xf86Modes.h:102:1: warning: redundant redeclaration of 'xf86ValidateModesFlags' + xf86Modes.h:72:1: note: previous declaration of 'xf86ValidateModesFlags' was here + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 41dd7cf673e47ab74c5065b8dbf268b2e5facb64 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + _XkbFilterDeviceBtn: move variable declarations to match usage scope + + The main body of this function is an if { } else if { } pair of blocks. + Previously there was int button at the top level scope which is used + only in the first block, and a redeclaration of int button inside the + second block. Since there's no overlap in the code paths for the + two uses of button, move the one from the outer block into the first + block to help the programmer more quickly determine they are unrelated + usages, and to silence the gcc warning of: + + xkbActions.c: In function '_XkbFilterDeviceBtn': + xkbActions.c:999:6: warning: declaration of 'button' shadows a previous local + xkbActions.c:955:6: warning: shadowed declaration is here + + For consistency, move DeviceIntPtr dev declarations as well that are + used in the same way. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit d8eb9b5faa2d2c9350bdaffef8749a9cac3c87b8 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + XkbFindSrvLedInfo: remove extraneous name-clashing sli variable + + Variable is already defined outside the outer if statement, and + there's no need to redefine inside the if statement. + + No point in setting sli before if (dev->kbdfeed->xkb_sli==NULL) + check - if check is true, we immediately set it, if check is false, + we immediately return without further reference or use of it. + + The one thing we do with it inside the inner if statement is store + an allocation in it for a brief moment before writing to the final + destination, which is immediately returned to the caller. + + In short, there's no benefit to the variable at all in this block, + it just gives the optimizer more code to figure out how to omit. + + Fixes gcc warning: + xkbLEDs.c: In function 'XkbFindSrvLedInfo': + xkbLEDs.c:683:19: warning: declaration of 'sli' shadows a previous local + xkbLEDs.c:679:18: warning: shadowed declaration is here + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 9edfa47bd58cd318d57d0f114714fd146be35a79 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + KdParseFindNext: Constify delim argument + + It's only used as input to strchr to find the delimiters, never + written to. + + Clears a bunch of gcc warnings of the form: + kdrive.c:323:2: warning: passing argument 2 of 'KdParseFindNext' discards qualifiers from pointer target type + kdrive.c:261:1: note: expected 'char *' but argument is of type 'const char *' + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit ff64ad6c74a3e14ca34bacb8866bdbd2262bddff +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + Convert KdDoSwitchCmd to use asprintf instead of malloc/strcat/etc. + + Also fix the reason argument to be const char * to clear several gcc + warnings of: + kdrive.c:151:2: warning: passing argument 1 of 'KdDoSwitchCmd' discards qualifiers from pointer target type + kdrive.c:116:1: note: expected 'char *' but argument is of type 'const char *' + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 5bc590bde23ce1c57015b1d9e1cc63189c37448e +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + DoShowOptions: preserve constness of options list as we walk it + + Since all we do with the option list is walk down the list printing + the names, there's no need to cast away its constness. + + Clears gcc warning: + xf86Configure.c: In function 'DoShowOptions': + xf86Configure.c:781:4: warning: cast discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 71efd868282d47a6db405a16de18ac322926962b +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + x86emu: constify debug strings + + Strings are all pointers to literal constants, just used as input + to printf calls when debugging is enabled. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit d5a5eece670dee963765eab1431c21525c16d9ee +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:34 2011 -0800 + + CompareISOLatin1Lowered: constify arguments + + Allows callers to avoid deconstifying arguments when calling, fixing + gcc warning: + + filter.c: In function 'PictureGetFilterId': + filter.c:59:2: warning: cast discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 83ac9502ea9f1dedf3a8002745668af16bb1f2af +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + xdmcp.c: fix three small const warnings + + xdmcp.c:63:36: warning: initialization discards qualifiers from pointer target type + + xdmcp.c: In function 'XdmcpRegisterConnection': + xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type + xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type + xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type + + xdmcp.c: In function 'get_mcast_options': + xdmcp.c:1596:21: warning: initialization discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 3839d1480877818f3ccc04e25237d853bab210c3 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + LockServer: store path to LOCKDIR literal string in a const char * + + And instead of initializing to NULL, then resetting to LOCKDIR almost + immediately (before ever using the NULL value), skip directly to setting + it to LOCKDIR. + + tmppath variable is only used as input for generating the path name + via calls to strlen, sprintf, etc. + + Fixes gcc warning of: + utils.c: In function 'LockServer': + utils.c:259:11: warning: assignment discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit af4113bfeb1d155f5f037c3492e50513336fa4a7 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + WriteToClient: preserve constness of buf while extracting length value + + Fixes gcc warning: + io.c: In function 'WriteToClient': + io.c:826:6: warning: cast discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 2c9800f91559fbb12dd276cf0536631104092f67 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + OsInit: store "/dev/null" in a const char * + + It's only passed as the input side of a strcpy and as the filename to + fopen, so doesn't need to be non-const. Fixes gcc warning: + + osinit.c: In function 'OsInit': + osinit.c:154:28: warning: initialization discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 50b1097643934c8caec9530e5eda6ed6534aaf61 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + Constify the reason string throughout the authorization check framework + + Almost all of the places the string is assigned point to a literal + string constant, so use const char * for those, and const char ** + for function calls that return it via an argument. Fortunately + the top level function, ClientAuthorized, which returns the string + as its return value is called from only one place, ProcEstablishConnection. + + ProcEstablishConnection stores either that return value or a string literal + in char *reason. It only uses reason as an argument to SendConnSetup. + SendConnSetup passes the reason argument to strlen & WriteToClient, + both of which already have const qualifiers on their args. + Thus added const to the reason variable in ProcEstablishConnection + and the reason argument to SendConnSetup. + + Fixes gcc warnings: + dispatch.c: In function 'ProcEstablishConnection': + dispatch.c:3711:9: warning: assignment discards qualifiers from pointer target type + auth.c: In function 'CheckAuthorization': + auth.c:218:14: warning: assignment discards qualifiers from pointer target type + auth.c:220:20: warning: assignment discards qualifiers from pointer target type + connection.c: In function 'ClientAuthorized': + connection.c:683:3: warning: return discards qualifiers from pointer target type + mitauth.c: In function 'MitCheckCookie': + mitauth.c:88:13: warning: assignment discards qualifiers from pointer target type + xdmauth.c:259:14: warning: assignment discards qualifiers from pointer target type + xdmauth.c:270:14: warning: assignment discards qualifiers from pointer target type + xdmauth.c:277:11: warning: assignment discards qualifiers from pointer target type + xdmauth.c:293:15: warning: assignment discards qualifiers from pointer target type + xdmauth.c:313:14: warning: assignment discards qualifiers from pointer target type + xdmauth.c:322:11: warning: assignment discards qualifiers from pointer target type + rpcauth.c: In function 'SecureRPCCheck': + rpcauth.c:136:10: warning: assignment discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 99998196017ef38ec88459b50605aa20f628788b +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + Constify string for authorization protocol names + + gcc was warning from storing string constants in a char *name field: + auth.c:64:1: warning: initialization discards qualifiers from pointer target type + auth.c:72:1: warning: initialization discards qualifiers from pointer target type + auth.c:81:1: warning: initialization discards qualifiers from pointer target type + + Making the field const requires changing AuthorizationFromID to take + a const char ** pointer for the name argument which it sets to point + to the matching name entry. + + Changing that argument requires changing its sole caller in the security + extension to pass the address of a const char * variable to it, which it + can do, since the only thing it does with the returned name is to pass + it back to the RemoveAuthorization function that already expects a const + char *name. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 01834e99e461e2a8354f3b4aef7f14c5e83fa255 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + os/access.c: replace acmp & acopy macros with memcmp & memcpy calls + + No need to cast to char * now that all supported platforms use C89-standard + void * argument types, so just drop the casts from acmp & acopy macros, + which clears the gcc warnings for places const pointers were cast non-const: + + access.c: In function 'DefineSelf': + access.c:786:3: warning: cast discards qualifiers from pointer target type + access.c:795:6: warning: cast discards qualifiers from pointer target type + access.c: In function 'NewHost': + access.c:1293:9: warning: cast discards qualifiers from pointer target type + access.c:1298:6: warning: cast discards qualifiers from pointer target type + access.c:1309:5: warning: cast discards qualifiers from pointer target type + + Without the casts, acmp & acopy are just a funny way to write memcmp + & memmove, so drop the macros and inline the calls, taking care to + swap the first two arguments to memmove since it had swapped them. + + Since all the calls to memmove end up being to non-overlapping memory + (mostly copying from an existing pointer to a newly allocated one), + replace those with memcpy. + + And finally, don't actually call memcpy to copy 0 bytes from one place + to another, since that's just a waste of a perfectly good function call. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 020d83d361b0ab54ac962e97b12935be785f9a67 +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + xres.c: Preserve constness of string returned by LookupResourceName + + MakeAtom now accepts a const char * so we don't need to cast down to + char * anymore. Fixes gcc warning of: + + xres.c: In function 'ProcXResQueryClientResources': + xres.c:155:6: warning: cast discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 2ddae8f0bd2a9ce0cd15bf3848393af29e615acf +Author: Alan Coopersmith +Date: Mon Dec 12 16:49:33 2011 -0800 + + constify strings in resource name registry + + LookupResourceName already returned a const char *, so just needed + to change the variable we're storing the list in to be a const char ** + and then add const to the name argument to RegisterResourceName + (which just stores name in the array) and CreateNewResourceType + (which just passes name to RegisterResourceName). + + Clears a bunch of gcc warnings of the form: + registry.c:319:5: warning: passing argument 2 of 'RegisterResourceName' discards qualifiers from pointer target type + registry.c:200:1: note: expected 'char *' but argument is of type 'const char *' + + and from all the extensions: + damageext.c: In function 'DamageExtensionInit': + damageext.c:490:5: warning: passing argument 2 of 'CreateNewResourceType' discards qualifiers from pointer target type + ../include/resource.h:159:26: note: expected 'char *' but argument is of type 'const char *' + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 424dbde891486ad6a6c00c61a334031ff18f5556 +Author: Alan Coopersmith +Date: Fri Dec 9 10:08:55 2011 -0800 + + CheckForEmptyMask does not need to declare int n twice + + Just use the existing n variable again in the ARGB_CURSOR loop + instead of creating another one. + + Fixes gcc -Wshadow warning: + cursor.c: In function 'CheckForEmptyMask': + cursor.c:155:6: warning: declaration of 'n' shadows a previous local + cursor.c:146:9: warning: shadowed declaration is here + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit b2bc38e4a553c29f49a0284333b34b4d6c8a8c12 +Author: Alan Coopersmith +Date: Sat Dec 10 10:01:18 2011 -0800 + + Even more correctly free config file names + + If we didn't go into the if (!autoconfig) { } block, the filename, + dirname, and sysdirname pointers were never initialized, but we + freed them outside the block, leading to potential memory corruption. + + Move the frees inside the block where they're initialized to avoid this. + + To avoid similar problems, move the declarations of the variables that + are only used in this block inside the block. + + Regression introduced by commit 3d635fe84d6de53e2f74203b10e89f7851fe3fc1 + + Found by gcc warning: + xf86Config.c: In function 'xf86HandleConfigFile': + xf86Config.c:2303:11: warning: 'filename' may be used uninitialized in this function + xf86Config.c:2303:22: warning: 'dirname' may be used uninitialized in this function + xf86Config.c:2303:32: warning: 'sysdirname' may be used uninitialized in this function + + Signed-off-by: Alan Coopersmith + Reviewed-by: Paulo Zanoni + +commit 33d6e6743d86324c2078f156991b16ac4f2593fc +Author: Alan Coopersmith +Date: Wed Dec 7 19:06:05 2011 -0800 + + xf86RegisterRootWindowProperty is confused about xnfcalloc + + It will never return NULL, so don't try to handle a NULL condition, + since that just confuses programmers and static analyzers. + + It uses calloc, so all the allocated memory is cleared, so there's + no point looping over the memory to manually initialize it NULL. + + And just because it's annoying, it doesn't need to be the only + place in this file to do if (NULL==...) instead of if (... == NULL). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Paulo Zanoni + +commit e5aa00989cda9ebd18063c5e955235123ad37b88 +Author: Peter Hutterer +Date: Wed Dec 7 14:14:10 2011 +1000 + + Change GetXI2/XI/CoreType to just take a type argument + + Avoids the dummy-event dance if we have an event type and need to get the + matching XI2 type. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 6cc0e6a0afa6a87802767d484aa4e68fa935d3eb +Author: Peter Hutterer +Date: Fri Oct 28 12:55:55 2011 +1000 + + include: add GetXI2MaskByte and GetXI2EventFilterMask to headers + + This is needed for touch event processing. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 372a6f10dc2d74d2d179e8b92449e9b8636a99ef +Author: Alan Coopersmith +Date: Thu Dec 8 21:52:07 2011 -0800 + + Change disable_clientpointer return type to void + + It doesn't return anything, nor does it's caller expect it to. + + Fixes Solaris Studio compiler error: + "xichangehierarchy.c", line 214: Function has no return statement : disable_clientpointer + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 522f8bcc0360d6a117e929a004bc956ab92037e9 +Merge: 6369b59 2abe83d +Author: Keith Packard +Date: Thu Dec 8 20:57:26 2011 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit 2abe83df686ed64c4f4df711ac3c1fd12131c2e4 +Author: Peter Hutterer +Date: Mon Dec 5 14:02:51 2011 +1000 + + include: add BUG_WARN_MSG for custom error message on bug condition + + __BUG_WARN_MSG is a simple helper to enable call with and without varargs. I + couldn't find a way to otherwise do this without getting gcc warnings. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4fc797f3756611a97767f407e1af0b6a7cf2f1d9 +Author: Peter Hutterer +Date: Fri Nov 11 16:25:30 2011 +1000 + + xfree86: include xorg-config.h from xaalocal.h + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 8c9589c71d47f287588314d77ddbfcc22cd04c8a +Author: Peter Hutterer +Date: Mon Dec 5 11:55:58 2011 +1000 + + Xi: rename "state" to "corestate" in ProcessDeviceEvents + + 'state' is shadowed by the XKB 'state' as well (which feeds into the event + too), so rename this one to clarify that this is the core event state only. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 631516a4aa9858874ee197444cd93d91b97a1089 +Author: Peter Hutterer +Date: Fri Dec 2 15:47:58 2011 +1000 + + Xi: check button mapping value _before_ assigning it + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit a1304d6cb69301899c3c8450d6bf3e68573599df +Author: Peter Hutterer +Date: Mon Dec 5 11:26:30 2011 +1000 + + Xi: skip superfluous cast + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0 +Author: Peter Hutterer +Date: Wed Nov 30 09:06:06 2011 +1000 + + xfixes: don't dereference a NULL cursor + + If the new cursor is the NULL cursor, don't dereference it and use zeros + instead. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0 +Author: Peter Hutterer +Date: Tue Nov 29 16:15:37 2011 +1000 + + Xi: when removing a device, reset ClientPointers where needed + + if a client had the to-be-removed device as ClientPointer, reset to NULL. + + Fixes #43165 + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit 27425f07b29e0ddaa782345c1899273ca742891e +Author: Peter Hutterer +Date: Wed Nov 9 14:45:02 2011 +1000 + + dix: use BUG_WARN for input mask size issues + + Yes, we're likely corrupting memory here but really this is unlikely to be + triggered other than a real bug in the server. In which case a stacktrace is + going to be more useful than any silent error handling. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 9b570ecbda954227c89938ee6f94b9efd192d3c6 +Author: Peter Hutterer +Date: Fri Dec 9 10:48:05 2011 +1000 + + xfree86: bump the input ABI + + The last few patches broke the ABI, bump it for convenience. + + Signed-off-by: Peter Hutterer + +commit 86bb3781b336c09e4279136ed81974de5acdba7f +Author: Peter Hutterer +Date: Fri Nov 4 11:29:01 2011 +1000 + + input: swap the server over to use the XI2mask struct + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit b8b90cd1610331ff12fa3f70bf372670af7795ec +Author: Peter Hutterer +Date: Thu Nov 3 13:39:59 2011 +1000 + + Add a new XI2Mask struct and a few helper functions. + + The current XI2 mask handling is handy for copying (fixed size arrays) but a + pain to deal with otherwise. Add a struct for XI2 masks and the required + accessors. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4bc2761ad5ec2d0668aec639780ffb136605fbc8 +Author: Peter Hutterer +Date: Fri Nov 4 14:16:37 2011 +1000 + + dix: switch the dev->deviceGrab.activeGrab from GrabRec to GrabPtr + + This breaks the input ABI. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit b601ea769f1b8a4d7f19e9d4a13541c78e865fe5 +Author: Peter Hutterer +Date: Fri Nov 4 10:47:27 2011 +1000 + + dix: allocate temporary grabs on the heap + + Once grabs start having nested memory locations, we can't just use the + GrabRec on the stack anymore, we need to alloc/copy/free the grabs. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit b0e9e2e32616d09c30a02b9d0ae9db0b13e150d1 +Author: Peter Hutterer +Date: Fri Nov 4 10:44:31 2011 +1000 + + dix: add CopyGrab() function + + Not really needed at this point, but will be once touch support is added. + Since grabs are now expected to be allocated/freed with AllocGrab and + FreeGrab, CopyGrab must increase the refcount and duplicate the modifier + masks. Until the callers are switched to use FreeGrab, this introduces + memleaks. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 347f377f3b3f8c9d230d6309ec8ae92aa86d78b7 +Author: Peter Hutterer +Date: Thu Nov 3 16:12:09 2011 +1000 + + dix: add AllocGrab helper function + + Not needed since the GrabRec is a self-contained struct but will be needed + for the xi2 input mask rework. + FreeGrab already exists, make it available to other callers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 7af23259d88f4c28ed21140f82cc03b3724c06bb +Author: Peter Hutterer +Date: Mon Nov 21 11:41:12 2011 -0800 + + dix: switch the syncEvent queue to a struct list + + No effective functionality change, just cleanup to make this code slightly + more sane. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 6369b59668613e51131857fbaeaa393a65a73048 +Author: Gaetan Nadon +Date: Thu Dec 1 16:24:32 2011 -0500 + + test: update .gitignore with xfree86 and sort alphabetically + + Reviewed-by: Alan Coopersmith + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 3ab8ee32470f7cf1223e04238bb8c5f74ed52fc3 +Merge: 22a666f 98c4a88 +Author: Keith Packard +Date: Wed Dec 7 12:42:17 2011 -0800 + + Merge remote-tracking branch 'airlied/reviewed-fixes' + +commit 22a666f9952feb7248e9bb2faf777edaaac8175f +Merge: 3824f55 e89b032 +Author: Keith Packard +Date: Wed Dec 7 12:27:23 2011 -0800 + + Merge remote-tracking branch 'alanc/master' + +commit 3824f558cc2ee051da8314c7bf08b8647b44e84a +Author: Keith Packard +Date: Wed Dec 7 12:13:37 2011 -0800 + + hw/xfree86: fix segfault in config parser when config dir is missing + + Treat a scandir error from a missing (or unusable) directory return as + if it simply returned no files at all, which is what we want. + + cc: Paulo Zanoni + Signed-off-by: Keith Packard + +commit 98c4a888a4428789386c7c47cecc81933b5999ba +Author: Dave Airlie +Date: Mon Nov 28 16:37:59 2011 +0000 + + kdrive: drop screen crossing code. + + The only kdrive server we probably care about anymore is Xephyr, + and this screen enable/disable code totally breaks it in multi-screen mode. + + When you are in one screen the other stops updating. + + Fixes https://bugzilla.redhat.com/show_bug.cgi?id=757457 + + Signed-off-by: Dave Airlie + Reviewed-by: Peter Hutterer + +commit 8d3731a811e33e263920dd7c8ec63d02968cb56e +Author: Dave Airlie +Date: Thu Oct 20 10:48:26 2011 +0100 + + hal: free tmp_val in one missing case + + Pointed out by coverity scan. + + Signed-off-by: Dave Airlie + Reviewed-by: Daniel Stone + +commit 41229392b790f30a0f0ef1f4ed95647c5bca4001 +Author: Dave Airlie +Date: Thu Oct 20 11:00:43 2011 +0100 + + xv: test correct number of requests. (v2) + + Pointed out by coverity. + + v2: fix swapped as well, as pointed out by Alan + + Signed-off-by: Dave Airlie + Reviewed-by: Alan Coopersmith + +commit 1049139499d9132a20cd6d4d156fe9da9cddb6c2 +Author: Dave Airlie +Date: Wed Oct 19 16:57:13 2011 +0100 + + xaa: avoid possible freed pointer reuse in epilogue + + If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps + avoid this by clearing the flags in to be destroyed pGCPriv. + + Reported by coverity. + + Signed-off-by: Dave Airlie + Reviewed-by: Jeremy Huddleston + +commit 682c09a2cedd234b005334cc01247d859dd7f26a +Author: Dave Airlie +Date: Wed Oct 19 16:22:31 2011 +0100 + + Xi: avoid overrun of callback array. + + This code had an off-by-one and would allow writing one past the end of + the callbacks array. + + Pointed out by coverity. + + Signed-off-by: Dave Airlie + Reviewed-by: Jeremy Huddleston + +commit b62dc4fcbcffd10de16650bee284702c8608bb60 +Author: Dave Airlie +Date: Wed Oct 19 16:21:26 2011 +0100 + + xext: don't free uninitialised pointer when malloc fails. (v2) + + Initialise the pAttr->values to values so if the values allocation + fails it just ends up as free(NULL). + + Pointed out by coverity. + + v2: use Alan's suggestion. + + Signed-off-by: Dave Airlie + Reviewed-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 22605effd188436629a0dbc688666549473741e4 +Author: Adam Jackson +Date: Thu Apr 28 13:34:28 2011 +1000 + + fbdevhw: iterate over all modes that match a mode. (v3) + + So on RHEL5 anaconda sets an xorg.conf with a fixed 800x600 mode in it, + we run radeonfb and fbdev since ati won't work in userspace due to domain + issues in the older codebase. + + On certain pseries blades the built-in KVM can't accept an 800x600-43 mode, + it requires the 800x600-60 mode, so we have to have the kernel radeonfb + driver reject the 800x600-43 mode when it sees it. However then fbdev + doesn't try any of the other 800x600 modes in the modelist, and we end up + getting a default 640x480 mode we don't want. + + This patch changes the mode validation loop to continue on with the other modes + that match to find one that works. + + v2: move code around to avoid extra loop, after comment from Jamey. + v3: move loop setup back into loop as per Jeremy's review. + + Signed-off-by: Dave Airlie + Reviewed-by: Jamey Sharp + Reviewed-by: Jeremy Huddleston + +commit fac464e310b82fadcedf790798d1016c4805640b +Author: Peter Hutterer +Date: Fri Dec 2 08:52:53 2011 +1000 + + include: rename "foos" to "list_of_foos" in the struct list documentation + + Makes things a little easier to read. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 7dfe8c32a96d3f96c8aaeb2802f5b122e381a1e4 +Author: Peter Hutterer +Date: Fri Dec 2 08:51:24 2011 +1000 + + include: update struct list documentation to use one set of structs only + + The example at the top of the file used a struct bar and a list of struct + foos. Use those two throughout instead of a different struct foo for the + examples and for the API documentation. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 18539c89eca8f6e272ead2b631365da530065ae7 +Author: Peter Hutterer +Date: Fri Dec 2 08:51:04 2011 +1000 + + include: a new list element does not need initialization, state so + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 58dc73314b6508121ca094bbcf00612fe19ed69f +Author: Peter Hutterer +Date: Fri Dec 2 08:43:45 2011 +1000 + + include: point to the tests in list.c as examples + + Even with the documentation, the list.c tests are the best examples. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit c8e451a8e719ba432bcfa8976774c07307087809 +Author: Peter Hutterer +Date: Thu Dec 1 14:12:11 2011 +1000 + + include: add list_last_entry to get the tail of a list + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 6acebf9e1298939593b942ec91ae9ec9e74faa19 +Author: Peter Hutterer +Date: Thu Dec 1 13:35:50 2011 +1000 + + include: add list_append() + + The existing list_add() prepends to the list, but in some cases we need the + list ordered in the way we append the elements. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit e89b0324da89ba5c0ba64af1ef46a12b7f55f879 +Author: Gaetan Nadon +Date: Sat Dec 3 21:23:51 2011 -0500 + + autoconf: the minimum required level for autoconf is 2.60 + + The toolchain requirements are documented here: + http://www.x.org/wiki/ModularDevelopersGuide#Required_Tools + + Note that autoconf features only found in versions later + than 2.60 must not be used. + + Signed-off-by: Gaetan Nadon + Reviewed-by: Alan Coopersmith + Signed-off-by: Alan Coopersmith + +commit 427cb53fddf0c517d1fd1025a87b1104735edd2a +Author: Gaetan Nadon +Date: Sat Dec 3 21:23:21 2011 -0500 + + autoconf: remove redundant AC_PROG_MAKE_SET + + Already included during Automake initialization. + + After the patch, no change: + configure:3893: checking whether make sets $(MAKE) + configure:3915: result: yes + + Signed-off-by: Gaetan Nadon + Reviewed-by: Alan Coopersmith + Signed-off-by: Alan Coopersmith + +commit c19c55a93ab1bc6db56075ca34d6e1c3f522f622 +Author: Alan Coopersmith +Date: Fri Dec 2 00:09:07 2011 -0800 + + Fix builds of Xnest & Xephyr with Solaris Studio compilers + + Required in order to build with Studio cc now that xorg-macros is + setting -errwarn=E_FUNC_HAS_NO_RETURN_STMT since a bug in the Solaris + system headers causes the noreturn attribute to not be correctly + applied to the exit() prototype in when building with + Studio instead of gcc. + + Otherwise compiler exits with errors: + "Display.c", line 65: Function has no return statement : x_io_error_handler + "hostx.c", line 341: Function has no return statement : x_io_error_handler + + Uses Studio-specific pragma instead of adding another exit() prototype + with a noreturn attribute to avoid causing gcc to warn about having + a redundant prototype for the exit() function. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Mikhail Gusarov + +commit e4dcf580f007d6adcf5b0c639865d7aaab1a319d +Author: Alan Coopersmith +Date: Thu Dec 1 23:45:42 2011 -0800 + + LoaderOpen returns either a valid pointer or NULL, so don't check for < 0 + + Fixes Sun cc warning that was recently elevated to error by the + stricter default CFLAGS changes to xorg-macros: + + "loadmod.c", line 914: improper pointer/integer combination: op "<" + + Should have been changed when commit ab7f057ce9df4e905b12 changed the + LoaderOpen return type from int to void *. + + Changes log message when file is found but dlopen() fails from: + (EE) LoadModule: Module dbe does not have a dbeModuleData data object. + (EE) Failed to load module "dbe" (invalid module, 0) + to: + (EE) Failed to load module "dbe" (loader failed, 7) + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + +commit 8b6a75009746db4b8e2e180210ac097e35136bcd +Author: Alan Coopersmith +Date: Wed Nov 30 23:01:34 2011 -0800 + + Fix gcc warnings about redundant declarations of fallback functions + + Ensure ffs, strndup, strlcat, etc. aren't defined by our headers + if they're already defined in the system headers. + + This does export the HAVE_FFS, HAVE_STRNDUP, etc. definitions to drivers, + but if you built the Xserver with a libc that had those, and then build + the drivers with a less capable libc, you're going to have problems anyway, + and this should solve some reported problems with conflicts between our + strndup definition and gcc magic for it. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + +commit d829a7c5cb42c979b58f3547136df5b05d906423 +Author: Alan Coopersmith +Date: Wed Nov 30 22:20:09 2011 -0800 + + Move to autoconf standard function name checks & defines + + Replace multiple methods of checking for functions with AC_CHECK_FUNCS + Replace multiple methods of selecting fallback funcs with AC_REPLACE_FUNCS + Replace HAS_* and NEED_* #defines with autogenerated HAVE_* + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + Reviewed-by: Mikhail Gusarov + Reviewed-by: Gaetan Nadon + +commit 4be68b03128e958d2a6dc1b7feb3587329b9561b +Author: Alan Coopersmith +Date: Wed Nov 30 19:39:51 2011 -0800 + + Remove unused function checks from configure.ac & include/*.h.in + + The code that used getisax to check for MMX support was moved to pixman + and removed from the X server by commit eb2d7fe02f9cbc. + + The code that used HAVE_MKSTEMP was deleted by the Xprint removal in + commit 1c8bd318fbaf. + + All alloca calls were removed by the patch series end in commit 5e363500c8, + and used custom X checks instead of the autoconf HAVE_ALLOCA anyway. + + I can find no record of HAVE_GETUID, HAVE_GETEUID, HAVE_LINK, HAVE_MEMMOVE, + HAVE_MEMSET, HAVE_STRCHR, HAVE_STRRCHR, HAVE_GETOPT, HAVE_GETOPT_LONG, + HAVE_DOPRNT, or HAVE_VPRINTF ever being used, and the calls to those + functions are not wrapped in #ifdefs. + (Most of those are in our baseline requirements of C89 & Unix98 anyway.) + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + Reviewed-by: Mikhail Gusarov + Reviewed-by: Gaetan Nadon + +commit 84207def93e4489df8dca8e044ce544be8a3f845 +Author: Alan Coopersmith +Date: Mon Nov 28 20:38:58 2011 -0800 + + Disable building of tests requiring DDX functions when Xorg is not built + + Some test cases require linking with some sort of DDX - ideally we'd + have a stub ddx for testing, but for now, since we link with the Xorg + ddx, disable those tests when configured with --disable-xorg + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43320 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Dan Nicholson + Reviewed-by: Jeremy Huddleston + +commit fd976e4051e15ab2d01ec0bf89ff26926d4ed04e +Author: Gaetan Nadon +Date: Thu Dec 1 16:24:12 2011 -0500 + + config: conftest needs an include directive to locate X11/Xfuncproto.h + + The compiler option -fvisibility=hidden is erroneously missing + due to a faulty configuration test. The gcc command is unable to + locate X11/Xfuncproto.h unless the build occurs on a + system where X11 development headers are installed. + + configure:21294: checking for symbol visibility support + configure:21323: gcc -std=gnu99 -c -g -O2 -fvisibility=hidden conftest.c >&5 + conftest.c:144:28: fatal error: X11/Xfuncproto.h: No such file or directory + + The solution is to add an include directive to obtain the location + of X11/Xfuncproto.h which may or may not be the system installed headers. + + Reviewed-by: Alan Coopersmith + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit feebf6746374aa04b12e9e3e51313a3a82c03530 +Author: Alan Coopersmith +Date: Wed Nov 23 00:30:02 2011 -0800 + + Limit the number of screens Xvfb will attempt to allocate memory for + + Commit f9e3a2955d2ca7 removing the MAXSCREEN limit left the screen + number too unlimited, and allowed any positive int for a screen number: + + Xvfb :1 -screen 2147483647 1024x1024x8 + + Fatal server error: + Not enough memory for screen 2147483647 + + Found by Parfait 0.3.7: + Error: Integer overflow (CWE 190) + Integer parameter of memory allocation function realloc() may overflow due to multiplication with constant value 1112 + at line 293 of hw/vfb/InitOutput.c in function 'ddxProcessArgument'. + + Since the X11 connection setup only has a CARD8 for number of SCREENS, + limit to 255 screens, which is also low enough to avoid overflow on the + sizeof(*vfbScreens) * (screenNum + 1) calculation for realloc. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + +commit fb22a408c69a84f81905147de9e82cf66ffb6eb2 +Author: Keith Packard +Date: Tue Nov 8 10:13:15 2011 -0800 + + Save major/minor opcodes in ClientRec for RecordAReply + + The record extension needs the major and minor opcodes in the reply + hook, but the request buffer may have been freed by the time the hook + is invoked. Saving the request major and minor codes as the request is + executed avoids fetching from the defunct request buffer. + + This patch also eliminates the public MinorOpcodeOfRequest function, + inlining it into Dispatch. Usages of that function have been replaced + with direct access to the new ClientRec field. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 05f09354a30a4f5edd421220e1aa97be754c71bb +Merge: 3197b77 08ec4da +Author: Keith Packard +Date: Thu Dec 1 14:44:52 2011 +0000 + + Merge remote-tracking branch 'jcristau/for-keith' + +commit 3197b773c81e58cd4aa412eccaee49526012ed6f +Merge: 2dc5ba4 dfcec1d +Author: Keith Packard +Date: Thu Dec 1 14:36:58 2011 +0000 + + Merge remote-tracking branch 'whot/for-keith' + +commit 2dc5ba4a1b127e3ed286718ab0a6c20438361192 +Author: Matt Turner +Date: Tue Nov 29 23:52:19 2011 -0500 + + Remove another if (E != NULL) check around free(E) + + I wonder if there are any other patterns we haven't seen yet? + + Reviewed-by: Jamey Sharp + Signed-off-by: Matt Turner + Signed-off-by: Keith Packard + +commit dfcec1d3f9d7bac5cde9eb034341428ee0ad3728 +Author: Peter Hutterer +Date: Fri Nov 11 08:55:14 2011 +1000 + + test: remove unneeded printf statements from misc.c + + Leftover from debugging, is not really needeed in a test. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit 9c38422fc4cf853c3104fada2a3851c79df2a66f +Author: Peter Hutterer +Date: Wed Nov 9 14:37:26 2011 +1000 + + include: add BUG_WARN macro for internal bug cases. + + There are plenty of cases that can only be triggered by a real bug in the + server and doing the ErrorF dance manually everywhere is a tad painful and + the error message is usually used only to find the spot in the file anyway. + + Plus, reading BUG_WARN somewhere is a good indicator to the casual reader + that this isn't intended behaviour. + + Note that this is intentionally different to the BUG_ON behaviour on the + kernel, we do not FatalError the server. It's just a warning + stacktrace. + If the bug is really fatal, call FatalError. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Alan Coopersmith + +commit 61ef4daf6450da573b9de72ba7b200566821b916 +Author: Peter Hutterer +Date: Fri Nov 4 15:49:23 2011 +1000 + + Xi: add FreeInputMask function + + Does what it says on the box, complements MakeInputMask. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit ee9346bb31efce4036df1b8dd8f1a5dc43ae955a +Author: Peter Hutterer +Date: Thu Nov 3 15:45:34 2011 +1000 + + Xi: add helper functions to alloc/free InputClientPtrs + + Currently not needed since the InputClientRec is a self-contained struct. As + part of the touch rework that won't be the case in the future and a function + to allocate/free memory appropriately is required. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 4acf999c294868a44e559d212c6d88a4978256b2 +Author: Peter Hutterer +Date: Fri Nov 4 15:37:32 2011 +1000 + + dix: use a single return statement in CheckPassiveGrabsOnWindow + + No functional change. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit b371795f01c1d7fc338cfe18b8a567ed9f402846 +Author: Peter Hutterer +Date: Thu Nov 3 14:54:06 2011 +1000 + + dix: rename GetWindowXI2Mask to WindowXI2MaskIsset + + And let it return a boolean value, that's all the callers need anyway. + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit bedb8fd90de8e2db33d5e3b1d859f24bf34efc9a +Author: Peter Hutterer +Date: Thu Nov 3 14:25:51 2011 +1000 + + Xi: use single return code from XIPassiveGrabDevice + + Some failures returned status but the actual return code was "ret". Use + "ret" consistently and move status to the local block is used in. + + [the goto isn't necessary yet, but for a future patch] + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + +commit 2aad1a2b42b7def7812abfa2462b6bcc6382e03a +Author: Peter Hutterer +Date: Wed Nov 2 14:07:19 2011 +1000 + + include: fix mask size calculation + + Same bug as inputproto-2.0.1-9-gb1149ab, if the XI2LASTEVENT was a multiple + of 8, the mask was one bit too short. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + Reviewed-by: Chase Douglas + +commit b2015a2c01711646bb7ae23d684abee0cd55d4d0 +Author: Jeremy Huddleston +Date: Thu Nov 24 13:54:08 2011 -0800 + + dmx: Build fix for -Werror=implicit-function-declaration on linux + + Fixes regression introduced by: 6e6d732bac3c21cb85f8e998908f9b393630e5f8 + Found-by: Tinderbox + + Signed-off-by: Jeremy Huddleston + CC: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 873a1ace3646994adf95961f48719e95dcade7a2 +Author: Paulo Zanoni +Date: Tue Nov 1 10:57:56 2011 -0200 + + parser: free val.str after xstrtokenize + + After we tokenize val.str, we discard it. + + This is just one example: + 6 bytes in 1 blocks are definitely lost in loss record 24 of 652 + at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so) + by 0x4D744D: xf86getToken (scan.c:400) + by 0x4D75F1: xf86getSubToken (scan.c:462) + by 0x4DB060: xf86parseInputClassSection (InputClass.c:145) + by 0x4D664C: xf86readConfigFile (read.c:184) + by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) + by 0x49AA77: InitOutput (xf86Init.c:365) + by 0x425A7A: main (main.c:204) + + Signed-off-by: Paulo Zanoni + Reviewed-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit d41987d77c903e00cca7bcf3e04ed07151e3bb4d +Author: Paulo Zanoni +Date: Tue Nov 1 10:42:36 2011 -0200 + + parser: free val.str after xf86getBoolValue + + After we convert the value to a boolean, we discard the string. + + This is just one example: + + 3 bytes in 1 blocks are definitely lost in loss record 5 of 657 + at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) + by 0x4D744D: xf86getToken (scan.c:400) + by 0x4D75F1: xf86getSubToken (scan.c:462) + by 0x4DB3E0: xf86parseInputClassSection (InputClass.c:189) + by 0x4D664C: xf86readConfigFile (read.c:184) + by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) + by 0x49AA77: InitOutput (xf86Init.c:365) + by 0x425A7A: main (main.c:204) + + Signed-off-by: Paulo Zanoni + Reviewed-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit d5c7338b3eaea55177ade6fcba71a47ccd5547f5 +Author: Paulo Zanoni +Date: Mon Oct 31 17:54:03 2011 -0200 + + parser: free scandir's list + + v2: move the free()s to the function that calls scandir + + 80 bytes in 1 blocks are definitely lost in loss record 411 of 631 + at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) + by 0x4C27927: realloc (vgpreload_memcheck-amd64-linux.so) + by 0x696A80D: scandir (scandir.c:108) + by 0x4D8828: OpenConfigDir (scan.c:854) + by 0x4D8A43: xf86openConfigDirFiles (scan.c:952) + by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327) + by 0x49A9E3: InitOutput (xf86Init.c:365) + by 0x425A7A: main (main.c:204) + + Signed-off-by: Paulo Zanoni + Reviewed-by: Peter Hutterer + +commit 3d635fe84d6de53e2f74203b10e89f7851fe3fc1 +Author: Paulo Zanoni +Date: Sun Oct 30 18:04:59 2011 -0200 + + Correctly free config file names + + We call xf86penConfigDirFiles twice, so we overwrite the configDirPath + variable, losing the pointer. If we move the pointer management to the + upper layer (the function callers), they will be able to call these + functions as many times as they want, but they'll have to free those + returned values. + + v2: don't leak inside XWin + + 4,097 bytes in 1 blocks are definitely lost in loss record 625 of 632 + at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so) + by 0x4D7899: DoSubstitution (scan.c:615) + by 0x4D87B0: OpenConfigDir (scan.c:845) + by 0x4D8A2D: xf86openConfigDirFiles (scan.c:955) + by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327) + by 0x49A9BF: InitOutput (xf86Init.c:365) + by 0x425A7A: main (main.c:204) + + Signed-off-by: Paulo Zanoni + Reviewed-by: Dan Nicholson + +commit 0ae087e13192d9b498db782be5ba49ca91a81547 +Author: Paulo Zanoni +Date: Sat Oct 29 18:33:24 2011 -0200 + + glx: don't leak driConfigs + + For dri, dri2 and driswrast. + + 12,968 (584 direct, 12,384 indirect) bytes in 1 blocks are definitely lost in loss record 569 of 570 + at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + by 0x7821E3B: driConcatConfigs (utils.c:560) + by 0x7827CF2: dri_fill_in_modes (dri_screen.c:224) + by 0x782831E: dri_init_screen_helper (dri_screen.c:405) + by 0x7826C03: drisw_init_screen (drisw.c:266) + by 0x782225F: driCreateNewScreen (drisw_util.c:69) + by 0x4826E2: __glXDRIscreenProbe (glxdriswrast.c:451) + by 0x4812FA: GlxExtensionInit (glxext.c:327) + by 0x41FB14: InitExtensions (miinitext.c:471) + by 0x568622: main (main.c:208) + + Signed-off-by: Paulo Zanoni + Reviewed-by: Jeremy Huddleston + +commit d26fae246d7c451b4d5ffe24fdb959d4bd00b107 +Author: Paulo Zanoni +Date: Tue Oct 25 14:56:35 2011 -0200 + + glx: don't leak fbconfigs + + 29,952 (208 direct, 29,744 indirect) bytes in 1 blocks are definitely lost in loss record 573 of 573 + at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + by 0x4829BC: createModeFromConfig (glxdricommon.c:131) + by 0x482C09: glxConvertConfigs (glxdricommon.c:185) + by 0x482788: __glXDRIscreenProbe (glxdriswrast.c:468) + by 0x4812FA: GlxExtensionInit (glxext.c:327) + by 0x41FB14: InitExtensions (miinitext.c:471) + by 0x568636: main (main.c:208) + + Signed-off-by: Paulo Zanoni + Reviewed-by: Jeremy Huddleston + +commit 305a8bcb2fc6f87f8d891fcb774198b6fd118ee1 +Author: Paulo Zanoni +Date: Thu Oct 20 17:39:29 2011 -0200 + + glx: fix memory leak when destroying screen + + 1,152 bytes in 1 blocks are definitely lost in loss record 536 of 575 + at 0x4C25E84: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) + by 0x483820: __glXScreenInit (glxscreens.c:357) + by 0x48271C: __glXDRIscreenProbe (glxdriswrast.c:469) + by 0x4812BE: GlxExtensionInit (glxext.c:327) + by 0x41FB14: InitExtensions (miinitext.c:471) + by 0x5685AE: main (main.c:208) + + Signed-off-by: Paulo Zanoni + Reviewed-by: Jeremy Huddleston + +commit f405dfffe7d5db81d398615a80acbeba7e014ada +Author: Jeremy Huddleston +Date: Mon Nov 7 22:14:30 2011 +0000 + + dmx: Build fix for -Werror=implicit-function-declaration + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Alan Coopersmith + Signed-off-by: Alan Coopersmith + +commit 632d205b309d0515b4ae0f9902059aa4b093a313 +Author: Alan Coopersmith +Date: Mon Nov 7 20:24:08 2011 -0800 + + Fix gcc -Wwrite-strings warnings in xf86Modes code + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 09e4b78f7944234865f4648940453303af0c2663 +Author: Alan Coopersmith +Date: Mon Nov 7 19:19:47 2011 -0800 + + Fix gcc -Wwrite-strings warnings in xf86 ddx + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 8e4556f560487f3d07812834d4785441d0a8323c +Author: Alan Coopersmith +Date: Mon Nov 7 20:09:47 2011 -0800 + + FindModule: stop copying const char *dirname to char *dirpath + + Not needed since 6cf844ab69926b split out the allocation/manipulation + into the helper function, leaving FindModule just copying the pointer + around, and causing gcc warnings and an unreachable call to free. + + Also no longer need to store the combined strlen results in dirlen. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 05f589d464a961aea8d25632a390fb66a06cd186 +Author: Alan Coopersmith +Date: Fri Nov 4 23:21:34 2011 -0700 + + Fix gcc -Wwrite-strings warnings in various extensions + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 232f1ddf3d060f3ce9d2ebd35f33b1294cac380e +Author: Alan Coopersmith +Date: Thu Nov 3 21:21:19 2011 -0700 + + Fix gcc -Wwrite-strings warnings in XkbGetRulesDflts + + Stop temporarily storing a pointer to a constant literal string + in a char *, just to strdup it a few lines later. + + Fixes gcc -Wwrite-strings warnings: + + xkbInit.c: In function 'XkbGetRulesDflts': + xkbInit.c:121:38: warning: assignment discards qualifiers from pointer target type + xkbInit.c:123:23: warning: assignment discards qualifiers from pointer target type + xkbInit.c:125:24: warning: assignment discards qualifiers from pointer target type + xkbInit.c:127:25: warning: assignment discards qualifiers from pointer target type + xkbInit.c:129:25: warning: assignment discards qualifiers from pointer target type + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 0bc41d5f8d1a6192f57d9bf646cc46ed839b06b9 +Author: Alan Coopersmith +Date: Mon Nov 7 18:08:21 2011 -0800 + + Remove redundant redeclarations of functions in the same header file + + Exposed by recent addition of -Wredundant-decls to default CWARNFLAGS + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 285133a35eede03e37f41aeea6cbfd15a0800d98 +Author: Alan Coopersmith +Date: Mon Nov 7 15:44:26 2011 -0800 + + sun_agp: cast key to uintptr_t before casting to (int *) + + Matches what linux_agp already does and prevents gcc from throwing up: + + sun_agp.c: In function 'xf86DeallocateGARTMemory': + sun_agp.c:236:40: error: cast to pointer from integer of different size + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit f8dd5efb673439e7e9f7d82e6f9cfb97afacc85a +Author: Alan Coopersmith +Date: Thu Nov 3 21:18:56 2011 -0700 + + Mark XKB char * as const to clean up gcc -Wwrite-strings warnings + + Cleans up around 120 warnings from this set + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit cccafabd56d0f8e5784ea0ad9fdc03224f952bfe +Author: Alan Coopersmith +Date: Thu Nov 3 21:10:51 2011 -0700 + + Mark arguments to fopen/popen/system wrappers as const char * + + Silencing more gcc -Wwrite-strings warnings + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 3d0ece5e8467d823afb227b7a7f8b12b906b6ba9 +Author: Alan Coopersmith +Date: Thu Nov 3 20:44:43 2011 -0700 + + Reduce unnecessary string copying in xkbtext routines + + Instead of using sprintf to copy a static string to a local buffer, + just to pass it to TryCopyStr, pass the static string to TryCopyStr + directly, as is already done in other parts of this code. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 05d8a7f7a785eff3292f0f0537bb3902930f1b5c +Author: Alan Coopersmith +Date: Sat Oct 29 11:08:17 2011 -0700 + + Convert a bunch of sprintf to snprintf calls + + This batch is the straightforward set - others are more complex and + need more analysis to determine right size to pass. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit b967bf2af264726042e2f6ffb9ca7d234f34b56b +Author: Alan Coopersmith +Date: Mon Oct 31 23:01:35 2011 -0700 + + Remove xf86FormatPciBusNumber from API, inline the one place its used + + Found no calls from current driver modules + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 6450f6ca7ee070da3b6d70c2d3a6977f018ac421 +Author: Alan Coopersmith +Date: Thu Nov 3 22:13:05 2011 -0700 + + Move DoShowOptions to xf86Configure.c, delete xf86ShowOpts.c + + Gets rid of duplicate static copy of optionTypeToString by putting + both callers of that helper function in the same source file. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Daniel Stone + Reviewed-by: Jeremy Huddleston + +commit 43fa1274263f76faaca995f6e498bc3179a857b8 +Author: Alan Coopersmith +Date: Mon Oct 31 22:17:35 2011 -0700 + + Remove bad code from DoShowOptions (Xorg -showopts handler) + + When we want to print a string, it's okay to just print it. + We don't need to first allocate a buffer 2 bytes bigger than the + string, copy the entire string unmodified to the buffer, print the + buffer, and then leak the buffer (though we AbortDDX 8 lines later, + and then just in case we survived that, call exit as well, so the + leak is short lived, just oh so pointless). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Daniel Stone + Reviewed-by: Jeremy Huddleston + +commit 71a89d97332cc181becc5a5f73166e642f96c076 +Author: Alan Coopersmith +Date: Mon Oct 31 21:36:47 2011 -0700 + + Convert glx/single2.c:DoGetString() to use asprintf() + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit f3cb512dc4daaeed389bb4740e21b6e2330e01e1 +Author: Alan Coopersmith +Date: Sat Oct 29 11:19:44 2011 -0700 + + LogVMessageVerb: Fix const mismatch warning + + "log.c", line 382: warning: assignment type mismatch: + pointer to char "=" pointer to const char + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 3d2d88029b29d6e1c53220ad275ba8ba2dedd89e +Author: Alan Coopersmith +Date: Sat Oct 29 11:13:32 2011 -0700 + + AuthAudit: clean up string handling calls + + The extra "out" pointer to redirect writes to the array isn't needed since + the removal of LBX (commit a9ed5a87902a), and eliminating it allows more + logical use of sizeof(addr) in length-checked strlcpy & snprintf calls to + write to it. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 615f93a3d03d40924365061c6ae242240dd0ab7e +Author: Alan Coopersmith +Date: Tue Nov 1 14:57:41 2011 -0700 + + Remove unnecessary variable rtrn in XkbKeysymText + + Also removes even more unnecessary use of variable assignment inside + function arguments. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Daniel Stone + +commit 5f285a30a1d6ffba82ebe5e08a0b68352bb51556 +Author: Alan Coopersmith +Date: Tue Nov 1 16:56:18 2011 -0700 + + Make XIGetKnownProperty take a const char * argument + + Now that MakeAtom takes const char *, so can XIGetKnownProperty. + Clears 71 warnings from gcc -Wwrite-strings of the form: + devices.c:145:5: warning: passing argument 1 of 'XIGetKnownProperty' discards qualifiers from pointer target type + ../include/exevents.h:128:23: note: expected 'char *' but argument is of type 'const char *' + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + +commit e0f3633632de609e60950aef07c82df534db7888 +Author: Alan Coopersmith +Date: Fri Oct 28 21:31:46 2011 -0700 + + Convert ProcRenderQueryFilters to use memcpy instead of strncpy + + We just got the string length with strlen, might as well use it + to copy the whole string quickly instead of checking each character + a second time to see if it's 0 or not. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 780133f9ae7fada462714b47e79d26075bbd9abe +Author: Alan Coopersmith +Date: Fri Oct 28 21:29:50 2011 -0700 + + Convert DetermineClientCmd to use strdup instead of malloc+strncpy + + *cmdname is initialized to NULL earlier in the function, so it's + okay to overwrite it with NULL if strdup fails, don't need that + extra check. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 03ddca6f71339fad089c56484bf35c63642ae1be +Author: Alan Coopersmith +Date: Fri Oct 28 21:25:20 2011 -0700 + + Convert dmxSetDefaultFontPath to use strdup instead of malloc+strncpy + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit d9243777c77d9b2992fbaf7f459430283837e323 +Author: Alan Coopersmith +Date: Sat Oct 29 10:32:52 2011 -0700 + + matchDriverFromFiles: use one snprintf instead of strncpy/cat series + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 6e6d732bac3c21cb85f8e998908f9b393630e5f8 +Author: Alan Coopersmith +Date: Fri Oct 28 21:18:46 2011 -0700 + + Convert strncpy/strncat to strlcpy/strlcat + + As long as we're carrying around a compatibility copy in os/strl*.c, + might as well use them. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit e189dbb3e57d30eb96034d4ce9544ce7a93a371e +Author: Alan Coopersmith +Date: Fri Oct 28 20:19:44 2011 -0700 + + Convert AllocXTestDevice to use asprintf + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 08093c25a91c07ab8af7cece9bba738b827cfd1b +Author: Alan Coopersmith +Date: Mon Oct 24 23:16:30 2011 -0700 + + Convert some malloc + strncpy pairs into strndup calls + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit acde97a39d35bfb03af2614c68176ad9afb71f53 +Author: Alan Coopersmith +Date: Mon Oct 24 20:28:32 2011 -0700 + + Add fallback implementation of strndup() + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + Linux test code fixed by: Keith Packard + +commit ed38c2648cf7cc04c1d03f8d14375815f6cf536e +Author: Alan Coopersmith +Date: Fri Oct 28 14:32:56 2011 -0700 + + Fix Sun compiler check that got turned around + + Since the check is for !(compilers that support __builtin_constant_p) + it needs to be !(gcc or new enough Sun cc), but was written as + !(gcc or too old Sun cc). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 7ee7fd1f4c72b2ab6dba0413e63dd2e8b95b2112 +Author: Alan Coopersmith +Date: Mon Oct 24 20:39:24 2011 -0700 + + Remove a couple Error() instances left behind by 09dbfcb0ad7b6c8 + + Two instances found in the SIOCGIFCONF code for listing network interfaces. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + Reviewed-by: Peter Hutterer + +commit e47aa9475027ed6a255daefec85561c6b15789bd +Author: Alan Coopersmith +Date: Mon Oct 24 23:40:45 2011 -0700 + + Enable memory checking during unit testing + + If configure is generated with xorg-macros 1.16.0 or newer, and + an appropriate memory checking library is found for the platform, + use it when running unit tests. If not, then no harm is done. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 36670065bd74b870d0da7c6a69a9c0d222b21706 +Author: Alan Coopersmith +Date: Tue Oct 25 00:12:48 2011 -0700 + + Don't require ld -wrap for tests that don't need it + + If configure is generated with xorg-macros 1.16 or later, this allows + builders to --enable-unit-test and run the tests other than the xi2 + tests which require ld -wrap (and are still wrapped in if HAVE_LD_WRAP + in tests/xi2/Makefile). If an older xorg-macros is used, the existing + behaviour is preserved of requiring ld -wrap for all unit tests, but + no side effects occur, so the minimum xorg-macros version is not raised. + + If unit testing is enabled without ld -wrap, then we create a bogus + "xi2-tests" script just to report that we're skipping them. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 0e6b88db7f2e94ccc8153a0e002d176440914e01 +Author: Alan Coopersmith +Date: Mon Aug 1 14:09:33 2011 -0700 + + Don't fallback to wsfb or fbdev on Solaris + + We don't ship either one, so don't waste time and make confusing log + entries trying to load them. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Daniel Stone + +commit 7b0f53f0a5824fcd81ef505beb3e19ac7c77961f +Author: Alan Coopersmith +Date: Wed Nov 23 10:50:13 2011 -0800 + + Fix Xdmx build on Linux to work with strlcpy changes + + Include strlcpy.c in the libdmxconfig.a library with the other functions + shared among the xdmx configuration programs. + + Also add a #include "os.h" to the scanner.l file that now calls strlcpy + to include the prototype from $(top_srcdir)/include/os.h. + + (To be squashed into + http://cgit.freedesktop.org/~alanc/xserver/commit/?id=c19f0ff5223d428f8ad2ab3c563c974c96a521ba + before next PULL request to avoid breaking bisection.) + + Signed-off-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 922c1d817091c7eedfb701f4d9eb4324e22ccca4 +Author: Gaetan Nadon +Date: Fri Nov 11 20:44:19 2011 -0500 + + docs: spell "X Server Version" consistently in titles. Add where missing. + + Reviewed-by: Alan Coopersmith + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 5952efa903d57ac69070f1477ce46223a2a7893c +Author: Keith Packard +Date: Sun Nov 20 13:07:33 2011 -0800 + + Bump version to 1.11.99.1 (1.12 development release 1) + + Signed-off-by: Keith Packard + +commit 795fbe3e6e440f023e52c452106f4c266c13d36c +Author: Keith Packard +Date: Sun Nov 20 13:33:12 2011 -0800 + + Add 'optionstr.h' to include/Makefile.am + + This makes sure it gets distributed + + Signed-off-by: Keith Packard + +commit 08ec4da6a7617637914bee1636858474213cf39d +Author: Julien Cristau +Date: Sat Nov 5 13:00:07 2011 +0100 + + Fix ShmPutImage for XYBitmap + + We can't call CopyArea in that case because the image has depth 1, which + might not match the target drawable, so we might overrun the shm + segment. Commit 11817a881cb93a89788105d1e575a468f2a8d27c apparently + fixed a similar bug for XYPixmap, but missed the bitmap case. + + Fixes: http://bugs.debian.org/629611 + + Thanks to Alan Curry for diagnosing this and providing a test case. + + Reported-and-tested-by: Alan Curry + Reviewed-by: Peter Harris + Signed-off-by: Julien Cristau + +commit 328074890eeb111950e984c6f618311983600b20 +Author: dtakahashi42 +Date: Fri Nov 18 11:30:22 2011 -0800 + + rootless: Fix a server crash when choosing a color with the gimp color wheel + + https://trac.macports.org/ticket/30927 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jeremy Huddleston + +commit 58864146fbdf1820d04825838691e84784ef91bc +Author: Ross Burton +Date: Wed Sep 28 11:46:02 2011 +0100 + + edid: Add quirk for Acer Aspire One 110 + + At least one revision of the AAO reports a 190x110mm maximum size but a + 451x113mm mode. + + X.Org Bug 41141 + + Signed-off-by: Ross Burton + Reviewed-by: Daniel Stone + Reviewed-by: Jeremy Huddleston + +commit 34b0e4eee911f8b09a3682a7f1b4c8598ef48b8d +Author: Chris Wilson +Date: Thu Aug 25 16:04:04 2011 +0100 + + dri2: Register the DRI2DrawableType after server regeneration + + The Resource database is reset upon regeneration and so the dri2 module + needs to re-register its RESTYPE for the drawable or else it will + clobber the next unsuspecting user of the database. Fortunately, DRI2 is + loaded late in the initialisation sequence and was last up until + xf86-video-intel started using the Resource database to track + outstanding swaps... + + Signed-off-by: Chris Wilson + Reviewed-by: Jeremy Huddleston + Tested-by: Paulo Zanoni + +commit bfa1a0dd190ed88020d60eba3bb04681c8e83a68 +Author: Chris Wilson +Date: Mon Jan 24 11:17:03 2011 +0000 + + DRI2: Avoid a NULL pointer dereference + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41211 + + Signed-off-by: Chris Wilson + Reviewed-by: Jeremy Huddleston + +commit eeb21a133b982f71de739baf62e53c8a68f5d495 +Author: Chris Wilson +Date: Mon Jan 24 11:17:03 2011 +0000 + + VidMode: prevent crash with no modes + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=17431 + + Signed-off-by: Chris Wilson + Reviewed-by: Jeremy Huddleston + +commit c1bb8f43b9290c2b18a9f0ac59773ff8f1eb974f +Author: Rami Ylimäki +Date: Tue Oct 4 12:25:26 2011 +0300 + + record: Prevent out of bounds access when recording a reply. + + Any pad bytes in replies are written to the client from a zeroed + array. However, record extension tries to incorrectly access the pad + bytes from the end of reply data. + + Signed-off-by: Rami Ylimäki + Reviewed-by: Erkki Seppälä + +commit 1f5baa924a5907978f564372265d9830ac72a077 +Author: Jeremy Huddleston +Date: Sun Oct 30 20:26:42 2011 -0700 + + xfree86: Deprecate the use of xf86PciInfo.h + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Tormod Volden + +commit eb3377ffb8a7baa26c9831e56ed782d48b28fa71 +Author: Jeremy Huddleston +Date: Tue Nov 1 14:59:15 2011 -0700 + + xfree86: Fix powerpc build with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast + + memType is a uint64_t on powerpc. Using memType only really makes + sense for *physical* addresses, which can be 64-bit for 32-bit + systems running on 64-bit hardware. + + However, unmapVidMem() only deals with *virtual* addresses, which + are guaranteed to fit into an uintptr_t. + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Mark Kettenis + +commit a551f126cc4af7a476d9c8fd0cb309d5aa600d54 +Author: Pierre-Loup A. Griffais +Date: Fri Nov 4 23:26:25 2011 -0700 + + xfree86: Fix RandR rotation across server generations + + 245cb8e94fd1599 fixed xf86RotateDestroy() to actually run its teardown + code, causing the Damage object to properly be re-allocated after a + server regeneration. However the block that does that still thinks the + Rotate layer BlockHandler is wrapped from the last generation, meaning + the shadow pixmap is never re-allocated and the Damage object is never + re-registered, causing a blank screen, and potentially a driver crash + on the next teardown after the server asks it to free a 0x0 Pixmap. + + Signed-off-by: Pierre-Loup A. Griffais + Reviewed-by: Aaron Plattner + Signed-off-by: Keith Packard + +commit bfa2a1857a1efda7f171f10e855d200ca0dbcc1a +Merge: f0d50cc e7cb8f8 +Author: Keith Packard +Date: Mon Nov 14 09:07:06 2011 -0800 + + Merge remote-tracking branch 'whot/for-keith' + +commit e7cb8f802adf6fc22e7a930c0dfc5c1076781c96 +Author: Peter Hutterer +Date: Wed Nov 9 15:31:57 2011 +1000 + + Xext: remove unused variable 'n' + + xselinux_ext.c: In function 'SELinuxSendItemsToClient': + xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] + + Signed-off-by: Peter Hutterer + Reviewed-by: Julien Cristau + +commit bb4aa1f263ad38c175bfda3b7e6c325260ce3f28 +Author: Peter Hutterer +Date: Wed Nov 9 15:31:10 2011 +1000 + + Xext: don't swap CARD8 in SProcSELinuxQueryVersion + + xselinux_ext.c: In function 'SELinuxSendItemsToClient': + xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] + xselinux_ext.c: In function 'SProcSELinuxQueryVersion': + xselinux_ext.c:532:62: error: call to 'wrong_size' declared with attribute + error: wrong sized variable passed to swap + xselinux_ext.c:533:62: error: call to 'wrong_size' declared with attribute + error: wrong sized variable passed to swap + + Signed-off-by: Peter Hutterer + Reviewed-by: Julien Cristau + +commit 35ec24cf245e5ef676e98a0bf7c77296a3f1ff63 +Author: Peter Hutterer +Date: Mon Aug 1 14:14:02 2011 +1000 + + input: replace remaining GetPairedDevice() with GetMaster() + + Wherever it's obvious which device we need (keyboard or pointer), use + GetMaster() instead of GetPairedDevice(). It is more reliable in actually + getting the device type we want. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit fc16917ad6f0d2722bfb5c5eeca955dd3bc4125a +Author: Peter Hutterer +Date: Fri Apr 15 13:32:10 2011 +1000 + + include: export GetProximityEvents and QueueProximityEvents + + This is mainly needed for consistency with GetPointerEvents and friend. + No-one seems to actually need this function from outside the usual DDXs. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit 11840595a1be9f2df7390bcc708cc176e60d3ef2 +Author: Peter Hutterer +Date: Thu Nov 3 08:58:58 2011 +1000 + + dix: Don't let a driver without a ProximityClassRec post events + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit 22715e465b415b3351b83b8279a4f44157f63199 +Author: Peter Hutterer +Date: Thu Oct 27 11:03:39 2011 +1000 + + Xi: allow passive keygrabs on the XIAll(Master)Devices fake devices + + They don't have a KeyClassRec, but we must still allow passive grabs on + them. + + Signed-off-by: Peter Hutterer + Tested-by: Bastien Nocera + Reviewed-by: Daniel Stone + +commit f0d50cc6651dce3a8a3cd3fb84210aa92b139763 +Author: Derek Buitenhuis +Date: Sun Nov 6 12:20:51 2011 -0500 + + Fix vesa's VBE PanelID interpretation + + xserver's VESA driver's VBE (Vesa BIOS Extensions) code + includes a PanelID probe, which can get a monitor's native + resolution. From this, using CVT formulas, it derives + horizontal sync rate and a vertical refresh rate ranges. + + It however, only derives the upper bounds of the ranges, and + the lower bounds cannot de derived. By default, they are set + to hardcoded constants which represent the lowest supported + resolution: 640x480. The constants in vbe.c however, were + not actually derived from forulas, but carried over from + other code from the bad old days, and are not relevant + to flat panel displays. This caused, for example, EEEPC701's + panel, with a native resolution of 800x480, to end up with + a upper bound of the horizontal sync rate that was lower + than the hardcoded lower bound, which of course broke things. + + These numbers have been rederived using both my own CVT tool + based on xf86CVTMode(), and using the provided 'cvt' tool + that comes with xserver. + + Signed-off-by: Derek Buitenhuis + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit c643c2b7bf480f5c27ff8606bda087f8bff3b154 +Author: Peter Hutterer +Date: Tue Nov 1 12:17:50 2011 +1000 + + xfree86: duplicate name and driver from pInfo for NewInputDeviceRequest + + xorg.conf devices had the name and driver set in the DDX's InputInfoPtr list + but not in the option list for those devices. That information was lost when + passing the options into NewInputDeviceRequest. NIDR then refused to start + the devices. + + Introduced in xorg-server-1.11.0-250-ge4cd24e + + Signed-off-by: Peter Hutterer + Tested-by: James Cloos + +commit 9cc44b955b27de33348d6a20bebc9704930ee18e +Author: Rui Matos +Date: Tue Nov 1 21:32:36 2011 +0000 + + randr: Make the RRConstrainCursorHarder logic the same as miPointerSetPosition + + The constraining logic in RRConstrainCursorHarder allows the cursor to reach + crtc positions of x = width and y = height while the constraining code in + miPointerSetPosition only allows it to reach x = width - 1 and y = height - 1 + for the analogous screen case. + + This patch makes the former's logic equivalent to the latter's which allows + applications to benefit from Fitts's law. E.g. a maximized application + adjacent to a crtc border wouldn't get pointer events if the user moved the + pointer all the way until it's contained. + + Signed-off-by: Rui Matos + Reviewed-by: Daniel Stone + Signed-off-by: Keith Packard + +commit 548c6fe044068ffba9b5306dc6b11f2ba22782a4 +Merge: 3881b0b ffe8ec8 +Author: Keith Packard +Date: Wed Nov 2 21:35:31 2011 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 3881b0bf1ce11a62473650bdf6ee01a1762f6f91 +Author: Gaetan Nadon +Date: Tue Nov 1 07:17:07 2011 -0400 + + mi: remove deprecated miPointerAbsoluteCursor from design doc + + Function was removed from the code by commit f5409aa026 + + Reviewed-by: Jeremy Huddleston + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit d91aa0e6601bdf3e2cfa57b3412ab14ac486edc4 +Merge: 8df3a9c 401150d +Author: Keith Packard +Date: Wed Nov 2 21:20:07 2011 -0700 + + Merge remote-tracking branch 'whot/two-screen-coordinates' + +commit 8df3a9ca5abbd56eb2013fa65250d21a8f18865b +Merge: 8329afa ef89548 +Author: Keith Packard +Date: Wed Nov 2 21:18:16 2011 -0700 + + Merge remote-tracking branch 'koba/reviewed' + +commit ffe8ec86db2655b2c83e5ae61521898140c855ac +Author: Colin Harrison +Date: Sat Oct 8 15:05:22 2011 +0100 + + hw/xwin: Fix a typo in ddraw.h + + Fix a (fortunately benign) typo in ddraw.h + + Signed-off-by: Jon TURNEY + +commit 48fda3c52b41157313b7fd56d9f3fa3ad4166ed7 +Author: Yaakov Selkowitz +Date: Thu Feb 18 20:37:00 2010 -0600 + + hw/xwin: Revert "Fix bug #5735, Serious flaw in CygwinX clipboard" + + This commit wreaks havoc with other programs which manage the clipboard, + such as MS Office Clipboard or Win32 VNC viewers: + + http://sourceware.org/bugzilla/show_bug.cgi?id=9910 + + This reverts commit 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec. + + Signed-off-by: Yaakov Selkowitz + Signed-off-by: Jon TURNEY + Reviewed-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 3ead1d810b0e157078db39712e02ea6dc85216d8 +Author: Jon TURNEY +Date: Sun Jul 3 19:10:52 2011 +0100 + + hw/xwin: Stop pretending we work on NT4 + + We already link directly to some functions not available in NT4, so stop + pretending we will work on NT4 and link directly to EnumDisplayMonitors() + and SHGetFolderPath() + + Also remove mentions of NT4 & Win95 from error messages + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit f6529a05a2f087cb57a7fe84f226fef3780728d0 +Author: Colin Harrison +Date: Sat Oct 8 14:39:07 2011 +0100 + + Xming: Always remove temporary file used when invoking xkbcomp on Win32 + + When built for native Win32, pipe() & fork() aren't available, so we + use a tempoary file and system() to invoke xkbcomp + + Ensure the temporary file is always removed. It was only being removed + on most errors, not on success :S + + Also fix a couple of warnings which occur when built with WIN32 defined + + Signed-off-by: Jon TURNEY + Reviewed-by: Jon TURNEY + +commit ee1985386700288af1a8b1789dcad0d7d9c97393 +Author: Jon TURNEY +Date: Sat Apr 16 23:28:45 2011 +0100 + + hw/xwin: Link directly to TrackMouseEvent() + + TrackMouseEvent has existed in user32 since at least NT4, so + don't bother with jumping through all the ancient compatibility hoops + of finding if _TrackMouseEvent() exists in comctl32 so it can check + if TrackMouseEvent() exists in user32 to see if it needs to emulate + it... + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit e2e6fab1efa6895256ac0ed4d5b054a88ad18077 +Author: Jon TURNEY +Date: Tue Mar 23 04:45:37 2010 -0500 + + Cygwin/X: Make default DPI match native DPI + + Make the default DPI match the current Windows DPI setting. If that + setting can't be retrieved, change the fallback DPI value from 75 dpi + to 96 dpi. + + Mark the application as dpiAware in the manifest, which prevents + dpi virtualization for high (>96) dpi values on Vista and later. + + Signed-off-by: Jon TURNEY + Signed-off-by: Yaakov Selkowitz + Reviewed-by: Colin Harrison + +commit 8329afa59dd5ea3adf7adebdb2111a9bccbb126b +Author: Aaron Plattner +Date: Mon Oct 31 15:01:12 2011 -0700 + + dix: Reinstate GetImage window size check + + Commit 587c3a2d1961834558193e8e14e8e381a077a253 fixed DoGetImage to + check windows against their backing drawables, rather than against the + screen dimensions, to prevent reading outside the bounds of redirected + windows' backing pixmaps (see bug #22804). Unfortunately, while + making that change I also removed the check that the rectangle is + contained within the bounds of the source window, which is a violation + of the specification: + + If the drawable is a window, the window must be viewable, and it + must be the case that, if there were no inferiors or overlapping + windows, the specified rectangle of the window would be fully + visible on the screen *and wholly contained within the outside + edges of the window* (or a Match error results). Note that the + borders of the window can be included and read with this request. + + (emphasis mine) + + Reinstate the window dimension check, to return BadMatch if the + GetImage request falls outside the bounds of the window. + + Fixes X Test Suite test XGetImage-15: + + 400|0 15 1 11:05:41|IC Start + 200|0 15 11:05:41|TP Start + 520|0 15 00005146 1 1|VSW5TESTSUITE PURPOSE 15 + 520|0 15 00005146 1 2|Assertion XGetImage-15.(A) + 520|0 15 00005146 1 3|When the drawable is a window and the window is viewable + 520|0 15 00005146 1 4|and it is not the case that given there were no inferiors or + 520|0 15 00005146 1 5|overlapping windows the specified rectangle of the window + 520|0 15 00005146 1 6|would be fully visible on the screen and wholly contained + 520|0 15 00005146 1 7|within the outside edges of the window, then a BadMatch + 520|0 15 00005146 1 8|error occurs. + 520|0 15 00005146 1 9|METH: Create window which is not fully visible on the screen. + 520|0 15 00005146 1 10|METH: Call XMapWindow to make sure the window is viewable. + 520|0 15 00005146 1 11|METH: Call XGetImage with rectangle extending beyond edge of screen. + 520|0 15 00005146 1 12|METH: Verify XGetImage return value is null. + 520|0 15 00005146 1 13|METH: Verify that BadMatch error occurred. + 520|0 15 00005146 1 14|METH: Create window which is fully visible on the screen. + 520|0 15 00005146 1 15|METH: Call XMapWindow to make sure the window is viewable. + 520|0 15 00005146 1 16|METH: Call XGetImage with rectangle extending beyond edge of window. + 520|0 15 00005146 1 17|METH: Verify XGetImage return value is null. + 520|0 15 00005146 1 18|METH: Verify that BadMatch error occurred. + 520|0 15 00005146 1 19|REPORT: Got Success, Expecting BadMatch + 520|0 15 00005146 1 20|REPORT: Null image not returned. + 220|0 15 1 11:05:41|FAIL + + Signed-off-by: Aaron Plattner + Reviewed-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit 132545ff576cc69ed63f5a08127151fe550de4c3 +Merge: d0c6732 d7c44a7 +Author: Keith Packard +Date: Sun Oct 30 16:57:58 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit d7c44a7c9760449bef263413ad3b20f19b1dc95a +Author: Peter Hutterer +Date: Mon Oct 24 12:00:32 2011 +1000 + + dix: block signals when closing all devices + + When closing down all devices, we manually unset master for all attached + devices, but the device's sprite info still points to the master's sprite + info. This leaves us a window where the master is freed already but the + device isn't yet. A signal during that window causes dereference of the + already freed spriteInfo in mieqEnqueue's EnqueueScreen macro. + + Simply block signals when removing all devices. It's not like we're really + worrying about high-responsive input at this stage. + + https://bugzilla.redhat.com/show_bug.cgi?id=737031 + + Signed-off-by: Peter Hutterer + Reviewed-by: Julien Cristau + +commit 820d9040f50a8440741b3aefbc069a3ad81e824e +Author: Servaas Vandenberghe +Date: Wed Aug 31 07:06:49 2011 +0200 + + xfree86: fix potential buffer overflow + + The patch below fixes a potential buffer overflow in xf86addComment(). + This occurs if curlen > 0 && eol_seen == 0 && iscomment == 0 , as + follows from the code: + + char *xf86addComment(char *cur, char *add) + + <...> + + len = strlen(add); + endnewline = add[len - 1] == '\n'; + len += 1 + iscomment + (!hasnewline) + (!endnewline) + eol_seen; + + if ((str = realloc(cur, len + curlen)) == NULL) + return cur; + + cur = str; + + if (eol_seen || (curlen && !hasnewline)) + cur[curlen++] = '\n'; + if (!iscomment) + cur[curlen++] = '#'; + strcpy(cur + curlen, add); + if (!endnewline) + strcat(cur, "\n"); + + Signed-off-by: Servaas Vandenberghe + Reviewed-by: Peter Hutterer + + [whot: added buffer overflow test case] + + Signed-off-by: Peter Hutterer + +commit 63e87b8639eb8e0b4e32e5d3a09099d31a03bbcd +Author: Peter Hutterer +Date: Tue Oct 25 11:49:26 2011 +1000 + + xfree86: reduce calls to input_option_get_key/value + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit d0c6732a99c9a7e40752b9ba7898a01c325103fa +Author: Anssi Hannula +Date: Wed Apr 20 14:34:52 2011 +0300 + + xfree86: add nouveau as the first automatic driver for NVIDIA hardware + + Add nouveau as the first driver on linux for NVIDIA hardware when + driver autoconfiguration is done, as it is more capable than nv. + + nv is also kept in the list as it is more widely supported and because + some old cards are not supported by nouveau. + + Signed-off-by: Anssi Hannula + Reviewed-by: Daniel Stone + Reviewed-by: Cyril Brulebois + Reviewed-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit ef895484c8a43d447d9d3ea7d4226936cc5f92cc +Author: Alexandr Shadchin +Date: Tue Oct 4 10:46:00 2011 +0600 + + bsd: alpha_video: Remove unused variables + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + +commit fea7c7a8c070ec17ec03e4cb193834b6ca72fb72 +Author: Alexandr Shadchin +Date: Mon Oct 3 23:03:31 2011 +0600 + + bsd: alpha_video: Simplify #include + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + +commit 93a3a28f2c1e95ea7fae6cf1c2fb50b30eae9c33 +Author: Alexandr Shadchin +Date: Tue Oct 4 00:45:09 2011 +0600 + + bsd: alpha_video: Function sethae() need only for FreeBSD + + Return value sethae() is becoming void because no caller used it. Also old + msb_set static checked by each caller is replaced by the p.hae static checked + in sethae() when it's called. + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + +commit 05b41e2dc60a0aefc685a33260e5d8e09580908b +Author: Alexandr Shadchin +Date: Tue Oct 4 17:20:13 2011 +0600 + + Move check definition MAP_FAILED in xf86_OSlib.h + + Also remove odd definition MAP_FAILED. + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + +commit af56e502f5ddf1d2d495b633734cadcb023b7c36 +Author: Alexandr Shadchin +Date: Tue Oct 4 16:49:22 2011 +0600 + + Remove odd definition DEV_MEM + + DEV_MEM defined in xf86_OSlib.h + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + +commit 0481e9d3d1e0dbc05099184128de5cd6f13445f7 +Author: Alexandr Shadchin +Date: Tue Oct 4 15:09:45 2011 +0600 + + Remove BSDi support + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + +commit 8838a86fd325cb7f262a582d22ccdaa8a8f1a534 +Author: Alexandr Shadchin +Date: Tue Oct 4 14:57:20 2011 +0600 + + Remove unused VT_SYSREQ_DEFAULT + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + +commit 91131037a2d2e07079de5d222d8a8c95300750cc +Author: Alexandr Shadchin +Date: Sat Oct 29 00:14:32 2011 +0600 + + Fix position _X_EXPORT + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 219bcec73d3554c57b87f28812ab06a66b739b19 +Author: Alexandr Shadchin +Date: Sat Oct 29 00:14:31 2011 +0600 + + bsd: Remove odd message about -sharevts + + This is missing in commit 'xfree86: move -novtswitch & -sharevts argument + handling up to common layer' + + Signed-off-by: Alexandr Shadchin + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit 005ab41986b0bb6a4e626aee7a7a542247f422e7 +Author: Dave Airlie +Date: Thu Oct 27 08:38:45 2011 +1000 + + test: fix two more failing FP3232 tests + + And put a comment in to explain why we're testing for a frac between .3 and + .6. We can't directly compare the frac since the floating/fixed point + conversion loses precision. + + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit 286fa9bf9b4ffb0f9dbd3f1cae46ddcb27ee9318 +Author: Jeremy Huddleston +Date: Tue Oct 25 23:53:43 2011 -0700 + + XWin: windowswm: Correct byte swapping in event notifications + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jon TURNEY + +commit dc054fefc586c5b404fe0f949dbd456e5267c647 +Author: Jeremy Huddleston +Date: Tue Oct 25 23:49:33 2011 -0700 + + XQuartz: appledri: Correct byte swapping in event notifications + + Signed-off-by: Jeremy Huddleston + +commit d5fee2b638fabeb8bec31a24e57d5c2a232d0893 +Author: Jeremy Huddleston +Date: Tue Oct 25 23:48:16 2011 -0700 + + XQuartz: applewm: Correct byte swapping in event notifications + + Signed-off-by: Jeremy Huddleston + +commit 5701ab4a441eb113abd0851b0d71b82d12112854 +Merge: 7d50211 a41214b +Author: Keith Packard +Date: Mon Oct 24 22:09:00 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit a41214bc9a0f326c6dc129e4a6382efb8b826862 +Author: Peter Hutterer +Date: Tue Oct 25 12:57:07 2011 +1000 + + kdrive: check for null memory, fix OOB + + If key/value allocation failed, don't bother adding another InputOption. And + make sure the memory allocated is large enough for the trailing \0 + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit ffe20acedb3cdc4811eb52f8fc540ba6af7339fa +Author: Peter Hutterer +Date: Thu Oct 20 16:42:20 2011 +1000 + + Use new FP1616/FP3232 conversion functions + + Signed-off-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + +commit 7500d841f4c709ae0edc6420332096d3b9ef9fcc +Author: Peter Hutterer +Date: Thu Oct 20 16:49:28 2011 +1000 + + test: fix test with new double -> fp3232 conversion functions + + Signed-off-by: Peter Hutterer + Tested-by: Dave Airlie + Reviewed-by: Dave Airlie + +commit 4bb5d8fae4f9a70f12591315f0b267a2ea826a0c +Author: Peter Hutterer +Date: Wed Oct 19 13:17:51 2011 +1000 + + Xi: send DeviceChangedEvents when the scroll valuators change value + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 1f4af6c12fb5d4c19f4eac3df768517c9132cc88 +Author: Peter Hutterer +Date: Wed Oct 19 12:28:37 2011 +1000 + + dix: accept a NULL master for CreateClassesChangedEvent + + If a floating device changes, the master is NULL but we must still create a + DCE for it. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit d77dec6971e4a0b306c8dbd5adf627908d7972cb +Author: Peter Hutterer +Date: Wed Oct 19 12:11:16 2011 +1000 + + Xi: ensure the deviceid for DeviceChangedEvents is always the right one + + If we're sending the event for a given device, make sure the deviceid is + that of the device. + This allows callers to use the same DCE for slave and master without having + to fiddle the DCE's internal fields. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit e9dee21fa3213bfe87b2b728a38eb41d3ba0e664 +Author: Peter Hutterer +Date: Tue Oct 18 17:47:59 2011 +1000 + + dix: pass the flags into the CreateClassesChangedEvent + + No effective functional changes, prep work for future patches. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit fcdd2587a17437b643b4592aa7f65d11c05a4cd8 +Author: Peter Hutterer +Date: Tue Oct 18 17:41:29 2011 +1000 + + dix: drop unused argument from XISendDeviceChangedEvent + + Instead of device and master (and just using master), drop the master + argument and let the callers pass in the device the event is to be sent for. + + No effective functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 8473e441b0f832775153281bc3df5e2d4feb2b36 +Author: Peter Hutterer +Date: Tue Oct 18 17:11:27 2011 +1000 + + dix: add ScrollInfo to DeviceChangedEvents + + 3304bbff9b4ed63f1a47410a5320a136420ba2c6 added smooth scrolling support for + pointer events and for XIQueryDevice but didn't add the matching parts to + XIDeviceChangedEvents. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit e3f6a76dd480717eae4b17ad8e2ff707de2ffe4c +Author: Andreas Wettstein +Date: Thu Aug 11 16:33:33 2011 +1000 + + xkb: Support noLock and noUnlock flags for LockMods + + These flags are required by the XKB spec section 6.3. + + Signed-off-by: Andreas Wettstein + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 6f33593dc087d367d899d1cb6e6e30b282d922e2 +Author: Peter Hutterer +Date: Fri Oct 21 09:09:55 2011 +1000 + + xfree86 doc: replace driver "keyboard" with "kbd" + + We've deprecated keyboard a long time ago + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + +commit e4cd24e717ef1059804b3f6bb483810b708cd56a +Author: Peter Hutterer +Date: Fri Aug 5 14:48:02 2011 +1000 + + xfree86: use NewInputDeviceRequest for xorg.conf devices too + + Only use one init path for input devices - through NIDR. + + This requires that inp_driver and inp_identifier from the + XF86ConfInputRec are copied over into the options for NIDR to see them. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 1ecc427a39d41e723912492b846512fd0ad9af2d +Author: Peter Hutterer +Date: Wed Aug 10 14:37:41 2011 +1000 + + dix: move #if statement to stop compiler warning + + ptrveloc.c: In function 'QueryTrackers': + ptrveloc.c:598:34: warning: variable 'used_offset' set but not used + [-Wunused-but-set-variable] + + used_offset is used, but only in the debugging code. Move the #if statement + to ignore that warning. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Daniel Stone + +commit f9067c1dd8ce9058eb48a20dfae52bc8cf3a1e55 +Author: Peter Hutterer +Date: Fri Aug 5 14:05:58 2011 +1000 + + xfree86: Fix a comment, the old function doesn't exist anymore + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Daniel Stone + +commit aeab26e9e1751e1e3514798fa53e9bd604b0d254 +Author: Peter Hutterer +Date: Wed Aug 10 15:58:34 2011 +1000 + + xfree86: use xf86AddNewOption instead of xf86addNewOption + + The former strdups for us. If the strdup fails we miss out on the + CorePointer option (default on anyway) and we're likely to fall over soon + anyway, so let's pretend this is the same behaviour. + + Signed-off-by: Peter Hutterer + Reviewed-by: Alan Coopersmith + Reviewed-by: Daniel Stone + +commit c39c8d34282b82d73c3c69a16cf0c2816256d85b +Author: Peter Hutterer +Date: Wed Aug 10 14:38:58 2011 +1000 + + input: switch InputOption to use XF86OptionRec storage. + + Use the same struct for both InputOption and XF86OptionRec so we don't need + to convert to and fro the two in the config backends. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + Reviewed-by: Daniel Stone + +commit 16ac78a53c1edeae183db8672104587b306cfe13 +Author: Peter Hutterer +Date: Tue Oct 25 11:40:58 2011 +1000 + + kdrive: switch to new InputOption API. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 7d50211ab57a35910d79fc3f67ae89aff91fa995 +Author: Christopher Yeleighton +Date: Mon Oct 24 18:47:06 2011 -0700 + + Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2 + + https://bugs.freedesktop.org/show_bug.cgi?id=38420 + + Exit with fatal error message, not segfault. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit d9d3a01ffca5e2de650d098231e16205781804c5 +Merge: 17416e8 fb55f8f +Author: Keith Packard +Date: Mon Oct 24 18:12:23 2011 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 17416e88dcfcc584fe5f87580d5d2b719b3521c3 +Author: Dave Airlie +Date: Thu Oct 20 14:43:01 2011 +0100 + + xf86Crtc: handle no outputs with no modes harder. + + If you started an X server with no connected outputs, we pick a default + 1024x768 mode, however if you then ran an xvidmode using app against that + server it would segfault the server due to not finding any valid modes. + + This was due to the no output mode set code, only adding the modes to the + scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would + get called and remove all the modes and we'd end up with 0. + + This change fixes xf86SetScrnInfoModes to always report a scrn mode of at + least 1024x768, and pushes the initial configuration to just call it instead + of setting up the mode itself. + + Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926 + + I've seen other bugs like this on other distros so it might also actually fix them. + + Signed-off-by: Dave Airlie + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit fb55f8f790f69f30b0ab18648c337bde9d41f5ff +Author: Jeremy Huddleston +Date: Mon Oct 24 16:45:36 2011 -0700 + + XQuartz: Fix the filename of our log file + + Signed-off-by: Jeremy Huddleston + +commit 1c8bda798b4480bab0f0da6f531e4770c7a1f771 +Author: Jeremy Huddleston +Date: Fri Oct 21 10:27:16 2011 -0700 + + XQuartz: appledri: Allow byte swapped requests + + Even though it's only valid when local, it is possible for a local + client and the server to not match endianness, such as when running + a ppc application under Rosetta. + + Signed-off-by: Jeremy Huddleston + +commit 14205ade0c750191bf43fba8bd55c65dba912cf4 +Author: Jeremy Huddleston +Date: Thu Oct 20 22:34:44 2011 -0700 + + XQuartz: appledri: Fix byte swapping in replies + + Even though it's only valid when local, it is possible for a local + client and the server to not match endianness, such as when running + a ppc application under Rosetta. + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit 2ba0ac202ad64eb4a555715980ba538de19c9fd7 +Author: Jeremy Huddleston +Date: Thu Oct 20 22:23:07 2011 -0700 + + XQuartz: appledri: Set the correct reply length for XAppleDRICreatePixmap + + http://xquartz.macosforge.org/trac/ticket/508 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit e4f257748b51d041275a64b8be408729ea05fbb5 +Author: Jeremy Huddleston +Date: Thu Oct 20 11:35:54 2011 -0700 + + XQuartz: appledri: Change whitespace in appledristr.h to match mesa + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit 83fef4235db86343477b4ec9858c6ba35e1aa7d9 +Author: Jeremy Huddleston +Date: Sun Oct 16 02:12:38 2011 -0700 + + Xnest: Match the host's keymap + + This was a regression. + + Introduced by: 08363c5830bdea34012dcd954b45ccfdc79a3a7e and + 32db27a7f867b503c2840ca7b815e96d10be9210 + Masked by: 1e69fd4a60147287b31e53bfc61543fb17bb82c8 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit 4597ac6fe0580323860080dae2576733acc49757 +Author: Jeremy Huddleston +Date: Mon Oct 17 23:45:32 2011 -0700 + + test: Add unit test for mieq + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Peter Hutterer + +commit ad450d76e468cd62406c4f09e71e131f7ff4555c +Author: Jeremy Huddleston +Date: Mon Oct 17 21:16:37 2011 -0700 + + mieq: Reserve some space in EQ for release and other special events + + The last 64 events in the event queue will be reserved for release + events in order to help return the system to a cleaner state when + it comes back from a soft wedge. + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Peter Hutterer + +commit 7d153f25be678acf500236ae422b33d17e6cb7a6 +Author: Jeremy Huddleston +Date: Sat Oct 15 22:51:30 2011 -0700 + + mieq: Provide better adaptability and diagnostics during mieq overflow + + This patch changes from a static length event queue (512) to one that + starts at 128 and grows to 4096 as it overflows, logging each time it + grows. + + This change also allows for multiple backtraces to be printed when the + server is wedged rather than just one. This increased sampling should + help identify the true hog in cases where one backtrace might be + insufficient. + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Peter Hutterer + +commit 09eaa1f6f19f9a85a3cb74a18ac898162db451df +Author: Jeremy Huddleston +Date: Sat Oct 30 14:55:06 2010 -0700 + + configure.ac: Add -fno-strict-aliasing to CFLAGS + + This should force the server to have -fno-strict-aliasing even once it + is removed from the warning flags. + + See: https://bugs.freedesktop.org/show_bug.cgi?id=31238 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Gaetan Nadon + +commit a046d649e4c7e4d28f350382dcdd293e92a59aad +Author: Jeremy Huddleston +Date: Wed Oct 5 15:02:52 2011 -0700 + + test: Silence some debug lines from the input unit tests + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Peter Hutterer + +commit 8db554d2d830953de3c6d0cbf58e23d53d89009f +Author: Jeremy Huddleston +Date: Thu Oct 20 14:28:56 2011 -0700 + + Xnest: Fix DestroyNotify handler + + This partially reverts the unwanted changes that crept into + c13a48e74ec89eafa9b529a87253a631ef02f2e2 + + Reported-by: Julien Cristau + Signed-off-by: Jeremy Huddleston + Reviewed-by: Julien Cristau + +commit ff61592441916b83aeb778c74352bb5b26247f84 +Merge: af3f64f 525d417 +Author: Keith Packard +Date: Wed Oct 19 19:14:32 2011 -0700 + + Merge remote-tracking branch 'aplattner/for-master' + +commit af3f64fb77c13180e513ee99d1fd9a1b624fd8ea +Merge: 15bbdc1 df0dd36 +Author: Keith Packard +Date: Wed Oct 19 17:33:07 2011 -0700 + + Merge remote-tracking branch 'hramrach/pull' + +commit 15bbdc103b34b6b374815698946e6c409421a644 +Merge: a5266dc 323869f +Author: Keith Packard +Date: Wed Oct 19 17:26:50 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit a5266dcb3a60587e1877f90c18552baf60b597a0 +Author: Ville Syrjala +Date: Sun Oct 9 01:11:04 2011 +0300 + + composite: Update borderClip in compAllocPixmap() + + Previously the parent constrained borderClip was copied over + when compRedirectWindow() is called. That is insufficient eg. in + case the window was already redirected, but not yet realized. So + copy the borderClip over in compAllocPixmap() instead. + + Example: + Window 1 is below an automatically redirect window 2. Window 2 is + unmapped and moved outside the extents of window 1. Window 2 is + then mapped again, and MarkOverlappedWindows() uses the up to + date borderSize of window 2 to mark windows, which leaves + window 1 unmarked. Then exposures are calculated using the stale + borderClip of window 2, which causes the window below window 2, + to be exposed through an apparent hole in window 1. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22566 + + Signed-off-by: Ville Syrjala + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit e4787ec20b1b9d30fe00f17b60eb0898190bf77d +Author: Gaetan Nadon +Date: Mon Oct 17 15:08:14 2011 -0400 + + XWinrc.man: fix warning: tab character in unquoted macro argument #35054 + + Spaces or tabs do not affect the text output layout. + + Reviewed-by: Jeremy Huddleston + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 321873f8045139edd47b526a765f8b1c66f53cd4 +Author: Gaetan Nadon +Date: Mon Oct 17 15:08:13 2011 -0400 + + xorg.conf.man: fix 382: warning: missing `)' (got `R') #35054 + + http://www.gnu.org/software/groff/manual/html_node/Man-usage.html + + Reviewed-by: Alan Coopersmith + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 3e145d3d67b472cb5d74cb8078b614160c4722b7 +Author: Jesse Barnes +Date: Thu Oct 13 12:01:10 2011 -0700 + + crtc: match full preferred modes if possible when choosing an initial config + + It's fairly common to have multiple, identical monitors plugged in. In + that case, it's preferable to run the monitor's preferred mode on each + output, rather than just matching the width & height and end up with + different timings or refresh rates. + + Signed-off-by: Jesse Barnes + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 525d4172b246e13b8122e059e3b22866e00561d9 +Author: Chris Wilson +Date: Sun Sep 4 09:34:08 2011 -0700 + + render: export TriStrip and TriFan to the drivers + + Rather than perform an intermediate copy and expand the strip and the + fan into a triangle list (thereby tripling the number of edges that the + driver needs to process), allow the backend to hook directly into the + appropriate Composite function. + + In order to extend the PictureScreen, without needlessly bumping the + ABI, we move the existing copy implementations to mipict.c and assign + those by default. To notify the ddx that the new entry points are + available, we introduce PICTURE_SCREEN_VERSION. + + Signed-off-by: Chris Wilson + Reviewed-by: Aaron Plattner + +commit 9b26e6bc8d2cdf5bac3025796855ccf05972358f +Author: Luc Verhaegen +Date: Tue Aug 23 15:19:59 2011 -0700 + + randr: stop clients from deleting immutable output properties + + Immutable in randr means that clients are not able to alter the + property itself, they are only allowed to alter the property value. + This logically means that the property then should not be deleted + by the client either. + + Signed-off-by: Luc Verhaegen + Reviewed-by: Rami Ylimäki + Reviewed-by: Aaron Plattner + Signed-off-by: Aaron Plattner + +commit c8413362049cee8c30e0a9d67f78f9ebefe8e71f +Merge: 64d2d1b b67581c +Author: Keith Packard +Date: Tue Oct 18 07:45:24 2011 -0700 + + Merge remote-tracking branch 'herrb/master' + +commit b67581cf825940fdf52bf2e0af4330e695d724a4 +Author: Matthieu Herrb +Date: Mon Oct 17 22:27:35 2011 +0200 + + Fix CVE-2011-4029: File permission change vulnerability. + + Use fchmod() to change permissions of the lock file instead + of chmod(), thus avoid the race that can be exploited to set + a symbolic link to any file or directory in the system. + + Signed-off-by: Matthieu Herrb + Reviewed-by: Alan Coopersmith + +commit 6ba44b91e37622ef8c146d8f2ac92d708a18ed34 +Author: Matthieu Herrb +Date: Mon Oct 17 22:26:12 2011 +0200 + + Fix CVE-2011-4028: File disclosure vulnerability. + + use O_NOFOLLOW to open the existing lock file, so symbolic links + aren't followed, thus avoid revealing if it point to an existing + file. + + Signed-off-by: Matthieu Herrb + Reviewed-by: Alan Coopersmith + +commit df0dd36deea0c756819825113e825059ddd19243 +Author: Michal Suchanek +Date: Sat Oct 8 14:26:24 2011 +0200 + + Do not uselessly reload modules in DuplicateModule + + The function does not initialize the module so it has no business + loading it. If some user of DuplicateModule expects a module actually + loaded they should use LoadModule. + + Signed-off-by: Michal Suchanek + Reviewed-by: Peter Hutterer + +commit 24d435163eb5fbd9b73cd8ba13a9b3cdbbe8a1df +Author: Michal Suchanek +Date: Sat Oct 8 14:19:34 2011 +0200 + + Use UnloadModuleOrDriver for UnloadSubModule. + + Signed-off-by: Michal Suchanek + Reviewed-by: Peter Hutterer + +commit 0d4bb5442ceb8e8e4a8de6cfc4203cae469eee72 +Author: Michal Suchanek +Date: Sat Oct 8 14:13:33 2011 +0200 + + Unload submodules. + + Signed-off-by: Michal Suchanek + Reviewed-by: Peter Hutterer + +commit b04aff76ac2eb461c71b85525a00e25efb8bf267 +Author: Michal Suchanek +Date: Thu Oct 13 17:14:53 2011 +0200 + + Document -background none option + + Document option introduced in commit 8976e97. + + Signed-off-by: Michal Suchanek + Reviewed-by: Jeremy Huddleston + Reviewed-by: Alan Coopersmith + +commit 323869f3298cbbfe864af9404a8aed1bf7995d79 +Author: Tomáš Trnka +Date: Tue Oct 11 09:11:18 2011 +0200 + + Fix drain_console unregistration + + Bug introduced by 9dca441670d261a9a9fb6108960ed48f3d58fb7f + xfree86: add a hook to replace the new console handler. + + console_handler was not being set, making the server eat up CPU spinning + in WaitForSomething selecting consoleFd over and over again, every time + trying to unregister drain_console without success due to + console_handler being NULL. + + Let's just fix the unregistration in xf86SetConsoleHandler() and use that. + + But wait, there could be a catch: If some driver replaced the handler using + xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister + that one. I don't understand Xorg well enough to know whether this poses a + problem (could mess up driver deinit somehow or something like that). As it is, + xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which + handler is currently registered). + + I had been using it for two days on my machine that previously hit 100% CPU + several times a day. That has now gone away without any new problems appearing. + + Signed-off-by: Tomas Trnka + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 2cb63180fa9b54f763e7e92e433943e3e73741f3 +Author: Peter Hutterer +Date: Wed Oct 5 12:08:31 2011 +1000 + + dix: mark motion events as emulated if we're scrolling from button press + + The protocol requires that the emulated event is marked as such. So if a + driver with smooth scrolling axis sends legacy button events, the motion + event must be marked as emulated. + + Pass the real type to emulate_scroll_button_events and create the events + accordingly. For real button press or relase events, only that event must be + generated since a release event will follow or a press event has already + occured, respectively. (This fixes a bug where we'd get two release events + for each legacy button event) + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 82c60232c07f50774ccc0198950f64c9338057a5 +Author: Peter Hutterer +Date: Fri Sep 30 10:59:47 2011 +1000 + + dix: add valuator_mask_fetch_double() + + Using this call simplifies callers that don't know if the mask bit is set. + + Before: + if (valuator_mask_isset(mask, valnum)) + value = valuator_mask_get_double(mask, valnum)); + else + value = someothervalue; + + Now: + if (!valuator_mask_fetch_double(mask, valnum, &value)) + value = someothervalue; + + Signed-off-by: Peter Hutterer + Reviewed-by: Chase Douglas + Reviewed-by: Daniel Stone + +commit 64d2d1bef14c7ec7156bb3aae64eff69f9f7be54 +Merge: fb84be4 679c84b +Author: Keith Packard +Date: Mon Oct 17 14:36:34 2011 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit fb84be47db7cdaff406792c08e34670e8e0cbda9 +Merge: fae7ed6 32b289e +Author: Keith Packard +Date: Mon Oct 17 13:50:25 2011 -0700 + + Merge remote-tracking branch 'whot/next' + +commit 679c84bce9b03c17aa35fa69058e7e46267dbc7b +Author: Jeremy Huddleston +Date: Sat Sep 24 00:01:11 2011 -0700 + + Bump ABI_VIDEODRV_VERSION to 12 + + The ABI changed in the previous series of changes, so bump the ABI version for + the next release. + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit a89cdcee4ebab6bbfa9ace94e1988a94cfb67087 +Author: Jeremy Huddleston +Date: Sun Oct 9 02:59:12 2011 -0700 + + xfree86: Deprecate xf86MapVidMem and friends + + Drivers should transition over to using libpciaccess's instead. + + Signed-off-by: Jeremy Huddleston + +commit 41d903918a5721e53ed694880eab44170f9717cc +Author: Jeremy Huddleston +Date: Wed Sep 14 13:45:18 2011 -0500 + + xorg-server.pc.in: Remove libpciaccess and pixman-1 from Requires + + Every module building against xorg-server does not *Require* pixman nor + libpciaccess. If such modules need pixman or pciaccess, they should be + depending on them directly rather than inheriting a dependency from + xorg-server. To do this, they should use PKG_CHECK_MODULES in configure.ac + to check for pixman-1 or pciaccess and include the apporpriate _LIBS variable + to the appropriate _LDFLAGS variable in Makefile.am + + This also moves pixman-1 to Requires.private, so CPPFLAGS is set right to + to satisfy include dependencies but avoid linking needlessly. + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Gaetan Nadon + +commit 40d338e9f723c4b3d63516aa62fdcded4d8af75e +Author: Jeremy Huddleston +Date: Wed Sep 14 10:37:38 2011 -0500 + + darwin: configure: Force some irrelevant options to off on darwin + + This removes the need to pass the following to configure on darwin: + --disable-pciaccess -disable-int10-module --disable-vbe --disable-vgahw --disable-libdrm + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit 43d730c0e4b1a00b29843c0660dcc7c60da6725d +Author: Jeremy Huddleston +Date: Wed Sep 14 15:42:19 2011 -0500 + + xfree86: Link modules with -module + + This makes a difference on darwin (and apparently nowhere else) + + https://www.gnu.org/s/libtool/manual/libtool.html#Modules-for-libltdl + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: Gaetan Nadon + +commit f7edc00a2af83764910ff89514a046dc5ce2ff9e +Author: Jeremy Huddleston +Date: Wed Sep 14 12:14:56 2011 -0500 + + xfree86: fbdevhw: Remove unused include of pciaccess.h + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit 6817050f3196d460ba03a62da23fb46ffd5a0f97 +Author: Tiago Vignatti +Date: Tue Jun 1 13:05:47 2010 +0300 + + configure: wrap PCI code with macro and set it at build time + + --disable-pciaccess, used together with --disable-module-int10, can be used to + disable all pci code inside the server. + + Note that XSERVER_LIBPCIACCESS was previously used only in the driver side and + now it defines also whether the library is used inside the server. Also, + XORG_BUS_PCI automake variable is introduced to track PCI code needs. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + +commit 5c12399b6c3a8def2df1bdde1d5d4d8d9e31fd84 +Author: Tiago Vignatti +Date: Mon May 31 19:27:07 2010 +0300 + + configure: make PCI configuration more sane + + No semantical changes. Just moved code around, grouping PCI related stuff in a + single chunk. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + +commit a319e9e697faa0faa241e0e9baf0bc41efdcdf8f +Author: Tiago Vignatti +Date: Mon May 31 18:50:50 2010 +0300 + + configure: change PCI function checking by a meaningful version of the library + + People that don't want VGA arbiter active can go to the library and enable the + stubs there. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + +commit b3ca84430d98f5338b9b1bc817c3656efb71cff1 +Author: Jeremy Huddleston +Date: Tue Sep 13 15:32:16 2011 -0500 + + xfree86: Work around issue where ar may be told to make an archive with no contents + + Automake: + + "Be careful when selecting library components conditionally. Because building + an empty library is not portable, you should ensure that any library + always contains at least one object." + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Gaetan Nadon + +commit e8bafb9d8c7d7a7077e163ecfac6174356989bbf +Author: Jeremy Huddleston +Date: Tue Sep 13 15:38:45 2011 -0500 + + xfree86: Add stubs for os-support to help adding new architecture support + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jamey Sharp + Reviewed-by: Gaetan Nadon + +commit 342f3eac8460fc48cfad1f1d7be939d671e6e1cd +Author: Adam Jackson +Date: Tue May 10 19:00:02 2011 -0400 + + int10: Port internal users off xf86MapVidMem + + This API is apparently semi-deprecated even by XFree86 standards, and + there are only four drivers left using it. Let's start chopping it off. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + +commit 7757b8092474c4f4ec04f4ebd1272236416154c3 +Author: Adam Jackson +Date: Tue May 10 17:34:23 2011 -0400 + + pci: Remove xf86MapDomainMemory + + This is slightly draconian, but that API is just awful. In all but + one case in the callers it's used to get a map of some legacy VGA + memory, and it would be cleaner for the caller to just call + pci_device_map_legacy. + + The sole exception is in the vesa driver, which uses it to avoid having + to look up which device the BAR belongs to. That's similarly trivial to + fix. + + Having done that, Linux's PCI layer is now very small indeed. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + +commit 6f5041d0b8e11e761d6403f1f8f8bb2ba2a9626d +Author: Adam Jackson +Date: Tue May 10 18:04:10 2011 -0400 + + int10: Use pciaccess rom fetch for !PC machines + + ... instead of rolling our own, badly. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 492ed3e53b0ee6746bd4b597978fd866d4a89ef6 +Author: Adam Jackson +Date: Tue May 10 16:41:08 2011 -0400 + + pci: Deprecate the PCITAG type + + It is kept around to help drivers through the API transition and will be + removed at some point in the future. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit a248fa3a33cb015942386d52b7faa8558e592a51 +Author: Adam Jackson +Date: Fri Jan 7 17:20:15 2011 -0500 + + xfree86: Remove unused bios_devmem.c + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit aa0bfb0f133481c57762012e8e30c05ffa151423 +Author: Adam Jackson +Date: Fri Jan 7 16:57:15 2011 -0500 + + linux: Remove ia64 domain I/O support code + + pciaccess handles this now. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 95b6935637628ffa511f39004e90c75aa75141c4 +Author: Adam Jackson +Date: Fri Oct 16 16:09:56 2009 -0400 + + linux: Remove pre-2.6 PCI interface support + + If you haven't ported 2.6 to your architecture in the intervening seven + years, you can keep running older servers. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 769f583783d17ffa3398bc8529f61e0f08b35530 +Author: Adam Jackson +Date: Fri Oct 16 14:05:54 2009 -0400 + + bus: remove some dead struct fields + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit dd72b3c1f1df57215329aa5ba9e9bb9ad0a65086 +Author: Adam Jackson +Date: Mon Sep 20 11:42:11 2010 -0400 + + linux: Use pci_device_get_parent_bridge instead of open-coding it + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 858fbbb40d7c69540cd1fb5315cebf811c6e7b3f +Author: Adam Jackson +Date: Fri Sep 16 13:33:04 2011 -0400 + + pci: Port xf86MapLegacyIO to pciaccess + + Per-domain I/O is now something drivers must manually request, and must + keep track of within their own state rather than in the ScrnInfoRec. + It's not really possible to split that into two steps without an + additional intermediate ABI break, so don't even try. Drivers that want + source compatibility should ifdef on the presence of xf86UnmapLegacyIO. + + As a fringe benefit, domain-aware I/O is now OS-independent, relying + only on support in pciaccess. Simplify OS PCI setup to reflect this. + + The IOADDRESS type is kept around to help drivers through the API + transition and will be removed at some point in the future. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 6d9efdce0d06df6b85f0681bea306c0b1e851502 +Author: Adam Jackson +Date: Tue Sep 20 18:12:29 2011 -0400 + + vgahw: Port to pciaccess IO space routines + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 4bd6579188e718654c35f95623fd4772f9e0ef06 +Author: Adam Jackson +Date: Thu Sep 22 13:45:57 2011 -0400 + + vgahw: Don't default to standard (port space) access routines + + In fact, don't default to anything; drivers must explicitly say which + kind they want, and they are strongly encouraged to do MMIO if possible. + This is an ABI change in that drivers that don't will crash, but drivers + that are explicit will work with both old and new servers. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 30fb334d218f8c1d809f88054b9fe8f5f556bb62 +Author: Adam Jackson +Date: Thu Sep 22 13:44:53 2011 -0400 + + vgahw: Remove IO domain setup + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 51a5558beb71bddeff9352ef4f43269a8a22317d +Author: Adam Jackson +Date: Sat Sep 18 08:24:19 2010 -0400 + + int10: Port to pciaccess' legacy IO API + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit c0b63ff88a6dc20f86141aa1a1ed5a9384aa63aa +Author: Adam Jackson +Date: Sat Sep 18 08:05:11 2010 -0400 + + xfree86: Move xf86GetClocks to vgahw + + This is really a vga-specific hack anyway. The only modern driver that + uses it is trident, but it's already loaded vgahw by the time it would + call xf86GetClocks. + + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + +commit 1433103a49b97e356da0f20aa65046cdb2f5ece6 +Author: Dave Airlie +Date: Wed Oct 12 09:59:38 2011 +0100 + + test: fix input test + + The test was memsetting the wrong thing, this fixes make check in my tinderbox. + + Signed-off-by: Dave Airlie + Reviewed-by: Daniel Stone + Reviewed-by: Jeremy Huddleston + +commit f9c6903d4a90b59c328f4fa05d2be9e0ce1c5189 +Author: Jeremy Huddleston +Date: Wed Oct 5 15:02:52 2011 -0700 + + dix: add utility functions for double to/fro FP1616/FP3232 conversion + + Co-authored-by: Jeremy Huddleston + Signed-off-by: Peter Hutterer + Reviewed-by: Peter Hutterer + Reviewed-by: Jeremy Huddleston + Reviewed-by: Mark Kettenis + +commit 401150d7dcad08be7c1f07e076f810cd61e2105c +Author: Peter Hutterer +Date: Tue Oct 4 11:41:17 2011 +1000 + + input: change pointer screen crossing behaviour for multiple ScreenRecs + + miPointerSetPosition traditionally took coordinates on a per-screen basis, + triggering a screen switch when these went out-of-bounds. For absolute + devices, this prevented screen crossing in the negative x/y direction. + + This patch changes the event generation patch to handle screen coordinates + in a desktop range (i.e. all screens together). Screen switches are + triggered when these coordinates are not on the current screen. + + This unifies the pointer behaviour of single ScreenRec multihead and + multiple ScreenRecs multihead in that the cursor by default moves about the + whole screen rather than be confined to one single screen. The + transformation matrix may then be used to actually confine the cursor to the + screen again. + + Note: fill_pointer_events has to deal with several different coordinate + systems. Make sure you read the comment before trying to understand the code. + + Signed-off-by: Peter Hutterer + +commit 6bd0eff40fae1e5d8fed28751851eb5b932d131b +Author: Peter Hutterer +Date: Wed Oct 12 15:53:57 2011 +1000 + + dix: extend rescaleValuatorAxis to take a minimum default + + Allow rescaling to non-zero based axis ranges as default (for when screen + offsets are non-zero). Currently unused. + + Signed-off-by: Peter Hutterer + +commit 8bebb4b4896d8b6ba3309b5b28fce883bb9f8a96 +Author: Peter Hutterer +Date: Wed Sep 7 14:04:10 2011 +1000 + + Store desktop dimensions in screenInfo. + + For Zaphod mode screen crossing handling we need to know the size of all + screens together (i.e. the whole desktop size). Store that in the screenInfo to + have it readily available in events. + + Signed-off-by: Peter Hutterer + +commit 9cbfa4739a51e4cc6b8094833928bf8678f63876 +Author: Peter Hutterer +Date: Tue Sep 6 15:55:19 2011 +1000 + + xfree86: remove xf86XInputSetScreen + + Keeping track of which screen the pointer within the input driver is + obsolete now. To bind to a screen, use the transformation matrix instead. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit 09dbfcb0ad7b6c8bac94502f2801e82f2a2ef435 +Author: Jeremy Huddleston +Date: Tue Oct 11 17:37:44 2011 -0700 + + os: Remove Error() + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Peter Hutterer + +commit db30615bcb3b872475e7d40eeee8cdda5b723078 +Author: Jeremy Huddleston +Date: Mon Oct 10 12:16:31 2011 -0700 + + Xephyr: Remove socket and its lock file on exit + + https://bugs.freedesktop.org/show_bug.cgi?id=11484 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Mikhail Gusarov + +commit c13a48e74ec89eafa9b529a87253a631ef02f2e2 +Author: Jeremy Huddleston +Date: Mon Oct 10 12:09:39 2011 -0700 + + Xnest: Remove socket and its lock file on exit + + https://bugs.freedesktop.org/show_bug.cgi?id=11484 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Mikhail Gusarov + +commit 32b289e46cc2d5ec32ff0c4ba5bbfbf602afb388 +Author: Peter Hutterer +Date: Mon Oct 3 13:58:01 2011 +1000 + + dix: move MD last.valuator update into fill_pointer_events + + Don't update the MD where it's not expected, positionSprite should really + just do that - position the sprite. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 3b36fd1b49030ead44358945f62e5abe7f4609ce +Author: Peter Hutterer +Date: Mon Oct 3 13:10:53 2011 +1000 + + mi: switch miPointerSetPosition to take doubles + + Don't switch between doubles and ints in the caller, instead take doubles in + miPointerSetPosition and do the conversion there. For full feature we should + change everything down from here for doubles too. + + Functional change: previously we'd restore the remainder regardless of + screen switching/confinement (despite what the comment said). Now, + screen changing or cursor constraints will cause the remainder be clipped + off. This should happen for cursor constraints but arguably not for screen + crossing. + + This also corrects a currently wrong comment about miPointerSetPosition's + input coordinates. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d +Author: Peter Hutterer +Date: Mon Oct 3 12:49:49 2011 +1000 + + mi: return the screen from miPointerSetPosition + + miPointerSetPosition may switch screens. Always return the screen the sprite + is on instead of relying on callers to call miPointerGetScreen(). + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit 88dfe5366d9855e0ebf8bbff74967b793ede57d1 +Author: Peter Hutterer +Date: Mon Oct 3 12:37:28 2011 +1000 + + dix: drop screen argument from positionSprite + + We can just get this in the function, no effective functional changes. + + Also return the screen to the caller. Though we don't use it yet, we will in + a follow-up patch. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit 967bc25da221a69c8fc390253465145ce534fcb9 +Author: Peter Hutterer +Date: Mon Oct 3 11:42:08 2011 +1000 + + dix: move screen- to device coordinate scaling to separate function + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit b059e06e19ac9417ceeb8be58c1c91b159291865 +Author: Peter Hutterer +Date: Mon Aug 29 12:36:26 2011 +1000 + + dix: don't allow keyboard devices to submit motion or button events. + + GPE unconditionally dereferences pDev->valuator if a mask is present. This + shouldn't really happen but if it does, don't crash, just ignore the events + with an error. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit bccff533184a051b614a26304ce77ad30bede5e0 +Author: Peter Hutterer +Date: Mon Oct 3 12:19:21 2011 +1000 + + dix: moveRelative modifies parameter in-place, say so. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit b966362ccf0fe6fdd44f4d778d47e3677f55f11b +Author: Peter Hutterer +Date: Mon Oct 3 12:18:20 2011 +1000 + + dix: rename moveAbsolute to clipAbsolute + + Let's be honest about what it does. + + moveRelative accumulates delta _and_ clips in some cases, so that one can + keep it's name. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit 959d18c3765e447897a8cfd358e9ee645df595d9 +Author: Peter Hutterer +Date: Fri Sep 30 10:50:51 2011 +1000 + + dix: fix missing verb in comment + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit 7074ec87bdf81699df172619aea7aae1ad4ec3c6 +Author: Peter Hutterer +Date: Fri Sep 30 10:47:00 2011 +1000 + + dix: document transformAbsolute + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit f4ca19ce3ab91a9c8ad9de60f7dc95466f21f589 +Author: Peter Hutterer +Date: Fri Jul 29 10:56:44 2011 +1000 + + dix: copy the source ID into the RawEvent (#34240) + + X.Org Bug 34240 + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 8b29addc30163bb7ba74c74351f312aac02f049a +Author: Jeremy Huddleston +Date: Sun Oct 9 04:00:41 2011 -0700 + + loader: when creating sdksyms.c only include shmint.h if MITSHM is enabled #29109 + + https://bugs.freedesktop.org/show_bug.cgi?id=29109 + + When configured with --disable-mitshm the symbols declared in shmint.h + do not exist. By guarding the include with '#ifdef MITSHM' these + symbols are skipped when generating sdksyms.c with --disable-mitshm. + + Signed-off-by: Michael Olbrich + Reviewed-by: Jeremy Huddleston + +commit eabd5532fb589bd0550344ebd23c9765e591aadf +Author: Julien Cristau +Date: Sun Oct 9 17:06:14 2011 -0700 + + xfree86: fix build with xv disabled + + https://bugs.freedesktop.org/show_bug.cgi?id=29111 + + Signed-off-by: Julien Cristau + Tested-by: Cyril Brulebois + Reviewed-by: Cyril Brulebois + +commit c53380be804852045722203c993379813d97f6d7 +Author: Ville Skyttä +Date: Sun Mar 6 10:18:30 2011 +0200 + + Man page syntax and spelling fixes. + + Signed-off-by: Ville Skyttä + Reviewed-by: Jeremy Huddleston + +commit 765ef69295ddc473640c96f1b4f54e0b8bfc670e +Author: Max Schwarz +Date: Tue Oct 4 22:06:08 2011 +0200 + + dix: fix inverted handling of legacy scroll button events + + This bug led to inverted scrolling axes with drivers that support smooth + scrolling axes but send legacy button events. + + Signed-off-by: Max Schwarz + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit fae7ed62ad476114bd37b566202cf6b6546c0a1f +Author: Jeremy Huddleston +Date: Tue Oct 4 21:40:03 2011 -0700 + + XQuartz: pbproxy: Add missing AM_OBJCFLAGS + + Signed-off-by: Jeremy Huddleston + +commit e4cddf509e1729e8ff40354275b65455111ad2bd +Author: vdb@picaros.org +Date: Sat Sep 17 18:55:47 2011 +0200 + + Fix a rare memory leak + + Signed-off-by: Servaas Vandenberghe + Reviewed-by: Jeremy Huddleston + +commit 53611213396479abfdce0f7752681572e0d26d78 +Author: Kirill Elagin +Date: Tue Oct 4 23:02:20 2011 +0400 + + Fix server crash due to invalid images + + See https://bugs.freedesktop.org/show_bug.cgi?id=39383 + + Signed-off-by: Kirill Elagin + Reviewed-by: Jeremy Huddleston + +commit 7a33c5b934382b5554f41ab1502514e91c9bc52e +Author: Alan Hourihane +Date: Tue Oct 4 19:42:46 2011 -0700 + + dixfonts: Don't overwrite local c variable until new_closure is safely initialized. + + Signed-off-by: Alan Hourihane + Reviewed-by: Jeremy Huddleston + +commit 911e7368bf9c00d327e994a6f7a1d8d8f9b83c72 +Author: Peter Hutterer +Date: Tue Aug 30 16:58:04 2011 -0400 + + Move pointOnScreen to inpututils.c + + We need this from other files too. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit d0a7cd759d4741a1ae118d579c90704410cde244 +Author: Peter Hutterer +Date: Fri Sep 2 09:53:02 2011 +1000 + + dix: NewCurrentScreen must work on pointers where possible + + When a screen switch is triggered by PointerKeys, the device for + NewCurrentScreen is the keyboard. Submitting pointer events for this + keyboard (without valuators) has no effect as GPE ignores the event. + + Force the dequeuing through the XTest device attached to this device. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 535b3789be3a7b43b5d9026e2b5150521d91e32b +Author: Peter Hutterer +Date: Wed Aug 31 14:15:02 2011 +1000 + + dix: warn about keyboard events with valuator masks + + We don't actually handle the mask correctly. They're clipped and dropped + into the event but that's about it. I don't think we did since 1.4, let's + warn the user if this happens. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 9537afb13f2750d22350b7441570332ae60e4860 +Author: Peter Hutterer +Date: Tue Aug 30 13:37:31 2011 +1000 + + dix: fill out root_x/y for keyboard events + + Switching screens relies on rootx/y to be set to the correct value. Note: + though we technically take a mask for GetKeyboardEvents we don't actually + handle it properly to move the pointer as required (and generate motion + events if needed). + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 6378d0233d21088b6429755627b4253859892c72 +Merge: 6e965d8 98b2306 +Author: Keith Packard +Date: Mon Oct 3 13:56:06 2011 -0700 + + Merge remote-tracking branch 'herrb/master' + +commit 6e965d8a185087a55b2100b817e18f05b3ce5a00 +Merge: 466e4b3 ac5881d +Author: Keith Packard +Date: Mon Oct 3 13:47:49 2011 -0700 + + Merge remote-tracking branch 'koba/reviewed' + +commit 466e4b3f174bdd7a69a76eb06e6c3e3344b8adc2 +Author: Gaetan Nadon +Date: Fri Sep 30 07:21:57 2011 -0400 + + Xserver-spec: use appropriate copyright markup + + Use docbook copyright markup for year and holder. + + Reviewed-by: Peter Hutterer + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 62940bf38f70e3d9fb80521de40d6361548a0ea5 +Author: Gaetan Nadon +Date: Fri Sep 30 07:21:56 2011 -0400 + + Xserver-spec: re-order markup to follow outpout order + + No content change, no layout/ordering change. + It is easier to find at the top. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 365bc2f5b132ac76a1f827923a99a75b33b158ac +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Sep 30 07:21:55 2011 -0400 + + Xserver-spec: add release information + + It has been added in all docs (X Version 11, Release 7.6) + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ee3e26079e120bf9914cc27871d50501b35e75df +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Sep 30 07:16:34 2011 -0400 + + ddxDesign: drop the url in the coporate authors list + + It was such an eyesore once rendered in html. + Now it looks like other authors. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0ed71b48c0c7bd65cd05eda6c06b9c29b4e3f607 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Sep 30 07:16:33 2011 -0400 + + ddxDesign: remove server version from the document title + + Such version information is already written in the appropriate location + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 83ec3bf1aa72848421660c44c4503fec655f5924 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Sep 30 07:16:32 2011 -0400 + + ddx-Design: add X Version and Release information + + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2f09f6e3f610e585aeb5bd1023323a909d1ba20d +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Sep 29 07:53:16 2011 -0400 + + Xinput: use appropriate copyright markup for a multi licensed doc + + Removed a duplicate paragraph. + + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 597348e969bf78dc2de4cf9bae7b76c110144266 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Sep 29 07:53:15 2011 -0400 + + Xinput: replace hard coded X11 version with X server version + + Which is more useful. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fad04dd9701aa76249a0bab31676103debb84307 +Author: Lennart Poettering <lennart@poettering.net> +Date: Tue Sep 27 18:04:06 2011 +0100 + + udev: make use of udev_enumerate_add_match_tag() only when it is available + + udev_enumerate_add_match_tag() and udev_monitor_filter_add_match_tag() + are mostly optimizations, hence simply skip these calls if they are not + available in the installed version of libudev. + + This should fix the build on older versions of udev. + + [airlied: fixes tinderbox failures on RHEL6] + + Signed-off-by: Lennart Poettering <lennart@poettering.net> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Tested-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 77743f877d573cdf70fcb5cb5897250f668ebf9b +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon Sep 26 22:38:44 2011 -0700 + + kdrive: Fix build for opaque InputOption structure. + + Commit 05284a03f9002b03a66ae355b34790ec02b726f0 missed fixing up + kdrive's use of the old non-opaque structure. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9a55b3661b4172f9a32cd6fefb254e06edb1a88a +Merge: cf11ca3 84bb020 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Oct 3 11:49:23 2011 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit cf11ca360c2ded5ca309faa9d039160947387bb8 +Merge: 463dd87 6eae9fa +Author: Keith Packard <keithp@keithp.com> +Date: Mon Oct 3 11:44:59 2011 -0700 + + Merge remote-tracking branch 'jeremyhu/for-keith' + +commit 463dd87062edaa974cb8c7163328a53197f237e1 +Author: Pauli Nieminen <pauli.nieminen@linux.intel.com> +Date: Thu Sep 22 18:38:53 2011 +0300 + + xf86/modes: Fix shadow rotation crashing when screen pixmap changes + + Driver may change screen pixmaps after page flipping that would then + make damage lose track of the root pixmap. + + Using root window for shadow damages fixes the problem because + SetWindowPixmap is implemented in shadow code. + + Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f5d50b46ddeb039ab6564141f61261e94ee67637 +Merge: 57cd32e 524e544 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Oct 3 11:36:28 2011 -0700 + + Merge remote-tracking branch 'whot/next' + +commit 57cd32e93425597317b4b7722859155419836e4c +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Aug 25 15:41:55 2011 -0700 + + xfree86/modes: Make cursor position transform a helper function + + When the driver can handle the crtc transform in hardware, it sets + crtc->driverIsPerformingTransform, which turns off both the shadow + layer and the cursor's position-transforming code. However, some + drivers actually do require the cursor position to still be + transformed in these cases. Move the cursor position transform into a + helper function that can be called by such drivers. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit 245cb8e94fd15990e1b7d6622added460f104dba +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Aug 25 10:19:48 2011 -0700 + + xfree86/modes: Let the driver handle the transform + + If a driver can use hardware to handle the crtc transform, then + there's no need for the server's shadow layer to do it. Add a crtc + flag that lets the driver indicate that it is handling the transform. + If it's set, consider the transformed size of the screen but don't + actually enable the shadow layer. Also stop adjusting the cursor + image and position. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit e089737fb13868bd3a72b7ac4799d502d188f03e +Author: Keith Packard <keithp@keithp.com> +Date: Mon Oct 3 11:23:16 2011 -0700 + + Add AC_LANG_SOURCE wrappers around configure.ac code fragments + + Current autoconf versions are very unhappy when code fragments are not + wrapped in AC_LANG_SOURCE macros, generating errors like: + + configure.ac:723: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body + ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from... + ../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from... + ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... + ../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... + ../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... + ../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... + configure.ac:723: the top level + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6eae9fa28445b6cfa09061b338242df5116aafe8 +Author: Matt Turner <mattst88@gmail.com> +Date: Wed Sep 28 17:27:45 2011 -0400 + + Remove incorrect & in swap_uint32 + + Caused by commit 893e86a4, and hidden by the (char *) cast. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Tested-by: Aaron Plattner <aplattner@nvidia.com> + +commit 524e5445c0b6df5247d4aac5368470bb89ef4080 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Oct 1 08:43:52 2011 -0700 + + Add #include "inpututils.h" to xkbAccessX.c for init_device_event + + Fixes Sun compiler warning: + "xkbAccessX.c", line 128: warning: implicit function declaration: init_device_event + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 98b230669f591bf5b8b8764db3b287d91857ee9e +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Jul 31 20:43:39 2011 +0200 + + sdksyms.sh may not be executable. + + Use $(SHELL) to run it. Someone may want to build out of a source tree + in a filesystem with the noexec mount flag set. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f54852edc35a2831a4cd91906188101ea19904e1 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Sep 18 12:46:52 2011 +0200 + + Add a 'wscons' autoconf mechanism to configure input devices on BSD. + + This does not really handle hotplug (it's handled inside the kernel, + by the 'mux' devices), but uses the wscons console driver + configuration to figure out the keyboard layout and the list of + pointing devices found by the kernel. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f32c827d513c44f07e1d0fbcc0c96cef18c9a4d9 +Author: Max Schwarz <Max@x-quadraht.de> +Date: Sun Sep 25 20:44:26 2011 +0200 + + Input: Fix frac calculation on [Raw]DeviceEvent conversion + + (1UL << 32) evaluates to 0 (at least here), so do the + fraction calculation in two steps as in libXi. Fractions on xXIRawEvent + were not multiplied at all, which also gave 0 as result. + + Signed-off-by: Max Schwarz <Max@x-quadraht.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4c6bc0e76599dbe5ede2e1f48c9936a0e996b638 +Merge: 057cc92 3304bbf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 30 09:24:56 2011 +1000 + + Merge branch 'smooth-scrolling' into next + +commit 3304bbff9b4ed63f1a47410a5320a136420ba2c6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 15 18:49:58 2011 +0000 + + Input: Add smooth-scrolling support to GetPointerEvents + + For scroll wheel support, we used to send buttons 4/5 and 6/7 for + horizontal/vertical positive/negative scroll events. For touchpads, we + really want more fine-grained scroll values. GetPointerEvents now + accepts both old-school scroll button presses, and new-style scroll axis + events, while emitting both types of events to support both old and new + clients. + + This works with the new XIScrollClass to mark axes as scrolling axes. + Drivers mark any valuators that send scroll events with SetScrollValuator. + (Currently missing: the XIDeviceChangeEvent being sent when a driver changes + a scroll axis at run-time. This can be added later.) + + Note: the SCROLL_TYPE enums are intentionally different values to the XI2 + proto values to avoid copy/overlapping range bugs. + + Co-authored-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit ac5881d6d0bcf4bcc66a5d6ddde4eca950db1a5b +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Thu Sep 15 23:05:24 2011 +0600 + + Remove unused vtSysreq + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 0be1640dbbdd072f26d937de2e49f5ed58d54ef9 +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Sat Aug 27 02:02:36 2011 +0600 + + bsd: ioctl KDENABIO/KDDISABIO do not matter for OpenBSD + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 91042b98afdc6cecc746e101a88f79e56db1c0d0 +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Sat Aug 27 00:47:34 2011 +0600 + + bsd: OpenBSD and NetBSD not need extra headers in PCVT_SUPPORT + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 86eaa9bbe4ed59f89d6509d5e13211ab7f5a8038 +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Sat Aug 27 01:03:28 2011 +0600 + + bsd: Some clean up + + OpenBSD and NetBSD does not support syscons + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit dc864770d47fc1e4ec993e37a59e5aecb5b0a85e +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Fri Aug 26 22:40:19 2011 +0600 + + bsd: Remove dead code + + Since OsInit closes stdin before the xfree86 DDX opens the + console, fstat on stdin will always fail, so it's safe to delete + code that attempts it. + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit cbb842666fa7ff26bbdd1e89a7f41b835a677c5e +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Fri Aug 26 21:42:41 2011 +0600 + + bsd: Variable devConsoleFd need only if defined PCCONS_SUPPORT + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 38bd1e123d959e0a13514ec415afc8bfb5a170f2 +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Fri Aug 26 18:54:01 2011 +0600 + + bsd: Replacement screenFd on consoleFd because they are equivalent + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit f015351c73bb24ce4172911c3e95d67922de42ab +Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> +Date: Fri Aug 26 18:27:02 2011 +0600 + + bsd: Remove unused macros KBD_FD + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 057cc92ebfeebe81b7d01ff2c6aa2c066c8d1a64 +Merge: afb1fe6 52c9b59 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 29 14:18:35 2011 +1000 + + Merge branch 'raw-events' into next + + Conflicts: + configure.ac + dix/events.c + +commit 52c9b59a9fed6abfeca775a7a04133cee18eac0b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 30 09:47:06 2011 +1000 + + dix: use 'rc' for return code in DeliverRawEvent + + Reported-by: Walter Harms <wharms@bfs.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit b6b1f1b514bf14ddf6b265b8d4551f892ded0dd2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 11 13:56:08 2011 +1000 + + input: deliver raw events unconditionally for XI 2.1 clients. + + Deliver raw events regardless whether there is a grab on or not for clients + supporting 2.1 or later. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 16244fba001826190445302f56784f5de9c59c01 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 2 13:50:13 2011 +1000 + + Support (and require) XI 2.1 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 54e05d80a122bac57920fce1704c0f57492b849c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 14:21:39 2011 +1000 + + dix: rename ProcessRawEvents to dix/events.c:DeliverRawEvent + + No functional changes, prep work for future changes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit c48133f133c64d356a1208f185619bfdf7e9a5f2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 14:19:45 2011 +1000 + + Xi: use temporary variable for filter. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit ac0850e86f22191091a1eb07237cae9de49ee00d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 12:14:32 2011 +1000 + + dix: split DeliverEventToWindowMask up a bit more. + + Move out the actual event delivery, it needs to be used from elsewhere. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 5ea2fb389fce235366e9fce83d20abdc8874f4e2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 11:43:50 2011 +1000 + + dix: rename DeliverEventsToClients to DeliverEventsToWindowMask + + To avoid confusion with a future patch and it better describes what this + does anyway - delivering events to all clients that have the event mask on + the window. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 016413dae947fe4e8e918f728c87354fa4928275 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 11:40:56 2011 +1000 + + dix: split client list retrieval out of DeliverEventToClients + + No functional change, but "other" was renamed to "clients". + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 537c5f631d1f8d526e63355b7d88cb1fb2793492 +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 03:21:18 2011 +0200 + + xkb: Fix case checks for Latin 4. + + That one was missing _XkbKSLower: + XK_kra: U+0138 LATIN SMALL LETTER KRA + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 0b56a7f0ad01d3a86cdd7a14d5e567a00a3553f6 +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 03:12:44 2011 +0200 + + xkb: Fix case checks for Latin 2. + + Those ones were getting _XkbKSLower for no reasons: + XK_ogonek: U+02DB OGONEK + XK_doubleacute: U+02DD DOUBLE ACUTE ACCENT + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 512a9750c197437889ff7f26a8d2bd242e030745 +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 03:03:47 2011 +0200 + + xkb: Fix case checks for Latin 1. + + That one was missing _XkbKSLower: + XK_ssharp: U+00DF LATIN SMALL LETTER SHARP S + + That one was getting _XkbKSLower for no reasons: + XK_division: U+00F7 DIVISION SIGN + + For reference, XK_multiply was already excluded from the _XkbKSUpper + check, it's no big surprise XK_division has to be excluded from the + _XkbKSLower check. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 635a1f50bc65512ec491fe71b9dfa8cf9118e2c2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 23 12:04:39 2011 +1000 + + input: allow for max < min for relative axes on InitValuatorAxisStruct + + Relative axes are initialized with 0, -1 but so far this never had any + effect as all users of this function (for relative axes) just set it to the + defaults anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 8d1a414cca51e7f8a93470c5aa2e998f5ca1bc9a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 23 12:03:48 2011 +1000 + + input: switch InitValuatorAxisStruct to return Bool + + Return errors instead of silently ignoring them. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 5ac1f885f5c106b970835de36e13a9a7ea413df4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 19:44:53 2011 +0000 + + Input: Add POINTER_EMULATED flag to GetPointerEvents + + POINTER_EMULATED merely sets XIPointerEmulated in the generated + DeviceEvent. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 78d8d6dd7f31cb903d5c8baf64181795736f33ed +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 14:23:25 2011 +0000 + + Input: Add vertical and horizontal scroll axes + + To be used for smooth scrolling with future driver APIs, replacing + Rel Vert Wheel and Rel Horiz Wheel axes, which have not been used in any + open driver to date. + + Combined with double-granularity ValuatorMasks, these axes allow for + fine-grained scroll data to be sent to clients. Future commits allow + drivers to post these scroll axes to + QueuePointerEvents/GetPointerEvents, which take care of emulating legacy + scroll button events. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit d8e42decbad4abe13265f4c546a0c561905d018f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 18:54:14 2011 +0000 + + Input: Split GetPointerEvents body into a helper function + + For smooth-scrolling support, we want GetPointerEvents to generate + multiple events, so split the body of the function out into a helper + function in order to call it multiple times. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc8aad2376207b5ca9c74effae67fb8183222d2e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Mar 3 19:48:15 2011 +0000 + + Input: Set last valuators in GetPointerEvents only + + Previously, various pieces of code, including acceleration, used to drop + the values into DeviceIntRec::last.valuators. Remove all this and only + do it in GetPointerEvents after all transformation, acceleration and + clipping, so we're guaranteed to always have the correct values. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 94c19a0a72403fc522e3d05eeb57f35e111a2562 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Mar 3 15:46:45 2011 +0000 + + Input: Convert DeviceIntRec::last to use doubles + + Change the last real user of a split integer/fractional co-ordinate + system, DeviceIntRec's last->{valuators,remainder} to just have one set + of doubles. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2d9beeb2174661d0a0732403ad4e49e9ff56718d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Mar 3 15:36:55 2011 +0000 + + Input: Make DeviceEvent use doubles internally + + Change the DeviceEvent InternalEvent to use doubles for its valuators, + instead of data and data_frac. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 626f487b97c99b48bf1d8c8ef4367a686639c3e6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Mar 3 15:06:45 2011 +0000 + + Input: Make RawDeviceEvent use doubles internally + + Change RawDeviceEvent to use doubles for valuators internally, rather + than data(_raw) and data(_raw)_frac. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3b7fb0f68dc0d40c968c2cfc9bb74b1d0fb48bc8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 17:18:48 2011 +0000 + + Input: Modify mask in-place in positionSprite + + Instead of taking pointers to x and y values to modify in + positionSprite, just modify the mask (as well as dev->last) in place. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 629a575261c08ca67324fea4c975636a1a95dc75 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 17:04:57 2011 +0000 + + Input: Convert positionSprite and GetPointerEvents to double + + Use doubles internally in both of these functions, eliminating most of + the remaining int co-ordinate usage. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 51437995a5041a8c53c33b508b1607c78a5fa463 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 16:50:55 2011 +0000 + + Input: Don't call positionSprite for non-pointer devices + + If the device doesn't have any valuators, or if it has less than two of + them, don't bother calling positionSprite. Users with one-dimensional + pointing devices may be upset. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4c364a312daf2b743a0a60b9907f671804a1b1b6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 16:49:53 2011 +0000 + + Input: Convert rescaleValuatorAxis to double + + Instead of passing fractional pointers around everywhere, just pass + doubles instead. Much easier. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5680fa41ea3373651f7017898a307e97cf29b0d3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 16:30:30 2011 +0000 + + Input: Remove x and y from moveAbsolute/moveRelative + + Both these functions modify the mask and + pDev->last.{valuators,remainder} in-place now, so there's no need to + pass in pointers to local x and y values. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0882b788da97c75e464eb352dac1d83c938a148e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 16:27:31 2011 +0000 + + Input: Convert acceleration code to using ValuatorMask + + Instead of passing a set of int* to the acceleration code, pass it a + mask instead, which avoids an unfortunate loss of precision. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 2b8f1d07bd42c9d3db3dbacfe6a1335e47236a6c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 15:37:53 2011 +0000 + + Input: Widen pointer acceleration types to double + + This widens almost all of the float-using code in ptrveloc.[ch] to + doubles, other than values coming from properties which are specified to + be floats by the property API. + + Bumps input API to v14 as this changes the AccelScheme signature, as + used by xf86-input-synaptics. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 8a4a4e1b8a33899653d68a21bb7ff0557a576338 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 9 15:26:55 2011 +0100 + + Input: Use trunc instead of lrintf in acceleration code + + For compatibility with all the rest of the input code. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit e1df51421bc392d57f88c831fe0661871a8aa769 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 13:34:32 2011 +0000 + + Input: Set fractional member in set_raw_valuators + + RawDeviceEvents have space for fractional valuator members, so might as + well start using them. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cdf202250ef616f3b261db70da30e421ea59a630 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 14:50:29 2011 +0000 + + Input: Convert transformAbsolute to work on doubles + + Change transformAbsolute to use doubles internally. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3463078f9697fad0ee11837d80e88889fc6a28a4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 13:29:24 2011 +0000 + + Input: Convert clipAxis, moveAbsolute and moveRelative to double + + Change all these three to use doubles internally, though the outputs of + moveAbsolute and moveRelative are still truncated to int. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 4e52cc0ef48145134cd58d357fb7289e6f8bb709 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 13:20:37 2011 +0000 + + Input: Prepare moveRelative for conversion to double + + Shuffle some code around in moveRelative to make the conversion to + double easier later. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 80fdf9ca33a8f50f98a4b1a3279e66b040353b80 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 13:19:00 2011 +0000 + + Input: Prepare moveAbsolute for conversion to double + + Shuffle some code around to make moving to double easier later. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6a6b4eb05c7822860e2362fa9b8441fc67055e27 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 17:22:59 2011 +0000 + + Input: Store clipped absolute axes in the mask + + Change moveAbsolute to be more symmetric with moveRelative by storing a + clipped axis value back in the mask, rather than just in + dev->last.valuators. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7e919ef5bfa94d51a06eefb150ab947bdbfb6885 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Feb 23 17:28:18 2011 +0000 + + Input: Add double-precision valuator_mask API + + Add API for valuator_mask that accepts and returns doubles, rather than + ints. No double API is provided for set_range at the moment. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 79d4deb76d5612b75ef26b4549b7ade3a656687d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Feb 23 14:31:01 2011 +0000 + + Input: Convert ValuatorMask to double-precision internally + + Switch the ValuatorMask struct to using doubles instead of ints for the + actual values. Preserve the old int API, and (attempt to) round towards + zero for values we return. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 60a766a96f9ec97adf6d0273f70ec23f313a11c6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 9 16:02:47 2011 +0100 + + Input: Add flags to RawDeviceEvent + + Add a flags member which will be copied wholesale into the resultant + xXIRawEvent. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 5d62c32981dbe9630bed32567b55008b536c81c5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Dec 27 13:24:35 2010 +0000 + + Input: Add flags to DeviceEvent + + Add a flags member which will be copied wholesale into the resultant + xXIDeviceEvent. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 38e9e28ba2fbffee52ad9889ef6d4e94c7af3e10 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Sep 20 20:39:06 2011 -0700 + + XQuartz: Use set_front_process rather than X11ApplicationSetFrontProcess since we're already in the AppKit thread + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 206b30ebc608d29a91cc18665d89e887cac4dba3 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Sep 22 18:55:19 2011 -0700 + + Address regressions from e8ff555b95ba and d206d52f657c to work with other compilers + + 1) The error attribute appeared in gcc-4.3 + 2) The return type of __builtin_constant_p is int + 3) Sun Studio 12.0 and later builtin support for __builtin_constant_p + + Found by Tinderbox. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit afb1fe695d197187a301c19863a128a65389b15c +Merge: 7fb4bef c7163fd +Author: Keith Packard <keithp@keithp.com> +Date: Mon Sep 26 20:24:15 2011 -0700 + + Merge remote-tracking branch 'whot/next' + +commit c7163fdd302f706a3d67f0fdf93eeb3396bb3332 +Author: vdb@picaros.org <vdb@picaros.org> +Date: Wed Aug 31 07:23:01 2011 +0200 + + xfree86: .BI style: monitor section in xorg.conf man page + + The xorg.conf manual uses the following convention in most of its + sections: + + bold = text to be copied literally to the config file, + italic = a symbolic name to be substituted by a true value. + + Some configuration keywords seem to have been changed into generic + options. Prepending Option to the manual entry swapped the + bold-italic logic. This patch restores the convention in the monitor + section and consists of + + -.BI "Option " "\*qPreferredMode\*q " \*qstring\*q + +.BI "Option \*qPreferredMode\*q \*q" name \*q + + modifications. + + Plus a few minor changes (Modes → Mode) and a typo fix. + + Signed-off-by: Servaas Vandenberghe + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4b4caecb7d2c8e0b7e4fedc95fba2a728bbc25e6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 6 09:33:43 2011 +1000 + + xfree86: expose Option "TransformationMatrix" + + Recent changes to the server change the default absolute input device + behaviour on zaphods to span the whole desktop too. Since these setups + usually use an xorg.conf, allow the transformation matrix to be specified in + the config as well. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit cf51424a34fb2b567a867338ab44f83b5c43251c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 6 09:39:01 2011 +1000 + + xfree86: use subheader for Pointer Acceleration parts in xorg.conf(5) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9125952b407090b040bffb3d752288293137cf77 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 5 15:43:14 2011 +1000 + + xfree86: fix comment typo + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2d2dce558d24eeea0eb011ec9ebaa6c5c2273c39 +Author: Sam Spilsbury <sam.spilsbury@canonical.com> +Date: Wed Sep 14 09:58:34 2011 +0800 + + Remove the SendEvent bit (0x80) before doing range checks on event type. + + Some extension libraries may set this bit before converting the event to + wire protocol and as such range checking the event will cause an invalid + BadValue error to result. As the documentation suggests the the bit + should be "forced on", remove it before doing range checks and continue + to force it on in the server. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f52d5cd374563544dafe29587411f345e31bbdf8 +Author: Carlos Garnacho <carlosg@gnome.org> +Date: Wed Aug 31 00:46:52 2011 +0200 + + Xi: Fix passive XI2 ungrabs on XIAll[Master]Devices + + The corresponding DeviceIntPtr wasn't being gotten properly, + resulting in BadDevice from dixLookupDevice(). + + Signed-off-by: Carlos Garnacho <carlosg@gnome.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 24823f1ab0f16e0815ef44340894537dc4babf6a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 3 16:01:28 2011 +1000 + + xfree86: switch options from pointer to XF86OptionPtr + + In all cases, the pointer was simply type-cast anyway. Let's get some + compile-time type safety going, how about that. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + + Squashed in: + xfree86: Move definition of xf86OptionPtr into separate header file + + The pile of spaghettis that is the xfree86 include dependencies make it + rather hard to have a single typedef somewhere that's not interfering with + everything else or drags in a whole bunch of other includes. + + Move the xf86OptionRec and GenericListRec declarations into a separate + header. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 84bb0207f6db433a8d387d933393357da87ca23e +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Sep 23 20:03:03 2011 -0400 + + dix and os: gitignore dix.O and os.O + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 3d41939d0349569dcfd2aef9b846c739d0ba0060 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Sep 22 17:41:38 2011 -0700 + + Unconditionally #include <stdint.h> + + The more recent inclusions of this file haven't been checking for + HAVE_STDINT_H, so might as well make the older ones consistent. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 46d5ae5b551cc926331324073f2686b47e8aea07 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Sep 23 09:38:25 2011 -0400 + + dtrace: fix typo in title + + The word provider should be capitalized. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 6cae6224994e3252b3b7c7608f983ce73e0206fc +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Sep 23 09:38:24 2011 -0400 + + dtrace: use docbook copyright markup for copyright holder + + No content change to copyright text. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 58d3d46d6cc0d7a81db6bad61d158f3b9af8af71 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Sep 1 16:48:37 2011 -0700 + + Assign ids to more tags in Xserver-Dtrace.xml + + Keeps xsltproc from adding random-number id tags to html output so that + it's easier to see real changes vs. different random numbers. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matt Dew <marcoz@osource.org> + +commit 7fb4bef0394a5d09680985d34bce8252b61493cb +Merge: 98f4940 c90903b +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 21 14:34:27 2011 -0700 + + Merge remote-tracking branch 'mattst88/for-keith' + +commit 98f4940093dc90c3366d3e4d3ddceacbaee299dc +Merge: b018b81 c8eacae +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 21 14:30:19 2011 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit b018b815333b256b5e06dd6251b2e539f09f89fa +Merge: 03d0329 0f380a5 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 21 14:17:14 2011 -0700 + + Merge remote-tracking branch 'jamey/reviewed' + +commit c90903b4f7a826ae6826a8dd0a901c8362500e46 +Author: Peter Harris <pharris@opentext.com> +Date: Fri Sep 2 18:45:16 2011 -0400 + + xkb: add missing swaps for xkbGetDeviceInfoReply + + Caught during review of e095369bf. + + Signed-off-by: Peter Harris <pharris@opentext.com> + Reviewed-by-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit d206d52f657cb63a0f6ba8b62d788c1812b57c81 +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Aug 16 19:19:24 2011 -0400 + + Use __builtin_constant_p to determine if we can use lswapl + + If the address of the swapped memory location is known at compile time, + we can check its alignment at no runtime cost and use lswapl instead. + + text data bss dec hex filename + before: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg + after: 1864396 52136 78040 1994572 1e6f4c hw/xfree86/Xorg + + bswap instructions: 131 -> 308 (used in lswapl) + rol instructions: 943 -> 1174 (used in lswaps) + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 889b700e7760ced38bcf5f3aff2d31d3d9a058d7 +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Aug 16 19:12:21 2011 -0400 + + Use lswap{l,s} in cpswap{l,s} + + Should be safe since cpswap isn't used on pointers. + + text data bss dec hex filename + before: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg + after: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg + + bswap instructions: 5 -> 131 (used in lswapl) + rol instructions: 811 -> 943 (used in lswaps) + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit a2f0ff5f73db204a9d61e65148b28f6acc5121df +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Aug 16 19:30:20 2011 -0400 + + Make lswap{l,s} inline functions + + text data bss dec hex filename + before: 1875668 52136 78040 2005844 1e9b54 hw/xfree86/Xorg + after: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit e8ff555b95baab66cc7d060c1e7f9fdd49d3802f +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Aug 16 19:07:24 2011 -0400 + + Add type checking to swap macros + + The original macros are retained (instead of replacing them with inline + functions) because of implicit type promotion. That is, an int16 passed + to an inline function taking int32 would be implicitly promoted to int32 + without a warning. + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 893e86a49e3e381cff48a9e86dc2d9b3d5431d95 +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Aug 16 19:03:26 2011 -0400 + + Introduce swap_uint{16,32} functions, used in swap{l,s} + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 54770c980cd2b91a8377f975a58ed69def5cfa42 +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Aug 16 16:59:07 2011 -0400 + + Cast char* buffers to swap functions + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 9edcae78c46286baff42e74bfe26f6ae4d00fe01 +Author: Matt Turner <mattst88@gmail.com> +Date: Wed Sep 21 17:14:16 2011 -0400 + + Use correct swap{l,s} (or none at all for CARD8) + + Swapping the wrong size was never caught because swap{l,s} are macros. + + It's clear in the case of Xext/xres.c, that the author believed + client_major/minor to be CARD16 from looking at the code in the first + hunk. + + v2: dmx.c fixes from Keith. + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 03d032991da21bf866ca30dcbb6b7f9f99df441a +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Sep 14 15:25:06 2011 -0700 + + fb: Rename wfbTriangles and wfbTrapezoids + + These symbols were not renamed when they were added to libfb: + + # nm -D libwfb.so | grep ' fb' + 0000000000028d00 T fbTrapezoids + 0000000000028d60 T fbTriangles + + This causes corruption and/or crashes on wfb-ful drivers like nvidia: + + Program received signal SIGABRT, Aborted. + 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 + 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. + in ../nptl/sysdeps/unix/sysv/linux/raise.c + (gdb) bt + #0 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 + #1 0x00007fd67f3a3680 in *__GI_abort () at abort.c:92 + #2 0x00007fd67f3995b1 in *__GI___assert_fail (assertion=0x7fd679ecb804 "key->initialized", file=<optimized out>, line=116, function=0x7fd679ecbbc0 "dixGetPrivateAddr") + at assert.c:81 + #3 0x00007fd679ec55b6 in ?? () from /usr/lib/xorg/modules/libfb.so + #4 0x00007fd679eca9ef in ?? () from /usr/lib/xorg/modules/libfb.so + #5 0x00007fd679ecae20 in fbTriangles () from /usr/lib/xorg/modules/libfb.so + #6 0x00007fd67a58fc55 in ?? () from /usr/lib/xorg/modules/drivers/nvidia_drv.so + #7 0x00000000004f38d1 in ?? () + #8 0x0000000000437ae9 in ?? () + #9 0x0000000000426eaa in ?? () + #10 0x00007fd67f38cead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>, + rtld_fini=<optimized out>, stack_end=0x7fff99860d78) at libc-start.c:228 + #11 0x000000000042719d in _start () + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8 +Author: Matt Turner <mattst88@gmail.com> +Date: Thu Aug 4 15:35:41 2011 -0400 + + Use internal temp variable for swap macros + + Also, fix whitespace, mainly around + swaps(&rep.sequenceNumber) + + Reviewed-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit c10bad3d3e8ff1b90014770fd470f9c67263e46f +Author: Matt Turner <mattst88@gmail.com> +Date: Wed Apr 27 19:29:06 2011 -0400 + + Silence printf format warnings in helper_exec.c + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 9eab5b3443a1926a29385948acc6c5e0843465ea +Author: Matt Turner <mattst88@gmail.com> +Date: Wed Apr 27 18:25:27 2011 -0400 + + Replace Fabs() macro with fabs() function + + gcc generates better code with fabs() anyway. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 40a47bd628f525d2d8bd3ca76554089a6e9d2a1d +Author: Matt Turner <mattst88@gmail.com> +Date: Wed Apr 27 14:19:41 2011 -0400 + + Remove unnecessary #undefs of [f]abs and old comments + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 079a7585e44d25a0a9fb6662c6382dfbe8f6cd3c +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Sep 15 20:12:41 2011 -0400 + + devbook.am: maintenance update from docbook.am + + The developer docs are generated from a subset of docbook.am + which is sometimes updated. + + The one difference for xserver is the embedded css style in the HEAD element. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 82c55b5a99a1bacf2bc11bbd9d58f6f2c6c07286 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Sep 15 20:12:40 2011 -0400 + + docbook.am: embed css styles inside the HTML HEAD element + + Rather than referring to the external xorg.css stylesheet, embed the content + of the file in the html output produced. This is accomplished by using + version 1.10 of xorg-xhtml.xsl. + + This makes the whole html docs tree much more relocatable. + In addition, it eliminates xorg.css as a runtime file which makes + xorg-sgml-doctools a build time only package. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1602444e05cc59afe32c085c0cedb85e3268cd98 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Sep 15 20:12:39 2011 -0400 + + docbook.am: global maintenance update - entities, images and olinking + + Adding support in libX11 for html chunking caused a reorg of docbook.am + as well as the xorg-sgml-doctools masterdb for olinking. + The parameter img.src.path is added for pdf images. + A searchpath to the root builddir is added for local entities, if present. + This feature was initiated by xserver module and made available to all. + + The docbook.am makefile hides all the details and is identical for + all 22 modules having DocBook documentation. It is included by a thin + Makefile.am which requires no docbook knowledge. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 871d65790ec2ac0fd6d5105c2d599f63a86fcaf1 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Nov 1 16:02:11 2010 +0200 + + DRI2: Allow DDX to validate swap_limit changes + + DDX can now implement validation for swap_limit changes to prevent + configurations that are not support in driver. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + CC: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit b435e2aac1b3fbb97d0275de73a1e36d16f170c0 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Nov 1 16:22:00 2010 +0200 + + DRI2: Expose API to set drawable swap limit. + + This allows ddx to set swap_limit if there is more than one back + buffer for drawable. Setting swap_limit has to also check if change + affects a client that is blocked. + + This can be used to implement N-buffering in driver with minimal + logic in allocation and selecting next back. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Reviewed-by: Francisco Jerez <currojerez@riseup.net> + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 86f8da0aa7612558e6563f5de0d9f9793854053f +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Nov 1 16:21:59 2010 +0200 + + DRI2: Add ReuseBufferNotify hook + + ReuseBufferNotify hook is called whenever old buffer is reused in DRI2 + code. + + Driver can use this hook to rewrite the buffer name if hardware requires + shared buffers. Shared buffer might be some hardware limited resources like + framebuffer that is preallocated in boot. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2f47433fef2cf63063e069ead9003891d135e87f +Author: vdb@picaros.org <vdb@picaros.org> +Date: Wed Sep 7 17:47:56 2011 +0200 + + print DisplayMode type bits + + Dear, + + A patch I posted on xorg-devel was reviewed and is ready for + inclusion in xserver. Would you be willing to apply the patch so that + it finds its way into the master branch ? + + Thank you, Servaas Vandenberghe. + + http://lists.x.org/archives/xorg-devel/2011-August/024769.html + http://lists.x.org/archives/xorg-devel/2011-August/024777.html + + This patch adds printing of the DisplayMode type bits to + xf86PrintModeline(). It helps to trace the modeline origin and to + understand the initial configured modeline. + + Reviewed-by: Alex Deucher <alexander.deucher at amd.com> + Signed-off-by: Servaas Vandenberghe + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c92c83523ede8bc361526ac93d09d089fbbdae08 +Merge: 4ad271d 24b2b43 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 21 13:32:06 2011 -0700 + + Merge remote-tracking branch 'kibi/master' + +commit 4ad271d06c5aa42721c0e2e01e17e34a39825c65 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Aug 29 20:44:18 2011 -0700 + + xfree86: Bump extension ABI version to 6.0 + + The video driver ABI was bumped to 11.0 in commit + 0de7cec90738a7a5020150309866bb0e23b6f479 because of a change to the + size of ATOM in commit 51f353d0a0d116af16d7d9590cadef6c56328746. This + also affects extension modules, so the extension ABI version should + have been bumped too. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c8eacae4f833a0bd81907ba2b4cfaa80c08e037f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Aug 25 21:46:16 2011 -0700 + + Space & style cleanup of hw/xfree86/i2c/fi1236.c + + Fortunately, the massive decrease in the cost of whitespace in the past + decade has allowed us to be much more generous with it, and much more + consistent in its application, even for code like this that clearly no + one has ever tried to read. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit c46215c100e964665580211a5d5893558ca9374f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Wed Aug 10 11:17:46 2011 -0700 + + Cross-reference cvt(1) & gtf(1) man pages + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 1526f1caf396fefc5f09eaff884d5b92aac44997 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue May 31 19:54:33 2011 -0700 + + Remove unused ClientStateAuthenticating + + Appears to be leftover from the Kerberos code deleted in 2007 + (commit dfbe32b5b828cc4e3da36a0e2e6ad641164eaa5e). + Nothing left ever set clientState to ClientStateAuthenticating + + Skipped over 1 to preserve existing enum numbering. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 0f380a5005f800572773cd4667ce43c7459cc467 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Sep 14 18:35:21 2010 -0700 + + Fix pixmap double-frees on error paths. + + If AddResource fails, it will automatically free the object that was + passed to it by calling the appropriate deleteFunc; and of course + FreeResource also calls the deleteFunc. In both cases it's wrong to call + the destroy hook manually. + + Commit by Jamey Sharp and Josh Triplett. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Josh Triplett <josh@joshtriplett.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 8f69c935f6d06ad92fd0e8d9fcb3cde86cd258f5 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri Sep 17 02:27:59 2010 +0200 + + Eliminate MAXSCREENS-sized CursorScreenKey array. + + Use new per-screen privates API instead. + + Commit by Jamey Sharp and Josh Triplett. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Josh Triplett <josh@joshtriplett.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c96a43888ceae72bf89c66de911120c0b6b7a71a +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Jul 10 09:28:47 2010 -0700 + + Revert "Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state" + + This reverts commit bc0c56c407117d1545e20d21f7d30eb3472d618b since we're + breaking ABI anyway. + + Conflicts: + + ChangeLog + dix/colormap.c + dix/pixmap.c + dix/window.c + include/pixmapstr.h + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 13ac1ba480ee3e89163825cd2777f9a6e9dcbc9f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue May 31 19:42:48 2011 -0700 + + Remove unused ClientStateCheckingSecurity & ClientStateCheckedSecurity + + Appear to be leftovers from the XC-QUERY-SECURITY code deleted in 2007 + (commit 375864cb74cced40ae688078b1f7750998972535). + Nothing left ever set clientState to ClientStateCheckingSecurity. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 78f946c297081d39d312e05928146c78f59fedcb +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu May 19 23:26:31 2011 -0700 + + sun_init.c: Implement novtswitch & sharevts for Solaris + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: John Martin <john.m.martin@oracle.com> + +commit 87cc83474d9890d14d9bc60926a97bd0d5b059af +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun Sep 18 20:47:04 2011 -0500 + + Replace XmuSnprintf with snprintf. + + Alan Coopersmith explains: + + XmuSnprintf() can be replaced by snprintf() now. (It was a + implementation X provided for it's libraries to use in the days + before all platforms we cared about had snprintf in libc.) + + Reported-by: walter harms <wharms@bfs.de> + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit df4eeb1256c7c5e7a3f88f10da2915c7a07a8db8 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Jun 8 13:58:04 2010 -0700 + + xnest: Delete unused nClipRects GC-private field. + + This field was never read at any time in the git history. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 53a4744b69ab76ecabdde5dabfb56830570c0f4e +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Sep 18 01:23:12 2010 +0200 + + XineramaInitData ignores its argument. Quit passing one. + + Also fix up XineramaInitData's caller, XineramaReinitData. + + Commit by Jamey Sharp and Josh Triplett. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Josh Triplett <josh@joshtriplett.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit b85c10a35d44ad695797d0d19757e5f62eab4b98 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 16:23:31 2010 -0700 + + dmx: Fix some "no previous prototype" warnings by making functions static. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit d423012e776a81a197cde86be5c6bd471a593c39 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 21 14:21:52 2010 -0700 + + dmx: Fix a non-constant printf format string warning. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7e127f12a24acb8f43055af0a9be1ec585bbed36 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu May 19 23:22:27 2011 -0700 + + sun_init.c: Move vt switches to a switch_to helper function like lnx_init.c + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit a00dc6af6e84d0bee3f69d8df89d7f68cb535d35 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu May 19 22:43:56 2011 -0700 + + Xorg.man: Add -novtswitch and -sharevts options + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 93abda6bddf770dbfc3d4d0ada61ea84a7b7b9be +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu May 19 22:39:09 2011 -0700 + + xfree86: move -novtswitch & -sharevts argument handling up to common layer + + Stop duplicating in each os-support variant before it gets replicated + even further. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + +commit d8d99e14b1241fd8c099d69b8d0ed0817585fe8d +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Sep 14 09:52:58 2011 -0500 + + configure.ac: Remove unreachable check for VM86 headers. + + "configure --with-int10" is not a valid configuration, and the check for + sys/vm86.h and sys/io.h is not used. Delete it. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + +commit 94b2eea86319934316bdb013f6f3940685a88a2f +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Sep 14 11:23:03 2011 -0500 + + int10: Delete #if 0'd implementation that's older than our git history. + + Throughout the xserver git history, the generic portion of the int10 + module has always used other methods for reading the video BIOS. For + some time now it's been purely libpciaccess based. This commented-out + use of xf86ReadBIOS is entirely superfluous. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 6ad7bb69eebd5e5b4068bd9aa0b9a7168f075006 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Sep 13 17:45:19 2011 -0500 + + Remove PC98 support. + + Gaetan Nadon wrote: + + Alan Coopersmith wrote: + + "I think we recently dropped PC98 support from the X server, so I'd + be okay with dropping the documentation now". + + Let's make them be right, shall we? + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Acked-by: Gaetan Nadon <memsize@videotron.ca> + Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 9eb22ebf46b77c15e53017a37c7ef605521dc164 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Sep 13 16:30:06 2011 -0500 + + configure.ac: XORG_OS is not used, so delete it. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + +commit 76636f30f7cf2344f4038c59bf292db19be33d53 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Sep 13 13:10:10 2011 -0500 + + configure.ac: Remove unused XORG_OS_PCI variable. + + This is the last mention after ccfaf82367c9d057fd8314ce36b47f0a8eb696b6 + quit using the variable. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + + Tiago Vignatti posted an identical patch in June 2010, which I only + noticed after getting the above reviews. His patch was: + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 60b4bd181bbdc794c7f3547f67df916132aa111e +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Sep 13 14:31:24 2011 -0500 + + x86emu: There is no NO_INLINE implementation of unaligned access here. + + Patch produced with: + unifdef -UNO_INLINE -B + + This change isn't relevant to the similar code in + hw/xfree86/common/compiler.h, because x86emu is expected to someday move + out of xserver entirely and so should not depend on any xserver headers. + Also, some platforms apparently do have NO_INLINE versions of + compiler.h. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 24b2b43e85c1e3f3d242ccab8793bf4ef83cfac4 +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 14:53:08 2011 +0200 + + render: Replace __inline with inline. + + Also remove traces from the past. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 9f01249d7f81514a38c44dff2a4a4612dbf97cae +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 15:10:56 2011 +0200 + + configure.ac: Fix help string for mitshm. + + Pasting from ./configure --help's output, one would get: + | configure: WARNING: unrecognized options: --disable-shm + + Fix the help string to include the previously missing “mit” bits. + + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 0caeef6146bee5fb1827ab25db191685dde9d4b4 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Aug 26 16:46:13 2011 -0700 + + Version bumped to 1.11 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 05284a03f9002b03a66ae355b34790ec02b726f0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 4 14:45:46 2011 +1000 + + input: make InputOption opaque, provide interface functions. + + InputOptions is not switched to use struct list for a future patch to unify + it with the XF86OptionRec. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit fcafe825751bef99f4c0b36250ca6f15f127502f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 8 15:21:46 2011 +1000 + + Add null-terminated list interface. + + This is a set of macros to provide a struct list-alike interface for classic + linked lists such as the XF86OptionRec or the DeviceIntRec. The typical + format for these is to have a "struct foo *next" pointer in each struct foo + and walk through those. These macros provide a few basic functions to add to, + remove from and iterate through these lists. + + While struct list is in some ways more flexible, switching legacy code to + use struct list is not alway viable. These macros at least reduce the amount + of open-coded lists. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 79ca7c0b5786a02a80a1c40ed475e928da7c82b3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 12 15:55:48 2011 +1000 + + xfree86: comment typo fix + + in synch → in sync + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2bfb802839688ecf328119c4c6979390fc60348d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 29 16:33:54 2011 +1000 + + dix: don't XWarpPointer through the last slave anymore (#38313) + + This line was introduced pre-1.6 to fix Bug 19297. The effect of warping + through the VCP then was that if a device had custom valuator ranges, the + warp position would be wrong. The better device for this effect is the the + XTest device. + + This fixes a server crash where the lastSlave is a pointer device without + valuators (Bug 38313#0). + + And while we're at it, make sure the Xinerama code-path does the same. + + X.Org Bug 38313 <http://bugs.freedesktop.org/show_bug.cgi?id=38313> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit b29ce0726d55ec41cfbce0814e21b0217ef64efe +Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> +Date: Tue Aug 9 11:00:34 2011 +0900 + + Disable check of double-aligned in test/input.c on Renesas SH + + Renesas SH is not aligned at size of double. + When structure has double value, It is aligned in 4byte (long). + + Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3be379f5076566edaf92c27df5a4d447bcf5d015 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 11 10:59:07 2011 +1000 + + dix: use helper functions in EventIsDeliverable + + Proximity events don't have an XI2 type and caused error messages in the + log when trying to get the event filter. Use this opportunity to + clean up the code, instead of manually setting the fields that + GetEventFilter requires use EventTo(XI2|XI|Core) instead. + + Co-Authored-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 799879797505a5e891ccaec2bea73fd838c94b7a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 11 10:57:05 2011 +1000 + + dix: abstract XI2 filter mask lookup + + Don't access the xi2mask bytes directly or calculate the offsets manually, + use a few helper functions instead. XI2 masks are a bit weird in the event + handling code since they slot onto the legacy code. For core/XI 1.x events, + the event mask is a CARD32. That mask is used together with the event filter + (also 32 bit) to determine if event delivery should be attempted. + XI2 masks are of arbitrary size and their mask is simply the byte of the + mask that contains the event mask. Likewise, the filter is a single byte + matching that mask. Provide helper functions get these bytes and masks in + the right order instead of accessing them manually. + + EventIsDeliverable should be part of this cleanup patch but it will be + gutted with the next patch. + + Co-Authored-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 8c5a4d6fbecf79f2dc4f2d836d741203b2d5e856 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 1 14:12:41 2011 +1000 + + dix: don't use the pointer as modifier device in UngrabKey. + + Modifier device is always the keyboard. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 3a077f246e9ac07a37c1b01c3d321e0f5ceb4153 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 3 15:07:23 2011 +1000 + + input: provide a single function to init DeviceEvents to 0 + + getevents.c already had that function, but XKB was manually initializing it, + causing bugs when the event structure was updated in one place but not the + other. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4b376ddeb4f3c9d9d279ffd2946d88edd5af4cfc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 1 14:20:53 2011 +1000 + + dix: fix compiler warnings ("foo" set but not used) + + devices.c: In function 'AttachDevice': + devices.c:2409:18: warning: variable 'oldmaster' set but not used + [-Wunused-but-set-variable] + + events.c: In function 'ConfineToShape': + events.c:683:15: warning: variable 'pSprite' set but not used + [-Wunused-but-set-variable] + + events.c: In function 'ProcGrabPointer': + events.c:4759:15: warning: variable 'time' set but not used + [-Wunused-but-set-variable] + + getevents.c: In function 'GetMotionHistory': + getevents.c:425:9: warning: variable 'dflt' set but not used + [-Wunused-but-set-variable] + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 6fd2adc179141310e45a56ee90ef5b5f6115a1f6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 1 14:27:54 2011 +1000 + + mi: fix compiler warnings ("foo" set but not used) + + misprite.c: In function 'miSpriteSaveUnderCursor': + misprite.c:940:12: warning: variable 'y' set but not used + [-Wunused-but-set-variable] + misprite.c:940:9: warning: variable 'x' set but not used + [-Wunused-but-set-variable] + + mivaltree.c: In function 'miComputeClips': + mivaltree.c:226:10: warning: variable 'resized' set but not used + [-Wunused-but-set-variable] + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 484cef5b29ef82402a15e155b3b8505b1e4a6830 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 2 09:21:00 2011 +1000 + + Xi: silence compiler warnings (set but not used) + + exevents.c: In function 'UpdateDeviceState': + exevents.c:719:9: warning: variable 'bit' set but not used + [-Wunused-but-set-variable] + + exevents.c: In function 'ProcessOtherEvent': + exevents.c:889:22: warning: variable 'v' set but not used + [-Wunused-but-set-variable] + exevents.c:888:17: warning: variable 'k' set but not used + [-Wunused-but-set-variable] + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 98fe735ea1d756711019c3d90ed6abd9c06abebf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 1 13:52:13 2011 +1000 + + dix: add KEYBOARD_OR_FLOAT and POINTER_OR_FLOAT to GetMaster() + + GetMaster() currently requires an attached slave device as parameter, + resuling in many calls being IsFloating(dev) ? dev : GetMaster(...); + + Add two new parameters so GetMaster can be called unconditionally to get the + right device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit dbbe5735d1451bb32f43bce90f0bcfeff46f9743 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 2 08:54:00 2011 +1000 + + test: add a test for GetMaster() behaviour + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit b3c76b0c53ac42b70d12849da18465e8467e474c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 1 11:54:17 2011 +1000 + + mi: fix comment typo, whitespace in miPointerSetPosition + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit c9562bed0d5e26b7e3e55e26cf1ddc5086d61cc6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 1 09:52:38 2011 +1000 + + dix: rename mieqSwitchScreen argument fromDix → set_dequeue_screen, document + + fromDIX is neither exactly true nor particularly helpful in understanding + what this parameter triggers. Rename to set_dequeue_screen, because that's + exactly what happens. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 09496996accfdaf7bc01097a25db400912004d97 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 28 15:56:08 2011 +1000 + + dix: ignore devices when adding passive core grabs to list (#39545) + + Passive core grabs are mostly device-independent. In an MPX scenario, they + may change to reflect whichever master pair activated the grab last. For + adding new grabs to the list, ignore the device for core grabs to return + failures when trying to set the same grab combo twice on a window. + + X.Org Bug 39545 <http://bugs.freedesktop.org/show_bug.cgi?id=39545> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 80c37048539daa1d257d127d66502bde45c97c85 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 28 15:43:10 2011 +1000 + + dix: avoid using the VCP as modifier device + + Core grabs may change device when they're activated to reflect the master + they apply to. If the device is a keyboard, modifierDevice is erroneously + set to the Virtual Core Pointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 20a61845d3c93c337bf3331a6bac30cf66c2a293 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 9 11:21:06 2011 +1000 + + config: use add_option for '_source' too + + _source was being allocated manually, with all other options added to that + list through add_option. Skip the manual part, allocate the first option + _source with add_option too. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit d33652dad8838ab0a9175ca4613a3161ebc5676f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 9 11:20:31 2011 +1000 + + config: return the new InputOption from add_option. + + Change add_option to return the new InputOption on success, or NULL + failure. This way we can at least check for errors in callers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit e684e816acb617b4dc66a68e2b0ba8f80399170a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 20 16:21:28 2011 +1000 + + config: fix a log message + + PRODUCT was taken from the parent, hence ppath. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 1357cd725143c1a35e32f15df658de111b151692 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 8 16:13:45 2011 +1000 + + Revert "Attempt to add the 'mouse' driver in more situations." + + This reverts commit 43d9edd31e31b33b9da4a50d8ab05004881c8d5a. + + This commit was introduced in the 1.2 cycle when hotplugging was less than + ideal (i.e. it didn't exist). From the commit message: + + Always add a mouse driver instance configured to send core events, unless + a core pointer already exists using either the mouse or void drivers. This + handles the laptop case where the config file only specifies, say, + synaptics, which causes the touchpad to work but not the pointing stick. + We don't double-instantiate the mouse driver to avoid the mouse moving twice + as fast, and we skip this logic when the user asked for a void core pointer + since that probably means they want to run with no pointer at all. + + To get this case above, a user would need to disable hotplugging _and_ have a + xorg.conf that only references one device. This is possible, but not a use-case + we should worry about too much now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 159b03e13760920274b573a2bccdbf6a79f059e7 +Author: Lennart Poettering <lennart@poettering.net> +Date: Mon Jul 18 21:19:23 2011 +0200 + + config: add udev/systemd multi-seat support + + Add support for multi-seat-aware input device hotplugging. This + implements the multi-seat scheme explained here: + + http://www.freedesktop.org/wiki/Software/systemd/multiseat + + This introduces a new X server switch "-seat" which allows configuration + of the seat to enumerate hotplugging devices on. If specified the value + of this parameter will also be exported as root window property + Xorg_Seat. + + To properly support input hotplugging devices need to be tagged in udev + according to the seat they are on. Untagged devices are assumed to be on + the default seat "seat0". If no "-seat" parameter is passed only devices + on "seat0" are used. This means that the new scheme is perfectly + compatible with existing setups which have no tagged input devices. + + Note that the -seat switch takes a completely generic identifier, and + that it has no effect on non-Linux systems. In fact, on other OSes a + completely different identifier scheme for seats could be used but still + be exposed with the Xorg_Seat and -seat. + + I tried to follow the coding style of the surrounding code blocks if + there was any one could follow. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 95772598b57f6054fbf88683fa0a492c77605790 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 8 16:10:07 2011 +1000 + + xfree86: use xf86AllocateInput for implicit devices too + + Slowly merging the vastly different code-paths. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit fa8f4652819b692faaf2789cf32d7fa99fbb34aa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 15:02:20 2011 +1000 + + xfree86: factor out adding/removing a device from the input device array + + No functional changes, just readability improvements. This also gets rid of + the count variable. Count was just used for resizing the null-terminated + list. Since we're not in a time-critical path here at all we can afford to + loop the list multiple times instead of keeping an extra variable around. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 5b5477c05f691205064ca4d8034f8dd47ab975b7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 14:14:11 2011 +1000 + + xfree86: update comment for InitInput + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 7354f607833c69626d8692bc5176b18ea1cf6263 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 14:26:13 2011 +1000 + + xfree86: nest loops instead of 0x1 pointers. + + If we find the core device, move all other device pointers forward right + then and there. The break will jump out of the top loop. + + They had a special on braces today, so I added some for readability (and + fixed up tab vs space indentation. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 5669aa2d24dff9ab276e5f74a09f97ec77b90e75 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 14:05:30 2011 +1000 + + xfree86: improve readability of synthesized device. + + No functional changes. + + The options we assign are the ones from the Pointer/Keyboard device so we + might as well use those readable names instead of dev[count-1]->options. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 5aa826cdd1f2e768bedf23d399703a5d0b6302be +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 13:52:11 2011 +1000 + + test: add a option duplication test + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 4527e2b776cfcdac2b189b5439b9a3d0b6433077 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 13:46:24 2011 +1000 + + xfree86: when implicitly choosing a core device, set the option to a value + + Devices are core pointers/keyboards by default now anyway, but let's set the + option to some value instead of just NULL. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 44d53728a6a533fc0a6e0a10269d1cc99e9dad32 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 13:44:44 2011 +1000 + + xfree86: don't warn about duplicate core devices + + It doesn't matter. All devices are core pointer devices by default now + anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 033f53c223dc12a91f00e10a69f87a4f2a7adb6b +Author: Daniel Kurtz <djkurtz@chromium.org> +Date: Mon Aug 8 15:09:48 2011 +0800 + + xf86Helper: use LogHdrMessageVerb in xf86VDrvMsgVerb + + LogHdrMessageVerb allows passing a parameterized header to insert in a log + message between MessageType and the formatted message body string. + + Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cd8ee3e5cb29b9cd6402d2fbc71463c6b04b6077 +Author: Daniel Kurtz <djkurtz@chromium.org> +Date: Mon Aug 8 15:09:47 2011 +0800 + + xf86Helper: use LogHdrMessageVerb in xf86VIDrvMsgVerb + + LogHdrMessageVerb allows passing a parameterized header to insert in a log + message between MessageType and the formatted message body string. + + Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b31d104fc09a7241856ff8d226be11ec562beac3 +Author: Daniel Kurtz <djkurtz@chromium.org> +Date: Mon Aug 8 15:09:46 2011 +0800 + + os/log: Add LogVHdrMessageVerb and friends + + LogVHdrMessageVerb allows a custom header to be inserted in a log message, + between the Log system's MessageType string, and a formatted variable + message body. The custom header can itself be a formatted variable string. + + These functions can be used, for example, by driver abstraction layers to + format specific driver messages in a standard format, but do it in a way + that is efficient, obeys the log-layers verbosity settings, and is safe + to use in signal handlers (because they don't call malloc), even for + types besides X_NONE. + + Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b82f934db661c59d7397ce180d08cf8f8f7118b1 +Author: Daniel Kurtz <djkurtz@chromium.org> +Date: Mon Aug 8 15:09:45 2011 +0800 + + os/log: Pull LogMessageTypeVerbString out of LogVMessageVerb + + Also, optimize how the type and format strings are combined. + + Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> + Reviewed-by: Guillem Jover <guillem@hadrons.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Apr 21 16:37:11 2011 -0400 + + fb: Fix memcpy abuse + + The memcpy fast path implicitly assumes that the copy walks + left-to-right. That's not something memcpy guarantees, and newer glibc + on some processors will indeed break that assumption. Since we walk a + line at a time, check the source and destination against the width of + the blit to determine whether we can be sloppy enough to allow memcpy. + (Having done this, we can remove the check for !reverse as well.) + + On an Intel Core i7-2630QM with an NVIDIA GeForce GTX 460M running in + NoAccel, the broken code and various fixes for -copywinwin{10,100,500} + gives (edited to fit in 80 columns): + + 1: Disable the fastpath entirely + 2: Replace memcpy with memmove + 3: This fix + 4: The code before this fix + + 1 2 3 4 Operation + ------ --------------- --------------- --------------- ------------ + 258000 269000 ( 1.04) 544000 ( 2.11) 552000 ( 2.14) Copy 10x10 + 21300 23000 ( 1.08) 43700 ( 2.05) 47100 ( 2.21) Copy 100x100 + 960 962 ( 1.00) 1990 ( 2.09) 1990 ( 2.07) Copy 500x500 + + So it's a modest performance hit, but correctness demands it, and it's + probably worth keeping the 2x speedup from having the fast path in the + first place. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ac2c307f4716ebd3e955c004ceec9f4c029401a0 +Author: Pelle Johansson <pelle@morth.org> +Date: Sun Aug 14 17:44:40 2011 -0700 + + XQuartz: Initialize darwin pointer valuators + + This fixes a regression introduced by: 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde + + http://xquartz.macosforge.org/trac/ticket/498 + + Signed-off-by: Pelle Johansson <pelle@morth.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4020cab88f5cf3164fc83cf912f94f288aa5a45d +Author: Michel Dänzer <michel.daenzer@amd.com> +Date: Wed Aug 10 11:36:16 2011 +0200 + + EXA/mixed: Update sys_pitch in MPH even when there's no system memory copy. + + Otherwise sys_pitch will be stale when a system memory copy is allocated. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38322 and a crash when + unlocking the screen with xscreensaver, reported by Janne Huttunen. + + Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> + Tested-by: Janne Huttunen <jahuttun@gmail.com> + Tested-by: Jan Kriho <Erbureth@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a1dec7cd6adabaf8770dc3b21b0df30ce2f0bc8d +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Jul 7 19:18:03 2011 +0200 + + Xephyr/dri: register screen and window privates on init + + Fixes assertion failure when calling dixSetPrivate + Debian bug#632549 <http://bugs.debian.org/632549> + + Reported-and-tested-by: Mohammed Sameer <msameer@foolab.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 39bc81b60ddc9e495ff3b9bb3c3a6c39e547b43a +Author: Keith Packard <keithp@keithp.com> +Date: Wed Aug 3 20:57:03 2011 -0700 + + Version bumped to 1.10.99.902 (1.11 RC2) + + At the close of the 1.11 non-critical fixes window. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9504caf1c3243e3ab2eb7126bc2bb876a8f89918 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri May 6 18:19:34 2011 +0300 + + composite: Inhibit window background paint with manual subwindow redirection + + The composite extension spec says that window background painting + should be inhibited when the subwindow redirection mode is set to + manual. + + This eliminates the ugly flashing effect when compiz unredirects a + fullscreen window. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Owen Taylor <otaylor@fishsoup.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f1d75f3b742231c4c09f13d7a22ed920014cb5ef +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Thu Jul 28 15:17:59 2011 -0700 + + Revert "composite: Don't backfill non-MapWindow allocations" + + This reverts commit db8840600e8e21356241eb87395031388d9b54d2. + + It was an optimization for the resize case, but 193ecc8b453b22 made + it so that no backfilling takes place on resize if left in. + + Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + + Conflicts: + + composite/compalloc.c + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e87adcc9e024982fdad974de2876b00cf974dab8 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jul 31 21:14:59 2011 +0200 + + Xquartz: include new localization files in the tarball + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a1bb5062c72667b2f10b56925c61888acc89e3e4 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Jul 21 10:33:58 2011 -0700 + + XQuartz: xpr: Don't FatalError if xp_unlock_window fails + + We added the FatalError in 5d1d9d9ae39fab2ee2ac085f9776f82768828dc8 but + it caused a regression http://xquartz.macosforge.org/trac/ticket/482 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c319f7b5b3ee651636cdfd165588f0dc972a22a4 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jul 20 00:16:42 2011 -0700 + + XQuartz: Use CFSTR to avoid implicit cast warning of NSString * to CFStringRef + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 08dfff92e8d0c2b1726634392c147f6634d1706d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Jul 29 16:12:06 2011 -0700 + + randr: Compare all the bytes in RRPostPendingProperties + + RRPostPendingProperties tries to compare the pending and current + property values to decide whether they're actually changing. However, + it does this using a memcmp that passes in pending_value->size as the + number of bytes. This is actually the number of elements, where each + element is (pending_value->format / 8) bytes long. This causes the + pending value to not be propagated if the first pending_value->size + bytes are the same and only the end of it is changing. + + Fix this by computing the total number of bytes to compare in the + memcmp. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b8f61c11c94708d4f17720a55945dee4621315a4 +Merge: 5596f10 f51e42f +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jul 29 14:58:58 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit f51e42f583073bde0bc8131887cb7220636c8855 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 20 13:09:05 2011 +1000 + + Terminate the log with one last message. + + Instead of just closing the log when everything is done, put one more + message in stating that we're actually terminating. Users or scripts that + look at the Xorg.log will then know that a) the server has terminated + properly and b) why the server terminated (to some degree, given that most + real-world errors will be caused by AbortServer()). + + Acked-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Tested-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 01de08c7d2c00eef238adba6665896ea3cd7d511 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Jul 26 20:40:38 2011 +0200 + + configure: set default xkb rules to evdev on Linux + + If config/udev was enabled, this would default to base, which means that + after regen the devices would get the wrong rules, and hilarity would + ensue. + + It's probably safe to default to evdev unconditionally on Linux by now. + + Reported-by: Bastian Blank <waldi@debian.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3798dd379c1ecf325f9907128fb66d20372f6876 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 20 09:00:18 2011 +1000 + + Initialize the fd to -1 for xorg.conf input devices. + + For hotplugged devices, xf86AllocateInput does that for us but the xorg.conf + path is different. Since not all drivers reset the fd during PreInit but may + still call close(pInfo->fd) in all cases, this can terminate the logging + early. + + Reproducible: add a wacom driver InputDevice section with no Option Device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit f2a6735cfc07789cca81852b24a85578f200d83d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 12:34:32 2011 +1000 + + xfree86: NULL option values are technically valid, don't strdup them + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit f0d7e9db28c374a3db359bcb63a7ce79fd84b541 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 4 14:14:39 2011 +1000 + + xfree86: duplicate xorg.conf device information before xf86NewInputDevice + + xf86ConfigLayout.inputs contains the information from the xorg.conf + file. Passing this into xf86NewInputDevice means the device will get + cleaned up on exit and the pointers in xf86ConfigLayout.inputs are left + dangling. In the second server generation, this results in a server + crash. + + Also, rename pDev to pInfo. pDev is pretty much reserved for DeviceIntPtr + types. + + Reproducible: AutoAddDevices off and xorg.conf input sections, trigger + server regeneration. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 8ffddbcf72170e246826ee0f39f18989a29fa218 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 27 16:30:28 2011 +1000 + + xfree86: Remove devices that failed to enable on startup + + Devices that succeeded during PreInit and DEVICE_INIT but failed in + DEVICE_ON would be deleted through xf86DeleteInput but not removed from the + list of input devices (and not turned off). The result was a double free on + server shutdown. + + Fix this by calling RemoveDevice if EnableDevice fails. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 6cea28fe4b7a4a22ad270d8c71403db84a9bfb2c +Author: Lennart Poettering <lennart@poettering.net> +Date: Mon Jul 18 21:18:27 2011 +0200 + + config: don't fail if a device vanished by the time we managed to look at it + + The nature of hotplug is that a device we enumerated might already be + gone by the time we look at it, so don't assume otherwise. + + Signed-off-by: Lennart Poettering <lennart@poettering.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f13de9ca1b7c4dd0dd5c08037c6bd53f88ac30f5 +Author: Lennart Poettering <lennart@poettering.net> +Date: Mon Jul 18 21:17:49 2011 +0200 + + config: limit the kernel subsystems we look for devices in + + Don't enumerate/monitor all devices of the system (since that can be + quite a few), but limit our search to devices from the "input" + subsystem, as well as the "tty" subsystem (to cover Wacom tablets). + + This should make X start up a bit faster and reduce the number of + unnecessary wake-ups of the X server. + + Signed-off-by: Lennart Poettering <lennart@poettering.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 882e3c2680c339ad7aa0d664e0b0f02b8a05b11d +Author: Lennart Poettering <lennart@poettering.net> +Date: Mon Jul 18 21:17:10 2011 +0200 + + config: process udev "changed" and "add" events in the same code paths + + udev gives no guarantee that before each "changed" event for a device + there's an "add" event, or that before each "remove" is an "add", or + that before each "add" there was no "add" already and so on. Users can + trigger these events at any time with "udevadm trigger", and netlink is + a lossy transport, hence the events can come in unexpected ordering. + + With other words: regardless which event is generated, the X server must + not choke on it and make the best of it, hence make sure that if we get + an "add" event for an existing device we don't add the device a second + time. + + Signed-off-by: Lennart Poettering <lennart@poettering.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5596f10cce58295d8af73646352b314ecb3ddfca +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Jul 9 13:21:04 2011 +0100 + + Remove hw/xwin/xlaunch + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 73864a87aacbce85b520ccaa6e360b82c0e99716 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 19 20:03:48 2011 -0700 + + XQuartz: Localization updates + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit d2463df84d3a160b2dd1e706b02985e1817784e3 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 19 20:02:33 2011 -0700 + + XQuartz: Add english NIB changes for scroll_in_device_direction + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit e36e7ad6314ca5fcd3292b8022f0a618d567d72b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 19 20:01:11 2011 -0700 + + XQuartz: Add GUI controls to toggle scroll_in_device_direction + + Also cleaned up the wording for fullscreen_menu. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ac43984215faf464fd48bd006cac1c6539603cea +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 19 20:00:27 2011 -0700 + + XQuartz: Add a scroll_in_device_direction preference + + This preference allows users to override the related option in Mac OS X's + Mouse/Trackpad preferences. This effectively lets the user determine + which "context" all of X11 fits into for context-based scrolling until + such API exists within X11 itself to pass along to X11 clients. + + This is applicable to Mav OS X 10.7+ + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ec95a9c829b8e37529aa828c05fbaabc45cffe42 +Author: George Staplin <gstaplin@apple.com> +Date: Wed Mar 4 02:03:52 2009 -0700 + + XQuartz: Add diagnostic error checking to xp_destroy_surface. + + This occurred to me in hindsight after the last commit. If the + original developer had done this, we would have noticed the + problem sooner. + (cherry picked from commit aa0a57996f3e7d16238f69976958c2526821388b) + +commit 4fe7df265324f63025686efe9d32342e3cef40d3 +Author: George Staplin <gstaplin@apple.com> +Date: Wed Mar 4 01:39:58 2009 -0700 + + XQuartz: Fix a memory leak with surfaces that a new test found. + + xp_destroy_surface was called with a surface id of 0, due to some + premature cleanup that set it to 0. This means the surfaces + weren't being destroyed until the window was. + + The code that did that was: pDRIDrawablePriv->sid = 0; + + In long running applications this leak may or may not have been + harmful. With the old libGL the surfaces weren't destroyed until + the context was destroyed or a new context created. In the new + libGL they are reference counted, and released much sooner, so we + ran into a resource leak more noticeably with some tests. + + Make the Apple DRI code dispatch events to the client(s) for + destroyed surfaces, when a resource is destroyed. This seems to + work in my tests, however this clearly wasn't working for a while, + so bugs may result in the future if it enables some new (unexpected) + side effects. + + Also add a few helpful comments to aid in understanding the code + in the future. + + Tested with the test suite, Pymol, and various Mesa demos. + (cherry picked from commit bede83eb19a1629396fcd5a46441f8476a8fcd1b) + +commit 0ebe45a717faa6464d3b1ab73e30570518ee4798 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 19 19:42:44 2011 -0700 + + XQuartz: DRI: Dead code removal + + Also add some comments that weren't merged in from server-1.4-apple's + 99babae1326485c27eb9253db83afdd6aef9e362 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 88ad050f3c2f9f11bafb56a8cf777518795295a9 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Jul 18 22:54:21 2011 -0700 + + XQuartz: Add some sanity checking and a fallback for the bundle id. + + This way we'll print an error and still mostly work rather than crashing if + someone installs XQuartz.app incorrectly or tries running the server within + the build system rather than the installed system. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 89bfa0c633f3096cca6f983bca1507d3f4b902a8 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Jul 15 10:39:39 2011 -0700 + + XQuartz: DarwinEQFini doesn't return Bool + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 82f5521a6d91ebcd2a4400f6c221ad625edc99a1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 13 12:08:04 2011 +0100 + + XKB: Work around broken interps from old xkbcomp + + Bugfix for broken xkbcomp: if we encounter an XFree86Private action with + Any+AnyOfOrNone(All), then we skip the interp as broken. Versions of + xkbcomp below 1.2.2 had a bug where they would interpret a symbol that + couldn't be found in an interpret as Any. So, an + XF86LogWindowTree+AnyOfOrNone(All) interp that triggered the PrWins + action would make every key without an action trigger PrWins if libX11 + didn't yet know about the XF86LogWindowTree keysym. None too useful. + + We only do this for XFree86 actions, as the current XKB dataset relies + on Any+AnyOfOrNone(All) -> SetMods for Ctrl in particular. + + See xkbcomp commits 2a473b906943ffd807ad81960c47530ee7ae9a60 and + 3caab5aa37decb7b5dc1642a0452efc3e1f5100e for more details. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c177a5bcaa170d24a784540460906cc04ac5c752 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 13 12:08:03 2011 +0100 + + Fix non-Composite builds in PrintWindowTree + + The previous patch accidentally introduced a hard dependency on + Composite. Sorry, OS X. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reported-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 01dbf2514aa0cc8c40a876a24e3cb0737c41da19 +Merge: 5a801af af0fbc3 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 13 11:44:15 2011 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 5a801af689fce9dfe84453bbc2b029cb4782de83 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Jul 12 19:50:05 2011 -0400 + + XWinrc: replace hard coded section number with __filemansuffix__ + + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit af0fbc37e35ddaabf12a8d7abc79ea11958ec8ac +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jun 23 07:45:13 2011 -0400 + + XWinrc: replace hard coded section number with __filemansuffix__ + + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 42bc198775a78b328612427c4c8ed4d17e005ae9 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 24 18:29:41 2011 +0000 + + glx: Remove a few lingering traces of __GLXscreen.GLXVersion + + The GLXversion member of the __GLXscreen struct + is just cruft since commit ad5c0d9efa47476ed5cf75c82265c73919e468b4, + when we started returning the minimum GLX version supported by all + of the screens on the display, rather than the maximum version supported + by the server. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 005e68ba59782b60dd5c44a06c75b1fa5e8d70d8 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Jan 20 16:21:04 2011 +0000 + + hw/xwin: Add -wgl option to XWin manpage + + Document the -[no]wgl options in the XWin manpage + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d62726019e4b7bfac8a23d0d733677b141047d66 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Nov 2 11:38:53 2010 +0000 + + hw/xwin: Add items to WGL AIGLX todo + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 276735ef5d12e79fe051996f100c5730c1e69334 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Oct 11 16:22:49 2010 +0100 + + hw/xwin: Report Window XIDs in Window debug messages + + Report Window XIDs in Window create/destroy/reparent debug messages + + It's actually quite useful if you are trying to corrolate those events + with what a client is doing... + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b0b54338e2f8aed6e6a683ebddd2a2acbefabecd +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Oct 11 16:25:03 2010 +0100 + + hw/xwin: Add a flag to track which windows have been drawn to using WGL. + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 98c6d91a48f460fdbca93700ab637eadf946fb0e +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Thu Mar 24 20:39:51 2011 +0000 + + hw/xwin/glx: Fix some warnings in generated wrapper code + + Add a suitable cast to the generated code for glWinSetupDispatchTable() + so it doesn't generate screeds of warnings + + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b67e80c84e4af54007aa1bd1e4a97a4d1b3d3765 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 24 18:41:05 2011 +0000 + + hw/xwin/glx: Handle failure to get any fbconfigs more gracefully. + + Handle failure to get any useful pixel formats for GLX fbconfigs + more gracefully: If we didn't get any useful pixel formats from + wglGetPixelFormatAttribivARB(), fall back to using DescribePixelFormat(). + If that doesn't give us any useful pixel formats, fallback to software + rendering. + + This works around a problem with Intel 845G drivers, where + wglGetPixelFormatAttribivARB() doesn't seem to work as we expect it to... + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 9915b169237e3b2d817bd3d4455f3c01dd7dd2b5 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Nov 1 19:53:42 2010 +0000 + + hw/xwin/glx: Don't spam log with wglwrap symbol resolution status at startup + + ... instead just log if an attempt is made to call a wrapper for + a function which didn't resolve + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 8216316867f07819b8e8b377f2633fbf8876abf7 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Oct 30 17:23:52 2010 +0100 + + hw/xwin/glx: Better handling of SetPixelFormat() failure + + Propagate and report the failure if SetPixelFormat() fails + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit eecc8e06eb4bdfd4354144206d990cd9ccb69721 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Oct 30 17:22:33 2010 +0100 + + hw/xwin/glx: Improvements to glxWinErrorMessage() reporting in WGL GLX provider + + Request the message using languageID 0 (best effort), rather than only using language neutral messages + Always report the numeric error code. + Trim any trailing \r from FormatMessage() output + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 3873be16d050ab12fc78f1e7f0c36c2ac88d0a98 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Oct 11 16:21:40 2010 +0100 + + hw/xwin/glx: Fix fbconfig dumper formatting for 3 digit index numbers + + Some graphics hardware supports hundreds of pixel formats, so adjust + formatting in fbconfig dumper for 3 digit index numbers + + Also report the PFD_SUPPORT_DIRECTDRAW, PFD_DIRECT3D_ACCELERATED and + PFD_SUPPORT_COMPOSITION flags introduced with aero + + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d4096abb591353405417e53816e5c46e904e7b25 +Merge: 61f87a7 87d4f90 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jul 1 15:45:45 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 87d4f90bfcb509471ac9e7886e14a92b33223fd7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 27 09:10:42 2011 +1000 + + input: free the EQ allocated memory on shutdown (#38634) + + mieqFini() already does the right thing, but it needs to be called by the + various DDXs and the XTest Extension. + + X.Org Bug 38634 <http://bugs.freedesktop.org/show_bug.cgi?id=38634> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Acked-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e084ac30b37c36016bb0dbb1b79e60a7799aee02 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 2 14:52:42 2011 +0000 + + Input: Reset SD remainder when copying co-ords from MD + + In updateSlaveDeviceCoords, pDev->last.valuators was being copied from + the master, but pDev->last.remainder wasn't. Make sure we copy both, to + avoid minor inconsistencies. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 23a783278963919778d017965542e0f983814e37 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 24 11:02:23 2011 +1000 + + input: add POINTER_NORAW to avoid generation of raw events (#30068) + + RawEvents are supposed to be events coming from the driver. When warping the + pointer, this should not generate a raw event. + + X.Org Bug 30068 <http://bugs.freedesktop.org/show_bug.cgi?id=30068> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9444e40d77508d545e3c0a8123f61950c22d89fa +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Mar 1 11:11:22 2011 +0000 + + Test: Input: Only ever set up to MAX_VALUATORS valuators + + Previously, the input tests were working up to sizeof(mask) * 8, which + could be more than the arrays; the latter only being sized as + MAX_VALUATORS. + + Hypothetically, if you were switching the stored valuator values to + double instead of uint32_t, and you attempted to set the 39th member of + a MAX_VALUATORS-sized (36) array, you'd probably end up smashing + ev->key_repeat into oblivion and then tripping the check for invalid + flags because you haven't yet put XIPointerEmulated into the valid flags + for XI_Motion. Probably. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1e65a01cf73f1fbdfe0d63eaecea412cf8472cb4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jun 17 16:28:05 2011 +0100 + + Test: Ensure libxservertest gets relinked when necessary + + Similar to how we link Xorg, make sure that whenever any of the + component libraries changes, we relink libxservertest and the tests. + Not much use testing anything other than the actual source in your tree. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0f41d6c851df76d0423d9c37ad809d3440906944 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jun 17 13:20:19 2011 +0100 + + KDrive: Remove useless miPointerUpdateSprite call + + miPointerUpdateSprite is already called from mieqProcessInputEvents, so + calling it by hand immediately after isn't massively helpful. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 57b767d2927e5c2e561a431be4e604df65423422 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jun 17 13:19:46 2011 +0100 + + DMX: Remove useless miPointerUpdateSprite call + + miPointerUpdateSprite is already called from mieqProcessInputEvents, so + calling it by hand immediately after isn't massively helpful. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cf398755c0ca1e031514862b670956e7b9ace5ef +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jun 17 15:29:44 2011 +0100 + + XWin: Remove executable bit from headers + + Headers don't really need to be mode 0755. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7d2543a3cb3089241982ce4f8984fd723d5312a1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 29 12:03:01 2010 +0000 + + XKB: Add debug key actions for grabs & window tree + + Add four new private XKB actions for debugging: + * PrGrbs: print active grabs to the log file + * Ungrab: ungrab all currently active grabs + * ClsGrb: kill clients with active grabs + * PrWins: dump the current window tree to the log file + + To use these, you need to modify your XKB maps, e.g. the following to + have Ctrl+Alt+(F9-F12) mapped to the above: + - compat/xfree86: + interpret XF86LogGrabInfo { + action = Private(type=0x86, data="PrGrbs"); + }; + interpret XF86Ungrab { + action = Private(type=0x86, data="Ungrab"); + } + interpret XF86ClearGrab { + action = Private(type=0x86, data="ClsGrb"); + } + interpret XF86LogWindowTree { + action = Private(type=0x86, data="PrWins"); + } + + - symbols/pc: + key <FK09> { type="CTRL+ALT", [ Return, XF86LogGrabInfo ] }; + key <FK10> { type="CTRL+ALT", [ Return, XF86Ungrab ] }; + key <FK11> { type="CTRL+ALT", [ Return, XF86ClearGrab ] }; + key <FK12> { type="CTRL+ALT", [ Return, XF86LogWindowTree ] }; + + At the moment, this only works if the grabbing client continues to call + AllowEvents, as the server does no event processing at all when a device + is frozen. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ddf735fd4e9658bb5610f5e911f3b4055d5acf89 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Oct 13 19:56:57 2009 +1100 + + DIX: Make PrintWindowTree actually useful + + Rewrite PrintWindowTree to make it actually tell you what you want to + know. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b27d61e4433a2a0140ed8a6128e4427451e37fec +Author: Matěj Cepl <mcepl@redhat.com> +Date: Fri Jun 17 15:26:17 2011 +0100 + + Fix UTF-8 encoding + + Report to find out all non-UTF-8 files created by + + cat extensions |xargs -I XXXX find . -name \*.XXXX |while read FILE ; do + if ( iconv -f utf8 -t ucs2 $FILE >/dev/null 2>/dev/null ) ; then + /bin/true + else + echo $FILE + fi + done >>report + + Signed-off-by: Matěj Cepl <mcepl@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + + [Daniel: git am failed for me, so I redid it. The method listed in the + commit message also failed, so I just used file/grep/iconv. The + results are the same though.] + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2ee85d954c8f3a6affbd9b1b745594ff12e8b670 +Author: Scott James Remnant <scott@netsplit.com> +Date: Tue Jun 14 16:36:07 2011 -0700 + + dix: avoid calling deleted block and wakeup handlers + + BlockHandler and WakeupHandlers may be removed within a different + BlockHandler or WakeupHandler, especially since config/udev uses + these and removes devices. + + Calling the deleted handlers and passing potentially freed data + can result in the X server segfaulting after device removal, or + events that result in device removal such as undocking or suspend/ + resume. + + Signed-off-by: Scott James Remnant <scott@netsplit.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b573cdd40ee49fae299fe2e7cbd02159ae8ae617 +Author: Marcin Slusarz <marcin.slusarz@gmail.com> +Date: Tue Jun 7 21:22:15 2011 +0200 + + dri2: restore Screen->ConfigNotify on close + + ConfigNotify is set by DRI2ScreenInit, but not restored to + previous state on close. Fix it. + (I'm preparing a patch for xf86-video-nouveau which detects GPU lockup + after dri2 init and it needs to reinitialize dri2) + + Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 61f87a75f2bcda939a1778d39be8cfa5c886e6d8 +Merge: 0d2153a 72d9143 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 29 20:14:51 2011 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit 0d2153a46cc72d5f2e6a9081a3cf153aa3eb7787 +Merge: b631c39 932513e +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 29 20:08:32 2011 -0700 + + Merge remote-tracking branch 'jbarnes/master' + +commit b631c39a21c8d74fd00b8932df342d6921cce8f4 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jun 23 13:37:45 2011 -0400 + + Remove unused check for PERL program + + Unable to find any use of the PERL Automake variable. + It was used in hw/xfree86/scanpci around 2005. + Should it ever be needed, use XORG_WITH_PERL macro. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d5ca33ca2dd08e8436439da926d2dedaabc268fa +Merge: 38d55f0 4edf49d +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 29 18:54:33 2011 -0700 + + Merge remote-tracking branch 'kibi/master' + +commit 72d914335c9ad0e0f4a34b9f7e2901b830c499bf +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Tue Mar 23 04:34:22 2010 -0500 + + Cygwin/X: Left-justify website link in About box + + Left-justify website link in About box. This is a cosmetic fix to make + the About box display correctly when Windows is configured with a + non-default DPI value + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit e78628406f0428454983db1c51a8c828bf5684e5 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Aug 12 15:00:01 2010 +0100 + + Cygwin/X: Preserve client area size and position on Windows window style change + + When the style changes, adjust the window size so the client area remains the same. + + Otherwise the window size may change when sizing is reflected from Windows to X, and + some windows are drawn expecting them to be exactly the requested size (e.g. the + gmplayer control window) + + Use DeferWindowPos to delay the resize to preserve client area on WM_STYLECHANGING + until after the style change has actually happened in WM_STYLECHANGED + + As a consquence of this, we need to be more careful to create windows with exactly + the requested placement and client area initially, so the client area matches what + the X client requested + + Also synchronize the X windows idea of the placement of a window which Windows is + allowed to place + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 1d7f3a0031b4ae7d8aa984799ffa578788061ce4 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Nov 7 19:34:12 2009 +0000 + + glx: Move GLX extension string utility functions + + Move GLX extension string utility functions from the DRI1 convenience library + into the GLX extension convenience library, so other DDX which don't have DRI + can use them. + + This is probably also needed if anyone actually tries to build an Xorg DDX + with only DRI2 support... + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit 932513e23b5fe1793cc38eabe02df82e1cc6e4d9 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Thu May 5 13:11:46 2011 -0700 + + DRI2/GLX: use new swap event types + + Use the new event types so we can pass a valid SBC value to clients. + Fix up the completion calls to use CARD32 instead of CARD64 to match + the new field size. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit a3cb7d097a281252cebbc3c65c67149e106482ac +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Tue May 3 10:36:44 2011 -0700 + + GLX/DRI2: pass drawable correctly for indirect swap events + + Pass the right drawable pointer as data to the swap complete function. + + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 3e8270b869ebf788778d5d56107f6d47c7c050d0 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Apr 12 15:30:25 2011 -0400 + + glx: Fix fbconfigs with no corresponding visual + + There are, in general, more fbconfig depths than visual depths. + fbconfigs need not support Window rendering, however any that do must + have an associated visual ID (which we got right), and any that do not + must not claim GLX_WINDOW_BIT in GLX_DRAWABLE_TYPE (which we got + wrong). + + Fixes piglit/glx-fbconfig-sanity, assuming you have a sufficiently + recent piglit, as that test formerly wrongly required pixmap-capable + fbconfigs to have a visual. + + v2: Additional check for fbconfigs that didn't have GLX_WINDOW_BIT in + the first place, from previous patch by Jon TURNEY; also, also clear + ->visualID. + + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 38d55f06cfbf4b05fee0aef8f97f90e835beaacb +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jun 27 15:06:16 2011 +0100 + + Guard use of backtrace() with HAVE_BACKTRACE + + Guard the use of backtrace() with HAVE_BACKTRACE, since we already + have the autoconf machinery for setting that. + + For the moment, assume dladdr() is available when backtrace() is + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit bea57392c724f439987832b422941ae897953e4a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Jun 25 11:29:53 2011 -0700 + + XQuartz: Fix Makefile dependencies + + automake generates _DEPENDENCIES from _LIBADD, but it strips out variables. + This resulted in not relinking if some components were rebuilt (like + libdix, libos, etc). + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c8b80a82d97d92d445c1c0af6dba42c9de7c56cd +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jun 21 21:14:46 2011 -0700 + + XQuartz: Make a call to activateIgnoringOtherApps in our NSApplicationActivatedEventType handler + + In addition, this change will not call into the X11 activation unless an X11 + window was active when we deactivated. We can't rely on the event and current + key windows because the key window will be nil until activated, and the event + will only reference the window if the window was clicked (whereas it will be + nil if we activated via dock or cmd-tab). + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 9d568450b1319e9057319ebb37e76003bcba447d +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 28 09:33:25 2011 -0700 + + Create sdksyms.dep in the right place at configure time + + sdksyms moved from hw/xfree86/loader to hw/xfree86, so the + configure-time create of sdksyms.dep needs to reflect that + change. Otherwise, make might be confused by a missing file and (more + importantly to me) hw/xfree86/loader/sdksyms.dep will be left around + after 'make clean' causing 'make distcheck' to fail. + +commit f968f4ace9410d827fb6b68c4e38ea9516641309 +Merge: 4dbed26 163441f +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 28 09:10:14 2011 -0700 + + Merge remote-tracking branch 'dbn/no-libxorg' + +commit 4dbed2625431a92e20bede7b8cef847b5d5d99ba +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 27 14:45:18 2011 +1000 + + xfree86: Only log the serial bytes if debug is on. + + Introduced in e3f296d91dfe6b827195e1d387e1a04aa73b85c3, when the ifdef DEBUG + around the whole block was removed, but only two of the three ErrorF + switched to DebugF. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 163441fe531a77f7fa54bfa59c5ab49c78f44306 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Tue Jun 14 20:03:06 2011 -0700 + + xfree86: Remove libxorg convenience library to speed up build + + libxorg.la served to collect all the Xorg convenience libraries into one + massive archive to link into Xorg. This made things easy for symbol + resolution, but it tremendously slowed down the build since each change + caused libxorg.la to be rebuilt. This is an extremely slow process of + extracting all the objects from the sub-libraries and recombining them. + + Instead, the archives are linked directly into Xorg. The order of the + libraries had to be tweaked a bit to make symbols resolve correctly with + the lower level code moving later in the link command. + + As a side effect, since the dtrace objects are now being linked + directly into Xorg, we don't need the SPECIAL_DTRACE_OBJECTS hack to + add them twice. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Tested-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6259b30111f568ec3d1b32dc6382bce46d8e6ccc +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Tue Jun 14 19:47:02 2011 -0700 + + xfree86: Move sdksyms generation to ddx toplevel + + The symbols in sdksyms.c cover the entire source tree. In order to make + them resolve when libxorg.la goes away, move the objects from libloader + to Xorg. Unfortunately, this means sdksyms needs to get built again for + the test code. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Tested-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7d5c8a12cbc295b3e33e1b60bd7330e2bc93a966 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Tue Jun 14 17:21:48 2011 -0700 + + Don't use empty source files + + When an empty _SOURCES variable is declared, automake will recognize that + only linking is needed. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Tested-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8ac651552bb70ba36238f430adab2f7a7f24db6e +Merge: 945b2ff 47b6ba3 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 22 11:03:37 2011 -0700 + + Merge remote-tracking branch 'alanc/master' + +commit 945b2ff8141c58344fc9558ee3853fad3e86134b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed Jun 8 15:18:12 2011 -0400 + + docbook.am: --path is also required for xsltproc + + The XSLT processor also needs to know about the entities defined + in xserver.ent. It removes error messages. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6326b0f0746ded410672ad0270d1c8a0e9cb59f9 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed Jun 8 15:17:59 2011 -0400 + + Update .gitignore as new tests have been added + + Refactor to follow the pattern one Makefile, one .gitignore + where needed. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 47b6ba3204d650393a7255ce2af27b8c018bb586 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Jun 20 22:17:03 2011 -0700 + + Add xkeyboard-config to See Also of man pages referencing xkb + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cfbe471b586282aea89f7b4802c051f22301bf59 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Jun 20 22:06:00 2011 -0700 + + Xdmx.man: convert section references to substituted forms + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c3278f3c1786e66019a39e2612761f74782a48ee +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Jun 11 10:56:08 2011 -0700 + + Xdmx.man: additional updates to modernize XKB information + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 19e37067131175219eca7d2b11c2ee59af280575 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Jun 11 10:41:48 2011 -0700 + + Xdmx.man: Show actual configured XKB defaults instead of old hardcoded values + + Passed through from configure.ac via manpages.am + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit acf2173b321749c42d29d858d3521a4d506c732e +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jun 16 20:12:03 2011 -0400 + + Install xml versions of specs even if HAVE_XMLTO is false + + DocBook/XML input source is also a useful output format that can be viewed + with an XML viewer or editor and by some O/S help system. + + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 44890b3e266116ae71bfca2590e5fd9cdfbdb69b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jun 16 20:11:52 2011 -0400 + + Install target dbs alongside generated documents + + This matches a change in xorg-sgml-docs whereby the masterdb will look for + the target dbs into the same location as the generated documents. + + The target dbs are now installed alongside the generated documents. + Previously they are installed in $prefix/sgml/X11/dbs alongside masterdb which + has the potential of installing outside the package prefix and cause + distcheck to fail when user does not have write permission in this package. + + Requires XORG_CHECK_SGML_DOCTOOLS(1.8) which was released 2011-06-11 + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a42ef6c940604172e54de110b7d989cb2208f7ef +Author: Rob Clark <robdclark@gmail.com> +Date: Tue Jun 14 11:45:38 2011 -0500 + + EXA: fix typo + + The incorrect drawable deltas were applied if dst was a redirected + window. Resulting in a bogus region passed to prepare_access_reg(). + + Signed-off-by: Rob Clark <rob@ti.com> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4edf49d032028aa4b9887d02b926b0c372c4451d +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:18 2011 +0200 + + dmx/examples: Fix missing key_click_percent assignment. + + Thanks to gcc's -Wunused-but-set-variable, stop ignoring the percent + parameter, and add it to the XKeyboardControl structure before the + XChangeKeyboardControl call. + + This warning goes away accordingly: + | CC xbell-xbell.o + | xbell.c: In function ‘main’: + | xbell.c:74:22: warning: variable ‘percent’ set but not used [-Wunused-but-set-variable] + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 33dad2b74e3489c8a6b5fa574172d6cd2b6de037 +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:17 2011 +0200 + + hw/dmx: Stop using variables for text widgets. + + They are unused in the sense they're not getting any callback set up, so + there's no point in storing them into variables. Keep the initial + alignment of the parameters to try and reduce the diff noise. + + Those warnings go away accordingly: + | CC xdmxconfig-xdmxconfig.o + | xdmxconfig.c: In function ‘main’: + | xdmxconfig.c:881:29: warning: variable ‘quittext’ set but not used [-Wunused-but-set-variable] + | xdmxconfig.c:880:53: warning: variable ‘abouttext’ set but not used [-Wunused-but-set-variable] + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 34a9f2a90d34a2ab7ecf56d329e75e8da569f939 +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:17 2011 +0200 + + xfixes: Remove unused variable. + + The last use of pScreen in ProcXFixesSetPictureClipRegion was removed in + aa7096ca6f108e399d9916639cf20c57f9776305 so remove it entirely. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit ad0d0833d45ea24d7af1f724b9905133fe3b065f +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:17 2011 +0200 + + xfixes: Mark some variables as unused. + + Calling Unwrap() is just a way of performing an assignment while keeping a + backup of the original value. In the CursorCloseScreen function, the backup + value doesn't seem to be useful, but Unwrap() is used anyway (probably to stay + in line with other functions). As a consequence, mark those variables as unused. + + The following warnings go away accordingly: + | CC cursor.lo + | cursor.c: In function 'CursorCloseScreen': + | cursor.c:186:26: warning: variable 'display_proc' set but not used [-Wunused-but-set-variable] + | cursor.c:185:24: warning: variable 'close_proc' set but not used [-Wunused-but-set-variable] + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit f41ac25d932ef34ab912201ab5ce65f85f2ff171 +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:17 2011 +0200 + + miext: Mark some variables as unused. + + There's no use for the values set through the various macro calls + (fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused. + + The following warnings go away accordingly: + | CC shpacked.lo + | shpacked.c: In function 'shadowUpdatePacked': + | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shplanar8.lo + | shplanar8.c: In function 'shadowUpdatePlanar4x8': + | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shplanar.lo + | shplanar.c: In function 'shadowUpdatePlanar4': + | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_180.lo + | In file included from shrot16pack_180.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate16_180': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_270.lo + | In file included from shrot16pack_270.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate16_270': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_270YX.lo + | In file included from shrot16pack_270YX.c:31:0: + | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX': + | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_90.lo + | In file included from shrot16pack_90.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate16_90': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_90YX.lo + | In file included from shrot16pack_90YX.c:31:0: + | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX': + | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack.lo + | In file included from shrot16pack.c:30:0: + | shrotpack.h: In function 'shadowUpdateRotate16': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack_180.lo + | In file included from shrot32pack_180.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate32_180': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack_270.lo + | In file included from shrot32pack_270.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate32_270': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack_90.lo + | In file included from shrot32pack_90.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate32_90': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack.lo + | In file included from shrot32pack.c:30:0: + | shrotpack.h: In function 'shadowUpdateRotate32': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack_180.lo + | In file included from shrot8pack_180.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate8_180': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack_270.lo + | In file included from shrot8pack_270.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate8_270': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack_90.lo + | In file included from shrot8pack_90.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate8_90': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack.lo + | In file included from shrot8pack.c:30:0: + | shrotpack.h: In function 'shadowUpdateRotate8': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrotate.lo + | shrotate.c: In function 'shadowUpdateRotatePacked': + | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shpacked.lo + | shpacked.c: In function 'shadowUpdatePacked': + | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shplanar8.lo + | shplanar8.c: In function 'shadowUpdatePlanar4x8': + | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shplanar.lo + | shplanar.c: In function 'shadowUpdatePlanar4': + | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_180.lo + | In file included from shrot16pack_180.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate16_180': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_270.lo + | In file included from shrot16pack_270.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate16_270': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_270YX.lo + | In file included from shrot16pack_270YX.c:31:0: + | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX': + | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_90.lo + | In file included from shrot16pack_90.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate16_90': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack_90YX.lo + | In file included from shrot16pack_90YX.c:31:0: + | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX': + | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot16pack.lo + | In file included from shrot16pack.c:30:0: + | shrotpack.h: In function 'shadowUpdateRotate16': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack_180.lo + | In file included from shrot32pack_180.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate32_180': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack_270.lo + | In file included from shrot32pack_270.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate32_270': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack_90.lo + | In file included from shrot32pack_90.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate32_90': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot32pack.lo + | In file included from shrot32pack.c:30:0: + | shrotpack.h: In function 'shadowUpdateRotate32': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack_180.lo + | In file included from shrot8pack_180.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate8_180': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack_270.lo + | In file included from shrot8pack_270.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate8_270': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack_90.lo + | In file included from shrot8pack_90.c:31:0: + | shrotpack.h: In function 'shadowUpdateRotate8_90': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrot8pack.lo + | In file included from shrot8pack.c:30:0: + | shrotpack.h: In function 'shadowUpdateRotate8': + | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + | CC shrotate.lo + | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] + | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit fe6f489d21d77aacf0a073883625619018d764b3 +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:17 2011 +0200 + + fb: Mark some variables as unused. + + There's no use for the values set through the various macro calls + (fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused. + + The following warnings go away accordingly: + | CC libfb_la-fb24_32.lo + | fb24_32.c: In function 'fb24_32ReformatTile': + | fb24_32.c:544:19: warning: variable 'newYoff' set but not used [-Wunused-but-set-variable] + | fb24_32.c:544:10: warning: variable 'newXoff' set but not used [-Wunused-but-set-variable] + | fb24_32.c:543:19: warning: variable 'oldYoff' set but not used [-Wunused-but-set-variable] + | fb24_32.c:543:10: warning: variable 'oldXoff' set but not used [-Wunused-but-set-variable] + | CC libfb_la-fbfill.lo + | fbfill.c: In function 'fbFill': + | fbfill.c:72:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] + | fbfill.c:72:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] + | fbfill.c:100:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] + | fbfill.c:100:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] + | fbfill.c:142:20: warning: variable 'tileYoff' set but not used [-Wunused-but-set-variable] + | fbfill.c:142:10: warning: variable 'tileXoff' set but not used [-Wunused-but-set-variable] + | CC libfb_la-fbgc.lo + | fbgc.c: In function 'fbPadPixmap': + | fbgc.c:92:19: warning: variable 'yOff' set but not used [-Wunused-but-set-variable] + | fbgc.c:92:13: warning: variable 'xOff' set but not used [-Wunused-but-set-variable] + | fbgc.c: In function 'fbCanEvenStipple': + | fbgc.c:166:23: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] + | fbgc.c:166:13: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] + | CC libfb_la-fbpush.lo + | fbpush.c: In function 'fbPushPixels': + | fbpush.c:238:20: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] + | fbpush.c:238:10: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 8da16898d9de5da1f80b789f0b371070968285f8 +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:17 2011 +0200 + + fb: Simplify logic, get rid of set but unused variable. + + wrapped is only useful is FB_ACCESS_WRAPPER is set; simplify the logic + accordingly, and only set it when that's defined. + + The following warning goes away accordingly: + | CC libfb_la-fbarc.lo + | fbarc.c: In function 'fbPolyArc': + | fbarc.c:71:11: warning: variable 'wrapped' set but not used [-Wunused-but-set-variable] + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 9a8bfc2c06f0a9206b64ae01a783cf5513f021a6 +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:16 2011 +0200 + + configure: Bump dependency on xproto. + + Bumping this dependency means some additional macros can be used, like + _X_UNUSED. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 9da5aa09d70e26dd4d2ef878a21317dae7bf24de +Author: Cyril Brulebois <kibi@debian.org> +Date: Tue May 24 18:33:11 2011 +0200 + + Xext: Fix buggy checks. + + XvMCScreenKey is defined as XvMCScreenKeyRec's address, so will never be + NULL. Use the check proposed by Alan Coopersmith and Jeremy Huddleston + instead. + + Those warnings go away accordingly: + | CC xvmc.lo + | xvmc.c: In function 'ProcXvMCListSubpictureTypes': + | xvmc.c:490:22: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress] + | xvmc.c: In function 'XvMCExtensionInit': + | xvmc.c:671:21: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress] + | xvmc.c: In function 'XvMCFindXvImage': + | xvmc.c:749:22: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress] + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 778309fd0ef6b586468c1a3b569e3548503459ee +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jun 14 13:23:00 2011 -0700 + + XQuartz: GLX: Fix a -Wformat-security compilation warning + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 34e2598f0ad247071bd6a4312d9014d6e3b2305a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jun 14 11:18:50 2011 -0700 + + XQuartz: GLX: Use _glapi_create_table_from_handle to create out dispatch table + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ecec578e35f91a2cbc5d07bc8d45241af7bb585f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jun 14 12:51:04 2011 -0700 + + glx: Add _glapi_create_table_from_handle + + _glapi_create_table_from_handle was recently added to mesa to ease creation of + a _glapi_table. This commit brings this API over to xserver for use in + XQuartz (next commit). + + The API was generated with scripts from current mesa followed by various + script-foo to remove entries that are not in the server and add those which + are still in the server but not in mesa (CullParameterdvEXT and + CullParameterfvEXT) + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit c3df4df40761760b281a21f63336ca955670f7bc +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Jun 5 21:59:13 2011 -0400 + + XQuartz: Add missing include for <pthread.h> + + BuildFix for Leopard and earlier. + + https://trac.macports.org/ticket/29717 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 08a7246f43c9f18079219a1c982bed558722f545 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 14:21:39 2011 +1000 + + dix: rename ProcessRawEvents to dix/events.c:DeliverRawEvent + + No functional changes, prep work for future changes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 0aa45c5c53e2e7ba0723f5a12c1a5f5d4baab933 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 14:19:45 2011 +1000 + + Xi: use temporary variable for filter. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a1beae635caf81ec31a8998687df0ae92b505fda +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 12:14:32 2011 +1000 + + dix: split DeliverEventToWindowMask up a bit more. + + Move out the actual event delivery, it needs to be used from elsewhere. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 58e4831ed68c2fbc219c7250e9837e76a73a6432 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 11:43:50 2011 +1000 + + dix: rename DeliverEventsToClients to DeliverEventsToWindowMask + + To avoid confusion with a future patch and it better describes what this + does anyway - delivering events to all clients that have the event mask on + the window. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 37a53f15b0dfa1b25f7e3e826c7c945453398ac5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 11:40:56 2011 +1000 + + dix: split client list retrieval out of DeliverEventToClients + + No functional change, but "other" was renamed to "clients". + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 02d11af01211da55e9d93fe0e1851a0c6fe57472 +Merge: bf9fd0a ab0df72 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 7 12:31:15 2011 -0700 + + Merge remote-tracking branch 'kibi/master' + +commit bf9fd0a83eef771ee018438f05e2d9f20b43539b +Merge: 21eec36 0d14056 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 7 07:45:22 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 0d140567ba2b5bf364265dba07de519f691c67a1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 7 10:42:50 2011 +1000 + + dix: fix crashers with floating device. + + dc57f89959e549403f8488eb9f23425bd7118b22 accidentally reversed the + conditions. + + in dix/events.c we try to detach floating devices. This leads to a + NULL-dereference on GetMaster()->id. + + in dix/getevents.c we try to get the master device for the floating slave + and dereference it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 21eec367d0d9c142458f973062e17add4f693033 +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Mon Jun 6 16:53:41 2011 +0200 + + randr: void function cannot return value + + Providing an argument to return in a function with void return type + is not allowed by the C standard, and makes the Sun compilers unhappy. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ab0df72cd33f011cc48736cfbfce9bbe9c359a80 +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 03:21:18 2011 +0200 + + xkb: Fix case checks for Latin 4. + + That one was missing _XkbKSLower: + XK_kra: U+0138 LATIN SMALL LETTER KRA + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 9eb6e34c2dd09af714400ce6a1063477d7a64776 +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 03:12:44 2011 +0200 + + xkb: Fix case checks for Latin 2. + + Those ones were getting _XkbKSLower for no reasons: + XK_ogonek: U+02DB OGONEK + XK_doubleacute: U+02DD DOUBLE ACUTE ACCENT + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 2b88189863579eb377bca617465bb76b05fbdebd +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Jun 5 03:03:47 2011 +0200 + + xkb: Fix case checks for Latin 1. + + That one was missing _XkbKSLower: + XK_ssharp: U+00DF LATIN SMALL LETTER SHARP S + + That one was getting _XkbKSLower for no reasons: + XK_division: U+00F7 DIVISION SIGN + + For reference, XK_multiply was already excluded from the _XkbKSUpper + check, it's no big surprise XK_division has to be excluded from the + _XkbKSLower check. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit feab04397de2684568dedaaaa8f299cac9f44f8b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Jun 3 02:50:40 2011 -0400 + + XQuartz: AIGLX: Remove unnecessary includes in indirect.c + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 3fa5d27e46ea8af55dcaaad7a99973c38bd11967 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Jun 2 20:04:04 2011 -0700 + + XQuartz: AIGLX: Setup dispatch table based on runtime capabilities rather than buildtime + + This will allow XQuartz built on older systems to pickup capabilities on + newer systems and prevent runtime failures when building on newer systems and + running on older ones. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit dd5d91fc954450e99d53862900ef4fa6320ff382 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Jun 3 02:34:28 2011 -0400 + + XQuartz: Remove explicit link against libGL + + This was indented to force a link against OpenGL.framework's libGL, but it + actually resulted in linking against mesa's libGL due to the ordering of -L + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 5115c2c7216fc10acb8a26deb904ad15ef18ce8a +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Jun 3 18:09:51 2011 +0200 + + Xephyr: Mention Xserver's options are also accepted. + + Originally reported in the Debian BTS: + http://bugs.debian.org/582650 + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Jari Aalto <jari.aalto@cante.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 408ed1576dbcf93f4bd27bd3b66917b1bba2226b +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Jun 3 18:09:48 2011 +0200 + + xkb: Fix case checks for Latin 8. + + Spotted by -Wlogical-op: + | CC xkbfmisc.lo + | xkbfmisc.c: In function '_XkbKSCheckCase': + | xkbfmisc.c:104:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] + | xkbfmisc.c:118:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] + + A quick look at the keysymdef.h file (from xproto) suggests the + implementor chose to use interval checks to determine the case, but + since lines weren't sorted by codepoints, checks were quite wrong. + + Implement _XkbKSUpper/_XkbKSLower checks based on a grep for + CAPITAL/SMALL (respectively) on the Latin 8 part of the said file. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit d9bda34d0df576d155e1d682d5e2a382b8e1ffda +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 1 10:24:43 2011 +1000 + + test: fix memset size for WindowRec (#37801) + + X.Org Bug 37801 <http://bugs.freedesktop.org/show_bug.cgi?id=37801> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit bfd8422e8877acf02155ca0bd7fbd2416b029720 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 12:24:21 2011 +1000 + + Xi: use __func__ instead of function name. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + +commit c042a267c40d35b4fb947f4bafdfeb541dd9d772 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 27 10:10:48 2011 +1000 + + dix: use xi2_get_type instead of manual typecast + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit b75cdb5bf76303162e947173e8ee68253a861272 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 31 10:51:19 2011 +1000 + + dix: drop x/y back into the right valuators after transformation. + + If the matrix is used for rotation, the coordinates affected may change. + e.g. a valuator mask of (x, nil) becomes [x, lasty] and is rotated to + [lasty, x]. Since the second value was unset, we would not drop x back into + the mask, resulting in a loss of movement. + + Thus, drop any value that changed after applying the matrix into the + valuators. Thus, the example above becomes + (x, nil) → [x, lasty] → [lasty, x] → (lasty, x) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit fe4b818700453b76d9f46749dac5d12540b91e63 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 31 10:23:57 2011 +1000 + + dix: don't pass x/y to transformAbsolute + + We passed in the mask, but didn't do anything with it. Move the logic to + take the axes out of the valuator masks into transformAbsolute. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 62f1bf96e1ea27e1eff137cb9333f3dd3b014dd0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 1 10:22:44 2011 +1000 + + test: fix memset size for WindowRec (#37801) + + X.Org Bug 37801 <http://bugs.freedesktop.org/show_bug.cgi?id=37801> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + +commit f94898928dfaf8df648bc3eea7d304826b7ac1b8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 31 14:48:33 2011 +1000 + + dix: fix an error message. + + event type, not device type. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8ef0974874f322e3ce2f3e6be4ab3c7e73a7b380 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 19 14:50:17 2011 +1000 + + test: don't test for double alignment on i386. (#36986) + + i386 is one of the few architectures that doesn't need double alignment. + + X.Org Bug 36986 <http://bugs.freedesktop.org/show_bug.cgi?id=36986> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 48b4b778f61daaa161483b510ab520f3fcb84925 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jun 1 21:55:06 2011 -0700 + + XQuartz: xpbproxy: Correct NSUInteger format strings + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 971193b2750b98b28597ba194ed388e79b3489b6 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jun 1 21:18:03 2011 -0700 + + XQuartz: ASL: Use xpbproxy subsystem for logging xpbproxy messages + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 7dfd65705ccd3c6e2458d6892282520fe5ed8a6b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jun 1 21:06:53 2011 -0700 + + XQuartz: ASL: Use GLXAqua subsystem for logging GLXAqua messages + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 19020b23efa15d72349bd833aebddcc64780a615 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jun 1 21:06:08 2011 -0700 + + XQuartz: ASL: Use xpr subsystem for logging xpr messages + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a66400f8dba9b7c5b65f9d26996fff677c42d866 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jun 1 20:45:58 2011 -0700 + + XQuartz: ASL: Update logging to support differnet levels and subsystems + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c0077b41b4c8bb08129db97a2a01d0af55d13fa4 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jun 1 20:54:27 2011 -0700 + + XQuartz: Add a semicolon after DEBUG_LOG + + Don't rely on the macro to provide it + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit fbc8aae8e9b5c7b175073f02e79d7ff1d1363a31 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun May 29 01:20:44 2011 -0700 + + XQuartz: Move -lXplugin to LDFLAGS from LDADD + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 38df706c6b8a339c4267cae7be0881c4362f36da +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue May 31 13:01:05 2011 -0700 + + XQuartz: GLX: Create a new dispatch table rather than modifying the existing one + + Fixes regression introduced by b0c665ac0fe6840dda581e4d0d0b76c703d62a7b + + 0 X11.bin 0x0000000100118293 __glXAquaScreenCreateContext + 684 + 1 X11.bin 0x00000001001315b0 DoCreateContext + 163 + 2 X11.bin 0x000000010013509f __glXDispatch + 211 + 3 X11.bin 0x00000001000c7dad Dispatch + 785 + 4 X11.bin 0x00000001000b97e5 dix_main + 1022 + 5 X11.bin 0x00000001000122bc server_thread + 50 + 6 libSystem.B.dylib 0x00007fff836554f6 _pthread_start + 331 + 7 libSystem.B.dylib 0x00007fff836553a9 thread_start + 13 + + http://lists.apple.com/archives/X11-users/2011/May/msg00045.html + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a +Author: Marko Macek <Marko.Macek@gmx.net> +Date: Sat May 21 13:30:59 2011 +0100 + + DIX: Set backgroundState correctly for root window + + When we change the root window's background to None, and we've run with + -wr or -br for a forced solid background, make sure we also change the + background state to BackgroundPixel, so we don't try to lookup either + pScreen->whitePixel or pScreen->blackPixel as a pixmap. + + Signed-off-by: Marko Macek <Marko.Macek@gmx.net> + Reviewed-by: Walter Harms <wharms@bfs.de> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit db228d3d07a6d831f53e4c05c878327ad4d045eb +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 1 11:20:10 2011 -0700 + + Version bumped to 1.10.99.901 (1.11 RC1) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0643c056512d10be8db223d18d6563292d57e916 +Merge: a2e6cfc d45f5b2 +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 31 23:45:07 2011 -0700 + + Merge remote-tracking branch 'ajax/xserver-next' + +commit a2e6cfc18aec1c0027b51572b03ec9f2ab074b56 +Merge: bc04065 8d84fd2 +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 31 23:42:52 2011 -0700 + + Merge remote-tracking branch 'sandmann/for-keithp' + +commit d45f5b2493bc0a2882bf972849b5c9c50cd533ca +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 25 05:54:35 2011 -0400 + + fixes: Add support for pointer barriers + + Implements pointer barriers as specified by version 5 of the XFIXES + protocol. Barriers are axis-aligned, zero-width lines that block pointer + movement for relative input devices. Barriers may block motion in either + the positive or negative direction, or both. + + v3: + - Fix off-by-one in version_requests array + - Port to non-glib test harness + - Fix review notes from Søren Sandmann Pedersen, add tests to match + + Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc04065b5ce277f3ac3491ff221a60ef3c7605cf +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri May 20 19:24:34 2011 -0700 + + "privates.h", line 198: warning: void function cannot return value + + Providing an argument to return in a function with void return type + is not allowed by the C standard, and makes the Sun compilers unhappy. + (They actually flag it as an error, unless using a new enough version + to be able to downgrade it to a warning with "-features=extensions".) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + +commit eadf5021794782fde861d471ed408675f4926b89 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon May 2 19:48:42 2011 -0700 + + Use XORG_STRICT_OPTION from util-macros 1.14 to set -Werror flags + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 9275b1fb6f82a6971c4177ddd3d5a859a8f24119 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon May 2 19:47:44 2011 -0700 + + Use XORG_COMPILER_BRAND from util-macros 1.14 to check for SUNCC + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4621bb270a36d35d4ab67f1d7fb47674683dfc5b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 18 15:00:54 2011 +1000 + + Add a property for device/product ID. + + In some cases, knowing about the device model number and the device's vendor + is important to activate product-specific settings. Since this is + nonetheless driver-specific, only provide the property but don't do anything + with it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit f26a5b9a994a980ab309bc7f3b4295a4992d81c2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 31 14:43:01 2011 +1000 + + Xi: add device node property to known properties. + + Since the server has little choice (or even knowledge) of the actual device + node used by the driver, this property is merely provided for + standardisation. It is up to the driver to set it to the appropriate value, + usually a device node in the form of /dev/input/event0 or similar. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 8d84fd2566f8466b6152724df7eefc73780df093 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Wed May 25 12:14:05 2011 -0400 + + Don't call pixman_disable_out_of_bounds_workaround() anymore + + Pixman used to have a workaround for a bug in old X servers, and this + function was used to disable that workaround in servers known to be + fixed. + + Since 0.22, which the X server depends on, the workaround doesn't + exist anymore, so there is no point disabling it. + + Reviewed-by: Cyril Brulebois <kibi at debian.org> + Signed-off-by: Soren Sandmann <sandmann@cs.au.dk> + +commit b6c7b9b2f39e970cedb6bc1e073f901e28cb0fa3 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue May 24 16:02:42 2011 -0700 + + randr: check rotated virtual size limits correctly + + Commit d1107918d4626268803b54033a07405122278e7f introduced checks to + the RandR path that cause RRSetScreenConfig requests to fail if the + size is too large. Unfortunately, when RandR 1.1 rotation is enabled + it compares the rotated screen dimensions to the unrotated limits, + which causes 90- and 270-degree rotation to fail unless your screen + happens to be square: + + X Error of failed request: BadValue (integer parameter out of range for operation) + Major opcode of failed request: 153 (RANDR) + Minor opcode of failed request: 2 (RRSetScreenConfig) + Value in failed request: 0x780 + Serial number of failed request: 14 + Current serial number in output stream: 14 + + Fix this by moving the check above the code that swaps the dimensions + based on the rotation. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Robert Hooker <robert.hooker@canonical.com> + Tested-by: Kent Baxley <kent.baxley@canonical.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4725d6b0dbb6371af4a1b2fbef851dcfe155514a +Merge: 1b2d177 b5d8287 +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 25 09:40:51 2011 -0600 + + Merge remote-tracking branch 'whot/for-keith' + +commit 1b2d17748f0154da142e9b421d4f6a46e4e5a18c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun May 22 13:50:14 2011 -0700 + + fbbltone.c: Mark bitmasks as unsigned ints + + Clears many Sun compiler warnings: + "fbbltone.c", line 491: warning: integer overflow detected: op "<<" + "fbbltone.c", line 491: warning: integer overflow detected: op "<<" + "fbbltone.c", line 491: warning: integer overflow detected: op "<<" + "fbbltone.c", line 491: warning: initializer will be sign-extended: -16777216 + "fbbltone.c", line 491: warning: integer overflow detected: op "<<" + "fbbltone.c", line 491: warning: initializer will be sign-extended: -1 + "fbbltone.c", line 495: warning: integer overflow detected: op "<<" + "fbbltone.c", line 495: warning: integer overflow detected: op "<<" + "fbbltone.c", line 495: warning: integer overflow detected: op "<<" + "fbbltone.c", line 495: warning: initializer will be sign-extended: -256 + "fbbltone.c", line 495: warning: integer overflow detected: op "<<" + "fbbltone.c", line 495: warning: initializer will be sign-extended: -1 + "fbbltone.c", line 499: warning: integer overflow detected: op "<<" + "fbbltone.c", line 499: warning: integer overflow detected: op "<<" + "fbbltone.c", line 499: warning: integer overflow detected: op "<<" + "fbbltone.c", line 499: warning: initializer will be sign-extended: -65536 + "fbbltone.c", line 499: warning: integer overflow detected: op "<<" + "fbbltone.c", line 499: warning: initializer will be sign-extended: -1 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b5d828789c092c994722a896c252212e2b3614ab +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Mar 10 21:03:40 2011 +0100 + + xserver: remove AbsoluteClass, breaking the A(P|B)I + + This struct was unused and has been effectively removed in + commit 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde + Refs: xorg-server-1.10.0-133-g633b81e + + Remove the remainder, with an ABI bump to 13.0. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c05c8640f13708384e77579e7714ca846fa93f5c +Author: Oleh Nykyforchyn <oleh.nyk@gmail.com> +Date: Thu May 19 09:39:52 2011 +0300 + + xfree86: Allow "MatchLayout" statements in config files + + Usage example (tested on a dual-seat PC): + Section "InputClass" + Identifier "keyboard-all" + MatchIsKeyboard "on" + MatchDevicePath "/dev/input/event*" + MatchLayout "!GeForce|!Matrox" + Driver "evdev" + Option "XkbLayout" "us" + Option "XkbOptions" "terminate:ctrl_alt_bksp" + EndSection + + It disables auto keyboard configuration for layouts "GeForce" and "Matrox". + Note that "" in patterns means "no Layout sections found", e.g. + MatchLayout "GeForce|" + is "in layout GeForce or without explicit layout at all". + + Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 83c059f03463f2d7f41e172afe510d1ca9bba8b0 +Author: Tomas Frydrych <tomas@sleepfive.com> +Date: Wed May 18 20:49:52 2011 +0100 + + Xephyr: fix pointer coordinate translation when screen is rotated + + In the Xephyr case the position of the pointer relative toward the + Xephyr window is controlled by the host server without taking into + account rotation of the Xephyr screen. Consequently the pointer coords + must always be translated when the fb is rotated. + + Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b387069fafbe549f2091f364e2aa92af6cc21261 +Author: Tomas Frydrych <tomas@sleepfive.com> +Date: Wed May 18 20:47:52 2011 +0100 + + Xephyr: added dummy ephyrDeviceCursorCleanup() to avoid crashing + + The DeviceCursorCleanup in miPointerSpriteFuncRec can no longer be + NULL it seems. + + Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 53ccc54ac71c2655276678e13f0b3d879d691489 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Mon May 16 19:31:57 2011 +0100 + + Fix XWin compilation after updates for input API changes + + Fix XWin compilation after updates for input API changes in commits + e7150db5 8670c46b and 20fb07f4 + + Also remove a no longer needed InternalEvent* variable + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4c4df3ac0d8162c874b85fede12ffbe42f0062c3 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 14 16:23:59 2011 -0700 + + input: Don't implicitly define verify_internal_event + + Fixes regression introduced by 56901998020b6f443cbaa5eb303100d979e81b22 + + mieq.c:159:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue] + verify_internal_event(e); + ^ + 1 error generated. + + Also includes some other warning cleanups in events.c we're there. + + events.c:2198:24: warning: equality comparison with extraneous parentheses [-Wparentheses,Semantic Issue] + else if ((type == MotionNotify)) + ~~~~~^~~~~~~~~~~~~~~ + events.c:2198:24: note: remove extraneous parentheses around the comparison to silence this warning [Semantic Issue] + else if ((type == MotionNotify)) + ~ ^ ~ + events.c:2198:24: note: use '=' to turn this equality comparison into an assignment [Semantic Issue] + else if ((type == MotionNotify)) + ^~ + = + events.c:2487:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue] + verify_internal_event(event); + ^ + events.c:5909:22: warning: declaration shadows a local variable [-Wshadow,Semantic Issue] + DeviceIntPtr it = inputInfo.devices; + ^ + events.c:5893:18: note: previous declaration is here + DeviceIntPtr it = inputInfo.devices; + ^ + 3 warnings and 1 error generated. + + events.c:2836:27: warning: incompatible pointer types passing 'DeviceEvent *' (aka 'struct _DeviceEvent *') to parameter of type + 'const InternalEvent *' (aka 'const union _InternalEvent *') + verify_internal_event(ev); + ^~ + ../include/inpututils.h:40:56: note: passing argument to parameter 'ev' here + extern void verify_internal_event(const InternalEvent *ev); + ^ + 1 warning generated. + + Found-by: yuffie tinderbox (-Werror=implicit) + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ba7d1020ac0135ebc8acda4cd57ed48b331e0133 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 14 16:31:10 2011 -0700 + + input: Fix format string for verify_internal_event + + inpututils.c:577:25: warning: conversion specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat,Format String Issue] + ErrorF("%02hx ", *data); + ~~~~^ ~~~~~ + %02hhx + 1 warning generated. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0de7cec90738a7a5020150309866bb0e23b6f479 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 19 15:36:29 2011 +1000 + + xfree86: bump to video ABI 11 + + We've broken the ABI with some commit and drivers built against ABI 10 + happily segfault now. + + (The relevant patch is 51f353d0a0d116af16d7d9590cadef6c56328746 which + changed the ATOM typedef from unsigned long to uint32_t, thanks to + Cyril Brulebois <kibi@debian.org> for figuring this out) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1fb501ad1521cfedaa5cf3052d45a924ef1866cf +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun May 22 10:18:36 2011 -0700 + + XQuartz: Don't crash if CG increases our display resolution + + miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was + sized for the old resolution. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 60af79e35ee8546a99d15a1358aac3deabfa22be +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun May 22 09:32:57 2011 -0700 + + XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays + + If CG reports no displays when launching, we could crash in RandR. Instead, just + provide a fake 800x600 display until we are notified about displays being attached. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f25ca898c54cb88c7886005fc75a53762c42710b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 19 14:39:22 2011 -0700 + + XQuartz: Mark functions _X_NORETURN + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 7413886d650aef492ecbfdc4298c2d92d9af5f87 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 19 14:35:56 2011 -0700 + + XQuartz: Silence clang warnings about shadow declarations + + X11Application.m:1272:26: warning: declaration shadows a local variable [-Wshadow,Semantic Issue] + xp_error e; + ^ + X11Application.m:1098:36: note: previous declaration is here + - (void) sendX11NSEvent:(NSEvent *)e { + ^ + 1 warning generated. + + bundle-main.c:648:36: warning: declaration shadows a local variable [-Wshadow,Semantic Issue] + int max_files, i; + ^ + bundle-main.c:594:9: note: previous declaration is here + int i; + ^ + 1 warning generated. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 96ac4e61f4618332d95d1fd0e4799dd82844f90f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 19 14:34:39 2011 -0700 + + XQuartz: Update DEBUG_LOG to report to ASL + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 384eb45b944a4386eae74a5503423c13b5f2a659 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 14 18:33:57 2011 -0700 + + XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 25191648b8db87735a99243697f73036255c1eb6 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 14 16:11:32 2011 -0700 + + XQuartz: Don't call mieqEnqueue during server shutdown + + Found-by: GuardMalloc + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit fd5f630bc41de73be3b1d26bf9ce3e9ef1badc3b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 14 14:09:45 2011 -0700 + + XQuartz: Fix an array-index-out-of-bounds crasher + + Found-by: GuardMalloc + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 0e7f61d72c4a929319e57c9b5b777e9413c23051 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat May 14 13:30:20 2011 -0400 + + doc: use devbook.am for developers documentation + + Relocate the docs under the doc subdir. + Remove redundant xml subdir. + The xmlrules set of makefiles are no longer used. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 96c65be39b98cfe035be0a3988dce519549249f3 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat May 14 13:30:19 2011 -0400 + + doc: relocate xserver.ent in the package root directory + + This is the appropriate location for reusable configuration and/or + makefile artifacts as opposed to picking one of the subdirs where + it is used. + + It shields them from future doc reorg as every subdir + will refer to the root package which never changes location. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit dbe26634e4f12eba905540666783c9879aa3a49a +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat May 14 13:30:18 2011 -0400 + + doc: add external doc references support to Xserver-DTrace + + This makefile is used to build the 60+ docbooks in xorg. + Dtrace is a user document and should be located under doc subdir. + + This user document can now refer to external user/specs docs + or can be referred to by such documnets. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 221507e3bf6fcaa4a4c2e1bc264a1f806b4362c0 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Apr 28 21:16:13 2011 -0400 + + man: relocate manual pages in the man subdir outside doc + + The convention is to have the manual pages in a man subdir + which is not under a doc dir. The doc dir contains users docs. + This will move man pages out of the way for upcoming DocBook patches. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9129beb507642e2414ef1f90d650572325d8c2dc +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Apr 28 21:16:12 2011 -0400 + + dmx: fix warning for doxygen explicit links + + Explicit links to functions in another file are not supported. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0d8a5766a39320dedd34a215fc6655f9ac19e8bc +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Apr 28 21:16:11 2011 -0400 + + dmx: modernize doxygen generation. + + The configuration and stylesheet were very old. + The stylesheet is not checked-in, use the generated one. + The header is not checked-in, use the generated one. + Add datetime and projectname in default footer. + Developer documentation is not installed and not included in tarball. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 622ebb88157b0ed99355419767685dd70ce0f16c +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Apr 28 21:16:10 2011 -0400 + + dmx: split DocBook/XML and Doxygen makefile targets + + Maintaining either requires full knowledge of both. + It's not obvious one has to check the usage of global variables + in devbook.am when maintaining doxygen target. Or vice-versa. + + Being in their respective directory, one less thing to worry about. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 595460c397a543fe512becd3c432de2a0a68d187 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Apr 28 21:16:09 2011 -0400 + + dmx/doc: use common makefile for developers documentation + + The user/specs docs now have external references support. + Developers doc are not installed so they do not participate. + However, using a similar makefile shared amongst developers + document reduces maintenance and is forward looking. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 04011b0bc3b5b59efa0d981866349c4ad0868d8f +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Apr 28 21:16:08 2011 -0400 + + doc: use common makefile for developers documentation + + The user/specs docs now have external references support. + Developers doc are not installed so they do not participate. + However, using a similar makefile shared amongst developers + document reduces maintenance and is forward looking. + + Man pages being out of here, reorg developers docs under the same roof. + Drop the obsolete sgml subdir. + + Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 531869448d07e00ae241120b59f3aaaa5709d59c +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri May 6 18:18:15 2011 +0300 + + dri2: Don't send so many needless invalidate events + + Only send invalidate events for drawables if some client has requested + some buffers. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ba5540221f2a46133371b4ff0d527b1a0a1443b1 +Merge: 6347a0b 728d0bf +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 13 13:59:36 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 6347a0b802812bb185ada1bf0951add306935184 +Merge: 4d02c53 f144fb7 +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 13 13:54:29 2011 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 4d02c5397114ac4d15e794908f0708427e258261 +Merge: 043c175 eac37f3 +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 13 13:52:18 2011 -0700 + + Merge remote-tracking branch 'vsyrjala/composite_validatetree_2' + +commit f144fb771f2e0665677aa88d08778899f666a1d5 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri May 13 09:10:42 2011 -0700 + + XQuartz: Don't circumvent NDEBUG + + If someone wants to turn off asserts with NDEBUG, let them. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f46835a09662f71f2cb90540609c34561d8af87f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed May 11 15:23:17 2011 -0700 + + XQuartz: Redirect stdout/stderr to asl + + In order to improve logging in XQuartz, stdout and stderr should be redirected + to asl (syslog). + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 5bc05d96f883add324bab338ffb9b9409cf45b2c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 12 15:45:29 2011 -0700 + + XQuartz: Add a LOGGING section to our man page + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c18b7165f971cbf6b634ccf670eb4aa9840eb9e4 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 12 18:29:23 2011 -0700 + + XQuartz: stub: Log directly to ASL rather than stdout/stderr + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit d694601591d2a86a437c5150015d9889e2fe16fc +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 12 15:15:40 2011 -0700 + + Fix a typo: laucnd instead of launchd + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 728d0bf20ed8e2612b100fca6526705fa6e1eef4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 11 13:35:39 2011 +1000 + + dix: replace CORE_EVENT and XI2_EVENT macros with inline functions. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit ffd4874798ba54f86acac75779a15b4babeaa5f3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 11 12:20:50 2011 +1000 + + include: add version_compare helper function + + Compare two version numbers in the major.minor form. + Switch the few users of manual version switching over to the new function. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit c4f9c3a07dbb05b81c8e2193a083102f710ebb27 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 11 11:43:16 2011 +1000 + + dix: use a tmp variable instead of multiple rClient(other). + + no functional changes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit dc45d5816dd65168645f0017394eebfc5599d698 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 14 15:59:08 2011 +1000 + + Xi: split DeviceStateNotify delivery into a separate function + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 5bcc22757e6e1f24ee2bfec65f68a5f567300532 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 14 15:43:56 2011 +1000 + + dix: return deliveries from DeliverGrabbedEvent + + This isn't currently used by any of the callers but it will likely be in the + future. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 2054ca73060a20b5a3025e8d5ef68182149484d3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 14 15:09:39 2011 +1000 + + dix: move the grab activation condition into a if block. + + Rather than 3 conditions with if (deliveries && ...), have one block with + the three in them. + No functional changes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 236ed6f50675dc0303a505ac6f0418c515438fe1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 12 14:04:37 2011 +1000 + + dix: split out client delivery from DeliverEventsToWindow + + No real functional changes, this is just for improved readability. + + DeliverEventsToWindow used to return an int to specify the number of + deliveries (or rejected deliveries if negative). The number wasn't used by + any caller other than for > 0 comparison. + + This patch also changes the return value to be -1 or 1 even in case of + multiple deliveries/rejections. The comment was updated accordingly. + + A future patch should probably use the enum EventDeliveryState for + DeliverEventsToWindow. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 536ca28f1b0b4d8715a41b8acc5f30364c833f9b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 12 13:44:30 2011 +1000 + + dix: split out window owner event delivery from DeliverEventsToWindow + + No functional changes, just for readability. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit a311a03135f9734aa4f7dc0f2fa0e4c91768343b +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed May 11 14:08:28 2011 -0700 + + dix: split implicit grab activation into a separate function. + + I'm not sure I like splitting the check for button-press event from the + code which makes assumptions about that check. How about replacing + patches 3 and 4 with this patch instead? + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a558a66d249cd51d3d675b20cc3a76651fd87930 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed May 11 17:27:52 2011 -0700 + + configure.ac: XQuartz: Fix support for the deprecated --with-launchd-id-prefix + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c89a6f824eaf647d2b182f79fbd78f5bd1c3a27f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue May 10 23:42:46 2011 -0700 + + XQuartz: Don't call into CoreFoundation after fork() and before exec() + + After fork()ing, we should just limit ourselves to setting up + the environment, file descriptors, and exec()ing. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c8674a328c68f03de6e4fad7790a595cdfc18736 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 14 16:45:56 2011 +1000 + + dix: replace unneded goto with break. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 20fb07f436f7d4a0f330b2067a93a5a4829fccf5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Apr 15 10:07:10 2011 +1000 + + input: remove DDX event list handling + + The current approach to event posting required the DDX to request the event + list (allocated by the DIX) and then pass that list into QueuePointerEvent + and friends. + + Remove this step and use the DIX event list directly. This means that + QueuePointerEvent is not reentrant but it wasn't before anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 8670c46bdfdade64e63119d2ebbd5ef63b6fa2c3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 14 22:05:41 2011 +1000 + + input: replace EventListPtr with InternalEvent array + + EventListPtr is a relic from pre-1.6, when we had protocol events in the + event queue and thus events of varying size. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit e7150db5350bc2113ff4126019b489847a4dc217 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Apr 11 15:48:15 2011 +1000 + + input: Provide Queue{Button|Keyboard|Proximity}Event helpers + + Don't require every caller to use GPE + mieqEnqueue, provide matching + Queue...Event functions instead. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 1b8593a6c12315b1071a4fa586151e12f46458f5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 9 15:13:17 2011 +1000 + + xfree86: print the device ID to the log when adding a device. + + Sometimes the name isn't enough, it's handy to see the device ID's from the + log file. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3231962db826f5efd431596a309c96e907a191d1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue May 3 03:20:23 2011 +0100 + + XKB: Fix sense inversion for core MapNotify events + + Due to an unfortunate sense inversion incident while switching from a + if (foo) { ... } to if (!foo) continue; style in f06a9d, we punished any + client who attempted to use XKB to restrict the MapNotify events they + wanted by sending them exactly the events they _didn't_ want, and + nothing else. + + NewKeyboardNotifies (coming from a client setting the map with an XKB + request, when switching between master devices, etc) weren't affected, + but this would impact anyone using xmodmap-style core requests. Could + explain a fair bit. + + Clarified the comments while I was at it. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 460a377ef2d645d9ae38a8356fb248ccc47bed4a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue May 3 03:07:50 2011 +0100 + + XKB: Send XKB events for all devices to all clients + + We were using XIShouldNotify(client, device) as a test for whether or + not to send XKB map/state/etc changed events, which limits it to only + sending events for the current ClientPointer/ClientKeyboard for that + client. While this makes perfect sense for core events (e.g. + MappingNotify), XKB events carry a device ID, so are safe to send to all + clients for all devices. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a79d4544fee806a25447d0147535ebc5a1cae6b9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue May 3 03:03:06 2011 +0100 + + XKB: Send NewKeyboardNotify for dev before its master/slaves + + When we change the keymap on a device, send the NewKeyboardNotify for + that device before we copy the keymap to and notify for its attached + master/slave devices. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c7634498d4cd42c8571805122224dc2d0e44a585 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue May 3 02:59:53 2011 +0100 + + XKB: Remove duplicate keymap-copying loop + + Previously we had: + foreach (device + slaves of device) { + XkbCopyDeviceKeymap(i, device); + [...] + } + if (device was last slave of its MD) { + XkbCopyDeviceKeymap(master, device); + } + and now: + foreach (device + slaves of device + MD if device was last slave) { + XkbCopyDeviceKeymap(i, device); + [...] + } + + As an extra bonus, when changing the keymap on a slave device, we now + ensure the LED info on the master is kept in sync. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b8540d18c7d3a0f93f9e2565a410986eddedcecb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue May 3 02:50:48 2011 +0100 + + XKB: Simplify a loop in ProcXkbGetKbdByName + + Replace: + for (stuff; things; etc) { + if (misc || other) { + [...] + } + } + with: + for (stuff; things; etc) { + if (!misc && !other) + continue; + [...] + } + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 72b6639c83df74767094a5e0c2861fdc5ea03ecd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue May 3 02:39:55 2011 +0100 + + XKB: Don't send unnecessary NewKeyboardNotifies + + In the XKB GetKeyboardByName handler, we had the following pseudocode: + if (device was last slave of its MD) { + XkbCopyDeviceKeymap(master, slave); + XkbSendNewKeyboardNotify(slave, ¬ify); + } + + Even if the SendNewKeyboardNotify line nominated the correct device, + which it didn't, it's unnecessary as XkbCopyDeviceKeymap already sends a + NewKeyboardNotify on the destination device. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 70cef8d8baf058bacaff87ef49e3851628269597 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jan 19 20:42:10 2011 +0000 + + Input: Simplify CheckPassiveGrabsOnWindow loop + + Instead of a mega never-ending if branch with no else, just continue + to the next iteration of the loop if the conditions aren't met - pretty + much entirely reindentation. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 00ba884556c675b2b25e116f5ab4eb4590b6dd56 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jan 19 20:38:44 2011 +0000 + + Input: Make CheckPassiveGrabsOnWindow take InternalEvent + + Previously, it only took DeviceEvents, but it would be much more useful + if it took InternalEvents. Any event that activates a grab must still + be a DeviceEvent, so put in a check to enforce this. + + Change all callers to make the appropriate casts. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 56901998020b6f443cbaa5eb303100d979e81b22 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 5 08:48:19 2011 +1000 + + input: change CHECKEVENT macro to verify_internal_event function + + The macro is sufficient if called during a development cycle, but not + sufficient information when triggered by a user (e.g. + https://bugzilla.redhat.com/show_bug.cgi?id=688693). + + Expand what this does to print the event content and a backtrace, so at + least we know where we're coming from. Only the first 32 bytes are printed + since if something goes wrong, the event we have is almost certainly an + xEvent or xError, both restricted to 32 bytes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit b47d2e43eb2cb3817c995d1f7e58500fb40efa2b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 5 09:04:41 2011 -0700 + + XQuartz: Make a copy of args for our crash reporter vsnprintf + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit bf2059b07a97e5e579c13c2c9d49707093427dc2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Apr 15 14:06:20 2011 +1000 + + input: Only release SD buttons for explicit floating/reattachment (#36146) + + Grabbing an SD device temporary floats the device but we must not release + the buttons. Introduced in + + commit 9d23459415b84606ee4f38bb2d19054c432c8552 + Author: Peter Hutterer <peter.hutterer@who-t.net> + Date: Fri Feb 25 11:08:19 2011 +1000 + + dix: release all buttons and keys before reattaching a device (#34182) + + X.Org Bug 36146 <http://bugs.freedesktop.org/show_bug.cgi?id=36146> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit eac37f32b85b631d94ee3ba11fa65b9d2cb72c38 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Apr 13 21:46:20 2011 +0300 + + composite: Recompute clipping when changing between manual and automatic redirection + + Call compMarkWindows() when changing between manual and automatic + redirection modes. Otherwise the window clipping won't be recomputed + correctly. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit f2001b0f6dffa0a8f05def4a86ea37c4c91db724 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Apr 13 21:45:43 2011 +0300 + + composite: Fix pWin->redirectDraw when changing between manual and automatic redirection + + compAllowPixmap() is not called when changing between manual and + automatic redirection modes. That means pWin->redirectDraw is left + with an incorrect value, and miComputeClips() gets confused whether + the window is supposed to be treated as transparent or not. Fix + the issue by updating pWin->redirectDraw in compCheckRedirect() + even when not calling compAllocPixmap(). + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit 74663e61528346aeea9c11908b6980b51dcaeb68 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Mon Dec 20 16:37:24 2010 +0200 + + composite: Copy the window contents back from the pixmap + + Since extra expose events are no longer generated during window + unredirection, the window contents must be preserved by the server. + So copy the window contents back from the pixmap. The copy can only + be done after the clips have been recomputed, so delay the copy and + the pixmap destruction until ValidateTree is done. Window borders are + restored by HandleExposures and thus don't need to be copied back. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 193ecc8b453b22b3e60248b9354c768dbd405598 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Dec 17 23:46:34 2010 +0200 + + composite: Get rid of the internal UnmapWindow+MapWindow cycle + + Eliminate the internal MapWindow+UnmapWindow cycle around window + redirection changes. Instead do the work in a single pass by marking + the afected windows and calling ValidateTree and HandleExposures + directly. This gets rid of unnecessary expose events, and invalid + ClipNotify calls during rediredction changes. Now ClipNotify will only + get called with the final clip values, and expose events are only sent + to areas that actually got exposed. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a6ae91746212203a19450ac955fbb7abffff1ed3 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Mon Dec 20 16:30:52 2010 +0200 + + composite: Initialize borderClip with current values + + ValidateTree needs a valid borderClip so initialize the parent + constrained border clip with the window's current borderClip + in compRedirectWindow. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit ce9eff9e4c30deb16f059ed84b436d37da45d5d5 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Mon Dec 20 16:33:36 2010 +0200 + + composite: Call ValidateGC after ChangeGC + + ChangeGC changes the GC, so ValidateGC should be called after it, not + before. + + Also pass NullClient instead of serverClient to ChangeGC() since we + know the changed values to be valid, and setting + serverClient->errorValue seems pointless anyway. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 3ac220d6cc386c9ab9995e5b83463c40330e18c2 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue May 3 10:54:09 2011 -0700 + + XQuartz: prefs_copy_url and prefs_get_copy return retained objects + + No functional change. This just annotates the return policy. + + Found-by: clang static analyzer + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit bac8d12555dd44b2139be0696629910cd4d8c782 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue May 3 10:36:19 2011 -0700 + + XQuartz: Ensure that {CF,NS}_RETURNS{,_NOT}_RETAINED are defined + + These will be used in subsequent patches to denote proper retain counts in XQuartz + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 043c1758652259fd12b88ae37720fe6e93eda76b +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Apr 19 19:02:54 2011 -0700 + + Clean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo + + Use calloc to initialize pScrVisInfo array so we don't have to check + which ones were already initialized when freeing them all. + + On failure, set rc if necessary, and jump to code at end that already + frees all the necessary allocations and return rc. + + Fixes parfait reported error: + Error: Memory leak (CWE 401) + Memory leak of pointer 'pScrVisInfo' allocated with malloc((count * 16)) + at line 724 of dbe/dbe.c in function 'ProcDbeGetVisualInfo'. + 'pScrVisInfo' allocated at line 693 with malloc((count * 16)). + pScrVisInfo leaks when rc != 0 at line 710 + and j >= i at line 716. + + [ This bug was found by the Parfait 0.3.7 bug checking tool. + For more information see http://labs.oracle.com/projects/parfait/ ] + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit dadb0791ebfd05cd3bb82d4addf0fbc21aad6fbb +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Apr 19 18:53:22 2011 -0700 + + Only free pContext once when AddResource fails in ProcRecordCreateContext + + Since RecordDeleteContext frees its argument, don't fall through to free + it again. + + Error: Double free (CWE 415) + Double free of pointer 'malloc(1072)' defined by malloc + at line 1964 of record/record.c in function 'ProcRecordCreateContext'. + Previously freed at line 1960 with RecordDeleteContext. + 'malloc(1072)' was allocated at line 1926 with malloc. + + [ This bug was found by the Parfait 0.3.7 bug checking tool. + For more information see http://labs.oracle.com/projects/parfait/ ] + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 73de54210446e9eca81b96ea6775ee5ea1a31d75 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Jan 24 08:40:10 2011 +1000 + + Input: Fix event size confusion in CheckPassiveGrabsOnWindow + + We were just storing a DeviceEvent, but allocating enough space for an + InternalEvent. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + +commit 706326491011be8cecb9b56c06f7241b7cbd425f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jan 18 20:16:36 2011 +0000 + + Input: Add DeepestSpriteWin function + + Does what it says on the box: returns the deepest child window in a + given sprite's trace. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 65b54548dce80c8e8ff5ff91fc4f0659e9b2d921 +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Tue Jan 18 20:08:09 2011 +0000 + + Input: Pass co-ordinates by reference to transformAbsolute + + With the upcoming XI 2.1 touch work, the co-ordinate values will need to + be passed by reference, rather than modified in-place. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a14a0c711397ff7ca0220946010300fc1b2a6e67 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Apr 22 22:19:39 2011 -0700 + + Move event filter initializer out of the structure itself + + When kept in the structure, it causes the entire MAXDEVICES * 128 masks + to be stored in the data segment and loaded from the file, and also leads + to worries about later generations inheriting changes across server reset. + + text data bss dec hex filename + Before: 91837 20528 32 112397 1b70d .libs/events.o + After: 92277 48 20512 112837 1b8c5 .libs/events.o + Before: 3013384 122696 163156 3299236 3257a4 Xorg + After: 3013832 102216 183636 3299684 325964 Xorg + + File size before: 4337008 Xorg + File size after: 4316568 Xorg + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 8d229c4cf9e5bde78373ef3dd32708817ac97152 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Mar 11 15:43:14 2011 -0800 + + Make xorg.conf.example rule compatible with Solaris make + + Solaris make won't substitute $< in explicit rules, only implicit ones + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + +commit c6029246ddcf5ead3884dbf2ab4f57e0c3586e93 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Wed Feb 2 17:00:25 2011 -0800 + + Move Xinput server API documentation from libXi to doc/xml + + Documentation is quite out of date but still fits better here than + in the client library. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0fc7ec6dd504aa03e1a1b18c60942c0c8c8b701b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Apr 29 11:06:18 2011 -0700 + + XQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4 + + Ok, this time for sure... how many brown bags can I fit over my face? + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 29d471663e4414a3cdf154fd032d74381a921ae0 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 18:09:11 2011 -0700 + + XQuartz: Use a rwlock instead of a mutex to protect window_hash in the pthread case + + Concurrent reads are acceptable, so using an rwlock should be better. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 5cb31cd0cbf83fff5f17a475e7b0e45246b19bf3 +Merge: 0f284f0 4d8735d +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 29 09:59:49 2011 -0700 + + Merge remote-tracking branch 'jturney/remove-opengl-spec-download' + +commit 4d8735d388c3c6af27ef3d6a645e38e556f392f4 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Apr 6 16:26:45 2011 +0100 + + hw/xwin: wglext.h should be provided by w32api, rather than downloaded + + wglext.h should be provided by the w32api package, rather than downloaded. + if it's not, do 'wget -P /usr/include/w32api/GL http://www.opengl.org/registry/api/wglext.h' + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + +commit a50878682cda541766c830e49ab406c78b38d903 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Apr 6 16:23:45 2011 +0100 + + configure: Look for Khronos OpenGL spec files using pkg-config + + Look for Khronos OpenGL spec files using pkg-config, rather than downloading them + + Also add a --with-khronos-spec-dir=PATH configure option so XWin can be directed + where to find these files without using the khronos-spec-files package + + XWin with AIGLX requires OpenGL spec files in order to generate wrapper code which: + (1) thunks from the glapi dispatch table which uses the default cdecl calling convention + to native GL functions using the stdcall calling convention. + (2) performs function address lookup for OpenGL 1.2+ functions, which are treated + as extensions and so not directly linkable. + + v2: KHRONOS_SPEC_DIR is only valid when XWIN_GLX_WINDOWS is defined. Avoid 'make dist' + seeing invalid dependencies by only including rules using KHRONOS_SPEC_DIR if + XWIN_GLX_WINDOWS is defined + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 0f284f0f42f26a242eb3153787f2e98b6b88dff8 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 27 22:12:59 2011 -0700 + + XQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4 + + This fixes a regression introduced by d79cc14a51f3e8d4d2f66aad055092672cab1526 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f6d4e75ec55ac6812f9dead42ecdffb9614578c7 +Merge: ec9ea40 4318e6a +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 27 12:08:51 2011 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit ec9ea4017885cefe5519a4e890b0ff1a5518235a +Merge: c6cb70b 6f29dbf +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 27 12:01:56 2011 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 4318e6a147e78b2663c5e0ea6ba0d351a1e87f98 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Mar 5 17:34:42 2011 +0000 + + Cygwin/X: Handle failure during winScreenInit() + + Handle failure during winScreenInit() a bit more cleanly, rather than crashing + + This avoids a crash with 'XWin -fullscreen -screen 0 @2 -screen 1 @1' + + Also document that fullscreen may only be applied to one screen. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit ce6136f8c553bbc6d3e3affa0faa2afbf8054f44 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Mar 23 20:06:33 2010 +0000 + + Cygwin/X: Make winOverrrideStyle() thread-safe + + Make winOverrrideStyle() thread-safe + + winOverrideStyle() is called from the internal WM client thread. + + Accessing server-internal data structures to get window name and + class is not safe, as there is no lock to ensure we do not collide + with these data structures being updated in the server thread. + + Rewrite so the internal client thread uses X client calls to + obtain this data safely + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 0c603509eb7f9c83baf4e00b4558dce78f897ebf +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Feb 11 13:15:40 2011 +0000 + + Cygwin/X: Cosmetic fixes to logging of result from X*TextPropertyToTextList() + + Report XLocaleNotSupported result from X*TextPropertyToTextList() + Fix formatting for unknown results reported for X*TextPropertyToTextList() + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 71550a8665d861384332d81239ca0c1586a17137 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Jan 28 20:17:22 2011 +0000 + + Cygwin/X: Decorate function pointers retrieved via GetProcAddress with WINAPI + + Decorate function pointers retrieved via GetProcAddress which are currently + missing it with WINAPI, to ensure stdcall convention is used when calling them. + + This fixes a crash currently seen when compiled -O2 and the -screen option uses + a size and monitor number e.g. -screen 0 1280x1000@2 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 38a1f5c613a48ef9fd6ba043bc3028f487750d3a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Oct 12 17:12:02 2010 +0100 + + Cygwin/X: Don't make InputOnly windows visible + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit bd288c3458bc1ba2cbb4c8416e5b2dfd849581e6 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Jul 22 18:36:51 2010 +0100 + + Cygwin/X: Fix a GDI bitmap resource leak of window icons + + Ensure any icon created specially for a window is destroyed when + the window is destroyed + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 19e764eee0c8b74d877fb2b1d6aedc933976660e +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Jul 21 18:11:13 2010 +0100 + + Cygwin/X: Internal WM workaround for Java AWT bug + + Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT + doesn't explicitly know about (See sun bug #6434227) + + XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic + ConfigureNotify events to update window location if it's identified the + WM as a non-reparenting WM it knows about (compiz or lookingglass) + + Rather than tell all sorts of lies to get XWM to recognize us as one of + those, simply send a synthetic ConfigureNotify for every non-synthetic one + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit c5a612fc18a7f5c542fca580494e2c66ecfc2159 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Apr 16 21:55:01 2010 +0100 + + configure: Let configure --enable/disable-aiglx control building of AIGLX for all DDXs + + Let configure --enable/disable-aiglx control building of AIGLX for all DDXs. Currently + we can't use --enable/disable-aiglx to control if Xwin DDX is built with AIGLX enabled, + as at the moment it's forced off if we aren't building the X.Org DDX DRI or DRI2 loader + + Rearrange things a bit, introducing a new automake conditional, AIGLX_DRI_LOADER to + specifically indicate if the X.Org DDX DRI/DRI2 loader convenience library should be + built, and replace the previous X.Org DDX-specific uses of the AIGLX conditional with that + + As before, AIGLX_DRI_LOADER is only enabled if --enable-glx, --enable-aiglx and at least one + of --enable-dri or --enable-dri2 are enabled + + This allows the general conditional AIGLX to control if AIGLX is built for the XWin DDX as + well + + The C #define AIGLX set by AC_DEFINE(AIGLX) seems to be obsolete, I can't find anything + which checks it + + Updated for ajax's "glx: Make --disable-dri not disable AIGLX" patch, which allows DRI2 + to be enabled independently of DRI1 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 6f29dbf5e36bef5ecb08f02d367988dee0f9f1cd +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Apr 25 22:00:41 2011 -0700 + + XQuartz: Use ErrorF rather than fprintf to log errors + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit cb083b05c469352ef80e1005a29ac320f2e4e096 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Apr 25 21:25:10 2011 -0700 + + XQuartz: stub: Dead code removal + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 72ed7551f494c61283a7ac3d7b570eac39cc9786 +Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com> +Date: Mon Apr 25 10:38:17 2011 -0700 + + XQuartz: pbproxy: LP64: Fix itteration through XGetWindowProperty where sizeof(long) != 4 + + http://xquartz.macosforge.org/trac/ticket/476 + + Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 0a60192a85ba9f64b522da181c2fe8a5b93b79df +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Apr 24 22:01:48 2011 -0700 + + XQuartz: Enable logging to a file for better debugging + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit de4023f194c561b74f8fa904bea3dd5298230cd1 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Apr 24 21:35:04 2011 -0700 + + XQuartz: Rename launchd-id-prefix to bundle-id-prefix + + It's used many other places than just for launchd. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit e466745109416a2fcdf5d7389c80b814a0363676 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Apr 24 20:35:06 2011 -0700 + + XQuartz: Dead code removal + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f1d867c0a1577e2c46d5dd4e262444e0cf6f8e25 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 23:22:27 2011 -0700 + + XQuartz: Silence clang static analyzer + + Call to 'malloc' has an allocation size of 0 bytes. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 913223e9ddf2cb927ecad99aeadfa730df8561ac +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 23:15:49 2011 -0700 + + XQuartz: xpr: Dead code removal + + Assigned value is always the same as the existing value. + + Found by clang static analyzer + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit d0caa0e4cd255bea315757be2ff387cf57e8bdf7 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 20:12:38 2011 -0700 + + XQuartz: Silence warnings about deprecated functionality where it is an intended fallback + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 9244a3a24f63239ec12675f3df091583e06c8314 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 12:55:39 2011 -0700 + + XQuartz: xpr: Use a serial queue rather than pthread mutexes for window_hash + + Additionally removes some dead code and fixes double-locking in + xprIsX11Window. xprIsX11Window doesn't need to do any locking because + those resources are protected by the called functions themselves. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel A. Steffen <dsteffen@apple.com> + +commit bac34a54f7cb84f346b1b833df9917bd1ac70223 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 12:11:39 2011 -0700 + + XQuartz: xpr: Initialize window_hash in xprInit + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 1596ea72d66a03d9accb534679172ca6f63f78e1 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 11:55:49 2011 -0700 + + XQuartz: Use a lighter spinlock instead of a pthread_mutex_t in QuartzScreenSaver + + Currently, we only end up here through a call to QuartzShowFullscreen, and + this is always on the same thread. Future changes (such as further + incorporating libdispatch) may allow this to change, but contention will + remain minimal since the call is infrequent and it is short held. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel A. Steffen <dsteffen@apple.com> + +commit 3e253c603bc18f06fa48b611797eb5a7c8a96fe4 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 01:48:25 2011 -0700 + + XQuartz: Remove the threadSafety dead-ish code + + It's been a few years now since we've needed this to debug thread + boundaries, so punt it out to clean up the namespace polution. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a52c8078c9cc83c84a8c6eb58810f49bdb90bcc1 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 01:39:16 2011 -0700 + + XQuartz: Use xorg_backtrace() instead of spewCallStack() + + xorg_backtrace() has been in os for two years now, we might as well + start using it. + + Ref: 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit d79cc14a51f3e8d4d2f66aad055092672cab1526 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Apr 22 12:05:32 2011 -0700 + + XQuartz: Fix compilation warnings with XPLUGIN_VERSION >= 4 + + xprAppleWM.c:143: warning: initialization from incompatible pointer type + xprAppleWM.c:144: warning: initialization from incompatible pointer type + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 6128544fd58ced0ed738b7150865294d214fb4eb +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Apr 25 12:38:07 2011 -0700 + + XQuartz: Bump bundle version to 2.7.0 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4944de24849a109c65f1b353bc12e44e90a1211d +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 23:25:39 2011 -0700 + + rootless: Fix a typo in RootlessGlyphs which resulted in a garbage value + + Found by clang static analyzer + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2098cb03c6b64bfca7694fc2b5213edb77bc12e4 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 23:27:16 2011 -0700 + + rootless: Dead code removal + + Found by clang static analyzer + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit bb4d145bd25e2aee988b100ecf1105ea3b6a40b8 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 21:24:27 2011 -0700 + + glx: Silence warnings when building with clang + + This replaces AX_TLS (GPL3) with XORG_TLS (MIT) + + In file included from glapi.c:46: + In file included from ./glapi.h:51: + ./glthread.h:237:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] + __attribute__((tls_model("initial-exec"))); + ^ + In file included from glapi.c:46: + ./glapi.h:92:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] + __attribute__((tls_model("initial-exec"))); + ^ + glapi.c:82:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] + __attribute__((tls_model("initial-exec"))) = NULL; + ^ + glapi.c:85:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] + __attribute__((tls_model("initial-exec"))); + ^ + 4 errors generated. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 5c9eafc8e5f8575c06591d244c2cb5ea07691cb4 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 20:55:53 2011 -0700 + + render: Silence warnings when building with clang + + picture.c:351:37: error: implicit conversion from 'unsigned int' to 'CARD16' (aka 'unsigned short') changes value from 4294967295 to 65535 + [-Werror,-Wconstant-conversion] + pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format)); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ + ... + fatal error: too many errors emitted, stopping now [-ferror-limit=] + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Suggested-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit c524f8bb768f886d413839bc22184098394c2559 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 20:49:27 2011 -0700 + + os: Silence warnings when building with clang + + access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses] + if ((host->family == FamilyServerInterpreted)) { + ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ + access.c:1492:20: note: use '=' to turn this equality comparison into an assignment + if ((host->family == FamilyServerInterpreted)) { + ^~ + = + access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning + if ((host->family == FamilyServerInterpreted)) { + ~ ^ ~ + + In file included from xstrans.c:8: + In file included from /usr/X11/include/X11/Xtrans/transport.c:62: + /usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99 + [-Werror,-Wimplicit-function-declaration] + PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0); + ^ + + log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral] + if (asprintf(&logFileName, fname, display) == -1) + ^~~~~ + log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral] + if ((asprintf(&suffix, backup, display) == -1) || + ^~~~~~ + log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral] + LogVWrite(verb, tmpBuf, args); + ^~~~~~ + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit ab81aa91404ca0fa6843ce8021cbd9de42255a8f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 20:39:25 2011 -0700 + + Xext: Silence warnings when building with clang + + xvmain.c:1113:22: warning: equality comparison with extraneous parentheses [-Wparentheses] + if ((pf->depth == pDraw->depth) + ~~~~~~~~~~^~~~~~~~~~~~~~~ + xvmain.c:1113:22: note: use '=' to turn this equality comparison into an assignment + if ((pf->depth == pDraw->depth) + ^~ + = + xvmain.c:1113:22: note: remove extraneous parentheses around the comparison to silence this warning + if ((pf->depth == pDraw->depth) + ~ ^ ~ + 1 warning generated. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit fd086f87cd1bab53c9e918cb687009e7ac8718d8 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Apr 23 20:36:53 2011 -0700 + + fb: Silence warnings when building with clang + + fbpict.c:163:8: warning: implicit conversion from enumeration type 'PictFormatShort' (aka 'enum _PictFormatShort') to different enumeration + type 'pixman_format_code_t' [-Wconversion] + pict->format, + ~~~~~~^~~~~~ + + fbbltone.c:486:2: warning: shift result (281474959933440) requires 49 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] + C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0), + ^~~~~~~~~~~~ + fbbltone.c:474:6: note: instantiated from: + SelMask24(b,1,r)) + ^ + fbbltone.c:429:46: note: instantiated from: + ^ + fbbltone.c:427:18: note: instantiated from: + 0xffffff << Mask24Check(x,r)) : 0) + ~~~~~~~~ ^ + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit aad7b324aefc906f28ac9d10c64650b3445c2ae0 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Apr 24 19:57:22 2011 -0700 + + os: Add missing _X_ATTRIBUTE_PRINTF to va_list variants + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 5423da9fb2ec0dfeff866f12cf26fbba04ea673d +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:44:15 2011 +0200 + + xkb: remove duplicated include + + Remove duplicated include. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 79b3a7f83d7cbee397eecebef1af31c048d295e8 +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:43:05 2011 +0200 + + test/xi2: remove duplicated include + + Remove duplicated include. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit a17c30d43e0db6c65cc73cd2be5193c02f138bf5 +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:42:07 2011 +0200 + + hw/xwin: remove duplicated includes + + Remove duplicated includes. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit c270cfc30c547e28017533f490904013f73cf6f0 +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:41:11 2011 +0200 + + hw/xquartz: remove duplicated includes + + Remove duplicated includes. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 50ced6cfa0aef472e713ffccfdba003829df68df +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:40:11 2011 +0200 + + hw/xnest: remove duplicated include + + Remove duplicated include. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 387f45a7077faadf232edc3f608c4a081a7fd290 +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:39:11 2011 +0200 + + hw/xfree86/modes: remove duplicated include + + Remove duplicated include. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 78a9ec125dcb1546ca7e7e18aedf2b323eebb1fc +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:38:08 2011 +0200 + + hw/xfree86/fbdevhw: remove duplicated include + + Remove duplicated include. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 0320db25f917980621107b790c4fc5171cb0b6ac +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:36:48 2011 +0200 + + hw/xfree86/dri: remove duplicated includes + + Remove duplicated includes. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit b56271b954d6ab8eeb320f314925b77403458b9c +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:35:45 2011 +0200 + + hw/xfree86/ddc: remove duplicated include + + Remove duplicated include. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 86c0c8b9c567f57fe7477d5302fa22dc7557ce90 +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:34:46 2011 +0200 + + dix: remove duplicated includes + + Remove duplicated includes. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 9b5046d2130aead79956019faf7103b5c676fd02 +Author: Nicolas Kaiser <nikai@nikai.net> +Date: Sun Apr 24 12:33:32 2011 +0200 + + Xi: remove duplicated includes + + Remove duplicated includes. + + Signed-off-by: Nicolas Kaiser <nikai@nikai.net> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit c6cb70be1ed7cf73bd3411b8d66ec05a9efcfeb9 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Mar 28 13:30:52 2011 -0400 + + Fix trapezoid and triangle rendering to windows + + For fbAdd{Traps,Triangles}() and fbRasterizeTrapezoid() this is just a + matter of adding the image offsets to the trap offsets. + + For fbShapes, the story is more complicated: + + The recently added pixman API did not allow offsetting + trapezoids. Instead, it would use x_dst and y_dst in such a way that + the effect was to only offset the source image. + + In pixman 0.21.8, this API has changed such that all the traps are + conceptually rendered to an infinitely big image, and the source and + destination coordinates are then aligned with (0, 0) of that + image. This means offsetting dst_x and dst_y will now offset the + entire drawing, which is similar to how other composite functions + work. + + This patch then changes fbComposite{Triangles,Traps} such that the + source image is aligned with the shapes, and the destination + coordinates offset according to drawable->{x, y}. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit 1b96a99d8edd9016bc4a35348f9d5ddb45832f14 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Thu Mar 10 08:52:41 2011 -0500 + + fb: Call miCompositeSourceValidate() on the source in fbShapes() + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit 04635069554859ec67003b89f56965421cba7f52 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Mar 29 00:11:00 2011 -0400 + + render: Remove unused TriStrip and TriFan typedefs + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit 2b0cabec620f3a2a5e431052441b092ef979bf94 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Mar 29 00:07:44 2011 -0400 + + render: Remove unused fields in the source picture structs + + The fields class, stopRange, colorTable and colorTableSize are not + used by any current code. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit b0d84f94393edab395d65d2b2cb983fc9fec3d36 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Mar 28 20:59:34 2011 -0400 + + render: Delete PictureGradientColor() + + PictureGradientColor(), INTERPOLATE_PIXEL_256() and premultiply() are + not used by anything. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit 61a92a78cd49969f74a046fa26c3199e06365814 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Mar 29 13:06:36 2011 -0400 + + Add RegionInitBoxes(), and fix some buggy callers of RegionInit(). + + The interface to RegionInit(): + + RegionInit (RegionPtr pReg, BoxPtr rect, int size); + + is very confusing because it doesn't take a list of boxes, it takes + *one* box, but if that box is NULL, it initializes an empty region + with 'size' rectangles preallocated. + + Most callers of this function were correctly passing either NULL or + just one box, but there were three confused cases, where the code + seems to expect a region to be created from a list of boxes. + + This patch adds a new function RegionInitBoxes() and fixes those + instances to call that instead. + + And yes, the pixman function to initialize a region from a list of + boxes is called init_rects() because pixman is also awesome. + + V2: Make RegionInitBoxes() return a Bool indicating whether the call + succeeded, and fix the callers to check this return value. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit c7bce22b58530239e583d91ae56312bad1630da4 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Mar 28 11:38:11 2011 -0400 + + Track damage for fbTrapezoids() and fbTriangles(). + + These calls no longer go through the CompositePicture() hook, so + damage was no longer generated for them. This patch simply damages the + entire destination clip region. + + It would be possible to generate tighter damage for certain operators + such as Over and Add, where blank source pixels have no effect on the + destination, but given that virtually all trapezoid rendering takes + place on pixmaps, it's unlikely that anybody would actually benefit + from this optimization, and the miTrapezoidBounds function did + sometimes show up on profiles, probably because it does several + divisions per trapezoid. + + V2: Call DamageRegionProcessPending() - pointed out by Michel Dänzer. + V3: Call DamageRegionProcessPending() *after* rendering - + pointed out by Maarten Maathuis + + Reviewed-by: Michel Dänzer <daenzer@vmware.com> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 918a9c99cf2ebc73acb34b95f597904b93c690d9 +Merge: 88c4622 5f496bc +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 22 11:20:16 2011 -0700 + + Merge remote-tracking branch 'jeremyhu/master' + +commit 88c4622b594a1725d0cee86bc82ad640d241c520 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Apr 18 08:23:48 2011 -0700 + + linux: Retry VT ioctls while errno == EINTR + + When the smart scheduler is enabled, the VT ioctls (particularly + VT_WAITACTIVE) can be interrupted by the smart scheduler's SIGALRMs. + Previously, this caused the server to immediately continue on to + ScreenInit, almost certainly causing a crash or failure because the X + server that owned the VT hadn't finished cleaning up. As of commit + 7ee965a300c9eddcc1acacf9414cfe3e589222a8, it causes a FatalError + instead. + + Retrying the ioctl as long as it fails with errno == EINTR fixes the + problem and allows server regenerations to trigger VT switches that + actually succeed. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 302bdc3c9678c028bed71dbe9c5ba04997626b6b +Merge: 001b6b8 6f97fe5 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 22 10:48:37 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 5f496bc91941140ceaa3061472fda95bd812f2d2 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Apr 22 01:23:09 2011 -0700 + + XQuartz: Do translation and handoff of NSEvent to X11 in a separate serial queue + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 72bd232b117b2867282e0ae1855d779e126f912b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Apr 22 00:39:12 2011 -0700 + + XQuartz: Send tablet proximity events with tilt and pressure + + <rdar://problem/6257569> + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 034538ea9b4770025e3573bc708039cabbe1e10d +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Apr 21 16:31:58 2011 -0700 + + XQuartz: Use dispatch_async to handoff the FD + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ca7b9e6c817681b9cec738e43cf020ac19b5e732 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Apr 21 15:51:32 2011 -0700 + + configure.ac: Add check for libdispatch when building for darwin + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 3960115dbc83ec1eb8d9c8e90466af3fa0b32abd +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Apr 21 15:19:12 2011 -0700 + + XQuartz: Fix prototypes for thread functions + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 7524dbd06113ec081eaa882aa54e03553ccf96aa +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Apr 21 15:11:52 2011 -0700 + + XQuartz: Make the DarwinProcessFDAdditionQueue_thread wait 3 seconds to allow xinitrc to catch up + + Previously, we weren't always waiting the full three seconds. This should + be better, but is still sub-optimal. We really want to start processing + these once a WM has been started. + + http://xquartz.macosforge.org/trac/ticket/416 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 6f97fe5df16f947e52875187ff4f9e25fab33ad7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 21 14:55:22 2011 +1000 + + dix: improve control flow in QueryTrackers + + If the velocity is 0, skip the remainder. + If we're not in range, skip the remainder. + + No functional change. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit a0eda8cd36ffba2ecc79e0d7a1908c89b45e76c4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 21 14:45:09 2011 +1000 + + dix: rename a bunch of variables to be more self-explanatory + + i → used_offset + iveloc → initial_velocity + res → result + vdiff → velocity_diff + vfac → velocity_factor + tmp → tracker_velocity + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit e4901905903c5630a1092c69e42f313abd05187b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 15:41:45 2011 +1000 + + dix: reduce scope of tmp and mult. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 81c6e79f42cc263349e04c0d82b3a85d6b557885 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 15:39:27 2011 +1000 + + dix: reduce the work done by ApplySoftening + + We can modify fdx/fdy in-place rather than requiring dx/dy as well. And the + decision to soften can be made in the caller (unless decided by the velocity + state). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 5870d507cee8547c0993791195fe04d96b271289 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 15:32:33 2011 +1000 + + dix: split softening and constant deceleration into two functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 8ae90552f95f025ad09a17258d56603a424ca076 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 15:30:19 2011 +1000 + + dix: use single return statement in ApplySimpleSoftening + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit c45f4cc6bd885855ecb54d9113010906d9ee58e2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 15:28:32 2011 +1000 + + dix: rename od, d to prev_delta, delta + + And res to result. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 5ffe06bada85e98d46a071dad578d72f5b96cb51 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 15:26:11 2011 +1000 + + dix: Don't use short as bool + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 97c1967689d7990be86ee490690ac5a91935c875 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 15:02:46 2011 +1000 + + dix: rename "res" to "result" for improved readability + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 1c162ebcaba78930f34639145a8ac01b87f8e6fd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 14:56:44 2011 +1000 + + dix: change ProcessVelocityData2D to BOOL. + + Don't confuse users with a return type of short, that's even less indicative + that it returns 0/non-0 than "int". + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 70b76286dbef99daabbafccd23f3ba436fe07b09 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 16:28:21 2011 +1000 + + dix: add some more documentation to ptraccel code + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 6b3a4cc6af240c12d05e27250b61e954eafe9f29 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 14:44:51 2011 +1000 + + dix: don't pass the index for a tracker around, pass the tracker + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 9e8645cacf5f1c398d7a6e837a36c66cf6cf0c9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 14:23:29 2011 +1000 + + dix: CalcTracker only uses the tracker, thus only pass the tracker. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 62f4bef82d1252515689420f8aac198e2f29c4f1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 21 13:58:55 2011 +1000 + + dix: use single return statement in DoGetDirection + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 5f8edbe47e3915f71a20f063a9e8b49591239600 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 13:12:53 2011 +1000 + + dix: use single return value in GetDirection + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit afaa17812513232785c8c629294190629197dfd8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 13:12:35 2011 +1000 + + dix: document GetDirection + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit df90db892d16143742eb3c09e048f5b76457a62e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 11:49:57 2011 +1000 + + dix: document DoGetDirection's maths + + This is the best explanation I can come up with, but it seems to hold true + for my example values. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 7513190ec7bc08db1629b04d3f88f86ea2b1588e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 11:47:21 2011 +1000 + + dix: improve comment, directions flagged are 45° each + + The two directions returned by this calculation are always the two boundary + conditions. Since we don't do quadrants but octants, the flagged ones are + 45° each. e.g. an angle of 35° flags E and NE. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit e804ae85fec290894af69c2e65df55e73b417287 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 11:12:35 2011 +1000 + + dix: improve readbility of DoGetDirection. + + Use enums for the direction bits, not hardcoded bitfield values that are + added up. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 709b291972f8c65f4427f36b45ee78c3895d1e6e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 10:40:28 2011 +1000 + + dix: only use a single return where only one is needed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 8c528c667da7c7fba0ba07973a06b2d4613fbf70 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 20 13:14:11 2011 +1000 + + dix: fix typo in direction calculation + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 47f8cba6f3ae24e5dcdc4e348bdaaaf00d25a91c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Apr 11 14:50:16 2011 +1000 + + xfree86: removed unused "event" variable in xf86PostMotionEventM + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c6212a3e5dc43bd3b5263b392cb75ec96cdf4e4f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Apr 15 14:13:51 2011 +1000 + + dix: silence compiler warning + + resource.c: In function 'AddResource': + resource.c:493:3: warning: format '%lx' expects type 'long unsigned int', + but argument 3 has type 'RESTYPE' + + RESTYPE is uint32_t, not long. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 196d679bed2e9959d2fca89d4ee4bbc551681d0b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Apr 15 14:51:06 2011 +1000 + + test: remove glib dependency + + The few features from the glib test suite we used can be replaced with + assert and printf. This patch is a simple replacement for these two + g_assert → assert + g_test_message → printf + + g_test_init is removed and so is g_test_bug_base. g_test_run replaced with a + simple return 0. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Gaetan Nadon <memsize@videotron.ca> + +commit 071a6ac4d0c347aa7fc6efe37f4f6992524d7ef1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Apr 11 15:22:52 2011 +1000 + + input: remove GetKeyboardValuatorEvents, this is now unnecessary. + + GetKeyboardValuatorEvents handles NULL valuator masks already, so the + GetKeyboardEvents wrapper is not needed. Rename GKVE to GKE. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 91a735328c59db006f0ed52b49e9c59895796c0c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 9 10:45:55 2011 +1000 + + test: add some XIPassiveGrab protocol testing. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 60b08e013dd1e971f82e5bc8708d3f120c217497 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 9 10:44:48 2011 +1000 + + Xi: don't swap the status byte in the XIPassiveGrab replies + + Reported-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a3f37f3698880aec508b5ecfb88daf39360610aa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 9 10:07:19 2011 +1000 + + Xi: exit with error value if CheckGrabValues failed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit f4d9ff73b161d84d3fcacc5834fa714c113c7a10 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 9 09:54:12 2011 +1000 + + Xi: fix reply swapping function check for XIPassiveGrabDevice + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 2a49ffa3c94819e9f28dd939f23ee8a675258172 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 9 09:53:47 2011 +1000 + + Xi: return the bad device ID if a passive grab fails with BadDevice. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 315aa8444b13f827237674535eb2ad55a2066808 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 23 10:32:35 2011 +1000 + + configure: actually require macros 1.13 + + Introduced in 6a5bf15fa99cf5b2358b3b3e2f29e5044aa8724a + + Reported-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f0f0eec869d932a2d9228ff3e41e9e7cda155e68 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Apr 11 11:24:29 2011 +1000 + + Xi: silence valgrind warning. (#36120) + + Conditional jump or move depends on uninitialised value(s) + at 0x4357A1: GetEventMask (events.c:454) + by 0x43B9E8: DeliverEventsToWindow (events.c:2029) + by 0x4E0C59: SendEventToAllWindows (exevents.c:2125) + by 0x4E8301: XISendDeviceHierarchyEvent (xichangehierarchy.c:118) + by 0x426F99: DisableDevice (devices.c:507) + by 0x46BF72: xf86Wakeup (xf86Events.c:457) + by 0x432ABA: WakeupHandler (dixutils.c:419) + by 0x45B708: WaitForSomething (WaitFor.c:235) + by 0x42E8D9: Dispatch (dispatch.c:367) + by 0x422DC9: main (main.c:287) + Uninitialised value was created by a stack allocation + at 0x4E8190: XISendDeviceHierarchyEvent (xichangehierarchy.c:61) + + Conditional jump or move depends on uninitialised value(s) + at 0x43BB78: DeliverEventsToWindow (events.c:2010) + by 0x4DDEEA: FindInterestedChildren (exevents.c:2103) + by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) + by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) + by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) + by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) + by 0x4E0C6F: SendEventToAllWindows (exevents.c:2127) + by 0x4E8301: XISendDeviceHierarchyEvent (xichangehierarchy.c:118) + by 0x426F99: DisableDevice (devices.c:507) + by 0x46BF72: xf86Wakeup (xf86Events.c:457) + by 0x432ABA: WakeupHandler (dixutils.c:419) + by 0x45B708: WaitForSomething (WaitFor.c:235) + Uninitialised value was created by a stack allocation + at 0x4E8190: XISendDeviceHierarchyEvent (xichangehierarchy.c:61) + + Set the type of dummyDev to SLAVE. The jump listed above comes from a check + to IsMaster() in GetEventMask() that would then set the + XIAllMasterDevices mask. + Hierarchy events can only be set for XIAllDevices so the above IsMaster() + check had no effect and the device type doesn't really matter anyway beyond + shuting up valgrind. + + Also initialize dummyDev to 0 to ease future debugging. + + X.Org Bug 36120 <http://bugs.freedesktop.org/show_bug.cgi?id=36120> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 419a27b5219a739f2fbd50cc96a1b54c469e4a88 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 12 10:17:07 2011 +1000 + + Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119) + + commit 678f5396c91b3d0c7572ed579b0a4fb62b2b4655 only fixed the + initialization, not the copy. After a slave device change, the valuator + were out of alignment again. + + X.Org Bug 36119 <http://bugs.freedesktop.org/show_bug.cgi?id=36119> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 7762de65e153790ee9f63903964d168a6680d815 +Author: Alexandr Shadchin <alexandr.shadchin@gmail.com> +Date: Sat Apr 9 17:45:10 2011 +0600 + + Simplify auto-detect mouse for WSCONS_SUPPORT + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Reviewed-by: Matthieu Herrbb <matthieu.herrb@laas.fr> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 001b6b8b70734db1fa2f68e45c1db8337ba9f662 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 15 13:01:37 2011 -0400 + + glx: Make --disable-dri not disable AIGLX + + Either the DRI1 or DRI2 loaders are sufficient. + + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f8540b9dcc1fba886be5c4ce7ea0d74952cb48c4 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 15 12:57:05 2011 -0400 + + glx: Use 0 rather than garbage for unknown INTEL_swap_event types + + Otherwise the garbage you return could well be numerically identical to + one of the swap type tokens, and apps which rely on us to tell the truth + would be in trouble. + + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit dc0cf7596782087bdda0e7f9cd2f60907c45b2c4 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 29 10:09:46 2011 -0400 + + Revert "composite: Don't backfill non-bg-None windows" + + This reverts commit 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc. + + Bugzilla: https://bugs.freedesktop.org/34427 + + Acked-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 6a433b67ca15fd1ea58334e607f867554f227451 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 28 12:30:09 2011 -0400 + + glx: Fix lifetime tracking for pixmaps + + GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap + IDs can be destroyed in either order with no error. Only windows need + to be tracked under both XIDs. + + Fixes piglit/glx-pixmap-life. + + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit b3d2164a0361f636bfe77b51456bee9213af4f13 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Tue Apr 12 17:16:50 2011 +0300 + + dri2: Pass out_count by value to update_dri2_drawable_buffers() + + update_dri2_drawable_buffers() doesn't modify out_count, so pass it + by value. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 93c833ee84a3465ec5d251e622ba26434cb532f8 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Tue Apr 12 17:13:28 2011 +0300 + + dri2: Handle calloc() failure + + Don't access invalid memory if calloc() fails to allocate the buffers + array. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + +commit b2997431fd426ab318bc5dfd2cd43956d733ebec +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 13 11:51:30 2011 -0700 + + Send events that were missing from RRSelectInput + + The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out + events corresponding to the event mask, if there have been changes to + CRTCs or outputs. Only screen events were being generated, however. + + Fixes http://bugs.freedesktop.org/21760 + + Signed-off-by: Federico Mena Quintero <federico@novell.com> + Reviewd-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e409fb32b97033718f270a273f29f24c0b562b84 +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Tue Apr 12 12:55:56 2011 +0300 + + damage: use DamageReportDamage for the initial borderClip damage report + + Instead of using DamageDamageRegion for reporting the first (virtual) + damage in ProcDamageCreate that covers the borderClip of the drawable + window, use a function DamageReportDamage directly (previously called + damageReportDamage). This avoids sending all other damage listeners a + full window update when a new damage object is created. + + As this patch makes DamageReportDamage a public interface, the + function has been moved into the part of the file that contains all + the other public functions. The function has not been otherwise + modified. + + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 274dca8f2c6707121d45df8015fe7eddb129dec9 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Apr 4 22:31:42 2011 +0300 + + dix: don't free stranger pointers inside AllocARGBCursor + + This seems a good convention to follow: if pointers are allocate outside a + given function, then free there as well when a failure occurs. + + AllocARGBCursor and its callers were mixing up the freeing of resources and + causing a particular double free inside TileScreenSaver (srcbits and mskbits). + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> + +commit f603061e9482ad5caf1975ba5395b3294852d072 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Apr 4 21:40:06 2011 +0300 + + os: fix use after free in EstablishNewConnections + + In the case of failure on AllocNewConnection, new_trans_conn cannot be + dereferenced because it's already freed. Swapping the order of this logic fix + the changes introduced in 04956b80431169e0ae713a3e6ba4cdc157ce3a66. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + CC: Jeremy Huddleston <jeremyhu@freedesktop.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 82498e3c2cce6f515063ecb4b6ae9303e828da00 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Apr 4 20:25:32 2011 +0300 + + xfree86: xv: set pointers to NULL in xf86XVFreeAdaptor + + As a good practice and for eventual double frees. + + The reason of this patch is due the resilience of xf86XVInitAdaptors, where + for any adaptor failure it's able to keep trying registering the following + ones. + + I discussed briefly with Pauli and Ville about a bigger refactoring of such + function, doing it in a way to return instantly when a failure happens; after + all that's how mostly of the other driver functions work. Instead, we just + thought that xf86XVInitAdaptors is wise and cool, and eventually other driver + functions should be even following the main idea of resilience. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 81414c1c836ae30628606545edbf7392d9b3d009 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Mar 31 23:44:03 2011 +0300 + + xfree86: xv: fix double free in xf86XVFreeAdaptor + + When xf86XVFreeAdaptor is called more than once in xf86XVInitAdaptors (it may, + but not often), the conditional being changed in this patch will always take + true path and will keep freeing pAdaptor->pAttributes, thus letting the system + error-prone. + + This patch fix such problem checking for a pointer instead the number of + attributes. Such pointer will be deallocated when xf86XVFreeAdaptor is called + first and will not let the code re-run in the following calls. This is a bit + similar how the surroundings code is already doing. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 74476b700f1e499a731ba2ddbba87b12b9b5139b +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Mar 31 17:46:42 2011 +0300 + + xfree86: loader: use one exit code only for readability + + No functional changes. Spaghetti code for the win! \o/ + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit 7aad7dbf409eaa16a2c80d76ba2a42dc84501919 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 7 08:43:13 2011 +1000 + + Xext: use EXT_MASK macro instead of manual & 0x7f + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit b28a1af55cf1ad2a882cc8cd73b77341dec7ff5a +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Wed Apr 6 14:51:45 2011 -0400 + + Fix unset valuator handling for XI 1.x valuator events again + + Set the valuator values for unset masked absolute valuators in the + internal device event. This ensures the values will always be correct in + getValuatorEvents even if the device has been removed. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3085b178626c957854385c7a88a05ec3c7eb74f3 +Merge: c9d89ce 3c45b59 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 6 08:34:10 2011 -0700 + + Merge remote-tracking branch 'jturney/master' + +commit c9d89cec1407550cb2568f4cef146c93607bbae6 +Merge: a52049d bc61787 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 4 11:57:39 2011 -0700 + + Merge remote-tracking branch 'vignatti/for-keith' + +commit bc61787a20e7683cbc4dfa45fe855da98a8c0cd0 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 29 18:22:50 2011 +0300 + + render: fix memory leaks in ProcRenderCompositeGlyphs + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Soren Sandmann <ssp@redhat.com> + +commit 45b6667b651a0a26b17f64c9e99d70784045e4bf +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 29 17:17:40 2011 +0300 + + xkb: fix fd leak in XkbDDXListComponent + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit 0b288c8738a97cf6aa3f36aa5c05e7ac2a5cbca8 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 29 16:54:14 2011 +0300 + + dix: fix memory leak in ProcListExtensions + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit 90e03ab026cd8ffdc6202e6b8bae119717ee8528 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 29 16:48:21 2011 +0300 + + mi: fix memory leak in miZeroLine + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit daae5e5de194757f7084f9b2b24353c34b961f19 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Mar 28 20:13:11 2011 +0300 + + xi: fix memory leak in AddExtensionClient + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit c1875ac25b7b730d464c98c4c151c35efd64a562 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Mar 28 20:09:04 2011 +0300 + + dix: fix memory leak in AllocShared + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit 6e5020f46165862ff09211d5425c8b6a13966303 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Mar 28 20:07:06 2011 +0300 + + dix: fix memory leak in AllocPseudo + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit a6c71ce5d2d2fe89e07a2ef5041c915acc3dc686 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Mar 28 19:21:28 2011 +0300 + + os: fix memory and fd leaks in Popen + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit bafec9a25efa902bef2a3730dc44dc50f0e45877 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Mar 28 19:19:57 2011 +0300 + + os: use DebugF for debugging + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + +commit 719b37c33a89d6ad86c79097e5c67b9b3cea5aac +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 29 20:04:24 2011 +0300 + + xfree86: fix memory leak in xf86LoadModules + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit af054db005b48160b117dfd5bec5f821ee614ea9 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 29 19:51:23 2011 +0300 + + xfree86: fix bad free configInputDevices + + introduced in 93ca526892c0d22afa05cce6496198c652043a19. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ac2fac24d8baa56f369f4e54908bc00c2b73a60a +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 29 19:49:32 2011 +0300 + + xfree86: fix memory leaks in configLayout + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc123319206930638ef1217922824d586d4ada6d +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 22:21:21 2011 +0200 + + xfree86: fix memory leak in xf86ConfigFbEntity + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2aa935bc5cc1e2d5365a97b8c5bb3d33eb5fc758 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 22:10:55 2011 +0200 + + fb: fix memory leak in fbOverlayFinishScreenInit + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4d87606a0d0eb63458098028c300c39c6f1bd2bf +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 22:07:44 2011 +0200 + + Xi: fix memory leak in ProcXGetSelectedExtensionEvents + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 12e46e83733b47d2704e1509960192365102af46 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 22:07:31 2011 +0200 + + dix: fix memory leak in SetDefaultFontPath + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7ae46b69ba3f05f46529131e6a864904967cde3a +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 21:33:15 2011 +0200 + + mi: fix memory leak in miFillUniqueSpanGroup + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 623bb34342641811e2151232f1ab4e2ee3d6b871 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 19:27:17 2011 +0200 + + xi: fix memory leak in ProcXIQueryDevice + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dce2f10cf7bef9929cefadb5088d5b66df43a865 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 19:21:03 2011 +0200 + + mi: fix memory leak in miInitVisuals + + Free the pointers inside miInitVisuals, so the callers of this function + (fboverlay.c and fbscreen.c) don't need to worry with deallocation in the case + of failure. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8ab92cd9822510f426d179a636ef34bb0ace3bb3 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 18:56:02 2011 +0200 + + xfree86: dri2: fix memory leak and free resources properly + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit aa7096ca6f108e399d9916639cf20c57f9776305 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Mar 25 18:24:34 2011 +0200 + + xorg: remove unused pointer values all over the server + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 49051355d47849b3dd73631e3e2287e319a7f4e5 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Mar 23 18:08:29 2011 +0200 + + dix: remove unused macro + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f1a80e1268fa4d235a411a8cdf20b4f13eafcde0 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Mar 23 18:06:51 2011 +0200 + + dix: remove unused debug code + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a52049de2f846fe984d4db5ac8d2c1826c7b2d0b +Merge: d044d36 266ea63 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Apr 4 09:58:53 2011 +1000 + + Merge branch 'master' of git://people.freedesktop.org/~herrb/xserver into for-keith + +commit d044d3675635f037bf0eb30e47f82460f78227d1 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Mar 31 16:26:06 2011 +0300 + + xfree86: loader: fix memory leaks in LoaderListDirs + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9c4aae2141161e4bf69313a771db91c0acc4cc83 +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Wed Mar 30 16:47:31 2011 +0300 + + xkb: Prevent leaking of XKB geometry information on copy. + + Currently shapes, sections and doodads may leak on copy. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 29d63ba175ff1ef1587c390b18ce61c8f1c150f3 +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Wed Mar 30 16:47:30 2011 +0300 + + xkb: Introduce helper function to handle similar reallocations. + + This is preparation for a memory leak fix and doesn't contain any + functional changes. + + Note that two variables are generally used for reallocation and + clearing of arrays: geom->sz_elems (reallocation) and geom->num_elems + (clearing). The interface of XkbGeomRealloc is deliberately kept + simple and it only accepts geom->sz_elems as argument, because that is + needed to determine whether the array needs to be resized. When the + array is cleared, we just assume that either geom->sz_elems and + geom->num_elems are synchronized to be equal or that unused elements + are cleared whenever geom->num_elems is set to be less than + geom->sz_elems without reallocation. + + Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f40103cee1d591387359f401a5a7c21f4105aeb4 +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Thu Mar 31 11:29:01 2011 -0400 + + Don't report old relative values in getValuatorEvents + + Relative valuator values should not be reported in any future events. If + a relative valuator value is not set in an internal event, set the value + to 0 for XI 1.x valuator events sent over the wire. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8199eac443d2c22d313cb23e39d5e607a8cc7f99 +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Mon Mar 28 16:04:48 2011 -0400 + + Handle non continuous valuator data in getValuatorEvents + + This allows for masked valuators to be handled properly in XI 1.x + events. Any unset valuators in the device event are set to the last + known value when transmitted on the wire through XI 1.x valuator events. + + Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500 + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 266ea63bc3e052b753c5484fa08dcc4fb67c8952 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Apr 1 22:55:57 2011 +0200 + + Xi: fix querydevice request swapping + + WriteReplyToClient() swaps rep.length, so it can't be used + on return of WriteReplyToClient(). So save it's value for later + use. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 552c78592c5e5f52fe16e2429f77c63adf398247 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Apr 1 22:54:54 2011 +0200 + + Xext: fix test on extension number for the swapped case. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit a074e6b6754d6c2706b2b5de54e22cbffc5b1a17 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Apr 1 22:53:40 2011 +0200 + + Xi: add XI_Focus{In,Out} to swapped events. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 81257377a2d011ce47fba5822df0f7918dea1d72 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Apr 1 22:51:48 2011 +0200 + + Xi: take XI2 requests into account also for the swapping case. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit f9834d312e3059073e8ad77d9f9d57cb9d96e1e5 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Mar 31 15:33:46 2011 +1000 + + fb: cleanup fbChangeWindowAttributes + + This cleans up the duplication in fbChangeWindowAttributes, + and fixes a bug if the fb24_32ReformatTile ever failed, + since the old code would happily dereference it in the fbEvenTile + call a few lines later. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + +commit 36c7158133660520034d645b124c2c973d2971bb +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Mar 31 13:21:44 2011 +1000 + + fb: drop comments around 24-bit support. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit ac2ae2ed378cc877444bec17b353dda83b620186 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Mar 29 14:24:52 2011 +1000 + + fb: add back fb defines for driver compat. + + we could drop these really and just fixup the drivers, but + since they'll build fine but fail to work this seems safer. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit be9cfb249da18d134c1d65bbb75161aff65f2942 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Mar 29 14:27:41 2011 +1000 + + fb: drop defines that aren't used/necessary anymore. + + This was generated by: + cd fb + coan source --replace -DFB_SCREEN_PRIVATE -DFB_24BIT -DFB_24_32BIT -DFB_SCREEN_PRIVATE -UFBNOPIXADDR -UFBNO24BIT -UFBNO24_32 *.[ch] + + A follow up patch readds the FB_24_32BIT define for Intel UXA. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit e0a2ad51dfb7373aa602335490d9666d6101b5ea +Merge: 327e1d8 3d68831 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Mar 30 10:51:27 2011 -0700 + + Merge remote-tracking branch 'ajax/xserver-next' + +commit ac00ab77d5a00cfd198958aa1afaa4c3ccc6d7bc +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Mon Mar 28 16:04:47 2011 -0400 + + Clean up getValuatorEvents using array loop logic + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3d688316af0e4ff3c44acfc168bd9c76c892b629 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 15 11:03:26 2011 -0400 + + xfree86: warning fix + + xf86RandR12.c: In function 'xf86RandR12EnterVT': + xf86RandR12.c:1769:5: warning: ISO C90 forbids mixed declarations and code + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 2762eef8c34b48be803226f48fc71f790286f968 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 15 11:01:50 2011 -0400 + + xfree86: warning fix + + Pointer.c: In function 'xf86parsePointerSection': + Pointer.c:192:5: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int' + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 5275fbe2e226e1c2a46d26288390c8ef6e1a6a52 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 15 10:58:36 2011 -0400 + + render: warning fixes + + picture.c: In function 'CompositeTriStrip': + picture.c:1777:25: warning: unused variable 'ps' + picture.c: In function 'CompositeTriFan': + picture.c:1807:16: warning: unused variable 'pScreen' + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f1c2c01ac9ea7381cb4cd21ac1b2185ff28da3ec +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Mar 24 16:51:54 2011 -0400 + + dix: Small refactor to resource deletion + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 3e0b311aba54895d806174526511ef11b31432b1 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 21 12:12:53 2011 -0400 + + glx: minor cast cleanup + + Reviewed-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 501506cf9df3d81556d44d074d8321fe6c171576 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 18 17:48:51 2011 -0400 + + glx: dead variable removal + + Reviewed-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 10317682e2fbb95f1d4caa1bdbbb8116272c0f86 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 18 17:44:11 2011 -0400 + + glx: Remove some obfuscatory macros + + Reviewed-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit c327d07cc68802256c679a65d78f98f17327abda +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 18 17:03:09 2011 -0400 + + glx: Remove ->forceCurrent from the context vtable + + All the implementations of makeCurrent and forceCurrent are identical, + so just use makeCurrent everywhere. + + Reviewed-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a48dadc98a28c969741979b70b7a639f24f4cbbd +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 21 11:59:29 2011 -0400 + + glx: Reimplement context tags + + This would let you do a constant-time context lookup, but if that's your + performance problem you have two problems. Just use the context's XID + as the tag value instead. + + In order to do this, we have to defer destroying a context until it + actually goes unreferenced, as you're allowed to mention a context tag + after you've (ostensibly) destroyed the context, as long as it's still + your current context. Thus, change DestroyContext to merely mark the + context as dead if it's a current context, and call down to actual + resource destruction (and XID reclamation) in StopUsingContext. + + Also, stop trying to delete context state from DrawableGone. This was + always broken, as GLX does not say that contexts are destroyed when + their drawables are destroyed. But with the above change to defer + context destruction, this would trigger a server crash on client exit as + we'd free the context state twice. + + Reviewed-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 30d6947cee714385cf62a40ea6fa6d2e68388c78 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 7 14:53:28 2011 -0500 + + glx: Fix _glapi_add_dispatch + + We never need to generate stubs, because those conditions can't happen + in the server. Yank that code out, but keep the bookkeeping for which + extension functions are registered so the DRI driver doesn't get + confused. + + As a pleasant bonus, we're now friendlier for environments like selinux + that make runtime code generation difficult, and we're portable to more + arches since we don't have to port the assembly stubs. + + Fixes the following clutter conformance tests (indirect rendering, + llvmpipe driver): + + test-cogl-backface-culling + test-cogl-materials + test-cogl-readpixels + test-cogl-texture-mipmaps + test-cogl-texture-get-set-data + test-cogl-viewport + test-cogl-offscreen + + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 0cb44cec7b9fbd75285f7380f162cf6140a5bf3f +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Mar 3 10:42:41 2011 -0500 + + glx: Flatten -DXFree86Server + + Always defined by the makefile, so, just get rid of it. + + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ed6c13c01e017f9f40c89247ab6652895fb1ea14 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 13:37:43 2011 -0500 + + glx: Update some glapi comments + + Reviewed-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 17d9e374721d6c8ee3f7f9cdc882f80127bdb57f +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 13:21:39 2011 -0500 + + glx: Lobotomize _glapi_get_proc_address + + This isn't a meaningful thing in the indirect glx loader, so just warn + if it ever happens and move on. + + But also, mark it PUBLIC, so if the driver does ever call it we merely + warn instead of aborting because ld.so can't find the symbol. + + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit b0c665ac0fe6840dda581e4d0d0b76c703d62a7b +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 12:30:22 2011 -0500 + + glx: Remove noop dispatch table + + We can never hit this, because the indirect GLX dispatch code always + forces a current context and checks that it's non-NULL before calling + into the dispatch table. If it's _not_ null, then _glapi_set_context + will call into the driver, which is responsible for calling + _glapi_set_dispatch to make sure the dispatch table is non-NULL. + + Also remove _glapi_set_warning_func and friends, since we can no longer + call them even from dead code. + + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 327e1d88012102af6aca6c6840aa0ed3c7041a77 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Mar 28 17:18:39 2011 +0200 + + EXA: Use dixGetPrivate(Addr) instead of dixLookupPrivate. + + The latter calls the former, let's cut the middle man and eliminate a branch + in a hot path. + + According to Git history, ExaSetPixmapPriv was never used anywhere, just drop + it. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a095a6d4e8f5090907e8d3d66018636216300846 +Merge: a22486f ef9d04f +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 27 20:06:29 2011 -0700 + + Merge remote-tracking branch 'airlied/pwin-cleanup' + +commit a22486f848014000dc13dda470f77d4d8ea9e9f6 +Merge: 2ef4ff4 633b81e +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 27 18:27:10 2011 -0700 + + Merge remote-tracking branch 'whot/for-keith' + +commit 2ef4ff45ef1fcfc4967ebe3d550408769e5f6500 +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Fri Mar 25 10:38:23 2011 +0200 + + os/client: Prevent rare fd leak in DetermineClientPid + + DetermineClientPid didn't close file descriptor if read on + /proc/pid/cmdline failed. Adjusted the code to disregard the close + return value and perform the return after that, if the read failed or + returned EOF. + + Signed-off-by: Mark Kettenis <mark.kettenis@xs4all.nl> + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ef9d04f8ad4239ac30984769c9c8c101bb8e78bf +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Mar 24 14:07:34 2011 +1000 + + dri: kill if 0 out code. + + This refers to pWin->winSize in some #if 0 code remove it. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + +commit eb9266c7176eb240a85e72beda9b6033338294f1 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Mar 24 14:04:25 2011 +1000 + + consolidate SetRootClip (v2) + + each DDX has its own copy, I've taken the darwin one, + though I'm not sure why it needs the pOldClip piece that nobody + else has and the commit msg is like an "Updates from magic land" + type message. + + This removes the main uses of pWin->winSize from the DDXen. + + v2: drop old clip like ajax suggests. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 3c45b59e675ba926ec95842ac3d49e2091e41eb8 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Mar 18 15:00:14 2011 +0000 + + Fix XWin compilation after commit 769531b9 + + commit 769531b9 "Add mode field to pointer movement hooks" changes the + function signature of miPointerSetPosition() to include the movement mode + which resulted in the pointer position + + Update use of miPointerSetPosition() in winEnqueueMotion() appropriately + + (See http://tinderbox.freedesktop.org/builds/2011-03-16-0008/logs/xserver/#build) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Mar 9 20:48:22 2011 +0100 + + xserver: remove AbsoluteClassRec keeping the ABI + + This removes the struct, but keeps InitAbsoluteClassDeviceStruct as + a no-op and preserves related struct layout. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2103d61909c7e6bd345622962df7784a19df72c5 +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Mar 5 05:02:54 2011 +0100 + + simplify ChangeDeviceControl in stubs + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 118ef6f806f629a8e2ad61e4f2a43820b0fa621c +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Mar 5 05:01:22 2011 +0100 + + xf86: don't pretend to support DEVICE_ABS_* in ChangeDeviceControl + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dee83dff4b8fbf1351263beaf2d531d033b6d0c4 +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Mar 5 04:59:33 2011 +0100 + + kdrive: don't pretent to support DEVICE_ABS_* in ChangeDeviceControl + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9eaecb1bfe358a0c5f24645a29d6c377c0c4b37c +Author: Simon Thum <simon.thum@gmx.de> +Date: Sun Mar 20 16:28:22 2011 +0100 + + xquartz: simplify ChangeDeviceControl + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 33e257ab43ebf35e838b80c416762e9b743e9385 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 22 11:53:00 2011 +1000 + + test: when unit tests are enabled, build them during "make" + + Catch compiler errors that were otherwise only spotted on make check. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 6243332782f2d286d49f1dec8a628b0a403665fd +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Fri Mar 18 16:35:36 2011 +0200 + + config: handle device change event properly + + wakeup_handler in udev.c wasn't dealing with udev change events. + There are situations when a device can gain its input capabilities + after it has been added to the system and therefore the change events + must be handled as well. + + The change is handled as a consecutive device removal and addition. + + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Signed-off-by: Stefan Kost <Stefan.Kost@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fad10cb38ef2433c82f8a43d3b7d64e323728060 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 18 11:06:57 2011 +1000 + + xfree86: print out which driver is about to be used. + + Makes reading the log file a lot easier for those that don't magically + recognise the log spew by the individual drivers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit cb5d4b416a0fc850a1c119755a9cc3c4f0d7a545 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Mar 23 12:10:15 2011 -0700 + + XQuartz: applewm: Don't check if requested window level is < 0 because it is unsigned (-Wtautological-compare) + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c116e32dc2799c4abcf38d22bc773b755387c89a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Mar 23 12:07:36 2011 -0700 + + XQuartz: Put ifdef guards around have_depth label (-Wunused-label) + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 1a583f7940e18a8ef28ca14e74e85e0785d39067 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Mar 23 12:05:05 2011 -0700 + + XQuartz: Properly comment extra tokens (-Wextra-tokens) after endif + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c55baebf4ebf1887262cc16899eb297b9f284f6e +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Mar 22 19:01:48 2011 -0700 + + GLX: Support TLS with better portability + + AX_TLS detects when toolchains support __thread or __declspec(thread), + but existing code assumed __thread. + + This also adds a check to configure.ac to error out if TLS is requested + but unsupported. + + Found-by: Tinderbox + http://tinderbox.x.org/builds/2011-03-22-0007 + + Regression-from: 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Tom Fogal <tfogal@alumni.unh.edu> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 03f45df93469f6aef391e97007b9614e0770cc4c +Merge: efcb727 5fb329a +Author: Keith Packard <keithp@keithp.com> +Date: Wed Mar 23 13:38:37 2011 +0900 + + Merge remote-tracking branch 'airlied/xinerama-cleanup' + +commit efcb7275ce5de651f91ba4ff8bb227dfb68bb154 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Mar 17 19:26:37 2011 -0400 + + test: git ignore the list test executable + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6a5bf15fa99cf5b2358b3b3e2f29e5044aa8724a +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Mar 17 19:26:36 2011 -0400 + + Add generalized unit test support using util-macros. + + A handful of modules have begun adding unit test programs. + These macros will help providing a consistent interface which will + help package builders and developers to manage the functionality. + + XORG_ENABLE_UNIT_TESTS will turn on/off unit testing, regardless + of how it is implemented. The default (yes/no) can be specified by each + module. It can be used by itself if glib or -wrap support is not needed. + + XORG_WITH_GLIB will probe the system for glib-2.0. A different version + can be specified in each module. It will consult XORG_ENABLE_UNIT_TESTS + but can be used by itself in contexts other then unit testing. + The default (yes/no) can be specified by each module. + + XORG_LD_WRAP will probe the linker for -wrap support. It will consult + XORG_ENABLE_UNIT_TESTS but can be used by itself in contexts + other then unit testing. + + configure options: + --enable-unit-tests Enable building unit test cases (default: auto) + --with-glib Use GLib library for unit testing (default: auto) + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ee583cb33423fa79beb22db20b30e10a677f9b5a +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Mar 17 19:26:35 2011 -0400 + + config: group document related XORG_ macros together + + No functional changes. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d5b16b037b8fe12ba85c68c8289b6a8cc5e3a09d +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 17 23:48:52 2011 -0700 + + Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" + + This reverts commit 1564c82417d201de5b9a5ec5e7aa4ef14c45fbad. + + The drivers used the top bits of the usage_hint to store driver + private flags (intel, radeon, nouveau). + + With EXA we need to get at this data so if we migrate the pixmap we + can create the correct type of pixmap in the driver, however this + commit truncates the usage_hint into 8-bit class and loses all the + good stuff. + + Signed-off-by: Dave Airlie <airlied@gmail.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit dc9ce695a69ca0787f58f8d160212a7a41acb703 +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Wed Mar 9 15:45:40 2011 +0200 + + xkb: Initialize pad bytes sent in replies of geometry requests. + + Valgrind complains about uninitialized data being written to clients. + + Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ee3a4951a49312a2b68025db00c71472eb84293f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 10 09:30:02 2011 +1000 + + xkb: Document XkbWriteCountedString. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 5c47f8beac7f87680c6f7331483b9cf94a1dbc86 +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Fri Mar 11 14:30:49 2011 +0200 + + xkb: Release XKB component names when compiling keymap. + + Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6f46ae3c69c48f389560af1491ed1729ba45866f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 15 13:20:03 2011 +1000 + + man: list the drivers that are ignored when hotplugging (#35209) + + X.Org Bug 35209 <http://bugs.freedesktop.org/show_bug.cgi?id=35209> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 642569591a73806d038f00f2f9a5c8738f764c0b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Mar 12 07:29:35 2011 -0500 + + dmx/doc: remove dead code in the makefile + + This was leftover from some older ways of building dmx/scale docbook. + + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 21f70cad19474a6f3ba419e03c0df12881ed1092 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Mar 12 07:29:34 2011 -0500 + + man: relocate manual pages in the man subdir outside doc + + The convention is to have the manual pages in a man subdir + which is not under a doc dir. The doc dir contains users docs. + This will move man pages out of the way for upcoming DocBook patches. + + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d3adf2d9350bee4125107e2ea1ed0c51bb736562 +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Thu Mar 10 11:40:40 2011 +0200 + + xfree86/modes: Fixed memory leak in xf86InitialConfiguration + + There were two memory leaks in the function: one was the lack of free + for "enabled", the other was the full lack of releasing anything when + configuration was too small. The first issue was fixed by adding the + missing free, the other was addressed by replacing the duplicate + memory releasing sequences with one that is gotoed into. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a713832cbe494ff468a627e88b11164074bbd14e +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Mar 13 20:01:30 2011 +0000 + + When XDMCP -from is specified, only register the requested address + + When XDMCP -from is specified, only register the requested address, + rather than the requested address, and any others we have of different + address families to the requested address. + + e.g. if we have 4 interfaces with both IPv4 and IPv6 addresses (which + are not IPv6 mapped IPV4 addresses), using -from with one of those IPv4 + addresses currently means only that IPv4 address, and all IPv6 addresses + are used in the connection data in XDMCP REQUEST packet. + + (See http://cygwin.com/ml/cygwin-xfree/2011-02/msg00000.html) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0ac4931753a5d5925fc844c8cbec08585aea57a7 +Merge: a8146f6 d7f8011 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 14 13:06:41 2011 -0700 + + Merge remote-tracking branch 'ajax/xserver-next' + +commit d7f8011418f9da06631f27c66c29bcb226d0dffe +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Mar 8 10:14:28 2011 -0500 + + Remove TriStrip and TriFan from the picture screen + + These functions no longer go through the screen vtable, so remove + them and fix up the various wrappers. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Acked-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit 0eb5b0fbcf1233a93f285ff1e1609fcbd01e7c79 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Mar 8 10:14:27 2011 -0500 + + Absorb miTriStrip() into CompositeTriStrip() + + There is no need to virtualize this function that nobody cares about. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Acked-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit c2af0cea02bd85f4d5954c16e34b4a8fb0fe2243 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Mar 8 10:14:26 2011 -0500 + + Absorb miTriFan() into CompositeTriFan() + + There is no need to virtualize this function that nobody cares about. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Acked-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit a8146f6becc44bf9ad611d33bded17df07e6af21 +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Wed Mar 9 17:29:14 2011 +0200 + + mi/misprite: use memory management provided by dixRegisterPrivateKey + + The record allocated by miSpriteDeviceCursorInitialize was not being + released. + + This patch makes misprite use dixRegisterPrivateKey with the record + size argument, which handles the memory management + issues. miSpriteDeviceCursorInitialize is restructured to initialize + pCursorInfo only if miDCDeviceInitialize succeeds. The record itself + is zeroed on cleanup to ensure that the assumptions in the code still + hold. + + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f985a7319ef80b9b613eeaf24581000827cb220f +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Wed Mar 9 17:29:14 2011 +0200 + + mi/misprite: use memory management provided by dixRegisterPrivateKey + + The record allocated by miSpriteDeviceCursorInitialize was not being + released. + + This patch makes misprite use dixRegisterPrivateKey with the record + size argument, which handles the memory management issues. + miSpriteDeviceCursorInitialize is restructured to initialize pCursorInfo + only if miDCDeviceInitialize succeeds. The record itself is zeroed on + cleanup to ensure that the assumptions in the code still hold. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + +commit 57b35adaed112520c3b3b2fbad13cf5a91cd6652 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Wed Mar 9 13:57:25 2011 -0500 + + Remove geometry arguments from miSourceValidate() + + The only user of the geometry coordinates is the software sprite code, + which uses them to remove the pointer whenever the window beneath is + being used as a source. However, using Window pictures as a source is + extremely rare (let alone *partial* windows), so there is no harm done + in just validating all of the drawable. + + Additionally, the miSourceValidate() function was buggy in at least + three respects: + + (a) It added drawable->{x,y} before calling down, which is wrong since + the misprite code already adds them in its check. (Alternatively, + the misprite code is wrong, but there are actual users who would + notice if that code was broken). + + (b) It didn't account for the width of the interpolation filter, so if + the Picture had a bilinear or convolution filter, the edges + surrounding the source area would not be validated. + + (c) It didn't validate alpha maps. + + Finally, computing the bounding box of the transform on every + composite request was a real performance issue in pixman, so + presumably it could be one here as well. + + This patch changes miSourceValidate() to simply validate all of the + underlying drawable. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit 016edc17512ba966d60edede8cf947996bae0b3c +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 17:12:26 2011 -0500 + + dix: Define RESTYPE as uint32_t + + long is needlessly long on LP64. + + Reviewed-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 1f2bc777f96fd41feb55a4799ece939652130ef4 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 13:11:12 2011 -0500 + + dix: Shrink PropertyRec on LP64 + + size needn't be a long. No change on ILP32 but, combined with the + previous change, 56 -> 40 bytes on LP64. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 51f353d0a0d116af16d7d9590cadef6c56328746 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 13:10:20 2011 -0500 + + dix: Fix ATOM typedef + + unsigned long is needlessly large on LP64. Use uint32_t instead. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 7ca75abbbdd2a1211e52a4f43ac4ed24d3c8ab34 +Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> +Date: Wed Mar 9 11:17:28 2011 +1100 + + glx: Use PATH_MAX as size of filename buffer + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> + +commit d17a9fb8414becf6a8998041df68f209f9222b2b +Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> +Date: Wed Mar 9 11:17:27 2011 +1100 + + Consolidate all the PATH_MAX handling into misc.h + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> + +commit 021393d1b8bcc9ff2ff5deb2306360e6b0afa1c6 +Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> +Date: Wed Mar 9 11:15:07 2011 +1100 + + glx: Factor out glxProbeDriver function. + + DRI, DRI2 and swrast all had near-identical driver probing logic. + Pull it into glxdricommon. + + [ajax: warning fix] + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> + +commit 56c90e29f04727c903bd0f084d23bf44eb1a0a11 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 15 14:29:14 2010 -0500 + + randr: Add RRConstrainCursorHarder + + Confine cursor motion to within the bounds of a single CRTC, iff all the + CRTCs within a ScreenRec are reachable from each other. If not you get + the same "cursor floats within the bounding rect" behaviour you get now. + + v3: + - Incorporate review feedback from Christopher James Halse Rogers + v4: + - Add mode field. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 810fbfa44626bff9f443ab17c0ad27ff7ae121d7 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Feb 9 17:32:16 2011 -0500 + + mi: Call pScreen->ConstrainCursorHarder from the position update path + + v2: Cover more paths, spotted by Daniel Stone. + v3: pass down the mode field for movement mode. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 769531b9ccade723a56498b0888af58d085fec9e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 14:19:18 2011 +1000 + + Add mode field to pointer movement hooks. + + Preparation work for pointer barriers. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 92788e677be79bd04e5ef140f4ced50ad8b1bf8e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 22 12:32:01 2011 +1000 + + test: add some tests for basic list manipulation. + + This has less purpose as a test but more as documentation on how to actually + use the differnent list calls. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1ad9f01c31742157934a791e6141d10520d13e8a +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Mar 10 10:47:40 2011 -0500 + + glx: Add texbuffer2 support to swrast + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 5fb329a04a18835ce864d0563f6dfeb3d3c78d69 +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Mar 9 15:05:26 2011 +1000 + + panoramiX: convert 1->panoramiXNumScreens loops to use macro (v2) + + This converts all the remaining 1->num loops to the macro, + this removes nearly all the panoramiXNumScreens usage in + loops, and is a step to replacing it. + + v2: move some from the other patch. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 0bccfcc97b2300b83aa4693454c27ac87f23f221 +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Mar 9 15:01:20 2011 +1000 + + panoramiX: convert 0->panoramiXNumScreens loops to macro (v3) + + This just uses the FOR_NSCREENS macro instead. + + v2: remove some of the 1->x loops. + v3: drop the 1->0 loop, will rework later. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 5a94934487ea477947e24dcd4720b7cde77d3d2f +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Mar 9 14:53:26 2011 +1000 + + panoramiX: consolidate common id assignment code. + + This adds a new FOR_NSCREENS_FORWARD_SKIP, which skips the first + element and is a common idiom throughout panoramiX code. + + It then adds a new inline function to hide id assignment to a + panoramiX resource and cleans up lots of common repeated code. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit c48c530e541e201ea1afe2512d85967659ceef84 +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Mar 9 15:11:42 2011 +1000 + + panoramiX: macro checking if drawable is root (v2) + + this code appears in quite a few places, consolidate it into + a macro in a header. + + v2: align braces with macro just above it, and with + lines removed + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c3c0e2fdd326214e271ce144e8fc2725cbd738ef +Merge: a19771e 7355555 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Mar 9 14:25:54 2011 -0800 + + Merge remote branch 'whot/for-keith' + +commit 73555555a440855f9ae64c3367c5c7dca98c8741 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 8 15:33:13 2011 -0500 + + record: warning fix + + record.c:810:9: warning: unused variable 'count' + + Scope-shadowed by a later variable of the same name, safe to just + delete. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4d114cc5467a514faa437ce7f4c5e772e2f6a21d +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 8 15:33:12 2011 -0500 + + input: warning fixes + + eventconvert.c:287:9: warning: enumeration value 'ET_Enter' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_Leave' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_FocusIn' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_FocusOut' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_DeviceChanged' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_Hierarchy' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_DGAEvent' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_RawKeyPress' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_RawKeyRelease' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_RawButtonPress' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_RawButtonRelease' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_RawMotion' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_XQuartz' not handled in switch + eventconvert.c:287:9: warning: enumeration value 'ET_Internal' not handled in switch + + From the code it appears these are can't happens, so if they ever do, + BadImplementation seems entirely appropriate. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7b5e562ea74039832116ee13db910f290f074782 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 8 15:33:11 2011 -0500 + + input: warning fix + + getevents.c:770:5: warning: suggest parentheses around '&&' within '||' + + Introduced with dc57f89959e549403f8488eb9f23425bd7118b22: + + - if(dev->u.master && dev->valuator) { + + if(dev->valuator && IsMaster(dev) || !IsFloating(dev)) { + + So I'm assuming the two terms around the || are meant to be a unit. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 33fee13361e745e1db29e250b08622c83046d488 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 8 14:41:21 2011 +1000 + + Xi: fix XI2 passive grab reply length calculation + + If modifiers failed, the reply length was 4 bytes too short. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit eb8141b6edd8b477c0ba796be71e985c35520a9b +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Mar 7 18:55:19 2011 +0100 + + Xi: fix length checks for swapped clients + + ChangeDeviceProperty and XIChangeProperty are followed by some data, so + use REQUEST_AT_LEAST_SIZE instead of REQUEST_SIZE_MATCH. + + X.Org bug#35082 <https://bugs.freedesktop.org/show_bug.cgi?id=35082> + + Reported-by: Markus Fleschutz <markus.fleschutz@x-software.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4114533db6704324fc26f28a444415e325ace8e0 +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Fri Mar 4 17:55:33 2011 +0200 + + config: Ensure that stolen option list elements are released. + + NewInputDeviceRequest steals the contents of option list elements but + doesn't use the elements themselves for anything. Therefore the list + elements need to be released always. + + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8d30aff4aa708b9b885d492602ced7493a96a4df +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Fri Mar 4 17:55:32 2011 +0200 + + dix: Release input device config info when the device disconnects. + + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 40e56d34538f4663426db50893c231a2b5d760dc +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Fri Mar 4 17:55:31 2011 +0200 + + xkb: Ensure that XKB device private won't leak on device disconnect. + + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 18413f55089623123537c1499b02aa95ca2014d2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 3 14:15:55 2011 +1000 + + xfree86: block signals between EnableDevice and first CheckMotion() + + Devices usually enable SIGIO processing in EnableDevice. CheckMotion + initialises the pointer sprite, sends Enter/Leave events, etc. This leaves + us with a small window where events may be processed without the sprite or + pointer position (as seen from the protocol) is valid. + Block signals during this window. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a19771e4337d1c4600550314bbc42a1495a023ff +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Tue Mar 8 13:29:41 2011 -0500 + + xfree86/common: Remove a configScreen leak when conf_screen is NULL + + configScreen used a dynamically allocated buffer for XF86ConfScreenRec + when conf_screen argument was NULL. This pointer was never stored + anywhere, nor was it released, so this patch makes the function use + automatically allocated storage in that situation. + + [ajax: minor grammar fix] + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + +commit b73ebe65cd071a063417ac9c38513a6742e32428 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 12:12:35 2011 -0500 + + glx: Remove unused _glapi_get_proc_name + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 4377288abdbaac8506d8643b440c300ba03182fe +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 11:52:27 2011 -0500 + + glx: Simplify _glapi_check_multithread + + We can guarantee that the X server does not call DRI driver services + from multiple threads, so _glapi_check_multithread need never do + anything special. As a result, ThreadSafe is always false, so remove it + and simplify expressions where it appeared to match. + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit d5e8bb2150ce9d8a4132d61f76621a2c7a7f0acf +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 11:26:05 2011 -0500 + + glx: unifdef BEOS_THREADS + + We don't support BeOS, so, no. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 3692ff0b35e774a6f6cbedf634d53c4df2e53a24 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 11:22:45 2011 -0500 + + glx: unifdef USE_XTHREADS + + xthreads is an ancient wrapper around a half dozen or so common thread + APIs, including pthreads. Just use pthreads directly if you have it; if + you don't, get with the times. + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 2371b44f9eb9181ec2c081ce66befee51d18bf6e +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 11:17:07 2011 -0500 + + glx: unifdef SOLARIS_THREADS + + Solaris 7 and older are not supported; Solaris 8 and later have (and + use) pthreads. + + Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a5fdd1aa06c7c8ecefeafafc4a778fc816ad41a4 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 2 10:20:02 2011 -0500 + + glx: Remove unused _glapi_get_proc_offset and friends + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 2cb3dc020cbec1ba64848dac532b3bb2d84d0635 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 17:11:35 2011 -0500 + + xi: Use RESTYPE consistently + + No functional change + + Reviewed-by: Soren Sandmann <ssp@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 2413702aa0b488f1a4f828a017d5b508c4f219f1 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 16:54:17 2011 -0500 + + xvmc: Use RESTYPE consistently + + Also mark these static since they're not used externally. + + Reviewed-by: Soren Sandmann <ssp@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit cd58924d294de2abddbd2f03c2db021894fe9759 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 16:28:26 2011 -0500 + + xinerama: Use RESTYPE consistently + + No functional change + + Reviewed-by: Soren Sandmann <ssp@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 9a6a9971b03381b7c44257284edecdfa0135957f +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 16:25:23 2011 -0500 + + xv: Use RESTYPE where appropriate + + No functional change. + + Reviewed-by: Soren Sandmann <ssp@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit fddfd026a0e4a8190dc01fb0f38af4b2c29b63a3 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 13:01:15 2011 -0500 + + dix: Remove PIXEL typedef + + Doesn't appear to be used anywhere. + + Reviewed-by: Soren Sandmann <ssp@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 82a8677d9175732a61df4116a396b76a7704efb4 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 22:49:32 2011 -0500 + + dix: Remove deprecated.c + + No more internal users, this can be dropped now. + + Reviewed-by: Soren Sandmann <ssp@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 1564c82417d201de5b9a5ec5e7aa4ef14c45fbad +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 18:37:45 2011 -0500 + + dix: Remove usage_hint from pixmaps, store it in ->drawable.class + + The class field was unused for pixmaps, and we don't have enough classes + to justify a whole uint32 anyway. + + Reviewed-by: Soren Sandmann <ssp@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit d8caa782009abf4dc17b945e325e83fda299a534 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Feb 24 16:06:34 2011 -0500 + + vbe: Fix malloc size bug + + v2: Slightly more obvious sizing math. + + ==14882== Invalid write of size 2 + ==14882== at 0x6750267: VBEGetVBEInfo (vbe.c:400) + ==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) + ==14882== by 0x471895: InitOutput (xf86Init.c:519) + ==14882== by 0x422778: main (main.c:205) + ==14882== Address 0x4f32fa8 is 72 bytes inside a block of size 73 alloc'd + ==14882== at 0x4A0640D: malloc (vg_replace_malloc.c:236) + ==14882== by 0x675024B: VBEGetVBEInfo (vbe.c:398) + ==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) + ==14882== by 0x471895: InitOutput (xf86Init.c:519) + ==14882== by 0x422778: main (main.c:205) + + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 628d16a92a7fa556fbb70bf4a4adf57ec05c190b +Author: Keith Packard <keithp@keithp.com> +Date: Sat Feb 26 10:31:50 2011 -0800 + + loader: Don't distribute sdksyms.c and make it depend on the config + + sdksyms.c is constructed by processing header files with the C + preprocessor. Its contents will vary depending on the precise + configuration options, and so must depend on the config header + files. + + We have one header file which is always changed when any config option + is modified called do-not-use-config.h (which may want a different + name at some point), so make sdksyms.c depend on that file. + + Also, we don't want to ship this file; it always needs to be + built. So, include it in the nodist_libloader_la_SOURCES list to + prevent it from being added to the tarball. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 705f047876f78bbdfb368c3643925af1d1d17f71 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Mar 4 01:12:01 2011 +0100 + + configure.ac: bump version for 1.11 development + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6c90e839d9872a37d371578c9c423e8213922044 +Merge: 0bc95d5 edcceed +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 3 14:41:44 2011 -0800 + + Merge remote branch 'whot/for-keith' + +commit 0bc95d5b06dcea65a1aa193ea907b50f7dd168b5 +Merge: 3f41f4a 69a9171 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 3 14:33:08 2011 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 3f41f4adea4bbb90d4bda4dab600595b655e3ed8 +Merge: 8e4c3ce dae24ab +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 3 14:12:36 2011 -0800 + + Merge remote branch 'sandmann/for-keithp' + +commit 8e4c3ce55b0f186bc6ba4039e30629669b6087b7 +Merge: f3d19c0 2965615 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 3 13:42:07 2011 -0800 + + Merge remote branch 'rjy/clientids' + +commit 1c008e7e7865b405b8033f625333cd64ece4499e +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Feb 23 02:29:35 2011 +0100 + + dix: change all timestamps in pointer acceleration to CARD32 + + CARD32 is being returned by GetTimeInMilis(), so use it consistently. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a4b85261859b17dba9ad8f7f1ce650133f0235d4 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Feb 23 02:29:34 2011 +0100 + + dix: update pointer acceleration code to use ValuatorMask + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8128846e16b406c7d459ae7556f7cd09bdc24c91 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Feb 23 02:29:33 2011 +0100 + + dix: refactor predictable scheme initialization + + This intends to clean up the predictable accel struct + from purely scheme-related things like input properties, + as they would be useless in other use cases such + as wheel acceleration. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 69a9171dbbafd6a7db702d48770d28fb54717545 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Mar 1 20:02:46 2011 -0800 + + XQuartz: pbproxy: Protect against possible collision between Cocoa and X11 Cursor types + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit dae24abcd44f3bb1966faa88222f851c784b37dc +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Feb 28 11:10:38 2011 -0500 + + Delete RegionClipSpans() + + Nothing uses it. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com> + +commit edcceedbd35df576929685767d0b619659e5b020 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 28 12:32:53 2011 -0500 + + xext: Remove XCALIBRATE extension + + Nobody can have been using this, it's never called from extension init. + XI2 device properties should now be a functional replacement. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c2207d11f243900bc2f641e08d80da63d84e97a8 +Merge: 0077993 579ee8f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 28 11:26:09 2011 +1000 + + Merge branch 'next' into for-keith + + Conflicts: + dix/devices.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0343aed1f082baf4bfbd730c1c3582f1410b8741 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Feb 27 16:18:27 2011 -0800 + + XQuartz: Don't use deprecated CoreGraphics API on SL and Lion + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit de32d4dcf57c10fc100c1b33630127947a8c8460 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Feb 27 15:49:10 2011 -0800 + + Revert "rootless: Remove ROOTLESS_WORKAROUND" + + Christof Wolf has reported a regression that seems to be caused by + this change, so reverting the change in the 1.9 branch. We'll + investigate a proper fix in master for 1.10. + + This reverts commit c89f0521044083a11d538ebfeaabee6fc7fb9a03. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 00779932de861bf7ac8c625802f1afed75d01b6f +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Feb 27 20:16:03 2011 +0100 + + Don't clobber input device options from xorg.conf + + Since commit b8d9c5ff removed commonOptions, we now + need to append the "Core{Keyboard,Pointer}" options to + the existing list. + + Fixes passing options to devices confirured in xorg.conf + on systems where autoaddevices is false. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8cf3348e90846f5b04236479042228fb98ac8f70 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Feb 8 11:38:35 2011 -0800 + + XQuartz: RandR: Add RandR modes for the primary display in multi-monitor configs + + We now support using RandR to set the resolution of the primary display (and + place a shielding window on other displays) in multi-monitor configurations. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 968652983f8e6ae6889b48e15f4098ff6ad4a15a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Feb 8 12:26:35 2011 -0800 + + XQuartz: RandR: Provide an alert box when entering a RandR mode for the first time. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 13578b852b7631f99cf1fd5e2e5469edc5aae369 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Feb 8 11:37:52 2011 -0800 + + XQuartz: RandR: Capture the display when switching modes with RandR + + This will prevent native windows from resizing as we change resolutions. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 7dff79e39564b403c3afbc5e7bacffa0df190a23 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Fri Feb 11 09:00:10 2011 -0500 + + Implement fbAddTriangles() in terms of pixman_add_triangles() + + This allows the remaining triangle-to-trap conversion code to be + deleted. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 566f1931ee2916269e164e114bffaf2da1d039d1 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Jan 11 10:33:57 2011 -0500 + + Move miTriangles to fb as fbTriangles() + + The fb version simply calls the new pixman_composite_triangles(). This + allows us to get rid of miCreateAlphaPicture(). + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 788ccb9a8bcf6a4fb4054c507111eec3338fb969 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Jan 11 09:46:46 2011 -0500 + + Move miTrapezoids() into fb as fbTrapezoids() + + The main consumer of trapezoids, cairo, is using the Trapezoids + request, which is currently implemented in the miTrapezoids() + function. That function splits the request into smaller bits and calls + lower level functions such as AddTrap. + + By moving the implementation of the whole request into fb, we can + instead call pixman_composite_trapezoids() to do the whole request in + one step. + + There are no callers of miTrapezoids in any of the open source + drivers, although exa and uxa have their own copies of the function. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 197df069a4037d6faa2723c31ffba09c95d71166 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Wed Feb 23 10:36:57 2011 -0500 + + Require pixman 0.21.6 + + The following patches need pixman_composite_trapezoids() and + pixman_add_triangles(). + + Signed-off-by: Soren Sandmann <ssp@redhat.com> + +commit f3d19c0cf3327cceb90f7378f5d8fc0c3e327400 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 25 21:22:23 2011 -0800 + + Version bumped to 1.10 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 678f5396c91b3d0c7572ed579b0a4fb62b2b4655 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 25 21:10:21 2011 -0800 + + input: Ensure Valuator axes are aligned as needed + + Let the compiler figure out the correct alignment for the axes data + for a valuator by using a union to force double alignment of the + initial ValuatorClassRec structure in the allocation. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit dc8f52e77f51b6fa8908d9611c3f7e3cfbbaf2d1 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 25 16:38:27 2011 -0800 + + hw/dmx/doc: Add explicit dependency for all doxygen output files + + Instead of listing one of the doxygen output files and depending on + sequential execution to ensure that the other files were present + before make checked for them, create explicit dependencies so that + make will not check for the additional files until after doxygen has + been run. + + This allows parallel make to work correctly in this directory. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Kristian Høgsberg <krh@bitplanet.net> + +commit fd4d9c75c265add8d6cc74afb341c9c4f2ec1073 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 25 10:54:50 2011 -0800 + + hw/xwin: Look for gl spec files in $(srcdir) or . + + Tarballs include the downloaded gl spec files, which will end up in + $(srcdir). But, git-based builds will not have them at all and will + need to download them from opengl.org. They'll land in in the build + directory instead of $(srcdir), and so we need to allow them to be in + either place. + + This change checks for the files in $(srcdir), linking them to . if + present. Otherwise, it downloads them from opengl.org. + + A suggested better solution is to have Mesa install these files somewhere. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Kristian Høgsberg <krh@bitplanet.net> + +commit 6b951dec69103ca76d6d4a61b1a2f67a52d013b9 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sun Feb 20 09:51:15 2011 -0800 + + dmx: Construct paths in doxygen.conf to fix VPATH builds + + The paths in doxygen.conf assumed that srcdir=builddir and broke + otherwise. Use autoconf to fill in the paths to the srcdir so that the + files can be found when users have a separate build directory (as with + distcheck). + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Tested-by: Sedat Dilek <sedat.dilek@gmail.com> + +commit 61ce915bf78570b7c8d53c118700ef7274bbdfb7 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Tue Feb 15 06:03:28 2011 -0800 + + xfree86: Allow sdksyms.dep to be included portably + + Non-GNU makes don't deal with the sinclude or -include variants that + allow Makefile stubs to be created and then included during the build. + Instead, create an empty file at the end of configure so that the + regular include statement can be included. This is how automake handles + automatic source dependencies. + + In order to trick automake into not processing the include statement, a + variable is used. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 780a77acce1dd369549ece802b3e2c4006058dfe +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 24 20:45:46 2011 -0800 + + Version bumped to 1.9.99.903 (1.10 RC3) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9d23459415b84606ee4f38bb2d19054c432c8552 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 25 11:08:19 2011 +1000 + + dix: release all buttons and keys before reattaching a device (#34182) + + Testcase: + xinput float <keyboard name> + + results in the keyboard's enter key being repeated as the device is detached + while the key is still physically down. To avoid this, release all keys and + buttons before reattaching the device. + + X.Org Bug 34182 <http://bugs.freedesktop.org/show_bug.cgi?id=34182> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit 229b055bdbc53370944401649234e8a38183f4fb +Merge: 6178959 b17fc99 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 24 19:44:35 2011 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 6178959e3dd6482a4317de6eb14eb19ca7329b9c +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 24 19:42:02 2011 -0800 + + xfree86: Bump video ABI to 10.0 + + RandR 1.4 revert changed things + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 31704510f448706524b7b7085cc4ff0ada7bfe7e +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Feb 24 12:17:57 2011 +0100 + + EXA/mixed: ModifyPixmapHeader pitch fixes. (bug #33929) + + If there's a GPU copy and a non-zero devKind was passed in, set the GPU copy + pitch to that instead of to a possibly bogus value derived from the new width. + This is e.g. used by the radeon driver's drmmode_xf86crtc_resize hook, fixes + https://bugs.freedesktop.org/show_bug.cgi?id=33929 . + + On the other hand, the system memory copy doesn't need the pitch to be aligned + beyond the PixmapBytePad of the width. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Cyril Brulebois <kibi@debian.org> + Tested-by: Cyril Brulebois <kibi@debian.org> + Reported-by: Thierry Vignaud <thierry.vignaud@gmail.com> + Tested-by: Thierry Vignaud <thierry.vignaud@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b17fc99cb9ca9ff0a3592f783a906cdcc35da748 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Feb 24 19:24:35 2011 -0800 + + XQuartz: Localization Updates + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 59850630fefe5e4f0430d7e2e106937fdf1e7ffb +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Feb 24 19:18:35 2011 -0800 + + XQuartz: Add LSApplicationCategoryType key to Info.plist + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 83861595782aaa05907f9cf7b236d50261d404d9 +Merge: a1cc0e5 4102a00 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 24 18:59:07 2011 -0800 + + Merge remote branch 'kibi/master' + +commit a1cc0e52b0e8ca40bc1218de553424b2bcb760ef +Author: Alexandr Shadchin <alexandr.shadchin@gmail.com> +Date: Tue Nov 30 21:17:19 2010 +0500 + + Removing unused code + + In OpenBSD removed support PCCONS in 2002 year + http://marc.info/?l=openbsd-cvs&m=102435816424294&w=2 + + Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 365ad68fb9f7029550505b7c276a808050cada9c +Merge: 0801afb 720c895 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 24 18:49:40 2011 -0800 + + Merge remote branch 'ajax/for-keithp' + +commit 0801afbd7c2c644c672b37f8463f1a0cbadebd2e +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Thu Feb 10 15:35:14 2011 +0200 + + record: avoid crash when calling RecordFlushReplyBuffer recursively + + RecordFlushReplyBuffer can call itself recursively through + WriteClient->CallCallbacks->_CallCallbacks->RecordFlushAllContexts + when the recording client's buffer cannot be completely emptied in one + WriteClient. When a such a recursion occurs, it will not be broken out + of which results in segmentation fault when the stack is exhausted. + + This patch adds a counter (a flag, really) that guards against this + situation, to break out of the recursion. + + One alternative to this change would be to change _CallCallbacks to + check the corresponding counter before the callback loop, but that + might affect existing behavior, which may be relied upon. + + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 816f1f8ffafbfbf0dd31ea86f295987f84151feb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 22 12:48:04 2011 +1000 + + include: document list interface. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit b833f9b924ddc043244c0a026547c438f1c4d4df +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:18:35 2011 -0800 + + Revert "Replace huge argument list in xf86CrtcSetModeTransform with struct" + + This reverts commit 8b35118c03590a7ad3786d3284bafb3f40fcb8cc. + +commit 7030c82648930cea7ef8a2ea49d8138078920d4d +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:18:16 2011 -0800 + + Revert "Require RandR protocol version 1.4 or newer" + + This reverts commit c8bc25fd7629df10f2825b7cc713b031ae78f223. + +commit a91d33917befd6719bb7f01007bc253a2aefb0bb +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:18:12 2011 -0800 + + Revert "randr: Add sprite position transforms" + + This reverts commit 66294afcab7b7a82f7dd897767e46c48a94b8ee8. + +commit 3d4ee25a1e2e0ed2463ceaabea8f5a284a6ddd60 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:18:08 2011 -0800 + + Revert "randr: Implement RRSetCrtcConfigs" + + This reverts commit d94a035ea9eb3167fc4f35b2d9f0d53f8807014c. + +commit 8b0e651f7d09a7f35c87a4d0a6e2053cae93b516 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:18:05 2011 -0800 + + Revert "hw/xfree86/modes: Add optional driver API for RRSetCrtcConfigs" + + This reverts commit 86c489c319c705f710bee3897fe27600ce15008e. + +commit 9e8c20b0d49783d6b9334d4c11c4e6e3ba273524 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:17:42 2011 -0800 + + Revert "randr: Add per-crtc pixmaps" + + This reverts commit 82612045e11f2b882ae132e184a9629f43f1c424. + +commit 9f47780ecdc7693f756587a758ec0141e75cb1eb +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:17:36 2011 -0800 + + Revert "randr: Hook up the new RandR 1.4 functionality" + + This reverts commit afb6ebf1d5829346c40fe1053c9f50afe926e6c6. + +commit 793a242c89fccdbf1a2557ba33da1da2cb4ff8c4 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:17:33 2011 -0800 + + Revert "DIX is responsible for ref counting scanout pixmaps." + + This reverts commit 96b4d4787bf82edd9d06eb9a6e94bc45412c7df2. + +commit 7b7cd3f121b3904ad851155f853ce87a0e00d002 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:17:29 2011 -0800 + + Revert "Set sprite transforms from RRSetCrtcConfigs" + + This reverts commit a88d70fb20a2bc3152b84adff4380857e6cfadf5. + +commit fd9331f6eb39a28da7de4867b2e3a460f667d514 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:17:24 2011 -0800 + + Revert "Separate out screen size and screen pixmap sizes in RRScreenSizeSet" + + This reverts commit 752c368421c1c824752cf467fba9318d75d2ca2c. + +commit 4d91e7a63161cdde9af53aedb3fe3e53dbe3049e +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:17:20 2011 -0800 + + Revert "ProcRRSetCrtcConfigs uses 'configs' without being initialized" + + This reverts commit b0f4bd61f0caf80f3be9a176f1f7a707bc6628d8. + +commit 00d0b235cfbfb162ddd58c088d2ed03e55a9c5cb +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 23 11:16:48 2011 -0800 + + Revert "randr: handle RRSetCrtcConfigs request with zero configs" + + This reverts commit 0d01b66df9081ef48843b3bad81c56bb2cd1ae69. + +commit 720c895db9327bbdc32215a67236303d2ceafad4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 23 13:36:20 2011 -0500 + + Add mode field to ConstrainCursorHarder + + For Pointer Barriers, the movement mode is important and must be passed + through. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a16e282200f84233041e5a565c6363a5a78be525 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 8 15:40:22 2010 -0500 + + xfree86: Fix the sdk headers to be multilib-safe + + Use _LP64 (verified on gcc and sun compilers) instead of _XSERVER64 in + internal header usage, and always define _XSERVER64 for modules if _LP64 + is defined. Prevents differing xorg-server.h between 32 and 64 bit + packages. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit dc498b433f36af5d2de3065e7c64cdb575385d81 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 8 15:23:04 2010 -0500 + + xfree86: If the driver found modes on an output, don't add more + + Inferring modes from sync ranges is only valid if the monitor says it's + valid. If the monitor says it's valid, then we'll have already added + those modes during EDID block parse. If it doesn't, then we should + believe it. + + If there's no EDID for an output, but sync ranges from the config, we'll + still add default modes as normal. + + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 303977fbcf9c641b7e19dfde192cef585f5b455c +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:52:49 2011 -0500 + + glxproxy: warning fix + + glxvendor.c: In function ‘__glXVForwardPipe0WithReply’: + glxvendor.c:205:10: warning: ‘be_buf’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 405ad0610d6e2f4606768294b655ac52aee9ae58 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:51:47 2011 -0500 + + glxproxy: warning fix + + glxvendor.c: In function ‘__glXVForwardAllWithReply’: + glxvendor.c:284:10: warning: ‘be_buf’ may be used uninitialized in this function + glxvendor.c:285:10: warning: ‘be_buf_size’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a4cd2e0da6415ec1b3b182579bebbe2a41f29d30 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:47:05 2011 -0500 + + glxproxy: warning fix + + glxsingle.c: In function ‘__glXForwardPipe0WithReply’: + glxsingle.c:218:10: warning: ‘be_buf’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f928caca6e60215bc9ab423acae5542dfabc9bec +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:45:31 2011 -0500 + + glxproxy: warning fix + + glxsingle.c: In function ‘__glXForwardAllWithReply’: + glxsingle.c:300:10: warning: ‘be_buf’ may be used uninitialized in this function + glxsingle.c:301:10: warning: ‘be_buf_size’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit dad2712c9328e113db4de768a12a8dafa6c177e9 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:44:03 2011 -0500 + + glxproxy: warning fix + + glxsingle.c: In function ‘__glXDisp_ReadPixels’: + glxsingle.c:760:11: warning: ‘buf’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 4270157bac645550e2c0afe89479c0bfe9d53447 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:38:23 2011 -0500 + + glxproxy: warning fix + + render2swap.c:264:13: warning: ‘swapArray’ defined but not used + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 5d0910b4fdf99e3239635a01eb2709c32d0e5bb9 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:32:54 2011 -0500 + + glxproxy: warning fix + + glxcmds.c: In function ‘CreateGLXPixmap’: + glxcmds.c:1663:20: warning: comparison between pointer and integer + glxcmds.c:1663:38: warning: comparison between pointer and integer + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit e1b5d3e5e7f157ab769c40ad2efdc1281c25a03a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:18:53 2011 -0500 + + glxproxy: warning fix + + glxcmds.c: In function ‘CreateGLXPixmap’: + glxcmds.c:1641:22: warning: ‘pGlxScreen’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 3b9de273a94fb68de51238c20c3182396aa41b84 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:07:20 2011 -0500 + + glxproxy: warning fix + + glxcmds.c: In function ‘CreateContext.clone.6’: + glxcmds.c:105:19: warning: ‘be_fbconfigId’ may be used uninitialized in this function + glxcmds.c:104:14: warning: ‘be_vid’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 767b93e783a981b4fc926299a85a1a18387e693a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 14:02:37 2011 -0500 + + glxproxy: warning fix + + glxcmds.c: In function ‘__glXGetDrawableAttributes’: + glxcmds.c:3295:8: warning: ‘screen’ may be used uninitialized in this function + glxcmds.c:3298:8: warning: ‘attribs_size’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a391089186cd1063d807bf14a9651e6861b248de +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 8 13:55:23 2011 -0500 + + glxproxy: warning fix + + glxcmds.c: In function ‘__glXChangeDrawableAttributes’: + glxcmds.c:3464:8: warning: ‘screen’ may be used uninitialized in this function + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 4102a00962f568b1d34cf72ad524e1cc705b0b1c +Author: Cyril Brulebois <kibi@debian.org> +Date: Wed Feb 23 14:44:23 2011 +0100 + + xfree86: Fix undefined reference to `XNFsprintf' on sparc. + + Build failure on sparc: + | copying selected object files to avoid basename conflicts... + | CCLD Xorg + | ./.libs/libxorg.a(xf86sbusBus.o): In function `xf86SbusConfigureNewDev': + | […]/hw/xfree86/common/xf86sbusBus.c:712: undefined reference to `XNFsprintf' + | collect2: ld returned 1 exit status + + Fix typo introduced in: + 3a9bb93dd178084f4ff1abcea331ca5a62f88ce6 + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Apologized-for-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 579ee8f5d84c3a523b7b3e3941eabb226d1d19e2 +Merge: b636893 17265cc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 23 08:44:42 2011 +1000 + + Merge branch 'mi-cleanup' into next + +commit b636893137da1695e235e3a9354bfd9243fdddc2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 22 13:43:28 2011 +0000 + + Input: Don't freeze unrelated devices in DeliverGrabbedEvent + + When delivering an event to a device grabbed with SyncBoth, + DeliverGrabbedEvent walks the device tree looking for associated devices + to freeze them. Unfortunately, it froze all devices instead of just the + paired device, and the previous fix in 4fbadc8b17237f3c would still break + if the same client had a non-SyncBoth grab on another unrelated master + device. + + Fix this by completely ignoring devices that aren't our paired device. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 17265ccb027e3f956bf7409106174f44621d1cb8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 12:28:43 2011 +1000 + + Move master/lastSlave out of the union into separate fields. + + The removal of the double-use will cause some suble bugs as some conditions + to check for the dev->u.master case were broken and also evaluated as true + if lastSlave was set (instead of master). + + Also breaks the input ABI. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 77113dd3eef03dd65b556b672d976817b3f4542e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 11:45:29 2011 +1000 + + input: Change a bunch of direct dev->u.master accesses to use GetMaster() + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 2936635698619271a790004480a14285149277cb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 12:06:56 2011 +1000 + + xkb: Fix a check for MASTER_KEYBOARD + + And copy into the master keyboard, not just the directly attached device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 0ba526deeb4d54ee1a75400291ee7a3673ed4d96 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 12:04:46 2011 +1000 + + mi: check for MASTER_POINTER instead of manual checks. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 52c13896ce9a1e178d4eeed15f68020947cc20ed +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 11:57:06 2011 +1000 + + mi: update macro to search for MASTER_POINTER + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit d270f12a3e44f4ea01f176a86783e8cd4c59ddf7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 11:55:51 2011 +1000 + + xfree86: update GetMaster check for the VCP. + + Same result, but now also triggers on slave keyboards that send pointer + events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit ce7f79efd588899f01c74f95c2f58d6dd6d816cd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 11:53:06 2011 +1000 + + dix: fix a master device access in change_modmap. + + We need to check if our master keyboard is the given device since we may be + a pointer with keys and thus need to change the modmap too. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit e1ac704185dee31b427a46cd41a00ef7a28b4129 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 11:42:09 2011 +1000 + + dix: fix up a master check in ChangeKeyboardMapping handling. + + We don't just care about the directly attached master, we care about the + master keyboard. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit febce8cb814df46018f6ae1e6a9daea019b8ad0a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 11:32:28 2011 +1000 + + Xi: replace a direct master access with GetMaster() + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit df6559237a2d641b2fc38d14975beab9bae0d971 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 18 11:30:10 2011 +1000 + + dix: add MASTER_ATTACHED as allowed type for GetMaster(). + + In some cases, we don't know/care whether we want the master pointer or keyboard + for a device. Add a new type MASTER_ATTACHED to return the master this + device is attached to. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit dc57f89959e549403f8488eb9f23425bd7118b22 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 12:47:37 2011 +1000 + + Switch to use IsFloating() + + This is not a straightforward search/replacement due to a long-standing + issue. + + dev->u.master is the same field as dev->u.lastSlave. Thus, if dev is a master + device, a check for dev->u.master may give us false positives and false + negatives. + The switch to IsFloating() spells out these cases and modifies the + conditions accordingly to cover both cases. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit e48bf3b6403dde33586ca0e421db61e402525453 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 11:11:57 2011 +1000 + + xfree86: replace two inputInfo.pointer uses with device loops. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 703baece7ebd128a6742d0523d5b3ebe65126fa5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 12:19:26 2011 +1000 + + dix: Add IsFloating(device) wrapper. + + Simplifies check for floating devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 77af45ebc3eda32dc534968cab8d5adfb01bd9e3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 12:48:30 2011 +1000 + + dix: Simplify retrieving the master device. + + GetMaster() returns NULL for floating slaves. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit dc32a23890776edf575bf18b3f3c079da6214340 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 15:21:51 2011 +1000 + + Fix two incorrect checks for master devices. + + These two were sideeffects of lastSlave being in the same field as the + master. For devices generated by the master device directly, lastSlave was 0 + and the device would (with the old checks) be interpreted as floating. + + Add the required checks to safeguard against master devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit d63c979c7fe0f2b114b27e73ebe0a706be8840ae +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 15:21:31 2011 +1000 + + dix: replace direct master access with GetMaster and temp. device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit c2a9e0a96983f22f721196513e75a53ea0b86d7e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 11:41:47 2011 +1000 + + mi: simplify a "check for keyboard" condition + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 3a6160b408447ce620140849f962683a5d139cb9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 11:40:01 2011 +1000 + + mi: remove if 0 code. + + Note sure why this is in if 0 but it's been that way since 2007. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit d9987c8c45236bc9cfcaf716f4bfcac2a9d0e7e6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 11:22:45 2011 +1000 + + mi: Add a few comments explaining various cursor move functions. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 15fe86e69fc256342881112cd07565527e32435b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 11:01:19 2011 +1000 + + mi: remove static GenerateEvent variable. + + Push into the respective devices. This should have no functional changes + since we never warp more than one device at a time. In the glorious future + with true multithreading, still the better thing to do. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> + +commit 93a73993708b1345c86ec3ec06b02ed236595673 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 21 15:40:40 2011 +1000 + + test: write some event → XI1 conversion tests. + + Don't test everything, but hey, life is short and I'm trying to have one. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 4cdf1013771bc86fe2f6d9223bc4a46753bc918f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 21 15:32:57 2011 +1000 + + dix: a valuator number of 0 is valid (#34510) + + For all but motion and proximity events, having no valuators is ok. + Regression from 1.9, keyboard events are not converted to protocol events. + + X.Org Bug 34510 <http://bugs.freedesktop.org/show_bug.cgi?id=34510> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Tested-by: Timo Aaltonen <timo.aaltonen@canonical.com> + +commit b4ef34d4664e0eaac7211f7a22a2025958aa1527 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Feb 20 11:59:41 2011 +0100 + + Revert "exa/mixed: Exclude frontbuffer from deferred pixmap handling." + + This reverts commit 541b25038a5de74411a094570b407c5ae018c2ba. + + - It turns out that the high latency was a driver problem. + - catting a large amount of text turns out to look prettier when the + throughput is lower, but it's not worth the loss for a minor + improvement that may not even exist on someone else's computer. + + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 443d75446bcbe7d97a23860a1e2d46c0b7e7cb26 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 18 14:46:33 2011 -0800 + + Version bumped to 1.9.99.902 (1.10 RC2) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2c77aeb39f59f1a94cc603a2e6256a62ce785c36 +Merge: 816d67d 402b329 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 18 14:29:32 2011 -0800 + + Merge remote branch 'jcristau/for-keith' + +commit 816d67de2ba9bdfe652da32cb6447a3056342b98 +Merge: a73c28f 3bbb70a +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 18 12:20:26 2011 -0800 + + Merge remote branch 'whot/for-keith' + +commit a73c28f0bdafb1c5cb8129179188a99c0ca052e2 +Author: Justin Dou <Justin.Dou@intel.com> +Date: Thu Feb 10 16:27:29 2011 -0500 + + Replace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers function + + The calling for allocate_or_reuse_buffer may fail due to some reason, e.g. out of memory. + If the buffers[] were not initialized to be NULL, the following err_out may try to access an illegal memory, which will cause X crash afterward. + + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Justin Dou <Justin.Dou@intel.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0bc9b15a622377c57e617411ccd26c4b5bf8cba4 +Merge: d1123b6 93cd4b1 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 18 12:04:41 2011 -0800 + + Merge remote branch 'ajax/for-keithp' + +commit d1123b66ebbcf96dd816236f54befc568a5f7c68 +Merge: 5d020c3 f6e4ace +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 18 11:59:25 2011 -0800 + + Merge remote branch 'jturney/master' + +commit 649269d40667cfb387cb5286dd3519dd68f7dd80 +Author: Bryce Harrington <bryce@canonical.com> +Date: Wed Feb 16 16:55:57 2011 -0800 + + Check for OOM condition in XISendDeviceHierarchyEvent + + When system is out of memory, calloc can fail returning a NULL pointer. + Check for this before dereferencing it, and bail out if it fails. + + Ref.: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/720445 + + Signed-off-by: Bryce Harrington <bryce@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 31ddb7ef4f5bac2c13c199e74a0716e43b8dc38e +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Feb 2 00:03:44 2011 +0100 + + dix: avoid FP promotion during pointer acceleration + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 006157f203f8493bb3d18e333a3fd3d6cb10f8ea +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Sep 4 16:31:24 2010 +0200 + + dix: refactor scheme init + + This makes it possible to init a scheme in one init call, so we + get rid of the tightly coupled two-phase init used before. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 38ffeec0c89e83afc62579dec221c325d667cc1e +Author: Simon Thum <simon.thum@gmx.de> +Date: Sun Feb 6 19:13:00 2011 +0100 + + xfree86: allow to check for options without warnings in the log + + This allows set_percent_option in synaptics to work as described, + and should generally enable to check option syntax without log spam. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2fbccc881bfab4bdc5b97f74a7e5bcec7fdeae20 +Author: Simon Thum <simon.thum@gmx.de> +Date: Sun Feb 6 19:07:19 2011 +0100 + + fix percent options parsing + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 46b49796015762fd131bec96eff6caaa890bfd5f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 11:28:02 2011 +0000 + + Input: Allow EventToCore to return multiple events + + Some event types (notably Expose and GraphicsExpose) require multiple + events, a la XI 1.x. Bring the EventToCore API in line with EventToXI's + and allow it to generate multiple events. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ea71495adabca52df44241c0eba39e6bceb58202 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 11:28:01 2011 +0000 + + Input: Reduce use of filter in DeliverEvents + + Instead of switching on the event filter to determine delivery, use the + event type instead. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8a0241656cecb6ab2fb377f02b14238d18e65fc1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 11:28:00 2011 +0000 + + Input: Rename EventIsDeliverable return masks + + Rename the return mask values for EventIsDeliverable: + * CORE_MASK -> EVENT_CORE_MASK + * XI_MASK -> EVENT_XI1_MASK + * XI2_MASK -> EVENT_XI2_MASK + * DONT_PROPAGATE_MASK -> EVENT_DONT_PROPAGATE_MASK + + And don't undef them in dix/events.c, since they're supposed to be + global. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 737562257e8ee30b1c438e5160a61fbb26ca609e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 11:27:59 2011 +0000 + + Input: Actually send Xi 1.x DeviceStateNotify events + + When a client has selected for Xi 1.x DeviceStateNotify events, they + should receive them when a DeviceFocusIn event is generated. The code + to do this was there, but an incorrect test meant they were never being + sent. + + The "type" passed in is the XI2 type, the XI1 type is in event.type. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit da39d57a20d4281fc4099e356645fef980290030 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 15 11:27:57 2011 +0000 + + Input: Store passive-activating key in CheckDeviceGrabs + + CheckDeviceGrabs will activate a passive grab for KeyPress and + ButtonPress events. GrabInfoRec::activatingKey contains the keycode + which activated the passive grab, so we can deactivate it later in + ProcessOtherEvents. + + Previously, CheckDeviceGrabs relied on its callers to set + activatingKey, which not all callers were doing (I'm looking at you, + ComputeFreezes). Just set it in CheckDeviceGrabs instead. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3bbb70a1a7b24d3d1375b20a13db7011cf961c86 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 16 07:56:58 2011 +1000 + + xfree86: fix up an out-of-date comment. + + InitInput simply initialises all input devices now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 402b329c3aa8ddbebaa1f593306a02d4cd6fed26 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 23 13:35:54 2011 +0100 + + glx: Work around wrong request lengths sent by mesa + + mesa used to send too long requests for GLXDestroyPixmap, + GLXDestroyWindow, GLXChangeDrawableAttributes, GLXGetDrawableAttributes + and GLXGetFBConfigsSGIX. + + Fixes a regression introduced in ec9c97c6bf70b523bc500bd3adf62176f1bb33a4 + X.Org bug#33324 <https://bugs.freedesktop.org/show_bug.cgi?id=33324> + + Reported-by: xunx.fang@intel.com + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 1137c11be0f82049d28024eaf963c6f76e0d4334 +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Jan 26 13:06:53 2011 +0100 + + glx: fix BindTexImageEXT length check + + The request is followed by a list of attributes. + + X.Org bug#33449 + + Reported-and-tested-by: meng <mengmeng.meng@intel.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit a883cf1545abd89bb2cadfa659718884b56fd234 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 23 17:05:26 2011 +0100 + + glx: fix request length check for CreateGLXPbufferSGIX + + The request is followed by an attribute list. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 0f9c6f2f822ff53b9d12ff4fa0b26cbeb7394ba5 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 13 21:36:05 2011 -0800 + + xkb: Replace malloc(strlen) + strcpy with strdup + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 682865c460945e1299f943561140f46439e2b4cb +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 13 21:36:04 2011 -0800 + + XkbAddGeomProperty: Fix checks for malloc failure + + Check the variable we just tried to malloc, not the string we're copying + and already checked for NULL at the beginning of the function. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit aac1b435664819008989ed19f73e9c89920602c5 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 13 21:36:03 2011 -0800 + + Replace _XkbDupString with Xstrdup + + The two functions have identical semantics, including safely returning + NULL when NULL is passed in (which POSIX strdup does not guarantee). + + Some callers could probably be adjusted to call libc strdup directly, + when we know the input is non-NULL. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a4a2e814d5d0e6152307a301eda1d6fc1c555aaa +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 13 21:36:02 2011 -0800 + + xkb: Use snprintf to measure string lengths instead of manual strlen math + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit c9f7b303a36ca501c6ecf1196c266ee8e8f49d2d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 11 13:50:10 2011 +1000 + + xfixes: calloc, not malloc the cursorScreenRec + + Debugging NULL pointers is significantly easier than random memory. + Plus, if new fields (such as pointer barriers) are added they may just be + properly initialised. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit d3499556d8d83396fa2585bd00371a81e086be36 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 10 15:12:14 2011 +1000 + + xkb: if the keymap failed to compile, load the default keymap instead. + + We really need symbols, compat, keynames, vmods and types for a sensible keymap. + + Try this in your xorg.conf.d snippets for all keyboards: + Option "XkbLayout" "us" + Option "XkbVariant" "nodeadkeys" + + us(nodeadkeys) doesn't exist so xkbcomp provides everything but the symbols + map. We say we want everything but don't _need_ anything, the server happily + gives us a keymap with every key mapped to NoSymbol. This in turn isn't what + we want after all. + + So instead, require symbols, compat, keynames, vmods and types from the + keymap and if that fails, load the default keymap instead. If that fails + too, all bets are off. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 47d1d2fed656c3a3b2600491078da90962c46934 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 10 15:11:34 2011 +1000 + + xkb: split out keymap compilation. + + Refactoring for simpler double-use in the next patch. No functional changes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 787ba25a8a3af52b38448a1a6f8c9704ea8b7905 +Author: Carlos Garnacho <carlosg@gnome.org> +Date: Mon Feb 7 18:21:31 2011 +0100 + + Xi: make XIQueryPointer return the current modifiers/group as documented. + + The previous XKB info was being returned instead of the current + one, producing inconsistent results between the latest events + and the modifiers/group returned by this call. + + Signed-off-by: Carlos Garnacho <carlosg@gnome.org> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>` + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 85f9017393c9bb19553e9afcf554673a44a09993 +Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> +Date: Tue Feb 8 11:10:10 2011 +0200 + + ProcXkbGetXkbByName: fix use of uninitialised bytes valgrind error. + + ==9999== Syscall param writev(vector[...]) points to uninitialised byte(s) + ==9999== at 0x4AB5154: writev (writev.c:51) + ==9999== by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912) + ==9999== by 0x61C8B: FlushClient (io.c:924) + ==9999== by 0x62423: WriteToClient (io.c:846) + ==9999== by 0xCE39B: XkbSendMap (xkb.c:1408) + ==9999== by 0xD247B: ProcXkbGetKbdByName (xkb.c:5814) + ==9999== by 0x4AB53: Dispatch (dispatch.c:432) + ==9999== by 0x205BF: main (main.c:291) + ==9999== Address 0x557eb68 is 40 bytes inside a block of size 4,096 alloc'd + ==9999== at 0x48334A4: calloc (vg_replace_malloc.c:467) + ==9999== by 0x62567: WriteToClient (io.c:1065) + ==9999== by 0x452EB: ProcEstablishConnection (dispatch.c:3685) + ==9999== by 0x4AB53: Dispatch (dispatch.c:432) + ==9999== by 0x205BF: main (main.c:291) + ==9999== Uninitialised value was created by a stack allocation + ==9999== at 0xD1910: ProcXkbGetKbdByName (xkb.c:5559) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> + +commit 8a34d7a8532c7ca013e67307f3baf200167abb92 +Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> +Date: Tue Feb 8 11:10:11 2011 +0200 + + XkbSendNames: fix use of uninitialised bytes valgrind error. + + ==537== Syscall param writev(vector[...]) points to uninitialised byte(s) + ==537== at 0x4AB7154: writev (writev.c:51) + ==537== by 0x8935B: _XSERVTransWritev (Xtrans.c:912) + ==537== by 0x6C55F: FlushClient (io.c:924) + ==537== by 0x6CCF3: WriteToClient (io.c:846) + ==537== by 0xD51D3: XkbSendNames (xkb.c:3765) + ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) + ==537== by 0x27B7B: Dispatch (dispatch.c:432) + ==537== by 0x205B7: main (main.c:291) + ==537== Address 0x55899f2 is 154 bytes inside a block of size 1,896 alloc'd + ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) + ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) + ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) + ==537== by 0x27B7B: Dispatch (dispatch.c:432) + ==537== by 0x205B7: main (main.c:291) + ==537== Uninitialised value was created by a heap allocation + ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) + ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) + ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) + ==537== by 0x27B7B: Dispatch (dispatch.c:432) + ==537== by 0x205B7: main (main.c:291) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> + +commit 87fbef9157a6f1e1318382e368d27942d7ad72ab +Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> +Date: Tue Feb 8 11:10:09 2011 +0200 + + ProcRRCreateMode: fix use of uninitialised bytes valgrind error. + + ==543== Syscall param writev(vector[...]) points to uninitialised byte(s) + ==543== at 0x4AB7154: writev (writev.c:51) + ==543== by 0x8935B: _XSERVTransWritev (Xtrans.c:912) + ==543== by 0x6C55F: FlushClient (io.c:924) + ==543== by 0x6D013: FlushAllOutput (io.c:668) + ==543== by 0x27A83: Dispatch (dispatch.c:453) + ==543== by 0x205B7: main (main.c:291) + ==543== Address 0x556dc8c is 12 bytes inside a block of size 4,096 alloc'd + ==543== at 0x48334A4: calloc (vg_replace_malloc.c:467) + ==543== by 0x6CE37: WriteToClient (io.c:1065) + ==543== by 0x223A7: ProcEstablishConnection (dispatch.c:3685) + ==543== by 0x27B7B: Dispatch (dispatch.c:432) + ==543== by 0x205B7: main (main.c:291) + ==543== Uninitialised value was created by a stack allocation + ==543== at 0xA3350: ProcRRCreateMode (rrmode.c:289) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> + +commit 0ef5973860e17c5edc996c923610f7ad88b4dfbe +Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> +Date: Tue Feb 8 11:10:08 2011 +0200 + + ProcRRQueryVersion: fix use of uninitialised bytes valgrind error. + + ==9999== Syscall param writev(vector[...]) points to uninitialised byte(s) + ==9999== at 0x4AB5154: writev (writev.c:51) + ==9999== by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912) + ==9999== by 0x61C8B: FlushClient (io.c:924) + ==9999== by 0x62743: FlushAllOutput (io.c:668) + ==9999== by 0x4AA5B: Dispatch (dispatch.c:453) + ==9999== by 0x205BF: main (main.c:291) + ==9999== Address 0x55711b9 is 1 bytes inside a block of size 4,096 alloc'd + ==9999== at 0x48334A4: calloc (vg_replace_malloc.c:467) + ==9999== by 0x62567: WriteToClient (io.c:1065) + ==9999== by 0x452EB: ProcEstablishConnection (dispatch.c:3685) + ==9999== by 0x4AB53: Dispatch (dispatch.c:432) + ==9999== by 0x205BF: main (main.c:291) + ==9999== Uninitialised value was created by a stack allocation + ==9999== at 0x160E78: ProcRRQueryVersion (rrdispatch.c:37) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> + +commit 81daba8ce906bfbbe44cd71d0ff269ad34e2f6b5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 31 13:53:08 2011 +1000 + + Xi: constify XIChangeDeviceProperty() + + We don't modify "value", make it official. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> + +commit 93cd4b1034e3c8bed32c5acd391eadd7605e10f0 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:27:00 2011 -0500 + + shadow: Remove hw/xfree86/ from includes + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 0c230728f3af2c4250e93a070c0851a597069447 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:25:57 2011 -0500 + + rootless: Remove hw/xfree86/ from includes + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 505defd270e49cfbcbe6a04d1de817d305edb3c2 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:24:20 2011 -0500 + + damage: Remove hw/xfree86/ from includes + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 59d8e3cbdba032c7354c28c86cbd155e9da6447a +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:23:07 2011 -0500 + + fb: Remove hw/xfree86/ from includes + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 994b7b3dc97f9afa713fe636af45a78002a4366f +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:17:52 2011 -0500 + + xfree86: warning fix + + Did you know that anonymous enums with function scope will not only + override the enum values from global scope, but will be treated as + entirely different types? C's type system just rules. + + xf86Crtc.c: In function 'handle_detailed_monrec': + xf86Crtc.c:1555:33: warning: comparison between 'enum det_monrec_source' and 'enum <anonymous>' + xf86Crtc.c:1562:33: warning: comparison between 'enum det_monrec_source' and 'enum <anonymous>' + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ae16c5796fdb22fb6b2f680fe5123bfd2c89a825 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:14:11 2011 -0500 + + fbdevhw: Remove the non-sysfs hack for mapping from PCI to fbdev + + It's broken for devices with BARs above 4G, and the sysfs method should + work everywhere anyway. As a pleasant side effect, this fixes some + warnings: + + fbdevhw.c: In function 'fbdev_open_pci': + fbdevhw.c:333:4: warning: cast from pointer to integer of different size + fbdevhw.c:334:4: warning: cast from pointer to integer of different size + fbdevhw.c:336:4: warning: cast from pointer to integer of different size + fbdevhw.c:337:4: warning: cast from pointer to integer of different size + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f1b7c9cead94b520e6b96774d605d63d3f341b50 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:09:19 2011 -0500 + + int10: warning fix + + helper_exec.c: In function 'pciCfg1in': + helper_exec.c:507:4: warning: passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer type + /usr/include/pciaccess.h:153:5: note: expected 'uint32_t *' but argument is of type 'CARD32 *' + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit be186586e504197623c69637b8122fb814f59429 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 00:06:48 2011 -0500 + + xf86vidmode: warning fix + + xf86VidMode.c: In function 'VidModeGetMonitorValue': + xf86VidMode.c:637:19: warning: 'ret.i' may be used uninitialized in this function + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f6e4ace9eabea1bb2a06dd86b6ffb954917a74ce +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Jul 18 13:24:48 2010 +0100 + + Cygwin/X: Fix for Canadian Multilingual Standard keyboard layout handling + + Add a keycode mapping for VK_OEM_8 as RCtrl, which is issued by Canadian + Multilingual Standard layout + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit b421f5e5122dbe125a5629969cc657bd966b4261 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Apr 1 23:10:58 2010 +0100 + + Cygwin/X: Ignore MappingNotify events sent to clipboard integration client + + Ignore MappingNotify events sent to clipboard integration client, + xmodmap changes aren't of interest to it, but there is no mechanism + to express that disinterest. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit e930aa7bbc7f04a128df8e6fd441aed5123a2eb6 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Sep 14 16:02:53 2010 +0100 + + Cygwin/X: Add Turkish keyboard layouts to keyboard layout mapping table + + 0x0000041f "Turkish Q" => layout tr + 0x0001041f "Turkish F" => layout tr variant f + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit ae99a6f895a3a5b6f71e2dd4874cd4bb0235aff0 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Jul 18 13:42:29 2010 +0100 + + Cygwin/X: Make the keyboard layout detection logging a bit clearer + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 57ca09441ee5ff2a8deb95eaa17a2625a756d912 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Jul 1 14:54:48 2010 +0100 + + Cygwin/X: Update mapping for Canadian keyboard layouts + + 0x00000c0c "Canadian French (legacy)" => layout ca variant fr-legacy + 0x00001009 "Canadian French" => layout ca variant fr + 0x00011009 "Canadian Multilingual Standard" => layout ca variant multix + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit be3e5bb50178406e46368be00860331e1b6c4093 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Apr 14 21:45:29 2010 +0100 + + Cygwin/X: Better keycode debugging output + + Replace useless #if 0/ErrorF/#endif with winDebug + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 81892bf6b7e3730ebd19318183734f55dbaa5d4b +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Apr 14 21:34:39 2010 +0100 + + Cygwin/X: Generate X keycodes for multimedia keys + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 5d020c31351594c104fb46615ce41f256cd8e8b9 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Fri Jan 14 15:03:28 2011 +0200 + + xf86/xv: Only register PostValidateTree hook when there is work to do + + If none of Xv ports were affected by window tree modifications we don't + want scan the port list. To avoid useless scanning of port list + PostValidateTree hook is only registered when ClipNotify was called for + any port. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit ddf32df5cc2e73b833f6e414276d938fdc38869e +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jan 13 20:50:16 2011 +0200 + + xf86/xv: Use PostValidateTree to do reput + + ValidateTree calls first ClipNotify and later might call + WindowExposures. To avoid useless double reput ClipNotify delays reput + to WindowExposures or PostValidateTree. + + PostValidatTree checks all ports if there is clip changes. On clip + changes reput is done to move or scale the overlay. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit 5678a41f6bc0ef8965bd50a88c5ef01ba7eb8b24 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Jan 17 16:58:00 2011 +0200 + + xf86/xv: Fill color key on expose + + If window gets exposed but clipboxes doesn't change drivers would avoid + color key fill. This makes XResizeWindo&co to lose colorkey if + background is painted. + + To help drivers to avoid filling colorkey for each put server can + provide helper function if there is exposed areas. Server can subtract + exposed areas from filled region. + + As a side effect we can avoid useless color key fills if window only + moves in screen without background fills. + + v3: + * Change tracking to filled area to account for client initiated clip + changes + * Make overlaid XvPutImage behavior like textured XvPutImage or PutImage + * Make region dynamically allocated only when required. + + v4: + * Simplify new driver interface to reduce duplicate code + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit 9b048ca420864e19862f63f4a491a4da0ff9b54f +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Jan 17 15:07:28 2011 +0200 + + xf86/xv: Remove unused variable from XvPortRecPrivate + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit 4f8f803280894a8c41691e350b7a34bfd719fe05 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jan 13 20:21:09 2011 +0200 + + xf86/xv: Remove unused GC pointers + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit e012f2312b4bcdf31bb5d622ddd34571f3c12429 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jan 13 20:19:18 2011 +0200 + + xf86/xv: Remove copy paste code. + + xf86XVFillKeyHelperDrawable can be used to implement + xf86XVFillKeyHelper. + + V2: + * Remove RegionTranslate that clobbered parameter region. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> + +commit ea1ffd3e60bdcedbec5a6f28929f8677bf45d450 +Merge: 12b0f7d 53602c3 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 2 15:19:55 2011 -0800 + + Merge remote branch 'whot/for-keith' + +commit 12b0f7df2caa78d68b453aaa91248bb3577fd724 +Author: Evan Broder <ebroder@mokafive.com> +Date: Tue Feb 1 16:09:50 2011 -0800 + + xfree86/modes: Be sure to only use new EDID for physical output dimensions + + The EDID processing regards physical dimensions of 0mm x 0mm as + invalid. Previously the old values for height and width would be + preserved if none of the physical dimension specifications in the new + EDID were considered valid. + + This will come up in particular if first a monitor is connected to an + output, and then a projector is connected. Since projectors generally + report physical dimensions of 0mm x 0mm, this would result in the + projector claiming to have the physical dimensions of the monitor. + + Signed-off-by: Evan Broder <ebroder@mokafive.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0b15033031d78836582bd1b641c3160c3803a708 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Mon Jan 31 23:25:10 2011 +0100 + + xserver: enable TLS even if AIGLX is not enabled + + This aligns the xorg server build with the mesa build, which is needed on + systems where aiglx with dri support is not enabled. Else the following error is + obtained when trying to load the software raster: + + (EE) AIGLX error: dlopen of /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: undefined symbol: _glapi_tls_Context) + (EE) GLX: could not load software renderer + (II) GLX: no usable GL providers found for screen 0 + + because mesa always enables TLS use in GLX, even if dri is not available. + + Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 541b25038a5de74411a094570b407c5ae018c2ba +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Jan 30 14:06:16 2011 +0100 + + exa/mixed: Exclude frontbuffer from deferred pixmap handling. + + - Apps like xterm can trigger a lot of fallback rendering. + - This can lead to (annoyingly) high latencies, because you + have to wait for the block handler. + - You need a driver that doesn't directly access the front + buffer to trigger this (NV50+ nouveau for example). + - Repeatingly doing dmesg on an xterm with a bitmap font + will reveal that you never see part of the text. + - I have recieved at least one complaint in the past of slow + terminal performance, which was related to core font + rendering. + - This does sacrifice some throughput, roughly 33% slower. + + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit af87f6367ef733d1a4f3cfca4eeb92bfd84c2b6f +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Jan 30 14:06:15 2011 +0100 + + exa: Only call driver FinishAccess hook if PrepareAccess hook succeeded. + + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 648d4fe5172cad33c6f09e05dd3d8d7171ef1a7f +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Jan 30 14:06:14 2011 +0100 + + exa/driver: set pExaPixmap->use_gpu_copy to the right value + + - Not sure if it was causing problems, but you never know. + + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 246d40b685292fa6393ba22127152137494af2af +Merge: 70f2d39 8c1f75a +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 2 14:51:33 2011 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 70f2d39fbde38d0baa687f1755b6c4c686f23052 +Merge: 3a91c2d a9d3c43 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 2 14:43:19 2011 -0800 + + Merge remote branch 'jturney/master' + +commit 3a91c2d21c3231e2a011d95c3cfc01785430c1cf +Merge: ac0a00a 82b1eaa +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 2 14:37:00 2011 -0800 + + Merge remote branch 'dbn/build-fixes' + +commit ac0a00a840a5d8d8374e5db2b849e5959550ca4e +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 23:01:03 2011 -0500 + + xselinux: Fix GetDrawableContext + + M_DRAWABLE_PIXMAP is the lookup mask to dixLookupDrawable, and _not_ the + type value in the drawable itself. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8c1f75a1d4cb5a34b4d10f3f5068bccc4356f31a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Jan 28 21:13:38 2011 -0800 + + XQuartz: Localization Updates + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 53602c36217487e0a80880e8328f89ab302d85c8 +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:49 2011 +0200 + + xfree86/dga: Remove DGAIsDgaEvent() + + DGAIsDgaEvent() is not used anymore. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2081728b7432e949c274e0dbbabc296fa4db17f9 +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:48 2011 +0200 + + xfree86/dga: Only send DGA events for master devices + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9f09b62e594321a8e45a33f4f13559827d660ed3 +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:47 2011 +0200 + + xfree86/dga: Remove useless ifdefs + + Move some variables to the scope where they are used. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5c941c04ca68cdc2b236c524970bc23f91906af4 +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:46 2011 +0200 + + xfree86/dga: DGAProcessKeyboardEvent() forgot ET_Internal + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ce4e0f660beb097e90110c97d039981702f0b0bd +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:45 2011 +0200 + + xfree86/dga: Remove DGAMouseX and DGAMouseY + + Previously some sort of absolute coordinates were sent out in + the padding of the DGA2 Motion and Button events. DGAMouseX + and DGAMouseY were used to keep track of said coordinates. + libXxf86dga doesn't use that data for anything, and at least + git history didn't show any past usage either. So let's just + remove the last remnants of of this mess. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ee8faeadb60f51a36edce19e568600dab7c8b357 +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:44 2011 +0200 + + xfree86/dga: DGA2 events are missing the dx/dy information + + Copy dx/dy from the internal event to the DGA2 Motion/Button events. + Do the same for Key events for the sake of keeping the code consistent. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e3fef815cf85cf59256f3edeaa21c1267898b42c +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:43 2011 +0200 + + xfree86/dga: Make mieq_install Bool + + mieq_installed is used as a boolean, so why not make it such. Also + it's a static variable, so the the explicit zero initialization can + be removed. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f4cb25c2ed832bf4cfcd4d25198fe5a895430fed +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:42 2011 +0200 + + xfree86/dga: Remove the ET_DGAEvent handler only if it was installed + + Remove the handler only if it was installed. Also mark it as + uninstalled, otherwise it wouldn't get reinstalled after a + server reset. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e1547a9f1f6d7991219b7711f4cacc2852dbf88c +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:41 2011 +0200 + + xfree86/dga: Install the DGA event handler when DGA2 is used + + The ET_DGAEvent handler is only installed when a client + requests relative events via DGA1. Do it also when a client + requests DGA2 events. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7b16e8633d5a95167aac0c19e43fcfe38bd4a6a4 +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:40 2011 +0200 + + xfree86/input: Restore DGAStealKeyEvent() + + DGA key event support was lost in commit + 8da0ff2d51086666d10ca7330d428e8610a4a0e3. Bring it back. + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a2c481821997ae14aa5816895ae36db2ca2e4dec +Author: Ville Syrjala <syrjala@sci.fi> +Date: Mon Jan 24 01:06:39 2011 +0200 + + include: Fix a copy/paste error in a comment + + Signed-off-by: Ville Syrjala <syrjala@sci.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 77af0dc5217fc9c446097d6d487c8ddaf00bdd2a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 24 10:06:34 2011 +1000 + + xfree86: bump input minor ABI + + The new valuator_mask_free() call requires a minor bump. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5927e070b45fbe3fea4b394920ffd6f7d036f1ed +Author: Erkki Seppälä <erkki.seppala@vincit.fi> +Date: Fri Jan 21 15:56:22 2011 +0200 + + xkb: Cancel a key's repetition when its autorepeat is disabled. + + When XkbChangeEnabledControls is called to disable key repetition of a + certain key (or keys), currently ongoing repetition of that key was + not cancelled. It was cancelled if ChangeKeyboardControl was used to + disable key repetition globally. + + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a9d3c43a57cbaf42d9e96ad49cf12bbf1d275fe5 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Jan 19 15:57:59 2011 +0000 + + Fix compilation of xf86bigfont.c + + xf86bigfont.c: In function 'XFree86BigfontExtensionInit': + xf86bigfont.c:146: error: 'ProcXF86BigfontDispatch' undeclared (first use in this function) + xf86bigfont.c:147: error: 'SProcXF86BigfontDispatch' undeclared (first use in this function) + + It seems this has been broken since commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e + "delete pervasively use of DISPATCH_PROC" (2010-09-28), which is a bit worrying as + that presumably indicates that no tinderbox is configuring with --enable-xf86bigfont. + + In a similar fashion to that commit, fix by moving XFree86BigfontExtensionInit() + below the definitions of the static dispatch functions it references. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit effaf9459c450f13e35bf263835d3e37d48ff29d +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Jan 23 22:35:34 2011 -0800 + + XQuartz: Use the default signal handler + + This allows better interaction with CrashTracer + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 418bb57a3923311338baa8a85c0794a72e15ceeb +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Jan 13 17:12:17 2011 -0800 + + XQuartz: Call RRScreenSizeNotify after handling externally-generated XP_EVENT_DISPLAY_CHANGED + + We get an XP_EVENT_DISPLAY_CHANGED event when our display configuration is + changed. If this change was caused by hotplugging a monitor or Mac Display + Preferences changes by the user, we need to call RRScreenSizeNotify in order + to ensure new connections get the correct screen size. + + http://xquartz.macosforge.org/trac/ticket/460 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 6f52b10b9e8068e3deafb2bbb64b62175a208c49 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Jan 13 16:08:46 2011 -0800 + + XQuartz: Bump version string to 2.6.1 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 1cfb96dd6151ebe84a9a26a428005db97e5d5577 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Jan 13 16:08:29 2011 -0800 + + XQuartz: Update copyright dates in bundle's plist + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit be3be7580b6f6fd2f7fa4d4abfe5e1ab19470223 +Merge: 57a1d9b a1d885f +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 20 21:21:21 2011 -0800 + + Merge remote branch 'ajax/for-keithp' + +commit 57a1d9b85331f6fe19d5111f5163139572ffbf02 +Merge: 24ce650 6423769 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 20 21:16:24 2011 -0800 + + Merge remote branch 'whot/for-keith' + +commit 24ce650cf4f0c6fa72faecd38c53d40703e6c959 +Merge: bbdf81a 09fd010 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 20 21:11:53 2011 -0800 + + Merge remote branch 'jturney/jturney-framebuffer-resize-for-master' + +commit bbdf81a056be0ea645da17a642dad5eadef3a906 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Jan 18 19:26:20 2011 -0800 + + Add xorg.conf.d shadow man page pointing to xorg.conf man page + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a1d885fdd67503a442b348626d2eddf6d22419e8 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jun 23 13:28:55 2010 -0400 + + resource: Fix indentation + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit cb61cf5c99004ba3c76b504220c6728b5f2d2de6 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Apr 15 18:36:55 2010 -0400 + + resource: Remove expectID hack + + This is clearly meant to short-circuit the (modestly) expensive resource + lookup in LegalNewID. The problem is that long-lived clients will + eventually run completely through their XID space and start asking + XC-MISC for IDs to reuse. Once that happens, the comparison against + expectID will always be true, and we'll no longer catch XID collisions + at all. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 3282e3c627f97f079e3a9af756a6b13bd9a5f227 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Apr 15 08:46:28 2010 -0400 + + resource: s/NullResource/NULL/g + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f953ae7d8a578d135a6faaf69d9c06eae7c85ede +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 14 14:38:10 2009 -0500 + + os: Reduce smart scheduler setup calls + + We can return from WaitForSomething with no clients ready for any number + of reasons. There's no reason to set up the scheduler timer when this + happens. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit d127075da06239852c1cc745abfe63d0d180d984 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 19:03:33 2011 -0500 + + xdmxconfig: warning fix + + xdmxconfig.c: In function ‘dmxConfigCanvasDraw’: + xdmxconfig.c:299:23: warning: ‘maxHeight’ may be used uninitialized in this function + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 7a08f9abef7219fabdab8d1d49e8d3afb042e36a +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 18:59:39 2011 -0500 + + dmx: warning fixes + + dmxinputinit.c: In function ‘dmxBlockHandler’: + dmxinputinit.c:610:44: warning: cast from pointer to integer of different size + dmxinputinit.c: In function ‘dmxWakeupHandler’: + dmxinputinit.c:637:41: warning: cast from pointer to integer of different size + dmxinputinit.c: In function ‘dmxInputInit’: + dmxinputinit.c:1041:36: warning: cast to pointer from integer of different size + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ffd323b7c0212ed9b348e51cd9b36363d7c4d1f2 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 18:55:20 2011 -0500 + + dmx: warning fix + + dmxinputinit.c: At top level: + dmxinputinit.c:135:29: warning: ‘DMXCommonOth’ defined but not used + + DMXCommonOth is actually mentioned in a #if 0 block, so delete it and + the block that references it. If anyone needs it, git remembers. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit c1fe0b155d0567440228aa5d9e36036f37670e3b +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 18:52:57 2011 -0500 + + dmx: warning fix + + dmxgc.c: In function ‘dmxChangeClip’: + dmxgc.c:386:5: warning: case label value exceeds maximum value for type + dmxgc.c:387:5: warning: case label value exceeds maximum value for type + dmxgc.c:388:5: warning: case label value exceeds maximum value for type + dmxgc.c:389:5: warning: case label value exceeds maximum value for type + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit b02e006b2733ea457df41791f6054309e4edf7f6 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 20 18:46:00 2011 -0500 + + dmx: warning fixes + + Dear gcc: I do not care about machines where sizeof(void *) < + sizeof(int), and neither should you. + + dmxextension.c: In function ‘dmxBECreateResources’: + dmxextension.c:858:26: warning: cast from pointer to integer of different size + dmxextension.c: In function ‘dmxBERestoreRenderPict’: + dmxextension.c:1062:29: warning: cast from pointer to integer of different size + dmxextension.c: In function ‘dmxBERestoreRenderGlyph’: + dmxextension.c:1084:35: warning: cast from pointer to integer of different size + dmxextension.c: In function ‘dmxAttachScreen’: + dmxextension.c:1277:8: warning: cast to pointer from integer of different size + dmxextension.c:1286:34: warning: cast to pointer from integer of different size + dmxextension.c:1292:35: warning: cast to pointer from integer of different size + dmxextension.c: In function ‘dmxBEDestroyResources’: + dmxextension.c:1456:26: warning: cast from pointer to integer of different size + dmxextension.c: In function ‘dmxDetachScreen’: + dmxextension.c:1599:8: warning: cast to pointer from integer of different size + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 64237697994871adfcf4905b5784e75cd7281579 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 13 12:20:38 2011 +1000 + + xkb: after making changes to the xkb ctrls, copy them back into kbdfeed. + + enabled_ctrls_changes nowhere near the usual event or config paths. So this + condition always evaluated to false and the memcpy would thus never been + hit. As a result, any modification to the XKB struct during + XkbUpdateDescActions was not reflected in the kbdfeed ctrls. + The flag that is set by XkbUpdateDescActions() if ctrls were changed are in + enabled_ctrls. + + This mainly affected keyboard repeat control as XKB uses the kbdfeed ctrls, + not XKB's per_key_repeats, to determine if a key needs to be repeated. Thus, + adding a "repeat= False" to the XKB map of any action did not have any + effect. + + Test case: + assign Mode_switch to any key that by default repeats, e.g. the menu key. + + key <COMP> { [ Mode_switch ] }; + + Then modify the Mode_switch action to not repeat the key. + + interpret Mode_switch+AnyOfOrNone(all) { + virtualModifier= AltGr; + useModMapMods=level1; + action= SetGroup(group=+1); + // Add this line + repeat= False; + }; + + Though the flags are correctly reflected in the description loaded in the + server, the change is not handed back to the kbdfeed struct and XKB will + trigger softrepeats of this key. + + This patch also adds two explanatory comments and an extra check, as this + path may be hit before the CtrlProc for the kbdfeed struct is set. + + Red Hat Bug 537708 <https://bugzilla.redhat.com/show_bug.cgi?id=537708> + + Also fixes broken auto-repeat of the backspace key in the colemak layout + (mapped to CapsLock). + + X.Org Bug 16318 <http://bugs.freedesktop.org/show_bug.cgi?id=16318> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Dirk Wallenstein <halsmit@t-online.de> + Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit f1326ed2910bd985fafdb48714b1d6f38116b083 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 13 09:19:28 2011 +1000 + + xkb: Replace a few manual bitflips with SetBit & friends. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> + +commit 16eb4f2a7b67ee169785973f9e0a3773e13fdea6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 7 09:53:35 2011 +1000 + + Xi: reset remainders when warping the device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 09fd010902fad56735b8069b1becb80d85bd6a35 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Sep 29 22:54:22 2010 +0100 + + Cygwin/X: DirectDraw engines shouldn't try to blit if the surface wasn't allocated + + Fix winShadowUpdateDD(|NL) so we don't try to blit to primary surface if it didn't get allocated + + (Intel drivers, in particular, seem to like to issue a WM_DISPLAYCHANGE during a suspend/resume + cycle, but not allow surface to be allocated right then) + + Also: + Use winReleasePrimarySurfaceShadowDD(|NL) in winFreeFBShadowDD(|NL) rather than open coding it + Don't mess about recreating surface if we're going to resize it anyhow + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 625ab9701fd75b879c1dafc05fa979591eea87c0 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Aug 31 13:45:43 2010 +0100 + + Cygwin/X: Simplify and consolidate reporting of the bpp value we are going to use + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 3f7339a7c5d3dcd05909b041865125f4cb6fa29e +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Aug 31 10:13:01 2010 +0100 + + Cygwin/X: Deal with RANDR depth changes correctly in ShadowGDI drawing engine + + Make ShadowGDI drawing engine only change the size of the screen + pixmap/shadow framebuffer on an RANDR change, not the bpp/depth + as well. + + The server requires the screen pixmap's depth to be invariant. + + Other drawing engines aren't quite as affected by this issue as + they won't draw to the display, if it has changed colour depth, + but probably still need some attention. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 8b22f83113fbdc09b932b5ad7e44f629fc15e3b5 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Aug 30 17:17:57 2010 +0100 + + Cygwin/X: Use winUpdateFBPointer() in winshaddd.c rather than duplicating it inline + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 8385c426f86e9955e9e570a46f75bddd3c10ca01 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Aug 10 21:55:15 2010 +0100 + + Cygwin/X: Remove WIN_DIB_MAXIMUM_SIZE check + + This is only relevant to pre-NT versions of Windows, which are all EOL. + + Also, it's in the wrong place now as framebuffer can get resized. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 981ad1f364cf4fe8008c0f3592eb0f73dd14a118 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Aug 10 16:24:57 2010 +0100 + + Cygwin/X: Fix a typo in command line argument validation code + + Fortunately, these swapped constants are benign as they have the same + value, 0 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 5390b494672393506466d8afdb9b146b0e585cc0 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Aug 10 13:16:13 2010 +0100 + + Cygwin/X: Don't turn off -multiplemonitors when all monitors don't have the same pixel format when using shadow GDI engine + + Don't turn off -multiplemonitors when all monitors don't have the + same pixel format and when using shadow GDI engine, just warn that + performance may be degraded + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 33106e1e807a828208b306512e78c5e3e93960d3 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Mar 30 19:49:41 2010 +0100 + + Cygwin/X: Generate RANDR change on WM_DISPLAYCHANGE for rootless modes + + When RANDR resizing is enabled, generate an internal RANDR change when + WM_DISPLAYCHANGE occurs in rootless modes for screens which occupy an + entire monitor or the virtual desktop. + + Store the monitor number and use that to handle WM_DISPLAYCHANGE for a + screen specified with '-screen @monitor' + + In rooted mode, WM_DISPLAYCHANGE isn't relevant (except where display + depth changes may cause problems). (A maximized screen window will get + WM_SIZE to adjust it to the new monitor size) + + In rooted fullscreen mode, WM_DISPLAYCHANGE shouldn't be seen, as we + have the resolution we have selected for the fullscreen session) + (Could client randr requests be handled in fullscreen to cause a change + of the fullscreen resolution? ) + + Don't bother do a RANDR resize if the dimensions aren't actually changing + when WM_DISPLAYCHANGE is sent (should handle WM_DISPLAYCHANGE to size 0x0 + that the intel driver seems to like to send) + + Various debug output improvements + + Also, remove the note that XWin can't handle display mode changes from + the man page + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit bbc511e80b2a9365f6a1528bc1595772f83be654 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Feb 15 13:42:04 2010 +0000 + + Cygwin/X: Make WM_SIZE use RandR resizing when -resize=randr + + To avoid recursion, WM_SIZE requests shouldn't generate XRANDR requests + when no change is neeeded. + + We do the actual resize on WM_EXITSIZEMOVE, as resizing occurs in + a modal loop, to avoid a backlog of resize events building up as + the X server doesn't get a change to process anything until the resize + is completed. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 85c497a8b6c488ef9ea2c6d7b49e6f9b992fb4a2 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Mar 30 20:48:10 2010 +0100 + + Cygwin/X: Implement framebuffer resizing in RANDR extension + + Implement framebuffer resizing in RANDR extension: + + Resize the frame buffer, the screen's root window and the native window + containing the root window image. + + Correctly allow for decorations in new native window size when resizing native window + to fit the new framebuffer size with AdjustWindowRectEx() + + Update physical size info for a screen when it is changed by RANDR + + Forbid client-requested RANDR changes in fullscreen and rootless modes + + Only resize window on an external RandR request, to avoid recursing on + a WM_SIZE requested resize. + + Also, add prototypes for winRandRInit() and winDoRandRScreenSetSize() to header file + + Also, update the author list and copyright for winrandr.c + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 873abef315f5d947b864428891381bff539c5869 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Mar 30 20:07:19 2010 +0100 + + Cygwin/X: Add -resize command line option + + Add -resize command line option to configure how native window sizing frame + is used. + + In additions to the existing fixed and scrollbars modes, add a new mode to + allow framebuffer to be resized using native window frame + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 46c57788539d8a5f0246528b4f88ad4ed6d867d1 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Feb 23 15:44:36 2010 +0000 + + Cygwin/X: Move QueryMonitor() out of windprocarg.c + + Move QueryMonitor() out of windprocarg.c into a new file, winmonitors.c, + as we use to use it from other places as well + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 73b02e964787ea9fb2d139dc781c9b2495ccb031 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Feb 12 12:29:30 2010 +0000 + + Cygwin/X: Remove an attempt at detecting if WM_DISPLAYCHANGE affects the X screen + + Remove an attempt at the rather difficult optimization of detecting + if WM_DISPLAYCHANGE affects any of the monitors which intersect the + native window for the X screen. + + We'll always act as if it does, which it probably usually the case. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit a46146af5f6c2d96728c43f0df369ea00bcae017 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Apr 1 21:00:43 2010 +0100 + + Cygwin/X: Rather than storing calculated physical display sizes, calculate them when needed + + (This stored calculation was wrong if -dpi came after -screen on the command + line, anyhow) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit df518001271dbc0c49935350b755f0c0562cdb92 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Oct 13 14:47:33 2009 +0100 + + Cygwin/X: Refactor framebuffer allocation/release in drawing engines + + Refactor the drawing engines so we can explicitly allocate and release the framebuffer for a screen + + Move the setting of dwPaddedWidth into the DDNL engine, so it is updated when the framebuffer changes size + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit 708d0b9781c6f3f0c0ae7052f45223b1c2524809 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Oct 13 14:48:17 2009 +0100 + + Cygwin/X: Enable building of nativegdi and primaryfb engines to avoid further rusting + + Some trivial build fixes required + + Also fill out all function pointers for primaryfb engine + + Also tidy up the man page section describing drawing engines. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit c6aa4755ec355101a62bef86dbb090262fe806f6 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Jan 15 12:13:39 2011 -0800 + + xkb/ddxLoad.c doesn't need <paths.h> any more + + Was previously used for _PATH_VARTMP, but that was removed in + 534fc5140b039a8c98ab715d0a6740d513b41209 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit abfea17342da774aa4e3a351a73c8f2af6e6fd28 +Merge: 3611283 e65c3f8 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jan 18 15:19:34 2011 -0800 + + Merge remote branch 'ajax/for-keithp' + +commit 361128389e5cb0101cbd091ff8de77cf34608f6c +Merge: 65ceaad d9225b9 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jan 18 15:18:08 2011 -0800 + + Merge remote branch 'jcristau/for-keith' + +commit 65ceaadbf0fb65f1962cb96d5b87fd1175f85a3b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:28:31 2011 -0500 + + Xquartz: rename man page directory from doc to man + + Following the convention makes it easier to locate man pages, + user's or developer's documentation and specifications. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7ed0d426f616fe9e44ac7091622a798f2043dfe4 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:28:30 2011 -0500 + + xfree86: use sed rather than cpp to perform string substitutions + + Makefile.am: there are only 4 string substitutions to be done in this file. + SED is much simpler than the C pre processor which adds its own + strings which must be substituted by sed, still. + + xorgconf.cpp: replaced __xconfigfile__ with xorg.conf as this file name + is hard coded in the xserver configuration and cannot change. + Replace XCOMM with # permanently. + + Delete cpprules.in as it isn't used anywhere else. Should one need + cpprules for real cpp work, there is one in Xquartz from which the + the old man pages code have been stripped. + + Fix trailing spaces. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 885a3330092c13786baa3aaabd728e71962486c4 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:28:29 2011 -0500 + + man: refactor common code in the man pages makefiles + + Create a manpages.am makefile snippet in the root dir. + Each man page makefile includes manpages.am. + + Now all man pages in xserver are generated the same way + using the same method as all of other xorg modules. + All ".man.pre" files in git are ".man" now. + Links are no longer created between different file types. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c86f7c2b8eedd3126066a3aff44bc8767eb5e277 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:28:28 2011 -0500 + + Xdmx: build all man pages using XORG_MANPAGE_SECTIONS + + Use standard directory and makefile. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9bd9d550a0d6fb4fe3daacb604658de92e69d99c +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:28:27 2011 -0500 + + exa: build man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + Fix trailing whitespaces + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d4b1fd3ff66d1a3e44a85aed34d9a01eee0d37fd +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:28:26 2011 -0500 + + fbdevhw: build man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + Fix trailing whitespaces + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b9276cb86b433bc740fe26c2e624d3d5399732f6 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:53 2011 -0500 + + XFree86 utils: build utils man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + Fix trailing whitespaces + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ac5ffef60e05eb05275913b133786709881e7e7e +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:52 2011 -0500 + + Xephyr: build Xephyr man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + Fix trailing whitespaces + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9240cffd659b1c13d66162200c6e384ea1cdbc44 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:51 2011 -0500 + + Xvfb: build Xvfb man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + Fix trailing whitespaces + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 3f4c71799b3164440624d09b7b631d3d3c0a29ef +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:50 2011 -0500 + + XWin: build XWin man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + Now can be built easily on any platform in the man directory + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b8492e18a7e5322c4a492f6cf6cfeb5b0221d994 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:49 2011 -0500 + + Xnest: build Xnest man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 57ca20d26614a0787cdd0db91a2eb8cdb301f2dc +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:48 2011 -0500 + + Xquartz: strip the man page code from cpprules.in + + This is dead code which will not be used in the future. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c06c46acdc2ead20a6030118fad6092b3da6709f +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:47 2011 -0500 + + Xquartz: build Xquartz man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) + Use standard directory and makefile + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a9e85013b1045c7e02891a019bfa8042a219b7f1 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:46 2011 -0500 + + man: build Xorg and xorg.conf man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file extensions (.man) means no need for .gitignore + Use standard directory and makefile + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit dcdd8ea82c0e2f657abdc80a22aa0c01ead07e54 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jan 9 20:27:45 2011 -0500 + + Xorg.man: fix whitespace issues + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d9225b9602c85603ae616a7381c784f5cf5e811c +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Nov 10 22:39:54 2010 +0100 + + glx: validate numAttribs field before using it + + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 62319e8381ebd645ae36b25e5fc3c0e9b098387b +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Aug 22 16:20:45 2010 +0100 + + glx: swap the request arrays entirely, not just half of them + + Various glx requests include a list of pairs of attributes. We were + only swapping the first half. + + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 6c69235a9dfc52e4b4e47630ff4bab1a820eb543 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Aug 22 00:50:05 2010 +0100 + + glx: check request length before swapping + + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit ec9c97c6bf70b523bc500bd3adf62176f1bb33a4 +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Jul 3 19:47:55 2010 +0100 + + glx: validate request lengths + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 3f0d3f4d97bce75c1828635c322b6560a45a037f +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Jul 3 19:42:26 2010 +0100 + + glx: make sure screen is non-negative in validGlxScreen + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9 +Author: Tom Fogal <tfogal@alumni.unh.edu> +Date: Wed Dec 22 14:39:48 2010 -0700 + + Autodetect TLS support instead of defaulting to disabled. + + Uses the AX_TLS macro to figure out if the current platform + supports TLS. If it does, enable TLS automagically. Still + respects --enable option, regardless. + + Signed-off-by: Tom Fogal <tfogal@alumni.unh.edu> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 93393411e39fbb0f72cf6c2f79ebde177aa86932 +Author: Tom Fogal <tfogal@alumni.unh.edu> +Date: Wed Dec 22 16:03:03 2010 -0700 + + Add macro for detecting thread local storage support. + + This adds an AX_TLS macro which attempts to identify if the + underlying compiler/platform supports thread local storage (TLS). + The macro comes from the autoconf macro archive. + + Signed-off-by: Tom Fogal <tfogal@alumni.unh.edu> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 60801ff8703ec36995139a6dd7b1fc26ae8854a6 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Tue Nov 23 11:38:50 2010 -0800 + + xfree86: Convert libxf86config to static libtool library + + In order to use libxf86config in a shared library, all the code must be + compiled with -fPIC. Add proper PIC support for libxf86config by turning + it into a libtool library. However, since we don't want to guarantee API + or ABI stability, make sure it's only built static. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Acked-by: Gaetan Nadon <memsize@videotron.ca> + +commit 8456625d64bb0013a496f3b56ea3aa20cf7a6142 +Merge: aa30a86 ce74e75 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 7 09:35:07 2011 +1000 + + Merge branch 'for-peter' of git://people.freedesktop.org/~daniels/xserver into for-keith + +commit aa30a86583c3fc1a83c46e8c7583182d750edcde +Author: Tomas Carnecky <tom@dbservice.com> +Date: Sun Aug 1 21:28:18 2010 +0200 + + NO_PANORAMIX preprocessor symbol is nowhere defined + + Which makes it useless, so remove it. + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fc6cbee772bafabf7ddd7a75043bd55bb78ad09e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 6 12:58:00 2011 +1000 + + input: add valuator_mask_free() to free a valuator mask. + + Expecting the caller to free the mask requires us to keep it in a single + memory block (which may be an issue lateron), aside from leaving the API + asymetrical. Provide valuator_mask_free() to free the memory and reset the + mask pointer to NULL. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 4fbadc8b17237f3c7f8c0bf56003d1139c86655e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jan 6 11:32:26 2011 +1000 + + Input: Prevent MD grabs from wandering on to other MDs + + The code to set sync.other in DeliverGrabbedEvents is supposed to reset + sync.other for a paired MD to the grab under consideration, but was + rather optimistic in resetting sync.other for _all_ devices. + + This would fall apart given two sets of MDs (A paired with B, Y paired + with Z), where both MDs were in FREEZE_BOTH_NEXT_EVENT due to being + called with SyncBoth, where no event had yet triggered the grab. An + event being processed on MD A would result in B, Y and Z all having + sync.other set to A's grab, rather than just B. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e65c3f8bcc86845f21ac575e2bfb4b21b67d5ebf +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jan 5 12:04:19 2011 -0500 + + dix: Add a Screen method for additional cursor confinement + + This just reserves the slot in the ABI. Confining cursors to CRTCs will + come soon. + + v2: Just reserve the slot. + + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ce74e7562dcc800306ff92b6d3c5ee885cd4763d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 7 11:48:14 2010 +0000 + + Input: Make CheckPassiveGrabsOnWindow return grab, export + + Change CheckPassiveGrabsOnWindow to return the GrabPtr it used (or NULL + if none) rather than a boolean, and export it. Also add an additional + boolean 'activate' parameter; use TRUE for existing behaviour, or FALSE + to only find the grab and then return it. + + This will be used in forthcoming touch patches to find the grabs, rather + than open-coding same. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit eb5aaf5eb819f1287ce40da79edbe07bafb2b5c0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 12:15:28 2010 +0000 + + Input: Export GetEventMask + + Make it non-static, add to headers. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 30c8c7a86310139e79c9698caee21b3bd51936bd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 12:13:29 2010 +0000 + + Input: Handle grabs with no Xi 1.x equivalent + + Don't try to search for an Xi 1.x grab in CheckPassiveGrabsOnWindow for + events with no Xi 1.x equivalent. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 690476250f58616d5156317e01ba547497f4331a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 20 15:03:05 2010 +1000 + + Input: Pass sprite instead of device to XYToWindow, make non-static + + XYToWindow calculates the position of the cursor and updates the sprite + trace, but does nothing else with the device. Pass a SpritePtr instead + so we can update an alternate focus instead of hardcoding the device's + sprite. Also make this function non-static, so we can use it elsewhere. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 07a892cd8276f8092de95f1909f2ebec6f5fdf08 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 20 15:03:04 2010 +1000 + + Input: Pass sprite instead of device to FixUpEventFromWindow + + Since FixUpEventFromWindow only uses the sprite trace to determine the + window stack, pass in a sprite instead of hardcoding the device sprite, + so we can deliver to windows other than the one currently containing the + sprite. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 10d6c3ca103ea155488cd2f29052334b5691e680 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Dec 27 13:06:03 2010 +0000 + + Input: Make RootWindow() take a sprite instead of device + + GetCurrentRootWindow already works for the device case, although not as + an lvalue. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 23c37ce1fe42e3da0609a566478e947843b05023 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Dec 27 12:48:42 2010 +0000 + + Input: Export SpriteRec for use in public API + + Change its definition to be more in line with other structs, so we can + use it from input.h. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 06a103ad1d6a0ef6146c97a8c81dc7de1c0a0083 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 16:37:48 2010 +0000 + + Test: Input: Test up to supported server, not protocol, events + + When building against a newer inputproto, the server may support fewer + than XI_LASTEVENT events. We already have XI2LASTEVENT for the highest + event number supported by the server, so use that instead. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit a083efe8715e8b29c9bd7f4e7bb429a94620bfc4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 16:06:29 2010 +0000 + + Test: Input: Check flags on DeviceEvent + + Add initial validation of acceptable flags for XI2 device events, and + make sure they're swapped. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 2592effef5f171af3f01a2b5130d9747403140f6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 13:42:06 2010 +0000 + + Test: Input: Add helper function for failing EventToCore + + We have quite a few tests which involve checking that EventToCore fails + for specific events, so refactor them into a separate function. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit e1aed88be92c27d76bff1743f35f9915dea9264f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 17:00:29 2010 +0000 + + Input: Swap flags in DeviceEvents + + Swap flags for different-endian clients when delivering XI2 + DeviceEvents. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 6358a60065eef167d4e5f4afd981ff26deeba80d +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Jan 6 09:55:41 2011 +0100 + + EXA: Pad size of system memory copy for 1x1 pixmaps (bug #32803). + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=32803 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f3480286aeb3009623d8d4b0202eadda0049552d +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Jan 5 20:41:09 2011 +0200 + + composite: Support updating an arbitrary subtree + + Rename compUpdateWindow to compPaintWindowToParent and split the child + walk to compPaintChildrenToWindow. Calling compPaintChildrenToWindow + allows an arbitrary subtree to be updated, instead of having to update + all the windows. This will be used to make sure all the descendants are + copied to the parent when the parent window contents need to be accessed + in IncludeInferios sub-window mode. + + WindowRec has a new member 'damagedDescendants' that is used to keep + track of which subtrees need updating. When a window is damaged, + 'damagedDescendants' will be set for all the ancestors, and when a + subtree is updated, the tree walk can be stopped early if no damaged + descendants are present. + + CompScreenRec no longer needs the 'damaged' member since the root + window's 'damagedDescendants' provides the same information. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b89e6dbdfbb50e3b5bc7fcb7eccc397c467c92f8 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Jan 5 20:41:08 2011 +0200 + + composite: Add SourceValidate wrapper + + When SourceValidate is performed on a window with IncludeInferiors + sub-window mode, force an immediate update of all the automatically + redirected windows, so that the current window contents will be up + to date. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 84154954db54696d4661eb8d0a6014cdbff3c91f +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Jan 5 20:41:07 2011 +0200 + + composite: Add GetImage wrapper + + When GetImage is performed on a window, force an immediate update of + all the automatically redirected windows, so that the current window + contents will be up to date. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a5dc3531e14589ac473cea482944d2d67517aabd +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Jan 5 20:41:06 2011 +0200 + + Revert "composite: Convert compWindowUpdate to use TraverseTree" + + TraverseTree visits the parent before the children. When performing + the automatic redirection updates, the children must be visited before + the parent. + + If there are automatically redirected windows on multiple levels of the + tree, updating the parents before the children would cause the parent + updates to use stale data for areas covered by the children. Also + updating the damaged children would re-damage the parent, which would + cause additional walks over the tree. + + In the worst case with an unbroken chain of automatically redirected + subwindows, all of which are damaged, only the leaf window would be + properly updated on the first round. Then it's parent would be properly + updated on the second round, and so on. And on every round all of the + ancestor windows would be updated as well, but with stale data. + So with N damaged windows you would end up with (N^2+N)/2 updates, + instead of the expected N. + + This reverts commit 648c8871c92727d7b6b16859f27f12266a06a16e. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0998574699502e6ab14fd8899c2e42961d4df7d0 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Jan 5 20:41:05 2011 +0200 + + Call SourceValidate even if src == dst + + The extra SourceValidate calls from damageCopyArea and damageCopyPlane + can be removed. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e41e907b3c19908f5316346fa587ced3115478cd +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Wed Jan 5 20:41:04 2011 +0200 + + Add subWindowMode parameter to SourceValidate + + Pass the subWindowMode from the GC/source Picture to SourceValidate. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0dede200c9ac7adbe8b8c16efacc3edc1f183cd9 +Merge: 7714357 2e78145 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jan 5 08:51:46 2011 -0800 + + Merge remote branch 'vsyrjala/misc_fixes' + +commit 7714357f506782973d25e270f85140b42507ed35 +Merge: 02e18c9 b01dd9d +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jan 5 08:43:18 2011 -0800 + + Merge remote branch 'whot/for-keith' + +commit 02e18c9fb58c33d340af4573551fb9c7c59e0f43 +Author: James Jones <jajones@nvidia.com> +Date: Mon Dec 20 11:05:57 2010 -0800 + + X Sync Cleanups + + Various cleanups identified during review of the + X Sync Fence Object patches. + + -Correctly handle failure of AddResource() + + -Don't assert when data structures are corrupt. Instead, + use a new helper function to check for counter sync + objects when they're expected, and warn if the type is + wrong. + + -Use the default switch label rather than reimplementing + it. + + -Re-introduce cast of result of dixAllocateObjectWithPrivate() + to kill an incompatible pointer type warning. + + -Remove comments claiming protocol updates are needed. One + wasn't true and the other was addressed with a xextproto + change. + + -Return BadFence, not BadCounter from XSyncAwaitFence() + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 86ca434a1ab766c1519ee7146b48dbfead843524 +Author: Zhao Yakui <yakui.zhao@intel.com> +Date: Tue Jan 4 14:08:16 2011 -0500 + + edid: Fix incorrect timings for VIC61 + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> + Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> + +commit bb18f277156c08be028a6e12d8987fb1593e9168 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 10 14:24:02 2010 -0500 + + x86emu: Fix more mis-decoding of the data prefix + + cc2c73ddcb4370a7c3ad439cda4da825156c26c9's three-cent titanium tax + doesn't go too far enough. Fix the rest of the call and jmp + instructions to handle the data prefix correctly. + + Reference: Intel 64 and IA-32 Architectures Software Developer's Manual + Volume 2A: Instruction Set Reference, A-M + + http://www.intel.com/Assets/PDF/manual/253666.pdf + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 261d0d16af797bb52d4c778e220296d7f2b28e14 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Dec 30 16:08:48 2010 -0800 + + Fix asprintf typo in commit d2c42b10 + + Reported-by: Jerome Carretero <cJ@zougloub.eu> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit c6afe64bad7a27ff8828de499d56776c113df60f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 31 03:15:27 2010 +0000 + + XFree86: Linux: AGP: Fix void-pointer-arithmetic warning + + Cast it to a char *, mimicking the return immediately below it. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + +commit 2d67ada3c4079a11c52024a9c3d4138becca5171 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:43 2010 +0200 + + os: always check if client is local when connection is accepted + + LocalClient is used for all DRI2 requests that makes it frequently + called function. Querying if connection is local or not takes 10-15us + (on ARM) depending on malloc speed. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 617b7d22115ccaaaa7ec69c99885054d33a3bc37 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:42 2010 +0200 + + os: Fix a memory leak + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 3e1455505addc7e52178fa04399aef2a8522c921 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:41 2010 +0200 + + udev: Fix removing of the wake up handler + + RemoveBlockAndWakeupHandlers requires caller to pass same block data + parameter as for RegisterBlockAndWakeupHandlers. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 13ac3deedb532b39f41dcd45d70f9eb4a85c1f58 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:40 2010 +0200 + + mi: Only register sprite block handler when needed + + miSpriteBlockHandler takes about 10us in arm each time BlockHandlers are + called. To eliminate that overhead from xserver side only register the + BlockHandler when there actually is any cursor down. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 4f6e3b0f378d7306dbd8c00ef9a7df81e24e5769 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:39 2010 +0200 + + mi: Register sprite damage handler only when required + + There is no need to have damage handler registered when there isn't any + pointer in the screen. This avoids some overhead from damage handling + which takes tens of microseconds on arm. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit bf48082f30818b96bc623834be3022600371d4fc +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:38 2010 +0200 + + mi: Fix the debug message + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 8fb43b8bf9fcbe015d4e98c7e09889184d136a1e +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:37 2010 +0200 + + mi: Fix wrapping for sprite screen + + SCREEN_EPILOGUE should read the current function pointer from screen + after calling wrapped function in case the pointer changes. + + Passing pPriv to macros instead of asking dix each time makes sense when + both macros need same pointer. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 4be2a6d1b33fac7ceb50ad1de249a1acd5a46ab0 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:36 2010 +0200 + + mi: Add GetSpriteScreen macro to hide dixLookupPrivate + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit ed8db09b4bff5c4a8d8056808368650e1876547b +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:35 2010 +0200 + + composite: Remove unnecessary variable. + + We know that there is damage if the dynamic block handler is registered. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit c038b8b28e5c436cd31bea7a3bef2c8c9d818b58 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:34 2010 +0200 + + composite: Only register the block handler when it is required + + Even calling block handler that doesn't do much is costly in arm. It + takes a few microseconds each time which adds up to relative high CPU + time because it is done 500+ times per second. + + Simple optimization is to register the block handler only when it is + required. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 6d0e9e5d6e1b847961ab52a11aae96981a1cf1c0 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:33 2010 +0200 + + render: Enable animated cursor block handler only when needed + + Calling BlockHandlers takes some time for each iteration in main loop + which adds up quickly over multiple request. To reduce the round-trip + costs to xserver BlockHandlers should be registered only when required. + + AnimCurScreenBlockHandler is the first victim for this optimization. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit aa8cea953dc66bcf4cb4d08f2681f9e6cb1bc8c5 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Dec 30 19:19:32 2010 +0200 + + render: Don't filter 0 return from GetTimeInMillis + + In animate cursor block handler code assumes GetTimeInMillis returns + always nonzero value. This isn't true when time wraps around. + + To prevent any problems in case GetTimeInMillis would return zero use + activeDevice variable to track if we have received time. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 91beeee05f88eed10ab0fd97dc625e96cb7763ba +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Oct 13 16:27:30 2009 +1100 + + DIX: Reset window properties when freeing them + + This enables us to reliably inspect properties when destroying windows. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit 36ebdd361616eedbe4919deae2a4e6f6606ae6b4 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 19 11:59:24 2010 -0400 + + linux: warning fix + + lnx_agp.c: In function ‘xf86DeallocateGARTMemory’: + lnx_agp.c:267: warning: cast to pointer from integer of different size + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 63ccaec2c39f4b5742383472c951ee2cd35c9e14 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 19 11:59:23 2010 -0400 + + glx: warning fixes + + render2.c: In function ‘__glXDisp_Map2d’: + render2.c:127: warning: ‘u1’ may be used uninitialized in this function + render2.c: In function ‘__glXDisp_Map1d’: + render2.c:90: warning: ‘u1’ may be used uninitialized in this function + + Remove unnecessary test, and change memcpy to memmove as all users were + doing overlapping copies. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit d057e265c862f90e9b6fddff89f40cb82b2a59b1 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 19 11:59:22 2010 -0400 + + xcmisc: warning fix + + xcmisc.c:202: warning: no previous prototype for ‘XCMiscExtensionInit’ + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 67e0bcba4307de5a330e027f4504c9aed4987e5a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 19 11:59:21 2010 -0400 + + dri1: warning fix + + dri.c: In function ‘DRIScreenInit’: + dri.c:434: warning: cast from pointer to integer of different size + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a298d044f965e5ba91f178c6b599c1df26a958ba +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 19 11:59:20 2010 -0400 + + loader: warning fix + + loadmod.c: In function ‘FreeSubdirs’: + loadmod.c:377: warning: passing argument 1 of ‘free’ discards qualifiers + from pointer target type + /usr/include/stdlib.h:488: note: expected ‘void *’ but argument is of + type ‘const char *’ + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit ee0b1b564413327c73bb8cdbabb76667ca4a744c +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 19 11:59:18 2010 -0400 + + config: warning fixes + + xf86AutoConfig.c: In function ‘FreeList’: + xf86AutoConfig.c:123: warning: passing argument 1 of ‘free’ discards + qualifiers from pointer target type + /usr/include/stdlib.h:488: note: expected ‘void *’ but argument is of + type ‘const char *’ + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 32c85ad4b8fe27fed0c494f69c39e3902ce57b1b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 12:40:31 2010 +0000 + + GLX: DRI2: Fix mismatched-types warning + + All the DRI extension types have a base extension type as their first + member to avoid exactly these types of warning. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + +commit 22796cfa4805cc9551e1b3fa1d3e2e1bfae5bad1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 28 12:29:53 2010 +0000 + + udev: Add strdups to kill const warnings + + InputAttributes wants non-const members, and while it appears safe to + cast it, just leave it be for the moment. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 03f2eb1e156796afb70118d7f7f60ac61beed026 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 17 17:13:34 2010 +0000 + + Input: Set client error value for invalid mask bits + + When we send BadValue back to the client for having invalid mask bits, + at least tell them what the (first) invalid bit was. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 47818287983b04625661b08ae362e0966cddf3e1 +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Fri Dec 17 17:13:30 2010 +0000 + + Make EventIsDeliverable non-static + + Will be used outside dix/events.c in proceeding XI 2.1 MT changes. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f7d8ade3c5ac44faf7f3ea0d846e35f75b31c9ec +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 17 17:13:26 2010 +0000 + + Resources: Move rClient to resource.h + + The definition of rClient was duplicated across three source files, so + move it to resource.h. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 05e437c2ce230b588362f012c06ead5c6d89c006 +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Fri Dec 17 17:13:27 2010 +0000 + + Export all valuator_mask_* functions + + Input drivers may use valuator masks for internal state. Having all the + valuator_mask_* functions available will help. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + + Bump ABI_XINPUT_VERSION minor. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2e781457d43ec4bf0d633257ac6852cde3b00541 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Thu Dec 16 18:22:13 2010 +0200 + + xfree86/modes: Take rotation into account when checking mode size + + Assume that a mode can be used in either landscape or portrait + orientation. I suppose the correct thing to do would be to + collect all the supported rotations from the CRTCs that can be used + with a specific output, but that information doesn't seem to be + readily available when these checks are done. So just assume that + either orientation is fine. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 0ce25fd7904c792924c3e0ee6fc21a5f1bec1a68 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Dec 3 17:42:16 2010 +0200 + + dri2: Don't page flip when the window size doesn't match the pixmap size + + If the drawable size doesn't match the pixmap size page flipping should + not be allowed. + + If the window is larger than the pixmap, page flipping might need to + reposition the CRTC somewhere in the middle of the pixmap. I didn't + spot any code that would handle that at least in the intel driver. + + Also the root pixmap could then move to some negative screen + coordinates. Not sure if all bits of code could handle that. Perhaps + when composite is enabled screen_x/y would make it work, but without + composite there's no way that it would work AFAICS. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit efcb63d0ce43f96d0ac02b6f4a480dfd2374fc84 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Dec 23 13:33:00 2010 +0000 + + Render: Fix 'comparing between distinct pointer types' warning + + Add the appropriate casts so that gcc shuts up, even if it doesn't + matter. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 469d5bf8b75038631c27edbb0f9cdf7d737fa233 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 17 16:48:45 2010 +0000 + + mi: Sync: Don't free managed screen private + + misync allocates space for its screen private with + dixRegisterPrivateKey, which means it doesn't have to free it at + CloseScreen time; doing so will, in fact, result in a crash. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: James Jones <jajones@nvidia.com> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 44adb31bfece29260a9bbd9075c9212ebf00d24d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 27 20:36:37 2010 +1000 + + GetTimeInMillis: Use CLOCK_MONOTONIC_COARSE where available + + On some systems, using CLOCK_MONOTONIC forces a readback of HPET or some + similarly expensive timer. CLOCK_MONOTONIC_COARSE can alleviate this, + at the cost of negligibly-reduced resolution, so prefer that where we + can. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 296561506a91742cc150a0fb6fc0df5dbe98c780 +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Wed Dec 22 16:57:17 2010 +0200 + + Xext: Use general OS functions to determine client command string in SELinux. + + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 1e933665bef26c74196bb7c59910e6a78bcacf0e +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Wed Dec 22 16:51:09 2010 +0200 + + os: Add facilities for client ID tracking. + + An interface is provided for figuring out the PID and process name of + a client. Make some existing functionality from SELinux and IA + extensions available for general use. + + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 671b2a1823a1c90d0b6254e2e2af8865151fff8c +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Wed Dec 22 16:38:54 2010 +0200 + + config: Fix linking order of Xnest libraries. + + MAIN depends on DIX and not vice versa. + + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + +commit 2b364bf970b2ce6829af656990c33afd0d365f3c +Author: Rami Ylimäki <rami.ylimaki@vincit.fi> +Date: Tue Jun 15 14:44:38 2010 +0200 + + Revert "os: Prevent backtrace from being stopped in noreturn functions." + + This reverts commit 579715f830fbbca9e1ecb17dc18176132f5969e7. + + The patch is not needed anymore. I haven't encountered backtrace + problems with GCC 4.3.3. Even if the problems still persisted, this + commit should be removed and instead the definition of _X_NORETURN + should be modified to be empty if GCC/ARM is used. However, currently + it seems that ARM backtraces are OK even if _X_NORETURN is used and + -mapcs-frame is not defined in CFLAGS. + + Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit b01dd9d33651999b0390bf8ed412b84f6929a13e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 17 17:13:34 2010 +0000 + + Input: Set client error value for invalid mask bits + + When we send BadValue back to the client for having invalid mask bits, + at least tell them what the (first) invalid bit was. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 495e0142a77152c4cde5c88cdba4103ddc94df2c +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Fri Dec 17 17:13:30 2010 +0000 + + Make EventIsDeliverable non-static + + Will be used outside dix/events.c in proceeding XI 2.1 MT changes. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4fbe67beb56e5600c1df789c08725c45b9bef0d4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 17 17:13:26 2010 +0000 + + Resources: Move rClient to resource.h + + The definition of rClient was duplicated across three source files, so + move it to resource.h. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 871c1e17e527857cd86b5e517d9a18e5041f00fd +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Fri Dec 17 17:13:27 2010 +0000 + + Export all valuator_mask_* functions + + Input drivers may use valuator masks for internal state. Having all the + valuator_mask_* functions available will help. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + + Bump ABI_XINPUT_VERSION minor. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e06fa804009798ea95efa8babaabb0228dfdfe65 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Wed Dec 22 11:45:36 2010 +0100 + + EXA: Fix crash with fill using 1x1 tile of depth < 8 (bug #24703). + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24703 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 56d9c736f0c450bffd43300107689eb6dd1ea70b +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 16 14:26:10 2010 -0500 + + xfree86: Convert some xf86BlockSIGIO to OsBlockSignals + + The DDC1 and int10 code are blocking SIGIO to get some assurance that + their usleep() calls take as long as they expect. That's a good start + but you really want to be blocking more than just SIGIO, SIGALRM too at + minimum. + + At this point, except for SIGIO handler setup itself, BlockSIGIO really + means "block input events". + + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ce13a1dbbfbeee3a3d51d0385817df50944cfdee +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 16 14:03:13 2010 -0500 + + xfree86: Remove xf86EnterServerState + + Back when we had RAC this was a vaguely meaningful thing. Since then + it's been a glorified (and confusing) wrapper around xf86BlockSIGIO. + + Note that the APM and VT switch code are unusual relative to other code + that cares about SIGIO state. Most callers push a SIGIO disable to + create a critical section for the duration of the caller's stack frame, + but those two effectively disable SIGIO after their return and re-enable + on their next entry. + + Reviewed-by: Tiago Vignatti <tigo.vignatti@nokia.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a04e74cb480f98bc3dd4def2da6f6752640d9e38 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 15 15:16:33 2010 -0500 + + xfree86: Symmetrize xf86AccessEnter and xf86AccessLeave + + Enter was changing server operating state, Leave wasn't. Which was + wholly redundant, since all callers of Enter would immediately change + the operating state to exactly what Enter had just done. + + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 7a9062f2f029b4f911ba56f291375fbf5a98ca73 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Dec 14 15:44:16 2010 -0500 + + fonts: Fix typo in async ListFonts logic + + This was introduced in 3ab6cd31cbdf8095b2948034fce5fb645422d8da. Mea + culpa. This logic is still incorrect [1], but at least it's less + incorrect. + + [1] - https://bugzilla.redhat.com/658587 + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f28e48834e40c7901c2efc72f962c9724e74a531 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 16 13:13:54 2010 -0500 + + Remove SCO support + + This has never been buildable in any modular server release. + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 040d54fb88f3970e19d0fbf911d6447f592496bd +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 15 14:59:13 2010 -0500 + + xfree86: Remove unused xf86inSuspend + + What is this, I don't even. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit e7dc253452a1ba64718a08fdc070405b494f53cd +Merge: d110791 d5b0d58 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 20 00:48:45 2010 -0800 + + Merge remote branch 'alanc/master' + +commit d1107918d4626268803b54033a07405122278e7f +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Dec 17 16:09:35 2010 +0200 + + randr: check for virtual size limits before set crtc + + Return a error if the screen is configured to an invalid size. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4b88c7be8de4149fe3d166bf115775f9e81a1373 +Author: Jörn Horstmann <launchpad@planetxml.de> +Date: Mon Dec 6 11:24:02 2010 +1100 + + Add EDID quirk for HP Compaq nc8430. + + Like some other LPL panels, this one reports the vertical size in cm rather + than mm. + Patch taken from Launchpad bug #380009 <https://launchpad.net/bugs/380009> + + X.Org Bug 28414 <https://bugs.freedesktop.org/show_bug.cgi?id=28414> + + Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a2e67a6412386782cb8b644b86a5744591397d45 +Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> +Date: Mon Dec 6 11:24:01 2010 +1100 + + IDLETIME: Fix edge-case in IdleTimeBlockHandler + + Ensure that if we're called exactly on the threshold of a + NegativeTransition trigger that we reshedule to pick up + an idle time over the threshold. + + Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b55bf248581dc66321b24b29f199f6dc8d02db1b +Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> +Date: Mon Dec 6 11:24:00 2010 +1100 + + Xext: Fix edge case with {Positive, Negative}Transition triggers. + + The {Positive,Negative}Transition triggers only fire when the counter + goes from strictly {below,above} the threshold. If + SyncComputeBracketValues gets called exactly at this threshold we may update + the bracket values so that the counter is not updated past the threshold. + + Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d5b0d58573ffb90ea70273cd013102168fd2a18a +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Dec 16 22:29:37 2010 -0800 + + Bug 32436 - hw/xfree86/parser/Makefile.am TOP_SRCDIR should be top_srcdir + + https://bugs.freedesktop.org/show_bug.cgi?id=32436 + Fix typo introduced in 2416255f7e3fd9190a9 that breaks builds when + configured --enable-install-libxf86config + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Tested-by: Simon Thum <simon.thum@gmx.de> + +commit 058b889fde47b4c32534f11ed651bf1749d1dbb2 +Author: David Barksdale <david.barksdale@adcedosolutions.com> +Date: Mon Dec 13 18:35:20 2010 -0800 + + Bug 21827: faulty sdksyms.c generated by the awk script in sdksyms.sh + + https://bugs.freedesktop.org/show_bug.cgi?id=21827 + + Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: David Barksdale <david.barksdale@adcedosolutions.com> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 1324b0ca9f8a7fdaf03b374c75eb3c9df407c2f1 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Dec 10 00:08:24 2010 +0000 + + Typo in xserver Xvasprintf() + + I needed this patch in the wrapper around vsnprintf() in os/xprintf.c + (MinGW for Windows build) to correct various crashes. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f1542f1d716723cba7c323849086585635121893 +Merge: 9716d31 8a8fdd7 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 14 15:04:12 2010 -0800 + + Merge remote branch 'whot/for-keith' + +commit 9716d3124799c6db0d1c782aa72c72f972d5a158 +Merge: 03ea0b7 f641e4b +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 14 15:01:36 2010 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 03ea0b7726487b96df73936518da73d023e51334 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Dec 7 16:31:55 2010 -0500 + + docs: replace BUILLDOCS with existing ENABLE_DEVEL_DOCS + + Use the util-macros AM Conditionals to control generation of developers + documents. This is used throughout xorg modules. + + The doxygen generated docs are now also managed by --enable-devel-docs. + + Remove --enable-builddocs as this was last use for BUILDDOCS + + *** From the RELEASE NOTES *** + + New configure options for documentation in modules + -------------------------------------------------- + As many more modules now contain documentation to be converted from DocBook XML to text, + HTML, PostScript, and/or PDF formats, new standard options have been added to the configure + macros to control the build of these in the modules. + --with-xmlto=yes|no + Enables or disables use of the xmlto [https://fedorahosted.org/ + xmlto/] command to translate DocBook XML to other formats. + All DocBook XML conversions require use of this command. + --with-fop=yes|no + Enables or disables use of the Apache fop [http:// + xmlgraphics.apache.org/fop/] command to translate DocBook + XML to PostScript and PDF formats. + --enable-docs=yes|no + Enables or disables the build and installation of all + documentation except traditional man pages or those covered + by the --enable-devel-docs and --enable-specs options. + --enable-devel-docs=yes|no + Enables or disables the build and installation of documentation + for developers of the X.Org software modules. + --enable-specs=yes|no + Enables or disables the build and installation of the formal + specification documents for protocols and APIs. + + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c78c71c3a872665e426a0a4b82f17007bd8c12cd +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Dec 7 16:31:54 2010 -0500 + + hw/dmx/doc: DIST_SUBDIRS not required when using AM_CONDITIONAL + + The makefile can be simplyfied as Automake handle this automatically. + All directories in SUBDIRS are visited for dist purposes. + + www.gnu.org/software/automake/manual/automake.html#SUBDIRS-vs-DIST_005fSUBDIRS + + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8a8fdd762ad89c350854943311ec4aadc50245fa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 13 11:28:30 2010 +1000 + + xfree86: always report the input options before initialising the device. + + After collecting the driver's default options, report the list of options + set for the device before calling PreInit(). This helps with debugging those + cases where options are not merged correctly. + + xf86OptionListReport reports with verbosity 5, higher than the default + verbosity so this won't generate logspam in the default case. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + +commit 9db9e964f6ca553dcbd3b7b037745d9581eaa065 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Dec 10 13:23:13 2010 +1000 + + xfree86: swap the order to-be-merged lists in xf86CollectInputOptions. + + Current order causes the user-configured option list to be overwritten with + the default list supplied by the driver. Swap around so we overwrite the + driver's default values instead. + + This only affected options supplied by the driver such as XkbLayout in the + case of evdev. + + Reported-by: Sebastian Glita <glseba@yahoo.com> + Reported-by: Simon Thum <simon.thum@gmx.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Sebastian Glita <glseba@yahoo.com> + +commit 0d440a1c6e219cd39dbddd2b7e813c6431aac6ea +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 8 14:52:19 2010 +1000 + + dix: allow for button-only input devices (#21457) + + Add a few checks for the existence of a valuator class on the device to + avoid null-pointer dereferences for button events from devices without a + valuator class. + + X.Org Bug 21457 <http://bugs.freedesktop.org/show_bug.cgi?id=21457> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit f641e4b34aa91ecda29e546b8b975e72ce037ed0 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Dec 8 22:58:12 2010 -0800 + + XQuartz GL: Add $(GL_CFLAGS) to CFLAGS + + This fixes a build failure I found on tinderbox. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 9cf055892dd413932e54b43cc2dfea70bafd525f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 8 14:43:51 2010 +1000 + + xfree86: don't set movement flags for non-valuator events. + + If a device doesn't send valuators, don't try to move its position. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit aba8133c9c5a50753c388d76407868ac69f4134b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 8 14:02:17 2010 +1000 + + dix: clear up an overly convoluted if statement. + + No functional changes, just improves readability. This statement had things + added to/removed from it for a few server releases while the input event + queue was revamped. What made sense once is now mainly confusing. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 883039e07b0c0ef23c7fc4ba3455b41173c7a7fc +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Dec 8 13:27:41 2010 -0800 + + XQuartz: Just NSBeep() for XBell() + + The CoreAudio path uses deprecated API and has reported crashes that + aren't worth fixing (4e8bf12b13690afa6d9fee0e339d3819ef16fb3f fixed + one and introduced another). NSBeep() does the job just fine. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2c70b650b342378898064cf27e2f95c4b2e53d24 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Dec 8 18:54:30 2010 +0000 + + Fix Xwin build after af0f9f91 + + Fix damage to XWIN_LIBS in commit af0f9f913398d34a885c3fb4e8d40c1a7e2b3ee9 + "Move some sync code to miext", which broke the XWin build + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison at virgin.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 519d243f0c8e3c80226701f71d2cfa62e42dbff7 +Merge: 9f9c732 446482e +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 7 13:39:58 2010 -0800 + + Merge remote branch 'alanc/master' + +commit 446482efaa3d266266e2a143492a3ec0523622bd +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Nov 28 09:41:17 2010 -0800 + + Convert cvt code to use XNFasprintf() + + Requires linking xprintf.c into standalone cvt utility + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit d2c42b102707db6c1ca9dccc4de9210a43650cb1 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 23:10:46 2010 -0800 + + Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() calls + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 3a9bb93dd178084f4ff1abcea331ca5a62f88ce6 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 22:38:27 2010 -0800 + + Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 2416255f7e3fd9190a9e01bda57c992932de4bd9 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 22:36:44 2010 -0800 + + Convert hw/xfree86/parser code to use asprintf() calls + + Requires linking xprintf.c into libxf86config for those who build it. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 03e8bfa1d122f7dea905d48c93cfd54afd991dfd +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 20:09:04 2010 -0800 + + Convert existing Xprintf style calls to asprintf style + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit c95c1d338fdb62dbe3dba934b97324fa778b7fce +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 18:43:12 2010 -0800 + + Add asprintf() implementation for platforms without it + + Provides a portable implementation of this common allocating sprintf() + API found in many, but not yet all, of the platforms we support. + If the platform provides vasprintf() we simply wrap it, otherwise we + implement it - either way callers can use it regardless of platform. + + Since not all platforms guarantee to NULL out the return pointer on + failure, we don't either, and require callers to check the return + value for -1. + + The old Xprintf() API is deprecated, but left for compatibility for now. + + The new API is added in a new header so that it can be used in parts of + the server such as hw/xfree86/parser that don't include all the server + headers. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 2db6951763115a4a5dfac53d1a8f78ac33f91235 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Dec 3 16:32:01 2010 -0800 + + Sun's copyrights now belong to Oracle + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit f06e8a61d6ed8f3054878167bffee619f852aad9 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Nov 30 16:34:38 2010 -0800 + + Move inclusion of panoramiX headers to top of render.c + + Fixes compiler error from Sun compilers due to _X_EXPORT declaration + being included after the unlabeled version: + + "../Xext/panoramiXsrv.h", line 29: redeclaration must have the same or more restrictive linker scoping: XRT_PICTURE + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9f9c732311ef0cc198e5ec44d02412eb7e8c3f3a +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Nov 12 21:35:25 2010 +0100 + + dix: Fix logic for displaying deprecation warning only once. + + As pointed out by Jamey Sharp (again), the logic is faulty: --warn is + always going to be false. Replace it with warn-- accordingly, so that + there's (at least, but also only) one warning showing up. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit a937803c1f671ef29332e5fe8c190d8b48239912 +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Nov 12 21:29:26 2010 +0100 + + dix: Simplify deprecated *Lookup* wrappers around dixLookup*. + + As pointed out by Jamey Sharp: “the result pointer is already guaranteed + to be NULL if the return value is not Success”, so get rid of the + variable used to catch the return value, and used in a ternary operation + to decide whether to return the pointer or NULL. Always return the + result pointer instead. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 73fbc4a4a7997b3ee1c779d8f394114270bcb20d +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Nov 12 12:04:11 2010 +0100 + + Replace SecurityLookupIDByClass() with dixLookupResourceByClass(). + + This patch has been prepared with the following Coccinelle semantic patch: + + @@ + expression a, b, c, d; + identifier r; + type t; + @@ + -r = (t) SecurityLookupIDByClass(a, b, c, d); + +dixLookupResourceByClass((pointer*) &r, b, c, a, d); + + The only occurrence not matching directly was processed after separating + declaration of pXinDraw and call to SecurityLookupIDByClass(). + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 6e8b34b7048bc9e49ef52b81e2de1b518a05890e +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Nov 12 11:36:36 2010 +0100 + + Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 2. + + These occurrences are a bit harder to catch through a semantic patch, + so process them “manually”. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit ac04c1377a42ab6803adf551756653fd8e1a694b +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Nov 12 11:36:31 2010 +0100 + + Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 1. + + This patch has been prepared with the following Coccinelle semantic patch: + + @@ + expression a, b, c, d; + identifier r; + @@ + -r = SecurityLookupIDByType(a, b, c, d); + +dixLookupResourceByType((pointer*) &r, b, c, a, d); + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 28b4c02d7463ffe5c29f803f5656c5ecfc040185 +Author: Cyril Brulebois <kibi@debian.org> +Date: Thu Nov 11 18:36:45 2010 +0100 + + Enable silent rules for cat and echo. + + One gets this: + | GEN lf3-xaaBitmap.c + | GEN lf3-xaaBitmap.c + | GEN lf3-xaaBitmap.c + | GEN lf3-xaaBitmap.c + | CC lf3-xaaBitmap.lo + + instead of this: + | echo "#define LSBFIRST" > l3-xaaBitmap.c + | echo "#define TRIPLE_BITS" >> l3-xaaBitmap.c + | echo '#include "../../../../hw/xfree86/xaa/xaaBitmap.c"' >> l3-xaaBitmap.c + | CC l3-xaaBitmap.lo + + Occurrences found using: + | git grep -E '(cat|echo)' -- '*Makefile.am' + + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 838b9582280030a159878af566126cb0a523ec29 +Author: Cyril Brulebois <kibi@debian.org> +Date: Thu Nov 11 15:40:13 2010 +0100 + + Replace LookupIDByType() with dixLookupResourceByType(), take 2. + + These occurrences are a bit harder to catch through a semantic patch, + so process them “manually”. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit ffb93533fd8067c7383aef5e0018a197af59b46c +Author: Cyril Brulebois <kibi@debian.org> +Date: Thu Nov 11 15:30:15 2010 +0100 + + Replace LookupIDByType() with dixLookupResourceByType(), take 1. + + This patch has been prepared with the following Coccinelle semantic patch: + + @@ + expression x, y; + type t; + identifier r; + @@ + -r = (t) LookupIDByType(x, y); + +dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess); + + @@ + expression x, y; + type t; + identifier r; + @@ + -t r = (t) LookupIDByType(x, y); + +t r; + +dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess); + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit d1b45b0fd54efb952f9ff435a516c1bfd85ca186 +Author: Cyril Brulebois <kibi@debian.org> +Date: Thu Nov 11 11:35:47 2010 +0100 + + Fix missing <string.h> include. + + The following happens otherwise (with -Wall -Werror): + | In file included from /usr/include/X11/Xfuncs.h:47, + | from ../../include/misc.h:112, + | from ../../include/screenint.h:52, + | from ../../include/scrnintstr.h:52, + | from ../../dix/cursor.c:58: + | /usr/include/string.h:534: error: conflicting types for ‘xstrcasecmp’ + | ../../include/os.h:488: note: previous declaration of ‘xstrcasecmp’ was here + | /usr/include/string.h:538: error: conflicting types for ‘xstrncasecmp’ + | ../../include/os.h:493: note: previous declaration of ‘xstrncasecmp’ was here + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + +commit 780754050bc9cb1489f92a2a890ab5665e3e6358 +Author: Cyril Brulebois <kibi@debian.org> +Date: Fri Nov 12 12:18:59 2010 +0100 + + Fix GLX_LIBS vs. DMX_LIBS order. + + If glxproxy needs symbols which aren't pulled in by dmx itself, glxproxy + fails to link because of undefined references. + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 14983286c489ea1ec6ba4fadbeaec5c2d2ee34e1 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 6 20:45:35 2010 -0800 + + Version bumped to 1.9.99.901 (1.10 RC1) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d96d5f5443358e33e47d1a61f9bd2afd8064a8dd +Author: James Jones <jajones@nvidia.com> +Date: Sun Dec 5 19:42:41 2010 -0800 + + Bump extension ABI to 5 + + Commit 606e079cc4d9a9db3197652ca51683c36f74efb8 moved the visual + field in WindowOptRec, breaking the extension module ABI. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 435361bd73b9fc733f093d81af6b839953e35176 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 6 20:38:14 2010 -0800 + + sync: syncObject may be None in SyncInitTrigger + + And often is, especially when called from ProcSyncCreateAlarm. + Crashing in this case seems unwise. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0d01b66df9081ef48843b3bad81c56bb2cd1ae69 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Dec 5 23:35:28 2010 -0800 + + randr: handle RRSetCrtcConfigs request with zero configs + + Need to actually return a reply in this case. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit b0f4bd61f0caf80f3be9a176f1f7a707bc6628d8 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Dec 5 21:53:25 2010 -0800 + + ProcRRSetCrtcConfigs uses 'configs' without being initialized + + If the client sends invalid data for this request, the server + will jump to 'sendReply' and call RRFreeCrtcConfigs, passing it the + uninitialized 'configs' and 'num_configs' values. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 752c368421c1c824752cf467fba9318d75d2ca2c +Author: Keith Packard <keithp@keithp.com> +Date: Sun Dec 5 20:57:47 2010 -0800 + + Separate out screen size and screen pixmap sizes in RRScreenSizeSet + + This provides for separate sizes for the screen scanout and rendering + buffer and the application-visible screen size. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit a88d70fb20a2bc3152b84adff4380857e6cfadf5 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Dec 5 20:55:46 2010 -0800 + + Set sprite transforms from RRSetCrtcConfigs + + These were getting ignored. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 96b4d4787bf82edd9d06eb9a6e94bc45412c7df2 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Dec 5 20:49:19 2010 -0800 + + DIX is responsible for ref counting scanout pixmaps. + + Remove some extra ref counting inside hw/xfree86/modes + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit afb6ebf1d5829346c40fe1053c9f50afe926e6c6 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 3 13:04:37 2010 -0800 + + randr: Hook up the new RandR 1.4 functionality + + This bumps the supported RandR protocol version and adds the dispatch + hooks needed to call the new functions + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 82612045e11f2b882ae132e184a9629f43f1c424 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 3 13:00:46 2010 -0800 + + randr: Add per-crtc pixmaps + + This adds new driver hooks to allocate scanout pixmaps and + changes the mode setting APIs to pass the new scanout pixmaps + along from DIX. DIX is responsible for reference counting the pixmaps + by tracking them through RRCrtcNotify. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 86c489c319c705f710bee3897fe27600ce15008e +Author: Keith Packard <keithp@keithp.com> +Date: Sat Dec 4 20:12:26 2010 -0800 + + hw/xfree86/modes: Add optional driver API for RRSetCrtcConfigs + + This provides a driver hook which can either completely replace, or + just validate the parameters for, the RRSetCrtcConfigs request. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit d94a035ea9eb3167fc4f35b2d9f0d53f8807014c +Author: Keith Packard <keithp@keithp.com> +Date: Sat Dec 4 19:22:11 2010 -0800 + + randr: Implement RRSetCrtcConfigs + + This provides a driver-independent implementation of the + RRSetCrtcConfigs API by simply using the existing interfaces. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 66294afcab7b7a82f7dd897767e46c48a94b8ee8 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 3 22:08:06 2010 -0800 + + randr: Add sprite position transforms + + This implements sprite position transformations. Sprite image + transforms are passed all the way to the DDX layer, but the images are + not yet manipulated before being passed to the drivers. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit c8bc25fd7629df10f2825b7cc713b031ae78f223 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 6 19:40:30 2010 -0800 + + Require RandR protocol version 1.4 or newer + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8b35118c03590a7ad3786d3284bafb3f40fcb8cc +Author: Keith Packard <keithp@keithp.com> +Date: Sun Jun 6 15:23:37 2010 -0700 + + Replace huge argument list in xf86CrtcSetModeTransform with struct + + xf86CrtcSetModeTransform was starting to get ridiculous with 6 + arguments, this change has it take a single structure that contains + all of those values along with a set of flags that says which have + changed. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit f5b8bd620f91214c0b87e9b04d57015655792352 +Merge: 01e9fa7 8127c83 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 6 19:51:06 2010 -0800 + + Merge remote branch 'jajones/for-keith' + +commit 01e9fa7da389fc7ab834b4234b8484514144b7f4 +Merge: 79870db 68a1b0d +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 6 19:45:11 2010 -0800 + + Merge remote branch 'whot/for-keith' + +commit 79870dbf72d463cf9efea1b3e61d1d5759df27b5 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Dec 4 16:13:29 2010 -0500 + + config: build Xserver man pages using XORG_MANPAGE_SECTIONS + + Nothing requires the use of a C preprocessor + Using standard file exentions (.man) means no need for .gitignore + Use standard directory and makefile + Fix man page whitespace issues + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matt Dew <matt@osource.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c4a7a5917ab828d4a0bd825a98e4d641bcb378f1 +Merge: 5de312a 714b68d +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 6 19:28:07 2010 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 5de312a60d8227ed670849ecf888ea878aa81430 +Merge: 311cad3 8f42b2b +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 6 19:22:52 2010 -0800 + + Merge remote branch 'alanc/master' + +commit 8127c83c81bf64369a8ba2999088226d14e0b128 +Author: James Jones <jajones@nvidia.com> +Date: Mon Dec 6 12:14:01 2010 -0800 + + Expose Sync Fence Object protocol + + Add the new protocol handlers for XSync 3.1 to the + dispatch tables and report support for Sync protocol + version 3.1. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 9c0c7cc9a7adf230b5eee0b4166f9e17e07a088b +Author: James Jones <jajones@nvidia.com> +Date: Mon Dec 6 13:10:42 2010 -0800 + + Add XSyncAwaitFence() handler + + -Add the actual ProcSyncAwaitFence() dispatch func + + -Add support for fence sync triggers. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 397dfd9f87e1cdf105d10a789a97230f4f0d204e +Author: James Jones <jajones@nvidia.com> +Date: Fri Jun 25 17:59:14 2010 -0700 + + Create/Destroy/Trigger/Reset/Query Fence Sync objs + + Initial server side implementation of fence sync + objects. Allows creation, management, and state + queries of binary state objects. Currently they + are not very useful as there is no way to wait for + them efficiently. + + The basic trigger operation added here triggers + relative to a given X screen's rendering operations. + To perform this operation, fence sync objects must + be tied to a screen. As Aaron Plattner pointed out, + screens are identified but a drawable in X protocol, + so a drawable argument is included in + XSyncCreateFence(). The screen also could have been + specified as part of the trigger operation. However, + it is also desireable to associate a screen with + fence sync objects at creation time so that the + associated screen's driver can allocate any HW- + specific resources needed by the fence object up + front. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 53ea965d64bd9563e6bfcc81d04f283d2b85f09d +Author: James Jones <jajones@nvidia.com> +Date: Mon Nov 29 10:09:36 2010 -0800 + + Require xextproto 7.1.99 + + Subsequent changes rely on fence sync protocol + in the sync extension. This protocol is only + complete in xextproto version 7.1.99 and + above. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 1c4a0db2c6bf0320cb630b84ab87bcfd3801a53d +Author: James Jones <jajones@nvidia.com> +Date: Mon Jun 28 16:10:13 2010 -0700 + + Add fence sync driver interface + + -Add fence sync objects + + -Add fence sync devPrivates + + -Add a X sync module screen private + + -Add wrappable functions to create and destroy + fence sync objects + + -Give fence sync objects wrappable functions to + trigger, test, and reset their 'triggered' value. + + -Give fence sync objects wrappable functions to + notify driver when adding/removing triggers to/ + from the sync object. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit af0f9f913398d34a885c3fb4e8d40c1a7e2b3ee9 +Author: James Jones <jajones@nvidia.com> +Date: Mon Jun 28 15:39:04 2010 -0700 + + Move some sync code to miext + + As a precursor to the fence sync object video driver + and extension API, move some code from Xext to + miext/sync. Most of this is just code to set up the + build system to include the new directory. No + functional code is added in this change. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 12b65de7db6e3e8bf831914d247da269d01c5fbe +Author: James Jones <jajones@nvidia.com> +Date: Mon Dec 6 10:11:45 2010 -0800 + + Factor out generic code from ProcSyncAwait() + + In preparation for adding more sync object types + that will need Await requests of their own, factor + out some setup and finalization code from + ProcSyncAwait() into SyncAwaitPrologue() and + SyncAwaitEpilogue() + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit c66a410d378090f350beb398649e9d9262933785 +Author: James Jones <jajones@nvidia.com> +Date: Mon Jun 28 14:59:01 2010 -0700 + + Make Await SyncTrigger functions generic + + Update all the functions dealing with Await + sync triggers handle generic sync objects + instead of just counters. This will + facilitate code sharing between the counter + sync waits and the fence sync waits. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 99daf419a3070c347c0cd29b4a9bae07eca7bd6d +Author: James Jones <jajones@nvidia.com> +Date: Mon Jun 28 14:51:54 2010 -0700 + + Create SyncObject base type. + + SyncObject is now the base type for SyncCounter. + Data to be used by all sync types is stored in + the base object. SyncCounter can be safely cast + to SyncObject, and a SyncObject can be cast to + the correct type based on SyncObject::type. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 27593eea7efcbed8de0c6e8233cbd1a1b8a50459 +Author: James Jones <jajones@nvidia.com> +Date: Mon Dec 6 13:36:14 2010 -0800 + + Add and use SERVER_SYNC_*_VERSION + + Most extensions have a version defined + in the protocol headers, and also in the + server's protocol-versions.h. The latter + defines which version the server advertises + support for. Sync wasn't included in + protocol-versions.h, and was advertising + support for whatever was in the protocol + headers the server was built against. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 68a1b0de95f71f74835c6c0f002699fcdccbb268 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 6 14:58:37 2010 +1000 + + xfree86: use xf86AllocateInput() for xorg.conf devices too. + + Single allocation point for input devices, most notably a single point to + reset default values. + Without this patch, the file descriptor default was -1 for hotplugged + devices and 0 for config devices. Drivers that don't overwrite the default + themselves would thus fail if configured in the xorg.conf. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit beea2378f142556471c62290e275935af848e137 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 6 14:33:43 2010 +1000 + + xfree86: don't overwrite option list (#32115) + + Options set in the configuration file were unconditionally overwritten by + the server. Merge the already existing options and the new options together + instead of just overwriting ones. + + Introduced in commit 2199842ed50b3eb40d54146827fc58cae7e873ec + Author: Peter Hutterer <peter.hutterer@who-t.net> + Date: Thu Sep 2 10:52:54 2010 +1000 + + xfree86: remove extraOptions field from IDevRec. + + X.Org Bug 32115 <http://bugs.freedesktop.org/show_bug.cgi?id=32115> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: David Ronis <ronis@ronispc.chem.mcgill.ca> + +commit 8f3fa8fb0b0a75dac714fc213c034b20595898d3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 6 15:44:50 2010 +1000 + + xfree86: add option "Floating", deprecate SendCoreEvents and friends. + + Some devices should be initialised as floating from the start (e.g. + Joysticks and accelerometers benefit from this). Currently users use the + "SendCoreEvents" "off" flag for this, which isn't the most appropriate + naming. + + Add an option "Floating", deprecate the others. Still parsed and handled by + the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 36b614dedf4ddc428e43ad1542d4f9314f73f60a +Author: Eoghan Sherry <ejsherry@gmail.com> +Date: Sun Nov 28 16:15:51 2010 -0500 + + Xi: Fix master button update when slave buttons are mapped. #24887 + + It is currently assumed that an event button delieved to a master device + corresponds to the slave button states. However, the event button is a + logical (mapped) slave button and slave button states correspond to + physical (unmapped) slave buttons. This leads to incorrect update of the + master button state and incorrect events devlivered to clients. Fix the + situation by taking the slave button map into account when querying a + slave button state. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24887 + + Signed-off-by: Eoghan Sherry <ejsherry@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 31ab9f8860848504df18a8be9d19b817b191e0df +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 3 11:54:41 2010 +1000 + + mi: handle DGA subtypes when determining the master device. + + The subtype in the DGA event is the core type and all ET_ event types (where + applicable) are identical to the core types. Thus the switch statement below + will work as required and assign the right master device. + + Fixes a crasher bug on keyboard devices with valuators. If a device sends a + motion event while grabbed and a DGA client is active (but has not selected + input through DGA), the valuator event is posted through the VCK and + eventually results in a NULL-pointer dereference on dev->valuator. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5d31c3e705dfd9f38f0fffcd07a6d8d06644735c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 26 09:37:37 2010 +1000 + + dix: don't stop processing valuators when the mode changes. + + XI 1.x events still contain absolute coordinates anyway. By the time we get + to the InternalEvent to XI event conversion, the valuators are already + absolute. + + Stopping because of a different mode on a valuator is not necessary. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 714b68d9e5bf624a6703f168e0f7dc980e88e8c0 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Dec 3 17:27:44 2010 -0800 + + XQuartz: RandR: Fix mode changing for multi-monitor configurations. + + This just fixes the regression whereby we couldn't switch between the legacy + fullscreen mode and rootless on multi-monitor configurations. This was + happening because ref wasn't being set in these cases (since we don't ever + actually change CG modes), so we failed a CFEqual. Setting the references + fixes this regression and places us one step closer to more mode RandR + mode switching in multi-monitor configurations. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 14f00449eb81771c01fffcdaf3dd697cdf4e41de +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Dec 3 16:46:11 2010 -0800 + + XQuartz: Cleanup some compiler warnings + + Mark __crashreporter_info__ as __attribute__((__used__)) + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 14aec8b82a316c6df51ac2a81985ebf1990abd2b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Dec 3 16:45:37 2010 -0800 + + XQuartz: Remove one more backing store leftover + + See: c4c4676e6874b42c2371eee96faa2c2dbb59a704 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ca431371a23a2b9ad36c1d64e11ea41d5e4e5f04 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Nov 26 15:31:22 2010 -0500 + + XQuartz: Disable the Mac OS X screensaver when in full screen mode + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 311cad33155c64ed996418808727fc417168592e +Author: Nicolas Peninguy <nico@lostgeeks.org> +Date: Wed Nov 24 00:11:11 2010 +0100 + + Fix Xdmx and Xephyr build when DTrace support is enabled + + This fixes the following build errors when DTrace is enabled + (--with-dtrace): + + CCLD Xdmx + /usr/bin/ld: ../../os/os.O: undefined reference to symbol 'dladdr@@GLIBC_2.2.5' + /usr/bin/ld: note: 'dladdr@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line + + CCLD Xephyr + ../../../os/os.O: In function `TimerForce': + /home/nico/work/xserver/os/WaitFor.c:481: multiple definition of `TimerForce' + ../../../os/os.O:/home/nico/work/xserver/os/WaitFor.c:481: first defined here + + Signed-off-by: Nicolas Peninguy <nico@lostgeeks.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 3824417335ec00a87b51f8d05e592099b8507680 +Merge: dab064f f4f41c8 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Dec 2 08:39:33 2010 -0800 + + Merge remote branch 'vsyrjala/xv_reput' + +commit dab064fa5e0b1f5c67222562ad5367005832cba1 +Author: Andrea Canciani <ranma42@gmail.com> +Date: Tue Nov 2 20:10:32 2010 +0100 + + render: Fix byteswapping of gradient stops + + The function swapStops repeatedly swaps the color components as + CARD16, but incorrectly steps over them as if they were CARD32. + + This causes half of the stops not to be swapped at all and some + unrelated data be swapped instead. + + Signed-off-by: Andrea Canciani <ranma42@gmail.com> + Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 279ef1ffd787dba2f0d5056849b9cb15d36aa3eb +Author: Cyril Brulebois <kibi@debian.org> +Date: Wed Dec 1 14:12:55 2010 +0100 + + Fix screen number checks. + + screenInfo.numScreens is not a valid screen number, they go from 0 to + numScreens - 1. + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8684543021b9b1aa165b1bc69bc58685cb5942c1 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Nov 30 17:23:10 2010 +0100 + + DGA: fix screen number check + + screenInfo.numScreens is not a valid screen number, they go from 0 to + numScreens - 1. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8f42b2b69387b006bfcd373c3d023ebea9035db2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 22:34:57 2010 -0800 + + Simplify Error() - don't allocate temporary copy of error string + + Doesn't seem to be any reason to just not pass the error string + as another argument directly to LogVWrite() + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 685286b17d30335d799a9da11914943e466ea955 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 20:43:28 2010 -0800 + + FindModuleInSubdir: Stop allocating one more byte than needed + + 15ac25627e7239629be59 removed the "/" from the sprintf strings, + but failed to remove the extra byte allocated for the '/'. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 40d5a019352fa8f12230c863e11cbb1f6258a93e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 19:50:38 2010 -0800 + + xf86VIDrvMsgVerb: print args, not format string + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 4bbc90cd8b7e749fd8072ce7cd8dd998f4396981 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 19:06:56 2010 -0800 + + xf86AutoConfig: make copyScreen memory allocation & error handling more sane + + No point calling the no-fail-alloc if you check for failure and your + only caller checks for failure. + + No point calling calloc to zero fill memory you're about to memcpy over. + + In the unlikely event of a loss of memory allocation, drop your previous + allocations before returning to others. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 2c8e534c8e9334562485aeaaef374871cf14d5fe +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 23:49:55 2010 -0800 + + xf86ValidateModes: xnfalloc(strlen) + strcpy => xnfstrdup + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 29e467a1f1548a826ee2793244e3ff416aa1a0f2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Nov 26 16:53:40 2010 -0800 + + xf86OutputRename: Replace another strlen/malloc/strcpy set with strdup + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit d346bc3083c6d4bea59b77f634c7c5ec6c1d8cc9 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Nov 28 13:48:16 2010 -0800 + + Fix compiler warnings in hw/xfree86/os-support/solaris + + sun_init.c: In function `xf86OpenConsole': + sun_init.c:99: warning: cast does not match function type + sun_init.c:74: warning: unused variable `FreeVTslot' + sun_init.c: In function `xf86UseMsg': + sun_init.c:417: warning: old-style parameter declaration + + sun_vid.c: In function `solUnMapVidMem': + sun_vid.c:162: warning: long unsigned int format, pointer arg (arg 6) + sun_vid.c: In function `xf86ReadBIOS': + sun_vid.c:217: warning: long unsigned int format, pointer arg (arg 5) + sun_vid.c:217: warning: long unsigned int format, int arg (arg 6) + + sun_agp.c: In function `xf86EnableAGP': + sun_agp.c:321: warning: unsigned int format, CARD32 arg (arg 4) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit d75777d54c2107163305f50e8ee4306da202b95e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Nov 28 13:45:40 2010 -0800 + + Move xchomp inside #ifdef __linux__ + + static function only called from the matchDriverFromFiles function + that's inside #ifdef __linux__ section + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit ccbba444b7b8e1ba555532a847377600bea43d03 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Nov 28 10:45:17 2010 -0800 + + config: Remove AC_PROG_CC, SED & INSTALL that XORG_DEFAULT_OPTIONS provide + + Most importantly removes AC_PROG_CC call that resets compiler flags back + to C89 mode, breaking use of C99 isfinite() on Solaris in dix/devices.c. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + +commit 92cde0b84cdec164cd698dc74a7512d0791d7708 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 08:15:52 2010 -0800 + + Xserver-spec: Update discussion of font library + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c1e769250078cbc74d7e6e6ddc5323c4f420ab14 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 08:06:40 2010 -0800 + + Xserver-spec: Update location of log functions + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit deae18f3cad94959110761ef2ecd9665690e3db5 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 00:45:48 2010 -0800 + + Xserver-spec: Fix assorted typos + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a410bf53798bdca43f99476a01ef27cabdf73e01 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 00:35:28 2010 -0800 + + Xserver-spec: Update lists of macros + + LOOKUP_DRAWABLE & VERIFY_GC are no longer in dix.h, but + WriteReplyToClient & WriteSwappedDataToClient are. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit de518c8f378ea31345c946693d58a26a493af603 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 00:30:37 2010 -0800 + + Xserver-spec: Remove CreateCallbackList + + The function is defined as a static, so can't be called by anyone + but AddCallback. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f6c880b257a21a574cf1a47095cb39f32252802e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 00:27:46 2010 -0800 + + Xserver-spec: Replace deprecated resource id lookup functions + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 922806a5aa6eafc432d6787495b475aaa3f1790d +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 00:14:51 2010 -0800 + + Xserver-spec: Update Memory Management functions + + Xalloc, Xrealloc, & Xfree are deprecated now + ALLOCATE_LOCAL is removed due to stack overflow issues + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 02449ee24b484c9fea501df5274d95a9f87cab23 +Merge: afd6eb6 b85f906 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 30 13:30:59 2010 -0800 + + Merge remote branch 'ajax/for-keithp' + +commit afd6eb66d5ef6a59be4c03da4588aaa2ee47b9ad +Merge: b169649 ffcbfa0 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 30 13:28:13 2010 -0800 + + Merge remote branch 'aplattner/for/keith' + +commit b16964910d29c0bd039e8bb48bcf1199d709fe3e +Author: Ferry Huberts <ferry.huberts@pelagic.nl> +Date: Tue Nov 30 19:06:55 2010 +0100 + + dix: do not use bit-wise operators on the boolean result of BitIsOn + + Performing bit-wise operations on a boolean amounts to mixing types, + is confusing and basically incorrect; one should only perform + logical operations on booleans. + + Performing such operations relies on the implementation detail + that a boolean is in fact an integer and that its value FALSE + is implemented as zero. + + Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5f34853d6f936e8a1a317a59972b07e3f191d1ab +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 15 11:25:13 2010 +1000 + + xfree86: Bump classic driver default to 1024x768 + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 903e0f6f0f0ec54151640fc459ff03dcba0522af +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 10:46:44 2010 -0800 + + Xserver-spec: Delete DBE Idioms section + + The code has been gone for a while + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f4ba75a494cf9f4f5b0a979e9ceb519f4a6fcacc +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 27 10:46:43 2010 -0800 + + Remove unused ReqLen & CastxReq macros + + According to Xserver-spec, they were part of the now-deleted DBE "Idioms" + code. The last callers of them were removed in commits fe616f9230b6 & + 3d642905477f. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b85f9063c2370d7710523bccb8bf030a0710425b +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 22 16:42:04 2010 -0500 + + xfree86: Remove the xf8_16bpp overlay module + + Only one (marginal) driver was using it, and it's been fixed to just + implement it directly. + + v2: Also fix sdksyms.sh (spotted by Jesse Adkins) + v3: Also fix DESIGN.xml (spotted bu Julien Cristau) + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a861fe6a1cf56df76928d21707551602289963c1 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 30 13:50:42 2010 -0500 + + vbe: Refuse to believe tiny (or negative) panel sizes from PanelID + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 84a14fab8f930ef1855444ae4e9e3e14ee008328 +Author: David Reveman <davidr@novell.com> +Date: Wed Jan 6 14:55:48 2010 -0500 + + composite: add panoramix support + + Taken from: + 50d2d8c8969c165582d215c6e85c4be9eac02b6a + dbffd0d44a33dcc84898c7a891d7ba212f65cbb8 + 9b5b102163b4eaa1b70647354fcab4f6e461c94c + 75f9b98af31abf537ac6616c99f3797deb7ba017 + 07fba8b1f77a6bca44ea6568b346a18ce9d1e61d + + With minor style fixes, ported to dixLookupResourceByType, and ported + away from client->noClientException and xalloc/xfree. + + v2: Fix a memory leak in PanoramiXCompositeNameWindowPixmap, spotted by + James Jones. + v3: Fix a buglet in PanoramiXCompositeUnredirectSubwindows, spotted by + Dave Airlie. + v4: Fix a style issue with resource lookup noted by Jamey Sharp. + + Reviewed-by: Dave Airlie <airlied@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 6dea617e0f71a6fc7937e3a1e10474fa87488284 +Author: David Reveman <davidr@novell.com> +Date: Tue Jan 5 15:35:10 2010 -0500 + + fixes: Add panoramix support + + Taken from: + 583f4dde81d8d5e9101b0289946e1914ea1ee124 + + With minor style fixes and ported to dixLookupResourceByType. + + Reviewed-by: Dave Airlie <airlied@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 1b3c57f075049250c6d059412af3d6954468a5b7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Aug 20 12:25:23 2010 -0400 + + xfree86: Remove unused xf86PixmapKeyRec + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 63b9d67d7f4f1fa108370c619e1d0d06baedbd4c +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Aug 19 18:40:24 2010 -0400 + + mi: Remove unused miAllocateGCPrivateIndex + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 87f5b843a08fd92b4b31c04e3e6d947b8bc0d160 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Nov 19 16:25:51 2010 -0500 + + render: Reshuffle and cull dead field from GlyphSetRec + + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 606e079cc4d9a9db3197652ca51683c36f74efb8 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Nov 19 16:17:48 2010 -0500 + + dix: reshuffle WindowOptRec to fill a hole on LP64 + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit fba5c8154dbc8f8c33801a5a43d7361cd6b54ffe +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Nov 19 15:21:31 2010 -0500 + + dix: Remove unused ChangeSaveUnder hooks + + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit c4c4676e6874b42c2371eee96faa2c2dbb59a704 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Nov 19 15:04:09 2010 -0500 + + dix: Remove the backing store leftovers + + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 48bc8d0dd99284f509bc6de01a8fd24a7bfc69d5 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 6 09:56:56 2010 -0400 + + render: repack PictureRec + + Eliminate the unused dither field, move filter and stateChanges into the + bitfield, and reorder elements to pack holes on LP64. + + sizeof(PictureRec) ILP32 LP64 + before: 84 152 + after: 72 120 + + Reviewed-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ffcbfa0063bdc7c9ad5ac724285c7b6e67044c18 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Nov 15 20:43:18 2010 -0800 + + xfree86: Fix rotation of 2-color non-interleaved cursor images + + When RandR 1.2's transformation code is enabled, it rotates the cursor + image so that it appears upright on a rotated screen. This code + completely mangles 2-color cursors on hardware where the the mask and + source images are not interleaved due to two problems: + + 1. stride is calculated as (width / 4) rather than (width / 8), so the + expression (y * stride) skips two lines instead of one for every + time y is incremented. + 2. cursor_bitpos ignores the 'mask' parameter if the hardware doesn't + specify any of the HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_* flags. + + To fix this, refactor the code to pass the whole xf86CursorInfoPtr + through to cursor_bitpos and compute the correct stride there based on + the flags. If none of the SOURCE_MASK_INTERLEAVE flags are set, use + the total cursor size to move the 'image' variable into the mask part + of the image before computing the desired byte pointer. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Robert Morell <rmorell@nvidia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Tested-by: Cyril Brulebois <kibi@debian.org> + +commit 7ee965a300c9eddcc1acacf9414cfe3e589222a8 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue May 11 09:16:19 2010 -0400 + + linux: Refactor VT switch on {re,}generation and shutdown + + This makes more things fatal than were fatal before, but that's correct; + if you need the VT, then failing to get it on regeneration means things + are about to go very very badly. + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 0def735c6a9fab19acc4b806def6921a702f617f +Author: Adam Jackson <ajax@redhat.com> +Date: Tue May 11 08:40:33 2010 -0400 + + xfree86: Remove dead ifdefs from VT switching + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 96a7a7d197d5f96e7aa51928155d4b8d5a115875 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon May 10 18:40:09 2010 -0400 + + linux: Don't muck about with tty permissions + + This is not X's job. + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 6ce1908ba4959aaa0a48171acb62cf6a5d5cbf18 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 12 08:50:54 2010 -0400 + + xfree86: Remove os-support/sysv + + Nothing's using it, the SysV derivatives we support have their own + custom versions. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 01159ffc4718ba48ab7b16acaffd8008f9803811 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon May 10 18:14:49 2010 -0400 + + linux: Remove redundant variable + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a80780a7638f847c3be20e5e0c7fe85e83d9bdd1 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Nov 17 09:03:06 2010 -0500 + + glx: Remove swap barrier and hyperpipe support + + Never implemented in any open source driver. The implementation + assumed explicit DDX driver knowledge of how the client-side driver + worked, since at the time the server's GL renderer was not a DRI driver. + But now, it is, so any implementation of these should be done with + additional DRI driver API, like the swap control extension. + + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f4f41c812d2ba5edba7e0e0dbaab4bbf0af834b3 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 17:34:56 2010 +0300 + + xfree86/xv: Provide a ModeSet hook + + Reput all ports when the display mode or panning has been changed by + RandR code. This makes the overlays appear in the correct position + on the screen. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 640c8716e0400e35afd7e91efc826fc447ea6745 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Thu Oct 28 18:13:02 2010 +0300 + + xfree86/modes: Provide a ModeSet hook in ScrnInfo + + Add a new hook ModeSet that will be called after display mode is + changed, or after the display has been panned. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit a942534ca3908418c407115c6393263c2fe05931 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Tue Nov 2 16:05:13 2010 +0200 + + xfree86/xv: Pass all coordinate arguments to ReputImage + + Pass all of the src/dst coordinates to ReputImage so that drivers + don't necessarily have to do double bookkeeping. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 0fef4e94480f2bf1157ce5f92fcb0c7dd1585371 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Tue Nov 2 16:23:02 2010 +0200 + + xfree86/xv: Document VIDEO_CLIP_TO_VIEWPORT incompatibility with reput + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 5f8ec1ade8b485f48de8c72011409219afad9dd7 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Tue Nov 2 16:04:36 2010 +0200 + + xfree86/xv: Add some helpful comments about ReputImage + + Document the fact that ReputImage is used for stills as well as images. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit b4ebde23d25bef1b891902d75b2db3aad92685b7 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Mon Nov 1 20:27:25 2010 +0200 + + xfree86/xv: Fix ReputImage clipping + + PutImage/PutStill respect the GC clip, however ReputImage does not. + PutImage/PutStill are supposed to be oneshot operations so ReputImage + should never expand the area covered by the clip, instead it should + only shrink if the window clip shrinks. So commandeer clientClip + into use by ReputImage and initially make it a copy of the original + GC composite clip. Whenever ReputImage needs reclipping update + clientClip with the newly calculated composite clip. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 7294236bdb29b4fa7a7bc27aff9c786c5a33c544 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Mon Nov 1 20:02:40 2010 +0200 + + xfree86/xv: Remove clipOrg from XvPortRecPrivate + + clipOrg never changes except when clientClip changes, so instead of + keeping copies of both originals translate clientClip by clipOrg + immediately and just keep the translated clientClip. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 47d8bd0a999693f47fd244dc876ef7f8fcd52854 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 17:31:14 2010 +0300 + + xfree86/xv: Factor out the meat of xf86XVAdjustFrame for later reuse + + No functional change. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 3d4d0237a3981820a9b7290f69c7172a48659a10 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 17:14:34 2010 +0300 + + xfree86/xv: Change the behaviour of AdjustFrame to reput everything + + Also reput PutVideo/GetVideo ports in AdjustFrame. This makes the + overlay track the screen panning instead of staying stationary in the + wrong place. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit d794be81218934ad4580211c7a0a27cb71eb5d60 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 18:07:32 2010 +0300 + + xfree86/xv: No need to free composite clip in AdjustFrame + + Nothing should change in AdjustFrame that would need the composite clip + to be recomputed. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 6051c7e940767b7120ad9c7e9188aee6a6f62b94 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 17:05:02 2010 +0300 + + xfree86/xv: Change the behaviour of ClipNotify to reput instead of stop + + When ClipNotify gets called for a visible window, reput instead of + stopping the port. This eliminates nasty overlay flickering that + happens during clip changes. + + If the window is invisible or if ReputImage isn't supported stop + and remove the port from the window as was done before. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 27707ac5bdf6831630944f02f2128951a529faab +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 17:00:24 2010 +0300 + + xfree86/xv: Allow xf86XVReputOrStopPort() to stop PutVideo/GetVideo ports + + Modify xf86XVReputOrStopPort() to allow stopping of all types of ports. + Will be useful later. + + No functional change. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 38987aae199982f17eae664f3a28ff5941d3ee73 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 16:51:24 2010 +0300 + + xfree86/xv: Factor out the meat of xf86XVWindowExposures for later reuse + + No fucntional change. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 0178173f0579c4b9dd0cf60b9cd3e5d264f86ae4 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 16:39:13 2010 +0300 + + xfree86/xv: Eliminate two open coded copies of xf86XVRemovePortFromWindow + + No functional change. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit b02858b5af47d524001ec571737cc92f6a6f06d3 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Fri Oct 29 16:54:42 2010 +0300 + + xfree86/xv: Remove useless NULL check from ClipNotify + + WinPriv->PortRec should never be NULL as WinPriv itself would be removed + from the list when the port is removed from the window. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> + +commit 23e3d1f23318ce69623f91908f888a09f8b74ac2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 26 10:00:49 2010 +1000 + + dix: remove now unnecessary !! before BitIsOn() + + The macro has been changed to do this already, no need for double + not-not-ing. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 42dc91e32a02b6b21ff5c45f465f3349e5822615 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Nov 24 14:20:30 2010 +1000 + + include: let BitIsOn() return a boolean value. + + Simply returning the mask bit breaks checks like + BitIsOn(mask, 0) != BitIsOn(mask, 1); + as used in 048e93593e3f7a99a7d2a219e1ce2bdc9d407807. + + The naming of this macro suggests that it should return boolean values + anyway. This patch also adds a few simple tests for these macros to make + sure they don't accidentally break in the future. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Pat Kane <pekane52@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 4e0f8f666e61390206c42ad2087477a912525bc7 +Merge: 400ddf2 639600f +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 24 11:47:33 2010 -0800 + + Merge remote branch 'whot/for-keith' + +commit 400ddf2f58ce673c74d4e8ee829729cd3c75f8c9 +Merge: 7250f07 e074f74 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 24 11:46:18 2010 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 7250f078c12fd20d5ac9150f54495926e5121461 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 14:27:58 2010 -0500 + + doc: refactor Makefile and xmlrules.in code for reusability + + A different approach which requires less variables setting + and internal knowledge of the reused code. + Changing from "install" to "not install" is very easy now. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f33512b70cf0350a62df2ee2287a870d5fc991a8 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 14:27:57 2010 -0500 + + xmlrules.in: use $(top_srcdir) rather than ../../../ [...] + + Relative paths don't always work in distcheck when srcdir not = builddir + include $(top_srcdir)/doc/xml/xmlrules.in + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c25b407f22456f50eef90d9bc5e026c05415c021 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 14:27:56 2010 -0500 + + xmlrules.in: specify the xserver entities depedencies on the target + + The generated docs will rebuild when the xserver.ent file changes. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 73841074eb856e6be3b9f9e3fc2d2721443166ab +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 14:27:55 2010 -0500 + + xmlrules.in: use pattern rules to enable dependencies + + This will allow a dependency to be specified as done in libX11: + + %.html: %.xml $(dist_spec_DATA) + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 97e307dda201d6ba28a723c21a95e484921d1b08 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 14:27:54 2010 -0500 + + xmlrules.in: no need to setup xmlto flags when configuring --without-xmlto + + The AM conditional HAVE_XMLTO should wrap more statements. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1a7b14d1183057fc69a5da446e898104b65c8347 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 14:27:53 2010 -0500 + + xmlrules.in: remove unrequired "@rm -f $@" from doc targets + + Unable to find a purpose for this, not used anywhere else + but in the font module. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d3c523bd124dc1a3f4539f7f6cd4868adbfc25e1 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 14:27:52 2010 -0500 + + doc: HTML file generation: use the installed copy of xorg.css + + Currently the xorg.css file is copied in each location + where a DocBook/XML file resides. This produces about + 70 copies in the $(docdir) install tree for all of xorg. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 504e3010e976ccc008ff48417850b594beaee2ec +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Nov 19 22:09:05 2010 -0800 + + Xorg.man: Replace XDarwin reference with Xquartz + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 566d09a5cd6452ee2e05e23d2205e7c3aa31f0da +Author: Bill Nottingham <notting@redhat.com> +Date: Mon Nov 15 11:25:14 2010 +1000 + + xfree86: store the screen's gamma information on init. + + This fixes a gamma issue on vt switch observed with KDM. VT switching away + and back would result in a black screen. Avoid this by storing the current + gamma information on init. + + https://bugzilla.redhat.com/show_bug.cgi?id=533217 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c050aa2f5fa6a7ff8ce4f91def14ca44f799f067 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 15 11:25:12 2010 +1000 + + xfree86: apply gamma settings on EnterVT. + + When entering the VT, re-apply the saved gamma settings for each screen. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e074f745a80b87d1d82fb39489d7f35163d7552a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Nov 23 16:03:48 2010 -0800 + + XQuartz: Remove unused CloseInputDevice stub + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 639600fa7ebad7a4953d0b632abeff2d339a49c6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 23 13:30:05 2010 +1000 + + dix: add a fixme about a corner-case that should probably be fixed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 0aca9e8424d8b978053a29c4468f800fc2e7238c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 23 13:04:19 2010 +1000 + + dix: fix typo, set the second valuator with the y-axis data. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 45131bb67f9eacb3b55de4bcd3730fb9bb028e8a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 23 12:55:50 2010 +1000 + + dix: GetProximityEvents needs to check up to the last valuator + + valuator_mask_size() returns the highest valuator set as opposed to the + number of set bits (which obviously changes as we unset valuators). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 048e93593e3f7a99a7d2a219e1ce2bdc9d407807 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 23 11:15:52 2010 +1000 + + dix: when converting to XI 1.x events, use the first_valuator's device mode + + Don't stop processing events when a valuator's mode doesn't match the 0th + valuator's mode. Instead, start with the first_valuator in the event and + keep stacking them on until the first valuator with a different mode is hit. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4f3e670fd28fceec384ff0d4ca7c1ff8d7a872ad +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 23 10:59:52 2010 +1000 + + dix: when comparing axis modes, compare the bits, not the bytes. + + The DeviceEvent's mode field is a set of bits for each valuator, not bytes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 6f12934d4ea52f17ac7b21e92f4f929db165f83d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 23 10:58:32 2010 +1000 + + dix: replace a manual valuator check with valuator_get_mode(). + + This check was missing the OutOfProximity mask and resulted in the wrong + bits being set in InternalEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ebe3ddaf284ad388835da9cbaa6ad61fa21ce6dd +Author: Simon Thum <simon.thum@gmx.de> +Date: Fri Nov 19 11:09:21 2010 +1000 + + dix: fix up valuators passed to acceleration code. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit d435e1ecb86e2fe6292b5945262956644f979bbb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 5 11:08:27 2010 +1000 + + test: reduce range of byte-padding macro tests. + + Byte padding and conversion is interesting for the rage of 0-8 bytes, and + then interesting towards the end of the valid range (INT_MAX - 7 and INT_MAX + - 3). + + Note: this changes the upper range for pad_to_int32() and bytes_to_int32() + from the previous (INT_MAX - 4) to (INT_MAX - 3). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit f49ee9074a66883a3c525b0d6e71589123288465 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 5 10:59:52 2010 +1000 + + test: compare byte padding macros against the expected bytes. + + We calculate the expected bytes for each value, let's use it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit b31df0439fe336a43a2355e2f1fb223d86045a05 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Nov 22 15:14:02 2010 +1000 + + xfree86: add missing linebreak in error message. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net> + +commit 97b9bb1e2cebbb769ef347455d9c7979d19de99f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Nov 22 20:43:14 2010 -0800 + + XQuartz: Localization Updates + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f9fbafa1a07f951e89f208bf4928a0bf37b67cfe +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Nov 22 20:41:39 2010 -0800 + + XQuartz: Remove existing localization files on install to avoid conflicts + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 6eed13ad5998ba80296bba2bb3f89928ee51194a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Nov 22 20:25:33 2010 -0800 + + XQuartz dri: Don't check CoreGraphics version + + The version check is hackish, and I highly doubt anyone using this code is on + a version of OS X that predates this support (10.2 has support for it). + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a4698754c1da1cf2ca64add5276d0c6012960504 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Nov 21 10:49:24 2010 -0800 + + XQuartz: Add pointer debugging + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 31737fff08ec19b394837341d5e358ec401f5cd8 +Author: Chase Douglas <chase.douglas@ubuntu.com> +Date: Mon Nov 15 11:42:12 2010 -0500 + + Fix transformAbsolute + + transformAbsolute must use old values if valuator mask doesn't have new + ones, and it must only set new values if there was a change. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 463841f45aafd1227bac652965c9ea337dd527fa +Author: Chase Douglas <chase.douglas@ubuntu.com> +Date: Mon Nov 15 11:42:11 2010 -0500 + + Fix GPE Y axis scaling + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a6b9e8f1e5d5d0b3b0f121a6f677eeca7aab1950 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 25 11:06:38 2010 -0400 + + linux: Fix CPU usage bug in console fd flushing + + If the vt gets a vhangup from under us, then the tty will appear ready + in select(), but trying to tcflush() it will return -EIO, so we'll spin + around at 100% CPU for no reason. Notice this condition and unregister + the handler if it happens. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ecdbe817fd7eb53fd1e7485c0492355f7f002d2a +Author: Dan Horák <dan@danny.cz> +Date: Tue Jun 22 19:45:26 2010 +0200 + + XF86CONFIGDIR is undefined when built with --disable-xorg (#28672) + + The 10-evdev.conf file gets installed as /usr/share/X11/10-evdev.conf on + platforms that built the server with --disable-xorg like s390/s390x. The + definition/installation should be guarded with "if XORG" because it makes + sense only when built with xorg. + + X.Org Bug 28672 <http://bugs.freedesktop.org/show_bug.cgi?id=28672> + + Signed-off-by: Dan Horák <dan@danny.cz> + Acked-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 38c46ccf796462d068d95acb9022de2acfc3a1f7 +Merge: 3051dd5 c8998af +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 15 09:06:33 2010 +0800 + + Merge remote branch 'whot/for-keith' + +commit 3051dd5135962283fc6c7de377a7c819d8a04e7f +Merge: ed547a9 c597572 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 15 08:58:02 2010 +0800 + + Merge remote branch 'jeremyhu/master' + +commit ed547a9fc8a4f5cd95ef882b656a376c163eda6d +Merge: 78f94f1 84e8de1 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 15 08:51:27 2010 +0800 + + Merge remote branch 'adkins/master' + +commit 78f94f19aab66a1e5331df0ce29f36e310b4195d +Author: Linus Arver <linusarver@gmail.com> +Date: Sun Oct 17 12:26:01 2010 -0700 + + Xext: panoramiXprocs: fix typo + + This fixes a typo introduced in commit + 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1. The pointer pDst was changed + unintentionally to pWin from a copy/paste error. This resulted in all + QT-based apps and some tcl/tk ones (like fontforge) to crash X 1.9 on + starting up, when Xinerama was enabled. + + Bug report: https://bbs.archlinux.org/viewtopic.php?id=106125 + + Signed-off-by: Elie Bleton <drozofil@gmail.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Tested-by: Linus Arver <linusarver@gmail.com> + +commit c8998af3eba49a542625912d512087e4eaaf5ede +Author: Cyril Brulebois <kibi@debian.org> +Date: Sat Nov 13 02:05:16 2010 +0100 + + xfree86: Initialize Pointer and Keyboard. + + That helps us get rid of: + | CC xf86Config.lo + | xf86Config.c: In function ‘T.174’: + | xf86Config.c:1228: warning: ‘Pointer$module’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$module’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$drv’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$drv’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$type_name’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$type_name’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$private’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$private’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$dev’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$dev’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$fd’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$fd’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$set_device_valuators’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$set_device_valuators’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$switch_mode’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$switch_mode’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$control_proc’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$control_proc’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$read_input’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$read_input’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$device_control’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$device_control’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$flags’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$flags’ was declared here + | xf86Config.c:1228: warning: ‘Pointer$next’ may be used uninitialized in this function + | xf86Config.c:1097: note: ‘Pointer$next’ was declared here + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 98abac809a024ac3ed9dd0514ca96367f668c05d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Nov 11 23:06:13 2010 +0000 + + Fix compilation after input API change + + Fix compilation after commit 675f4a8525d29ebad783351e17be785b2f32b2e8 + converts winmouse.c to the new ValuatorMask input API, but doesn't + include the required header inpututil.h + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c5975722a95c41b8715a4612fc1c3275f8e9b59e +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Nov 13 16:04:10 2010 -0800 + + XQuartz: Fix make distcheck + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Cyril Brulebois <kibi@debian.org> + +commit 7b33ef74738d6a557cb25aeb14693b2a340c0e12 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Nov 13 15:46:16 2010 -0800 + + dix: Fix make distcheck + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 965e709f2b0b17f1e59e5aeb5e7717fede51ef97 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Nov 11 17:23:33 2010 -0800 + + XQuartz: Build-fixes for XQuartz for recent input API changes + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit fa50670c32637faff6bb91f1206a0e3c17a9bada +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 12 11:48:08 2010 +1000 + + xfree86: rename allowEmptyInput to forceInputDevices. + + This is a more accurate name for the actual functionality than + allowEmptyInput. Historically, allowEmptyInput has allowed the server to + start with no input devices. Since 1.4 and the introduction of VCP and VCK, + there are always two input devices present. + + allowEmptyInput was changed in behaviour to essentially "ignore xorg.conf + devices or not", auto-adding the built-in devices if disabled. + + Rename to forceInputDevices, because that's essentially what it does. When + disabled (i.e. when hotplugging is enabled), it disables all + mouse/kbd/vmmouse devices configured in the xorg.conf file. + When enabled, it forces the traditional behaviour for input devices: + - use input devices configured in the server layout + - if none are configured, use the first pointer and the first keyboard + device in the xorg.conf + - if none are configured, create the default pointer/keyboard devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit c481dae0dc89d8d50cac23210023d75bfaf6012b +Author: Cyril Brulebois <kibi@debian.org> +Date: Thu Nov 11 23:55:55 2010 +0100 + + test: Fix missing xkbsrv.h include. + + Otherwise, building fails with CFLAGS="-Wall -Werror" this way: + | protocol-common.c: In function ‘init_simple’: + | protocol-common.c:159: error: implicit declaration of function ‘XkbInitPrivates’ + | protocol-common.c:159: error: nested extern declaration of ‘XkbInitPrivates’ + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b8114f25b266624c8f73d03c710349f98693d877 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 12 08:32:05 2010 +1000 + + dix: fix typo in setting valuator modes (#21548) + + X.Org Bug 31548 <http://bugs.freedesktop.org/show_bug.cgi?id=31548> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Cyril Brulebois <kibi@debian.org> + +commit 5cd11d2356d153840f1b429bdb8284367f8dc468 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 9 17:10:57 2010 +1000 + + Xi: move property reset from extension shutdown to init. + + If any part of the stack calls XIGetKnownProperty during device shutdown + the property is re-initialized before the server generation resets, leaving + the value invalid again. + + Move the reset to the extension init which happens before input devices are + initialized before the first property is requested. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit da66119593b63ef82ae6fa2e034ccd0856b03a80 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Nov 10 21:48:04 2010 +0200 + + dix: fix root window background behaviour for protocol calls + + Instead always paint root tiled (-retro like), protocol calls + (XSetWindowBackgroundPixmap and related) should behave accordingly when None + and ParentRelative is set as background pixmap. + + It follow what the protocol states: "changing the background of a root window + to None or ParentRelative restores the default background pixmap". + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + +commit 8976e9766edfb33f5cf3f6d54f09e46d29bc4ec5 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Nov 10 21:48:03 2010 +0200 + + dix: adds support for none root window background + + It lets the driver notify the server whether it can draw a background when + '-background none' option is used by the system platform. Use cases for that + could be video drivers performing mode-setting in kernel time, before X is up, + so a seamless transition would happen until X clients start to show up. + + If the driver can copy the framebuffer cleanly then it can set the flag + (canDoBGNoneRoot), otherwise the server will fallback to the normal behaviour. + The system must explicit indicates willingness of doing so through + '-background none'. We could do this option as default; in such case, + malicious users would be able to steal the framebuffer with a bit of tricks. + + For instance, I can see the content of my nVidia Quadro FX 580 framebuffer + old X session modifying a bit nv driver: + + xf86DPMSInit(pScreen, xf86DPMSSet, 0); + + - /* Clear the screen */ + - if(pNv->xaa) { + - /* Use the acceleration engine */ + - pNv->xaa->SetupForSolidFill(pScrn, 0, GXcopy, ~0); + - pNv->xaa->SubsequentSolidFillRect(pScrn, + - 0, 0, pScrn->displayWidth, pNv->offscreenHeight); + - G80DmaKickoff(pNv); + - } else { + - /* Use a slow software clear path */ + - memset(pNv->mem, 0, pitch * pNv->offscreenHeight); + - } + + pScreen->canDoBGNoneRoot = TRUE; + + The commit is originally based on discussions happened on xorg-devel: + http://lists.freedesktop.org/archives/xorg-devel/2010-June/009755.html + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> + Acked-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit bfe9cdd11bcb60cf33dc48136ebee028001a737e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Oct 20 17:54:58 2010 -0200 + + dix: delete logo hack screen saver + + Protocol doesn't mention about screen saver with logo being required and + people are already using more intelligent ways to draw screen saver themes. So + consider -logo as deprecated option, deleting its code. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 84e8de1271bb11b5b4b9747ae4647f47333a8ab7 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Nov 10 21:37:24 2010 -0800 + + fb: Remove fbcmap.c (bug 5436) + + This is obsolete since a240c039c47c0be22ea5e100692307b26d938747. + Updated fb.h to mention that the functions come from fbcmap_mi.c now. + Dropped fbcmap.c from the makefile. + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 23e329b5641ef044c34ac712c9193171eaf47198 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Nov 10 21:35:58 2010 -0800 + + xfree86: parser: Remove 'CUSTOM' flag option in Monitor section. + + Not used in the initial import, and also not documented. + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 88cb61e1e55c54982b90e2a77465faaac6a0ba89 +Merge: 19f4383 4ed4915 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Nov 11 12:54:46 2010 +1000 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api + + Conflicts: + dix/getevents.c + hw/xfree86/common/xf86Xinput.h + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4ed4915bc0fbe9b4419ca4a0d4e43c2fee032ae9 +Merge: 291c39d ec1bfbc +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 10 16:58:21 2010 -0800 + + Merge remote branch 'whot/for-keith' + +commit ec1bfbc66926130e1153facc3b92ee175f1cb6b6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 9 15:27:26 2010 +1000 + + xfree86: remove user-configured AllowEmptyInput + + An estimated 100% (rounded down to the nearest percent) of the people who + have this in their configuration don't actually know what this option does. + Protect the users from themselves. + + IIRC, AEI on was useful for some time between 1.4 and 1.5 and never since. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit cbaa6a66e0f9e3b7e305606924ecda0147b59e96 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 9 15:21:23 2010 +1000 + + config: remove mention of AllowEmptyInput + + "You will probably want to add the following option to the ServerFlags of + your xorg.conf: + Option "AllowEmptyInput" "True"" + + I can't imagine why you would want to do that. My life is painful enough + already. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 291c39dfef84d1b204d7f5e63e925dee2dbdaca7 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Nov 9 13:33:55 2010 -0800 + + DOC: Only build dtrace documentation with --enable-docs + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f0b4df99486066ad0e638b3b5debc905bc8ef1c4 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Sep 11 17:55:57 2010 -0400 + + shadow: Optimize shadowUpdatePacked(). (#26973) + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c9c0f93f8ed42413a05193ee71c69fa6b41f6a03 +Merge: 73f6de1 4132b1c +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 10 16:11:29 2010 -0800 + + Merge remote branch 'whot/for-keith' + +commit 73f6de1ad8b5e1641102b54ff48a36ebb99ccacb +Merge: 333b6ed 3dc3aef +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 10 16:02:22 2010 -0800 + + Merge remote branch 'sandmann/fbdelete' + +commit 333b6ed26e36735ef72f314a3f8c4ec565af223f +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Thu Oct 28 20:46:23 2010 -0700 + + Set DamageSetReportAfterOp to true for the damage extension + + Change the damage extension reporter to queue up events after we chain + to the wrapped functions. Damage events are typically sent out after + the rendering happens anyway, since we submit batch buffers from the + flush callback chain and then flush client io buffers. Compositing + managers relie on this order, and there is no way we could reliably + provide damage events to clients before the rendering happens anyway. + + By queueing up the damage events before the rendering happens, there's + a risk that the client io buffer may overflow and send the damage + events to the client before the driver has even seen the rendering + request. Reporting damage events after the rendering fixes this + corner case and better corresponds with how we expect this to work. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + (cherry picked from commit 8d7b7a0d71e0b89321b3341b781bc8845386def6) + [anholt: re-applied to revert the revert, now that the cause of the + revert is fixed] + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f36153e3ef6b13a87d016caab09cc9be274b0dd5 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Oct 28 20:46:22 2010 -0700 + + Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter. + + In all these cases, any rendering implied by this damage has already + occurred, and we want to get the damage out to the client. Some of + the DamageRegionAppend calls were explicitly telling damage to flush + the reportAfter damage out, but not all. + + Bug #30260. Fixes the compiz wallpaper plugin with client damage + changed to reportAfter. + + Signed-off-by: Eric Anholt <eric@anholt.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c80c41767eb101e9dbd8393d8cca7764b4e248a4 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Oct 25 22:01:32 2010 -0700 + + os: Fix BigReq ignoring when another request is pending + + Commit cf88363db0ebb42df7cc286b85d30d7898aea840 fixed the handling of + BigReq requests that are way too large and handles the case where the + read() syscall returns a short read. However, it neglected to handle + the case where it returns a long read, which happens when the client + has another request in the queue after the bogus large one. + + Handle the long read case by subtracting the smaller of 'needed' and + 'gotnow' from oci->ignoreBytes. If needed < gotnow, simply subtract + the two, leaving gotnow equal to the number of extra bytes read. + Since the code immediately following the (oci->ignoreBytes > 0) block + tries to handle the next request, advance oci->bufptr immediately + instead of setting oci->lenLastReq and letting the next call to + ReadRequestFromClient do it. + + Fixes the XTS pChangeKeyboardMapping-3 test. + + CASES TESTS PASS UNSUP UNTST NOTIU WARN FIP FAIL UNRES UNIN ABORT + -Xproto 122 389 367 2 19 0 0 0 1 0 0 0 + +Xproto 122 389 368 2 19 0 0 0 0 0 0 0 + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cc2c73ddcb4370a7c3ad439cda4da825156c26c9 +Author: Luc Verhaegen <libv@skynet.be> +Date: Sun Oct 24 23:57:06 2010 +0200 + + x86emu: fix jump_near_IMM to handle DATA: flag correctly. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348 + + Before (data flag ignored -> broken): + 66 DATA: + e944f1 JMP 1ff6 + + After (fixed): + 66 DATA: + e944f1ffff JMP 00001ff8 + + This subtle difference in the length of decoded instruction meant + that the VBE call jumped to the routine setting AX=0x14F (VBE Failed) + instead of the routine that set AX=0x4F (VBE success). + + The ability to run the same code in vm86 significantly aided the + debugging of this issue. Those X.org developers who would like to drop + vm86 better take special care towards _all_ vesa bugs, as those will + expose further issues. + + Patch applies easily to even xserver 1.4.2. + + Signed-off-by: Luc Verhaegen <libv@skynet.be> + Tested-by: Luc Verhaegen <libv@skynet.be> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit be7cf14c365c8ee0d69c4335e01316bcfcba69a4 +Author: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> +Date: Tue Oct 26 09:11:53 2010 +0530 + + mi: Integer overflow for dashed lines longer than 46340. #31093 + + Lines of length greater than 46340 can be drawn with one of the + coordinates being negative. However for dashed lines, miPolyBuildPoly + overflows the int type when setting up edges for a section of the + dashed line. This results in the dashed segments not being drawn at + all. + + Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a6c64d96456d794b2f3ce40915922a3fba636b95 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sun Oct 24 15:18:28 2010 +0200 + + Do not trap access to timer and keyboard + + Disable timer/keyboard trapping on GNU/Hurd for now + + Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these + ports, and the int10 wrapper is not emulating them. + + It's effectively what happens in the Linux variant too, as iopl() is used there, + making the ioperm() meaningless. + + Signed-off-by: Olaf Buddenhagen <antrik@users.sf.net> + Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 69e8e1b0b95a325da3e3a2d76d092e7131baa9ad +Author: Julien Cristau <jcristau@debian.org> +Date: Mon May 17 19:39:54 2010 +0200 + + os: include dix-config.h, not xorg-config.h + + os/strlc{at,py}.c were trying to include xorg-config.h, which is not + available in dix. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit acba00c0c1129fe4ef7655f018cd21dbb1ee9a1f +Merge: 383dfe2 44e8165 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 10 14:41:08 2010 -0800 + + Merge remote branch 'dottedmag/master' + +commit 383dfe23f1641435c0713f8a56424814a156af8e +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Oct 25 17:13:57 2010 +0300 + + DRI2: Avoid call to NULL pointer + + DDX driver may implement schedule swap without GetMSC. In that case we + can't call GetMSC in DRI2SwapBuffers. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + CC: Keith Packard <keithp@keithp.com> + CC: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 68e4a628d65312df93cc71f3e76241584c4bbd23 +Author: Cyril Brulebois <kibi@debian.org> +Date: Wed Nov 10 15:28:29 2010 +0100 + + Remove more superfluous if(p!=NULL) checks around free(p). + + This patch has been generated by the following Coccinelle semantic patch: + + @@ + expression E; + @@ + - if (E != NULL) { + - free(E); + - } + + free(E); + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b142b0d27442191d628762604f4eb1f65263d717 +Author: Cyril Brulebois <kibi@debian.org> +Date: Mon Nov 8 23:35:33 2010 +0100 + + Remove more superfluous if(p!=NULL) checks around free(p). + + This patch has been generated by the following Coccinelle semantic patch: + + @@ + expression E; + @@ + - if (E != NULL) + - free(E); + + free(E); + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0649ac0afdb3f8ed11c2634563d6b9df161cb9ec +Author: Cyril Brulebois <kibi@debian.org> +Date: Mon Nov 8 23:35:32 2010 +0100 + + Remove more superfluous if(p) checks around free(p). + + This patch has been generated by the following Coccinelle semantic patch: + + @@ + expression E; + @@ + - if (E) + - free(E); + + free(E); + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 99275ad2fa99778afaefc54b62c8638afc59e755 +Author: Cyril Brulebois <kibi@debian.org> +Date: Wed Nov 10 16:06:10 2010 +0100 + + Remove superfluous if(p!=NULL) checks around free(p); p=NULL; + + This patch has been generated by the following Coccinelle semantic patch: + + @@ + expression E; + @@ + - if (E != NULL) { + - free(E); + ( + - E = NULL; + | + - E = 0; + ) + - } + + free(E); + + E = NULL; + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9e999d18b004b8ead9c6c5d79b4a3d4bbf0e3152 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 5 12:08:11 2010 +1000 + + Xi: if XTEST device creation fails, fail the master devices. + + When getting close to the MAXDEVICES limit, the creation of XTEST devices + may fail due to device id exhaustion. In that case, fail the creation of + master devices too and return an error to the client. + + Theoretically, we could alloc the MDs without the XTEST devices but that + will get interesting when a client starts sending XTEST events through those + devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 5a455e0c80d433adc4109ebf313fd92afa194545 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 5 11:49:12 2010 +1000 + + Xi: rename two variables from ptr to dev. + + They were named ptr when everything was in one function to save one more + variable. Now that the stuff is split out, "dev" makes more sense. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 9b89b91c685426c9944f7fc8890f436c18b7583c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 5 11:47:43 2010 +1000 + + Xi: split hierarchy manipulation into static functions. + + No functional changes, just code cleanup to improve readability. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 4132b1c591bd01c29df91b88afbd144647da9ed8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Oct 21 14:04:42 2010 +1000 + + xfree86: fix compiler warnings - unused variable i + + ../../../../hw/xfree86/common/xf86Config.c: In function 'configDRI': + ../../../../hw/xfree86/common/xf86Config.c:2213:9: warning: unused variable + 'i' + + Introduced in 788bfbf18ac19923604b0d676933fdc0d78526a1 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 6b982d73bb8878238ed46665b220a94a591e11a9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Oct 21 13:53:35 2010 +1000 + + xfree86: fix two compiler warnings - unused variable ati, atimisc + + ../../../../hw/xfree86/common/xf86Config.c: In function + 'fixup_video_driver_list': + ../../../../hw/xfree86/common/xf86Config.c:507:19: warning: unused variable + 'atimisc' + ../../../../hw/xfree86/common/xf86Config.c:507:12: warning: unused variable + 'ati' + + Introduced in 52577ae8eeda64601db8dd425027cf8e4271b873. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 0799f0771cca335d6400a8494ba236a0d10e122b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Nov 4 12:53:18 2010 +1000 + + xfree86: remove two unused variables from Makefile.am + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit a52efb096e166e325deb3d6b502671f339a4fa15 +Merge: fe8d122 f72aadd +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 3 06:50:45 2010 -0700 + + Merge remote branch 'sthibaul/master-iopl' + +commit 3dc3aefb88c167d365795dcd44017742c52e4967 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Nov 1 22:23:05 2010 -0400 + + fb: Delete a bunch more left-overs + + All of these definitions were unused since compositing moved to pixman. + + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 565b5e2b0261d1148cc2707ffcbb915414dd3e02 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Nov 1 22:14:29 2010 -0400 + + wfb: Delete unused renamings + + These functions haven't existed in a while. + + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 0dae479e16590e767df35985150c5acf696e5df2 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Nov 1 22:17:08 2010 -0400 + + fb: Delete fbCompositeGeneral() + + This function was an unused and trivial wrapper around fbComposite(). + + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 74bc2d8c6bafc5373ff9c14eed12e26b5b965953 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Nov 1 22:12:03 2010 -0400 + + render: Delete renderedge.[ch] + + The functions in these files have not been used since trap + rasterization was moved to pixman. They survived until now to preserve + the server abi. + + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit 6118346d64e3c2fbe1fe2f041ea773dd2a3c0438 +Author: Søren Sandmann Pedersen <ssp@redhat.com> +Date: Mon Nov 1 22:04:49 2010 -0400 + + Delete unused fbWalkCompositeRegion() + + This function has not been used since most of the compositing was + moved to pixman. The only reason it has survived until now is that it + was part of the server ABI. + + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Søren Sandmann <ssp@redhat.com> + +commit fe8d122b133a43125cc961d2c3c811fa776f29c8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Oct 28 16:13:09 2010 +1000 + + Xi: reshuffle conditions for labeling a device as IsXExtensionKeyboard (#29046) + + From the original bug reporter Ezra Reeves: + + "I did some more digging on this today, and I found that an HP branded + wireless USB mouse has the same issue. With this mouse (as well as the + logitech wireless mouse), the return from: + + xdev = XListInputDevices(GDK_WINDOW_XDISPLAY(rootwin), &ndevices_return); + + lists the USB device twice, but both have xdev[num].use == 3 + (IsXExtensionKeyboard as defined in X11/XI.h). + + [...] + + Swapping the order of the test in Xi/listdev.c that determines whether a + device is a pointer or a keyboard properly detects my devices (OEM USB + wireless mouse/kb combo) -- one as a keyboard and one as a pointer." + + X.Org Bug 29046 <http://bugs.freedesktop.org/show_bug.cgi?id=29046> + + Reported-by: Erik Kilfoil <ekilfoil@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a210068c5222acbdb04db17cb8cef314735bf977 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Oct 26 20:50:13 2010 +0300 + + dix: advance parent window pointer when no node is found + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 19f43836d1006d253391926e880b14ed2e7a0cf8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 25 15:10:19 2010 +1000 + + Re-export xf86CollectInputOptions. + + Some drivers, most notably the mouse driver need this and reimplementing on + the driver side doesn't make sense. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4613ce3f78a32f2a6f422e719150d55b035c758e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 15:17:50 2010 +1000 + + test: valuator_mode tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 58554f1c6429535e7ab432c920aabca71a77edb8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 15:10:32 2010 +1000 + + Convert some leftover axes->mode access to valuator_get_mode() + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 44e81654147065b7b907ce0d14fdc2e74a638f79 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Oct 25 01:30:33 2010 +0400 + + Remove now-misleading comment + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 433dddcf29d257310e95e4215dceef8b0b976e2d +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Oct 25 01:28:38 2010 +0400 + + Replace "if(buf) realloc(buf, size) else malloc(size)" with realloc() + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 04a04e162886ca9bc3977d3a7509def876487921 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Oct 25 01:27:46 2010 +0400 + + Remove now-misleading comment + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f72aadd38b730c46c0a027dacbbb57f03068383d +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sat Oct 23 22:42:33 2010 +0200 + + hurd: Fix use of deprecated iopl device + + Fix Xserver on GNU/Hurd into using the "mem" device instead of + the deprecated "iopl" device. + + Reviewed-by: Olaf Buddenhagen <antrik@users.sf.net> + Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> + +commit dd11f734a9a73bf34357c149d2809842938d57b5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 16:11:24 2010 +1000 + + input: remove "mode" field from ValuatorClassRec. + + We have per-axis mode now. For those bits that still need it (XI 1.x), + assume that the first axis holds the device's mode. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 5cf3b654fccf09de63a3f983c85096cda78fb693 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 15:49:40 2010 +1000 + + input: move proximity state into ProximityClassRec. + + Previously the OutOfProximity bit in the valuator mode. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit e909af88bf17dbadcc00d50c13a5bdb6001367be +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 14:22:44 2010 +1000 + + dmx: clarify a valuator mode condition. + + Relative is defined as 0, so change the condition to be more obvious. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit b5ef88c911f697530ddc2c7302fce15ba2ead4b2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 14:02:17 2010 +1000 + + dix: clip absolute axes depending on their mode. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit ea567b675f814ac41e75f1ed8ded0ac3e9d552a8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 14:01:11 2010 +1000 + + dix: populate motion history only if the mode matches the first axis. + + XI1 doesn't cater for mixed mode devices, so bail out on the first valuator + that has a different mode. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 4381b70f5aa293400735e9b4e5a792408afa25a2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 13:57:27 2010 +1000 + + input: add valuator_get_mode() helper. + + Returns the mode of the specified valuator. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 6f6f460c2485d16d126a1ab5d939083c322dc3dd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 22 13:48:06 2010 +1000 + + dix: send proximity events if one or more axes are Absolute. + + We only skip relative events for proximity, not absolute ones. Now with + mixed mode, just unset those axes that are relative. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 65c0fc81eb920085e650b8c9e874c9dd26c7ec98 +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Fri Jul 16 09:21:19 2010 -0400 + + Add support for per-axis valuator modes (Relative/Absolute) + + The XI2 protocol supports per-axis modes, but the server so far does + not. This change adds support in the server. + + A complication is the fact that XI1 does not support per-axis modes. + The solution provided here is to set a per-device mode that defines the + mode of at least the first two valuators (X and Y). Note that initializing + the first two axes to a different mode than the device mode will fail. + + For XI1 events, any axes following the first two that have the same mode + will be sent to clients, up to the first axis that has a different mode. + Thus, if a device has relative, then absolute, then relative mode axes, + only the first block of relative axes will be sent over XI1. + + Since the XI2 protocol supports per-axis modes, all axes are sent to the + client. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + +commit 290af0418f8c94355e42ad81aa7779b90e173fc9 +Author: Chase Douglas <chase.douglas@ubuntu.com> +Date: Thu Oct 21 22:41:09 2010 -0400 + + test: input - set valuators mask for event to core conversion + + Commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 adds a requirement to + event to core conversion that at least one of the X or Y valuators are + set in the valuator mask. This commit fixes the event conversion test to + be compliant. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8990b31214bcbc08090604147287455bfde91c11 +Author: Paulius Zaleckas <paulius.zaleckas@gmail.com> +Date: Mon Oct 18 00:02:01 2010 +0300 + + KDrive: Fix error handlig in tslib driver + + If ts_open() fails and return NULL, then next call to ts_fd() + segfaults because of NULL dereference. There is no need to + check output of ts_fd() as ts_open() did this internally. + + Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9696c782c8cb86b06d12949899582533a2e04cfe +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Oct 19 12:52:57 2010 +1000 + + test: valuator_mask tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 2362adc2da9745e01c79ed4905aa81926355c4e2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Oct 19 10:59:09 2010 +1000 + + dix: remove valuator_mask_copy_valuators, not needed anymore. + + With the switch to masks internally, this isn't needed anymore. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 2b04a3ef739a7ba5708400999e5d81418236a0a4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Oct 19 09:58:58 2010 +1000 + + xfree86: convert xf86Post{Motion|Key|Button|Proximity}Event to masks + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 0418a39e71e50b88e050b0d8a758265b17c4bf0e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 18 15:55:53 2010 +1000 + + dix: get rid of the now-superfluous valuator arrays in GPE and friends. + + The valuators are stored inside the mask, use it from there. are stored + inside the mask, use it from there. are stored inside the mask, use it from + there. are stored inside the mask, use it from there. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 675f4a8525d29ebad783351e17be785b2f32b2e8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Oct 19 13:37:46 2010 +1000 + + Abstract valuator masks through a set of APIs. + + This commit introduces an abstraction API for handling masked valuators. The + intent is that drivers just allocate a mask, set the data and pass the mask + to the server. The actual storage type of the mask is hidden from the + drivers. + + The new calls for drivers are: + valuator_mask_new() /* to allocate a valuator mask */ + valuator_mask_zero() /* to reset a mask to zero */ + valuator_mask_set() /* to set a valuator value */ + + The new interface to the server is + xf86PostMotionEventM() + xf86PostButtonEventM() + xf86PostKeyboardEventM() + xf86PostProximityEventM() + + all taking a mask instead of the valuator array. + + The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to + memory allocation restrictions in SIGIO handlers. + + For easier review, a lot of the code still uses separate valuator arrays. + This will be fixed in a later patch. + + This patch was initially written by Chase Douglas. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 1a0d9324b3d9fd93e685066e0e5cea0611878c0d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun Oct 17 09:58:50 2010 -0700 + + Revert "Set DamageSetReportAfterOp to true for the damage extension" (#30260) + + This commit breaks the Compiz "Wallpaper" plugin. + + This reverts commit 8d7b7a0d71e0b89321b3341b781bc8845386def6. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d738175eaf1098e29b8afb6de8e99b5098e366a7 +Merge: 8806a04 9872e0f +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 19 22:50:15 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit fc48a8f9f5f66e591b3e39211d44ce68267303f8 +Author: Chase Douglas <chase.douglas@canonical.com> +Date: Tue Oct 19 13:37:38 2010 +1000 + + Add CountBits() to the server. + + Function to count the number of bits set in the given array. + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit 9872e0f0115cd7d0543e55a1831facddf3aff90c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Oct 13 10:31:51 2010 +1000 + + xfree86: set mask for valuators 0/1 when emulating core events (#30267) + + EventToCore as of the commit below won't generate core motion events if the + valuator mask for x/y isn't set. For DGA, we work around this check by + forcibly setting the mask in the event we pass down. + + commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 + Author: Peter Hutterer <peter.hutterer@who-t.net> + Date: Tue Aug 17 12:08:52 2010 +1000 + + dix: don't create core motion events for non-x/y valuators. + + X.Org Bug 30267 <http://bugs.freedesktop.org/show_bug.cgi?id=30267> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Andrew Randrianasulu <randrik@mail.ru> + Tested-by: Andy Furniss + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 649293f6b634e6305b6737a841d6e9d0f0065d6c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 11 16:09:18 2010 +1000 + + xkb: always fill the symsPerKey array, regardless of client flags (#30527) + + Even if a client does not modify the symbols, symsPerKey and mapWidths must + be filled from the current configuration. Both arrays are then passed into + other functions (pending the right flag), thus they must contain valid + values regardless of the XkbKeySymsMask flag in req->present. + + X.Org Bug 30527 <http://bugs.freedesktop.org/show_bug.cgi?id=30527> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit ca21a266224b6eff4fd817c2082d2e144f1ea58c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 11 15:38:38 2010 +1000 + + xkb: init mapWidth and symsPerKey arrays to 0. + + Helps debugging greatly, random 8 or 16 bit values can sometimes look like + valid values, causing much excitement on the client front. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 8806a04f7f028dd9f6a7ff5c36e460d3895c7deb +Author: Michał Górny <mgorny@gentoo.org> +Date: Thu Oct 14 15:49:51 2010 +0200 + + kdrive: Fix linking with tslib, with -Wl, --as-needed. #30600 + + Change the library order in TSLIB_LIBS variable, placing ${TSLIB_LIBS} + after the local static libraries. This fixes linking with + -Wl,--as-needed. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30600 + Signed-off-by: Michał Górny <mgorny@gentoo.org> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c7e436e9987a6fb0876c63e96f59ff4c20b4bef0 +Author: Michał Górny <mgorny@gentoo.org> +Date: Thu Oct 14 15:49:50 2010 +0200 + + kdrive: Fix tslib check fallback to set TSLIB_LIBS. #30599 + + If pkg-config is unable to find tslib but the fallback check does find + it, the compilation continues with tslib support enabled though + TSLIB_LIBS are unset. Thus, the compilation fails with a linking error + on tslib functions. + + This patch sets TSLIB_LIBS to '-lts' whenever the tslib fallback check + succeeds. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30599 + Signed-off-by: Michał Górny <mgorny@gentoo.org> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 25801a2556ca9b42646023e5a95a3cbf7309e852 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Oct 14 22:38:17 2010 +0100 + + Cygwin/X: Move duplicate extern variable declarations from various .c files to a new header file + + For the global variables defined in winglobals.c, remove duplicate extern + declarations from the beginning of various .c files, and move most of them + into a new header file, winglobals.h + + Leave some clipboard related variables alone for the moment, they need treating + more carefully, to avoid mixing client and server type definitions. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 04d11abcf2ea2f36d899428e9c885b69e4f779ad +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Oct 14 22:45:31 2010 +0100 + + Cygwin/X: Remove g_hwndKeyboardFocus + + It's set but it's value is never used + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 5e896e425fe14022b0714301531bd54151c763f0 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Oct 14 22:43:51 2010 +0100 + + Cygwin/X: Make g_hmodCommonControls static + + Make g_hmodCommonControls static, it's only used in InitOutput.c + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 49b996faadf0fedcee25d4a8f96f4c4007c29f5f +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Oct 15 13:00:46 2010 +0100 + + Cygwin/X: Make g_hmodDirectDraw static + + Add winReleaseDDProcAddresses() for releasing the direct draw module + handle, so g_hmodDirectDraw can be made static + + Remove unneeded duplicate extern definitions of g_fpDirectDrawCreate + and g_fpDirectDrawCreateClipper, and move the definition from + winglobals.c to winengine.c + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 6f12277e37d16a7de9d3f3079688c43b07921b0a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Oct 14 22:44:53 2010 +0100 + + Cygwin/X: Make g_hhookKeyboardLL static + + Make g_hhookKeyboardLL static, it's only used in winkeyhook.c + + Also remove unused externs + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 9952b51f6822aeaa19c27caf85698741eb4c27d8 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Oct 15 13:01:45 2010 +0100 + + Cygwin/X: Fix typos in comments + + Fix a few typos in comments + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 1de5db73d31411798ae93619d9e626fa32e0c4bd +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Oct 14 22:46:09 2010 +0100 + + Cygwin/X: Drop several unneeded includes of winprefs.h + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 8e723108151136f115e8e6d4b97ed4e2fa685dbf +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Sep 29 14:18:27 2010 +0100 + + Xming: Remove uses of register keyword + + I'm pretty sure the compiler has a better idea how to optimize this + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d11761c6a6dd2a9963dfd3bcb313f1b2525387fc +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Feb 26 13:31:18 2010 +0000 + + Xming: Casts to remove warnings on event pointers + + winkeybd.c: In function ‘winSendKeyEvent’: + winkeybd.c:489: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type + winmouse.c: In function ‘winMouseButtonsSendEvent’: + winmouse.c:247: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type + winmouse.c: In function ‘winEnqueueMotion’: + winmouse.c:380: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 10bf8345cf15c6030147a9edb7f6a093c8db8099 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Mon Oct 12 13:50:00 2009 +0100 + + Xming: Warning fix in winDeviceCursorCleanup() + + return statement with an expression in a function whose return-type is void + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit cab837a60a7aa653ccea77ff714335186ce38a4b +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Jul 18 13:22:46 2010 +0100 + + Cygwin/X: Reformat the keyboard layout mapping table + + Also remove the out-of-date listing of keyboard layout IDs and which ones + have known mappings + + XXX: layout zh_TW doesn't exist anymore + + This patch brought to you by C-u M-x align-regexp + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit ee2867649d9485f6559f88a973eae6393971ff35 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Jul 18 13:20:01 2010 +0100 + + Cygwin/X: Clarify XKB options in XWin man page + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 1ba1b12d24d8f825babd8cf38710c7fa9a94821e +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Oct 15 13:46:09 2010 +0100 + + Xming: Warning fix in winApplyHints() + + winmultiwindowwm.c: In function ‘winApplyHints’: + winmultiwindowwm.c:1587: warning: ISO C90 forbids mixed declarations and code + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit fb64414548c437bf52c3dcd0613aab5079faffba +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Oct 15 14:19:57 2010 +0100 + + Xming: Fix warnings in ProcWindowsWMFrameSetTitle() + + winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’: + winwindowswm.c:516: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness + winwindowswm.c:516: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness + winwindowswm.c:528: warning: pointer targets in passing argument 2 of ‘SetWindowTextA’ differ in signedness + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit da5955cc023ae980fdc0397f6fd541e788040c29 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Oct 15 14:18:53 2010 +0100 + + Xming: Fix warnings in windialogs.c + + windialogs.c: In function ‘winDisplayExitDialog’: + windialogs.c:327: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast + windialogs.c: In function ‘winDisplayAboutDialog’: + windialogs.c:597: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast + windialogs.c: In function ‘winAboutDlgProc’: + windialogs.c:697: warning: comparison between pointer and integer + windialogs.c:701: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘HINSTANCE’ + windialogs.c:716: warning: assignment makes integer from pointer without a cast + windialogs.c:736: warning: assignment makes integer from pointer without a cast + windialogs.c:756: warning: assignment makes integer from pointer without a cast + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 6d9fb07db210bcfdcdde632fa341c4ee08d44b35 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Oct 15 14:16:54 2010 +0100 + + Xming: Fix warnings in winNameCompare(), winNormalizeName() + + winconfig.c: In function ‘winNameCompare’: + winconfig.c:715: warning: array subscript has type ‘char’ + winconfig.c:715: warning: array subscript has type ‘char’ + winconfig.c:716: warning: array subscript has type ‘char’ + winconfig.c:716: warning: array subscript has type ‘char’ + winconfig.c:730: warning: array subscript has type ‘char’ + winconfig.c:730: warning: array subscript has type ‘char’ + winconfig.c:731: warning: array subscript has type ‘char’ + winconfig.c:731: warning: array subscript has type ‘char’ + winconfig.c: In function ‘winNormalizeName’: + winconfig.c:1092: warning: array subscript has type ‘char’ + winconfig.c:1093: warning: array subscript has type ‘char’ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 20510e51001d1659000c8d8607c0de16022d1c74 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Oct 15 14:15:51 2010 +0100 + + Xming: Fix warnings in winClipboardFlushXEvents() + + winclipboardxevents.c: In function ‘winClipboardFlushXEvents’: + winclipboardxevents.c:225: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’ + winclipboardxevents.c:266: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’ + winclipboardxevents.c:619: warning: pointer targets in passing argument 1 of ‘strcat’ differ in signedness + winclipboardxevents.c:659: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness + winclipboardxevents.c:669: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness + winclipboardxevents.c:690: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness + winclipboardxevents.c:698: warning: pointer targets in passing argument 1 of ‘strdup’ differ in signedness + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 44c8b449d281c4d984d65f66bac96a65806b2efa +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Oct 15 14:13:57 2010 +0100 + + Xming: Fix warning in winClipboardErrorHandler() + + winclipboardthread.c: In function ‘winClipboardErrorHandler’: + winclipboardthread.c:444: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 1f2a57d9e46424a2e0861f55253b91d930d79083 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Oct 15 14:12:22 2010 +0100 + + Cygwin/X: Turn off the bad-function-cast warning for XWin code + + Turn off the bad-function-cast warning for the XWin code, it's near impossible + to write code which uses Win32 API calls that doesn't trigger this warning + + For example, SendMessage(WM_SETICON) returns an LRESULT, but we are supposed to + know this is safe to cast this result to a HICON, which gcc considers a non-matching + type. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 55e528b6cc6451dbb1e65baec199d4df0441e86d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Mar 25 23:39:37 2010 +0000 + + Cygwin/X: Remove execute permission from source files + + Remove execute permission from source files + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit b2b685e2693ff5f089006f5b3882d6b0c0853862 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Mar 25 23:00:48 2010 +0000 + + Cygwin/X: unifdef XFree86Server + + Remove XFree86Server define, which was always on anyhow, and the + code which was guarded by !XFree86Server + + This completes the process of removal started in 2006 :-) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 9ed70f15eff6a85222b46db1fe7af25154314464 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Nov 2 17:37:14 2009 +0000 + + Cygwin/X: Use normal apostrophe in XWin DDX help text + + Use U+0027 APOSTROPHE in XWin DDX help text, rather than + U+2019 RIGHT SINGLE QUOTATION MARK + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 9f8f056a21b9480fd9fd43a22c9d6f45a2c1ef87 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Mar 23 16:34:26 2010 +0000 + + Cygwin/X: Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft + + Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 5aff712a8d2eb9f965ecbb93216cc0bcdc327ae6 +Merge: 5b98c62 e354cca +Author: Keith Packard <keithp@keithp.com> +Date: Mon Oct 18 17:16:23 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 5b98c6267f575ec4ff498ecb651e34dbff030b83 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 18 16:01:40 2010 -0400 + + randr: Remove mirandr + + This isn't used anywhere, not least because it's completely + nonfunctional. + + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 7bb653bedceb6180a0361ead1c612839e776ce98 +Author: Olivier Fourdan <ofourdan@redhat.com> +Date: Mon Oct 18 15:59:35 2010 -0400 + + modes: improve aspect ratio match for classic drivers + + After we infer the aspect ratio for the screen, we pick the largest + mode matching that aspect ratio from the best mode pool available. + We then clamp virtual size to that mode, and run the resulting mode + list through the driver's ValidMode hook. In doing so we might filter + away our initial guess. If this happens we shrink the default mode + to the next largest mode from _any_ mode pool. This is usually wrong, + and we should instead pick the next aspect-matched mode from the best + available mode pool (as always, user then driver then default). + + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit d6d90a4fccef086e7c7934adea901b2cd9a595bf +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 18 15:53:43 2010 -0400 + + composite: Move the backfill comment to a more appropriate indent level + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit db8840600e8e21356241eb87395031388d9b54d2 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 18 15:52:52 2010 -0400 + + composite: Don't backfill non-MapWindow allocations + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 18 15:50:37 2010 -0400 + + composite: Don't backfill non-bg-None windows + + If there's a defined background then backfilling is a waste of effort, + since exposure processing will paint that in for us. But note that we + have to backfill if any children are bg=None to preserve semantics with + non-composited servers. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit d2064fbb687839c297a851a5d85f32dfbbe4a0d5 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 18 15:42:54 2010 -0400 + + ddc: Don't probe for DDC/CI or EEPROM + + For whatever reason, some (broken) monitors will crash if you do this. + We're not actually using this information for anything, so let's just + not do it. + + Originally reported as http://bugzilla.redhat.com/620333 + + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 47c91dca8d8eecb429123e8370302831bcd57938 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 18 15:40:28 2010 -0400 + + xfree86: Drop linux libc5 support from the SIGIO code + + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 788bfbf18ac19923604b0d676933fdc0d78526a1 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 14 15:10:43 2010 -0400 + + dri1: Remove "buffers" from the config logic + + This was only ever used from the glint driver, which has since lost its + DRI support. + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit a77458486a7b9d78dcd284e2bcc96c1fda0e862a +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 14 14:00:53 2010 -0400 + + xfree86: Remove %M expansion from config parser + + This was to distinguish XFree86 3.x files from XFree86 4.x files. It + never really made sense to be looking for xorg.conf-4. + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit f8ec71603c796f3b272a0592cbb934c2a6e8d633 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 14 13:45:31 2010 -0400 + + xfree86: Remove an open-coded strtoul() + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 52577ae8eeda64601db8dd425027cf8e4271b873 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 14 13:22:00 2010 -0400 + + config: Remove atimisc workaround + + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 8bb1983a5f2dbf72366de9fb793a46e35912ab61 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 2 15:22:18 2010 -0400 + + config: Don't look for .o drivers anymore + + This hasn't worked since we switched to dlloader. + + Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit e354ccac36a8ee3a23bdc845833c16a5646cc200 +Author: Joe Shaw <joeshaw@litl.com> +Date: Thu Oct 14 15:09:20 2010 -0400 + + fix a sign problem with valuator data. + + Without this patch, any negative valuator value is wrong when returned + from XQueryDeviceState(). This is a regression from at least xserver + 1.4. + + Valuator data is set in dix/getevents.c:set_valuators() by copying + signed int values into an unsigned int field + DeviceEvent.valuators.data. + + That data is converted into a double with an implicit cast by + assignment to axisVal[i] in Xi/exevents.c:UpdateDeviceState(). + + That double is converted back to a signed int in + queryst.c:ProcXQueryDeviceState(). If the original value in + set_valuators() is negative, the double value will be > 2^31 and the + conversion back to a signed int is undefined. (Although I + consistently see the value -2^31.) + + Fix this by changing the definition of DeviceEvent.valuators.data from + uint32_t to int32_t. + + Signed-off-by: Joe Shaw <joeshaw@litl.com> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 424b856e8e19f35c24bfc0a9fced9464d2f17c90 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 15 14:35:22 2010 +1000 + + dix: update comments for GetPointerEvents and friends + + All these now generate InternalEvents, point this out. Remove XKB/XI + references, that's just confusing. This comment referred to the old-style + event generation code from server 1.4 to including 1.6 but is now just + confusing to newcomers. + + Remove comment about SwitchCoreKeyboard() for the same reason. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Chase Douglas <chase.douglas@canonical.com> + +commit e2ada55de3e7ec8724b98c4e4adfec741d415499 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Sep 27 13:58:40 2010 -0400 + + os: Clean up various xtrans bits that we've never supported + + Or at least, not supported since xserver 1.0. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit eaf0b6a4d83d49930d21d5191f335fcac962632e +Merge: 693e92d 23229c7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 15 13:46:59 2010 +1000 + + Merge branch 'master' into input-api + + Conflicts: + config/udev.c + hw/xfree86/common/xf86Helper.c + hw/xfree86/common/xf86Module.h + hw/xfree86/common/xf86Xinput.h + hw/xfree86/os-support/linux/lnx_init.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3c28a29e132d6f73c36d4b64818d112b1c6e9a40 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Oct 13 15:53:59 2010 +1000 + + xfree86: rename parameter names to xf86ScaleAxis. + + Maybe it's just me but every time I look at it I get confused again and need + to work it out from scratch. Rename the parameters to something + self-explanatory, to/from and min/max. + + No functional change. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 23229c7ce5970516b97a1cc12e65257ff65ab9a7 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Oct 13 16:28:14 2010 -0700 + + test: Fix make distcheck when not building unit tests + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ff82f724e4ed24d73f15fa9c35a1d0c2c7d8cef7 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Oct 13 10:20:06 2010 -0700 + + Comparison between pointer and integer in latest dix/dispatch.c + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit da4eebe58ec81e2297cc1773af1fb622fb392bbd +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Oct 13 17:34:31 2010 +0100 + + event_size is currently never assigned to in mieqProcessInputEvents(). + + event_size is never assigned to in mieqProcessInputEvents(), so realloc() + is always called. This is benign, but I'm guessing not intended. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6274dca9d984ad3c553b4901edc3151e770e6c40 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 11 16:37:16 2010 -0400 + + dix: optimize CallCallbacks + + Move the basic sanity checking to an inline wrapper, which avoids the + function call overhead if the callback list is empty. On an XACEful + server on a 2.4GHz Core 2 Duo: + + 1 2 Operation + -------- ----------------- ----------------- + 20000000.0 25100000.0 ( 1.25) X protocol NoOperation + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e418cd332c1f458d028df3fdf684011109d0c183 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 11 10:49:57 2010 -0400 + + xwin: Remove some undue paranoia about UNDRAWABLE_WINDOW + + mi will throw away rendering to input-only windows. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit febf3e7ead8dbb355622c896ff1744b2ca52a49a +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 11 10:49:56 2010 -0400 + + dix: Remove the memory of the multibuffer extension + + Drop DRAWABLE_BUFFER and related checks, mbuf was the only thing that + used them and it was killed in 0ba82562. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1333e101b4f6ecca72568b7f462884f8b102a5c2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Oct 7 18:17:02 2010 -0700 + + Remove leftover fbSaveAreas & fbRestoreAreas defines from wfbrename.h + + The fb functions they try to rename were deleted in 2007 by + commit ae7f71a8b3d6756161e55d998d6eec37d2695c98 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8efa3623f32939ef525926b57fd533f4c01ec4b3 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Aug 4 13:48:33 2010 -0700 + + Use GetCurrentRootWindow or equivalent instead of spriteTrace[0]. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 32de0c19075b886c2fc03f6ad73d9c15df1b2309 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Aug 4 11:44:05 2010 -0700 + + Move replay-window check from ComputeFreezes to CheckDeviceGrabs. + + This just simplifies ComputeFreezes, eliminating some duplicated code + and a goto. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1c1811ecafc144151630b3588394e2c345c53aa4 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Aug 3 19:49:59 2010 -0700 + + CheckDeviceGrabs: Delete redundant pWin->optional test. + + CheckPassiveGrabsOnWindow returns FALSE if pWin->optional is NULL, + because wPassiveGrabs uses wUseDefault, so don't bother checking at the + caller. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c360b3eb1deeac51913e7b1286b2767711c541fc +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Aug 3 19:40:26 2010 -0700 + + Let CheckPassiveGrabsOnWindow callers check if device is already grabbed. + + CheckDeviceGrabs checked all the ancestors of the window containing this + device's pointer even if no new grabs could possibly apply due to the + device already being grabbed. + + ActivateFocusInGrab and ActivateEnterGrab already checked whether they + should break an existing grab, and then set up an event that was + completely ignored if they didn't actually break the grab. + + In both cases, just do what we would have done eventually anyway--return + FALSE from CheckPassiveGrabsOnWindow's caller--but do it sooner. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 853d7ebfa3e2d281d92890a39010ff5787a00ffd +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 5 11:24:28 2010 -0400 + + vbe: Fix copying the mode info block + + Just use memcpy, seriously. + + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b2f9ce201cc2a14d5d6ad055b46c9317b040ec2e +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jul 27 17:34:36 2010 -0400 + + edid: Fix the HDTV sync pulse adjustment + + Simple typo, should have been adjusting the horizontal timings + consistently since we're not trying to mangle vertical at all. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Patrick E. Kane <pekane52@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9a893fe52f1bfd415e9ffd9d2f5aff5c4da7a756 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun Oct 3 16:56:03 2010 +0100 + + xfree86: Do not call dlclose(NULL) [regression after ab7f057] + + During unwind following an error when attempting to a load a module, we + attempt to call dlclose on a potentially NULL handle. This is a + side-effect of removing the abstraction layer in ab7f057. + + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Cc: Adam Jackson <ajax@redhat.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 533faf7f43cb4b5155a74d78d6144b702e227efa +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 1 10:57:48 2010 -0700 + + Bump version to 1.9.99.1 (1.10 development series) + + Make the 1.10 development series distinguishable from the 1.9 branch. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a769f4c22a9cfb5ba248c924a66c31ec966bd8a0 +Author: Adrian Bunk <bunk@stusta.de> +Date: Thu Sep 30 13:18:20 2010 +0300 + + remove dolt + + With libtool 2.2.10 the difference in build time is so small + (< 5% with -j8 builds) that it isn't worth having this hack. + + Signed-off-by: Adrian Bunk <bunk@stusta.de> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c7e4222c9a27094ce4fc2831ac92acbb7b21fb1a +Author: Tobias Droste <tdroste@gmx.de> +Date: Wed Sep 29 22:51:48 2010 +0200 + + randr: set error numbers of resource types in RRExtenstionInit() (V2) + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30367 + + Currently the ddx calls xf86RandR12Init() + (-> RRScreenInit() + -> RRInit() + -> RRModeInit() + -> RRCrtcInit() + -> RROutputInit()) + before RRExtensionInit() is called. This causes RRErrorBase + being 0 while setting resource type error values (resource types: + RROutput, RRMode and RRCrtc). The fix moves the setting of error + values to own functions which are called in RRExtensionInit() + to get the right RRErrorBase. + + V2: With header file + + Signed-off-by: Tobias Droste <tdroste@gmx.de> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 72a9c686d7ecaa68d27687b316dbba92902809b4 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Sep 29 17:05:12 2010 +0100 + + Cygwin/X: Fix compilation after "delete pervasively use of DISPATCH_PROC" + + commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e + removes the static declarations of ProcWindowsWMDispatch and + SProcWindowsWMDispatch which precede their first use in + winWindowsWMExtensionInit() + + Move winWindowsWMExtensionInit() to after the definition of those + two functions to fix compilation. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1a9022d3289ff74043112808cc8aa315fd9c40e8 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Sep 28 13:59:19 2010 -0700 + + Bump video driver ABI version to 9.0 + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c45bea0c044ad37bedb42209f7e6ea8b587999f0 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Aug 3 12:51:51 2010 -0700 + + XQuartz: RandR: Refactor legacy mode-switching to be better integrated with RandR + + Adds three new functions + void QuartzRandRSetFakeRootless (void); + void QuartzRandRSetFakeFullscreen (void); + void QuartzRandRToggleFullscreen (void); + + The first two are identical to requesting the fake modes from a RandR client + The third responds to cmd-alt-a to leave fullscreen or RandR. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 229323a19b06f80d9b03f487e598b933b9b31d87 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Jul 26 23:34:49 2010 -0700 + + XQuartz: RandR: Don't change the rootless preference when changing RandR mode + + Also renames a bunch of other variables for better consistency. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 721edc69c3597578d3e7f711769ff0195af6068a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Jul 26 11:45:59 2010 -0700 + + XQuartz: RandR: Better handle switching betwen RandR modes that share CG modes + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 026a47e21226b64eb9a7624ada3d74c3fe5fa763 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Jul 26 01:17:12 2010 -0700 + + XQuartz: RandR: Respond better to resolution changes made outside X + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 59cd93f48a3a0a34781d4a94a3cd05a575e2d4ba +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Jul 25 22:25:49 2010 -0700 + + XQuartz: RandR: Use deprecated CG APIs only on Leopard and earlier + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 629c3f473b7415069a87ef4717ec3d701978dc48 +Author: Jan Hauffa <hauffa@in.tum.de> +Date: Fri Jul 16 17:56:44 2010 +0200 + + XQuartz: RandR: Remove FAKE_RANDR code. + + Signed-off-by: Jan Hauffa <hauffa@in.tum.de> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 97b5f5306437bfd13390485fc7a58a363c261ec9 +Author: Jan Hauffa <hauffa@in.tum.de> +Date: Fri Jul 16 17:54:55 2010 +0200 + + XQuartz: RandR: Toggle rootless mode on XRandR mode switch. + + Report a fake screen mode that corresponds to the screen mode at startup of the + server excluding the height of the menu bar. If a client requests this mode, + rootless mode is enabled. In all other modes, the root window is shown. + + Signed-off-by: Jan Hauffa <hauffa@in.tum.de> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2d411472c2915614bdeb8fdc15d19dae4621444d +Author: Jan Hauffa <hauffa@in.tum.de> +Date: Fri Jul 16 17:18:03 2010 +0200 + + XQuartz: RandR: Implement basic RandR functionality. + + Querying and changing of resolution and refresh rate is supported, + rotation is not implemented yet. + + Signed-off-by: Jan Hauffa <hauffa@in.tum.de> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f4926709485c0605f0b1171c84c803b68eebfc38 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Sep 28 09:48:41 2010 -0700 + + XQuartz: Move use of static dispatch procs after declaration + + This fixes fallout from cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c36ca7b1862ecd86df089f4e1933379a113928ea +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Sep 25 10:05:10 2010 -0400 + + config: remove --with-dri-driver-path option, use dri.pc #29740 + + The trusted location of the dri driver directory can be obtained + from the mesa dri.pc pkg-config file. + + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Acked-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5532687a929426c4b1c4667f4591ed362f097c9b +Merge: 9df4fb0 682a3ee +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 28 08:15:07 2010 -0700 + + Merge remote branch 'ajax/less-loader' + +commit 9df4fb0adf66fb82f0c007897d79af0f54a6dad9 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Sep 27 17:06:46 2010 -0400 + + xfree86: Add 18bpp support + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5c6a2f93ebc16a78093782b442306de23ae94e78 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon Sep 27 19:39:23 2010 +0100 + + xfree86: Kill pixmapPrivate with a vengeance (v2) + + ScrnInfo->pixmapPrivate only existed in order to catch invalid access to + the framebuffer by making the backing data NULL across the VT switch. + This was causing more confusion in the higher layers during mode setting + without any real benefit, so remove it. + + v2: Kill ShadowModifyPixmapHeader() as well. + + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Cc: Julien Cristau <jcristau@debian.org> + Cc: Andrew Guertin <lists@dolphinling.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fdabcec57ae0fdc9910060609bb0848552c1db4d +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon Sep 27 17:30:13 2010 +0100 + + modes: Beware the driver switching root pixmaps + + Program received signal SIGSEGV, Segmentation fault. + 0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800, + height=600, mmWidth=210, mmHeight=157) + at ../../../../hw/xfree86/modes/xf86RandR12.c:731 + 731 ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory. + in ../../../../hw/xfree86/modes/xf86RandR12.c + (gdb) bt full + height=600, mmWidth=210, mmHeight=157) + at ../../../../hw/xfree86/modes/xf86RandR12.c:731 + randrp = 0x8dcae68 + pScrn = 0x8dbeb28 + config = <value optimized out> + pRoot = 0x8e08e30 + pScrnPix = 0xb6d12008 + ret = 1 + c = <value optimized out> + mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185 + No locals. + at ../../randr/rrscreen.c:307 + pWin = 0x8e08e30 + pScreen = 0x8dca3a0 + i = <value optimized out> + rc = 0 + ../../randr/randr.c:485 + + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Cc: Julien Cristau <jcristau@debian.org> + Tested-by: Julien Cristau <jcristau@debian.org> + Cc: Keith Packard <keithp@keithp.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2f0abd7d690c3bcce2a80c093a0880f43e56d8cb +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Thu Sep 23 09:04:11 2010 -0400 + + glx: Fix use after free in DrawableGone + + (note that nearly identical patches were proposed by Kristian and Chris) + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Reported-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Tested-by: Chris Wilson <chris@chris-wilson.co.uk> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e416965bfd08dfae5d2b7932b5118efac20546ad +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun Jul 18 18:56:02 2010 +0300 + + dix: remove proc tables initialization + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jul 16 20:19:50 2010 +0300 + + xserver: delete pervasively use of DISPATCH_PROC + + Some functions had to be moved around due some missing static definitions. + Another minor clean up like inexistent function declarations and etc were made + also. + + Part of this patch was cooked using: + sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files` + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 58bd317e29f4abf7f950891339d2a6a78ddf7903 +Author: Macpaul Lin <macpaul@andestech.com> +Date: Tue Sep 21 15:13:34 2010 +0800 + + xfree86: nds32: add nds32 support for compiler related mmio codes + + Add nds32 support for compiler related mmio codes. + It includes byte-swap or non-swap operations. + + Signed-off-by: Macpaul Lin <macpaul@andestech.com> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 28e6de66b42062a885ba38416387f2dbc15707fd +Author: Macpaul Lin <macpaul@andestech.com> +Date: Tue Sep 21 15:13:33 2010 +0800 + + xfree86: nds32: add nds32 support for compiler specific codes + + Add nds32 definitions and related assembly codes to compiler header files. + + Signed-off-by: Macpaul Lin <macpaul@andestech.com> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2b24b2bd859a4b4b8ccaf3b7d1b529dcda2d3b94 +Author: Macpaul Lin <macpaul@andestech.com> +Date: Tue Sep 21 15:13:32 2010 +0800 + + xfree86: nds32: add nds32 definition for vgaHW support. + + Add __nds32__ definitions for vgaHW support. + + Signed-off-by: Macpaul Lin <macpaul@andestech.com> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 22376aa7aa44464636b12ee1d61b94e52ca02b0f +Author: Macpaul Lin <macpaul@andestech.com> +Date: Tue Sep 21 15:13:31 2010 +0800 + + xfree86: nds32: add nds32 definition for support linux video related io. + + Add __nds32__ definitions for supporing correct io method for lnx_video.c + + Signed-off-by: Macpaul Lin <macpaul@andestech.com> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d52799f67f590b0f91b521cd2bdf5a5a8a229c96 +Author: Macpaul Lin <macpaul@andestech.com> +Date: Tue Sep 21 15:13:30 2010 +0800 + + xfree86: nds32: add nds32 related definitions into include headers. + + Add MSB/LSB related definitions into include/servermd.h + + Signed-off-by: Macpaul Lin <macpaul@andestech.com> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 98197d931b266674557b52b4a7099c6470114e55 +Merge: 01ad372 402942c +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 23 15:30:37 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 682a3ee60867da027fe1bcda0c8587dd3db9d58e +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Sep 18 07:27:13 2010 -0400 + + xfree86: Remove useless module setup functions where appropriate + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 6130170e7e9b64c611ee942ec3455dd1a185193d +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Sep 18 06:41:35 2010 -0400 + + xfree86: Remove unused refcounting from input drivers + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ab7f057ce9df4e905b12cebc1e587b9a7f200418 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 17 11:19:17 2010 -0400 + + loader: Remove a silly layer of reference counting + + libdl will refcount objects for us just fine, thanks. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 0438002cd238011f33dbf176c555de5e380ba77e +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 17 09:13:04 2010 -0400 + + loader: include cleanup + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 2f003fe49697f8343c052dff2b3752eace814ea7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 17 09:02:13 2010 -0400 + + loader: Remove the handle field from LoaderOpen + + This was always 0 from all the callers. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 09929da50503b559459f5b722c11647c47857fdb +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 17 08:16:51 2010 -0400 + + loader: Remove unused canonical name field + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 3a26e7f459764d4aee71b2d7e25b113b729b94ac +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 17 07:55:48 2010 -0400 + + loader: Remove unused module serial number + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 2a24a013bf3f554bb03c0f5af155d23dbb27b599 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 17 07:32:17 2010 -0400 + + loader: Merge dlloader directly into the loader + + This lets us drop some double-tracking of loaded modules too. If your + OS is too lame to have libdl, fix that first. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 693e92d4049ee76d074737480f3fc1bb236f4278 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 10 09:54:33 2010 +1000 + + xfree86: add xf86OptionListDuplicate() + + Does what it says on the box. + + Some drivers need to duplicate option lists from the original device to + ensure that devices created by the driver (driver-internal hotplugging) have + the same list of options as the original device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 402942cdbc518395a2943fd226b9f3071f24d39f +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri Sep 17 02:11:44 2010 +0200 + + Introduce per-object per-screen privates. + + This replaces dixCreatePrivateKey and the only uses, which were in + midispcur. + + Commit by Jamey Sharp and Josh Triplett. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Josh Triplett <josh@joshtriplett.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit e4d4d6ddd52801cf0b0b253d9ba3bdabfa9a9d8d +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri Sep 17 02:18:10 2010 +0200 + + Xserver need not be compatible with old versions of xserver. + + Delete time-traveling multiple personality disorder from the server. + + Gaetan notes: + + There were a couple of drivers containing an unknown version of the + modes/parser code. This was done in server 1.2 time frame because it + was released without mode code. It was barely or not maintained + afterwards. There are currently no video drivers with a copy of the + modes code. + + Most of these ifdefs were introduced in commit + a8d760f567b19268329c4682495caa591f08a854, where Aaron wrote, + + This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer + than 1.2" since XORG_VERSION current went backwards at some point. + + Alan explains that: + + In Xorg 1.3, when we first released an Xorg server release decoupled + from the katamari release schedule. (1.0 through 1.2 were released + as part of X11R7.0 through 7.2, while 1.3 came out between X11R7.2 & + 7.3.) + + Commit by Jamey Sharp and Josh Triplett. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Josh Triplett <josh@joshtriplett.org> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 01ad3725a8d0a8958720b81d19598a08c072ccee +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jun 1 20:37:54 2010 +0300 + + xfree86: delete useless "Primary device is not PCI" message + + The primary device being PCI or not has no effect on the server working. This + message is superfluous. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 7360235ecca25af29bb2d99a8e46d5b259ad1b1e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon May 31 18:20:57 2010 +0300 + + xfree86: bus: assign PCI_SOURCES with the actual source files + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 18b2d2e8bd056266410226d779752e7933847b6b +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon May 31 18:09:50 2010 +0300 + + xfree86: bus: move macros from common PCI header to private file + + Only int10/helper_exec.c is using them. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 17a23f9ba8fa95f3e15afba7de22a12fe60bacfb +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Sep 10 19:18:42 2010 +0300 + + xfree86: dri: remove unused PCI macro + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit fc3ab84de7b5692f0db2b282ab0ed8e5a61d1fce +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Sep 10 19:16:30 2010 +0300 + + xfree86: configure: move buses references to their own location + + This patch makes xf86Configure.c free of PCI and SBUS code, moving to a more + meaningful location. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + +commit 49b817501f97d55480063c0b62544b3af75b4b7c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jun 1 16:16:53 2010 +0300 + + xfree86: bus: remove xfree86 and few other references from OS files + + Conceptually, os-support should have only a basic set of OS helpers which + wouldn't mix with any DDX common structure (e.g. windowing structures, etc) + + This patch removes some xfree86-only and a few other unused references from + os-support/bus. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit d9c682a5e250677883c4d375ca84cf184ee19d77 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 30 21:35:23 2010 +0300 + + xfree86: bus: remove useless automake variable + + Leftover that was missed in f7abe05b. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit a7efeda8a56a540542e056a426e89cfc053a4162 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 30 19:12:31 2010 +0300 + + xfree86: use xf86PciIsolateDevice to get PCI config information + + Make xf86IsolateDevice private on PCI common file. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit c768cdda92696b636c10bb2df64167d5274b4b99 +Merge: 5a72538 2079853 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Sep 13 16:48:33 2010 -0700 + + Merge remote branch 'jamey/reviewed' + +commit 20798536326f94ac9c97b4ec7a51329f7c912991 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Jul 14 13:14:28 2010 -0700 + + rootless: Delete dead remnants of rootless acceleration. + + Jeremy deleted rootlessAccelInit's implementation in 2008 in commit + 587c010a1cd733fded4d49dc339df0634bda8be6. Delete its prototype and the + remaining commented-out call to it. + + It still makes sense for the rootless GC ops to relax the planemask, but + that's independent of the size of the operation, so quit checking the + thresholds there. + + FillBytes and CompositePixels are not called anywhere, so delete + everything related to both. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Jeremy Huddleston <jeremyhu@apple.com> + Cc: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 58d1ec0fe84412c66f1ea1de15e3901c0b120164 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Jul 14 11:30:17 2010 -0700 + + rootless: ROOTLESS_GLOBAL_COORDS is always set, so unifdef it. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Jeremy Huddleston <jeremyhu@apple.com> + Cc: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 35ce892a705f9377a36f19414e5a25dcbe44a354 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Jul 14 11:19:41 2010 -0700 + + rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Jeremy Huddleston <jeremyhu@apple.com> + Cc: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ccdf15689050a0f988721c91fab75861ec4d339c +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon May 31 16:01:18 2010 -0700 + + miPolyGlyphBlt: Delete redundant ValidateGC. + + The caller is required to have validated the GC for the drawable before + calling any ops, including PolyGlyphBlt. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 3fd963de27f3c4452c320e617ad33b91b0967737 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed May 19 14:16:20 2010 -0700 + + Un-export CreateScratchGC now that nothing external uses it. + + The server and drivers sometimes use GetScratchGC, but never + CreateScratchGC. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 0f48e362c5baee2bc281a4b88cfb68de24172d15 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed May 19 14:03:19 2010 -0700 + + glxdriswrast: Use CreateGC, not CreateScratchGC. + + Since this code was using CreateScratchGC and not GetScratchGC, + FreeScratchGC would always call FreeGC, so just call it directly. + + As long as the drawable provided to CreateGC has the same screen and + depth as were passed to CreateScratchGC, these functions are basically + identical. There are two differences: + + - CreateGC gives you a non-null stipple. You probably don't care. + + - CreateGC passes the gcid and client to XACE. There are several + internal GCs allocated in the server, and they all pass 0 and + serverClient. I expect XACE will never reject that combination. + + The callers of createDrawable all verify that pDraw has the same screen + that driScreen does. In short, this should have no behavioral change. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit af2a94e12fe4e426dfca461a0d14526193c01cef +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue Jul 13 13:33:59 2010 -0700 + + VGA arbiter: No need for arbitration around CreateGC. + + None of XAA, EXA, or UXA do any hardware access during CreateGC, so they + don't need VGA arbitration. I haven't found any open source drivers that + hook CreateGC, so they're safe. I'd be surprised if any driver directly + hooks CreateGC and does hardware access from it and needs VGA + arbitration. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 7a63b2db636f01694cb54726bbb04287718e286a +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun Jul 11 20:36:34 2010 -0700 + + Delete Colormap->devPriv. It isn't used any more. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 2e8069dd36c2f5caf868937405fc03328004a85d +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun Jul 11 20:35:43 2010 -0700 + + xnest: Replace use of Colormap->devPriv with standard devPrivates. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 34d6492436c0f4a81822769b24d8c7816d0226ad +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Jul 10 06:55:58 2010 -0700 + + xquartz: Delete compile-time-constant DRIGCRec.driOps field. + + The driOps field of this structure is never set to anything but + &driGCOps, and this structure is not visible outside this source file. + Just use the constant in the one place the field was used. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2051e0f371de892b2e598b30c18dae96b58d68de +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Jul 8 02:38:13 2010 -0700 + + dixfonts: Deobfuscate GC ops calls. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit bbbf795e6b1ac048ea17164ba1089055cfe4306d +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun May 23 17:15:43 2010 -0700 + + Delete redundant GC initializations. + + When a GC is allocated, it is zeroed, including all storage requested + with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize + anything to zero. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 3288232f3d2a0239944bd856101c2d16c713ef40 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun Jun 13 18:10:38 2010 -0700 + + Delete xaaWrapper. + + This was part of "An experimental pseudocolor emulation layer. Not fully + completed, currently only works for 16bpp." Only neomagic tried to use + it, and that was neutered by the removal of the fbpseudocolor portion of + that emulation layer; the rest is easily removed. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit f856dcdc3a7b635dd94d3dac387ddec952e4880b +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Jun 12 08:42:31 2010 -0700 + + Delete unused lastWinOrg field from GCs. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit b2184024361717358e35a56b084c4a71cbc29234 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Jun 12 16:20:00 2010 -0700 + + Delete unused devPrivate field from GCFuncs and GCOps. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 139aa6e74227f0fe52cd8dccf1d563664103aaba +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun Jun 13 18:57:08 2010 -0700 + + damage: Delete NOTUSED block--it was never not NOTUSED. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 5ff9e58bef668c1279c5e253795711a1e118aaa1 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Jun 12 08:51:04 2010 -0700 + + fb: Delete unused oneRect private field. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit e99bbfa0a24ec038b88e81881133a676bf63580e +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 13:50:11 2010 -0700 + + dmx: Delete '#undef Xmalloc' and friends. + + Nothing in dmx uses these names any more, and it builds cleanly without + trying to undef them. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit b5217bfdca67ef2c5323838afcfcd89eba8899d5 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 13:28:32 2010 -0700 + + dmx: __glXMalloc -> malloc, etc. + + Kristian made equivalent edits to the reference GLX implementation in + 2006, with commit 2d2d38d17cc2558f8a41166a4a1578bc4c663c37. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit a715de7f11afeda7798f0882148a94d4db2291e6 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 13:10:05 2010 -0700 + + dmx: Delete unused GLX visual matching code. + + Kristian deleted this API from the rest of the server in 2007, in commit + 7d74690536b64f7b8e8036507ab7790807349c50. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit 5a725385fbb93553931ca0217e79271ab2a2c613 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Sep 13 12:33:53 2010 +0300 + + xfree86: vgaarb: fix decoding stub API + + This fix a problem introduced in commit 65466652. It closes also: + https://bugs.freedesktop.org/show_bug.cgi?id=30160 + + Reported-by: <xunx.fang@intel.com> + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0a3e6b0345a96aae278dd776c00b5a7c7ccf65af +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Sep 11 14:25:21 2010 -0700 + + XQuartz: Localization updates + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4e09a69c5b1f3c8d6f2f92ec24aaab3a1119940c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Aug 15 20:07:28 2010 -0700 + + rootless: Remove ROOTLESS_WORKAROUND + + This was already removed for XWin (20701522be803fe47e921fcf059dadf64c7f287d) + with no reported side effects. XQuartz seems to be behaving ok without it as + well. While this possibly brings back bug #1168, we don't have any reproduction + steps for that issue, and if it crops up again, we should fix it a real way + rather than this hokey workaround which doesn't even work for COMPOSITE. + + This effectively reverts the following two changes: + b2135e589baeb2ea26da50b9167feaea23bcce3c + d7fef52254126aa5897a5c58faeda1f61d5b13d8 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 63b7d9448abbded1cb91e82a13319d5e4313ca0c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 30 18:44:06 2010 +0300 + + xfree86: fbdevhw: remove unnecessary debug code + + It very likely no one will want to print all functions of this file for + debugging purposes. If this is the case, then a mix of ctags + cpp + gdb + can do the same job. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 66105d8281f8a6442cf7fee5d10e8b8a34bef952 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 30 18:16:32 2010 +0300 + + xfree86: fbdevhw: remove unused cmap fields from main structure + + It was never used since first git revision and probably no one cares for it. + + ABI break. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 317e491e067e31ea7cf8cb7301e47de0c10f119e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Jul 19 15:44:39 2010 +0300 + + xext: remove unused header + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 5098801b3a570d0bb3386d7d210f21a1cbf3bf12 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sat Jun 12 16:57:50 2010 +0300 + + mi: delete unused code + + pBSReg is always NULL, so the statement after the conditional will never be + reached. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 7d8cabd027cfc55e9921307e5b3dd7052de8496f +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Aug 4 16:12:59 2010 +0300 + + os: simplify smart scheduler init process + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d9c18c3b9badf38d499e3f53291bd23fda3c4340 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Aug 4 15:54:48 2010 +0300 + + os: remove useless smart scheduler macros + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit a9e6080dc94633a4f497535f619a14fd8b566645 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Sep 10 15:01:29 2010 +0300 + + os/xfree86: remove macro checking for POSIX symbols + + We assume already that our X implementation is POSIX compliant anyway. So + remove those redundant checking. + + SA_SIGINFO is left there. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 648c8871c92727d7b6b16859f27f12266a06a16e +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Sep 8 16:08:24 2010 -0400 + + composite: Convert compWindowUpdate to use TraverseTree + + v2: Use != RedirectDrawNone, since we aren't called for manual windows. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit bbffb85461eb63bfb1e01e2cb9674607b9221604 +Merge: 9a1a4cc 71972c2 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 10 11:55:34 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 9a1a4ccbe026f34beca5db3b2243874906961b49 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 30 16:37:05 2010 -0400 + + Add screens to the PRIVATE_XSELINUX set. + + The SELinux extension does store a security label in the screen + devPrivates. Fixes crash caused by overwriting another private. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reported-by: Justin Mattock <justinmattock@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5b680f2c23fb3d35c721647d0334f63297589371 +Author: Vignatti Tiago (Nokia-MS/Helsinki) <tiago.vignatti@nokia.com> +Date: Mon Aug 30 21:24:30 2010 +0300 + + os: add -sigstop option for Upstart (or equivalent) startup + + This is very similar to the RunFromSmartParent (implicit) option, except + we do not send the signal to our parent process, but our own process + instead, and that signal is SIGSTOP, not SIGUSR1. + + Upstart or a similar equivalent program will detect this, realize that + we are ready to accept clients now, send us SIGCONT and move our job + status from SPAWNED to RUNNING. + + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ca0d578d29f37b61e62556fff59732741885625b +Merge: cf88363 08adf41 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 10 11:50:27 2010 -0700 + + Merge remote branch 'mattst88/master' + +commit cf88363db0ebb42df7cc286b85d30d7898aea840 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Aug 27 10:20:29 2010 -0700 + + os: Return BadLength instead of disconnecting BigReq clients (#4565) + + If a client sends a big request that's too big (i.e. bigger than + maxBigRequestSize << 2 bytes), the server just disconnects it. This makes the + client receive SIGPIPE the next time it tries to send something. + + The X Test Suite sends requests that are too big when the test specifies the + TOO_LONG test type. When the client receives SIGPIPE, XTS marks it as + UNRESOLVED, which counts as a failure. + + Instead, remember how long the request is supposed to be and then return that + size. Dispatch() checks the length and sends BadLength to the client. Then, + whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to + process it as a request. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fa22f97af65efc2a147e9be0b7f288848965ff60 +Merge: 6edbdb7 6546665 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 10 11:47:41 2010 -0700 + + Merge remote branch 'vignatti/vgaarb-fixes' + +commit 6edbdb7f9e02ecb069c6fe6c0600fc389553ec5d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Aug 23 11:37:46 2010 -0700 + + Tag sdksyms.c entries with source file and line number + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9ef6241c2382bfc555284a4985f6d1e37d750d6f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 23 16:04:03 2010 -0400 + + Fix property and selection devPrivate allocation. + + Selection objects were not being allocated with privates, and both + objects had a stray statement that zeroed out the devPrivates field. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reported-by: Justin Mattock <justinmattock@gmail.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9dca441670d261a9a9fb6108960ed48f3d58fb7f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 6 11:32:38 2010 +1000 + + xfree86: add a hook to replace the new console handler. + + This hook is only necessary for the keyboard driver to remove the race + condition between drain_console() and the driver's ReadInput (Bug 29969). + + The idea is that a driver that needs to handle events from the console + calls xf86ReplaceConsoleHandler() with it's own ReadInput (or NULL) and thus + removes the drain_console call. It's the driver's responsibility to restore + the previous behaviour when the driver is unloaded. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + CC: Thomas Hellstrom <thellstrom@vmware.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit da31ca747f8e3993b2aca5d31b7d09b9907ad1d9 +Author: Thomas Hellstrom <thellstrom@vmware.com> +Date: Thu Sep 2 10:53:28 2010 +0200 + + linux: Don't lose console events on non-evdev drivers (#29969) + + The drain_console() function will race with new keyboard events being added + by the hardware causing the server to lose keyboard events if the console fd + is used for input. + + Only use the drain_console() when AllowEmptyInput is off which is the best + indicator we have for whether the keyboard driver will be used. This patch + will only fix the bug when hotplugging is disabled. + What we really need is a way to figure out either whether we're _not_ using + the keyboard driver (not predictable) or a way for the keyboard driver to + disable drain_console(). + + X.Org Bug 29969 <http://bugs.freedesktop.org/show_bug.cgi?id=29969> + + Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + (cherry picked from commit 71972c2534d490284d3d42b456c2f34b964b2894) + +commit 52df92a563980a7af0fb61248da3654bd90e8232 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 15:08:01 2010 +1000 + + xfree86: move XI_VERIFY_VALUATORS to the source file it's used in. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 824e970c5cc94fc7d5fe5f78a24d0d3057d87a84 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 15:03:39 2010 +1000 + + xfree86: remove TS_Raw and TS_Scaled defines. + + There are no references to it other than the commit that added them. But + since we're re-doing the API anyway, now is a good time to break things. + + commit 9398d62f27ee1b287e4458fd8b011c10f7b59efd + Author: Daniel Stone <daniel@fooishbar.org> + Date: Wed Mar 21 00:18:24 2007 +0200 + + XFree86 input: Add backwards compatibility for motion history + Add the old motion history API back, as a shim around the new mi + API. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit ac3f88e604212fc3668d623798d50aa218c13995 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 15:01:26 2010 +1000 + + xfree86: remove {Dont}SendCoreEvents defines + + The input drivers that use it only do so with ABI 0 and we're long past this + one now. Input driver don't have a say in whether they send core events now + anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 3f264149ff226d7c0bfcfcfc2c8845fa6326d0bd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 14:52:30 2010 +1000 + + xfree86: don't export xf86InputDevs. + + Use xf86FirstLocalDevice() instead (but don't get me started on the naming + of that one...) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit 8f0531bddac8e774aa25b51155445309219da0f6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 14:46:59 2010 +1000 + + xfree86: remove XI_PRIVATE macro, unused. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit c08f7afdbcf16d2ba30b67e27162c5aaa1ed3f61 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 14:45:03 2010 +1000 + + xfree86: update comment for xf86DeleteInput + + We have a driver hook - it's UnInit. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit b8d9c5ff0003f15720737949e65e3159c4f4576e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 14:30:11 2010 +1000 + + xfree86: remove IDevRec, replace with InputInfoRec. + + This struct is superfluous, maintaining the same info as the InputInfoRec + (with the exception of the driver name). + + This is a rather large commit with the majority of changes being a rename + from the fields of the IDevRec (idev, commonOptions) to the InputInfoRec + (pInfo, options). + + The actual changes affect the initialization process of the input device: + In NewInputDeviceRequest, the InputInfoRec is now always allocated and just + added to the internal list in xf86NewInputDevice() if the init process + succeeded. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit c5da32a6105b3cf57b5996971149c39103cd64b3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 14:26:20 2010 +1000 + + xfree86: plug minor memory leak. + + When no identifier for the device was specified, the allocated IDevRec (and + its associated fields) need to be freed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit 34ade08174bfd652cc79bf26d2ad6a10ca73d2c4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 14:04:50 2010 +1000 + + xfree86: Remove extraOptions parameter from xf86CollectInputOptions. + + And unexport it, drivers don't need to call this in the new init process. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 2199842ed50b3eb40d54146827fc58cae7e873ec +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 10:52:54 2010 +1000 + + xfree86: remove extraOptions field from IDevRec. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 5ab8ca0807f9d2f8c8de2f9a1421e59e2a8e976c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 10:41:27 2010 +1000 + + xfree86: remove some ifdef 0 code. + + InputInfoRec hasn't had a free function pointer since the git import. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit b0da1bc509446a714eb2b29cbd35d43b1e5187ed +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 10:39:24 2010 +1000 + + xfree86: move a declaration down to the block it is used in. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit cd7059db4a766bc9d03d7968aebeba8542e6c6c0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 10:36:47 2010 +1000 + + xfree86: minor comment fix. HAL → config backend + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit f3861522fe7d148fd4b0802f2f9ea5d98ab2db93 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 2 11:47:30 2010 +1000 + + xfree86: skip a few NULL initialization, calloc does it for us. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit 12170978617c6862fb6aa286b18aaacd0a4e2737 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 1 15:44:44 2010 +1000 + + xfree86: remove conversion procs and close proc from InputInfoRec. + + None of them are called by the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> + +commit 71972c2534d490284d3d42b456c2f34b964b2894 +Author: Thomas Hellstrom <thellstrom@vmware.com> +Date: Thu Sep 2 10:53:28 2010 +0200 + + linux: Don't lose console events on non-evdev drivers (#29969) + + The drain_console() function will race with new keyboard events being added + by the hardware causing the server to lose keyboard events if the console fd + is used for input. + + Only use the drain_console() when AllowEmptyInput is off which is the best + indicator we have for whether the keyboard driver will be used. This patch + will only fix the bug when hotplugging is disabled. + What we really need is a way to figure out either whether we're _not_ using + the keyboard driver (not predictable) or a way for the keyboard driver to + disable drain_console(). + + X.Org Bug 29969 <http://bugs.freedesktop.org/show_bug.cgi?id=29969> + + Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e00e2e7b68fbc932269d607ac5dc2c441d07ad9d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 23 08:35:01 2010 +1000 + + xfree86: Check for existence of button class before dereferencing it. + + The Irxon Super Mini Bluetooth Wireless Keyboard for PC/PDA/Cell Phones + keyboards have axes but not buttons. The evdev driver doesn't set up a + button class for these keyboards and a motion event handled by + DGAProcessPointerEvent dereferences the dev->button NULL pointer, causing a + server crash. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 9802cca816884e7f055f054ac1ba9194e0eba10b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 1 15:42:44 2010 +1000 + + Remove atom field from InputInfoRec. + + This field was only used in one location where we can use a local variable. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 79ea9ef39971d008d199b18f34d1aef2bab6e33f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 10 15:19:20 2010 +1000 + + input: constify valuators passed in by input drivers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 86560b5d05f14bdf04d21b3457a66c0d5045db9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 24 13:46:35 2010 +1000 + + dix: don't set time to CurrentTime in DeviceChangedEvents. + + CurrentTime is used by clients to skip setting the time, but not by the + server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit ff055506f0cbb852bed17acb9f9bbf1d715a854e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 23 13:20:09 2010 +1000 + + dix: fix crash when removing devices on a buttonless MD pointer (#29669) + + If the master does not have a button class, recalculating the number of + buttons required for this master dereferences a NULL pointer. Guard against + this, if the master pointer doesn't have a button class, it doesn't need to + update it's number of buttons. + + Reproducible: + Two devices on the same master, device NB with axes but no buttons, device + A+B with axes and button . + If NB was the last one to send an event through the master when A+B is + removed from the server, master->button is NULL and leads to the above + NULL-pointer dereference. + + X.Org Bug 29669 <http://bugs.freedesktop.org/show_bug.cgi?id=29669> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit be978c7fc97e98ef1bc7b20c6c0740d8a81b609a +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Tue Aug 3 18:21:28 2010 -0700 + + xfree86: Purge kbdCustomKeycodes from xf86Info. + + This was obsolete after 3eeb62e8f587732e6b433c2b9c6879eb26a3f1b4 "bug #890: completely remove deprecated keyboard driver". + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6922b31a136b2b0ac185d61785969a11f84c7943 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 1 14:35:40 2010 +1000 + + xfree86: remove history_size + + For a couple of ABIs now the history size was essentially static anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 892e39025b45109ba38c0b5d0b5f4535e092f58c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 1 14:33:52 2010 +1000 + + xfree86: remove always_core_feedback from InputInfoRec. + + Unused + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5e2912bd1d2bc8ff1508e5f726e77aa5f8677cbd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 1 14:33:26 2010 +1000 + + xfree86: remove first/last from InputInfoRec. + + Unused. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 974bc2322b3667db38d28063786fbc76fb303d00 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 1 14:32:51 2010 +1000 + + xfree86: remove private_flags from InputInfoRec. + + Unused field. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 23b361b25b7b48a820a4ef851fb89706f7ec2cd0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 1 14:14:20 2010 +1000 + + xfree86: Purge old_x/old_y from InputInfoRec. + + Unused field. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4ac3be29bc1af19f15e84ee0ea609de5c54ca0e0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 30 14:26:06 2010 +1000 + + input: Purge AddOtherInputDevices DDX hook. + + This hook wasn't used by any DDX. Device addition and removal is handled by + the config backend, so we don't need to do anything special that during the + ListInputDevices request processing. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit cb672a461cc6cd668ab7e61994b94e9ff46b3ef1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 30 14:21:14 2010 +1000 + + input: remove OpenInputDevice and CloseInputDevice DDX hooks. + + In theory, these hooks were to be used for DDX-specific device enablement. + None of the DDXs however did anything here. Now we call DEVICE_INIT on all + devices when they are added, so the xfree86 DDX as the only one with real + code didn't do anything here. + + kdrive checked for device validity but that's already handled in + ProcXOpenDevice. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a46d2bb344e822bbd9d69cb59829b85f9d8f0213 +Author: Simon Thum <simon.thum@gmx.de> +Date: Sun Jul 18 12:31:26 2010 +0200 + + xfree86: Fix xf86 backend-specific input initialization + + Instead of shoving it in rather unrelated places, move acceleration init + into xf86NewInputDevice. + + Caveat: It's not clear atm how relevant other callers of ActivateDevice + (like OpenDevice) actually are. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit e930710ae5579752785d6b96ace4b44bf0199a6e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 30 13:59:29 2010 +1000 + + xfree86: purge superfluous includes from xf86Xinput.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 2b7840b63da6bc00aa40e8a427d9fd719ba5e6d0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 30 13:44:20 2010 +1000 + + xfree86: remove unused DeviceAssocRec struct. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit cdb5863c9f68548afa0c69e08c697c83f9a5e671 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 23 14:16:38 2010 +1000 + + xfree86: remove LocalDeviceRec/Ptr definition. + + Two names pointing to the same struct for over 7 years now. Remove the + define, if drivers don't want to change they can always do the typedef + themselves. + + Rename all "LocalDevicePtr local" to "InputInfoPtr pInfo". + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 8764782f6de56a9dc5e9d5a8e9fb616a8ddb2f7c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 7 11:17:10 2010 +1000 + + xfree86: add xf86IDrvMsg and friends for input driver logging. + + Input driver messages are only standardised by convention, with the drivers + prefixing the device name to most messages. This makes it rather hard to + grep on "evdev" for example when looking for the evdev ouput. + + This patch adds three new logging functions, modeled after xf86DrvMsg(), the + logging function for output drivers. New functions are + xf86IDrvMsg() - input driver log message in default verbosity. + xf86IDrvMsgVerb() - input driver log message in specified verbosity. + xf86VIDrvMsgVerb() - same as xf86IDrvMsgVerb() but takes a varargs + argument. + + Default log format is <driver name>: <device name>: <message>. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit b55ac354afa0f16f71bb4f2d3d4277c887082520 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 12:00:07 2010 +1000 + + xfree86: move xf86AllocateInput and xf86DeleteInput to xf86Xinput.c + + Make xf86AllocateInput static in the process, this function is only called + from one location. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit d2a5f4166417b9d4a02a219b28470e41b6cfe012 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 10:30:56 2010 +1000 + + xfree86: return the device from xf86ActivateDevice. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit fbf35e27f3005cf009f2dd1e112260bb294342c7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 10:28:14 2010 +1000 + + input: set XKB extension for all new devices, not just xfree86 ones. + + Right now, Xephyr and others don't get to use XKB on the slave devices. + Which works given that no-one cares about SDs just yet but event processing + is different if the ProcessInputProc isn't wrapped properly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 11ed32b62c8793ecc1c68e1e4ba91e2eb45eef3e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 10:24:02 2010 +1000 + + xfree86: purge SendDragEvents support. + + From the documentation: + "This is mainly to allow a touch screen to be used with netscape and other + browsers which do strange things if the mouse moves between button down and + button up." + + CLOSED - NOTOURBUG + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 7defd282beb57e8880980416ed579f62d561d1ac +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 10:16:15 2010 +1000 + + xfree86: remove XI86_CONFIGURED flag. + + PreInit returns a status code. Let's use that instead of having it report + Success in some cases but not set the XI86_CONFIGURED flag and thus signal + an init failure. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 97a4acdac23b8ff33da43917c10b65d2fee5c07f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 10:04:53 2010 +1000 + + xfree86: purge some unused defines. + + These defines have been write-only for a while now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 0fb7a5c261aa0d87d6596d72b70696bffe0c0aff +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 09:53:35 2010 +1000 + + input: Purge Register*Device() functions. + + RegisterPointerDevice() and RegisterKeyboardDevice() were already mapped to + RegisterOtherDevice() and obsolete. + + RegisterOtherDevice() was called for all devices and the two assignments can + simply be moved into AddInputDevice(). Purge RegisterOtherDevice() and + pretend it never happened. + + *lalalalala* + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 67ffbcc14cbc61474520d4531599edca24965543 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 09:24:08 2010 +1000 + + xfree86: remove superflous assignments. + + ActivateGrab and DeactivateGrab are set in AddInputDevice() already. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 4cd54d9ed9e87074734789a9a7708c2218f87f1e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 09:22:05 2010 +1000 + + xfree86: make xf86ActivateDevice static. + + No-one but the joystick driver uses it and that one should be using NIDR + instead. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 31c71425ac13a7f554316356691a79175ea82a67 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 22 09:09:10 2010 +1000 + + config: expose config_info as an input option. + + config_info is the only reliable indicator we have in the server for + duplicate devices (drivers can test for maj/min on fds as well). Don't set + this after the device has been initialized but assume it's important enough + to set during NIDR. + + This makes the option "config_info" available to the drivers as well. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit de0cc5a72deb7c477e368aa4fe9a713788d7ae4c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 21 16:00:26 2010 +1000 + + xfree86: rework driver PreInit API - XInput ABI 12 + + The main change introduced in this patch is the removal of the + back-and-forth between DDX and the driver. + The DDX now allocates the InputInfoRec and fills it with default values. The + DDX processes common options (and module-specific default options, if + appropriate) before passing the initialised struct to the driver. + + The driver may do module-specific initializations and return Success or an + error code in the case of a failure. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 7925e8945649d4af237e6c3c5593b895a461bd1e +Author: Chase Douglas <chase.douglas@ubuntu.com> +Date: Wed Sep 1 14:45:34 2010 +1000 + + Fix udev population of Bluetooth input device product IDs + + The udev device_added function takes the vendor and model IDs of added + devices and converts them into an attribute that can be matched for by + an InputClass configuration using MatchUSBID. Currently, the udev + mechanism works for USB devices, but fails to work properly for + Bluetooth devices. The product IDs of the event node are actually the + IDs of the Bluetooth receiver instead of the device. + + This patch reads the product ID from the PRODUCT property of the parent + of the added device. This tag is set correctly for both USB and + Bluetooth input devices. The following devices have been tested by + specifying individual InputClass sections in xorg.conf: + + * Apple Keyboard (Bluetooth) + * Apple Magic Trackpad (Bluetooth) + * Apple Magic Mouse (Bluetooth) + * Microsoft Bluetooth Notebook Mouse 5000 (Bluetooth) + * Microsoft IntelliMouse Optical (USB) + * N-Trig Touchscreen (USB) + * Wacom Bamboo Touch (USB) + + Signed-off-by: Chase Douglas <chase.douglas@canonical.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 05e616767e5b7e60b92d31c4042ded5892dce6d4 +Author: Adam Tkac <atkac@redhat.com> +Date: Wed Aug 25 10:38:40 2010 +0200 + + Return Success from generate_modkeymap() when max_keys_per_mod is zero + + max_keys_per_mod equal to zero is a valid situation so generate_modkeymap + should not return BadAlloc in this case. + + Signed-off-by: Adam Tkac <atkac@redhat.com> + Reviewed-by: Patrick E. Kane <pekane52 at gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4a12aecac670debd0dafb17c245fccb93eea2d60 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Aug 25 13:48:29 2010 -0700 + + xfree86: Document terminate not mapped by default (bug 25083) + + Document that terminate is not mapped to Ctrl+Alt+Backspace by default, to help alleviate some confusion. + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a90052ba8697e217b0dc68057d7b9202ae8797db +Author: David Ge <davidqge@gmail.com> +Date: Thu Aug 19 00:33:57 2010 -0500 + + xkb: Fix RedirectKey didn't send any event. + + Xorg.log shows error: Valuators reported for non-valuator device. + This is caused by uninitialized valuators.mask in _XkbFilterRedirectKey(), + which trigger the error in UpdateDeviceState(). + + Signed-off-by: David Ge <davidqge@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ff109bf84401a451380eb7f3f94a6e0aa2776e3e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Aug 12 00:09:02 2010 -0700 + + Use GetMaster instead of direct u.master access in core procs + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Acked-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3cc5e4422430e9ca44615f3e63feccd2e5729046 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 23 14:48:32 2010 +1000 + + xfree86: fix compiler warning about implicied decl of DuplicateModule. + + ../../../../hw/xfree86/common/xf86Xinput.c: In function ‘xf86AllocateInput’: + ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: implicit + declaration of function ‘DuplicateModule’ + ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: nested extern + declaration of ‘DuplicateModule’ + ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: assignment makes + pointer from integer without a cast + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit b5c9953bbf4ffd11f1a70d058c6d3feb2bd1bca8 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Jul 26 15:31:03 2010 +0300 + + xkb: Check if AddResource failed + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2e6d7174042cc8007e947b7d9fb54acc0ebe29d2 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Jul 26 15:13:34 2010 +0300 + + xkb: Fix possible NULL pointer dereference + + sli is null before allocation assigment so deference t osli has to be + protected. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d6642de7ebdda16e0056600a86a7802bd4c393b7 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Mon Jul 26 14:50:30 2010 +0300 + + xkb: Fix possible NULL pointer dereference + + If search for device failed sli is NULL. In that case we have to protect + dereference to prevent server crash. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit adc0697cfcfba295a15d7a307125093cbccd637f +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jul 22 15:11:27 2010 +0300 + + xkb: Fix memory leak in error path + + map is allocated but not freed if reply length and data don't match. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 67cfb66562cd9d39f30fec6fbc38eb1eb5e5b030 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jul 22 15:05:57 2010 +0300 + + xkb: Remove redurant intialization code + + calloc already initializes allocated memory to zero. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2475ef60977f6813dec74ef0837a5915b8a48bbc +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jul 22 12:48:55 2010 +0300 + + xkb: Fix NULL pointer dereference + + xkb->names is dereferenced in else path too. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 184ef0d35612d6ed0619283d376f04d9a904f47c +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jul 22 11:34:54 2010 +0300 + + xkb: Don't check for NULL before calling free + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1223340644744c0b38aa85f5956eb5ab7c696517 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jul 22 11:33:33 2010 +0300 + + xkb: Fix memory leak if opening file fails + + If fopen fails pointer in buf would be overwriten with a new pointer. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 20cb9c923efa4edc348eba30f956a66413a8208f +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Thu Jul 22 11:13:10 2010 +0300 + + xkb: Use memcpy for copy that has known length + + Fixes warning that strncpy is not able to append NULL to the end + of destination. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 17 12:08:52 2010 +1000 + + dix: don't create core motion events for non-x/y valuators. + + Devices that send motion events with valuators other than x/y get core + motion events with unchanged x/y coordinates. This confuses some + applications. + + If the DeviceEvent does not have the x/y valuators set, return BadMatch on + core conversion, thus skipping the event altogether. + + Reported-by: Bartosz Brachaczek <b.brachaczek@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Bartosz Brachaczek <b.brachaczek@gmail.com> + +commit 08adf41f6315663cbac33d010214d98f3e1c8814 +Author: Matt Turner <mattst88@gmail.com> +Date: Fri Aug 27 18:34:49 2010 -0400 + + Replace malloc/strlen/strcpy with strdup. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit ea239112b030588ed3cdd113643ba5f6207a5bd9 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Aug 4 09:21:33 2010 +0000 + + xfree86: Purge parsePrologueVoid. + + This was included in the original commit, and then never used. + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit b25fb9fe998209e79b6917d12d5765c5f6719a7e +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Aug 4 09:21:32 2010 +0000 + + xfree86: Removed unused messages from Configint.h + + AUTOREPEAT_MSG, MOVED_TO_FLAGS_MSG, and XLEDS_MSG made obsolete by + 81913a12910e39d7ea6af8657c1c66cc6791cd65 Jul 21 2006 (remove undead files from master) + UNDEFINED_DEVICE_MSG made obsolete by + 6033d8150be3a115b90226eaa42f237bb0cf3369 Oct 9 2007 (first pass at video driver autoloading) + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 18b62e0479f15e965611880ada6e0195367df025 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Aug 4 09:21:31 2010 +0000 + + xfree86: Fix leaks in OpenConfigFile and OpenConfigDir + + [mattst88: fixed whitespace and a missing semicolon] + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 4f04fd595e82226f1d91226a41bb98ed3d940b37 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Aug 4 09:21:30 2010 +0000 + + xfree86: Simplify xf86Msg{,Verb} + + Previously, the functions would call xf86VDrvMsgVerb with a screen of -1 + despite their comments saying they were for "non-driver messages". + They now call LogVMessageVerb, which is what xf86VDrvMsgVerb does anyway + when it has a screen == -1. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit f49473abfd6034e68576b2dddd30ba8d8dd0838f +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Aug 4 09:21:29 2010 +0000 + + xfree86: Remove prototypes for non-existant functions. + + This was obsolete from 9a0f25de7ca3c68af867b38936103d17daa92ac6 "Static cleanups, dead code deletion." (server 1.3). + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 747bf5fe80f51554205c5a50b8ed9b89065c8a54 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Sun Aug 1 16:01:23 2010 -0700 + + xfree86: Remove comments about unable to use malloc. + + These are leftovers from when X still used Xmalloc and friends for allocation. + Now that those are gone, these comments are just confusing. + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 65466652936bbb2706be455d0a416bcf08e88f66 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed May 12 13:03:14 2010 +0300 + + xfree86: vgaarb: fix device decoding interface to send resources type properly + + Right now, when there is more than one vide card on the machine, we're + adopting a pessimistic approach and setting all cards to decode VGA legacy + address. + + Some cards may want to skip the arbitration and the only way to do so is + through pci_device_vgaarb_decodes. Therefore, send the desired kind of + resource instead force the worst case. + + Note that xf86VGAarbiterDeviceDecodes is not being used so far by any + open-source driver. Even so, API break. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mark Kettenis <kettenis@openbsd.org> + +commit 7fbf3e7cf4b261194faad747e0bf59d528df6d91 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon May 10 21:05:14 2010 +0300 + + xfree86: vgaarb: remove useless macro + + This was inherited from RAC and was never used there either. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit ad698dd5bcc41fcec1e7ce1117c7ad1052710132 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon May 10 21:03:30 2010 +0300 + + xfree86: vgaarb: remove superfluous and confusing VGAGet_GC and VGAPut_GC + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit c0aed4c99bf553bd7b8bbc79d0ed8f26d0ab3f94 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon May 10 20:58:30 2010 +0300 + + xfree86: vgaarb: change macros by inline functions to ease debug + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 79ee78de9de49d0cab03401662baa476a18e53b8 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Aug 20 17:32:27 2010 -0700 + + xserver 1.9.0 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 3e56efcfb63677cd8574e1e435e61d96f79ea536 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Aug 20 10:01:48 2010 -0700 + + fb: make isClipped always reject negative coordinates (bug 11503) + + A window with either dimension > 32767 can be positioned such that + coordinates > 32767 are visible on the screen. Attempts to draw to + those pixels will generate coordinates wrapped around to negative + values. + + The optimized clipping macro, 'isClipped', in fbbits.h, computes + clipping in window space rather than screen space using int16 values, + and so it too has coordinates wrapped around to negative values and + hence ends up accepting the wrapped drawing coordinates. + + Two possible fixes for this problem + + 1) Detect wrapped region coordinates and clip those to 32767. + 2) Detect negative incoming coordinates and reject those + + This patch takes the second approach as it is much shorter, simply + detecting when either X or Y incoming coordinate is negative, which + can never be 'within' any drawable. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 951605b4660290044fb238bcf1d6d9e498567e8c +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Aug 20 13:51:04 2010 +0100 + + edid: Adjust rounding of max_clock + + A simple hack to accommodate various EDID who have detailed modes that + exceed the EDID's max pixel clock. The pixel clock is only defined in + units of 10MHz and often appears as the maximum pixel code of the + detailed modes, rounded to the nearest 10MHz. Adjusting the max_clock to + include an extra 5MHz prevents the parser from rejecting the detailed + modes. + + The kernel uses the same fuzz and by including it in X we can use the + same modes in X as for the console. + + Fixes: + + Bug 23833 - X uses different refresh rate to that set by kernel module + https://bugs.freedesktop.org/show_bug.cgi?id=23833 + + In the future, we will want to try harder to keep the KMS modes but at + the same time we need to apply the restrictions as specified by the + user's configuration, and need to fill in modes for fullscreen games on + fixed-mode panels. + + Reported-and-tested-by: Fabio Pedretti <fabio.ped@libero.it> + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7e581780603d6b15291d032efdeeca77f969e0ba +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jun 24 12:24:58 2010 +0100 + + glx: Prevent NULL context deref in __glXGetDrawable() (bug 29184) + + During a SwapBuffers request, we may end up querying an unknown drawable + outside of an active context, and so need to report this error prior to + attempting to dereference the NULL context. + + Also fixes: + + [Bug 29184] glXSwapBuffers with no GLX context crashes X. + https://bugs.freedesktop.org/show_bug.cgi?id=29184 + + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Cc: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5725849a1b427cd4a72b84e57f211edb35838718 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 28 18:08:50 2010 -0400 + + render: Bounds check for nglyphs in ProcRenderAddGlyphs (#28801) + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fc091936e2bddbbab9c9a501edc5a5f08388617e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 16 14:18:45 2010 +1000 + + dix: copy the valuators passed into GPE/GKVE/GProxE. + + GPE and friends modify the valuators array passed in. Which means any driver + using e.g. xf86PostButtonEventP(..., valuators) twice to emulate a button + click will provide garbage data on the second run. + + This is currently affecting the wacom driver, xf86PostButtonEventP() with + valuators is required to have input events with device-specific axis values. + Passing the same valuators in twice, once with press, once with release, + will see the valuators modified in the first call and garbage submitted in + the next one. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6e3e559e9fa63069a10eb834a6dab9a4cfc140ee +Author: Keith Packard <keithp@keithp.com> +Date: Sun Aug 15 20:53:20 2010 -0700 + + dix: reset pScreen->root to NULL when root window is deleted. + + From: Dave Airlie <airlied@linux.ie> + + We were seeing a crash in the FreeAllResources codepath, + running valgrind revealed this, + + ==12536== Invalid read of size 4 + ==12536== at 0x810BCAB: DeliverPropertyEvent (rrproperty.c:33) + ==12536== by 0x80958A4: TraverseTree (window.c:227) + ==12536== by 0x809593E: WalkTree (window.c:255) + ==12536== by 0x810BC66: RRDeliverPropertyEvent (rrproperty.c:53) + ==12536== by 0x810BD5D: RRDeleteProperty.clone.0 (rrproperty.c:76) + ==12536== by 0x810BD98: RRDeleteAllOutputProperties (rrproperty.c:88) + ==12536== by 0x810A36E: RROutputDestroyResource (rroutput.c:407) + ==12536== by 0x808DF4E: FreeClientResources (resource.c:859) + ==12536== by 0x808E005: FreeAllResources (resource.c:876) + ==12536== by 0x8062300: main (main.c:305) + ==12536== Address 0x46ba8ac is 4 bytes inside a block of size 164 free'd + ==12536== at 0x40057F6: free (vg_replace_malloc.c:325) + ==12536== by 0x8087F1F: _dixFreeObjectWithPrivates (privates.c:357) + ==12536== by 0x809832A: DeleteWindow (window.c:926) + ==12536== by 0x808DF4E: FreeClientResources (resource.c:859) + ==12536== by 0x808E005: FreeAllResources (resource.c:876) + ==12536== by 0x8062300: main (main.c:305) + + Its a use after free on the root window, since we have already deleted it + at this point. This patch checks if the window we are destroying is the root + window and resets the pointer to NULL if it is. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Tested-by: Dave Airlie <airlied@redhat.com> + +commit 5d1d9d9ae39fab2ee2ac085f9776f82768828dc8 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Aug 1 11:41:58 2010 -0700 + + XQuartz: xpr: Bail on errors during unlock and destroy + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ee7fd8fc58d9fadfbb92302ddea224537f068538 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Aug 1 11:39:14 2010 -0700 + + XQuartz: UpdateScreen at the end of SetRootless + + This will ensure that pRoot is unlocked after the miPaintWindow + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4fc4cab98d454afbfd0d2f48548b5b481e8e7c82 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Jul 29 14:49:10 2010 -0700 + + XQuartz: Make application switching work better for the no-spaces case + + We still have the issue with not raising the frontmost window for the case + when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is + disabled. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit e5bc62a03289f956c54c4699edf47f7ff237b5be +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Jul 25 22:29:11 2010 -0700 + + XQuartz: Ignore kXquartzToggleFullscreen when rootless + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 71af1f71c0492c365707c6b3810f94642ff39352 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Aug 12 23:01:59 2010 -0700 + + Bump to version 1.8.99.906 (1.9 RC6) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0af322858e86665ee43f065741318e69c2755510 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Aug 12 22:56:36 2010 -0700 + + Silence GCC warning about uninitialized lastSlave variable + + Not an actual bug, but gcc can't tell that this variable cannot be + used without being initialized + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b5cf9c5090d15a50b105470900823f2d398d4bd2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Aug 12 00:09:01 2010 -0700 + + Stop checking or calling PtrCtrlProcs + + None of them do anything useful now that pointer acceleration is + entirely handled in the server. (Does not completely nuke yet, + since that would be an API/ABI break.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bce12f2956f23c0ee53f7f6485dba631293a0931 +Author: Jesse Adkins <jesserayadkins@gmail.com> +Date: Wed Aug 4 23:39:14 2010 -0700 + + xfree86: parser: Never use constant strings for driver names (fixes #17438) + + When the parser sees the "keyboard" driver, it automatically (and + silently) replaces it with the constant string "kbd". + Everybody else uses malloc'd memory for the driver name, so input + device closure assumes it can use free. + Free val.str, so this crash doesn't turn into a memory leak. Whew. + + Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 619ca32202cd22f2a408586cbc906b8bbaeb9358 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 28 15:08:27 2010 +1000 + + Xi: reset the unused classes pointer after copying + + After copying the unused_classes into the device, reset the original + pointer. Otherwise we have two pointers pointing to the same field and both + get freed on device removal. + + Some classes already have this behaviour since 51c8fd69. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 1a172f3297369a72865232c382abfc14281102a4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 23 13:24:34 2010 +1000 + + xkb: if the button isn't down, don't fake an event. + + If the button we're about to fake isn't down (or up), don't fake a release + (or press) event for it. Behaviour is the same as before, this just saves + a few cycles. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 651c36e95ec0ac60d3fb98966df4218712ae78c2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 23 11:46:30 2010 +1000 + + xkb: post-fix PointerKeys button events with a DeviceChangedEvent. + + commit 14327858391ebe929b806efb53ad79e789361883 + xkb: release XTEST pointer buttons on physical releases. (#28808) + revealed a bug with the XTEST/PointerKeys interaction. + + Events resulting from PointerKeys are injected into the event processing + stream, not appended to the event queue. The events generated for the fake + button press include a DeviceChangedEvent (DCE), a raw button event and the + button event itself. The DCE causes the master to switch classes to the + attached XTEST pointer device. + + Once the fake button is processed, normal event processing continues with + events in the EQ. The master still contains the XTEST classes, causing some + events to be dropped if e.g. the number of valuators of the event in the + queue exceeds the XTEST device's number of valuators. + + Example: the EQ contains the following events, processed one-by-one, left to + right. + + [DCE (dev)][Btn down][Btn up][Motion][Motion][...] + ^ XkbFakeDeviceButton injects [DCE (XTEST)][Btn up] + + Thus the event sequence processed looks like this: + + [DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][Motion][Motion][...] + + The first DCE causes the master to switch to the device. The button up event + injects a DCE to the XTEST device, causing the following Motion events to be + processed with the master still being on XTEST classes. + + This patch post-fixes the injected event sequence with a DCE to restore the + classes of the original slave device, resulting in an event sequence like + this: + [DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][DCE (dev)][Motion][Motion] + + Note that this is a simplified description. The event sequence injected by + the PointerKeys code is injected for the master device only and the matching + slave device that caused the injection has already finished processing on + the slave. Furthermore, the injection happens as part of the the XKB layer, + before the unwrapping of the processInputProc takes us into the DIX where + the DCE is actually handled. + + Bug reproducible with a device that reports more than 2 valuators. Simply + cause button releases on the device and wait for a "too many valuators" + warning message. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 6dae7f3792611aace1df0cca63bf50c50d93de43 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Tue Aug 10 19:30:20 2010 +0100 + + xace: Invalid reference to out-of-scope data. + + The callback data passed by reference to the hook was allocated on stack + within the scope of the case statement. The compiler is free to reuse + any of that stack space whilst making the function call so we may end up + passing garbage into the callback. + + References: + + Bug 18451 - Xorg server 1.5.2 SEGV during XFixesGetCursorImage() + https://bugs.freedesktop.org/show_bug.cgi?id=18451 + + v2: Drop the unrelated hunk that snuck in when ammending the commit + message. + + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fbd02046797185715e1a120d52e410ec78fc365f +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Aug 5 15:19:20 2010 +0100 + + Cygwin/X: Fix glxWinCreateDrawable() for API change + + Commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc changed the signature + of __GLXScreen's createDrawable method. + + Update the glxWinCreateDrawable() function in XWin's GLX provider + appropriately. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ff70848e623920779d20f35d47e9e1f34157de47 +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 21 09:01:43 2010 -0700 + + Don't let alpha maps recurse in fb. Bug 23581. + + Recursive alpha maps (where one picture's alpha map is set to a + picture with an external alpha map) would be all fine and dandy, + except for the case where the client constructs a loop. Detecting this + case when setting the alpha map values would be difficult as any time + an alpha map is set, the server would have to check for the looping + case. + + Instead, a far simpler fix is to simply disallow recursive alpha maps + in the rendering code, the Render spec is ambiguous in this area and + allows us to to ignore the recursive case. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 70a94c5b7a42adc0995bf774c44587a0778be0d0 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Aug 3 19:49:10 2010 +0100 + + rootless: fix uninitialized private key assert in non-rootless modes in Cygwin/X + + IsFramedWindow() is called from miPaintWindow() if the server has + been built with ROOTLESS defined, irrespective of if RootlessInit() + has ever been called, or not. + + Add a check to IsFramedWindow() to check if rootlessWindowPrivateKey + has been registered (as a proxy for checking if the rootless extension + has been initialized) so we don't go on to try to use that key, + triggering an assert. + + This bug exposes what appears to be a difference in opinion about + the rootless extension between XQuartz and XWin. XQuartz always + initializes the rootless extension, whereas XWin offers several modes + of operation, and the rootless extension is only used for one of them + + That probably means that the all code under compile time guard for + ROOTLESS should be carefully checked that it doesn't also need to be + under a run-time guard + + (I've reviewed the other ROOTLESS blocks in dix/events.c and + dix/window.c and they look ok -- keithp) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 3ab6cd31cbdf8095b2948034fce5fb645422d8da +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 9 15:20:20 2010 -0400 + + fonts: Fix refcounting for asynchronous font operations (#3040) + + When doing Xinerama, we'll dispatch font ops across all backend screens. + If using a font server (such that some operations can sleep), we'll put + the client to sleep once for each screen, but only wake up once, because + we're trying to keep track of the sleep count in _each_ screen's + closure. + + Instead, just ask the core whether the client is already asleep. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 35c0dbe4b0a6ab790f4271325b8a0b16894daa8b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Aug 8 10:03:08 2010 -0400 + + doc: add missing .gitignore for Xserver-DTrace + + The dtrace doc was recently added in commit + 9c171d4aee695ab66e6db1ab92539557bd368cfa + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 05c4fe83fdc20b838fd59658478278dc31a55eb9 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jul 30 17:43:24 2010 -0700 + + Check HAVE_XMLTO_TEXT before trying to use xmlto to make text files + + Reported-by: Matt Turner <mattst88@gmail.com> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit a6fb7829ed9bf26c4c2a02c6ed075fb1b17f7b2a +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Jul 26 19:55:27 2010 -0700 + + Xserver-spec: Update ChangeGC prototype, add ChangeGCXIDs + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit a817271d461e2f95dd7dc62cd1c7d123ce92f555 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jul 22 23:57:57 2010 -0700 + + Update Xserver-spec for new devPrivates API + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Patrick E. Kane <pekane52@gmail.com> + +commit 40d598a4f84091db743ceef4d60752bb910c3e56 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jul 22 23:57:02 2010 -0700 + + Correct function name in dixRegisterPrivateKey comments + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Patrick E. Kane <pekane52@gmail.com> + +commit 8d7b7a0d71e0b89321b3341b781bc8845386def6 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Thu Jul 29 20:36:25 2010 -0400 + + Set DamageSetReportAfterOp to true for the damage extension + + Change the damage extension reporter to queue up events after we chain + to the wrapped functions. Damage events are typically sent out after + the rendering happens anyway, since we submit batch buffers from the + flush callback chain and then flush client io buffers. Compositing + managers relie on this order, and there is no way we could reliably + provide damage events to clients before the rendering happens anyway. + + By queueing up the damage events before the rendering happens, there's + a risk that the client io buffer may overflow and send the damage + events to the client before the driver has even seen the rendering + request. Reporting damage events after the rendering fixes this + corner case and better corresponds with how we expect this to work. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit c65f610e12f9df168d5639534ed3c2bd40afffc8 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Thu Jul 29 18:52:35 2010 -0400 + + Always call the flush callback chain when we flush client buffers + + We were missing the callback in a couple of places. Drivers may use + the flush callback to submit batched up rendering before events (for + example, damage events) are sent out, to ensure that the rendering + has been queued when the client receives the event. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 7e0575baf14ec4a89492fd2780f9ab5b9244afbd +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Jul 27 23:32:36 2010 -0400 + + ddc: Fix memory leak in GetEDID_DDC1 + + Mark argument to DDC_checksum as const too. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 750d4e82a0c1161292d24216bcff200cd6647611 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Jul 29 11:39:40 2010 -0700 + + XQuartz: xpbproxy: Don't take down the whole server on an IO error + + Calls pthread_exit to prevent _XIOError from calling exit() + + This fixes http://xquartz.macosforge.org/trac/ticket/421 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 98f90145d786695ecbc02a667c6ffe7c619dc67e +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jul 28 18:08:02 2010 -0700 + + XQuartz: GLX: Don't mangle __GLXDrawable's pDraw + + We were incorrectly NULLing out pDraw in __GLXDrawable instead of ours in + __GLXAquaDrawable. (we should refactor to eliminate this redundancy later) + + This was causing http://xquartz.macosforge.org/trac/ticket/426 + This was benign until commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 + The root cause of this change was fed7ccc481ad1caaa518cafe944c2327a5d0b6c65 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 9c171d4aee695ab66e6db1ab92539557bd368cfa +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jun 25 16:52:42 2010 -0700 + + Add documentation of the Xserver DTrace probes + + Mostly pulled together from posts to my blog and the docs posted + at http://people.freedesktop.org/~alanc/dtrace/ and converted to + DocBook. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Patrick E. Kane <pekane52@gmail.com> + +commit 6b912b08ce65072b2401167fbf2150b99c0ca6b0 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Jun 19 23:56:20 2010 -0700 + + Add name argument to CreateNewResourceType documentation + + Reflects API change made in commit 895f40792a during Xorg 1.8 development + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Patrick E. Kane <pekane52@gmail.com> + +commit 44c9350d72b3eda982c642feb45d6648afc626cf +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Jun 19 23:40:37 2010 -0700 + + Use DocBook stylesheets from xorg-sgml-doctools if they're available + + Bumps minimum xorg-macros requirement from 1.6 to 1.10 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Patrick E. Kane <pekane52@gmail.com> + +commit 9fbbff3c0456f1969d45cc957d3260723caf62d7 +Merge: 95756f4 9ac8e20 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 21 11:56:39 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 9ac8e206ffe1016a8bc203261ade6c763a8a4f86 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 15 15:46:15 2010 +1000 + + xkb: use GetMaster instead of dev->u.master. + + Devices that are both pointers and keyboards are not affected by keyboard + changes as their master device is a master pointer, not a master keyboard. + Use GetMaster() instead to ensure devices that are attached to the paired + master pointer device will still be update. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit c54f81ba7a58faf37a612bd9a45276bb2922b5d8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 15 13:24:14 2010 +1000 + + dix: hack around enter/leave event issues for grabbed devices (#27804) + + The current core enter/leave does not cater for device grabs during + enter/leave events. If a window W contains a pointer P1 and a client grabs a + pointer P2, this pointer will not generate enter/leave events inside this + window. + + Hack around this by forcing grabbed devices to always send enter/leave + events. + + X.Org Bug 27804 <http://bugs.freedesktop.org/show_bug.cgi?id=27804> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 95756f410c65a6510a797e94a792b959d45cdb9e +Author: Jan Hauffa <hauffa@in.tum.de> +Date: Sat Jul 17 12:18:39 2010 -0700 + + rootless: Adjust the frame size of the native root window in RootlessResizeWindow + + If the native root window isn't resized as well, we will likely crash the + next time we draw to the root. On OS X, this can be seen by: + + 1) Put the display preferences in the menu bar and set X11's preferences so you + can access the menu bar in fullscreen mode + 2) Set the resolution of your screen lower than normal. + 3) Start X11 in fullscreen mode. The root window will cover the screen as + expected. + 4) Use the menu bar to increase the resolution of the display. The root + window will now cover the old area and not the full screen, but + 'xwininfo -root' will report the full width. + 5) Run 'xsetroot -solid red', and we have the crash you mention above. + + Leaving/entering fullscreen after #4 will fix the problem. This is because the + WINREC is erased when we leave fullscreen mode and it is recreated upon + re-entry: + + RootlessUpdateRooted(FALSE) + RootlessDisableRoot(screenInfo.screens[0]) + RootlessDestroyFrame (pRoot, winRec); + RootlessUpdateRooted(TRUE) + RootlessEnableRoot(screenInfo.screens[0]) + RootlessEnsureFrame(screenInfo.screens[0]->pRoot) + creates a new WINREC... + + Signed-off-by: Jan Hauffa <hauffa@in.tum.de> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Acked-By: Jon TURNEY <jon.turney@dronecode.org.uk> + Tested-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a2c13f0d6548310e3cd115cf486d3e43edf23dcc +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 14 12:57:29 2010 -0700 + + Bump to version 1.8.99.905 (1.9 RC5) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0fc02c0bf92f694889589e3648acc08d4684de37 +Merge: 0540c46 9d8ec71 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jul 13 15:05:36 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 0540c46066f938ad5611c56081cfcd8457a9b718 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jul 13 14:56:53 2010 +0200 + + EXA: Finish access to pixmap if it's prepared at destruction time. + + Previously we assumed every pixmap destroyed during a software fallback was + also created during a software fallback and had access prepared, but that's + not always true. + + Fixes a server abort + Reported-by: 邓逸昕 <bupt.dengyixin@gmail.com> + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jul 12 16:01:34 2010 -0700 + + Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 + + Because some EnterVT code needs to remove it self from the + call chain, we need to fix all of the wrappers to correctly + unwrap/rewrap during the call chain. This is a follow-on to the fix + for bug 27114 in commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Jesse Barnes <jesse.barnes@intel.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 9d8ec712a67ce71ea7408f0626cda7e0fa7c3bac +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 13 08:56:36 2010 -0700 + + XQuartz: Bump bundle version to 2.6.0 for xorg-server-1.9.0 and X11R7.6 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit b2b9c458a46e9a41c3c76ffe83a2b580a41d0e90 +Author: Jan Hauffa <hauffa@in.tum.de> +Date: Wed Jun 16 09:25:41 2010 -0700 + + XQuartz: Remove some dead code. + + Signed-off-by: Jan Hauffa <hauffa@in.tum.de> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 648d189548530fa23d97d1e8737f89d297f1c443 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 13 08:25:27 2010 -0700 + + XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some configs + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Fri Jul 9 10:36:56 2010 -0700 + + DRI2: re-allocate DRI2 drawable if pixmap serial changes + + If a pixmap header is modified or the drawable serial changes, some + aspects of the drawable are likely to have changed so we should + re-allocate the corresponding DRI2 drawable in that case. This is one + way of catching when the root window pixmap changes through xrandr. + + Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=28365. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 02b11509b25686ff7bd567ecb78a435701edc4c2 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Fri Jul 9 10:36:12 2010 -0700 + + miModifyPixmapHeader: always update serialNumber + + We should update the serial number even if we just change a single field. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2307ab5bc9365ebbe04568edb7c7620a23689b70 +Merge: c65280c fd4f505 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jul 6 23:54:54 2010 -0400 + + Merge remote branch 'whot/for-keith' + +commit fd4f5059f08165a726071dc9f1ca877038292f6f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 6 09:19:09 2010 +1000 + + dix: purge leftover manual key down bit setting. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a1afe172559aff010e886cfc2a7a922d4a06c697 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 6 09:16:42 2010 +1000 + + dix: add aux. functions for button_is_down, set_button_down, set_button_up. + + Same as the matching key functions. Buttons, like keys, can have two states + for down/up - one posted, one processed. Posted is set during event + generation (usually in the signal handler). Processed is set during event + processing when the event queue is emptied and events are being delivered to + the client. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 32473d6bf38c95b2d6d5ddbf583a1e801c6605e4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 6 08:56:12 2010 +1000 + + dix: use BitIsOn/SetBit/ClearBit macros for set_key_down helpers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit c18442908080c9833dfd6bb2ff367945d1892421 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 5 16:47:57 2010 +1000 + + Xi: use set_key_up/down instead of manual bit handling. + + We have the wrappers, use them. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 10442ce02b5be7f82b373bee1939e2b523e291d9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 5 16:54:48 2010 +1000 + + dix: treat flags as flags, not as value in key_is_down. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit b46ffd25d3f211e91c67bc618ecbd58257939388 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 2 15:25:14 2010 +1000 + + mi: rename miPointerMoved to miPointerMoveNoEvent. + + Having miPointerMove and miPointerMoved is confusing, especially since both + do the same thing bar the event delivery. Also, miPointerMove calls + miPointerMoved which indicates some confusion in the temporal alignment of + cause and effect. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit dbd621705a5211540b353af81c4af83c297b74dc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 2 14:22:03 2010 +1000 + + mi: De-duplicate some code in mipointer.c + + miPointerMoved already has the same code. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit c65280ce8df4836bd7424a90482e8aa00ab6f447 +Author: Robert Hooker <sarvatt@ubuntu.com> +Date: Sat Jun 12 20:23:09 2010 -0400 + + Increase advertised RENDER protocol minor version to 11 + + Support for the blend mode operators was added in + 0ce42adbf4cff9e7f049d9fc79d588ece5936177 + and the requirement was bumped but when things were split off into + include/protocol-versions.h it defined it to 10. render uses + the lower of the client and server advertised versions so it's not + using the new blend mode operators. + + Signed-off-by: Robert Hooker <sarvatt@ubuntu.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9f0b193acdc29e491b6245390cf9f53b5222e6d3 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 1 09:13:43 2010 -0400 + + miDbe window priv priv is pre-allocated, don't use dixSetPrivate (bug 28639) + + miDbeInit pre-allocates space in each DBE window private private for a + MiDbeWindowPrivPrivRec. miDbeAllocBackBufferName used the + pre-allocated space correctly (simply fetching it instead of + allocating a new piece of memory). However, it then called + dixSetPrivate anyways, which isn't necessary, and (in the new + dixPrivate world) causes an assert failure. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Magnus Kessler <Magnus.Kessler@gmx.net> + Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net> + +commit a94cb400d15b8c78dc04148cbd8db8e5ec8364b5 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 1 09:11:36 2010 -0400 + + Delete unused miDbe screen private private datatype + + MiDbeScreenPrivPrivRec is not used in the server. Remove it, along + with the MI_DBE_SCREEN_PRIV_PRIV macro that tried to use it. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Magnus.Kessler <Magnus.Kessler@gmx.net> + +commit f0fcffe55f280add5e4db2f5e9198a48c6f1b015 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jun 3 19:00:54 2010 -0700 + + Update the sprite immediately when moving it with MouseKeys + + Fix for OpenSolaris bug 6949755: Mouse Keys are ununusable + and possibly https://bugs.freedesktop.org/show_bug.cgi?id=24856 + + Ensures waitForUpdate is False before calling SetCursorPosition. + Normally waitForUpdate is False when SilkenMouse is active, True + when it's not. When it's True, the mouse cursor position on + screen is not updated immediately. + + This is more critical on Solaris, since we disabled SigIO, thus in turn + disable SilkenMouse, due to the SSE2 vs. signal handler issues described in + Sun bugs 6849925, 6859428, and 6879897. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3d9079b898c432a87f9b95c1f39a85f660bf0858 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jun 3 19:00:53 2010 -0700 + + Add API to update setting of waitForUpdate screen private in miPointer + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 69b2b5c85ec079ef49f84722daa5f148cedc2e1b +Merge: b90faa7 1432785 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 1 23:46:53 2010 -0400 + + Merge remote branch 'whot/for-keith' + +commit b90faa71567c4461b28515756ba5c1e6286dda16 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 1 23:46:27 2010 -0400 + + Revert "xkb: merge lockedPtrButtons state from all attached SDs." + + Preparing to merge Peter's branch. + + This reverts commit 6052710670953b43b4fff5d101b727163fcb1187. + +commit 9fb0785449b287ba1998e08613b3c2102ec24842 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 1 23:45:50 2010 -0400 + + Revert "Revert "dix: use the event mask of the grab for TryClientEvents."" + + Preparing to merge Peter's branch. + + This reverts commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b. + +commit 48cac27870992f6bde2c48429ff03c0a7606d5c1 +Author: James Jones <jajones@nvidia.com> +Date: Fri Jun 18 17:28:15 2010 -0700 + + Cast void* to pointer* to appease some compilers. + + When this privates.h is included in C++ builds, the compiler + complains about implicitly casting void* to void**. This small + patch fixes that up. + + Signed-off-by: James Jones <jajones@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 14327858391ebe929b806efb53ad79e789361883 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 1 12:44:57 2010 +1000 + + xkb: release XTEST pointer buttons on physical releases. (#28808) + + If a button release event is posted for the MD pointer, post a release event + through the matching XTEST device. This way, a client who posts a button + press through the XTEST extension cannot inadvertedly lock the button. + + This behaviour is required for historical reasons, until server 1.7 the core + pointer would release a button press on physical events, regardless of the + XTEST state. Clients seem to rely on this behaviour, causing seemingly stuck + grabs. + + The merged behaviour is kept for multiple keyboard PointerKey events, if two + physical keyboards hold the button down as a result of PointerKey actions, + the button is not released until the last keyboard releases the button. + + X.Org Bug 28808 <http://bugs.freedesktop.org/show_bug.cgi?id=28808> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a71dbc03e65cf7b0654a6eca93ce0bf6a1711ffa +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 1 08:27:05 2010 -0400 + + Bump to version 1.8.99.904 (1.9 RC4) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5ea497fc32202ff19c2b7d8ef4eba08889108a87 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jun 29 16:08:02 2010 +0300 + + xfree86: configure: remove vendor and card name matching rules + + Although vendor and board naming are used to create the configure file, the + server doesn't actually use it when fetching such file and probing devices. + + Reported-by: Richard Barnette <jrbarnette@chromium.org> + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Tested-by: Richard Barnette <jrbarnette@chromium.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 90fd9e40b59e69333d250a795998f44dc3a5dc0c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jun 29 16:08:01 2010 +0300 + + xfree86: pci: remove superfluous vendor and card name logging + + X server suffers in startup time when relying on the pciaccess's linear search + to fetch vendor and video device name from PCI ID file (when existent). Such + names are only used to write the log, which may be superfluous. This + information often is provided by the drivers or likewise users can get the it + using external tools like lspci or scanpci. + + This patch remove the references of those functions from X start up. + + Reported-by: Richard Barnette <jrbarnette@chromium.org> + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Richard Barnette <jrbarnette@chromium.org> + Reviewed-by: James Cloos <cloos@jhcloos.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 339f62b1bfadb0ee77d67e351f4e30f5d5e9625f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 29 15:24:51 2010 +1000 + + xkb: emulate PointerKeys events only on the master device. + + This patch replicates the behaviour for button events. Only generate a + PointerKeys motion event on the master device, not on the slave device. + Fixes the current issue of PointerKey motion events generating key events as + well. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 69ac909878ef80bb74c4a9ca4150eda66debd754 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 29 12:12:53 2010 +1000 + + xkb: merge lockedPtrButtons state from all attached SDs. + + Problem: + lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button + press. Unconditionally clearing the bits may cause stuck buttons in this + sequence of events: + + 1. type Shift + NumLock to enable PointerKeys + 2. type 0/Ins on keypad to emulate Button 1 press + → button1 press event to client + 3. press and release button 1 on physical mouse + → button1 release event to client + + Button 1 on the MD is now stuck and cannot be released. + + Cause: + XKB PointerKeys button events are posted through the XTEST pointer device. + Once a press is generated, the XTEST device's button is down. The DIX merges + the button state of all attached SDs, hence the MD will have a button down + while the XTEST device has a button down. + + PointerKey button events are only generated on the master device to avoid + duplicate events (see XkbFakeDeviceButton()). If the MD has the + lockedPtrButtons bit cleared by a release event on a physical device, no + such event is generated when a keyboard device triggers the PointerKey + ButtonRelease trigger. Since the event - if generated - is posted through + the XTEST pointer device, lack of a generated ButtonRelease event on the + XTEST pointer device means the button is never released, resulting in the + stuck button observed above. + + Solution: + This patch merges the MD's lockedPtrButtons with the one of all attached + slave devices on release events. Thus, as long as one attached keyboard has + a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey + button is released on all keyboards, the matching release event is emulated + from the MD through the XTEST pointer device, thus also releasing the button + in the DIX. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 09645864f5a52882eee51c801b3e610d683e7147 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 29 13:49:27 2010 +1000 + + xkb: Mark switch case fallthrough with comment. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c7330ecb5d28d7a92d24feb289f7f1812ce055a4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 30 13:23:14 2010 +1000 + + dix: fix up erroneous error message. + + (WW) Device 'device name' has 36 axes, only using first 36. + does seem a bit silly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dbf249ec6638f0a8dfa4c2286099845aafc8ac88 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 29 10:43:51 2010 +1000 + + xkb: remove now obsolete comment. + + Looks like nothing broke from removing the hardcoded CoreProcessPointerEvent + call. Whoop. Di. Doo. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f028e70ca714f6956e41754f132cb9b8a1e8db63 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 30 08:33:55 2010 -0700 + + Initialize dev privates before using any + + Initializing the dev privates code after allocating the server client + dev privates would cause the memory leak check to fire at server + startup or reset. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 433d0851cd3e61d841ff374ee0a0f052d5907029 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Jun 25 11:34:44 2010 +0100 + + Xephyr: fix Xv adaptor capability tests + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9626eedebf620559652ffb1fefa82b5d659e57be +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Jun 24 18:45:11 2010 +0100 + + configure: bail if Xephyr was requested but its dependencies are missing + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e6531ae9d5bdd37775e921268366fb76056e22d5 +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Jun 24 18:45:10 2010 +0100 + + Xephyr: fix memory leak in XF86DRIOpenConnection + + The allocated bus id string was not being freed. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 390a8466dd1914f4786b811ff8454f6e0c4b6b04 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Mon Jun 28 23:26:48 2010 +0300 + + xfree86/modes: Allow the driver to specify initial rotation + + When the "Rotate" option isn't specified allow the driver to specify + the initial rotation mode. This way the driver can choose to retain + the same settings that were used by software that was used prior to + starting X. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6052710670953b43b4fff5d101b727163fcb1187 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 30 08:21:04 2010 -0700 + + xkb: merge lockedPtrButtons state from all attached SDs. + + Problem: + lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button + press. Unconditionally clearing the bits may cause stuck buttons in this + sequence of events: + + 1. type Shift + NumLock to enable PointerKeys + 2. type 0/Ins on keypad to emulate Button 1 press + → button1 press event to client + 3. press and release button 1 on physical mouse + → button1 release event to client + + Button 1 on the MD is now stuck and cannot be released. + + Cause: + XKB PointerKeys button events are posted through the XTEST pointer device. + Once a press is generated, the XTEST device's button is down. The DIX merges + the button state of all attached SDs, hence the MD will have a button down + while the XTEST device has a button down. + + PointerKey button events are only generated on the master device to avoid + duplicate events (see XkbFakeDeviceButton()). If the MD has the + lockedPtrButtons bit cleared by a release event on a physical device, no + such event is generated when a keyboard device triggers the PointerKey + ButtonRelease trigger. Since the event - if generated - is posted through + the XTEST pointer device, lack of a generated ButtonRelease event on the + XTEST pointer device means the button is never released, resulting in the + stuck button observed above. + + Solution: + This patch merges the MD's lockedPtrButtons with the one of all attached + slave devices on release events. Thus, as long as one attached keyboard has + a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey + button is released on all keyboards, the matching release event is emulated + from the MD through the XTEST pointer device, thus also releasing the button + in the DIX. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 28e33ae6f69f716ece5d68e63fc52557236c5f6e +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Wed Jun 30 07:59:04 2010 -0700 + + OS support: fix writeable client vs IgnoreClient behavior + + When ResetCurrentRequest is called, or IgnoreClient is called when a + client has input pending, IgnoredClientsWithInput will be set. However, + a subsequent IgnoreClient request will clear the client fd from that fd + set, potentially causing the client to hang. + + So add an Ignore/Attend count, and only apply the ignore logic on the + first ignore and the attend logic on the last attend. This is + consistent with the comments for these functions; callers must pair + them. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27035. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 25 09:48:10 2010 +1000 + + Revert "dix: use the event mask of the grab for TryClientEvents." + + Behaviour of earlier X servers was to deliver the ButtonPress event + unconditionally, regardless of the actual event mask being set. Thus, a + GrabButton event will always deliver the button press event, a GrabKey + always the key press event, etc. Same goes for XI and XI2. + + Reproducible with a simple client requesting a button grab in the form of: + XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, None); + + On servers before MPX/XI2, the client will receive a button press and + release event. On current servers, the client receives only the release. + Clients that expect the press event to be delivered unconditionally may + leave the user with a stuck grab. + + XTS test results for XGrabButton are identical with and without this patch. + + This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc. + + Conflicts: + + dix/events.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1884db430a5680e37e94726dff46686e2218d525 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 24 12:52:53 2010 +1000 + + Revert "dix: use the event mask of the grab for TryClientEvents." + + Behaviour of earlier X servers was to deliver the ButtonPress event + unconditionally, regardless of the actual event mask being set. This is + documented in the protocol: + "This request establishes a passive grab. In the future, the pointer is + actively grabbed as described in GrabPointer, the last-pointer-grab time is + set to the time at which the button was pressed (as transmitted in the + ButtonPress event), and the ButtonPress event is reported if all of the + following conditions are true: + <list of conditions, event mask is not one of them>" + + Thus, a GrabButton event will always deliver the button press event, a + GrabKey always the key press event, etc. Same goes for XI and XI2. + + Reproducible with a simple client requesting a button grab in the form of: + XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, None); + + On servers before MPX/XI2, the client will receive a button press and + release event. On current servers, the client receives only the release. + Clients that expect the press event to be delivered unconditionally. + + XTS Xlib13 XGrabButton 5/39 now passes. + + This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc. + Effectively reverts commit 1c612acca8568fcdf9761d23f112adaf4d496f1b as well, + the code introduced with 1c612 is not needed anymore. + + Conflicts: + + dix/events.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 3b3c77b87070ddcdbb2acb114a81628485e7a129 +Author: Tiago Vignatti <tiago.vignatti@Nokia.com> +Date: Wed Jun 23 15:18:04 2010 +0300 + + configure: don't check xfont always for each server + + It's already defined inside REQUIRED_LIBS and all DDX are getting it already. + No semantical changes. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 75536ee80595c79bba95a1fb6844126ee08486d4 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Jun 23 15:18:03 2010 +0300 + + dix: use one single function to register fpe fonts + + X server doesn't need to understand fpe internals, so use + register_fpe_functions from libXfont. + + It's required to get new version of libXfont, therefore adjust it to be passed + to autoconf. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a68a101a730df7f73421555e381a50b074607c5e +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 22 12:13:26 2010 -0700 + + Bump to 1.8.99.903 -- 1.9 RC3 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2c0159d21788b16607e6ebe4571b57fe78545c2a +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Mon Jun 14 09:25:22 2010 -0400 + + list.h: Fix list_for_each_entry_safe() + + Can't use next as a macro argument since we're accessing the .next field + of struct list. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e2918b67395a48397bf7db545584cc2d4f4e7ccf +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 22 12:11:20 2010 -0700 + + Revert "mi: Remove unused overlay support" + + This reverts commit 9120e58556014e514eef9dfe43cdea4b74dc66ae. + + Whoops, please revert this patch -- overlay is in use in nvidia drivers, + and it's too late in release cycle to remove it. + + I feel really sorry that I kept this patch in my tree. I will submit + another one, removing only XAA overlay hooks which are not used at all. + +commit 7673451ade46ebacfdfc02a5190149210198fdd8 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 22 11:49:30 2010 -0700 + + Bump to 1.8.99.902 -- 1.9 RC2 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8b65f2edb407521e0ac0e207e5d5358986bd46da +Author: Rami Ylimäki <ext-rami.ylimaki@nokia.com> +Date: Tue Jun 22 14:57:20 2010 +0300 + + record: Prevent a crash on recording client disconnect. + + Execute the following steps to reproduce the issue. + + 1. Run at least two recording clients simultaneously. + $ cnee --record --request-range 1-127 & + $ cnee --record --request-range 1-127 & + 2. Kill the recording clients. + $ killall cnee + 3. Give X server something to do so that the clients are closed. + $ xinput list + $ xinput list + + As a result RecordUninstallHooks accesses NullClient, because + RecordAClientStateChange doesn't clean the recording clients up + properly. + + Fix RecordUninstallHooks to fail locally on an assertion instead of + much later in privates code, if NullClient is still accessed because + of some other bug. Fix RecordAClientStateChange to iterate through all + contexts so that modifications of the iterated array during iteration + don't cause contexts to be skipped. + + Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 660f6ab5494a728c3ca7ba00c305e9ff06c8ecb2 +Author: Simon Farnsworth <simon.farnsworth@onelan.com> +Date: Tue Jun 22 10:13:30 2010 +0100 + + Don't crash when asked if a client that has disconnected was local + + ProcDRI2Dispatch uses LocalClient to determine if it's safe to respond + to a client that has made DRI2 requests which aren't sensible for + remote clients (anything but version). When the client has disappeared + mid-request stream (e.g. as a result of a kill -9, or a client-side + bug), LocalClient causes the X server to follow suit, as + ((OsCommPtr)client->osPrivate)->trans_conn is NULL at this point. + + The simple and obvious fix is to just return "not local" when + trans_conn is NULL, which fixes the crash I was seeing; however Keith + Packard pointed out that just checking trans_conn isn't enough; + quoting Keith: + + "This looks almost right to me -- I reviewed the os code to see when + _XSERVTransClose is called (which is what frees the trans_conn data) and + found that every place which called that immediately set trans_conn to + NULL, except for the call in CloseDownFileDescriptor which is only + called from CloseDownConnection and which is immediately followed by + freeing the OsCommRec and setting client->osPrivate to NULL. So, I'd + suggest checking client->osPrivate in addition to the above check." + + Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 82d41ada993d8cbdcdfea878d1a5b031afe4e593 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Jun 21 16:33:55 2010 +1000 + + composite: fix freeing of old pixmap until after move/resize/cbw (bug 28345) + + The fixes for the composite reallocation failure, were freeing the oldpixmap + straight after reallocating the new one, however this led to some wierd + effects in e16 compositing, and I think in a few other places. This patch + moves the freeing of the pixmap into the post wrapped stage. I'm not sure if + we are actually better off breaking ABI and adding another callback from the + ConfigureWindow to composite to make sure the old pixmap is always freed, + but this should be satisfactory as we should always hit one of the freeing + paths or else its a bug in the DIX. + + bug: https://bugs.freedesktop.org/show_bug.cgi?id=28435 + + Reported-by: Andrew Randrianasulu <randrik@mail.ru> + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c6bc52cb6663138d1273447cb7661fa6e958f539 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Jun 21 14:08:50 2010 +1000 + + dri2: avoid crash with old dri drivers. + + I built latest server and copied over a mesa 7.8 dri2 driver to use with it, + and it crashed in here starting compiz. Looks like we need to validate the + flush extension is registered before calling invalidate. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 80d1a548d6ce73c2ff097536c1bc7044bf74965d +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Jun 21 10:05:08 2010 +1000 + + rotation: fix cursor and overlap of one pixel. + + Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix + a cursor off by one on Intel hw, however it also move the whole crtc + into an off by one position and you could see gnom-eshell overlapping. + + This commit reverts that and instead fixes the cursor hotspot + translation to work like pixman does. We add 0.5 to the cursor vector + before translating, and floor the value afterwards. + + Thanks to Soeren (ssp) for pointing out where the real problem was + after explaning how pixman translates points. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 32c706c4ffd7433dbfc79dba8785b1510d2f053f +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jun 20 20:37:26 2010 -0400 + + config: declare xserver private dependencies in xorg-server.pc + + Any module (drivers) depending on xserver also depends on some of the + server private dependencies. Any driver including xf86.h depends on + xext, kbproto, inputproto and randr. + + These dependencies are in separate packages, so anything can happen, + removal, wrong version, etc... and the driver fails during compilation. + Having the private dependencies declared will ensure all packages the + server depends on are present and at the correct version. + + Currently each module attempts to check for server dependencies with + various degrees of accuracy. With this patch, the driver will only need + to check for its own explicit dependencies. + + Now that xproto is included in Requires.private it is removed from Requires. + All the cflags from both Requires and Requires.private are returned + to caller to pkg-config. + + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 37734ba79ca3a9bad1c1e29d89710c8f9c299210 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Jun 16 18:07:04 2010 +0100 + + XWin: Fixes for devPrivates API change + + Fix some typos in devPrivates API changes in XWin code. + Move allocation of private keys as it's no longer valid to do them during OsVendorInit() + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f7dae972aac28c5792566e997c40254e787d246a +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Tue Jun 15 23:25:34 2010 +0300 + + xv: Don't send port notify when SetPortAttribute fails + + Currently a port notify event is sent even if SetPortAttribute + fails. Furthermore the value field in the event will contain the + value that was specified in the failed request. So any client + interested in the actual value of the attribute will have to + double check the current value with GetPortAttribute after + receiving a port notify event. + + Fix the problem by sending port notifications only when + SetPortAttribute succeeds. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c20166739603f86888f28ca2c65f5cf474d0d8c9 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jun 12 01:05:07 2010 +0700 + + os: Remove unused dev_tty_from_init variable + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 2e15f1903dac8473285ad2937c079a08cf7c5d31 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jun 12 00:53:38 2010 +0700 + + os: Remove unused pread/pwrite/lockit functions + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 9120e58556014e514eef9dfe43cdea4b74dc66ae +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jun 12 00:30:27 2010 +0700 + + mi: Remove unused overlay support + + The only reference to it in server and drivers is in XAA overlay code which + would segfault as no miInitOverlay is called ever. No segfaults were observed + "in wild", so XAA overlay is probably also unused. + + XAA code is modified to act as if miOverlayCopyUnderlay always returned false, + because XAACopyWindow8_32 could only set doUnderlay to true if it's called from + miOverlayMoveWindow or miOverlayResizeWindow, which can only be called if + miInitOverlay has hooked those functions, and no driver (on fd.o) or server code + calls that. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 91b5aadbdfd9d05ca1ffdeb443e602ecdba1e04d +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 11 20:20:00 2010 +0700 + + mi: do not use X11/extensions/shape.h header from libXext + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Tested-by: Dan Nicholson <dbn.lists@gmail.com> + +commit b8615d592700b7be319c04cc0563fdeb5a266534 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Jun 12 08:19:16 2010 -0700 + + Don't coredump on "X -showopts" (bug 25874) + + Don't try walking the xf86ConfigLayout.screens table if it's empty + https://bugs.freedesktop.org/show_bug.cgi?id=25874 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 32fd57509c3e06f63ac6b0ad607767fd2b688e5a +Author: Rami Ylimäki <ext-rami.ylimaki@nokia.com> +Date: Fri Jun 18 12:40:58 2010 +0300 + + record: Register client private to prevent crash. + + Running the following command causes an assertion to fail: + cnee --record --request-range 1-127 + + 3 in dixGetPrivateAddr at ../../include/privates.h:122 + 4 in dixGetPrivate at ../../include/privates.h:137 + 5 in dixLookupPrivate at ../../include/privates.h:167 + 6 in RecordInstallHooks at ../../record/record.c:911 + 7 in ProcRecordEnableContext at ../../record/record.c:2377 + 8 in ProcRecordDispatch at ../../record/record.c:2571 + 9 in Dispatch at ../../dix/dispatch.c:432 + 10 in main at ../../dix/main.c:289 + + Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> + Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 75beadd766fed7b12a76e59e57c244e297c2d2cb +Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> +Date: Sun Jun 13 18:05:26 2010 +0200 + + DRI2/xserver: Don't hang in glXSwapBuffers if drawable moves between crtc's (bug 28383) + + Detect if a drawable has been moved from an original crtc to a new crtc + with a lower current vblank count than the original crtc inbetween + glXSwapBuffers() calls. Reinitialize drawable's last_swap_target + before scheduling next swap if such a move has taken place. + + last_swap_target defines the baseline for scheduling the next swap. + If a movement between crtc's is not taken into account, the swap may + schedule for a vblank count on the new crtc far in the future, resulting + in a apparent "hang" of the drawable for a long time. + + Fixes Bugzilla bug #28383. + + Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 868bf3de478fac0080d525137fc728c551c78ea6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 15 13:22:20 2010 +1000 + + dix: the default axis mode is Relative, not "0". + + Yay for readability. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + +commit db0d3d4e573c93a8af43499682ed788c7bd0d70d +Author: Xiaoyang Yu (Max) <max.a.yu@intel.com> +Date: Fri Jun 4 17:17:53 2010 +0800 + + Re-enabled Xnest fix for focus in + modifier bug. + + * See https://bugs.freedesktop.org/show_bug.cgi?id=3030 + + Signed-off-by: Xiaoyang Yu (Max) <max.a.yu@intel.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + + This takes the xnest way of working around this (see + 5904ef2ccd6056b187ca76f104c21e2d686bfc1d "xnest: restore + xnestUpdateModifierState") and copies it to Xephyr. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 505724c5f3e4fc1475fa54f20d08c0c06fb32443 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 7 16:28:34 2010 -0700 + + In DRI2Connect, check to see if DRI2 has been initialized (bug 28424) + + This prevents DRI2GetScreen from being invoked with an uninitialized + private key which would cause an assert failure. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: David Ronis <David.Ronis@McGill.CA> + +commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 7 22:56:04 2010 -0700 + + Clean up RandR12 bits on screen close (bug 27114) + + When resetting the server, pScrn->EnterVT must be unwrapped or the + next server generation will end up wrapping the wrapper and causing an + infinite recursion on EnterVT. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Michael Stapelberg <michael+freedesktop@stapelberg.de> + +commit d5ab717768524c8552b81607aaeffb447ab268ee +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 10 19:21:18 2010 -0700 + + Bump to 1.8.99.901 -- 1.9 RC1 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a41d6e9bffbe56cfa1c3b84388a3d9f5a982f1a9 +Merge: 7e8f100 f4190fe +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jun 11 10:08:13 2010 -0700 + + Merge remote branch 'dottedmag/for-keithp' + +commit 7e8f1001217326cc451974bacf25275420c4bb4e +Author: Éric Piel <E.A.B.Piel@tudelft.nl> +Date: Fri Jun 11 09:16:32 2010 -0700 + + exa: fix ExaCheckCopyNtoN for exa_classic when source = dest + + In case you want to copy a region with source = dest, you have the same pixmap + as source and dest. + + At the end of exaPixmapIsOffscreen_classic() the devPrivate.ptr is reset to + NULL (look at the sources). + + Now this is what happens in ExaCheckCopyNtoN: + + exaPrepareAccess( pDst ); + Calls IsOffscreen() + sets devPrivate.ptr to NULL + sets up devPrivate.ptr to real pointer + Everything OK + exaPrepareAccess( pSrc ); + Calls IsOffscreen() + sets devPrivate.ptr to NULL + BAILS OUT CAUSE OF NESTED OPERATION SINCE DST EQUALS SRC + + We end up with devPrivate.ptr as NULL, and that is clearly wrong. + + In particular this fixes a segfault when using the psb driver (bug 28077) + + Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f4190feb25ecc3d8278decc8bf28a5ef0e568942 +Author: Matt Turner <mattst88@gmail.com> +Date: Thu Jun 10 04:08:54 2010 +0700 + + Remove more superfluous if(p) checks around free(p) + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 89bd05106e5823fc5cfca9abf082729f2444363b +Author: Matt Turner <mattst88@gmail.com> +Date: Fri Jun 4 21:09:35 2010 -0400 + + record: move free() to after last use of pContext + + No functional change, since free doesn't change the value of the pointer + passed to it, but it makes this code less confusing. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit a54a766dfb39fb3df671045878ac706215d83cef +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jun 7 03:19:03 2010 +0700 + + xkb: replace xstrdup with strdup in Win32System + + The only caller of Win32System is XkbDDXCompileKeymapByNames. Add allocation + check there to avoid passing NULL pointers to various functions down the code. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6e7417c342b0624e3f3c5686bb43026786423692 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 17:05:35 2010 +0700 + + config: Replace xstrdup with strdup in add_option() + + All callers of add_option pass string literal as "key" argument + except one, where non-NULL condition is guarded by if(). + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e4570f5db5157f4233454c938733a2a0d6a1cb8f +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 17:01:42 2010 +0700 + + xfree86: Get rid of xstrdup when argument is definitely non-NULL + + ditto for XFree86 + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 416d228481d71204cf9bfad3ab4773abc4757f79 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 17:01:25 2010 +0700 + + xquartz: Get rid of xstrdup when argument is definitely non-NULL + + ditto for XQuartz + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit eea286f2b9e4b1acf2b1c9800f5a4bc7c3fa968d +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 17:01:05 2010 +0700 + + xwin: Get rid of xstrdup when argument is definitely non-NULL + + ditto for XWin + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit dd45b7d74696cd4fe9545852640a3c2e66a808fd +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 17:00:46 2010 +0700 + + kdrive: Get rid of xstrdup when argument is definitely non-NULL + + ditto for Kdrive + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 16158366954d945db6263f6de505fc02ee03c6cd +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 17:00:15 2010 +0700 + + dmx: Get rid of xstrdup when argument is definitely non-NULL + + ditto for DMX + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 6592db6bb526f0c43b4c7b55859c629709e039b4 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 16:58:58 2010 +0700 + + Get rid of xstrdup when argument is definitely non-NULL + + Replace xstrdup with strdup when either constant string is + being duplicated or argument is guarded by conditionals and + obviously can't be NULL + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 620ca54aaa0b363fcf68cec1bd6c37e68c988352 +Merge: fd69234 8ff9b50 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 10 19:18:53 2010 -0700 + + Merge remote branch 'alanc/master' + +commit fd69234db004e98c663f5c6c4360d2cecaa8a4df +Author: Keith Packard <keithp@keithp.com> +Date: Sun Jun 6 15:21:28 2010 -0700 + + Ignore RandR timestamps harder + + Checking timestamps in post 1.1 randr requests was never a good idea, + let's ignore them and just make the configuration changes. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Chase Douglas <chase.douglas@canonical.com> + +commit a8ec9eca850f2a7ad4c5cf31c1c011c120688496 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 7 13:39:11 2010 -0700 + + Fix a couple more possible errors with input-only windows + + Using type == DRAWABLE_WINDOW to differentiate between pixmaps and + windows isn't sufficient as input-only windows will end up in the + pixmap case. This patch changes a few more code paths to use + WindowDrawable instead. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 8ff9b502cfce3828f7855ffba7949d6ebee34031 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jun 4 08:44:02 2010 -0700 + + Solaris: avoid memory leak if AGPIOC_INFO ioctl fails + + Move malloc after ioctl, so we don't have to worry about free'ing the + memory if the ioctl fails. + + [ This bug was found by the Parfait bug checking tool. + For more information see http://research.sun.com/projects/parfait ] + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit c5eb5d69e5183860185a05cfcce16af635cab9aa +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jun 3 19:28:43 2010 -0700 + + Record some additional library dependencies in xf86 modules + + Helps with symbol resolution when building with -z defs + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 1c08a37e0eb4746e8974eb7a70ca4b7b84712963 +Author: Sam Lau <sam.lau@oracle.com> +Date: Thu Jun 3 19:17:14 2010 -0700 + + SecurityResource should not segfault when client owning resource has exited + + Fixes OpenSolaris bug 6949754: + Xorg crashes when the magnifier is enabled at gdm login greeter window. + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6949754 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 07a093add0b7e40c4d9b9b59273e3ff9e14a88a7 +Merge: 84190d2 dc61448 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 10 18:39:10 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit dc614484f93b67e8b62dbb1bb2fd247fe5a4c850 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 10 12:21:36 2010 +1000 + + Xi: don't copy the modifier key count when copying device classes (#25480) + + The modifier key count is maintained by the XKB layer and + increased/decreased for all modifiers that set state. + + Test case, MD/SD modifier key count in comment: + 1. keyboard 1: press and hold Shift_L # SD:1 MD:1 + 2. keyboard 2: press and release Shift_L # SD:1,0 MD:1,0 + <class copy happens> # SD:1 MD:1 + 3. keyboard 1: release Shift_L # SD:0 MD:1 + 4. keyboard 1: press and release Shift_L # SD:1,0 MD:2,1 + + The modifier is now logically down on the MD but not on keyboard 1 or + keyboard 2. + + XKB is layered in before the DIX, it increases/decreases the modifier key + count accordingly. In the above example, during (2), the MD gets the key + release and thus clears the modifier bit. (3) doesn't forward the release to + the MD because it is already cleared. The copy of modifierKeysDown when the + lastSlave changes however increases the counter for the held key. On (4), + the press and release are both forwarded to the MD, causing a offset by 1 + and thus do not clear the logical modifier state. + + X.Org Bug 25480 <http://bugs.freedesktop.org/show_bug.cgi?id=25480> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 7805e45284264b4cd286eece02e85426896e9f7b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 10 14:31:48 2010 +1000 + + config: remove redundant DBUS API define, require dbus-1 >= 1.0 + + It's still being pulled in by the HAL CFLAGS but the requirement to define + this was dropped from DBus pre 1.0 (November 2006). + This means we require dbus 1.0 now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 66b21b2f455a1dfbc92f7caa571dcff3f3765808 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:58 2010 -0700 + + xfree86: Match devices based on current driver setting + + Often we want to apply a driver specific option to a set of devices and + don't care how the driver was selected for that device. The MatchDriver + entry can be used to match the current driver string: + + MatchDriver "evdev|mouse" + Option "Emulate3Buttons" "yes" + + The driver string is a case sensitive match. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a71bdff47d4cc80da6ceeb548db1dcc8e8b59702 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:57 2010 -0700 + + xfree86: Allow multiple InputClass Match* entries for && matching + + Currently when there multiple InputClass entries of the same type, only + the last entry is used and the previous ones are ignored. Instead, + multiple entries are used to create multiple matching conditions. + + For instance, an InputClass with + + MatchProduct "foo" + MatchProduct "bar" + + will require that the device's product name contain both foo and bar. + This provides a complement to the || style matching when an entry is + split using the "|" token. + + The xorg.conf man page has added an example to hopefully clarify the two + types of compound matches. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 842625928632ae767b0689fcdb5103c1779a4c91 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:56 2010 -0700 + + config: Script to convert HAL fdi settings to InputClass sections + + In the new world of udev and InputClass, x11_* settings from HAL fdi + files will not be honored. This script converts those settings into + valid InputClass sections that can be dropped into xorg.conf.d. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 87a1507da7e7788232d74285ef377b67b70e0fa4 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Thu Jun 10 06:15:41 2010 -0700 + + xfree86: Match devices based on USB ID + + Sometimes the vendor and product names aren't specific enough to target + a USB device, so expose the numeric codes in the ID. A MatchUSBID entry + has been added that supports shell pattern matching when fnmatch(3) is + available. For example: + + MatchUSBID "046d:*" + + The IDs are stored in lowercase hex separated by a ':' like "lsusb" or + "lspci -n". + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 645679c1523eee7028f3244cee57936b93326a2a +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Thu Jun 10 06:11:10 2010 -0700 + + xfree86: Match devices based on PnP ID + + Serial input devices lack properties such as product or vendor name. This + makes matching InputClass sections difficult. Add a MatchPnPID entry to + test against the PnP ID of the device. The entry supports a shell pattern + match on platforms that support fnmatch(3). For example: + + MatchPnPID "WACf*" + + A match type for non-path pattern matching, match_pattern, has been added. + The difference between this and match_path_pattern is the FNM_PATHNAME + flag in fnmatch(3). + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 84190d20954ef7888e4d96832c2a4b3225b4dfa2 +Merge: 4172aa1 5e1ef1f +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 10 13:36:35 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 4172aa137c1b9b6f2a25c320d847af1f5ac56fba +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 10 07:15:49 2010 -0700 + + dri2: Only deal with output windows and pixmaps. + + This reverts commit fdb081b430ddffb495aa5b05bcc4cf10882ff4b2 + "dri2: Deal with input-only windows by using WindowDrawable()" + and replaces it as follows: + + Reject the creation of a DRI2 drawable for UNDRAWABLE_WINDOW (input-only + windows) and DRAWABLE_BUFFER (whatever those are) drawables and only look up + privates for the supported drawable types. + + The rest of the the code can continue pretending there's only output windows + and pixmaps, which are the only kinds of drawables relevant for DRI2. + + Fixes server crash with GLX compositing managers such as compiz or kwin, due + to looking up a window private for a pixmap and getting a bogus pointer. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 353e32d3712f3a883a796ba562ec9fb5a8354837 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun Jun 6 06:42:11 2010 -0700 + + glxdriswrast bugfix: configure swapgc, not gc. + + I got this wrong in e2929db7b737413cf93fbebdf4d15abdfebff05c. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b3548612c7943011f79a910f9a59bb975984d8a6 +Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> +Date: Sat Jun 5 13:09:28 2010 +0200 + + DRI2: Don't return junk reply instead of blocking in glXWaitForSbcOML() + + DRI2WaitSBC() didn't block if requested targetSBC wasn't yet reached. + + Instead it returned a xreply with uninitialized junk return values, then + blocked the connection until targetSBC was reached. + + Therefore the client didn't block, but continued with bogus return + values from glXWaitForSbcOML. + + This patch fixes the problem by implementing DRI2WaitSBC similar + to the clean and proven DRI2WaitMSC implementation. + + Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7287ef9e6cf953066e4a092cca9d0e4a279172bf +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sun Jun 6 21:18:40 2010 +0700 + + Remove unnecessary parentheses around return values in functions + + This patch was generated by the following Perl code: + + perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d1b4beecbc16448282dcc825dd5c354e96e48eca +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:53 2010 -0700 + + xfree86: Add MatchOS InputClass entry for operating system matching + + Allow InputClass sections to match against the running operating system + to narrow the application of rules. An example where this could be used + is to specify that the default input driver on Linux is evdev while it's + mouse/kbd everywhere else. + + The operating system name is the same as `uname -s`, and matching is + case-insensitive. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9b30fa9f8fedb7ddb5672f93ed1a154d13578c47 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:52 2010 -0700 + + xfree86: Refactor InputClass matching code + + InputClassMatches was starting to get a little hairy with all the loops + over the tokenized match strings. This adds code, but makes it easier to + read and add new matches. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Jamey Sharp <jamey at minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d09bc8f8e5bb92899f7c90eab6b0907920c7d643 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:51 2010 -0700 + + xfree86: Constify InputClass functions + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 61c35d8ac4b6423caf2dcecb4ff25baaaaa14b1c +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:50 2010 -0700 + + config/hal: Missing newline in log message + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 697c5b010d7f6df0ec9cae6352b125c4cbdbaad3 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:49 2010 -0700 + + config/udev: Add verbose info when fetching udev properties + + Give the user a chance to see why their input devices are being ignored, + even if they have to start the server with -logverbose. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 94547b2d1448232ae316c228d65482cc0b646ac2 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Jun 7 20:39:48 2010 -0700 + + config/hal: don't leak the input.tags property + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5e1ef1f4dde4615498c1c5e7a4e422c3b3432fe8 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jun 8 13:01:10 2010 -0700 + + XQuartz: Add more sanity checking around string manipulation for xmodmap + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 0be81f9a163f2838448caee41b2dda274d73391a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Jun 6 16:31:19 2010 -0700 + + XQuartz: Fix build regression from faeebead7bfcc78535757ca7acc1faf7554c03b7 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit b3a7b229e1e1f212bdd185af5443311091824005 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 7 21:49:43 2010 -0700 + + Make DRI_SCREEN_PRIV just return NULL when DRI isn't initialized + + The code relied upon the previous devPrivate implementation which + offered this convenience. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f7af00e9f0e0e1d854b0e882378c032518ab71ca +Author: Ben Skeggs <bskeggs@redhat.com> +Date: Mon Jun 7 10:21:18 2010 +1000 + + randr: prevent an unnecessary screen resize with multiple displays + + crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we + calculate too small an area for the initial framebuffer and force a resize + to happen. + + This commit fixes the code to use desired{X,Y} instead, which contains the + initial output positions. + + Signed-off-by: Ben Skeggs <bskeggs@redhat.com> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8e97e5f9425639ad0a084150d0b232cad417595d +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 7 14:23:47 2010 -0700 + + If XTest is always required, then eliminate the XTest devPrivate + + The internals of XTest are used by Xi and Xkb, and both Xi and Xkb are + always required, so it makes little sense to have XTest place data in + a devPrivate, especially a devPrivate which is only available when the + XTest extension is enabled. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fdb081b430ddffb495aa5b05bcc4cf10882ff4b2 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 7 00:54:18 2010 -0700 + + dri2: Deal with input-only windows by using WindowDrawable() + + Input only windows aren't DRAWABLE_WINDOW, but casting them to a + PixmapPtr is a bit harsh, and unlikely to get the appropriate privates + structure. use WindowDrawable instead which checks for both + input-output and input-only windows. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Eric Anholt <eric@anholt.net> + +commit bc26665661565918af484ccd17caad951010df60 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Jun 6 20:45:53 2010 -0700 + + Initialize private keys in test suite + + Make sure all of the private keys used by the test code are + initialized before being used. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Robert Hooker <sarvatt@ubuntu.com> + +commit f03be727d647183a2176355ad0ac9a6735067be9 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Jun 6 16:04:42 2010 -0700 + + Place glyph privates at correct location within the allocate storage + + A glyph allocation consists of : + + GlyphRec + numScreens * PicturePtr + glyph privates + + Tell the dix private bits to start past the picture pointers. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> + +commit 67b824a81bb8254827023de351a4a094031f0e94 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sun Jun 6 20:37:07 2010 +0700 + + randr: Make deletion of output properties more robust + + Previously there was two branches of code with small discrepancies between them + (especially prop->valid_values field was not free(3)ed). Extract the common + routine and fix double-free prop->valid_values in RRDestroyOutputProperty by + the way. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 0a4d8cbdcd7b25313fb29ccdb498044af95f7de6 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sun Jun 6 15:28:30 2010 +0700 + + Remove more superfluous if(p) checks around free(p) + + This patch has been generated by the following Coccinelle semantic patch: + + @@ + expression E; + @@ + + -if(E) { free(E); } + +free(E); + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 5a0fc0ad21d562612676ef88ef2d533b2391810a +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 15:35:31 2010 +0700 + + Replace deprecated bzero with memset + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Marcin Baczyński <marbacz@gmail.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit f9810ba914877b379cb36f1b9755f7923ceca14c +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 14:26:31 2010 +0700 + + xkb: Remove superfluous if(x) x = realloc(x, sz); else x = malloc(sz); logic + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Marcin Baczyński <marbacz@gmail.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 77ea20895ca1d163e14c6b767d8c287c94ba3114 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Fri Jun 4 14:22:06 2010 +0700 + + xkb: Remove superfluous if(p) checks around free(p) + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 5d4e2c594059ffb536c8e506c2623320d3c6a787 +Merge: eacc421 793dd39 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 5 22:20:28 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 793dd399468ff3ba22ffa9c62fa54fc87261fbe7 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 15:08:38 2010 -0700 + + dmx: Split glx scalar swap variables from array swap variables. + + This makes hw/dmx/glxProxy/unpack.h more closely resemble glx/unpack.h, + and fixes the "unused variable 'swapEnd'" and "unused variable 'swapPC'" + warnings. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit eacc42132ed0f1e8f4a4d65a4b6637ab06f7e2aa +Author: Kim Woelders <kim@woelders.dk> +Date: Fri Jun 4 20:20:47 2010 +0200 + + dix: Remove test for obsolete NO_XINERAMA_PORT macro. + + Signed-off-by: Kim Woelders <kim@woelders.dk> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a0fe6987b55b5326157b50e169b8d6b9ae26a1ae +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Jun 5 20:55:29 2010 -0700 + + Clean up after removal of screen parameters from region macros. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 424b593c7872a703d3d0c942b7e8acc0770eb023 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 5 21:34:51 2010 -0700 + + Damage pixmap private key was being mis-registered as a picture key + + This would cause all kinds of fun, in particular Xnest would crash at startup. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9c121ae45ae1d2ebd892c45e1631716ef5e7d649 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 5 21:34:27 2010 -0700 + + Register Xnest colormap screen private key + + This key is used to store the currently installed colormap and must be + registered before we can use it. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit df534d05208436e9ca8c9b42acff3fbe240e3ec4 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 5 21:24:54 2010 -0700 + + Make GetPictureScreenIfSet check if Render is running + + This macro originally checked to see if the Render screen private + index had been allocated. When the privates were changed the first + time, there wasn't any need to check as dixLookupPrivate would simply + return NULL in that case. Now that we care, check to see if the key + has been initialized before asking for the value. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e7fc8b32e41e10c057d2787fcc377296be67f2e9 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 5 21:08:01 2010 -0700 + + Move the shadow screen private key initialization to shadowSetup + + Some users of the shadow code don't call shadowInit, just shadowSetup + and so make sure the key is initialized there. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6bd5f0d75bca727c4686b20eee166c8cae472ba2 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 5 21:07:15 2010 -0700 + + Fix exa_priv.h declarations of privates + + exa_priv.h exposes the privates to the rest of the exa code, and yet + the declarations of the privates wasn't fixed when the exa.c versions were. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6b306f43384e5c2143197e746a5a39c4ebb2583c +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 5 20:58:04 2010 -0700 + + kdrive: Xv code uses shared screen private instead of kdrive-specific private + + When doing the devPrivate API conversion, I missed this as there was + also a local private key which wasn't ever used. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ab07e2b8ededaa2193fc199a8c09623d84032280 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 19:38:48 2010 -0700 + + Allocate per-screen device/cursor-bits private keys in midispcur + + midispcur was abusing the CursorScreenKey to index the cursor_bits + privates, it also had a MAXSCREENS array of keys to index device + privates. Switch both of these to the new dixCreatePrivateKey API and + store a pointer to that in the screen private. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 34db537907c6cb2635dbefdce7dcfcae90f7c902 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 19:36:33 2010 -0700 + + Add dixCreatePrivateKey API + + Keys need to persist through server reset so that the private system + can be cleaned up in dixResetPrivates. In particular, this means that + keys cannot live in objects freed at reset time. This API provides + suitable object lifetime by having the privates code free the key in + the reset path. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 495fc3eb2d6c98bde82ae1278f89fcf131fd9bf8 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 19:38:38 2010 -0700 + + Change devPrivates implementation. + + Each key now declares which object type it belongs to, this permits + keys for different types to share the same offset within the allocated + privates. As a special case for XSELinux, a key may be allocated as + PRIVATE_XSELINUX which will allow it to continue to be used across the + relevant object types. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit faeebead7bfcc78535757ca7acc1faf7554c03b7 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 26 17:22:21 2010 -0700 + + Change the devPrivates API to require dixRegisterPrivateKey + + This patch only changes the API, not the implementation of the + devPrivates infrastructure. This will permit a new devPrivates + implementation to be layed into the server without requiring + simultaneous changes in every devPrivates user. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit c865a24401f06bcf1347d8b41f736a066ab25693 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 22:05:27 2010 -0700 + + Create separate private key for midispcur cursor bits + + The CursorScreenKey array is supposed to be used by the DDX for cursor + private data, but midispcur was abusing it to hold cursor bits private + information. Create a separate set of privates for the dispcur cursor + bits information. + + This also renames the device private index and macros to better + reflect their usage: + + miDCSpriteKey -> miDCDeviceKey + MIDCBUFFER -> miGetDCDevice + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 431781a921251d54782f0a4f194bbef1fabd1380 +Author: Keith Packard <keithp@keithp.com> +Date: Sat May 15 14:52:39 2010 -0700 + + Remove dixRegisterPrivateOffset; hard-code devPrivates offsets instead + + For predefined resource types, the offset of the devPrivates field was + already kept in a constant table. The only non-predefined type needing + this treatment was dbeDrawableResType, which is just a magic alias for + RT_PIXMAP. + + This patch special-cases looking up RC_DRAWABLE offsets and uses the + table directly for everything else. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 7ef612de784daaed09ba13f4615c10714614033f +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 21 12:35:29 2010 -0700 + + Add REGION_ macros for source compatibility with existing drivers. + + This makes the region code changes source compatible with existing + code, although none of them are used within the server source itself. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 965cade6ee7c226f850e806cb2e910793d1536f9 +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 21 12:18:22 2010 -0700 + + Change region implementation from macros to inline functions. + + This makes all of the previous macros into inline functions and also + turns all of the direct calls to pixman region code into inline + functions as well. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2dc138922b7588515d5f2447e4b9dcdc0bef15e0 +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 21 15:05:48 2010 -0700 + + Rename region macros to eliminate screen argument + + This is a combination of a huge mechanical patch and a few small + fixups required to finish the job. They were reviewed separately, but + because the server does not build without both pieces, I've merged + them together at this time. + + The mechanical changes were performed by running the included + 'fix-region' script over the whole tree: + + $ git ls-files | grep -v '^fix-' | xargs ./fix-region + + And then, the white space errors in the resulting patch were fixed + using the provided fix-patch-whitespace script. + + $ sh ./fix-patch-whitespace + + Thanks to Jamey Sharp for the mighty fine sed-generating sed script. + + The hand-done changes involve removing functions from dix/region.c + that duplicate inline functions in include/regionstr.h, along with + their declarations in regionstr.h, mi.h and mispans.h. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d17e726e89ef644310de77b960b715c2d11088da +Author: Keith Packard <keithp@keithp.com> +Date: Sat May 22 00:09:47 2010 -0700 + + Move mi/miregion.c to dix/region.c + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9b6f5f549dfe4c20e3cb3c2ef7095ab47abaca3b +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 21 11:14:59 2010 -0700 + + Change region implementation names to eliminate the 'mi' prefix + + This prepares the file to be moved from mi to dix. This patch + was done mechanically with the included scripts 'fix-miregion' run over + the entire X server and 'fix-miregion-private' run over + include/regionstr.h and mi/miregion.c. + + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1768e51976ae8949d999309bd2384ccad72deecd +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Jun 5 15:58:21 2010 -0700 + + rootless: Fix SetShape regression + + This fixes a regression in miext/rootless from 643cb6e87c10ab554c03ada81930001a8ebcc909 + + Found-by: tinderbox + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6b4af3b7925978cd79f717761f1b6f33bd8dfbaf +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Fri Jun 4 16:27:28 2010 +0300 + + configure: Check for libsha1.pc + + xserver fails to detect libsha1. Problem is that configure checks for + sha1.pc when libsha1 provides libsha1.pc. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d163266692235261e1e0cfa6b900f54e6ec63de5 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jun 3 18:59:04 2010 -0700 + + Stop searching for XF86Config files + + xorg.conf has been used since the X11R6.7 release in April 2004. + 6 years has been a generous transition period for users to + "mv XF86Config xorg.conf" and for distros to update their + configuration tools and packages. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: James Cloos <cloos@jhcloos.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 01c75522b6ed15e979347acd38e234e2cb9006c3 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jun 3 18:59:03 2010 -0700 + + Stop searching for XF86Config files + + xorg.conf has been used since the X11R6.7 release in April 2004. + 6 years has been a generous transition period for users to + "mv XF86Config xorg.conf" and for distros to update their + configuration tools and packages. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: James Cloos <cloos@jhcloos.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7f19a7a6e90a4fd7b7ec0256974f62e575218541 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 4 14:15:04 2010 +1000 + + xkb: fix invalid memory writes in _XkbCopyGeom. + + Classic strlen/strcpy mistake of + foo = malloc(strlen(bar)); + strcpy(foo, bar); + + Testcase: valgrind Xephyr :1 + + ==8591== Invalid write of size 1 + ==8591== at 0x4A0638F: strcpy (mc_replace_strmem.c:311) + ==8591== by 0x605593: _XkbCopyGeom (xkbUtils.c:1994) + ==8591== by 0x605973: XkbCopyKeymap (xkbUtils.c:2118) + ==8591== by 0x6122B3: InitKeyboardDeviceStruct (xkbInit.c:560) + ==8591== by 0x4472E2: CoreKeyboardProc (devices.c:577) + ==8591== by 0x447162: ActivateDevice (devices.c:530) + ==8591== by 0x4475D6: InitCoreDevices (devices.c:672) + ==8591== by 0x4449EE: main (main.c:254) + ==8591== Address 0x6f96505 is 0 bytes after a block of size 53 alloc'd + ==8591== at 0x4A0515D: malloc (vg_replace_malloc.c:195) + ==8591== by 0x6054B7: _XkbCopyGeom (xkbUtils.c:1980) + ==8591== by 0x605973: XkbCopyKeymap (xkbUtils.c:2118) + ==8591== by 0x6122B3: InitKeyboardDeviceStruct (xkbInit.c:560) + ==8591== by 0x4472E2: CoreKeyboardProc (devices.c:577) + ==8591== by 0x447162: ActivateDevice (devices.c:530) + ==8591== by 0x4475D6: InitCoreDevices (devices.c:672) + ==8591== by 0x4449EE: main (main.c:254) + + Reported-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by-and-apologised-for: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 959a1eaf1c15a691141f1b0dc53757fe9b6e9b13 +Author: Dave Airlie <airlied@redhat.com> +Date: Fri Jun 4 11:09:46 2010 +1000 + + composite: use config notify hook to do pixmap resize. + + Since reallocating the backing pixmap can fail, we need to try and do + it before any other side effects of reconfiguring the window happen. + + This changes the ConfigNotify hook to return status, and moves the + composite window reconfiguration wrappers to ConfigNotify. They all + basically did the same thing, so we can drop the MoveWindow, + ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do + all the work. If reallocation fails we fail before we send any + confiureNotify events, or enter the area we can't recover from. + + The only place we now enforce 32k limits are in EXA/UXA/fb, so drivers + that don't use this should probably deal with it in their pixmap + allocate if they don't already. + + This also breaks ABI, so we need an alternate fix for older servers, + working on the X server makes me realise why I'm a kernel hacker. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0f12e86e600522768f5f64eafc1230526e700ab7 +Merge: aa7c09f f114f54 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 3 15:09:32 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit f114f54986aca1add4c8808a05d9692e289547e7 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri Apr 23 19:33:49 2010 -0700 + + Accumulate graphics exposures incrementally in PanoramiXCopyArea/Plane. + + This fuses two loops in each function, eliminating an intermediate + MAXSCREENS-sized array from each. + + Aside from being more efficient, I believe this is equivalent to the + previous implementation, since + - each per-screen GC has the graphicsExposures flag set the same way, + and + - the REGION_* macros ignore their screen argument. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) + +commit a7c7ebe4b3a0df1a4d1ffe3c690cfb21470f103d +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 22 21:13:48 2010 -0700 + + Delete XineramaScreenRegions cache. + + Every screen region consists of a single rectangle, so initializing a + stack-allocated region for each screen on-demand does no heap allocation + and is fast. + + This eliminates a MAXSCREENS-sized array. + + The REGION_UNINIT calls are no-ops since no boxes are actually allocated + for a single-rectangle region, but it seemed wiser to include them. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) + +commit a0456da339fa9b3c3e6fead060338ee7348d6460 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun May 23 12:57:52 2010 -0700 + + XineramaSetCursorPosition: use screen bounds directly, not POINT_IN_REGION. + + This hides a MAXSCREENS-sized array as an implementation detail of + panoramiX.c rather than an exported global. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) + +commit a83cff9f4d622b069c96a68b4e87a669bf1f6446 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun May 23 10:11:47 2010 -0700 + + Move each screen's x/y origin into ScreenRec. + + Many references to the dixScreenOrigins array already had the + corresponding screen pointer handy, which meant they usually looked like + "dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead + of keeping this information in a parallel array simplifies those + expressions, and eliminates a MAXSCREENS-sized array. + + Since dix declared the dixScreenOrigins array, I figure allocating a + screen private for these values is overkill. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) + +commit 217ccaa5a341018457f468a774c035c0df47d918 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sun May 23 11:05:01 2010 -0700 + + Delete panoramiXdataPtr: it's redundant. + + This eliminates a dynamically-allocated MAXSCREENS-sized array. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) + +commit e7fae9ecc42ab5e73b89117722dbf4117d928f9a +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 22 00:26:28 2010 -0700 + + Move each screen's root-window pointer into ScreenRec. + + Many references to the WindowTable array already had the corresponding + screen pointer handy, which meant they usually looked like + "WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of + keeping this information in a parallel array simplifies those + expressions, and eliminates a MAXSCREENS-sized array. + + Since dix uses this data, a screen private entry isn't appropriate. + + xf86-video-dummy currently uses WindowTable, so it needs to be updated + to reflect this change. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) + +commit 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 21 23:13:51 2010 -0700 + + Move each screen's screensaver data into ScreenRec. + + Most references to the savedScreenInfo array already had the + corresponding screen pointer handy, which meant they usually looked like + "savedScreenInfo[pScreen->myNum]". Adding a field to ScreenRec instead + of keeping this information in a parallel array simplifies those + expressions, and eliminates a MAXSCREENS-sized array. + + Since dix uses this data, a screen private entry isn't appropriate. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) + +commit 5030540d6cd2aa9bbd4ecb7f4487616f9ef0140a +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 27 11:50:52 2010 -0700 + + midispcur: Add comment explaining why pRootPicture must not be freed. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f308cbea8c9fa5c5c6705bc301178b167de450d5 +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon May 24 18:41:54 2010 -0700 + + mi: Delete unused flicker-free MoveCursor code. + + It's been commented-out for three and a half years and nobody seems to + be missing it enough to resurrect it. + + Besides deleting code that is untested and therefore buggy, this saves a + little memory for each pointer device on each screen. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d1bad1b59f24ab4dcf2d1ce1c5d4f42b5fa40bc1 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 14:25:07 2010 -0700 + + dmx: Fix XSetExtensionErrorHandler calls to agree on constness. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit aa7c09f7d04d59852b850b2b6993f4cbdc7ec940 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Wed Jun 2 14:31:56 2010 -0700 + + Install fbdevhw module in normal module directory instead of linux/ + + Since we no longer support OS-independent custom elfloader modules, + we don't need to put the OS-dependent modules into os-specific subdirs + any more. + + We do however still need to install the stubs version of this module + on non-Linux platforms, since a number of drivers link to functions + in it, even when built on non-Linux platforms. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b13d7a8e09c8e3eb5003420c3c0484431e5a052b +Merge: f0ab726 dcceb90 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 3 07:01:26 2010 -0700 + + Merge remote branch 'vignatti/for-keith' + +commit dcceb90b1dccbbf5793f6ba1ed857013b71dafbc +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed May 19 11:45:46 2010 +0200 + + xext: delete wrong source reference from fontcache + + This should go away in 0b45ba48. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit c043de3261b6e14f2446b2cd9d62dde5860d4720 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon May 3 12:37:25 2010 +0200 + + configure: sha1: check libsha1 using pkg-config instead + + Previously the code was using AC_CHECK_LIB, guaranteeing whether the library + is correct by tracking sha1_begin function. This paranoic checking is not + necessary given there's only one libsha1 in the market, which surely contains + such function. + + Moreover, this patch now improves a bit the sha1 implementation checking + behavior using pkg-config to find the right flags that needs to link against. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit f0ab726d8966cab4e50154c216d577db79328d77 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Wed Apr 21 11:07:47 2010 +0300 + + DRI2: Use single error path in initialization + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit 6eef70dc56bcc1e3047e4e488bcd6ae62c8ffac6 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jan 22 18:34:36 2010 +0200 + + DRI2: Allow building without libdrm + + Some drivers use DRI protocol but implement their own kernel rendering + manager. For these drivers, libdrm becomes useless. --disable-libdrm + configure parameter can be used to disable libdrm support in dri2. + + To provide ABI/API compatibility for libdrm based drivers, libdrm call + is wrapped in ifdef. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit cdcb575664d3d60b662c542e782de83a047165c9 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jan 22 17:58:17 2010 +0200 + + DRI2: add AuthMagic hook for driver side support + + With this new hook, drmAuthMagic becomes useless and should be deprecated. + You might want to implement AuthMagic on driver side instead. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit 643cb6e87c10ab554c03ada81930001a8ebcc909 +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Thu May 27 09:11:50 2010 -0700 + + Only deal with input code when changing the input shape. + + Propagate the shape kind all the way to SetShape to avoid performing non-input + operations such as revalidating the tree and generating exposures when only + changing a window's input shape. + + Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Acked-by: Aaron Plattner<aplattner@nvidia.com> + Reviewed-by: Daniel Stone<daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d90f2cd98a97e6534792d3867b3fba70d850b706 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu May 27 13:26:23 2010 +0100 + + xfree86: Unbreak autoconfig following 0abf065e38c4 + + The move of the PCI device id probing into a separate file neglected to + return the number of found devices, and so the PCI devices were being + overwritten by the default entries for vesa and fbdev. + + Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> + Cc: Tiago Vignatti <tiago.vignatti@nokia.com> + Cc: Alex Deucher <alexdeucher@gmail.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1304b8b27cb12c803c4f51f04cb6f9d508b82c69 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri May 28 09:35:54 2010 -0700 + + Fix pixmap validation in miDbePositionWindow. + + miDbePositionWindow allocates two pixmaps: a front buffer, and a back buffer. + If the buffers are supposed to be initialized, it validates a GC against the + front buffer, then uses it to fill and/or copy both the front buffer *and* the + back buffer, without revalidating. If the acceleration architecture needs + different GC funcs for the two pixmaps -- for example if allocation of the front + buffer exhausted video memory -- then this can cause crashes because the GC is + not validated for the back buffer pixmap. + + Fix this by performing the rendering for the front buffer first, then + revalidating against the back buffer before performing the back buffer + rendering. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 91a6359caf24d94343ff76f43ea7b7fc3223203d +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Jun 3 12:16:40 2010 +1000 + + composite: initialise pOldPixmap to NullPixmap at alloc time. + + We just never initialised the malloced value. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b +Author: Nicolas George <nicolas.george@normalesup.org> +Date: Wed Jun 2 13:40:51 2010 +0200 + + Change keyboard controls on slave keyboards (#27926) + + Makes the use of IsMaster in ProcChangeKeyboardControl consistent with other + similar loops. + + Signed-off-by: Nicolas George <nicolas.george@normalesup.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 108b766c31b57fb1955d34d85673a235c7f743aa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 20 11:04:53 2010 +1000 + + xfree86: initialize InputAttributes to NULL in the autoconfig code. + + Reported-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 151659f9636088fd70bc5586de97bf43ee706180 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 24 16:24:03 2010 +1000 + + test: fix up InputAttributes helper function test. + + Just some extra clarification as pointed out by Dan Nicholson, + and that memcpy should have been a memcmp. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 6cccf0131c8464d8838cae2200730873d7dd9e45 +Author: Peter Korsgaard <peter.korsgaard@barco.com> +Date: Tue May 25 11:03:28 2010 +0200 + + dix: add 3x3 transformation matrix xinput property for multi-head handling + + For absolute input devices (E.G. touchscreens) in multi-head setups, + we need a way to bind the device to an randr output. This adds the + infrastructure to the server to allow us to do so. + + positionSprite() scales input coordinates to the dimensions of the shared + (total) screen frame buffer, so to restrict motion to an output we need to + scale/rotate/translate device coordinates to a subset of the frame buffer + before passing them on to positionSprite. + + This is done here using a 3x3 transformation matrix, which is applied to + the device coordinates using homogeneous coordinates, E.G.: + + [ c0 c1 c2 ] [ x ] + [ c3 c4 c5 ] * [ y ] + [ c6 c7 c8 ] [ 1 ] + + Notice: As input devices have varying input ranges, the coordinates are + first scaled to the [0..1] range for generality, and afterwards scaled + back up. + + E.G. for a dual head setup (using same resolution) next to each other, you + would want to scale the X coordinates of the touchscreen connected to the + both heads by 50%, and translate (offset) the coordinates of the rightmost + head by 50%, or in matrix form: + + left: right: + [ 0.5 0 0 ] [ 0.5 0 0.5 ] + [ 0 1 0 ] [ 0 1 0 ] + [ 0 0 1 ] [ 0 0 0 ] + + Which can be done using xinput: + + xinput set-prop <left> --type=float "Coordinate Transformation Matrix" \ + 0.5 0 0 0 1 0 0 0 1 + + xinput set-prop <right> --type=float "Coordinate Transformation Matrix" \ + 0.5 0 0.5 0 1 0 0 0 1 + + Likewise more complication setups involving more heads, rotation or + different resolution can be handled. + + Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e4582d9e5c8649347742a13eae68cf27005296fc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 27 10:42:54 2010 -0400 + + xfree86: bump ABI_XINPUT_VERSION to 11. + + commit c2d0b3b437b7ce6ce975f2ead4d8bb8295ef0ddc + "xfree86: store the InputAttributes in the input device." + introduced the new API. Bump the input version so drivers can handle this + appropriately. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cd0ef0b6a2f9c6bfeda98684569da922792d3feb +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 14:30:22 2010 -0700 + + dmx: Delete unused ChangeKeyboardDevice/ChangePointerDevice. + + Daniel Stone deleted the API for these in 2006, in commit + 96e32805d12fc36f0fa0926dbfb0dd8a5cadb739. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 70454864917f534483fa049e067b5646df61c88a +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 14 12:31:44 2010 -0700 + + Ignore build products in the server's test suite. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8bb88379d95356384e233225bfda6abfd71389b4 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 15:52:18 2010 -0700 + + dmx: Remove dead __glXDispSwap_DrawArraysEXT definition. + + Eric Anholt made the corresponding fix in glx/render2swap.c in commit + 49d38ab2328c409b2a98465b52677af057121513. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit c97a3ade5a8718b063292c73a31aac2196fe2452 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 15:17:30 2010 -0700 + + dmx: Delete unused local variables. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3c3d099fc10c63d746f90c08043d45180d6a7226 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 13:44:32 2010 -0700 + + dmx: Xfree -> free + + Mikhail fixed the corresponding Xallocs, but missed these uses of Xfree + in commit 3f3ff971ecff9936cebafc813af9193b97bba89c. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 01ca6400d949a873c0bb5de7e0dbf138e8a7949b +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 14:02:34 2010 -0700 + + Xephyr: Fix Xcalloc deprecation warnings. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 34df659687ad3936ab03d19ce8fdb21f385c2e8a +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 11:51:32 2010 -0700 + + xfree86/int10/helper_mem: Fix log message. + + Three years ago in commit f62beb6f3609e8b6e61325ac89017590811bbd07 ajax + deleted the code that could have set this format string to anything + else, so just use the format string literal. This makes GCC happy since + it can check the argument types, which, by the way, weren't correct + since this format string doesn't need any arguments. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 0a98d9e6cec7c611a3c56f97d4ddc0c546975c55 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 25 10:30:58 2010 -0700 + + xf86bigfont: Silence compiler warning by initializing pDesc. + + Access to pDesc was always guarded by (nCharInfos > 0), so the code + wasn't actually buggy, but this makes it clear that it's correct. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 4e9d3e413245e7c01c2ff3c0f130b8967754131b +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 26 07:54:35 2010 -0700 + + Revert "Add a "flags" field to DeleteInputDeviceRequest." + + Peter wants to get a larger patch sequence put together and I didn't + read past the commit message to see the 'don't take this patch + please'. + + This reverts commit 531ff40301975519af7b20109c17d296312d3f2b. + +commit 531ff40301975519af7b20109c17d296312d3f2b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 20 18:07:12 2010 +1000 + + Add a "flags" field to DeleteInputDeviceRequest. + + Some input drivers need to implement an internal hotplugging scheme for + dependent devices to provide multiple X devices off one kernel device file. + Such dependent devices can be added with NewInputDeviceRequest() but they are + not removed when the config backend calls DeleteInputDeviceRequest(), + leaving the original device to clean up. + + Example of the wacom driver: + + config/udev calls NewInputDeviceRequest("stylus") + + wacom PreInit calls + NewInputDeviceRequest("eraser") + NewInputDeviceRequest("pad") + NewInputDeviceRequest("cursor") + PreInit finishes. + + When the device is removed, the config backend only calls + DeleteInputDeviceRequest for "stylus". The driver needs to call + DeleteInputDeviceRequest for the dependent devices eraser, pad and cursor to + clean up properly. + However, when the server terminates, DeleteInputDeviceRequest is called for + all devices - the driver must not remove the dependent devices to avoid + double-frees. There is no method for the driver to detect why a device is + being removed, leading to elaborate guesswork and some amount of wishful + thinking. + + Though the input driver's UnInit already supports flags, they are unused. + This patch uses the flags to supply information where the + DeleteInputDeviceRequest request originates from, allowing a driver to + selectively call DeleteInputDeviceRequest when necessary. + + Also bumps XINPUT ABI. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c2d0b3b437b7ce6ce975f2ead4d8bb8295ef0ddc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 25 17:15:32 2010 +1000 + + xfree86: store the InputAttributes in the input device. + + InputAttributes largely decide which configuration values get merged from + the xorg.conf.d snippets. While they are available in the config backend, + they are not available for any other callers of NewInputDeviceRequest(). + + Drivers implementing driver-side hotplugging do not have access to these + attributes and cannot have xorg.conf.d snippets specific to dependent + devices. For example, the following case cannot work right now: + + Section "InputClass" + MatchProduct "Wacom" + Option "PressCurve" "0 0 100 100" + ... + EndSection + + Section "InputClass" + MatchProduct "Wacom" + MatchProduct "eraser" + Option "PressCurve" "10 10 50 50" + ... + EndSection + + The second section is not triggered, as the wacom driver cannot supply the + InputAttributes to NewInputDeviceRequest(). + + Add the attributes to the IDevRec and merge them into the InputInfoRec to + make them accessible in the driver. This changes the ABI for input drivers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 86303a338ad563d0b986a3c052104301c310c4ac +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 25 17:12:34 2010 +1000 + + dix: add helper functions to duplicate and free InputAttributes. + + No special memory handling is used to give drivers the maximum flexibility + with the data. Drivers should be able to call realloc on the product string + if needed and perform similar operations. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit bf78e11839f8278020b604672ff7c3d194232be9 +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon May 24 09:15:32 2010 -0700 + + midispcur: Construct Picture objects lazily in case Render is disabled. + + Reverts part of the effects of 518f3b189b6c8aa28b62837d14309fd06163ccbb, + "mi: don't thrash resources when displaying the software cursor across + screens". The per-screen cache is preserved, and the GCs are still + allocated eagerly, but now it doesn't construct pRootPicture until + somebody attempts to draw an ARGB cursor. + + I noticed crashes in Xnest, which doesn't support the RENDER extension, + but I suspect other DDXes that support disabling that extension would + have had issues as well. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + +commit bf9b64eefbadbf299d3b841c1890bfcaef5aab1b +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon May 24 09:14:27 2010 -0700 + + xnest: Don't ignore errors from DeviceCursorInitialize. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit b11465a6ecdc2b8373e6fc8af427edc4602bcaa1 +Merge: 7c085ae 0abf065 +Author: Keith Packard <keithp@keithp.com> +Date: Mon May 24 22:18:31 2010 -0700 + + Merge remote branch 'vignatti/bus-cleanup-take2' + +commit 7c085aebfedeb621a6fbeb3f09f4fcc640452044 +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon May 24 11:45:42 2010 -0700 + + xfixes: Remove the invisible cursor sprite, using NullCursor instead. + + Oliver McFadden reports that the invisible cursor sprite caused damage + events and thus unnecessary redrawing, so removing it improves + performance when using software cursor sprites, especially on those + devices where you do not want a visible cursor: touchscreen tablets, + embedded devices, etc. + + For the xfree86 DDX, if hardware cursors are used, the driver is + required to provide a HideCursor function, which will be called instead + of trying to set a null cursor. I think software cursors are already + safe. The other DDXes also look safe. + + As far as I can tell, there's no reason to realize a null cursor. I + think everything that handles null cursors doesn't rely on any setup in + RealizeCursor, and treats them as empty cursors. + + Xnest assumes that if a cursor is created, it will be realized before it + is freed, which didn't happen if the invisible cursor was never used in + a server generation. So this fixes a segfault in Xnest as well. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Oliver McFadden <oliver.mcfadden@nokia.com> + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Tested-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0abf065e38c4c48917054eb3e39e12bd20e6e8ec +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu May 20 19:24:47 2010 +0300 + + xfree86: move all pci code from auto configurator into a meaningful location + + This patch creates the private xf86PciMatchDriver hook, which goes inside pci + code to match the drivers found in the system. + + Now there's no direct references to PCI inside xf86AutoConfig.c anymore. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 0ceac6f64f5ad9bc2ac4b19be2dd245ffba78b05 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu May 20 18:23:24 2010 +0300 + + xfree86: no need to check for the configuration case when matching devices + + xf86MatchDevice will never be called in configuration time. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit b0eef1101815b08da2d375af7bec2be3136cf713 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu May 20 18:19:14 2010 +0300 + + xfree86: organize and group all pci related stuff inside xf86.h + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 47df5a489ea69a68e753367423bfbe8830521f4e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu May 20 17:39:59 2010 +0300 + + xfree86: remove BUS_ISA type given we don't support anymore + + Should go together within commit df14682a. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 9d000a5509e0a356ee33ad08e4dc967a2ef8cbe0 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu May 20 16:52:37 2010 +0300 + + xfree86: remove all kind of bus and PCI dependency from the common helper file + + Move all PCI procedures from xf86Helper.c to a more meaningful place (namely + xf86pciBus.c). xf86Helper.c is free of PCI code now. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 610009cf39984f2f5e818a221b626f7af10bd90e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue May 18 20:54:28 2010 +0300 + + xfree86: bus: remove useless field from EntityRec + + RAC is the champion of remaining trash for sure! + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 95889a569feabd3f803afb92950d067bd76e7397 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue May 18 20:48:35 2010 +0300 + + xfree86: bus: delete useless xf86FindPrimaryDevice + + This function had a wrong name and was just logging the primary device. No one + cares about it honestly. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit f6865909485d7d282c8131a2ae306143ad51ba2b +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue May 18 19:39:31 2010 +0300 + + xfree86: bus: remove unused headers + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 111b1fff1ca69724a8350c4375089c312329c378 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue May 18 19:35:10 2010 +0300 + + xfree86: bus: remove unused pci macros + + Should be gone in commits 3c03d9f1 and a9d7d659a respectively. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 2ffffb4daf6161e6a22d81442ecf6209acc9e975 +Merge: b5e0f6d d530608 +Author: Keith Packard <keithp@keithp.com> +Date: Sun May 23 23:22:08 2010 -0700 + + Merge remote branch 'alanc/docs' + +commit b5e0f6d8f45c5b24eb50b305c66fa80c783ef488 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 24 12:25:15 2010 +1000 + + xfree86: fix multiple InputAttributes tag matching. + + attr->tags is an array of strings (null-terminated). When matching, match + against each string instead of each [i,end] substring in the first tag. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d5306084b57583c670c56ce9e7d3c78cca7aa07b +Author: Brice Goglin <bgoglin@debian.org> +Date: Sat May 22 20:29:02 2010 +0200 + + Remove obsolete reference to README.DRI in xorg.conf.man + + Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 89dd7d2b6fe18f32c2f9336c3d8cd9f35490e5ae +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 22 10:33:04 2010 -0700 + + Remove ancient documentation of IBM RapidAccess keyboard hack + + Keyboard setup belongs in drivers, not in a document no one sees + because we don't even install it. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + +commit 480fcdf0335abae0ee544b022c7985211eee462f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 22 10:29:47 2010 -0700 + + Remove completely out-of-date README.DRI + + The license only allows distribution of verbatim copies, so we can't + update it, even to correct the incorrect address to send updates to. + + The Mesa & DRI web pages are much better sources of current information + anyway. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 1805c74d9b0ed46802481bcd6beea5feeb60212c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 22 10:29:00 2010 -0700 + + Add RandR 1.2 README.modes doc to EXTRA_DIST + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 5939e39a641773a36c22104e1184143678dca7a2 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon May 24 09:31:51 2010 +1000 + + xf86: allow for no outputs connected at startup operation. + + When nothing is connected at startup and we canGrow, allow the server to start with a 1024x768 framebuffer, and when the drivers send hotplug events this will expand to the correct size dynamically. + + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b9f48d60bc0c839bd323c582231e8e7e2b810af6 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed May 19 10:44:33 2010 -0700 + + Device init: Don't crash when CreateGC fails. + + ActivateDevice was ignoring errors from DeviceCursorInitialize, so + cursor-related calls failed later. Jeremy Huddleston saw that crash in + miPointerConstrainCursor, while with Xvfb I saw it in + miSpriteRealizeCursor. + + miDCDeviceCleanup frees any non-NULL GCs. miDCDeviceInitialize calls + Cleanup on any failure, but if it failed early then some of the pointers + in the miDCBufferPtr were garbage. Switch from malloc to calloc to + ensure everything's initialized safely first. + + With these two fixes, if CreateGC fails then the server gracefully fails + in FatalError instead of segfaulting. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c51534961e1bb4c68ff881758862d2f85f572ce7 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 22 11:11:48 2010 -0700 + + xorg-server.pc Requires: xproto >= 7.0.17 + + Since the headers we export in the SDK use the _X_NORETURN #define + introduced in xproto 7.0.17, drivers built with the SDK will also + need to have at least that version of xproto installed. + + I considered exporting the version from configure.ac, but decided not + to since the minimum required to build the X server may not always + be the same as the minimum required to build drivers (for instance, + if the X server used a new #define in its .c files or internal headers, + but didn't export it in any of the SDK headers). + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e90f20eed394de2200aba42bd61fd31c1067ac33 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 21 22:16:50 2010 -0700 + + Declare functions that unconditionally call FatalError as _X_NORETURN. + + For AtomError, this should fix a clang warning; in the other cases it's + just good documentation. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9d31d5b639c2a6ab8b1a80a0e2f0ee2c4f8cddd3 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon May 10 11:48:31 2010 -0400 + + vfb: Remove dead variable and header file + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d8cbcbc01d1355d55c1c0af64f7f7f61629f6c61 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 21 11:12:26 2010 -0700 + + doPolyText: forget about FontChange's XID after looking up pFont. + + As of e2929db7b737413cf93fbebdf4d15abdfebff05c, doPolyText uses pFont + consistently rather than looking it up again from the saved XID. + + clang noticed that "oldfid = fid" could run when fid hadn't been + initialized yet. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Tested-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 989db930d739483759087b13b8d9a043299feafb +Author: Aaron Zang <Aaron.Zang@Sun.COM> +Date: Thu May 20 17:56:28 2010 -0700 + + Solaris: Use VT_SET_CONSUSER ioctl to set Console User rights profile + + When Xorg is started on display :0, this ioctl is called to grant the + user the rights traditionally associated with /dev/console (before VT + support was added), such as access to local peripheral devices. + + Also adds a Solaris-specific -C flag to force starting on /dev/console + instead of /dev/vt*, allowing programs like xterm -C to access the + console device. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 98553e52a14b97a03aef8dc4fc0300b3f4c2c4b5 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu May 20 17:56:27 2010 -0700 + + vbe.h: Use __attribute__((packed)) on Sun cc 5.9 & later as well as gcc + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7b09335a46f9428141811230c69eef7968531359 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu May 20 17:56:26 2010 -0700 + + Xserver(1) man page updates + + - Note that -br is now default. + - Move -bs after -br for alphabetical ordering. + - Remove -config option that's been hidden in "ignore" section, + since ajax removed the -config code a couple years back. + - Add -nocursor option. + - Add xinput & xrandr to list of runtime server control programs + - Replace XDarwin with Xquartz in list of Xservers + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cf4f3d051858aadedd6e333bb317a1daa3987ad7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 21 13:30:25 2010 +1000 + + dix: remove obsolete comment.from EnableDevice. + + The code this comment was referring to was removed in + 8b5086250aa5dae8de8b763408ff480d7beac819 "Eliminate bogus event resizing." + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5754e66044571d549c295b7c9e02ce3348dbe3c7 +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 20 10:46:43 2010 -0700 + + Replace screen->rgf scratch GC flags with a bit in each GC. + + This eliminates a poorly-named, poorly-documented field from the + ScreenRec, using a previously-unused flag bit in each GC instead. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Keith Packard <keithp@keithp.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5a7275d78a2f1c20ed5bb7b228cf370c4ada22c9 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 20 13:57:02 2010 -0700 + + Find windows GL wrapper files in $(srcdir) instead of . + + This fixes 'make distcheck' for me. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 1197a87b5638037cc48084fba4eec9d3b599e900 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 20 13:40:24 2010 -0700 + + winpriv.h was moved from hw/xwin to hw/xwin/glx in November + + hw/xwin/Makefile.am was referencing this instead of hw/xwin/glx/Makefile.am + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 1cad520f3f1d9d520422e3e4d5d8f4ea85a212a4 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon May 17 20:35:10 2010 -0700 + + XFree86 Design doc: Convert LinuxDoc ``quotes'' to DocBook <quote> tags + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit 8367913be3305be4f03d095615d3885107094427 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri May 14 22:05:50 2010 -0700 + + XFree86 Design doc: Explain this version covers the current Xorg release + + Update the title & preface to explain that while this was originally + the XFree86 4.0 design, we've changed a lot since forking. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit 78fe4be4c43db1f07a30e8a6c9a17f81c1082d76 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon May 17 20:27:10 2010 -0700 + + Show Xserver release/version date in DIX & DDX docs + + Uses a fake absolute path to the entity definition files so that + the xmlto --searchpath will work for finding the actual path + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit 2bdc73bcf41ff0c10e70ecc15fc8b8333af6db65 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri May 14 15:33:46 2010 -0700 + + Move Xserver-spec.xml from xorg-docs to doc/xml + + Allows keeping it in sync with the sources it documents, and to be + released with them + + Requires the previous patch to convert the Xserver tree from + LinuxDoc to DocBook for SGML/XML documents. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit fc6ebe1e1d3057378f61f992549a98e67a04dc6c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri May 14 14:56:09 2010 -0700 + + Convert LinuxDoc documents to DocBook/XML + + Only the markup/formatting is changed - the contents should still + be wildly out of date for now. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit ebd745ced89b2a2d9f6b4dcbd9f5f7e7f3b35451 +Author: Simon Farnsworth <simon.farnsworth@onelan.com> +Date: Thu May 20 09:58:38 2010 +0100 + + Add documentation for the new DefaultModes option + + This patch adds documentation for the DefaultModes monitor option + added in the previous patch. + + Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cfc629148891be317ba60f2495abcda485780191 +Author: Simon Farnsworth <simon.farnsworth@onelan.com> +Date: Thu May 20 09:58:37 2010 +0100 + + Add configuration option to disable default modes on an output + + Setting 'Option "DefaultModes" "No"' in an output will guarantee that + X will omit the default modes, just picking up modes from the + configuration file and modes provided by the output. + + Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a1c2bdb6ab7a4f374844f80e83620b155991e817 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu May 20 10:13:06 2010 +0200 + + EXA: Wrap Glyphs even without Composite acceleration. + + In order to avoid migration ping-pong when accumulating glyphs in a mask + picture. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 00581d4a42e2a0e7652834973645a4a9ed59cf93 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri May 14 19:31:56 2010 +0300 + + configure: force new xproto version dependency + + commit bca85e2e127a8a23e3a2debcfeb3ae07cd3c66ac introduced it. + + Use the version that includes _X_NORETURN + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 103507af0c0ce7d7482a67163249864af36a2374 +Merge: 8bd8d81 99fcf65 +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 19 22:27:53 2010 -0700 + + Merge remote branch 'vignatti/bus-cleanup' + +commit 8bd8d81dc473bf72ea108b1896a55e32defa02e2 +Merge: c620a1c 66d5ecc +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 19 22:27:20 2010 -0700 + + Merge remote branch 'vignatti/animcursor-state-fix' + +commit c620a1c0a4ca564e778cce019dd30046c6969956 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 20 10:26:56 2010 +1000 + + xfree86: fix typo in optionTypeToSting. + + Because we don't want anyone to get hurt. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8b6c1809c09f832051327d86e1a25dc0ec5cc878 +Merge: d88ba77 c38552d +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 19 12:58:02 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit c38552d115e3bc71ad6179a8ad0d68778e943793 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Apr 24 23:56:36 2010 -0700 + + Add typed resource-lookup errors for non-core resource types. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit e291c561821ae86b7dd74269d5cd29bc31703962 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Apr 24 23:26:40 2010 -0700 + + Return an appropriately-typed error from dixLookupResourceByType. + + Rather than always returning BadValue, associate an error status like + BadWindow with a resource type like RT_WINDOW, and return the + appropriate one for the requested type. + + This patch only touches the core protocol resource types. Others still + return BadValue and need to be mapped appropriately. + + dixLookupResourceByType can now return BadImplementation, if the caller + asked for a resource type that has not been allocated in the server. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 90e612dcbe370da095d317fac62c80ac2447fa0b +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 15 15:51:32 2010 -0700 + + Use WriteEventsToClient rather than TryClientEvents where possible. + + If filter is NoEventMask (aka CantBeFiltered), grab is null, and the + first event is not in the set of "critical events", then TryClientEvents + simply calls WriteEventsToClient. In that case, it returns 0 for fake or + dead clients, and 1 otherwise. Inline for this special case. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 8033fb6c9792820a82fbdff6a14ff8a7a141ba74 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 15 13:12:44 2010 -0700 + + Set event sequence number in WriteEventsToClient instead of at callers. + + TryClientEvents already did this; this commit just moves the assignment + one level down so that no event source has to worry about sequence + numbers. + + ...No event source, that is, except XKB, which inexplicably calls + WriteToClient directly for several events. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 4b9600a4167427a8fe88bca9b738c9a99cac9469 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 15 12:31:34 2010 -0700 + + Make WriteEventsToClient/WriteToClient no-op on fake or dead clients. + + This matches the test in TryClientEvents, and is a superset of tests + done by the callers of these functions. The consequence of forgetting + these tests is a server crash, so they're always desirable. In my + opinion, it's better to not require the callers to remember to do these + checks. + + For callers that don't do very much work before calling WriteToClient or + WriteEventsToClient, I've removed the redundant checks. + + hw/xquartz/xpr/appledri.c has an interesting case: While its check for + "client == NULL" appears redundant with the test in WriteEventsToClient, + it dereferences client to get the sequence number. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497 + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Chris Wilson <chris@chris-wilson.co.uk> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit ee9cd2df4a5af66c6b7073563785b8aef61fcdb8 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 15 13:37:34 2010 -0700 + + xv: TryClientEvents already checks client and sets sequenceNumber. + + So don't bother doing those steps again. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit e1e7deefb59cfdd82c9de46a7ca241d42436b2f8 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 18 16:49:21 2010 -0700 + + mi/misprite.c: Delete unused private lookups. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 936b09f2a3e31afe41050c00736bbb6b812c7003 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 18 16:48:08 2010 -0700 + + Replace miSpriteCursorFuncRec with direct calls to midispcur.c. + + Nobody wraps the mi software-cursor sprite rendering implementations. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 66d5ecc5fd36e21715531a39ac83dc2b6b988a7e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue May 18 13:53:29 2010 +0300 + + render: set anim cursor state for pointer enabled devices only + + The structure containing the state of animated cursor was amended within + SpriteInfoRec, removing all previously privates logic to keep such state. + + API change: It was removed MAXDEVICES dependency \o/ + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 99fcf655bdc96f7e5b2249b05da51ba4fc9190c7 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 22:34:44 2010 +0300 + + xfree86: remove PCI dependency from InitOutput + + All functions that touch PCI and BUS were moved to their own files, organizing + the mess inside the InitOutput. Now, inside InitOutput, mostly accesses to + buses are coordinated by the new xf86BusConfig. + + Two PCI probe functions just changed the name and a procedure to receive the + isolate devices parameters was created also, named xf86PciIsolateDevice. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 0dd299864a133d478e4635bd1cd305b67fc3964d +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 21:33:26 2010 +0300 + + xfree86: remove xf86EnableAccess + + It's RAC remnant. This was substituted by xf86VGAarbiter{Lock, Unlock} + mechanism. + + It's an API break, but the few drivers using it were covered already with + macros to avoid problems. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit f28515b5f774b83e0481acbcdda2f682738079b9 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 21:24:46 2010 +0300 + + xfree86: bus: remove SetSIGIOForState and simplify the code + + Also removed some dumb debug messages. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 211ca67e4d8d00b20a74a78304a61d4dbea62706 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 21:16:23 2010 +0300 + + xfree86: bus: fb drivers might want to use vga arbitration either + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 2464eb7d56407422e033ab3b94634ba802a119d5 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 21:14:53 2010 +0300 + + xfree86: bus: simplify entity related hooks + + Remove some out dated commentaries either. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 971768e6884f20981652da09a1617c51a760fb86 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri May 7 15:25:48 2010 +0300 + + xfree86: bus: enable declaration of sparc function as its code usage + + The code in xf86sbusBus.c seems too OS-specific to be usable on OpenBSD. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit a70ec0d136bbb9efb6f4e683d7ebcea00375083b +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 20:48:01 2010 +0300 + + xfree86: bus: rework xf86PostProbe logic and remove useless log info + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 2f7d630a1ee446711288af69711d57ea3054b594 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 20:29:11 2010 +0300 + + xfree86: bus: reuse already assigned variable when fb driver claimed + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 964f29bb80c1bb05508a27969c3ac34cbf072ee9 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 20:14:40 2010 +0300 + + xfree86: bus: fix Enter/Leave accesses behaviour + + Okay, seems we're not using extensively such hooks in fact. But fix the + expected behaviour at least. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit b37462b4da7c389ec7bbcfd800e5f88bded79330 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 19:53:37 2010 +0300 + + xfree86: remove unused xf86AccessInit() + + The function was only initializing the boolean xf86ResAccessEnter, which + couldn't get any other value in the life of the server. + + The only possible, though suspicious, code was in xf86AccessLeave(), which + could be triggered if AbortDDX is called before xf86AccessInit(). Even so, + such change is safety because no driver would have configured any entity leave + procedure at this point. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit d88ba7721d2d3b58cdc664fd4c23a3c5e2a5f909 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 18 11:12:49 2010 +1000 + + xfree86: Add option parsing for percent options. + + In some cases, an option of "50%" would be preferable over fixed value + configuration - especially if the actual values are autoprobed. + Add a new set of functions to parse percent values from configurations. + + The percent value parsing differs slightly - if the option is not to marked + as used (e.g. xf86CheckPercentOption()), no warning is emitted to the log + file if the value is not a percent value. This allows double-options (either + as % or as absolute number) without warnings. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 673eb707ce6737284c4886265ba149c5587a74e2 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 15 12:06:25 2010 -0700 + + SyncSendAlarmNotifyEvents: check the correct client's clientGone flag. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c3ba199aa643e59abd30170c53fbb4e03077c377 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Apr 27 16:27:55 2010 +0300 + + render: remove unused animcursor fields from private rec + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9db63e4766bde07ebc375c4390bcc5c854b46ac3 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Apr 27 16:18:50 2010 +0300 + + render: removed unused macro from animcursor + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cba9942f7716b12c329616a9994c5bce857617fa +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Mon May 17 17:40:30 2010 -0400 + + dri2: Fix NULL check in allocation error handling + + 1461b31e40a3e44f6327199d23cf2ab70d8f5176 tests to see if the allocation + of buffer[i] failed after i has been incremented, causing it to look + at the wrong pointer. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Tested-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 27cec0a0501369a68031c048e691bda4c7095f72 +Author: Julien Cristau <jcristau@debian.org> +Date: Mon May 17 19:23:44 2010 +0200 + + Fix build without XACE + + dix/colormap.c and dix/gc.c now dereference a ClientPtr, so they need to + include dixstruct.h. Regression introduced by commit + 11c69880c7c48ef9e755c4e09fadef7a629d7bc7. + + Reported-by: Robert Hooker <sarvatt@ubuntu.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5a387cf6d248e3cb3337a938200ed5a09fc1d8cb +Author: Julien Cristau <jcristau@debian.org> +Date: Sun May 16 21:29:02 2010 +0200 + + Only link Xorg with libconfig.la + + Other DDXs don't use input hotplugging since config_init was moved to + the DDX in commit d33adcdf03c69407d151e732fa0cf9947151eb19, so there's + no need to link this in. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 37f0b45dbe4ea52bc127720207c7157b2b803ac0 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun May 16 10:14:02 2010 -0700 + + XQuartz: Fix a build failure on Tiger + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ecfeabec8d0dcfe286fb893047f1fe1a7ea9f8f5 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun May 16 10:03:13 2010 -0700 + + XQuartz: Don't use deltaXY for determining pointer location on scroll events + + <rdar://problem/7989690> + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Edward Moy <emoy@apple.com> + +commit a911292c85f7069d2caabcb677ed716a04227526 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 15 10:53:09 2010 -0700 + + XQuartz: Don't trust deltaXY for middle mouse clicks. + + The middle mouse clicks return erroneous values after returning from + Fast User Switching. + + <rdar://problem/7979468> + http://xquartz.macosforge.org/trac/ticket/389 + + Signed-off-by: Martin Otte <otte@duke.edu> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Edward Moy <emoy@apple.com> + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 345eb171264325d73ea2c50ba8c692cf589c2a9b +Author: Keith Packard <keithp@keithp.com> +Date: Sat May 1 01:41:19 2010 -0700 + + Remove dbe screen private privates. + + Each DBE Screen private structure could have nested privates. Oddly, + no code ever used them. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 87ea5760f86eb60840e6e2c10012915952df5377 +Author: Keith Packard <keithp@keithp.com> +Date: Mon May 10 11:46:25 2010 -0700 + + Check pixmap allocation return value when creating glyphs + + The driver may decide that the pixmap is too large or something and + fail to allocate a pixmap; not checking would lead to a segfault. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 03f7e92a6cbfe58db08ce840283f9809695c70e7 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon May 10 13:44:30 2010 -0700 + + Update list of supported platforms in configure.ac error message + + Adds DragonFly BSD, OpenSolaris, & GNU Hurd. + Drops MacOS X, since this is in the section specific to the Xorg/XFree86 DDX. + (Matches the OS patterns the configure script checks for.) + + Also uses m4 macros to fix the spacing/formatting of the resulting message. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Acked-by: Gaetan Nadon <memsize@videotron.ca> + +commit e42a29d269fadc11e065c63ee369e3165196f2d7 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Apr 29 18:45:34 2010 -0700 + + Fix compiler issues with getifaddrs() call on OpenSolaris + + OpenSolaris recently added support for the getifaddrs() API. + + Building with that uncovered two compiler issues (one warning, one error) + in the code that was now being built for the first time in our builds: + + "access.c", line 768: warning: argument #1 is incompatible with prototype: + prototype: pointer to struct sockaddr {unsigned short sa_family, array[14] of char sa_data} : "access.c", line 213 + argument : pointer to struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} + + "access.c", line 838: assignment type mismatch: + struct sockaddr {unsigned short sa_family, array[14] of char sa_data} "=" struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit c6613cfc26e76b296e620640bf33e756eb4ae178 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 14 10:36:13 2010 -0700 + + test/xi2: Initialize predefined atoms before XInputExtensionInit. + + XInputExtensionInit calls MakeAtom, which doesn't work without the atoms + table initialized. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1461b31e40a3e44f6327199d23cf2ab70d8f5176 +Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> +Date: Fri May 14 16:25:43 2010 +0300 + + dri2: Fix xserver crash if dri2 buffer allocation fails. + + If driver fails to allocate memory for dri2 buffer server would crash + in send_buffers_reply. + + Solution is to handle the allocation failure and return BadAlloc to + client. + + Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f87002cb7d8729b1da4cbefe7653f4cfd3a2d956 +Merge: a4fbc0f 890f536 +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 14 11:46:29 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 890f536f8d66f08e7d6a5685659eef4001a8757d +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 14 00:18:14 2010 -0700 + + Bugfix for "Pre-validate ChangeGC XIDs": off-by-one in loop index. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Tested-by: Colin Harrison <colin.harrison@virgin.net> + +commit a4fbc0fedafda6df98f647173a2deccb86ef0479 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Fri May 14 07:49:31 2010 +0300 + + scrnintstr.h: removed unused PaintWindow function pointers. + + Please note this patch breaks the ABI. + + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 71296885b0bb946e7ab986169f5b872952c221a0 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Thu May 13 07:12:43 2010 +0300 + + mi: removed unused PointerNonInterestBox functions. + + Please note this patch breaks the ABI. + + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 795432d4a92ed5b9fa4d9163e73c8e4fe4c74534 +Merge: f2a0c32 92ed75a +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 13 18:22:49 2010 -0700 + + Merge remote branch 'jamey/cleanups' + +commit 92ed75ac59e2d3af149cddb962efd05fc8487750 +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon May 10 20:22:05 2010 -0700 + + Eliminate boilerplate around client->noClientException. + + Just let Dispatch() check for a noClientException, rather than making + every single dispatch procedure take care of it. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 11c69880c7c48ef9e755c4e09fadef7a629d7bc7 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 22:16:32 2010 -0700 + + Quit using clientErrorValue in dix/colormap.c. + + And that's it! No more clientErrorValue kludge. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit a3d948ddbb54b9e831e67f22d5031922a3c44107 +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 6 12:35:52 2010 -0700 + + clientErrorValue is never used outside dix. Stop importing it. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 653e4878c4cc03613172a93ad4800e1eacc98f17 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 19:18:11 2010 -0700 + + Quit using clientErrorValue in dix/gc.c. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 5193f25ea33eed31d6a75cdc1a86427c23d8033c +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 19:08:47 2010 -0700 + + Define GCAllBits as the union of all valid CreateGC masks. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 6a84cd943430cfc9df55c83aef6a7f8dea6dbb94 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 7 19:38:05 2010 -0700 + + Replace dixChangeGC with calls directly to the right variant. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 2d7eb4a19b773d0406c0c2e018a7da97f3565fd5 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 7 18:11:36 2010 -0700 + + Pre-validate ChangeGC XIDs. + + In order to execute a wire-level ChangeGC request, we need to look up + the resources named by any XIDs in the value-list. Various places in the + server already have pointers to the resources they want to set into the + GC, though, so over time the interface has evolved to accept either XIDs + or pointers, with several different function call signatures used in + different eras. + + This patch makes the existing code require pointers to resources rather + than XIDs, and adds a simple wrapper that looks up any XIDs. The old + dixChangeGC API is preserved by delegating to whichever implementation + is appropriate. + + This affects error-handling: If any of the XIDs are invalid, then the GC + is unchanged, and its ChangeGC callback is not invoked. This change is + allowed by the protocol spec, which says, "The order in which components + are verified and altered is server-dependent. If an error is generated, + a subset of the components may have been altered." + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit e2929db7b737413cf93fbebdf4d15abdfebff05c +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 14:10:51 2010 -0700 + + dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere. + + The exceptions are ProcChangeGC and CreateGC. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 95728ca09d45afc84c8d1828c09c6b6725f1a58d +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 09:25:34 2010 -0700 + + Don't statically allocate the ChangeGC parameter array. + + Because that's insane. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit bff8525f8483304d5f93e83e36b47209381da721 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 12:06:50 2010 -0700 + + Simplify miFillPolyHelper and miLineArc. + + Both functions compute a set of spans and either fill them immediately + or accumulate them into a caller-provided buffer. + + Computing the spans used only the miTranslate and lineWidth fields of + pGC, and neither could have been changed by the initial + ChangeGC/ValidateGC pair, so it's safe to compute the spans first. + + Then both functions consume the spans the same way, so factor that into + a new fillSpans function. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 83f7ec97279405958aed86c6a57704a460c3bfba +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 13:38:00 2010 -0700 + + miwideline: Factor out span buffer allocation. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit f2a0c324e37c9fa3eb9087adbf963addb7f21d88 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 13 10:33:39 2010 -0700 + + Remove devPrivates init and delete callback lists. + + XSELinux was the only consumer of these interfaces and it no longer + needs them. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit c9e7ca4404803fe44d4684e0bb2ca2ee10fd4bb3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed May 12 20:25:30 2010 -0400 + + xselinux: Remove use of devPrivates init/free callbacks. + + Commit eb9210097efea81065c301e5b6b4da7a566deb4a removed the + sidget/sidput calls which were the major reason for using the + callbacks. The remaining operations can be skipped or worked + around. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit bca85e2e127a8a23e3a2debcfeb3ae07cd3c66ac +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 13 08:32:00 2010 -0700 + + Use _X_ATTRIBUTE_PRINTF _X_DEPRECATED _X_NORETURN + + Use the values from xproto rather than duplicating the effort + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 421606a8ef447d10c2ee0986f20e752056a47675 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Tue May 11 10:52:18 2010 -0400 + + dri2: Send out event when auxillary buffers are invalidated + + This lets the DRI2 clients rely on the server to notify them when they + need to get new buffers. Without this, OpenGL clients poll the server + in glViewport() which can be a performance problems and also isn't + completely correct behaviour. + + We bump the DRI2 protocol minor to indicate the availability of the + event, which the DRI2 clients can use to avoid polling. This speeds up + various piglit and oglc test cases as well as real applications. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f281db9a5e400c822e03a19937247baa20ecc213 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Wed May 12 23:57:58 2010 -0700 + + Remove ResNoAvoid definition, missed in the RAC removal + + ResNoAvoid is #defined to ResBios, but ResBios was removed + from xf86str.h in 4b42448a2388d40f257774fbffdccaea87bd0347 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 315041762313598aad90df84226e2d2def4a0fc9 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 18:55:55 2010 -0700 + + CreateGC: Pass current client on to ChangeGC. + + Otherwise we can't check that the XIDs this GC is being initialized with + are accessible to this client. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 04bad1b8a118a83064316d6e4327234aee19361e +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 6 21:56:10 2010 -0700 + + Kill ChangeGC in favor of dixChangeGC. + + This doesn't change any behavior, but it isn't clear whether NullClient + is correct in all cases. As ajax says, + + > For most of these changes, I think it's correct to use NullClient, + > since they are server-initiated changes and should not fail for (eg) + > xace reasons. ... At any rate, you're certainly not changing any + > semantics by leaving them all as NullClient, so this patch can't be + > more wrong than before. + + The call in CreateGC is particularly questionable. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 65cedf39054cf3a1e695e84ac228cce9e8d48097 +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 6 21:39:43 2010 -0700 + + Kill DoChangeGC in favor of dixChangeGC. + + This doesn't change any behavior, but it isn't clear whether NullClient + is correct in all cases. As ajax says, + + > For most of these changes, I think it's correct to use NullClient, + > since they are server-initiated changes and should not fail for (eg) + > xace reasons. ... At any rate, you're certainly not changing any + > semantics by leaving them all as NullClient, so this patch can't be + > more wrong than before. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit afcbbd6dfea51c5b0adca0d720edc02ba0c2dc16 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 15:19:03 2010 -0700 + + doPolyText needs UseAccess to each font, not ReadAccess. + + In commit 42d6112ec21949a336ee8b34469f2695273ee2d6, Eamon changed + dixChangeGC to require DixUseAccess on any GCFont XID. I think + doPolyText needs to require the same level of access. Otherwise + dixChangeGC could fail when it does the same lookup, which doPolyText + doesn't check for. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Cc: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 59857ee5da5f1f3f4900292581b9586477513211 +Merge: 21ceae9 432cbbe +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 12 16:48:08 2010 -0700 + + Merge remote branch 'dottedmag/for-keithp' + +commit 432cbbec194e47bf2a117c9302146e786c8a4ee1 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 13 03:51:00 2010 +0700 + + Misc coding style cleanup + + Use a[b] instead of *(a+b), fix whitespace. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 816b79dd061e9839cec94a4986a7820b70ca8a7f +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 13 03:45:21 2010 +0700 + + Remove useless casts + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 63a647abd51f44226cbd16aa04ebc57d07463c6d +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 13 03:44:12 2010 +0700 + + Fix code style: extra whitespace before () + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 28211c443c693a1ca3db5740d0128274a3eef723 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 13 03:43:04 2010 +0700 + + Fix warning: it's safe to pass atom strings > XA_LAST_PREDEFINED to free(3) + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 8b5326aa98eba201dd78aea3dd7114e1a084489b +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Wed May 12 20:27:02 2010 +0000 + + Mark OsAbort as noreturn function to make gcc happier. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 868e372a73b377705217e0379bc6e00f36c4d8e5 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 13 01:59:06 2010 +0700 + + Introduce X_NORETURN macro defined as __attribute__((noreturn)) for gcc + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 5a8e2f2745ae1f74501cd3f42614a1ed2cf974f2 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Wed May 12 18:54:51 2010 +0000 + + Do not jump through the hoops to deallocate xkbbasedirflag variable + + Fixes gcc warning as well. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit ff2b4cf8329b1678adafcda02e5d47a072550d47 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 13 01:51:37 2010 +0700 + + Turn sprintf argument into literaral string, shutting up gcc warning + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit f62ba192c285b1e49bf299f03fc0b763680afaaf +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 13 01:47:26 2010 +0700 + + Do not use deprecated Xalloc function + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 21ceae9002c6364deb3d074cf2da7d3864cf6879 +Author: Jamey Sharp <jamey@minilop.net> +Date: Tue May 11 10:24:00 2010 -0700 + + SetFontPath: set client->errorValue on failure. + + Previously the callers were only setting errorValue on Success, when + it's ignored, and leaving it alone on failure, when it's sent to the + client. + + Since SetFontPath takes the ClientPtr, let it set client->errorValue + instead of letting the callers continue to get it wrong. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 801162919d1c625d950a5d105ae4b3487ebc30a7 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 6 01:55:36 2010 +0700 + + Removed outdated comments obsoleted by documentation in headers + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4d55c8c4ffcb5d6c6500b462a41ace8e2359151d +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 6 01:54:13 2010 +0700 + + Use lowercase variant of XNFalloc and Xstrdup + + Using one variant of function/macro makes it easier to fix the code + later. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3f3ff971ecff9936cebafc813af9193b97bba89c +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 6 01:44:06 2010 +0700 + + Replace X-allocation functions with their C89 counterparts + + The only remaining X-functions used in server are XNF*, the rest is converted to + plain alloc/calloc/realloc/free/strdup. + + X* functions are still exported from server and x* macros are still defined in + header file, so both ABI and API are not affected by this change. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 96c7ab27c383ec767f62a7a11e5fd76f86363fbc +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 6 00:28:25 2010 +0700 + + Deprecate allocation functions which are plain wrappers for C stdlib + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a5dba0f5caefce236ebd5f71948e5a659bea58e4 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 6 00:27:47 2010 +0700 + + Document allocation functions, noting deviations from C library + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e983848ab44b0769f97f6207f1aa8b4f127be6a9 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu May 6 00:16:24 2010 +0700 + + Clean {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage + + C89 guarantees alignment of pointers returned from malloc/calloc/realloc, so + stop fiddling with alignment manually and just pass the arguments to library + functions. + + Also convert silent error when negative size is passed into function into + warning in log file. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4f0006c2203abe0b7660c5068d6afe236f9bd2a4 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Mon May 10 08:36:02 2010 -0400 + + dri2: Copy front to fake front in swapbuffer + + If we don't have a fake front, nothing will happen. The fix was extracted + from a bigger patch from Francisco Jerez. + + https://bugs.freedesktop.org/show_bug.cgi?id=27305 + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Pauli Nieminen <suokkos@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ba1f1f9d9e48226f1ef6b3222a8d92fc969d6560 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue May 11 09:49:34 2010 -0700 + + XQuartz GL: Fix __glXAquaScreenCreateDrawable prototype + + Fixes regression introduced in 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 286935c6f4965a6b09de1fb9e579a00afa14082a +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 11 09:08:40 2010 -0700 + + Remember drawable ID used to find damage target for use in events. Bug 5730. + + Using Composite, window pixmaps are given names in the client resource + namespace and yet may not have any XID recorded in the drawable + structure. As such, we need to remember the XID used to lookup the + pixmap in the resource database so that we can report the correct XID + back to the client in damage events. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 3df22b293c1f1d27e7ce16662744c578d35b5aba +Merge: fa6c701 9de0e31 +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 11 08:38:44 2010 -0700 + + Merge remote branch 'krh/dri2-resource-fixes' + +commit fa6c7012572093a82c9389682977efff85590719 +Author: Cyril Brulebois <kibi@debian.org> +Date: Mon Mar 1 02:11:36 2010 +0100 + + Fix null pointer dereference in xf86_reload_cursors(). + + Upon resume, X may try to dereference a null pointer, which has been + reported in Debian bug #507916 (http://bugs.debian.org/507916). + + Jim Paris came up with a patch which solves the problem for him. Here's + a (hopefully) fixed version of his patch (without the typo). + + Cc: Jim Paris <jim@jtan.com> + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-By: Matthias Hopf <mhopf@suse.de> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Thu Apr 29 16:36:10 2010 -0400 + + dri2: Take an XID for tracking the DRI2 drawable + + Some pixmaps (window pixmaps and scratch pixmaps) don't have the + drawable->id set and thus DRI2 gets confused when using that field + for looking up the DRI2 drawable. Go back to using privates for getting + at the DRI2 drawable from a DrawablePtr. We need to keep the resource + tracking in place so we can remove the DRI2 drawable when the X resource + it was created for goes away. Additionally, we also now track the DRI2 + drawable using a client XID so we can reclaim the DRI2 drawable even if + the client goes before the drawable and doesn't destroy the DRI2 drawable. + + Tested-by: Owen W. Taylor <otaylor@fishsoup.net> + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + +commit 32381363cd8f43aeb741bad70bcf96a287dac0c9 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Sat May 1 13:15:00 2010 -0400 + + list.h: Add list_for_each_entry_safe() + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 4a8a615d01b9ed18c272414bd11dc2fc661727e5 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Sat May 1 13:13:54 2010 -0400 + + glxdri2: Hard-code the extension version we need + + If we use the #define'd version from dri_interface.h, the server will + require at least that version of the extension. If we're compiling against + a dri_interface.h with a newer version we don't really require, glxdri2 + will require a too high version of the extension. + + The right approach is to just hard-code the version we need instead of + using the #defines. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit 6d7ba5e0fcb5d1bce6bb213dec009f3a0f802d26 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Sat May 1 13:07:46 2010 -0400 + + dix: Update element count in FreeResource*() + + FreeResource() keeps clientTable[cid].elements up to date with the + number of resources allocated to the client. The other free + resource functions (FreeResourceByType(), + FreeClientNeverRetainResources() and FreeClientResources()) don't + maintain this invariant. + + Typically, the only consequence is that the element count is too high + and we end up allocating the hash table bigger than necessary. However, + FreeResource() also relies on the element count to restart the search if + the list of resources has been changed during a resource destruction + callback. Since FreeResourceByType() doesn't update the count, if we call + that from a resource destruction callback from FreeResource(), the + loop isn't restarted and we end up following an invalid next pointer. + + Furthermore, LookupClientResourceComplex() and + FreeClientNeverRetainResources() don't use the element count to detect + if a callback deleted a resource and may end up following an invalid + next pointer if the resource system is called into recursively. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 10de9e8ee37265a35ceeceb2007d711da70d4f2d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Apr 16 16:35:22 2010 +1000 + + xfree86: dga needs to use the master keyboard state (#27573) + + GetPairedDevice() may not always return the keyboard, resulting in a + null-pointer dereference when accessing the XKB state. + For floating devices, the GetMaster() returns the device itself. + + X.Org Bug 27573 <http://bugs.freedesktop.org/show_bug.cgi?id=27573> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Tested-by: Ben Hutchings <ben@decadent.org.uk> + +commit 758b8614477b53dc3de2b884fec5ccaf8a736432 +Author: David James <davidjames@google.com> +Date: Mon May 10 14:00:49 2010 -0700 + + Fix wrong bracket values when startOver = FALSE. + + Currently, SyncComputeBracketValues reuses old values of bracket_greater + and bracket_less when startOver = FALSE. This can result in incorrect bracket + values. To fix this issue, the startOver parameter is removed, and we do not + reuse old values of bracket_greater and bracket_less. + + X.Org Bug 27023 <http://bugs.freedesktop.org/show_bug.cgi?id=27023> + + Signed-off-by: David James <davidjames@google.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 95074538cce93abc1739a4d9dd78b0500fb8fec9 +Merge: c079977 2160ff5 +Author: Keith Packard <keithp@keithp.com> +Date: Mon May 10 13:49:33 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 2160ff5240d7e11bdc6cec8859fd1f10395c8edd +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri May 7 20:00:40 2010 -0700 + + Simplify error-handling in dixChangeGC. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 4080cd42fde8b4c693eab7557581af2622479109 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 09:41:46 2010 -0700 + + miPolyPoint bugfix: Check memory allocation before changing the GC. + + miPolyPoint ought to leave the GC unchanged even if it fails. ajax says: + + > We have a new winner for the oldest-bug competition! It's actually + > been like that since X11R1: + > + > -rw-r--r--. 1 ajax ajax 2817 1987-09-12 01:20 ddx/mi/mipolypnt.c + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit ccdaecc5471cc2d56b1702eeed4280bb4d58c515 +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 12:26:47 2010 -0700 + + Move AppendSpanGroup from miwideline.h to miwideline.c. + + Also make it stop being a macro. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 4272d6722c0f65bdfafc95e91cc2fdb8f6bd072e +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat May 8 12:18:37 2010 -0700 + + Expand macros that are used only in miFillPolyHelper. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit c0799779dffeef8cef228bdc57aa6c8b323e7485 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 26 17:22:12 2010 -0700 + + dmxBERestoreRenderGlyph was passing wrong value to free + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 946f664b6ab421f69df3dc3213b14b085424c9e4 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu May 6 17:58:29 2010 -0400 + + mi: Delete wide ellipse arc cache + + This does make wide ellipses slower, by a factor of twoish: + + 946000.0 521000.0 ( 0.55) 10-pixel wide ellipse + 98300.0 49900.0 ( 0.51) 100-pixel wide ellipse + 17700.0 9310.0 ( 0.53) 500-pixel wide ellipse + 16900.0 7980.0 ( 0.47) 100-pixel wide dashed ellipse + 16100.0 5370.0 ( 0.33) 100-pixel wide double-dashed ellipse + + But no one cares, and it's a modest size win: + + text data bss dec hex filename + 1773824 69552 59288 1902664 1d0848 hw/vfb/Xvfb.before + 1773112 69552 58648 1901312 1d0300 hw/vfb/Xvfb + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 580b99bb8af4ea093953c2b885bd4272aaf02baf +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 6 11:00:39 2010 -0700 + + Return BadPicture, not BadPixmap, if alpha-map is invalid. + + I believe this is what was intended. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c677fc611b124c44adfcfb95718798105f26357b +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 6 11:00:38 2010 -0700 + + VERIFY_PICTURE always returns BadPicture. Don't bother specifying. + + Same goes for VERIFY_ALPHA, VERIFY_XIN_PICTURE, and VERIFY_XIN_ALPHA. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 35761d5f811406bc0b6a68c1b02bdb699142745c +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu May 6 11:00:37 2010 -0700 + + Introduce dixLookupFontable for "FONT or GC" parameters. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2eab697adba4b1858a530750e9a35fba79a7bf26 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri May 7 09:32:34 2010 -0700 + + Constify function prototypes in auth & xdmcp code + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e2e2747f40c4b9e23dba38ea656d4c082e83a794 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri May 7 18:46:30 2010 +0200 + + Fix mod() definition. + + Presumably no implications, especially security-wise. + + Signed-off-by: Matthias Hopf <mhopf@suse.de> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 626f97688a89dbc5da80390d822d21b1a737de0e +Author: Adam Tkac <atkac@redhat.com> +Date: Fri May 7 17:02:03 2010 +1000 + + Export XkbCopyDeviceKeymap from Xorg, it is needed by VNC. + + Signed-off-by: Adam Tkac <atkac@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 21ed660f30a3f96c787ab00a16499e0fb034b2ad +Author: Chris Humbert <freedesktop@mahadri.com> +Date: Fri May 7 17:02:43 2010 +1000 + + dix: make DeviceEvent coordinates signed for Xinerama. #24986 + + With Xinerama enabled, event coordinates are relative to Screen 0, so + they can be negative. The new DeviceEvent's coordinates are of type + uint16_t, making screens above and to the left of Screen 0 unusable. + + X.Org Bug 24986 <https://bugs.freedesktop.org/show_bug.cgi?id=24986> + + Signed-off-by: Chris Humbert <freedesktop@mahadri.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9802839d35aaf788790f1d0e8300db4693a70096 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 7 16:22:12 2010 +1000 + + Xi: reset the known properties at the end of the server generation. + + Properties allocated through XIGetKnownProperty() aren't reset on the second + server generation but keep the old value. As a result, wrong Atoms are + supplied to the driver, resulting in potential data corruption or weird + error message. + + Reproducible by running "xlsatom | grep FLOAT" twice on a plain X server. + The second X server generation won't have the FLOAT atom defined anymore, + despite the users of this atom not noticing any errors. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 72758287f79a4f1aa8fa388f20947042e3e14693 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue May 4 15:15:02 2010 +0200 + + XQuartz: add new localization files to EXTRA_DIST + + commit 206531f75cd41c034e89fdfbc75ab0910682eef8 added localization files + for ar, add them to the Makefile. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a3f5d30ba61e70b3de8b48754dea32715ba93c40 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 16:10:32 2010 -0700 + + Make sure XFixes invisible cursor gets freed on server reset + + This uses the same hack that dix uses for the rootCursor -- allocate + a resource ID for the invisible cursor so that it gets freed at reset + time. This also allows us to unconditionally create it during + extension initialization; necessary as the privates layout may well be + different on subsequent generations. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cdeb2c23f80ced961fe205125547e16905885534 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 12:18:09 2010 -0700 + + Fix cursor ref counting mistakes with sprites and xf86Cursor.c + + A few cursor value assignments weren't getting correctly ref counted, + causing leaks of cursor objects. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a80b1f888f2f7674a715d512ab950eeadee20448 +Merge: 4971099 0efd7b8 +Author: Keith Packard <keithp@keithp.com> +Date: Sun May 2 16:35:17 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 0efd7b8d82a48793341e27d4c224986e0971687c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Apr 27 13:14:47 2010 -0700 + + XQuartz GLX: Change around includes for better compatability with different OS versions + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 7b506fdc840aebed6b5acb91437a2cb620b5bddc +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 21 08:38:53 2010 -0700 + + rootless: Add some sanity checking to miPaintWindow + + This avoids painting the root window when it isn't actually drawable. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4d3789c9b3fbe6aad32fcacd964353b612640f27 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Apr 18 01:22:27 2010 -0700 + + rootless: Remove an unneeded comment + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 048d15192af39ba5111882d18a957b6ff4e34cad +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Thu Apr 22 10:29:44 2010 +0300 + + x-list.c: null-returning function malloc() was called without checking + + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4971099860e8e6d7817ada92e2636cb435fd002d +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun May 2 19:14:39 2010 +0300 + + dix: wrap variables with #ifdef when panoramix is not used + + this shut up some warnings. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 40858960c02a7694b0e1b72e2a986805580ff6f1 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Apr 29 12:24:51 2010 -0700 + + Delete loop with no effect from GlyphUninit + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 65e961fcc1da0f1e6c1c477701b2eeb36955ed24 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Apr 29 12:24:49 2010 -0700 + + Replace some input devPrivates with regular struct fields + + In the process, fixes a memory leak in CloseDevice, and an unchecked + memory allocation in InitializePredictableAccelerationProperties. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 998e982b775073da59412dce8ce609ea2ad7967c +Author: Keith Packard <keithp@keithp.com> +Date: Thu Apr 29 12:24:48 2010 -0700 + + Move callback definitions to their own file + + Needed as the privates stuff uses the callbacks before they would have + been defined in dix.h + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 7dde50c649089b03650d6497079a690feea65e22 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Apr 29 12:24:47 2010 -0700 + + Move X_DEPRECATED to misc.h so it can be used outside resource.h + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit 5623908aeef70e5083f3b49986c7547ed044fedd +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Apr 28 12:37:08 2010 -0700 + + dix: Improve documentation of the DIX private data functions. + + The functions exported by the devPrivates code were poorly documented. I tried + to spruce it up a little. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 986d46144b183a36b4e98aed95eca0c55a8b4251 +Merge: a974c8e b5b8f91 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 12:40:53 2010 -0700 + + Merge remote branch 'jamey/for-keith' + + Conflicts: + hw/xfree86/common/xf86xv.c + +commit a974c8e7cba40c8d7d1b91e07de8c414627b71a2 +Merge: 6581bc4 02e8622 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 12:33:00 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 6581bc4591746c906d97f8b868f946c47bc6d756 +Merge: 0e91e19 d073e51 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 12:29:52 2010 -0700 + + Merge remote branch 'yselkowitz/master' + +commit 0e91e19f783d21198fc2e210203e0f10040a9cd0 +Merge: 81a081c edbc56c +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 30 12:27:51 2010 -0700 + + Merge remote branch 'vignatti/for-keith' + +commit 02e86221b851e5423a95782aa7e297ea051022ca +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 29 09:48:37 2010 +1000 + + xfree86: a missing input driver is not an error. + + We call NIDR on all devices that make it through the config backend. + Including some that have no driver assigned to them (/dev/input/mouse0 for + example). Those ones then simply get ignored by NIDR, but this should not be + noted as an error in the log file. + + X_INFO is sufficient, and it may just prevent some bugreports. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 81a081c1f0cb55df94cb10495aa7ad71cd5a9afb +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Nov 7 19:28:18 2009 +0000 + + Cygwin/X: AIGLX using native WGL + + A rewrite of the XWin DDX AIGLX code to actually make it do something useful again + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 262c2c9031ea60cbe738ed80ddb7faa1b888d137 +Author: Rami Ylimäki <ext-rami.ylimaki@nokia.com> +Date: Tue Apr 27 14:04:47 2010 +0300 + + test: Fix linking of wrapped functions in XI2 tests. + + Running "make check" will lead to build problems in + scratchbox. Building the first test that wraps dixLookupWindow fails + because symbol __real_dixLookupWindow can't be resolved. Defining + wrapping options as linker options instead of compiler options makes + everything build nicely in scratchbox. + + Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ffaae7c0c69a51a53a76146c79f3630ae197a443 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Apr 26 20:11:31 2010 -0700 + + Remove mibank support + + Banked framebuffers are so 1990. As of 7.4 the only drivers remaining + that used this were chips, neomagic, trident, and vesa. vesa only used + it when not using shadowfb, which is broadly undesirable anyway, and no + longer uses it at all as of 2.3.0. neomagic never used it by default, + and support for it is gone in git master. The other two effectively + only ever used it for ISA chips; since ISA support is now gone from + the server, they have been modified to only compile mibank support when + ISA support is available. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b5b8f91b82d7b150c926dd3fecee6c3aafff6e39 +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Apr 22 21:35:17 2010 -0700 + + xfree86: use screen privates for Xv offscreen images. + + This replaces a globally-allocated array that depended on MAXSCREENS. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit a1c2acfe798c57e5be7e5f6c111a6ce91400487a +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Apr 21 18:05:45 2010 -0700 + + xfree86: use screen privates for exclusive DGA clients. + + Most DGA requests allow at most one client to be using DGA on each + screen. Instead of keeping track of the current client in a + MAXSCREEN-sized array, track it in a per-screen private. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit f9e3a2955d2ca73604c68fc9d51405581b832edb +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon Apr 26 18:23:27 2010 -0700 + + Make Xvfb independent of MAXSCREENS. + + If a -screen option specifies a screen number higher than any previously + specified, reallocate the vfb-private array of screen-info structs. + + If built with a DIX that still has a MAXSCREENS limit, asking for too + many screens won't be detected until InitOutput calls AddScreen. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 20e84b0b44e8b3b40a3ecab5b2e64a27de247b16 +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon Apr 26 18:09:23 2010 -0700 + + Xvfb: Simplify screen option processing. + + Inspired by Jon Turney's "Xwin: Simplify screen option processing" + patch, which does something similar for the Xwin server. + + Besides making the code more readable, this eliminates most of Xvfb's + references to MAXSCREENS. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit eeb84547556b943af2acff207e034823205c7dfe +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon Apr 26 18:04:25 2010 -0700 + + Delete redundant scrnum field from Xvfb private screen-info struct. + + The screen number can be inferred from the position in the vfbScreens + array, and it was only used in two places, so it was hardly important. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit da0217891904bc48d5f0b7ea5c62c8ea0e9b95f9 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Apr 21 22:26:28 2010 -0700 + + Track screens' installed colormaps as screen privates. + + Several DDXes allow each screen to have at most one (or in some cases, + exactly one) installed colormap. These all use the same pattern: Declare + a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by + screen number. This patch converts most of those to use screen privates + instead. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 22c4300ee25a20e1f815e46225bf0de9cfd6748f +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 7 09:00:02 2009 -0700 + + Simplify XineramifyXv. + + The structure of the adaptor-matching algorithm was obscured by trying + to use "continue" and "break" as the only control-flow primitives. It's + a lot more clear if you add "return" to that set. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit af170a4ab76d33254dd4e54a33bb410fa1624739 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 21 15:51:20 2010 +1000 + + Xext: only update the sprite on pointer events. + + A call to miPointerUpdateSprite for the XTEST keyboard may result in a + NULL pointer dereference in miDCPutUpCursor() when the save buffer is NULL. + + XTS test case: Xlib 11 KeymapNotify + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bac1c5f1be4588b2b1eb646ee98a5442e1b767d5 +Author: Dirk Wallenstein <halsmit@t-online.de> +Date: Sat Apr 17 21:36:23 2010 +0200 + + xkb: Fix omissions in geometry initialization #27679 + + _XkbCopyGeom did not copy all of the data from the source geometry. This + resulted in failures when trying to obtain the keymap from a server + where the default geometry has not been replaced by a custom + configuration. + + Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3f63db89191701139d45332ca80b9d6eb327c773 +Merge: 41bdb6c 54e51de +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 26 20:18:13 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 41bdb6c003cca3ef0ff88d9c7de318115bab1ba2 +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Wed Apr 21 18:11:05 2010 -0700 + + xf86: Don't crash when switching modes through RandR without owning the VT. + + While VT-switched, FB access is disabled and should remain so. Trying to switch + modes in that state would re-enable it, potentially causing crashes if trying + to access it before the driver has recovered from the mode switch. + + Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2a763c9023b8bc978b32eaa56d2c625b6f2badee +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 15 16:54:35 2010 -0500 + + dix: Default DPMS timeout values to match screensaver values + + These have the same default, but if you specify something different with + -s on the command line, only the screensaver time is changed. As DPMS + is usually what's desired, change it to match. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 518f3b189b6c8aa28b62837d14309fd06163ccbb +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Wed Apr 21 16:46:17 2010 -0700 + + mi: don't thrash resources when displaying the software cursor across screens + + This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures + for each pScreen instead of failing to thrash between them when changing + screens. + + Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 54e51de8cd950b3f5b30e72cf1d604f54f619f0e +Author: Jamey Sharp <jamey@minilop.net> +Date: Sat Apr 24 23:07:47 2010 -0700 + + ProcGrabButton: remove redundant error check. + + If dixLookupResourceByType did not return Success, it will have set the + pointer to NULL, so the second if will always be true. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7e573b5ccd2c759f74ebb84d3a5a23da6b88ec6d +Author: Jamey Sharp <jamey@minilop.net> +Date: Mon Apr 26 15:05:06 2010 -0700 + + Kill unused/useless macros in panoramiX.h: BREAK_IF, IF_RETURN, FORCE_ROOT + + This header doesn't seem to be used outside the server tree, so I don't + think anything was depending on these except what I've fixed in this + patch. + + FORCE_ROOT is not used anywhere, and never has been in all the history + that's in git. ajax removed its FORCE_WIN and FORCE_CMAP companions + three years ago, in 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4. + + BREAK_IF and IF_RETURN expanded to exactly the keywords in their names, + which is silly. They were rarely used and served only to make callers + inconsistent with the idioms used elsewhere in the server. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit e372cc58e02391c3e8e82ac03f73fbe8b1f7d49c +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 7 11:06:34 2009 -0700 + + Boolean-or short-circuits, so (a || (!a && ...)) is redundant. Simplify. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + +commit 25d1c6cd37cc4079adf7c4bad8d10678fb08b409 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 26 11:04:38 2010 -0700 + + Exa screen private has SavedSourceValidate, not SourceValidate + + Need to check the right field to see if there is a wrapped + SourceValidate function. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d073e51beeed2e702fa5c7534b1345360bc302f2 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Apr 26 11:39:19 2010 -0500 + + Clarify help strings for disabled features in configure + + Features which are disabled by default use the --enable-* syntax to show + how they need to be passed to override the default. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + +commit 57409af1267f48457f93134922f2450518182e09 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Apr 14 13:18:28 2010 -0500 + + Catch when requested SHA1 implementation is missing + + The other SHA1 implementation detections already error out if + specifically requested but were not found. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 0d8fe2fe5c37659147cbecac793183c62fc6818a +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Tue Apr 13 13:32:51 2010 -0500 + + Prefer libsha1 over libgcrypt + + When no SHA1 implementation is specified, we should first prefer + system-builtin solutions (libc/libmd/CommonCrypto), then smaller + implementations over the larger ones. libsha1 is much smaller than + libgcrypt, so it should be first. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Acked-by: Julien Cristau <jcristau@debian.org> + +commit 65a2c09549d2372c23b155addff428177708c910 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Apr 8 21:55:45 2010 -0500 + + Revert "Disable Record by default." + + Record was broken during the pre-1.6 development cycle and was not fixed + until 1.7.6. Now that it is fixed, re-enable it by default. + + This reverts commit 3eaecdd66e791e0f3d86b23ce10be057ca44c044. + + Conflicts: + + configure.ac + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6e0d847c273ab89323883a05f806f449180e3669 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Mar 25 03:37:09 2010 -0500 + + xfree86: Fix reference to SGML entities + + XORG_CHECK_LINUXDOC sets the SGML search path to the parent of X11/defs.ent. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit 04b7d529c09af2c842cf020d5b26080e1ffd88d6 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Mar 25 03:36:25 2010 -0500 + + xfree86: Ignore linuxdoc generated docs + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Acked-by: Gaetan Nadon <memsize@videotron.ca> + +commit 39e5108c78e0802833a8e9ea7f29d042738625ba +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Mar 25 03:35:36 2010 -0500 + + dmx: use silent rules in doc + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Acked-by: Gaetan Nadon <memsize@videotron.ca> + +commit 3ba2ce5d1054c99354686aeb373247f1b9debf79 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Mar 25 03:33:55 2010 -0500 + + dmx: Ignore linuxdoc generated docs + + dmx.txt and scaled.txt are generated from SGML, so they probably never + should have been in version control in the first place. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 40972576b606237d5d42abc13d846163e264a4ac +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Tue Mar 23 04:47:27 2010 -0500 + + Use AC_PROG_SED and respect its result + + AC_PROG_SED sets SED as the path to a fully-functional 'sed' (which may + also be called 'gsed' if GNU sed is installed alongside a proprietary + version). + + This is a follow up to commit 9be4157391edf0c5fc4ee36adfb1eb1c3bdb8e3b. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + +commit b557571dbff3d9a615e03cad904d46b8af9153a0 +Author: Jerome Glisse <jglisse@redhat.com> +Date: Mon Apr 26 16:01:48 2010 +0200 + + exa: avoid calling non existent SourceValidate callback + + In unaccel path we were unconditionaly calling the SourceValidate + callback but in some case it could be NULL. Check if we have a + valid callback before calling it. + + Signed-off-by: Jerome Glisse <jglisse@redhat.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0e6e75b04eaca311962390533acc03d0ac5ece83 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 26 09:14:22 2010 -0700 + + Revert "exa: avoid calling non existent SourceValidate callback" + + This reverts commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad. + + This one checked pScreen->SourceValidate instead of + pExaScr->SourceValidate which would cause a segfault when + pExaScr->SourceValidate was NULL. + +commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad +Author: Jerome Glisse <jglisse@redhat.com> +Date: Mon Apr 26 15:55:26 2010 +0200 + + exa: avoid calling non existent SourceValidate callback + + In unaccel path we were unconditionaly calling the SourceValidate + callback but in some case it could be NULL. Check if we have a + valid callback before calling it. + + Signed-off-by: Jerome Glisse <jglisse@redhat.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit edbc56c088462844f6445f5e6d7cbcfc58a207dc +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Apr 26 14:49:25 2010 +0300 + + include: remove couple of unused structures fields and bump ABI + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 4f8dc1109dcdfa973466a038c16c07da5f6c16b4 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Apr 22 15:43:11 2010 +0300 + + dix and others: remove unused arraySize field from ScreenInfo + + Bizarre. This seems to never be used before. I left the field in ScreenInfo, + with another name. So, stop looking at it. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + +commit 64fd39f2f0ffbbdc2d5929047d260263d0962141 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Apr 22 15:48:48 2010 +0300 + + xfree86: no need to assign numScreens again + + numScreens is always being assigned to 0 in dix for any server generation. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a7d398e545a4be5491248d5ccb303aa03ee1594f +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Apr 16 18:13:50 2010 +0100 + + Xwin: make screens structures run-time adjustable + + Change g_ScreenInfo, an array of winScreenInfo elements, from a + static array of MAXSCREENS elements, to a dynamically allocated one + + Fix up the validation that -screen option screen numbers are + contiguous from zero (which possibly didn't work correctly before + anyhow) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jamey Sharp<jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit d8454ae488cfc073cd6010c9a08d53855a0c2612 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Apr 12 20:18:13 2010 +0100 + + Xwin: Simplify screen option processing + + Use an instance of the XWin DDX-specific screen info structure to hold + the current default values, to simplify greatly the code for applying + options to all screens and remove all those loops over MAXSCREENS screens + in the command line option processing + + Use g_iNumScreens for tracking the current initialized screen count + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit b61870595ba4df06006d24ed8c07cfe781bce1b7 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Apr 22 20:20:48 2010 +0300 + + xfree86: track screens' installed colormaps as screen privates + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit a94f5455c71363d5047668ee093901b9e1645cf1 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Apr 22 20:20:43 2010 +0300 + + mi: track screens' installed colormaps as screen privates + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit a2c716eaf6b3a4ce75382394636a0a890b5dcfe0 +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Apr 22 07:34:04 2010 +0200 + + fb: track screens' installed colormaps as screen privates. + + Several DDXes allow each screen to have at most one (or in some cases, + exactly one) installed colormap. These all use the same pattern: Declare + a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by + screen number. This patch converts most of those to use screen privates + instead. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit e055bef055b6c726e9f3ef91a83585d13c80651d +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Apr 22 06:08:29 2010 +0200 + + xfree86: use screen privates for exclusive DGA clients + + Most DGA requests allow at most one client to be using DGA on each screen. + Instead of keeping track of the current client in a MAXSCREEN-sized array, + track it in a per-screen private. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 7c9733d063acee04735a0e75d62e508fe4ea1163 +Author: Jamey Sharp <jamey@minilop.net> +Date: Fri Apr 23 06:41:00 2010 +0200 + + xfree86: use screen privates for Xv offscreen images. + + This replaces a globally-allocated array that depended on MAXSCREENS. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 35d208125fa0ec78e8d694adc52886b977e789cf +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Apr 21 18:28:13 2010 +0300 + + xfree86: fix not reached code in fi1236 driver from i2c + + This issue was introduced in the first dump of the code in 2004. I haven't + check what's the correct fix for it so I simply kept the behaviour of someone + calling this and removed the unreachable code. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7ac6a6b7d0dfc5e021270b2898accd3425aa008a +Merge: 0782894 f7ef6fd +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 21 16:07:38 2010 -0700 + + Merge remote branch 'vignatti/for-keith' + + Conflicts: + exa/exa.c + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0782894b5702adcf6f4a90861793b717f3856fa5 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 21 16:00:28 2010 -0700 + + Xvfb: Usage message typo fix. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ee3412b8702072c3a0b006bd20dd3bc7071d721c +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 21 15:58:23 2010 -0700 + + Restore some unused win32 debug code accidentally removed with unifdef + + unifdef found some code covered by + + which it decided to remove. This patch simply restores that in case + someone wants it back. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e3d2a7a613366c26e5316cf582d9a8c6c6692b0a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 21 11:47:24 2010 +1000 + + Revert "mi: don't thrash resources when displaying the software cursor across screens" + + This commit leads to a segfault on the very first XTS test case. + + Backtrace: + 0: /opt/xorg/bin/Xorg (xorg_backtrace+0x3b) [0x80a33db] + 1: /opt/xorg/bin/Xorg (0x8048000+0x62a75) [0x80aaa75] + 2: (vdso) (__kernel_rt_sigreturn+0x0) [0x5d140c] + 3: /lib/libc.so.6 (0x9bb000+0x73579) [0xa2e579] + 4: /lib/libc.so.6 (realloc+0xe0) [0xa2e830] + 5: /opt/xorg/bin/Xorg (Xrealloc+0x33) [0x80a3f33] + 6: /opt/xorg/bin/Xorg (0x8048000+0x1ab79) [0x8062b79] + 7: /opt/xorg/bin/Xorg (0x8048000+0x1ac4e) [0x8062c4e] + 8: /opt/xorg/bin/Xorg (RegisterExtensionNames+0x2ce) [0x8062fbe] + 9: /opt/xorg/bin/Xorg (AddExtension+0x19a) [0x807bd7a] + 10: /opt/xorg//lib/xorg/modules/extensions/libextmod.so (0x728000+0x1169a) + [0x73969a] + 11: /opt/xorg/bin/Xorg (InitExtensions+0x85) [0x80c0eb5] + 12: /opt/xorg/bin/Xorg (0x8048000+0x1a51d) [0x806251d] + 13: /lib/libc.so.6 (__libc_start_main+0xe6) [0x9d1bb6] + 14: /opt/xorg/bin/Xorg (0x8048000+0x1a2a1) [0x80622a1] + Segmentation fault at address 0x10b2d5f8 + + valgrind output: + ==5069== Invalid read of size 4 + ==5069== at 0x80F928D: FreePicture (picture.c:1531) + ==5069== by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867) + ==5069== by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968) + ==5069== by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292) + ==5069== by 0x807973E: CloseDevice (devices.c:840) + ==5069== by 0x80799B6: CloseDownDevices (devices.c:933) + ==5069== by 0x8062705: main (main.c:309) + ==5069== Address 0x4cce844 is 12 bytes inside a block of size 84 free'd + ==5069== at 0x40057F6: free (vg_replace_malloc.c:325) + ==5069== by 0x80A3DE0: Xfree (utils.c:1154) + ==5069== by 0x80F9332: FreePicture (picture.c:1576) + ==5069== by 0x80FBB4B: PictureDestroyWindow (picture.c:69) + ==5069== by 0x810B1A3: damageDestroyWindow (damage.c:1840) + ==5069== by 0x80864F1: FreeWindowResources (window.c:846) + ==5069== by 0x8086812: DeleteWindow (window.c:925) + ==5069== by 0x806B53E: FreeClientResources (resource.c:806) + ==5069== by 0x806B60F: FreeAllResources (resource.c:823) + ==5069== by 0x80626E4: main (main.c:299) + ==5069== + ==5069== Invalid write of size 4 + ==5069== at 0x80F9295: FreePicture (picture.c:1531) + ==5069== by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867) + ==5069== by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968) + ==5069== by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292) + ==5069== by 0x807973E: CloseDevice (devices.c:840) + ==5069== by 0x80799B6: CloseDownDevices (devices.c:933) + ==5069== by 0x8062705: main (main.c:309) + ==5069== Address 0x4cce844 is 12 bytes inside a block of size 84 free'd + ==5069== at 0x40057F6: free (vg_replace_malloc.c:325) + ==5069== by 0x80A3DE0: Xfree (utils.c:1154) + ==5069== by 0x80F9332: FreePicture (picture.c:1576) + ==5069== by 0x80FBB4B: PictureDestroyWindow (picture.c:69) + ==5069== by 0x810B1A3: damageDestroyWindow (damage.c:1840) + ==5069== by 0x80864F1: FreeWindowResources (window.c:846) + ==5069== by 0x8086812: DeleteWindow (window.c:925) + ==5069== by 0x806B53E: FreeClientResources (resource.c:806) + ==5069== by 0x806B60F: FreeAllResources (resource.c:823) + ==5069== by 0x80626E4: main (main.c:299) + + XTS test case: Xproto pAllocColor + + This reverts commit 00b8b7ad61b6f818271fb4d1e383113170309d72. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f7ef6fd9a1a1f48603df2796fe7c904c25a81077 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Apr 20 15:56:58 2010 +0300 + + xfree86: fix not reached code in tty code + + CLEARRTS_SUPPORT cannot be triggered at all. Notice that mouse driver manual + page states the support for it though. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b36eeb713a349961a6be8a6dd183ded6d27f9974 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Apr 20 16:26:02 2010 +0300 + + xkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols + + move srv assignment to before it's being used. Also, check for xkb being nil. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 471f350c99b2e7c5a9045eef5ebff65cd2ddb7c5 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Apr 19 20:34:30 2010 +0300 + + exa: don't need to check for NULL pointer if we already assumed it has a value + + the alternative would be to check ps in the beginning of the function. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + +commit 96784f4fcb6c2fb82f6d1abbd28ea1e189e4e6f5 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Apr 19 20:46:12 2010 +0300 + + xkb: check for NULL pointer before dereferences it in XkbAddClientResource + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 057c147541bde6f0cbe22ca069b43a97ddc95baf +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Apr 16 18:01:41 2010 +0300 + + Xi: check for NULL pointer before dereferences it in ListButtonInfo + + Both dev and dev->button are already used before their checking were being + performed. So check on the beginning. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 7f457351d2a09013cd57fcb2f95c0d6f56bfaccb +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Apr 19 20:18:51 2010 +0300 + + xfree86: check for NULL pointer before dereferences it in parser code + + Seems to be harmless. Meh. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit d948dcd9555c81ccb378054383ef8da464202bdf +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Apr 16 17:08:09 2010 +0300 + + Xi: fix not reached code in XSendExtensionEvent + + Error was introduced in 31a7994a. I.e., broken since 2007. I guess nobody uses + XSendExtensionEvent. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit f491b0aa5b86a5242fc4e04218202bbb52d0af39 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Apr 16 16:47:33 2010 +0300 + + xfree86: fix not reached code in parser + + ...because Error is a macro that returns NULL. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 099946a3ac94ff5e575e9edcecd26cf9f346b241 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Apr 16 18:35:55 2010 +0300 + + mi: check for NULL pointer before dereferences it in miPointerSetPosition + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 49835eec0c996ad95a01f0fe340336b6b60e51aa +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Apr 16 17:50:43 2010 +0300 + + exa: check for NULL pointer before dereferences it + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 996c115deb558e8e9490ea773528b8e96650df53 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Mar 25 18:17:54 2010 +0200 + + configure: remove unused builtin font macro from autoconf file + + This should be removed together with 49b93df8. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 0ba82562eeba8bf3bcd00b6e3ff28ce5b2c8df3c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Mar 30 19:10:36 2010 +0300 + + Death to Multibuffer extension + + The rationale behind is because no sane application will use this when we have + modern APIs such DRI2. Besides, as a fact, xfree86 server has already + deprecated this extension in 1998: + + http://www.xfree86.org/3.3.6/isc7.html + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 28b7b2b8d02d975480080865f0dddebcaa2f7968 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 19 09:26:10 2010 -0700 + + unifdef -B -DRENDER to always include RENDER code + + This patch was created with: + + git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b3ab978df861c08298f57529e3db980489055c35 +Merge: a92b2c2 0ad022a +Author: Keith Packard <keithp@keithp.com> +Date: Sun Apr 18 22:01:40 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 0ad022a729bafa56cc7b5d241f567444a34514ad +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 14 10:54:29 2010 +1000 + + xkb: rename XkbFakeDeviceButton and XkbFakeDeviceMotion, move into xkbActions.c + + The name XkbDDXFakeDeviceButton and XkbDDXFakeDeviceMotion is somewhat + misleading, there's no DDX involved in the game at all anymore. + + This removes XkbFakeDeviceMotion and XkbFakeDeviceButton from the API where + it arguably shouldn't have been in the first place. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit da4e2e382828d7ba460766709368ec6214b286dd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 14 09:48:53 2010 +1000 + + xkb: purge unneeded includes from ddxDevBtn.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit a92b2c2c8dd1e86ee852168146f01bdf72bfe2d0 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Fri Apr 16 05:55:35 2010 -0400 + + glx: Drop DestroyWindow hook + + Now that glx doesn't call DRI2DestroyDrawable anymore, we don't need to + force a specific resource destruction order in the DestroyWindow hook. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + + https://bugs.freedesktop.org/show_bug.cgi?id=26394 + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1da1f33f2dd5b437dd56cd9f5d6782de4ad5a1bc +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Fri Apr 16 05:55:34 2010 -0400 + + DRI2: Track DRI2 drawables as resources, not privates + + The main motivation here is to have the resource system clean up the + DRI2 drawable automatically so glx doesn't have to. Right now, the + glx drawable resource must be destroyed before the X drawable, so that + calling DRI2DestroyDrawable doesn't crash. By making the DRI2 + drawable a resource, GLX doesn't have to worry about that and the + resource destruction order becomes irrelevant. + + https://bugs.freedesktop.org/show_bug.cgi?id=26394 + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 22da7aa9d743deee198aaf6df5d370a446db9763 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Fri Apr 16 05:55:33 2010 -0400 + + glx: Let the resource system destroy pixmaps + + GLX pbuffers are implemented using a pixmap allocated by the server. + With the change to DRI2 to track DRI2 drawables as resources, we need to make + sure that every drawable we create a DRI2 drawable for has an XID. By + using the XID of the pbuffer, the resource system will automatically + reclaim the hidden pixmap and the DRI2 drawable when the pbuffer is + destroyed or the client exits. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Fri Apr 16 05:55:32 2010 -0400 + + glx: Track GLX 1.3 style GLX drawables under their X drawable ID as well + + This ensures that the DrawableGone callback gets called as necessary + when the X drawable goes away. Otherwise, using a GLX drawable + (say, glXSwapBuffers) in indirect mode after the X drawable has been + destroyed will crash the server. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f4106c02318fcc4b534224df5b95a58aff555fb4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 13 14:44:59 2010 +1000 + + xkb: use GPE for XKB fake motion events. + + Section 4.6.1 of the XKB spec says that "the initial event always moves the + cursor the distance specified in the action [...]", so skip the + POINTER_ACCELERATE flag for GPE, it would cause double-acceleration. + + Potential regression - GPE expects the coordinates to be either relative or + both. XKB in theory allows for x to be relative and y to be absolute (or + vice versa). Let's pretend that scenario has no users. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 6c42c8c356be305dc7f3f92ad8d58675da8c2f07 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 14 10:51:41 2010 +1000 + + xkb: Guard against SIGIO updates during PointerKeys. + + In theory, an event coming in during GPE could reset our lastSlave, leading + to rather interesting events lateron. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 108457dff816569453a2d88cd72595fa7eb02479 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 13 14:41:07 2010 +1000 + + xkb: Post PointerKeys through the XTEST device. + + Posting an event through a master device may cause pointer jumps once + lastSlave == master, caused by double scaling. To avoid this, post the fake + event generated by XKB through the XTEST device instead. + + Fedora bug #560356 <https://bugzilla.redhat.com/560356> + Tested-by: Andrew McNabb + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit a780e5b3638a0ff81301fc68aca15b47ba0befb7 +Author: Benjamin Tissoires <tissoire@cena.fr> +Date: Wed Apr 14 17:27:51 2010 +0200 + + xf86ScaleAxis: support for high resolution devices + + High resolution devices was generating integer overflow. + For instance the wacom Cintiq 21UX has an axis value up to + 87000. Thus the term (dSx * (Cx - Rxlow)) is greater than + MAX_INT32. + + Using 64bits integer avoids such problem. + + Signed-off-by: Philippe Ribet <ribet@cena.fr> + Signed-off-by: Benjamin Tissoires <tissoire@cena.fr> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e424d5812300e82de375d83dc0b490a76d865016 +Merge: 5b0faf3 0e7703f +Author: Keith Packard <keithp@keithp.com> +Date: Thu Apr 15 15:01:34 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 0e7703f9b1927328954a2fc87aac6be244819329 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Apr 13 22:28:36 2010 +0200 + + vfb: add a name and type to the pointer and keyboard + + Fixes a crash in XIQueryDevice which calls strlen on a NULL pointer. + + #0 strlen () at ../sysdeps/x86_64/strlen.S:31 + #1 0x00000000004c16ed in SizeDeviceInfo (dev=0x969bd0) + at ../../Xi/xiquerydevice.c:204 + #2 0x00000000004c1a01 in ProcXIQueryDevice (client=0xa57510) + at ../../Xi/xiquerydevice.c:98 + + Debian bug#575905 <http://bugs.debian.org/575905> + + Reported-by: "Bernhard R. Link" <brlink@debian.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2f29b163bbdebe384c24f781bb97b446959e8f4c +Author: Adam Tkac <atkac@redhat.com> +Date: Mon Mar 22 14:52:29 2010 +0100 + + dix: Export AllocDevicePair GetPointerEvents, GetKeyboardEvents and generate_modkeymap functions from Xorg. + + Those functions are used by TigerVNC libvnc.so module which doesn't + use standard XInput infrastructure but uses same functions like, + for example, XTest devices. + + Signed-off-by: Adam Tkac <atkac@redhat.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 241b53b77750b5eea6759e79b23be4ff270a3d1f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 23 14:35:56 2010 +1000 + + mi: remove log-spamming bogus error message (#26843) + + miSpriteRealizeCursor is called whenever a device is set floating and it's + fine to do so, no need for an error message. + Same goes for the other miSprite messages. + + X.Org Bug 26843 <http://bugs.freedesktop.org/show_bug.cgi?id=26843> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 00b8b7ad61b6f818271fb4d1e383113170309d72 +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Wed Apr 7 13:52:47 2010 -0700 + + mi: don't thrash resources when displaying the software cursor across screens + + This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures + for each pScreen instead of failing to thrash between them when changing + screens. + + Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5f31e2196179f8db3170d65a17d8ad40da1acb0d +Author: Tim Yamin <plasm@roo.me.uk> +Date: Mon Mar 8 12:45:15 2010 +1000 + + dix: fix cursor screen check for xinerama setups. + + The de-duplication of CheckPhysLimits 942eae6868b8b0f343b6a added a + condition that is invalid for a Xinerama setup. pScreen is invalid for the + Xinerama case, so comparing it to anything is a bad idea. + + Signed-off-by: Tim Yamin <plasm@roo.me.uk> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5b0faf355465c9f21ad96e0ed266fbdbc29efb5b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Apr 15 10:55:53 2010 -0700 + + XQuartz GLX: Don't let garbage enter our pixel request + + https://bugs.freedesktop.org/show_bug.cgi?id=27654 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit fe7778e58e099d353689755ed2f5aa440569ebe3 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 14 09:06:04 2010 -0700 + + XQuartz: Fix possible NULL dereference in ListenOnOpenFD + + <rdar://problem/7862319> + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Marc Majka <majka@apple.com> + +commit 206531f75cd41c034e89fdfbc75ab0910682eef8 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Apr 13 14:33:49 2010 -0700 + + XQuartz: Localization update + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 9ddbb03fa56aa73c3f417d8ee6433e45b94445b3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 14 17:43:22 2010 +1000 + + dix: Fix crash in DeliverGrabbedEvents. + + If both devices are synchronously grabbed, first with a GrabPointer, then + with a GrabKeyboard (GrabModeSync on both), sync.other of each device points + to the grab of the respective other device. + + If the keyboard is then thawed through a AllowSome request, the VCK's + sync.other is reset to NULL. Subsequently, an event on the VCP would crash + the server when dereferencing sync.other on the VCP. + + The check's purpose is to compare if the other device is grabbed by the same + client, which should be checked by accessing (dev->deviceGrab->grab->resource). + A check of the server-1.3 sources confirms that. + + XTS test case: Xlib13 XAllowEvents 20. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7b6517526631a65891b806bca30be8f49955d0a8 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Wed Apr 14 19:28:37 2010 +0200 + + EXA: Check sys_ptr isn't NULL before passing it to the UploadToScreen hook. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27510 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fc5d76740851725e3788c68e14474a012a205892 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Apr 6 11:51:53 2010 +0200 + + XGE: don't register an extension event + + The GenericEvent is a core event, we never send an extension event, so + don't reserve an id for one. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0b676acd47e0d6a675df374b42ddb200deab5d06 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Apr 13 11:45:41 2010 +0200 + + Bump version in configure.ac + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1760d2bef9f5b248cb2332f6ebf0220eb02bab42 +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Fri Apr 9 10:58:48 2010 -0400 + + glx: Set the pbuffer bit for dri2 fbconfigs + + They've been implemented for a while, but we never advertised them. All we + need to do is set the GLX_PBUFFER_BIT in the drawable type fbconfig + field when we're using DRI2. + + https://bugs.freedesktop.org/show_bug.cgi?id=26581 + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ab60975fe28cb135b4183c57b7f50d3615921c1f +Merge: adbbc66 59edde7 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Apr 12 21:40:41 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 59edde7c28db2d3174a5813a0af334e4ead2082f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Apr 9 16:19:43 2010 -0700 + + XQuartz: Add a GUI preference for the Alt / Mode_switch toggle + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Kevin Van Vechten <kvv@apple.com> + +commit 5600f7f001529b3afdee95546aec212a70d6a5b2 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Apr 9 13:33:06 2010 -0700 + + XQuartz: Customize the NSDefaults id in the man file. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Kevin Van Vechten <kvv@apple.com> + +commit 840d12c7a6ac6a974da185045215ce944a61fab6 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Apr 9 13:29:34 2010 -0700 + + XQuartz: Add a defaults option to toggle Alt / Mode_switch + + See option_sends_alt in Xquartz(1) + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Kevin Van Vechten <kvv@apple.com> + +commit d6f160510a50d4c4eaa48c9c69a5ddda0d50052c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Apr 5 16:54:22 2010 -0700 + + XQuartz: Blacklist some oddball legacy Mac keycodes that break wine + + http://xquartz.macosforge.org/trac/ticket/295 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Kevin Van Vechten <kvv@apple.com> + +commit adbbc661080ba4efdb764c154d40c4d2fe718e16 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Tue Feb 16 08:11:41 2010 -0800 + + xfree86: Fix priority ordering for ignoring input classes + + Commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f changed the priority + ordering of the InputClass option merging to be "last match wins". This + fixes the handling of Option "Ignore" to follow that logic. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit d7c98c1c81ae272f66edb05fde20f4c616604add +Merge: 82cf3a4 03ccbd2 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 7 22:25:51 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 03ccbd2579948d11e5f16f88cdf68a55f57c9d26 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 8 13:47:26 2010 +1000 + + xfree86: remove dead input drivers from xorg.conf man page. + + These drivers have been deactivated for over a year now, let's not refer + potential users to them. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d4dd3d0085f8eaca8c989aaeace1a1a24c5ebf49 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sat Apr 3 09:33:51 2010 -0700 + + Move 10-evdev.conf to system config dir $datadir/X11/xorg.conf.d + + Since the server searches in a vendor specific path now, we can install + the evdev catchall there without disturbing local administration files. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 95f01bdfee8241371675f0089170fa6b2908d815 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sat Apr 3 10:08:25 2010 -0700 + + xfree86: Search for a system xorg.conf.d + + In addition to the conf files found in /etc/X11 or $sysconfdir/X11 used + for local administration, we also reserve a system directory for vendor + and package usage. The simple search path is: + + /usr/share/X11/xorg.conf.d + $datadir/X11/xorg.conf.d + + Files from these directories will have the lowest config priority. The + directory $datadir/X11/xorg.conf.d is exported from xorg-server.pc in + the variable "sysconfigdir". Packages should install their .conf files + to the directory specified by: + + `pkg-config --variable=sysconfigdir xorg-server` + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a1bae63dc634a5a79861eab128c63506081f7ed9 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sat Apr 3 09:33:49 2010 -0700 + + xfree86: Set a saner search path for xorg.conf.d + + There's no reason to carry all the oddities from xorg.conf like appended + hostname to the search path for xorg.conf.d. This changes it to something + very simple: + + /etc/X11/<cmdline> + $sysconfdir/X11/<cmdline> + /etc/X11/xorg.conf.d + $sysconfdir/X11/xorg.conf.d + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2ac33888a9a5766aaf88bc92a8bd1d489873524c +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sat Apr 3 09:33:48 2010 -0700 + + xfree86: Document how -configdir affects the xorg.conf.d search path + + Explain the "safe" path dance for -configdir, too. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2460e921d18fd264e6f6374be0908f4100442650 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sat Apr 3 09:33:47 2010 -0700 + + xfree86: Allow adding sysconfdir and datadir to config search paths + + We could just use $projectroot/etc and $projectroot/share, but the user + might have other plans for them. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c8a608cb6ce8f9c86258c1ab49084f691fa9cc51 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 7 10:04:38 2010 +1000 + + config: only match sane devices in 10-evdev.conf + + Having a generic catchall also adds devices like accelerometers. These + devices make X unusable, hence restrict matching to "known sane" devices + like pointers, touchpads, keyboards, tablets and touchscreens. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Julien Cristau <jcristau@debian.org> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Acked-by: James Cloos <cloos@jhcloos.com> + +commit 6b09f66d8c6ebcee70382b5cca1ba82b68f20afa +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Fri Apr 2 12:48:21 2010 -0700 + + Don't keep a pointer to a possibly freed cursor when changing screens, preventing a crash in xf86CursorEnableDisableFBAccess() trying to restore it. + + Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 82cf3a4ae01811917f7903d6f62ba9b7132adf7e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Apr 6 15:52:18 2010 -0700 + + Convert x86emu fixed size int typedefs to use stdint types + + Fixes x86emu builds when using non-gnu compilers now that u64 is required + + Before this fix, the u64 type would not be defined, causing + x86emu/sys.c to fail to build: + "sys.c", line 102: syntax error before or at: ldq_u + "sys.c", line 102: syntax error before or at: * + + Since Keith requested using <stdint.h>, converted all the x86emu + typedefs to use the stdint types. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Acked-by: Matt Turner <mattst88@gmail.com> + Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a9fe7cfa77ccee64d68732dc3f37d35cbfc27a65 +Author: Paulo Ricardo Zanoni <pzanoni@mandriva.com> +Date: Thu Mar 11 14:28:18 2010 -0300 + + dix: be more verbose when we run out of opcodes + + If we run out of opcodes, nothing is print on the log, making the + problem hard to debug. In the current Xserver, if you enable some + extensions like multibuffer (+2 events) and use nvidia binary driver (+5 + events) you can run out of opcode numbers. + + Signed-off-by: Paulo Ricardo Zanoni <pzanoni@mandriva.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6150595bdbacde13bb4f9aba81b15435089bee94 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon Apr 5 19:12:22 2010 -0400 + + doc: specify 1.6.1 as the minimum version for doxygen. + + Older versions generate filenames that are different from + the ones listed in the Makefile. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cbda58c963af5bb9c4643e9017dd4eec589ceff3 +Merge: a7698a6 c983f40 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 7 15:51:38 2010 -0700 + + Merge remote branch 'yselkowitz/master' + +commit a7698a677682a32960b885c22fdba2add70f4658 +Merge: 495cec7 165a4a9 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Apr 6 12:36:15 2010 -0700 + + Merge remote branch 'jbarnes/master' + +commit c983f40fe4f30311f31a9df699cdc888709251d0 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Feb 24 15:17:42 2010 -0600 + + Cygwin/X: Add configure option for WindowsWM + + WindowsWM support is still experimental, and uses the Rootless extension + which currently breaks the simultaneous build of the other DDXs (see + commit b3415187e92960cbff784108b5a3a8d130dc34c5). So we disable it by + default for now; once the latter issue is fixed we can make this 'auto'. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + +commit 20701522be803fe47e921fcf059dadf64c7f287d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Feb 18 14:19:21 2010 -0600 + + Don't enable ROOTLESS_WORKAROUND, it breaks composite + + This possibly brings back whatever the bug is in + http://bugs.freedesktop.org/show_bug.cgi?id=1168 for + -rootless mode, but since we don't have reproduction + steps for that, I can't test that... + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + +commit 95c9947f6244d37592958b70760bd1ac885b625a +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Mar 24 00:08:23 2010 -0500 + + Cygwin/X: Disable unsupported extensions in configure + + Several extensions are not supported by XWin, some of which are enabled + by default in configure. We forcefully disable these early on so that + configure will succeed without arguments and without the corresponding + proto installed. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + +commit 24c9d48cd6999f1e90f9f0e2bbfebd8e95d314d8 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Mar 22 12:47:52 2010 -0500 + + Disable setuid configure test on Cygwin + + Only Xorg is installed setuid, so there is no need to run this configure + test on Cygwin. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + +commit 495cec794dad95ed0c79048f3c410ad23e7d5ea4 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 2 00:14:23 2010 -0700 + + xserver 1.8.0 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b9ad452ec92a7dcbed680acb3f3b8ec29fa660df +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Apr 1 18:57:50 2010 +0300 + + xfree86: die gracefully in the vga arbiter if AddScreen fails + + vga arbiter will be locked in one device while AbortDDX will call LeaveVT + routines from the other device. Fail! + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e75f202e7768b7cc0eb2ad0e0f3f51ea81cd7275 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 24 11:08:55 2010 +1000 + + configure: enable udev backend as "auto" + + Due to the checks in configure, this means it gets priority over HAL if + libudev is found. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 24952b786625fef808cb26d539dd5109d623c053 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Apr 1 23:44:24 2010 -0700 + + Install 10-evdev.conf in $(prefix)/etc/X11/xorg.conf.d under udev + + udev needs some xorg.conf file to tell it to load a suitable input + driver, 10-evdev.conf is as simple as they come, mapping all evdev + devices to the evdev driver. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 02328f190f893cb4ad0f3af7a2ecd39ed77ae5ad +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Apr 1 18:21:51 2010 -0700 + + Bump bundle version to 2.5.1 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 0e342add7768df55a1917e27f9b85feddd444e82 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Apr 1 15:30:46 2010 -0700 + + darwin: Correct inline assembly for ___crashreporter_info__ + + It was missing an underscore. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 67b814d9b2baea6beccfb1625a1e3f0b2ba7218b +Author: Ruediger Oertel <ro@suse.de> +Date: Mon Mar 29 00:23:40 2010 +0200 + + Remove now obsolete function chooseVideoDriver + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1dd5fbc5a4d860af1c102b33e04dedd8c72617a1 +Author: Ruediger Oertel <ro@suse.de> +Date: Fri Mar 26 09:33:20 2010 -0700 + + xfree86: Handle driver autoconfiguration when .conf files exist + + When doing driver autoconfiguration with some parts of the config file + present but no driver set (e.g. only input configuration) fix the case + that we may have multiple drivers to try. + + Create a screen section for each driver and let them be tried in a row. + + Signed-off-by: Ruediger Oertel <ro@suse.de> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Timo Aaltonen <timo.aaltonen@aalto.fi> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 57cb1a854a1b6d91d214b3fa250a7df2ed20d433 +Merge: 4b3d67a 28a5f14 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 29 11:46:00 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 4b3d67a7647f696957727948f9757a261e15d14e +Merge: 579715f aa91508 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 29 11:44:07 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 165a4a9c7de0fcc6ef6a6421736b412ccb35965e +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Tue Mar 23 09:47:08 2010 -0700 + + GLX/DRI2: expose swap control extensions if DDX support is present + + Export DDX swap control status from the DRI2 module and check for it in + GLX when initializing extensions. + + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 5933b0abc6a76aaea84aa534df89900cd795c888 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Mon Mar 8 15:10:47 2010 -0800 + + DRI2: prevent swap wakes from waking MSC waiters + + If a few swaps were queued leading to a throttle related block on the + client, and then the client submitted an MSC wait, one of the previous + swap wakeups could have caused the MSC wait to complete early. Add a + flag for this to prevent a swap wake from prematurely waking an MSC + waiter. + + Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit b00d435ddf2e9817e33bfd5f7e9b905442dc23c7 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Mon Mar 8 12:41:25 2010 -0800 + + DRI2: handle swapsPending better + + Avoid a potential swapsPending underflow by incrementing it before + ScheduleSwap, which may complete it immediately. And be sure to + decrement it again in case the schedule failed. + + Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 0294ff2a5cadddc8fcc77ba9a851f979f0b91fc3 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Mon Mar 8 12:39:54 2010 -0800 + + DRI2: throttle swaps at submission time too + + We need to throttle swaps here in addition to when the context is made + current to avoid causing problems with clients that just swap. + Throttling here also ensures our swaps get ordered as long as we block + the client occasionally. + + Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit db1c7cb604167baf49e61be4c09ccf7b592c4af3 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Mon Mar 8 12:38:37 2010 -0800 + + DRI2: advertise lowest supported DRI2 protocol version + + Update our supported DRI2 protocol version as each driver does + DRI2ScreenInit, since depending on available kernel features, each DDX + may support different callbacks and therefore protocol. + + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 87ca6320f26eb3129e3c19056e1d8fa5c1784723 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Fri Mar 5 09:49:03 2010 -0800 + + DRI2: handle swap_interval of 0 correctly + + A 0 swap interval means that swaps shouldn't be sync'd to vblank, so + just complete the swap immediately in that case. + + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 8476d99231cb725c090305d60f1c1c889d25c8dc +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Fri Mar 5 09:15:24 2010 -0800 + + DRI2: drawable lifetime fixes + + Handle drawable destruction and lifetime correctly. + + Check whether the drawable priv is valid in DRI2SwapInterval(), + DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to + check it before using it. + + If more than 1 outstanding swap is queued, we may complete several after + an app has exited. If we free it after the first one completes and the + refcount reaches 0, we'll crash the server on subsequent completions. + So delay freeing until all swaps complete and remove the error message + as this is a normal occurence. To do this properly, we must also avoid + destroying drawables in DRI2DestroyDrawable() if a swap or wait event is + pending. + + And finally, make sure we free drawables in DRI2WaitMSCComplete() if + necessary (i.e. if the refcount has reached 0 and this MSC was the last + pending event on the object). + + Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit b180e43977710b56ccfd6780f204ddcc952987a1 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Thu Mar 4 10:31:59 2010 -0800 + + DRI2: fix swapbuffers handling of SBC and target MSC + + Returns expected SBC after completion of swap to caller, as required by + OML_sync_control spec, instead of the last_swap_target value. + + Passes target_msc, divisor, remainder, correctly for + glXSwapBuffersMscOML() call, while retaining old behaviour for simple + glXSwapBuffers() call. + + An OML swap can have a 0 target_msc, which just means it needs to + satisfy the divisor/remainder equation. Pass this down to the driver as + needed so we can support it. + + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + +commit 751e8c09d34df4b41e8d8384a3ec1bf5cb8ca028 +Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> +Date: Sun Feb 21 05:26:00 2010 +0100 + + DRI2WaitSbc(): Fixes for correct semantic of glXWaitForSbcOML() + + Added implementation for case target_sbc == 0. In that case, the + function shall schedule a wait until all pending swaps for the drawable + have completed. + + Fix for non-blocking case. Old implementation returned random, + uninitialized values for (ust,msc,sbc) if it returned immediately + without scheduling a wait due to sbc >= target_sbc. + + Now if function doesn't schedule a wait, but returns immediately, + it returns the (ust,msc,sbc) of the most recently completed swap, + i.e., the UST and MSC corresponding to the time when the returned + current SBC was reached. + + Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + +commit 0de4974b90b10fa6a447cdf980b4a114c6c9e5a8 +Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> +Date: Sun Feb 21 05:25:59 2010 +0100 + + DRI2: Fix glitches in DRI2SwapComplete() and DRI2WakeupClient() + + DRI2SwapComplete(): Increment pPriv->swap_count++; before calling + into callback for INTEL_swap_events extension, so the swap event + contains the current SBC after swap completion instead of the + previous one. + + DRI2WakeupClient: Check for pPriv->target_sbc <= pPriv->swap_count, + had wrong comparison pPriv->target_sbc >= pPriv->swap_count for + unblocking of clients of DRI2WaitSBC(). + + Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + +commit 4c8ec49826a46eb3b36c69d2ad3f82320c179c38 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Thu Mar 4 09:54:15 2010 -0800 + + DRI2: make target_sbc signed + + We need to track invalid targets as well as 0 targets, so just make it + signed so our comparisons work like they should. + + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Reported-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit c4d54816f2ee4883d8f9bcf4595474fb58c95146 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Thu Mar 4 09:19:13 2010 -0800 + + DRI2: fixup handling of last_swap_target + + We need to initialize the swap target, which is passed to the driver to + schedule events. Rather than using -1 to indicate that the field is + uninitialized, just make sure we initialize it at drawable creation + time. + + Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 28a5f14b4089dccb8045cc4fdc923542a73dd22d +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Mar 28 13:46:23 2010 -0700 + + XQuartz: Re-query dixScreenOrigins as the value could've changed. + + Fix a regression in 9c9c3a85b094a3c7b2763a572715d710325091aa + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit 436d0bb9cca122bfdde32902b683d2499f61e6fc +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Mar 27 17:35:10 2010 -0700 + + darwin: Generate crash reports on FatalError() + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit 73b3b67aac9f3938a96cb8822b9c270bd82ded5c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Mar 22 09:30:51 2010 -0700 + + GLX: Remove a redundant initialization + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit 339207be6f184cc783076fc7e2cc12f92f57f2ba +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Mar 25 22:15:58 2010 -0700 + + XQuartz: Workaround weird key data reported on some layouts + + This should make 'Unicode Hex Input' work as an input layout. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit aa91508356f243edc3b11795b1481edcfe0d39c2 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed Mar 24 23:18:35 2010 -0700 + + config/udev: Prefer product name from attribute rather than uevent + + The input device product name for evdev devices in the kernel uevent has + embedded quotes that aren't expected here. Use the sysfs name attribute + instead, which does not suffer this problem. The uevent name will be + used as a fallback if no name attribute is found. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d00c3298a698ddddc8967215cef7dd941fa15804 +Author: Fernando Carrijo <fcarrijo@yahoo.com.br> +Date: Wed Mar 24 20:11:34 2010 -0300 + + Cleanup some comments in SpriteRec + + Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 70bd02f2ea3a91c0340df97ca3b8a4f9400f6f46 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 23 12:13:56 2010 +1000 + + xfree86: merge driver from the input class into the options. + + A driver that is assigned by an input class is only present as idev->driver. + The driver itself has no access to this information once PreInit is called. + For devices that rely on chain-hotplugging (wacom), this means that for the + second device the driver information is lost and the second device cannot be + initialized through NewInputDeviceRequest. Although this could be worked + around by hardcoding the driver name in the wacom driver, having the + assigned driver in the options seems like the better solution. + + This issue only manifests itself with the udev backend. With HAL, the driver + is assigned by HAL and the option is duplicated in config/hal.c. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 579715f830fbbca9e1ecb17dc18176132f5969e7 +Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> +Date: Wed Mar 17 12:16:57 2010 +0200 + + os: Prevent backtrace from being stopped in noreturn functions. + + There are two noreturn functions in the X server: FatalError and + AbortServer. Having any of those two functions in the middle of a call + stack will prevent unwinding the program properly and stops the + backtrace at those functions in gdb. + + The file containing FatalError and AbortServer, os/log.c, has to be + compiled with the -mapcs-frame option on ARM to get proper + backtraces. Automake imposes its own restrictions on compiling + individual source files with different options. The recommended way to + do this is to put os/log.c into a convenience library and add this + library inside os/libos.la. See the documentation of GNU Automake + manual, version 1.11.1, section 27.8 Per-Object Flags Emulation, for + details. + + Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e086b99c1f5ce351b578de7cd9f616bc79d6cf64 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Tue Mar 23 01:03:53 2010 +0600 + + kdrive: Bump evdev maxKeycode + + There are keycodes > 193 in evdev, e.g. KEY_WIMAX which is 246 . + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Adam Jackson <ajax@nwnk.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 185185eeb44a277c324be0f58a4b4a469b56b69b +Author: Peter Harris <pharris@opentext.com> +Date: Tue Mar 23 12:08:19 2010 -0400 + + Fix crash when all glyphs of a given depth are freed, but not all glyphsets + + This is how the crash can be triggered with only two clients on the system: + Client A: (already running) + Client B: Connect + Client B: CreateGlyphSet(depthN) + Client A: Disconnect + Server: free globalGlyphs(depthN) + Client B: AddGlyphs(depthN) + Server: SEGV + + This crash was introduced with the FindGlyphsByHash function + in 516b96387b0e57b524a37a96da22dbeeeb041712. Before that revision, + ResizeGlyphSet was always called before FindGlyphRef, which would + re-create globalGlyphs(depthN) if necessary. + + X.Org Bug 20718 <http://bugs.freedesktop.org/show_bug.cgi?id=20718> + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8311cd5f89ca6781842bb24671b8122cdf8be148 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Mar 23 10:37:36 2010 -0700 + + XKB: Fix garbage initialization + + XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify + changedControls mask because it was uninitialized on the stack. + + Found by clang + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0ecfab89d1754b0b7e32b3964b40663d1810cd62 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Mar 22 14:04:09 2010 +1000 + + xfree86: remove if 1 from the dawn of time. + + 7+ years for an if 1 should be enough to just admit that there's no other + option. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com> + +commit 6389405b56d2221d8a7b80c4bb3bd3b4e1a29bab +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Mar 22 09:20:49 2010 +1000 + + configure: Always define XINPUT. + + This define was removed in e251c9e75afdc "Remove all traces of #ifdef XINPUT + and the matching bits from the configure.ac". Drivers that support multiple + server versions and still check for ifdef XINPUT now always build without + XINPUT support if they're calling XORG_DRIVER_CHECK_EXT(XINPUT, inputproto). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 0c2fde5c8ad6e94b4ed1588aa93256a2b64f74d9 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Mon Mar 22 11:20:15 2010 -0700 + + Fix typos in the swap functions + + This should fix bug #3539. + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 3083c5d0c4386cdd7083b7a83ac72fdad2f1e61e +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Mar 22 18:01:17 2010 +0100 + + Xext: Fix cursor reference counting hazard. + + Make sure the reference count of the new cursor is increased before the old + one is decreased, otherwise bad things will happen if they're one and the + same and the reference count is 1 initially. Not sure this can actually happen + here, but better safe than sorry. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Roland Scheidegger <sroland@vmware.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b29220dc765cb6f878c5466e00e4bd21f3bd803d +Merge: c3da766 ed31d50 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 21 23:01:58 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit c3da76643aeebdd24047e3e14a860507eac37ec3 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Mar 18 23:19:20 2010 -0500 + + Cygwin/X: Make X -> XWin symlink during install + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit abf4e0b7e349b0238b2b97a16b8a308b5026af31 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Mar 22 00:44:28 2010 -0500 + + New header for XF86Bigfont server functions + + Xext/xf86bigfont.c contains three non-static functions which are called + elsewhere in the server. This creates a new header containing these + declarations in order to fix several warnings: + + xf86bigfont.c:285: warning: no previous prototype for `XF86BigfontFreeFontShm' + dixfonts.c:502: warning: implicit declaration of function `XF86BigfontFreeFontS$ + dixfonts.c:502: warning: nested extern declaration of `XF86BigfontFreeFontShm' + log.c:436: warning: implicit declaration of function `XF86BigfontCleanup' + log.c:436: warning: nested extern declaration of `XF86BigfontCleanup' + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 57a049ea89b008c0b60316c3b6e6ff5c8fbd4cad +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Mar 18 04:46:20 2010 -0500 + + Xext: fix old-style function definitions in xf86bigfont.c + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 822b9f9a3e822df8848995eda246f83864d1366f +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Sun Feb 21 01:24:44 2010 -0600 + + mi: remove deprecated #include <X11/extensions/xf86bigfstr.h> in miinitext.c + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 946b49ebcbf47e030a6e00ce1a699f3b055f638a +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Mar 17 17:37:05 2010 -0500 + + Catch errors in recursive relink targets + + If make relink fails in a subdirectory, we need to catch the error + otherwise make will continue iterating the 'for' loop. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 0820a6e2fb005b5f856dda25e1644f34fc994129 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Mar 17 13:40:41 2010 -0500 + + Fix .man.N targets for AM_SILENT_RULES + + Add $(AM_V_GEN) for sed-based rules so they appear as expected with + automake silent rules, and $(AM_V_at) to completely hide cp/ln/rm + commands which are not prone to fail. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 9be4157391edf0c5fc4ee36adfb1eb1c3bdb8e3b +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Mar 17 13:33:39 2010 -0500 + + Respect value of SED from configure + + We now use libtool, which calls AC_PROG_SED and sets SED as the path to + a fully-functional 'sed' (which may also be called 'gsed' if GNU sed is + installed alongside a proprietary version). Therefore we should respect + the value of SED so we are sure to use the correct one. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 5e00f464c546debf9164f24c6d648623f7ee5946 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Mar 17 14:56:24 2010 -0500 + + Fix relink targets for silent rules + + Add $(AM_V_at) to all relink make targets to silence them when automake + silent rules are in use. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit fa7e062962d17862032bc600bfcffd486addb063 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Mar 17 13:52:38 2010 -0500 + + Use EXEEXT in relink rules for portable DDXs + + On Cygwin and MinGW, executables use the .exe suffix. Autoconf and + automake set EXEEXT on these platforms, and leave it empty on others + where no suffix is used. $(EXEEXT) must be appended to executable names + in custom rules for portability: + + http://www.gnu.org/software/automake/manual/html_node/EXEEXT.html + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 037869d7b876f43158df88d63788b93a5d6187c1 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Mar 17 13:48:49 2010 -0500 + + kdrive: Use $(MAKE) in relink rules + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + +commit 8e5de45513577c63a33833931f2afd0cc59d42a7 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Feb 24 02:56:59 2010 -0600 + + Use libtool -export-dynamic flag for portability + + The linker flag required for exporting symbols in executables varies + by platform. libtool handles this with a single -export-dynamic + flag (not to be confused with the similarly-named ELF linker flag) + which tells it to use the correct platform-specific flag at link time. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 2a11ffa977d2267d8b2f27b76490a98e9c73b8c7 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Fri Feb 19 14:31:28 2010 -0600 + + Rename xdmx client to dmxinfo + + The DMX Xdmx server and xdmx client cannot both be installed on + case-insensitive file systems. The client is undocumented and + so renaming it is the best option. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit fbb4903eaa23174d21ab8c640d9de1fe3eb17539 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Sun Feb 21 02:08:08 2010 -0600 + + Cygwin/X: Fix windres rule for automake silent rules + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Rémi Cardona <rem@gentoo.org> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 8db894690988f2bac9c0acb96fd39811d2b42f47 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Fri Feb 19 00:05:28 2010 -0600 + + Cygwin/X: Fix make dist after 11252ed82e1f361b99e86521ac9314f868bd1a3a + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Acked-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit ed31d50b5f7f25e4db986711699704e615b8afcb +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Mar 19 17:24:27 2010 -0700 + + XQuartz: Constrain the pointer to the updated display bounds on display reconfigure. + + http://xquartz.macosforge.org/trac/ticket/346 + +commit 927480be12ff61deb4e8120d2f90ddef3a1a6beb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Mar 20 11:03:28 2010 -0700 + + XQuartz: pbproxy: Make standalone xpbproxy respect the launchd prefix + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit d16bc8a3cdbe0e8b9cba836c7aa2ff7c0458049e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Mar 20 03:28:57 2010 -0700 + + XQuartz: xpbproxy: Cleanup xpbproxy threading + + Confine xpbproxy to a single thread + Runs inside its own CFRunLoop + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 9c9c3a85b094a3c7b2763a572715d710325091aa +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Mar 19 17:23:12 2010 -0700 + + XQuartz: Minor cleanup + + Move RandRInit to where it will need to be (not yet implemented) + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit bb75d0df8b5238bfe8b011bb5737fae2a3584290 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Mar 19 15:26:50 2010 -0700 + + XQuartz: GLX: Fix Availability for Tiger ppc workaround + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit eac7cdabecafb7c505795207182ab2578d672c06 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Mar 16 11:29:08 2010 -0700 + + Revert "XQuartz: Explicitly pass a bellProc to make XBell() work again." + + I'm not quite sure why this was necessary, but DDXRingBell is being called + from CoreKeyboardBell, so we don't need a separate bellProc which would + result in multiple rings. + + This reverts commit 9071b0d69748cfa7ecca17b4cb0e431bbb0ef2a4. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 13c007f9224ad871193e40466e64df1477ed26b0 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 21 17:23:46 2010 -0700 + + Bump to 1.7.99.902 -- 1.8 RC2 + +commit 235fa5030428084368e5be57fca695647b7b79c4 +Merge: 1c612ac fa5103a +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 21 15:38:40 2010 -0700 + + Merge commit 'fa5103a02bd509e4a102afdad2ab26cb22210367' + +commit 1c612acca8568fcdf9761d23f112adaf4d496f1b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 17 14:32:38 2010 +1000 + + dix: if owner-events is true for passive grabs, add the window mask (#25400) + + A client requesting a GrabModeSync button grab, owner-events true, with only + the ButtonRelease mask set would never receive the press event even if the + grab window had the ButtonPress mask set. + + The protocol requires that if owner-events is true, then the delivery mask + is the combination of the grab mask + the window event mask. + + X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Jim Ramsay <i.am@jimramsay.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 95ca39b981624df5338a16b506289014c431ae82 +Merge: e7ff956 bf18191 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 21 15:24:06 2010 -0700 + + Merge remote branch 'jturney/master' + +commit e7ff956638780dc1c6f160a1fd041b92cebff9ac +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Mon Mar 15 23:46:36 2010 +0200 + + common: xf86Configure: alloc_strlen: Allocated memory does not have space for the terminating NUL of the string + + buffer_alloc: Called allocating function "realloc" which allocated memory dictated by parameter "len + strlen(displaySize_string)" + alloc_strlen: Allocated memory does not have space for the terminating NUL of the string + var_assign: Assigned "ptr->mon_comment" to storage allocated by "realloc(ptr->mon_comment, len + strlen(displaySize_string))" + + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit aeae6637b52b042cf8b07c6943abcd5d31968d49 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Mon Mar 15 23:46:34 2010 +0200 + + fb: fbFinishScreenInit: leaked_storage: Variable "(visuals|depths)" goes out of scope + + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Reviewed-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d9ee31ab05efbd2d598cc93a41a8834f84d30803 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Mon Mar 15 23:46:33 2010 +0200 + + exa: exaFinishAccess: Overrun of static array "pExaScr->access" of size 6 at position 6 with index variable "i" + + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit bf181915e103b0659c5a0bc3b2f6bccb18c9ec36 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Feb 1 17:11:51 2010 +0000 + + Cygwin/X: Allow the default log location to be configurable + + Allow the default log location to be configurable (e.g. /var/log), + and use separate logs for each display instance (e.g. XWin.0.log). + + Make the type of g_pszLogFile const char*, per os/log.c:LogInit(). + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit cca4952d750779a4c58a11fe08a53336042930bb +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Feb 26 14:40:30 2010 +0000 + + Xming: Warning fixes + + Fix warnings due to prototypes not specifying function arguments + Fix warning with RegQueryValueEx() + Tidy up an include + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b8cf4153f84404b2a1b62a247d5d36d24bf481da +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Feb 26 14:41:00 2010 +0000 + + Xming: Dead code removal + + Remove some dead code, mostly code made obsolete by mandatory XKB + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 9b18f7ac0ba9aadb8c86bc2717cbdff75e951b69 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Feb 26 14:22:57 2010 +0000 + + Cygwin/X: Tidy up some cosmetic issues in log strings + + Tidy up some cosmetic issues in log strings: + - Add missing '\n' + - Fix some strings starting with '\n' + - Remove '\f' from some log strings + + These all just look daft in a log with timestamps. + + Also clarify log message about screen origin coordinates + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 178e830378c3514b9c53a5b1c6d2d5f930c3779b +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Feb 22 19:13:30 2010 +0000 + + Cygwin/X: Fix thinko in mount option checking + + Fix a thinko in mount option checking. + Use symbolic names for values assigned to binary flag for clarity. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit fa5103a02bd509e4a102afdad2ab26cb22210367 +Author: Francisco Jerez <currojerez@riseup.net> +Date: Wed Feb 24 23:18:01 2010 +0100 + + dri2: No need to blit from front on DRI2GetBuffers if they're just being reused. + + It can be quite an expensive operation, so we're better off not doing + it unless it's totally required. + + Signed-off-by: Francisco Jerez <currojerez@riseup.net> + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit e38e01081af42825bb7b44d18aa35845318f8556 +Author: Francisco Jerez <currojerez@riseup.net> +Date: Wed Feb 24 23:18:00 2010 +0100 + + Import linked list helpers from the intel DDX. + + Borrowed from i830.h, except for list_for_each_entry(). + + Signed-off-by: Francisco Jerez <currojerez@riseup.net> + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit b8a3be5f34016b745e38cd53825a4e398c6127bc +Author: Francisco Jerez <currojerez@riseup.net> +Date: Wed Feb 24 23:17:59 2010 +0100 + + Add a ConfigNotify hook. + + Executed from the ConfigureWindow request, right before sending + ConfigureNotify to the clients. + + This commit breaks the ScreenRec ABI. + + Signed-off-by: Francisco Jerez <currojerez@riseup.net> + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + +commit 67a8c659f25218904bae64aac6e98e326c90330b +Author: Roland Scheidegger <sroland@vmware.com> +Date: Fri Mar 12 16:53:30 2010 +0100 + + hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions + + The problem is that the xf86_use_hw_cursor(_argb) functions may get this + correctly now, some drivers will replace these generic versions with their + own functions. It is pretty insane to expect them to do reference counting + of the cursor (as an example, look at driver/xf86-video-vmware to see how + that looks like as a workaround). There are even places in xserver itself + which replace these two functions. + The segfaults if no reference counting is done are caused because the + reference count of the cursor reached zero, hence the cursor was freed, + however xf86CursorEnableDisableFBAccess() brought it back to life from + the dead (from the SavedCursor). + This patch hence adds reference counting in xf86CursorSetCursor. As per Michel + Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen. + In theory with this it should be possible to remove the reference + counting in the UseHwCursor functions I think, though it should also be + safe to keep them. + + Signed-off-by: Roland Scheidegger <sroland@vmware.com> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 75efb46a14fe45ffe73faff637b1fa6d017e1e52 +Author: Roland Scheidegger <sroland@vmware.com> +Date: Fri Mar 12 16:52:56 2010 +0100 + + hw/xfree86: fix refcounting in xf86_use_hw_cursor + + This is the same fix as was done in + fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 for xf86_use_hw_cursor_argb. + + Signed-off-by: Roland Scheidegger <sroland@vmware.com> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit df9b6f16b27398545cd4cff8a56dd59a3813351d +Merge: 5f169f5 5172253 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 15 08:26:58 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 5f169f54936c9868ad0f3778cb95c1f35eef41ea +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Mar 5 10:35:54 2010 -0500 + + XQuartz: remove undefined XSERVER_CFLAGS variable + + This is a variable local to configure.ac which is not AC_SUBST() + It is undefined in any generated Makefile. + + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5172253bae3b9867118c6717434e73c173acd5e9 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Feb 10 15:52:14 2010 -0800 + + XQuartz: Use an empty xkb keymap by default + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit b117bc7a441bec8f61610fb384d747112f73d236 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Mar 11 00:06:01 2010 -0800 + + XQuartz: Include os.h for OsAbort() + + Fixes regression from 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit b7a16117c6d87a9d33a5f682b592b4507f2c065e +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu Mar 11 00:03:08 2010 -0800 + + XQuartz: GLX: Fix prototype for swapBuffers + + This was a regression introduced by 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 178da6534fe7ab4b99fb87925c04e6f963c88583 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 8 16:33:37 2010 -0500 + + Xext: Link to external libraries when necessary. + + Although the DDX should be linked to the necessary libraries, we may + also need to pull them in directly to the module to ensure the symbols + are resolved at runtime. Should fix this bug with XSELINUX: + + /usr/bin/X: symbol lookup error: + /usr/lib64/xorg/modules/extensions/libextmod.so: undefined symbol: + is_selinux_enabled + + -v2: use _LIBADD instead of _LIBS; remove SELINUX_LIBS from + XSERVER_SYS_LIBS as it should only be needed in extmod. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a2ea8c2f2cc53607d57d60f41c879380ea70cd02 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Mar 11 14:19:04 2010 +0200 + + Record: Avoid duplicates from replaying frozen events + + Reintroduce a check which used to be there in the old + ProcessKeyboardEvent/ProcessPointerEvent codepath, which avoids us + recording events subject to a grab twice: once when it's first processed + in EnqueueEvent, and then again when it's thawed and being replayed. + + This required a tiny amount of code motion to expose syncEvents. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f2eacb4646beb25d055de22868f93e6b24f229b6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 10 09:39:05 2010 +1000 + + Revert "dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400)" + + Several users have pointed out that this commit introduces regressions, most + notably perhaps fluxbox which essentially stops working after a few clicks. + + This reverts commit cf72b5437d2d620521279077a29c5df6d0fbb576. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit df9f3273041c6c3e0da2d2254e8c156cd582e296 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 10 09:24:32 2010 +1000 + + xfree86: fix xf86Config.c build error in --enable-debug mode. (#26971) + + xf86Config.c: In function 'configInputDevices': + xf86Config.c:1514: error: request for member 'lay_identifier' in something + not a structure or union + make[5]: *** [xf86Config.lo] Error 1 + + Introduced with e1165632bdfbd720889ed1adf5f7ab338032c0ee. + + X.Org Bug 26971 <http://bugs.freedesktop.org/show_bug.cgi?id=26971> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 116068103282924ef1476231d13d54719a797252 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 9 09:35:23 2010 +1000 + + xfree86: don't warn about nonexisting core pointer/keyboard in config. + + In the vast majority of cases there is no xorg.conf that specifies a core + pointer/keyboard. Skip this warning, since we'll get another notification + about how the server relies on the config backend for input devices anyway. + + Leave the warning in for the error case (AEI off). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit c39c8ece9bd3ce025549f4bac7794f5a62266f4a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 10 15:06:52 2010 +1000 + + os: remove INTERNAL_MALLOC define. + + There doesn't seem to be anything that defines it and given that the + counterpart (the X internal malloc) was removed in + 01cfba75229f4b9bf1e4fe80814931acdacde14c it's unlikely to work anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9f462ff9082634719e64d2d8d4dbd09ec7deaf2e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 26 14:02:09 2010 +1000 + + dix: Clip only into axis ranges if we're in absolute mode. (#26543) + + An absolute device in relative mode may provide valuators outside of the + axis range. Clipping back into the range prevents screen crossings in a + multi-screen (Xinerama) setup as the required screen edge for crossing is + never met: miPointerSetPosition crosses the screen conditional to the X + coordinate being equal to the screen width or _less than_ 0. While the + former can be met when clipping into the coordinate range and scaling, the + latter cannot, resulting in a mouse pointer that gets stuck on the rightmost + screen. + + This patch only applies axis clipping for valuators in mode Absolute. If + relative, we allow the values to get above/below the axis ranges. Doesn't + matter, miPointerSetPosition will reset the values to the allowed range even + if no screen was crossed. + This leads to interesting values provided to clients, the valuator range of + the device resets once a screen is crossed and essentially reflects + the position of the cursor on the screen - scaled into the valuator range. + The values themselves are valid given the range though. + + In theory, the XI1 specs require that a relative device has a min/max range + of 0/0. This doesn't really go well with devices that actually can switch + mode between relative and absolute since they would have to reset their axis + range when switching. If multiple XI clients are in use, we have no method + of notifying them about the changes, so other clients may continue to use + the wrong axis ranges (note: XI1 wasn't really designed to have multiple + clients use a device). Expecting all relative devices to have this min/max + of 0 is unrealistic at this point. + + So pick what is possibly the lesser of all evils, pass the beer and despair. + + X.Org Bug 26543 <http://bugs.freedesktop.org/show_bug.cgi?id=26543> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit bbae92795c7eab062e6722c42fa7915e0cee5d69 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Feb 15 20:08:09 2010 -0500 + + Replace assembly with generic unaligned access code + + Removes Alpha assembly, and probably works around unaligned accesses on + other sensitive platforms. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Acked-by: Adam Jackson <ajax@redhat.com> + Compiled-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1c2abec479cfbac9aeadc121af0825d368317658 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 26 11:44:17 2010 +1000 + + configure: move SELINUX_LIBS to XSERVER_SYS_LIBS + + All ddxs require linking against selinux if enabled. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cab99b947c66a42dbf8a906bdb02e23aa7cab519 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 26 11:41:38 2010 +1000 + + configure: move libselinux requirement up to the common section. + + Let's have all version-specific requirements in one block. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9e7b6e565f6e69f20002bf03ed05fe8b63f86924 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 26 10:14:00 2010 +1000 + + dmx: fix OsAbort()-related build error in examples/xinput.c + + 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd changed the server to use OsAbort() + instead of abort(). xinput in dmx is a client program though and fails to + link if it tries to use OsAbort(). Switch it back to using abort(). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cf72b5437d2d620521279077a29c5df6d0fbb576 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 25 12:49:21 2010 +1000 + + dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400) + + A client requesting a GrabModeSync button grab, owner-events true, with only + the ButtonRelease mask set would never receive the press event even if the + grab window had the ButtonPress mask set. + + The protocol requires that if owner-events is true, then the delivery mask + is the combination of the grab mask + the window event mask. + + DeliverGrabbedEvents does this already for us, checking first the delivery + based on owner_events and then based on the grab mask. AFAICT, the device + cannot enter the states FREEZE_BOTH_NEXT_EVENT or FREEZE_NEXT_EVENT that + would be handled by DGE in any possible path here. + + Bonus point - CheckPassiveGrabsOnWindows suddenly becomes a lot lesss + complicated. + + X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit de86a3a3448f0a55c1cd99aee9ea80070a589877 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 25 11:37:05 2010 -0800 + + Allow for missing or disabled compat_output + + When the compat output is missing (I don't think this is actually + possible), or is disabled (and hence has no crtc), we would like to + avoid dereferencing NULL pointers. This patch creates inline functions + to extract the current compat output, crtc or associated RandR crtc + structure, carefully checking for NULL pointers everywhere. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fbbadca7e88391e81ab0f470290f5eec36aa9ce7 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 25 11:35:03 2010 -0800 + + Share enum definition for det_monrec_parameter sync_source + + There were two separate enum definitions, one inside + det_monrec_parameter struct and one for a local variable (which was then + stored inside the struct). Sharing a single definition makes the + code more obviously correct while making the compiler happier. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4b55b2cf8a52c39b53bae11cd1bc7314481d4c86 +Author: Robert Bragg <bob@o-hand.com> +Date: Wed Jan 27 20:38:38 2010 +0000 + + DRI2: initialize event->drawable in DRI2SwapEvent + + We weren't initialising the drawable in the event structure so the + client side DRI2WireToEvent used for translating the event into a GLX + event wouldn't be able to lookup up the corresponding GLXDrawable before + passing the event on. + + Signed-off-by: Robert Bragg <robert@linux.intel.com> + Reviewed-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 780c95caf9888fa4548dfe4c1c78a7e7ce99a9ed +Merge: 018b177 758f697 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 24 09:59:19 2010 -0800 + + Merge remote branch 'whot/for-keith' + +commit 018b177591c9fade6d065e31858cc6e054d33eff +Author: Kristian Høgsberg <krh@bitplanet.net> +Date: Wed Feb 24 10:37:26 2010 -0500 + + glx: Compile fix to let server compile with new and old mesa + + We broke the __DRI2_FLUSH API since it was never released, but since it's + taking a little longer than expected to get the X server side of the changes + ready, fix things up so it compiles. + + Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 758f6971750ed507e64eee817d720a77181439f2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 15 16:32:16 2010 +1000 + + dix: try to ring the bell even if the current device doesn't have one. (#24503) + + Evdev devices do not have the bell proc set, but XTEST devices do. By + exiting early, the bell only rings if the last keyboard used was the XTEST + keyboard and hence the bell proc is still set on the master but not if an + evdev keyboard was used last. + + The better approach here is to try to ring the bell on all devices attached + to this master device in case one or more actually do produce an audible + sound. That's also XKB's behaviour if XkbUseCoreKbd is specified as device + identifier. + + X.Org Bug 24503 <http://bugs.freedesktop.org/show_bug.cgi?id=24503> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit c0d941913199ed251fceab62fcf65437f6f9bd31 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 18 16:00:15 2010 +1000 + + dix: remove now-erroneous comment about frozen slave devices. + + A direct grab on a slave device through XI2 detaches it, regardless of + whether the grab is sync or async. So this comment doesn't apply to XI2 + anyway. + + For XI1, aside from your life being miserable already, it doesn't matter as + XI1 does not have a concept of attachment. You can freeze a device and if + you don't freeze _all_ other devices at the same time, the master device can + still happily send events to the client. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit db4f676f25c6d8e58263d5151942be730592d444 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 3 15:40:47 2010 -0500 + + xselinux: Bump extension minor version. + + Changes introduced in this version: + - 3 window-related requests now handle pixmaps also. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit a6cbcf6e782e65f3d4d14202ed0b7a8f65b33c9d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 3 15:38:57 2010 -0500 + + xselinux: Rename window-related requests that now support pixmaps. + + Renamed requests: + SetWindowCreateContext -> SetDrawableCreateContext + GetWindowCreateContext -> GetDrawableCreateContext + GetWindowContext -> GetDrawableContext + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit ab68c707fd02613d9359120ba6402639dd8bd89e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 3 15:08:40 2010 -0500 + + xselinux: Allow GetWindowContext to be used for pixmaps as well. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit eb9210097efea81065c301e5b6b4da7a566deb4a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Jan 6 12:52:51 2010 -0500 + + xselinux: Remove reference counting calls for SID objects. + + Starting with libselinux 2.0.86, SID objects are no longer + reference counted and the sidput() and sidget() calls are no-ops. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 0c4b75a08922416050bb73d2e279ce938d3823e7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 21 21:59:01 2009 -0400 + + Don't print a failure message when XACE denies an input event delivery. + + A denial is normal and the behavior should be to drop the event. + Having the log message creates excessive log spam. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit e687e11b1248494a45b9a4e4c321675526808703 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 21 21:46:50 2009 -0400 + + Revert "Remove some debug messages that trigger on XACE event delivery failure." + + The log messages still need to be there for non-XACE failures. + + This reverts commit 4be354c4c2da5168b302601b91bd80cfaca7e193. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 2ecb9f7d86117f212d7845741a3e155553954a85 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 21 19:28:26 2009 -0400 + + libselinux now has a pkgconfig file. Use it. + + Also remove HAVE_NETLINK_AVC_ACQUIRE_FD tests, because we now + require a version of libselinux that has it. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 9fc6b59d46382e949526dc10c3f5bfddbe2acb92 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 15 17:32:21 2009 -0400 + + xselinux: Allow SetWindowCreateContext to be used for pixmaps as well. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 93ff1bc5884cdfca1132af7fbc06c48e06f218c8 +Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk> +Date: Mon Feb 15 14:18:00 2010 +0200 + + Always enable outputs that have been forced on in the configuration file + + If the user has gone to the effort of manually enabling an output in + the configuration file assume that they know what they're doing. + + X.org Bug 14611 <http://bugs.freedesktop.org/show_bug.cgi?id=14611> + + Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> + Reviewed-by: Alex Deucher <alexdeucher@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ca9c2472d74c7107ccc117e2c9c723c168d2eccf +Merge: e40ba57 02d1116 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Feb 22 13:26:06 2010 -0800 + + Merge remote branch 'whot/for-keith' + +commit e40ba5798c367bec584f6437b23d2c5f801fd013 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 18 15:49:09 2010 +1000 + + Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode. + + The XI protocol spec only allows for two errors on the SetDeviceMode + requests: BadMatch or BadMode. BadMode however is a dynamically assigned + extension error and the driver doesn't have access to the actual error + number. Hence, if a SetDeviceMode driver returns an error other than + BadMatch, assume BadMode. + + The two exceptions are BadAlloc and BadImplementations, pass these on to the + client (any request is allowed to return either of those). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 02d1116e7eb84068fa32477f1640d29b0a81b638 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 11 16:35:36 2010 +1000 + + Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode. + + The XI protocol spec only allows for two errors on the SetDeviceMode + requests: BadMatch or BadMode. BadMode however is a dynamically assigned + extension error and the driver doesn't have access to the actual error + number. Hence, if a SetDeviceMode driver returns an error other than + BadMatch, assume BadMode. + + The two exceptions are BadAlloc and BadImplementations, pass these on to the + client (any request is allowed to return either of those). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 122fc0e7a0712df4ec2bd9ca6773f90bcd2095cf +Author: Chris Dekter <cdekter@gmail.com> +Date: Thu Feb 11 16:34:09 2010 +1000 + + Re-enable RECORD extension. + + RECORD was disabled during the switch to internal events. This patch + modifies the record callback to work with internal events instead of + xEvents. The InternalEvents are converted to core/Xi events as needed. + + Since record is a loadable extension, the EventTo* calls must be externed. + + Signed-off-by: Chris Dekter <cdekter@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 03ef00ae79687046dc9f9987857062a16ff2c2e0 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Wed Feb 17 11:40:44 2010 +0100 + + EXA/mixed: Clean up exaPrepareAccessReg_mixed() a little. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9623daad7c864d46b0dfcbb6e689820b96cc8115 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Feb 17 11:40:43 2010 +0100 + + exa/mixed: fix gnome-panel corruption + + - A mapped pixmap can't be used for acceleration, any decent memory manager + will refuse this. + - Source pixmaps migrated with a bounding region are incomplete (from the + gpu point of view), so do the upload unconditionally, instead of just for + deferred destination pixmaps. + - Fixes fd.o bug #26076. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd +Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> +Date: Thu Jan 28 11:08:34 2010 +0200 + + os: Prevent core dump from being truncated. + + The problem fixed by this patch can be reproduced on Linux with the + following steps. + - Access NULL pointer intentionally in ProcessOtherEvent on key press. + - Instead of saving core dump to a file, write it into a pipe. + echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern + - Dump the core by pressing a key. + + While the core is being dumped into the pipe, the smart schedule timer + will cause a pending SIGALRM. Linux kernel stops writing data to the + pipe when there are pending signals. This causes the core dump to be + truncated. On my system I'm expecting a 6 MB dump but the size will be + 60 kB instead. The problem is solved if we block the SIGALRM caused by + expired smart schedule timer. + + I haven't been able to reproduce this problem in the following cases. + - Save core dump to a file instead of a pipe. + - kill -SEGV `pidof Xorg` + - Press a key to dump core while gdb is attached to Xorg. + - Give option -dumbSched to Xorg. + + Also note that the fix works only when NoTrapSignals has the default + value FALSE. The problem can still be reproduced if error signals + aren't trapped. In addition to pending SIGALRM, there is a similar + problem with pending SIGIO from the keyboard driver during core dump. + + Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ca364ca82a760d8e5347a6f9f79636c9a5e4e03f +Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> +Date: Thu Jan 28 11:08:33 2010 +0200 + + os: Introduce OsAbort for proper core dumps. + + Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 031f92bf9ab15226df410012a0d1c9c390efc36d +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Wed Feb 3 10:05:20 2010 +0200 + + parser: corrected xf86getBoolValue to use case insensitive compare + + commit c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 introduced this + regression; it can cause existing config files to be parsed incorrectly. + + Acked-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit be96fb2f02c13a6ee8aba40f7d4c3f9141f06cea +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Feb 15 17:42:11 2010 -0800 + + Solaris xf86OSRingBell() off-by-one error in filling iov[] array + + When generating sound buffers for /dev/audio bells, insert waveform + for beep *or* silence, but not both, so we don't write one entry past + the end of the iov buffer when the final bit of soundwave ends up in + the final entry allocated in the iov array. + + Fixes OpenSolaris bug 6894890: + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6894890 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2d40f22d1ec970a84b23aa42b1feca4feedeb4bb +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Feb 15 20:05:24 2010 -0500 + + Use C-style comments in x86emu + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4e8bf12b13690afa6d9fee0e339d3819ef16fb3f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Feb 15 16:46:21 2010 -0800 + + XQuartz: Fix a possible buffer overrun in quartzAudio + + Also dropped deprecated API while there + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4127e8e5be5c366eb752bbb8d7f0ff5b519e641b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Feb 10 17:56:30 2010 -0800 + + XQuartz: clang static analysis fixes + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c686c5cbdc5f35744407af5f9aabbd18cc17714b +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Feb 15 15:03:01 2010 -0800 + + XQuartz: Fix linking (CloseInput()) + + Fixes regresison from d33adcdf03c69407d151e732fa0cf9947151eb19 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 84905007702da2c05a4f7446b3fc5ff52be49655 +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Mon Jan 4 15:00:49 2010 -0500 + + udev: Don't filter subsystem "input" + + This allows serial wacom devices to work, whose subsystem is "tty". + + Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sat Feb 13 10:40:40 2010 -0800 + + xfree86: Reorder InputClass option priorities + + Currently the config and InputClasses are merged together so that the + options from the config backend have the highest priority. This is bad + since it means options such as a default XKB layout set by the backend + cannot be changed by the user. + + This patch changes order of precedence to be: + + 1. xorg.conf + 2. xorg.conf.d (later files have higher priority) + 3. config backend + + In order to allow this ordering, the config parsing has been changed to + read the xorg.conf.d files before xorg.conf. This has the consequence + that the core device picking which looks for the first InputDevice may + not find it in xorg.conf. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 48f7298657f91843db36566b8d66d6c4c18dbd4c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jan 13 15:03:45 2010 +1000 + + Xi: reset the sli pointers after copying device classes. (#25640) + + If the indicator flags have the XkbSLI_IsDefault bit set, the indicator map + and names aren't their own bit of memory but rather point into the + device->key->xkbInfo->desc structure. XkbCopySrvLedInfo knows about this and + leaves the pointers alone. + + When copying the classes from the slave to the master, these pointers are + copied and still point to the dev->key class of the slave device. If the + slave device is removed, the memory becomes invalid and a call to modify + this data (e.g. XkbSetIndicators) may cause a deadlock. + + The copying of dev->key relies on dev->kbdfeed to be already set up. Hence + the pointers need to be reset once _both_ kbdfeed and key have been copied + into the master device. + + X.Org Bug 25640 <http://bugs.freedesktop.org/show_bug.cgi?id=25640> + Fedora Bug 540584 <https://bugzilla.redhat.com/show_bug.cgi?id=540584> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit d33adcdf03c69407d151e732fa0cf9947151eb19 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:22:02 2010 +1000 + + dix: move config_init into the DDX. + + The only DDX currently using hotplugging is the xfree86 one and it looks + like it'll stay that way for a bit. Move the initialization to the DDX, + since Xephyr, Xnest, and friends don't need HAL or udev notifications. + + Add CloseInput (counterpart to InitInput) to be able to clean up the config + initialization from the DDX as well. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 001ce71dc11287dc94cc2fbc5d35677c046e6c04 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Feb 12 23:34:57 2010 +0100 + + dix: restore lastDeviceEventTime update in dixSaveScreens + + This was removed in 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 (Do not + reset lastDeviceEventTime when we do dixSaveScreens), but caused a + regression for XResetScreenSaver. Add the lastDeviceEventTime update + back, but restrict it to that case. + + X.Org bug#25855 <http://bugs.freedesktop.org/25855> + + Reported-by: Lubos Lunak <l.lunak@suse.cz> + Tested-by: Lubos Lunak <l.lunak@suse.cz> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 97b03037f4d99fcebc7603011f41c3aff9871ce2 +Author: Peter Harris <pharris@opentext.com> +Date: Fri Feb 12 15:36:30 2010 -0500 + + Don't double-swap the RandR PropertyNotify event + + The event is already swapped in randr.c/SRROutputPropertyNotifyEvent, so + it should not be swapped here. + + X.Org Bugzilla #26511: http://bugs.freedesktop.org/show_bug.cgi?id=26511 + + Tested-by: Leonardo Chiquitto <leonardo@ngdn.org> + Acked-by: Adam Jackson <ajax at redhat.com> + Reviewed-by: Julien Cristau <jcristau at debian.org> + Signed-off-by: Peter Harris <pharris@opentext.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0b73f98cbd1803b82c2faf1a40f1a0037673d712 +Author: Soeren Sandmann <sandmann@daimi.au.dk> +Date: Fri Feb 12 20:04:53 2010 +0100 + + xfree86: Add qxl driver to the autoconfig logic + + The qxl driver is for the QXL virtualized graphics device. + + Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9c5bb550a2234e4bee2a144417d74c6bdf160e89 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 12 13:46:03 2010 -0800 + + Bump to 1.7.99.901 -- 1.8 RC1 + +commit 57ffeb3f2b3313dcef92a396f1f55fdbc064b2c5 +Merge: c6d9bc0 c76248f +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 12 13:36:32 2010 -0800 + + Merge remote branch 'jturney/master' + +commit c6d9bc092c84ad5c68083a126aa7577baa42cef7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 10 15:36:50 2010 +1000 + + Add tag matching to input attributes. + + Tags may be a list of comma-separated strings that match against a MatchTag + InputClass section. If any of the tags specified for a device match against + the MatchTag of the section, this match is evaluated true and passed on to + the next match condition. + + Tags are specified as "input.tags" (hal) or "ID_INPUT.tags" (udev), the + value of the tags is case-sensitive and require an exact match (not a + substring match). + + i.e. "quirk" will not match "QUIRK", "need_quirk" or "quirk_needed". + + Example configuration: + udev: + ENV{ID_INPUT.tags}="foo,bar" + + hal: + <merge key="input.tags" type="string">foo,bar</merge> + + xorg.conf: + Section "InputClass" + Identifier "foobar quirks" + MatchTag "foo|foobar" + Option "Foobar" "on" + EndSection + + Where the xorg.conf section matches against any device with the tag "foo" + or tag "foobar" set. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 3ac43df5d4a25d6e0058b327fa05a1c1436b4794 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 10 15:36:49 2010 +1000 + + Add xstrtokenize to the dix. + + Move tokenize out of the parser, make it a dix util function instead. + Splitting a string into multiple substrings is useful by other places, so + let's use it across the line. Future users include config/hal, config/udev + and of course the parser. + + Example usage: + char **substrings = xstrtokenize(my_string, "\n"); + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 27d1b86d1b858f931b4cb1b6ddf857c76d92a6d9 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed Feb 10 15:36:48 2010 +1000 + + xfree86: Set fnmatch pathname flag for InputClass device matching + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9b369f71273fb117c982e6ce16cd4462f206d365 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed Feb 10 15:36:47 2010 +1000 + + xfree86: Allow multiple arguments to InputClass matches + + In order to keep the number of InputClass sections manageable, allow + matches to contain multiple arguments. The arguments will be separated + by the '|' character. This allows a policy to apply to multiple types of + devices. For example: + + Section "InputClass" + Identifier "Inverted Mice" + MatchProduct "Crazy Mouse|Silly Mouse" + Option "InvertX" "yes" + EndSection + + This applies to the MatchProduct, MatchVendor and MatchDevicePath + entries. Currently there is no way to escape characters, so names or + patterns cannot contain '|'. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a378e361a5de89f0be8b68ebc3e854f56cefe666 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed Feb 10 15:36:46 2010 +1000 + + xfree86: Use "Ignore" option in InputClass to skip devices + + Sometimes it is desirable to skip adding specific input devices to the + server. The "Ignore" option is used similarly to Monitor sections so + that matched devices will not be added. BadIDChoice is returned to the + config backend so that it will clean up all resources. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8b1a685f00ae76be864cc188943a0874f48b8d64 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed Feb 10 15:36:45 2010 +1000 + + xfree86: Handle config files ending without newline + + The config parser expects to find a newline at the end of each line, so + files ending without one would confuse it. A newline is inserted at the + end of the buffer in these situations. Additionally, switching to the + next config file is moved to the higher level to allow parsing of the + last line of the previous file to complete before shifting the index and + resetting the line number. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Stephan Raue<stephan.raue@gmx.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 67bc278a511ca6ec42e1f8d2d5897c0109e94e2c +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed Feb 10 15:36:44 2010 +1000 + + xfree86: Make InputClass docs and comments match reality + + Drivers and options specified in InputClass sections work on a "first + match wins" strategy. Let's be consistent when documenting it. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a34812b09000db2ff2a1dc6182602839123edd4e +Author: Benjamin Tissoires <tissoire@cena.fr> +Date: Mon Feb 8 13:50:43 2010 +0100 + + Add labels for multitouch valuators + + Thoses definitions have been included in the kernel but the X server is not updated accordingly. + Without these definitions, the multitouch axes are not correctly labelled. + + Signed-off-by: Benjamin Tissoires <tissoire@cena.fr> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c76248fda99c38aef0ccf0ed6b58fbe95f6fe497 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Feb 2 20:53:44 2010 +0000 + + Cygwin/X: Avoid a collision between DEBUG and a token name + + Rename a token to avoid a collision between DEBUG defined via AC_DEFINE + if --enable-debug is configured, and the token for the 'debug' instruction + in the XWin preferences file + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit b7dbbd3cd4d28cd4939706b3bf6394ba8ecafaff +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 22 23:35:09 2009 +0000 + + Cygwin/X: Avoid cursor size log spam + + Fedora 12 likes to use a 39x26 animated wait cursor. Avoid spamming + the log with warnings that each frame can't be completely contained + in the 32x32 native cursor + + Also reformat log message so it doesn't contain a '\n\t'. I mean, + it's not like we might want to grep the log or something... + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit c9cbbd5d1cfa58a2d9f08e25534ea8439284322d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Nov 28 17:51:33 2009 +0000 + + Repair '-nolock' + + commit 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 removes the AC_DEFINE for + SERVER_LOCK and conditional compilation checking it, making it always on + everywhere, except in os/utils.c where code is left under SERVER_LOCK, which + now never gets built, making the '-nolock' option non-functional... + + This seems to have been broken since Xserver 1.7.0, but this option is + actually of some slight use on cygwin, as if /tmp resides on a FAT filesystem + (yes, I know...), hard links aren't supported. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 7f54ccafadf99c0a1a3e788734199b306b4fa51d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Jan 16 13:12:12 2009 +0000 + + Cygwin/X: Make transient windows resizable again + + Reverts the change which makes parented windows non-resizeable + + Because this was trying to do something which we should be doing, as an alternative we + try checking WM_NORMAL_HINTS for windows which shouldn't be resizable + + If a window has a maximum size specified, no maximize box + If a window has a fixed size (max size == min size, per EWMH 1.3 Implementation Notes), no resizing frame + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 654d2e372dc2978ce379ab9f02137333ec224f0c +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Nov 10 13:24:40 2009 +0000 + + Cygwin/X: Discourage other WMs in multiwindow mode + + Tidying up of other WM detection code when ading SWT/Motif + fix in commit 71519a572fe15b85c0eb2b02636c9e871f2c858f + was rather over-agressive and now allows other WMs to think + they can start when the internal WM is running. + + Revert to the behaviour of selecting ButtonPressMask events + as well on the root window, so other WMs will be dissuaded + from starting + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 26857b1c2003797b02e258247f63064aa1e37c10 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Oct 31 17:19:17 2009 +0000 + + Cygwin/X: Update XWin man page + + Restructure to group similar options and offer some commentary on those groups + Review option descriptions, clarify and bring up-to-date + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 6f1836bfbd80e88d4c57a32757d0a5b398504c35 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Nov 2 17:37:14 2009 +0000 + + Cygwin/X: Update DDX specific -help text + + Alphabetize options + Review option descriptions, clarify and bring up to date + Add missing option descriptions + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 22982b9e95a2339d5ba60d66263e42a0331ee41f +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Oct 29 18:50:23 2009 +0000 + + Cygwin/X: XSupportsLocale() failure is non-critical + + Treat XSupportsLocale() returning false as non-critical to internal client + theads startup, and issue a warning, not an error + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit f60b7712b3451649f138b158ee282be89a66b9ef +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Feb 1 17:13:00 2010 +0000 + + Cygwin/X: Report BUILDERSTRING with version information + + Report BUILDERSTRING with version information + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit ed2c2a68e1e6b409c198a52d99d300eb6d517e89 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Feb 1 17:12:57 2010 +0000 + + Define FD_SETSIZE on Cygwin regardless of XWin DDX + + All DDXs segfault on Cygwin unless -DFD_SETSIZE=256 is set, so make sure + we do so whether or not we are building XWin. + + FD_SETSIZE must be at least XFD_SETSIZE for uses of select() to be correct. + The Cygwin default is only 64, so it must be increased to 256 + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 2f2f3da080629d410dd99e281c382b54f0dbbf5d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Jun 19 21:14:47 2009 +0100 + + Cygwin/X: Copy the state of the Windows keyboard device to the Virtual Core Keyboard at startup. + + Otherwise, this happens lazily after the first keypress, which can lead + to applications which are started from a shell window and inspect the + keyboard state before a character is typed getting the wrong idea about + the desired keymap (e.g. xemacs shows this behaviour) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 7a440e5b7a416e582b6c3cc4c33822854ce73aed +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Oct 4 15:55:40 2009 +0100 + + Cygwin/X: Tidy up system.Xwinrc + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 11252ed82e1f361b99e86521ac9314f868bd1a3a +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Feb 1 17:11:54 2010 +0000 + + Cygwin/X: Look for system.Xwinrc in SYSCONFDIR/X11 + + Look for system.Xwinrc in SYSCONFDIR/X11 (usually /etc/X11) + Rename sample system.Xwinrc file not to have a X11R6 path in it's name + Add makefile install rule for system.XWinrc + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 34269a90ea2087f883f5dc8805894fc4998e4b81 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Tue Feb 2 16:21:44 2010 +0000 + + Cygwin/X: Update resources file and About dialog + + Use the configured vendor web address in the About dialog + + Update resources file: rework About dialog, use 'MS Shell Dlg 2' + logical font for all dialogs, add ellipsis to exit option in tray + menu as it (may) trigger another dialog. + + Get short vendor name from xwin-config.h, like other configuration + data presented in the About dialog box, rather than creating the + PROJECT_NAME define + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 881812438b430d2856d0494707e028e5f30d6e9a +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 2 16:22:39 2010 +0000 + + Xming: Use 8 point font for URL in About dialog + + Use an 8 point font for URL in About dialog, to match the rest + of the text in that dialog + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit c02638fd68440513b6046315547c554a910bd7e2 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 2 16:08:45 2010 +0000 + + Xming: Add a manifest file + + Use manifests to enable XP style controls + (only effective for XP and later and when themes are enabled). + The addition of manifests shouldn't cause compatibility problems with older Windows versions. + + Manifest must have execute permissions, otherwise attempts to + execute XWin.exe in the same directory will fail... + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit fd8a32baba77aba8d124658a19f4f6eda79e49c6 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Jun 19 21:14:39 2009 +0100 + + Cygwin/X: Window placement refinement for multiwindow mode + + Window placement refinement for multiwindow mode, ensure a window actually + ends up somewhere visible if it tries to create itself offscreen (which + can happen for e.g. if it has a stored position from a different sized + display) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 7eb840fd42bc62d88fb4fcf6600546c9ff6e56be +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Feb 2 15:42:12 2010 +0000 + + Cygwin/X: Respect the system's ownership of the clipping region + + Respect the system's ownership of the clipping region used for shaped windows + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit bad41bdfd4a12f0c92fd221bffd9f3c5e40d0fe1 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Mon Feb 1 17:11:22 2010 +0000 + + Xming: Always update the Windows title Unicode (wide-character) in -multiwindow mode. + + Apply the Windows title wide-character in -multiwindow mode. Windows should now + display correct client X Window titles for locales with wide characters. + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 901c4ebf620579c5bb951a8c003430d967ecf2ff +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Jan 11 00:31:27 2010 +0000 + + main: move config_init() after InitInput() + + With the udev backend, config_init() calls NewInputDeviceRequest(), + which enables devices. They can then start sending events, even though + the event queue is only initialized later in InitInput(). Oops. + + Debian bug#564256 <http://bugs.debian.org/564256> + + Reported-by: Sedat Dilek <sedat.dilek@googlemail.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7f648777680b9dea31c4adb657e205fc6880d98b +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Thu Jan 14 16:42:16 2010 +1000 + + Don't use AC_CHECK_FILE for fontpath checks when cross compiling + + AC_CHECK_FILE chokes when cross compiling, so instead we set the default + to the standard FONTROOTDIR directories in that case. + + Signed-off-by: Dan Nicholson<dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit db687f718f760ba254ab51994769db101dc9ca3a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 10:07:38 2010 +1000 + + xkb: sed True -> TRUE and False -> FALSE + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 0ea2b0bd02f8683998e8b9ebc2b96d606ce45f45 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Dec 18 20:07:30 2009 +1000 + + xkb: Add XKM file format description. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 08b22c7faf97217ea4d497eec6624fc3dd916d9b +Author: Oldřich Jedlička <oldium.pro@seznam.cz> +Date: Sun Jan 17 17:59:03 2010 +0100 + + Allow driver to call DeleteInputDeviceRequest during UnInit + + When the input driver (like xf86-input-wacom) removes it's devices + during a call to UnInit, the CloseDownDevices() cannot handle it. The + "next" variable can become a pointer to freed memory. + + The patch introduces order-independent device freeing mechanism by + remembering the already freed device ids. The devices can reorder any + time during freeing. No device will be double-freed - if the removing + failed for any reason; some implementations of DeleteInputDeviceRequest + don't free the devices already. + + Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz> + Reviewed-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b91cec26de367f75388e620772747b08eee34294 +Author: Horst Wente <horst.wente@acm.org> +Date: Wed Dec 30 19:35:20 2009 +0100 + + xkb: make ctrl+alt+keypad + / ctrl+alt+keypad - work again (#25743) + + Video mode switching via keypad keys did not work + + Signed-off-by: Horst Wente <horst.wente@acm.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 993e78d6c433f65bd8a87890a6bb6da480b2cdc4 +Author: Oldřich Jedlička <oldium.pro@seznam.cz> +Date: Tue Jan 12 19:15:06 2010 +0100 + + Fix typo in updateSlaveDeviceCoords + + The index [0] for the second valuator looks bogus; fix it. + + Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 52456c602c3cdd7d5eac677889a18fad37dfb7ae +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat Jan 30 14:49:02 2010 -0800 + + XQuartz: Attatch a stub display when CoreGraphics reports no displays. + + This is half of the required changes to address the "stuck mouse pointer" + bug that occurs when X11 launches while the displays are asleep. The + remainder of the fix is part of libXplugin which needs to be updated to + send XP_EVENT_DISPLAY_CHANGED when the display wakes up. If you don't + have a recent enough libXplugin (expected in 2.5.0_beta2 or later), you + can cause this event to be sent by changing your display resolution (or + you could just start X11.app with your screens awake). + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 15f4bb6dc64313ff100aa5444a94c60922a498df +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Jan 27 17:12:12 2010 -0800 + + XQuartz: Dead code removal + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 7ba5de6e9e1e8efda9f79af601fb6269bae841ce +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jan 30 10:55:38 2010 -0800 + + XQuartz: Add some .gitignore magic + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 4d575b0559817258f7a0ce6c4d2d0f9e7e5bba63 +Author: Robert Morell <rmorell@nvidia.com> +Date: Fri Jan 29 19:07:03 2010 -0800 + + RENDER: Fix gradient and solid fill pictures with Xinerama, and misc cleanup + + If these aren't wrapped, then procs that are wrapped (such as + RenderChangePicture) will fail in Xinerama when they see the resource + type of a picture created through one of these interfaces is PictureType + and not XRT_PICTURE like those allocated via RenderCreatePicture. + + Signed-off-by: Robert Morell <rmorell@nvidia.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8d6b1838330625b758ebc55bb0df1b425c5cefaf +Author: Robert Morell <rmorell@nvidia.com> +Date: Thu Jan 21 12:38:47 2010 -0800 + + Render: Fix request size verification + + RenderSetPictureClipRectangles and the Xinerama version of + RenderChangePicture were using the wrong structure types for request + size verification. + + Signed-off-by: Robert Morell <rmorell@nvidia.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5e81078cf56aabbf6551d96d312c7840ba9370ae +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Jan 18 14:31:12 2010 +0200 + + xfree86: vgaarb: remove useless debug + + This is RAC's remnant. Any sane person would use a more wise method of + debugging instead. + + X.Org Bug 26074 <http://bugs.freedesktop.org/show_bug.cgi?id=26074> + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e38df06772965cd5099646f1e7032b7c944d16ed +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jan 28 14:33:25 2010 -0800 + + DRI2: Bump the dri2 module version to 1.2.0 to reflect recent API changes. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 60b6477f6dc005a1b052be8c5e5a549550a4aa88 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Jan 14 17:18:28 2010 +0200 + + dix/configure: remove null root cursor option + + The default behavior of the server is to start with an invisible root cursor. + Be such cursor invisible or inexistent (null), in the end it doesn't matter - + for the user. The content on screen will be the same. Besides, there's no + difference, in terms of performance, whether such cursor is invisible or + simply null. The paths that both take inside the server are roughly the same. + + Therefore create a null root cursor becomes irrelevant. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b4baab90c0d98bef98d485682d4a69a327a380d6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 8 15:18:41 2010 +1000 + + dix: EventToCore needs to copy the root window too. + + This value isn't actually set for normal events but it saves us some work + for the record extension support. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 27fc98ecfed99fefd5c14388b4c6242f87281895 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jan 27 14:37:32 2010 -0800 + + Revert "dix: EventToCore needs to copy the root window too." + + This reverts commit 0f2d297dedeff8bd227df4c498cc668b0e902344. + + Peter provided an updated patch which fixes the tests. + +commit 711e26466ae04ae93ff4c48d377d83d68a6320e9 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Mon Jan 25 09:21:51 2010 -0800 + + DRI2: handle drawable destruction properly at DRI2SwapComplete time + + Simon reported an issue with kwin that turned out to be a general problem. If + a drawable goes away before its swap completes, we'll try to free it up. + However, we free it improperly, which causes a server crash in + DRI2DestroyDrawable. Fix that up by splitting the free code out and calling + it from DRI2SwapComplete. + + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Reviewed-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b68f0204a2e4fa9d8884cbdd84b6a5df21d6b36e +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Wed Jan 27 09:10:41 2010 -0800 + + xserver: require libdri 7.8.0 to build + + We depend on new DRI interfaces now, so require them in configure.ac. + + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 003829072853546abd973266fe9b24d803f4f5cb +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jan 26 22:25:04 2010 -0800 + + Avoid segfaults in XF86VidMode GammaRamp functions if randr_crtc is NULL + + Fixes crash when xscreensaver tries to use GammaRamp calls to fade out + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6915712 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 19d03d4f49e08442f58cf02240e3e6bab04633d2 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Jan 26 20:15:49 2010 -0500 + + doc: finish the removal of SecurityPolicy file man pages + + The variable was unassigned but all the code was left in. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7962c8f78964d460c76f76dda2795b971a8c2a94 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Jan 26 20:02:13 2010 -0500 + + man: add missing __datadir__ for Xserver XWin man pages + + The man pages display __datadir__/fonts/X11/... because __datadir__ + is missing in cpprules.in. Problem was introduced in commit: + b54bc14ce0ae38c4863794bc3096ca86cdb23908 + when replacing __projectroot__ in the previous font path. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d2322b6309bf15a45002b42e7e6ba3d6b5bfa932 +Author: Kok, Auke <auke-jan.h.kok@intel.com> +Date: Wed Jan 27 11:34:45 2010 -0800 + + xserver: Add timestamps to logfile output. + + Add timestamps in seconds derived from clock_monotonic to the log + file. + + Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0b21a0416b4cb2c32da5e3fda05a0682eb97d56e +Merge: 1e6fd65 837bd2b +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jan 27 14:14:15 2010 -0800 + + Merge remote branch 'alanc/master' + +commit 1e6fd65d0b95260253828678131885a4ec21c594 +Author: Michael Vogt <mvo@ubuntu.com> +Date: Mon Jan 25 18:41:20 2010 +0100 + + xfree86/modes: only call gamma_set if its non NULL + + I ran accross a crash with xf86-video-nv-2.1.15 [1] and xserver + 1.7.3.901. It looks like the problem is that gamma_set is called even + if that is NULL. + + [1] https://launchpad.net/bugs/494627 + + Reviewed-By: Matthias Hopf <mhopf@suse.de> + Signed-off-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0688dca044f966abc3da667f6d4e79e7cf47f996 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Jan 21 10:31:04 2010 -0800 + + dri2: Fix order of operations issue in __glXdriSwapEvent test. + + Clients would have received swap events regardless of asking for it. + + Signed-off-by: Eric Anholt <eric@anholt.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1 +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Wed Jan 27 14:03:03 2010 -0800 + + Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5. + + *xoff and *yoff were uninitialized for source-only pictures.x + + Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> + Reviewed-by: Aaron Plattner <aplattner@nvidia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c3395158678aaab9dca5fc6a812cbe715ddc0e1a +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Jan 15 14:13:18 2010 -0500 + + packaging: provide a default README file #24206 + + All modules should have a README file. + The bottom URL section is found in all X.Org README files. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f311f2d047120fb816897444d2101465ff5189db +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Jan 13 11:35:52 2010 -0800 + + DRI2: Allow multiple driver names. + + Each driver type (e.g. DRI2DriverDRI or DRI2DriverVDPAU) can have a name in the + driverNames array in DRI2InfoRec. DRI2Connect returns the name for the driver + specified by driverType. Also print names of supported drivers in + DRI2ScreenInit. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f57bc0ede8e018c7e264b917927c42a018cd1d5a +Author: Christian Zander <chzander@nvidia.com> +Date: Mon Jan 11 12:29:07 2010 -0800 + + x86emu: Respect the LEA 67h address size prefix. + + Signed-off-by: Christian Zander <chzander@nvidia.com> + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 837bd2bbc02b893f96861b48c1f02b7b8e7e3e48 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 16 22:32:15 2009 -0700 + + Remove unbalanced ( from failure to move log error + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 138d4c1670ebab435bf00627c97098a3a54b81a6 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Sat Jan 16 21:03:00 2010 -0800 + + glx: Sun compilers now support some gcc __attribute__ values + + Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__ + calls for aligned, always_inline, noinline, pure, const, and malloc. + + This commit consists of the related updates to files that were + regenerated by gl_XML.py in mesa after adding the __SUNPRO_C checks to it + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Brian Paul <brianp@vmware.com> + +commit 79e7b0b875634d0f9e1a95232a4e38adf617bc14 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Sat Jan 16 10:45:32 2010 -0800 + + Only enable kdrive input drivers on Linux by default + + Fixes build on non-Linux platforms by restoring the defaults to + where they were before commit 6c2b3a4247d10a50699ffa6abb643c5e959eefa8, + to only enable the Linux kbd, mouse & evdev drivers when building + on Linux platforms. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 39ab474197bdad7d8e9ef496df2d61cbea39d370 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 15 19:07:38 2009 -0800 + + Move OS-specific VT key handler code from common to os-support + + Adds new function xf86Activate to the OS-specific *VTsw*.c files + and calls it from xf86ProcessActionEvent + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (GNU/Linux) + +commit 15ca3312c069526b7f2207de9dfb9b9e851caf95 +Author: Aaron Zang <Aaron.Zang@Sun.COM> +Date: Mon Dec 14 17:55:46 2009 -0800 + + Solaris: Avoid switching to inactive VT's + + Fix for OpenSolaris bug 6876992: "[vconsole] Ctrl+Alt+F12 switchs to blank + console screen with hotkeys property turned-off" + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6876992 + + Xorg needs to do sanity test for the VT it is commanded to switch to. + If the VT is not opened by any process, discard the switching request. + + The changes also contain the fix for some flaws discovered when + getting the new gdm to run. + + Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM> + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 2984c18eb994696927a7f3b94d86fd47907334a0 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jan 21 14:21:07 2010 -0500 + + config: replace custom code with reusable macro XORG_WITH_DOXYGEN + + XORG_WITH_DOXYGEN provides additional functions like a configure + option which allow platform builders to control the usage of + the doxygen program. + + This is a requirement from platforms that do not have such doc tool. + A platform with a back level doxygen may use --without-doxygen + to get the rest of the documentation built. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d9c20ee4191de7276a08288adffc24dff48aff8f +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jan 15 19:34:29 2010 +0200 + + dix: move cursor realize code to its own function + + The semantic remains, only code was moved: reuse chunk of code to realize + cursor on both AllocARGBCursor and AllocGlyphCursor. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f818f222362c93bcc859d997d96d8f3b447729f4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:19 2010 +1000 + + xkb: unexport xkbDevicePrivateKey and xkbUnwrapProc. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6850ea8fb95417db9ce3a70fc17f90d6fdea1389 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:16 2010 +1000 + + xfree86: replace True/False with TRUE/FALSE. + + xf86Xinput.c relied on xkbsrv.h's definition of True/False which seems odd + at first and weird on second glance. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 64b1372c15c3ede2696346e153bca9bd89016a20 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:15 2010 +1000 + + xkb: remove unused _XkbIsPressEvent and _XkbIsReleaseEvent defines + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c8bba14a390fe3fa16027e6b2433a314b3ea00c3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:13 2010 +1000 + + xkb: remove XkbAtomGetString, replace with NameForAtom. + + XKB really XKBdoes not XKBneed its own XKBdefines for XKBeverything. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f37799c9712afb7769f369162b904d9ea2dbd608 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:12 2010 +1000 + + xkb: remove IsKeypadKey define, only used in two places. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c8076f317ee5044ed3cc21b097f8b1741af8e0f1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:11 2010 +1000 + + xkb: remove XConvertCase. + + Since it's typedef'd to XkbConvertCase anyway and the headers are now split + from the client headers, simply get rid of it altogether. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d627dd9d1ef436b01f0581e40a6736ffc6b5d2c8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:10 2010 +1000 + + xkb: remove _XkbClearElems, a memset will do. + + Bonus point - it's easier to understand what's actually being done with the + memory. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ea1de3fcdc40d2060bb6d13775005eadd624e767 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 15 15:32:09 2010 +1000 + + xkb: remove _XkbTyped*alloc + + Please no extension-specific macros for memory allocation. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0f2d297dedeff8bd227df4c498cc668b0e902344 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 5 16:31:37 2010 +1000 + + dix: EventToCore needs to copy the root window too. + + This value isn't actually set for normal events but it saves us some work + for the record extension support. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6f6a99abc12ddee82898fdabfb50c17e90e094b9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jan 13 14:39:54 2010 -0800 + + XQuartz: Don't FatalError in x_hook_run if the list is empty + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 6bde306f7f6b9bbabeaa8bb910ea549be906cd8b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jan 13 11:20:29 2010 -0800 + + XQuartz: Update copyright in bundle for 2010 + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 6008cc116493cb2825ad0bda0b407b7aefabb3f4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Jan 11 18:02:55 2010 -0800 + + XQuartz: Setup the modifier map in the quartz thread + + This avoids possible doing it twice which could result in incorrect + keycodes for alt due to our loss of information about its side. + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 44f9c3d16c9c9b3362306a9ba26ee52e7baafeca +Merge: 032f978 84956ca +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jan 13 10:19:21 2010 -0800 + + Merge remote branch 'jbarnes/master' + +commit 84956ca43b087600d9db297cffd62e960c516d9e +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Mon Jan 11 14:56:24 2010 -0500 + + GLX/DRI2: add INTEL_swap_event support + + This allows clients to easily check for swap completion status in their + main loop. + + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Adam Jackson <ajax@nwnk.net> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Thu Jul 16 09:01:17 2009 -0400 + + DRI2: add support for new DRI2 protocol requests + + Support the new DRI2 2.2 protocol requests: DRI2SwapBuffers, DRI2GetMSC, + DRI2WaitMSC, DRI2WaitSBC and DRI2SwapInterval. + + These requests allow the server to support the SGI_video_sync, + SGI_swap_interval, and OML_sync_control GLX extensions if DDX support is + present. The new DDX APIs are documented in dri2.h. + + Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> + Reviewed-by: Adam Jackson <ajax@nwnk.net> + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 032f97808c65771a07bac748212cf6457a5d1660 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jan 6 17:32:24 2010 +0100 + + xfree86: init pointer feedback controls from options + + With InputClass support, it makes more sense to cover all + aspects of acceleration in options. Previously, one could only set the + default on the command line. + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0722c287a4c8a6cdedca9756192547bfcf77ade5 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jan 6 19:43:59 2010 +0100 + + xfree86: document pointer acceleration in xorg.conf.man + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1aca2d757534879eb55faaee421cb972a9546712 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jan 6 19:13:36 2010 +0100 + + whitespace fixes + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 14039b5a7982fbf8130501bb00766176a4e9bccb +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jan 6 18:16:20 2010 +0100 + + doc: actually document SendDragEvents + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 14e4e4a294e648e0bdcb70c34748e1b81c5bb64f +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jan 6 18:13:27 2010 +0100 + + os: state effect of -a and -t options more precisely + + Signed-off-by: Simon Thum <simon.thum@gmx.de> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d727ddb91a549d23f6bf323e91db4b8916c1b7a0 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Jan 9 16:28:32 2010 -0500 + + kdrive: klinux.h breaks make dist + + This file is no longer part of the source code + and must be removed from distribution. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6313d2da6c6910827d68cf31fe00b46a34c5bfc7 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Jan 8 19:04:25 2010 -0500 + + configure: use backticks rather than $() for commands + + This patch to xserver configure.ac is to increase code portability to + non POSIX system by using backticks rather than $() for command + substitution for BUILD_DATE and BUILD_TIME. + + Reviewed-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 74ab27f64a747ee45810f99cdc6e29b82cf8035e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Dec 28 18:00:28 2009 +0200 + + Revert "Make sys.c use unaligned access functions provided in compiler." + + This reverts commit da923d0bc15e99a8ed1986bd6f5df37f7af7284b. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6a2a57832709798d99d19ff4c587e22f3b3c150d +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jan 7 15:23:34 2010 -0500 + + macros: use PKG_CONFIG variable rather than executable name + + User can defined alternate location for pkg-config. + Once option in place, all instances of pkg-config must be converted. + + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1b3132f5e981b3398e08263742332cc966bebc07 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jan 7 14:12:34 2010 -0500 + + xwin: ignore intermediate .man file + + Only detectable on a Cygwin build + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8ab4749aaefb3727b9fc58bb37b50a2d07eb1531 +Merge: 8d53d84 9437504 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 7 10:32:21 2010 -0800 + + Merge remote branch 'dottedmag/for-keithp' + +commit 8d53d84485fdce8ea9686e6f300a69f7ddebd467 +Author: Adam Tkac <atkac@redhat.com> +Date: Thu Jan 7 15:34:52 2010 +0100 + + Do not define members of include/eventstr.h:EventType enum conditionally. + + Main problem is that EventType enumeration members can be different in + module and in server, which obviously causes problems. + + Signed-off-by: Adam Tkac <atkac@redhat.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9437504b21dfdb509ab8b3a00f64403e1e4026dd +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jan 4 05:42:02 2010 +0600 + + kdrive: Remove unused kdNoopOps external variable declaration + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit aa6e0936be15488455e6a4236806a58496da2979 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jan 4 05:30:22 2010 +0600 + + kdrive: Remove unused kmap.c + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit f78ac5c6e273f575af29746e08e7c182ff7b93b3 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jan 4 02:36:30 2010 +0600 + + kdrive: Make internal functions static + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 37a8ddc0dbf3fb7f059b689038979bace206dccf +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jan 4 02:28:37 2010 +0600 + + kdrive: Remove unused 'k' variable + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit af1f1a05e1aa9ec921f1288818a66766c301f8b0 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jan 4 01:50:04 2010 +0600 + + kdrive: Remove bus mouse driver + + Bus mice aren't used anymore, do not keep dead code around. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit a3cc3af186b55ac80abd6859ffe491f4ae936596 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 23:31:28 2010 +0600 + + kdrive: Adjust kdrive usage message as shadow overlay support has been dropped + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit c40b9f959175057fac726fcdfff9641ae0681cf6 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jan 4 14:07:37 2010 +0600 + + kdrive: Remove unused VxWorks* variable declarations + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 4e0d580d5ac00d8d87c8e0080a02868c87a31caa +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 15:04:03 2010 +0600 + + kdrive: Remove unused KdCardInfo::lastMarker field + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit dbaab9759ba31edf63cf73eda86ba931d88e8cce +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 16:18:29 2010 +0600 + + kdrive: Extract common part of fbdevPutColors and fbdevEnable + + Put framebuffer colormap updating code in separate function + for brevity. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 7ee14154b230b931d294288e1291c4fc617b1354 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 15:42:53 2010 +0600 + + kdrive: Remove unused overlay fb support + + Xfbdev, Xephyr and Xfake all use only one framebuffer, so simplify + implementation by removing overlay support. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 730f7d1c4fae8ca582a4a9998a4dc4b325f98896 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 15:06:18 2010 +0600 + + kdrive: Remove unused KD_MAX_CARD_ADDRESS macro + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 5337ddcfd9dc2a5b823da39df7adaad6692214f0 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 14:59:07 2010 +0600 + + kdrive: Move Xephyr-specific fields out of KdScreenInfo + + memory_base, memory_size, off_screen_base fields in + KdScreenInfo are used only by fake EXA in Xephyr. Move + them into Xephyr, cleanup Xfake and Xfbdev. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 62883b499b72f678ab055de4d0370227ae441370 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 13:17:21 2010 +0600 + + kdrive: Remove unused KdCardAttr from KdCardInfo + + Card attrs are unused in all current kdrive servers, so + remove it completely to avoid allocating and passing dummy + values to KdCardInfoAdd. + + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 6c2b3a4247d10a50699ffa6abb643c5e959eefa8 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Jan 4 14:07:04 2010 +0600 + + kdrive: Add option to compile out input drivers + + Add --without-kdrive-{kbd,mouse,evdev} configure options disabling + Linux keyboard driver, Linux mouse drivers (ps2, bus,ms), + and Linux evdev driver. + + Build all drivers by default as before. + + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 72ba717b1d639e94fa9ab56ca026131edc020a30 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 15:03:24 2010 +0600 + + kdrive: Remove unused KdCardInfo::needSync field + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit d21b41cdb5e89eb428f36b19e965f0ab49e051d9 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 13:21:25 2010 +0600 + + kdrive: Remove .gitignore left from SDL server + + SDL server is gone, no need to keep its .gitignore anymore. + + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + +commit 6f265d55a61f9be323583b8acacae783be72bda9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 5 13:15:25 2010 +1000 + + dix: don't update the slave coordinates from the VCK. + + A keyboard event from a device with both valuators and keys will be posted + through the VCK. In this case, do not update the slave device coordinates + from the VCK - they're always 0/0. Leave them as-is, for the next pointer + event will continue where it left. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 326429badfc76885e4652ddc72860810c0e8d102 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 10 14:56:36 2009 -0500 + + modes: Remove the ClockRanges type + + ba2d39dd5428cb5922b797a1d4ea45b859412b40 introduced warnings: + + xf86Mode.c: In function ‘xf86CheckModeForDriver’: + xf86Mode.c:986: warning: passing argument 1 of ‘modeInClockRange’ from incompatible pointer type + xf86Mode.c:253: note: expected ‘ClockRangePtr’ but argument is of type ‘ClockRangesPtr’ + xf86Mode.c:1002: warning: passing argument 1 of ‘modeInClockRange’ from incompatible pointer type + xf86Mode.c:253: note: expected ‘ClockRangePtr’ but argument is of type ‘ClockRangesPtr’ + + Because I foolishly didn't notice that we had types with nearly + identical members named ClockRange and ClockRanges. The latter + contained an extra 'strategy' member at the end, which claimed to be + needed by the vidmode extension. Of course, this was a lie: the only time + we'd use it was in mode validation, for drivers using LOOKUP_CLKDIV2 with + non-programmable clocks. The only driver using LOOKUP_CLKDIV2 is + rendition, which has a programmable clock. The only driver using the + ClockRanges type was smi, which did not use it for its 'strategy' member, + so has been fixed to use ClockRange instead. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 13c8bd3fde3b0831921e59f84936022a16379d63 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jan 4 18:21:54 2010 -0800 + + CloseDevice: call XkbRemoveResourceClient before freeing key class struct + + XkbRemoveResourceClient() returns immediately if dev->key is NULL. + CloseDevice calls XkbRemoveResourceClient until it removes all resources. + + If we free dev->key and NULL it before XkbRemoveResourceClient, then + infinite loop ensues, and the server appears to hang on exit or crash. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e707612e9de4e5e1d91dc1a8152810912d7e18bb +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Jan 4 09:07:48 2010 +0100 + + EXA: Restore migration call in exaDoPutImage(). + + Turns out this is still necessary if the driver PrepareAccess hook succeeds. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Tested-by: Maarten Maathuis <madman2003@gmail.com> + Tested-by: Andrew Chant <andrew.chant+debian@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e10072b7c74a6f5e24f6dfa37e73688d1f3425e3 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 05:43:28 2010 +0600 + + Add Xephyr.man to .gitignore + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fb26cb793c6eba189050662c566f7ea0559bd486 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 05:43:27 2010 +0600 + + Remove unused pShadow field from drivers' private structures + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2c85d72fc7bd013af327321ad5d626dc73c3caf0 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 05:43:26 2010 +0600 + + Do not check xfree argument for NULL + + xfree itself checks for NULL, and even this is not necessary + as passing NULL to free(3) is safe. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 15bc35c6e44c65812de5c3e85ec8bbf78b032ded +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Sat Jan 2 05:43:25 2010 +0600 + + Remove trailing whitespace + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1763550d0181ac1c775b9ddf490114eff2fbe67e +Author: Simon Thum <simon.thum@gmx.de> +Date: Fri Jan 1 19:58:05 2010 +0100 + + dix: add smooth limited pointer acceleration profile + + This profile is inspired by the accel code removed from the wacom driver. + It ascends from zero to acceleration, maxing out at threshold. This means you + can control the slope using threshold, which wasn't possible in wacom. + For sanity's sake, threshold should grow with acceleration. + + Works best with adaptive deceleration, since otherwise it only generates + acceleration above 1, causing seldom pixel skips. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 435f27667f84269768efecde34de4af2b2d43376 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Sep 27 14:45:47 2009 +0200 + + config: add libudev input-hotplug backend + + Add a backend using libudev for input hotplug, and disable the hal and + dbus backends if this one is enabled. + + XKB configuration happens using xkb{rules,model,layout,variant,options} + properties (case-insensitive) on the device. We fill in InputAttributes + to allow configuration through InputClass in Xorg. + + Requires udev 148 for the input_id helper and ID_INPUT* properties. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b8b12e41c453c3bf94b11e7a18934d3b6e1869bf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 23 16:05:16 2009 +1000 + + xfree86: move sanity checks below option and input classes merges. + + While the identifier is likely set before the input classes are merged, the + driver may not be. Hence don't check for a driver before we've completed + configuration for this device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 9fad8f06fb89ac2ae05bea0fa24cab3df7677297 +Merge: 871bbe1 42e8c92 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 30 09:28:19 2009 -0800 + + Merge remote branch 'dbn/inputclass' + +commit 871bbe1d87fa3c7ebd075e1d1eec33e45b08493d +Merge: db2c6f7 e116563 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 30 09:16:45 2009 -0800 + + Merge remote branch 'dbn/xorg.conf.d' + +commit db2c6f7c91289b5d49978974093a1002b3b53a56 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Dec 29 15:48:44 2009 +0100 + + EXA: Don't use UTS/DFS directly for Put/GetImage when there's a system copy. + + We want to save the result in the system memory copy, in case we'll need it + again for subsequent software fallbacks. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-By: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f28ca728e90ccbb901e8e7215a842525d8e786d3 +Author: Thomas Hellstrom <thellstrom@vmware.com> +Date: Tue Dec 29 12:51:30 2009 +0100 + + EXA: Restrict the regions that need to be migrated for composite fallback for src / mask pictures. + + [ Michel: Minor fixups to address compiler warnings ] + + Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0c1f43c0f3e888172f11f62a2f208af70e0183cc +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Dec 29 12:51:29 2009 +0100 + + EXA/mixed: Handle results of software fallbacks in DamageReport hook. + + This is more elegant and probably also slightly more correct than doing it + at FinishAccess time. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 08bf26c28fc8147b64f2fe8345b9581e0101571c +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Dec 29 12:51:28 2009 +0100 + + EXA: Fix migration avoidance for 1x1 pixmaps. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0bd8f0cd7f3823ee17ae8c88fd3e004bfff9982d +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Dec 29 12:51:27 2009 +0100 + + EXA/classic: Fix crash with migration heuristic "smart". + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 40453bf7718f1c3d672b87e9d84991032cbef859 +Author: Thomas Hellstrom <thellstrom@vmware.com> +Date: Tue Dec 29 09:34:44 2009 +0100 + + EXA: Limit src prepareAccess regions for a number of unaccelerated operations. + + When we can trivially calculate the affected source regions, + do that before calling region bounded prepareAccess. + + [ Michel: Minor fixups to address compiler warnings ] + + Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit aa9ce8ab343d51a67924757c5a43c9572248bb24 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Dec 29 09:34:43 2009 +0100 + + EXA: Use relevant source region to minimize migration on CopyWindow fallbacks. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 39cc110caa1f6481a7213ae39f82669333ec1645 +Author: Thomas Hellstrom <thellstrom@vmware.com> +Date: Tue Dec 29 09:34:42 2009 +0100 + + EXA: Fix bugs in exaGetImage / ExaCheckGetImage migration. + + Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d42f3960514f1c410863ac6c09c5638b5ddeae20 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Dec 28 16:48:18 2009 +0100 + + EXA: Allow optimized migration to be enabled with mixed pixmaps. + + This was always the intention, I only recently realized it wasn't the case + yet... + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 661630f9099f254e54c8da513aaed12f6532cc35 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Dec 28 16:48:17 2009 +0100 + + EXA/mixed: Don't clear deferred status of pixmaps if migration is limited. + + * With optimized migration, only the pending damage region is synchronized for + destination pixmaps. + * Migration of source pixmaps can be limited to a bounding region. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 42e8c9224e6c54655c45f87999d37d0d67b3f7f5 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Fri Oct 2 06:29:28 2009 -0700 + + xfree86: Introduce InputClass configuration + + Currently Xorg uses hal's fdi files to decide what configuration options + are applied to automatically added input devices. This is sub-optimal + since it requires users to use a new and different configuration store + than xorg.conf. + + The InputClass section attempts to provide a system similar to hal where + configuration can be applied to all devices with certain attributes. For + now, devices can be matched to: + + * A substring of the product name via a MatchProduct entry + * A substring of the vendir name via a MatchVendor entry + * A pathname pattern of the device file via a MatchDevicePath entry + * A device type via boolean entries for MatchIsKeyboard, MatchIsPointer, + MatchIsJoystick, MatchIsTablet, MatchIsTouchpad and MatchIsTouchscreen + + See the INPUTCLASS section in xorg.conf(5) for more details. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0711598dd3e8366217676f462f1af7d0899656d9 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed Sep 2 06:47:13 2009 -0700 + + config: Introduce InputAttributes in NewInputDeviceRequest + + In order to give NewInputDeviceRequest more information, a new + InputAttributes type is introduced. Currently, this collects the product + and vendor name, device path, and sets booleans for attributes such as + having keys and/or a pointer. Only the HAL backend fills in the + attributes, though. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> + +commit c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Fri Oct 2 06:28:03 2009 -0700 + + xfree86: Support non-Option boolean entries in configuration + + Refactored code into the parser to allow the freeform boolean types used + in Option entries to be used in other configuration entries. This isn't + as powerful as allowing "No" to precede the option names, but it atleast + gives a common handling of "yes", "no", etc. + + A type xf86TriState has been added to support an optional boolean. This + allows the boolean sense of the value to be kept while providing a means + to signal that it is unset. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> + +commit e1165632bdfbd720889ed1adf5f7ab338032c0ee +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 21 15:56:35 2009 +1000 + + xfree86: Add Option AutoServerLayout for input devices. + + Any input device with this option will be automatically added to whichever + server layout is selected at startup. This removes the need to reference a + device from the ServerLayout section. The two following configuration are + identical: + + CONFIG 1: + Section "ServerLayout" + InputDevice "foo" + EndSection + + Section "InputDevice" + Identifier "foo" + ... + EndSection + + CONFIG 2: + Section "InputDevice" + Identifier "foo" + Option "AutoServerLayout" "on" + ... + EndSection + + The selection of the server layout affects both explicitly specified + layouts and the implicit layout. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp at keithp.com> + +commit 592b20c517461d32daf44a940386ffcc11c434f8 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Dec 21 01:13:44 2009 -0800 + + xfree86: Allow config directory to be specified on command line + + Add a new command line parameter, -configdir, to specify the config + directory to be used. Rules are the same as -config for root vs. user + privileges. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> + +commit efa5269f23c2237eb5368bf5245ffbbf35714153 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Dec 21 00:04:16 2009 -0800 + + xfree86: Use xorg.conf.d directory for multiple config files + + Currently there is a single file, xorg.conf, for configuring the server. + This works fine most of the time, but it becomes a problem when packages + or system services need to adjust the configuration. Instead, allow + multiple configuration files to live in a directory. Typically this will + be /etc/X11/xorg.conf.d. + + Files with a suffix of .conf will be read and added to the server + configuration after xorg.conf. The server won't fall back to using the + auto configuration unless there is no config file and there are no files + in the config directory. + + Right now this uses a simpler search template than the config file + search path by not using the command line or environment variable + parameters. The matching code was refactored a bit to make this more + coherent. Any DDX wanting to read the config files will need to call + xf86initConfigFiles before opening/reading them. This is to allow + xf86openConfigFile without xf86openConfigDirFiles and vice-versa. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> + +commit f1e869aca176e9113f9d234b0ea59b4cac295cc4 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Dec 21 00:03:11 2009 -0800 + + xfree86: Unexport configuration file symbols + + These functions should not be used outside of DDXs, so no need to put + them in the ABI. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> + +commit 90e6d93cf9bfafd63d7849dc16ce194d6f9c9d5f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 23 12:54:14 2009 +1000 + + test/xi2: fail if xi2 class type is garbage. (#25492) + + If the keycode range exceeds the allowable length, memory gets overwritten. + Catch this case by making sure that only allowed class types are + present. + + X.Org Bug 25492 <http://bugs.freedesktop.org/show_bug.cgi?id=25492> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 72286eae9f4a2f2ca6c46919ff8aa1011429e03a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 22 15:42:59 2009 +1000 + + xfree86: remove LAYOUT_DEBUG section. + + I don't think this one has been in use since 2003. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 38b5afb0b5b46b61effa6f0e5a377b343e357e7e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 22 15:40:40 2009 +1000 + + xfree86: remove some 'enable this later' and if 0 ifdefs + + 2003 called, they want their ifdefs back. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7dc78db79edd15b971110acaf16bbe7f69e40bdb +Merge: 81a623f b44c9be +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 22 21:25:18 2009 -0800 + + Merge remote branch 'whot/master' + +commit b44c9be244cee286835855483a69c69e80b095c0 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Dec 22 17:14:09 2009 +0100 + + test/xi2: fix maximum max_keycode (bug#25492) + + The number of keycodes needs to be lower than 0xFFFD so that the length + field of xXIKeyInfo doesn't overflow. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 190610e0c62170a27ab3e40c6c6210a583ae1ad4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 21 11:08:26 2009 +1000 + + xfree86: remove HistorySize from the xorg.conf man page. + + This option isn't parsed by anything anymore. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 094c6b9f97a9f92e5a0ef3cf5be24c09ed4d6063 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 21 10:42:32 2009 +1000 + + xfree86: reword InputDevice man sections, deprecate CorePointer/CoreKeyboard + + Reshuffle and reword - InputDevice sections are only necessary if + hotplugging is disabled. Put more emphasis on hotplugging and less on HAL + since we'll switch backends eventually. + + CorePointer, CoreKeyboard, and AlwaysCore should be listed as deprecated + since they don't do what they used to since 1.4. These days, only + SendCoreEvents matters and it's enabled for any driver calling + xf86ProcessCommonOptions (== every driver). + It only controls the startup behavior too, so document this. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 81a623f036fe56d53c4e3bdafb3eaf945502525f +Author: Keith Packard <keithp@keithp.com> +Date: Sat Dec 19 20:11:41 2009 -0800 + + Bump to 1.7.99.3 (unreleased) + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 3c30c5b6d321f34736c442c9cd982308d9b8b93a +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 18 22:58:59 2009 -0800 + + Set release date for 1.7.99.2 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 895f40792a14d8b88923bf3b428d31ae3bb31e46 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Dec 2 17:43:01 2009 -0800 + + Add type name argument to CreateNewResourceType + + Convert all calls of CreateNewResourceType to pass name argument + + Breaks DIX ABI. + + ABI versions bumped: + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a11c58fa0c5809f918b36b84be53385cb2d8ea59 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 11 00:58:25 2009 -0800 + + Ensure all resource types created have names registered + + Calls RegisterResourceName to record the type name for + use by X-Resource, XACE/SELinux/XTsol, and DTrace. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit eb750f8b5e14751d4c40b50499baec5d2ba79db9 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 11 00:46:22 2009 -0800 + + Check for failures from CreateNewResourceType + + Make sure to check return value before setting bitmask flags. + For most calls, just fails to init the extension. Since Xinput + already calls FatalError() on initialization failure, so does + failure to allocate Xinput's resource type. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 1df4bd6011e110dcf0649b15bfffd4ab9e6961d6 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 17 18:24:40 2009 -0800 + + Change default xkb model from pc104 to pc105 + + PC105 is a more useful default for non-American keyboard users, + not harmful for American PC101/PC104 keyboard users. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1d2e189cdc1d65c9ca2aa0a950780dc18e6c50f1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 17 18:24:39 2009 -0800 + + Change sysconfdir brackets to avoid some shells trying to run it as a command + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 48749cc21b074ee8e68c3854bd3977ec7c408225 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 17 18:24:38 2009 -0800 + + Add platform compatibility defines for Sun Studio compilers + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b63912ed4c69fedd1bea92274d6cae0429a79677 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 17 18:24:37 2009 -0800 + + Convert checks for PC98 support from platform #ifdefs to configure flag + + Default remains the same - on for most OS'es on i386 (except Solaris), + off for everyone else. Can be manually toggled via --enable-pc98 or + --disable-pc98. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 801bc8075aee664bd4c6b6ff842ab737c143a1de +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 14 08:43:19 2009 +1000 + + xfree86: update man page for special keys handling. + + SpecialKeyHandling was removed from the kbd driver with version 1.4.0. Since + this is the only version that will build against server 1.7+ it's not + reasonable to mention it in the man page. Reword, point to XKB instead and + make clear that some key combinations _may_ not be available in any given + config. + + Reported-by: Derek Fawcus + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 753310837cd3812882d8de67f063bb61813db675 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 14 08:41:18 2009 +1000 + + xfree86: DontZap has been disabled for a while now, say so in the man page. + + 1.7 always shipped with DontZap disabled, it's just the default keymaps that + may not include the symbol to trigger it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 0cb638dc6822e54567a1731ea1cf588475a226e9 +Merge: 6a6a041 fbdf493 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 16 21:58:44 2009 -0800 + + Merge remote branch 'alanc/master' + +commit 6a6a041c2d8d32f6355db77cd59cff371038c683 +Merge: 8127465 d503195 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 16 21:57:32 2009 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 8127465f44fee99181f37a5e55dafc90bfafe3d8 +Author: Ville Syrjälä <ville.syrjala@nokia.com> +Date: Mon Dec 14 19:19:01 2009 +0200 + + xf86xv: Fix off-by-one in viewport clipping + + Most of the Xv Put/Get operations have an off by one error in the + viewport clipping. + + Apparently PutImage was fixed at some point but the same code was + already copy-pasted all over the place, and so the other operations + still suffer from the bug. + + Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit faca1bc582e374d32ee9d63d10e072fbef4940a3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 14 11:05:20 2009 +1000 + + xfree86: belately init RandR12 if xinerama fails. (#24627) + + On Fri, Dec 11, 2009 at 10:19:01AM -0800, Keith Packard wrote: + > On Wed, 9 Dec 2009 11:55:14 +1000, Peter Hutterer <peter.hutterer@who-t.net> wrote: + > > On Tue, Dec 08, 2009 at 05:24:06PM -0800, Aaron Plattner wrote: + > > > On Tue, Dec 08, 2009 at 03:52:27PM -0800, Peter Hutterer wrote: + > > > > Xorg +xinerama crashes immediately due to whacky dependency between Xinerama + > > > > and RandR12. The latter doesn't initialize if Xinerama is enabled, but if + > > > > only one screen is found, Xinerama is disabled again and RandR12 tries to + > > > > access data it never initialized. + > + > I'd sure like to have RandR get enabled when xinerama doesn't; is there + > an easy way of making that happen here? Perhaps having the RandR12 code + > disable Xinerama when only one screen is found? Or some other kludge? + + you know the dependency better than I do so any hints are apreciated. + afaict, the screenInfo.numScreens (the check used by Xinerama) isn't + necessarily initialized at this point so we can't use the same check. + The following seems to work though: + + From 670b3ebdb7312a6433a8f093d0820785db2aea20 Mon Sep 17 00:00:00 2001 + From: Peter Hutterer <peter.hutterer@who-t.net> + Date: Mon, 14 Dec 2009 11:00:58 +1000 + Subject: [PATCH] xfree86: if only one screen was found, disable Xinerama (#24627) + + Xorg +xinerama crashes immediately due to whacky dependency between Xinerama + and RandR12. The latter doesn't initialize if Xinerama is enabled, but if + only one screen is found, Xinerama is disabled again and RandR12 tries to + access data it never initialized. + + Dependency chain is: + - ProcessCommandLine sets noPanoramiXExtension to FALSE + - xf86RandR12Init() is a noop + - PanoramiXExtensionInit sets noPanoramiXExtension to TRUE + - xf86RandR12CreateScreenResources tries to use the devPrivates key it never + initialized. + + This hack checks if there's only one screen at the time RandR12 is + initialized. If so, we expect Xinerama to fail anyhow so we disable it + ourselves and proceed as planned. + + X.Org Bug 24627 <http://bugs.freedesktop.org/show_bug.cgi?id=24627> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5f898ddbaa7df01d2479e40238d8c7954fc4b67a +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Dec 11 17:04:14 2009 +0200 + + xfree86: fix -quiet option behaviour + + Previously it was trying to set the same value as the default one. Sigh. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7284e198619cdacb38d0ad715e932acff86c8367 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Dec 11 17:04:13 2009 +0200 + + os: print log markers only if log level is >= 0 + + FWIW default log verbosity is 0, so this will affect only if one start the + server with a different -verbose argument. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f57240a0a8c05e0a2589d0127f8888db140d6974 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Dec 11 17:04:12 2009 +0200 + + xfree86: spam output but with verbose level checked instead + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fbdf493a3e7e48039a0826531e11aa33b04bf391 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 14 18:46:00 2009 -0800 + + Add freetype & type1 to the LoadModules ignore list + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit c9726bbe3148c7a8adb4dfde483741545d59c3dc +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 15 15:54:22 2009 -0800 + + Update Sun license notices to current X.Org standard form + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d50319550458f8127298cf8672b47f914b74ab1f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Dec 11 16:42:43 2009 -0800 + + Xfake: Nuke -Wl,-undefined=InitExtensions from LDFLAGS + + This is not portable, and accodring to Paulo should not be required any more. + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit ed7d2527190ec56aed38db19d9e958abe88441b9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Dec 11 11:53:28 2009 -0800 + + dtrace: Add Xserver-dtrace.h to CLEANFILES + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 44f102ed64e2552a0e04714c7574f74ca5ee66e2 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Nov 23 22:24:44 2009 -0800 + + COPYING: Update license preamble + + Update the comment about "a modification is currently under discussion" + since there hasn't been any such discussion for some time and this is + the consensus agreed upon preferred format. + + Also throw in a pointer to the OSI discussion page about the MIT license. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 00a7252fe3e519e3e4d62cdd8746833ca59bce77 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Nov 20 13:38:30 2009 -0800 + + Fix dtrace object builds of libos to link with SHA1_LIBS + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit dd2c83d03ecedce8b546d583e436c12f92510754 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 11 14:42:20 2009 -0800 + + Fix builds with --with-int10=stub + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit 77221c9155a3c96cb63b210a048db1ea71a5e359 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 29 14:01:29 2009 -0400 + + glx: swrast can do GLX 1.4 too + + Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a72c65e9176c51de95db2fdbf4c5d946a4911695 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 2 08:37:20 2009 -0800 + + fb: Adjust transform or composite coordinates for pixman operations + + Windows (or even pixmaps, in some cases) may not sit at the origin of + the containing pixmap, so any coordinates relative to the drawable + must be adjusted. For destinations and untransformed sources, the + operation coordinates are adjusted. For transformed sources, the + transform matrix is adjusted. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> + +commit bd567061c8b84b268d9bbb01bc4d8981feefb862 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 2 15:51:22 2009 -0800 + + Split fbGetDrawable into fbGetDrawablePixmap and fbGetPixmapBitsData + + These two sub-macros each perform half of the original macro work and + the old macro is now implemented in terms of the new ones. This makes + way for new code which wants to know the underlying pixmap for a + window instead of just getting a pointer to the bits. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> + +commit 61335052972a78d67c0ba74f902273b34c63a198 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 1 11:09:32 2009 -0800 + + Revert "Fix clipping when windows are used as sources" + + This reverts commit e9aa61e9f0d663d5b34a397b943b4d1df44e873d. + + Conflicts: + + fb/fbpict.c + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> + +commit 071b3c1810d9f2602173acc8578caac20e0b771e +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 1 11:05:04 2009 -0800 + + Revert "Use IncludeInferiors when copying windows before compositing." + + This reverts commit 7c7f0c2c6a04f7044d5ce69e97a615735e5831f1. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> + +commit 8e640d6b131d2865a9725d8997023865b0ef3d69 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 1 11:04:49 2009 -0800 + + Revert "Reserve space for two GC values in copy_drawable()." + + This reverts commit 08df24555cb432eb0d90a3f63275e9485e777c4c. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> + +commit 0816c5482c25251da8af5978cc348e1c547bf731 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 1 11:04:06 2009 -0800 + + Revert "fb: Don't crash if copy_drawable() returns NULL." + + This reverts commit 66a9616d645f5a23225251d197e00b94c79274f6. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> + +commit d3e054ac07dae12a82ad764b0622fddbef4b9ec5 +Merge: 12fb318 97a6454 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 11 09:22:22 2009 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 12fb31815db9de9c01f2d4155a2b74531777c0bf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 7 12:58:57 2009 +1000 + + xkb: don't assign garbage value to led_return. + + As the comment for the function states, led_return is undefined if map is + NULL. We might as well skip writing to it then. + + Found by clang. + + Reported-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Jamey Sharp <jamey@minilop.net> + +commit ea14a418214ba4c58910f5650d8b25b3fc3a7099 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Dec 3 11:21:31 2009 +1000 + + Xi: reset device properties to NULL after deleting them. (#25374) + + Commit 0e6cee853d8e5bef3274e632ef034d37f14674a9 introduced cleanup code to + remove the accel properties when switching schemes. The same code is + triggered by the default closedown code but only after unconditionally + removing all device properties (as part of the cleanup). The properties, + although deleted never got reset to NULL. + + X.Org Bug 25374 <http://bugs.freedesktop.org/show_bug.cgi?id=25374> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Andy Furniss <lists@andyfurniss.entadsl.com> + Reviewed-by: Dave Airlie <airlied@redhat.com> + +commit 9ac6a048efaec51f158bbc1a4a3f448cbe5658ad +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 9 11:43:34 2009 +1000 + + xfree86: remove unused variable in configureDDMonitorSection. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Dave Airlie <airlied@redhat.com> + +commit 3fad969a90ccab604359ec4de05e745bb4b909e1 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Dec 6 20:27:06 2009 +0100 + + Move config_init() after CreateWellKnownSockets() and InitCoreDevices() + + config_init() can now add devices directly instead of scheduling a + timer. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 886140787852c660978a9bb3abc7cc2702cbaed1 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Mon Dec 7 05:54:57 2009 +0100 + + Fix possible NULL dereference in XkbFlushLedEvents() + + Through some code paths it is possible that NULL is being passed in the + 'ed' parameter to XkbFlushLedEvents(). Make sure we don't pass it along + to bzero(). + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 92d9cb7e1340b259294ba317ea3a7d18487498b5 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Sun Dec 6 23:52:54 2009 +0100 + + XkbWriteCountedString(): return early if str is NULL + + This avoids NULL from being passed to memcpy() later in the code. While + that wasn't an issue before - that value being NULL implied 'size == 0' + so memcpy() wouldn't try to dereference it - it made the code harder + to read and also confused clang. + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit df2635d4644d1fa2772ff58d8d34cdf788ece412 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Dec 10 00:04:53 2009 +0100 + + EXA/mixed: Don't consider devKind for detecting dimension change. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=25536 . + + There should be no reason for the pitch to actually change when none of the + other dimensions do, and this could lead to incorrectly freeing the system + memory copy when allocating a GPU copy, resulting in loss of valid pixmap + contents. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 97a6454ea57587db490873fee8ff0f899882972d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 9 18:27:31 2009 -0800 + + XQuartz: pbproxy: Fix building of standalone xpbproxy executable + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 1b8f90aa8b1017c74b254db2f398131b857323d4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Dec 8 15:50:28 2009 -0800 + + Miscellaneous compilation warning fixes + + main.c:134: warning: no previous prototype for 'dix_main' + rootlessScreen.c: In function 'RootlessMarkOverlappedWindows': + rootlessScreen.c:434: warning: function declaration isn't a prototype + backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' + backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' + set.c: In function 'RecordSetMemoryRequirements': + set.c:413: warning: old-style function definition + set.c: In function 'RecordCreateSet': + set.c:425: warning: old-style function definition + stub.c: In function ‘main’: + stub.c:236: warning: ISO C90 forbids mixed declarations and code + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 955b9f23a34cc79a5cd9676b45b3df4ffcc7302b +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Dec 8 20:25:02 2009 +0100 + + EXA: ModifyPixmapHeader_mixed fixes. + + * Better detection of dimension changes. + * Make sure to re-create the system memory copy when the pixmap dimensions + change (e.g. the screen pixmap on screen resize). + * Clear the valid regions. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c1503861cf75654d4f7b22e6f7f6487c47a0a395 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Dec 8 20:25:01 2009 +0100 + + EXA: ExaDoPrepareAccess return value fixes. + + Only return TRUE if the GPU copy is being accessed, and preserve the return + value on repeated / nested calls for the same pixmap. + + exaPrepareAccessReg_mixed could get inconsistent return values e.g. when the + same pixmap is both the destination and source of an operation, potentially + resulting in a crash. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Acked-by: Maarten Maathuis <madman2003@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fd867387335b6175d76bbe93118bbe5e1e45ce88 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Dec 5 03:18:31 2009 +0100 + + exa/mixed: pixmaps that succeed prepare access have no need for a cpu copy + + - When they have a gpu copy ofcource. + - Use the presence of a cpu copy as a hint to fall back instead of UTS'ing in + exaHWCopyNtoN. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit bb7acfbcfbc37869c2215c26791c6175a5a6c526 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Dec 4 08:37:14 2009 +0100 + + EXA: Use correct coordinate system for calculating Composite fallback region. + + Fixes incorrectly skipped rendering of some Composite operations to windows. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0f4ef7123d3e6e09e04dc55e8edb47aecf017648 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Dec 3 19:28:13 2009 +0100 + + exa/mixed: setting devKind before exaCopyDirty* is not needed + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8ea415d417b3ef6b8a288d10da76ff4bc334e08b +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Dec 2 20:24:02 2009 +0100 + + Revert "exa: a few small pitch related changes" + + This reverts commit 99d88ef69d5f7dbf99ca605eceb92f42230a89f4. + + - Some pixmaps under classic have a sys_pitch which is 0, no idea why. This is + causing rendering corruption. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 98c8b752254a27ab1aaf881b36bfda0f74929d0a +Merge: 0e084d8 91c1bd7 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 2 15:28:07 2009 -0800 + + Merge remote branch 'whot/master' + +commit 91c1bd78f7240c92702828f8e5a6b6ce944b9e36 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Nov 28 21:32:47 2009 -0500 + + configure.ac: error while checking for XDMXCONFIG_DEP + + Introduced in commit 9998105a387e0294054502331a56e1e020cd93e4 + The replacement third parameters to PKG_CHECK_MODULES([DMXMODULES] + was not quoted. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 761ae22f880bd79550ccf93d321b8a28b3755956 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 1 14:38:19 2009 +1000 + + xfree86: tell users to disable AutoAddDevices, not AllowEmptyInput. + + Technically, disabling AEI is the right suggestion. AEI off forces the + server to init the built-in defaults for input devices (or pick the first + one from the config file). At the same time, hotplugging is still available + with AEI off. + + Unfortunatly, in the vast majority of cases users want to simply disable + hotplugging or have a working server while the local HAL configuration is + broken or missing. Disabling AEI will lead to duplicate events, triple + keystrokes, etc. once the configuration works again. + It's not actually required to remove AEI once hotplugging works again, + though it will in many cases lead to a setup that appears broken. + + Asking users to disable AutoAddDevices instead means those users disable + hotplugging, can then fix the HAL setup and they _must_ remove the config + line again to test if hotplugging works again. Which doesn't leave them with + a broken config once everything is working nice and dandy. Less bugreports, + everybody wins. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Acked-by: Daniel Stone <daniel@fooishbar.org> + Acked-by: Rémi Cardona <remi@gentoo.org> + Acked-by: James Cloos <cloos@jhcloos.com> + +commit b584c224a888c9e7f92d7e49021f74232a727c7f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 30 12:11:41 2009 +1000 + + Set the source and deviceid for key repeat events (#24785) + + X.Org Bug 24785 <http://bugs.freedesktop.org/show_bug.cgi?id=24785> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit 66bb8c6fbdfc0fc0d971aac4ec6f949bb9288c1b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 27 16:20:13 2009 +1000 + + dix: remove core devices when shutting down. (#25028) + + NewInputDeviceRequest (and RemoveDevice) have checks in place to not allow + removal of the VCP/VCK. When shutting down, they need to be cleaned up + nonetheless to free the memory associated. + + X.Org Bug 25028 <http://bugs.freedesktop.org/show_bug.cgi?id=25028> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 83d90b90bcb71c89750f92a177361e53dd261414 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 27 16:08:44 2009 +1000 + + dix: remove some obsolete comment. + + The "counterpart to biggest hack" included checking for the motion history + function - which is unified in 1.7. Hence the check (which is already + removed) would evaluate to true anyway, and this comment isn't needed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit c20c8897272427cb3f755a3e28e80a9ad46f08a1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 27 16:01:53 2009 +1000 + + dix: fix memory leak, free event list on shutdown. (#25028) + + X.Org Bug 25028 <http://bugs.freedesktop.org/show_bug.cgi?id=25028> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 0e084d8c71e697a5cf5d5d7c749455ae14bd6eb7 +Author: Luc Verhaegen <libv@skynet.be> +Date: Wed Nov 11 15:59:27 2009 +0100 + + Xv: Fix AdjustFrame when driver implements ReputImage. + + Should probably also be applied to stabler xserver branches too. + + Luc Verhaegen. + + From a22bc20721bad506d8fa9772b1258568cbffe7d2 Mon Sep 17 00:00:00 2001 + From: Luc Verhaegen <libv@skynet.be> + Date: Wed, 11 Nov 2009 15:52:39 +0100 + Subject: [PATCH] Xv: Fix AdjustFrame when driver implements ReputImage. + + Finally fixes fd.o #4653, filed more than 4 years ago. + + Patch can be happily applied to all modular Xorg versions. + + Signed-off-by: Luc Verhaegen <libv@skynet.be> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f4fc3406720410e37a2bce1b782cba0f0b734e42 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Nov 30 11:03:59 2009 -0800 + + XQuartz: Drop calls to alloca + + This makes us more consistent with the rest of the codebase, using xalloc/xfree + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 66a9616d645f5a23225251d197e00b94c79274f6 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Nov 30 13:17:53 2009 +0100 + + fb: Don't crash if copy_drawable() returns NULL. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24634 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8754db77d8169e5ea506a963cebee1a651bcf094 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Nov 30 13:17:52 2009 +0100 + + EXA: Don't defragment offscreen memory at allocation time. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24300 . + + Offscreen memory allocation can occur from various places, and apparently + doing defragmentation from at least some of them can confuse some driver + acceleration code. + + There's still the regular background defragmentation in the WakeupHandler, + which should manage to keep fragmentation at a reasonable level. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0e555a1033e5deed1db8582ca075455a6a2d4228 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Nov 30 13:17:51 2009 +0100 + + Revert "EXA: Accumulate arbitrary number of glyphs without flushing." + + This reverts commit c11678cc189551f2a01eaa7a63969c16950739b4. + + Not sure what I was thinking, turns out alloca() of a size derived from client + input is a bad idea. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 99d88ef69d5f7dbf99ca605eceb92f42230a89f4 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Nov 28 10:34:45 2009 +0100 + + exa: a few small pitch related changes + + - Setting pitch before exaCopyDirty* is not needed. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a54c23fe647cb4d610d871094193ae5959606008 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Nov 28 10:34:44 2009 +0100 + + exa: s/PixmapIsOffscreen/PixmapHasGpuCopy and s/pExaPixmap->offscreen/pExaPixmap->use_gpu_copy + + - Fixup some variable names as well. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 342f3689d17256c92cbfee079d24501d27aa1153 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Nov 28 10:34:43 2009 +0100 + + exa: handle pixmap create/destroy in lower layers + + - Pixmaps that are created during a fallback are automatically prepared access. + - During the fallback accelerated ops are blocked to prevent new/scratch gc's + from triggering accelerated ops on mapped pixmaps. + - A few cases of incorrect wrapping (on the top level pointer instead of + between damage and (w)fb) have been removed. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b54bc14ce0ae38c4863794bc3096ca86cdb23908 +Author: Ingmar Vanhassel <ingmar@exherbo.org> +Date: Wed Nov 25 20:31:48 2009 +0100 + + Update man-pages for new default font paths + + Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c0367028ac02b3ccfbc245863dc6b7295a4014d6 +Author: Ingmar Vanhassel <ingmar@exherbo.org> +Date: Wed Nov 25 20:31:47 2009 +0100 + + Update COMPILEDDEFAULTFONTPATH to match the new default font path + + Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0e6cee853d8e5bef3274e632ef034d37f14674a9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Nov 18 14:39:25 2009 +1000 + + dix: clean up accel old scheme data when switching schemes. + + InitValuatorClassDeviceStruct always initializes with the default profile. + The default profile allocs data and adds a few properties which become + obsolete if the profile is changed lateron by the driver. + + The property handlers are stored in the device's devPrivates and cleaned up. + Ideally, the property handler ID's could be stored somewhere more obvious, + but that seems to require breaking the ABI. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Simon Thum <simon.thum@gmx.de> + +commit 1b127ab8429616adf9ec31ba4d8bdd9af6e104a9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 24 15:31:48 2009 +1000 + + Xi: when deleting all properties, reset property handler to NULL. + + Trying to unregister property handlers during the device closure process + leads to invalid memory accesses. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 8806375ed72a3cd465fe0a49ead079a334accd6b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 17 09:25:47 2009 +1000 + + Move xdmxconfig modules into DMX conditionals (#25102) + + xdmxconfig requires additional modules not checked for if Xdmx build is set + to auto (the default). This may lead to build errors if the Xdmx modules are + installed, but not the extra ones required for xdmxconfig. + + X.Org Bug 25102 <http://bugs.freedesktop.org/show_bug.cgi?id=25102> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Remi Cardona <remi@gentoo.org> + Acked-by: Julien Cristau <jcristau@debian.org> + +commit a2adda7ab3defd953cf0f48f5372efb037786a9e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Nov 19 16:35:55 2009 +1000 + + Revert "Move xdmxconfig modules into DMX conditionals (#25102)" + + New package dependency unnecessarily links in a few libraries that Xdmx + doesn't need. This can be fixed more elegantly. + + This reverts commit 0ef15ca9d2d9c78c79a2771c550563bc6931b365. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit eb967ca36cfe0409972ac987a74d498cd6f6bafb +Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> +Date: Tue Nov 17 17:13:43 2009 +0200 + + Xext: Fix a memory leak on GE client disconnect. + + Add a call to dixRequestPrivate to inform dixFreePrivates that memory + allocated in GEClientCallback should be released when client + disconnects. Otherwise there is a leak of sizeof(GEClientInfoRec) for + every client connect/disconnect. + + Also remove the explicit allocation and let GEGetClient / + dixLookupPrivate do it. This makes GEClientCallback similar to the + other extension callbacks. + + Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 55f60e192318132157d3dfdd6732f141bd9dc352 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Mon Nov 23 22:17:43 2009 +0100 + + Revert "exa/mixed: be more thorough about setting fb_pitch when needed" + + This reverts commit d4fc245115eb2cb323e06a82f9dd52518d9b6a16. + + - This is causing crashes/problems for some. + + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4677b5a80025b50ba2a3e953fd487a549586ae9f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Nov 23 16:33:00 2009 -0800 + + XQuartz: Allow better compatability with older versions of xinit + + If we are id="org.x" and the launchd socket is ":0", we will claim + the socket to match the old behavior before we prefixed the + socket name with our id. + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit ec16357edaba23694b12fd234ffa12fd58a73dfa +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Nov 23 17:00:06 2009 +0200 + + configure: remove unused kdrive Xvesa config variable + + Xvesa was gone in commit 6d21fbf0 and this should be there as well. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a30e739a144912a68adcaa9f426d600c6ecbd529 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Nov 23 13:07:56 2009 +1000 + + Xi: don't crash when deleting invalid device properties. + + Deleting a property that was not set on a device leads to a null-pointer + reference. The protocol allows deleting those properties - it has to be a + noop. + + Reproducible: + xinput --set-prop "My device" --type=int --format=8 "my property" 1 + xinput --delete-prop "My other device" "my property" + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 19f7c15e2008dab3c46ba3e14dfa353d01c74f72 +Author: Zhao Yakui <yakui.zhao@intel.com> +Date: Fri Nov 20 14:43:35 2009 +0800 + + xfree86: Edid quirk for Philips LCD LP154W01 + + v1->v2: Make one condition case for one quirk instead of merging them + together. This is based on the Keithp's suggestion. + + Move the EDID quirk for Philips LCD LP154W01 as the panel reports the vertical + size in cm. + + https://bugs.freedesktop.org/show_bug.cgi?id=24482 + + Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b8b8db98353760738eead612fe846c2ce1c174fa +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Nov 19 10:46:30 2009 +0100 + + EXA: Don't use UploadToScreen for CopyNtoN with mixed pixmaps. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit d4fc245115eb2cb323e06a82f9dd52518d9b6a16 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Nov 18 21:23:09 2009 +0100 + + exa/mixed: be more thorough about setting fb_pitch when needed + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + +commit 647b79f87a9891225678dc6fc2fbda3bdef8fa9d +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Nov 18 21:23:08 2009 +0100 + + exa/mixed: avoid copying back pixmap data when no migration took place + + - When the driver handles the prepare access no copying is needed. + - Delayed pixmap creation should be fine, because it's handled by the + first prepare access, but the exaPixmapIsOffscreen check in finish access + will return FALSE without a driver pixmap. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + +commit 30be7ceaf228497ac1ff0a1123c1b35e3aa1fc73 +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Nov 14 18:39:00 2009 +0100 + + xfree86: set a sane umask before opening the log + + Xorg creates its log file following the umask of the user running + startx, which may result in a world-writable log. Set umask to 022 to + prevent this. + + Debian bug#555308 <http://bugs.debian.org/555308> + See also http://thread.gmane.org/gmane.comp.security.oss.general/2299 + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fb95090730360b6b7f5429c40937e8fc9dfe5c14 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Nov 9 03:33:45 2009 +0000 + + Use glibc's in/out routines + + Let's let glibc do the right thing for dense/sparse selection. + + The _alpha_iobase code has been unused since the switch to libpciaccess. It + really should have been killed by fba700f1f6a8976. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Tested-by: Michael Cree <mcree@orcon.net.nz> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0ef15ca9d2d9c78c79a2771c550563bc6931b365 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 17 11:48:35 2009 +1000 + + Move xdmxconfig modules into DMX conditionals (#25102) + + xdmxconfig requires additional modules not checked for if Xdmx build is set + to auto (the default). This may lead to build errors if the Xdmx modules are + installed, but not the extra ones required for xdmxconfig. + + X.Org Bug 25102 <http://bugs.freedesktop.org/show_bug.cgi?id=25102> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Adrian Bunk <bunk@stusta.de> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit df95be4d3d9a744720e37a16fd89d9569bf6e188 +Author: Paulo Ricardo Zanoni <pzanoni@mandriva.com> +Date: Thu Nov 12 11:27:34 2009 -0200 + + configure: change 'sigio-default' to 'use-sigio-by-default' + + This was discussed in this thread: + http://lists.x.org/archives/xorg-devel/2009-September/002025.html + The patch sent fixed the help string but not the configure option. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 801f0e59800ea4a3f6c85b22dea6f2c400bda703 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed Oct 28 14:09:11 2009 -0400 + + INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 + + Add missing INSTALL file. Use standard GNU file on building tarball + README may have been updated + Remove AUTHORS file as it is empty and no content available yet. + Remove NEWS file as it is empty and no content available yet. + + Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c93f516e850c2ef2b47cc2e282f9081ae7165ac7 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Oct 27 15:07:26 2009 -0400 + + Deploy the new XORG_DEFAULT_OPTIONS #24242 + + This macro aggregate a number of existing macros that sets commmon + X.Org components configuration options. It shields the configuration file from + future changes. + + Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0f38159cdd154a29caab0342aee41378e9921929 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Nov 10 09:12:27 2009 -0500 + + Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432 + + ChangeLog filename is known to Automake and requires no further + coding in the makefile. + + Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c739beb439bb813e4c82b3216daee7e89aa96f2f +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Nov 10 08:56:21 2009 -0500 + + .gitignore: use common defaults with custom section #24239 + + Using common defaults will reduce errors and maintenance. + Only the very small or inexistent custom section need periodic maintenance + when the structure of the component changes. Do not edit defaults. + + Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9071b0d69748cfa7ecca17b4cb0e431bbb0ef2a4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Nov 9 13:09:55 2009 -0800 + + XQuartz: Explicitly pass a bellProc to make XBell() work again. + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit e87a03fd531ce7974877688680d3bf9b85c2d835 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 27 17:16:57 2009 -0700 + + XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid. + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 15fc56addcc906592af7c0f4c0a5ac906fa5c389 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Nov 8 20:25:42 2009 -0800 + + XQuartz: Buildfix for Leopard and older + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit b5aa2e0a5fe233dc883084a5026013472e85bca4 +Author: Chase Douglas <chasedouglas@gmail.com> +Date: Mon Nov 9 22:54:39 2009 -0500 + + Move FD_CLR above pInfo->read_input + + The event fd may be invalidated by the pInfo->read_input call. If it is + invalidated, the subsequent FD_CLR call will segfault. Thus, the FD_CLR + call must precede the pInfo->read_input call. + + Signed-off-by: Chase Douglas <chasedouglas@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 982f6648fd29d085265bf6035c1bf4d1b2499316 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Nov 10 09:50:50 2009 +1000 + + dix: increase default number of buttons to 10. + + Currently the XTEST device is limited to the same number of buttons the core + device has. This breaks if a user has a mouse with more than 3 buttons + connected and is using a core client to fake button 8+ presses. + + Rather than expecting all clients to fix themselves, just increase the + default number of buttons to 10, which is somewhat a compromise. Ideally, + the XTEST devices should adjust themselves to the highest number of buttons + available on the slave devices (like the master pointers already do), but + that's a taks for another day. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ec5417b965616e60b51466fe9fd2b44cb5abb349 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Jul 12 23:58:32 2009 +0100 + + Cygwin/X: Ensure WM_STATE atom exists in multiwindow mode + + Workaround a bug in iiimxcf (assuming the WM_STATE atom exists), + which can cause many Solaris clients to simply fail with a BadAtom + error + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit aa860552fd7e2888258a7b48b8c3bd4af527dc6c +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Sun Nov 1 18:19:08 2009 +0000 + + Cygwin/X: Enable clipboard integration by default + + Enable clipboard integration by default, can be turned off with -noclipboard. + We still accept -clipboard for backwards compatibility. If both are passed, + the last one is accepted (just as other arguments are handled). + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 87b00ced3d308a9168828c0e38ecffa0640621a0 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 1 18:18:48 2009 +0000 + + Cygwin/X: Setup screen layout in Xinerama mode + + Setup screen layout according to the screen window native window + positions in Xinerama mode + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 0fe2e8c64e7a5a9140c77b88b266d7ae58b0bca2 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Sun Nov 1 18:18:31 2009 +0000 + + Cygwin/X: Allow composite to be enabled for Xwin + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 26a69bbd9b6f415c443d6d6f8f450329f348edc3 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Sun Nov 1 18:19:04 2009 +0000 + + Cygwin/X: Mount options have changed in cygwin-1.7 + + Mount options have changed in cygwin-1.7 + + Also fix a typo in the warning issued if /tmp is a textmode mount + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 35901ece6a49e5f8e245364c27723da2f9009a1d +Author: Paul Loewenstein <paul.loewenstein@gmail.com> +Date: Sun Nov 1 18:18:45 2009 +0000 + + Cygwin/X: Handle fake keypresses generated by speech recognizers + + Apparently, fake keypresses generated by speech recognizers may not bother + with a scan code, so look up what scan code corresponds to the virtual key + code if this occurs. + + Patch by Paul Loewenstein <paul.loewenstein@gmail.com> + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 0866322b574b1f3695467535ed5fa8f9e629ad1d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jul 13 13:46:45 2009 +0100 + + Cygwin/X: Always use an authorization cookie for internal clients + + Don't conditionalize use of an authorization cookie for internal client + threads on XCSECURITY, always use one (this avoids certain problems + with XDMCP setups where the XDMCP host removes localhost from the access + list etc.) + + Conditionalize the use of a XCSECURITY authorization descriptor on XCSECURITY + + Consolidate the various places where the authorization cookie is set + for internal threads into a new function, winSetAuthorization() + + Use authorization cookie for multiwindow WM X message thread as well + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 72f81f4e449defb0654e9bdb2c9ec014475a3977 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Nov 6 17:46:58 2009 +0000 + + Xming: Make -auth option work in with -multiwindow + + Use an internally generated cookie for authentication of the internal + window manager client when using the -auth option in -multiwindow mode. + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 6dbf8f27c885ea3a761548183fb00ba3df2df553 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Jul 21 01:15:25 2009 +0100 + + Xming: Tidy up code for initial native window positioning + + Tidy up code for initial native window positioning and avoid a + duplicate call to winMultiWindowGetTransientFor() + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 28eb61fc04811bb9bbb523e0a252933313bb16ce +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 1 18:19:14 2009 +0000 + + Avoid a null dereference if IFF_BROADCAST is set but there is no broadcast address + + It seems that the getifaddrs() function can return interfaces with + IFF_BROADCAST & IFF_UP set, but no broadcast address (at least + under Cygwin 1.7, this seems to happen for v6 mapped v4 addresses) + + Avoid a null dereference if this ever happens + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 091cbbaed7aafab6f9839a40fe977ab067d1ace1 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Mon Oct 12 13:40:11 2009 +0100 + + Xming: Fix UT8String and CompoundText clipboard text sharing with windows clipboard + + XConvertSelection() in libX11 always returns 1, so there is no point in + testing it incorrectly against Success. This is possibly a bug in + XConvertSelection() + + This should fix UTF8String and CompoundText selection via the clipboard. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 9657eae5d65eff289089afc46dfb629758ebbdf7 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 1 18:18:51 2009 +0000 + + Cygwin/X: Clearly diagnose a timeout while waiting for SelectionNotify event + + Clearly diagnose a timeout while waiting for SelectionNotify event + in the clipboard integration internal client. + (which seems to be behind some of the reported failures) + + Turn useless #if 0/ErrorF()/#endif into useful winDebug() + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 062f49a8e0d1afb4dd32e9451a47ab2792639e7f +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Nov 4 17:36:54 2009 +0000 + + Cygwin/X: Add a workaround for a SWT/Motif bug to internal window manager + + SWT/Motif expects all top-level windows to get reparented, and waits until they + do. So workaround that in our internal WM by forcing a reparent event to + occur, even though we don't actually need to reparent the window to + frame it (as the frame is a native window, not an X window) + + http://sourceware.org/bugzilla/show_bug.cgi?id=9848 + https://bugs.eclipse.org/bugs/show_bug.cgi?id=36806 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 71519a572fe15b85c0eb2b02636c9e871f2c858f +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Nov 4 17:34:40 2009 +0000 + + Cygwin/X: Fix typo in g_fAnotherWMRunning and tidy up WM detection code + + Tidy up code for detecting another WM is already running + Fix typo g_fAnotherWMRunnig -> g_fAnotherWMRunning + Remove some unused event mask macros + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit f3fad371cce0f3836514ad5b29e59fa1ca0627a7 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Nov 4 15:33:53 2009 +0000 + + Xming: Add FORCEEXIT option to configuration file + + Add a new option to configuration file: FORCEEXIT, like SILENTEXIT + but ignores the client count. Unsaved client work may be lost with + this option but it is useful if you want no dialogs. + + Add description of this new keyword to XWinrc man page + + Also fix grammar of the exit confirmation dialog warning to be correct + when there is only one(1) client connected. + + Also rearrange yacc tokens to one per line to make future merges + easier + + Also amend default system.XWinrc so that SILENTEXIT is on by default + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 019a601de6a8ae083852c2d384c814dcc7aeeb72 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Nov 4 15:16:03 2009 +0000 + + Xming: Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion() + + Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion(), as + they are in screen coordindates and may need to be scaled to the axis range + appropriately + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 7af1240b57daa4ec55512276a9fda499d923eaa0 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Nov 4 14:20:17 2009 +0000 + + Xming: Replace all the uses of deprecated functions in hw/xwin with current ones + + Replace uses of LookupIDByType() and SecurityLookupIDByType() + with dixLookupResourceByType() + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 2a38f7c0dbc890e6408eee143d77719f265d583d +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Jun 19 21:12:55 2009 +0100 + + Cygwin/X: Remove a couple of extraneous '\n' in logged version info + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 56658fc06cb773ed20ef1b23a3fe918c0d3b36bb +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Oct 15 22:40:02 2009 -0500 + + Set default font path with fontutil 1.1 and fontpath.d + + Look for $sysconfdir/X11/fontpath.d and, if it exists, set it to the + default font path as a catalogue: entry. Based on app/xfs commit + c66a46e35ae40a23ad9acee838ab42300eddbd67. + + Otherwise, use the font-util 1.1 macros to determine the system + fontrootdir and standard subdirectories, or let the user configure it + and the subdirectories themselves. + + This adds a build-time (or at least an autoconf/autogen time) dependency + on font-util, and changes the --with-fontdir argument to --with-fontrootdir. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Alan Coopersmith <alan.coopersmith-xsfywfwIY+M@public.gmane.org> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit c7d1319872e0ae0b7d945e9af8c4027ee5aa2055 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 9 11:12:22 2009 -0500 + + randr: Fill in errorValue when verifying outputs/crtcs/modes + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d85ab6b6483d6ca7d9d22298d05ed1fa3076b042 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Oct 13 10:15:00 2009 +1000 + + loader: actually stat something that has some chance of existing. (v2) + + FindModuleInSubdir seems to expect a / at the end of the subdir its + finding for, so we add the / early, the stat will fail if its + not a subdir, I'm leaving the S_ISDIR in just in case there is another + reason it could return 0. This does look a bit silly in strace + but it seems to work fine. + + I have a very intermittent issue where drivers loses its / that + I've been seeing on/off for a while, this may or may not fix it. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a5e59230de3abafda9cd9d571cea192897155a14 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 5 13:44:30 2009 -0800 + + randr: Turn on ModeDebug during server setup + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c61e77c77ca309f3676370992f41867807ed0c67 +Author: Matt Turner <mattst88@gmail.com> +Date: Thu Nov 5 22:40:03 2009 -0800 + + Remove lnx_font.c and lnx.h + + I couldn't find any version of the X xserver that ever used lnx_font.c + so let's delete it. I tried contacting its author, Egbert, multiple + times on IRC and email [*] but never got any response. It also hasn't + been seriously touched since January 2005. + + [*] http://lists.x.org/archives/xorg-devel/2009-October/002855.html + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 15ffe9f51b122494a2b292b3ab1f199d3e81600c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Nov 5 18:28:28 2009 -0800 + + configure.ac: Notify user about which SHA1 implementation is being used + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 6b109919f6e1593b27b0760bb56a65b43fb86ea4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Nov 5 18:13:07 2009 -0800 + + SHA1: Add support for Common Crypto + + libSystem on darwin can handle SHA1 computation without needing to pull in + OpenSSL. See CC_crypto(3) + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 840a68dc5e3b4d285894f86df2a8c41fca5a4bec +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 4 18:39:16 2009 -0800 + + XQuartz: Cleanup X11Controller.m compilation warnings. + + Declare X11Controller as implementing NSTableViewDataSource. + Use selectRowIndexes:byExtendingSelection instead of selectRow:byExtendingSelection + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 0e3ad44c3b05cbe7b1d8f5ce7949fec3c7ae2e7c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 4 18:15:08 2009 -0800 + + XQuartz: Use dixLookupResourceByType instead of LookupIDByType + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 069fc6ce0a0e7f2c418e11941568ffcc52b6b331 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 4 16:18:06 2009 -0800 + + XQuartz: Don't weed out duplicates in generated keymap + + There seems to be an issue in the 1.5+ server where shift-space does not + produce a space when 'keycode 57 = space' but it does when 'keycode 57 = space + space' + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 6d6e8fb27f00f0c3128cef624b39a60aa754fdc8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 4 13:34:20 2009 -0800 + + XQuartz: Controller thread launches clients + + This avoids a memory leak due to no active auto-release pool on the server thread. + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit f7b375bd141d0cf1e3add5443a5838dd8f554ef6 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 5 11:42:34 2009 -0800 + + Enable XF86PM on all Solaris platforms, not just x86/x64 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f77262513ea17401092479e17ad20fc0eb91ffb5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 5 11:42:33 2009 -0800 + + Use $(MAKE) instead of "make" to build Solaris inline assembly + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 964040764387d89ef64324cfbee31872ee6ce41c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Nov 4 15:35:37 2009 +0200 + + EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_driver + + It crash the server when the drawable is 32 bit and the framebuffer is 16. + + This is pretty much a copy-past from commit 8e873185. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7442f3355ab8f0bb2b1a270da18c65d8d315d4dd +Merge: 0573042 7897b6c +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 4 08:55:20 2009 -0800 + + Merge remote branch 'jeremyhu/master' + +commit 0573042cddb6f9942e408687a16c6842e62a8bfa +Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> +Date: Wed Nov 4 15:59:30 2009 +0200 + + dix: Fixes a memory leak when a cursor resource is released. + + Just open and close a client that creates cursors in order to + reproduce. In the problem case bits->refcnt is -1 and therefore + bits->devPrivates is never released. + + Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7897b6c2d41bccb72c19418674c3526ecce29515 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 27 18:00:48 2009 -0700 + + dix: Properly detect if the other device is frozen + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + +commit 5e79976c13c5b94b12392b493846ca26be11750b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 3 16:35:27 2009 -0800 + + XQuartz: Run xmodmap after programatically updating the keymap. + + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + Signed-off-by: Martin Otte <otte@duke.edu> + +commit 412c56ef3332d09efbd861e41c3e985f44729729 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Nov 1 22:08:40 2009 +0100 + + exa: remove some outdated comment + + - This comment is still in exa_driver.c and there it makes sense. + + Signed-off-by: Maarten Maathuis <madman2003@gmail.com> + Acked-by: Michel Dänzer <michel@daenzer.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 48b8c076a7b7dbbddfc472e8c6e5251a0b174cbc +Author: Matthieu Herrb <matthieu@laas.fr> +Date: Mon Nov 2 11:11:24 2009 +0100 + + add libc as a choice for SHA1 implementation + + On Sun, Nov 01, 2009 at 02:54:13PM -0800, Keith Packard wrote: + > Excerpts from Matthieu Herrb's message of Sun Nov 01 09:34:35 -0800 2009: + > + > > +AC_CHECK_FUNCS([SHA1Init], [HAVE_LIBC_SHA1=yes]) + > + > I'd suggest AC_CHECK_FUNC instead; as far as I can tell, AC_CHECK_FUNCS + > will also define HAVE_SHA1INIT. Also, can you use HAVE_LIBC_SHA1 + > consistently rather than having two separate names (HAVE_LIBC_SHA1 and + > HAVE_SHA1_IN_LIBC)? Yes, I know one is a preprocessor symbol and the + > other is a cpp shell variable, but I think that will work anyway. + > + New version taking you comments into account. + + From: Matthieu Herrb <matthieu.herrb@laas.fr> + Date: Sun, 1 Nov 2009 18:19:27 +0100 + Subject: [PATCH] Add a probe for SHA1 functions in libc in *BSD. + + The interface is the same as the one in libmd. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit da923d0bc15e99a8ed1986bd6f5df37f7af7284b +Author: Matt Turner <mattst88@gmail.com> +Date: Sun Nov 1 14:30:48 2009 -0500 + + Make sys.c use unaligned access functions provided in compiler. + + Favorite deleted line was definitely + /* to cope with broken egcs-1.1.2 :-(((( */ + + Signed-off-by: Matt Turner <mattst88@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d30637339963950910e5f5fb755b8465ac7dddb4 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu Oct 29 11:46:22 2009 -0700 + + Supply all code using dl*() with DLOPEN_LIBS + + Previously DLOPEN_LIBS was managed in top-level configure.ac. + Instead bundle it with the code using dl*() functions to + avoid breakages in uncommon configurations. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ec98d7fc78efefcf9fc61492529157c0d289c3f2 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Sep 21 10:23:16 2009 -0400 + + EDID: Extend the HDTV hack to handle "1368x769" + + Hate televisions so much. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 7c0803f555782dbf451b7c79112d7deae02e5c9f +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 28 15:44:37 2009 -0400 + + modes: Fix duplicate detection, and do it more consistently + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit ba2d39dd5428cb5922b797a1d4ea45b859412b40 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 26 15:10:30 2009 -0400 + + modes: De-duplicate a clock range check. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 25236d19e6ef07fcb2c71569f1b7b0c12810834a +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 26 14:49:57 2009 -0400 + + EDID: Fix interlaced detailed timings to be frame size, not field size + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit fb86433d897c116315cc7994390d11ac2f577511 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 26 14:04:23 2009 -0400 + + modes: Decorate interlaced mode names with a trailing 'i' + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit fc2ec95664d55f45f77f1ebb039a7c17a1fcdaa3 +Author: Ma Ling <ling.ma@intel.com> +Date: Wed Feb 18 17:41:26 2009 +0800 + + EDID: CEA extension support + + Reviewed-by: Adam Jackson <ajax@redhat.com> + +commit fab74d1081270fb8f1d231e6e10d10aa33e164da +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 28 17:48:19 2009 -0700 + + Suppress certain GCC warnings in auto-generated code. + + - Don't warn for references to deprecated functions in xorg_symbols. + - Ignore functions generated by gl_apitemp.py that are never used. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 239435875d6a92ed31731b500a992a3af0943594 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 28 17:48:18 2009 -0700 + + Don't cast double to int: use default conversions or explicitly round. + + GCC warns about casting a double return value to int. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit e8c48fd8f7aab54327b0091cd17c60235ae27168 +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 28 17:48:17 2009 -0700 + + Suppress GCC warnings like "the address of `u1' will always evaluate as `true'". + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 662594aeff9d1767316f08600949c73ac5060d18 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu Oct 29 00:40:48 2009 +0600 + + kdrive: Grab evdev mouse/keyboard devices when X server is active + + Input events are directed to both vt and input devices by default. + Unless input devices are grabbed, keyboard events fill it vt buffers + and cause spontaneous wakeups in kernel tty layer when buffers are full. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 83d520d86c888f2c8a4abb18b7a8858d568aa18f +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 28 16:45:44 2009 -0700 + + Add video driver flag to indicate that console access is not needed. + + Existing video drivers will get the console enabled by default. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 25979c46b467847ccb54f5c86a1be6b9c303c99a +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 28 16:35:28 2009 -0700 + + Alloc/free drawables array for each ProcPanoramiXShmGetImage call. + + Updates my previous patch, b422b532f3dcab54c53f61a66f2ad76059d1874a. + keithp recommended against allocating the drawables array globally, but my + updated patch with that fixed isn't the patch that landed. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 757c11630d5999ad13dcac79191429badc92a3a6 +Author: Tormod Volden <lists.tormod@gmail.com> +Date: Wed Oct 28 23:10:43 2009 +0100 + + xfree86: Fix description of DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE + + The message ending up in the log is misleading as to what the quirk + actually does: It ignores the sizes in the detailed timings and + replaces them with the display "Max Image Size". + + Signed-off-by: Tormod Volden <debian.tormod@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ccf4a69db747b000aee09072aac0a2891bde139a +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Thu Oct 29 01:54:00 2009 +0600 + + os: Add libsha1 as a choice of SHA1 implementation + + There are small systems which don't need OpenSSL or gcrypt. + Add libsha1 (http://github.com/dottedmag/libsha1) as an alternative + small SHA1 implementation. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8613e4b0eb04150b1e377871f02b164be5d001e9 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Wed Oct 28 11:44:27 2009 -0700 + + Add missing DLOPEN_LIBS to kdrive compilation flags + + Xfbdev failed to build due to dladdr being used by xorg_backtrace. + Explicitly add DLOPEN_LIBS to KDRIVE_LIBS as there does not + seem to be a better place for it. + + Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit deb72fc61464250af8185dab2da8ee09f13c55d8 +Merge: 55f4c80 a60e676 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 28 10:54:13 2009 -0700 + + Merge remote branch 'jcristau/sha1' + +commit 55f4c80a4c891b355a99e6a05978ca945397c5cc +Author: Hans Nieser <hnsr@xs4all.nl> +Date: Wed Oct 28 06:59:40 2009 +0100 + + Xinput: allow non-integer values again for Constant- and AdaptiveDeceleration + + This was initially fixed by commit 3932a848572f4eaf8b7f1d91d9b74aeafab069a2 + but then (presumably not intentionally) undone by commit + 1d54479cb3c8b4f75b7564f8b5e1c5da940b20f4 . + + Signed-off-by: Hans Nieser <hnsr@xs4all.nl> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 50a5c32430a5267f2a05656d2417f9a8a44d8b97 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Oct 23 19:32:42 2009 +0100 + + dmx: Correctly compute DMXGetScreenAttributes reply length + + Correctly allow for excess length of DMXGetScreenAttributes reply + over standard 32 byte reply in addition to the displayName string + when computing the length of reply + + http://bugs.freedesktop.org/show_bug.cgi?id=24685 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9a2f6135bfb0f12ec28f304c97917d2f7c64db05 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 23 10:04:57 2009 +0900 + + DRI2: Report the correct extension minor version + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d886008c96cd16f735f54dace070cb00b23c6f44 +Author: Marcin Baczyński <marbacz@gmail.com> +Date: Thu Oct 22 14:43:25 2009 +0200 + + Kill compilation warnings. + + Signed-off-by: Marcin Baczyński <marbacz@gmail.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 15b30fde179cba3877182cd51b0f870ef29ffaee +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 22 17:29:01 2009 -0400 + + dix: Fix up colormap fixup. + + FindClientResourcesByType() will walk all colormaps on all screens; we + only want to fix up the current screen. Otherwise, screens > 0 will + have the visual pointers for their colormaps pointing off into space. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 3785475a78636eb6547ef9e46be9e009c7cf7800 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 23 09:03:39 2009 +0900 + + Bump to 1.7.99.2 (unreleased) + +commit 909df9beb3ddd02632f36ae682537280a6a8e5b4 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Oct 20 12:57:05 2009 +0100 + + Resolve an inconsistency between libX11 and Xserver over GetModifierMapping + + libX11 ModMap.c believes that GetModifierMapping can never return an error + + Xserver devices.c believes that GetModifierMapping can return an error if + the ModMap couldn't be generated + + According to the protocol document I have, libX11 is right, so adjust the + server to send back an empty modmap if one couldn't be made... + + http://bugs.freedesktop.org/show_bug.cgi?id=24621 + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9c48862ac1ac119b6cfb7e376533f53af6a857f4 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 22 01:12:03 2009 +0900 + + Bump version to 1.7.99.1 + + This is a development snapshot for 1.8. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 26f4d8a2c12ff06c4beb06842cd8d9c0d9ddd4aa +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 22 01:04:42 2009 +0900 + + Make sure dmx docs are built for distribution. + + Ok, dmx docs are driving me slightly nuts. We probably shouldn't + include the built versions in the tarball, but we do, so this is an + attempt to make that work by having both the 'all' and 'dist' targets + depends on the doxygen output. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4114854893ff57a1be525ec099a4b33e5f9963b1 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 22 00:17:37 2009 +0900 + + Don't attempt to build hw/kdrive/sdl/Makefile anymore + + With sdl removed, there's no way to build the sdl Makefile. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4d333c5121818754356853724333eadec2dcd18c +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 22 00:16:12 2009 +0900 + + Always check for doxygen so that distcheck gets dmx docs + + make distcheck wants the built dmx documentation so that users don't + have to install doxygen. This means that even if dmx isn't built, the + docs need to be so that the tarball can include them. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7e92bac5f769aca99bd20e21fe2811f0480b647b +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 22 00:00:35 2009 +0900 + + Make sure HAVE_DOXYGEN is defined when not building dmx + + The DMX docs are build using doxygen if present, so configure.ac + checks to see if that is available. However, when not building dmx + (the default), this conditional must still be defined to make automake + happy. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1228e2d052f0bb98175c55c194340773b5fedb40 +Merge: 08e7f62 52bc6d9 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 21 22:46:53 2009 +0900 + + Merge remote branch 'whot/master' + +commit 08e7f62faf72540cb3a6f1023024c145f7fa1a23 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 21 16:46:55 2009 +0900 + + Fix 'distcheck' to use host xkb files but install to build dir + + 'make distcheck' needs to read xkb files and write out compiled + versions as a part of the 'make check' phase. This patch passes + suitable options to the configure stage of the distcheck process to + read xkb files from the system location and write them to the + distcheck _inst directory. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 52bc6d944946e66ea2cc685feaeea40bb496ea83 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 16 11:03:09 2009 +1000 + + kdrive: Purge Xsdl + + From the original Xsdl commit: + "sdl x server so that we can x-on-x the fb stuff for ease of debugging. if + anyone uses this in production, a big scary monster will eat them. + hrm, perhaps i should make it have a --i-know-what-i'm-doing + param that it doens't start without, heh" + + That should be reason enough to not spend time maintaing it. Also, no more + elephants. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f713f447a2110718dfc091380699362d76f0cd6c +Author: Lee Leahu <freedesktop-bugs@dyweni.com> +Date: Mon Oct 19 15:43:59 2009 -0500 + + dmxDestroyWindow() - must call the X's native DetroyWindow() + + Don't really know why this section was disabled, but without it, + certain pPicture resources do not get free'd until later in the + FreeClientResources() process after the screen has been free'd - + resulting in seg fault. + + With this patch, all resources normally free'd using vanilla X are + now also being freed correctly by Xdmx. + + https://bugs.freedesktop.org/show_bug.cgi?id=24576 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 664a8e37fd83141974b772980f680b94e48b4f87 +Author: Lee Leahu <freedesktop-bugs@dyweni.com> +Date: Sat Oct 17 00:45:44 2009 -0500 + + dmx: when setting up device axis, use the correct counter number + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 010d5e28655d619693632938e9e4325eef938295 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 16 10:01:13 2009 +1000 + + dmx: remove doxygen-generated files. + + These can be recreated by simply running 'doxygen doxygen.conf' in + hw/dmx/doc. Some of the files do not exist anymore, these have been removed. + Some other files have a different naming scheme. + Doxygen warnings about missing links fixed, two warnings remain: + + /home/whot/xorg/xserver/hw/dmx/dmxwindow.c:142: Warning: explicit link + request to 'dmxConfigureRootWindow' could not be resolved + /home/whot/xorg/xserver/hw/dmx/dmxwindow.c:119: Warning: explicit link + request to 'dmxConfigureScreenWindow()' could not be resolved + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ff3e171568c8b604fc5eacd5f7e9b7ee9417f172 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 16 10:26:21 2009 +1000 + + xkb: don't conditionally include xkb-config.h. + + If HAVE_XKB_CONFIG_H is ever undefined, we fail to build anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0b9dbd4bf2d1061514bebd28648538a5fc0b60e6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 16 08:24:37 2009 +1000 + + Use the default XKB settings for dmx and kdrive. + + Drop the dmx-specific defines, there's no reason to have separate ones + considering they're about as hardcoded as the default rules anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e08d8a2b043e5be821c5e8b2dbf37b09102b5d01 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 24 11:25:28 2009 +1000 + + kdrive: silence tslib compiler warnings + + tslib.c: In function 'TslibInit': + tslib.c:157: warning: unused variable 'tsDev' + tslib.c:156: warning: unused variable 'inputent' + tslib.c:155: warning: unused variable 'inputdir' + tslib.c:154: warning: unused variable 'i' + tslib.c:154: warning: unused variable 'fd' + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 522ca8179ad2b2b935993f08c9382cd5ad1d8b2f +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Tue Oct 20 04:18:01 2009 +0700 + + Remove unused LinuxFindPci and LinuxGetPciCfg + + These two functions are not referenced from inside xserver. + Remove now-empty klinux.h too. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 63f4bf39170eb2262617ef2dc95fd6d337b9dad5 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Oct 19 13:07:26 2009 +1000 + + Fix make dist after 78c87bdad1feab91c2a39e01513b4b0826665f06 + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2bd71a6db241924bd17ac9dd4aa38e7e563ee5c1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 16 22:29:26 2009 -0700 + + Fix segfault when -extension XKEYBOARD is passed on the command line + + Users should be told they can't disable XKB or XInput via error messages, + not core dumps. + + Reported by T`2 on #xorg irc + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a32b2420d85f076282721afe005e85fff7d9837e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Oct 15 13:50:36 2009 +1000 + + kdrive: fix Xfake build by removing the old keysym stuff + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7c31dd5db8b43c7796bf97a07e08213af5afd2ae +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Oct 15 04:24:25 2009 -0500 + + Remove CopyISOLatin1Lowered + + This function was moved verbatim into libXfont-1.4, and it is not used + by the server or any drivers. Exporting it in both places leads to + multiple definition linking errors on Cygwin, where we need to use a + static libXfont due to poor weak-symbol handling. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9bc4e88d84daf0f4faf0599b575675e74c75f4b8 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Oct 15 01:53:43 2009 -0500 + + Define ddxBeforeReset stubs in platform-neutral DDXs + + XWin uses ddxBeforeReset, which is called in DIX. Other DDXs need to + define these in order to avoid an undefined symbol error at link time + when building alongside XWin. Xnest and Xvfb already provide empty stubs; + this does the same for Xdmx and the platform-neutral KDrive servers. + + Also add a prototype to avoid a warning in all DDXs. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a2f27b97900f335cd5f6a3e5bf8fa1d0ec9eb9ac +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Oct 15 01:53:42 2009 -0500 + + Remove duplicates from Xfake_LDADD + + KDRIVE_LIBS already contains the libs in XSERVER_LIBS, so linking against + both leads to multiple-definition errors when linking on Cygwin. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ed4c6bc79a797830895ad6c3601318b2d1c4bdcb +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Oct 15 01:53:41 2009 -0500 + + Fix XWIN_LIBS definition + + Move XWIN_LIBS from XWIN=auto conditional to XWIN=yes conditional, + otherwise the build breaks if an explicit --enable-xwin is passed to + configure. + + Also remove obsolete library values from the definition. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit bcd0c02cfd0707b5f8b1ca91dfbe4412df2c643e +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Oct 15 01:53:40 2009 -0500 + + Install SDK pkg-config and aclocal files only if XORG + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 264ce9e8360374b3a43442c8bdea08abde705446 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 14 20:33:53 2009 -0400 + + xselinux: Use the now-exported IsPointerDevice() instead of a copy. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 0ae1632be045bfbb288bb57190c830f94247460f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 14 20:32:28 2009 -0400 + + dix: Export IsPointerDevice() and IsKeyboardDevice(). + + Makes the functions available to extmod for extensions to call. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 6c2ae5fec552366e11ad64a27626eb5dec4becf0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 22 13:31:49 2009 -0700 + + xselinux: switch from x_device to separate x_pointer and x_keyboard classes. + + This will allow separate controls over pointer and keyboard without having + to relabel the devices to separate types. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 4be354c4c2da5168b302601b91bd80cfaca7e193 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 22 13:18:44 2009 -0700 + + Remove some debug messages that trigger on XACE event delivery failure. + + It is normal for XACE to deny an event delivery, so these log messages + shouldn't trigger when that happens. Just drop them for now. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit c4ffce4dc84a0a9d134a59b7e7765c99ed767e53 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 22 13:13:03 2009 -0700 + + xace: Relax permissions on XkbGetState from Read to Getattr. + + This request is used to get the current keyboard group and is called from + GTK. It does not return an actual keymap (aside from modifiers) so it + should be safe to relax the permission on it. However it does return + button state information which should be controlled through a separate + pointer Read check. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 0ff28319906eeb3f236acd72201c416ce01f2c6e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 15 19:41:04 2009 -0400 + + xselinux: Stop special-casing QueryPointer access checks. + + XACE has been changed to not return BadAccess on device read failures. + Thus, no need for this workaround code. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 8502c06e19a4c00bf1311f54f9a365ee9e026e97 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 15 19:29:34 2009 -0400 + + xace: Fake return values on denials in input polling requests. + + Instead of returning BadAccess when "read" permission is denied + on a device, falsify the device state (buttons down, keys pressed). + This is nicer to applications, but may still have undesired side + effects. The long-term solution is not to use these requests in + event-driven code! + + Requests affected: QueryPointer, QueryKeymap, XiQueryDevice. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 0493935691e925ae137af7636fa15befa76c8b45 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 31 21:20:53 2009 -0400 + + xselinux: Factor out some dynamic array code into common helpers. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit ae8891ba0b63bfe6941a324e201d9ab7c645c0f3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 31 18:46:23 2009 -0400 + + xselinux: refactor extension code into smaller files. + + New files: + xselinux_ext.c: Extension init and request handlers. + xselinux_hooks.c: XACE hook functions and other callbacks. + xselinux_label.c: Object security-labeling code. + xselinuxint.h: Shared internal functions. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit a60e676f1fd243c78859440b87652f523d3f2ec1 +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Oct 14 23:51:22 2009 +0200 + + Add libgcrypt as an option for SHA1 + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + +commit d2a6a395435919aff8943285f9cbfe6569a9728f +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Oct 14 23:30:55 2009 +0200 + + configure: add --with-sha1={libmd,libcrypto} option + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + +commit 55516094947dd78ad2734bb784a2fb109b64c990 +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Oct 14 23:20:44 2009 +0200 + + Move SHA1 computation from render/glyph.c to os/ + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Rémi Cardona <remi@gentoo.org> + +commit 22b38f513c93c2f2aea5909878c3c9acae7d35c1 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Oct 3 12:44:50 2009 +0100 + + Cygwin/X: Avoid a potential null pointer dereference before input initialization + + Avoid a null pointer dereference if WM_MOUSEMOVE occurred before + the input device had been initialized (a timing sensitive bug + occassionally seen during initialization) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 1b0dfd8dee639870725d3bd9b70c3bd589d09e5a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Jul 21 02:23:21 2009 +0100 + + Cygwin/X: Make -logverbose affect the verbosity of logging to the log file + + Make -logverbose affect the verbosity of logging to the log file, not just the + verbosity of logging to the console + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Reviewed-by: Colin Harrison <colin.harrison@virgin.net> + +commit 83d120b90482d356be730f63aead0f8e44a4e846 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Thu Oct 1 14:47:22 2009 +0100 + + Xming: Fix various 'ISO C90 forbids mixed declarations and code' warnings + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 78c87bdad1feab91c2a39e01513b4b0826665f06 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Sep 25 17:49:59 2009 +0100 + + Xming: Remove unused X-boxed icon resource + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit fdf7f7e95c852734c620f58df408a324902172cf +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Sep 25 17:46:40 2009 +0100 + + Xming: update .rc file + + Remove the obsolete DISCARDABLE flag in the .rc file + Replace the obsolete DIALOG resource with DIALOGEX in the .rc file + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 5ddfd9d0898629627e8ab10e65ea2e082be3af37 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sat Oct 3 13:07:23 2009 +0100 + + Cygwin/X: Don't build rootless extension code unless we need it + + Only try to build rootless extension code if we really need it (i.e. mwextwm mode is enabled) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 25344ba7f7845654364d62bf15322b3b79465bd9 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Tue Oct 13 20:14:58 2009 -0500 + + dolt: add Cygwin to supported platforms + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6e158003e80534ce007290f75c89d698aec1d00b +Merge: 2b14e14 5e762f0 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 13 18:40:42 2009 -0700 + + Merge remote branch 'mattst88/master' + + * mattst88/master: + [alpha] assume we have __NR_pciconfig_iobase + [alpha] don't return from void functions + Fix undefined symbols on alpha + Fix breakage on alpha caused by c7680befe5ae + Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus" + +commit 5e762f0e2f203b5121a3de3b9af3c8981b31a77f +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Oct 13 20:42:14 2009 -0400 + + [alpha] assume we have __NR_pciconfig_iobase + + The code path if we didn't have support has been broken since before we + switched to git. + + The pciconfig_iobase syscall has been supported since 2000. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 46785c04bca16f495af3ed8d685aee939a1a8f39 +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Oct 13 20:40:59 2009 -0400 + + [alpha] don't return from void functions + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 2b14e142039193ea854a02706662204f4f5f6db8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 13 12:54:56 2009 -0700 + + Rootless: src drawable window can now be NULL + + Fix a possible crash when pSrc->pDrawable is NULL. + + Signed-off-by: Colin Harrison <colin.harrison@virgin.net> + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 5b91dfac6fbdf35288a4558638d4923e230ab8d3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 13 12:54:11 2009 -0700 + + Rootless: Abstract some of the Xplugin specific stuff which has crept into rootlessWindow.c + + The rootless extension now directly calls some Xplugin functions, and relies + on types defined in Xplugin.h, which isn't very abstracted :-) + + This patch is a start at abstracting some of the Xplugin specific stuff which + has crept into rootlessWindow.c. This has been done in a pretty mindless fashion, + without much thought as to if the additions to the generic rootless interface are + the correct ones + + There is some confusion as to if RootlesscolormapCallback() returns a Bool or + xp_error_enum value (not so abstact), but I have no way of checking, of finding + out if Xplugin actually checks the result :-) + + Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 72f5874434c0c015b671c492c1318f35f1793668 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Oct 13 13:15:05 2009 +1000 + + dix: extend IsPointerDevice check to valuator-only devices. + + A device with valuators but no keys is definitely a pointer device and needs + to be attached to the VCP. Otherwise, the class copying happens on the VCK + and the VCP isn't updated with the events that are to be sent through it. + This addresses the trigger for #24441, not the actual issue. + Jury is still out on valuator+key devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1088073b11ed488c0df45af3867b900ef93c6fe1 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Oct 9 11:31:44 2009 +0200 + + EXA: Fix exaTryDriverSolidFill() for solid source pictures. + + Solid pictures have a NULL pFormat field, but their format is always + PICT_a8r8g8b8. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 55305cf8db7787883bc80b7348eb626e609626f8 +Author: Ben Skeggs <bskeggs@redhat.com> +Date: Fri Oct 9 16:08:15 2009 -0700 + + EXA: fix exaGetRGBAFromPixel to not loop forever on PICT_a8 picture + + Easily reproducible by running "rendercheck -t fill". + + It should be safe to just test against rbits for all colour components + as we should always have values for r/g/bbits for PICT_FORMAT_COLOR + formats. + + Signed-off-by: Ben Skeggs <bskeggs@redhat.com> + Signed-off-by: Michel Dänzer <daenzer@vmware + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b375be9285c40467578fac2f1360c29a75306ab4 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Oct 9 11:31:46 2009 +0200 + + composite: Revert changes from adding support for BGRA picture formats. + + They were aimed towards a since abandoned approach for making radeon KMS work + on big endian machines, and Aaron Plattner pointed out that they break the + Composite extension when the X server runs in 16bpp. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + Tested-by: Aaron Plattner <aplattner@nvidia.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c0a1bb511a4629bf5683d8a710dc4a1c577a5d44 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Oct 7 22:10:55 2009 -0700 + + Fix make warning: overriding commands for target `dix.O' + + Not only does automake generate unnecessary rules for dix.O on platforms + for which SPECIAL_DTRACE_OBJECTS is false, it generates duplicate sets + when "if SPECIAL_DTRACE_OBJECTS" is nested inside "if XSERVER_DTRACE" + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit b0dd6be2c8703f7062d45ac9fd646550c7d54e3b +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Oct 8 13:38:44 2009 +1100 + + Cast small-int values through intptr_t when passed as pointers + + On 64-bit systems, int and pointers don't have the same size, so GCC gives + warnings about casts between int and pointer types. However, in the cases + covered by this patch, it's always a value that fits in int being stored + temporarily as a pointer and then converted back later, which is safe. + Casting through the pointer-sized integer type intptr_t convinces the + compiler that this is OK. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit b680a89262efcfef4644adb4a61ae42ea0db0c93 +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Oct 8 13:38:01 2009 +1100 + + Fix GCC warnings in xorg_backtrace + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 9bf2ff4faf730913de3073f346646a8727be41d4 +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Oct 8 13:36:44 2009 +1100 + + Fix "possibly uninitialized" warnings in glx + + In both functions, "answer" was uninitialized if "compsize" was 0, but in + that case __GLX_SEND_VOID_ARRAY(compsize) results in a call to + WriteToClient for 0 bytes, which returns immediately without examining the + "answer" argument. So initializing to a null pointer is as good as + anything else. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit b422b532f3dcab54c53f61a66f2ad76059d1874a +Author: Jamey Sharp <jamey@minilop.net> +Date: Thu Oct 8 13:29:27 2009 +1100 + + Remove static MAXSCREENS limit from Xext/shm.c + + Dynamically allocate per-screen data in the SHM extension, instead of + having a single static-sized array. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 4df3e8c8053d9d4b3043f339a73d0de97020d884 +Author: Martin Ettl <ettl.martin@gmx.de> +Date: Thu Oct 8 13:27:30 2009 +1100 + + Resource leakage: 0 is a valid file descriptor + + When testing if an fd is valid, the required construct is >= 0, not > 0. + + [Daniel: Fixed up the Linux MTRR case as well.] + + Signed-off-by: Martin Ettl <ettl.martin@gmx.de> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 4151a13c80f3afa43f88afcf19a7aeb16dace93a +Author: Francisco Jerez <currojerez@riseup.net> +Date: Mon Oct 5 02:39:03 2009 +0200 + + dix: Fix a double free in dixFreePrivates. + + It can be reproduced when the server is regenerated and for some + reason the private keys are reassigned in a different order: a + manually allocated private may get an index formerly used by a + preallocated private. In that case it will first be manually freed and + then again by dixFreePrivates, as items[i].size was never zeroed + out. Do it in dixResetPrivates. + + Signed-off-by: Francisco Jerez <currojerez@riseup.net> + Acked-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 34eddbbb73bb16395dba0818247909c1b4bee4c2 +Author: Michael Cree <mcree@orcon.net.nz> +Date: Wed Oct 7 18:33:29 2009 -0400 + + Fix undefined symbols on alpha + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 44efcdde501d54ca9c3e33ab5b1f699956fc3f9f +Author: Jamey Sharp <jamey@minilop.net> +Date: Wed Oct 7 09:07:03 2009 -0700 + + Fix overlay detection when matching Xv adaptors across screens. + + Signed-off-by: Jamey Sharp <jamey@minilop.net> + Acked-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 68304215e25876ee639015969b4f07e1c9c515e0 +Merge: 6676f49 315aaef +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 6 22:41:42 2009 -0700 + + Merge remote branch 'alanc/master' + + Conflicts: + configure.ac + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 315aaef55750a863c08a16ad9120ffb76f9b48e0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 2 21:54:53 2009 -0700 + + Use $(AM_V_GEN) to silence more commands when AM_SILENT_RULES is active + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Eric Anholt <eric@anholt.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2e294380b64b6362173d0590c4292f290e50af50 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 2 16:51:24 2009 -0700 + + Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Eric Anholt <eric@anholt.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4b0911565d18b1aefca564315d0f1b9b4a17aa65 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Oct 5 16:52:19 2009 -0700 + + Add platform tests for Dtrace linker magic + + Replaces special handling for Xquartz DDX and scales better to handling + the multiple platforms that now have some level of Dtrace support available. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 8c51b886400c5962b31ff565771be1b01a3ca8fb +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Oct 6 16:08:42 2009 +0200 + + configure: quote argument to m4_pattern_forbid + + Without this, configure spits out + ../configure: line 15460: ac_fn_c_check_member: command not found + + Also anchor the pattern to make it stricter. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 6ee61578ddb9f880ef12bbe9c3671d7dd53f2809 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Oct 5 17:27:27 2009 -0700 + + Remove shave now that automake-1.11 has AM_SILENT_RULES + + Revert "Add shave so that we can see the steaming piles of warnings generated." + This reverts commit 181cc08c8908a119fc403f970dea8cc98d3e0b9b. + + shave was left in the xserver 1.7 release/branch to allow developers & + distros time to transition to automake-1.11. xserver 1.8 series will + require automake-1.11 for silencing build noise. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d5d960f57834f16164457dab2e80290717dbf2cd +Author: Kim Woelders <kim@woelders.dk> +Date: Fri Oct 2 19:31:15 2009 +0200 + + render: Fix clip region translation in miClipPictureSrc(). + + Signed-off-by: Kim Woelders <kim@woelders.dk> + Reviewed-by: Soren Sandmann Pedersen <sandmann@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d2118c8ca94fc7bcb8e0de547e63cf022f53a8a9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 5 15:31:54 2009 +1000 + + xfree86: remove log-spamming DebugF + + All input drivers use xf86PostKeyEventP indirectly now and have been since + it exists. I guess that qualifies it as tested - no need to spam the logs. + + Reported-by: Felix Wenk + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit bf116057c7efd43c247c93f2f5d733a5db857cc9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 5 10:44:43 2009 +1000 + + Require libXtst >= 1.0.99.2 and libdmx >= 1.0.99.1 + + libXtst requirement is already implicit since we require xextproto 7.1 and + that doesn't go well with pre 1.0.99.2 versions of libXtst. Nonetheless, + list it explicitly. + + Since d0440275108920f5cb5d630f55fc9a3320c496d3 we require dmxproto 2.2.99.1. + Complementing that is libdmx 1.0.99.1 with the dmxext.h header file. + + Reported-by: Mark Rosenstand + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9625f6d328d6f516520930227b218979309938bc +Author: Matt Turner <mattst88@gmail.com> +Date: Tue Oct 6 20:58:30 2009 -0400 + + Fix breakage on alpha caused by c7680befe5ae + + Pinpointed by by Michael Cree. + + Commit c7680befe5ae removed Jensen support, but at the same time broke + support for dense memory systems. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit aa07957373fd7cbe67458a001e4afd6a7f1ea37f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 28 12:20:03 2009 +1000 + + Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus" + + The vesa driver still uses slowbcopy_frombus and slowbcopy_tobus. + + This reverts commit 5ef53a94ce4e48e11de26290cd677266308640c8. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6676f49e34f8db7ef5767a6dbf6c2a4d2087f79c +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Oct 6 16:08:42 2009 +0200 + + configure: quote argument to m4_pattern_forbid + + Without this, configure spits out + ../configure: line 15460: ac_fn_c_check_member: command not found + + Also anchor the pattern to make it stricter. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit a0363bf7b135d816e73849c91fa53d98fd6072d1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Oct 5 17:27:27 2009 -0700 + + Remove shave now that automake-1.11 has AM_SILENT_RULES + + Revert "Add shave so that we can see the steaming piles of warnings generated." + This reverts commit 181cc08c8908a119fc403f970dea8cc98d3e0b9b. + + shave was left in the xserver 1.7 release/branch to allow developers & + distros time to transition to automake-1.11. xserver 1.8 series will + require automake-1.11 for silencing build noise. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit cbc886a3513079c084fb7ce47b87c3e5bba19f3f +Author: Kim Woelders <kim@woelders.dk> +Date: Fri Oct 2 19:31:15 2009 +0200 + + render: Fix clip region translation in miClipPictureSrc(). + + Signed-off-by: Kim Woelders <kim@woelders.dk> + Reviewed-by: Soren Sandmann Pedersen <sandmann@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bd7430a32e63df8cd60352764744076448ee623f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 5 15:31:54 2009 +1000 + + xfree86: remove log-spamming DebugF + + All input drivers use xf86PostKeyEventP indirectly now and have been since + it exists. I guess that qualifies it as tested - no need to spam the logs. + + Reported-by: Felix Wenk + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 1a2dde3335864abfbbc133dbc709f564272dd540 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 2 20:44:19 2009 -0700 + + Set XQUARTZ to no on non-Darwin OS'es + + Fixes build with dtrace probes on Solaris after efacd7bfd08ffc0725de6f639c6afbf3b2f6c9fe + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c629e0fc50dfaffaa40a56709da7f035c289fed2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Oct 5 10:44:43 2009 +1000 + + Require libXtst >= 1.0.99.2 and libdmx >= 1.0.99.1 + + libXtst requirement is already implicit since we require xextproto 7.1 and + that doesn't go well with pre 1.0.99.2 versions of libXtst. Nonetheless, + list it explicitly. + + Since d0440275108920f5cb5d630f55fc9a3320c496d3 we require dmxproto 2.2.99.1. + Complementing that is libdmx 1.0.99.1 with the dmxext.h header file. + + Reported-by: Mark Rosenstand + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 24e640e1fa6cfb3917ba90dcdabf1fadddff20aa +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 2 19:20:24 2009 -0700 + + XQuartz: Fix a possible minor memory leak + +commit c4886fbabc1d8b4054654b227fcad83f58e8e798 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 2 18:58:35 2009 -0700 + + XQuartz: Send mouse location with scroll events. + + This fixes the problem where (0, 0) was sent as the mouse location with scroll + button events causing the event to not reach the client. + +commit 4c6bfa2c09ae2b0cffdf9211a6dfbcaefe0366b5 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Thu Oct 1 10:39:19 2009 -0700 + + GLX: More clearly document the GLX protocol version handling + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 45f447dafded5adfe11b7df3325c2d8f6ae0639b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Oct 1 21:19:11 2009 +1000 + + dix: force a minimum of 0 for screen coordinates. + + Currently the root coordinates may fall into ]-1..0] if the subpixel + remainder is less than 0. Screen coordinates mustn't go below 0, so use + miPointerSetPosition to cap off the remainder if the coordinates are below + 0. + + This is cheating a bit, a more comprehensive solution to deal with subpixels + correctly when crossing screens is needed. For now, this'll do. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Simon Thum <simon.thum@gmx.de> + +commit 64fe5784b49347e1fd27b0c463be5c16557594c9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Oct 2 09:34:24 2009 +1000 + + configure: if xnest was requested but modules weren't found, fail. + + Tested-by: Xavier Chantry <shiningxc@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Julien Cristau <jcristau@debian.org> + +commit 3ebb82d61c2b56e8f7145443a552a4e913bbfc80 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Oct 1 15:25:55 2009 +1000 + + rotate: drop unwrapping inside block handler. + + Keith has shown half the block handlers wrappers are wrong, also + dynamic wrapping/unwrapping from what I can see will happen after + the drivers, so its really accidental ABI, that we can't change + now without modifing drivers. So be safe for 1.7. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Declared-as-sane-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cb54cf1b3e8c4109541cfb698542c00f2473e731 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Sep 30 11:33:16 2009 +1000 + + glx: fixup deref of null pointer when glx screen init fails. + + I think this is what the original author wanted. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Acked-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 3d7cf468df96c0130a862f0d93fec990b9110c2f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 1 11:58:18 2009 -0700 + + XQuartz: Update version strings to be X11R7.5 and the bundle 2.5.0 + + Is fink really _still_ relying on this X11R7.x version string? + +commit 85b831f701d085e514afcf8a5ce9b11f8a57984e +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Oct 1 17:27:11 2009 +0200 + + xfree86: fix xorg.conf manpage formatting error + +commit 9bc7cbf9c02656982c2525836b5498993f708e02 +Author: Nirbheek Chauhan <nirbheek@gentoo.org> +Date: Tue Sep 29 22:35:06 2009 +0530 + + xkb: check permissions on XKM_OUTPUT_DIR + + Checking just for root is insufficient since that does not guarantee write/read + permissions in XKM_OUTPUT_DIR (for example with sandbox). + + Check if we can write a file, as well as read it later. Otherwise, invoke the + fallback to /tmp + + Signed-off-by: Nirbheek Chauhan <nirbheek@gentoo.org> + Signed-off-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 622fc98fd08aba98369e6933c3ab8c9ff85385d5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Oct 1 10:03:42 2009 +1000 + + render: Fix crash in RenderAddGlyphs (#23645) + + This patch fixes two bugs: + size is calculated as glyph height * padded_width. If the client submits + garbage, this may get above INT_MAX, resulting in a negative size if size is + unsigned. The sanity checks don't trigger for negative sizes and the server + goes and writes into random memory locations. + + If the client submits glyphs with a width or height 0, the destination + pixmap is NULL, causing a null-pointer dereference. Since there's nothing to + composite if the width/height is 0, we might as well skip the whole thing + anyway. + + Tested with Xvfb, Xephyr and Xorg. + + X.Org Bug 23645 <http://bugs.freedesktop.org/show_bug.cgi?id=23645> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit 758ab55d2defc78d0169fd61a7036eb9f889e9e7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Oct 1 15:22:19 2009 +1000 + + render: set the glyph picture to NULL by default. + + In a follow-up patch we may have glyphs with a NULL picture. To cope with + that, always set the pictures for glyphs to NULL at creation time and cope + with cleaning up such glyphs. Also, since compositing a NULL source doesn't + do a lot anyway, skip trying to do so. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit b5fcc5553eb784c9f4826936e839079c0cdee55a +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Oct 1 15:17:11 2009 +1000 + + exa: avoid infinite loops if UTS sw fallbacks. + + The upload in finish access can cause an infinite loop if + UTS returns FALSE in here. + + Fixes fd.o bug #24246. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit db98b26ee145f70e732e2cf4a6ac3de77fdf4adc +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 30 11:40:19 2009 -0700 + + Re-fix DGA removal. + + Removing DGA ended up breaking any drivers calling into the old + xf86DiDGAInit function as it tried to see if DGA was already enabled + and ended up crashing if the VT wasn't completely initialized. Oops. + + Also, if the driver initializes DGA itself, have the DiDGA + initialization overwrite that information as the DiDGA code will call + ReInit on mode detect. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 873467adad479be02cd9cc6b43685919f5612d91 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 30 00:22:02 2009 -0700 + + XQuartz: Set the proper bitmap for key repeats... + + XkbSetRepeatKeys lies and doesn't do what it says it will... + +commit 7bef78e199a4e4f7916be506807513efcd8fd4cb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Sep 29 23:40:47 2009 -0700 + + xkb: Use XkbPerKeyBitArraySize instead of hardcoded value of 32 + +commit 4970666827e65424ee17ccf6341ff84aac974383 +Author: Kim Woelders <kim@woelders.dk> +Date: Tue Sep 29 20:31:45 2009 +0200 + + dix: Fix potential memory corruption in doListFontsWithInfo. + + Signed-off-by: Kim Woelders <kim@woelders.dk> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6ffda5aae75272fabdc27d6f693ae827be119e95 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Sep 29 11:49:09 2009 +1000 + + dix/glx/composite: consolidate visual resize in one place. + + The previous code was copied and in both cases incorrectly fixed + up the colormaps after resizing the visuals, this patch consolidates + the visual resize + colormaps fixups in one place. This version + also consolidates the vid allocation for the DepthPtr inside the + function. + + I'm not 100% sure colormap.[ch] is the correct place for this but + visuals are mostly created in fb and I know thats not the place to + be resizing them. + + Fixes fd.o bug #19470. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ad5c0d9efa47476ed5cf75c82265c73919e468b4 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Tue Sep 29 16:43:43 2009 -0700 + + GLX: Enable GLX 1.4 on DRI2 + + Return the minimum GLX version supported by all screens. Assume that + DRI2 screens have all the required features for GLX 1.4. Assume that + everyone else can only support GLX 1.2. + + Reviewed-by: Kristian Høgsberg <krh@redhat.com> + Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit f11a356bcef1bc0a6440325019d5967b745a42dd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 28 17:05:29 2009 -0700 + + XQuartz: Cleaned up keymap setting for easier maintenance + (cherry picked from commit b9dfed9e88389cbd29406a20d38ee4297638649b) + +commit f3223c71cfc638e695981e527517d48ea00d124d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 28 23:01:59 2009 -0700 + + XQuartz: Remove the redundant xquartz_resetenv_display + unsetenv(DISPLAY) takes care of this for us anyway + (cherry picked from commit d2263645d839c9edeedea0835d26f1f41b37f70e) + +commit 9b98b883227ed23d5470e8de689afeec4a0fd742 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 28 17:47:31 2009 -0700 + + XQuartz: Query the BundleIdentifier from the bundle in X11.bin rather than using the configure option. + + This lets X11.bin drop into any .app ... the Info.plist and Xquartz binary need to have it hardcoded still. + (cherry picked from commit 9ad16b8e50b13eb6d0cd20386d07aa8d7320f671) + +commit 11817a881cb93a89788105d1e575a468f2a8d27c +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Sep 29 08:56:59 2009 +0200 + + Fix ShmPutImage non-ZPixmap case. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23298 . + +commit 19be992d9dc542b61fa3f4fd32a09071c9e64880 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 28 14:18:45 2009 +1000 + + ephyr: if -parent is given, check for a trailing -screen. (#24144) + + If -parent is given, don't open up a new window if -screen is given as well. + The commandline option -screen allows to set the depth of the embedded + Xephry instance, even though width and height are autoscaled on -parent. + + This patch checks for a -screen parameter after -parent and - if one is + found - delays initializing the screen. The parent window id is stored + temporarily but re-set after a -screen argument. + The following command is thus valid: + + Xephyr -parent 1234 -screen 640x480@8 -screen 1024x768 + + It embeds the first 8-bit screen into window 1234 and opens up a new window + for the second screen. Multiple parent arguments are possible, the screens + are embedded in-order. + + X.Org Bug 24144 <http://bugs.freedesktop.org/show_bug.cgi?id=24144> + + Tested-by: Vic Lee + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit efacd7bfd08ffc0725de6f639c6afbf3b2f6c9fe +Author: Ben Byer <bbyer@freedesktop.org> +Date: Sun Sep 27 10:35:53 2009 -0700 + + Add (ok, fix) support for DTrace under OS X + (cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2) + +commit b3415187e92960cbff784108b5a3a8d130dc34c5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 23:09:51 2009 -0700 + + Rootless: Correct border rendering on parent-relative windows + + Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow + (cherry picked from commit cf2e3312cff3f341e9edba8c321a4ca7ffd8748e) + +commit 6df00917cab5c1096070625385fd76ee6c52e0f1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 23:00:59 2009 -0700 + + XQuartz: Fix QuartzSetCursor to match the expected prototype. + (cherry picked from commit dadab5a2279a19dcf709402d7f22f0cd48670db0) + +commit 67a51cd9ef60b4c9f25fdde84f9eb352936c8c67 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 22:57:25 2009 -0700 + + XQuartz: Fix a bunch of compilation warnings about style + (cherry picked from commit 54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8) + +commit 96780eaf32636c94a9cf33f22eb9f01d984ff754 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 22:29:49 2009 -0700 + + XQuartz: Nuke TSM + + It's deprecated in SnowLeopard. Ben and I both have no idea what it is for. It says something about unicode input, but urxvt seems fine taking in unicode, so /shrug... bye. + (cherry picked from commit 29cb904e4de2411a9b6dbe68694954788f0525f7) + +commit 15e15816a2f011d0aeeaff9e394d30a147c973ce +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 22:26:22 2009 -0700 + + XQuartz: Fix inverse map from mode_switch to alt + (cherry picked from commit de6cee11e1c335a0e5f708e7641e81d3cfe52529) + +commit 558d803b2966c2e44345a80e635e091dc3e49f02 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 18:25:57 2009 -0700 + + XQuartz: Force a keymap resync on the first keypress to workaround XKB mucking with our keymap. + + We need to find a better way to work with XKB on this. + (cherry picked from commit ceaa5c779ceed3de5ea53727649613be3133b24e) + +commit 226b1033b48807fd6871ba626e20ef1411904939 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 17:08:12 2009 -0700 + + XQuartz: Transition from xEvent based mieq to InternalEvent + (cherry picked from commit a3dbde2de87ee4f577748a8c447501a3ea462559) + +commit 0c2731596f27f2cdf5000ba41de37e7eb86ad6f9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 28 15:07:48 2009 +1000 + + Put tests for zero-sized strings in quotes (#24060) + + X.Org Bug 24060 <http://bugs.freedesktop.org/show_bug.cgi?id=24060> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 83023ffd09a84ff48e6b99f57ebad101a00478db +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 28 13:59:25 2009 +1000 + + xfree86: use the DDC size if either width or height of DisplaySize is bogus. + + If either width or height of DisplaySize is invalid, assume that the + configuration is invalid and use the DDC-reported values instead. + + See Comment 9, Bug 9758. + http://bugs.freedesktop.org/show_bug.cgi?id=9758#c9 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dave Airlie <airlied@redhat.com> + +commit f772014c435f56db56520ca13ffa39431684f122 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 23 10:53:51 2009 +1000 + + render: Plug a memory leak in AddGlyph. (#23286) + + AddGlyph was missing the FreePicture() call that DeleteGlyph used, resulting + in a memory leak when more than one Glyph was added in a RenderAddGlyphs + request. + + Since the code in AddGlyph and DeleteGlyph is identical, move into a static + function to avoid such mistakes in the future. + + X.Org Bug 23286 <http://bugs.freedesktop.org/show_bug.cgi?id=23286> + +commit 3db28f92b0c810b452506abbed299a204c90ba0b +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Thu Sep 24 12:57:02 2009 +0200 + + configure: make XNEST default to auto. + + When we're checking whether to build Xnest, we're comparing the + variable to auto but before it never was assigned that. + + Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> + + [Xnest was enabled to yes to increase build exposure and catch compiler + errors early. The requirements to Xnest are quite low and I expect most + developers have them, so Xnext will be enabled on most boxes. Anyone + missing those requires probably doesn't want to build Xnest anyway.] + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 78ad6ca9a97440b74019c00a28144ea7d1e03431 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sun Sep 27 17:30:23 2009 +0200 + + xfree86: Hurd fix + + I hadn't paid attention that the parameters order had changed, here is a + trivial patch, please apply. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit fb7938315bed9d4cb5641ee9acebf78a13bc109e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 27 09:48:43 2009 -0700 + + Xi: Make CopyKeyClass X_HIDDEN to avoid ugly ifdef-fu + (cherry picked from commit 6d436e17a9ae7f4ce8537f3fabc052d4f07ca75f) + +commit a2cd21177859eb45320a94c96dde7d9058ab7650 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 26 23:41:45 2009 -0700 + + XQuartz: Stop checking version numbers of the bundle because CFBundleGetVersionNumber is gimpish + (cherry picked from commit 9f5bdd89608ec12012592ff395b82e954fbb4da8) + +commit fbfbf93405222322571e15e78dea57c8f2755eae +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 26 22:52:39 2009 -0700 + + XQuartz: Add pressure/tilt property labels + (cherry picked from commit 84ea67130ef6b4086042aad6036ce66f93ea3e56) + +commit 65f14840898dd7e9d61d8c966f3ff11ae3e82d4f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 26 22:48:49 2009 -0700 + + XQuartz: Fix a brain-o array indexing problem + + /bop Peter + (cherry picked from commit 494a6b046a258ad83dc98eb92b7c3d8f1d2626bb) + +commit 7159381881e5da33a49e8735811b93cbfe4f681e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 26 22:17:09 2009 -0700 + + XQuartz: Nuke duplicate locks that make painful headaches + (cherry picked from commit 1dd56322bd1722f2427fb2d833c5608248b60cf0) + +commit fba8c702ba6aa8fac27682e0838fd744e197d54f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 26 22:13:49 2009 -0700 + + Xi: CopyKeyClass is not static for XQuartz + (cherry picked from commit 85d6402354cdf143c6490f2725744c2f08b5605b) + +commit dc1e1bebff8b9d1eb6196dfd4b2f52f1e4200efa +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 7 00:02:21 2009 -0700 + + XQuartz: Use internal xshm header for new xextproto + (cherry picked from commit 1755239330c0bdac820d88a3e06ff391d65f29be) + (cherry picked from commit 697be460d0e555e2c75eed6889293650e02d423c) + +commit 73ae547d5e687ef10dea45801fc627e10ac4b659 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Sun Sep 27 02:08:10 2009 +0200 + + EXA: Fix mixed pixmaps crash with missing / failing UploadToScreen hook. + + For the recent mixed pixmaps changes, I failed to realize (or hit in my + testing) a problem which can occur if the driver doesn't provide an + UploadToScreen hook or provides one which can fail: There can be a crash + in exaMemcpyBox() because exaCopyDirtyToFb() passes pExaPixmap->fb_ptr to + exaCopyDirty(), but that's normally NULL with driver allocated pixmaps. + + The solution is to make exaCopyDirty*() no longer rely on pExaPixmap->fb_ptr + but use pPixmap->devPrivate.ptr after PrepareAccess instead. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24167 . + +commit c9ec2bab2f258798fd6e6676698c732f09571a60 +Author: Kevin E Martin <kem@redhat.com> +Date: Sat Sep 26 13:10:54 2009 +1000 + + dmx: undefine MITSHM, move undefs to miinitext.c. + + This patch undefines MITSHM for dmx - we don't support the required + screen->ModifyPixmapHeaders. All undefines are moved from dmx-config to + miinitext.c, where they belong. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fc9d733bab3ff0e4e51b19c73b66196dca563a70 +Author: Kevin E Martin <kem@redhat.com> +Date: Sat Sep 26 13:09:52 2009 +1000 + + dmx: reshuffle linker order to avoid errors when MITSHM is undefined. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e7c2598f565e8252dd66ee3e6212b310856476cb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 25 14:53:33 2009 +1000 + + dmx: core events are always in screen coordinates when passed to GPE. + + This fixes input in dmx, the pointer appears at the right positions to the + clients now. + + Also mark the spot where we pass in the button state as valuator to GPE + with a FIXME. (??) + + Tested-by: Kevin Martin + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 43a2eb794f19a2ba56d653f465fc5f6b2ff0d3d3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 23 21:49:11 2009 +1000 + + configure: Unify all library defines that require a specific version. + + This patch moves all libraries that require a specific version into a single + location instead or duplicating them across the configure.ac file. + Libraries that do not require specific versions are left where they are. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9bd08c690fc687c4d69bb70536f3079a9184476d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 24 14:07:26 2009 +1000 + + Xi: update axisVals with the right subpixel data. + + Subpixel data in data_frac is stored as FP32.32, hence we need to get that + down again before adding it to the current value. + + Reported-by: Thomas Jaeger + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit abb8108fb44cc9b08fe4ae7d805a0a22564ca6bb +Author: Michel Dänzer <daenzer@vmware.com> +Date: Sat Sep 26 02:05:24 2009 +0200 + + EXA: Only calculate cache position once for each glyph. + +commit c11678cc189551f2a01eaa7a63969c16950739b4 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Sat Sep 26 02:05:06 2009 +0200 + + EXA: Accumulate arbitrary number of glyphs without flushing. + +commit 0369eeeb6bf8a808fa2df503fc8b8df81e6e07b8 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Sat Sep 26 02:04:48 2009 +0200 + + EXA: Try to minimize UploadToScreen calls for mixed pixmaps. + + If there are several software fallbacks affecting the system memory copy of the + same pixmap, only copy the results back to the driver pixmap when it's used for + acceleration again, or in the BlockHandler, whichever happens first. + +commit 1818cbd70fc1f2e1487b4c678e67e28f1265c0ef +Author: Michel Dänzer <daenzer@vmware.com> +Date: Sat Sep 26 01:59:39 2009 +0200 + + EXA: Extend mixed pixmaps scheme to allow driver PrepareAccess hook to fail. + + If the PrepareAccess hook fails, use the DownloadFromScreen hook to retrieve + driver pixmap contents to a system RAM copy, perform software rendering on that + and copy the results back using the UploadToScreen hook. Use the classic + migration logic to minimize transfers (which as a bonus allows slightly + cleaning up some of the existing mixed pixmap code). + + This enables things that weren't possible before with driver-allocated pixmap + storage: If some (or all) GPU pixmap storage can't be mapped directly by the + CPU, this can be handled between the PrepareAccess and + DownloadFrom/UploadToScreen hooks, e.g.: + + * Radeon KMS on big endian machines can fail PrepareAccess if the pixmap + requires byte-swapping and swap bytes in DownloadFrom/UploadToScreen. + * Environments where GPU and CPU don't have a shared address space at all. + Here the driver PrepareAccess hook will always fail and leave all transfers + between GPU / CPU storage to the Download/From/UploadToScreen hooks. + + Drivers which can handle all pixmaps in the PrepareAccess hook should notice + little if any difference. + +commit e23bffc41b007f1bc2b8f5cd4ac54213062c95cc +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Sep 15 19:17:48 2009 -0700 + + Fix build of unit tests when dtrace probes are enabled + + ar loses the dtrace probe magic when building static libraries, so we + have to link with the .O files in order to resolve the dtrace probe symbols. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 9fa73be9fa543a686ea35c861084f5af37d44caa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 22 20:34:54 2009 +1000 + + Require libXext >= 1.0.99.4 + + Reported-by: Tilman Sauerbeck + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a9c274df5c37cb4ece6449e934342d8ff8e61705 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 23 11:43:27 2009 +1000 + + kdrive: plug two memory leaks when freeing the KdKeyboard/Pointer. + + xkbRules, xkbModel and xkbLayout are strdup'd in KdNewKeyboard, need to be + freed. + + The ephyr driver strdups the name on top of the already allocated + kdrive-assigned name. Memory must be freed beforehand. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fd913136732ff14a0484ca28f60ac1fbf49be81d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 23 11:44:12 2009 +1000 + + dix: plug memory leak in DeviceEnterLeaveEvents. + + 'event' must be freed before exiting. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6ee796e9bb4e46782b50a69c7b4fa5b49576f139 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 24 14:05:52 2009 +1000 + + Xi: fix length calculation for ValuatorState in QueryDeviceState reply. + + The length field needs to include the bytes required for the valuators + (INT32) as well. + + The reply length has the right value and since the valuator state is always + last, clients didn't notice the wrong offset. + + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3b5bbb149d4c932d9624336f5cbe9fe71c87bea3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 23 12:32:44 2009 +1000 + + configure: fix up tslib check once again. + + This patch addresses two issues: + The check for HAVE_TSLIB = xauto can never be true, the check has been + corrected to TSLIB = xauto. + + Pre-pkgconfig versions of tslib fail to be found, this patch restores the + additional AC_CHECK_LIB. However, the pgk-config check must happen before + AC_CHECK_LIB, as AC_CHECK_LIB does not seem to honour the LD_LIBRARY_PATH. + Thus, if tslib is installed outside of the default paths, AC_CHECK_LIB + fails. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked--by: Daniel Stone <daniel@fooishbar.org> + +commit 5402f18d9c3f7ba19cc05b3a814e3a9e94c8d551 +Author: Thomas Jaeger <thjaeger@gmail.com> +Date: Tue Sep 22 20:16:21 2009 -0400 + + dix: report XI1 axis values correctly if first_valuator != 0 + + Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 33bf9cb69dccbb6889b2f83e6db61f40dc644e17 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 23 17:41:28 2009 -0700 + + XQuartz: GLX capabilities: Allow 16bit accumulation buffers + + http://xquartz.macosforge.org/trac/ticket/308 + (cherry picked from commit e9e63a2118b76b6c31c4081fec08a99e4d796e22) + +commit ce1fe8ddb4a4dbe6cfd909e5b1b73b459d742bec +Author: Michel Dänzer <daenzer@vmware.com> +Date: Wed Sep 23 13:10:05 2009 +0200 + + render: Don't add b8g8r8x8 format for depth 24. + + The components are required to be packed in the bottom of the pixel, so this + format can't fit in depth 24. + + Also fix up a comment for the addition of BGRA formats. + +commit 096f21bb7a1217443d8a03529b1a2938518eb24f +Author: Michel Dänzer <daenzer@vmware.com> +Date: Wed Sep 23 08:24:06 2009 +0200 + + EXA: Fix some issues pointed out by clang. + + Remove dead variables, fix use of uninitialized values, that kind of thing. + +commit 824a09d856a5f750694e11d2fd2faaa3de705eaa +Author: Simon Thum <simon.thum@gmx.de> +Date: Mon Sep 21 15:23:27 2009 +0200 + + dix: move bounds check before access + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9edb9e9b4dde6f73dc5241d078425a7a70699ec9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 22 12:56:17 2009 +1000 + + Bump to 1.7.99.1 + + X Server 1.7 has branched off. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 66ece3bfb19642bf0f1ef73c3caa8a99c3dfb5a9 +Author: Kevin E Martin <kem@redhat.com> +Date: Tue Sep 22 11:42:24 2009 +1000 + + dmx: only free the default pixmaps that we actually allocated. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 20fb8c2e2fccb28c1b89e6e2a5c685e1287baedb +Author: Kevin E Martin <kem@redhat.com> +Date: Tue Sep 22 11:41:33 2009 +1000 + + dmx: disable Get/SetWindowPixmap, we don't support composite/redirected windows + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Sep 21 19:16:59 2009 +0200 + + Fix sporadic segfault on resume due to accidentally freeing cursor. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 91e1fe5863a180b2d70a6943e83b98bbd4c9ebce +Author: Matthias Hopf <mhopf@suse.de> +Date: Mon Sep 21 19:13:31 2009 +0200 + + Revert fe31f9c + 977953b to fix issue for good. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 90aa0e4a49cdd637178a771365e1e8dab8bceb87 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 18 10:03:02 2009 +1000 + + input: don't use typecasts to access members of InternalEvent. + + To avoid confusion, the member names are now postfixed with _event. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 693d4fdb1c7b7c789a812790122454e718602449 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 22 11:13:58 2009 +1000 + + Xext: switch mbuf.c to dixLookupResourceByType + + Resolves a linker error caused by LookupIDByType. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 493d2f9c2fc56dd3b4c03451c07cd25e3012142e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 22 11:05:07 2009 +1000 + + Xext: remove DisplayImageBuffers from mbuf.c + + Not referenced by anything. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fff40b3353c7025c1d1e3dd14b5c78f7c9f5de7c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 22 10:53:47 2009 +1000 + + Xext: fix up multibuffer compiler errors. + + Triggered by the xextproto 7.1 change, fixed by moving the matching + declarations from the header file to here. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4c8f834da6c8c84849313453fe223a8165c6afc0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 21 14:52:31 2009 +1000 + + configure: fix up check for tslib. + + Reduce the tslib-check to the pkg-config check only instead of the previous + library symbol check followd by a pkg-config check. + + This patch also reduces the required version of tslib back down to + tslib-0.0. Unfortunately, the 1.0 tarball available through + http://tslib.berlios.de/ still announces itself as 0.0.2. + + Reported-by: Werner Landgraf + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 977953bf14858d17c22208c848854ddbe7e86527 +Author: Matthias Hopf <mhopf@suse.de> +Date: Mon Sep 21 15:44:00 2009 +0200 + + Less intrusive workaround for sporadic segfault on resume. + + Hopefully fixes fdo #24010 (memleak). + +commit 55747d256d759850141e4a9c4dec965616a31dc8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 18 16:27:54 2009 +1000 + + input: define server-supported protocol versions in one single file. + + include/protocol-versions.h specifies each extension version as supported by + the server and sent back on the wire to the client. + + This fixes up several issues with the server potentially reporting a higher + version of the protocol if recompiled against a newer version of the + protocol. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Rémi Cardona <remi@gentoo.org> + Acked-by: Julien Cristau <jcristau@debian.org> + +commit 0b7c6c728c2e2d8433a188315cc591308a89cd85 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 18 21:12:17 2009 -0700 + + xfree86/modes: Remove all framebuffer support from DGA + + This removes all rendering and mapping code from xf86DiDGA, leaving + just mode setting and raw input device access. The mapping code didn't + have the offset within /dev/mem for the frame buffer and the pixmap + support assumed that the framebuffer was never reallocated. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d3a3c904e5e3b5e8bb3c51ca6a563880ff589bf3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 21 09:41:46 2009 +1000 + + configure: resourceproto is optional. + + Although a --disable-xres flag is provided, resourceproto was listed in + REQUIRED_MODULES since 2005 (5b218617fa8ba52bf65aef35da39e06c662495e6). + Remove, make conditional on the xres flag only. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b9ae1b91f316a98eb3bbefe1fc61f3e0faa861e0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 21 09:22:53 2009 +1000 + + dmx: silence 'implicit declaration of function ‘XFixesSetPictureClipRegion’ + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit aa71e268f55ac39351814ab6840196c4f58bad39 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 18 11:35:47 2009 +1000 + + Xext: silence 'warning: no previous prototype' for sync, bigreq and xcmisc. + + xcmisc and bigreq don't have their own header so just declare it here to + shut up the compiler. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 00dfe69aab786ea650b41dfefc031f0e0fc72b0c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 17 14:48:51 2009 +1000 + + randr: reply with the server or client version, whichever is lower. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8b75d0f9d347d7c3aad1e53809e0a2bed03b92fc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 17 14:17:54 2009 +1000 + + render: reply with the server or client version, whichever is lower. + + Protocol requires that the lower of [server version, client version] is + returned to the client. + + The other part of the issue discussed in reply to [1] remains. + [1] http://lists.freedesktop.org/archives/xorg-devel/2009-September/001990.html + + Reported-by: Julien Cristau + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 20ccc66708bcd55372bff03fa0d78a7846e8c82d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Sep 20 21:12:31 2009 +1000 + + xfree86: silence warning: ‘ramplen’ may be used uninitialized + + 'ramplen' is only set and used if stuff->size > 0 but the compiler doesn't + pick that up. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2df10a49867635c341b1d1a9faadf4dbae043a0f +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:38 2009 -0700 + + RRDestroyOutputProperty: Free randr property valid values + + These were leaked when the property was destroyed. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d3a84906c00b8fe4a4e33fa89bff3ed66ceafdec +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:37 2009 -0700 + + Free randr crtc and output pointer arrays + + All of the crts and outputs were freed, but not the arrays full of + pointers to them. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6086a6065666fb9ded5d99919ddfa51c66b76246 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:36 2009 -0700 + + xf8CrtcSetModeTransform: free adjusted_mode name too + + The adjusted mode was freed, but any name allocated for that was leaked. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 088107827347cee05a6e5317bcebdbc282b9a3bc +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:35 2009 -0700 + + LoaderSortExtensions: free graph nodes + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d5959d37cd36895898786e4ea5bf72c480b79832 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:34 2009 -0700 + + Free libpciaccess iterator in xf86PciProbe + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ded35b7bf7a5ad27de152476c657a56a4f232800 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:33 2009 -0700 + + xf86Xinput.c: get DIX event queue pointer once at InitInput time + + The DIX event queue is allocated before InitInput is called, so fetch + the pointer there and not randomly at other times. This avoids failing + to fetch the pointer sometimes during server regen and then smashing + memory through the stale pointer from the previous server generation. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 54f15a414130f89832b5c2604b0b44e7e4c6709f +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:32 2009 -0700 + + probe_devices_from_device_sections: don't leak list of devices + + xf86MatchDevice returned malloc'd storage containing the list of + devices to look at; make sure that gets freed. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8b5086250aa5dae8de8b763408ff480d7beac819 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 17 18:14:31 2009 -0700 + + Eliminate bogus event resizing. + + Now that all event queues hold internal events only, they never need + to be resized. Resizing them led to memory corruption as they would + get sized for an appropriate xEvent, not an internal event. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c7987660fd665f32406b14db7078a3f5f7b76e9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 17 15:33:19 2009 +1000 + + xfree86: fix up wrong use of OptionRec for AutoAddDevices andAutoEnableDevices + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 971d4eac1274db78efa546ea50ca5e01a80bbd81 +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Sat Sep 19 15:48:30 2009 -0400 + + Xext: include security protocol header instead of client header + + Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a62664bc07b35aedb6b11b984c94341deb4486ca +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Sat Sep 19 16:01:52 2009 -0400 + + Bump fixesproto requirement to 4.1 + + Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2a890d85e923e1da0331b02e58e95f98b11f5de0 +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Sun Sep 20 01:31:59 2009 -0400 + + fixes: Make sure invisible cursor is inialized with zero src/mask + + This fixes a regression introduced in 9040dab76182d1a019ca7fef7b29733d2c199e61. + + Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2bb3f0c87119e73157141431d7c00ab104d4b34b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 18 10:27:14 2009 +1000 + + xfree86: remove now unused variable + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1888d7d3e3ae81b5cb23e3a0852317362c8e215a +Author: Carl Worth <cworth@cworth.org> +Date: Fri Sep 18 10:39:19 2009 -0700 + + configure: Fix broken quoting for initialization of REQUIRED_MODULES + + A recent change switched to C-style automatic string concatenation, + (presumably for better readability and maintainability), but this + doesn't actually work for the shell. So we revert to the previously + working initialization. + + This commit reverts one hunk of c947605eda082fbca0821efc0cc14fec8f958fd0 + +commit 4982bbc3b49b1b61e63a8461ea803e41318c8187 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Sep 18 12:36:11 2009 +0300 + + xfree86: vgaarb: missing wrapping macro + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit af1af50de621bc451e6413fa5602ae5db2dc9809 +Author: Martin-Éric Racine <q-funk@iki.fi> +Date: Fri Sep 18 09:33:37 2009 +0300 + + xserver: added more Geode oddities to xf86AutoConfig.c + +commit ec0ad408ef8d5a2cf7a2bd65d13de3ef3147308c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 17 16:01:29 2009 +1000 + + xfree86: use SendDevicePresenceEvents instead of manual event handling. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d0440275108920f5cb5d630f55fc9a3320c496d3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 16 10:58:52 2009 +1000 + + Require dmxproto 2.2.99.1 + + This requirement was introduced in code with commit + e85775aa64d1e9322c82090a26256af5e1fede0a. + + Reported-by: Marvin Schmidt + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c947605eda082fbca0821efc0cc14fec8f958fd0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 15 15:05:27 2009 +1000 + + configure.ac: move all protocol requirements to a single location. + + Protocol requirements were spread throughout configure.ac, leaving us with a + few locations where one DDX asked for a different version of the package + than another. + For each protocol, define <NAME>PROTO="[<name>proto >= version]" and + assemble REQUIRED_MODULES based on these. + + Future changes to protocol versions need to only be done in a single place. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4d6b20c25af5f590f19530b6c007e3648a8037c3 +Author: Shunichi Fuji <palglowr@gmail.com> +Date: Wed Sep 16 12:02:00 2009 +1000 + + dri: use noPanoramiXExtension directly. + + xf86LoaderCheckSymbol() is never useful if using externed variable directly. + noPanoramiXExtension will be just used through dlopen() like other extension modules. + + Signed-off-by: Shunichi Fuji <palglowr@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3853314d13b503684c9922715323f8033febe5de +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Sep 17 08:11:27 2009 -0700 + + Fix typo in Xephyr man page + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 2edf967b00963559552d061bb98b15243d978279 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Sep 17 15:24:01 2009 +1000 + + xserver: SIGIO option handling was incorrect. + + reported by a user on #radeon when DRI1 broke. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit 715953bf5c00b4605dd6ab45c92140c0e81174ee +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Sep 15 21:13:00 2009 -0700 + + Check for -wrap support in the linker + + Allows unit tests to be built with non-gnu-linkers that + also have -wrap support + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e2c64551808988657069006f74c6780973ec0557 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Sep 15 21:13:48 2009 -0700 + + Add configuration option for use of SIGIO handlers for input events + + Boolean option to enable/disable SIGIO handlers is set by the first + of these found: + - UseSIGIO option is set in xorg.conf ServerFlags + - Default set at build time by ./configure --enable-use-sigio-by-default + - Platform default value: Solaris = no, all others = yes + + This matches the current settings on all platforms except Solaris. + This reverts Solaris (for now) to the settings used in Xorg 1.6, before + SIGIO support for Solaris was added, due to some system level bugs that + won't be resolved in time for Xorg 1.7 release, but allows us to enable + when those are resolved (or when we need to test if they're resolved). + See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6879897 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3bdf36476179257561b9409c3f49a77640fbb9f9 +Author: Matthias Hopf <mhopf@suse.de> +Date: Wed Sep 16 16:03:46 2009 +0200 + + Work around sporadic segfault on resume with intel/KMS due to cursor->bits == NULL. + + Apparently SavedCursor is sometime tried to be set while already being set. + +commit fe31f9c646bc26163497f29c3b833c090df0b3f9 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Sep 14 19:51:23 2009 -0700 + + Change xf86dristr.h includes to use xf86driproto.h instead + + Clears warnings about obsolete headers, but raises minimum + required version of xf86driproto to 2.1.0 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 159e03204093991ccd4133133c50c0cae88c828f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 15 11:39:09 2009 +1000 + + dmx: don't include panoramiXsrv.h if building w/o Xinerama + + Reported-by: Marvin Schmidt + Tested-by: Marvin Schmidt + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f56cbe1ef24415d0142b9a7d0ab0a031069ccb52 +Author: Rémi Cardona <remi@gentoo.org> +Date: Mon Sep 14 17:09:59 2009 +0200 + + dix: append "built-ins" to the font path in SetDefaultFontPath + + 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 made the hard dependency on + a "fixed" font go away but only Xorg could use the built-ins fonts by + default. + + With this commit, all DDXs get "built-ins" appended to their FontPath, not + just Xorg. + + Tested with Xorg, Xvfb and Xnest. + + Signed-off-by: Rémi Cardona <remi@gentoo.org> + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 139368f7ae192b592e24d013e8ca5ce4175effe1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Sep 15 17:53:50 2009 -0700 + + Fix num_masks/length overflow test for XiSelectEvents + + Have to set windowid to a valid value first, since that check + appears earlier in the code than the masks/length check. + + Also have to have data[] set large enough so that reading mask + data for 0xFFFF masks doesn't overflow past the end of the array + into uninitialized data. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 13decf5efe76e735a003227c951e58a41e36a8b5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Sep 15 13:54:51 2009 -0700 + + test_convert_XIRawEvent: Don't write more data than the struct holds + + sizeof(in.valuators.mask) * 8 == 40, but the valuators arrays only + holds 36 entries, so the test was smashing the stack when 36 < i < 40 + (leading to core dumps on Solaris x86, since the return address was + overwritten with an invalid pointer). + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 38a61e9a7cf616e26a79dba815bf67737317d1eb +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Sep 15 13:54:50 2009 -0700 + + Remove stray semi-colon in protocol-common.c + + Caused Sun compilers to issue warning: + "protocol-common.c", line 141: warning: syntax error: empty declaration + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e320736c457ea7b2f19a4c7c2dfc0c461d0dd405 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Sep 14 19:51:22 2009 -0700 + + Fix module path in xorg.conf man page + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 49b98d092ec3d032e657eeff62c22fce243b1e8b +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Sep 10 17:52:33 2009 +0300 + + xfree86: vgaarb: rework wrapping function + + No semantical changes. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 422cd7a674e6831f40be14ee853bd946cb62eadc +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 14 13:52:53 2009 -0700 + + XQuartz: pbproxy: Remove debugging XBell() + (cherry picked from commit 1fd7c1fd4740393a32e261af33e64c19be48ca9a) + +commit 663807ce0e65b51537540bb95fbf3c18988c04c7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 14 16:44:52 2009 +1000 + + xserver 1.6.99.901 (xserver 1.7 RC1) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f450be999268d118b384c04ea070c87ad48c4c59 +Author: Soeren Sandmann <sandmann@daimi.au.dk> +Date: Fri Sep 11 04:03:06 2009 +0200 + + Add xoff and yoff to drawable->x and drawable->y in create_bits_picture(). + + These are 0, except when the drawable is a redirected window. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2b00afec4b5b51851aee4cb0fba7baff3e10ef3f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Sep 14 15:59:41 2009 +1000 + + Update xorg.conf man page & sample for changes in Xorg 1.7 + + AllowMouseOpenFail description changed to reflect actual behaviour + and point to AllowEmptyInput for previously described behaviour. + + Update default DPMS mode timeouts to match new defaults set + in April 2009 by commit d52fddefaeb43f15b677eefbea4a288a9948373b + + Update autoloaded module list to match ModuleDefaults in xf86Config.c + Update module subdir list to match stdSubdirs in loadmod.c + + Add xorg.conf options that were added to the code: + - XkbDir option added in February 2009 + by commit 76f18b94bd2719a8199334742d021c4d0806187d + - DRI2 option added in April 2008 + by 35982bc109d424c464551ab22ec90af69908c884 + + Remove xorg.conf options that were removed from the code: + - XkbDisable option was removed in January 2009 + by commit 40877c6680863bd6a8475f2bb0c54df55bcf0b0e + - PciProbe/Config options were removed in August 2008 + by commit fdf7c747a8e1bc59dfb31b7f90dd5eab2687315b + - EstimateSizesAggressively was removed in August 2008 + by commit cd1e8f26147919227e7624ac4c6b313d972a4d35 + - loadable font modules were removed in July 2008 + by commit affec10635343668839994ea2bac16c1d4524200 + - ModInDev options were removed in December 2008 + by commit 6de6ffff35ac03d49fa61de195d4a0605e0ef8bf + + (Also strips some trailing whitespaces to make git happier.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b6f5c54fc61588c638b987bde914b0e5ff9b655e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Sep 14 15:49:01 2009 +1000 + + xfree86: Change default font path to match configure.ac's --default-font-path. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 23dc4678e9333ba0ee1a5374521905fa3f4f309c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 14 14:14:27 2009 +1000 + + dmx: use top_builddir, not top_srcdir to get libxfixes.la + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Tested-by: Byeong-ryeol Kim <brofkims@gmail.com> + +commit 4650e6ebe6e3ea48a026ace60b25daa165580467 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 14 12:00:18 2009 +1000 + + xkb: drop key presses for already repeating keys. (#23889) + + The event sequence for continuously pressed keys with the keyboard driver is + PRESS - PRESS - PRESS - ... - RELEASE. + The first press sets the repeatKey to the keycode and the matching timer. + The second press (on the same keycode) can be silently dropped instead of + overwriting the timer again. + + X.Org Bug 23889 <http://bugs.freedesktop.org/show_bug.cgi?id=23889> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit c626a5578aa16c17ef68c1b15ed53828080d9d90 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Sep 13 17:35:51 2009 +1000 + + xfree86: fix VT_WAITACTIVE control flow (#11477) + + Move misplaced } to get the flow of + + if (!ShareVTs) { + VT_ACTIVATE + VT_WAITACTIVE + } + + X.Org Bug 11477 <http://bugs.freedesktop.org/show_bug.cgi?id=11477> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit d3c66d6b69c04466b8388586090dc48a0aad7684 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 14 08:03:17 2009 +1000 + + dix: FindChildForEvent needs init child to None. + + silences compiler warning: + events.c: In function 'FixUpEventFromWindow': + events.c:2262: warning: 'child' may be used uninitialized in this function + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e85775aa64d1e9322c82090a26256af5e1fede0a +Author: Kevin E Martin <kem@redhat.com> +Date: Mon Sep 14 08:01:56 2009 +1000 + + Include <X11/extensions/dmx.h> and remove _DMX_SERVER_ define. + + Fixes build with newer dmx header files that have been split between dmx.h + and dmxext.h. _DMX_SERVER_ is no longer needed with the split headers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 232d43510e0f9f780a9f8eb857366e03acf2fcdc +Author: Kevin E Martin <kem@redhat.com> +Date: Mon Sep 14 08:00:42 2009 +1000 + + dmx: Make description match default option. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6389a190faa7c06bdedfd1cc3acb280ebb5cc04a +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sat Sep 12 21:47:51 2009 +0300 + + shave: use CC tag variable on libtool + + This fix scratchbox compilation. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dfb106c846c880a06fa5caada92f45576eab7b00 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 18:09:12 2009 +1000 + + configure: re-enable dmx build (default=auto) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 72607960c136894c4533a54cef7a9be64246f1a3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 9 11:02:22 2009 +1000 + + dmx: Remove some dead code. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 88187ad889ab707fcae3f64890cdb291b567ec23 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 9 11:02:18 2009 +1000 + + dmx: purge DMX EQ leftovers + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f3aaa46f27f802233e54b3c70ba827e0fcca2605 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 9 09:51:45 2009 +1000 + + dmx: formatting fix to improve readability + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7a588c833e87dd07f167b9885d5ec43dde271ebe +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 18:14:43 2009 +1000 + + dmx: Default rules are now base, not xfree86 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 33243ae971db90477a29dfb0e51cc00c95e561bc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 17:04:08 2009 +1000 + + dmx: include xfixes lib, reshuffle include order to resolve linker errors. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2d46678762b12c9746fc8f89821c15705680ba35 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 17:46:06 2009 +1000 + + dmx: remove dmx-internal event queue. + + The EQ is in the DIX now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 545f11139d600febf1c5fd46b11bea4352b82c32 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 17:14:53 2009 +1000 + + dmx: compiler warning fix (mixed declarations + code) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7d703af74ced36968f4480507a7eb54d249b5edc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 17:13:38 2009 +1000 + + dmx: get the state from XKB for dmxCheckSpecialKeys + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6e52f9233176986508356f6eee4fce86ba740e71 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 17:10:22 2009 +1000 + + dmx: fix dmxKeySymToKeyCode to work with mandatory XKB. + + Approach taken is inefficient, it converts the xkb symbol table to a core + symbol table first and then extracts the keycode from there. + Consider this a todo for a rainy afternoon when the beer fridge demands + emptying. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 61ae0a5ca5de24590f444c405445124404ba9753 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 17:05:12 2009 +1000 + + dmx: fix up dmxKeyCodeToKeySym for XKB-only. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9caba3e2abceda0a1ff4ad4bf05708f0166c2218 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:12:25 2009 +1000 + + dmx: fix two calls to InitKeyboardDeviceStruct. + + Takes RMLVO now instead of the keysyms directly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 29b9a10dad1ca780dc90f4f1f63fd11fd7d1221b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:04:45 2009 +1000 + + dmx: XkbComponentNamesRec doesn't have a keymap field anymore. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a6f3f6a63ae76afbe01eb9049a63609476d2ed4d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 16:43:04 2009 +1000 + + dmx: switch lnx-input and usb-input over to xkb-only. + + kbd*Convert are nearly identical, it just asks for merging. Not today + though. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5d81aee5f75e80ae9d3ac7cb32d293ade62d6c5c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:24:02 2009 +1000 + + dmx: include xkbsrv.h to silence compiler. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4da59f478686fa7e80a3837bf9fa61672c13c50b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 16:30:36 2009 +1000 + + xkb: split effectiveGroup calculation into separate utility function. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8fb3fa28a5a1b36cdaad38055a607400828b9e1c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Sep 11 11:21:26 2009 -0700 + + compiler.h: include <string.h> before using memmove() + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit d908ee6e549fd8ff653e2c58e9637df347540ef9 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Sep 10 20:56:18 2009 +0300 + + Revert "Make sys.c use compiler.h unaligned access functions" + + This reverts commit 1b30545c04a51bfa3ff95a26d64962907a62ff15. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 281ebb453d2f5254e057a24e580dafa9abf82305 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Thu Sep 10 17:52:32 2009 +0300 + + xfree86: vgaarb: close and cleanup vga arbiter + + So far there are no apparently issues on not closing the fd. But let's do the + right job here. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e62549b8d61cd739adbbd04487d96fe706da1370 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 9 16:03:38 2009 +1000 + + Xext: don't try to initialize XTEST device properties if they failed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 744cdc897746dca86f5ab9e57be982621c2f0986 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 9 15:05:15 2009 +1000 + + dix: Remove two _X_EXPORT defines from the function definition. + + These two are defined _X_EXPORT in their declaration anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9871f9be4e5b184b151ce93458b2578cc8c7b962 +Author: Martin-Éric Racine <q-funk@iki.fi> +Date: Wed Sep 9 13:43:45 2009 +0300 + + Use lowercase PCI vendor ID for NSC. + +commit f4350c66b493d63fa06be87caa958d7033232ea4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Sep 9 15:48:33 2009 +1000 + + fbdevhw: Test for graphics:fb%d as well as graphics/fb%d + + Apparently the kernel can't decide on an API to expose to userspace, so + let's just try both in the hope that one will work. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Acked-by: Michel Dänzer <michel@daenzer.net> + +commit 72f6be540840b46aa4b158b98fac11a6f90dc9d1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 11:13:55 2009 +1000 + + xfree86: remove now unused xf86CrtcShadowClear + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1f24638985ce053b696ca3359cc50b5bc26ccb03 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 9 09:28:46 2009 +1000 + + kdrive: output meaningful error message for HAL devices. + + kdrive ignores all devices from hal as they don't have the 'type' option + set. Instead of "Unrecognised device identifier!" print out "Ignoring + device from HAL." to indicate that the errors surrounding the device don't + really matter. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit ae812bb79668e59cda1f851fb1fabe9db9ea705f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 13:53:26 2009 +1000 + + Xnest: set the default pointer accel to the host's values (#10013) + + The defaultPointerControl holds compile-time defaults for pointer + acceleration. If an Xnest instance is started, it resets the hosts pointer + accel values to these built-in defaults instead of using the host values. + + This patch queries the host for the values before initializing the device, + thus leaving the host values untouched. + + X.Org Bug 10013 <http://bugs.freedesktop.org/show_bug.cgi?id=10013> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 97e3f4316b1c917f93d324f05d3a4551c1d051a3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 09:55:22 2009 +1000 + + dix: auto-float SD's with SendCoreEvents "false" + + AlwaysCore and SendCoreEvents specify whether a device is to send core + events. A device that has either disabled is not supposed to send core + events. + + With MPX/XI2, a device that is attached automatically sends core events when + the event is routed through the master device. Floating a slave device + disables core events by breaking the route. + + This patch automatically floats devices that have coreEvents disabled in the + xorg.conf/HAL. This replicates the behaviour of a SendCoreEvents "false" + device in server 1.6 and earlier. + + The devices may still be reattached to a master at runtime. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 447bd4ce90113037a489ce55d9878523fe5294c7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 7 16:02:50 2009 +1000 + + kdrive: fix sdl build by removing old keySymsRec references. + + These are set in kinput now through InitKeyboardDeviceStruct. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d8aadfa5af85ce6613289efe119e592aa687ab03 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 7 15:04:33 2009 +1000 + + dix: remove unused and half-broken code to restore original classes. + + In theory, the MD should change back to its old, original classes when the + last SD is detached. Thanks to the XTEST devices, we'll always have an SD + attached until the MD is removed. So let's not worry about that and do + nothing instead of having some code that's essentially untested. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e9a507acca01234de189f0f64da63bac32dc13fd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Sep 7 15:59:37 2009 +1000 + + kdrive: remove xkb member from KdKeyboardInfo + + Wasn't being used by anyone. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cafa7c5f9017efdc33c348b6a55d80d44df0fe17 +Author: Martin-Éric Racine <q-funk@iki.fi> +Date: Tue Sep 8 23:52:52 2009 +0300 + + Added comment with the PCI device ID of Geode SCx200 series. + +commit d3ad1804a5216487b5837a80f3e53b81212dcf84 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Sep 8 15:25:19 2009 +0200 + + EXA: Only take special code path for 1x1 fill for pixmaps. + + It doesn't make sense for windows. + + Also double-check that the data pointer is valid. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23461 (not sure that could + happen on master even without this, but just in case) + +commit a9d30f6a038166052a4684308db205bd4e60799e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 8 17:43:24 2009 +1000 + + dix: GetKeyboardValuatorEvents doesn't recurse anymore - fix comment. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1bdc9ec617d357b076c9e69296018bc212d91c7d +Author: Eamon Walsh <efw@eamonwalsh.com> +Date: Fri Sep 4 21:49:29 2009 -0400 + + Fix "warning: left-hand operand of comma expression has no effect" + + Signed-off-by: Eamon Walsh <efw@eamonwalsh.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9005ec4ce19d704d5055232d2a36acee3247be67 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 11:38:03 2009 +1000 + + dix: remove dixLookupResource - we don't have any users left. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Acked-by: Aaron Plattner <aplattner@nvidia.com> + +commit 1e0caf9a2ca983f171976822d9c04bacc14e9af7 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 6 14:02:53 2009 -0700 + + XQuartz: launchd: Fallback on :0 if prefix:0 gives an error for the socket name + (cherry picked from commit 647c871dc9f2d0adc172b401cde89ffbdfcc4d7a) + +commit 081f72390a25e2244561e238f772f98289a6a581 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 5 14:04:53 2009 -0700 + + XQuartz: Fix "warning: function declaration isn’t a prototype" noise + (cherry picked from commit 9a77905a975e562daa4230739937bbb0b4caf087) + +commit 7ece2cb220e4fe2c9a8c4c62361522a45adf22c1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 5 14:03:19 2009 -0700 + + XQuartz: pbproxy: 64bit fixes: Properly process an array of Atoms + (cherry picked from commit 1b659cda1af02762a31cc7875e457b08c8dc68b5) + +commit 1747120043cc5b5d201b7efd06b75ef08b032922 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 5 02:51:09 2009 -0700 + + XQuartz: Fix a strcpy/strcmp typo + (cherry picked from commit 701c24da3ef76a05ccb2d7e84ccfa1b7c5d38e15) + +commit be37f339a9ed90b9b5e44aeb396ca73347078027 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Sep 4 23:11:13 2009 +0200 + + EXA: Stop hiding solid or gradient pictures from the driver. + + Add support for solid pictures in exaTryDriverSolidFill(), but otherwise just + pass solid and gradient pictures to the driver Composite hook. + + While we're at it, clean up the logic to detect Composite operations which are + effectively solid fills or copies. This should also fix some false negatives + and positives. + +commit 1f61bbeffdf2ad5a2c54121c75f3b049baf01708 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Sep 4 00:38:58 2009 -0700 + + XQuartz: Check the DISPLAY environment variable to see if the socket at startup is ours. If not, ignore it and fork/exec startx. + (cherry picked from commit 3d5e10cce360a04bf917227615fb9b825675124f) + +commit 0a361d0e5f896351b98dc9765b4a33c79efa6f02 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Sep 3 19:40:11 2009 -0700 + + XQuartz: Use --with-launchd-id-prefix for consistency with xinit + + Also actually honor LAUNCHD_ID_PREFIX and APPLE_APPLICATION_NAME + (cherry picked from commit 990038ab006b2f5e03dcef385514ba4e4584bd25) + +commit e6e83d81ee7366779d600cbb128034e248815339 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 14:51:08 2009 +1000 + + xserver 1.6.99.900 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc0841b6e87cdd752b44b17ccb021c831a3e02a5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 15:58:36 2009 +1000 + + shave: hack around the configure ld check for make distcheck. + + configure calls $(CC) -print-prog-name=ld to get the binary for the linker. + The shave script prints " CC \nld" which can't be parsed by configure, + resulting in a fatal error. + + This patch special-cases -print-prog-name and passes it though directly + without any additional output. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 58d9a4c6356c98c32be2826410df027ece70d44d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 15:06:45 2009 +1000 + + xfree86: fix make distcheck after removal of Domain.note and RAC.Notes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8af2793a90e8e644a6a598adce3f752c15b3e37a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 3 11:30:48 2009 +1000 + + xkb: xkbGetKbdByName on the lastSlave needs to change the master (#21859) + + If the layout is changed on a master's lastSlave, the master needs to change + layout immediately. Otherwise, the master stays on the same layout until the + lastSlave changes - which may not happen if only a single keyboard is + available. + + X.Org Bug 21859 <http://bugs.freedesktop.org/show_bug.cgi?id=21859> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 219ae5b628f9ffe2be0876d5911cc04e52bef5f8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 16:38:53 2009 +1000 + + dix: hide the sequenceNumber key repeat hack behind two functions. + + Just in case we figure out a better way to do it in the future. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bfb219f532f3c78ba905424365ee7c5f7b5f21a2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 21 16:03:36 2009 +1000 + + input: allow for detectable autorepeat. + + For core and XI1 events, store the key_repeat flag in the sequence number + until TryClientEvents. The sequenceNumber is unset until TryClientEvents. + + [Also thrown in, some random indentation changes. Thanks] + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3d988e01e41e98fc5160f825a250522ba274d09f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 21 15:15:41 2009 +1000 + + dix: improve code flow in TryClientEvents, better debugging messages. + + Instead of a massive if (blah && blah), return early where possible. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6fb01c8286c16968fd07e4a5b78da89cd8768d79 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 10:57:33 2009 +1000 + + require xf86vidmodeproto 2.2.99.1 or newer. + +commit 2122fedb2c058dc27f9df0e856d2193fabe725e2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 11:37:58 2009 +1000 + + os: silence bigreqsproto compiler warning + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 59e731ef66095723e74a16b2e5548aed627089ff +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 11:06:37 2009 +1000 + + xfree86: silence some xf86dgaproto compiler warnings + + We already require xf86dgaproto > 2.0.99 since 6fffcd582 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ead57a13531aa14033839112fa66e33e142f67da +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 11:03:55 2009 +1000 + + xfree86: silence 'unused variable' compiler warning + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 21f04f008e6b1ab66a63de3de668b1f261a6928a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Sep 4 11:01:09 2009 +1000 + + os: don't redefine GNU_SOURCE + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 09f0ee1324b046f2830bdd260f6e2a67ee8f2973 +Author: Martin-Éric Racine <q-funk@iki.fi> +Date: Fri Sep 4 04:17:09 2009 +0300 + + Formatted recent Geode PCI ID changes to fit a 80-column coding style. + +commit a17b50b130fe01c058a74f2696a8b97c756acb49 +Author: Martin-Éric Racine <q-funk@iki.fi> +Date: Fri Sep 4 03:51:01 2009 +0300 + + Further explained what the Geode PCI ID is all about as comments. + +commit afd800dae4f7491baee08509094a30160bb9c849 +Author: Martin-Éric Racine <q-funk@iki.fi> +Date: Fri Sep 4 03:41:08 2009 +0300 + + Removed unnecessary curly braces for Geode LX PCI ID. + +commit 842b7a47d583a7729099de3031ae20977dddf774 +Author: Martin-Éric Racine <q-funk@iki.fi> +Date: Fri Sep 4 03:25:32 2009 +0300 + + Updated the PCI Vendor and Device IDs for all Geode variants. + + In practice, some of the native drivers for older Geode products + have become deprecated due to lack of e.g. libpciaccess upgrade, + but that's OK, since most distributions don't ship them anymore. + In that case, we'll let X server fall back to good old VESA. + +commit 8e873185f4cbfb2a36e1f43fe7da47fd9fd5aeea +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Sep 3 19:11:02 2009 +0200 + + EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_mixed. + + Otherwise we may incorrectly clobber it to NULL on repeated PrepareAccess + calls. + +commit 120286aef59dabdb7c9fa762e08457e5cc8ec3a6 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Sep 3 08:05:59 2009 +0200 + + glx: Add screen DestroyWindow wrapper to destroy the GLX drawable. + + Fixes crashes exitting MacSlow's rgba-glx demo. + +commit f04fe06ae244b851b38be824b1a80f2f8a030591 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 3 14:17:14 2009 +1000 + + dix: don't return BadMatch from GetProperty (#23562) + + dixLookupWindow may return BadMatch if the window in question isn't actually + a window. In this case, GetProperty needs to return BadWindow - not + BadMatch. + + X.Org Bug 23562 <http://bugs.freedesktop.org/show_bug.cgi?id=23562> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 84eb4c66a4a09c360cef260fb2f35dfb6d8a93c6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 3 10:00:42 2009 +1000 + + test: add protocol testing for XIWarpPointer. + + TODO: some way to check src_x/y coordinates would be good. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1b7858e8469aea6d2031039ba41d7191a4b80f28 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 3 10:58:00 2009 +1000 + + test: expose the default screen to tests, some cleanup work. + + Provide common #define for invalid window IDs. + Init the sprite's hotPhys, provide a common #define for the initial sprite + position. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 61a6e1f074d9ff75d61446b946aab6c04019c287 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 3 10:00:00 2009 +1000 + + Xi: return BadDevice for master kbds and attached slaves in XIWarpPointer + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8939ad2b2aa0385f072d3e1169eaf99289ed737a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Sep 3 09:44:11 2009 +1000 + + Xi: return error values to client from XIWarpPointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d481720c57f558c47273bf89854fc69254319772 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 2 15:28:28 2009 +1000 + + Xi: standardise XI2 headers. + + Adding missing dix-config.h include, adding one missing header guard. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 377a5f655ca88cd836da24ab42361df9f3ff51a2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 2 11:16:15 2009 +1000 + + Xi: if XISetEventMask fails, return this to the client. + + The only failure point can be a BadAlloc. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 993ca5acbdccef9e43cd6580e7cc22cfda1a2578 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 2 10:53:40 2009 +1000 + + dix: when unsetting a cursor, update the sprite immediately (#23608) + + Removing the device cursor while the cursor was within the window did not + update the visible sprite until the next enter/leave event. + + X.Org Bug 23608 <http://bugs.freedesktop.org/show_bug.cgi?id=23608> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b41db8fe460fc0956922b79261752d1bb104684f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Sep 2 08:57:40 2009 +1000 + + Xi: fix broken swap code in XISelectEvents request processing. + + The pointer advanced 12 bytes too short. Rather unfortunate if both the code + and the test have the same bug. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 727de7c90de4198222e0dc58d7503b4a1672f642 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 1 16:33:56 2009 +1000 + + Xi: Unify checking for invalid bits in grab masks. + + Bits above XI2LASTEVENT are invalid and cause in BadValues. These checks + must be performed anywhere where a mask_len parameter is given. + + This patch also adds the missing checks to grab masks. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 59a6d7d478903a8bc9c5d4cc8b2e62e2ad102dba +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 1 16:30:52 2009 +1000 + + Xi: don't overrun memory for grab masks. + + A grab mask provided in the request may be larger than the one used in the + server. Cut down to size before memcopying. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 83db2b126e8623824e1303e74070375994984599 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 1 15:58:02 2009 +1000 + + Xi: don't try to set oversized or non-existing masks. + + Fixes crash if the first XISelectEvents has a zero sized event mask. + Fixes crash if the mask provided is larger than others->xi2mask[]. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6fe235d3635aaf995dfa198c60ded1a43fe9dd45 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 1 15:46:34 2009 +1000 + + test: fix request length calculation, add length tests for XISelectEvents + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7ab1b50c545ae1a62384bedee60168e227bb2a94 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 1 15:27:29 2009 +1000 + + test: fix build after changing libxf86config.la + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 58c298acc1045927e0d90be73b8dbc8837252589 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Sep 1 15:16:17 2009 +1000 + + Xi: extra length checking for requests providing masks. + + masks can be of arbitrary length. If the client did not initialize mask_len, + some sort of boundary check is needed to avoid running over memory. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0e4dd3b2d28d3dbbfc152d6f5030901ec063a7ae +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 31 09:50:36 2009 +1000 + + Un-export ApplyPointerMapping. This is an in-server function. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a470e8426ee290046a927a17fc969235c4b1e2e7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 2 17:56:52 2009 -0400 + + Correct outdated e-mail address in "Author" statements. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 17545ed80ee3bb6a058a2748fc7bfb0fc5139fc1 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Sep 2 14:40:07 2009 -0400 + + randr: Fix crtcs using set_mode_major() + + We'd never mark the crtc as active, meaning (among other things) gamma + upload wouldn't work. + +commit 291408980f33b1e541c89d958535e6fad55fdac9 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Sep 2 20:14:30 2009 +1000 + + vgaarb: protect fini as well just in case + +commit 8aeadbff0840efc0c9a073e60d6fec0dba313060 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Sep 2 19:07:40 2009 +1000 + + vgaarb: if arb init fails, make sure locking doesn't occur. + + pointed out by Martin Jansa on irc. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit 0e46066efea4e385b2874d4a62a786957e572fe5 +Author: Jerome Glisse <jglisse@redhat.com> +Date: Tue Sep 1 13:59:47 2009 +0200 + + Xext: fix a typo for bigreqsproto.h header file + + Signed-off-by: Jerome Glisse <jglisse@redhat.com> + +commit c61d8ce1507318476b75b81bf871da19cb1bf747 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Aug 31 17:57:50 2009 -0700 + + Xext: Require newer versions of xcmiscproto, bigreqsproto, and xf86bigfontproto for new *proto.h header file names + + bigreqsproto >= 1.1.0 + xcmiscproto >= 1.2.0 + xf86bigfontproto >= 1.2.0 + +commit 1c37be80982151a5acd74fe4b960695f604f22ca +Author: Michael Witrant <mike@lepton.fr> +Date: Tue Sep 1 10:46:50 2009 +1000 + + XFree86: Linux: Fix 100% CPU usage with ShareVTs and kbd + + Leave consoleFd open over the course of the server, even though any use + of it in this context is likely to be disastrous. + + Signed-off-by: Michael Witrant <mike@lepton.fr> + Reviewed-by: Daniel Stone <daniel@fooishbar.org> + +commit 65183dc3153232943dff3cfbaacab141e7ed0e9c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 5 19:53:55 2009 +0300 + + Input: Mark Xi input events as critical + + Note that the Xi events are critical and should thus cause a flush to + the client when an input event is pending. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit a4e614d301cfa2577de1ee6a15abf023590586d1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 25 16:46:10 2009 +1000 + + Xi: Fix harmless ButtonPress/ButtonRelease confusion + + A missing break meant that ButtonPress would fall through into + ButtonRelease, but luckily it appears to have been completely harmless. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 5ef53a94ce4e48e11de26290cd677266308640c8 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 20:23:26 2009 -0400 + + alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus + + xf86SlowBCopyToBus and xf86SlowBCopyFromBus cause segfaults on my + system. + + Also remove associated slowbcopy_tobus/slowbcopy_frombus macros. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit a8e634b86d47353ef354717904fa66ebe35e1303 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Aug 31 15:53:58 2009 -0700 + + XQuartz: GLX: Drawable does not contain resize anymore. + (cherry picked from commit 1e642f22fbf029bb3917091cb5fa2f78b4a92f62) + +commit 1b30545c04a51bfa3ff95a26d64962907a62ff15 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 16:16:02 2009 -0400 + + Make sys.c use compiler.h unaligned access functions + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 9522ab9a98e98bc394703038e34b1c12aa39a179 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 16:12:29 2009 -0400 + + Remove unused Delay.c + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 4fac13ff8848bc38654b5567170fbc0d7b2c96d6 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 16:11:59 2009 -0400 + + Remove unused BUSmemcpy.c + + BUSmemcpy.c provides xf86BusToMem and xf86MemToBus, which are are memcpy + wrappers written to avoid glibc's memcpy on Alpha. glibc'c memcpy on + Alpha has improved much since this was written, so it's no longer + needed. Neither function is used inside the xserver, and no module on + my machine uses either as well. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit b65146fc8418b53b7e43dd34cc20000369475671 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 16:11:10 2009 -0400 + + Remove unused ia64_flush_cache function + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit f201705e29bdc3309dd611b461ec67740cb706ef +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 16:09:33 2009 -0400 + + Simplify unaligned access code + + All architectures should be able to use the same unaligned access code, + regardless of whether they need special unaligned access instructions. + Let's let gcc do the heavy lifting. + + In the case that we're not using a gcc-compatible compiler, use memmove. + + The xserver already requires pixman, so include pixman.h for its uint*_t + types. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 3718beb69cc5b4cdb79dd97242fce9231a26a39a +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 16:08:52 2009 -0400 + + Clean up unaligned access functions on alpha + + Checks for __GNUC__ are superfluous since the only other compiler for + the platform is Compaq C, and it doesn't support GCC style inline + assembly. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit e1fdd7671346ce374a2b77fe94b8c1a25c0520da +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 16:08:20 2009 -0400 + + Move unaligned access functions to common section + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 628b863bcc6a2a14fd3c0e6c2be4394833cc314c +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 15:53:41 2009 -0400 + + Remove unused arm_flush_cache function + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit a544139196ac7f5bc89bc642c6c5c0ea1b0bb60e +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 15:53:19 2009 -0400 + + Remove unused ppc_flush_icache function + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 52aa0495218dc7821a23b045b2c74b2a66e34616 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 15:52:39 2009 -0400 + + Replace 8 nops with proper sync instruction on mips + + Cc: Ralf Baechle <ralf@linux-mips.org> + Acked-by: David Daney <ddaney@caviumnetworks.com> + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 563fa1c5d762173cd6fb78f9e33cb960ef3153bb +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 15:52:10 2009 -0400 + + Use sfence and mfence instructions on amd64 + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 430c4af0d6e2cad03ca5f49ec6e87f3717d0d9e2 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 15:51:41 2009 -0400 + + Add x86 barrier macros + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 0d87f77a3ff4b22729220b7edcb98c6f06d0787c +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 15:51:05 2009 -0400 + + define barrier macros as nops if not otherwise defined + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 1b43ee13b30d9e3f828e94cdf686d103ce1cac07 +Author: Matt Turner <mattst88@gmail.com> +Date: Mon Aug 31 15:53:58 2009 -0400 + + Move memory barrier macros into common section + + alphabetize by architecture also. + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 295e598d9a83ff7162a093810ca9f546d00c0968 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Aug 31 20:04:51 2009 +0300 + + xfree86: remove _more_ RAC junk + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 38627b2eaf64aa8fe694fc3e1f5e4fee0c9c11c3 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Aug 31 19:36:02 2009 +0300 + + xfree86: shut up vgaarb warnings when server doesn't support it + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 79182538b43ecd35bf2b47eccfb2dd3bbcdc12eb +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Aug 31 19:25:13 2009 +0300 + + xfree86: removal of some dead code due VGA arbiter's inclusion + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 6f3cc08ec01609c7efe424ac3e30fe4ff9391007 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Aug 27 16:21:11 2009 -0700 + + XQuartz: GL: Unset GL_EXT_gpu_program_parameters for Tiger/ppc + + See http://trac.macports.org/ticket/20638 + (cherry picked from commit 0f3a89d306838b3c75a73cd1e9e2928737222b70) + +commit fdb29ebeed143fa05630966b847b05399a446ddc +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Aug 27 11:04:00 2009 -0700 + + XQuartz: GL: Explicitly set GL_EXT symbols to 0 if they are not in OpenGL.framework to prevent X11's glext.h from setting them to 1. + (cherry picked from commit 7fe37137d826d1b698e87a5b35050dd02f0a4d4b) + +commit 3be80bd98357cf362aa9a004d1292e5167d83a17 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 28 16:20:59 2009 +1000 + + Xi: silence compiler warning "type may be used uninitialized" + + GrabKey and GrabButton are only called from XI/XI2 code. Set type to -1, + just in case. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 24716b9254fa7d609792596723a192bb044a7d3f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Aug 28 22:52:48 2009 -0400 + + xace: fix up access modes in dixLookupDrawable calls from dri2. + + Referencing a screen through a drawable only requires GetAttr access. + Treat dri2 drawables as child windows (Add/Remove access). + Treat getting buffers as intent to read/write the drawable. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 0f3a64c3a5bce6cf3f00fe42cc7d1d3e69822945 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 27 15:11:12 2009 -0400 + + Add DRI2 requests to protocol.txt + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 3d17c4f6e1538986fe7b1f17614d76e28f2d1e11 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Aug 28 12:12:52 2009 -0400 + + EDID: Vendor detailed blocks aren't worth X_WARNING about + +commit 2c1a845521a31f08938b0f8d6e38835ce127c94a +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Aug 28 12:09:57 2009 -0400 + + EDID: Print 1152x864 in established timings, not x870 + + The spec says x870, but we actually use x864 because that's a real DMT + mode and x870 isn't. This might or might not be wrong, but we should at + least tell the truth. + +commit 2a806d7fa372e28d039761c9b4087cf812e8e46b +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Aug 28 16:05:04 2009 +0300 + + os: remove unused -cursor option + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 9040dab76182d1a019ca7fef7b29733d2c199e61 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Aug 28 15:50:50 2009 +0300 + + xfixes: minor clean ups on createInvisibleCursor() + + - unused return value + - no reason to declare static variable given the function is just called + once + - no reason to declare different type and cast it after. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 80ed8096f9b8e974b556a6c9f3b600fb71b994c3 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Aug 28 15:33:19 2009 +0300 + + render: delete unused headers declaration + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit f959b1e5485b93700c7da449a98182f5ce067ca2 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Aug 28 15:30:21 2009 +0300 + + render: AnimCurInit and AnimCursorCreate shouldn't be _X_EXPORT + + Pointed by Peter Hutterer on xorg-devel ml. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit e454f106dc65ecfacc154a1fa0810935022a8fee +Author: Dave Airlie <airlied@redhat.com> +Date: Fri Aug 28 11:39:42 2009 +1000 + + xf86 ddx: add vga arbiter support. + + This adds support for using the libpciaccess interface for + vga arbitration support on top of a kernel which supports it. + + Currently patches are queued for kernel 2.6.32 in jbarnes + pci tree, and shipping in Fedora kernel. + + Co-authors: + Tiago Vignatti <tiago.vignatti@nokia.com> + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit 6fffcd5825454a7fe58ffbcfb219f007cf38e731 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 27 13:43:15 2009 +1000 + + xfree86: require xf86dgaproto 2.0.99.1. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2fba2eac0b4c8d07bdf7bea20ef75ff579621728 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 11:23:23 2009 +1000 + + test: add a few tests for xtest device initialization. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 903c3db1d1685bd855dceed9e7b92890743663e1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 09:48:00 2009 +1000 + + Xext: rename Xtst* to XTest* + + This patch corrects a misnaming of XTest-related functions. + + The extension itself announces itself as XTEST. Xtst is the library name + itself, but all library functions are prefixed by XTest. Same with the + naming in the server. + + - Rename all *Xtst* functions to *XTest* for consistency with the library + and in-server API. + - Rename the "Xtst device" property to "XTEST device" for consistency with + the extension naming. + - Rename the device naming to "<master device name> XTEST device". The + default xtest devices become "Virtual core XTEST pointer" and "Virtual + core XTEST keyboard". + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8bfd23e144e51401e3756de9260a4811fcc59e91 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 09:38:15 2009 +1000 + + input: move XTest device initialization into Xext/xtest.c + + XTest devices are non-optional but nonetheless specific to the XTEST + extension. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a95f80fa914678d360f6dfd2b58926193df6ea4a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 09:26:56 2009 +1000 + + dix: use IsXtstDevice instead of the direct key lookup. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 16b7ebd7d876034edfe8f74562bd06e747879d79 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 14:34:23 2009 +1000 + + xfree86: Remove xf86GetMotionEvents from public API. + + This function was used as the default motion event queue API until + including XINPUT_ABI 2 (server 1.5). + + This API was broken with 1883485 in May 2008 (wrong casting of parameters) + and isn't in use by input drivers past ABI 3. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit af76bddd7a47092e2f0f85b2547c1cc74eb5cebc +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Aug 9 16:13:32 2009 -0700 + + XQuartz: Check NSINTEGER_DEFINED to make sure the NSInteger and NSUInteger types are defined. + (cherry picked from commit 36e02a8649c0a545084cce5fb2c5717277b9273c) + +commit 07c935b72fb14cb12f1cb5afbf8cc81f97086bac +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 25 20:11:38 2009 -0700 + + XQuartz: Use applewmproto 1.4 updated headers. + (cherry picked from commit 203df06c0eb2dcd5adfa788a1ba9569650c15f9c) + +commit 0f613007cd43545eda40825bd74ada3e6e5f36f6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 5 17:43:29 2009 -0700 + + CheckWindowOptionalNeed: Ensure w->optional is set to avoid SEGFAULT + + If CheckWindowOptionalNeed is called consecutively (and the first removes optional), then + we will SEGFAULT. This can happen in XQuartz because ReparentWindow will call + pScreen->ReparentWindow which can DeleteProperty which will CheckWindowOptionalNeed... then + ReparentWindow will call it again later indiscriminantly. + (cherry picked from commit b608c864ccc59628bd33c033393121b61580460e) + +commit e7dd1efef408effe52d0bd3d3aa0b5d4ee10ed90 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Aug 25 18:07:00 2009 -0700 + + Ensure that rotation updates happen frequently + + The smart scheduler is designed to minimize scheduler overhead by + increasing the interval between WaitForSomething calls when a single + client is running. However, the software rotation code depends on + its BlockHandler being invoked for screen updates; the long delays + caused by the smart scheduler optimizations means that screen updates + can be delayed a long time as well. + + The change is simple -- prevent the smart scheduler from increasing + the scheduling interval while any screen is using software rotation. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1740cda7a37abc7d0a169ab4555b446adaa62211 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Aug 25 16:58:07 2009 -0700 + + Perform rotation redisplay before calling driver block handler (which may flush rendering) + + The rotation block handler uses regular driver rendering functions to + repaint the screen, if those functions queue commands in the driver, + it's important that the driver block handler be invoked after the + rotated image is drawn. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4aab05e3b3231f1ec9795a66a075d17a722634a7 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Aug 25 16:54:16 2009 -0700 + + xf86_reload_cursors: fix cursor position to eliminate jumping after mode set + + xf86_reload_cursors restores the cursor to the correct position, but + that must adjust for cursor hot spot and frame before calling down to + the hardware function, otherwise the cursor jumps to the wrong + position until it is repositioned by the user. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 0f9ffc887ca1471e98df746253d9300e03e46a15 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 15:10:52 2009 +1000 + + Xi: fix XIWarpPointer up for FP3232 as input coordinates. + + requires inputproto 1.9.99.902 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5e96945cf54136afdb80cc17f67611251d59205d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 12:15:54 2009 +1000 + + Xi: fix swapping for XIWarpPointer and XIChangeCursor requests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 990d204ef8074665763ad129d0b015b7ab3ae9ef +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 09:22:16 2009 +1000 + + Xext: remove un-used extern of DeviceMotionNotify. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 80f18a73267bd3090e459de609a7006a21e6c649 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 09:21:03 2009 +1000 + + input: move CorePointer/KeyboardProc declarations into header. + + The extern declaration in xichangehierarchy.c was broken anyway. + This fixes a crash on creating a new master device. + + Reported-by: Maxim Levitsky + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b96823713129f641ee99306e3cadba8dfe21afa2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 24 09:06:29 2009 +1000 + + mi: include shmint.h if needed, silence compiler warning. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1b3859a49a3861517c9b34f6e8750f7ae0ff2b5d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 12:29:39 2009 +1000 + + Xi: add swapping hook for XIGetFocus reply. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fe430d7d3b0a85fbea9e93171423688f76dc9e1e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 12:09:32 2009 +1000 + + test: add XIQueryPointer protocol tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 285c88018ba4b3819500027c9b6a05b8c27ff2ee +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 11:38:42 2009 +1000 + + Xi: correct length field for XIQueryPointer reply. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e4ea91a02d6fac9dad844150c5d2fbe7dc9629b1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 12:12:05 2009 +1000 + + Xi: allow XIQueryPointer requests for master pointers and floating slaves. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8e396f2b806496cdcac233cc731b0322735020c3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 12:11:19 2009 +1000 + + Xi: fix swapping for XIQueryPointer request/reply handling. + + buttons_size is necessary as WriteToClient swaps the buttons_len field, + resulting in the wrong number of bytes being written later. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f1c856ef9073d9d02bc84ce1472883c8441a9758 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 10:42:15 2009 +1000 + + test: fake initialization of a sprite trace and window locations + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 58fd28f6b6bebab7f31c54e696f96d64ebb50f5a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 09:44:37 2009 +1000 + + Xi: return deviceid as error value in XIQueryPointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b41dd4328bfb8a0981d299bb60f986a2bc55fd24 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 21 09:43:46 2009 +1000 + + record: include recordproto.h, require recordproto 1.13.99.1 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 65354e5a698a5b527db09afc431110afba0e14b2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 20 10:52:52 2009 +1000 + + Xi: return BadDevice for changing device cursors on non-master pointers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ef75301854d41c6b11dd2742fa9d17a5de8a4cfa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 20 10:52:24 2009 +1000 + + dix: FixUpEventFromWindow mustn't scramble non-device events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c73cd3b265c301b8a54ffe484d6c696f2abefb46 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sun Aug 16 18:07:49 2009 -0700 + + xfree86: Link libselinux with Xorg system libraries + + Put the reference to -lselinux in XORG_SYS_LIBS so it isn't added as a + make dependency for libxorg.la. Otherwise, make goes looking for a file + -lselinux in the current directory, which it obviously won't find. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Tested-by: Justin P. Mattock <justinmattock@gmail.com> + +commit 9d8fc33cae2fee7777edd20658dbf6a3ffb3d557 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Aug 20 16:56:04 2009 -0400 + + composite: Move screen init before extension registration. + + Otherwise, you'd still advertise the extension even if no screens + actually supported it, and the first Composite protocol request would + probably crash. + +commit ae68708ebe24c4cdf8c5265e206f6913d9298f37 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Aug 20 15:45:57 2009 -0400 + + xfree86: dump /proc/cmdline in the log on Linux + +commit 0b131a5cd91cea54240777c66a9cd385029e8cb2 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Aug 20 15:28:57 2009 -0400 + + linux: Yet more malloc() avoidance for backtrace() + + Turns out, there's an initializer at the top of backtrace() that (on + some arches) calls dlopen(). dlopen(), unsurprisingly, calls malloc(). + So, call backtrace() early in signal handler setup so we can later + safely call it from the signal handler itself. + +commit 792dee3854cbede64e17fdc4736831edad295706 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Aug 19 18:20:54 2009 +0300 + + xfree86: remove bus state change notification callback + + No one is using bus notifications now. We hope that the kernel take care of + this properly. + + For other not-so-urgent-notifications (ACPI wakeups, etc) we can just register + a handler on server's scheduler (using xf86AddGeneralHandler). And for + external applications, the "trend" is to use HAL to kick notifications. So + we're already provided of enough notification schemes. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit eb031d4013d36f6aef4aba45840762ae8635cc13 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 19 15:42:34 2009 -0400 + + linux: hand-roll a backtrace printer instead of using backtrace_symbols + + Why? Because backtrace_symbols calls malloc, which you can't do from a + signal handler. Face? Palm. + +commit 75b9383d8a4c113ab3c6cfc1d5efcb5d9982a1bf +Author: Jesse Adkins <jesse_adkins7@yahoo.com> +Date: Tue Aug 18 21:13:40 2009 -0700 + + xserver doesn't stop all connections to localhost + + X.Org Bugzilla #23329: http://bugs.freedesktop.org/show_bug.cgi?id=23329 + Patch #28648: http://bugs.freedesktop.org/attachment.cgi?id=28648 + + I noticed in xserver at os/access.c that xorg tries to stop connections + to localhost by checking against the address 127.0.0.1. However, RFC + 3330 defines the localhost network as 127.0.0.0/8. This means that any + IPv4 address that starts with 127 is just another name for localhost. + +commit 2d34eace13c2016048c627c4e96c3b2399901078 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Aug 18 20:11:23 2009 -0700 + + Sun bug 6872917: Xorg not querying /dev/fb when no xorg.conf exists + + commit 48ee5558333bd324463b6994735cabb23de262ec (OpenSolaris VT support) + broke the autoconfiguration code in xf86AutoConfig.c that uses the + Solaris-specific VIS_GETIDENTIFIER ioctl on a frame buffer device like + /dev/fb by changing xf86Info.consoleFd from /dev/fb to a /dev/vt/* + device. + + This fixes it by reworking the code to split the console device + (/dev/vt/*, the vtXX CLI option) from the frame buffer device + (/dev/fb, -dev option) to allow both VT and autoconfig to work. + + It also fixes the console device to use /dev/fb when VT's are not + supported instead of throwing a Fatal Error because it can't open + /dev/vt/0. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit d225230148b3cdab3b32fce3abee26b818d4bab0 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Tue Aug 18 12:15:32 2009 -0700 + + xfree86/linux: don't change VT perms unless we're running as root + + In non-setuid root installations, we shouldn't try to adjust VT/tty + ownership. It will fail, and shouldn't be necessary anyway (since + startup scripts or PAM should be handling perms for us in that case). + + Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> + +commit 41884b8f4dfe4d931c64a6046adfefcc2b7646c2 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Aug 18 15:47:56 2009 +0300 + + xfree86: remove unused code (xf86Configure.c) + + The xorg.conf generator was not assigning correctly the primary device + ("bootable") as screen zero. So just skip this kind of routines for now. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 097376266f256e3ae37a16b343ed1e3441a8f003 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Aug 18 13:13:57 2009 +0300 + + xfree86: remove unaffected code (xf86Configure.c) + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit dd8960a9f37fbef65cb99e058c3772edfda7b6db +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Aug 18 12:53:47 2009 +0300 + + xfree86: remove stupid macro (xf86Configure.c) + + It was confusing more instead helping. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 4ec7667bb17839bd4ec11091c75ecfff317fc96c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Aug 18 12:33:35 2009 +0300 + + xfree86: remove wrong commentary + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 2e8c2b8ae6a092871838b7cceaaf4a7590bce1d3 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Aug 18 12:28:15 2009 +0300 + + xfree86: header clean up (xf86Configure.c) + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 2df414a33321ae772af1e7e52c36aec222bb3c8f +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Aug 18 12:14:27 2009 +0300 + + xfree86: reorganize xf86Configure.c + + No semantical changes. Only code moved around. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 113e66a1ffe2a43c4d1c92a7d78ca43b4db58822 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sun Aug 16 21:02:11 2009 +0300 + + xfree86: remove unused PCI header + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 +Author: Richard Hughes <richard@hughsie.com> +Date: Mon Aug 17 09:15:32 2009 +0100 + + Do not reset lastDeviceEventTime when we do dixSaveScreens + + When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the + event time else session clients using IDLETIME will be reset. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4098ad72d00e65d142fb9fe8a1194be35338508b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Sun Aug 16 00:06:10 2009 -0400 + + xace: fix access mode in dixLookupWindow within several RandR calls. + + Referencing a screen using a window only requires GetAttr access. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit d4b8f7602b5e266a0ebd3b1ba23724362cc7de3a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 10 18:39:04 2009 -0400 + + xace: fix access mode in dixLookupWindow call within ProcUngrabKey. + + Referencing a window (as grab-window) only requires GetAttr access. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 6d2f4e487869f10de4a62365b4d6de036c752ab8 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 10 18:36:53 2009 -0400 + + Add XI2 requests to protocol.txt + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 73975ef3a39ce522c6206ca800ed175fbf851dcf +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 10 18:34:07 2009 -0400 + + xselinux: Allow per-client device create contexts. + + The previous behavior was to set the serverClient's value which was used globally. + This is in support of XI2, where clients can create device pairs directly. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 66e32d252cffcd4fe7d505f1c211253f23c5002c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 10 18:33:05 2009 -0400 + + xselinux: Add more new device permissions for XI2. + + Reflects the ability of clients to create/destroy device objects. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 1f4ea22a20fdd30412a259a87eee133155e1163d +Author: Rémi Cardona <remi@gentoo.org> +Date: Mon Aug 17 11:33:24 2009 +0200 + + configure: fix help string after Xnest default build was changed + + Signed-off-by: Rémi Cardona <remi@gentoo.org> + +commit 7e37e7c50e4fdcb53296a99d90af3d90081ce9bb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 11 14:39:50 2009 +1000 + + test: add protocol tests for DeviceChangedEvents + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2851f04cb2f6e5c30267f733d867c86d4e69a485 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 11 16:27:40 2009 +1000 + + dix: rework DeviceChangedEvents a bit. + + DCEs are now processed when sent throught the master device, not when sent + through the slave device. This includes a removal of some un-used (or partly + used) fields in the DCE itself to something more self-explanatory. + + TODO: if a device has events queued and its attachment is changed, the DCE + is silently dropped now. Instead, it should be generated as soon as the + first event after the attachment is sent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c1d901d723c3bee523736eacc15b44a7dff484fe +Author: Richard Hughes <richard@hughsie.com> +Date: Fri Aug 14 11:44:35 2009 +0100 + + Don't reset the lastDeviceEventTime when doing DPMS actions + + When we change the DPMS mode, don't play games with the last event time as + this breaks applications using IDLETIME to turn the backlight off after a + preset time. + + This patch fixes gnome-power-manager and xfce-power-manager + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dca4de72d375c4b9bcdd25b151e291a77a5b06cc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat Aug 15 20:17:20 2009 +1000 + + dix: fix potential use of unused variable 'mask'. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 978b65bce14598f2d42ca0177ea58fef71fc12c5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 14 15:05:42 2009 +1000 + + include: XInputExtensionInit doesn't need to be exported. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3989dc1d34f116f30915632cc5286937392e180a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 11 16:20:20 2009 +1000 + + dix: use the XI2 defines for class types. + + Doesn't matter really, they have the same values anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fe045820f1fb33991e8bff5c6e192097caa85727 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 15:34:00 2009 +1000 + + input: move DeviceChangedEvent conversion into eventconvert.c + + The version in eventconvert.c was half broken and for some reason we ended + up with a second version in exevents.c (which works). Move it over to where + it belongs and call EventToXI2 instad of having a custom function for it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 33eb6f70816921abc5da62e434f40e78d672274e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 14 13:49:58 2009 +1000 + + include: Unexport most symbols from exevents.h. + + And shuffle them around so that the part used by drivers is up the top and + commented. + + Also, woo, the sdksyms script doesn't like declarations with return type and + function name on the same line... + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1373c2ea877b562076a4a3c97e8e4f999c977217 +Author: Dave Airlie <airlied@redhat.com> +Date: Sat Aug 15 12:14:26 2009 +1000 + + exa: clarify createpixmap2 new pitch return + +commit 48ee5558333bd324463b6994735cabb23de262ec +Author: Aaron Zang <Aaron.Zang@Sun.COM> +Date: Mon Aug 3 23:21:39 2009 -0700 + + Add new VT support for OpenSolaris & future Solaris releases + + Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM> + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 613e76ff9055d8ac2b1af1130668180646a9e14c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Aug 3 21:38:51 2009 -0700 + + Remove support for Solaris x86 releases older than Solaris 8 + + If you want to run a pre-1999 kernel, you'll need a pre-2009 X server + + [Some pre-Solaris 8 VT support is left by this patch to allow reuse by + the new Solaris VT support that follows in the next patch.] + + Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM> + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 6c292d17053eb2a7e7054e51210f423dbc0cb7e8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 14 11:48:54 2009 +1000 + + dix: update the sprite trace for all masters && floating slaves (#23257) + + When the windows are restructured, CheckMotion needs to be called for all + masters and floating slaves to update the spriteTrace. + + X.Org Bug 23257 <http://bugs.freedesktop.org/show_bug.cgi?id=23257> + + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 49046088f10cceaea7da97401d742d3fb59371f5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 14 09:48:45 2009 +1000 + + config: don't shutdown the libhal ctx if it failed to initialize (#23213) + + Regression introduced by b1c3dc6ae226db178420e3b5f297b94afc87c94c. + Shutting down the libhal_ctx if the init failed may cause an abort. + This can happen if hald is not yet running at server startup. + + X.Org Bug 23213 <http://bugs.freedesktop.org/show_bug.cgi?id=23213> + + Tested-by: Stefan Dirsch + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1545a120df6dffb5b84fe96c5a992357520b7c8d +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Aug 11 15:00:36 2009 +1000 + + exa: fix CreatePixmap2 to be useful for tiling. + + This adds a pitch return so that the driver can align the pitch to any + value it wishes and not just the one it gave to EXA at startup. + +commit db568f9eabf3450d8a023597ff007df355b13ea8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 13 16:37:00 2009 +1000 + + Xext: fix up wrong conditions for negative sync transitions. + + If the counter had a value higher than the trigger value for a negative + transition, the trigger value did not get set. + + The correct sequence of checks is: + if (positive transition) + if (counter value < trigger value) + set up trigger + if (negative transition) + if (counter value > trigger value) + set up trigger + + Red Hat Bug 501601 <https://bugzilla.redhat.com/show_bug.cgi?id=501601> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a3e50b05747cab92090ae7d7f4475cd61d3fcadf +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Mon Jul 27 20:58:44 2009 +0200 + + Add 4 missing 10bpc picture formats to the server format list. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit 36e24a6d93bd5aced4e566b80bf2d03555fab9ca +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 13 10:50:26 2009 +1000 + + Xext: add missing return code check to ProcSyncDestroyAlarm + + Introduced with 57aff88c7d0761e590806d07bee1c9410680c89f. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ce69a06aff934b2dcded8606cab079ac6465007c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 11 16:16:54 2009 +1000 + + Xi: fix up broken DeviceChangedEvent swapping code + +commit b44d34d5fd0d8aaacb89121e8b4afba04f1dcc80 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 15:32:59 2009 +1000 + + include: correct a copy/paste error in a comment. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c477ac8a151a28ba23f5c87e8f7affd6e82cfaa9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 15:15:02 2009 +1000 + + dix: re-name internal eventToClassesChanged to eventToDeviceChanged + + DeviceClassesChangedEvents (where this name comes from) have been replaced + with DeviceChangedEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit af38f6790c4c8ba1e70f5c5ba3530ded85d6e372 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 14:08:59 2009 +1000 + + test: add event conversion tests for XIDeviceEvents + +commit 3f2e4b9867b6877ee7be32b151fcaf221ef0812f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 14:07:54 2009 +1000 + + Xi: add event swapping for XIRawEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f3b2f9fb734ecfff6db9ae85b0d247856ede8112 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 13:12:40 2009 +1000 + + Xi: fix event swapping for XIDeviceEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e46f02fa2de79261221b42ab73f9daa2ce8ac650 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 09:50:16 2009 +1000 + + Xext: allocate a separate event list for XTest events (#23100) + + XTest event processing may be interrupted by a SIGIO. If Xtest uses the same + event list as the rest of the server, this list may be overwritten + in-flight. + + X.Org Bug 23100 <http://bugs.freedesktop.org/show_bug.cgi?id=23100> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8483b08152104dc619d9e44f877d2687d866355e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 7 16:11:37 2009 +1000 + + test: add focus and enter conversion testing. + + Doesn't actually convert anything, but verify the expected behaviour. + +commit 59dc59a72ffd4cbc4df207bc688c92bb4863e8a9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 7 11:23:33 2009 +1000 + + test: add XI2 eventconversion test for raw events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 10d7948e0360860e1e9633dca39f646d492e73bf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 7 10:17:14 2009 +1000 + + test: fix build error introduced by new AllocDevicePair API + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3f161a0aac39fbdeef393a17269486b8dace4672 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 10 14:14:35 2009 +1000 + + Xi: un-statify XI2EventSwap, it is needed for tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 55e1ea08d03d89ecc0f2db7652a4d15567204696 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 3 16:46:11 2009 +1000 + + Xi: get device changed data from DeviceChangedEvents, not the device (#23100) + + If a new device posts an event while the DCE is in the queue, getting the + data from the device may result in invalid memory access. + + X.Org Bug 23100 <http://bugs.freedesktop.org/show_bug.cgi?id=23100> + +commit 8ce4fde76fdf747fd3e00836c9c9c542e516ae9a +Author: Matt Turner <mattst88@gmail.com> +Date: Wed Aug 12 14:45:13 2009 -0400 + + Fix build on Alpha + +commit a400dbb38f93030d51afe806b4b20d5ef501c855 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Aug 12 17:48:36 2009 +0100 + + Xming: Add NET_WM_ICON to native icon conversion + + fd.o bugzilla #4491 + originally from a patch by Joe Krahn <jkrahn@nc.rr.com> + + Convert a NET_WM_ICON to a native icon by converting to a native + bitmap and then using CreateIconIndirect() + + Don't use icon alpha on Windows 2000 or if display isn't 32-bit, convert + alpha channel to a 1-bit transparency mask using a threshold value + + Fix warning in winScaleXBitmapToWindows() about signedness of *iconData + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 211511f150ce189681aff176c311fa8f312517e9 +Author: Soren Sandmann Pedersen <ssp@redhat.com> +Date: Tue Aug 11 14:40:42 2009 -0400 + + Disable the out-of-bounds workaround in pixman. + + This workaround was necessary for older X servers, but now fb should + be using correct coordinates. + + Also bump pixman requirement to 0.15.20. + +commit 93d9646c713336e03c135204c061f561d3654e23 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Sat Aug 8 20:18:10 2009 +0300 + + mi: fix indentation + + mieq.c looks indented-wise now. Let's see how long it will take to someone + mess it again. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit f9a2fff2248d7254958857677cabfea914ed4853 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Aug 5 21:02:29 2009 +0300 + + mi: fix cursor warping screens + + The server was processing ET_RawMotion type when the cursor was wrapping to + another screen and getting wrong valuator values. This fix such issue + considering only ET_Motion, ET_KeyPress, ET_KeyRelease, ET_ButtonPress and + ET_ButtonRelease types when the cursor detects a new screen, keeping the + "normal" processing of device events. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d573cc46d3106824902ab4f926617bd9959af57c +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Aug 8 11:32:05 2009 +0200 + + exa: more safety + +commit 8b652435cd42929e2d187b353b3b20e798569356 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Aug 8 10:35:01 2009 +0200 + + exa: minor cleanup + +commit a73f95aa93634cf7ba2c7c9274a046b2df2adca7 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Aug 8 02:31:23 2009 +0200 + + exa: Fix the broken upload fallback for "mixed" + + - Replace it with something wfb friendly while i'm at it. + +commit c029678bf7883b91f3c8095e764abbee246c9bb6 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Aug 7 20:42:30 2009 +0200 + + configure.ac: drop dependency on fontenc + + Nothing in the server uses this anymore. + +commit 3943df7f76c1b4930fb7370d9d145cee96dd562b +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Aug 7 20:36:03 2009 +0200 + + exa: one can never be too careful + +commit 1548e8ae5d28ed0eb6057a1a19cfc84a78ef34dc +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Aug 7 20:04:53 2009 +0200 + + exa: fix a potential loophole in "mixed" + + - Always free sys_ptr before setting the pixmap to pinned. + +commit e94c7c42ce9d6a194b76ba7e8b3904b180f93a1b +Author: Dave Airlie <airlied@redhat.com> +Date: Fri Aug 7 13:36:52 2009 +1000 + + parser: make libxf86config_internal.la not installed. + +commit 5fb188b547e0ef4e2f2c59b66a3183b004e4a1e9 +Author: Dave Airlie <airlied@redhat.com> +Date: Fri Aug 7 12:05:51 2009 +1000 + + ddx: fix xf86Config.a generation + + We were generating a shared library, but this lib is foobar, the parser + requires some symbols from the X server or from the program its being linked + into. If the program its being linked into (say a python .so) has symbol + visibility enabled then it will fail to dynamic link, also if this .so has + symbol visiblity enabled it will fail to dynamic link. + + Screw it go back to a .a file really unless someone cleans it up properly. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit 3047bd067464efb9857960d3fa6324b947faa970 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Aug 5 18:39:47 2009 +0200 + + exa: delay malloc for "mixed" + +commit e8ac2ed5dc4c2ac0a5e1e1f371f94c15b1c729dd +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Aug 5 16:12:16 2009 +0200 + + exa: implement exaMoveInPixmap for "mixed" + + - This can be used to force creation of driver pixmap. + - Not for 1 or 4 bpp. + - Driver can still fail (driver) pixmap creation. + +commit 9d2a7128d3e66b8c076a714d69f84bcad49391b9 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Aug 2 02:35:46 2009 +0200 + + exa: Use damage to optimise away useless copies. + +commit 03ecb164f2592c954aa408bf121e0c67b604d854 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Aug 1 19:19:19 2009 +0200 + + exa: A simple 3rd backend implementation. + + - Based on driver pixmaps with some changes (completely transparent to driver). + - It helps with the problem of known software fallbacks, such as trapezoids. + - exaDoMigration is now called for all cases that provide a do_migration hook. + - exa_migration.c is renamed to exa_migration_classic.c + +commit ac7ac913fd98ea359c05c89968ab53a3223615b4 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Jul 22 21:35:41 2009 +0200 + + exa: Split out some classic and driver allocated pixmap code into seperate files + + - Create a few seperate functions and a few private function pointers. + - Replace a few if conditions with a check for pExaPix->pDamage instead. + - This is in preperation of a third scheme that lies somewhere in between. + - Code clarity would have suffered (i started working on it and didn't like the mess). + +commit 3abbd327f4a732408119de1f8e9ecba4812772a5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 5 15:47:46 2009 +1000 + + dix: detach SD during XI2 grabs only. + + XI1 grabs on slave devices leave the device attached - just like in earlier + versions of XI. + + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c29aa7da220661532b05972cacd3dbaff29408b5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 5 15:33:07 2009 +1000 + + Revert "dix: Remove temporary detachment of slave devices." + + This reverts commit 0c0ef42292f4c910c73b308cd75d77637312da53. + + Tested-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 931160fcf378120e58849d801dbc62bed6e65a4b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 4 02:53:17 2009 -0700 + + XQuartz: AIGLX: Provide empty __glXAquaDrawableResize to avoid crashing in DoMakeCurrent + (cherry picked from commit 60a1d2c2764f2f02c0751940a264588717afce79) + +commit 0fe639a314de397516cf00d8100da8086abdd97a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Aug 1 22:53:45 2009 -0700 + + XQuartz: Only save lastpt on mouse/tablet events + (cherry picked from commit 552be074e5be6492df3e290e8b7d9daff1a2cb34) + +commit 491c2d74c12d7f9bc9f31b427ece04e049ebff5a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Aug 1 12:43:14 2009 -0700 + + XQuartz: Use mouseLocation rather than locationInWindow when setting lastpt + + I don't understand the *why* ... I just see that it works better this way for games like Quake2 through wine. It *should* be better the other way, but somehow it's not. + + I guess this will go in my list of puzzles to unravel. + (cherry picked from commit 65ae2d00e1a53f97f2ff9522406ab69d50bf3199) + +commit df6c01352471c766e9f71ceac03cab8c3911faa1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Aug 1 02:32:52 2009 -0700 + + XQuartz: Don't use location delta for tablets since NSEvent does not give a precise delta. + (cherry picked from commit 6c5bf756a7f5389cdfe2e43a339d7c31a3e522e9) + +commit e360104880e6e2e666aa05dfd56e2ef3880f38ef +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 5 16:17:01 2009 -0700 + + XQuartz: Purge redundant QuartzBell + (cherry picked from commit de14a63d20095e1537fd74352850c734d900031d) + +commit 8c0085c715effdc450d78eec14bc32e6214c78af +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Aug 5 22:50:44 2009 +0300 + + xfree86: remove more RAC junky + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 444723273ae82fc3f6707ed1a461aaaa8fdae39c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Aug 5 22:48:02 2009 +0300 + + xfree86: reorganize pci code + + - xf86PciVideoInfo doesn't need to be global + - remove unused macros + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 20169414e1afd5d1d02cb1b57866b1c158b2fc6c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Aug 5 22:44:19 2009 +0300 + + xfree86: remove unused functions + + RAC trash. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 95b678e6dc41f2524ada4eb11289687fafce7588 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Aug 3 23:49:56 2009 -0700 + + Correct modifier map built when ProcSetModifierMapping is called + + Fixes xmodmap changes to modifiers to stop corrupting modifier maps + + Previous code had two bugs: + - the code to increment mod was after the code to continue if no + modifier was set, so mod wouldn't be incremented for modifiers + with no keys mapped to them (such as if you called + xmodmap -e 'clear Lock') + - the value it set in the modifier map was the raw modifier number, + not the bitmask value for that modifier + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4ca305956e5ea6f606b22ef62aa462186a7b95f0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 5 09:40:56 2009 +1000 + + Re-enable Xnest by default. + + Xnest was disabled in 82fc102568b3d6b0daeb6c5f5b3a1310a7f14fcd due do build + errors. These errors have since been fixed. + + Re-enable Xnest by default to increase coverage by default builds. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5904ef2ccd6056b187ca76f104c21e2d686bfc1d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 5 10:40:20 2009 +1000 + + xnest: restore xnestUpdateModifierState + + The meat of xnestUpdateModifierState was ifdef'd out in + 6ef46c40e62def4841a4cff4e0b443516a2ed782. This resulted in stuck modifiers + when a modifier key release event wasn't sent to Xnest (e.g. Alt-Tab away). + + See X.Org Bug 3664 <https://bugs.freedesktop.org/show_bug.cgi?id=3664> for + the original bug report. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 44afc7577ad3339f4555438388f6a4d8e220c991 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 5 09:51:05 2009 +1000 + + xnest: include exevents.h for XIGetKnownProperty. + + Silences compiler warning. + Pointer.c: In function ‘xnestPointerProc’: + Pointer.c:64: warning: implicit declaration of function ‘XIGetKnownProperty’ + Pointer.c:64: warning: nested extern declaration of ‘XIGetKnownProperty’ + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 32ce5c83a504d2cafd2b19ed628b40032ef347b3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 5 09:39:47 2009 +1000 + + xnest: use AllocDevicePair for Xnest device initalization + + All Xnest needs is a single pointer+keyboard pair. AllocDevicePair sets them + up nicely with the name assigned etc. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 26b83ad4a29dc180b336a19d9e97589814e93e37 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Aug 5 09:32:50 2009 +1000 + + dix: require PointerProc and KeyboardProc to be passed into AllocDevicePair. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6a500fdd4d717947b86f6d6844ebf9a8603eb8e2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:29:55 2009 +1000 + + dmx: include exglobals.h for DeviceKeyPress and friends. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 591c2f8758ef36a9bbf1625f9c207a1804f58ef4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:30:52 2009 +1000 + + dmx: typecast to InternalEvent* before mieqEnqueue. + + Silences a few compiler warnings. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 15b425b5a6630d2ac95b490f4f4dbb9240ac9c5d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:31:42 2009 +1000 + + dmx: move 'state' around to silence compiler warning. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e10f802c8260e034fd6c835d3f2622d9cd5085f8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:40:17 2009 +1000 + + dmx: include inputstr.h for inputInfo.pointer + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9ffc3f280b3907a672f99101548a5eb52027b37f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:40:31 2009 +1000 + + dmx: don't call InitKbdFeedbackClassDeviceStruct - doesn't exist anymore. + + InitKeyboardDeviceStruct does the same task now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 63155cf985ee15bf6aad95066b076ab680cf5a31 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:28:30 2009 +1000 + + dmx: pass button/axis labels into the init functions (currently unset) + + Currently only None labels are passed in, in the future these labels should + be whatever the respective buttions/axes are. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit af85973a0a80fb0ba82330ae3ec897f65d618003 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:25:06 2009 +1000 + + dmx: remove now-useless defines. + + XI is mandatory so we can expect both to be defined. + +commit 654d7a02600bbafd890f555a081aa0a2fcb5e253 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:23:01 2009 +1000 + + Revert "dmx: claim we support XI 2." + + XQueryInputVersion doesn't exist anymore and for now XI 1 support is good + enough. + + This reverts commit 8da8a0fec4b1b9d9208635dedb2f449dc99e0004. + +commit e7c950c6273ff93f25c091c93d86da6e332a2277 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 15:15:24 2009 +1000 + + dmx: fix a call to XkbSetRulesDflts, takes XkbRMLVOSet now. + +commit 2cde9208ff756e33d162e2324f4b99540230d743 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 14:58:25 2009 +1000 + + dmx: Enable/DisableDevice take a boolean variable now. + + We want to send events here, so pass in TRUE. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1e210d6d10ec63d22247e5801890e024826fc861 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Aug 4 14:41:46 2009 +1000 + + xkb: remove now-unused XkbGetKeysym. + + XkbGetKeysyms was only used by the now-removed Keysym grabs. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a6ce6c70cff5108f0751b662b8e52c83daab0722 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Aug 4 23:23:21 2009 +0200 + + EXA: Simplify exaGetPixmapFirstPixel using GetImage. + +commit 842373104d08d47efc863cecbe30431d3faebef1 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Aug 4 23:23:21 2009 +0200 + + Add support for RENDER BGRA formats. + +commit 0bf7eaf3052ce24066b0a7c14860b4762fb81364 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Aug 3 23:14:50 2009 -0700 + + Ansify function arguments in VTsw_noop.c + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 736f2d64725c6df8413e627bd40ce7ecb011acc7 +Author: Paul Bender <pebender@gmail.com> +Date: Tue Jun 30 15:50:46 2009 -0800 + + Bug 16832: XDMCP related build error when --disable-xdmcp is used + + X.Org Bugzilla #16832: http://bugs.freedesktop.org/show_bug.cgi?id=16832 + Patch #27279: http://bugs.freedesktop.org/attachment.cgi?id=27279 + +commit b159a98f7fbdb3f8b337cd1bfd2ff27312856619 +Author: Lee Leahu <freedesktop-bugs@dyweni.com> +Date: Thu Oct 23 21:03:57 2008 -0500 + + seg fault when initializing DMX screens + + X.Org Bugzilla #18086: http://bugs.freedesktop.org/show_bug.cgi?id=18086 + Patch #19837: http://bugs.freedesktop.org/attachment.cgi?id=19837 + +commit 5da9b255a64bec7dbf5ddb392d54dac9be5b43c0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Aug 3 19:53:27 2009 -0700 + + Fix blddir != srcdir builds of solaris-*.il files + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=17509 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 1e69fd4a60147287b31e53bfc61543fb17bb82c8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 3 12:03:26 2009 +1000 + + xnest: fix up parameters to InitKeyboardDeviceStruct. + + IKDS takes a DeviceIntPtr as first argument, and an RMVLO struct as second. + The keysyms stuff is long gone now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 008658049cbeea35a9f76f98037aa2f4173f3573 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 3 12:00:45 2009 +1000 + + xnest: silence compiler warnings by typecasing properly. + + Events.c: In function ‘xnestQueueKeyEvent’: + Events.c:112: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c: In function ‘xnestCollectEvents’: + Events.c:141: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c:150: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c:160: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + Events.c:193: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible + pointer type + ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of + type ‘struct xEvent *’ + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 664ac92d8bbe956dd6fd80fac5dc3161028803b2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 31 14:38:35 2009 +1000 + + xfixes: backup the DisplayCursor/CloseScreen proc before restoring it (#23034) + + The screen's DisplayCursor func is wrapped as + AnimCurDisplayCursor -> CursorDisplayCursor -> miPointerDisplayCursor. + + Calling CursorDisplayCursor while an animated cursor was currently displayed + would remove AnimCurDisplayCursor from the wrap stack. Thus, the next call + to ChangeToCursor wouldn't update the animated cursor state. The block + handler for animated cursors would then continuously overwrite the actual + cursor, leaving an animated cursor everywhere on the screen. + + X.Org Bug 23034 <http://bugs.freedesktop.org/show_bug.cgi?id=23034> + +commit f48dfcc1b772a09428e328c72124ea0d46a73416 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 31 10:44:28 2009 +1000 + + xfixes: allocate CurrentCursor for all devices. + + XFixes requires cursor notifies to clients when the cursor changes. This + should work on the ClientPointer and then on all master pointers. Hence + change CurrentCursor to a MAXDEVICES array. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d3e5629fac224d53a972df5e2a87db02534f9b17 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 30 16:36:56 2009 +1000 + + dix: call SetFocusOut and LeaveWindow when disabling a device. + + PointerWindows[x] would be set after removing a master pointer. Destroying + this window then crashed the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 97ed946cfccec5979c47b5fabf1ad56cc7d33ef4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 30 16:36:30 2009 +1000 + + dix: SetFocusOut and LeaveWindow don't need parameters other than dev. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d040940efe041b57e6323921c380ceb2bb43f41e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 30 16:16:51 2009 +1000 + + xfixes: FixesHideCursor should work on all master pointers. + + Presumably, a client calling HideCursor doesn't want any cursor displayed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b83c682e7ea4e10757eca6363de28281108591a8 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Mon Aug 3 02:46:57 2009 +0300 + + xf86Xinput: xf86PostButtonEventP must set POINTER_ACCELERATE for relative events. + + Thanks to Peter Hutterer for spotting this bug. + +commit ae65daab080c6269f0eadc6be1a48bf27866c542 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jul 31 15:32:07 2009 -0700 + + XQuartz: Unify how we set our bitmasks for visuals + (cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9) + +commit 4a53fed41d711f270c7d8a7fbeaafb4fb619e879 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jul 31 14:19:50 2009 -0700 + + XQuartz: Dead code removal for StaticColor visual + (cherry picked from commit e457a44e87950207f6c16bf82bf5af11c777ecf1) + +commit da0a2747803dbecb1308181176a784e14cf02809 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jul 31 14:14:21 2009 -0700 + + XQuartz: Cleanup the bitmask setting for GLX visuals. + (cherry picked from commit d32c3df258e748958ef997c675dc4fae118c0d7b) + +commit 70ac671af2f092471022590cb7a19ef9155c51b4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Jul 30 01:30:52 2009 -0700 + + XQuartz: no DirectColor + (cherry picked from commit df2fbc410f2c484612f65a6539a6cb069ef4a468) + +commit c0c72a866a237d3c2d9e69e1c69181ef5446e3f8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Jul 30 00:51:55 2009 -0700 + + XQuartz: Define DDXRingBell + (cherry picked from commit 113347381289497cb2a79994d0ef5f427ae63ac5) + +commit 949811313989809f5b58424af04b9fd8e1d0bec4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 30 21:59:40 2009 +1000 + + test: fix build by including eventstr.h + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0565f4ed4519962bed40a0bbcf0b409471f4de40 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 16:46:45 2009 +1000 + + Xi: set the sourceid for focus devices to the device id. + + Unlike Enter/Leave events generated by a device pushing the pointer around, + a device doesn't change focus all by itself. It's a result of a + SetInputFocus call, a window becoming unviewable or a grab activating. As + such, the sourceid for focus events is always the deviceid itself. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit de4dd5848cab90b0f8b8243ca0b49985ef047124 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 16:45:34 2009 +1000 + + include: DeviceFocusEvent is not to be exported. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 46ac9f92416f3cb99b5d84a9d200237dc33a3bb7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 16:34:28 2009 +1000 + + dix: pass the sourceid around for enter/leave events. + + The sourceid for enter/leave events as a result of pointer motion is the ID + of the slave device. The sourceid for those as a result of a grab activating + is the device itself. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c299b2228fb63c192b72851c90e14ceaceb67bbc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 16:00:19 2009 +1000 + + dix: remove obsolete comment, parameter described doesn't exist. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5085ac09a50721d87196bd9f2607dc76200ca399 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 13:45:32 2009 +1000 + + input: switch internal event types to enums. + + Use enum EventType instead of ints. This requires a load of default + cases in various switch statements to silence compiler warnings. + + Reported-by: Aaron Plattner + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1ae8332d643299a3ee9a9f45a8e25b8c87c751e1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 13:39:38 2009 +1000 + + include: fix enum EventType declaration. + + Having EventType after the enum declares a variable. silly me. + + Reported-by: Aaron Plattner + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 994f7a1c814a89e90f710dac5bf6b2445fb64712 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 12:11:13 2009 +1000 + + record: silence some compiler warnings. + + warning: passing argument 4 of ‘RecordAProtocolElement’ discards qualifiers + from pointer target type + note: expected ‘pointer’ but argument is of type ‘const void *’ + + record.c:2745: warning: passing argument 1 of ‘SwapConnSetupInfo’ from + incompatible pointer type + ../include/swaprep.h:243: note: expected ‘char *’ but argument is of type + ‘struct xConnSetup *’ + + record.c:2745: warning: passing argument 1 of ‘SwapConnSetupInfo’ from + incompatible pointer type + ../include/swaprep.h:243: note: expected ‘char *’ but argument is of type + ‘struct xConnSetup *’ + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a863d636293cd7361639c1a8cf9c4f7f15da1e1d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 12:09:34 2009 +1000 + + Xi: remove FIXME and obsolete include. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fac49df08f173f091cbb77feaf373d7d465358af +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 12:07:22 2009 +1000 + + Xi: remove obsolete comment. + + XI1 only uses 7 bits for deviceids, bit 8 is used for the MORE_EVENTS flag + on the wire (when DeviceValuator events are required). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 845e65f08059e8f4bfd37356e99b48bba9416c0c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 29 11:54:14 2009 +1000 + + xkb: move XkbFilterEvents to xkbsrv.h + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8da0ff2d51086666d10ca7330d428e8610a4a0e3 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Tue Jul 28 08:20:37 2009 +0300 + + xf86Xinput: Add the xf86Post(Proximity|Button|Key)EventP helper functions. + + xf86PostKeyboardEvent also makes use of xf86PostKeyEventP to avoid code + duplication, and the valuator verification has been split into the + XI_VERIFY_VALUATORS macro. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a148d407429c7d13136b3fcafd2d279c5438df73 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 28 16:53:51 2009 +1000 + + xkb: restore XKB PtrBtn actions. + + Ifdef'd out since the switch to internal events. PtrBtn actions now work + again. Instead of generating the event directly, GPE generates the event and + it is then posted through the usual event processing routines + (mieqProcessDeviceEvent). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3d3b8babd1a5407082f1a40875ed69f62ba2153f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 28 16:51:14 2009 +1000 + + mi: update master event copying to InternalEvents. + + This is long overdue. The device events are InternalEvents now (and only one + at a time), diminishing the need for an EventList for the master event. + Furthermore, don't make masterEvent a static since this will interfere if + mieqProcessDeviceEvent is called from somewhere else (e.g. XKB actions). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f85619b14d130ec54d42cabfaee15e55ced0c665 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 28 16:48:56 2009 +1000 + + dix: update GetMaximumEventsNum() to real value (3). + + GPE and friends now use internal events so they may generate up to 3 events. + One (optional) DeviceChanged event and one raw event plus a device event. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0217d0370c0b0bce66a9c09092eda8e820274e2e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 28 14:54:30 2009 +1000 + + record: ifdef out RecordExtensionInit and print a warning to the log. + + The RECORD extension is currently broken. By ifdef'ing out the content of + RecordExtensionInit the extension isn't added to the server's internal list + and it does not get advertised to the client. Clients can thus fail + gracefully with a "extension not supported" instead of waiting forever for + events that never arrive. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4e9b2938cd8637a5d3b0a4c9f69d6ee75faab3a0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 27 16:54:33 2009 +1000 + + include: untangle events.h from the SDK headers. + + InternalEvents shouldn't be used anywhere outside the X server itself. Split + up into events.h for opaque typedefs for the events needed by various + headers and eventstr.h for the actual struct definitions. + + eventstr.h must only be included by code that requires internal events and + is not part of the SDK. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fad5f96c01811af7490a071719e4017c019a8d9b +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Jul 29 13:50:48 2009 +0100 + + Cygwin/X: Only try to build rootless extension if multiwindow extwm mode is being built + + Rootless extension still needs a bit more work to build successfully for Cygwin/X + +commit de2ae521abde445daaf025a07aa01563ca5ddd41 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Jul 26 20:48:19 2009 +0100 + + Xming: Use RegisterClassEx() instead of superseded RegisterClass() + + RegisterClass is supserseded by RegisterClassEx, so change to using that everywhere + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 764ce6ee683db342264bbca4df6379eb6093fb85 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Jul 28 16:16:57 2009 +0100 + + Xming: Use GetClassLongPtr() instead of superseded GetClassLong() + + GetClassLong() is superseded by GetClassLongPtr(), so change to using that + +commit a85523dc50f392a33a1c00302a0946828bc9249d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jul 28 22:52:33 2009 -0700 + + XQuartz: Avoid a possible spinlock in applicationWillTerminate + (cherry picked from commit f430cda0fdcc1a8fc5f4795743b40f09ff0bd869) + +commit 1e49c8d340ee8d8b6f90abcc2e2e9c390cbcd622 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jul 28 13:40:15 2009 -0700 + + XQuartz: Avoid namespace collission for BOOL in Sparkle + (cherry picked from commit 227c6e01a641b72158201553273299283cdb5599) + +commit 442967c90dd9d8483a56bdc9237c49e33d619126 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jul 28 15:02:37 2009 -0700 + + Remove hardcoded gcc -Wall option from configure.ac + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 52e9ef5664a697a31102e8761eaa03cff01d14d8 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jul 28 19:04:59 2009 +0300 + + xfree86: remove some RAC junk + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit d57361bb9ac08bec470f76ca8ca602d60c339502 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jul 28 18:55:32 2009 +0300 + + doc: remove outdated PCI/RAC/Domain notes + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 7b3d05ebd5a55f88098f4a763d1fa7ca110bb780 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jul 28 18:45:16 2009 +0300 + + xfree86: remove pci debug macros + + there's no effect when their are enabled. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 6089d9cfde533c6a7aec7dfc08aec9c8f2f18e27 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jul 28 18:29:35 2009 +0300 + + xfree86: remove RAC/resource doc + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit c553161e17ebc577ecb91ec6c81f0bdd0ae85e13 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jul 24 13:47:31 2009 +0300 + + xfree86: delete devices probe code (-probe and -probeonly options) + + Inside a windowing system, it's not the place to probe for devices. Goodbye + -probe and -probeonly. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit c09779f95a9772c0556760222dfc570dbaf8a28e +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jul 24 13:37:31 2009 +0300 + + xfree86: delete stupid video driver dump (-modalias option) + + Such stupid and ugly way to dump PCI information! Oh boy... Anyway, this + doesn't belong to the X server at all. Go away! + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 0524420622df6cbdb3872917906f7b2a6ec02958 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Mon Jul 27 15:49:41 2009 +0100 + + Cygwin/X: use GWLP_WNDPROC, GWLP_USERDATA with Get/SetWindowLongPtr + + Missed from commit b3751454cbe02ee952bab213e8c3684d429c41b3 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b1c3dc6ae226db178420e3b5f297b94afc87c94c +Author: Rémi Cardona <remi@gentoo.org> +Date: Mon Jul 27 12:07:51 2009 +0200 + + config: add HAL error checks + + This patch simplifies error handling in the HAL code and fixes a + segfault if libhal_find_device_by_capability() failed. + + Fixes http://bugs.gentoo.org/278760 + + Based on a patch by Martin von Gagern <Martin.vGagern@gmx.net> + + Signed-off-by: Rémi Cardona <remi@gentoo.org> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8898203b0d0e9fa03453b2bcd9b88843cccc3230 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Jul 28 19:35:37 2009 +1000 + + sbus: fixup for rac removal + +commit 4b42448a2388d40f257774fbffdccaea87bd0347 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Jul 28 14:47:42 2009 +1000 + + xserver: remove RAC/resource handling code. + + This changes the ABI, but since the video ABI is at 6 already + it should be fine. + + driver changes are in the pipeline after this. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit 0a168401c401727e49a12cae43a6a387b1f2928d +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Jul 28 14:19:24 2009 +1000 + + pci: add support for pci is boot vga call. + + This allows us to ask the kernel for the boot VGA device + instead of nasty guessing. + +commit b3751454cbe02ee952bab213e8c3684d429c41b3 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Jul 21 16:07:56 2009 +0100 + + Cygwin/X: Update Get/SetWindowLong() to Get/SetWindowLongPtr() everywhere + + Get/SetWindowLong() is superseded by Get/SetWindowLongPtr(), so change to + using that everywhere it remains + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit c81595e23b48368dafc054f023c1dd16bbad9494 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Jul 26 02:32:17 2009 -0700 + + XQuartz: Overhaul setting up visuals + + The main change is cleanup of the visualConfigs and setting up alpha correctly there to match the visuals being added earlier (so the default visual has a corresponding GLX visual) + (cherry picked from commit 7351db5c8746be30a4047469ee9b50bc19e62a89) + +commit 7f28c555b80dda2ed4f518efdb79733647dfea80 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 20:19:05 2009 -0700 + + XQuartz: Use CopyKeyClass to copy the keymap to the virtual core keyboard. + (cherry picked from commit 9a801d1716f005c30be076fcc9ac8dbb3e74d989) + +commit 1031ac3a7306e7a82169c79c64607696c826c47f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 20:18:38 2009 -0700 + + Revert "XQuartz: Copy the keyboard map to the core keyboard" + + This reverts commit 795de791cf18c658421d701af645718493eac51e. + +commit 48703083a1cf308306f254691d7c2ecda09b3812 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 19:34:17 2009 -0700 + + XQuartz: Use pDev=NULL for DarwinSendDDXEvent + + These events aren't really related to physical input devices anyways, so it doesn't make sense to use the pointer. + (cherry picked from commit bfe0b9cfa7af4a48dba849cab1eb152c409b4e08) + +commit b8e0f740829d0c81324aeb59222fc8e3d22493cc +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 20:17:25 2009 -0700 + + mieq: Protect from pDev=NULL in mieqEnqueue and mieqProcessInputEvents + (cherry picked from commit bf60ffb49700da367f7f88983b042a88fef7219b) + +commit dab8de036808e363a8ec9be826cff7fbcd92b953 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 15:21:12 2009 -0700 + + XQuartz: Bump the reported version to X11R7.4 + (cherry picked from commit c83f701aa75c75433b8745f5d79bca3a7516df91) + +commit 9e74bb97ab6cb83dd99ec36bd3842197263b8a8c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 10:39:26 2009 -0700 + + XQuartz: xpr: Added missing include for RootlessHideAllWindows + (cherry picked from commit 75e104730810acbb11bf8503bac24ea25243b2ac) + +commit 09b024db636f5a306c9cec3806fffde9acd3c408 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 15:22:01 2009 -0700 + + XQuartz: Use the master device in DarwinSendDDXEvent to avoid duplicate events. + (cherry picked from commit 6fa62192af937aa9656f64b516050bc099231c7a) + +commit 795de791cf18c658421d701af645718493eac51e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 25 15:25:06 2009 -0700 + + XQuartz: Copy the keyboard map to the core keyboard + + This still doesn't handle the modifier map... gotta figure out what to do now that SwitchCoreKeyboard is gone + (cherry picked from commit 427e1aab41dabb54354bfd30f2baae98ac8202c0) + +commit af8047f7816b39be7015e8cbbe085c57bb354592 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Jul 17 15:10:46 2009 -0700 + + Damage: Add devPrivates to DamageRec + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit c80ed4945ef6dd50473fab871211b71b3d20dc3c +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Jul 17 15:10:32 2009 -0700 + + Damage: Add wrappable hooks for damage create, destroy, register, & unregister. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit fb46474feb69d52d3dfdd61452ced5cfc38f6651 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jul 24 09:16:37 2009 -0700 + + XQuartz: Rever the "Set can_quit to true during a Sparkle-initiated relaunch." change + + This was in place to work around the issue that was correctly solved with the + previous commit (changing the Windows menu behavior). Reverting this change + no longer causes crashing, so it's safe to show the dialog now. + (cherry picked from commit 023cef31bbb2ab80a241098d82fcfd35ada75fc0) + +commit 0d73893a5795d5c1d28fd0287f2f1965f2ff1bda +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Jul 23 20:03:29 2009 -0700 + + XQuartz: Change handling of Windows menu to workaround a bug triggered by mixing Sparkle and X11 windows + + <rdar://problem/7088335> NSApplication releases the separator in the Windows menu even though it's an IBOutlet + (cherry picked from commit 27ac5135267be9cb221329ae68461117dd43a4bf) + +commit 171409cecbd848e5fec6334fc61a20e882e80fa9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jul 21 00:22:12 2009 -0700 + + XQuartz: Set can_quit to true during a Sparkle-initiated relaunch. + (cherry picked from commit b2e9a77111d4572402d8ca95e3368db97ba7d598) + +commit 7ff84d350b44fa40669c1d0d48a715a0bf056ece +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Jul 20 22:38:25 2009 -0700 + + XQuartz: Added a "Check for X11 Updates..." menu item. + (cherry picked from commit 305144bfa4b59791123c44e869fab93a084792d6) + +commit 1e1dbd1e462f571dad2f9684fcf4cd8ae17eedd5 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Mon Jun 29 11:46:17 2009 +0300 + + xfree86: "Staticize" functions in xf86AutoConfig.c + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 7c6b5458de9bc7f6cd972a36b56888aaa3d201ee +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jul 23 15:16:44 2009 -0700 + + Fix dist. + + * Makefile.am: Include the test/ subdirectory in the dist tarball. + + * include/Makefile.am: Move events.h to sdk_HEADERS and eventconvert.h to + EXTRA_DIST so they're included in the tarball. events.h shouldn't be + included in the SDK either, but for now it's needed by input.h. + +commit 20daa145c437c3ba67970146f6182849f87a1b43 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 23 08:33:00 2009 +1000 + + mi: fix build error caused by missing xtest.h + + xtest.h was renamed to xtestconst.h in xextproto. + Requires xextproto 7.0.99.3 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 587c3a2d1961834558193e8e14e8e381a077a253 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Jul 22 10:55:46 2009 -0700 + + Bug #22804: Reject out of bounds XGetImage requests + + The XGetImage man page states: + + If the drawable is a window, the window must be viewable, and it must be the + case that if there were no inferiors or overlapping windows, the specified + rectangle of the window would be fully visible on the screen and wholly + contained within the outside edges of the window, or a BadMatch error + results. Note that the borders of the window can be included and read with + this request. + + However, the server was only checking the requested region against the screen + bounds, allowing XGetImage requests to read pixels outside the bounds of a + window's ancestors. Normally, this would just read other pixels from the + screen, but if one of the ancestor windows is redirected, the window's backing + pixmap may be smaller than the window itself. + + This change checks the region against the window's bounding drawable, which is + either the screen pixmap, a redirected window's backing pixmap, or the root + window for servers that don't support GetWindowPixmap. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit ecd618957ebf01cb4137f98efec3faed35f8a9f5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 22 15:19:34 2009 +1000 + + dix: fix null-pointer dereference on activating enter/focus grabs. + + EventToXI2 returns a NULL event for enter/focus events since these events + aren't yet wrapped into internal events. This is a quickfix only, it works + thanks to the alignment of internal and XI2 event types. + + Eventually, enter/leave events should be wrapped into internal events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 48585bd1e3e98db0f3df1ecc68022510216e00cc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 22 12:09:24 2009 +1000 + + dix: use the event mask of the grab for TryClientEvents. + + A client that grabs for button/key events may not have the + ButtonPress/KeyPress mask set and should not receive an event in that case. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4dc91b3e54503a1be555bae5b18f3e52f58be307 +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Tue Jul 21 17:21:28 2009 +0200 + + Check if new space was actually allocated before freeing. + + There will be no new space allocated, if mode != PropModeReplace and + len == 0, or if mode is not one of the handled modes. + This fixes freeing data that is still in use, leading to double frees and + other memory corruption. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9a1bfa5664a80f03cedeb89b9f8a86115a08e7af +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 20 16:39:16 2009 +1000 + + input: remove XI2 keysym grabs, use keycode grabs instead. + + Keysym grabs are tricky in the details, keycode grabs are known to work. So + for now, provide keycode grabs only. + + Requires inputproto 1.9.99.15. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit afc3e3b5955ea4a49308399820cc4c499f4312da +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Jul 21 16:14:21 2009 +0100 + + Cygwin/X: winInitMultiWindowClass() should be static + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 9dc8106ba095474fea1474622b0f0162c8fd5aa4 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jul 21 14:34:47 2009 +0200 + + randr12: Add compatibility for XF86VidMode gamma ramps. + + Fixes screensaver fadeout effects. + + Also make all RandR 1.2 compatibility code for XF86VidMode operate only on the + CRTC associated with the compatibility output, not all CRTCs at once. + +commit 268e227ba06c027f5c56b1aaee5dcc6a2034403f +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jul 21 14:34:13 2009 +0200 + + EXA: Make Prepare/FinishAccess tracking resilient to repeated / nested calls. + + Use reference counting and do nothing unless the reference count transitions + to/from 0. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22822 . + + As a bonus, this avoids calling the driver Prepare/FinishAccess hooks more than + once per pixmap and operation. + + Also update the Doxygen documentation for the PrepareAccess driver hook to + better match current reality. + +commit de7a14ca92f99ff03c8ad204aab5be8203c86a72 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jul 21 12:55:27 2009 +0200 + + EXA: Fix up some issues introduced by 00fe4a297744c81b40f0243fb56ad848a9be6a2b. + + * Check all pixmaps involved for damage records, fixes visual corruption due to + the screen pixmap never having one. + * Fix an array size and remove a now superfluous assignment. + +commit be4dd35ffecbf49aff13aa9f604a44c9b665ae92 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jul 18 15:51:29 2009 -0700 + + XQuartz: Initial support for automatic updates through Sparkle + (cherry picked from commit c45f1be36426bceeef9af67c26351114f14f5277) + +commit 2415e2dce918efd49d5e6d71f705255a234a866b +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Jul 20 02:08:31 2009 +0200 + + EXA: Bail earlier from exaDoPutImage if the driver has no UploadToScreen hook. + + Also remove dead code associated with access_prepared local variable. + +commit 00fe4a297744c81b40f0243fb56ad848a9be6a2b +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Jul 20 02:04:40 2009 +0200 + + EXA: Completely eliminate exaDoMigration calls for drivers that manage pixmaps. + +commit 7b9915b11ed9eedd0698b4563328504d686ac4ec +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Jul 18 20:52:20 2009 -0400 + + dix: xserver "make dist" fails due to eventconvert.h (#27825) + + This header file is not in the /dix dir, but in the /include dir. + The makefile aborted and the xserver distribution files were not created. + The fix is to remove this header file from the libdix_la_SOURCES + in the dix/Makefile.am. + + X.Org Bug 27825 <http://bugs.freedesktop.org/show_bug.cgi?id=27825> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a98acb290737ac6b0776f2ea8128a4613c0f778b +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 15 13:56:19 2009 -0400 + + s/xf86EnableOutputs/xf86CollectEnabledOutputs/ for clarity + +commit 8fab7f72f2cc4ac5ca415c95ccbd05d3084f10c4 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 15 14:09:08 2009 -0400 + + randr: Add Option "Primary" to Monitor sections + +commit 053bb92145045e06f8d72c3bddb75806432faa1c +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 14:29:05 2009 -0400 + + xfree86: Remove xf86SetPriority + + GetClocks is pretty doomed to begin with, this really isn't going to + make it worse. + +commit 3637945a45d55385335833197b18703379892884 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 14:10:45 2009 -0400 + + loader: Remove a useless check. + +commit ef2bb08c76f0d1eed0c8b3e4937648f0b6ae01e5 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 13:53:00 2009 -0400 + + loader: remove dead LoaderCheckUnresolved + +commit 06a2784232b5d0e2440ed365d272abdfa1f5d35f +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 13:40:48 2009 -0400 + + loader: Remove useless TestFree() macro + +commit 087745b809b9a834751e5c719b9d87967194369b +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 10:51:53 2009 -0400 + + fbdevhw: Remove pointless OS check, this never gets built on non-Linux + +commit 892c93553aa0b03aeb3f4c27d952cc4bb7120aff +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 10:51:27 2009 -0400 + + fbdevhw: Remove a #if 0 + +commit e5712f2926abf33b146a4ccfcf6e89c914dad37b +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 10:49:22 2009 -0400 + + fbdevhw: simplify some #if 1 + +commit 8868bb4131be25340bf65ec61b998d353965bab6 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 10:44:24 2009 -0400 + + randr: Un-duplicate the reduced blanking check. + +commit 453ee39bc6a6b46e6cda11512cfcd431ba32a4b7 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 10:39:37 2009 -0400 + + xfree86: Fix some misleading comments + +commit 2c57a7aa07fdf52be315ecb498341776268c1a10 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 10:32:53 2009 -0400 + + xfree86: Remove some #if 0 + + This code all lives in xf86Modes.c now anyway + +commit 1a8c89683ff40cdd1d33da89ab47e7bd240b9bb7 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 10:15:41 2009 -0400 + + xfree86: Remove TargetRefresh option + + This was a vestige from the days before we'd make the mode list from the + EDID data, and from CRT technology when you could reasonably assume that + higher refresh rates were better. Also it did not function as advertised, + acting as a high-pass filter instead of a band-pass. + +commit b4ee3bf700e04ae1b3c4ec021373424ed6e5338f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jul 17 14:57:50 2009 -0400 + + dbe: Fix indentation + +commit 0bb9a7e1650180a24246d14493a8168487cf8914 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 9 11:49:41 2009 -0400 + + displayid: Implement mode decoding. + +commit 2f1a9c5baa367818bf017bdb72f20a2f6fa7ac21 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 9 10:13:47 2009 -0400 + + ddc: s/xf86DDCMonitorSet/xf86EdidMonitorSet/ + + Since we need a second path for DisplayID. + +commit d0cb4f5a91932e901d10cac5f2a4ba12bb8a0e6f +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 9 10:10:18 2009 -0400 + + ddc: Refactor root window property code + +commit 14103b781201bc36896cbe9112a2e0d991fb785d +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 9 10:05:01 2009 -0400 + + ddc: Don't try to publish a root window property for DisplayID + +commit c302a5ff49146bff24df196fc36ed38745d42911 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 8 17:42:10 2009 -0400 + + ddc: Skeleton for xf86DoDisplayID() + +commit 0b36f68efb1171fcdbe53e93064394f5609b7fb5 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 8 15:36:15 2009 -0400 + + ddc: mv xf86DDC.c ddc.c + +commit 8eb82168fc5c7ea958a4f63676738510647dd203 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 8 15:34:42 2009 -0400 + + ddc: Give DisplayID a place to hang its hat + +commit ace0fe09aee48d57cd0079260cd8d20d041e8eb6 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 8 14:45:47 2009 -0400 + + ddc: Yet more code motion + +commit 3a350688bbe1257feaf1502b4009f5f701d2640e +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 8 14:37:38 2009 -0400 + + ddc: Code motion to eliminate forward decls + +commit 8797831f82637b0e65a08e1262d1ec57c075cc12 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 8 14:30:53 2009 -0400 + + ddc: Update a comment. + +commit bb6fa39eb3aa044ffc18632288fd59909ff06344 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 16 17:43:31 2009 -0400 + + dbe: Adapt to new headers + +commit 9965174f4f09a7de00a9569607e96226208bc2ce +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Thu Jul 16 12:12:48 2009 +0200 + + Check dev->u.master if there is a custom event handler, too + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c806162c133603a99d9cd844bb04485bb663707d +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Tue Jul 14 13:42:19 2009 +0200 + + Always update u.lastSlave + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4db8950b1dfc3150ee2e9f1f975e9ecb4eabb1f2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 17 10:40:59 2009 +1000 + + Xext: include securproto.h instead of securstr.h + + Reported-by: Byeong-ryeol Kim + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b5f6da1e9b37f52484948185dcf17950657cd65b +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Fri Jul 17 06:34:00 2009 +0300 + + Revert "Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:" + + This reverts commit 7333dc2969f60af0abcfb28e7182a5fff9918223. + + False positive. + +commit f517fca31d8c341ad36f3de4863adb0bc5206176 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Jul 16 17:28:56 2009 -0700 + + XQuartz: Localization updates + (cherry picked from commit 4b797fc1edf2bd963410a3133e3d2182ccfda4c3) + +commit c8a35165147a9b2f747b25da80d0fdb4279a8331 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Jul 16 17:20:16 2009 -0700 + + XQuartz: Cleanup getGlCapabilities to avoid hardcoding the number of displays + (cherry picked from commit 12f7365f1f58d648217b16f09c2152fa47dcd7a1) + +commit e7bc9ff816c1848c700a376908a1411f1e20d29f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Jul 16 16:59:47 2009 -0700 + + XQuartz: Allow more than 3 OSX displays + (cherry picked from commit 45045eb3968069a8d74ce9188890a5537dc60fec) + +commit 7333dc2969f60af0abcfb28e7182a5fff9918223 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Thu Jul 16 18:57:49 2009 +0300 + + Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty: + + Event alloc_arg: Called allocation function "XIPropToInt" on "ptr" [details] + 167 rc = XIPropToInt(val, &nelem, &ptr); + + Event leaked_storage: Variable "ptr" goes out of scope + +commit 66eabbebaf1b40fed7670b7c05337ed6226dd81e +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Thu Jul 16 18:50:22 2009 +0300 + + Coverity Prevent: RESOURCE_LEAK in xf86CrtcSetInitialGamma + +commit 464e8ad733fa6afee028607d6e7d4663b4c273cc +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Thu Jul 16 17:51:08 2009 +0300 + + Coverity Prevent: NEGATIVE_RETURNS in fbdev_open_pci: + + Event var_tested_neg: Variable "fd" tested NEGATIVE + At conditional (1): "fd != -1" taking false path + 335 if (fd != -1) { + + Event negative_returns: Tracked variable "fd" was passed to a negative sink. + 347 close(fd); + +commit 53ae6b63387e04324b23b6f8311cc22a154c1fb8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jul 15 23:18:35 2009 -0700 + + XQuartz: Cleanup keymap locking, fix a possible synchro bug + (cherry picked from commit 33e7437a4984ee7c1b04b87d23dee7d4739d5f12) + +commit 6a90c7b93724a2d26eae70b5806ca06c91e7df4c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 16 09:28:42 2009 +1000 + + xkb: cosmetic fix, use TRUE instead of True. + + Rest of InitKeyboardDeviceStruct uses TRUE and FALSE. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 52088d3c2d53a91b2690f9cc402f839d77769e37 +Author: Éric Piel <eric.piel@trempin-utc.net> +Date: Sun Jun 21 18:11:28 2009 +0200 + + xserver: remove unused code in clipValuators + + The axes variables was never used, remove it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d3f6b43a240eb763025b3cbf546cb7ae502c94fa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 15 16:51:05 2009 +1000 + + Update to xextproto 7.0.99.1. + + xextproto had Xlib client headers moved into libXext. + Protocol header files are named fooproto.h, header files with constants + foo.h or fooconst.h where foo.h was already in use for client-side headers. + +commit 693babbf12cc7969c3e211c4037c7af0d41c13e9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 15 12:30:02 2009 +1000 + + xkb: Remove XKMformat.h include from xkbsrv.h into the files that need it. + + xkbsrv.h is used by drivers, they don't need the XKM format and shouldn't + require it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 35ff5cd26eb7564fefebf238e30b8d43cbb4dc25 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 15 10:29:46 2009 +1000 + + dix: fix wrong raw valuator copy + + internal events keep valuator data at the index for the valuator, not like + the wire events that start with first_valuator. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 975bf60a82f863e3bdc36fc3f8201b48a4d1e6f7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 15 10:29:19 2009 +1000 + + dix: use sizeof(FP3232) instead of 2 * sizeof(int32_t). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d040af7fa3c7314917414a28d723bdda3c4289c3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 13 15:09:38 2009 +1000 + + Update to type-specific raw events - require inputproto 1.9.99.14. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 81b64f668541217c1c9518ac4a7e3fdf0a6e4002 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Wed Jul 15 00:38:01 2009 +0200 + + Require renderproto >= 0.11 and pixman-1 >= 0.15.14 for the new blend modes. + +commit 0ce42adbf4cff9e7f049d9fc79d588ece5936177 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Wed Jul 15 00:37:05 2009 +0200 + + Render: Add support for the PDF blend mode operators. + +commit 686e4867302a741f3029c4105b997d0f0ac7c13c +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Tue Jul 14 17:11:13 2009 +0300 + + xfree86: remove a bunch of unused pci headers + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit cc575a3ba4a52265e410b325c2291fe900a54f33 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 11:38:46 2009 +1000 + + test: add tests for ProcXIGetClientPointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 92b0065a19dcde50494d2528e19a4ee76723b3da +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 11:38:00 2009 +1000 + + test: add ProcXISetClientPointer tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 019bc9d70c5b3beb69ca20b6bca3551e00415992 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 11:37:17 2009 +1000 + + test: add ProcXIGetSelectedEvents tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8579d39c12b065d8e82fe75af4b254c8ad4f4ab8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 11:36:22 2009 +1000 + + test: add ProcXISelectEvents tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 60b7a7990003a22be5cc26ebe4d8d2d0803b97de +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 11:33:22 2009 +1000 + + test: add ProcXIQueryDevice tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 441c91be05912e2665cc1d3ee72fb70dcd32e7a2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 11:32:15 2009 +1000 + + test: Add ProcXIQueryVersion tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1d635ae65b217e124b3bd5a8844e73f447eb1b79 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 11:30:53 2009 +1000 + + test: add xi2 directory, prepare for protocol testing. + + These two files provide a couple of common defines, functions and variables + that will be used in a number of protocol tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4b93413b2a490a74de2e27b37268332b609ac872 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 14 11:20:01 2009 +1000 + + Add test subdir to base Makefile.am + + If unittests are enabled, make will build those as well - spotting potential + build errors in the tests faster. Furthermore, this allows for the tests to + be run from the top-level directory. + This patch removes the "run make check to build the test suite" message + since that'd pop up after every build now. + + If unittests are disabled, this change has no effect. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e2226f3cd7d1bef598f9657b756a171b02f1a299 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 14:57:04 2009 +1000 + + dbe: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3e1a054423c22f0e35f25127dde1ea8263892480 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 14:24:45 2009 +1000 + + record: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 089c460058c4e6814d98d40179eb4c731f37fa80 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 14:22:40 2009 +1000 + + xkb: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0dc11da57562a7bbb6830ab657a2b818c596a537 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:41:29 2009 +1000 + + ephyr: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 34bfaa9d9ecd90cfe8413bc275179fdcc193eab3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:29:26 2009 +1000 + + xfixes: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e216527107fda470b92b7e526f3db22465962a43 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:27:23 2009 +1000 + + render: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1d6b71b8d0dc24355e84391ba413170a03ccdbf4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:25:39 2009 +1000 + + os: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 86b239ff9c4d01685c357ca2b1ef761d167e3224 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:24:27 2009 +1000 + + randr: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7b9e84e320a6f6449fe7bc58a8d6a094ae37b86c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:20:21 2009 +1000 + + Xext: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit aa19d355125a10b1a385c8f134d68e79d3d609c7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 10 14:25:22 2009 +1000 + + xwin: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0b4e6af857bcc5513e4c19912a54656d4696e56d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:12:57 2009 +1000 + + xquartz: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit ad508c93c239a5ba8381000c031e96caf2769265 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:12:20 2009 +1000 + + xfree86: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c20304226b3ca2f8d0a4f4866480b0d71913941c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:07:00 2009 +1000 + + glx: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 87ce93c9973067255b4197d82772f83cd4ea5d27 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:06:47 2009 +1000 + + dmx: switch to byte counting functions + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dc82e11e509ecf586d77c3e7c1325d515509ce51 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 12:03:34 2009 +1000 + + exa: switch to byte counting functions. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Michel Dänzer <michel@daenzer.net> + +commit 2d35ea8d957a955e1200ba2b14424bddfe1f4148 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 3 16:50:03 2009 +1000 + + dix: switch to byte-counting functions. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7dd415aa6a3959f15276741db168ba264948ecfe +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 3 13:57:14 2009 +1000 + + Xi: use byte-counting macros instead of manual calculation. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 912402fd71144bcee255141efe12a78abad39240 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 29 13:09:57 2009 +1000 + + include: introduce byte counting functions. + + This patch adds the following three functions: + bits_to_bytes(bits) - the number of bytes needed to hold 'bits' + bytes_to_int32(bytes) - the number of 4-byte units to hold 'bytes' + pad_to_int32(bytes) - the closest multiple of 4 equal to or larger than + 'bytes'. + + All three operations are common in protocol processing and currently the + server has ((foo + 7)/8 + 3)/4 operations all over the place. A common set + of functions reduce the error rate of these (albeit simple) calculations and + improve readability of the code. + + The functions do not check for overflow. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2c535b6f13ffbf2c4ac59834dae39bb8e172c003 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 14 08:58:23 2009 +1000 + + dix: don't send presence events for attaching/detaching slave devices. + + The code that didn't list attached slave devices for XI1 clients doesn't + exist anymore, so there's no need for these presence events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0c0ef42292f4c910c73b308cd75d77637312da53 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jul 12 21:43:06 2009 +1000 + + dix: Remove temporary detachment of slave devices. + + Previously, an active grab on an attached slave device would send the device + floating for the duration of the grab. This breaks existing XI applications + (e.g. the GIMP) since they grab all devices automatically - resulting in the + loss of control over the VCP. + + The behaviour of extended input devices during a grab in relation to the + core pointer is not specified in the XI protocol specification. + The removal of the temporary detachment restores the behaviour of extended + input devices as present in currently released servers - even if a device is + grabbed, an event from this device will result in an event from the core + pointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9f1570c8f4f549cdd2fbae1234011290fcc73e18 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 26 09:12:47 2009 +1000 + + input: include effective modifiers in device events. + + Require inputproto 1.9.99.13 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 78aedbe609e309446e71835ed15e4557d3ccf723 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Jul 10 17:35:57 2009 -0700 + + Fix int10 module build after typo in commit 2638e9899 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 35758544813f156eaac28844e693b2a28f6de316 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Jul 10 20:06:02 2009 +0200 + + EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 . + +commit 2638e9899e57d9b25a2cade3247083a6e101dee2 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jul 10 16:09:08 2009 +0300 + + configure: introduce --{enable,disable}-int10-module + + Not all chipsets need to rely on the int10 scheme to do its daily work. + + Well, the ideal would be to remove all int10 module from the server. I'll try + to provide some patches "soon" for this. Something like: + http://cgit.freedesktop.org/~vignatti/libx86/ + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> + +commit 42d95a38535f382bfb2ddfaef93839ab9bbf584f +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jul 10 15:54:07 2009 +0300 + + configure: introduce --{enable,disable}-vbe + + Not all drivers need this kind of access as well. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> + +commit 53d64930513fecaa417bb5a922966b45c9ff8679 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jul 10 15:38:51 2009 +0300 + + configure: introduce --{enable,disable}-vgahw + + Not all drivers need this kind of access. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> + +commit aafcae79d17c1f802bc880d2142af7171fed75d8 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Fri Jul 10 14:56:31 2009 +0300 + + xfree86: remove unused vbe header file + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> + +commit 3711d68f657c77b947cc4670cc4eac4f62de3af8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 10 11:10:30 2009 +1000 + + Revert "XKB: Sanitise * actions" commits (#19602) + + Reverts the following four patches: + + feb757f384382c7782ceac55 "XKB: Sanitise vmods for redirected keys" + b5f49382fe48f0a762d9a15f "XKB: Sanitise ctrls action" + 1bd7fd195d85681e722161f8 "XKB: Sanitise pointer actions" + 61c508fa78aa08ea2666fde9 "XKB: Sanitise vmods in actions" + + Strictly speaking, the structs used in the server are not part of the client + ABI. Practically, they are as we copy from the wire straight into the + structs. Changing the struct sizes breaks various wire/server conversions. + + Even when the structs have the same size, some internal magic causes + conversions to fail. Visible by diffing the output files of: + setxkbmap -layout de; xkbcomp -xkb :0 busted.xkb + setxkbmap -layout de -print | xkbcomp -xkb - correct.xkb + + Interestingly enough, busted.xkb is the working one although the output is + incorrect. Revert the four offending patches until the exact cause of this + breakage can be determined. + + This patch restores functionality to Level3 modifiers. + + X.Org Bug 19602 <http://bugs.freedesktop.org/show_bug.cgi?id=19602> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 08df24555cb432eb0d90a3f63275e9485e777c4c +Author: Soren Sandmann Pedersen <ssp@redhat.com> +Date: Thu Jul 9 17:23:04 2009 -0400 + + Reserve space for two GC values in copy_drawable(). + + Pointed out by Pierre Willenbrock. + +commit 3c53f3241319d96affad2f4539f7661e02e80521 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 9 17:21:07 2009 -0400 + + Since font modules are dead, don't mention them in xorg-server.pc + +commit e812103382a7bc3f7ba8b2f44ab97960dec265a9 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 9 10:58:17 2009 -0400 + + config: drop i810. + + The driver assuredly no longer builds against 1.7. Please don't feel + compelled to fix it. + +commit 55ac155d42268009eaecbc183329a8744d6ae48c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jul 7 16:59:39 2009 -0700 + + Xephyr & Xserver man page fixes + + Xephyr(1): Fix quote formatting, add missing ' to contraction + Xserver(1): Add Xephyr(1) & startx(1) to SEE ALSO section + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 36dc66ae79b6e1cbe0a23587e32aebb68365b0d0 +Author: Michael Lorenz <macallan@netbsd.org> +Date: Tue Jul 7 20:21:39 2009 -0400 + + The way XaceHook() mixes struct initializers and va_arg() is not portable and + gives bogus data on sparc and probably others leading to a crash. + + Fix: + Don't use initializers, instead set each member directly to enforce order. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 48a9d65b88f56d1f8ab3bf824a4fe48c2f68725f +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Jul 5 16:06:32 2009 +0100 + + Cygwin/X: Window positioning improvements for multiwindow mode + + A few tweaks to winUpdateWindowPosition(): + + * Don't allow window decoration to disappear off to top or left edge of the + display as a result of adjustments to add decoration for the window style + + * Honour the position requested by window geometry for the client area (so + windows which save their position don't get moved by the decoration width + every time they are created) (unless we need to bump it away from top or left edges) + + * Fix an issue with initial window placement being offscreen on multimonitor + systems when some monitors have negative coordinates (are to the left of or + above the primary monitor) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 5aec72745232dd61e60cfbf3acc4628d4fcd0315 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jul 6 11:53:02 2009 -0700 + + Remove old DRI2 buffer alloc/free interfaces + + These old interfaces are no longer supported by the server, removing them + requires bumping the video driver ABI. Note that this is not guaranteed to + be the last change in ABI version 6. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Reviewed-by: Eric Anholt <eric@anholt.net> + +commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 1 14:01:57 2009 -0700 + + dri2: Preserve compatibility with 1.6 DRI2 API/ABI + + The old DRI2 buffer allocation API wasn't great, but there's no reason to + make the server stop working with those drivers. This patch has the + X server adapting to the API provided by the driver, using the new API where + available and falling back to the old API as necessary. A warning will be + placed in the log file when the old API is in use. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7c7f0c2c6a04f7044d5ce69e97a615735e5831f1 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Fri Jul 3 14:36:54 2009 -0400 + + Use IncludeInferiors when copying windows before compositing. + + Part of bug 22484. + +commit 43ee8d2ead862f84a4526a472519663ef27a8d6a +Author: Matthias Hopf <mhopf@suse.de> +Date: Wed Jun 24 18:26:23 2009 +0200 + + Unclaim PCI slot if driver probing fails. + + Otherwise no subsequent driver will be able to claim this pci slot. + Example for this: fbdev tries to claim, but framebuffer device is not + available. Later on VESA cannot claim the device. + +commit 73abdc94c3cceadeda26a9b6bd3cdfecf0df8db2 +Author: RALOVICH, Kristóf <tade60@freemail.hu> +Date: Sun Jul 5 16:42:54 2009 +0200 + + glx: damage is only used with DRI + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 7208a0f032d487bd3bc9809800f4557f1da1e2db +Author: RALOVICH, Kristóf <tade60@freemail.hu> +Date: Mon Jun 29 15:18:56 2009 +0200 + + glx: remove Xgl leftover + + GlxSetRenderTables was only used by the long gone Xgl. + + Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> + +commit 89cf81cd85919e3dbb5adff5e6c6056c7990b60f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 3 10:29:40 2009 +1000 + + Xext: return BadValue for XTestFakeInput on unsupported capabilities. + + Calling XTestFakeDevice*Event on a device that doesn't allow the matching + event returns BadValue. + + Reported-by: Florian Echtler + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b773b4e8e0087993406d1d8c2df895db4d6301ff +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 6 11:04:47 2009 +1000 + + s/MAX_DEVICES/MAXDEVICES/ updates. + + The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6) + Two comments updated to refer to MAXDEVICES. + + MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more + than 15 physical input devices were present, this could result in a + failure to install the SIGIO handler for any device above 15. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 183c075d2f9d5f6effa1ce7ab135fb0c2e46085a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 3 13:26:48 2009 +1000 + + dix: always init the full button map to default values (#22594) + + Master devices must have the standard button map applied for all buttons to + ensure buttons larger than 7 (the default for MDs) are mapped appropriately. + + We can't copy the button map from SDs to MDs since that breaks the chained + button mapping. However, by ensuring all buttons (even non-existing ones) + are mapped, devices that send such buttons continue to work. + + X.Org Bug 22594 <http://bugs.freedesktop.org/show_bug.cgi?id=22594> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 744bb559826ede37a77e9000b6c620eaa6a3c837 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 3 13:58:38 2009 +1000 + + Xext: remove unused variable 'it'. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fd4eed69e40cf090aa16e79a8596eb1442461829 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Jul 2 15:24:54 2009 -0700 + + dri2: Enable GLX_SGI_make_current_read when the DRI driver supports it. + + This matches idr's 82f150d73cc9a7d8eaf7241a51b03af05bcec159 for DRI1. + +commit d6b8205e699c0c62af76c4a9cbff1402337927b3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jul 3 19:25:33 2009 -0700 + + XQuartz: ProcAppleWMAttachTransient to play nice with the new Dock in SL + (cherry picked from commit ddc0242d8f291d0f961ba9aa8c883e39861ce2ad) + +commit a49ae50370ec94e08e7dec3c742d33e20e79ef36 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Mon Jun 29 22:55:52 2009 +0100 + + Xming: Apply window style hints in -multiwindow mode + + Remove frames from 'dock' windows and make them topmost in -multiwindow mode. + Remove frames from windows with MOTIF_WM_HINTS of no decorations in -multiwindow mode. + Apply some _NET_WM_STATE hints in -multiwindow mode. + Apply window styles overrides from .rc file + Correctly update region of shaped windows when applying styles + + Copyright (C) Colin Harrison 2005-2009 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + +commit 17e67c407d130c325d3899c18d68b8eef6a88bea +Author: Joe Krahn <jkrahn@nc.rr.com> +Date: Wed Jun 24 23:32:09 2009 +0100 + + Cygwin/X: Change to a single native window class for all X windows + + from fd.o Bugzilla #4491: + + There is no point in having one class for every window, aside from trying to + set custom icons via the class, which we no longer do, so converted to using + a single class for all client windows. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 2c69deb92e11542f615df0f24fdc03e3b4415475 +Author: Rémi Cardona <remi@gentoo.org> +Date: Fri Jul 3 10:51:50 2009 +0200 + + configure: libXinerama isn't needed anymore + + since libXinerama commit 90d4d23bf2e94721149ddc0a80093b10a82e8845 and + xineramaproto commit 21477147613c28c968b5e1eb9d8aea7017dd399d, the + server no longer needs libXinerama. + + Signed-off-by: Rémi Cardona <remi@gentoo.org> + +commit 97e29ffb5bf04a9d8280f1fa32ceced148503492 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 3 09:52:04 2009 +1000 + + xfree86: fix wrong IsMaster() check causing crashes. + + Crashes caused by dereferencing NULL if the path was executed for a floating + slave device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 50a2a8dc76645d8736f7d712f0ef05f23089407e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 3 09:18:57 2009 +1000 + + Fix IsXtstDevice - returns false positives since 0814f511d5. + + Missing check for the value of 'mid' returned false positives if master was + NULL. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3525d140567e0ad5f0184e4b37893c47239e1628 +Author: Felix Kuehling <felix.kuehling@amd.com> +Date: Tue Jun 30 20:07:30 2009 -0400 + + Export symbols needed by the RandR implementation in fglrx + + GIT change + http://cgit.freedesktop.org/xorg/xserver/commit/?id=45c8bd0fe54273039fdaa1eeeafb81b5774f2c75 + changed the default symbol visibility of the Xserver. As a result 2 symbols + that are needed by the RandR 1.2/1.3 implementation in the fglrx driver are no + longer visible: + + xf86configptr + xf86CursorScreenKey + + We would like to get these two symbols _X_EXPORT'ed before Xserver 1.7 is + released. Otherwise it will be problematic for fglrx to support RandR 1.3 on + Xserver 1.7. + + In the future, we may want to sync our RandR implementation to later versions + of the RandR implementation in hw/xfree86/modes. Therefore it would be nice if + all symbols used by the Xserver RandR implementation were _X_EXPORT'ed in the + future. + +commit e13605ea40cfc671314a0086c75b917564298b55 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 23 14:09:22 2009 +1000 + + dix: introduce "Xtst Device" label property. + + Xtst devices get this property assigned automatically so they can be + detected easily by a client. + The property is read-only. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0814f511d56a89c7b1868b17eba7a89f990b9ab1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 23 10:50:52 2009 +1000 + + input: store the master device's ID in the devPrivate for XTest devices. + + Rather than storing a simple boolean in the devPrivate for XTest devices, + store the actual master device's id (since it is constant for the life of + the device anyway). + + Callers should use GetXtstDevice now instead of digging around in the + devPrivates themselves. + + This patch allows for a cleanup in the creation of new master devices since + GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and + similar. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> + +commit 1bcc0d3c244ce7d9f5cbab626aa5fd5784b41a1c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 22 16:55:12 2009 +1000 + + input: abstract Xtst device lookup + + The callers should need to use the dev privates key to look up xtest + devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> + +commit 34424fab9abd7a4ca11036be25414129980db0e0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 23 11:50:29 2009 +1000 + + dix: set the client's error value to the bad deviceid in check_butmap_change. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit da04e8f1354fa9d253443489dc002b16f94d6fab +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Jun 30 17:52:42 2009 -0400 + + dix/property.c: use memcpy where appropriate. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 65d74d93145d22b68bad5728a7ebe38dc662cb21 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed May 20 21:32:54 2009 +0100 + + Cygwin/X: Fix multiwindow extwm mode to build again + + Build and link with rootless extension + Update Xwin code for removal of RootlessAccelInit() + Fix Xwin code which now has a collision with the type name EventType + + Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 638ca9a7a2363757dc5b5d456e10d34f6f158885 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon May 18 18:14:41 2009 +0100 + + Cygwin/X: Avoid a visual glitch on window move in rootless modes + + Handle and ignore WM_ERASEBKGND since we repaint the entire invalidated region anyhow + (this avoids a white flickering on window resize) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b718b2e0880cf2b969675da98d5ef8a4a01ca5d6 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon May 18 18:14:09 2009 +0100 + + Cygwin/X: Allow pointer warping to work in rootless modes + + Mouse pointer warping in multiwindow/rootless mode was never implemented, + due to concerns that moving the mouse pointer without asking might be rude + + This patch allows X applications to move the mouse pointer in rootless modes, + Let's hope they don't abuse this privilege ;-) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 85614946ba3d5a233eece612afc7f09572a347c2 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon May 18 18:13:08 2009 +0100 + + Cygwin/X: Improve mouse tracking for moving/resizing undecorated windows + + In -multiwindow mode, tell Windows we wish to capture the mouse when a button + is down. This causes Windows to continue to send movement events for the mouse + even if the mouse pointer moves outside the window frame. + + This helps greatly with undecorated windows which have regions you can grab + to move (e.g. gmplayer, xine control panels) or resize (e.g. Songbird) the + window, as it means the window continues to receive the mouse motion even if the + mouse pointer moves out of the window (which presumably happens if we don't + manage to update the window fast enough to track the mouse pointer) + + Consolidate the multiple instances of the code to start the mouse position + polling timer into a new function winStartMousePolling(), and use that to + restart the polling timer when we release the mouse. + + Also, start the timer on WM_SHOW, so that xeyes will track the mouse position + when it is first shown, even if the mouse doesn't enter it's window + (You probably need focus-stealing turned off to see this problem) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit f351c10a9774cc0ea2cbb58f00f07ece7f7c6e73 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Mon Jan 5 16:17:30 2009 +0000 + + Cygwin/X: Man page fixes + + Correct path names in man pages, using cpprules.in + Install XWinrc man page into section 5 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 5c1afac5eea1d8327c74342d12d082b75f0cebde +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 29 11:16:16 2009 -0400 + + EDID: Fix timing class names to match the spec + +commit bf0f3b8f2bc830c8bd6f8f9410b89394b8d96257 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 29 13:31:02 2009 +1000 + + test: fix build error introduced by XINPUT_ABI 7 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cbeb6a73c44143674a700d36a7e9804d41003a4f +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Sat Jun 20 20:17:41 2009 -0400 + + dix: report subpixel coordinates for high-resolution devices + + Acked-by: Simon Thum <simon.thum@gmx.de> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 069b4c5f0a38649de73d1e0f70ee81bf862399dd +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Jun 20 18:57:22 2009 +0200 + + dix: make part of ptrveloc.h internal + + Though this is a SDK header, some functions are intended solely + for the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2830e8493757e0da1253fe5ab280562b84730e77 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jun 24 11:33:19 2009 +0200 + + dix: rename pDev->dev, pVel->vel for consistency + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 373e8c960d00e2b8c2250dd3f66859b081e14854 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jun 24 11:16:24 2009 +0200 + + dix: improve pointer acceleration API + + This makes the ptr accel api actually sensible from a driver + perspective, since it avoids superfluous device lookups. + Also, makes independent accel contexts possible. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b8050bb6deebdb1ee60731f63884ffca575c09ce +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jun 27 15:28:34 2009 -0700 + + XQuartz: Don't leave zombied processes at startup + (cherry picked from commit 40c1406830588fa85d880e9f4e9ca570db1db306) + +commit aaff92c8c22a47804a21010d023ef76d82e7ec7e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jun 27 14:40:03 2009 -0700 + + XQuartz: 64bit fix for screen origin in AppleWM + (cherry picked from commit 60a757d2802a5c34acd91ca9a052937b5a169ede) + +commit cabcc1a7ad697dde915794ddcea6a300f66b0a28 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jun 27 10:40:59 2009 -0700 + + XQuartz: More localization updates + (cherry picked from commit 5925c1f48ad05bf94195b986c1fdefc52a20ae42) + +commit 31166c2ae0ce898c96995a8b16b58b127dc85a2f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 26 16:51:22 2009 -0400 + + xace: add a new hook for checking property content after it has been set. + + Allows security modules to enforce what property contents can be set by + clients. Uses the new DixPostAccess bit to distinguish between the + existing call made during the lookup (with the old property data) and + this new call. Note that this only applies to writes, prepends, or + appends to existing properties; for new properties the existing + DixCreateAccess hook call may be used since it includes the new data. + + Refer to the XACE-Spec document in xorg-docs, section "Property Access." + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 51105de9b0d865c4b5e5a7d9ab23c89d808d1cfa +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 26 16:50:12 2009 -0400 + + xselinux: ignore property hook calls with the new Post access mode bit set. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 10812204b3415c969bcebd3215e84d758a0b4dd8 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 26 16:48:24 2009 -0400 + + dix: add a new DixAccess bit, "DixPostAccess". + + This will be used for follow-up checks after a client has written something, + for security modules that enforce a set of valid values a client can set. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 9480725af0275b72b24b9e1cb3b68d5b97288d01 +Author: Rémi Cardona <remi@gentoo.org> +Date: Wed Jun 24 10:12:50 2009 +0200 + + xfree86: DIST_SUBDIRS should not contain variables + + This patch reverts a change done in commit + 800d4ceb946c93724661ebfd28afb658ca63b6b1 to add conditional XAA support + + Signed-off-by: Rémi Cardona <remi@gentoo.org> + +commit 84662e40c3d4141ebb298a1ad714f75056a4ab74 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 18 23:19:21 2009 -0400 + + Xi: check for GetAttr permission when listing or querying devices. + + If the check fails, leave the device off the returned list of info + structures. Under XI2, this may cause inconsistent views of the device + topology after a change (for example, devices disappearing from view, + or showing as attached to a master that cannot be seen). More work is + needed to deal with topology changes and device relabeling. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 00bc8d34c68dab6c818cd1c7e03e9992d1d0cbfc +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 18 21:41:17 2009 -0400 + + Xi: check for Use permission on the device in SetClientPointer(). + + Presumably, some intelligent, XI2-aware management app will be calling + XISetClientPointer on behalf of other clients; this check makes sure + the target client has permission on the device. + + Requires changing the prototype to return status code instead of Bool. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 119b96667778391436998c76a68bf64e746c9e08 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 18 21:02:28 2009 -0400 + + Xi: fix up access modes for calls to dixLookupDevice(). + + New access modes are being passed to the device access hook for XI2: + DixCreateAccess for creating a new master device; + DixAdd/RemoveAccess for attaching/removing slave devices to a master; and + DixListProp/GetProp/SetPropAccess for device properties. + + Refer to the XACE-Spec document in xorg-docs, section "Device Access." + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 07c36e4fdcd93df3d33bdab6cca4780ebc9c1f54 +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Jun 10 13:33:47 2009 +1000 + + dix/resource: fix use after free in resource code with DRI + + LookupClientResourceComplex is used by DRI1 code to find and free a DRI + drawable in a callback, however when the DRI code returns this->value + is now pointing at freed memory. It seemed easiest to store the value + to a temporary and return it afterwards. + + Another option might be a new FreeClientResourceComplex or one that + also returns the id, so we can free it using an alternative means. + + found using valgrind. + + amended along ajax's suggestions + +commit 184deb9bc325eb7aa7eb7b7d4f98aa917f0269cb +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Jun 24 10:40:05 2009 +1000 + + GLX: make function static. + + This function isn't called from anywhere else and I don't think it shuold be. + +commit 9d85b56078ec05da1369ca22930d8eb214c389db +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Jun 24 10:38:49 2009 +1000 + + GLX: note the implicit flushes with ReadPixels in indirect contexts. + + This just notes the flush has occured when readpixels returns, and + fixes the glean test. + +commit e341512bfa40dd98853a20596dc65dcac4dcaa37 +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Sat Jun 20 21:37:59 2009 -0400 + + dix: update a comment + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5cbd4d3d6e54d202ecdbb527b57aaefeb8435600 +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Sat Jun 20 20:17:04 2009 -0400 + + dix: do away with an instance of temporary in-place modification + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 94cdc1ef0a72802573a11ba292e2f5cc8474aa8e +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Mon Jun 22 13:00:37 2009 -0400 + + dix: deal with first_valuator > 0 correctly if POINTER_SCREEN is set + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 21cbb4c9de44e2629dc0fa6f647ce2d139f2cef0 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Wed Jun 24 00:24:44 2009 +0300 + + xorg-server.h.in: Export the X Access Control Extension (XACE), too. + + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 800d4ceb946c93724661ebfd28afb658ca63b6b1 +Author: Tiago Vignatti <tiago.vignatti@nokia.com> +Date: Wed Jun 24 00:13:32 2009 +0300 + + configure: Provide the --enable/disable-xaa option. + + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit ce3d539ac6ecab3e343cef7c4dc112bc82ea3b02 +Author: Oliver McFadden <oliver.mcfadden@nokia.com> +Date: Wed Jun 24 00:08:51 2009 +0300 + + xf86Config: Avoid attempting to load non-compiled modules. + + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 33e25143361d63ea776dfafeeb6d4ffb2f6fd8d4 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Fri May 15 22:42:30 2009 +0100 + + Cygwin/X: add hebrew to autodetected keyboard layouts + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b079945c39e2a72220b46953352e24c3a74ef39a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Feb 20 15:21:35 2009 +0000 + + Cygwin/X: more warnings fixes + + More warning fixes, mainly removing casts on function return values + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit e79db6a97d02c8a256a4a7e145ea0b48b5a084ab +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Feb 11 23:00:58 2009 +0000 + + Cygwin/X: Remove an obsolete mention of xf86Config + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 3020b1d43e34fca08cd51f7c7c8ed51497d49ef3 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jun 23 16:45:40 2009 +0200 + + glx: Clean up more thoroughly if the drawable of a current context goes away. + + Fixes crash when restarting compiz, due to cl->currentContexts[x] being stale. + +commit df597709d71f47b8516e27c6fb1bfffd59de5e48 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jun 23 16:45:39 2009 +0200 + + dri2: Don't crash if pPriv is NULL. + +commit 048697ccfa31cf7f7a29afa90a2f702d43efb7d4 +Author: Ben Skeggs <bskeggs@redhat.com> +Date: Wed May 27 15:24:34 2009 +1000 + + quirk: use first detailed timing as preferred for PEA prod 9003 (rh#492359) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 07154db4a8b96467785fd6be93d20379acacffa8 +Author: Ben Gamari <bgamari.foss@gmail.com> +Date: Mon Jun 22 08:59:45 2009 -0400 + + Xi: Remove redundant and incorrect butmap range check + + Maps are CARD8s, therefore checking for values above 255 is completely + unnecessary. Moreover, 0 is a valid value for maps, so the check wasn't + even correct to begin with. This fixes bug #22392, which was uncovered + by commit 280b7f92d729ec910ffa3d18dce7bbc215be7a3c. + + Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 96706c24bd57fbd9b11e5bd5e38d05d81b90aebe +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 18 15:40:08 2009 +1000 + + dix: fix wrong indices in set_valuator. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ae20e748cd3a656173e1f50109bfd4af0712bb87 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jun 19 21:16:10 2009 -0700 + + XQuartz: More localization updates + (cherry picked from commit 7fbe974246f54535c545861a57c043d80e127ee7) + +commit 30df49f54945e75f033a0eb6445c26d37eb33c5e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 18 23:15:47 2009 -0400 + + Xi: fix 2 memory leaks. + + In ProcXIQueryDevice() and XISendDeviceHierarchyEvent(). + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit eb35402d0a5290e8a73d7d1e92f173294c364cc2 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jun 19 12:42:07 2009 -0400 + + pci: Dump vendor/devices ids in the printed device list + +commit c733660428c0a7c1d11f7bd21e23e1bb934d352e +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Fri Jun 19 08:37:18 2009 -0400 + + Use pixman_version_string() instead of PIXMAN_VERSION_STRING + + Pointed out by Julien Cristau. + +commit aef6b904ebf0d7de6259058606c7c04ea177bda3 +Author: Dave Airlie <airlied@panoply-rh.(none)> +Date: Thu Mar 13 16:16:46 2008 +1000 + + fbdev: make entity fail if PCI claimed already. + + bad kitty fbdev, been shipping this in Fedora for a while now + +commit 3efb23a6c40dc3583d083d25ada3853ecc56000d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 18 19:35:22 2009 -0400 + + xselinux: Add new device permissions for XI2. + + Refects the ability of clients to add/remove devices and device properties. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 1e060c3d8b13d352a58fc65980cb9a3c6cb5718f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 18 18:48:24 2009 -0400 + + xselinux: Move the security class mapping to the header file. + + Take the mapping of DixAccess bits to Flask permissions, move it + into the header file, break up the extremely long lines, and + annotate the permission names with the bit being referenced. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 75c51c67b340548286efd41a53882e2acaf74ab5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jun 18 09:49:12 2009 -0700 + + Clarify use of and need for mffs vs. ffs + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 128cd03eecacc6d5c5903d59a11966dcf3697bf1 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Sat Jun 13 10:55:04 2009 -0400 + + Fix miComputeCompositeRegion() to follow new clip rules. + + Ignore the hierarchy clip, and always apply any client clip after + transformation and repeating. + +commit e9aa61e9f0d663d5b34a397b943b4d1df44e873d +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Sat Jun 13 10:28:21 2009 -0400 + + Fix clipping when windows are used as sources + + The new clipping rules: + + - client clips happen after transformation + - pixels unavailable due to the hierarchy are undefined + + The first one is implemented in pixman; the second one is realized by + making a copy of window sources (to prevent out-of-bounds access). + +commit d9b5e77a0e48a16c53653b56bc61a0b8dc4122a1 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Tue Jun 9 14:36:21 2009 -0400 + + Print the current version of pixman. + +commit 1e9907499c27321a2aa5dc8a75a375b7a82c999a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 18 15:14:00 2009 +1000 + + record: use dixLookupResourceByClass instead of LookupIDByClass. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 66089e9129a821cfb1983d3d35f41b975a52de5e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 25 12:55:42 2009 +1000 + + xfree86: fix SWCursor check in xf86CursorSetCursor. + + Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when + the pointer left the screen (in a Xinerama setup). + We must call the sprite rendering function if + - SW cursors are enabled, or + - The current device is not the VCP and not attached to the VCP. + + Reported-by: Gordon Yuan <GordonYuan@viatech.com.cn> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit afa680e495622f521cae80563511c0d284f57551 +Author: David Miller <davem@davemloft.net> +Date: Thu Jun 11 05:15:05 2009 -0700 + + mi: ignore DGA events in ChangeDeviceID + + DGA events don't have a deviceid, so they don't need changing. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cd8abd17abcc8ae9da6704d03b97a9f134f36aab +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Jun 17 14:17:07 2009 +0100 + + Cygwin/X: Fix permuted args to InitPointerDeviceStruct() + + Fix a minor error in commit a30fef9956b296f59ea18a9ee38d0abafeb15a4e, + new btn_labels argument to InitPointerDeviceStruct() wasn't added in + the right place + +commit 14581afb474552716c02ca15220ca7050123c375 +Author: Benjamin Close <Benjamin.Close@clearchain.com> +Date: Thu Feb 26 17:32:10 2009 +1030 + + xfree86: correctly define barriers for FreeBSD amd64 + + Previously when compiling on freebsd amd64 we'd end up at xi86 + block (line 1315) which would define mem_barrier and write_mem_barrier + to be NOP's. Instead they should be valid, as per the linux amd64 setup. + + This stops the hangs experienced by many when using the nv driver + which would hang due to out of order dma requests as noticed in + http://bugs.freedesktop.org/show_bug.cgi?id=3168 + + Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com> + +commit e92dcb6ce07aa3cfb53e8bad5701481c106c4094 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 18 14:40:20 2009 +1000 + + input: unify button numbers on master devices. + + Master devices provide the union of all attached slave devices' buttons, + i.e. the number of buttons on the master device is always the number of + buttons of the slave device with the highest number of buttons. When slaves + are attached or detached, the master device adjusts the button number to + reflect the new buttons. + + On a slave switch, this slave's button labels are copied into the master (up + to slave->num_buttons). The remaining button labels (if any) stay as they + are. Thus, if any of the higher buttons is still pressed, it reflects the + label of the last pressed device that provided this button. + + If two devices press the same button and it is differently labelled the last + pressed one will be reflected in the master device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 280b7f92d729ec910ffa3d18dce7bbc215be7a3c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 17 22:38:24 2009 +1000 + + dix: reduce MDs and xtest pointers to 7 buttons by default. + + MD's will soon be the union of all devices anyway. XTest pointers are only + for the core protocol XTest stuff, so 7 buttons (lmr + 4 wheel buttons) + should do. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6c7d992735eebbd7a20247926e7725896348b865 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 17 09:11:52 2009 +1000 + + Require inputproto 1.9.99.12 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 09cef7573938e5c08007e578e1b638bc5e1796a8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 17 09:04:08 2009 +1000 + + Xi: valuator/button labels are called labels now, not 'names' + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc2ff5365030ad8bc11efde430b1064080dd7098 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 19:36:57 2009 +1000 + + Xi: copy the valuator mode from SD to MD. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 87d1f44bad608507e3995e17eb84fa0a0119796c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 14:18:45 2009 +1000 + + Xi: copy the button and axes labels into the XIQueryDevice reply. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a30fef9956b296f59ea18a9ee38d0abafeb15a4e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 16:38:11 2009 +1000 + + input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 17f9723f488d0470e3879c6b0dfdba61544cdd7b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 17 08:37:44 2009 +1000 + + input: bump to ints for deviceids - XI2 requires 16-bit deviceids. + + Note: ABI break, but ABI_XINPUT_VERSION has NOT been bumped. Recompile input + drivers. + + Revert "Xi: return BadImplementation for deviceids 256 and above" + This reverts commit 2b459f44f3edaea137df9a28bc7adfeb1b9f1df7. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cbeb73e2055f6c013c8fe6325851f2631170137d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 10:51:52 2009 +1000 + + Xi: return current valuator values in XIQueryDevice. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 80837dbefd9d5e96ab5c1f4b4c2d5c66ce17ce67 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 10:51:17 2009 +1000 + + input: change axisVal from uint to double. + + With subpixel support, uint just doesn't cut it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 25b6fc4a42f7698e6ae0b16becb316bfd7835d05 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 10:48:48 2009 +1000 + + Xi: last_valuator is used like an index, so range it accordingly. + + The previous code would always skip the last valuator due to a wrong + upper boundary in the loop. last_valuator is the index of the last set + valuator - which also means it must be initialized to -1, not 0. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3fc762ea9474cf92f6b7ef60dd0bb68f59385272 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 10:48:03 2009 +1000 + + Xi: Motion events update the device state too. + + Without this line the device's axis values don't get updated properly for + pure motion events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ad6347afead500fefb34131841f4beb5b03ad4ec +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 16:35:40 2009 +1000 + + Xi: don't use a constant number for class sizes - use sizeof instead + + The protocol is still changing, and having to debug crap like this is + annoying. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d5a15e65b7d2fdda14fb719e3ebf076cce896386 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jun 14 09:15:42 2009 +1000 + + Xi: include button state in XIButtonInfo. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 01241b4247a7ad0974d48412cc0d88e1a09a3c49 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jun 7 19:43:11 2009 +1000 + + Xi: Add support for sourceid in the device classes. + +commit d230742ea820a21a3f1ed0c58b5e6d8680b2f2aa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 16 12:13:16 2009 +1000 + + Xi: namespace XI2 files. + + Some files (notably those merged with MPX before XI2 came along) didn't use + a 'xi' prefix. This patch changes all of them to meaningful names. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4ddb002b6847e8a88e6f13ae0453a35ee79946ae +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 15 15:14:47 2009 +1000 + + xfree86: fix two compiler warnings in xf86vmode.c + + xf86vmode.c:1578: warning: pointer targets in passing argument 1 of + ‘SwapShorts’ differ in signedness + ../../../../include/misc.h:231: note: expected ‘short int *’ but argument is + of type ‘CARD16 *’ + + xf86vmode.c:1543: warning: unused variable ‘i’ + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9d039ef5047af2dedff0c583dda11032f71bed01 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 15 15:11:55 2009 +1000 + + xfree86: silence a few int10 compiler warnings. + + 'format ‘%#x’ expects type ‘unsigned int’, but argument 2 has type ‘CARD32’' + and similar. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fb882b3da189847bc98b646faddac9e8b42aa435 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 16 14:58:10 2009 -0400 + + EDID: Carp about 1.4 monitors with no preferred refresh rate + + You would think, having finally tightened down the spec, that + monitor vendors would bother to implement what the spec actually + mandates. You would be wrong. + +commit b2d2af76b43d62c9be07fd736652f904632fd663 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 15 10:10:26 2009 -0400 + + randr: fix typo in swapped dispatch + +commit 1d20b9021e8aecb942619f64017cc2fc31f02d29 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jun 14 18:21:43 2009 +1000 + + Xi: fix wrong bit->byte conversion in ProcXIQueryPointer + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9afc3241c157e5c19454f913c7105b3fdfa97ec4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jun 14 18:24:22 2009 +1000 + + Xi: remove un-used IsOn macro. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b67ff1d6e0d01170c6261593ca36d0f51d917393 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 16:45:36 2009 +1000 + + Xi: XISelectEvents/XIGetSelectedEvents use 'win' instead of 'window' now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b2bf67b61c564a4b92a429ca9ad455403161f33a +Author: Benjamin Defnet <benjamin.r.defnet@intel.com> +Date: Wed Jun 10 21:35:48 2009 -0700 + + randr: fix operation order so that rotation+transform works + + The matrix multiply to combine rotation and projective transforms was being + done in the wrong order. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 3627215e97734cc367fff273a3358c2a95a53481 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 5 16:38:46 2009 +1000 + + Add check for GNU ld in the test suite. + + The GNU linker supports a -wrap option to wrap function calls at link-time. + This allows for easy overriding of functions in the X server with stubs in + the test suite. This functionality is only supported on the GNU linker and + will be used extensively in the tests. Disable the tests if GNU ld is not + available. + +commit 5e0ca6fabd12401de6bd6039484be2079e28851e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 11 16:26:23 2009 +1000 + + input: remove un-used "setter" argument from SetClientPointer. + + It's obsolete, not likely to come back, let's drop it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e6a18762ef113296c6a09833be70cb4b45aa3940 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 11 15:40:56 2009 +1000 + + Xi: fix XISetClientPointer return values. + + If SetClientPointer fails, the only reason may be that the device is not a + pointer or that the device is an SD. Return BadDevice instead of BadAccess. + (BadAccess is a leftover from the early times of the ClientPointer + implementation when only one client was allowed to set it). + + If the window parameter doesn't name a valid window or client, return + BadWindow. + + Finally, allow both master keyboards and master pointers as deviceid. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ae7dab2a136d15b976b956f68feec53886951dd6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 11 15:40:38 2009 +1000 + + Xi: Fix XISetClientPointer swapping. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 98e8ec8deb09db1c56e06afed267e6f517042fa3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 10:54:55 2009 +1000 + + Xi: sanitize ProcXIGetClientPointer. + + This was quite old code and can be streamlined a bit. The new code is + essentially the same as in ProcXISetClientPointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 96ea82fdac7c28feb2748cd4ff7faa7c00dbbdcd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 12 10:54:25 2009 +1000 + + Xi: fix reply swapping in XIGetClientPointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 76f25086a9ab6f0c27d9e2cd745f8463c6b3df5f +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jun 11 16:34:06 2009 -0400 + + vfb: Re-enable 30bpp support + +commit 0de58c88aba7ddd69b04f24ab5b2967c359aa69e +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Jun 11 14:21:53 2009 +1000 + + xfree86: move didLock assignment down to where the function pointer is valid. + + crtc->funcs->lock is NULL, so it's no use calling it here. Move it down so + it's actually defined before we use it. + + Introduced with 6f59a8160042ea145514fdcb410f17f33fd437c2. + + Tested-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a85d210b34506cb39e7f08d81d4586fe4448b47f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 11 12:32:39 2009 +1000 + + Xi: store mask_len before swapping in ProcXIGetSelectedEvents. + + Swapping the mask_len and then advancing the pointer by the swapped length + is just a bad idea. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5043f42f36b49e7702d0c496dd4fe157788d44ee +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 11 12:31:40 2009 +1000 + + Xi: correct return buffer size for XIGetSelectedEvents. + + The maximum number of bytes is calculated by the mask len, and the mask len + is always in 4-byte units. XI2MASKSIZE however is in bytes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fcf0c0b8f332cbde03c1a479376b7913197962eb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 11 13:23:40 2009 +1000 + + Xi: XISetEventMask needs to clear the mask if len is 0 + + zero-length masks are supposed to clear the device's mask. + ProcXISelectEvents passes these masks through directly, so we need to clear + the bits here if such a mask is supplied. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 22b4ac44e4fdbe8f36f2b570cdbdaf237062e33e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 11 11:08:07 2009 +1000 + + Xi: XIGetSelectedEvents mustn't returned masks from non-existing devices. + + Or devices the client doesn't have XACE permissions for. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7868956b0fb50a9d77506f01413612e429f540a3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 10 17:09:39 2009 +1000 + + Xi: ProcXIGetSelectedEvents must use WriteToClient for swapped data. + + The data is already swapped before, so we just post it to the client as-is, + without attempting to swap it again. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit aa2babf11c30be4d289b58212dc330b84efb4053 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 10 14:41:11 2009 +1000 + + input: remove dependency on XI2 protocol for XI_LASTEVENT. + + inputstr includes XI2proto.h for the sole purpose of XI_LASTEVENT. + However, using XI_LASTEVENT in the server is prone to errors, if the server + is recompiled against a newer version of the protocol it would bump this + variable and associates bits, including potential ABI. + + This patch defines an XI2LASTEVENT for use in the server and removes the + XI2proto.h require. XI2LASTEVENT is the current value of XI_LASTEVENT. + + This patch is required by components that require access to inputInfo + (currently xf86-video-geode and xf86-video-cirrus) but should not have a + require for the XI2 protocol. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 77cc816da4a2777110182ed01c22c0f5e6ac3b65 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 10 13:54:42 2009 +1000 + + Xi: rename ProcXISelectEvent to ProcXISelectEvents. + + The request name has the plural, so let's do it here too. Purely cosmetic + change. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9563feeeb5309de1971c4e04419fed6fd31c9cea +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 9 16:57:09 2009 +1000 + + Xi: start checking for invalid mask bits _after_ LASTEVENT. + + Two issues that combined to false positives and false negatives. + - The checking for invalid bits must be performed when there are enough bits + that an event outside of LASTEVENT may be selected. + - The first invalid bit is LASTEVENT + 1, not LASTEVENT. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e2fbaebb87e18198143a4b8e6be7e650563cd819 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 9 14:38:25 2009 +1000 + + Xi: XISelectEvents returns BadValue for num_masks == 0. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cfeb65ac45b194dead5e8b9b26192df2619d6f9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 9 14:37:42 2009 +1000 + + Xi: XISelectEvents needs to be at least size 3, not exactly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f3c26034eca98924d93a004aaa1f61ffe5d344ca +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 9 13:04:56 2009 +1000 + + Xi: XIQueryDevice should use XIFooClass instead of the old FooClass defines. + + This is merely a cosmetic change, the actual values are the same anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 482cc72aa790bd2f23c7ebe12c5549b47c737115 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 9 13:03:38 2009 +1000 + + Xi: get the class length before swapping. + + Advancing by the already-swapped length lets our pointers point into + nirvana. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9974249980894f74f3ead466655da87958a43670 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 9 13:02:52 2009 +1000 + + Xi: Swapping 32 bit keycodes requires swapl, not swaps. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 918923e285f4e269a257bb5be4d3c8a50174aad0 +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Jun 10 15:13:45 2009 +1000 + + glx: fix open-coded linked list removal function + + OMG stab stab stab, YALL. + + removal function was made of crack, actually truncated the list from + the one after the find point. + + However fixing this makes glean makecurrent fail with a GLX error. + +commit 3ea747c0dbbec0db6761d66d4f6c680d2e9ddeaf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 25 16:53:18 2009 +1000 + + KDrive: Warning fixes + + xEvent vs. InternalEvent confusion still reigns though. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 754be1e2ec9be2486bf45000d7244d217556de07 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 25 16:51:48 2009 +1000 + + KDrive: Xephyr: DRI: Warning fixes + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit f534e6bea17746db952feb563ffea7320846b49d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 25 15:38:54 2009 +1000 + + OS: Fix compile warnings + + It's a marvel the sigaction() ever actually worked. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 305ab237f666936cd812c464bf43f86f6079838e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 25 22:11:19 2009 +1000 + + KDrive: Warning fixes and cleanups + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 4c8812b544ce5f319a7ac59a131c626c8509ef99 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jun 10 12:46:19 2009 -0400 + + kdrive: undef PSEUDO8 + + Whatever that was, it no longer is. + +commit 973ef5a7086aedb88a4888e73630c96ae68078e4 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jun 10 12:44:45 2009 -0400 + + kdrive: Remove a lie about PCMCIA support. + +commit e3c65cf1df9bbfb126f07b4b8e1254a855fb70c7 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jun 10 12:05:09 2009 -0400 + + xephyr: Add -title option. + +commit 803522300344265f11ea9f869ee6747730413bae +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Jun 10 13:32:54 2009 +0100 + + Xming: Simplify logic for ownership release of native clipboard + + Make the logic simpler for the ownership release of the Windows + clipboard in winclipboardwrappers.c - We've already marked a selection + as unowned if it is owned by our clipboard window + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit c7d3965bee0edb72468a0135aaa8a081348c2b23 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Jun 10 13:09:44 2009 +0100 + + Cygwin/X: Add a needed inputstr.h + + Add a needed inputstr.h to fix build after commit 6d4ffcc9e066bc7c49dcff1a2ff0111801c7286d + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 6d4ffcc9e066bc7c49dcff1a2ff0111801c7286d +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Jun 10 11:15:24 2009 +1000 + + input: move inputstr.h to where its needed. + + This stops inputstr.h being needed to be included by output drivers. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6f59a8160042ea145514fdcb410f17f33fd437c2 +Author: Benjamin Defnet <benjamin.r.defnet@intel.com> +Date: Mon Jun 8 21:45:42 2009 -0700 + + hw/xf86/modes: Set crtc mode/rotation/transform before calling set_mode_major + + This moves code out of each implementation of set_mode_major and back into + the X server. The real feature here is that the transform is now available + in the crtc for use by either xf86CrtcRotate or whatever the driver wants to + do. Without this change, the transform was lost for drivers providing the + set_mode_major interface. + + Note that users of this API will want to stop smashing the transformPresent + field, and could also stop setting mode/x/y/rotation for new enough X servers, + but there's no reason to make that change as it will break things when + running against older X servers. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit e244a5991e2cc55f5aa2f6e5255f1dabf56f0235 +Author: Federico Mena Quintero <federico@novell.com> +Date: Tue Jun 9 13:28:28 2009 -0700 + + dix/randr: Add missing fields to SRR*NotifyEvent() + + Also, remove redundant field swaps and make others match the order in which + they are declared in the xRR*NotifyEvent structs. + + Signed-off-by: Federico Mena Quintero <federico@novell.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 746e7b22e1bdfbf2363040367209b4c46b1c2fec +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 9 16:20:11 2009 -0400 + + cvt: Allow multiple-of-60Hz refresh rates for reduced blanking. + + Doing so generates the same timings as given in the DMT spec for + 120Hz RB, so we should be set there. Other rates might be legal + too but why push our luck. + +commit 2a035600e603117a4dbe668cad50bae2a5609094 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 9 10:14:18 2009 +1000 + + require inputproto 1.9.99.11 + +commit c5bebca46f63bcd7279f3c73ed1d50e0c1b6051f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 8 17:54:05 2009 +1000 + + Xi: hierarchy events have a num_info now instead of num_devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 810b74dbbcc1db3e68e0f95ff5223ddb2032e46d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 8 13:41:22 2009 +1000 + + Xi: change from XICreateMaster to XIAddMaster for consistency. + + add/remove is used for slave devices and hierarchy flags. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0e66a443a09176b8a875195d5473b953c07aa1d7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 8 12:24:24 2009 +1000 + + Xi: return BadValue for XI_HierarchyChangd mask on devices. + + This mask may only be selected for XIAllDevices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 69a9545d1f8110841538410818df19fd960412c5 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 28 14:43:27 2009 -0700 + + Make RANDR 'set' timestamps follow client specified time. Bug 21987. + + The lastSetTime value which indicates when the configuration within the + server was last changed was not getting set in the appropriate RandR + requests. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fa18c569ed26d2fdd442af6b39723cb7e30d18df +Author: Ben Skeggs <bskeggs@redhat.com> +Date: Tue Jun 9 09:14:50 2009 +1000 + + exa: driver pixmaps enabled if either CreatePixmap or CreatePixmap2 present + +commit 9390b7a133b0e17bc4d303effb7a99ff7017b086 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jun 7 19:26:45 2009 +1000 + + dix: protect against missing ButtonClasses in GetPointerMapping. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 21ee53060b4dcb5c12074cf6682ff0067021ff60 +Author: Simon Thum <simon.thum@gmx.de> +Date: Fri Jun 5 19:14:48 2009 +0200 + + config: fix build after XI2 API changes to RemoveDevice. + + This patch fixes the build with --enable-config-dbus is enabled + (default disabled). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 07c59411817c10fbcbf1bc9efa6a0818b6e0493a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jun 6 22:17:44 2009 -0700 + + GLX: Make sure the types match for ALIAS in indirect_reqsize.c + (cherry picked from commit 31a20a573b867fb7f02da15425e3b92eccb82dec) + +commit 077556ec39ca7e0d14486005cf71fcdc70a350cf +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jun 6 21:55:51 2009 -0700 + + XQuartz: AIGLX dispatch table cleanup + + This should fix some issues when building on different versions of OSX. We only use extensions that OpenGL.framework's glext.h header tells us are supported. + (cherry picked from commit e10c53421f1e780573c8adcd8ea89d6ffa28a819) + +commit fc24a97a8d022e986082b65b5133701e7273805c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jun 2 19:12:41 2009 -0700 + + Rootless: Use serverClient instead of NullClient + + This seems to stop the crash when moving windows. + (cherry picked from commit fcd857c8e295ac7a2b0e58d49dc71251ed9d1266) + +commit 2429daa7e6b35a4a8032e1c3736e417a5a9baa07 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jun 2 10:19:10 2009 -0700 + + XQuartz: Default to forcing the dialog box before quitting. + + This will show the quit dialog for users of other WMs. + (cherry picked from commit 639ee0c913f892776fee40bcfb856e0d7c2c7db5) + (cherry picked from commit 09432fa5b1cc8e9a30fb8aa4f8dfcd08c4a91e30) + +commit 6d75606a9e7f6ebc4d79a5261a48f5915c71cbcd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Jun 1 22:58:40 2009 -0700 + + Rootless: Despite its name, we still want to allow rootless to mess with the root window + + This fixes the bug whereby we weren't drawing the contents of the root window since RootlessPaintWindowBackground got nuked. + (cherry picked from commit bb0e208787739fbed2a0c8d1af6b6504319fdf88) + +commit 7348bf4935c8887bca33fe340ac2548f551bee3d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jun 7 09:25:51 2009 +1000 + + dix: set the generic event type for implicit XI2 grabs. + + event->type is always GenericEvent for XI2 events. Instead, XI_ButtonPress + (the generic event's evtype must be stored. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bb1c131b785ca30cf40041db3513b7669beebd34 +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu May 28 16:43:42 2009 +0200 + + dix: suppress pointer acceleration on xtest devices + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 707b1241681c33401d5e0eb6edeace33f5970928 +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Mar 21 18:19:19 2009 +0100 + + dix: prefer lroundf() over roundf() in axis scaling + + it's unclear whether there actually is a problem, but in a very similar + case there is (bug#21456). Also, integer addition is generally faster. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ef0e435052b2fda598cd8670c8e892aea685a102 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Jun 5 19:29:02 2009 +0100 + + Cygwin/X: Remove obsolete ChangeLog files + + Remove obsolete ChangeLog files, this information is preserved in + the automatically generated top-level ChangeLog + +commit 752508577aa7f0a1d80c8b7f4d3fe2b098e5e5fa +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Tue Jun 2 21:19:46 2009 +0100 + + Cygwin/X: Tidy up a bodge to avoid collision between X header and native Win32 API definitions of ATOM + + Remove a bodge to avoid collision between X header and the native + Win32 API definitions of ATOM, use X11/Xwindows.h which exists to + address these issues + + Consequently, include misc.h in winclipboardthread.c, to provide the + max() macro, as previously we were using the the one from windows.h + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 7f3456a4080d1bf21010170e126128cb653bd2ac +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 5 16:44:46 2009 +1000 + + Revert "test: check from INT_MIN to INT_MAX for core type conversion" + + This patch requires extra special casing to check if the linker supports the + -wrap option. Patches to do so will follow, in the meantime, revert this + commit. It shouldn't have been pushed in the first place anyway. + + This reverts commit d979f443946011158b6a183582728a6899c33b85. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d770d57f1701c7c8272b4ca3714f64c46c47adf1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 5 11:38:22 2009 +1000 + + Xi: fix XIQueryVersion major/minor swapping. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 17d62306b602ec61e8c5b44a79c9e1edc6b63a21 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 5 11:31:39 2009 +1000 + + Xi: add XIQueryVersion reply swapping hook. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2b459f44f3edaea137df9a28bc7adfeb1b9f1df7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 5 10:15:04 2009 +1000 + + Xi: return BadImplementation for deviceids 256 and above + + The protocol allows for 16 bit device ids, but the implementation doesn't + yet. We need to break the input ABI once more to shift the DeviceIntRec's + CARD8 to a CARD16, along with some changes in the privates. + + Once that is done, revert this patch. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c77f42049f77417c68bbce3dd2e995d916fc5af5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jun 5 09:29:04 2009 +1000 + + Xi: fix flawed logic in XIQueryVersion return value. + + The server returned the minimum of major/minor each instead of the lower of + the combined major.minor version. As a result, a client reporting + 3.0 and a server supporting 2.7, the return value would be 2.0 (the minimum + of both). + + Reported-by: Rémi Cardona + Reported-by: Simon Thum + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b6c16fc7dad5a4ffcaaab647c0e3fabed372efd5 +Author: Dave Airlie <airlied@redhat.com> +Date: Fri Jun 5 11:57:39 2009 +1000 + + crtc/gamma: check xf86_config is valid before using it. + + If you have multiple cards, some that support randr 1.2 and some that don't + you can get a null dereference in here. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit da682abc78c9a5b2fde09679061fe08a3a1c665b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 4 17:33:25 2009 -0400 + + xace: fix a bad send access hook call. + +commit 993daf06497c85bb6a1e70592df380503d721dfb +Merge: 2bda50e e1e8c7d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 4 15:11:36 2009 +1000 + + Merge branch 'master' into xi2 + +commit 2bda50ee14b7873f28081bf0f1bfb7b79a40de43 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 4 14:51:32 2009 +1000 + + Xi: memset the device name padding to 0. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 09266d6cd1bb6e09fe8bcb875c63fb4011c05b55 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 4 13:36:29 2009 +1000 + + Xi: XIQueryVersion requires major_version of 2 or higher. + + Otherwise, a BadValue error is sent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6ea76c550486bd17eb31f43757030fb44bdf1eab +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 4 12:55:59 2009 +1000 + + Xi: reply with the XI2 version that is supported by both client and server. + + XIQueryVersion must return the client's version if the client's version is + lower than or equal to the server's version, or the server's version + otherwise. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d979f443946011158b6a183582728a6899c33b85 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 4 11:40:14 2009 +1000 + + test: check from INT_MIN to INT_MAX for core type conversion + + ErrorF is link-wrapped to reduce the run-time of the test. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d8471bc7a19cd248fa3e0845496c86cd9251c013 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jun 4 11:32:15 2009 +1000 + + test: adjust event_to_core_conversion test for new ProximityIn/Out behaviour + + Both types now return BadMatch. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e1e8c7ddd7fdbfd674361364295fb1cbd5f28b45 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jun 3 13:37:32 2009 -0400 + + s/MIN/min/, s/MAX/max/ (#2968) + +commit 6de67d3206f0a4e307070714564c19efc84da2ec +Merge: af4e658 7f027d9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 3 16:11:33 2009 +1000 + + Merge branch 'master' into xi2 + +commit 7f027d9dc0146e229802aeac342ea2dbab63264a +Author: Olivier Blin <blino@mandriva.com> +Date: Thu May 28 20:57:36 2009 +0200 + + kdrive: add protocol mouse option + + kdrive probes a lot of PS/2 protocols for the mouse device, which + makes the mouse unusable for some seconds after X startup. + This new "protocol" option allows forcing the mouse protocol. + It can be used this way: + Xfbdev -mouse mouse,,protocol=ps/2 -keybd keyboard + + Signed-off-by: Olivier Blin <blino@mandriva.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit af4e658401ecbd2f2cc515b4c5abe5aee361cd64 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 3 12:30:49 2009 +1000 + + mi: only process master if the SD is still attached. + + SDs may be detached during event processing (e.g. if a passive grab + activates). In this case, the event must not be processed through the master + device. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit eb3fe72cbcd10c3953d713e07c321e695194a328 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 3 12:19:14 2009 +1000 + + dix: set the device state for XI valuator events. + + Valuator events need to include the device's state, while other device + events need to include the state of the core devices. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 08fd2ae652883393ecff6f3d5177e63408d58472 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 3 12:18:17 2009 +1000 + + dix: use GetMaster in PickPointer and PickKeyboard. + + GetMaster is more reliable than GetPairedDevice, it always returns the + keyboard/pointer if desired, even if the wrong device was passed in. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a1d1dd06f8f91c1d1802f7581a4ba7568b85e69c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 3 12:15:32 2009 +1000 + + Xi: fix wrong grabtype from ProcXGrabDevice. + + 86077f0058ce88ee9b3df5d1ab854eeca43 switched from a boolean to a grabtype + enum. ProcXGrabDevice didn't switch with it. PickPointer during an XI grab + on a slave device would thus return a wrong (or NULL) device and crash the + server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a371a47205fc58a587e1aecaa4a031184481c228 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 3 11:47:16 2009 +1000 + + dix: EventToCore must return BadMatch for proximity events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2bd5ea80652358565346071bed829070ddf5de85 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jun 3 10:45:28 2009 +1000 + + dix: rework event conversion before delivery. + + Let EventToXI, EventToCore and EventToXI2 return BadMatch if there's no + matching event for this protocol spec. + Adjust the delivery paths to cope with BadMatch errors (and clean them up on + the way). + + As a side-effect, this fixes server crashes on proximity events for a + grabbed device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 20d9f11abfd6ce3630d9640ff7383c7e27196956 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 2 13:49:09 2009 -0400 + + Typo fix + +commit ab5d1ae82ebd467d0a5b39821b286097865ba0c7 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 2 13:39:55 2009 -0400 + + Remove some libXfont leftovers + +commit 75795637c7160f1579dbe81c2d7600e85b1d141f +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Jun 2 18:41:36 2009 +0200 + + Revert "randr: Setting gamma: inverse logic looks more sane" + + This reverts commit 79138eec1b49cbaca6a16f2bdd8579b5828aeb28. + +commit fc8cfc3a055d8af4ac809799c71f3db0d5246433 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 2 16:53:41 2009 +1000 + + dix: ensure EventIsDeliverable has inputMasks set at all times. + + For proximity events, the XI2 type is 0 and inputMasks never got set in the + preceding condition. As a result, proximity events got never delivered. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ef9f851057a0ae214be02cb919f1e6634cead20b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 2 16:38:32 2009 +1000 + + dix: protect against floating slaves in DeviceFocusEvent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b40289c8766c5e7543b7288009b4d965f57c04ce +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 2 16:22:58 2009 +1000 + + xkb: allow pointer events to pass through for floating SDs without a key class. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 38df8351b36195070232b42a6d3369a9a08df8df +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 17:09:03 2009 +1000 + + test: add grab matching tests. + +commit a66686a83edd6093ed540414dda2b8700e4696fe +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 15:37:53 2009 +1000 + + input: add support for XIAllDevices and XIAllMasterDevices passive grabs. + + These grabs are suported through two fake devices inputInfo.all_devices and + inputInfo.all_master_devices. These devices are not part of the device list + and are only initialised for their device id, nothing else. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f00cf7675164bb984ef310412f9e09582813adb1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 2 10:23:21 2009 +1000 + + dix: get the current MD keyboard for the grab modifier state. + + A passive XI2 grab always uses the paired master device as a modifier + device. After issuing a passive grab, the slave may be reattached to a + different master and hence the modifier device may change. + +commit 1cd7ed75d903b5b0ea4e1070d2c26f4f931bdec7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 17:14:06 2009 +1000 + + dix: float slave devices during passive grabs. + + Exception - implicit passive grabs. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f56ad22e8fabdca6d9fd1e408a539696e30599fc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jun 2 15:07:53 2009 +1000 + + dix: rework temporary slave detachment. + + Rework addresses two issues: + - storing the master device's pointer is a bad idea, we need to store the ID + of the device in case it disappears during the grab. + - restoring the old master did not actually reattach the device. Fixed now. + +commit b3e4810a283d369e1a2c6c3288177fe79fd1e9d6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 16:22:51 2009 +1000 + + dix: move grab device assignment into GRABTYPE_CORE block. + + grab->type is the device type and XI2 types overlap with core events (being + less than GenericEvent). Thus, for passive grabs the grab device would be + overwritten with whatever device was activating it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 18ae48670859d05788776e164c65985e3b35a723 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 16:06:52 2009 +1000 + + dix: don't try to activate a passive grab on top of an active one. + + If we already have an active grab on the device, don't attempt to activate + another one. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ff1d6244eba8367a8d50601ca393e951c60c94b6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 12:14:52 2009 +1000 + + input: add support for XIAnyModifier in passive XI2 grabs. + +commit eb97d125fb6adeff0b23c2460108e0587ba253e2 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 1 15:50:50 2009 -0400 + + doc: Remove mention of Kerberos replay cache from Xserver.1 + + The krb5 auth code is gone, so this is no longer relevant. + +commit 80ea32ad4f1440d068e18db65830f45498703b09 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 12:06:55 2009 +1000 + + dix: switch grab checking from unsigned shorts to unsigned ints + + XIAnyModifier is outside of the unsigned short range. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 080b0331b3d1de1bab5ecdc9df175b287616e358 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 13:33:29 2009 +1000 + + input: Add grabtype to GrabParameters. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bee02a154145c0e4ed97980f7857dc27a96b1be8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 10:49:22 2009 +1000 + + dix: ensure implicit passive grabs have the xi2mask zeroed. + + This fixes XI2 enter/leave events being sent to non-xi2 clients. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cc71dfb4f5cf6113053951070dec9556e941aa24 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 13:19:30 2009 +1000 + + test: Add GetSelectedEvents request to struct size tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit de5c5b1db083a9c1d23e1461b54ca646c5a5c445 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jun 1 13:21:36 2009 +1000 + + test: fix compile error introduced with the removal of isMaster. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 45530d16097459a756696e255ab4e72d6e51fbc4 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 29 18:07:48 2009 -0400 + + vfb: Fix depth setup. + + Initialize the depth corresponding to the root window before the + pixmap-only depths. Otherwise you end up with the root window depth in + the depth list twice, which is mildly confusing for clients and + catastrophically confusing for PanoramiXConsolidate(). + +commit 5c8540d8cf9ebaafa7572cb2879d057cd3d15190 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 29 14:49:05 2009 -0700 + + GLX: Purge glxint.h usage + + Change (__GLXvisualConfig *) to (void *) in ABI compat stubs. + (cherry picked from commit b4adec886c65e49cfbd30d1e3a41b613f75ed3f5) + +commit da2aaee24a77e1a9e5c623af4a78ca6acc94b787 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 29 14:27:46 2009 -0700 + + GLX: Purge some glxint.h usage in glxcmds.c + + This is related to d0b249f1c5df81f3941d638f9625fe1e16c31807 in the 1.4 branch and was ok'd by krh + (cherry picked from commit e587436cf2e1237813c924699ff0662aea3034e1) + +commit f2151f1b0dcbfec23488a29a7ea887fbfd53b760 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 29 14:09:41 2009 -0700 + + XQuartz: Fix alpha to be 1 (screenshots bug, etc) + + This is related to: bc964ff1e3f3d8ab590eab40d767c6241e9480d4 + XQuartz: Stab at fixing the alpha 0/1 bug (screenshots, etc) by pulling in some old code that got gutted from rootless. + + which was on the 1.4 branch and implemented in fbPaintWindow. Now that fbPaintWindow is gone, this is now in miPaintWindow(). + (cherry picked from commit 032173f693f75385a40e144ffe2b7b5378bb6f2e) + +commit 7c158ffa766d32f5e8ec459693da5ef6ba0892e9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 29 14:02:18 2009 -0700 + + Rootless: Use miPaintWindow since PaintWindowBackground is dead + (cherry picked from commit 4975c087257b52189a5c21d93d121f183e60e4c8) + +commit ec9e9c8bcabda3d8b4ea07037fb247f7408dde8b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 28 15:30:20 2009 -0700 + + XQuartz: English localization update for HIG compliance + (cherry picked from commit 86b319d7cbef39d75b54c9d321e5dbf097b552be) + +commit 0f47203a9a690498c18b1c04e2ef5deed23a0e3e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 29 14:18:37 2009 +1000 + + dix: Set the implicit passive grab flag for keyboards too. + + Extension devices have ActivateKeyboardGrab as their grab activation + function, hence we need to ensure the implicit passive grab flag is set + accordingly in the grab for further event delivery. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 75c73ddbfc9236bb80a3709d467674c4a1018fa3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 29 14:01:21 2009 +1000 + + dix: fix broken XI event delivery during grabs. + + If an implicit passive grab is active, the XI event mask is in + grab->deviceMask. Otherwise, for explicit grabs, the XI event mask is in + grab->eventMask. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 29ec14625111a8ae600d245ccbf905f059074d7c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 29 13:26:22 2009 +1000 + + Xi: passively grabbing slave devices must be possible. + + There's use-cases where this is useful, so take the check out preventing + that. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 235cf5713a8fe535c439628cce9ea5b42432acb1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 29 12:09:06 2009 +1000 + + dix: init inputMasks to NULL to avoid random value dereference. + + If the XI2 type is 0 (e.g. proximity events), inputMasks is never set and + may not be NULL. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 68d86adbe8d84099812c37a04098f2ab5ccc45a4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 29 12:03:07 2009 +1000 + + dix: GetProximityEvents doesn't need extra events for valuators. + + With internal events, we only have one event for all the data, no need to + calculate for extra events. + + Reported-by: Thomas Jaeger + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 71a83d68ab07536c0778d13cd7da974c40e77457 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu May 28 15:32:03 2009 -0400 + + xfree86: Remove loader symbol list ABI stubs + + These have been nops since 2006 and functionally void since 7.0. + +commit d7aef3f663f4b5d861799f8615dcd301d5ce2906 +Merge: a25f248 e08c6a0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 28 17:20:58 2009 +1000 + + Merge branch 'master' into xi2 + + Conflicts: + Xext/geext.c + Xi/chdevcur.c + Xi/extgrbdev.c + Xi/xiproperty.c + configure.ac + dix/ptrveloc.c + hw/xfree86/common/xf86Config.c + mi/mipointer.h + test/input.c + xkb/xkb.c + +commit a25f248fc3bd0375d91ca8a44320200d445ecfbb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 27 15:47:12 2009 +1000 + + Xi: Send Enter or Leave events with XIPassive(Un)grabNotify + + If a passive enter or focus in grab activates, send additional enter or + focus events with mode XIPassiveGrabNotify to the grabbing client. + Likewise, if the grab deactivates, send additional leave or focus out + events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2107becb0ce2ffda001be65728c53563496d8d50 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 27 17:13:19 2009 -0400 + + xfree86: Remove unused (and useless) xf86{Add,Delete}ModuleInfo + +commit e08c6a0752772745f35f7afcf6c2b1c927b91cc0 +Author: Federico Mena Quintero <federico@novell.com> +Date: Mon May 4 19:24:47 2009 -0500 + + randr: bug #21554 - re-probe outputs when coming back from laptop unsuspend + + Make xf86 RANDR wrap the EnterVT call chain, so it can re-probe the + outputs when a laptop comes back from suspend/unsuspend (actually, any + time that we enter our VT again). The X server should then send RR* + events to clients, so they can cope with a monitor that was unplugged + while the laptop was suspended. + + Signed-off-by: Federico Mena Quintero <federico@novell.com> + +commit b12010e10f38951358b48ff1076c026f943b7cc3 +Merge: 6e69272 f1441b8 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Wed May 27 15:56:30 2009 -0400 + + Merge branch 'master' of git+ssh://sandmann@git.freedesktop.org/git/xorg/xserver + +commit 6e6927247359cc0db47501fb9d2dbb7856aa5985 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Wed May 27 15:51:19 2009 -0400 + + Fix alpha map computation in miComputeCompositeRegion() + + According to the RENDER spec, the origin of the alpha map is + interpreted relative to the origin of the drawable of the image, not + the origin of the drawable of the alpha map. + + This commit fixes that and adds an alpha-test.c test program. + + The only use of alpha maps I have been able to find is in Qt and they + don't use a non-zero alpha origin. + +commit f1441b83538e6ba8a1557c4f5ea50c53a1837087 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed May 27 10:06:10 2009 -0700 + + XQuartz: More localization updates + (cherry picked from commit b107390c9f30571902556b4d053e62d345a06254) + +commit 996357e905c1082479bb238110b93bc170b8cb84 +Author: Joe Krahn <jkrahn@nc.rr.com> +Date: Tue Jan 20 17:22:37 2009 +0000 + + Cygwin/X: Update icons directly, rather than modifying the window's class + + Update icons directly to windows rather than modifying + the window's class. Respect custom icons overriden via + the configuration file. + + fd.o bugzilla #4491 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 9955252564922e7e8702dfb6eab52c75605a4a22 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 5 17:55:58 2009 +0000 + + Cygwin/X: Remove unused TimeSinceLastInputEvent() + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 966c8fccf16e77c8f459b4b175718323f2ec5d58 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Mon Jan 5 18:04:42 2009 +0000 + + Xming: Fix some log spam + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d190a27a33ab8c198568baf184fad14df57e24ad +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Thu Jan 29 11:00:49 2009 +0000 + + Xming: Various tidy ups in winClipboardFlushXEvents() + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit fbe9ed27b1c2f932a74aa6ced134ecec021a3fc1 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Thu Jan 29 10:55:38 2009 +0000 + + Xming: Avoid log spam if a windows application won't provide CF_UNICODETEXT clipboard format + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 71ba9856a4f01aa7a42f1178c8da98a2e5ac23ae +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 3 15:52:11 2009 +0000 + + Xming: Cache atom lookups in clipboard integration code + + Cache the CLIPBOARD atom lookups in winClipboardWindowProc() + Cache atom lookups in winClipboardFlushXEvents() + Recache on server regeneration + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 4ec110327bdc4f2617cd6116539812d7ef96b24e +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Jan 4 18:29:49 2009 +0000 + + Xming: Prevent the mouse wheel from stalling when another window is minimized. + + Fix internal WM to prevent the mouse wheel from stalling when another window is minimized. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 888e6961a4ee76d05d212cfb946f089caafb3f69 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Jan 7 18:29:16 2009 +0000 + + Cygwin/X: Correctly allow for the native window frame width in ValidateSizing() + + Fix internal WM to correctly calculate the native window border when validating window sizing + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit a72865868f03b675f86990476fcee601822894b3 +Author: Joe Krahn <jkrahn@nc.rr.com> +Date: Tue Jan 20 17:09:43 2009 +0000 + + Cygwin/X: Consolidate dialog initialization in winInitDialog() + + Changed windialogs.c to set icons via window properties rather than class + properties, and use LoadImage() for small icons, because LoadIcon() can only open + large icons. Since this code is redundant across the dialogs, I put it in the + winCenterDialog function, along with a few other redundant instructions, and + renamed in winInitDialog(). + + Also, don't bogusly put our dialogs at the center of the virtual desktop if we + are on a multimonitor system (this causes the dialog to end up split across two + monitors in a dual-monitor side-by-side setup) + + Corrections to use HWND_TOPMOST instead of HWND_TOP and not to use SWP_NOZORDER + from Colin Harrison + + fd.o bugzilla #4491 + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d053c3b35f730fdaddd22f841dbd8ed6c9a07ba0 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Nov 2 20:46:40 2008 +0000 + + Xming: Slightly adjust the formatting of the logged command line + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit a7e23a79c1fc429aedbf9b6c0e78b1c8d7e02238 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 26 14:42:25 2009 +1000 + + Xi: Add support for Enter and FocusIn grabs. + + Enter grabs are checked for in CheckMotion(), each time the sprite window + changes the current grab is deactivated (if applicable) and the new grab is + activated (if applicable). Exception - if the grab is on a parent window of + the current window since we keep the grab across descendants. + + Since CheckMotion() may change the grab status of a device, we mustn't get + "dev->deviceGrab.grab" in ProcessOtherEvents until after CheckMotion(). + FocusIn grabs are checked in much the same manner. + + The event delivery for grabs replaces the NotifyNormal on window change with + a NotifyGrab on window change. Note that this happens before the grab + activates, so the EnterNotify(NotifyGrab) is still delivered to the window, + not to the grabbing client. This is in line with the core protocol semantics + for NotifyGrab events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ec2fe9660dbc0c16cdaca33b3b878011857e0fe2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 27 14:18:51 2009 +1000 + + Require inputproto 1.9.99.10 + +commit 0ef6ba9f3b9e68307bfe623e12dc36d44440e97f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 27 11:15:54 2009 +1000 + + Xi: set the passive grab's resource mask on ungrabbing. + + Not having the resource mask set means we never match an existing grab, + hence we never actually ungrab. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1f61d6647f25add487c5cae9739643a6e33ef9f7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 27 11:15:23 2009 +1000 + + Xi: use GetMaster(MASTER_KEYBOARD) to get the modifier device for XI2 pgrabs + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bedfd561fa534b65baea45c4a05b1752ef172c45 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 26 15:28:33 2009 +1000 + + dix: fix wrong cast of eventMask into CreateGrab. + +commit 023f959e6812e63f9d38b078158275bc13d238ae +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 26 14:56:40 2009 +1000 + + Xi: fix an inputInfo.keyboard usage. + + In the case of a RevertToFollowKeyboard, the master device should be used + (since this is the closest equivalent to the VCK as before). Only if the + master keyboard is the same as the device, revert to the VCK itself. + +commit b3463fd6a89d50a7562c357aeb5314ce0fd6493d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 26 13:58:04 2009 +1000 + + dix: convert window coordinates to FP1616 before calculating event_x/y + + root_x/y are already in FP1616 at this point. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 10b5e981016132b4c07ad9ce68646d0a385e9c24 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 26 11:12:08 2009 +1000 + + dix: take grabs into account for XI_Enter/Leave events. + +commit 1815defdb2f19e79f4ec0354d188ea763ff1f15e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 26 10:08:46 2009 +1000 + + Xi: only deactivate passive grabs if the event type matches. + + This didn't use to be a problem when devices could only be pointers or + keyboards, not both. Nowadays, slave devices may have both buttons and + keyboards, and in this case we don't want to deactivate a passive keyboard + grab when a button release is detected. + +commit 9dc3810a034f067096d71b33b0b47f1f52092fe6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 27 13:53:46 2009 +1000 + + dix: set the right grab event type for implicit passive grabs. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6583477035234e23ead2fad9db7a07e5862447a4 +Author: Nicolai Hähnle <nhaehnle@gmail.com> +Date: Sat May 23 13:35:24 2009 +0200 + + Remove reference to non-existing requestLog and requestLogIndex + + These fields were removed in 252ec504817e05b185e4896a2d899e9c00b8aeef. + + Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 53e821ab4a41cbc85932b9ef150311bc2e57c108 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 25 12:20:37 2009 +1000 + + Xi: add request processing for XIGetSelectedEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b377994336c978875dd786f4a4a9ef2e7b20e32c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 25 13:55:17 2009 +1000 + + Xi: advance by the right number of bytes when trawling XI2 event masks. + + The wire layout is [struct xXIEventMask][mask bytes]. So the pointer needs + to not only be advanced by the mask bytes, but also by the size of the + struct. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 12e725d08b4cf7dbb7f09b9ec09fa1b621156ea9 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri May 22 09:54:38 2009 +0200 + + randr: fix server crash in RRGetScreenInfo + + We don't return rates to randr < 1.1 clients, so don't allocate space + for them. This fixes a FatalError due to not all allocated space being + used. + + X.Org bug#21861 <http://bugs.freedesktop.org/show_bug.cgi?id=21861> + + Reported-by: Guillaume Quintin <coincoin169g@gmail.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit c70511931ca1441878daed50e710fa514f6ab077 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun May 24 10:32:38 2009 +0200 + + fix typo in cabff9007 which led to an unintialized memory read and a crash. + +commit 99e22b86c5f1a3653f3caaf01368a777d2b208d0 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 22 12:01:55 2009 -0400 + + EDID: Add modes from Established Timings III descriptor to mode pool + + EDID 1.4, section 3.10.3.9 + +commit b395da91c531d633ec47bb5a51e361d321663a3a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 22 15:24:46 2009 +1000 + + Xi: silence two compiler warnings + + chdevcur.c:97: warning: ‘SecurityLookupIDByType’ is deprecated (declared at + ../include/resource.h:269) + + xiproperty.c:200: warning: passing argument 2 of ‘GetEventFilter’ from + incompatible pointer type + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4a36db60774640ea92a2133a3b08fbf1a48d2cb6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 22 15:16:43 2009 +1000 + + os: fix compiler warning "too few arguments to format" + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit da0d3baf71b34657cc235d6c6b37d548541f9449 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 21 14:11:27 2009 +1000 + + dix: protect event generation against single-valuator devices. + + If we have a single-axis device and it sends events it should not access + non-existant memory. + +commit b25e29e8014927815d4fdc9c416bfeb2af0ecba6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 21 12:07:03 2009 +1000 + + mi: use GetMaster() from MIPOINTER and MISPRITE. + + Both may in some cases be called for a SD attached to a master keyboard. In + this case, we need to get the right master device (i.e. the pointer). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c9df51b070377ca33e48644dbc842b6e3dfb2975 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 21 11:16:37 2009 +1000 + + input: allow for master pointers to not have a button class. + + There's devices (e.g. some barcode readers) that have axes but no buttons. + When such a device sends a motion event, the valuator and button class is + copied into the master pointer (i.e. removing the button class). + So we need a couple of extra sanity checks for the button class to exist. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ebe45e1a72a81ad22413e5d0514869b3e45a69b7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 10:55:03 2009 +1000 + + input: introduce partial class copying depending on the event. + + Copying all classes into the master device has drawbacks for hybrid devices + (devices that are both mice and keyboards). If such a device posts an event, + it's key classes are moved into the VCP. The key event itself is unaffected + by keyboard grabs and the like. + + Partial class copying copies depending on the event and copies the classes + into the right master device (i.e. the VCK for key events, the VCP for + pointer events). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc63c8a4570c989f19a036965854bceb9800ce19 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 12:33:49 2009 +1000 + + dix: introduce GetMaster() + + For hybrid devices (keys + buttons/axes) the attached master device is + generally the wrong one. One shouldn't post a button event through a + keyboard and vice versa. + + GetMaster(dev) returns the right master device for the given type needed. + This may be the MD paired with this device's MD. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d79318f269d959d566ec66239b4c985afd61b259 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 21 08:29:14 2009 +1000 + + dix: Add a deviceid to the DeviceChangedEvent. + + ChangeDeviceId would actually overwrite the flags field if deviceid wasn't + present. Aside from the event of course not telling which device generated + it in the first place. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit eeffb83fea2d87070beafd0c692fb0ad54d8335b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 18 20:03:07 2009 +1000 + + ABI_XINPUT_VERSION 6 + +commit 438a4eafa5d14ab676827f7a5d58782c02db4cdf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 17:02:50 2009 +1000 + + input: remove nested union from InternalEvent. + + There's no need for internal events to be a struct with a single nested + union, we might as well make the union itself the InternalEvent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b12d302df8283186ce87882c29b2b0294adb2770 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 15:28:16 2009 +1000 + + Input: rename DeviceIntRec->isMaster to ->type. + + isMaster is not enough as long as we differ between master pointers and + keyboard. With flexible device classes, the usual checks for whether a + master device is a pointer (currently check for ->button, ->valuators or + ->key) do not work as an SD may post an event through a master and mess this + check up. + + Example, a device with valuators but no buttons would remove the button + class from the VCP and thus result in the + IsPointerDevice(inputInfo.pointer) == FALSE. + + This will become worse in the future when new device classes are introduced + that aren't provided in the current system (e.g. a switch class). + + This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and + MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an + IsMaster(dev). + +commit add2defac7e59dcb355e5ba12b6de60861741d57 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 16:23:38 2009 +1000 + + Split the signal-handler's lastSlave out into a separate variable. + + dev->u.lastSlave was not signal safe since it was accessed by the DIX and + during signal handling. + Replaced with: + 'dev->last.slave' for the signal handler's lastSlave (used to generate + DeviceChangedEvents), . + 'dev->u.lastSlave' for the DIX lastSlave (currently only used in + change_modmap) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20 +Author: Tomas Janousek <tomi@nomi.cz> +Date: Wed May 20 15:03:01 2009 +0200 + + Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. + + In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and + .totalVModMapKeys were not initialized, contained random values and caused + accesses to unallocated and later modified memory, causing + XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of + nonzero values, resulting in writes past the end of an array in XkbSendMap. + + This patch initializes those values sensibly and reverts commits 5c0a2088 and + 6dd4fc46, which have been plain non-sense. + + Signed-off-by: Tomas Janousek <tomi@nomi.cz> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7db55a0806c82bd4143c8bf1b8eb2b62e456ad9a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 14:38:25 2009 +1000 + + dix: remove superfluous loop in change_modmap. + + A device can only be attached to a single master device. So instead of + looping and searching for the master device, we can just use dev->u.master + directly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cabff9007a4abad026b450a4aab155c7bcd94326 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 15 08:33:07 2009 +1000 + + xfree86: treat other drivers as mouse drivers in the config. + + Historically, if no input device was referenced in the ServerLayout, + the server would pick the first "mouse" device found in the xorg.conf. + This patch gives evdev, synaptics, vmmouse and void the same status. If + there is a section in the config file using this driver - use it as the core + pointer. + + Device selection is in driver-order, not in config-order. If a "mouse" + device is listed after a "synaptics" device, the "mouse" device gets + preference. This replicates the original behaviour. + + This code only takes effect if AllowEmptyInput is off and there is no core + pointer in the server layout. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a8bd1e1f96d8e5380972a7dce8d9940cd912aa09 +Author: Søren Sandmann Pedersen <ssp@l3000.localdomain> +Date: Thu May 21 18:21:28 2009 -0400 + + Fix alpha map computation in miComputeCompositeRegion() + + According to the RENDER spec, the origin of the alpha map is + interpreted relative to the origin of the drawable of the image, not + the origin of drawable of the alpha map. + + The only use of alpha maps I have been able to find is in Qt and they + don't use a non-zero alpha origin. + +commit a2c5ee36b21c2ee5c0468f1b251e74c1412dbecb +Author: Adam Jackson <ajax@redhat.com> +Date: Thu May 21 10:20:48 2009 -0400 + + EDID: Be more cautious about finding vendor blocks. + + Many old monitors zero-fill the detailed descriptors, so check for that + to avoid a useless warning like: + + (WW) RADEON(0): Unknown vendor-specific block 0 + +commit 73c7398aafa050950ad614483fb0d5bdd2da97ca +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 10:40:50 2009 +1000 + + dix: 'namespace' HAS_OLD_SLAVE and HAS_NEW_SLAVE. + + We need more flags for this in the near future, so let's namespace them now. + +commit 5b5e3fa2771383a85afff679be34df19d3a4e290 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 15 08:33:07 2009 +1000 + + xfree86: treat other drivers as mouse drivers in the config. + + Historically, if no input device was referenced in the ServerLayout, + the server would pick the first "mouse" device found in the xorg.conf. + This patch gives evdev, synaptics, vmmouse and void the same status. If + there is a section in the config file using this driver - use it as the core + pointer. + + Device selection is in driver-order, not in config-order. If a "mouse" + device is listed after a "synaptics" device, the "mouse" device gets + preference. This replicates the original behaviour. + + This code only takes effect if AllowEmptyInput is off and there is no core + pointer in the server layout. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1cce55cc0333a026474100cf2f784e220fd96473 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 14:07:03 2009 +1000 + + input: rename device->type to device->xinput_type. + + This type is only used in XI to give a hint of what type this device may be. + Call it xinput_type for clarity. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 81b3b0cce088866dc3cda099d7c8d6655849fd43 +Author: Tomas Janousek <tomi@nomi.cz> +Date: Wed May 20 15:03:01 2009 +0200 + + Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. + + In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and + .totalVModMapKeys were not initialized, contained random values and caused + accesses to unallocated and later modified memory, causing + XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of + nonzero values, resulting in writes past the end of an array in XkbSendMap. + + This patch initializes those values sensibly and reverts commits 5c0a2088 and + 6dd4fc46, which have been plain non-sense. + + Signed-off-by: Tomas Janousek <tomi@nomi.cz> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 79138eec1b49cbaca6a16f2bdd8579b5828aeb28 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Mar 10 16:03:26 2009 +0100 + + randr: Setting gamma: inverse logic looks more sane + +commit c2785ae7eb6197bbfc75e92e99fffbb8ad8064da +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 14:29:13 2009 +1000 + + dix: refuse events from disabled devices. + + If the device is disabled ("off"), it must not send events to a client. + The driver shouldn't send events in that case anyway, but just to make sure + we simply drop events coming while the device is disabled. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 47a89b1cba67a43ddc225f7e1b5d2b3b217c8d93 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 13:59:22 2009 +1000 + + Xi: remove DeviceIsPointerType + + This approach is broken anyway. DIPT only checked for the XInput type + "MOUSE" and the only user of this is xf86ActivateDevice when it sets the + Activate/DeactivateGrab functions. + Since synaptics and wacom set their own types, evdev only sets MOUSE for, + well, mice half the devices didn't have this set correctly anyway. + + Instead, ActivatePointerGrab should be merged together with + ActivateKeyboardGrab. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7b891e450f005688e41e61016e6d3e394c67f6be +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 14:23:16 2009 +1000 + + dix: Remove obsolete comment + + CorePointerProc doesn't back up the device classes anymore. + +commit 42719ce5c715ac3a0c74c3c7df872d35e0449de9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 20 14:38:25 2009 +1000 + + dix: remove superfluous loop in change_modmap. + + A device can only be attached to a single master device. So instead of + looping and searching for the master device, we can just use dev->u.master + directly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 22a33a7250f879b8f3eb84176a1dc57027d8cfe4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue May 19 22:45:26 2009 -0400 + + glx: Register names for the GLX resource types. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 77e90261d5f91e1170c6e02deb0e3739c24fcfd6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue May 19 19:36:03 2009 -0400 + + dix/events.c: Use wClient where appropriate. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 3cea176d5abcb0f14eefbdcbe17fed0847524dd4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue May 19 19:30:33 2009 -0400 + + xace: Fix a bad device access hook call. + + Add a proper access mode, and reverse the logic of the return value. + Zero ("Success") is returned on success from the hook calls. + + Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> + +commit 4addfcd633484b7f53b5df1b92bfca8bfc1dc48d +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon May 18 17:53:35 2009 +0200 + + EXA: Allocate from the end of free offscreen memory rather than from the start. + + This way we don't always need to scan over previously allocated areas when + looking for an available one, and there might be less fragmentation. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 510cbd43cd4e34bd459e8f74ab2855714b4ca95d +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon May 18 17:48:57 2009 +0200 + + EXA: Defragment offscreen memory. + + At most once per second, under the following circumstances: + + * We can't satisfy an offscreen memory allocation, but there seems to be enough + offscreen memory available in total. + + or + + * The server has been idle for at least 100ms, and there is more than one + available offscreen area. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 8331bde0adeccefb275c4d707e7b2cb1d95b1581 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri May 15 21:36:28 2009 +0100 + + Cygwin/X: link with libmain.a to provide main() + + Commit 987579c930bda803427a28cb82773c389f5110d6 moves main.c into + into libmain.a to be linked with separately, and updates the various + DDXs to link with libmain.a, except Xwin, which also needs this change. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b89dcfbfbd38f8d19f1d4f24f81820b1048572c8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 18 16:07:08 2009 +1000 + + Xi: fix length field in XIQueryPointer. + + Buttons append 4-byte units to the end of the reply, they need to be + included too. + + Reported-by: Mark Dokter + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 33fcaaaea5ea30be39156ecfdbcca891b47ab465 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 18 16:05:35 2009 +1000 + + Fix missing parentheses in FP1616 macro. + + Missing parens led to interesting results if an expression instead of a + constant was passed in (ProcXIQueryPointer for example). + +commit 6258bb1d6bb78ea4ba1d33470bc74e9b711b25f2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 15 20:24:45 2009 +1000 + + require inputproto 1.9.99.9 + +commit e7e94ff5fd3205a9ee01fe9342d9f3a426b0a068 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 14 21:45:35 2009 +1000 + + Xi: set the right length for the XIQueryPointer reply. + +commit 00ab04d73c612ac85e024105015bdb7c79e8874b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 14 16:24:35 2009 +1000 + + Include full modifier + button state in XIQueryPointer. + +commit de78aab0ea3a2d8c61222493f25911258dea65a2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 14 15:53:00 2009 +1000 + + Xi: take the paired device as modifier device only for MD pointers. + +commit 0e089f9ceb0edec532078c6e1df7f642f7220fb5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 14 15:29:20 2009 +1000 + + Xi: check cursor and grab_window before attempting the passive grab. + + Both values need to fail the request, so we need to check them before + looping through the modifier masks. Otherwise, a wrong grab_window will + show up in each failed modifier return but not actually cause an error. + +commit 5c3e7289801c958e2c70e2629d3ebee122449be8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 13 16:54:01 2009 +1000 + + dix: count must be 1 if we have an XI2 match. + + This fixes events that activated a grab not getting delivered to the client. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e083a0d0692baa5ad29002a38293b36dd3b4c06f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 13 15:23:42 2009 +1000 + + Xi: set the correct length for XIPassiveGrab replies. + +commit 8ff1bff8f462b15e05fc298704e1e40cb244587f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 12 21:33:54 2009 +1000 + + Update to new XI2 names + +commit bbf266cca3de726e3eb932d66dd5b8981ef40fa8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 12 21:24:07 2009 +1000 + + mi: un-deprecate miPointerWarpCursor + + This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 + because it didn't take a device argument. The device argument was added in + 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is + obsolete. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 273890924b8ed6f8b7949c0322c8258b9e6f8630 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 12 16:09:35 2009 +1000 + + input: reduce the number of superfluous hierarchy events + + There's only two reasons for hierarchy events: + - device is added, removed, etc. In this case we want to send the event as + it happens. + - devices are added in a XIChangeDeviceHierarchy request. In this case we + only want one event cumulating all changes. + +commit 033a2b12fcd02fa9a2c2f20a352bec0a43074512 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 12 14:50:57 2009 +1000 + + Xi: set per-device hierarchy changed flags. + + Rather than have one field per hierarchy change, XI2 has two fields - one + generic one and one per-device that include the device-specific flags. + This requires some funky handling for removed devices, but oh well. + +commit 8fb51feae222ff4f4aa1c440b6973ce7383bbc09 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 11 15:45:46 2009 +1000 + + xkb: if kbd init failed, NULL out the pointers after freeing them (#21278) + + Reproducible: + Configure a server that uses the keyboard driver with an invalid ruleset, + e.g. (Option "XkbRules" "foobar"). Ensure that Option "AllowEmptyInput" is + "off" in the ServerFlags or ServerLayout section. Start the server. + After failing to init the keymap, the server will try to clean up after the + device, double-freeing some xkb structs that have not been reset properly. + + X.Org Bug 21278 <http://bugs.freedesktop.org/show_bug.cgi?id=21278> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0cea199eda772a5ddd5ce72e4823a00ec14405d4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 11 12:53:56 2009 +1000 + + kdrive: set Activate/Deactivate grab for input devices (#21591) + + X.Org Bug 21591 <http://bugs.freedesktop.org/show_bug.cgi?id=21591> + +commit fdce58ca822f4e43e03e84076190f52d7104e01f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 11 12:51:40 2009 +1000 + + dix: ensure Activate/DeactivateGrab has a valid value. + + Xephyr doesn't manually set Activate/DeactivateGrab for new devices, + resulting in a NULL-pointer dereference later when a grab is activated. + Avoid the segfault by ensuring that the pointer is always valid. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e3f296d91dfe6b827195e1d387e1a04aa73b85c3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat May 9 10:33:20 2009 +1000 + + xfree86: Remove superfluous ifdef DEBUG checks. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2f6253376df45e508284ff7766b186cfc7fb56d6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat May 9 10:33:20 2009 +1000 + + xfree86: Remove superfluous ifdef DEBUG checks. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b1b5ec45c1cb650ccb8c659218f9481379c777d9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 11 12:53:56 2009 +1000 + + kdrive: set Activate/Deactivate grab for input devices (#21591) + + X.Org Bug 21591 <http://bugs.freedesktop.org/show_bug.cgi?id=21591> + +commit 6f9e22049862ee9ac7f604411d005d8bb1b2dd1c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 11 12:51:40 2009 +1000 + + dix: ensure Activate/DeactivateGrab has a valid value. + + Xephyr doesn't manually set Activate/DeactivateGrab for new devices, + resulting in a NULL-pointer dereference later when a grab is activated. + Avoid the segfault by ensuring that the pointer is always valid. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c1d7deca9281ba1df0df1abcea1fe7f841b10ff9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 12 21:24:07 2009 +1000 + + mi: un-deprecate miPointerWarpCursor + + This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 + because it didn't take a device argument. The device argument was added in + 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is + obsolete. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8609a4e883e917d1652fbe810108de99bc89713f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri May 15 11:22:32 2009 -0700 + + Correct some Sun license notices to Sun's standard X11 license format + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 94c5093c8bc803d0b14429b5a4d07ae46da865cc +Author: David Marx <David.Marx@Sun.COM> +Date: Wed May 13 17:53:30 2009 -0700 + + Solaris: Make sure non-inline versions of asm routines end with ret statements + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 2be5eecb4b0f30b9c55d12521415edbb88c1f8fd +Author: Julien Cristau <jcristau@debian.org> +Date: Fri May 15 17:29:32 2009 +0200 + + xfree86: add edid quirk for Samsung Syncmaster 2333HD + + It reports vertical size in cm in the detailed mode. + X.Org bug#21750 <http://bugs.freedesktop.org/show_bug.cgi?id=21750> + + Reported-by: Peter Poklop <Peter.Poklop@gmx.at> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 7c8327f0a75087a85864256a9cea80dd4b86def5 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri May 15 15:48:37 2009 +0200 + + EXA: Always damage glyph cache pixmap manually after uploading a glyph. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 850675d4de4373e5df95507dbf2cd9affaaf54bc +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri May 15 15:48:37 2009 +0200 + + EXA: Take GC client clip type into account for migration. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit c1bbac2708bbccbec01cecba39cdf2b8160c1dc3 +Author: Matt Turner <mattst88@gmail.com> +Date: Thu May 14 16:00:41 2009 -0400 + + Fix mem_barrier() on Alpha + + Some clean up (da086901c6579e41b28b1418fa12ebb82744fc87) went a bit + too far and removed the needed mem_barrier macro on Alpha. + + This re-adds it. + +commit 4cc33190ef1a4207c0f8fc74201cdf2568a239c2 +Author: Julien Cristau <jcristau@debian.org> +Date: Thu May 14 17:01:57 2009 +0200 + + xfree86: Add two __FreeBSD_kernel__ checks + + Debian bug#525475 <http://bugs.debian.org/525475> + + Reported-by: Petr Salinger <Petr.Salinger@seznam.cz> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit ed9aecf8517bf74e943e3e5dd3ee407524e8f122 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu May 14 06:55:21 2009 -0400 + + COPYING: SGI FreeB 1.1 -> SGI FreeB 2.0 + +commit c66cf7b64c7bcb31c81b9fde27cc40c1440753b1 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu May 14 06:53:08 2009 -0400 + + Update several of my and/or Red Hat's licenses to standard form. + +commit 2075d4bf9e53b8baef0b919da6c44771220cd4a5 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu May 14 11:46:41 2009 +0200 + + glx: If a destroyed window is bound to the current context, make it not current. + + Avoids subsequent crashes due to stale pointers to the DrawableRec, see + https://bugs.freedesktop.org/show_bug.cgi?id=21132#c15 and previous comments. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 2c1190f888515292de01e60fe74657c34b99fd9e +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu May 14 11:39:16 2009 +0200 + + randr12: Initialize and keep track of updates to VidMode extension gamma value. + + This way clients querying the gamma value via the VidMode extension at least + get the last value set via the same, rather than always something bogus. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit fc3ce861cdab8606610726ce7c53f57d950c2407 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu May 14 11:35:25 2009 +0200 + + randr12: Fix calculation of gamma ramp values. + + The reciprocal gamma value was missed in the first copy and this mistake was + propagated to the second one. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit f3c61377d0fb1f09a18833995556fc9ffd11e097 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 12 18:27:09 2009 -0700 + + COPYING file updates for git master changes since 1.6 branch + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit b746a00cffca5c553b607a8e9c1074294a23b443 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 12 16:11:01 2009 -0700 + + Resync COPYING file with notices in code base as of xorg-server-1.6.1 + + Remove notices for code no longer in tree (Xprint, Xgl, kdrive, cfb, etc.) + Add/update notices for new/changed code in tree + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit f250eea2e90fc50bec5214c2f41132b95edc2c46 +Author: Jerome Glisse <glisse@freedesktop.org> +Date: Mon May 11 22:52:46 2009 +0200 + + DRI2: update DRI2 private drawable width & height according to X drawable + +commit 0952d12717031e9dda9e48123bb922d0f4e81834 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon May 11 15:27:46 2009 -0400 + + xselinux: Relax ownership restriction on SetSelectionUseContext. + + Instead, clients should keep track of the selection instances they use. + +commit ac13145dbcb284293582435409d8a90f276785c5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 11 15:45:46 2009 +1000 + + xkb: if kbd init failed, NULL out the pointers after freeing them (#21278) + + Reproducible: + Configure a server that uses the keyboard driver with an invalid ruleset, + e.g. (Option "XkbRules" "foobar"). Ensure that Option "AllowEmptyInput" is + "off" in the ServerFlags or ServerLayout section. Start the server. + After failing to init the keymap, the server will try to clean up after the + device, double-freeing some xkb structs that have not been reset properly. + + X.Org Bug 21278 <http://bugs.freedesktop.org/show_bug.cgi?id=21278> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ebfd6688d1927288155221e7a78fbca9f9293952 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Sun May 10 23:27:56 2009 -0400 + + Make compositing with transformed windows work again. + + The coordinate translation was broken in pretty much every way + imaginable. + +commit c2b668e6fff11c52f2a3f0dc3f4d1fc2c5bcf3e6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 5 20:27:53 2009 -0700 + + XQuartz: pbproxy standalone: added missing variable declarations. + (cherry picked from commit 2d947d17a3ef5fb8cef959bff0eb08b8bb5b6548) + +commit 9c5b761c8c86cca56f4b4af272f42ba89c9c3ba5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat May 9 16:19:13 2009 +1000 + + Revert "xkb: write the _XKB_RF_RULES_PROP to each device." + + This commit shouldn't have been pushed, we're still sorting out the API we + want to use. + + This reverts commit 876910a951053f0bd31e30098de3da15a1c1f5d6. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1e816065e5ec3b9394dc1fa5815457a664e15fd9 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri May 8 21:31:01 2009 -0700 + + Don't printf NULL pointers on HAL connection error + + Fixes Solaris bug 6801386 Xorg core dumps on startup if hald not running + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6801386 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit b680bda34da130ce408783f04214771471e41e8d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Apr 30 18:49:06 2009 -0700 + + Fix a couple off-by-one array boundary checks. + + Error: Write outside array bounds at Xext/geext.c:406 + in function 'GEWindowSetMask' [Symbolic analysis] + In array dereference of cli->nextSib[extension] with index 'extension' + Array size is 128 elements (of 4 bytes each), index <= 128 + + Error: Buffer overflow at dix/events.c:592 + in function 'SetMaskForEvent' [Symbolic analysis] + In array dereference of filters[deviceid] with index 'deviceid' + Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20 + + Error: Read buffer overflow at hw/xfree86/loader/loader.c:226 + in function 'LoaderOpen' [Symbolic analysis] + In array dereference of refCount[new_handle] with index 'new_handle' + Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256 + + These bugs were found using the Parfait source code analysis tool. + For more information see http://research.sun.com/projects/parfait + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 00bc043fa0398a1d14d46b87da2ff3031a9535dc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 8 10:10:25 2009 +1000 + + dix: export subpixel precision in XI2 events for root/event coordinates. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bae070914fc27db122e6131ae4838559c4a72f65 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 7 16:52:31 2009 +1000 + + input: update to inputproto 1.9.99.8 XI2 defines. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 83f32d3972b8bfb0a87069dfb3fcd64b6b7c6424 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 7 10:05:29 2009 +1000 + + Xi: Add XI2 property requests. + +commit 9935bec6e860cba9a3cc5baadd372ddb89d72ef0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu May 7 09:43:56 2009 +1000 + + Xi: split some code out of the XI 1.5 property request processing. + + This is in preparation for the XI2 property requests that can re-use much of + this code. + +commit f6f1e417063d2d61d65731a7e3ebca3ec2bdaacc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 22:25:28 2009 +1000 + + Xi: fix copy/paste error causing sizeof against wrong struct. + + This wrong check may cause BadLength to be returned to the client even if the + length is correct. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fc0013d744a345199f013ba5b6ef0e44201d0e68 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 16:55:32 2009 +1000 + + Xi: don't double-swap the XListDeviceProperties reply. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 409012061b7d361a172b20455d4aaa5e47527c42 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 16:42:46 2009 +1000 + + Xi: add missing break in XI event swapping function + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c3c64978c4a231a3a8c18211d0716df875c75efa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 15:05:06 2009 +1000 + + Xi: fix a couple of wrong dixLookupDevice permission tags. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0d947aa8e87c5d92b702c60190c8bc5d32c9ba9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 12:07:07 2009 +1000 + + xfree86: fix xf86PostMotionEventP type checking + + We only put internal events into the queue now, so let's check for ET_Motion + rather than the MotionNotify. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9457ce448988dacea9a3a1c14b6955767118ff31 +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Apr 30 13:01:17 2009 +0200 + + dix: remove superfluous includes from ptrveloc.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ee30e1b102d779403eeda97e007b81e85f006a37 +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Apr 30 12:58:48 2009 +0200 + + dix: fix warning in pointer acceleration + + newer gcc's warn against how this cast is done (though it eludes me why), + and lrintf() is also faster especially on insane processors like the P4 + (http://www.mega-nerd.com/FPcast). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5cf70183812541b33a6e83c7e1e3bc6198730cbe +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 5 21:00:31 2009 +1000 + + xkb: remove _XkbAlloc, _XkbCalloc, _XkbRealloc and _XkbFree + + We all agree that wrapping is fun, but seriously. One of these days someone + will get hurt. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0e31d3906deaee5d9ada66e538b9e93574a4d610 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 5 21:07:07 2009 +1000 + + xkb: remove some now-useless XFUNCPROTOBEGIN + + We bring them back if we start rewriting the server in C++, promise. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8b583ca2b21155359c6255f406c96599b277c762 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 22:25:28 2009 +1000 + + Xi: fix copy/paste error causing sizeof against wrong struct. + + This wrong check may cause BadLength to be returned to the client even if the + length is correct. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7ab5e9b97c300bba793a23fa13506b0c77c50ddf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 12:07:07 2009 +1000 + + xfree86: fix xf86PostMotionEventP type checking + + We only put internal events into the queue now, so let's check for ET_Motion + rather than the MotionNotify. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 50cc8adafca4ba3838d468278d6eb8a4692d2488 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed May 6 16:55:32 2009 +1000 + + Xi: don't double-swap the XListDeviceProperties reply. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3fc6fcfb267888d65a22ed7c3eda175a2530a3d5 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed May 6 10:39:16 2009 +0200 + + dix: add 'none' pointer acceleration profile with number -1 + + This is a shorthand for disabling acceleration, while retaining the + possiblity to use constant deceleration. If constant deceleration is + also unused, it will optimize motion processing. + + Other possiblities to deactivate acceleration were quite hidden, + and didn't always work as expected. E.g. xset m 1 1 would retain + adaptive deceleration, while xset m 1 0 would not (in the default + profile). + + Also removes the 'reserved' profile; it was unused and it's trivial + to add new ones anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9d1597cbefea6a5e7959f2099c46f1a284def7ad +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Apr 30 13:01:17 2009 +0200 + + dix: remove superfluous includes from ptrveloc.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 35fce4e5c7fa34f98b3e4010c6cb09ce38a9205c +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Apr 30 12:58:48 2009 +0200 + + dix: fix warning in pointer acceleration + + newer gcc's warn against how this cast is done (though it eludes me why), + and lrintf() is also faster especially on insane processors like the P4 + (http://www.mega-nerd.com/FPcast). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d220d6907d1d5138d1528c48b739e77f65616225 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 4 17:38:02 2009 +1000 + + Xi: add GrabButton and GrabKeysym code. + + We don't do keycode grabs in XI2, they're pointless. + +commit 1b593ced171d02f1d00034f0f733060706bb6d41 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 5 16:57:46 2009 +1000 + + Xi: access the prev_state to get group/modifier state for key events. + + Key events may change the modifier state, so we need to get the prev_state for + those (i.e. without the changes by the event already applied). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 35a4b8e7f4526a92d44cb16a783f21030cd1f6df +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 5 16:51:59 2009 +1000 + + xkb: remove oldState from XkbHandleActions. + + I really don't know what the purpose of this variable is or was, aside from + potentially clobbering up our key state since there's a path where it may be + used uninitialised. + + Also, this means that xkbi->prev_state is now accessible from the DIX with + meaningful data. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d523fbe428e4513d85402caa83e9349256b680cc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 4 17:00:57 2009 +1000 + + test: add test for xi2 struct sizes. + +commit 1b1b20d6e3e696e4437a9ef56128cde70a485f66 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue May 5 13:47:55 2009 +1000 + + Change glib require for tests to auto. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 749cae82204f347248c815b1068ffcae9825fe70 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 30 14:58:00 2009 +1000 + + mi: don't crash if we're trying to update the pointer for a keyboard. + + If a device doesn't have a pointer, just return. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7ecedb0f2ee5b53513205d1f0aa381451893b9c5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 14:35:12 2009 +1000 + + include: up the number of max. input devices to 40. + + With the Xtest virtual slave devices we have 4 devices for each MD + pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved + deviceids. It's quite easy to hit the current limit. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a38d33f6ac765bc5a3296b325e2c9b4a6a10ebf1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 15:24:02 2009 +1000 + + Xext: shut up compiler warnings in xtest.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 14d5471981151b27678de826daa078977217477a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 15:22:37 2009 +1000 + + Xext: return BadDevice from XTest if we don't have keys/buttons/valuators. + + BadDevice is an XI error, but this cannot happen for core XTest fake input + anyway since the device will be the matching virtual XTest slave device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f1bed0959e803784af142a0f45177ee3b675d78a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 15:15:04 2009 +1000 + + Xext: fix core Xtest button presses, don't call PickPointer. + + We already did the device selection before, so dev should be the XTest virtual + pointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 94648bb797d94b025746c60679c584e5be2fae28 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Mon May 4 15:38:22 2009 -0700 + + Don't prepare outputs & crtcs if set_mode_major is present + + A driver with this hook will take care of preparing the outputs & crtcs, + so calling the prepare functions will just cause unnecessary flicker. + + Fixes bug #21077 + +commit 7d85169c7ab1d05c21fdbb2877ffd79f344dbb6b +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon May 4 10:14:43 2009 +0200 + + Fix typo in ProcRenderCreateAnimCursor. + +commit 59358de4b68a01452bf68593beb83605087ebc8f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 4 17:30:19 2009 +1000 + + input: ensure various ProcUngrabKey/Buttons have the right grabtype set. + +commit 834ea071b619506e0bef5bdbf0e3c59831cf6e99 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon May 4 15:58:15 2009 +1000 + + dix: if grab types differ, two grabs cannot be the same. + +commit 63a3c727b35d1ffd8a850a5177bd6623cd78b179 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 15:24:02 2009 +1000 + + Xext: shut up compiler warnings in xtest.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 226dd90597ef29998ac5db15c5457aad3fe9729e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 15:22:37 2009 +1000 + + Xext: return BadDevice from XTest if we don't have keys/buttons/valuators. + + BadDevice is an XI error, but this cannot happen for core XTest fake input + anyway since the device will be the matching virtual XTest slave device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0fdff0a47a57a0096974ee83e07fefbad03075dd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 15:15:04 2009 +1000 + + Xext: fix core Xtest button presses, don't call PickPointer. + + We already did the device selection before, so dev should be the XTest virtual + pointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f0124ed93cdcee8d22a6690e639a3f60b9a63c54 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 14:35:12 2009 +1000 + + include: up the number of max. input devices to 40. + + With the Xtest virtual slave devices we have 4 devices for each MD + pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved + deviceids. It's quite easy to hit the current limit. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 08cd846000286eb5e07cc8d8cb313aff2d6e7faf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri May 1 11:06:06 2009 +1000 + + dix: only free the old cursor if the grab was successful. + + Testcase: start thunderbird and move a message around, crashes after two or + three moves. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 557dbadf3be273255e8fdb12d9321f4e88bf2b65 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Sat May 2 00:26:18 2009 -0700 + + XkbSetNamedIndicator should ignore SD's without LED's + + When ProcXkbSetNamedIndicator is called on a core device, and we + walk the slaves to set the LED's on each of them, ignore any slaves + that do not have either a KbdFeedbackCtrl or LedCtrl structure. + + (This is much more critical in xserver-1.5-branch, where we walk + *all* devices, not just the slaves of the specified master, and + thus return failure when setting an LED on the Core Keyboard and + hit a xf86-input-mouse device with no LED's to set.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0d9d3f3e361f769822caedccf4c2a58cc9930ecc +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Mon Apr 27 15:11:10 2009 -0700 + + DRI2: Force allocation of real-front buffer for non-windows as well + + For redirected rendering we end up with pixmaps (which the app thinks are + windows) that are double buffered. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + Tested-by: Pierre Willenbrock <pierre@pirsoft.de> + +commit 3d30789a05a730a03faa6058c73a5eda36ef3779 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 30 14:58:00 2009 +1000 + + mi: don't crash if we're trying to update the pointer for a keyboard. + + If a device doesn't have a pointer, just return. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 876910a951053f0bd31e30098de3da15a1c1f5d6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 30 14:46:45 2009 +1000 + + xkb: write the _XKB_RF_RULES_PROP to each device. + + We only have one root window and writing the rules used to the same property + for each device is quite pointless if you don't have the same RMLVO on all + devices. So let's be sensible and write the same property to the device too, + so at least we know which device got loaded with which RMLVO. + +commit 44044adc92e6bb6537f48c84727523d5cb23528c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 30 11:39:50 2009 +1000 + + xfree86: print a message if NIDR fails due to AutoAddDevices off. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 43dbbc30327f826068bc7cd2cdaf870ed61b4522 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 28 21:01:36 2009 +1000 + + Xi: fix typo in ProcXIGrabDevice + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6a618929a0c06ba0d6dac13d7e644cd9658d98ed +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 28 16:49:45 2009 +1000 + + input: reshuffle CreateGrab and friends to take a GrabParameters param. + + This is cleaning up work in preparation for XI2 passive grabs. + +commit e8e26f700c9c70d3f1bb53bdb71d1100f5c43a69 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 26 21:43:25 2009 +1000 + + Xi: split some grab parameter checking out of GrabButton and GrabKey. + +commit 57aff88c7d0761e590806d07bee1c9410680c89f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Apr 29 01:04:37 2009 -0400 + + Fix most remaining deprecated resource lookups. + + Callsites updated to use dixLookupResourceBy{Type,Class}. + TODO: Audit access modes to make sure they reflect the usage. + +commit 1abe0ee3da5e1268c7315f841d31337ea6524cf0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Apr 28 23:51:40 2009 -0400 + + kdrive: fix Xvfb build with separate libmain. + +commit 737b49199a05299486064e6e762cf2a2f6f95be6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 15:40:24 2009 +1000 + + xfree86: restore default off for DontZap + + Zapping is triggered by xkb these days, so note in the man page that it's the + Terminate_Server action. Since it's XKB, personal preferences towards or + against zapping should be achieved through xkb rulesets. + If Terminate_Server is not in the xkb actions, then we can't zap anyway and we + don't need a default of DontZap "on". + + This patch restores the old meaning of DontZap - disallow zapping altogether, + regardless of XKB's current keymap. + Ideally, this patch should be accompanied by b0f64bdab00db652e in + xkeyboard-config. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 98a1fa994158feca8bc80a10296a7675465c0e56 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 21 22:18:23 2009 +1000 + + test: add InternalEvent to core event conversion tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 990e8362a76fadc173e890d9052a2e5274b6eac5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 16 11:41:58 2009 +1000 + + test: add a simple test to verify device axis intialization. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4eac0df060b897470fb01cfd3b70f500da757c74 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 15 17:21:08 2009 +1000 + + Add a test-suite for in-server unit-testing. + + This patch adds a test/ directory that contains the setup for a unit-testing + suite designed for in-server unit-testing. All functions available to the X + server are available to the test binaries through static linking. + + This test suite uses the glib testing framework. + Do not use glib calls outside of the test/ directory. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c2c515ead38d9a6c9eae0b83aa7a82208f177b7e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 22 13:26:40 2009 +1000 + + dix: remove all but main() from main.c + + All other functions are pushed into where they seemed to fit. + main.c is now linked separately into libmain.a and linked in by the various + DDXs. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dc2767d1c5db60385867c76ba2de507fe0cb8a90 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 21 22:18:23 2009 +1000 + + test: add InternalEvent to core event conversion tests. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1127ca097cb75450bcccfc5f5d82e435de2fb5b7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 16 11:41:58 2009 +1000 + + test: add a simple test to verify device axis intialization. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4124c465a85713fe44843a16c5e2b13ece17e9d2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 15 17:21:08 2009 +1000 + + Add a test-suite for in-server unit-testing. + + This patch adds a test/ directory that contains the setup for a unit-testing + suite designed for in-server unit-testing. All functions available to the X + server are available to the test binaries through static linking. + + This test suite uses the glib testing framework. + Do not use glib calls outside of the test/ directory. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 987579c930bda803427a28cb82773c389f5110d6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 22 13:26:40 2009 +1000 + + dix: remove all but main() from main.c + + All other functions are pushed into where they seemed to fit. + main.c is now linked separately into libmain.a and linked in by the various + DDXs. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2a2a7fa6856b2e1954e904577535118f20cd9133 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Apr 27 20:23:53 2009 -0700 + + Solaris: use <sys/agpgart.h> instead of stale copy in Xorg sources + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 707af5f8c5fae3b6c4c5125a91917667bb0ab908 +Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk> +Date: Thu Apr 23 16:15:01 2009 +0100 + + Make the cursor completely optional + + For embedded use, it's convenient to be able to disable the cursor + completely, without having to audit and fix up all your third-party + code (e.g. Mozilla Firefox). + + Add -nocursor and -cursor server options to enable and disable the + cursor. The default is still -cursor, but embedded users can run the + server with -nocursor to hide the cursor regardless of what + application developers do. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 40a8f2f4088aa353de733a11327b628ef13a52e6 +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Sun Apr 19 21:15:22 2009 +0200 + + Fix obvious copypasta + + Reviewed-by: Ian Romanick <idr@freedesktop.org> + +commit a8cf63fd18b0ddadbadf7b47d620159854920050 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Apr 23 14:57:04 2009 -0700 + + Export CompositeRegisterAlternateVisuals. + + Drivers need this if they add visuals that require implicit redirection. Add a + new SDK header, compositeext.h, to contain the prototype for this function. + +commit 48573e7ea13e279593249036e6d30f1d7507882f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 26 21:32:37 2009 +1000 + + Xi: swap stuff->cursor in SProcXIGrabDevice + +commit ff6c7764c2909e4126403b7211faa6c58556b341 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Fri Apr 24 12:49:19 2009 -0700 + + DRI2: Implement protocol for DRI2GetBuffersWithFormat + + This change implements the protocol for DRI2GetBuffersWithFormat, but + the bulk of the differences are the changes to the extension / driver + interface to make this function work. The old CreateBuffers and + DeleteBuffers routines are replaced with CreateBuffer and DeleteBuffer + (both singular). + + This allows drivers to allocate buffers for a drawable one at a time. + As a result, 3D drivers can now allocate the (fake) front-buffer for a + window only when it is needed. Since 3D drivers only ask for the + front-buffer on demand, the real front-buffer is always created. This + allows CopyRegion impelemenations of SwapBuffers to continue working. + As with previous version of this code, if the client asks for the + front-buffer for a window, we instead give it the fake front-buffer. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + Reviewed-by: Kristian Høgsberg <krh@redhat.com> + +commit 28ddfc88d8d547941c7f4713db527a3c2f9ec35a +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Fri Apr 24 12:09:21 2009 -0700 + + DRI2: Add interface for drivers to query DRI2 extension version + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit a1c98f7fa9aa0cd5075ef2054c5d2be4d1e740f0 +Author: Joel Bosveld <Joel.Bosveld@gmail.com> +Date: Fri Apr 24 10:12:26 2009 -0700 + + Correct fcntl(F_SETOWN) error check in non-Solaris sigio code + + commit 64b7f96dca accidentally inverted the comparison, could + result in crashes on some systems later on. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 64b7f96dca23d2b33e0b8a8785d628d9a2f50e7b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Apr 24 00:14:12 2009 -0700 + + Add SIGIO/SIGPOLL support for Solaris + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 0c467b1f990f156a34d5ef117bd825df6b633114 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Apr 24 00:05:28 2009 -0700 + + Add casts to generated entries in sdksyms.c to silence type mismatch warnings + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 7d0f7518c2235a9dc783029971259ddaada2db20 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Apr 23 08:42:38 2009 -0700 + + Fix byte swapping of XF86VidMode{Get,Set}GammaRamp + + Fixes OpenSolaris Bug 8315: + Xorg segfaults when screensaver fades in cross-endian xdmcp session + <http://defect.opensolaris.org/bz/show_bug.cgi?id=8315> + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 057fc9a4f89282e440b5e11458f1dd8655879dd8 +Merge: 95628b7 932d6bc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Apr 24 16:15:47 2009 +1000 + + Merge branch 'master' into xi2 + + Conflicts: + Xi/chdevhier.c + include/input.h + +commit 932d6bcbb68194c5bdfeb336f700dc8b31529223 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Apr 24 15:28:45 2009 +1000 + + mi: remove superfluous check. + + mieqProcessInputEvents doesn't process events from MDs anymore, so we don't + need to check for pDev->isMaster. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fab563bf8f6b63906ce9d5a568c467425843265b +Author: Benjamin Close <Benjamin.Close@clearchain.com> +Date: Fri Mar 27 16:44:15 2009 +1030 + + input: propagate XTst events through virtual slave devices. + + A XTest virtual slave device pair (kbd/ptr) exists for every master + device pair. This is so XTest events are correctly propogated via slave + devices up to Master devices and the classes are correctly changed along + the way. We add the XTest slave device pair to the Virtual Core pointer + and provide a simple way of creating the devices. + + A XTest Slave Device is identified by the XTstDevicePrivateKey property + being set in the devices devProperties + + XI events are still propagated through the matching device, in the hope the + client knows what it is doing. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ccd28ca2ad40aecf951ab058d89062828e3e5d8a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 22 19:23:17 2009 -0700 + + XQuartz: Localization update + (cherry picked from commit 9435fc5e20e25ce66ec85bde033daff51f39f69c) + +commit a362d0f4fb79150f7b8e0eb3d1dc1cdee2f98d95 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 11 19:06:45 2009 -0700 + + XQuartz: Make sure the bgMouseLocationUpdated state is consistent + (cherry picked from commit 8fa8a8e1db60c8ac60d10f1f15517471d2291f77) + +commit 8dc8812c226222fc64f8e489f9f123687a95d3d1 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Apr 23 12:13:35 2009 +1000 + + exa: add missing exa.h header include + +commit 3ec6a121e110ba3cae964ee201d4d5bf818b6dff +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Apr 23 12:13:05 2009 +1000 + + exa: missed exa.h change + +commit 02ae85c4c93bbd0013c063ce0014b365a8ba061f +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Apr 23 12:04:17 2009 +1000 + + exa: add CreatePixmap2 hook for driver pixmaps. + + This adds a revised pixmap hook for driver pixmaps, which is + required to support tiling on various chips. + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit 9d684ba0bcab53841a17ebd521507b6df8bc4b45 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Apr 16 10:28:36 2009 +1000 + + exa: avoid offscreen pixmap swapped out flag for driver pixmaps + +commit 0dfb97f15f591f85e079f5829c77d0c328d00464 +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Apr 22 20:01:49 2009 +0200 + + Bug#21324: Add quirk for Iiyama Vision Master 450 + + Reported-by: Jeremy Henty <onepoint@starurchin.org> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 44227ef1b77467c76147b9bf79bdd0e6305a522a +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Mon Apr 20 18:20:52 2009 -0700 + + DRI2: Send the version the code actually supports + + This prevents building an older server with a new dri2proto.h from + resulting in a DRI2 extension module that lies about the version it + supports. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit d1e916d29be8b470cbc8cadcf6e83991fdbc5a9f +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Thu Apr 16 12:10:34 2009 -0700 + + DRI2: Add missing front-buffer flush callback. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 826a5bff0136b2b4d55a9e6e6bc3a7a64da9031e +Author: Benjamin Close <benjamin.close@clearchain.com> +Date: Thu Apr 16 15:33:30 2009 +1000 + + dix: Change AllocMaster into AllocDevicePair, allow creation of SDs too. + + Allocating a slave device is essentially the same as allocating a master device. + Hence we rename AllocMaster to AllocDevicePair and provided the ability to + indicate if a master or slave device pair is required. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e2e5932bda3f473629d4be6f3ca4dcab18993eb6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 16 11:06:52 2009 +1000 + + dix: don't allow more than MAX_VALUATORS on one device. + + Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the + internal event delivery relies on not having more than MAX_VALUATOR axes, so + let's cap it down. + If there's real devices that require more than the current 36, I'm sure we can + bump this up. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 063833f3a6d9f8f657e3de309c8d6d5c3d606513 +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Dec 24 14:23:37 2008 +0100 + + Add XI 1.5 event and requests to protocol.txt + +commit 4f86ee61a4abf7a29e565d095aa08abd0ca9dc66 +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Dec 24 14:17:27 2008 +0100 + + Add RandR 1.3 requests to protocol.txt + +commit 6559f02ef89cb0ee365110d6a928ebd29632ad53 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Fri Apr 17 15:14:45 2009 +0100 + + xkb: set bell_func in InitKeyboardDeviceStruct. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 95628b797e2b326ae15406df4f736e25f5d2f12f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Apr 20 14:04:54 2009 +1000 + + Xi: use the XI2 defines for AsyncPair, SyncDevice, etc, not the XI ones. + + And don't allow some values on SDs either. + +commit 335c63fcd6a53c1d3dffd6e00c0acd400c61e3d3 +Author: Werner LEMBERG <wl@gnu.org> +Date: Fri Apr 17 15:22:57 2009 +0200 + + Add newline to some LogMessage strings. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d5ad14c8ed4d8360e1df8cd0bacf6a7c9c31df91 +Merge: 54716fd 0e0642e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 19 22:28:22 2009 +1000 + + Merge branch 'master' into xi2 + +commit 54716fd3dbc251db9d251d1d0435942efaa63259 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 19 22:12:11 2009 +1000 + + Convert to using int32_t fixed point values on the wire. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 129ac9a9145323e3f126590b491e718f976f80ce +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 19 21:31:56 2009 +1000 + + dix: set root_x/y for device events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit eeb1e4cd254c047539933c3b886037e67ef30762 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 15 22:17:15 2009 +1000 + + Xi: add support for XIAllowEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 74d0fc3aee05bc4f505274d81dd44c0d2b4368ff +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 16 11:06:52 2009 +1000 + + dix: don't allow more than MAX_VALUATORS on one device. + + Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the + internal event delivery relies on not having more than MAX_VALUATOR axes, so + let's cap it down. + If there's real devices that require more than the current 36, I'm sure we can + bump this up. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit edb70caf21fa5da3c336c47c62218a3f05c635b8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 15 22:16:49 2009 +1000 + + dix: remove un-used parameter "core" from AllowSome + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bb5418d4901017c657031181d3839f58b387a2a3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 12 22:22:21 2009 +1000 + + Xi: Add support for XI2 active grabs and ungrabs. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c11ef87931f920ba782ba4e9b47d9c31ad7c1cf7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 12 22:16:14 2009 +1000 + + Xi: take XI2 requests into account when checking opcodes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c94ea5bc055e4efc323e84b7a8266e8b8a4af48e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 12 17:38:28 2009 +1000 + + input: use a GrabMask union in GrabDevice to allow for XI2 masks. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6bb4b5b93701535402f65ea828348ed7747c7dbf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 12 16:20:10 2009 +1000 + + Xi: add XI2 grab protocol request handling. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 09f9a86077f0058ce88ee9b3df5d1ab854eeca43 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Apr 12 16:19:45 2009 +1000 + + input: replace GrabRec's coreGrab field with grabtype. + + Don't allow grabs of different types to override each other. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7fbe1b7d63c94b344e8ff9d09c0bb162ca104909 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat Apr 11 13:10:31 2009 +1000 + + Xi: remove the GetExtensionVersion hack. + + Squashing data into a request that's defined to be padding is probably not the + best idea. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0e0642ee9466d3268476d0084a83a9d93a4aa555 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 16 16:17:07 2009 +1000 + + os: don't malloc memory in LogVMessageVerb. + + LogVWrite is limited to a buffer size of 1024, so we don't loose anything here + by truncating. This way we can use LogVMessageVerb (and xf86Msg and friends) + during signal handlers with the normal message types. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 62d2fb68638e9f2aa3c1d72027619c4d38f5b812 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 16 17:06:33 2009 +1000 + + xkb: Add XkbFreeRMLVOSet helper function. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 73e1055b1275470dcc2d53b15898c866d9721d3e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat Apr 11 11:19:29 2009 +1000 + + Xi: fix a typo in a #ifdef + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cbbc7fed994448852961a987a8b0eadf718b24bf +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Apr 1 10:53:10 2009 +0200 + + dix: correctly utilize tracker buffer and protect from timer overruns + + two small related fixes hard to split up + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ca4918ac2ff003142aefbd8ac7ec2bc398ccc6eb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 19:31:04 2009 +1000 + + Xi: remove fail from SProcXISelectEvent. + + Leftover from rebasing once too often, I guess. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 463676f016a105a790cbb386d20eb5b188c04652 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 19:11:59 2009 +1000 + + Xi: remove un-used variable pXIClient + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 32b13ec4cd42842a133aa6428f49638b0448efc9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 19:11:27 2009 +1000 + + Xi: silence compiler warnings about "wrong" event types. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f2e957c5342aefc8329e9fe282b7072f767fcd28 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 19:07:36 2009 +1000 + + mi: add prototype for CopyGetMasterEvent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d80798ba2ae018086aaf230fcd8bc71d3bf06b11 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 20:27:00 2009 +1000 + + mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4dedb900f4fbd3bdc9538b1e82cab2044438a770 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:42:06 2009 +1000 + + xfree86: shut up compiler warnings - typecast to InternalEvent + + Reported-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4fa7fcf610d2ab91c1158f8034bbc0531060a86f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:40:20 2009 +1000 + + mi: fix compiler warning - explicitly typecast to InternalEvent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8bf2f562678107c346e8664f18c10f315c2768f5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:14:39 2009 +1000 + + dix: fix dev/keybd variable mixup. + + Reported-by: Eric Anhold <eric@anholt.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 012cb1956a69f6cf2a878c5331e792fb12c73e9d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:06:32 2009 +1000 + + xfree86: fix use of uninitialized variable in DGAProcessPointerEvent. + + Reported-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 73b01a9aac5fde46ccd90c08a070e9d2496092b9 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Apr 8 14:35:01 2009 +0200 + + dix: fix pointer accelerations remainder handling + + This didn't really work as intended, but did amazingly well thanks + to roundf() hiding the defect. Cheers! + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4318075140cc287871d3c3b9f777289ea4ffa23a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 7 21:51:02 2009 +1000 + + dix: store subpixel precision and send it down the wire to the client. + + For the valuator data, not yet for root x/y and event x/y. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9212948461c5e053abb61fff73ced4a00f138544 +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Mar 21 18:19:19 2009 +0100 + + dix: allow relative motion buffer to accumulate in a natural way + + Since with XI2 we pass sub-pixel motion, anything else is broken. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ad76656f8869e2065f0c4e66cfbeef0b42c61769 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 17 17:46:58 2009 -0400 + + randr: Accept gamma set requests from XF86VidMode clients too + +commit d9bf52b4abd29a3c206cd1e765b680659ddac1c6 +Author: David Jander <david.jander@protonic.nl> +Date: Fri Apr 17 01:34:18 2009 -0400 + + [kdrive] Fix rotation of pointer + + Rotation matrix for pointer coordinates was incomplete and pointers with + absolute coordinates did not work correctly in xserver (kdrive) when the + sceen was rotated other than by 0 degrees. + + Signed-off-by: David Jander <david.jander@protonic.nl> + Signed-off-by: James Cloos <cloos@jhcloos.com> + +commit 4559d2ace6ac55fe361f572ded0769cdd1f3b545 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 16 22:48:11 2009 -0400 + + security: Grant untrusted windows remove access on all windows. + + This allows untrusted clients to destroy their own windows when they + have been reparented by a trusted window manager. + +commit 3481b32ab971c41cb972f6819ae049f3e9f7033b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 16 22:39:54 2009 -0400 + + security: Fix a crash caused by wrong ordering of format arguments. + +commit 6045506be0cebca4ebbe943ae77f020aafa703d4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 16 22:33:12 2009 -0400 + + security: Revert behavior of extension access for compatibility. + + Previously, three extensions were defined as "trusted" by the extension: + BIG-REQUESTS, XC-MISC, and XPrint. No other extensions were permitted + to be used by untrusted clients. + + In commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 this was changed for + some reason. Return to the old, compatible behavior. + +commit 56a5955c8cd87137248edb2cbc65d384376d72ad +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 14 17:05:04 2009 +1000 + + xkb: strdup the values returned by XkbGetRulesDflts + + XkbGetRulesDftls may get a copy of what will later be freed when passed into + XkbSetRulesDftls. + + On the second run of XkbGet/SetRulesDflts: + XkbGetRulesDflts(rmlvo) + rmlvo->rules = current-rules + + XkbSetRulesDflts(rmlvo) + free(current-rules) + current-rules = strdup(rmlvo->rules) + + Leaving us with garbage in current-rules. + + This patch requires callers of XkbGetRulesDflts to free the associated memory. + + See also + http://lists.freedesktop.org/archives/xorg-devel/2009-February/000305.html + + Reported-by: Benjamin Close <Benjamin.Close@clearchain.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit b406886bbffadaa52864a99f2a0520999eadc15d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 14 16:57:29 2009 +1000 + + input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct. + + Virtually all callers use + XkbGetRulesDefault(&rmlvo); + InitKeyboardDeviceStruct(..., rmlvo); + + Let's save them the trouble and accept NULL as a hint to take the + default RMLVO. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 4e4e263bc073bf452f19c932b937c4881ae71f64 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Apr 15 22:16:49 2009 +1000 + + dix: remove un-used parameter "core" from AllowSome + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dd6e8a14ec1c8f4ed9c51ca2764261e6e48d13b3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat Apr 11 11:19:29 2009 +1000 + + Xi: fix a typo in a #ifdef + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit de1e43181bd670877b994db221ad8a04b5d63324 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Wed Apr 15 11:13:48 2009 -0700 + + DRI2: Don't leave empty entries in private->buffers + + This should fix bug #21130. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit b3e3154cce47add97f5561088036ce3b9e7dc937 +Author: Robert Noland <rnoland@2hip.net> +Date: Wed Apr 15 12:06:19 2009 -0500 + + One = is more than adequate here. Make is sh safe. + +commit 74d27c8b5bac7c8d2ed02ba86e09bf09924ce05c +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Wed Apr 15 15:44:17 2009 +0200 + + Fix build on hurd-i386 + + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523970 + +commit faf7dfa099f5b42a703313fbd1bf8afdad07a179 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Apr 15 18:26:06 2009 +1000 + + randr12: looking up these bits if randr isn't initialised is bad. + + When xinerama is enabled we don't get randr protocol, but the + driver might still want randr internals + +commit efa31092d6703397121a0ada4f7205a8ecad3d3d +Author: Ander Conselvan de Oliveira <ander@mandriva.com.br> +Date: Mon Apr 6 16:01:20 2009 -0300 + + xfree86: Remove device from inputInfo.devices if ActivateDevice failed. + + After the call to xf86ActivateDevice, the new device will be added to + inputInfo.devices. However, if the subsequent call to ActivateDevice + fails, the correponding InputInfoRec for the device is deleted but an + entry still remains in inputInfo.devices. This might lead to a server + crash later on (on InitAndStartDevices for instance) when the device + control proc would be called for an invalid device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d79bad0aa70403ead8ec87bac8463a6e2005802c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Apr 13 17:49:00 2009 +1000 + + xfree86: don't synthesise a mouse section if synaptics devices are found. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4a27618565f3151ab17f0ca9ecbde12fa7ba13c0 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Apr 14 16:21:04 2009 -0400 + + composite: Fix resource lookups + +commit e7785e8af3e34f9d1089d8499d16802984ab9823 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Apr 14 14:24:31 2009 -0400 + + xfixes: Fix a couple of resource lookups + +commit 0eb19f9437b7d8c19592e49eedb028771d300d80 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Apr 14 10:54:25 2009 -0400 + + xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) + + You could be more clever than this, but the wire protocol says this + really is an array of not more than 255 ARRAY8, so it's not just a + matter of changing the types. + +commit f0543ae4ec0fcb5d696e7b2983653bd779f1eddc +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 8 14:17:41 2009 -0700 + + Fix unused var warning from pci cleanups. + +commit 181cc08c8908a119fc403f970dea8cc98d3e0b9b +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 8 14:17:40 2009 -0700 + + Add shave so that we can see the steaming piles of warnings generated. + + The old style output can be reenabled for build system debugging using + "make V=1", or --disable-shave at configure time. + +commit 4474c200a102feda72f9572a96cb588009aa0147 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 8 14:17:39 2009 -0700 + + Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave. + + This is more sane anyway, as it ensures a rebuild when changing them. + +commit e72c85547b405fbd0117dc1236e5ca5a2126063c +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 8 14:17:38 2009 -0700 + + Move contributed m4 to a subdir so we can more easily update contributions. + +commit bef1cfb2395df47458159a0b7ae27b9db15025ef +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 14 16:54:42 2009 +1000 + + xnest: remove unused variable 'names'. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7b6400a1b8d2f228fcbedf17c30a7e3924e4dd2a +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Apr 9 13:16:37 2009 -0400 + + glx: Fix drawable private leak on destroy + + When a drawable goes away, we don't destroy the GLX drawable in full, + since it may be current for a context. This means that when the drawable + is destroyed in full later, the backend doesn't get a chance to + destroy resources associated with the drawable (the DRI2Drawable). + + With this patch, we destroy the GLX drawable in full when it goes away + and then track down all contexts that reference it and NULL their + pointers. + +commit 140463a197fb93d0a4bfad924efc35b860e8cc54 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 11 16:53:59 2009 -0700 + + XQuartz: Use correct values for ProximityIn and ProximityOut + + This was the other underlying cause of teh 100% CPU tablet issue. + (cherry picked from commit a9cecf34c23fbcd59b56b380c51d31a9fabc3eb7) + +commit 80a7bb2605f9b439d6221c0495a629a39177a018 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 11 17:26:07 2009 -0700 + + XQuartz: Solve the tablet 100% CPU bug + + This happened because we put a byte in the fd to wake up dispatch, but we never actually enqueued anything in mieq because the num_events was 0. + (cherry picked from commit c21ca7558d2faf93c61f5feaafd7c878e9e21942) + +commit 6f8f7c78f1b722bc70a0ea8f6340116a1e09e858 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 11 16:13:42 2009 -0700 + + XQuartz: Re-enable background window checking + + since that code was not the culprit for the wacom tablet, background 100% CPU bug + (cherry picked from commit fc1dc5d71b2a488a8a94d953dd8e67353161a590) + +commit 8522a759c9e78478bb399b91d3a0af2d23ea6766 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 11 16:12:23 2009 -0700 + + XQuartz: Only set MotionNotify on activation if it is updated. + (cherry picked from commit ae8077a251ef27381a755d57ff974767bda16148) + +commit 5e55becddccc376ab7338789562ad6d6cd750de9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 11 14:23:41 2009 -0700 + + XQuartz: Make sure the Fn doesn't trigger unneccessary calls to DarwinUpdateModKeys() + (cherry picked from commit 70a18558c6b0a02b633fd8974f002cdf3cdc713e) + +commit bd1d9179094657865b0606ed0ac835a8b8df3be1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 11 13:53:38 2009 -0700 + + XQuartz: Re-enable Fn as an option for 3button mouse simulation. + + Patch from Martin Otte <otte@duke.edu> + (cherry picked from commit b5ec3be6b5449b5d575bc1472fdd1c9cb15cb8be) + +commit 1b5758bef0840c6614244e321790231b3c9477c9 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Apr 9 15:45:57 2009 +0200 + + exa: implement UTS based upload through CopyArea + + - Some image viewers (eog, gqview) trigger the CopyArea path of Xext/shm.c + - I'm not aware of any code path that wouldn't like UTS and trigger this code. + - miDoCopy should handle src coordinate clipping. + - Overlapping blits are obviously not an issue (both would have to be offscreen or not). + +commit 567cf67959b30432ae30f4851ec17b3a375ab838 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Thu Apr 9 14:38:24 2009 -0700 + + DRI2: Synchronize the contents of the real and fake front-buffers + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit f1a995d1496d73741731e32f475097c44a8da972 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Thu Apr 9 14:31:01 2009 -0700 + + DRI2: Do not send the real front buffer of a window to the client + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit aa2928325fe51d94a636dde9c090e8f54a311a12 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Wed Apr 8 15:44:34 2009 -0700 + + DRI2: Add fake front-buffer to request list for windows + + If a front-buffer is requested for a window, add the fake front-buffer + to the list of requested buffers. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 808fd2c67f303cb721769375b11ce8b90ffc1909 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 9 20:00:37 2009 -0700 + + XQuartz: xprSetWindowLevel updated to store the level requested by the WM + (cherry picked from commit c28c2ddc3a8f3c5b9beec396953bb3ac9ee4714b) + +commit dfb0d7aefbbdfc0db966e3a84d52f638135d9138 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 9 18:51:22 2009 -0700 + + XQuartz: Update window levels when changing rootless state + (cherry picked from commit 1359ded5bfc14a80fb998b01a54ecacb96c4ff88) + +commit d5ef88d7543ed787093099ab18db766c446b47d1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 9 18:27:22 2009 -0700 + + XQuartz: Fix window levels for rooted mode to allow showing the menu bar. + (cherry picked from commit 80759a4186bf0335edc85aecea2faf11fe09f491) + +commit 15146b863759640e7a73fab2301fb28ef4dead84 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 9 17:47:41 2009 -0700 + + XQuartz: Properly set the window level for the root window + (cherry picked from commit bdf9286d1cbfeaaf8eaf03d28091e91ee587ee25) + +commit 8d5dcfe2154f217bd8fde5509d78f3383add8725 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 9 04:36:26 2009 -0700 + + XQuartz: Properly set the menu bar and hotkey state when changing rootless mode. + + Currently no code path exhibits the broken behavior since we only toggle into rootless if we don't have the root. + (cherry picked from commit 970f100ca3c5fc0662ae7658d49d118fbd9de943) + +commit 82d7cf5cdcbc5e451a87f8c2f64cd5d2e3627d54 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 9 03:55:13 2009 -0700 + + XQuartz: In rooted mode, make sure we start in the hidden state. + (cherry picked from commit 5ecc497f71c2133f773f6c56ad76cb778862ddd6) + +commit e86f4e93020d56385418850a9eebae8076dcb9ac +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 6 21:34:14 2009 -0700 + + XQuartz: Send MotionNotify before button presses when X11 is in the background + (cherry picked from commit c80d0ec18ef5b842447d31360406d0b5b9424222) + +commit 5ccfad8df099e8ebc4bf2dd53c3db1460903b135 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 6 19:21:46 2009 -0700 + + XQuartz: Revert most of the previous override redirect patch + + The changes actually caused all windows to move to the current space. Instead, we're going with a fix entirely within Xplugin that depends on quartz-wm being the window-manager for now. + (cherry picked from commit 997b6f3142c622541bb5bac98652abae75d1101d) + +commit ff7f019bbcbc52618cc478db7baed57aa5b7c3d3 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Apr 1 10:53:10 2009 +0200 + + dix: correctly utilize tracker buffer and protect from timer overruns + + two small related fixes hard to split up + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 06aebecb19dd9d90d73b742a09b6068b862f1d05 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Apr 8 14:35:01 2009 +0200 + + dix: fix pointer accelerations remainder handling + + This didn't really work as intended, but did amazingly well thanks + to roundf() hiding the defect. Cheers! + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 98f4179156391752e6688339487458ad7828abf4 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Mar 26 23:04:24 2009 -0700 + + Use RTLD_DI_SETSIGNAL to catch runtime dynamic loader errors and clean up + + Based on fix for Sun bug 6813925: Xorg needs to catch ld.so.1 failure + so it can close down devices cleanly + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6813925> + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit a0b6a363dca8ce0dc6f4eb79333e48496153cd67 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Mar 9 13:22:57 2009 -0700 + + Lift fatal signal handlers from DDX'es up to a common DIX implementation + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit fcc19e673e3ef33d64916dd933853f8aa667c4d7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 20:27:00 2009 +1000 + + mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4fee979d0632751d3d54d2115e84e9654edf0622 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 19:11:27 2009 +1000 + + Xi: silence compiler warnings about "wrong" event types. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6b467bf879eeb77d167ef321e6dda97ca9d7010a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:42:06 2009 +1000 + + xfree86: shut up compiler warnings - typecast to InternalEvent + + Reported-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8a2a184da78a3e9cbeae8290431f40d5ec7f3636 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:06:32 2009 +1000 + + xfree86: fix use of uninitialized variable in DGAProcessPointerEvent. + + Reported-by: Eric Anholt <eric@anholt.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 011cee3103c146c8096b7098a27993f99e07a824 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:14:39 2009 +1000 + + dix: fix dev/keybd variable mixup. + + Reported-by: Eric Anhold <eric@anholt.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 630a6e9d14ffbf036fa72f580c72c0172d7c20bd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 08:40:20 2009 +1000 + + mi: fix compiler warning - explicitly typecast to InternalEvent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e3bb7dea06b9ab0e30d801bf6c3a59f94290aaed +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Apr 9 19:07:36 2009 +1000 + + mi: add prototype for CopyGetMasterEvent. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 346e71525fc545c6ca4ad79425722282d1544459 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Apr 9 09:36:41 2009 +0200 + + EXA: If the driver can't composite to an a8 mask, try an argb mask for glyphs. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 682d7b55699cacbb2dbcd84a5e816bf6e2d2f02a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 9 02:48:04 2009 -0400 + + xselinux: Don't BadAlloc in List* requests if there are no items to list. + +commit 3a0ee199dcec39596756a995996eac388acf6315 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 9 02:26:24 2009 -0400 + + config: fix crash caused by strdup(NULL) + +commit 7b3982eb6518da33ab01c2fbf7ceb45b89f841df +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Apr 9 08:21:09 2009 +0200 + + glx: Test the error value, not its address... + +commit 03aebed519986c4dd03e02b3b3d4af1f64595ca7 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Wed Apr 8 14:54:30 2009 -0700 + + Use a #define instead of a magic number + + The number of buffers is likely to change in the future, so having + this as a define is the right way to go. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 0d9f3ca7eabd4c514808114d30627f682c8bd030 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Wed Apr 8 14:53:46 2009 -0700 + + Allow GLX sources to build against Mesa 7.4 sources + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit e8b324102f6e21ae2b8292a6f50d016dd6254dd6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Apr 8 15:10:16 2009 -0400 + + xselinux: Don't require incoming context strings to be null-terminated. + +commit df27b870a8db7a5153b18a556fe77efa590f9eee +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Apr 7 16:28:08 2009 -0400 + + Convert remaining GLX LookupIDByType() calls + +commit 92562747a0fdbef1dbedf734cb55dd6a9e1d2994 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Apr 7 13:58:53 2009 -0400 + + Add validGlxDrawable() and use dixLookupResourceByType(). + + Fixes deprecation warnings, and fixes a couple of GLX error codes + for failing drawable lookups. + +commit f70cfc8f90091ef0f5ed0a5b2e023e7fd6369b36 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Apr 2 17:30:19 2009 -0400 + + Don't stomp on dixLookupDrawable() return value in DoCreateGLXPixmap(). + +commit 30d81ad72e870cc37754bd8c8aadf605450ec16e +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Apr 2 17:24:12 2009 -0400 + + Make GLX context lookup use dixLookupResourceByType() + +commit 66539cc05d0b017b9feb4a038499907810140623 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Mar 26 22:22:32 2009 -0700 + + Don't leak default font path when appending built-ins + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 6c3b633299f12051fcf37fb8439f358de876cf03 +Merge: adf21db 0cfd481 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Apr 7 19:36:27 2009 +1000 + + Merge branch 'master' into xi2 + +commit 0cfd48130842685828e0662a27272a3a65facd23 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Mar 23 11:41:16 2009 +1000 + + dix: Dont change the keyboard mapping on non-keyboard devices. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 69e73e5ce0e3971eceed71216d2d7e7d9cd57cc2 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Apr 6 17:56:49 2009 -0400 + + config: Remove useless xf86conf{{m,c,re}alloc},free} macros + +commit 485946120a6522db9298111752de9be3d675e0b3 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Apr 6 17:51:35 2009 -0400 + + config: s/xf86configStrdup/strdup/ + +commit 5f769b73441cf29c05a05c728ab81bdde1fc00b6 +Author: David Jander <david.jander@protonic.nl> +Date: Mon Apr 6 13:01:08 2009 -0400 + + kdrive: Fix segfault in tslib support + +commit 843166b033dc0544b9f3cf3c91fc3ae3650bda14 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Apr 6 11:05:17 2009 -0400 + + os: signal handlers return void. + +commit aa6fbc2a3679896181610aee7ce2844d4322a5ce +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Apr 6 10:58:47 2009 -0400 + + Remove some OS/2 leftovers. + +commit 2c03a63ff6855272d587b4972a67f64115a1ce4c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 5 03:20:40 2009 -0700 + + XQuartz: Use updated Xplugin API to send overide-redirect windows to the current space when they're ordered in + + This fixes the annoying "using a menu moves me to another space" bug + (cherry picked from commit 9e6dab89e08a26d764ba1aeaeb804c3d25c667da) + +commit 67621f3b39c387b3f7bfc65781051aea51c0b83f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 5 00:06:57 2009 -0700 + + XQuartz: Send a MotionNotify event for the mouse cursor when activating X11.app + + Otherwise if X11.app was activated with a mouse click, the location of the even is the last location of the cursor before X11 was deactivated + (cherry picked from commit c7457d7b31ddd2ddfd04dd6294bed4532664e1ab) + +commit e1338d27141125af61634597c5dea880692c4017 +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Apr 4 23:43:28 2009 +0200 + + xfree86: Remove unused DEFAULT_UNRESOLVED and DEFAULT_BEST_REFRESH macros + +commit e25d55ad546905c4921f0a26385bdb9f22038429 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 22:38:00 2009 -0400 + + Revert accidental Makefile change from previous commit + +commit 472811dc4ba741ab09db184216878700f4adf745 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 22:27:51 2009 -0400 + + DPMS: Re-export the various DPMS variables. + + The drivers might not need them but extmod does. Should move it to + builtin though. + +commit cbb165ab88cb0810268001e84d87671440baf837 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 18:34:45 2009 -0400 + + os: Remove the useless -x option + +commit 6574ab092fb80b7731e06ede653b6af92fa7684e +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 18:03:43 2009 -0400 + + DPMS: Remove the defaultDPMS* variables + +commit c1cf36ee29e41901ecd382f0258110ebb4a0124e +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 17:51:55 2009 -0400 + + DPMS: Simplify command line parsing + +commit 2d0a4fff7985f58c21023cc4757090ee67067593 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 13:44:37 2009 -0400 + + DPMS: Remove unused DPMSGet() + +commit d52fddefaeb43f15b677eefbea4a288a9948373b +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 13:33:03 2009 -0400 + + DPMS: Align the default timeouts with the default screensaver timeout. + + On a typical LCD, a black screensaver is actually worse for power + consumption than a normal screen, because it takes more energy to turn + the crystals opaque. Also, the intermediate DPMS states are essentially + useless and most monitors alias them to the 'off' state, so we may as + well do the same. + + As a pleasant side effect, this brings the default DPMS timeouts in line + with the EnergyStar Program Requirements for Computers: + + http://www.energystar.gov/index.cfm?c=revisions.computer_spec + + which state that products must be "shipped with the display's Sleep mode + set to activate within 15 minutes of user inactivity". + +commit 38576dc3ae8ddec2baedd2f7e64abdfc56bedf93 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 11:55:41 2009 -0400 + + DPMS: Simplify some macro silliness. + +commit 1c01127a214731a21c4784249a429c74f17bd424 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 11:39:18 2009 -0400 + + DPMS: Unexport all the various setup variables. + + The drivers don't need to know any of this. + +commit a99b0ab918998c9a1b9f8692591b8cb59a12eb9e +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 11:32:00 2009 -0400 + + DPMS: Fix cast abuse + +commit 4da347adb1fcc39e8f4fb2cadd98e887d7ac877a +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 11:18:21 2009 -0400 + + DPMS: Code motion. + +commit 1731882341c191b4ffd78e0c1fd9297c636e0401 +Author: Havoc Pennington <hp@pobox.com> +Date: Fri Mar 27 12:30:37 2009 -0400 + + Set bg pixmap of composite overlay window to None (#20912) + + Otherwise it's impossible to get the COW without a white + flash on the screen, because it's on top, mapped immediately, + and unaffected by composite redirection. This makes + initial login ugly when it doesn't need to be. + +commit d2690375dfd994817f004cda133ca2a492c0b956 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 3 11:06:50 2009 -0400 + + kdrive: s/KdSaveString/strdup/g + + This isn't even funny anymore. + +commit 91b697efdefba125348dbcaf584ee51a7f8c9bf6 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Apr 1 17:42:33 2009 -0400 + + Support setTexBuffer2 in AIGLX. + + Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined + alpha channel for pixmaps. + +commit 1c101d75d4855b2698e3fc8d2dd662f20585812f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Mar 26 22:25:08 2009 -0700 + + Don't leak canonical module name and patterns if module is built-in + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9180081ec32b6c655d193de4c89b59d222a72579 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Apr 1 13:45:02 2009 -0700 + + XQuartz: Still send mouse events while X11 is in the background if we have test extensions enabled + (cherry picked from commit f393fb686cfbedb11a1539d4eaf5c491af8b3a64) + +commit 029307e79a14cad5bde8f1f4a5d0a2f740271f06 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Apr 1 13:07:15 2009 -0700 + + XQuartz: Return BadRequest when SendPSN isn't implemented rather than success + (cherry picked from commit 49871e99179d5176a1ec516c8f449e2dc219faea) + +commit 0603fbc1d3b2db5c25faabbfb5e04914110b4d0e +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Apr 1 12:46:51 2009 -0700 + + XQuartz: Pad xAppleDRINotifyEvent to 32bytes to match sizeof(xEvent) + (cherry picked from commit 276ee3bb087c772f57a987519aa4d94afeceadaa) + +commit b1dab580bdfb4acfe3feddeda6e760098ec4922a +Author: Tormod Volden <debian.tormod@gmail.com> +Date: Wed Apr 1 19:32:21 2009 +0200 + + xfree86: edid quirk for Philips LCD LP154W01-TLAJ + + This panel reports its vertical size in cm. + + X.Org bug#21000 <http://bugs.freedesktop.org/show_bug.cgi?id=21000> + + Signed-off-by: Tormod Volden <debian.tormod@gmail.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 7d94414cf4b16501ce4c4291846498f393f150a4 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Apr 1 09:42:06 2009 -0400 + + input: Remove xf86ReloadInputDevs hack + + We have input hotplug now, no need to fake it. + +commit 3311ef6ec93df4325d198715e0fce73af19f0781 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Mar 31 18:11:19 2009 -0700 + + XQuartz: Don't report mouse events while X11 is not the foreground application + (cherry picked from commit 5d1dd35096334b59564d77caef7a97bd58845c5d) + +commit 89887fadc97f6fd5059886396a6d7cf61de1982f +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 31 15:09:57 2009 -0400 + + APM: Don't carp if not available. + +commit 2e145989d10ef454581f8aa60358ed3782fd6442 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 30 17:22:28 2009 -0400 + + dix: Simplify InitClient() + +commit 252ec504817e05b185e4896a2d899e9c00b8aeef +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 30 15:18:30 2009 -0400 + + Document which bits of ClientRec are currently unused + +commit 0b6e14d46feaf8c46fd3768ee5353b844391b79b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Mar 30 20:37:25 2009 -0700 + + XQuartz: Fix mouse tracking for quake, et. al. in wine + + Patch courtesy of Codeweavers + + Fix mouse movement tracking. For a non-window-related mouse-move event, + calculate the new position by adding the event's delta-x and delta-y values + to the previous mouse position. Do not rely on the current mouse position + because it may have been changed by a XWarpPointer call. + (cherry picked from commit 7a67935b05a475215b9bdbb959e4f7e15f32416f) + +commit c74220b853cd99d03e33cc62d32431ca3a879483 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 30 14:56:15 2009 -0400 + + APM: Use general handlers, not input handlers. + + Otherwise APM events get treated as input events, which messes up idle + time accounting and screensavers and such. Not, we hope, that anyone + is using APM anymore. + +commit 283a081572d8db787c77d09e5ba6bcadebf4f7fe +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 15:56:15 2009 -0400 + + selinux: Only activate if policy says to be an object manager + +commit 8e7facfe3013abda12a0c39ad8b4d025618077a7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 15:48:17 2009 -0400 + + config: Fall back to vesa for Intel Poulsbo. + +commit 17239c8e3163fef0159835d43c0dde20e78192a1 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 12:44:20 2009 -0400 + + misprite: Remove private header, fold into misprite.c + +commit bb89fc2771d2e54d7e0cd0371db68ddb754a64e5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 12:36:42 2009 -0400 + + misprite: Fix software cursor on multiple ScreenRecs + +commit 2c000f4980d30015e6da95de3c77c0fdda0090e4 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 11:54:52 2009 -0400 + + misprite: Do window check first for Get{Image,Spans} too + +commit 8beced6c02610444105f3d0b8ee3a49e1072096d +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 11:43:33 2009 -0400 + + misprite: RECT_IN_REGION -> miRectIn + +commit a232116b9ecd41ce55f8eeee9dfe2b67d76479d6 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 11:41:40 2009 -0400 + + misprite: Fix a typo + +commit 1f0eaf886d88f3935e43985d2c889b374f412e43 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 27 11:29:40 2009 -0400 + + misprite: Fix cast abuse + +commit e3c1096273446bb7eb993b179ceb989617d149cc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Mar 23 13:20:22 2009 +1000 + + dix: build_modmap_from_modkeymap needs to bounds-check its argument. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 45baef0b77f6f0e5e6230eca045dfcbb1e48c647 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Mar 23 13:32:32 2009 +1000 + + dix: return BadValue as error in SetModifierMapping. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 603db34337a61754e0c5f71525011d10eab78411 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 25 15:51:43 2009 +1000 + + Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984) + + The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid + out-of-range events when the lastSlave was an SD with an explicit axis range. + Device events sent through XTest don't need this flag, they are expected to be + in the valuator range of the device anyway. + + Red Hat Bug 490984 <https://bugzilla.redhat.com/show_bug.cgi?id=490984> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4ab93f05664890ff6738ef1089bcd956ce3f06e9 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 23 15:19:47 2009 -0400 + + misprite: In SourceValidate, check that it's a Window first + + It almost never is. However, you have _lots_ of input devices now, and + walking them all on every Composite operation is not the cheapest thing + in the world. + +commit d698e62690e0a52fa537f1cd792cab7a5b1bafdf +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Mar 19 21:35:25 2009 +0100 + + xkb: plug a memory leak in XkbCopySrvLedInfo (#20756) + + X.Org Bug 20756 <http://bugs.freedesktop.org/show_bug.cgi?id=20756> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e26f79335bb7a9ad34fe9b23c283a214202f89ed +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 17 16:22:00 2009 +1000 + + xkb: put a few extra checks in against non-keyboards + +commit 844bb629fe786ecf536039df3f5f4b3b214c9d40 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 19 15:44:34 2009 +1000 + + dix: remove a truly useless a = (foo) ? bar : bar; statement. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 62183a06e5f72a18abc3d58c4bf5658a20ece217 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Fri Mar 20 16:19:33 2009 +0100 + + Remove two unused defines in C files + + These two defines were defined in C files but not used anywhere: + + dix/window.c #define DeviceEventMasks (KeyPressMask | [...] + os/connection.c #define MAXFD 500 + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4e0d7cc506b661b5e5cedf8be6e17aa4c8075aa8 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Fri Mar 20 16:19:34 2009 +0100 + + FID, whatever that was, isn't anymore + + No traces of FID in the xserver nor in the modules listed in + util/modular/xorg.modules + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit adf21dba7617542f08309415e315d4b2699c10e0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 19 20:40:43 2009 +1000 + + include: un-export a bunch of server-only functions. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 111ef10375204a6981a5be5c045860854c4da4e6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 19 09:33:02 2009 +1000 + + dix: move ProcGrabPointer guts into GrabDevice. + + Yes, this means we have even more arguments to GrabDevice. But it beats having + a copy of most but not all of GrabDevice in ProcGrabPointer. + Also, reshuffle the order of parameters, the CARD* status is a return value + and should be last. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dc153271b6458cacd63a4bc0208594011c6460b0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 18 15:13:00 2009 +1000 + + Xi: purge old device enter/leave masks. + +commit 15a969c0fcd4f19f3c560a7037c1a6a58bce51f0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 18 10:21:59 2009 +1000 + + dix: remove now obsolete mskidx parameter from DeliverEventsToWindow. + + mskidx would always be dev->id anyway, so if we're already passing in the + device, mskidx is superfluous. + +commit f5409aa026b2cb501170867d04c6e220f3fe0a44 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:51:50 2009 +1000 + + mi: remove deprecated miPointerAbsoluteCursor + + Functions that don't specify the device are so last year. + +commit 46145a9312eaf5dcd0e8b6788ed8219e086f790e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:12:55 2009 +1000 + + dix: remove coreMods field from GrabRec. + + Nobody uses it anyway, and it's taking up a whole bit! + +commit 40e2a61e37109cd9c2ab57954ee40dcf4a062e31 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 12 16:53:56 2009 +1000 + + Add Get/SetDeviceFocus handling. + +commit d9b7343eac1157490442cc0fb3b5b6d7d6e9a705 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 12 12:56:18 2009 +1000 + + dix: even if we don't get a XI1 event, continue processing. + +commit e11dc10f01603b181e224c90d1dd4abe940f2ce7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 12 10:21:00 2009 +1000 + + dix: Send HierarchyEvents when devices are added/removed/enabled/disabled. + +commit 8634e1bcbae9317fc22132f7c9bde1a4a881b9a7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 12 10:42:05 2009 +1000 + + dix: send presence events when floating and unfloating SDs + +commit c9483a53bea1f721d2902ac11467f67317e7de14 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 11 16:20:22 2009 +1000 + + include: add a few prototypes to silence compiler warnings. + +commit a4b61cfc78d81de02a71fa6ad8a44a06616f6794 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 11 16:08:24 2009 +1000 + + dix: un-static FixUpEventFromWindow and deal with focus events too. + +commit 4cc6a96d7171e567a9bd5a10f552bb953077aafb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 10 16:08:14 2009 +1000 + + input: add support for RawDeviceEvents. + +commit a668d91e28d5a3042a8ce0d087474883b046869a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Mar 9 16:36:07 2009 +1000 + + dix: store the xi2mask on grabs and pass it around as needed. + + This enables passive and implicit passive grabs for XI2 events, except that we + don't have the protocol spec yet to request them. + +commit 32f338263ff7de1a2e76d570c98f5be979c18d4e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Mar 8 21:32:31 2009 +1000 + + Xi: Deliver XI2 HierarchyEvents when the hierarchy changes. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 97e89a59572a4be6757510a317c142ec1d82e8f8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 6 23:22:00 2009 +1000 + + Allow XI2 event selection for AllDevices and AllMasterDevices. + +commit 808a158182b0a3b985385899252c190947b4dbbd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 6 14:45:26 2009 +1000 + + dix: Enable XI2 delivery for events and focused events. + + No support for grabbed events yet. + +commit 87ff1159b497c66554a4036ae619f92d5631f00f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 11 09:01:23 2009 +1000 + + dix: deliver device enter/leave events. + +commit 04ed0bcb2530866f7248b412974ecd15f0fbf6ac +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 23 17:07:55 2009 +1000 + + xkb: remove Device/Enter leave handling - XI2 enter/leave don't have compat state. + +commit 3f37923a727d5fc4b1880a53dac1145884ba7140 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 23 16:12:25 2009 +1000 + + Xi: send XI2 focus events. + +commit daf7dd3bfecc9029bdd10c7a4ea5d2c875a89c41 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 11 09:01:12 2009 +1000 + + dix: Add GetWindowXI2Mask helper + +commit 8b6a370058ad5a20e0a0e49ec9443daf03775de8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 23 15:58:07 2009 +1000 + + Add XI2 masks and XISelectEvent() request handling. + + XI2 event masks are simply stored in the OtherEventMasks as a separate field. + This replaces the XiSelectEvent code. + +commit 38bba0c1b75b84e8bbdfa7975cf701a9414a3afd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 20 16:07:33 2009 +1000 + + Xi: Change ChangeMasterDeviceClasses to new XI2 events. + + Split ChangeMasterDeviceClasses into an extra XISendDeviceChangedEvent that + assembles the XI2 wire event for the DeviceChanged event. Re-use this when + detaching the last SD. + + Not quite perfect yet, we still copy the device classes from the slave now + rather than from the data we had when the event occured. But it's a start. + + (We can now unexport SizeDeviceInfo and CopySwapDevices, not needed anymore) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 181e41511d5772962b8bc998a1940d2a9ba62d5e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 23 16:14:51 2009 +1000 + + dix: fix up device enter/leave for XI_Enter/XI_Leave. + +commit 0befeb36c175b14eac8d5416851f1556af90dd86 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 24 15:27:07 2009 +1000 + + dix: Add device info to DeviceChangedEvent, and fill in CCCE. + + We need to fill the info here, as the device may change until we get a chance + to process it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b2ba77bac4fc3edab39372dfdc529e745ae74f77 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 5 14:23:47 2009 +1000 + + dix: add EventToXI2 and GetXI2Type. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dfa2e8e966b699f9d292628119d5a9cbd2dbdf5a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 23 15:12:32 2009 +1000 + + Xi: add XIQueryDevice request handling. + +commit 560c58b53e4e60ebd26e0c66dd00399c438bd619 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 20 15:17:52 2009 +1000 + + Xi: name-space and fix XI2 requests + + All XI2 requests have XI prefixes. + Requests affected: + ChangeDeviceCursor + QueryDevicePointer + WarpDevicePointer + SetClientPointer + GetClientPointer + XIChangeDeviceHierarchy. + +commit 903449615b1a1188955c0287a552aec8ac5b3fbb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 20 15:03:35 2009 +1000 + + Xi: add XIQueryVersion request handling. + +commit 77d51b94bd264be5a8625a2bdd98f2bfb2aa33d3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Mar 8 11:47:26 2009 +1000 + + dix: FixUpEventForWindow needs to handle XI2 events. + +commit 95ed2ab715fa881d36d508adf4ae5dadd92ae7b2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 12 11:46:07 2009 +1000 + + Add XI2_EVENT check. + +commit 92e0a324b5c738166ed4046cb00fe85ab8aea5a0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 12 14:15:02 2009 +1000 + + require inputproto 1.9.99.7 + +commit 906fe9547957917ac463d646935473ceca10a72b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 20 09:36:09 2009 +1000 + + Xi: don't allow OpenDevice on any MD. + + This restores the original behaviour of XI 1. Any slave device may be opened, + but none of the MDs. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c7eb27f3927ba9a36f9904938996f346cca33021 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Mar 4 18:45:09 2009 +1000 + + Xi: always only list VCP/VCK and the SD's in XListInputDevices. + + If a client wants other MDs, it should use XI2's XQueryDevice() instead. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 801f14d4b742e506201b619d472087a7e82bd018 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 3 17:04:08 2009 +1000 + + Xi: don't send attachment info down with ListInputDevices. + +commit 66dd8879b3527f30309fb747cad4a161d0709d91 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 20 15:01:05 2009 +1000 + + Xi: purge ExtendedGrabDevice request handling. + +commit 43e48900fccd245e98d6d697e4cdbb6fa866a0dd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 6 22:27:54 2009 +1000 + + dix: Force deviced ids of 2 and higher for actual devices. + + 0 is now reserved for the "AllDevices" virtual device. + 1 is now reserved for the "AllMasterDevices" virtual device. + + This also means that wherever we passed in (mskidx = 0), we now need to pass + in the deviceid. + +commit 70896f6127e2c12c13479a027fdd6e67853d1f8b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 13 16:42:02 2009 +1000 + + dix: abstract event filters through GetEventFilters. + + Don't let everyone acces the filters[] array directly. This is necessary once + we start dealing with GenericEvents, where the filters are a bit more + complicated. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8a8763f1502c9ddd1961f96f2cc7c73fbc0b49b5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 16:07:15 2009 +1000 + + dix: restructure DeliverEventsToWindow, a little bit anyway. + + Desperate attempt of making the code easy to read and understand. A failed + desparate attempt, possibly. + +commit 891cfc802028c3e008ee6c2d3e2438a31f57f39f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 10:12:45 2009 +1000 + + dix: clean up DeliverDeviceEvents. + + Move mask checking into external function and streamline the code. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6b6b660c3633af75a94302725137549df0dbe446 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 10 10:15:45 2009 +1000 + + Xext: remove ev_fill from GEExtensions. + +commit 445daa62e720fe58fa2d6c3cdc26663671b2bc48 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 15 17:16:22 2009 +1000 + + Xext: purge XGE event masks. + + The masks were originally designed to generically handle event masks for + extensions. Since all that is in-server anyway, it's much better writing + custom event masks for those extensions that need it and not providing a + unified mechanism. + XI2 needs more than the current implementation, which is already too complex + for most other extensions. good riddance. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6fe4c28bf4f3a9f7c341b9403213470e9ded5cb3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 16 16:34:05 2009 +1000 + + Add agressive event type checking. + + Best to FatalError if a wrong event comes in. At least that forces me to fix + it really quickly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 836864b65794dc0954a01245e418e714cead8125 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 12:43:17 2009 +1000 + + xkb: don't overrun the map index when accessing symbols. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 497a12533905b98f388775b6ba49adf21017cc75 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 11:52:33 2009 +1000 + + dix: remove duplicate PickKeyboard() command. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7d4df0ee4414779ad5e519e7bd297c5dfec409a3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 19 20:24:06 2009 +1000 + + dix: fix device sync state when calling SyncBoth during AllowEvents. + + This did access the wrong device's sync state, potentially freezing or not + thawing the actual device that was supposed to be thawed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f1c7b95d83948160a0d5796ef6c16fc0d1bf5c5d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 20 13:55:00 2009 +1000 + + dix: do percentage check before device check in ProcBell + + This is just for correctness. The server should return BadValue for anything + not in [-100, 100]. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d60391d8ca9918d2089c23c0baef5c91177325f0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 20 14:01:30 2009 +1000 + + dix: fix uncredible fail in PostSyntheticMotion. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1a71862d333282e2d251ff0036866cec22bcce85 +Author: Simon Thum <simon.thum@gmx.de> +Date: Sat Feb 28 22:17:47 2009 +0100 + + dix/xfree86: simplified velocity approximation algorithm + + Replace multi-stage filtering with simple linear velocity, + tracked several instances backwards. A heuristic ensures + only approximately linear motion is considered, so velocity + remains valid in any case. Numerical stability is much + better, and nothing changes to people who didn't tune the + advanced features of the previous algorithm. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5ae129baef85b47590c02e4cf61b23904d8f7aa9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 17 15:47:57 2009 +1000 + + Xi: check for existence of the button class before accessing it + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e8094d8f3f69f45850af031efd79a3928e584638 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 19 10:09:04 2009 +1000 + + dix: ProcSendEvent shouldn't use inputInfo.keyboard directly. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 12aeddf5ad41902a180f8108623f356642b3e911 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Mar 19 19:07:59 2009 +0100 + + exa: Accept scratch pixmaps with offscreen memory as such. + +commit a635bb5357648779815ec6729d55f6b478493213 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Mar 17 19:34:45 2009 +0100 + + exa: round of fb_pitch to the next byte + +commit ec328783593339e33772301a8c5fea35fd63c0a2 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Mar 17 10:45:21 2009 +0100 + + exa: check if the pixmap is pinned for unsupported AUX indices. + +commit 3992dd38caf33b343affd8d732c94880d1099dcf +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 16 13:24:48 2009 -0400 + + selinux: Add support for avc_acquire_netlink_fd() + + Requires libselinux 2.0.79 or newer. Without this, libselinux will + check for policy updates on the netlink socket on basically every policy + lookup. Statistically speaking, they never happen, and the check + translates to at least one more syscall on basically every operation. + + Instead, take control of the fd from the library, and check it in + WakeupHandler if it polls readable. + +commit be6dc9023b5fb3995a9ce56d607627e247918aef +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 16:29:36 2009 +1000 + + xfree86: remove a superfluous assignment. + + If dev is NULL, we don't have a VCP and that means we have other issues + anyway. + +commit bfab422dcdbb9c009b2a91fe0dba288fac9bc859 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 16:27:49 2009 +1000 + + xfixes: useless (void) typecast removal + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4eeaee1e5a05ea973cbeb653abf99f2a352edc70 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 16:25:12 2009 +1000 + + xkb: xkbi has a pointer to the device - use this instead of inputInfo.pointer. + +commit 3f801ba62ac493d4aeb664a5ae638e3fb0c9a262 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 16:23:50 2009 +1000 + + xkb: the VCP can post device events, don't stop xkb filtering on it. + +commit 23686e5680d565c36e0b6320ce62c38c7830d06b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 16:20:56 2009 +1000 + + xkb: Fix a mis-use of inputInfo.keyboard. + +commit c97c6c3de337f247406eaffd5845a847630ee6c1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 16:17:20 2009 +1000 + + xkb: fix a couple of device checks when looping through all devices. + + Generally, we want to apply stuff to the device and to all attached slave + devices. + +commit d21a546e9604ce2d3c914900f6e6ff2df9f5ca8b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 16:02:22 2009 +1000 + + Xi: VCP and VCK may register for ext. events, so delete them if necessary. + +commit 6ec49098f7ef259b43870139511006627b308bb6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:57:27 2009 +1000 + + render: replace a wrong inputInfo.pointer with pDev + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0b2b330f6fbf8633ae682a17fbd95f6b5db2c112 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:54:27 2009 +1000 + + mi: remove a bunch of useless inputInfo.pointer assignments. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 31301861c1dd87a2f55c5c4300ac7c8f54154bf8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:49:22 2009 +1000 + + dix: remove wrong InputInfo.pointer usage - should be pDev instead. + +commit 639658b2eab480a5bfb943dff51e4bdfc1e16e3b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:34:29 2009 +1000 + + dix: use GetPairedDevice in ProcQueryPointer rather than inputInfo.keyboard. + +commit f01ee198ff0cbd7ca418217a84248d1c6131a0c6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:22:23 2009 +1000 + + dix: don't use inputInfo.keyboard to get the focus window in ActivateKbdGrab + + I'm not sure if that's the right solution, but the other one is wronger. + +commit de415743f4c1878df2de79f84f5fe087a88d5241 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 15:19:23 2009 +1000 + + dix: fix XACE checks in ProcWarpPointer + +commit 18430616cfd5d0bc5a3efe61fcc2982b1726b0de +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 14:59:18 2009 +1000 + + dix: use PickPointer() and PickKeyboard instead of inputInfo.pointer/keyboard. + + Affected calls: + ProcChangeKeyboardControl + ProcBell + ProcUngrabKey + ProcUngrabButton + +commit e31727158cda7729283233cfdc9bc5bcb59a52c1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 13 14:51:55 2009 +1000 + + dix: fix ProcChangePointerControl's wrong inputInfo.pointer usage. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fc5e8dc4a24c2b5bed4e6b5d00670c4401ec92d9 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 13 14:00:37 2009 -0400 + + Unexport xf86SetPriority + +commit 89d7b88f32f9227fa72a043675367b94c4c9283c +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Mar 13 00:40:43 2009 +0100 + + exa: allow exaModifyPixmapHeader to set sys_ptr for EXA_HANDLES_PIXMAPS + + - exaModifyPixmapHeader would save sys_ptr if needed, but it would be NULL'ed afterwards. + - This is needed to support pixmaps that are not offscreen. + +commit 544cd9e7b50cd9905afc52404de1a5a2bcff91b5 +Author: Ander Conselvan de Oliveira <ander@mandriva.com.br> +Date: Thu Mar 5 12:57:28 2009 -0500 + + Honour Option "DPMS" "off" on xorg.conf + + Signed-off-by: James Cloos <cloos@jhcloos.com> + +commit 7abb72c5c711a26a27a82604bd2398bcb6df0a99 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Feb 25 10:55:36 2009 +0100 + + xfree86: remove obsolete code + + remove a few lines which redo part of the pointer acceleration + init. Properties is the way to go for them. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 97cb3cc28e4a5694d17f156276efd84555a96d18 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 12 10:17:16 2009 +1000 + + dix: Merge DevicePresence notify events generation into a single function. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7f1ba804a1c1aef725e20a04e5f6ef74478ecf44 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Mar 10 11:55:04 2009 +1000 + + dix: s/numEvents/num_events/ in GetKeyboardValuatorEvents + + GPE and GProxE use the same. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 067f26f7ba4c8cf37af7ddf0eb204b7e1d06096d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 6 19:42:27 2009 +1000 + + Xi: set the modifier + group state during POE. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit da724e8f1d1867c36c9550a153c58829939800fc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Mar 6 15:50:05 2009 +1000 + + Xi: Set the button state on the event during POE. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b368dd1720c708aaec492b4a67fb7e4f87569c11 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Mar 5 15:22:41 2009 +1000 + + dix: remove a few pointless (void) casts of return values. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cadf65a6e190a8952ad3cc216dc9ea55241de91a +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Mar 10 15:49:49 2009 +0100 + + randr: Nuke broken set_origin shortcut + + Shortcut is impossible to implement this way, because we don't know for sure + whether the crtc of an output has changed or not. + +commit 6544490700051b3b5e88ac1890d71b35634c9100 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 9 17:28:40 2009 -0400 + + Correct access mode in call to dixLookupWindow() within RRSelectInput. + + Reported by Alan Coopersmith. + +commit f8dd80d13bb5313a11b38b280f8ad3e22f0a6300 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Aug 6 15:26:24 2008 -0700 + + Replace dixLookupResource by dixLookupResourceBy{Type,Class} + + dixLookupResource attempted to automatically detect whether the caller + wanted a lookup by-type or by-class, unfortunately, it guessed wrong for + RT_NONE. Instead of trying to make the guess better, this patch just reverts + the unification and creates separate functions for each operation. + +commit 0d9a42dc0380d1583889b6b6521bd5a2451735d4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Mar 9 08:59:01 2009 +1000 + + Xi: don't crash on a NULL property name, just return None. + + strcmp doesn't like NULL-pointers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 432a95032eb10f82fb59caa29e52d3f56dfb363c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Mar 8 21:34:02 2009 +1000 + + Remove useless (void) typecasts. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f508446a2bcd887df9cf5db786b15fc3cbc435a0 +Author: Peter Åstrand <astrand@cendio.se> +Date: Fri Mar 6 19:41:35 2009 -0800 + + Composite: Uninitialized borderClipX/borderClipY + + Valgrind warned me about two other uninitialized variables, which are not + padding. Valgrind output at the end. I'm a bit unsure of what these should + be initialized to, is zero fine? + +commit d1338a94805cc774fe0a5d00c2225a3ee9673a9f +Author: Winfried Grünewald <winfried.gruenewald.ext@eizo-dt.de> +Date: Fri Mar 6 12:59:35 2009 -0500 + + [hw/xfree86] Fix StaticGray cmap. + + Fix this bug report: + + ,----< from http://bugzilla.freedesktop.org/show_bug.cgi?id=20504 > + | Using the Visual StaticGray (8 bit depth) is missing one gray level. + | The gray level of index zero and index one are the same and all + | other levels are shifted by one. The max level (255) cannot be used. + `---- + + Signed-off-by: James Cloos <cloos@jhcloos.com> + +commit eba3bab71ff26d58bb0e49e4a9726fc21ff07258 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Mar 5 15:09:28 2009 -0800 + + Remove #ifdef macII code left over from ancient A/UX 3.0 support + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit daa9727a02701cfac7b92f3e61d752be6fcc005e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Mar 4 11:33:00 2009 -0800 + + XQuartz: Implement SendPSN for AppleWM + (cherry picked from commit 779e9fdc2de9bfebc5f0a4c9d5f42e389fdd8593) + +commit ce6e1771be5f2c21af6f72a9705795df26210413 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Mon Mar 2 17:05:28 2009 +0100 + + exa: fix a serious issue in exaChangeWindowAttributes (and some more related things) + + - fbChangeWindowAttributes can create pixmaps (and access them) without use preparing access. + - Also handle the destroyed pixmaps by finishing them first. + - Switch to DEST indices again in exaCreatePixmapWithPrepare, because they are obviously being rendered to. + - Also avoid calling FinishAccess on pixmaps that are destroyed (and their memory potentially invalid). + +commit 7fb68e8b31d259325ce311ad67befc43a933f009 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Feb 28 22:29:42 2009 +0100 + + exa: remove a few pExaPixmap checks. + + - And make some fatal for a debug build. + +commit bd2f35ef0d4b8c56eb205b8694b4fe5d2fa2c049 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Feb 28 22:15:04 2009 +0100 + + exa: fix unwrapping of ModifyPixmapHeader upon CloseScreen. + + - Cleanup wrapping too. + +commit da8ea41a542787691ea1120e5c8c7dc3182cbea5 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Feb 28 21:59:09 2009 +0100 + + exa: increase/rework safety checks in Prepare/FinishAccess. + +commit 3ea3d505e8128ab3e878edcef697fd5656b0c917 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Mar 1 01:15:28 2009 +0100 + + exa: avoid a potential Prepare/FinishAccess inbalance. + +commit 10334cf7e64e2e633cd507f2aa216027e840c8e5 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Feb 28 21:46:00 2009 +0100 + + exa: simplify exaPixmapIsOffscreen + + - This includes properly handling the framebuffer. + +commit 57bed76e218471b60d340b18c346d492f37798c2 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Mar 4 10:29:34 2009 -0500 + + Remove dead EXTENSION_PROC_ARGS define + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + +commit a6fb9f4ccfc69dc090b152e29142e3159f812166 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Mar 4 10:27:30 2009 -0500 + + Remove dead XTest code from extmod + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + +commit c4081fee0995dae691665a00ea9bfdb8b8043b8c +Author: Topi Kanerva <topi.kanerva@nokia.com> +Date: Wed Mar 4 10:23:10 2009 -0500 + + Make DGA optional. + +commit c7ebb4bef152b47880abb6ea4819416e89e6522c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 3 14:02:36 2009 -0500 + + Fix 2 const warnings. + +commit c7cf926d25523d5d0d8e5c83671c901660070d71 +Author: Eric Paris <eparis@redhat.com> +Date: Tue Mar 3 13:15:39 2009 -0500 + + This patch changes all places in the X code to use _raw functions. The + X server should never see, translate, or deal with a munged context. + Display managers which show contexts to the user should take care of + translating these to human readable form. + +commit d84a2f855da9fd293e984084168c1e27f5a5115c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Mar 1 16:59:14 2009 +1000 + + xfree86: Add linebreak to two debug statements. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e0ed9f16d0ab871f3209837f54055446503c4108 +Author: Jason Vas Dias <jason.vas.dias@gmail.com> +Date: Tue Mar 3 13:24:54 2009 +1000 + + Fix build with --enable-debug. + + [amended by Peter Hutterer] + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6093d3eb1d7d1e9cbacc2c2f4d376352f787dd53 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 26 15:38:45 2009 +1000 + + dix: fix two compiler warnings (old-style function definition). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b874a5c0aafc766891c9e567af48b891ea14be4f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 26 14:40:22 2009 +1000 + + mi: only print the "EQ overflowing" error once. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a706dd8771f87cf0a73578755552124d162baa5d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 26 10:04:14 2009 +1000 + + include: add a range of button labels. + + Mostly the same buttons as defined by linux/input.h, with five exceptions: + "Button Unknown" for a button that cannot be labelled. + "Button Wheel Up", "Button Wheel Down" for buttons 4/5, traditionally the + wheel buttons. + "Button Horiz Wheel Up", "Button Horiz Wheel Down" for buttons 6/7, + traditionally the horiz. wheel buttons. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 8a6ed44a8b2fc5f14729dc54fec17607ced03859 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 2 14:26:23 2009 -0500 + + randr: Fix thinko in xf86TargetPreferred + + The only-one-output case would only work right if that also happened to + be the zeroth output. Oops. + +commit 7bfad37f7706da5a76174c0da78dce4d6c6a585b +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Feb 27 22:26:52 2009 +0100 + + exa: fixup aux indices and ensure that the indices are used as they should be. + + - In a previous patch i forgot to add a FALSE somewhere it seems. + - Rename AUX indices so the driver (think of driver managed pixmaps) can do optimisations based upon them. + - Fix one abuse of DEST index now that we have the AUX indices (same reason as above). + +commit 8c6b4a827624aa70aea94b449fee6d5df8504105 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 27 12:42:43 2009 -0500 + + DDC: Redo extended device probe slightly. + + We'll now only mention the E-EDID segment register if the device is + actually E-EDID-capable. While we're here, check for DDC/CI and + standard EEPROM support too. + +commit b030f858f2f1ce1fd27a73ebf7f9ec5db541a668 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Feb 21 19:56:20 2009 -0500 + + selinux: Don't bother relabeling resources that are being destroyed + + Makes window destroy about 40x faster in Xvfb. + +commit f028b14876dc536b575d4b6e1df7f37ee525acec +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Feb 27 13:06:28 2009 +0100 + + exa: whitespace + +commit ed00515ec54b294f304b8ae2857e3073f97860d2 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Feb 26 22:18:03 2009 +0100 + + exa: fixup exaAssertNotDirty. + + - Do the right thing based on prepare access. + +commit 2e88b6004f09dbcb888abf05d4d5554231b2bd1a +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Feb 26 21:14:23 2009 +0100 + + exa: minor glyphs cleanup. + + - This should fix subtle coordinate bugs and make the code a bit cleaner to read. + +commit 265d20068af5434489752b6dba0bf0065b3cc3ec +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Feb 27 16:41:39 2009 +0100 + + EXA: Fix check for whether the glyph we're evicting from the cache is in use. + + Since commit f07f18231a921d3ae9dd9b75881c9e58e9e2e235 ('EXA: Allow using + exaCompositeRects also when we can't use a mask in exaGlyphs.') we were + checking the wrong set of coordinates in the buffer where glyphs to be rendered + are accumulated when no mask is used in exaGlyphs. + + This fixes occasional glyph corruption which can be corrected with redraws, in + particular with Qt4. + + Thanks to Maarten Maathuis for asking the right question: 'where do we protect + against evicting glyphs that are still needed?' + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 9d5141f7bcfed36417873b47f850332506af83ac +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Feb 27 16:37:28 2009 +0100 + + EXA: No longer use the driver UploadToScratch hook. + + See http://bugs.freedesktop.org/show_bug.cgi?id=20213 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 4cfb36f6ad2df01215028fec48d99239a0e4496b +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Feb 27 16:37:28 2009 +0100 + + EXA: Handle separate alpha maps properly in Composite fallback, take two. + + Preserve the EXA ABI by introducing a new driver flag EXA_SUPPORTS_PREPARE_AUX. + If the driver doesn't set this flag, we have to assume any Prepare/FinishAccess + driver hooks can't handle the EXA_PREPARE_AUX* indices, so we move out such + pixmaps at PrepareAccess time. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 4bf707f01822abe99286909fd561da7e7a4211d6 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Feb 27 16:37:27 2009 +0100 + + Revert "Fix up Xephyr build for recent EXA changes." + + This reverts commit 4e8d98b61e1f763c187e7994c683b543cca1a33c. + +commit de022f8e634baf5a7acd186934b370647df58355 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Feb 27 16:37:27 2009 +0100 + + Revert "EXA: Handle separate alpha maps properly in Composite fallback." + + This reverts commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5. + + Conflicts: + + exa/exa_render.c + +commit d0dd649035fc3698c5b436f9d9d248116aa106a3 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Feb 12 16:03:16 2009 +0000 + + Remove references to rgb.txt from files section of Xserver and Xorg man pages + + The references to this file in the server code were removed in commit dda10c9066a660b647384179f82e1da8e063264f + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b0ad9e1ced9619f37acf77764c395c57b86cf463 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Thu Feb 12 16:02:17 2009 +0000 + + Remove long-gone '-co' option from Xserver man page + + The '-co' option was removed in commit dda10c9066a660b647384179f82e1da8e063264f + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 7907b37d96dc81f333351a6fedd6a9f4e31ae66a +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Feb 26 21:22:48 2009 -0800 + + XQuartz: Don't erase the mode_switch+keysym if it's the same as shift+keysym + (cherry picked from commit 3e2427e6e9675dd655c8ad328b82e12191b064f2) + +commit f07f18231a921d3ae9dd9b75881c9e58e9e2e235 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Feb 26 10:35:44 2009 +0100 + + EXA: Allow using exaCompositeRects also when we can't use a mask in exaGlyphs. + + This should give the full benefits of the glyph cache even when we can't use a + mask. + + This also means we no longer need to scan the glyphs to see if they overlap, + we can just use a mask or not as the client asks. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit b26c136ee9bf7015c583136af53d0c9e9da67ace +Author: Michel Dänzer <daenzer@vmware.com> +Date: Thu Feb 26 10:35:44 2009 +0100 + + EXA: Stop tracking damage for pixmaps subject to ModifyPixmapHeader. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 812e8d681a49b33d8748983843799ef692b8b148 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 25 11:08:01 2009 -0800 + + Oops. 62fc98c had crtc offsets applied backwards (fix from server-1.6-branch) + + Crtc offsets are in screen space, not crtc space, and hence should be + applied relative to the screen->crtc transform, not the crtc->transform. + + This fix was found in the 'cherry pick' of 62fc98c on server-1.6-branch, + clearly some new definition of 'cherry pick' that I am unaware of. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit c090f5514d28e1602a6ebbe7c909e98a0e3374d7 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 25 10:14:36 2009 -0800 + + Pre-clip panning coordinates to keep crtc within panning region + + There is a separate panning region check, but that doesn't work under + transformation, so just pre-clip the mouse coordinates when computing the + panning offsets. This leaves the case where panning constants are changing + unresolved. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 77c7a64e8885696665556c9fbcb3cffb552e367a +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 25 10:12:23 2009 -0800 + + RandR rotations and reflections offset by one pixel + + The matrix computation for rotation and reflection resulted in dropping a + row or column of pixels as the offsets used in the matrix computations used + width and height rather than width-1 and height-1. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4e8d98b61e1f763c187e7994c683b543cca1a33c +Author: Michel Dänzer <daenzer@vmware.com> +Date: Wed Feb 25 10:26:04 2009 +0100 + + Fix up Xephyr build for recent EXA changes. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit d6976e1436c035b8e4a6d1e10971b083b1b4184b +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Tue Feb 24 23:12:57 2009 -0800 + + XQuartz: Re-enable support for capslock + (cherry picked from commit 4901b8147e593d26d7a31a9b73a201254b948916) + +commit 4b63f88b0ad5f6614fee5b7af4f97ce4581ab935 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Tue Feb 24 18:54:16 2009 -0800 + + XQuartz: Comment out the background pointer interaction that seems to be causing CPU spinning on some configurations + (cherry picked from commit 1d479fa4f3bca9cbd81808a6c87582422fd2a257) + +commit 5672e2d66444be74125c71b81373b82f8e1b7dd2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 20 14:55:51 2009 +1000 + + Xi: remove AllExtensionVersions. + + Keeping an AllExtensionVersions array to save all versions of + all extension is rather pointless if only one extension uses it. + Rename to XIVersion, reduce to a single struct. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 59bc615ed2e60c595887dcc11fe04935b49bcaff +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 24 15:26:20 2009 +1000 + + dix: set the valuator mode in set_valuators + + We only have per-device mode for now anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cffa3c499a0495e132557bd6b08a8c0b858cdf3b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 24 15:25:49 2009 +1000 + + dix: remove unused variable 'tmp' + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8d6dd83a38020080808705a156d32ec2a135633c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 20 13:13:58 2009 +1000 + + include: fix indentation for lastSlave/master. + + Yeah! + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b3412adca8b2ba3fff348bceb4f01b9e968c0afc +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Feb 22 20:53:46 2009 +1000 + + Xi: don't need to set the XKB settings for new core devices. + + This is done by the XKB code these days anyway, so we might as well ignore it + and keep using the stanard stuff. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a180c2367974abe2ccdc88bb5c6f138c7df4d2e9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 23 16:38:41 2009 +1000 + + dix: remove ConvertBackToXI. + + This was a temporary solution for the internal-events rework and is not needed + anymore. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 26cf709e712573548990d165e71137f28271a8bb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 23 22:39:08 2009 +1000 + + Doxygenify events.h and eventconvert.c + + Should have done that before pushing, but oh well. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Feb 24 09:22:09 2009 +0100 + + EXA: Handle separate alpha maps properly in Composite fallback. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . + + As this can't work without new EXA_PREPARE_AUX* indices, this requires a major + version bump, so we can also drop the UploadToScratch driver hook and + ExaOffscreenSwap*(). So this also fixes + http://bugs.freedesktop.org/show_bug.cgi?id=20213 . + + Moreover, introduce EXA_DRIVER_KNOWN_MAJOR to break compilation of drivers + which may not be able to handle EXA_PREPARE_AUX*, giving instructions how to + make them build again in the #error message. + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit d3b355875ac46104a174966e1974e6af99e40fd6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 24 11:14:14 2009 +1000 + + dix: fix wrong condition for setting valuators on the event. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ef320bdd5ec3419abba77041d3a4d96a3ff87563 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Mon Feb 23 16:49:51 2009 +0100 + + DRI1: Make DRICreateDrawable return TRUE for pixmaps. + + GLX_EXT_texture_from_pixmap was broken since commit + a26c77ff432d2e85a2665fc36fca25143460c476 ('glx: fix retval checks when failures + occur for drawable creation.') + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 1df6716281579e2937743d840ab1079343c503ac +Author: Adam Tkac <vonsch@gmail.com> +Date: Mon Feb 23 09:28:26 2009 +1000 + + xfree86: don't try to UnInit virtual devices in DIDR. (#20087) + + DeleteInputDeviceRequest function doesn't handle "virtual" devices well. + TightVNC libvnc.so module to X (which makes bare Xorg VNC capable) uses such + kind of devices. + + Bare Xvnc (it is something like Xvfb) simply uses AddInputDevice & + RegisterDevice functions. Xvnc uses DeleteInputDeviceRequest from Xi/stubs.c + so everything works fine (now I see that DeleteInputDeviceRequest in + Xi/stubs.c should call RemoveDevice function, shouldn't it? :) ) + + Situation is quite different when you use libvnc.so module. It uses same + schema as Xvnc, so it simply calls AddInputDevice & RegisterDevice. Thus + device is created correctly. When server is terminated it calls + DeleteInputDeviceRequest (now from hw/xfree86/common/xf86Xinput.c) for each + device. Here is the difference - Xvnc calls DeleteInputDeviceRequest from + Xi/stubs.c as I wrote above. Thus Xorg gets sigsegv because "VNC" devices + don't have real input driver. + + X.Org Bug 20087 <http://bugs.freedesktop.org/show_bug.cgi?id=20087> + + [This isn't really a fix (libVNC should behave correctly) but not crashing the + server sounds like an improvement.] + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a50c40be1f28467bcef7dc71fab54ebdddacffdf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat Feb 21 08:09:40 2009 +1000 + + dix: don't apply button mappings to SDs, or the device's MD. (#20122) + + Only ever change the button map on the device we actually care about, not the + attached SDs, not the current MD of the device. + + X.Org Bug 20122 <http://bugs.freedesktop.org/show_bug.cgi?id=20122> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 36583a49965c0bb40a84284939b1539b3cb9fc9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Feb 10 12:45:49 2009 +1000 + + mi: split EQ popping and event processing into two functions. + + mieqProcessInputEvents() - pop an event off the EQ and pass it to + mieqProcessDeviceEvent() - process the event according to the MD/SD hierarchy. + + This way, we can use mieqPDE() from Xtest, xkb, and others to post an event. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 47f136ed6fd80310f715a2555501d1b271dd084c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 6 12:08:43 2009 +1000 + + mi: change custom handlers to internal events + + This should re-enable DGA, but XQuartz needs to be changed to internal events + too now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bdc262701a37a0c12ead810d63fa99a26cbb82ec +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 22:39:37 2009 +1000 + + dix: remove un-used getValuatorEvents and countValuatorEvents from getevents.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 763848d3ab84b4e33a0254120c44b5a1877c819d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 17:20:17 2009 +1000 + + Input: change processing API to InternalEvents. + + Don't pass xEvent* and count through to processing, pass a single + InternalEvent. + + Custom handlers are disabled for the time being. And for extra fun, + XKB's pointer motion emulation is disabled. But stick an error in there so + that we get reminded should we forget about it. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0b4066c116e07918a13dc6b4159df7ac9eb92b4b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 17:18:16 2009 +1000 + + xkb: _XkbFilterRedirectKey needs to pass InternalEvents down. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 085d50360863ccc8280cd3eccea2bcb4f3dd9a14 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 16:56:52 2009 +1000 + + dix: Fix PostSyntheticMotion to use a DeviceEvent for posting. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 155986a93dc78d6aa060ca3038d5fafa3d8753c2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 16:06:15 2009 +1000 + + dix: CheckPassiveGrabsOnWindow moved to internal events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1c38abd4b136301008ba77d4e68aea34508f4c22 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 14:54:34 2009 +1000 + + dix: switch DeliverGrabbedEvent to internal events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit fb858774b80eb75c2f8e81fe893bbbdd37065fbd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 14:44:13 2009 +1000 + + dix: switch DeliverDeviceEvents to internal events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3aa9404fcd161e94a80b057a77ef47afe428a56d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 14:00:41 2009 +1000 + + dix: switch DeliverFocusedEvent to internal events. + + And because of xfree() macro hilarity, rename "pointer" to "ptr". Oh, how we + laughed. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8c873e7f514844d1056f2b20e653f1dd75f4c327 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Feb 1 20:41:16 2009 +1000 + + dix: Switch DeliverGrabbedEvents to use internal events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a3718536989fa7d3358e0b2d859c25fde0a2d93e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Feb 1 20:18:33 2009 +1000 + + dix: Deliver{Grabbed|Focused|Device}Events API changed to InternalEvents. + + With the API change, we can now purge the XI conversion from POE. + + Note: this commit breaks DGA even more. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8f94ec6f788565474931cc7d5e3d4672f0f31670 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Feb 1 09:58:15 2009 +1000 + + dix: convert passive grabs to use internal events. + + deviceGrab.sync.event is now an internal event, and CheckDeviceGrabs and + friends is changed over. + + Note that this currently breaks some frozen grabs. See towards the end of + ComputeFreezes(). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit daa3245c479b19d445a070b5b76ee005915b5335 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat Jan 31 08:46:43 2009 +1000 + + dix: fix EnqueueEvent to work with internal events. + + Note that we're only partially switched to internal events. The event in the + devices' event queue (dev->deviceGrab.sync.event) is still an XI event. The + events in syncEvents are InternalEvents only now. + This also implies fixing CheckVirtualMotion to work with internal events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 75595ba4aa9c3823ffe3b3388ce088929824816f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 15:14:46 2009 +1000 + + Xi: make ProcessOtherEvents more InternalEvent aware. + + Get rid of the deviceValuator processing and a few other things, but still + drop back into XI before checking device grabs or doing anything else. + + NoticeEventTime now needs to take InternalEvents, and while we're at it, + change NoticeTime from a macro to a function. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3a02e538dbdb3cd482e01baeaf2aba2ddb7731df +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 14:59:22 2009 +1000 + + dix: update CheckMotion to deal with DeviceEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8829d966a6bacb05d322b60531c59366b58f4514 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 13:33:55 2009 +1000 + + Xi: support InternalEvents in UpdateDeviceState, parts of POE and EnqueueEvent + + Note that this breaks DGA. Life is tough. + + EnqueueEvent is a somewhat half-baked solution, we immediately drop back into + XI and store them. But it should in theory work. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + + Don't let the dcce be random data. + +commit 007e93c869325cafcc29d975b356dbb8e7cd2ac1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 14:35:22 2009 +1000 + + xkb: Switch the xkb event processing path over to InternalEvents. + + Before dropping down into the DIX, convert back into XI events. This is a + temporary solution only, until the DIX is capable of handling InternalEvents + anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 64ea6078105f73d1b727619fc123920bc7e4a06c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 14:15:52 2009 +1000 + + dix: change eventconvert to always return an array of xEvents + + Just alloc the memory on demand rather than doing things with EventListPtrs + etc. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4026c63e4eb16481bafc1a41ad67cd2556728d40 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 14:34:02 2009 +1000 + + mi: switch the EQ to contain InternalEvents only. + + This gets rid of the nevents parameter, InternalEvents are always a single + item per event. Also remove the special DeviceValuator handling in both + enqueueing and dequeueing. + + Custom callback handlers are now broken until fixed. + + For bisectability, we copy the InternalEvent back into the XI required during + POE and friends. Consider this a temporary solution. + + Note: Because of misc linker bonghits, Xvfb won't link in this revision. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5a827593f9517fd5593751dd8bd90c611de06c5d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 29 15:26:57 2009 +1000 + + dix: switch event generation to InternalEvents. + + GPE, GKVE, GProxE generate InternalEvents now. + DeviceClassesChangedEvents generates an InternalEvent now, but incomplete! We + need to tack on the information about the new SD in the ClassesChanged events. + + Note: To make the progress bisectable, we drop back into XI events at the end of the + Get*Events functions. So the rest of the server still uses XI events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 00b03683d0e5cda40fa23b9fe6a83d7227f86f5d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 14:31:08 2009 +1000 + + dix: Add temporary conversion function ConvertBackToXI. + + Until the InternalEvents are used throughout the server, we can use this one + to drop us back into XI la-la land where every event is the wire format. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 269d4d9f2e86fde8c6a28ef0293fb0e44b577886 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Feb 1 09:57:27 2009 +1000 + + dix: add GetCoreType and GetXIType. + + Convert from an InternalEvent type to the matching core/XI type. Currently + only for a few events, those we actually need in the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 656491921e17b2371057041f4551ad6165067551 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jan 28 15:27:38 2009 +1000 + + dix: add InternalEvent -> core/xi event conversion routines. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e7867d12541ef9683d5d7fc766e918c13a742981 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 23 15:37:23 2009 +1100 + + include: add XInternalEvent. + + This is the event we want to feed into the EQ and process on the way through. + Only applies for input events for now. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 10dcf3ed9c543a6811340567e586ec0e476fcf61 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Fri Feb 20 15:22:35 2009 +0000 + + Cygwin/X: Fix keyboard layout mapping for Latin American keyboards + + Fix keyboard layout mapping table entry for Windows keyboard layout 0x80a + (Latin American), layout should (now) be 'latam', not 'la' which is Laos + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 9531b96470a2fd812eb3fa0d1e10419331842496 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sun Feb 22 00:41:52 2009 -0800 + + XQuartz: DefineInitialRootWindow is gone + +commit c7c50157b5137a147e69abb70b43a28fac4a9ffa +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sun Feb 22 00:29:48 2009 -0800 + + XQuartz: quartzKeyboard compile fixes for recent XKB Changes + + Seems we're less divorced from XKB than we'd like for now... hopefully not having any rules installed will still let us override things the way we want to... + +commit 61abf3189f3f97ec5228d45c035dbfd0c249f844 +Author: George Staplin <gstaplin@apple.com> +Date: Sat Feb 21 22:33:10 2009 -0700 + + XQuartz: GL: Change from xalloc to xcalloc to potentially avoid + uninitialized data in the __GLXAquaContext. + (cherry picked from commit d3120241f9f48d21f9a6ecfb848434a4a0270855) + +commit 5587f9b771f5b5427a81d4d657f403667d20f310 +Author: George Staplin <gstaplin@apple.com> +Date: Sat Feb 21 22:22:52 2009 -0700 + + XQuartz: GL: Fix a bug with an uninitialized GLX data structure. + + This was causing a crash randomly, due to random memory contents. + Use xcalloc to prevent this in the future, due to future changes or mistakes. + + Set the drawableType to include GLX_PIXMAP_BIT and GLX_PBUFFER_BIT. + The new libGL supports these. + + Set the max Pbuffer width/height, based on the results of a test program. + We may someday want to revisit this depending on what users need, so that + we create a CGLContextObj, make it current, and call glGetIntegerv to + gather the information at runtime. + (cherry picked from commit c7e338330943e0d03a99328c740540d03f018d20) + +commit ab61033700b5383a7a15370dd054eaa80e72e811 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Feb 19 13:57:28 2009 -0800 + + Add Extensions section to xorg.conf man page + + Extensions section was added in X11R6.8.0 and documented in the release notes: + http://www.x.org/archive/X11R6.8.0/doc/RELNOTES2.html#3 + but never made it into the man page. + + Also fix a bonus typo. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 372977354c3a09ca77ca13ba0aec00a61046f60d +Author: George Staplin <gstaplin@apple.com> +Date: Wed Feb 18 21:43:19 2009 -0700 + + XQuartz: Fix the new ProcAppleDRIDestroyPixmap code REQUEST_SIZE_MATCH. + + It had a copy and paste mistake that I didn't notice. :/ + It was using the CreatePixmapReq. + + Also add a missing B16 to the end of the length for the DestroyPixmapReq struct. + + Now the AppleDRIDestroyPixmap request seem to work. + (cherry picked from commit 295fe25bd8fa2d141291a9d9b6ef7b75fcccb4dd) + +commit 225853d51d1fb610261ab0c295b1b5a96ce177d5 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Thu Feb 19 06:45:05 2009 -0800 + + xkb: Use cached XKB keymap when rules haven't changed + + Rather than compiling a new keymap every time InitKeyboardDeviceStruct + is called, cache the previous keymap and reuse it if the rules have not + changed. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Acked-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 64e595d12e05c4df56b0230cc57924b9beb274d3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 19 09:18:53 2009 +1000 + + dix: check if keybd->key is valid before getting the keyboard state. + + For floating SDs, GetPairedDevice() returns the SD itself, hence keybd->key + may be NULL. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e0a451eb7cc812f11db3614b730ba0f07d6ae18c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Feb 17 19:37:22 2009 -0800 + + Obsolete InputDevices keyword in xorg.conf Files section + + Was only used to provide a list of input devices that XF86-Misc could use, + now that XF86-Misc is gone, was parsed and logged, then completely ignored. + + (Depends on previous patch that introduces OBSOLETE_TOKEN in parser to + make obsolete keywords like InputDevices & RgbPath be non-fatal errors.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Adam Jackson <ajax@redhat.com> + +commit d2cf562bbad553d7f09b70202134f5b6ada0114e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Feb 17 18:48:52 2009 -0800 + + Make RgbPath keyword in xorg.conf a non-fatal error + + Xorg shouldn't refuse to run just because the user has an xorg.conf that + had the previously-used RgbPath keyword in it. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 344b1f2b25d627bdf7d802c5831b6a72d22ffe34 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Tue Feb 17 23:25:14 2009 -0800 + + configure.ac: Support version strings like W.X.Y.Z-XXXXXX + (cherry picked from commit 43967514cd57ad836d7fb85c8c9e58ada07e0232) + +commit 67faf41b3f3e0cd66e35e3c176a9adb37ff1a759 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Tue Feb 17 23:24:25 2009 -0800 + + XQuartz: Don't need GlxSetVisualConfig any more + + Fixes build failure resulting from 516f8e2cad1311a09764e2633644188d1e3c31bb + (cherry picked from commit 066b17028a35956a089815716e38571f305469c5) + +commit b349a764e98f0d8f221190157ffa0904b91beca5 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Feb 17 09:59:17 2009 -0800 + + xinerama: Put the proto version in the code instead using proto headers. + + Proto headers updating resulting in the server advertising new versions is + broken. This should be applied to every extension. + + This fixes the build against slightly-older xineramaproto. + +commit 5394b7e66224d20888dd4020f5cb8ca930720fb4 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 6 06:34:35 2009 +0100 + + Eliminate the shadow clear on transform change + + When the crtc transformation changes, the entire crtc must be repainted. + This was being done by clearing the shadow and then painting the rectangle + containing the screen image; the clear being required as the screen image + may not fill the crtc. When changing the transform rapidly, this leads to + flashing. Eliminate the clear by painting the entire crtc instead of just + the screen rectangle. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 76f18b94bd2719a8199334742d021c4d0806187d +Author: Keith Packard <keithp@keithp.com> +Date: Mon Feb 9 13:09:11 2009 +0100 + + Add XkbDir to Files config file section + + The XKB base directory was not configuable through the config file. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 123093996507c4d3b6dc457240ce00f8ac42f410 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Feb 17 12:59:16 2009 -0500 + + RANDR: Fail softly on GetPanning if the screen can't do it. + + Just return a zeroed-out reply in that case. This is unambiguous, and + distinguishes "you didn't name a CRTC" from "you named a CRTC that can't + do panning". + +commit b2ceea3635ec05dca9d4aa2f823b96ae9fce7fe8 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Feb 17 19:40:59 2009 +0100 + + Revert "exa: the extent of the valid region is probably much larger than that of the pending damage." + + This reverts commit 97c1cbc70216366e92b9371de608ce94e60aa874. + + - Sorry for the thinko, pending damage is often not fragmentated. + - Should the dst region become fragmentated, you actually want to copy more to unfragmentate it. + +commit 3175646b10c602d17d5dd37bdace7c1c7ee92b3d +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Feb 17 19:06:35 2009 +0100 + + exa: exaPixmapDirty should use official damage functions. + + - Otherwise other users will not be notified of damage. + +commit 97c1cbc70216366e92b9371de608ce94e60aa874 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Feb 17 19:01:44 2009 +0100 + + exa: the extent of the valid region is probably much larger than that of the pending damage. + + - Since the default has been changed from nothing to everything. + +commit 4039603413f9f46d7f725463a70b4a51838e0049 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Tue Feb 17 08:27:32 2009 -0800 + + glx: Inialize best_score before calculating visual scores + + This bug was pointed out by Peter Åstrand. + + Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> + +commit bac13e54b164ceff7b921a2d17c4a198b42aeccf +Author: George Staplin <gstaplin@apple.com> +Date: Mon Feb 16 17:33:19 2009 -0700 + + XQuartz: Add driWrap.h that I missed in the last commit. + + This should complete the GLXPixmap commits for now. + (cherry picked from commit 7e99b55651bf7f6275bb227d02f203fb885a67a2) + +commit 95052caa2c8a79981cdc7936888a8a47e09415e0 +Author: George Staplin <gstaplin@apple.com> +Date: Mon Feb 16 17:22:18 2009 -0700 + + XQuartz: Add support for GLXPixmaps to the AppleDRI. + + This involved wrapping some GCOps to get the proper behavior + when using X11 raster ops mixed with OpenGL (see driWrap.c). + + This extends the AppleDRI protocol with create and destroy pixmap + functions. + + The dri.c code has been extended quite a bit to enable this, and + to initialize the wrapping of CreateGC for GCOps. + + This has been tested with tests/glxpixmap and proven to work with + the new libGL. Existing applications seem to work fine too. Redraws + all appear to be correct. + + There may be some bugs lurking that I haven't found yet. I plan + to drive them out by extending the libGL test suite. + (cherry picked from commit 630518766b01022c49fe3a9e7d501808f71b06e2) + +commit 970725d23e83285d41e3f7cab678a825d9cc25cf +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 16 18:44:00 2009 -0500 + + kdrive: Nuke dead AGP and VGA code. (#19921) + +commit a932744d983845f81791045cf0dfb6a359790158 +Author: Chris Ball <cjb@laptop.org> +Date: Mon Feb 16 18:27:26 2009 -0500 + + Build fix, remove export of pciBusAddrToHostAddr + + a9d7d659.. (PCI: Remove pciBusAddrToHostAddr and associated nonsense) + removes pciBusAddrToHostAddr(), but not its prototype, resulting in: + + ./.libs/libxorg.a(sdksyms.o):(.data.rel+0xe64): undefined reference to + `pciBusAddrToHostAddr' + + Signed-off-by: Chris Ball <cjb@laptop.org> + +commit ab331aa76f0bc6a85a519b2deaafa4ce8a070c53 +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Feb 16 21:56:03 2009 +0100 + + xfree86: ModeDebug is a boolean, not a string + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit f5bf1fdaf36163d5c2f1b9b51df96326ebbb0e9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Feb 13 09:56:22 2009 +1000 + + xkb: Fix wrong colour reference in XKB geometry copying. #20081 + + base_color and label_color need to reference the color in the destination, not + in the source. + + X.Org Bug 20081 <http://bugs.freedesktop.org/show_bug.cgi?id=20081> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit a9d7d659a05e4b6b25e6acd2ce59926911aac0f7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 13 18:36:27 2009 -0500 + + PCI: Remove pciBusAddrToHostAddr and associated nonsense + + This was all a glorified no-op. We rely on pciaccess to create device + maps anyway, so we should have no reason to care about what the host + address is. + + Acked-by: Ian Romanick <ian.d.romanick at intel.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit be8c3d4022faa7d169778ea10d1f11e8f90e1c0c +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 13 17:54:33 2009 -0500 + + Linux: Remove dead USE_DEV_FB #ifdefs + +commit 51ae4d6bbfd95cac8a9cdefcd6f22fbe21a6cb9d +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Mon Feb 16 12:08:28 2009 -0800 + + glx: Add comments around some extension string weirdness + +commit caa5310e163b040689383f6d25ccab5ef1b2e215 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Mon Feb 16 20:41:14 2009 +0100 + + exa: reintroduce src rect optimisation, with a slightly higher threshold. + + - I got some feedback on gtkperf line test regression. + - The increased threshold should ensure the destination optimisation is dominant. + +commit 46eeaf82e228df1c5971a24dc815566516e19be9 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Mon Feb 16 17:17:14 2009 +0100 + + exa: fix performance regression from 736b6fbd2c941b6276066cd1503523edebe7bf3d + + - The src optimisation is more aggressive and possibly harmful in light of the new initial state of pixmaps. + - There is now actually a performance improvement by almost always keeping the number of rects low. + +commit 6198373ff2a8e36113bb1dcaebe975530ff01b86 +Author: David Nusinow <dnusinow@debian.org> +Date: Sun Feb 15 18:36:01 2009 -0500 + + xorg.conf (5) refer to mousedrv (4). Debian #394058 + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 2a8b8077d8f6001eb57deba60e1009fc99c28668 +Author: Alan Hourihane <alanh@vmware.com> +Date: Mon Feb 16 11:39:34 2009 +0000 + + dri2: support glXWaitGL & glXWaitX by copying fake front to front and + vice-versa. + +commit ddb8d8945d1f44d16adc366b6612eef20ae813f7 +Author: Peter Åstrand <astrand@cendio.se> +Date: Fri Feb 13 10:23:28 2009 +0100 + + xserver: Avoid sending uninitialized padding data over the network + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b735a4b4951b607e614682836f24d5fd86c1f7fb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 14:29:23 2009 +1000 + + dix: Remove lastEventMask variable, substitute with a #define. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 772e0f9159ca3ab8fb4e03ed6feee3cc93697724 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 13:38:34 2009 +1000 + + dix: Don't set core events in SetMaskForEvent. + + Rather, modify the two callers to call separately for the two different. + events. Unexport SetMaskForEvent too. + And while we're at it, get rid of the MotionFilter macro, because it's one + half confusing and one half pointless. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 58f3127919ba5fcb3bb467b6913c28ee1127c82b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 08:37:49 2009 +1000 + + Xi: remove dynamic mask assignment for XI events. + + They end up being the same anyway on startup, so let's not have a dynamic mask + assignment mechanism and instead just hardcode them already. + Also unexport SelectForWindow and remove the valid_masks parameter. We can + check that before calling, since there's only one caller anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7057a9a97b9316b1de954d05451e04223fdd9fd8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 22:14:48 2009 +1000 + + Remove two more define XKB leftovers. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 736b6fbd2c941b6276066cd1503523edebe7bf3d +Author: Michel Dänzer <daenzer@vmware.com> +Date: Sun Feb 15 17:44:51 2009 +0100 + + EXA: Try to prevent the valid regions from growing too many rects. + + This helps contain region management overhead in some pathological cases, see + e.g. http://bugs.freedesktop.org/show_bug.cgi?id=16647 . + + Signed-off-by: Michel Dänzer <daenzer@vmware.com> + +commit 45e14f515337159e600a47ebf349692751552af8 +Author: Chris Ball <cjb@laptop.org> +Date: Fri Feb 13 20:32:02 2009 -0500 + + Build fix for xf86EdidModes.c + + Commit 20ac314.. forgets to declare hsize/vsize/refresh. + +commit ae68be312619ad3bcb2d550a6267d38cce3284f5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 13 17:25:32 2009 -0500 + + Input: Don't re-block SIGIO in xf86SigioReadInput() + + It's already blocked on the way in, because we asked for it to be + blocked at sigaction() time. + +commit c18f454e4a9cab03e5d55b6d761a4a735c943b6b +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Feb 12 18:27:48 2009 -0800 + + Query the DDX in ProcRRGetScreenInfo. + + This is the RandR 1.1 version of GetScreenResources and needs to re-query the + DDX to see if the mode pool changed. + + Fixes Launchpad bug #325115. + Signed-off-by: Adam Jackson <ajax@redhat.com> + (cherry picked from commit 660c2a7d4c6cb52fd0992e9d2008a24805dc8c02) + +commit 20ac3140ce16af460992b83aa8aeff4afe28c2ee +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Feb 9 13:36:05 2009 -0500 + + EDID: Hack for 1366x768 in standard timing descriptors + + All you get for standard timing descriptors is horizontal size in + multiples of 8 pixels (which means you can't say 1366) and height in + terms of aspect ratio (which means you can't say 768). You'd like to + just fuzzy-match this by walking the DMT list for sufficiently close + modes, but you can't because DMT is useless and only defines a 1360x768 + mode, because it's _also_ specified in terms of character cells despite + providing pixel exact timings. Neither can you use CVT or GTF to + generate the timings, because they _also_ believe that modes have to be + a multiple of 8 pixels. + + You'd also hope you could find a timing definition for this in CEA, but + you can't because CEA only defines transmission formats that actually + exist. So there's 480p, 720p, and 1080p, but no 768p. And why would + there be, after all, the encoded signal is never 768p so obviously no + one would ever make a display in that format. + + So instead, make a CVT mode since that's likely to be handled well by + just about everything, smash the horizontal active down by 2, and shift + the sync pulse by 1. Underscanning the hard way. + + Pass the suicide. + +commit bcafdfbed6f1e1f901c2459f60f94a0da506bd90 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 13 14:06:07 2009 -0500 + + RANDR: Validate entire mode list for interlace and doublescan + + Otherwise drivers have to refuse interlace twice: once in the output + config, and once in ->valid_mode() to catch output and config modes. + If you can't do interlaced modes, asking nicely for it in the config + isn't going to suddenly make it work. + +commit a26c77ff432d2e85a2665fc36fca25143460c476 +Author: Alan Hourihane <alanh@vmware.com> +Date: Fri Feb 13 13:45:08 2009 +0000 + + glx: fix retval checks when failures occur for drawable creation. + +commit a38ca0063c91ef221f20bf0c4ac0dc84ce07d557 +Author: Benjamin Close <Benjamin.Close@clearchain.com> +Date: Fri Feb 13 14:44:53 2009 +1030 + + xext: Use proto header rather than the Xext include file, this prevents userspace being pulled in causing issues + + Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit d62c085f36892c327785e85571bd2c7c70513ac6 +Author: Benjamin Close <Benjamin.Close@clearchain.com> +Date: Fri Feb 13 14:44:09 2009 +1030 + + dix: Remove includes which are not actually used directly + + Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 340f1576afcdaf883d185da356e5d6282aa65e19 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 10:44:27 2009 +1000 + + dix: remove DefineInitialRootWindow() + + Obsolete. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c178c3f814f7666f43cbf47d24c7543b289f9b1a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 15:29:38 2009 +1000 + + dix: doxygen-ify enterleave.c + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cc696a2b7928ec497b6a0df3602fc70dec83a629 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Feb 12 15:05:57 2009 +1000 + + Doxygen-ify bits of events.c + +commit 8364bf7374aa5f6d991700f0c02921dc6c638c9f +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 11 16:06:36 2009 +1000 + + Document the event masks. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ed9d58c3c25ee1b3dedbc4c116823c263ccf164d +Author: Simon Thum <simon.thum@gmx.de> +Date: Sun Feb 8 17:21:09 2009 +0100 + + dix: refactor pointer acceleration + + The algorithm is split in a 2D-specific and a general part. + This potentially allows to accelerate more than just screen motion. + A state machine is intoduced to make code more explicit and readable. + It also improves handling of 'phase 1' mickeys when axial correction + kicks in (corner case). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ac470dfb4fadaa0b28b6f8b57f4f13a20842b897 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Feb 12 18:34:22 2009 -0800 + + Check for and report errors writing xorg.conf.new from Xorg -configure + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit bd713794ceaa1b2890522554562103c0a2d50f04 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Feb 12 18:23:59 2009 -0800 + + Correct error message if specified config file is not found + + By making the "Unable to open config file" header a warning, it was + not appearing with the filename when a config file was specified and + not found. Now we make it an error message again, but only issue + the error if a filename was specified - if none was specified, then + we don't even issue a warning, just the "Using autoconfig" info message. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit d229ba7068f0adf1bc8b30b7ccf2fce2c7e8b97b +Author: George Staplin <gstaplin@apple.com> +Date: Fri Feb 6 12:55:09 2009 -0700 + + XQuartz: xpr: The dri.c code for pixmaps was wrong in several ways. They weren't + being exported correctly by Xplugin. + + This should fix a bug with the surface for a window, when an export fails. + Before the export could fail and leave behind an invalid (freed) pointer in the dix privates. + + I have an idea of how to fix the GLXPixmaps now without using CGLSetOffScreen. + + This work is a step towards that. The Xplugin will need a small patch to fix an + issue that this change brought forth. + (cherry picked from commit 58c4116c47543b5e30c2232e7bee8efc0b9be176) + +commit b17d6bed97eddd0773d0845f93f842444b7de0ae +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Feb 12 15:33:47 2009 -0800 + + XQuartz: Fix copyright info in Info.plist to be prettier when viewed in Finder + (cherry picked from commit 8b607c9c507a68a6abda63831d227d0f8947028c) + +commit d1ad43a8bc3a93a9cddcb4b0be1d722993bf5dd6 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Thu Feb 12 14:05:10 2009 -0800 + + Enable pbuffers + + If a driver does not actually support pbuffer rendering, it can just + not enable any pbuffer fbconfigs. + +commit 0065896e1ae6d419a42b318b66d6e4d5f17a40ca +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Nov 2 20:46:37 2008 +0000 + + Xming: Update keyboard layouts mapping table + + An update to the keyboard layout mapping table which updates some no longer valid keyboard layout names + (e.g. de_CH -> ch -variant de) and adds a few more reported layouts + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d7c27bfe553235e55eb48799129ff9f8e7e0d4f6 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 3 15:57:29 2009 +0000 + + Xming: Check clipboard selection ownership after taking it + + When you take ownership of a selection you should always check you got + it (X11 ICCCM gospel). + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit cb6315072ff23740bdc5fc2f95dd960601df5664 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 3 15:54:31 2009 +0000 + + Xming: Fix a memory leak in clipboard integration code + + Free the memory allocated for ReturnData in FlushXEvents(). + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d54d24dd5f25188b951b82b1c95eb9d36b5be970 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 3 15:53:43 2009 +0000 + + Xming: Fix prototype for winProcessXEventsTimeout() in clipboard integration code + + Function 'winProcessXEventsTimeout()' is declared 'static Bool' and + defined 'static int' (correct) in 'winclipboardwndproc.c'. This has been + wrong since dot, but luckily was of no significance + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d8bae80305057acfb8e82341f68090eac0dccb90 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 3 15:52:57 2009 +0000 + + Xming: Improve clipboard integration startup in XDMCP mode + + Improve clipboard integration startup in XDMCP mode + Stop the "Clipboard not yet started, aborting" message from spamming the log. + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 7cb1622ce44754d9dcd6f405fb8403bd79c3e7e4 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 3 15:51:02 2009 +0000 + + Xming: Select events correctly in clipboard integration code + + The clipboard should only select PropertyChange events and do this on + the correct window, the messaging window for the clipboard not the root + window! + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b997b3849d902894dd5b38673b73a23a47edf502 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Tue Feb 3 15:48:04 2009 +0000 + + Xming: Add Colin Harrison to copyright and authors list for clipboard integration files + + Add Colin Harrison to copyright and authors list + Adjust license text for multiple authors + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 5ff289834d7445cc6f60dbb1cf18423e7236311a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 19 17:42:54 2009 +0000 + + Cygwin/X: Place prototype for winSelectIcons() in a header file + + Fixes warning as prototype is now in scope for the definition + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit ab2c98b86f1c3968581dfdad8b67432082feec78 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 19 17:36:58 2009 +0000 + + Cygwin/X: Place prototypes for winCheckKeyPressed() and winFixShiftKeys() in a header file + + Fixes warnings as they are now in scope at the definition + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit cc7a4c7c6e051fceacb32997740d83fc0655414e +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 19 17:29:28 2009 +0000 + + cygwin/X: Remove an unused variable to fix a warning + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 7c2fb098b206c0fb97c18cce8f88387cd0c0e82a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 19 17:22:59 2009 +0000 + + Cygwin/X: Fix several prototypes to return HICON + + Fix prototypes of winOverrideIcon(), winTaskbarIcon() and winOverrideDefaultIcon() to return HICON + Also use HICON type in WINPREFS stucture + Remove various casts these changes make unnecessary + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 19b3e44ce51cc2f74ba388cb2cd3a26467848e9a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 19 17:03:23 2009 +0000 + + Cygwin/X: Fix -Wold-style-definition warnings + + Fix old-style definition warnings caused by definitions with empty + parameter lists "()", which should be "(void)" to indicate the function + takes no parameters, rather than unspecified parameters + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 734b23e5982e171031077a2d5d6b5dc2a12e1a70 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Feb 11 14:31:17 2009 +0100 + + fb: add fbDoCopy and fbCopyRegion compatibility wrappers. + +commit 619c4d60eb3a8a51a8300ccf8ab5b98a688e6e12 +Author: Eric Anholt <eric@anholt.net> +Date: Sun Feb 8 12:37:50 2009 +0100 + + glx: Replace broken GLX visual setup with a fixed "all" mode. + + With trying to match depths so that you didn't end up with a depth 24 + fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth + 24 X visual, which angered other applications. But in fixing that, the + pickFBconfigs code for "minimal" also could end up breaking GLX visuals if + the same FBconfig was chosen for more than one X visual. + We have no reason to not expose as many visuals as possible, but the old + "all" mode didn't match any existing X visuals to GLX visuals, so normal + GL apps didn't work at all. + + Instead, replace it with a simple combination of the two modes: Create GLX + visuals by picking unique FBconfigs with as many features as possible for + each X visual in order. Then, for all remaining FBconfigs that are + appropriate for display, add a corresponding X and GLX visual. + + This gets all applications (even ones that aren't smart enough to do FBconfigs) + get all the options to get the visual configuration they want. The only + potential downside is that the composite ARGB visual is unique and gets a + nearly full-featured GLX visual (except that the root visual might have taken + the tastiest FBconfig), which means that a dumb compositing manager could + waste resources. Write compositing managers using FBconfigs instead, please. + +commit 7bbf05d9aa75b536a5321abf51f37852b8f109ed +Author: Shunichi Fuji <palglowr@gmail.com> +Date: Tue Feb 10 14:44:18 2009 +0900 + + dix: build fix if PANORAMIX is not defined. + + Signed-off-by: Shunichi Fuji <palglowr@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4844bff58f296b2851be4e6b955c3a68d02437a9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 4 11:50:18 2009 +1000 + + config: if we can't connect to HAL, listen for a startup notification. + + If HAL isn't available when we try to connect, the registered NameOwnerChanged + signal handler waits until HAL is available. Once we connected to HAL, we + unregister the signal handler again. + This allows HAL to be started in parallel or after the server has started. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5b2bbffc12cd7d29e4200943f8736bd6336ae4aa +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 16:46:27 2009 +1000 + + dix: deduplicate SyntheticMotion. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 34820f9c1304891bebb4bff6a492288aec4fc0d1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 16:37:19 2009 +1000 + + dix: remove XineramaChangeToCursor. + + It's nearly identical to ChangeToCursor now anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 942eae6868b8b0f343b6aa921ddf77e8bb70798a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 16:25:22 2009 +1000 + + dix: Remove XineramaCheckPhysLimits. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bf044f6d10ad9f2baca91a2f04e82dc1af2657cd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 16:14:54 2009 +1000 + + dix: reduce redunancy in XineramaConfineCursorToWindow. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cdce5699f085e717ee1a2ed8390746dfcb9ddadf +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 30 16:09:23 2009 +1000 + + dix: Get rid of XineramaCheckVirtualMotion. + + Yes, this is an ugly piece mess of #ifdefs, but it beats having two nearly + identical functions. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1cb5afdf1ef53e72e0eef28ff6197bf5e86ef758 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Feb 8 18:59:17 2009 +0100 + + dix: always NULL pGC->tile.pixmap in Create{Scratch}GC. + +commit 6fd8fe9cb993f9b733cf7d878bc324acd09aa48d +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Feb 8 18:43:15 2009 +0100 + + exa: fix exaValidateGC. + + - use DEST in the createPixmap wrapper, because stipple already takes MASK (in case someone uses swappers). + - Anticipate some of the less common situations when fbValidateDrawable will access tile related pixmaps. + +commit 30daba6903378dd47f386c0012a0667fd2368f3e +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Feb 8 02:08:13 2009 +0100 + + exa: All fallbacks should have a GC, remove some code. + + - I did some testing with full fallbacks forced by the driver. + - I ran rendercheck, expedite and the (full) x11perf test suite. + - Thanks to ajax for pointing out this should be unneeded. + +commit d591c7d1b87c61ee8add2fce689e35cf097eed4f +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Feb 7 20:47:54 2009 +0100 + + mi: kill a few warnings + +commit 00226d0b589595cdd45c75e7e28237334a8883b1 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Feb 6 20:56:49 2009 +0100 + + mi: clip exposures to pGC->clientClip. + +commit ffa72793e25f19a388a1369708f472921f721284 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Feb 6 20:47:01 2009 +0100 + + exa: Calling exaMarkSync after UTS is the drivers responsibility. + +commit da086901c6579e41b28b1418fa12ebb82744fc87 +Author: Matt Turner <mattst88@gmail.com> +Date: Fri Feb 6 18:31:12 2009 -0500 + + Remove unused barrier macros on alpha. + +commit 68665d78e72c4c564073d66a0f59ac8d3f5fd756 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Feb 5 17:07:31 2009 +0100 + + exa: don't use fbCopyNtoN + +commit 2e76958d304a3c4080d62f32449724eeb9b95d93 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Feb 4 19:48:03 2009 +0100 + + fb: move some code to mi + +commit f06bde3d4bf9a0f245dfa6c65cd98f8e0c7dfdfc +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Jan 31 19:57:07 2009 +0100 + + exa: create ExaCheckGetImage + +commit 258fc4b106dfd7b583999f97caf4d4a7a11569b6 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Jan 31 19:40:48 2009 +0100 + + exa: wrap the remainder of exa_unaccel.c + +commit 6fabf249494bf38b69e3c9c6c9718ee8b12fc6e1 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Jan 31 19:25:20 2009 +0100 + + exa: use proper wrapping in exa.c + +commit 015c99a4ad572f5a1b68054efb070e1ffee1fed0 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Jan 31 18:53:52 2009 +0100 + + exa: properly wrap GC functions + +commit 5e6a06fe691db63ccf2dc7161a1f6c71c09741b7 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Jan 31 16:30:31 2009 +0100 + + exa: add GC private + +commit 5cc67ae94c066dcac78072ad8a819c3b602d8bab +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Jan 30 19:32:33 2009 +0100 + + exa: kill of exaImageGlyphBlt + + - It serves no obvious purpose, yet it directly accesses many fb + symbols. + +commit 6483834200fab90164c27c72d4710014edeb4479 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Jan 30 18:40:46 2009 +0100 + + exa: Remove one of the many calls directly into the fb layer. + +commit f112d6bf59964f317ab236221f7bce7fe2603ab8 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Feb 6 18:30:43 2009 +0100 + + EXA: Try harder to keep current pixmap copy up to date in exaMigrateToward*. + + This is probably required, but apparently not sufficient, for making migration + heuristics other than "always" work correctly again. Not that I really care + about them... + +commit 3948b523893d3d44b6a088340c4252e969613769 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Fri Feb 6 11:37:53 2009 +0100 + + EXA: Guard empty pending region warning by DEBUG_MIGRATE. + + It isn't very useful yet while the damage layer calls us for empty operations, + mostly confuses users. + +commit 9a1d07ecb74b7c3267a6910af66ada917a525110 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Feb 4 20:20:24 2009 +0100 + + Fix "warning: cast from pointer to integer of different size" + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0e15697b53c9448ce9911aa6499b2ea0bda92af6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Feb 4 10:11:13 2009 +1000 + + dix: die if we can't activate or init the VCP/VCK. + + If we have a busted xkb setup, the XKB initialization on the core devices + fails and leaves us with dev->key->xkbInfo == NULL. This in turn causes + segfaults lateron. + + Return BadValue when the XKB configuration for a master device failed, and if + that happens for the VCP/VCK, die semi-gracefully. + The VCP init can only fail on OOM. + + Reported by Aaron Plattner. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + Acked-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit db836715198a445dc3b32c3df0610f700930483f +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Feb 4 23:27:32 2009 -0500 + + Revert "Bus: Remove xf86SetAccessFuncs() and related machinery" + + This reverts commit 2fe79990e31ac684637ca3c47198ee0cead10abe. + + Reminder: nvidia uses this, because other parts of RAC are broken in + worse ways, and it needs to disable that. + +commit 2fe79990e31ac684637ca3c47198ee0cead10abe +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 07:11:49 2009 -0500 + + Bus: Remove xf86SetAccessFuncs() and related machinery + + Only mga was using this, and even then only behind an ifdef that no one + ever built. Not a great idea in the first place. + +commit 9ff6180161267e71ae750498da0ec4889cd5c260 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 06:23:09 2009 -0500 + + Bus: Delete some obfuscatory macros + +commit 8eca37cb8934e79f02291460eb7b49a5d528f391 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Feb 4 22:48:52 2009 -0500 + + Bus: Remove unused xf86ExtractTypeFromList + +commit b013111e98d50f5962e9b275eb28d969d5c9576e +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 03:14:18 2009 -0500 + + Bus: make the resource list static. + +commit bde028dd8d856f8d47c39e3c6d3731c34c398c74 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 22:58:58 2009 -0500 + + loader: Remove icache flushes on alpha. + + If libdl doesn't already get this right for you, you have two problems. + +commit 910a1e88d23e0b7e4ca4679ab50a883a918f2590 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 07:54:07 2009 -0500 + + loader: Remove a vestige of archive support + +commit 366f23c6eb504fc23112f121769bcb719948474f +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 07:53:05 2009 -0500 + + loader: Remove useless call to LoaderGetOS + + We know what OS you're running on anyway, it's printed in the uname + string at the top of the log. + +commit 05e415a5a3f376e28955be3bf976390e8631e25f +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 07:52:07 2009 -0500 + + loader: Simplify loader magic + +commit bf1ca06a1693cbe5415a152936939ce3b088a022 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 07:51:35 2009 -0500 + + loader: Make a comment slightly less stupid + +commit 499908aeca9a31692c787070e23bfaa92d1b32a4 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 07:50:00 2009 -0500 + + loader: code motion. + +commit 28b6b1519c4c526662302fac4ed9b7f540bafd4a +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jan 26 07:47:46 2009 -0500 + + loader: Simplify handle allocation and refcounting. + +commit 0bad0552bfd4d10529ab51d618af8d08c5aeea71 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Feb 4 17:20:24 2009 -0500 + + XKB: Remove -kb and +kb from -help text and man page. + +commit 7968823cbc02615e1080c0d3f34dcebe14ea1771 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Feb 3 20:18:37 2009 -0800 + + Handle the combination of panning and crtc transforms + + This patch gets the shadow scanout buffer repainted on panning area changes. + It does not, however, track the mouse correctly. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 763df9eec79a867978efc5138d8635a46c1a0d17 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Feb 3 20:15:41 2009 -0800 + + Damage re-used shadow scanout buffer using new transforms. + + When the shadow scanout buffer can be re-used, the underlying framebuffer + area must be damaged so that the scanout will be repainted. This patch + delays the addition of that damaged area until after the transform in the + crtc has been updated, otherwise the old transform would have been used and + the wrong area repainted. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 62fc98cb88e4e8b636f343453fc1168a87c58972 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Feb 3 20:12:42 2009 -0800 + + Handle matrix computation overflow in RRTransformCompute + + If the computation of the composite fixed-point transform for RandR + overflows at any point, take the resulting floating point transform and + scale that back to fit in a fixed point matrix. This ensures that a matrix + will always be available, although perhaps at reduced precision. Someday we + should add floating point matrices to Render. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 7a3ddef3bc27982f3558183c74fc8e365cf2e7fd +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Feb 4 00:07:02 2009 +0100 + + fbdevHWGetRec() doesn't return the private data + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e04d9ab999978995b06f4b702293b96f69b0e8c3 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Feb 4 00:08:21 2009 +0100 + + DBUS_API_SUBJECT_TO_CHANGE is already defined on the command line + + dbus-core.c:30:1: warning: "DBUS_API_SUBJECT_TO_CHANGE" redefined + <command-line>: warning: this is the location of the previous definition + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9f60d127b5371f2853dcc53903c6ff8c7670ad1b +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Feb 4 00:07:40 2009 +0100 + + Fix "warning: braces around scalar initializer" + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a88995dfb88719ae4a03483dc571dbbe83565285 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Feb 4 00:03:58 2009 +0100 + + Make gcc happy: correct third argument of CopyGetMasterEvent() + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dd3f4e829286e62f4c5c07ee93f9f576876acbf9 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Wed Feb 4 00:02:24 2009 +0100 + + Fix "warning: cast to pointer from integer of different size" + + Add parenthesis around the whole expression. + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 731a907ac21a753f306b53706f689469cefeb953 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Tue Feb 3 23:58:25 2009 +0100 + + Fix "warning: XXX defined but not used" + + generic.c:80: warning: ‘read_legacy_video_BIOS’ defined but not used + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc57efffe654c493ceb62555cccb7926f4a646f1 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Tue Feb 3 23:54:53 2009 +0100 + + Fix "warning: unused variable XXX" + + events.c:4614: warning: unused variable ‘kbd’ + xkbUtils.c:361: warning: unused variable ‘maxKeysPerMod’ + xf86Events.c:409: warning: unused variable ‘ke’ + generic.c:131: warning: unused variable ‘cs’ + generic.c:130: warning: unused variable ‘size’ + xf86RandR12.c:591: warning: unused variable ‘crtc’ + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 111fdef74dfc7e288cef675b171b673bf64fe056 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Tue Feb 3 21:18:53 2009 +0100 + + ISO C90: Move declaration to the beginning of the function + + devices.c: In function ‘DoChangeKeyboardControl’: + devices.c:1768: warning: ISO C90 forbids mixed declarations and code + + Signed-off-by: Tomas Carnecky <tom@dbservice.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9fe9b6e4ef669b192ee349e3290db5d2aeea273c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 10:20:13 2009 +1000 + + mi: don't call UpdateSpriteForScreen if we have Xinerama enabled. #18668 + + In Xinerama all windows hang off the first root window. Crossing the screens + must not reset the spriteTrace, otherwise picking fails and events are sent to + the root window. + + X.Org Bug 18668 <http://bugs.freedesktop.org/show_bug.cgi?id=18668> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f80332a04d0714a74f16b2552cccf3457e6494af +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 14:28:16 2009 +1000 + + dix: for core events, pass the core filter into DeliverEventsToWindow + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 01879e583b0ce0d8fddc37e36d9b69fe4f1d1e72 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Feb 3 13:49:19 2009 -0800 + + Don't enable XAA offscreen pixmaps with Option "XaaOffscreenPixmaps" "no". + + xf86IsOptionSet is rarely the right function to use for boolean options because + it returns TRUE whenever the option is present, even if its value is "no", + "off", "0", etc. + +commit 5623c27700b7b23a8dbbd8c8f45e5d4fa0c667e3 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Feb 2 19:25:14 2009 -0800 + + Constify atom name strings + + Changes MakeAtom to take a const char * and NameForAtom to return them, + since many callers pass pointers to constant strings stored in read-only + ELF sections. Updates in-tree callers as necessary to clear const + mismatch warnings introduced by this change. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6869efae74381e5305b2d6517bf286e3ef7fdcb7 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Tue Feb 3 09:58:51 2009 -0800 + + XQuartz: Accept bundle version 2.1.6 to work with our startup method + (cherry picked from commit 7f2966557374cb5ea22bc7b73d5ca04891eb5e78) + +commit 43a1c91a3dac4f0c8cea5de1b9785e349e09978a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Feb 1 20:44:27 2009 +1000 + + Xext: fix typo in GEEventFill macro + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 412e09e1e37b74421abd4dd9606536d2785da440 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 15 11:03:03 2009 +1000 + + dix: Use GenericEvent instead of LASTEvent to check for core events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9f3c5d46f81887b2b413b3e6cc9df8282f06522c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Feb 2 12:55:39 2009 +1000 + + Xi: initialize the device before applying button map changes. + + This part got lost in bc909f71367a0. + Reported by Tomas Carnecky. + + Acked-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6bf6a4c47e94780bf0eef47702f21a505c336556 +Author: Simon Thum <simon.thum@gmx.de> +Date: Fri Jan 23 12:06:16 2009 +0100 + + Xi: create well-known atoms on demand, rather than preinit them + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 32adf8d34fb7db9b78859241f2670349b75c3f7e +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Jan 28 20:52:45 2009 +1000 + + Xi: If the MD doesn't have a key/kbdfeed class, init the keyboard. + + This fixes crashes on mouse/keyboard combos where the mouse is both a keyboard + and a mouse. Upon copying the SD's key info into the VCP, the NULL xkbInfo of + the VCP would crash the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit caade11b8465a743b2ecc890a4d180277e9ca716 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Jan 28 20:44:47 2009 +1000 + + Xi: remove now obsolete oldXkbInfo. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 5e0967f5fc2e0fcf2a55128eb03931cf6f5709e9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Dec 12 10:49:53 2008 +1000 + + dix: add SetBit(arr, bit) and ClearBit(arr, bit) to include/inputstr.h + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit faeb18eb7eb20f15528f9c8004d843146ebc2a50 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 27 15:40:31 2009 +1000 + + Xext: rename shape's EventType to ShapeEventType to avoid name clashing. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cfd3443fe81685e91a53063dee58e24a5684dc29 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jan 28 13:34:10 2009 +1000 + + Xext: rename saver's EventType to SaverEventType. + + Avoid namespace clashing with the internal events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8460425740c72e58bcb897557f033e2836251160 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 10 12:31:59 2008 +0000 + + render: rename SetBit to RenderSetBit. + + Avoiding namespace collision with the SetBit macro soon to be used in the + input code. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 940a7aeebc9b042b0208ee475ef162c485ac2274 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 27 15:52:49 2009 +1000 + + include: remove now-unused sempahore macros. + + Obsolete with the new enter/leave model. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f5c7f8a3ab5723b6c1c3cd21b90a87fd7f37cb7f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Feb 2 12:30:57 2009 -0800 + + XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard + (cherry picked from commit 8620579483789ae9ac1b68dbefe32b70011386de) + +commit 5100d829a4d71ce4a9fbc2b81694a1fb90066ccf +Author: Eric Anholt <eric@anholt.net> +Date: Mon Feb 2 10:13:46 2009 -0800 + + glx: Don't match fbconfigs to visuals with mismatched channel masks. + + This fixes at least one known bug, where the depth 32 visual would end up + with a depth 24 fbconfig attached, angering compiz. + +commit 4475ae036c3d5a06a6ce88a359ce2a9a8ae9b4f1 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 26 13:15:07 2009 +0000 + + Cygwin/X: Fix compilation for mandatory XKB + + Fix a stray '}' + Update to use RMLVO interface + Remove g_winInfo.xkb.disable, can never be set since noXkbExtension has been removed + Change to retrieve modifier key state using XkbStateFieldFromRec() from Colin Harrison + Update to use XKB defaults from xkb-config.h + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit e2b4d3d4a1994347979508fbb483cd55c2232502 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Feb 1 15:08:02 2009 -0800 + + XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT + (cherry picked from commit e01662cadcaa4052e3a5aa82cbaed00a2d0220e0) + +commit 66a6fbbfa3a1fd0d91fe61cf2ab299d0e3df46b9 +Author: Jim Huang <jserv@kaffe.org> +Date: Sun Feb 1 09:19:20 2009 -0800 + + kdrive: Move a close() to the right place so we don't close(-1) normally. + + Bug #18343 + +commit 0055fe66d5f73742cafab868ccdb7a6f36ea1dd5 +Author: Manuel Bouyer <bouyer@netbsd.org> +Date: Sun Feb 1 09:14:19 2009 -0800 + + netbsd: Force the use of ev56 instructions for register access on ev56. + + This avoids 32-bit access which might affect other registers. The linux code + uses gcc flags to get this to happen, but this seems like more of a sure thing. + +commit 1375c1b07df114d864a0a06786bc75a3a4f65177 +Author: Manuel Bouyer <bouyer@netbsd.org> +Date: Sun Feb 1 09:12:21 2009 -0800 + + netbsd: Fix alpha ev6 support. + + Bug #19721 + +commit ad8ffbe7cb50387e6a9cc4a24fea0d9c13b7bfc8 +Author: John Hein <jhein@timing.com> +Date: Fri Jan 30 21:30:35 2009 -0800 + + Actually require bigfontproto when it's enabled. Bug #13710. + +commit 29b3b88dc744f4919c6709747ddb7baac47486c5 +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Fri Jan 30 21:16:48 2009 -0800 + + Prevent double unref of glxdrawables + + Found by valgrind. Bug #18917. + +commit 60bcdd687040db76490851d4b459284ce37020e0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Jan 30 21:44:08 2009 -0800 + + x11-input.fdi: Add options needed to handle adding USB devices on Solaris + +commit 4de5705545792d77c9990bbec3e263a517757a2a +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jan 30 20:17:10 2009 -0800 + + RandR crtcs not fetched correctly when primary output is set. + + Primary outputs may not have a CRTC. + Loops fetching CRTCs respecting primary output were broken. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f716e3f3445d443cbc6507d27f806e9ad387120a +Author: Eric Anholt <eric@anholt.net> +Date: Fri Jan 30 20:10:21 2009 -0800 + + modes: Protect xf86_crtc_supports_gamma() from non-RandR 1.2 drivers. + +commit 317f2b4a9fe4b606975711bc332166a82db5087d +Author: Eric Anholt <eric@anholt.net> +Date: Fri Jan 30 19:06:17 2009 -0800 + + randr: Avoid re-querying the configuration on everything but GetScreenResources. + + The new path should only re-query on the other requests when we haven't + gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX). + + Bug #19037. + +commit c1f2be1f3fd0c80cb4c85b98140b98aa9311242b +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jan 30 19:14:36 2009 -0800 + + RandR SetOutputPrimary should work with or without a crtc connected + + The test was inverted from the protocol spec, and besides, the test is bogus + anyways. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit dd098501d800571e71d06ffc936635a6c9d44e05 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Jan 30 16:17:58 2009 -0800 + + Move the apple fat binary hacks back to a header file, and make it apple-only. + +commit 6e49fdd2c839b6244c23ce95c3ae76a1a265b986 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jan 30 15:43:04 2009 -0800 + + Make RandR CRTC info report panning area instead of just crtc area + + This makes the RandR info consistent with the Xinerama info. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ea309e47457156b60aadbf113f04e5b6851029c8 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jan 30 14:19:41 2009 -0800 + + Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse + + Drivers not using the new hw/xfree86/modes code would crash in DRI due to + that code trying to monitor CRTC changes. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fff00df94d7ebd18a8e24537ec96073717375a3f +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jan 30 14:16:12 2009 -0800 + + Ignore EDID-supplied monitor physical sizes for core screen size + + We report the EDID values in RandR, and we let people configure whatever + they like for the screen in xorg.conf. Reporting the EDID values in the core + means applications get inconsistent font sizes in the default configuration. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 4e7bc2d7a9879297aff0924febeca9bd3b6c336d +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Jan 30 03:56:39 2009 -0200 + + Work around inclusion of <X11/extensions/panoramiXext.h> + + The X Server build only needs the macros PANORAMIX_MAJOR_VERSION + and PANORAMIX_MINOR_VERSION from that header. + Addition of extra prototypes to <X11/extensions/panoramiXext.h> + caused a X Server build failure. + +commit 15ac25627e7239629be59adedda5d8a9deb330ef +Author: Matt Turner <mattst88@gmail.com> +Date: Thu Jan 29 14:40:27 2009 -0500 + + Remove extra / from Loading module line + + In the X log, upon module load, it prints a line similar to the following. + + > (II) Loading /usr/lib64/xorg/modules/extensions//libdbe.so + + The attached patch removes the extra / before the module name. + + Code already exists in hw/xfree86/loader/loadmod.c:InitPathList to add a + trailing slash if needed, removing the one added by sprintf is harmless. + + Signed-off-by: James Cloos <cloos@jhcloos.com> + +commit 3903e23153a0d47704050944fa83a7b31bc2eebc +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Jan 29 12:42:57 2009 +0100 + + XKB: ifdef XKB is dead, yet it was still present in a few places. + +commit 756a2c848305aa06bfe636314e28ad7f97c1168a +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Wed Jan 28 22:18:50 2009 +0100 + + Fix duplicate code, off-by one in space calculation, not initialized members + +commit b55db937fee5ddf34518a54f352c0ee9b8cc2c2c +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Wed Jan 28 17:33:25 2009 -0500 + + [shadow] Store the closure in the buffer + +commit 82fc102568b3d6b0daeb6c5f5b3a1310a7f14fcd +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Jan 28 07:51:32 2009 +1000 + + Disable Xnest by default. + + Xneest doesn't build right now and is in the process of being removed. So + let's not build it by default. + +commit f7585d020593345e7a61b1fe1a517c38da8f6d79 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Tue Jan 27 03:13:28 2009 -0200 + + Convert kdrive libraries to libtool convenience libraries. + + Also correct a link failure due to unresolved symbols. This + is arguably a libtool/ranlib/ld bug, that "may" be corrected + by linking all convenience libraries in a single one. But in + this case, it was preferred to just add a linker option to + Xfake_LDFLAGS, to force linkage of all libraries. + + This corrects #19725. + +commit b43a4e2d38adb9ff16204218f24df93cfd820d1b +Author: Magnus Kessler <Magnus.Kessler@gmx.net> +Date: Tue Jan 27 09:30:37 2009 +1000 + + Xvfb: add missing include for new xkbsrv.h + + Commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e added call to + XkbGetRulesDflts defined in xkbsrv.h + + Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a7e6424d992151c504a75bb807fa34c57ad52cad +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 23 17:11:57 2009 +1100 + + dix: remove obsolete comment. Event lists should not be allocated by the DDX + +commit b137a0cdb1d517a807d081fbde8e8dc0539fb3ca +Author: George Staplin <gstaplin@apple.com> +Date: Mon Jan 26 03:02:38 2009 -0700 + + XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks. + (cherry picked from commit 143224405ba74929c702a95de52b56df140b0d1b) + +commit 34b896e50fa154ad890a458c60932964421e739f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jan 16 19:26:07 2009 -0800 + + XQuartz: SnowLeopard: Help system book name changed in 10.6 + (cherry picked from commit b57cb05c69acbedb00a97234099ea104309aa2cb) + +commit c7d62d74bbd6e0067f511fd910b9e633576befb7 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Jan 25 19:19:01 2009 -0200 + + Explicitly add libxorg_la_LIBADD to libxorg_la_DEPENDENCIES + + Otherwise, for example, when hacking config/*.c, it is required to + run make clean on that directory, to ensure the proper libconfig.a + will be linked in the generated Xorg binary. + +commit 0eec7348875035792097f606487a558422774e2c +Author: Magnus Kessler <Magnus.Kessler@gmx.net> +Date: Fri Jan 23 12:11:00 2009 -0200 + + .gitignore: ignore sdksyms.dep + + Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> + +commit 88efe9c76f85423d952ff38e0cfd8b690439902a +Author: Magnus Kessler <Magnus.Kessler@gmx.net> +Date: Fri Jan 23 11:25:00 2009 -0200 + + Xvfb: Remove unused function GetLK201Mappings in InitInput.c + + Silence a gcc warning. After commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e + GetLK201Mappings is no longer needed. + + Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> + +commit 6ef46c40e62def4841a4cff4e0b443516a2ed782 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Jan 25 19:01:10 2009 -0200 + + Update xnest keyboard code to match xephyr/kdrive. + + Xnest was not updated in the last batch of xkb changes. This + patch is basically cut&paste from hw/kdrive/src/kinput.c and + hw/kdrive/ephyr/ephyr.c, and appears to generate a Xnest as + functional as before the xkb changes. + +commit 759348f13ffa02fb1804238189ffce1c92d33e2a +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 22 22:09:11 2009 -0500 + + Xephyr: Add some rudimentary Xnest command line compat + +commit 01ffaf6834fd6a3b1ddbd33d0f0b8d086be0737e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 19 21:11:05 2009 +1100 + + Xi: define a range of axis labels. + + This is copied from linux/input.h, presumably that's the ones at least the + Linux kernel can give us for any device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 132b464d734b077038e19b21e46d3a6258f4b998 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 22 02:11:16 2009 -0500 + + Remove a bunch of useless casts. + + We've had void * for twenty years now people let's try to act like we + know how it works. + +commit 0fb4390526bb829ab17ff4635d41a3012f63c1b2 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 22 01:13:17 2009 -0500 + + Remove xorgcfg 'Options' list. + +commit b5ece46b76c9182a077141505cc0e788c0fca3ea +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 17 20:07:40 2009 +0200 + + Input: Clarify valuator FatalError messages + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ddb46c1421a98190313b79621c0f5ae43b97d3f6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 17 20:03:10 2009 +0200 + + Input: Use previous state in valuator events + + Make valuator event state match other events by using the device state + from before processing the event, not after. Also, we already check the + number of valuators in UpdateDeviceState, so no need to do it again. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 18e51911f5748f9a27a18cd6bb421c899f5b048f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 17 13:44:47 2009 +0200 + + Input: Add postdown to ButtonClassRec + + This mirrors that in KeyClassRec: the state of the buttons as posted to + GetPointerEvents, rather than the state of the buttons as processed by + ProcessOtherEvent and friends. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c05f3bc935bef4d98216d38c0e98bd57ced382df +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 17 19:35:15 2009 +0200 + + Input: Don't allow DDX to generate repeat events + + We always use soft-repeat at the moment; XKB posts a release/press sequence, + which admittedly needs cleaning up, but that's for another day. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6aef4e96affcc26b9415c6bc9c9bebb5af05a1a7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 17 13:42:46 2009 +0200 + + XKB: Fix logic error + + Use logical or instead of bitwise or. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0ec9b1069aeeaf66fd104c09f08202f7ebccd170 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 10 14:44:28 2009 +0200 + + XKB: Remove unused XkbProcessOtherEvent + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7af53799ccefe27b996bdc6073075b7f12353d3a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jan 4 16:39:18 2009 +1100 + + Input: Remove unused CoreProcess{Keyboard,Pointer}Event + + Everything goes through XKB's Process{Keyboard,Pointer}Event on its way + through to ProcessOtherEvent now, so get rid of the old, useless functions. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7c4c00649cae855e141ec9a3667bfe399e3156d0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jan 1 05:25:52 2009 +1100 + + XKB: Remove unused DDX functions + + They were complete no-ops anyway. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4fa3872dc2bcfd6d1fc88d0a94c7071683eea899 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 18 20:26:00 2008 +0100 + + Input: Remove core keysyms from KeyClassRec + + Instead of always keeping two copies of the keymap, only generate the + core keymap from the XKB keymap when we really need to, and use the XKB + keymap as the canonical keymap. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bc909f71367a02297e725bb5769c2bcadab22395 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 12 00:35:56 2008 +0300 + + Input: Centralise pointer map changing + + Replace both core and Xi functions with one function that validates the + proposed map, and sends out both kinds of notification. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f06a9d2e05e13466c115fc706966a90b1fb0518e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 18 20:59:30 2008 +0100 + + Input: Clean up keymap change notifications + + Keyboard map notifications are always generated from within XKB code, + which also takes care of copying the keysyms, etc. If you need to + mangle the keymap yourself, generate a new core keymap/modmap, and pass + it to XkbApplyMappingChange. + + SendMappingNotify is renamed to SendPointerMappingNotify (and ditto its + Device variants), which still only _sends_ the notifications, as opposed + to also doing the copying a la XkbApplyMappingChange. + + Also have the modmap change code traverse the device hierachy, rather + than just going off the core keyboard. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 1d1a0f67eee330a286fbdef17e967ce8ea201548 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Oct 28 16:27:37 2008 +1100 + + Xi: Introduce XIShouldNotify + + XIShouldNotify just lets you know if you should send an event for a + keymap change (or similar) concerning a given device to a given client; + at the moment, this is only for devices which are sending events to that + client. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b5242789edb726bb539e4d42fa35bfdaca0025c9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 9 17:02:02 2008 +0300 + + XKB: Simplify keymap writing a bit + + We don't need no temporary variable. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit feb757f384382c7782ceac55f99d54c7caadbd9d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 25 19:54:29 2008 +0300 + + XKB: Sanitise vmods for redirected keys + + Turn two unsigned chars into one unsigned int for both vmods and the + vmod mask. As a bonus, remove broken unused accessor macro for setting + the vmods. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b5f49382fe48f0a762d9a15fb10a7d7e1183fc8d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 25 19:52:11 2008 +0300 + + XKB: Sanitise ctrls action + + Turn four unsigned chars into one unsigned long. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1bd7fd195d85681e722161f8c636a28f11b40abb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 25 19:50:12 2008 +0300 + + XKB: Sanitise pointer actions + + Turn two unsigned chars into one int. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 61c508fa78aa08ea2666fde950fbafad95d65056 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 25 19:47:16 2008 +0300 + + XKB: Sanitise vmods in actions + + Turn vmods from two unsigned chars into one int. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4f3078df2acf07364a17f738bc5c32f9a5962723 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 9 16:50:22 2008 +0300 + + XKB: Add a hell of a lot more FIXMEs + + For some reason, we insist on having daft internal representations that + make no sense, that always have to be converted to be used. We should + really sort this one out. + + Also, comment the hojillion members of XkbStateRec. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit edeb033f29ae2d52e86c543ccbf22fb7ae1fdb7f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 15 18:07:52 2008 +0100 + + XKB: Explicitly decode action data + + Rather than requiring a one-to-one correspondence between XKM and struct + formats in action data, explicitly fill the action data, so we can break + API. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 699824a35791735b4b4378adf8648e3aaa599ace +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 18 16:41:29 2008 +0300 + + XKB: Remove descriptions from maprules + + We don't use them, as they're not up to the task. We'll get a better + solution someday, promise. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1ad80678d88525159e55bb814205fd4eaca060a3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 18 16:29:35 2008 +0300 + + XKB: Remove support for setting combined keymaps + + We don't do full keymaps anymore. Deal. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 133e0bd6f1cc147a2ddbbe1519d10300e7dbe669 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 18 16:27:57 2008 +0300 + + XKB: Remove 'extra' functionality from rules parsing + + When we find something weird in the rules, don't stash it as an extra + freeform component, just state that the rules file is likely broken and + move on with our lives. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cc5c6d628aa0dc87c2cc9d063972e09ad747a596 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 25 18:45:37 2008 +0300 + + XKB: Remove unsupported Xi operation flags + + We support every XKB operation on Xi devices, so always report that we + support everything, and that nothing is ever unsupported. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 32db27a7f867b503c2840ca7b815e96d10be9210 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Apr 17 12:42:01 2008 -0700 + + Input: Remove modifierMap from core + + We already have modmap (in the exact same format!) in XKB, so just use + that all the time, instead of duplicating the information. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f062e90a95f9b7ae5458ef2100615e8ace9b66a7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 16 19:15:30 2008 +0300 + + Input: Remove modifierKeyMap + + Since modifierKeyMap is generated from modifierMap, just remove it, and + only generate it when we need to send the modifier map to the client. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cf6a2fc2bd94b392cfea120444d5e032d26f1d37 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Mar 30 17:25:39 2008 +0300 + + Input: Ignore modifiers in core input processing + + Modifiers get cleared by the XKB code when we drop down into core input + processing, so just delete the dead code path to simplify things a bit. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6727ee94086d238f9f99379280d4e4827f388cce +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 9 16:45:45 2008 +0300 + + Input: Remove state from KeyClassRec + + We already have state fully stored within XKB, so instead of duplicating it, + just generate the values to send to clients when required. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 26 18:38:25 2008 +1100 + + Input: Overhaul keyboard initialisation process + + XkbInitKeyboardDeviceStruct is now the only valid keyboard + initialisation: all the details are hidden behind here. This now makes + it impossible to supply a core keymap at startup. + + If dev->key is valid, dev->key->xkbInfo->desc is also valid. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 40877c6680863bd6a8475f2bb0c54df55bcf0b0e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Mar 18 10:05:57 2008 +0200 + + XKB: Make XKB mandatory + + No more #ifdef XKB, because you can't disable the build, and no more + noXkbExtension either. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f9da417163b6b2d6234d2542c1f375e33db7159a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 28 19:26:42 2008 +0200 + + Xephyr: Disable state inheritance hack + + Prepare for the impending removal of the state field by disabling this hack + for a while: it's hell of nasty and I'm amazed it ever really worked. + + Basically, on focus out, it should do as current DDXes do and fake releases + for all keys (not just mangle the core state) that are currently down; + buttons too. When focus comes back in, we already have a KeymapNotify that + lets us know what's currently down, so we can use this to fake the + appropriate keypresses, and send it through the event routing layer. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 5c281446d2a8c38511d45baee6f0d25a640f12e1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 28 11:56:34 2008 +0200 + + XKB: Remove lock actions disabling + + For some reason, XKB allows clients to set a global (!) flag that simply + turns lock keys into state no-ops. Ignore this flag. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 2f7cb7306709d5266688e05a066701d309323035 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 26 18:36:30 2008 +1100 + + XKB: Add XkbRMLVOSet + + XkbRMLVOSet is just a set of strings for rules, model, layout, variant + and options; use that in preference to XkbRF_VarDefsRec, which is a + hideously complicated monster that somehow managed to not include the + actual rules. + + While we're at it, clean up xkbrules.h so it doesn't require xkbstr.h. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 3208eff2d7b856a4ac0d650498ccb36e7e62e034 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 21 14:45:06 2009 -0800 + + Update xorg-server.h.in & Xnest to use new XKB default #defines + +commit cdf216aa17b776130a91fa6792c321620e810a18 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jan 20 16:50:43 2009 -0800 + + Fix XKB default configure options to use the right variables + +commit 0d3c3dad21857ef502fe0d0235620a1228248e13 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 23:46:48 2009 -0500 + + Don't include fontmod.h + +commit 4f004ab9a83e209943760e1faa39f06c8eeb27af +Author: Benjamin Close <Benjamin.Close@clearchain.com> +Date: Thu Jan 22 01:36:31 2009 +1030 + + XNest: Fix the build caused by __XKBDEFRULES__ -> XKB_DFLT_RULES in 23862ede59a9ce11a06ec5151bde460fb836c603 + +commit e45a8a498d1ee8e40fc334805c38c05cb04b49d0 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 22:07:07 2009 -0500 + + Remove CreateUnclippedWinSize from window.h + + This is utterly wrong, but then, so is sdksyms.sh + +commit 20d2117eb82fb7ce91afd4f01fe1b9d4b1bf0459 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 20 00:17:42 2009 -0500 + + Move CreateUnclippedWinSize to mbuf + + It's the only user, so. + +commit e1611d8d55ade35bf8c2e1da7bc2dbf05b011301 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 27 13:34:05 2008 +1100 + + XKB: Be more verbose about XkbCopyKeymap failure in debug mode + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5ee504cae5f17d16ee7599beaa4b1944a9a8aee6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 27 13:31:18 2008 +1100 + + XKB: Trying to copy to the same keymap is not fatal + + Humour the user if they run XkbCopyKeymap(foo, foo). + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d929ba6886c6f121b101c0bf0f7c63ef9d851a3e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 26 18:32:41 2008 +1100 + + XFree86: Input: Fail NIDR if we can't enable devices + + If we can't enable a device, bail out of NewInputDeviceRequest rather than + blithely continuing. Also, be more verbose when initialization failed. Also, + be more verbose when initialization failed. Also, be more verbose when + initialization failed. Also, be more verbose when initialization failed. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 534669b376a6a703fbc97269d279a5418cf60c98 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jan 4 16:24:44 2009 +1100 + + XKB: Remove unnecessary prototype + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 27ea1a7e4e7eca394e052791c64bc6be515e075e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jan 4 16:40:46 2009 +1100 + + XKB: Only Xi events are processed + + Core events aren't run through these functions, so don't bother testing + for them. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 2762cafc321166ac48f80146720709b1011e6894 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 27 13:35:42 2008 +1100 + + XkbCopyKeymap: inputInfo.keyboard is not a special case + + The device-walking code is still depressing, though. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 07c3bb922b8c1ae8fe28198f6c451430b836f21e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jan 4 14:12:19 2009 +1100 + + XKB: Move XkbCopyKeymap definition to xkbsrv.h + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4f35a34f3cd3df3c8af129936d1808dcc063d8a7 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Aug 14 17:26:02 2008 +0930 + + dix: Remove traces of CoreDevicePrivateKey + + Obsolete with MPX. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 58a6b5b9eff25b1b9c6de239d6f5a952a31dfd15 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Aug 14 17:21:28 2008 +0930 + + Xi: don't care about CoreDevicePrivateKey when copying keys + + If we get here, we must copy. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 23862ede59a9ce11a06ec5151bde460fb836c603 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 10 14:36:16 2009 +0200 + + XKB: Allow build-time configuration of XKB defaults + + Instead of hardcoding base/pc105/us, allow users to change the defaults at + ./configure time. Change the default model to be evdev on Linux. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 57a5eb2583bdf1069861fe2184de9739c0d0c7c1 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Jan 4 17:40:54 2009 +0000 + + Xming: Update .rc file to tidy About and Exit dialogs + + Tidy up About and Exit dialogs, add keyboard accelerators + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit df3f701ef2d41ff4be4839f473ae71d33777bea3 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Nov 2 20:17:23 2008 +0000 + + Xming: Ensure we dont try to print a null value when displaying xkb configuration + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit c612f0df45d388c98108e1e0c80afdfae05e338e +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Nov 2 20:46:41 2008 +0000 + + Xming: Add styles keyword and attributes. + + Add handling for style keyword and atttributes in .XWinrc + Update man page to document these additions + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 847a91ad2e8c9b0992c09f0ec38466885d6d25d4 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Jan 4 19:57:56 2009 +0000 + + Xming: Notify X when the keyboard focus is lost to a pure Windows window in -multiwindow mode. + + Fix internal WM to notify X when the keyboard focus is lost to a pure Windows window in -multiwindow mode. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 6c3e7e4d0568ecb7d10b814593bbbd817b7d2aab +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Jan 4 18:28:34 2009 +0000 + + Xming: Only allow WM_MOUSEWHEEL messages to act on the client area of a focused window. + + Fix internal WM so it only allows WM_MOUSEWHEEL messages to act on the client area of a focused window. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d84e0e387764236c7e97509baf4606d96cfc19d4 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Jan 4 18:20:44 2009 +0000 + + Xming: Correctly parent XA_WM_TRANSIENT_FOR windows in -multiwindow mode when a windows window is created. + + Fix internal WM to correctly parent XA_WM_TRANSIENT_FOR windows in -multiwindow mode when a windows window is created, + and to de-iconize parent windows when a child window acquires focus. + + XXX: Perhaps we should also shuffle parent(s) forward through Z-order when a child acquires focus? + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 8d82d806ee38d45ec7cdbf8b1f671ec1e4437567 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Nov 2 20:46:38 2008 +0000 + + Xming: Correct the way display and screen number is reported in window titles and tooltips + + Correct the tooltip text for the toolbar X icon to be strictly correct, 'display-number:screen' should be ':display-number.screen'. + Also for the default window title. + Adjust the style of the Windows title in XDMCP mode from 'Xming - hostname' to 'hostname:display-number.screen'. + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 656f92e247f2f257105daf1e0e6998e1b3d10eba +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 20:17:02 2008 +0000 + + Cygwin/X: should also use GetTickCount(), just like Xming + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 7f781e780ee2b261c5cb688a8e6c5dc1a53bdb6f +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Wed Dec 17 19:13:30 2008 +0000 + + Cygwin/X: Cygwin doesn't have RTLD_LOCAL + + RTLD_LOCAL is not defined on Cygwin + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 5630ff809676ab6b4833757060e48e201e8768a5 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Dec 22 13:53:43 2008 -0800 + + Ignore generated dmx manpages + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 64f924fbf513b5f91b3f2bcf5767f6fe927d3f7a +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Dec 22 13:43:30 2008 -0800 + + Kill off --with-mesa-source completely + + There were a few spots left in the source that were using the + --with-mesa-source defined headers or the now removed $(top_srcdir)/GL + directory. These aren't needed anymore as all the necessary source for + GLX is in $(top_srcdir)/glx. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + +commit e1c8ee215797fa8c6a3a5421bb6f99b58064248b +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Sun Dec 14 14:18:58 2008 -0800 + + Don't reuse PKG_CHECK_MODULES identifiers + + Using GL for the PKG_CHECK_MODULES identifier multiple times means only + the first call will actually be used. Later calls will be skipped due to + GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a + different identifier and DMX to just reusing GL_CFLAGS. + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + +commit ca46c01869768a8661a9d8a71493ed5f0760a8ab +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jan 16 13:58:20 2009 -0800 + + XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue + + Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes + (cherry picked from commit 94e417ac87a98cd5c6bf2d7c495d702748398931) + +commit b33905234025f005819c7e2acd653a3a0ecfeb82 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 9 14:32:14 2009 +1000 + + xfree86: always force RAW mode under linux. + + The previous check for AEI on left us with the possibility that AEI is forced + off in the config, but devices are added through evdev nonetheless. A keyboard + added this way can CTRL+C the server. Even when we use kbd, we can set the + mode to RAW, so it's safer alround to to so. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 646add4eb47c01c045ef64405510a08ecfb5bfd6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 16 16:04:07 2009 +1000 + + dix: remove XineramaCheckMotion, merge into CheckMotion. + + For 5 lines difference, we don't need to duplicate the whole function. really. + +commit e76f904abe530df9ddaa09510088c545298b0b91 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 16 15:53:50 2009 +1000 + + dix: remove "notyet" conditional compilation. + + If it's "notyet" for 3 years, then "yet" won't arive anytime soon. + +commit 5c41b3f9c8b72f0115019237f812d74610b82c24 +Author: George Staplin <gstaplin@apple.com> +Date: Mon Jan 12 19:30:43 2009 -0700 + + XQuartz: xpr: Cleanup some of the code and possibly fix part of the GLX Pixmap problem. + + Split DRICreateSurface into 3 functions. + + Make CreateSurfaceForPixmap use xp_configure_surface. I suspect this is partly why + GLXPixmaps never worked. + + It will require some more work and thoughts for pbuffers, unless we fake those with + pixmaps and surfaces. + (cherry picked from commit 9cf264e67744262b9f45079e6cd752eb3e3b0e08) + +commit c5d52d4c37ebec92cb668b0653bf3de2bdfc5782 +Author: George Staplin <gstaplin@apple.com> +Date: Mon Jan 12 14:14:44 2009 -0700 + + XQuartz: GL: Make indirect.c build and work in the 1.6 branch. + + Reorder some header files and provide some types earlier on. + + Remove the static __GLXextensionInfo __glDDXExtensionInfo; that isn't + used in 1.4 or 1.5, and seems to have been removed from 1.6. Remove + the data structures associated with that too. + + Remove __glXAquaDrawableResize. The GLX structure doesn't use + it anymore, and the Apple version did nothing useful before. + + __glXAquaDrawableSwapBuffers(): base no longer contains a drawGlxc + member. Now provide the the Apple/Aqua context in the __GLXAquaDrawable + struct. Add the context member to the __GLXAquaDrawable struct. + + Remove the fallback configs. They aren't used in 1.4 or 1.5 either. + + Remove init_visuals(). It's not used in 1.4 or 1.5 either. + + In the drawable constructor initialize the state properly, including + the new context member. + + Remove glAquaResetExtension() -- it's not used anymore. + + This has been tested remotely and proven to work with glxgears, + fire, various texture programs I wrote, and various Mesa demos. + (cherry picked from commit d514152195452ae11ec7769c76489651620ad380) + +commit 1c504dff8a84804888f18ee9b184f0c4584185d7 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Jan 15 21:03:27 2009 -0800 + + XQuartz: Fix builddir != srcdir issues and undef _XSERVER64 where appropriate on fat binary compilation + +commit 717a961528ec69a6e630d536e15568670e0b398a +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Sat Dec 20 16:17:02 2008 +0100 + + Don't release grabs unless all buttons are up + + Previously, only buttons <= 5 would count here, but the core protocol + allows for 255 buttons. + + http://lists.freedesktop.org/archives/xorg/2009-January/042092.html + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f7f85f696570541e2dd43462675de9e6ee46f545 +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Mon Dec 22 00:55:09 2008 +0100 + + Count the number of logically down buttons in buttonsDown + + This fixes the following bug. Assuming your window manager grabs + Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping, + then press the physical button 3 (this shouldn't have any effect), press + Alt and then button 1. The press event is delivered to the application + instead of firing the grab. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 6f065a26db62aaf1d7aab9f9a3d0e6cd09d1c1dd +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Thu Jan 15 21:42:26 2009 +0000 + + Xming: Reduce MOUSE_POLLING_INTERVAL + + Reduce MOUSE_POLLING_INTERVAL from 500ms to 50ms + + In -multiwindow mode, this determines how quickly X windows can track the mouse + when it is outside any X window... Move the cursor around an xeyes, and you will + see what this timing effects. + +commit c745db1674c3cb55249c9eb6e74939b74c42409c +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 5 13:52:45 2009 +0000 + + GLX: Avoid a crash when we have an uninitialized GL context + + If the GL dispatch table pointer points to glapi_noop_table, + (due to some kind of GL initialization failure), DoGetString(GL_VERSION) + (for example as invoked by glxinfo) will crash as it tries to + do atof() on the null pointer returned by the noop dispatch function + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit e30032d0bbbf0bf71e1b53a4ac388f3bd6f68e53 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Dec 1 21:14:01 2008 +1000 + + Xext: clean up XGE macros. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 1ae529bef50a8ccc4a8a264ed120aeae544b21e7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jan 14 14:56:10 2009 +1000 + + dix: replace manual check for event types with IsPointerEvent() + +commit 1d54479cb3c8b4f75b7564f8b5e1c5da940b20f4 +Author: Simon Thum <simon.thum@gmx.de> +Date: Tue Nov 25 14:12:02 2008 +1000 + + xfree86: init properties when ptraccel configuration is found. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Simon Thum <simon.thum@gmx.de> + +commit 19275ea8e9dd93d5e61906943706dfe49003dd9c +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Nov 19 16:01:21 2008 +1000 + + dix: add property support for pointer acceleration. + + Note: properties don't need to be cleaned up, the DIX does it for us anyway. + Data that is stored in properties is cleaned up by the property system. + Handlers, etc. don't need to be unregistered while cleaning up, as they get + deleted when the device is removed anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Simon Thum <simon.thum@gmx.de> + +commit d645721170b1196e5064b397cfbffd1da8c79bb1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 8 11:53:30 2009 +1000 + + mi: ensure chained button mappings from SD -> MD (#19282) + + After copying the master event, flip the detail field to the mapped button of + the SD, not the physical button. This way if the SD has a mapping 1:3 and the + MD has a mapping of 3:4, a press on button 1 on the SD results in a core event + on button 4. + + X.Org Bug 19282 <http://bugs.freedesktop.org/show_bug.cgi?id=19282> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 639f289dcdbe00a516820f573c01a8339e120ed4 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jan 13 13:05:32 2009 +0100 + + EXA: Declare glyph cache picture as component-alpha when necessary. + + Without this, rendering component-alpha glyphs may break without a mask. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=19233 . + +commit f4e00b783d3f824058a5f140e6462142688f5116 +Author: Michel Dänzer <daenzer@vmware.com> +Date: Tue Jan 13 11:03:27 2009 +0100 + + Fix build with --enable-visibility --disable-xdmcp. + +commit d36adf52a2b2711d22b11105f7bd907d4493fb9b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 12 15:29:36 2009 +1000 + + dix: fix WarpPointer calls for devices with custom valuator ranges (#19297) + + If the MD's lastSlave was a devices with custom axes ranges, then a + WarpPointer would position the cursor at the wrong location. A WarpPointer + request provides screen coordinates and these coordinates were scaled to the + device range before warping. + + This patch consists of two parts: + 1) in the WarpPointer handling, get the lastSlave and post the event through + this device. + 2) assume that WarpPointer coordinates are always in screen coordinates and + scale them to device coordinates in GPE before continuing. Note that this + breaks device-coordinate based XWarpDevicePointer calls (for which the spec + isn't nailed down yet anyway) until a better solution is found. + + X.Org Bug 19297 <http://bugs.freedesktop.org/show_bug.cgi?id=19297> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 488d45295105daf10ccd17ca93ae6a6f4d0104f1 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 12 16:16:24 2009 +1000 + + dix: EnqueueEvent and PlayReleasedEvent need to handle DeviceMotionNotifies + + No MotionNotify events in the processing anymore, so let's have them treat DMN + instead. + + Reported by Thomas Jaeger. + +commit 1e470645983ad18fa38c0885d674bc9d1dc1e560 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Jan 13 00:12:56 2009 +0100 + + require randrproto 1.2.99.3 + +commit a48c81dcdf569a3f634ac23e08d2491354de6a36 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Dec 5 16:24:57 2008 +1000 + + Xi: add XATOM_FLOAT to server-defined properties. + + This property is used to denote type float for input properties. Such + properties can be accessed easily through the XIPropToFloat() function. + + Code originally written by Simon Thum. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 669f6810af9a89187d6149841925fe765f3988ff +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 19 15:50:57 2008 +1000 + + Xi: add XIPropToInt() auxiliary function. + + Converts an XIPropertyValuePtr to an integer, provided that type and format is + right. + + Code originally written by Simon Thum. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 56efbc0986e782da45addb05ece9f456d41d7a90 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 9 13:46:20 2009 +1000 + + dix: drop x/y back into last.valuators before updating the history (#19285) + + positionSprite needs to scale to screen coordinates and in the process of + doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after + finishing and before updating the motion history. This way, we don't push the + screen coordinates into the motion history. + + X.Org Bug 19285 <http://bugs.freedesktop.org/show_bug.cgi?id=19285> + +commit 67710ad1d172cc4d53e28e5cc7dab2efb57a9a85 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Jan 11 16:34:36 2009 -0800 + + XQuartz: Don't need explicit Activate/EnableDevice in InitInput + (cherry picked from commit b1d29784410b3b93037e5636f336ba608d8ad6e3) + +commit dde5c591be74139ec6f2a90a3fdc7904d7342554 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Jan 11 16:10:45 2009 -0800 + + mieq: Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes + + This is more of a hack around the problem. This is something that will need to be addressed in a + more structured manner with the multi threaded input efforts. + (cherry picked from commit 3c596c061e75848cfa76dd9259c23a3f3a67444c) + +commit 0720816aea20971ee94b5df3faa9cb9f16e93f82 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Jan 11 14:49:39 2009 -0800 + + XQuartz: Only call DarwinUpdateModKeys when needed + + Previously, we were calling it on almost every itteration through sendX11Event + (cherry picked from commit 6461729647ff4441d80811e73f0c0d2f108f2700) + +commit c8bf582db8111f71b9250a602a9d5aa7bd828136 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 23 11:41:22 2008 -0700 + + XQuartz: Comment explaining the 0x10 flag for [e data2] + (cherry picked from commit 3c695280641c1205b97d3bb9f1d5e15a19cfa45f) + +commit 5339c22a8ca8bce6cd2b51e97c904292e7c40e74 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Jan 11 01:56:45 2009 -0800 + + XQuartz: Add locking to make mieq thread safe on OSX + (cherry picked from commit 7a8d2266861e74176b5310b83652a9c10a170494) + +commit 1beff89810cd193e45d437846929b3938cee6d96 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Jan 11 01:55:26 2009 -0800 + + XQuartz: misc 1.6 updates (still --disable-glx) + rlAccel is not longer compatable, and it's not worth fixing + Don't override DeviceCursorInitialize with a noop + Don't do a SwitchCoreKeyboard (which wasn't even needed in the first place) + (cherry picked from commit c137f681680e1d04b1513a8be68aeda4d1c56fd5) + +commit 2d917cfe56af1e74205f80ddbaddfb5c6ce82f0a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Jan 10 01:39:08 2009 -0800 + + Apple: Don't use DRI2 + (cherry picked from commit a1d35cee5907a76977ee43c49cb55c8f411c9794) + +commit 7a8abb9c8554d7967d912dcd427804f65906dc5c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jan 6 15:32:44 2009 -0800 + + XQuartz: Bundle version 2.4.0 + (cherry picked from commit 3a3ccf5354e4275abe9d01f41a92602df5d690dc) + +commit 63ff7d236f67e159943312e1a551fcf5bb3f463a +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:45:24 2009 +0100 + + os: don't mix declarations and code + +commit f43a3c61ab1eab8aecdc0e4bdee9f3bae2cab234 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:44:53 2009 +0100 + + os: backtrace() returns int, not size_t + +commit 5321ae76cffc5fcfe4bebcfb10e08eecaf640503 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:44:29 2009 +0100 + + os: ANSI cleanups + +commit 47438a2161a92fec08081d2de28966cf8d31654a +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:43:48 2009 +0100 + + randr: RRSetPrimaryOutput can be static + +commit 7f82114b1dc738f98b9f22f6e61d6d5191383b67 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:43:35 2009 +0100 + + xkb: ANSI cleanup + +commit 46f3c1b937002f9a860878b359dcf5756a82dcf2 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:42:57 2009 +0100 + + mi: don't mix declarations and code + +commit 5aa9483d3ee306a79a9235610ce6b2754d697585 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:42:28 2009 +0100 + + mi: ANSI cleanups + +commit 359ed32c9b013ed88e14c99aa7fd7a617a85e2c5 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:40:58 2009 +0100 + + xnest: only define ddxBeforeReset if needed + +commit 9651cd8d7ac26635b6fb1826806ac9f4e2bddb63 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:40:47 2009 +0100 + + xnest: ANSI cleanups + +commit 31439195c51f183f5a8989a8d4f95b3e6326eda0 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:37:06 2009 +0100 + + xfree86: linuxPci.c needs a prototype for xf86AccResFromOS + +commit a00dbd0015845e08ef2af9480cc3833819cf86f5 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:36:16 2009 +0100 + + xfree86: use %zu to format size_t arguments + +commit 17c8cb50990a9ad20bbd3f8ce14c149dac9d72ad +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:34:56 2009 +0100 + + xfree86: don't mix declarations and code + +commit aec4c0caca41a06832536ba82ba5bcdccf4a0aea +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:33:18 2009 +0100 + + xfree86: ANSI cleanups + +commit dba3b1944d04232f88bb310277639f2c1adcbe08 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:28:23 2009 +0100 + + Xvfb: ANSI cleanups + +commit a2a760e33c17e211650b1f53c05a89c013916cf3 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:25:39 2009 +0100 + + dix: don't mix declarations and code + +commit 466dddbb83aa37ae93fb32976d51ecaa947c3616 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:25:17 2009 +0100 + + dix: fix cast from pointer to integer + +commit 54332e4732577dc49e440d9c9f8dd7d791f03f8e +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:20:06 2009 +0100 + + dix: ANSI cleanups + +commit ef9902652b8a1c716ea3851565d6e2a98bd30eb0 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:18:56 2009 +0100 + + config: ANSI cleanups + +commit e64473b14e091e4b75e6ac2bf9a35e9aaa907258 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:17:41 2009 +0100 + + Xi: fix missing declaration of XkbSetRulesDflts + +commit 6e20a4ae731b7bc72266e5809faa0ecfde2bdfe4 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:16:55 2009 +0100 + + xsync: make SyncAlarmCounterDestroyed static + +commit 292311b421e53ead53c7df67d735a3d6d3e5b515 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 11 08:16:12 2009 +0100 + + Xext: ANSI cleanups + +commit 7a05c8b1e70680ddd3b3e09ad448788f8d70a428 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Dec 23 13:08:49 2008 +0100 + + xfree86/linux: fix log flood on acpid open error + + When we can't open the acpid socket, warn once, not once every second + +commit 0d8184de591c75794083c8a8ca3fb8459e9394bc +Author: George Staplin <gstaplin@apple.com> +Date: Fri Jan 9 16:08:26 2009 -0700 + + XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT. + (cherry picked from commit 3c14546f58f8a138fe67c9cacc3bd0b7fa90c29a) + +commit 9c3975d63e129ad7230cae585f08a962d45fb861 +Author: George Staplin <gstaplin@apple.com> +Date: Fri Jan 9 15:53:39 2009 -0700 + + XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch. + + Use a __GLXconfig linked list struct to store the configurations for the + fbconfigs and visuals in a pGlxScreen. + + Also, remove the __GLXvisualConfig/GlxSetVisualConfigs code that isn't used + anymore. There is more code we can remove later, but I want to do that in + separate commits. + (cherry picked from commit 94162b0f8a25267aca280d25e216cc6bde47da6e) + +commit a68373994f4957a73f4eab52c90ebcfb96f285f8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jan 7 18:27:21 2009 -0800 + + XQuartz: Update padding in appledristr. This shouldn't change how the struct ends up in memory, but should make it more obvious for human eyes + (cherry picked from commit f7b6c1907c326a1befd8b5c8a1d311d551e8670f) + +commit 5f3188228eb988bd8f08b62c84f98a8ff66ee283 +Author: Xiang, Haihao <haihao.xiang@intel.com> +Date: Tue Jan 6 10:03:19 2009 +0800 + + avoid a potential endless loop. + + Previously it is possible that creating rotation data, then cleaning + up and creating again so that pScreen->BlockHandler and + xf86_config->BlockHandler all point to xf86RotateBlockHandler. + See bug #19343. + +commit b2756a71a432f7cf7c870a48676c98625512558d +Author: Thomas Jaeger <ThJaeger@gmail.com> +Date: Fri Jan 9 02:02:38 2009 -0500 + + Xext: Send out correct events in ProcXTestFakeInput + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9bf77569cc8f9b0cc25c99487672d375d7c32f99 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jan 8 16:32:24 2009 +1000 + + Xi: call CheckMotion for floating SDs too. + + CheckMotion updates the sprite position so we need to call it for all devices + that have a sprite - including floating SDs (which have an invisible sprite). + +commit 83eb863e3cfcd62549b836f3195107d8908b36d0 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 9 11:39:02 2009 +1000 + + Xext: don't accept DeviceValuator if the dev doesn't have valuators (in xtest) + + Reported by Chris Ball. + +commit a3f9e887d9ff5fdee6c35ccc0f7b324723a83a46 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jan 9 11:40:18 2009 +1000 + + dix: don't accept Button 0 presses in GPE. + +commit 0c6987df3b9b3a37d201d740d8248c326449835e +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 17 16:10:51 2008 -0400 + + XAA: Disable offscreen pixmaps by default. + + Say Option "XaaOffscreenPixmaps" to turn them back on. + + Apropos of bugs #13795 and #15098. But this still isn't correct. + +commit eb2d7b3d700952ba88c77deacf687b251300e660 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Dec 19 21:05:47 2008 +1000 + + dix: move focus handling into enterleave.c. + + This commit moves the focus handling from events.c into enterleave.c and + implements a model similar to the core enter/leave model. + For a full description of the model, see: + http://lists.freedesktop.org/archives/xorg/2008-December/041740.html + + This commit also gets rid of the focusinout array in the WindowRec, ditching + it in favour of a local array that keeps the current focus window for each + device. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 673eb23aac578dcdc04e2a99d1fa5c2987eb58b8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Dec 19 21:05:09 2008 +1000 + + dix: add a few auxiliary functions for the updated focus model. + + SetFocusIn and SetFocusOut, including the static array to keep all focus + windows. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 38b28dcadd0990cb43f50db4300eebb8f044db96 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Dec 18 15:55:11 2008 +1000 + + dix: reduce FirstPointerChild complexity + + Instead of keeping a flag on each window for the devices that are in this + window, keep a local array that holds the current pointer window for each + device. Benefit: searching for the first descendant of a pointer is a simple + run through the array. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 72ad4a85cc0ffe60a90011d65ef718d5852beae4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Dec 18 15:43:18 2008 +1000 + + dix: remove now unused "exclude" parameter from FirstPointerChild + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 0aa4460c3b4f9bb17d5412d76fa8c4c501132429 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 17 16:14:41 2008 +1000 + + dix: re-implement enter/leave model. + + The old model was implemented based on a misunderstanding of NotifyVirtual and + NotifyNonlinearVirtual events. It became complicated and was broken in some + places [1]. This patch wipes this model completely. + + A much simplified implementation is provided instead. Rather than a top-down + approach ("we have a tree of windows, which ones need to get which event") + this one uses a step-by-step approach. For each window W between A and B + determine the pointer window P as perceived by this window and determine the + event type based on this information. This is in-line with the model described + by Owen Taylor [2]. + + [1] http://lists.freedesktop.org/archives/xorg/2008-December/041559.html + [2] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html + +commit f8ecc2f08fc375b14d60a74e2fdd7830bfdcd74f +Author: Christian Beier <beier@informatik.hu-berlin.de> +Date: Tue Jan 6 11:31:03 2009 +1000 + + Xi: fix typo in WarpDevicePointer handling. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3d549438c29004d78032ecc50ab45ca0e3f49623 +Author: Thomas Jaeger <thjaeger@gmail.com> +Date: Mon Jan 5 01:26:42 2009 -0500 + + Don't alter device button maps in DoSetPointerMapping + + Currently, if a device map differs from the core pointer map, then the + request may return MappingBusy, even though all the affected core + buttons are in the up state. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b72c6b083baeadfd7b18b6025df054be502d6e28 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 6 09:01:48 2009 +1000 + + dix: remove inputInfo.keyboard reference in QueryPointer handling. + + PickKeyboard() is to be used instead. + +commit 30d2cfcd3851870178d62e5067211aa36f87fbd2 +Author: Kim Woelders <kim@woelders.dk> +Date: Mon Jan 5 19:35:18 2009 +0100 + + dix: Fix handling of do_not_propagate_mask window attribute. + + This was broken in 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2. + + Signed-off-by: Kim Woelders <kim@woelders.dk> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 515ce3e4ba42605a1ee9979e8bb5acd3cf6470a3 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jan 5 15:48:45 2009 +1000 + + xkb: fix typo - missing negation when checking button state. + + Introduced with a85f0d6b98237d8a196de624207acf1983a1859a. + + Reported by Thomas Jaeger. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 9a313fb03153eb764aab3e9cb9988b6603541637 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Jan 7 23:07:01 2009 -0200 + + Don't call free, use xfree macro. + + There are several other direct calls to free, check + % egrep '\<free\(' `find . -name \*.c` + but they are free'ing memory from explicit malloc calls. + This one was not intended, and corrected, so that it would + both, follow the conventions everywhere (and work on some + libc that doesn't like free(0)), and make it easier to use + malloc wrappers. + +commit 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Jan 7 19:37:03 2009 -0200 + + Default to use standard bitmap fonts, with builtins as fallback + + The builtin-fonts configure option was removed, as it at best should + have been a runtime option. Instead, now it always register all "font + path element" backends, and adds built-ins fonts at the end of the + default font path. + This should be a more reasonable solution, to "correct" the most + common Xorg FAQ (could not open default font 'fixed'), and also don't + break by default applications that use only the standard/historical + X Font rendering. + +commit 4f004231871c830e16c4525cfaab183fad0aee86 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jan 7 10:55:08 2009 -0800 + + XQuartz: Fat binary buildfixes + + Let Xarch.h set X_BYTE_ORDER for us. + Determine _XSERVER64 at build time. + (cherry picked from commit f54736c2b0b537c8322ecb2db8e9cee5eea68165) + +commit fbf44d85bd59bfa629193d6494b16812a7343cab +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 5 23:18:11 2009 +0000 + + Cygwin/X: Tidy up an unused #define + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 1badeb78b0b974a381e563e3d4f4cf37debd4266 +Author: Rémi Cardona <remi@gentoo.org> +Date: Wed Jan 7 09:31:17 2009 -0500 + + Include Xmd.h from edid.h + +commit fc14d52297f8f408693ed867ab649ea5b210b0b3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Nov 16 15:35:17 2008 -0800 + + XQuartz: Use AvailabilityMacros.h instead of availability.h for Tiger + (cherry picked from commit 91f3c3435716195e6d606c8e2f6b0de52eb5972d) + +commit 4c326c4d342bede0de57e71c1431f56188f812ce +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jan 6 08:36:39 2009 -0800 + + Make cvt complain about invalid arguments more often. + + cvt doesn't correctly parse 'cvt -vr 1920 1080'. This patch doesn't fix + that, but it does at least generate an error message now. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1da4a41b0881b605c7cfa4c4bf637efa132c58fc +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Tue Jan 6 05:01:32 2009 -0200 + + Add sdksyms.sh to EXTRA_DIST to correct make distcheck + + Thanks to <vehemens at verizon.net> for noticing the problem. + +commit 200230535fa80c04faaa562bbbd8272713e2763b +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Mon Jan 5 16:49:57 2009 -0200 + + Update sdk headers to export new symbols. + + All symbols in installed sdk headers should be explicitly tagged + as exported symbols. Otherwise, to ensure it is not a mistake, one + could write it as something like: + extern /* NOEXPORT */ type name ...; + but the proper procedure really should be to use a non sdk header + (or a "noinst_" one). + This patch also removes prototypes to some functions that existed + only temporarily. + +commit af6152499654a7146250d4ad0df89f611345434e +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Dec 17 14:15:34 2008 +0000 + + Cygwin/X: Add *.exe pattern to .gitignore + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 8428b92fcb478b041f778c0e8c66fdeb96c807f3 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Jan 4 20:12:16 2009 +0000 + + Xming: Fix a couple of warnings + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit f6f97419bd2db651384ecaec0b296840810463a4 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Jan 5 18:35:52 2009 +0000 + + Cygwin/X: Add -static back to linker flags + + Add -static back to linker flags to avoid screwing things up for + people who don't know that they need to avoid dynamically linking + with libXfont, as weak symbol handling requires static linking to + work correctly on Cygwin... + +commit 2ec0ac08addb938a3d5aa5b9888ce7c79a0daada +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Wed Dec 17 19:18:38 2008 +0000 + + Cygwin/X: Fix some remaining build issues + + Fixes for a few remaining build issues, omitted from commmit 6e85a8304b50c0bfd16a400a05d257f0168fb99b in error + + Provide VENDOR_RELEASE in XORG_VERSION_CURRENT for XWin + Remove -static from linker flags for XWin + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit e351d10773742d1570e1111976b7c8b6adda5ae6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Jan 5 17:41:38 2009 +0200 + + RandR: Only export Xinerama symbols when building Xinerama support + + Otherwise compilation fails due to sdksyms. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 3387cbb7c13636eb62b22640d28df7011c2268f0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Jan 5 11:25:57 2009 +0200 + + XFree86: Xv: Add ClipNotify helper + + Add a ClipNotify helper that lets the driver know about changes in the + clipping of an Xv backing drawable. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 55c4ec0a1ef78481b4d82153c19c20fbf88f1624 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Jan 5 11:24:24 2009 +0200 + + XFree86: fbdevhw: Add helper function to get fd + + Most devices need to do custom weird ioctls, so let them know what the + fd is. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 7da4e901e078e5597b8dbcb7ee39b949edf7ef03 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Jan 5 11:23:39 2009 +0200 + + XFree86: Fix build with DGA disabled + + It's optional, so we might as well work when it's disabled. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 13ce7b98d48261b061da5768a6405bdbe9caa1fb +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Mon Dec 22 14:31:03 2008 -0800 + + dmx: Require newer libXi for XQueryInputVersion + + Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 27011254c4de4e573a0851bf46892fb488db6522 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 23 09:59:28 2008 +1000 + + xfree86: If an input device failed to activate, return immediately. + + Devices are only activated once - right after they've been added to the + server. If a device failes activation, it's dead. There's no reason to + continue. Return the error code from ActivateDevice() without setting up + sprite information or even sending a event to the client. + + Then - in the DDX - just remove the device again. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e1a3a1a0d85c9971aea65c2228b5fd4dbf3bf57a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 23 10:00:34 2008 +1000 + + xfree86: don't call CheckMotion if a device hasn't been enabled. #19176 + + X.Org Bug <http://bugs.freedesktop.org/show_bug.cgi?id=19176> + +commit af820259a06a6e8dbd299fe22347aa83b0c985b0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jan 2 11:06:12 2009 -0800 + + XQuartz: Copyright Update... happy new year + (cherry picked from commit 9f1c26ae8d9ccf81cba0ab946326968a701f8c36) + +commit d8c9ba37abd0d63ea2c5394af434b46ec3b647fd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jan 2 10:58:40 2009 -0800 + + XQuartz: pbproxy: Push dpy init and CFRunLoop hook setup into the pbproxy thread to avoid possible deadlock + (cherry picked from commit 49e59d32b88e4fad070f230b5efaa261b47f78db) + +commit 2f361186f93a791e446c4a9471bb0c3b9b818d98 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 31 12:40:02 2008 -0800 + + XQuartz: Don't use NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK + + We don't have keycodes for them, so don't try to use them + (cherry picked from commit cb912aca3a2834c4ad8e386c8a0d05c1bb31b0e7) + +commit a2abaa9fd3a5ad713c1f946e9d7f598825ad3a84 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 31 11:57:49 2008 -0800 + + XQuartz: Make sure to reset the saved key state when deactivating X11.app + (cherry picked from commit 3eef78eb321f4f7dbca5a10c80666c621e28a1e0) + +commit 3986b683adc4f6f967cc5f643e973d89764234c7 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 31 12:44:43 2008 -0800 + + XQuartz: Honor system key repeat rate + (cherry picked from commit 4303c9be39a86f5a21de108f72b90a989435905e) + +commit 1a69d56afda082298edc76271d2cb71af00526ce +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Dec 29 19:54:12 2008 -0800 + + XQuartz: Better avoid stuck keys on context switches + (cherry picked from commit e9963f1a4f4f12f253eae9d4f01694b6cabe35ad) + +commit f464b5a9164b24f74adea198bcabe9affaf5552c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Dec 29 19:38:31 2008 -0800 + + XQuartz: Workaround OSX VNC server bug for modifier key state + + A better approach which ensures we have a L modifier key down if we are told neither are down and atleast one is down... =/ + (cherry picked from commit bc13dda345f716bf4de9bfe4e1d85969263b60c2) + +commit 3ead9aa2602cab9c883aa7bcbd2a8d82c5c88f5a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Dec 29 00:30:31 2008 -0800 + + XQuartz: Updated man page fullscreen_hotkeys fullscreen_menu + (cherry picked from commit 00f3a2e33c8e91da5f855821313a04ea97445656) + +commit 48dbaf173a82693fd72953983da9fc556cd1c6ed +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Dec 30 12:17:14 2008 +1100 + + XKB: Also copy keyboard feedback when copying the keymap + + When updating the XKB keymap, make sure the keyboard feedback is also + copied, to preserve autorepeat settings etc. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit cf85a32b5f80694f3c2f434e91cf77edb33a7c17 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 28 15:57:59 2008 -0800 + + XQuartz: pbproxy: We explicitly need libX11 for pbproxy + (cherry picked from commit 32824120da0749b8369c2592f851bb1030dea9f1) + +commit 997e8c321bb11067591785ba38103a3a5029301d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 28 01:53:38 2008 -0800 + + XQuartz: Try harder to get the user's login environment + (cherry picked from commit 6bedaddd78aa04bd303df434a4c49bb87bd7deaa) + +commit ae8dc47fd910ec4b9edd64bf3b7ba33e212c5942 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 24 00:39:06 2008 -0800 + + XQuartz: Reposition windows when we enter fullscreen to ensure our root window + (cherry picked from commit 7617d3659b5481ef85aecc1f936e7dd2662bdfbd) + +commit 895186e026881196ac9383aa165e123055d9cf09 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Dec 23 20:33:27 2008 -0800 + + XQuartz: Re-enable rlAccel + + It was incorrectly blamed for some crashes a few months ago, and it should be + safe to use until we get an EXA driver to replace it. + (cherry picked from commit 8121f30bd29591fc74fbc680fbbf20210271fa58) + +commit dc4498ec5cb7f25f710bdec8793746da2d2324ed +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 28 22:16:52 2008 -0800 + + Updated .gitignore + (cherry picked from commit 06964c322e4da81f3146022049a2de13f6b2892d) + +commit 3534a5e5d9c5af85149c799f324257f89507fa23 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Dec 26 16:38:27 2008 +0100 + + exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps. + +commit 027b440d4f9f0cdd46addff46fd2d5c44cd5c847 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Dec 26 15:51:55 2008 +0100 + + exa: preparing as source and finishing access as mask is a bad idea + +commit 89bbd07e9ddd688df81405151f9c6284fa3367a8 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 23 21:40:21 2008 -0800 + + Remove obsolete XF86_DATE & xf86Date.h + +commit 8dc3a7d6817b7371bbfece1108ef856788256853 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 23 14:59:46 2008 -0800 + + Remove unused CLOG_DATE (leftover from pre-git ChangeLog) + +commit fe05a46f191ebd36251dda7a9703d90c25efec11 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 23 14:55:26 2008 -0800 + + Remove powerpc load/store functions from export list on other platforms + +commit a1b201bcb01e702f8f0a5889a3d49317503b9475 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Dec 23 12:39:38 2008 -0800 + + XQuartz: Use depth=24 instead of FatalError if we can't figure out our depth + (cherry picked from commit 80b65c5b78d125c4ad3620b87b121c9e666299c3) + +commit 86dc660588a615baefb1799d78a501c95a931d77 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Tue Dec 23 18:07:54 2008 -0200 + + Improve sdksyms.c automatic generation (Fix #19245). + + Since it is already parsing cpp output, create a dependency file + in the same process. This will cause sdksyms.c to be regenerated + whenever a sdk header is modified. + This also uses the gmake 'sinclude' directive (don't fail if + included file doesn't exist). This should not cause any problems + given that gmake only constructs are used in several other Makefiles. + +commit 477c32708718f4470ac2e786b2446d7a44e45b9c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Dec 19 08:56:35 2008 +1000 + + dix: don't disable uninitialized devices. + + If a device hasn't been initialized, it doesn't have a cursor yet. So don't + set the cursor to the NullCursor, and don't try to DisableDevice either. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 25aac8b5793caa92116b766d5a9e12dbecdb0290 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Dec 2 16:16:58 2008 +1000 + + xkb: don't treat groups with different no of symbols as identical. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit f141c1b4bb9482f188783dd6f161d3c7960a3329 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Dec 2 14:54:50 2008 +1000 + + xkb: explicitly check for group replication in the core representation. + + Single-group keys may get replicated amongst all groups. Check explicitly for + this case and squash it down to one group. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 70a977c021e107c4fabe46ec2f619be9fb55abeb +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Dec 2 15:36:51 2008 +1000 + + xkb: don't replicate past the number of groups we have. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a157575eeeb523cd43197c5caeb00cb3d56f9988 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Dec 2 13:31:58 2008 +1000 + + xkb: ensure enough symbols for core Group1 replication. + + A single-group key on a multi-group keyboard has to be replicated across all + three groups (see Section 12.4 of the XKB protocol spec). Ensure that there's + enough symbols available to actually do that. + + e.g. a key ABCD on a 3 group keyboard needs to be replicated as ABABCDCDABCD, + hence requiring space for 12 symbols, even if maxSymsPerKey is less than that. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit b5736d237a21d5e65d839c4d213dd3bda5a11e9d +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Mon Dec 22 19:53:14 2008 +0100 + + randr/xfree86: Fix initial gamma computation. + + - The previous version overflowed sometimes. + +commit ba9dc353a60e9a6bba64e854b23271011bff7015 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 21 21:03:59 2008 -0800 + + XQuartz: Don't use keycode 0 to determine !swallow since our most common key to swallow is actual keycode 0 (a) + (cherry picked from commit 33f43a7f03023bfbab25a957cb81fc25b4afa4ca) + +commit f0cdccd1e22198f4f5e1aa0d0617441b79ffbc44 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 21 20:40:36 2008 -0800 + + XQuartz: Update our "screens" when we toggle rootless rather than when we toggle fullscreen + + This old behavior was used as a workaround for the menubar behavior in the older server, + but we handle it better now and need to update our screens when we toggle the rootless + state instead. + (cherry picked from commit 508aa95bc2cd3fdc3dff448ec090919bf807d153) + +commit 8f04a5237384fa97ff960b4607a79b688ea03fc1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 21 14:54:11 2008 -0800 + + XQuartz: Run applications via '/bin/sh -c ...' to support users who expect shell parsing + (cherry picked from commit 67455e716e3ecffd528930479192785958d37988) + +commit 029d255a654eca6401c374d145f63bbb923554b5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 21 14:43:12 2008 -0800 + + XQuartz: pbproxy: Release display notification lock when not needed to avoid deadlock + (cherry picked from commit 22f664ab95a0cae981e9cefad6f075d051583ca5) + +commit b1f166f2981595aea6f8e2a336d6d25436f8a07d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Dec 21 14:42:26 2008 -0800 + + XQuartz: update quoting in case X11.app is moved to a directory with a space. + (cherry picked from commit cc805dc799efa37c8dcefa3db04d87e9b835ffbd) + +commit 2f47bda645eb43c60b71315e8d265190acce481d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Dec 18 09:14:16 2008 -0800 + + XQuartz: Changed X11.sh to allow use of a ~/.x11run as requested by users of alternate shells + (cherry picked from commit b62ed1f8eaf041a946bb591165bb18ee481dedbf) + +commit 83edcc08de4c815c5cbe815f521b3b728441cad6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 17 15:09:35 2008 -0800 + + XQuartz: Get rid of white rectangle bug + (cherry picked from commit 3269959033ed0c675a3a906666454df34086896a) + +commit 1335a300b9cd03208a583acfdb7f7153eaef4ea6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 17 14:43:02 2008 -0800 + + rootless: Make expose_1 static + (cherry picked from commit 60c8d2697036a125ca5381df8e2eaedabad4d242) + +commit 22b2811e6aa0bdbfa6a0682ac862063e52ec0c62 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 17 13:54:53 2008 -0800 + + XQuartz: Name the startup shell script X11 for better compatability + (cherry picked from commit f84613d6fcbbb5f769ee34cff0900353a13693cf) + +commit 82fba7697fbbb6f66cc22424ba99755b99ff482e +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Mon Dec 22 00:33:55 2008 +0100 + + xfree86/randr: Avoid a crash when xf86CrtcConfigPrivateIndex is -1. + +commit 1567b7243f4799808ab93fbd962df14ce3af2d49 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Dec 21 00:08:56 2008 +0100 + + exa: A more correct fix. + +commit 2db7b66863ae6055c3ce13c88b36d620de8a4d75 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Dec 19 23:12:37 2008 +0100 + + exa: a few cleanups + + - Some warnings silenced. + - Some whitespace cleanup. + +commit aedd2f566df585db7a1614f302cc8d3feda54275 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Dec 19 19:10:23 2008 +0100 + + randr/xfree86: Fix a one off error in the panning calculations. + + - Example: mode 1280x1024, panned area 1281x1024 + panned_area.x2 = 1281 + mode.width = 1280 + If you substract 1280 from 1281, then that leaves you with one. + Which is the one pixel that you need to move to actually see the last pixel collumn. + Substracting 1 from this will consistently prevent you from seeing the right and bottom edge. + +commit 332d65ec7a6e94d75efe95d53742f137835274de +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Dec 19 18:59:27 2008 +0100 + + randr: Consider panned crtc's when calculating xinerama screen sizes. + + - This will allow window managers and applications to actually use the panned area. + +commit f2d1de6c2a3e6e50db6d9714c293eb26324fbd3d +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 19 10:27:37 2008 -0500 + + xv: remove useless XVCALL macro + +commit 5a072c55350f4b73d911ea6a2aeddad844924834 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 19 09:51:52 2008 -0500 + + dmx: Fix calloc macro confusion. + +commit 8c488ac3b3990cd203baed7f2127b9bed8aab534 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 18 19:47:49 2008 -0800 + + Fix linking of Xorg with dtrace probes on Solaris + +commit 396433d0da721951e6e7abc02dc3b2f682495154 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 18 18:49:47 2008 -0800 + + Fix sdksyms.sh to work with Solaris/Sun compiler builds + + - Pass $(CPP) & $(AWK) settings from configure to sdksyms.sh + - Only reset sdk variable (tracks if header is part of sdk) if + a filename is included on the cpp # <line-no> <filename> line, + since Sun compilers omit filename when it is unchanged from + previous line. + +commit aea6f19f25e13768b1d09fac4991d6a5e6c2cdac +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 16 17:10:03 2008 +1000 + + xfree86: don't restore the TTY mode if we didn't initialize it ourselves + + Restoring it unconditionally means we restore to whatever tty_mode has as + default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw + mode if allowEmptyInput is off. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Adam Jackson <ajax@redhat.com> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 5d065a889074558634216eebd4bba35a60db9a09 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 18 13:59:36 2008 -0500 + + xselinux: Use xace Xtrans wrappers instead of the now-inaccessible wrapees. + +commit f87e66486c3610c56888915b66ae5ab0af03da8b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 18 13:58:35 2008 -0500 + + xace: Export wrappers around two Xtrans functions used by modules. + + Don't know a better way to do this, since Xtrans isn't a library that + can be linked into modules. + +commit 777408914dbf395e9969e3f34720286e6f740369 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 18 12:35:57 2008 -0500 + + Add xace headers to the SDK when enabled and export the XaceHooks symbol + to modules. + +commit 9e4ef3cfe5ee178c266edd64a8edd767827aa0d7 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Dec 18 15:00:25 2008 -0200 + + Use regex pattern understood by all known awk variants. + + Ubuntu uses mawk by default, but it doesn't understand posix character + classes (which are locale dependent, and this patch uses only valid C + identifiers). + Also make sure awk runs with LC_ALL=C to match the regex patterns. + +commit 3d3c234b434a3443a00c3be9f32c698bcced111c +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Dec 18 16:26:38 2008 +0100 + + randr: add some notes about the stuff that changed in driver ABI 2 + +commit 1b244feb4cf11d1cdba79fbead50035965535552 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Dec 18 16:11:21 2008 +0100 + + randr: check for malloc failure + +commit 21a2df9f359584e634dc12d8602401d54defd7db +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sun Nov 2 20:46:44 2008 +0000 + + Xming,Cygwin/X: Fix crashes when using the DirectDraw '-refresh rate-in-Hz' option in -fullscreen (#11128) + + fd.o bugzilla #11128 + + Fix crashes when using the '-refresh rate-in-Hz' option in -fullscreen mode and using a DirectDraw engine. + On failure (typically 0x80004001 DDERR_UNSUPPORTED), use the default refresh rate for the driver, instead of the + entered value. + + Also fix some nearby error reporting + + Copyright (C) Colin Harrison 2005-2008 + http://www.straightrunning.com/XmingNotes/ + http://sourceforge.net/projects/xming/ + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit b0ed1567c1782041cf3d14ec6dd4d622915c7d0c +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Dec 17 17:16:02 2008 +0000 + + Xming, Cygwin/X: Tidy up warnings, headers and unused variables (#11132) + + Tidy up various warnings, include headers and unused variables, etc. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 15c4a6e088039e14b4f2387ff204cb5448916b39 +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Wed Dec 17 16:44:07 2008 +0000 + + Xming, Cygwin/X: Fix crash in function winMultiWindowGetTransientFor() (#11147) + + The function winMultiWindowGetTransientFor() crashes, due to a bogus pointer + dereference, but this fact was previously hidden by the function not being called! + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 08a3d6928c87032998b6113d67f69b79b09eecee +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 16 14:19:12 2008 +1000 + + dix: Allocate the space for the DCCE when the last SD is removed. + + This still doesn't fix reset the MD's classes (a TODO that's been here for + ages), but at least we don't segfault anymore when detaching the last SD. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 689be0cb4b259840208c17f974066a942196793a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Dec 16 14:19:38 2008 +1000 + + dix: set the correct length in CreateClassesChangedEvent. + + Fallout from aeff14d5f208d02f211b8b2a1a98999624e8c2cf. Yes, we don't malloc + anymore because we are inside a SIGIO and the memory is already there anyway. + But we still need to set the event length correctly, otherwise + mieqEnqueue/mieqProcessInputEvent don't know how much memory to copy. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1001403301001fcc84ce6833938590956df40d2a +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Dec 18 00:19:06 2008 +0100 + + Forgot to fix a comment. + +commit 9fa15bef59881bdcf087889f16ab3c8d953da8f1 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Dec 17 23:42:30 2008 +0100 + + randr: some improvements, fixes and crtc abi bump + + - Add active field to crtc. + - Set gamma (only) whenever a crtc becomes active. + - Check for xf86_config being NULL. + - Increase crtc abi to 3. + - A few other fixes. + +commit bf65523ab0b39774f07a7ae478ff3f5653fad469 +Author: Joe Krahn <jkrahn@nc.rr.com> +Date: Sun Nov 2 20:17:03 2008 +0000 + + Cygwin/X: Fix for mis-aligned icon data creates bad background masks (#4491) + + fd.o bugzilla #4491 + + Transparent icon backgrounds appear with black stripes as mask data is incorrectly aligned. + Modified the icon DDB bitmap data alignment to 16 bits + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 91f73b79b7ae64e5b846d1efeb470bb61a913720 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Dec 17 16:56:26 2008 +0100 + + randr: Improve per-crtc gamma support. + + - The Gamma values from the monitor section are now used during initial config. + - The old colormap system is disabled when gamma set hook is available. + - Gamma values are now persistent for the lifetime of the xserver. + - This requires no driver changes and should be driver ABI compatible. + +commit 1556815d34cecb4b4b62d2a4ce813b1435a937ec +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:18 2008 +0000 + + Cygwin/X: Initialize native HWND atom when built !XWIN_MULTIWINDOWEXTWM + + Fix the native HWND atom identifier to be initialized correctly, when built without external WM support + + This is neccessary for native window naming to work correctly in multiwindow internal WM mode. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 92082a0a00f05ecdc90814a8104828853c9c8f29 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:15 2008 +0000 + + Cygwin/X: update to use standard DPMS stubs + + Bring Cygwin/X up to date with DPMS API changes by using the standard stubs + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 2850f26bb2999ef3fb2a10adb80fe358463aecb5 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:14 2008 +0000 + + Cygwin/X: update for changes to shadow framebuffer + + Bring Cygwin/X up to date with the change to damage-based shadow framebuffer. + + Register the screen bitmap as the shadow framebuffer after screen resources + are created. + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 35d76028304f910edeaf642376df71b8134ec02c +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:13 2008 +0000 + + Cygwin/X: enqueue a pointer motion event on mouse movement + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 816e0d243df068bc06d328874b5655d4530fe16a +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:12 2008 +0000 + + Cygwin/X: update for changes in mieq API + + Bring Cygwin/X up to date with mieq event API changes + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit bca7483c4e95ad450fb09048a3b85bb3056a0518 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:11 2008 +0000 + + Cygwin/X: update for MPX device changes + + Bring Cygwin/X up to date with MPX device API changes + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 829a8a970dd17623ef3cb5022d34190744f74741 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:10 2008 +0000 + + Cygwin/X: update for MPX cursor API changes + + Bring Cygwin/X up to date with cursor API changes + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit d61e902aab92c262e6c8ee9cd70aec4493cf6cae +Author: Francis Giraldeau <francis.giraldeau@revolutionlinux.com> +Date: Wed Dec 17 09:49:39 2008 +0200 + + Don't log audit messages when -audit 0 specified + + make the auditTrailLevel check more general and don't log when not + using DTRACE and -audit 0 is set. + +commit 295a3fa721ee2f2226891de308c0c4b0ee26fe72 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Dec 17 02:04:12 2008 -0200 + + Ensure symbols required by swrast_dri.so are visible. + +commit 6d8ea5104cf97dbf64612f58fc06f94f869ed5ec +Author: Colin Guthrie <cguthrie@mandriva.org> +Date: Tue Dec 16 17:44:27 2008 -0500 + + Fix compilation with -Werror=format-security + +commit 1bb5a919f4bf38ac96c73077021b0cdc82965f31 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Dec 16 13:46:59 2008 -0500 + + config: Add vboxvideo and tga to the magic driver list + + Also sort the list while I'm here. + +commit 8511a964f81b3b06a526f0fca4232afb2152f405 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Dec 16 18:21:20 2008 +0100 + + randr: Update EDID_ATOM_NAME to reflect RandR 1.3 name change + +commit a058192d970f7417b06334aa666c17e9891795c6 +Author: Owen W. Taylor <otaylor@redhat.com> +Date: Wed Oct 22 16:12:53 2008 -0400 + + Xephyr: Fix crash with control-shift and GLX (#18185) + + When we are looking up the screen for an event, we need to take + into account the fact that the event may have been delivered to the + "peer window" that we create when implementing GLX. Since we only + ever create one such window per screen, just add a single peer_win + field to EphyrHostScreen. + +commit 6e85a8304b50c0bfd16a400a05d257f0168fb99b +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Sun Nov 2 18:27:09 2008 +0000 + + Cygwin/X: build machinery fixes + + The Cygwin/X build has been broken for a long time, probably since modular X + This patch fixes up configure/makefile and some general build issues (#18568) + + Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> + +commit 7aa29b9d66c3cd0f8af4fafbe92efd0c0556d225 +Author: Robert Noland <rnoland@2hip.net> +Date: Tue Dec 16 00:07:42 2008 -0500 + + Support -sharevts on FreeBSD + + Bugzilla #11179 + + Submitted-by: Nathan Whitehorn + + Signed-off-by: Robert Noland <rnoland@2hip.net> + +commit 063eb6743cd0d98dd52d1a9559b804381ee5144d +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 15 19:53:45 2008 -0800 + + Patch brown-bag fix for bug 19017 (scrn->virtualX/virtualY 0 before PreInit) + + When a driver uses a crtc during device detection, the scrn has not yet been + configured and virtualX/virtualY are still zero. This caused the X server + to try and allocate a shadow frame buffer, which couldn't work. + + Detect this by checking for zero virtualX/virtualY values. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit fde2f961035609cfff8761ef1e0f23e6a9761be2 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 15 11:39:24 2008 -0800 + + Use scrn->virtualX/virtualY in xf86CrtcFitsScreen. Fix bug 19017. + + pScreen->width/height are not initialized when doing initial mode setting, + which makes this function incorrectly fail. Using scrn->virtualX should work + in all cases though. + + Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset + for output probing, long before the screen array is initialized; that was + caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen + could find the right values. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 29a5b0596b396d3e4a8a014cacd3e3ef77467ab7 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 15 11:38:00 2008 -0800 + + When disabling SIGIO tracking, use SIG_IGN instead of SIG_DFL. + + This avoids a race condition for drivers which mis-order the fd close and + signal disable. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 1ba4cbb15919759aadd71960c5c057af9ba94fe3 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 15 11:36:43 2008 -0800 + + Clean up rotation data when crtc is turned off + + The shadow frame buffer and other data used for rotation need to be freed + when the crtc is disabled, not just when rotation is disabled. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 2a61397d17339113b9e37995b06ca543589814ce +Author: Cooper Yuan <Cooper.Yuan@amd.com> +Date: Mon Dec 15 10:29:34 2008 -0500 + + Fix typo in xf86PickCrtcs() + +commit 3db60add6671f766f9360e7d03492dfd51eba225 +Author: Jon TURNEY <jon.turney@dronecode.org.uk> +Date: Mon Dec 15 12:42:10 2008 +0000 + + Cygwin/X: Update the native icon to one based on the X.Org logo + + Update the native icon for the X server to one created from the X.Org logo by Colin Harrison. + +commit 450739efa904a0fce5024372da7236bb7b84b67a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Dec 13 00:45:27 2008 -0800 + + XQuartz: Updated menu item ordering for better HIG compliance + (cherry picked from commit 4c9bb241ce5fb856fab20ae96fa89bd2b71ef242) + +commit aee27be2785d8b09ac10f5be040b4d573190de0e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 10 23:04:30 2008 -0800 + + XQuartz: Tiger fix, don't call Xplugin code in the Appkit thread if Xplugin isn't threadsafe. + (cherry picked from commit 748d9e5bd756513d42c4046f3b31e1fdc55bccb6) + +commit a939368ab8140d48c1da4ba0bb229d13b221189c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Dec 15 03:18:13 2008 -0800 + + mi: Reuse memory in mieqProcessInputEvents rather than making excessive calls to calloc() + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit f1c9b5ab230cbb4124d8d476ae4886d05022adcb +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Sun Dec 14 18:58:33 2008 -0800 + + GLX: Changes resulting from changes to Mesa generator scripts / data + + Several recent Mesa commits (listed below) make modifications to the + protocol generator data and scripts. This commit represents the + changes to the generated files resulting from the previous changes. + + - 0f73302d24f4201813da2939742c5bcb6964b3b1 + GLX: Fix protocol for glTexSubImage#D + + - 1709ab01ef24279c782e420568e9257b4b92b224 + Return 0 as the request size when the pixels parameter is NULL + + - 63cca2ba10ce7dcc8481cfa4be3872dfc269dded + GLX: Include glapi.h before glapitable.h + + This is the server-side part of the fix for bugzilla #11003. + +commit 6383bc93b2ae76361a58653bc7e291df0d6ddfec +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sat Dec 13 15:44:52 2008 +1000 + + dix: Init DeviceEnterLeave event's type before FixUpEventFromWindow (#19064) + + X.Org Bug 19064 <http://bugs.freedesktop.org/show_bug.cgi?id=19064> + +commit 49d38ab2328c409b2a98465b52677af057121513 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Dec 2 15:09:57 2008 -0800 + + Warning fix: Remove dead glXDisp{,Swap}_DrawArraysEXT definitions. + + Signed-off-by: Eric Anholt <eric@anholt.net> + Acked-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 2c5bfffc832e3818bbf0c0a96522865ce1ef2653 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Dec 2 14:59:04 2008 -0800 + + Warning fix (GL likes to call strings GLubyte * instead of char *). + + Signed-off-by: Eric Anholt <eric@anholt.net> + Acked-by: Ian Romanick <ian.d.romanick@intel.com> + +commit 7be6520d94df874c6bbd46d06a1830a12d0967f2 +Author: Stuart Bennett <sb476@cam.ac.uk> +Date: Fri Dec 12 00:08:44 2008 +0000 + + dolt: allow older versions of bash to compile the xserver (#19031) + + Signed-off-by: James Cloos <cloos@jhcloos.com> + +commit aeff14d5f208d02f211b8b2a1a98999624e8c2cf +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Nov 25 20:23:50 2008 +1000 + + dix: don't alloc in ChangeMasterDeviceClasses. + + We mustn't realloc as we are inside a signal handler. With + SetMinimumEventSize, this code should never be hit anyway, as the event list + should have the required memory before this code is hit. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit fb2a8d0e59a3d187255538f6add22ec67551507a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 8 15:58:15 2008 +1000 + + Xi: silence compiler warning + + Don't mix declarations and statements. + +commit d961abb59f0a8bee4bd11b1540aa43ff83cddbb8 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Dec 11 15:54:15 2008 +1000 + + dix: fix compiler warning (mixing declarations + statements) + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit cb95642dc8edebb2935dd471f8b339cb98aa8481 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 28 22:28:32 2008 +1000 + + Remove #define NEED_EVENTS and NEED_REPLIES + + A grep on xorg/* revealed there's no consumer of this define. + + Quote Alan Coopersmith: + "The consumer was in past versions of the headers now located + in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, + all the event definitions were only available if NEED_EVENTS were + defined, and all the reply definitions required NEED_REPLIES. + + Looks like Xproto.h dropped them by X11R6.3, which didn't have + the #ifdef's anymore, so these are truly ancient now." + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 920b7622be4a68ebb5d8432f55c5362fbe964fce +Author: Simon Thum <simon.thum@gmx.de> +Date: Tue Nov 25 14:28:26 2008 +1000 + + xfree86: dump the ptraccel filter setup to the log on init. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit fbb57a2c54b141ccbb50833143b0b7cb2c4cb903 +Author: Simon Thum <simon.thum@gmx.de> +Date: Tue Nov 25 13:43:28 2008 +1000 + + dix: ptraccel - Add GetAccelerationProfile() + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit beb749c87f383a62172a9ffa36373438e7a12d8e +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 11 17:04:37 2008 -0500 + + Fix syncsrv.h guard define + +commit 9fba808b4f43f5dc69d85a48fa40cb83dd4d9f9d +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Thu Dec 11 13:22:53 2008 -0500 + + xsync: Prototype fix. + +commit dce887ff53222652c397bc96a1dd3566f5847745 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 11 13:16:02 2008 -0500 + + xsync: build fix + + argh protocol header disaster + +commit d41b8960be8ad316504ef5657c0abfe6d76d3b5e +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 11 18:48:02 2008 +0100 + + randr: Fix initial panning border copy + + Thanks to Julien Cristau for finding this. + +commit fd77ce9f884f5ac4d36736f3a99ba86101f133ea +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 11 17:51:20 2008 +0100 + + randr: Oops, miscalculated panning rectangle's coordinates + +commit f8e52f1b6d7c59d007de99a1c9c69c053d4f3cbe +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 11 16:48:40 2008 +0100 + + randr: Update initial screen size if panning information is present + +commit 24d6b7d1c5fc5d07c2eb06a9fc4406e393d59b17 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 11 16:48:11 2008 +0100 + + randr: Fix error message for bad panning config + +commit fdbbe65a7e777b7777bfae5a161efb89d4fb9a8d +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 11 14:56:51 2008 +0100 + + randr: Add monitor option "Panning" for initial panning configuration + +commit 27261a950d91c352eac25a3036656c3e4f81fb12 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Dec 11 14:43:04 2008 -0200 + + Modify sdksyms.sh to receive $top_srcdir as first argument. + + If the basename of header file processed by cpp matches $top_srcdir, + check for extern symbols in the output, and add to the xorg_symbols + vector. + Possibly a better solution then using this script would be to somehow + tell the linker to not drop any symbols from the binary being generated. + +commit 1f4fb0225b278d1cf4145aebeb0bdd23dc8f62d5 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 10 16:13:20 2008 -0500 + + xsync: Fix wakeup storm in idletime counter. + + Wakeup scheduling only considered the threshold values, and not whether + the trigger was edge or level. + + See also: + https://bugzilla.redhat.com/show_bug.cgi?id=474586 + http://svn.gnome.org/viewvc/gnome-screensaver/trunk/src/test-idle-ext.c?view=markup + +commit 1a99110f0c221b79045ea26d61c4a1ec1e0d7341 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 10 14:18:59 2008 -0500 + + xsync: ANSI cleanups + +commit e0d8f6a8084a3fe6c549c1dee11e4502e316c382 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 10 13:32:04 2008 -0500 + + xsync: Use a local header for server API definitions + +commit 1208a1dbcaecbc218a77bf51068f9c0c768e16c5 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 10 11:47:35 2008 -0500 + + xsync: remove cast abuse. + +commit 119d9c46e841f5fa35610f557e6fa1ec58587c24 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 10 01:56:01 2008 -0800 + + XQuartz: Fix path to executable + (cherry picked from commit 7e9d3698e070a0c63dd2556651373c3aca58e2fe) + +commit c46b564c47fde3474e948aa1b188a975836cba47 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Dec 10 00:00:29 2008 -0800 + + XQuartz: fixed make dist + (cherry picked from commit 2d52367ab92429e58596d1a1ed3ef52a0a38a7aa) + +commit 23156a21d8e2f1be7d19d69cb91dae1b885ef671 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Dec 9 23:48:18 2008 -0800 + + XQuartz: Make debugging output for invalid depths a bit more detailed + (cherry picked from commit 609fb166b7062c76f0561df12ffe893811f6ac8f) + +commit 76351d2faf9ceb79aaa00b374c203b8b279c58f3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Dec 9 23:47:32 2008 -0800 + + XQuartz: Avoid using login /bin/sh blech. Just use a bash script to start the app, so it will inherit the right environment + (cherry picked from commit f4b7ad9cc6b0c99fc7ee8516c4bf858ece938148) + +commit e5ce6e198f4c245f4dc840c5e9e90a7ef80fb6e9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Dec 8 21:59:49 2008 -0800 + + XQuartz: unset DISPLAY if we didn't get a launchd socket handoff + (cherry picked from commit b959727f38733009c6381cc8ca06b5984257bdac) + +commit ecaaf0462d6c70cabfcaf6868a526e5415505e2c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Dec 8 21:00:11 2008 -0800 + + XQuartz: unsetenv(DISPLAY) if we're not org.x.X11 + Also some prefix related fixes. + (cherry picked from commit fd459e96581a883e30323c840b71004aa0747169) + +commit ea94995982d1cc585768d52fec75cae018457fa5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Dec 6 12:01:28 2008 -0800 + + XQuartz: Removed some debug spew + (cherry picked from commit 370dcf11b360b87aa24cace35eb615419057fda0) + +commit 86c64ddf21763972aa7fc8c5770259123c9907b3 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 8 17:42:47 2008 -0500 + + randr: clear primaryOutput when the output is deleted + +commit fe65f400ed16cb39db8c9518b9446f590c34db1a +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 8 17:40:07 2008 -0500 + + randr: use primary output for RRFirstOutput() + +commit cdcb516e561e2f65eb2fa523ca001c57674d5caf +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 8 17:37:17 2008 -0500 + + randr: Mangle GetScreenResources sort order based on primary output + +commit d7b316e82bc7051f8829b4f4a640f50ae91c2db9 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 8 17:28:55 2008 -0500 + + randr: Mangle compat Xinerama reply based on primary output + +commit 9d58d2a319059989ccdfa758f586149ccdc16df6 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Dec 9 10:51:37 2008 -0500 + + randr: Add [GS]etOutputPrimary + +commit d281866b74f7067f2704c278fe9720eafc0ee5ef +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Dec 1 21:20:48 2008 +1000 + + mi: Clean up CopyGetMasterEvent, re-use the memory. + + Alloc an EventList once and then re-use instead of allocing a new event each + time we need a master event. + There's a trick included: because all the event processing handlers only take + an xEvent, init a size 1 EventList and squash the events into this one. + + Events that have count > 1 must be squished into an xEvent array anyway before + passing into the event handlers, so we don't lose anything here. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Acked-by: Daniel Stone <daniel@fooishbar.org> + +commit 0b4fef6337d88ae8ef05b8b73941350a9007565c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 10 11:35:09 2008 +1000 + + dix: move MAX_VALUATOR_EVENTS into include/input.h + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b36c398b11321a908cfe217108b26a32ffc1d850 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 8 16:41:20 2008 +1000 + + dix: purge dead device-based window access code. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit aa71ac1dd4697738752c73fe4c106b665ea3ec25 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Dec 10 00:32:34 2008 -0200 + + Add dependency tracking to sdksyms.c and export composite wrapper. + + Thanks to David Miller for noticing a make problem with sdksyms.c + not being regenerated when sdksyms.sh is updated. This is not yet the + best solution; automake generates dependency for sdksyms.o, but the + build really should also regenerate sdksyms.c when sdksyms.o needs to + be regenerated. + Export the symbols in miext/cw/cw.h. These symbols are in libxaa, and + at least the nvidia driver uses them. Maybe cw.h should be installed + in the sdk. + +commit 090f63123975220819d531f569df6e5787607ec6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 8 11:53:20 2008 +1000 + + mi: always update the sprite for master devices. + + Follow-up to 9ce995373e4a. This re-enables cursor rendering if the MD is + controlled through software (e.g. synergy). + + Reported by John Tapsell: "I use Xorg with no mouse attached, but use synergy + to control the mouse. The commit means that I no longer have a visible mouse + cursor. The mouse cursor is still 'there' in terms that I can click buttons + etc with it, but it's just not visible." + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 7c8720c1433d2c3b85bbf4b811cc54c2df4c0080 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Mon Dec 8 22:11:50 2008 -0200 + + Correct wrong symbol reference on sparc. + + The awk script was incorrectly referencing the struct name, and + not the struct variable. + Also added some comments to sdksyms.sh, for the reason it generates + the "symbol table" and add a message to the generated file, telling + is was automatically generated. + +commit 58a27d2932164e43c0db42b1286ec2f95250b420 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 8 16:28:00 2008 -0500 + + Default to x86emu even on i386 linux + + vm86 mode is a bad idea anyway, and using the emulator everywhere + means we get a consistent set of bugs. + +commit bbf811514d3cdf84790bad5b852942a4e636902b +Author: Sascha Hlusiak <saschahlusiak@arcor.de> +Date: Mon Dec 8 12:24:39 2008 +0100 + + ddxCtrls.c: XkbDDXUsesSoftRepeat always returns 1 now + + We'd like to do soft repeat in the server for all keys. Remove obscure check, that'd + prevent the server from autorepeating when delay is set to exactly 660ms and rate is + set to exactly 25 (interval=40). + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 8c1dd40a04693f09f4fcea6e7f905af34c7589de +Author: Benjamin Close <Benjamin.Close@clearchain.com> +Date: Mon Dec 8 14:49:38 2008 +1030 + + Don't use gnu specific extensions to awk when builing symbols + + Traditional posix awk doesn't know about \W and whilst we check that + awk exists in configure.ac we don't check which awk we are using. + This corrects symbol generation for posix only awk. + +commit 39db182b637041255ed6dac739ff77c8e4e07c30 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Dec 8 12:12:39 2008 +1000 + + xfree86: init EQ before trying to initialise the devices (#18890) + + The kbd driver may send events during device initialisation, and these events + need the EQ set up already. + + X.Org Bug 18890 <http://bugs.freedesktop.org/show_bug.cgi?id=18890> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 78a62d7713c708d067d8824ec41b0a0225c1997f +Author: Tom Jaeger <ThJaeger@gmail.com> +Date: Mon Dec 8 11:38:12 2008 +1000 + + Xi: XIGetDevice needs to ignore the MORE_EVENTS flag. + + Reported in X.Org Bug 18882, Comment 5. + <http://bugs.freedesktop.org/show_bug.cgi?id=18882> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ee1a6c28418a6dad6c89f79a994f27bfbaa77368 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Dec 5 10:12:57 2008 +1000 + + dix: fix calculation of valuator events. + + Follow-up to 4971315296cb. countValuatorEvents was copied from GKVE where it + was obviously broken but nobody noticed. GPE had the correct version, but that + one got lost during de-duplication. Restoring the correct calculation - if we + have 6 valuators, we want 1 valuator event, not 2. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 13de7511b17b57a28668e1a60b196ccfe61dbcbe +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Dec 4 10:30:02 2008 +1000 + + xfree86: Only use the evdev ruleset on linux. + + As suggested by Julien Cristau + + This is an follow-up to + commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a + Author: Peter Hutterer <peter.hutterer@redhat.com> + Date: Wed Dec 3 14:24:25 2008 +1000 + + Let the DDX decide on the XkbRulesDefaults. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Acked-by: Julien Cristau <jcristau@debian.org> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 8e3279134987a45f2a89c963ef2d33bc3d3c8179 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Dec 4 09:47:25 2008 +1000 + + xfree86: fix compiler warning (use of uninitialized variable) + + drv and idev are only set for SDs, but are only dereferenced for SDs too, so + initializing them to NULL is safe. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 22d4ddcc3d63b7fbf2a23f5162075e4ee06db781 +Merge: d2dad38 c3bf15b +Author: Matthieu Herrb <matthieu@crux.(none)> +Date: Sun Dec 7 23:56:15 2008 +0100 + + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver + +commit d2dad384f5725a36e593fd75f03d712f53b20620 +Author: Matthieu Herrb <matthieu@crux.(none)> +Date: Sun Dec 7 23:52:26 2008 +0100 + + Fix build in separate build directory. + +commit c3bf15ba85fd3ab2e1fe809428b75bf34db25cc8 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Dec 7 18:52:23 2008 -0200 + + Require macros 1.2.0 or newer for XORG_CHANGELOG and XORG_CWARNFLAGS. + +commit 5a8068b390b7d30eb526e954443d8e43a199b971 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Dec 7 18:31:32 2008 -0200 + + Convert libx86emu.a to a "libtool convenience library". + +commit ed4a17274015ecd8040ae85bd5cd9d1dbcc9460a +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Dec 7 14:59:25 2008 -0200 + + Export some symbols from libxf86config when installing it. + + These are private symbols, but used by the X Server. + The newly exported symbols were not added to the sdk headers. + Optionally, libxf86config could be compiled without hidden symbols + when being installed. + Thanks to Maarten Maathuis for noticing the problem. + +commit bf4c29ab48a166eb158cf4be7c597982d65ef214 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Dec 7 05:12:41 2008 -0200 + + Correct xf86acpiDisableFlag symbol. + + It is declared as + <hash>ifdef HAVE_ACPI + Bool xf86acpiDisableFlag = FALSE; + <hash>endif + in hw/xfree86/common/xf86Globals.c + but not protected by the ifdef in the sdk header xf86Priv.h, what + caused a build failure in the tinderbox, due to the address of the + symbol being taken (to ensure it is available) in sdksyms.c. + +commit b1dac41fb3853ca8182048ea57b88b6e84ecceb3 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Dec 7 02:22:19 2008 -0200 + + Use libtool convenience libraries and better "symbol" table. + + All .a libraries were converted to .la, and instead of linking the + Xorg binary with a mix of .a and .la, and adding some libraries more + then once in the command line, etc, now it generates a single libxorg.la + from all the required convenience libraries, and links with a dummy + xorg.c (that should usually be the file with the main function...). + This removes the requirement of some things like libosandcommon and + libinit, that existed to circumvent problems when linking multiple + .a and .la in the final Xorg binary. + + The "symbol table" is now generated dynamically, by a shell script, + with an embedded gawk parser that parses cpp output. The new file + sdksyms.sh is generated by hand by analyzing all Makefile.am's and + making it create a sdksyms.c file, that includes all sdk headers that + will add symbols for the Xorg binary. Module headers aren't read, and + a in 2 files it was required to add a "<hash>ifndef XorgLoader" around + declarations shared between the Xorg binary and libextmod. A few + other changes were added to other sdk headers, like preventing + multiple inclusion, or including other headers to satisfy dependencies. + + This should be a lot more portable, and better (hopefully properly) + using libtool to generate convenience libraries. + +commit ccd2c668c13863ed704f86b29fc6b3ee628e56a2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Dec 6 14:11:52 2008 -0800 + + XQuartz: darwinPointer reports the actual pixel position now rather than a relative position + (cherry picked from commit a41e7f75decd340d064fdc0d2c4fe6c88d7dbc82) + +commit 7ebd0c7e8d42a13079957d9bacf5cb30d7855a59 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Dec 5 12:42:31 2008 -0800 + + XQuartz: Corrected name/command labels in the customization widget + (cherry picked from commit a689c23f17eb445c36b97eb617ef4b8bd157985f) + +commit 027ff97a1354ab4c83fecb615f6bc2a6b739b871 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 5 12:00:08 2008 -0800 + + Make sure _X_EXPORT is defined in edid.h + + Fixes build error in xf86-video-intel utilities + +commit 466b0fca9ba5d5e7fb36e47a6d1bd60218f51c75 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Dec 5 17:01:09 2008 -0200 + + Add back a simplified version of the loader static address tables. + + If not taking the symbol addresses, linkage will break badly, as not + all symbols will be present, and it also requires changing library order, + and/or making some changes like the "libosandcommon". + + This table should be modified to be generated automatically, as + it is required to "fool" the compiler/loader into adding all required + symbols to the X Server. + +commit 44bef8b850c5a78a3d3eca5f0d92b71bdd0a87e2 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Dec 5 15:37:15 2008 +0100 + + randr: Update SProcRandrVector for panning + +commit 44c8c3cf7de589fb8e987f4ab931294eaf0b405f +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Dec 5 04:26:57 2008 -0200 + + Remove static symbol address tables in hw/xfree86/loader/*sym.{c,h} + + Those tables were once used to decide what symbols are visible to + modules, but they were outdated. The only real usage was that, since + it was taking the address of symbols, linkage should fail if the + symbols were not available. + Now the proper way to make symbols available to modules should + be to use the _X_EXPORT macro, or not compile with hidden symbols, + so that all symbols would be available. + All symbols in the tables were revised to ensure they are exported, + and only symbols that were not exported are ClientSleepUntil() and + DuplicateModule(), that were not in the sdk for quite some time + already, and should not have any users outside of the X Server + (and/or builtin modules). + +commit 091a50d1260c70055aba1fa6a2d1b1a36de1114e +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Dec 4 18:23:25 2008 -0200 + + Move _X_EXPORT attribute to header file. + + The attribute should be set on header files to make it easier to + manage what symbols are available to modules. + _X_EXPORT should be used in sources only for special cases, like + symbols that must be visible by non video/input driver/modules but + should not be "advertised" in the sdk. + +commit e5ab9e66628cde081757cf2a1013a78e927a622e +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 4 18:13:40 2008 +0100 + + randr: Allow panning to be disabled per axis + +commit bad118ace6c5bae5a5ed8a35129c90c38f1c1932 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 4 16:55:14 2008 +0100 + + randr: Rework panning area verification + +commit 219c26ce0c65625d55cfd943ec66fe94a1a0ddfd +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 4 16:28:40 2008 +0100 + + randr: Don't change panning parameters if verification fails. + +commit 18a8bac1a1567b6215928f96870554ea63f39aab +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 4 16:30:38 2008 +0100 + + randr: Rename pan() to set_origin(), and xf86CrtcPan() to xf86CrtcSetOrigin() + +commit 825b2c2f4a59ac4852f90bbbddf18ab832297fdd +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Dec 4 16:11:21 2008 +0100 + + randr: Nuke config-timestamp for panning + +commit eeeb98d1df59baaaec954b6318d788a37e388d11 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Nov 28 17:51:20 2008 +0100 + + randr: Protocol bits for panning support + +commit b929d721efdb17bcc94b9984c4f34d0df3d267d5 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Nov 28 17:49:31 2008 +0100 + + randr: Panning support + +commit 834cbc16f3eb539704faade7bff347b161ce69d9 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Nov 28 17:39:23 2008 +0100 + + randr: Crtc interface update for panning support. + +commit a475eb9feec75e9ce1e316da0f1679acd7dd3aa8 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Nov 28 17:38:52 2008 +0100 + + randr: Weird enough, crtc->version was never set upon creation. Fix that. + +commit 9db84fac0cc767e23986223d22bc085cde0cc86f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Dec 2 14:54:10 2008 -0800 + + Removed unised option from configure.ac for launchd + (cherry picked from commit 87e4de0a9a8af6e5e0cbba74e585761f1160a6ab) + +commit fa4f2527a5002711fe47c02b14097032fd845dc4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Dec 2 14:53:21 2008 -0800 + + XQuartz: pbproxy: Simplify linking + (cherry picked from commit 909cc5c4dca0f63e90505575bbd454b46a4670cc) + +commit 126d8a4c8a72b039903023dce0da64b251080e1d +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Dec 4 02:43:29 2008 -0200 + + Update .gitignore. + + Add files left by make distcheck and remove files that no longer + are generated. + +commit 9826b95c198e74f89680cc247b9bd9dd884d72be +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Dec 4 02:05:05 2008 -0200 + + Correct make distcheck by removing dolt files. + +commit 5dbe70dd52fd8daf8d0797951cc5a758d2c3b44c +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Dec 4 01:57:46 2008 -0200 + + Remove dummylib. + + Only cvt required it, and only used XNF{,c}alloc + via xnf{,c}alloc macros. + Based on patch by Eric Anholt. + +commit f841d4e3cccbde02e91c948f5ffb9e32c8c3b3cc +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Dec 3 23:02:03 2008 +0100 + + Move RELEASE_DATE closer to AC_INIT so it's more likely to be updated + +commit 75b02dd0be2ef64c0f8e3138c90b5c5e48b17913 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Dec 3 14:46:30 2008 -0200 + + Include <X11/Xfuncproto.h> if _X_EXPORT is not defined. + +commit dd128ddcdcbe254a9cdd973590f6a979a7f0427e +Author: Timo Aaltonen <tjaalton@cc.hut.fi> +Date: Wed Dec 3 18:40:29 2008 +0200 + + If AEI is on, disable 'vmmouse' in addition to 'kbd' and 'mouse'. + + Signed-off-by: Timo Aaltonen <tjaalton@cc.hut.fi> + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 0b5ecabfb803cd820338fb0364521fe39b05578b +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Nov 26 21:19:55 2008 +0100 + + randr: add swapped dispatch for RR[GS]etCrtcTransform + + Fix a memory leak in ProcRRGetCrtcTransform() while I'm at it. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + Cc: Keith Packard <keithp@keithp.com> + +commit 110a71d11ab7a1a55a6a24d792457fdef0b0746d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Dec 3 11:22:38 2008 -0500 + + Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found. + +commit fd2d40b7ec5d685dac55453eb1f2da672dc83126 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Dec 3 11:31:48 2008 +1000 + + Xi: change XIUnRegisterPropertyHandler to XIUnregisterPropertyHandler + + CamelCase can be taken too far, and AFAICT there's no consumers of that + function yet anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 49f77fff1495c0a2050fb18f9b1fc627839bbfc2 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Dec 3 05:43:34 2008 -0200 + + Rework symbol visibility for easier maintenance + + Save in a few special cases, _X_EXPORT should not be used in C source + files. Instead, it should be used in headers, and the proper C source + include that header. Some special cases are symbols that need to be + shared between modules, but not expected to be used by external drivers, + and symbols that are accessible via LoaderSymbol/dlopen. + + This patch also adds conditionally some new sdk header files, depending + on extensions enabled. These files were added to match pattern for + other extensions/modules, that is, have the headers "deciding" symbol + visibility in the sdk. These headers are: + o Xext/panoramiXsrv.h, Xext/panoramiX.h + o fbpict.h (unconditionally) + o vidmodeproc.h + o mioverlay.h (unconditionally, used only by xaa) + o xfixes.h (unconditionally, symbols required by dri2) + + LoaderSymbol and similar functions now don't have different prototypes, + in loaderProcs.h and xf86Module.h, so that both headers can be included, + without the need of defining IN_LOADER. + + xf86NewInputDevice() device prototype readded to xf86Xinput.h, but + not exported (and with a comment about it). + +commit 0b8f8b24f718820a72ebdc52423c2e6a44e848c5 +Author: Stuart Bennett <sb476@cam.ac.uk> +Date: Tue Dec 2 22:52:53 2008 -0800 + + xf86Cursors: xf86_reload_cursors shouldn't unconditionally show hwcursor (#14820) + + Also, no need to call ShowCursor when SetCursorPosition already does it + Based on a previous patch by Maarten Maathuis + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Dec 3 14:24:25 2008 +1000 + + Let the DDX decide on the XkbRulesDefaults. + + Rather than assuming rules in the CoreKeyboardProc, init the default rules in + InitCoreDevices, then re-use them later. + + In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether + we'll load kbd or evdev. + + If we create a new MD, use pc105,us as default and re-use the rules file used + previously. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 463e02e7de5da3e582a3a049110a476713c7210e +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Dec 3 15:06:37 2008 +1000 + + xkb: Allow NULL as rulesFile in XkbSetRulesDflts. + + If no rules file is given, simply re-use the previous one. If no RF is given + the first time this function is called, use the built-in default. + This includes fixing the built-in default to something that actually exists. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit e670fd889607fa712876218882cd4a9b46937661 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Dec 3 11:55:13 2008 +1000 + + dix: fix GetMaximumEventsNum(), may return a DCCE event too. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 85d84c7cf2d368d1803dc2cdd03d6c9df8cc0430 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Dec 2 17:33:43 2008 -0800 + + Fix GLX after 180bad84774493d48f2793a6281d825560944863. + + Sigh. + +commit 4a61ad427c634bcc38a31ce0f14ff5c2d3f706c7 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 2 14:35:45 2008 -0800 + + Update sample xorg.conf file + +commit c1db925d10fd37077bed90612ed95c3fd20cd2e2 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 2 14:32:48 2008 -0800 + + Add atKeynames.h to libdmxinput_a_SOURCES so it's included in tarballs + + Reported by geearu in #xorg-devel + +commit 8561514574b3540c729bcc3acca9c943adcdc778 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 2 13:32:34 2008 -0800 + + Don't need to check uid/euid for every commandline argument + + Check uid/euid only when handling the arguments that are restricted + to root/non-setuid users + +commit 6de6ffff35ac03d49fa61de195d4a0605e0ef8bf +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 2 13:19:08 2008 -0800 + + Remove unused config flags from FlagValues & FlagOptions + + FLAG_DISABLEMODINDEV, FLAG_MODINDEVALLOWNONLOCAL, & FLAG_HANDLE_SPECIAL_KEYS + +commit bb072019fa8dd292a50ef433d05caeefd1304a73 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Dec 1 16:57:06 2008 +1000 + + xfree86: don't render SW cursors for devices attached to VCP (#16805) + + When leaving 3D games such as quake3 or sauerbraten, a cursor may stay on the + screen. This is caused by one run of SW rendering for the SD, even though the + SD was attached to the VCP and thus has HW rendering capabilities. + + Check for the SD's attachment (like in all other functions) before deciding on + SW or HW rendering. + + X.Org Bug 16805 <http://bugs.freedesktop.org/show_bug.cgi?id=16805> + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 3a690598cf18c4cdc6aadd10a1ecf0772cacd34b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 2 12:59:57 2008 -0800 + + Remove unused HandleSpecialKeys config option + + Was only used by "keyboard" driver - the last place the value was checked + was in xf86PostKbdEvent, which was removed in commit + 60ea7b51fe2b8a19a08b63db48504971a7a50ee6 + +commit 1dfed222e93f4684c2a450944a9a0ea9e085c43f +Author: Bernhard Rosenkraenzer <bero@arklinux.org> +Date: Tue Dec 2 09:01:56 2008 +1000 + + Xext: fix MultiBuffer compilation error with TryClientEvents. (#18835) + + X.Org Bug 18835 <http://bugs.freedesktop.org/show_bug.cgi?id=18835> + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 9ce995373e4aa4b1bf51b4adafa2324f781ec1cd +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Dec 1 21:32:39 2008 +1000 + + mi: UpdateSprite only if the device is attached. + +commit d507f60689f4e14383b0d24e63afc8cf836360d5 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 26 14:15:04 2008 +1000 + + xfree86: don't FatalError on "too many input devices". + + Just ignore devices after MAXDEVICES has been reached, but warn the user that + the devices are ignored. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 9bf761468fa3baf4c5fa40efa717b4b581d920f9 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 28 11:44:58 2008 +1000 + + Xi: fix xi_filters size. + +commit 260e48c252c95fd1b1ba9ad7478791f6b9a67e2d +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 28 11:29:06 2008 +1000 + + dix: remove confusing (and wrong) comment. VCP is not the only pointer. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 5d02e580d7c4144ea6f0984240fc913e05fec877 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 28 11:46:15 2008 +1000 + + dix: use UpdateFromMaster in GetProximityEvents. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 95fc59a199f99bf167fbb09297a9bb0e33e31869 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 28 14:55:15 2008 +1000 + + xkb: Extra sanity checks to prevent dev->key == NULL dereferencing. + +commit a425abf0eaa61ee5ccb2f32a1af24edd190f7889 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 26 12:20:00 2008 +1000 + + xkb: don't attempt to filter events for devices without key classes. + + Reported by Magnus Kessler. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit a85f0d6b98237d8a196de624207acf1983a1859a +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 26 11:15:05 2008 +1000 + + Xi: fix use of button->down - bitflags instead of int arrays. + + The device's button down state array was changed to use DOWN_LENGTH and thus + bitflags for each button in cfcb3da7. + + Update the DBSN events to copy this bit-wise state. + Update xkb and Xi to check for the bit flag instead of the array value. + + Reported by ajax. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 180bad84774493d48f2793a6281d825560944863 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Tue Dec 2 02:50:45 2008 -0200 + + Add visibility flags to XSERVER_CFLAGS. + + This is done to actually change DIX_CFLAGS, as not all "modules" use + XORG_CFLAGS. + Also export the symbols that are required by other modules after + the change. + +commit 8c560422b44e012053612754430d2b87dc44ed59 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 1 20:02:34 2008 -0800 + + More man page updates for 1.6 release for Xorg, xorg.conf & exa man pages. + + - Remove remaining references to XFree86-Misc options AllowNonLocalModInDev + and DisableModInDev. + - Remove remaining references to grab-breaking keys & associated options. + - Update description of Ctrl-Alt-Backspace to new -retro/DontZap defaults. + - Add description of new options -modalias and -showopts. + - Update list of modules loaded by default. + - Update input driver references from keyboard to evdev & kbd. + - Update list of driver man pages to match xf86-*-* drivers with man pages. + - Add See Also section to exa man page. + + and various formatting/typo/etc. fixes. + + The Xorg/xorg.conf sections on input device selection could use further + updates to better match the current state of HAL-enabled configuration. + +commit 6a1850b8c677e2a2993f6f6b731ee3d35aa55d09 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 1 19:19:04 2008 -0800 + + Correct warning for unknown GlxVisuals option in conf file + +commit afeacb8e74b2a1e366e5ca9f0e58805d8d96c457 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Dec 1 20:53:17 2008 -0500 + + Bump dri2proto requirement to 1.99.3. + +commit ad01e86b5c7c528adec8a1f95ecaa294f58a8922 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Dec 1 20:52:41 2008 -0500 + + Drop unused DRI2 vblank infrastructure. + + For this first iteration of DRI2 we don't have any vsync functionality + in place yet, so back out the support in DRI2 and the protocol for now. + +commit 24c562f04b41d219c34f5fa3f963564accf329f2 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 1 16:28:45 2008 -0800 + + Update See Also lists in Xorg & xorg.conf man pages + + Remove xorgconfig & xorgcfg + Update driver lists: + - Remove vga + - i810->intel + - via->openchrome + +commit bd147e6f4b03f344c967c88fd433877b14fe1912 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 1 16:08:55 2008 -0800 + + Remove hack to only load font modules if magic strings appear in font path + +commit 5f3f14179edf48aad518f6f707bfdc37c27267c6 +Author: Jay Cotton <jay.cotton@sun.com> +Date: Mon Dec 1 16:06:09 2008 -0800 + + Sun bug 6618220: Xorg server core dump in xf86RandRModeRefresh(NULL) + + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6618220> + +commit 09df7cc5ad7b72d8a23c3e22fc718aad8c16f4d3 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Dec 1 12:41:10 2008 -0500 + + Avoid dereferencing NULL pScreen in xf86CrtcSetModeTransform(). + + We can get there during PreInit as we set a mode for load detection. + At that time there's no pScreen anywhere, so just skip the optimization + then. + +commit b0d371ab0a6efd4956c3677faa20b2ac15c33765 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 1 11:36:06 2008 -0500 + + randr: Don't send output property events on server exit + + If the Window resource type is already gone, there's no point in trying + to send events, all it can do is access already-freed memory. + + Relevant thread: + + http://lists.freedesktop.org/archives/xorg/2008-November/040443.html + +commit 16b11cd03d8c5def07f0e598f237f71a37883a46 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Nov 30 02:59:34 2008 -0200 + + Correct static symbol XkmReadTOC and first pass on compile warning fixes. + + The warnings corrected were only the ones that should correct + real problems. The most common one is 64 bit integers as + "printf %l" arguments. + Note that there is a patch related to this at: + http://bugs.freedesktop.org/show_bug.cgi?id=18204 + +commit fb22d4d928bc5d1a893494a059359da2ed2ac639 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sun Nov 30 01:33:20 2008 -0200 + + Remove declarations of symbols that are never defined. + + These symbols were removed from the X Server, or never declared. + One symbol that may need special attention is XkbBuildCoreState(), + that doesn't have a prototype anywhere, but is called from + xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros + XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in + include/xkbstr.h. + fb/wfbrename.h also may need some cleanup, as it makes several + "renames" of non existing symbols. + +commit d6cbd4511e35a89a0353f11834c6fdb8d4d2189f +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Sat Nov 29 23:56:06 2008 -0200 + + Export symbols defined in the sdk. + + This is the biggest "visibility" patch. Instead of doing a "export" + symbol on demand, export everything in the sdk, so that if some module + fails due to an unresolved symbol, it is because it is using a symbol + not in the sdk. + + Most exported symbols shouldn't really be made visible, neither + advertised in the sdk, as they are only used by a single shared object. + + Symbols in the sdk (or referenced in sdk macros), but not defined + anywhere include: + XkbBuildCoreState() + XkbInitialMap + XkbXIUnsupported + XkbCheckActionVMods() + XkbSendCompatNotify() + XkbDDXFakePointerButton() + XkbDDXApplyConfig() + _XkbStrCaseCmp() + _XkbErrMessages[] + _XkbErrCode + _XkbErrLocation + _XkbErrData + XkbAccessXDetailText() + XkbNKNDetailMaskText() + XkbLookupGroupAndLevel() + XkbInitAtoms() + XkbGetOrderedDrawables() + XkbFreeOrderedDrawables() + XkbConvertXkbComponents() + XkbWriteXKBSemantics() + XkbWriteXKBLayout() + XkbWriteXKBKeymap() + XkbWriteXKBFile() + XkbWriteCFile() + XkbWriteXKMFile() + XkbWriteToServer() + XkbMergeFile() + XkmFindTOCEntry() + XkmReadFileSection() + XkmReadFileSectionName() + InitExtInput() + xf86CheckButton() + xf86SwitchCoreDevice() + RamDacSetGamma() + RamDacRestoreDACValues() + xf86Bpp + xf86ConfigPix24 + xf86MouseCflags[] + xf86SupportedMouseTypes[] + xf86NumMouseTypes + xf86ChangeBusIndex() + xf86EntityEnter() + xf86EntityLeave() + xf86WrapperInit() + xf86RingBell() + xf86findOptionBoolean() + xf86debugListOptions() + LoadSubModuleLocal() + LoaderSymbolLocal() + getInt10Rec() + xf86CurrentScreen + xf86ReallocatePciResources() + xf86NewSerialNumber() + xf86RandRSetInitialMode() + fbCompositeSolidMask_nx1xn + fbCompositeSolidMask_nx8888x0565C + fbCompositeSolidMask_nx8888x8888C + fbCompositeSolidMask_nx8x0565 + fbCompositeSolidMask_nx8x0888 + fbCompositeSolidMask_nx8x8888 + fbCompositeSrc_0565x0565 + fbCompositeSrc_8888x0565 + fbCompositeSrc_8888x0888 + fbCompositeSrc_8888x8888 + fbCompositeSrcAdd_1000x1000 + fbCompositeSrcAdd_8000x8000 + fbCompositeSrcAdd_8888x8888 + fbGeneration + fbIn + fbOver + fbOver24 + fbOverlayGeneration + fbRasterizeEdges + fbRestoreAreas + fbSaveAreas + composeFunctions + VBEBuildVbeModeList() + VBECalcVbeModeIndex() + TIramdac3030CalculateMNPForClock() + shadowBufPtr + shadowFindBuf() + miRRGetScreenInfo() + RRSetScreenConfig() + RRModePruneUnused() + PixmanImageFromPicture() + extern int miPointerGetMotionEvents() + miClipPicture() + miRasterizeTriangle() + fbPush1toN() + fbInitializeBackingStore() + ddxBeforeReset() + SetupSprite() + InitSprite() + DGADeliverEvent() + + SPECIAL CASES + o defined as _X_INTERNAL + xf86NewInputDevice() + o defined as static + fbGCPrivateKey + fbOverlayScreenPrivateKey + fbScreenPrivateKey + fbWinPrivateKey + o defined in libXfont.so, but declared in xorg/dixfont.h + GetGlyphs() + QueryGlyphExtents() + QueryTextExtents() + ParseGlyphCachingMode() + InitGlyphCaching() + SetGlyphCachingMode() + +commit ffb484f7ef84099019b196ef97bfb2355eb6d52a +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Nov 29 14:30:55 2008 +0100 + + randr: Avoid needlessly creating a shadow framebuffer. + + - pScreen->width and height were zero, so it didn't "fit" the screen. + +commit 01eaebdc98f30fdf543af6337cdf012d3ff16f09 +Author: George Staplin <gstaplin@apple.com> +Date: Fri Nov 28 13:57:45 2008 -0700 + + XQuartz: GL: Make various changes to makeFormat, so that it works better. Now glxgears looks normal with the old libGL. + + Add various GLX extensions to the list of supported extensions. + + Reformat the oddly formatted code in some areas. + + Use xalloc and xfree instead of malloc and free. + (cherry picked from commit 755f53eb40c4329d8c82a31cb910c31fdd4ea12e) + +commit 3d527b91b4bfa31e78d5fc7a1447a4026876f14e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 28 12:59:09 2008 -0800 + + XQuartz: Added option to enable/disable test extensions + + defaults write org.x.X11 enable_test_extensions -boolean true + (cherry picked from commit fd4710aff3723d5f3422cf6a6530172eafc556d9) + (cherry picked from commit 635019ad18db921fec99256294debd8571074abf) + +commit 71d3df7cc37403b5842227a035d9b995fd920e0b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 28 11:18:14 2008 -0800 + + XQuartz: Avoid some warning messages being spewed to system.log by AppKit + (cherry picked from commit 780eff230ce41ad785e54d61a82c731269ae0446) + +commit a9796c7bc43223df44f12a7be08e361aea963ec1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 28 01:45:37 2008 -0800 + + XQuarz: Setup our PATH and PWD earlier, so our initial client benefits from it as well... + (cherry picked from commit cbae2b447357b3fed6ff19414c60dd3792045600) + +commit ef4179f43a84d90f867b95ee5974ad26884253b5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 26 12:15:58 2008 -0800 + + XQuartz: Fix dead-acute on Greek keyboards + (cherry picked from commit 807f2ec35c5f95b56b3e2b5eac51aec300fe5cb6) + +commit 800f5c681bed300d8caf99935e8f80ea6c1993ba +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 26 12:07:52 2008 -0800 + + XQuartz: Fix Czech keyboard dead-acute + (cherry picked from commit 771df2786bc60389489f0967e705c7c95bdda085) + +commit ac57bb36d56a7a4d41add8d5a206ff37544a1819 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 20:14:37 2008 -0800 + + XQuartz: Fix an uninitialized keyboard_type on Tiger + (cherry picked from commit 27b1a5eb3482052253ebdce1a09aedf05ac1b099) + +commit 45c8bd0fe54273039fdaa1eeeafb81b5774f2c75 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Nov 28 02:01:57 2008 -0200 + + Enable compiling the X Server and modules with hidden symbols by default. + + Note that it checks if support for symbol visibility is available by + the compiler, not if it is functional. It may have problems on non x86 + architectures. + To disable the feature, just pass the option "--disable-visibility" + to the X Server configure script. + Unless using an alternate build schema, drivers built from a git + checkout will use the same "visibility" related CFLAGS used to compile + the X Server. + +commit 31285d063ec4623cb0764437d6d57e244f20460d +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Nov 28 01:55:11 2008 -0200 + + Make visible symbols required by xorg modules. + + This patch exports all symbols required by the compilable + (in a x86 linux computer) xorg/driver/* modules. + Still missing symbols worth mentioning are: + + sunleo + miFindMaxBand no longer available + + intel (uxa/uxa-accel.c) + fbShmPutImage no longer available (and should have been static) + + mga + MGAGetClientPointer (should come from matrox's libhal) + + This is not a definitive "visibility" patch, as all it does is to + export missing symbols, but the modules that current don't compile, + may require more symbols once fixed, and third party drivers should + also require more symbols exported. + A "definitive" patch should export symbols defined in the sdk. + +commit 6f18ea7e656b79e58f66f51067334414767b413f +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Nov 26 19:07:04 2008 +0100 + + Typo fix + +commit efefc03f9b26738b69abb570c1af2167cc99c4d8 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 13:19:48 2008 +0100 + + Add missing include + + ../../../../hw/xfree86/xaa/xaaTables.c:9:14: warning: symbol 'byte_expand3' was not declared. Should it be static? + ../../../../hw/xfree86/xaa/xaaTables.c:53:14: warning: symbol 'byte_reversed_expand3' was not declared. Should it be static? + +commit 74bc792e1814849b8eee9e448e36c3568b821e6c +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Nov 27 05:34:14 2008 -0200 + + Export symbols required by the vesa and fbdev drivers. + + This is a minimal set of patches, to have an usable X Server when + compiling it with symbols hidden by default. + +commit 74e2669103b59d51b24ddc48f378b1d04a3effd4 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Nov 27 04:33:44 2008 -0200 + + Export symbols also defined in libXfont. + + libXfont has stubs for these symbols, so, when compiling with hidden + symbols by default, these symbols must be visible in the X Server, or + the stubs in libXfont will be used. + +commit 87a7fb7438b70d07ebf240c530b8548a01021d48 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Nov 27 00:12:59 2008 -0200 + + Rework code using return value of LoaderSymbol as a function pointer. + + The patch removes all macros in the format + define xf86_sym ((type (*)(argument-list))LoaderSymbol("sym")) + creates a new macro in the format + define xf86_sym sym + and ensures "sym" is a "visible" symbol. + The patch doesn't add or remove features, and is source and binary + compatible with previous shared objects (with the difference that it + requires the dlloader). + These symbols are a special case, as, due to the fact that LoaderSymbol + was being used to reference them, they are not easily found by "automated" + tools that check for missing symbols. And now it also have the benefit + that the compiler/loader "knows what is going on". + +commit fc708394318ed92c612e2938b335c08c1ffebb28 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 26 15:49:02 2008 -0800 + + Add server support for RRGetScreenResourcesCurrent + + This depends on randrproto 1.2.99.1 + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit f710ce269c020a39f58b2bfbd0fe5192a3279c72 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Wed Nov 26 20:02:44 2008 +0000 + + bump master to 1.6.99.1 (now the 1.6 branch is created) + +commit f3edc1fb0210149f35eab4e413700b5c4ac48214 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 25 23:15:35 2008 -0800 + + New version of dolt + +commit 4715f079b9c61362755c95c1ebf89c97cc6fff2b +Merge: 9ffc671 ed597f1 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 25 22:19:08 2008 -0800 + + Merge commit 'origin/master' + +commit 9ffc6719390df8fdd0a5295a7a7a0eaea792be45 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 24 13:08:48 2008 -0800 + + Move matrix operations from X server to pixman 0.13.2 + + pixman 0.13.2 now holds all of the matrix operations. This leaves + the protocol conversion routines and some ABI stubs in place + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ed597f19fdc3017dde6d1452b5cdf8ddcd69a5b1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 25 19:36:31 2008 -0500 + + xselinux: use "raw context" variants of getpeercon() and getcon(). + +commit ec1d08442f69353cb0e73ac4eaf0346ebb975594 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Nov 21 15:13:00 2008 +1000 + + dix: Enable core devices in InitCoreDevices already. + + Updated patch, see + http://lists.freedesktop.org/archives/xorg/2008-November/040540.html + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 2b45602e828a07a0817691b2838cd34ffee531bd +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 26 10:42:52 2008 +1000 + + Revert "dix: Enable core devices in InitCoreDevices already." + + I merged the wrong patch. See correct patch at: + http://lists.freedesktop.org/archives/xorg/2008-November/040540.html + + Not activating the device before attempting to enable it would leave the + sprite unset, crashing the server when enabling the real devices. + + This reverts commit e078901a4eca02bd3e7a80d9462dafbca939a187. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 416685c295353b5816689994c7c58ae7db3e878d +Author: Jeremy Uejio <jeremy.uejio@sun.com> +Date: Tue Nov 25 16:26:44 2008 -0800 + + Refix Sun bug #6685465: Xephyr uses wrong or bad colortable in 8-bit mode + + <http://bugs.opensolaris.org/view_bug.do?bug_id=6685465> + + This is a refix of the previous fix for CR 6685465. In the first fix + I was shifting the colors to match the mask by the bits_per_rgb amount + in the visual structure. That field has nothing to do with the # of + bits to shift by. I should just instead shift the bits to match the mask. + +commit d5f9a131a2d5bd33f82fdd4e809880b0ff792b45 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Nov 25 15:46:39 2008 -0800 + + Fix const-mismatch warnings for DisplayModePtr's + + Includes fixes for: + "xf86Config.c", line 2434: warning: argument #1 is incompatible with prototype: + prototype: pointer to struct _DisplayModeRec: "xf86.h", line 351 + argument : pointer to const struct _DisplayModeRec + + "xf86EdidModes.c", line 312: warning: argument #1 is incompatible with prototype: + prototype: pointer to struct _DisplayModeRec: "../../../hw/xfree86/common/xf86.h", line 351 + argument : pointer to const struct _DisplayModeRec + + "xf86EdidModes.c", line 438: warning: assignment type mismatch: + pointer to struct _DisplayModeRec "=" pointer to const struct _DisplayModeRec + + "xf86Modes.c", line 701: warning: assignment type mismatch: + pointer to struct _DisplayModeRec "=" pointer to const struct _DisplayModeRec + +commit d5ad296869c38ab30136b5a293a0125b76aad994 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Nov 25 14:12:26 2008 -0800 + + Remove duplication from code paths in XkbDDXCompileKeymapByNames + +commit 2538fc0d893a150e978355d281750f0a989728a7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 25 18:18:46 2008 -0500 + + xselinux: don't pass a NULL key string to selabel_lookup(). + +commit c8472a74441838e16d0d3414db1fa7fe996868a9 +Author: Michael Vogt <michael.vogt@ubuntu.com> +Date: Tue Nov 25 19:35:17 2008 +0200 + + Do not send VisibilityNotify events when MapUnmapEvents are disabled + + This prevents a protocol visible side-effect (XVisibilityEvent) on + XCompositeRedirectWindow() followed by a XCompositeUnredirectWindow(). + + The problem shows up in gnome-screensaver with compiz and "unredirect + fullscreen windows" enable. A VisibilityNotify event is generated (first + with obscured and than with unobscured) when the window swithces from + redirected to unredirected. + + https://bugs.freedesktop.org/show_bug.cgi?id=18133 + http://launchpad.net/bugs/278112 + +commit 88297558aada44bc714ad57adbeed3740aaadee5 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 14:20:58 2008 -0500 + + Dead code cleanup over DBE. + + No DDXes have explicit DBE support anymore, so the init registration + table never got used. Just nuke it all. + +commit e5eaea599ab16428c69912b6b3427ebe46707d7c +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 14:05:51 2008 -0500 + + Warning fix + + xf86info.c:11: warning: initialization makes integer from pointer + without a cast + +commit 37072500f7bcf39e0d6aa2ceb5d1f2aeeab0b26b +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 14:04:44 2008 -0500 + + Warning fix + + helper_exec.c: In function ‘port_rep_inb’: + helper_exec.c:219: warning: implicit declaration of function + ‘DEBUG_IO_TRACE’ + helper_exec.c:219: warning: nested extern declaration of + ‘DEBUG_IO_TRACE’ + +commit d96bffce2dcf209e76be9b36ca1ede7e0c976d77 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 13:59:00 2008 -0500 + + Warning fix + + Init.c:139: warning: no previous prototype for ‘ddxBeforeReset’ + + Just declare the prototype always, seriously. + +commit 09ea671cbff605fd2b2af71619e7db5002108bf8 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 13:40:47 2008 -0500 + + Warning fix + + lnx_bell.c:37: warning: no previous prototype for ‘xf86OSRingBell’ + +commit a9853c7d337b3b1ad49793e9b4b90e313b6fa536 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 00:53:55 2008 -0500 + + Warning fix + + Pixmap.c: In function ‘xnestPixmapToRegion’: + Pixmap.c:93: warning: ‘Box.x1’ may be used uninitialized in this + function + +commit 81eafe9f93a272b06aa9f9235ec5676b9aa3ee3e +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 00:45:07 2008 -0500 + + Warning fix. + + vbe.c: In function ‘VBEReadPanelID’: + vbe.c:1145: warning: return from incompatible pointer type + +commit 09bfb25e031772611a2f0902d4ba77b587e4bdb2 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 00:43:36 2008 -0500 + + Remove unused XAAAvailableOptions + +commit 8b9253f6383df3fefe38bde43a5f892b158a77c4 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 00:38:47 2008 -0500 + + Code motion: subsume xf86DoProbe.c into xf86Init.c + +commit fbabb1c5c243cfd8c954dec4c060dff1a0b81015 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 00:34:28 2008 -0500 + + Warning fix. + + In file included from l3-xaaStipple.c:4: + ./xaaStipple.c:35: warning: no previous prototype for + ‘XAAGetStippleScanlineFunc3LSBFirst’ + + etc + +commit cbaca6ec666d7349c4680b8affc13b5c9cae1fa5 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 25 00:14:24 2008 -0500 + + Remove dead FreeModuleDesc. + +commit eb474adf98229a43bbe17ab98ff084371cb9fa09 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 11:25:58 2008 -0800 + + XQuartz: Simplify the xquartz_resetenv_display path + (cherry picked from commit d2e0624dd30eb234bb25595ceedfa51d48ca1724) + +commit 94df1ab7f09a64f57c1e1453e3640462e984619c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 01:30:03 2008 -0800 + + XQuartz: Force X11Controller to reset a broken DISPLAY envvar. + (cherry picked from commit f1a52b5b5ac31702497937efe3ac578be9a6c54f) + +commit 0b314c50a2a0ca1afbdc06663c3b719b05ebb851 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 01:13:35 2008 -0800 + + XQuartz: Removed hardcoded org.x.X11 from MachIPC as well + (cherry picked from commit b4add7826d485600a13eba6a9c7be533f2c02d51) + +commit 065d2afb0ca34f89806e0936c51cd27805bc5123 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 00:51:01 2008 -0800 + + XQuartz: Add fallback for xpbproxy's display for Tiger or no-launchd-Leopard + (cherry picked from commit 7a8c6665949d7804a97ef2539a74ec4aa682e1cc) + +commit 13df49dca28cf680a4d104630cd675de25d3e944 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 00:39:52 2008 -0800 + + XQuartz: Use the environment to pass the bundle's prefs domain on to xinit/quartz-wm for Tiger or no-launchd-LEOPARD + (cherry picked from commit fbf4b0d33fa5dc618c3191a4e823232dfa33cd95) + +commit 40187f782beae4ae751824ef511c9f56a80357c7 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 00:20:57 2008 -0800 + + XQuartz: Dead code removal + (cherry picked from commit eeb323612e0adbea37befed31bbaa1d295728385) + +commit b55cad4569e34e3c10e9a327e20b91ea87d9dd98 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Nov 25 00:15:53 2008 -0800 + + XQuartz: Don't hardcode values of org.x.X11 for the preferences domain + (cherry picked from commit 3a500d9247cf34686ec17b4a88c34d51ecd38ecd) + +commit d508a3dcca2f160021aced872715e1ded23cef97 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Nov 24 23:33:54 2008 -0800 + + XQuartz: More dead code removal + (cherry picked from commit dcb0f6a2e62823a671051874d14a33ce59505892) + +commit 41fbdf72f2154a3fca8cf484a611501e3c174fbe +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Nov 24 12:33:20 2008 -0800 + + XQuartz: Disable some error spew on Tiger (where it wouldn't be an error) + (cherry picked from commit 73ec6d3dfe0086d352f4eca25f1df5ae1884bb18) + +commit 09c3f6e04c273ffafcb547c252137fb17c8ce016 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 22 20:23:46 2008 -0800 + + XQuartz: Dead code removal + (cherry picked from commit 46c077d9b4a883fc809c32077ce40f33a70d268b) + +commit ab12c7516207908f3e063a78904d68e2db14208e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 22 15:47:14 2008 -0800 + + XQuartz: More Tiger cleanup: bootstrap_strerror + (cherry picked from commit 37f535aff3e9a7a02711daa98152cdff97745622) + +commit 208f091bfc657e9ee57b988f035d3aac7e9e173a +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Oct 12 00:07:56 2008 -0400 + + Remove xf86IODelay + +commit 47478aa10adb20b6e48335ac8c4ef31f3fdfe68c +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 23:59:24 2008 -0400 + + Remove xf86{En,Dis}ableInterrupts entirely + +commit c7680befe5aebd0f4277d11ff3984d8a7deb9d5b +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 23:35:24 2008 -0400 + + Remove the remnants of Jensen support + + As being an EISA-only machine, and as ISA support is gone now... + +commit df14682a31b92751091571ed82f6095f55f19cca +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 22:48:51 2008 -0400 + + Bus: Remove ISA support. + + No, really. PCI is old enough to drive now. If you want this, get the kernel + to expose a framebuffer device. + +commit a8bcab2d3b224e4d4d5b6a097ea530beee920213 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 22:14:23 2008 -0400 + + Bus: Remove yet more unused overlap processing. + +commit 994b7c034fc20d76651cf7f6a285526d9aff8770 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 22:11:12 2008 -0400 + + Bus: Don't pretend to care about IRQs, DMA, or PCI config space + +commit eb5ae45127fa9f08f0badec7e21f8c26c9c7c969 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 21:44:16 2008 -0400 + + Bus: Simplify a failure case (that pretty much never happens) + +commit ee8b5cf94c2a9f8526a3bb5011ebb10f3246a4d9 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 21:41:47 2008 -0400 + + Bus: Trust the kernel when registering driver resources + + ... everywhere, not just (linux && (ia64 || alpha)). + +commit 8397df89456558e3c85b05e0acfccb9f6af6b695 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 21:36:14 2008 -0400 + + Remove unused MIN macro + +commit c251c0baae59714a6ac83b69cd106c08baa3613e +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 21:34:27 2008 -0400 + + Bus: remove special handling for init-only resources + + This isn't used by any driver, nor has it ever been as far as I can + tell. + +commit 3e5281af17841cf50d0e52a728b12c6ab56e61df +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 21:16:45 2008 -0400 + + PCI: Unexport xf86scanpci + +commit 6b198daa46f2f609aff7900761cf82cc2fb4e0b4 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Oct 11 20:51:39 2008 -0400 + + Bus: remove useless isaConvertRange2Host + +commit a96db74c2a95bb1dce132cf47ea720ae939dfad7 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 9 00:43:26 2008 -0400 + + Bus: Don't try to find an ISA bus just for fun. + +commit b21311a99d58997cd1fc68726d0848242e9c34fc +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 9 00:34:42 2008 -0400 + + Bus: Remove unused RemoveOverlaps + +commit 41be6b3f0dc0baa1c6ae8d2b41a6be73ca0e7268 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 9 00:33:28 2008 -0400 + + Bus: Remove the notion of estimated resources. + +commit 095ba1435501776c8c8a34e767b89f89e5dc949a +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 9 00:27:33 2008 -0400 + + Bus: remove the "reducer" + + This code effectively didn't do anything anymore. + +commit 4457e31710af90f9ac295bb686c841e9473fb767 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 9 00:14:54 2008 -0400 + + PCI: Remove unused ia64 platform code. + +commit 86cfe0ee236bfd3613e5f9ba589211db42d009eb +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 23:45:40 2008 -0400 + + PCI: Simplify OS PCI function registration a bit. + +commit 2d427b9cb1594f8f2f66b463033fff5b459962fd +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 23:38:23 2008 -0400 + + PCI: Remove config mechanism details. + + pciaccess handles this for us now, no need to remember PC arcana. + +commit 5bb86bafd6fda296011cbcd5d15a85a6d770ae29 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 23:34:41 2008 -0400 + + PCI: Remove non-pciaccess path for x86. + +commit a67360e79fa7e17c3d907771694009c57c1cd195 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 23:31:38 2008 -0400 + + PCI: Always build domain support. + +commit 51e105ccc3d0ac8c0fe74efd029ffbddb80b140e +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 23:12:31 2008 -0400 + + Remove xf86GetResourcesImplicitly + +commit 599a0f3f1e3ae92676e3648471576c0001cfd9ae +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Nov 24 20:37:58 2008 -0800 + + Fix typo in 5bf2c88d2317230b95b2904cb975167d03ee13a2 + + Amazing how these things hide until you see the diff come back from + the commit list. + +commit 5bf2c88d2317230b95b2904cb975167d03ee13a2 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Nov 24 20:34:46 2008 -0800 + + Simplify filename generation code for Xorg -configure + +commit 75784e1e53ad78e21518696dd9d297bc08c17d54 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Nov 24 20:32:20 2008 -0800 + + Solaris: Make KDSETMODE failure non fatal, and retry it on interrupts + +commit 3e6da1636093d7dc98baac40544c0b0fb7fd8aec +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 14 15:55:57 2008 +1000 + + include: remove ENTER_LEAVE_SEMAPHORE macros. + +commit b292a7a2d7e259177e1cc37346c2bee27a018630 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 14 15:44:29 2008 +1000 + + dix: updated enter/leave core event model. + + As proposed by Owen Taylor [1], the enter-leave event model needs to adjust + the events sent to each window depending on the presence of pointers in a + window, or in a subwindow. + + The new model can be summarised as: + - if the pointer moves into or out of a window that has a pointer in a child + window, the events are modified to appear as if the pointer was moved out of + or into this child window. + - if the pointer moves into or out of a window that has a pointer in a parent + window, the events are modified to appear as if the pointer was moved out of + or into this parent window. + + Note that this model requires CoreEnterLeaveEvent and DeviceEnterLeaveEvent to + be split and treated separately. + + [1] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 724f83b87bb16472d4c328e35d2a477384b29f84 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 14 15:29:01 2008 +1000 + + dix: add FirstPointerChild, FirstPointerAncestor auxiliary functions. + + FirstPointerChild: Return the first child that has a pointer within its + boundaries. + + FirstPointerAncestor: return the first ancestor with a child within its + boundaries. + + These are required for the updated enter/leave model. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 7d3e595f93dcd3d334e766a9dea602c05affdbaf +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 14 15:27:19 2008 +1000 + + dix: Add EnterWindow, LeaveWindow, HasPointer auxiliary functions. + + These replace the ENTER_LEAVE_SEMAPHORE_* macros. Unused currently. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 6bdc963cdabb4a2e77de7f00a1d062aa2b873f9b +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 14 15:37:35 2008 +1000 + + dix: split enter/leave event handling into core and device handling. + + Device events always need to be delivered, core events only in some cases. + Let's keep them completely separate so we can adjust core event delivery. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 5e48f5e2dd2dec7cfd1fa40b61e25123dfca515e +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 14 15:41:59 2008 +1000 + + dix: remove unused EnterLeaveSemaphoresIsset. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 868fd503b7aeab31dba72046b59061008d8b7501 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 14 15:18:56 2008 +1000 + + dix: move Enter-Leave related functions into new enterleave.c + + Preparation for the new core enter/leave model. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit c4b9ab6bf56139fdd8c7c584a6f523c6766cddd6 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Apr 29 08:29:42 2008 -0700 + + Handle transform failure when computing shadow damage area. + + PictureTransformBounds can fail, when this happens, damage the entire screen + so that the shadow gets repainted correctly. + +commit 9c7679240ad90367693a462e288308b3fdc08f26 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 30 19:05:07 2008 -0700 + + [randr] don't try to compute crtc transform when no mode is set. + + Dereferencing the NULL mode pointer would cause a crash. As these transform + matrices won't be used while the CRTC is disabled, just leave their values + alone. + +commit 315b6d0a425d0257f226ee7032aca3ca31665e59 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 27 11:46:39 2008 -0700 + + Update RandR global transform when driver notifies of transform change. + + Need to compute and save the global transform when the driver changes it. + +commit 5d9282fde919c936816a85c2a9c5734dc9d57cc2 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 27 11:45:53 2008 -0700 + + Export rrtransform.h as needed by randrstr.h + + When the transform management was moved from randrstr.h, the associated + header file became necessary to build drivers. Include it as a part of the + sdk headers. + +commit 7236fd9dd4e9f5c4cb5bafa5c2a18cff12a0444c +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 21 03:16:09 2008 -0700 + + Be careful about copying transforms around; they have allocated memory. + +commit 7e69e364d2ef146d8ec3651d04bdd6d641017449 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 21 03:15:00 2008 -0700 + + Fix rotated/reflected cursor positions. + + Doing projective transforms required repositioning the cursor using the + hotspot, but that requires relocating the upper left corner in terms of said + hotspot. + +commit 93179c214fc6ed88f72955a11c69ae0a47316d8c +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 21 03:14:47 2008 -0700 + + rrtransform needs randrstr to get RANDR_INTERFACE defines + +commit 7c61db66a470a8306e346ed8bf8934f014dada42 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 21 02:39:49 2008 -0700 + + Create rrtransform.[ch]. Add RRTransform argument to RRCrtcNotify. + + Instead of using a separate function to notify DIX about transform changes, + add the transform to RRCrtcNotify so that the whole Crtc state changes + atomically. + +commit fa6a1df209bd74da1d545982cca437afc2198cc1 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 21 02:35:28 2008 -0700 + + Avoid overflow in PictureTransformPoint. Fix PictureTransformIsIdentity. + + PictureTransformPoint computes homogeneous coordinates internally, but fails + to handle intermediate values larger than 16.16. Use 64 bit intermediate + values while computing the final result at 16.16 and only complain if that + result is too large. + + PictureTransformIsIdentity was completely wrong -- it was not checking for + identity transforms at all. + +commit 6fe9c15731be5f5afabacb3aa3ed71b840f4238b +Author: Keith Packard <keithp@keithp.com> +Date: Wed Mar 19 12:15:39 2008 -0700 + + Allow drivers to set crtc transforms. + + Track curent transform down in the mode setting code so that it may be set + separately from RandR. + +commit 49db14e4ac26070ed86088419483888dda18b603 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Mar 19 00:46:35 2008 -0700 + + Handle RandR transform matrices in floating point. + + RandR matrix computations lose too much precision in fixed point; + computations using the inverted matrix can be as much as 10 pixels off. + Convert them to double precision values and pass those around. These API + changes are fairly heavyweight; the official Render interface remains fixed + point, so the fixed point matrix comes along for the ride everywhere. + +commit 6f734aecaec4f5c6152c3ebca197ef65bb4523da +Author: Keith Packard <keithp@keithp.com> +Date: Tue Mar 18 16:06:06 2008 -0700 + + Eliminate inverse matrix from randr transform protocol + + It is easier, and potentially more precise, to compute the inverse in the + server where everything can eventually be kept in floating point form. + +commit 197aa784694992f6bcfd194932309e440334c237 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Mar 18 15:35:44 2008 -0700 + + Report whether transforms are support from driver through extension to client + + Add APIs to xf86RandR12 support and randr extension to record whether the + driver supports transforms, report that value in the RRGetCrtcTransform + reply. + +commit e86c34663ef97e946a1129450105efa89a123af6 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Mar 18 15:25:31 2008 -0700 + + Clear shadow pixmaps before using them. + + This eliminates some ugly flashing, as well as clearing the borders when the + shadow will not be completely painted. + +commit 97ab0c6eff870b52c0383b63a78cec49059b2545 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Mar 18 15:15:40 2008 -0700 + + When converting from double to fixed, round carefully. + + This reduces the matrix representation error after inverting a + transformation matrix (although it doesn't eliminate it entirely). + + Perhaps we should extend Render to include 64-bit floating point transforms... + +commit 6d3a9e40a4b9ec455af11cce31e4aa616c93db32 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 23:04:49 2008 -0700 + + Compute matrix inversion instead of using wire version in RRCrtcTransformSet + + It doesn't make sense to have the client invert this matrix when the server + can do so reasonably efficiently. This avoids weird fixed point rounding + errors when testing the transform against its inverse. Now to fix the + protocol. + +commit 160252d94f04acc95f0a4e0f884ff565a5aa0744 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 23:03:56 2008 -0700 + + Add matrix inversion function (uses doubles) + + The obvious matrix inversion function, coded using doubles to avoid fiddling + with fixed point precision adventures. + +commit 8fd82c88e3f2060fda4ba30376900ece77668c63 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 16:14:43 2008 -0700 + + Adjust transformed cursor position to account for hotspot + +commit eb222e64128034df8361d5a82d4f4aa1318923ce +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 16:14:15 2008 -0700 + + Actually use filter kernel size to expand transform redisplay box + +commit 3fdb963f6e8287edeb4c5bc7bbadbc02eb8bb910 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 16:13:25 2008 -0700 + + Correct bilinear filter kernel size (should be 2x2) + +commit ee6326a6b89b2d223f6e1eaf02aac1fe8aebfaf6 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 15:22:06 2008 -0700 + + Handle filter widths in xf86Rotate + +commit ddc8466137d229fdc100cc403f492c7d61a1ba89 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 15:21:26 2008 -0700 + + Initialize and cleanup new filter fields in xf86Crtc. + +commit 16c093afd4f6b30d889cacdc994b0024f9bd83d5 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 15:20:52 2008 -0700 + + Pass filter kernel size through transforms + +commit 1df02d7ddd44f84bcaefd6583af1a9141cb3c78b +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 15:19:17 2008 -0700 + + Add kernel size to Render filters. + + This width/height value lets filter users know how far the filter spreads + into the source image. + +commit 40f3dff6b350fe0be55ebf7dbca88a0ef8f6380f +Author: Keith Packard <keithp@keithp.com> +Date: Mon Mar 17 13:57:47 2008 -0700 + + Use transform when computing scanout size of modes + + Report transformed crtc sizes through RandR and Xinerama. Test screen size + against transformed mode sizes when configuring the Crtc. + +commit f50349e1930e620cacdf27a6f8585fcb9cb5199a +Author: Keith Packard <keithp@keithp.com> +Date: Sat Mar 15 00:36:45 2008 -0700 + + [RANDR] Support filters in CRTC transforms. + + Create new RRTransform datatype to hold all of the transform related + information, use that in lots of places to pass filters around. + +commit acda790e430b2a18c7c35379f6e538f3d01ff221 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 14 13:46:30 2008 -0700 + + [render] Split out filter finding from filter setting. + + To prepare for RandR using filters in transforms, split out + code paths so that the RandR code can validate the filter name and + parameters during the transform set operation so that use of the filter + later will not have unreportable errors. + +commit e3d6f279d5c305dfb81ca109fbfb665870712d2f +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 13 21:31:12 2008 -0700 + + Wire up RandR CRTC transform protocol, bump server to RandR 1.3 + + This involved removing a pile of matrix code from the DDX, + as well as moving a bit of transform logic from DDX to DIX. + +commit ff9d1cd843a9b0aba69a3d788b21d5f6af702590 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 13 21:30:18 2008 -0700 + + Add funcs to convert between protocol and pixman matrices + +commit c2f254da694731ea573aa8bbc2707c083743f2d4 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 13 21:29:19 2008 -0700 + + Randr now depends on Render for matrices + +commit f547650328287545a7a4d96df8d6a6c606dd95a9 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 13 14:50:13 2008 -0700 + + Export a bunch of matrix operations from render. + + The render extension uses many matrix operations internally, this change + exposes those functions to other parts of the server, drivers and + extensions. The change is motivated by the 'transform' additions to the + RandR extension but will likely be useful elsewhere. + +commit e063162e80e51ed4368874b3af7ba690ea280d9e +Author: Keith Packard <keithp@keithp.com> +Date: Thu Mar 13 14:26:01 2008 -0700 + + Add projective transforms to RandR DIX/DDX API. + + New RRCrtcGetTransform function in DIX that DDX can use to get the pending + transform. The DDX code should be complete; the DIX code is just a stub at + this point. + +commit 9c7ac47b871a71e42d2f6933749ca462f1a65b40 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 4 00:10:08 2008 -0800 + + Notify DRI when crtc regions change + + Drivers that care about crtc positions on the screen to ensure that vblank + works correctly need to be notified when crtcs are changed. + + Provide a hook in the mode setting code that is invoked whenever any + configuration is done to the screen. + + Use this new hook in the DRI code so that DRI clients are notified and + receive updated information. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 554592cd70543f87cd8bee5ff47cc8281511e041 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Nov 24 11:50:38 2008 +1000 + + DGA: silence compiler warning. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 0dbcbd35f63db14734199a0beb2a91b6937f3838 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 21 12:02:02 2008 +1000 + + xfree86: Split the working code of NIDR into new xf86NewInputDevice. + + The xfree86 server previously hat NewInputDeviceRequest and InitInput, and + both basically did the same thing. Reduce NIDR to parameter checking and use + xf86NewInputDevice from both InitInput and NIDR to actually create the device. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit e078901a4eca02bd3e7a80d9462dafbca939a187 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 21 12:39:55 2008 +1000 + + dix: Enable core devices in InitCoreDevices already. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit d939f2482e71ad20bac28b7aa4b2e8c8196e9d65 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 21 12:21:45 2008 +1000 + + dix: fix false comment. + + VCP and VCK are always present, this comment is a leftover from earlier MPX + days. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 387563b77743d92be83420d982eaf57f5459a883 +Merge: 85f650c f6e01fa +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Nov 23 13:15:46 2008 +0100 + + Merge branch 'master' of git+ssh://herrb@git.freedesktop.org/git/xorg/xserver + +commit 85f650c9b76ab2e244f01908a7941c320635becd +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Nov 23 13:14:27 2008 +0100 + + missing action in if statement. + +commit f6e01fa1b87ea190ea5ad723ce46893784ea1de4 +Author: Stefan Dirsch <sndirsch@suse.de> +Date: Sun Nov 23 11:16:03 2008 +0100 + + Added '-showopts' option to print available driver options (#5564). + +commit 8964b8d0ec2b7b3b6bf540cd647b14a20e8f64a5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 22 14:23:23 2008 -0800 + + XQuartz: More 1.6 server API updates + +commit ad0f232165fe1a25ca4fb6da817da02b6ce31779 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 22 14:04:28 2008 -0800 + + XQuartz: Fixed --disable-glx + +commit 8e2287c220694953e972cd5119c2b0cd256b7a30 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 22 13:57:45 2008 -0800 + + XQuartz: Updated some code to use newer server API + +commit 6eb33bc0cb2e62339d323e1f1894015d7e3142f3 +Author: George Staplin <gstaplin@apple.com> +Date: Sat Nov 22 11:37:08 2008 -0700 + + XQuartz: GL: Remove the inclusion of glcontextmodes.h. + + Add some commentary about future directions needed for the GLX drawable + creation and destruction code. + + Match xalloc with xfree. + + I made some minor formatting improvements. + (cherry picked from commit b772d64fce31d16b498c621096e39d5203994d6e) + +commit 429b4b20d5708d608fd55f91dd5bcd4ac0b51a12 +Author: George Staplin <gstaplin@apple.com> +Date: Sat Nov 22 10:57:58 2008 -0700 + + XQuartz: GL: Add a branch to prevent a NULL DrawablePtr structure access. + + In attach() check for pDraw being NULL, and also print an ErrorF message, + because we eventually want to track down why this is occuring. + + It's unclear how this occurs, but as I noted in the 1.4 branch, I believe that + the DrawablePtr/struct _Drawable -> id is the member being accessed that causes + KERN_PROTECTION_FAILURE at 0x0000000000000004 + + This passes my tests using: env LIBGL_ALWAYS_INDIRECT=1 ./sometest. + + I fixed a warning: caused by initializing the screen->base.visuals with the + configs. It is a ** not a *. It seems that some other part of GLX will + initialize this for us. + (cherry picked from commit 17f6a261fca6d5856069dce28bb4838261afc6bc) + +commit bc0c7075e29b1719409cf7de8a4ab9ae1315aa67 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Nov 22 19:10:09 2008 +0100 + + Remove the old libusbhid copy from os-support/bsd. + + This has been replaced by in-kernel support for USB mices several + years ago and hasn't been enabled in build since X.Org 6.8. + +commit 76fcfc480133726112049e5bd9c3082d46825918 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 21 20:25:55 2008 -0800 + + XQuartz: GLX: sync up indirect.c to match George's updates in the xorg-server-1.5-apple branch + +commit 1a717779b67b9c1cdf734eef64135ac38829f726 +Author: George Staplin <gstaplin@apple.com> +Date: Fri Nov 21 17:28:11 2008 -0700 + + XQuartz: GL: remove glcontextmodes.* from the Makefile.am. It has been replaced. + + The new replacement is __GLXconfig. + (cherry picked from commit 3bed9b65c807a1aeb662b8042826cbb54280181d) + +commit dacad9ae0bdaedff9403fbe84a5c5a4b4eef3542 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Nov 21 17:16:22 2008 -0800 + + Xephyr man page typo fixes. + + Also trailing white space removal to clear git warnings. + +commit ca64b5949d229a60a3c62b6d29d51873b7694bd6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 21 11:20:31 2008 -0800 + + XQuartz: Don't use LS to find X11.app on Tiger. + (cherry picked from commit e62107e55261ef252a2a24dd26a60e5dd295d560) + +commit 701f8e3a94d2b659ebcfffd09acd1d66f9e797b8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 21 11:08:00 2008 -0800 + + XQuartz: Update applewm deps + (cherry picked from commit 0ad91c59be8759a9c9e9d4f639056d8c689a3bc5) + +commit 393325f908f8bd6648e466183f3683a2d80b264e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 21 10:57:31 2008 -0800 + + XQuartz: spewCallStack is noop on Tiger now... + (cherry picked from commit 56c469a68b92c6cf003802f418ea00bd596a41c3) + +commit 5d47a5d6526b7e52387647a15a580dfcafd1733f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 21 10:54:55 2008 -0800 + + XQuartz: pbproxy: Added some typedefs for types not available on Tiger + (cherry picked from commit 0947aa7911f1de44bfe16e505a757b659c5ab2a8) + +commit b262788401715787c68cea4ca79f4b270307afee +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 21 10:53:39 2008 -0800 + + XQuartz: More Tiger ifdefs + (cherry picked from commit 803509072f2c039e5cd555c4ac14d672f0e698c5) + +commit 510744444329170f702d31d43997a6bbc1591b44 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 21 10:44:11 2008 -0800 + + XQuartz: Resurrect the old audio path for Tiger + (cherry picked from commit a61a8d9047e8765faf3892f4f2148c8553fd192c) + +commit d7ee76f9dd84da05b59591a971b96bf990136767 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 19 11:42:59 2008 -0800 + + XQuartz: pbproxy: Push the pbproxy Xevent processing into its own thread + and just have the AppKit thread wake it up. + (cherry picked from commit 799715b8f3327c8da59ab45706e85af2d2c438e4) + +commit a9e20306fbe3262602f21b876a52a1ef38cdf20a +Author: Egbert Eich <eich@ovid.suse.de> +Date: Fri Nov 21 18:50:01 2008 +0100 + + int10: Do an mprotect(..,PROT_EXEC) on shmat()ed memory ranges. + + When the linux kernel sets the NX bit vm86 segfaults when it tries to execute + code in memory that is not marked EXEC. Such code gets called whenever + we return from a VBIOS call to signal the calling program that the call + is actually finished and that we are not trapping for other reasons (like + IO accesses). + Use mprotect(2) to set these memory ranges PROT_EXEC. + +commit a54153e669fd293a47f0077bf25505dd545ddce2 +Author: Rémi Cardona <remi@gentoo.org> +Date: Fri Nov 21 16:39:00 2008 +0100 + + xfree86: don't reset Auto(Add|Enable)Devices, use defaults from xf86Globals + + Without this, commit ace38fafb062372dcd3d56378b5b8f86525c6241 is useless + when HAL support is disabled. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 6a1b2fed7e465a9c652e8ee250b8eab440945862 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Sep 28 12:18:16 2008 +0200 + + Add a man page for Xephyr, with information from the README file. + +commit 10d472bf9d61bef32d0a383b2e3783e7a1d7621f +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon May 19 05:15:30 2008 +0200 + + Support for BSD apm + XXX check amd64 pci init + +commit f4e725f248870a2de10449cc8f53de32e7840d45 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Nov 20 13:51:15 2008 +1000 + + dix: memset DeviceVelocityPtr to zero. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 7f818776b7a19bd6100596d327ecaa69be317bc6 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Nov 19 15:05:50 2008 +1000 + + dix: fix typos in comments, one formatting fix. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 037ec5a3c496b07f885a128828ef804b3aa8eee2 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 19 15:12:04 2008 +1000 + + gitignore: ignore .patch files + +commit ace38fafb062372dcd3d56378b5b8f86525c6241 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Nov 18 08:19:45 2008 +1000 + + xfree86: without CONFIG_HAL, Auto{Add|Enable}Devices and AEI is false. + + There's little chance that we'll get the input devices at runtime without HAL, + we might as well force the server to add mouse/kbd devices automatically - + just like in the olden days. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 1cd894173ee7fa3d1a78d330c12453ea53e7b908 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 19 13:44:26 2008 -0800 + + Always use server-<display>.xkm to avoid races when multiple servers start + + Previously each server starting ran xkbcomp with the output set to + <keymapname>.xkm, read it, then deleted it - which led to races if + two servers were starting at the same time with the same keymap. + + Sun bug #6773816 Xorg uses the same xkm output file for compiled keymap file + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6773816> + +commit 1e4412abc499b9938bbac8a3ecd82f7f12d448d9 +Author: Rémi Cardona <remi.cardona@lri.fr> +Date: Mon Nov 17 09:56:49 2008 +0100 + + drop unused HAVE_LIBDRM_2_2 + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit c4ec71b405fcb5132d5089e3f8dd7b00c235265a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Nov 16 17:57:46 2008 -0800 + + XQuartz: pbproxy: nuke RCS Id, update header license/copyright + (cherry picked from commit 477c6968a88429bb9c10222a5836bdc936d10ab1) + +commit 42f330cf9ef44aea7428a67d282dfb1a60196e55 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Nov 16 10:42:03 2008 -0800 + + XQuartz: pbproxy: Remove thread-main.m + + it got accidently added and isn't used. + (cherry picked from commit cb6ffce68a2d10022fa92725d2d1837da4b3b89f) + +commit 19aac4274bbac55ce944acfaf3274a4403fe392e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 19 10:55:29 2008 -0800 + + mi: Push screen-saver/DPMS handling to after the EQ pop operation. + + This way we on't need to hold the mutex during the dixSaveScreens() call. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 56d1793c435abbaababab031860f1160f09fff06 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Nov 19 10:54:57 2008 -0800 + + mi: Only increment tail (push) when the event data is actually in the queue + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 570835b9a89187a36e08defbccc56051bb349b52 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 19 10:19:20 2008 -0800 + + Use bsd_pci stub routines on Solaris too, since we use pciaccess for real work + + Depends on commit 70e18a3b6b9d52169bca650f6cd4ef5d8ab40d95 to get + definition of xf86InitVidMem on Solaris. + +commit 3932a848572f4eaf8b7f1d91d9b74aeafab069a2 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 18 14:21:01 2008 -0500 + + Xinput: use floats for ConstantDeceleration and AdaptiveDeceleration + + These values need not be constrained to integer values. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 08cd361234ed0410f67342f46ae01120c4fe3331 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Nov 17 10:28:48 2008 +1000 + + exa: avoid doing prepare/done without intervening copies in exaFillRegionTiled + + This does a precursor check to make sure the copies are required before + entering the prepare/done code. + +commit 8f8a9c19ad58768b07461a3f4bccea98f7c4f958 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Nov 17 10:24:39 2008 +1000 + + EXA: avoid copy operations if no boxes in use + + Simple fix for now, I'm sure damage shouldn't be calling us with nbox = 0. + +commit 03f7a66a1ae3f522a49bcc783066d53d69c97262 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 15 19:45:49 2008 -0800 + + XQuartz: Don't use TIS on Tiger... + (cherry picked from commit be8ac84c15e7e76c581b9e75cda74139394aa4c7) + +commit e8112784e8ef80a96ed54eca7e148b424001a38f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 15 19:52:34 2008 -0800 + + XQuartz: Integrated xpbproxy into the server. + + Added a configure option called --enable-standalone-xpbproxy which is useful for deveoping xpbproxy. + The 'active' switch in preferences just disables the in-server xpbproxy (not this standalone). + (cherry picked from commit 42944936326ef8732f622db9f75b79a92980550d) + +commit 24928b85dc996c8d0a052ddf383df25718ee5305 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Nov 15 13:28:53 2008 +0100 + + DRI2: Don't crash in DRI2ClipNotify when DRI2DrawablePtr is NULL. + +commit e5271c374715dd4e9a724ab3e5f77108d4ce8c23 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Nov 15 13:27:42 2008 +0100 + + Set libdrm flags correctly even when only DRI2 is enabled. + +commit bc4f804cd86497655f6765b0954e64dc959939e3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 14 15:13:22 2008 -0800 + + XQuartz: Actually add glcontextmodes.[hc] + (cherry picked from commit 763195d338345e3637d112279bdbe002b6e7791a) + +commit aedafbea0e1c7bc780ebe7ae878f62525769aca8 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 20:21:24 2008 -0700 + + fix compilation on systems that don't have + XP_EVENT_SPACE_CHANGED defined + (cherry picked from commit 6e833e41e2f3a84f7e5164b918737b3975517c12) + +commit b0789365719f48c0b477b4703f2072f932246b76 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 14 14:57:09 2008 -0800 + + XQuartz: Initial work on readding GLX to the 1.5 server + (cherry picked from commit a186cab6ae82340770c13b37ff5df731ce2a0ceb) + +commit 1d7049f8fd3c0798250b9213149d3ce0b37ab77f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Nov 13 12:45:35 2008 -0800 + + Xquartz: Force sending mouse clicks to AppKit if we're over the menu bar + (cherry picked from commit 7dff93ec1ac92aeaf3b70d5cfe787fa4a28c0dba) + +commit 3c124832642f1ec3228a57bea3d1eda68a188ff3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 20 10:37:17 2008 -0700 + + XQuartz: Made X11Application.m a little more tidy. + (cherry picked from commit 3520386261b838196a8918e8bee16bdccbc9781d) + +commit e917806fc556c2054b2835c8f85770b554c78092 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Nov 14 10:56:21 2008 -0800 + + os/connection: TRANS_NOXAUTH bit comparison brainfart fix. + + https://bugs.freedesktop.org/show_bug.cgi?id=18524 + +commit 17bccff4ce905f46c074fd8ee7c6567b1371a0a1 +Author: Fernando Carrijo <fcarrijo@yahoo.com.br> +Date: Fri Nov 14 12:36:20 2008 -0500 + + [dix] Remove a duplicate statement. + + Signed-off-by: James Cloos <cloos@jhcloos.com> + +commit ba4e08244ed3923eecf26842dfc1df17c696e053 +Merge: 81fd17f 5bad5d2 +Author: Alex Deucher <alexdeucher@gmail.com> +Date: Thu Nov 13 15:04:18 2008 -0500 + + Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/./xserver + +commit 81fd17f5f49cdd2c10d0bf3b7ddeb8b5953886a5 +Author: Alex Deucher <alexdeucher@gmail.com> +Date: Thu Nov 13 15:00:30 2008 -0500 + + Only add default modes if EDID supports continuous-frequency + + When an EDID is present, only add the default mode pool if the + continuous-frequency bit is set in the EDID. Should fix bugs + like 18512. + +commit c232f3d673fb00d7fceb8e82741349d64e5ac0ad +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Nov 13 14:58:21 2008 -0500 + + xf86TargetExact should try harder if there's only one monitor attached. + + If there's no preferred mode, but only one monitor, pick the + biggest mode for its aspect ratio, assuming one exists. + +commit 5bad5d2abea2f51cbf53dc8dd016e90ccb086220 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Nov 13 11:32:40 2008 -0800 + + XQuartz: Fixed XBell() when not using system alert. + (cherry picked from commit aa0e9ab1c7a226cdcb3c5e62be159355a290faf8) + +commit 0fca8588a238c91580b305c3671567e910150a02 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Nov 13 11:10:15 2008 -0800 + + XQuartz: Added more debugging to handoff spew + (cherry picked from commit acefa7e3c8706ffedc052effd50b36ce10e72c22) + +commit 47d38218706564d1437dc3ff9d1bba3511db063c +Author: George Staplin <gstaplin@apple.com> +Date: Wed Nov 12 17:17:25 2008 -0700 + + XQuartz: GL: Handle the alpha differently when the alpha is equal to GLCAPS_COLOR_BUF_INVALID_VALUE. + + This prevents visuals with odd sizes. The machine I use didn't have + this problem, but it shows up on some others. + (cherry picked from commit ed181382ddeb77019577d39b9c06b1cd839e18e4) + +commit 6b501d7cc55f1d06966cdf3caf36bcfc6cf18939 +Author: Alex Deucher <alexdeucher@gmail.com> +Date: Thu Nov 13 13:57:30 2008 -0500 + + Add missing newline when printing edid info + +commit 33edd32702d963802e64d382124eabb9d0352fa8 +Author: George Staplin <gstaplin@apple.com> +Date: Sun Nov 9 18:35:10 2008 -0700 + + XQuartz: Disable 2 calls to miSetVisualTypesAndMasks that seem to be unnecessary, and possibly wrong (with regard to masks and bits per RGB). + + Use the settings queried from the system in xprScreen.c, rather than those 2 calls. + + The 2 calls increased the total number of visuals a great deal (when using GLXEXT), + and not all of the visuals were usable with GLX. Some of the visuals aren't usable + with GLX still, such as DirectColor, but that seems to be acceptable based on my + understanding of the manual that states "a subset of visuals are made available + for OpenGL rendering." + (cherry picked from commit 373b8a5f32509722e06d8776109e6c3f06645ee0) + +commit 1523476afa6657c20eba112e3ee051d45e721164 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Nov 8 23:32:40 2008 -0800 + + XQuartz: CFBundleShortVersionString needs to conform to X.Y.Z as well... sigh + (cherry picked from commit 54d20f6d33c347bcb37a0a8287c2d92fed2b9092) + +commit 1f301a0051d65296189248b2529616d9b33276b3 +Author: George Staplin <gstaplin@apple.com> +Date: Thu Nov 13 01:27:33 2008 -0700 + + XQuartz: Restore the logic of AppleWMDoReorderWindow to the same as the 1.4 branch. + + It was returning inverted values in comparison to the 1.4 branch. This resulted in + the windows not drawing due to a deep path of: RootlessReorderWindow -> + SCREENREC(pScreen)->imp->DoReorderWindow(winRec) - > xprDoReorderWindow -> + AppleWMDoReorderWindow. + (cherry picked from commit d1d398db762fe7d5720f9b5fafa2bbe8372fceac) + +commit f5841e96487234df5ead5f5c0fb3c587c418cb46 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Nov 11 22:50:35 2008 +1000 + + dix: don't store enter/leave and focus semaphores in a devPrivate. + + We need them for each window, every time a window is allocated. Storing them + in a devPrivate is the wrong thing to do. + + This also removes the unused ENTER_LEAVE_SEMAPHORE_ISSET macro. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 26f701704b4e536cd91bd8a9f7d2194793471998 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 12 16:53:29 2008 +1000 + + dix: remove duplicate line in EnterLeaveEvent. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 8ff62ea5ba1bc331c886840b2b1e101cb4f2ebed +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Nov 12 15:19:09 2008 -0500 + + CopySubBuffer expects GL style coordinates. + +commit d91243beb63008fff2ce6affa7db091786e8c49a +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Nov 7 08:39:38 2008 +1030 + + dix: formatting fix. + +commit dde09076c5c0c36a4a9321cd23a2c7922c4c755b +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Nov 5 12:52:03 2008 +1030 + + dix: remove superfluous variable devgrab + + grab == devgrab anyway, this is a leftover from the time when we had two + different grabs per device (core and XI grab). + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit fc3e8bfb82323477b54181c6d546c90f53f1ebd8 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Nov 4 15:27:30 2008 +1030 + + mi: clean up mieqProcessInputEvents, copy all events before processing. + + Copy the EventRec's information into local variables before processing them, + this should make it safer for upcoming threading and also makes it easier to + read. + + Simplify the event allocation code from the abyss it was before. + + This also fixes a potential bug where a custom handler could scramble the + event before the same -now scrambled- event was then passed through the + master's custom event handler. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 31005efb1bb6be5a892ff905f754109dc3fa8fe6 +Author: Fernando Carrijo <fcarrijo@yahoo.com.br> +Date: Mon Nov 10 13:23:45 2008 -0500 + + input: Remove useless conditional. + +commit 24383056d0513cc588cee5cee78f1cba2c0fbe89 +Author: James Cloos <cloos@jhcloos.com> +Date: Sat Nov 8 13:04:20 2008 -0500 + + Don’t recommend fixing HAL if HAL support is disabled. + + As reported in http://bugs.freedesktop.org/show_bug.cgi?id=18438 + the server suggests reconfiguring HAL if AllowEmptyInput is enabled + and no input devices are known. + + Instead of that notice, if HAL is disabled at configure time, + AllowEmptyInput is enabled in the config and no input devices are + found report those facts and recommend disabling AllowEmptyInput. + +commit b3c7e62664457a3802ebc23785446051624a8c2f +Author: James Cloos <cloos@jhcloos.com> +Date: Sat Nov 8 12:18:13 2008 -0500 + + Remove some null statements. + + Remove several doubled statement-terminal semicolons. + + Reported by Fernando Carrijo. + +commit 21c116219cd5c6845a0955f2d88fdb5fab5c17cf +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Nov 8 01:25:14 2008 +0100 + + Fix typos which caused exaCompositeRects() to use an incorrect damage region. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18065 . + + Also, it can bail if either width or height of the bounding box is <= 0, not + only if both of them are. + +commit 59f9fb4b8c031df69b3592a26b77e744ff4a556e +Author: Luc Verhaegen <libv@skynet.be> +Date: Fri Nov 7 19:11:11 2008 +0100 + + XAA PixmapOps: Sync before accessing unwrapped callbacks. + + When using any XAAPixmapOps, we call into unknown but freshly + unwrapped callbacks (like fb ones). Unlike the XAA*Fallback calls, + we did so without syncing first, exposing us to all kinds of + synchronisation issues. + + I believe that the rendering errors appeared now because *PaintWindow + vanished (e4d11e58), and we just use miPaintWindow instead. This + takes a less direct route to the hw and ends up at + PolyFillRectPixmap, which very often left drawing artifacts. + + We now sync accordingly, and no longer get the rendering artifacts i + was methodically reproducing on radeonhd, radeon, unichrome... + + Also, in order to allow driver authors to remove extensive syncing + or flushing to hide this issue, create XAA_VERSION_ defines, put + them in xaa.h and bump the patchlevel. + + (novell bug #435791) + +commit 991c88b7542164194be73573e7644164416ea90c +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Nov 7 17:36:38 2008 +0100 + + xfree86: xf86SetDepthBpp needs to respect the driver's depth24flags + + When setting the depth to 24, leave bpp unset so the logic to pick + a supported value is used instead of ignoring the driver's preference + and forcing 32 bpp. + +commit d3d6be4948fa19947fd3b03e6694247109cc0ffb +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Nov 7 18:36:00 2008 +0100 + + mi: Fix infinite loop on regen when swrast_dri.so is missing + + The swrast DRI provider gets pushed on the glx provider stack at every + server generation, so the stack turns into a circular list on regen. + + X.Org bug#18388 <https://bugs.freedesktop.org/show_bug.cgi?id=18388> + +commit f59352881f315a634f60c9aac885b2764b28b167 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Nov 6 14:41:55 2008 -0800 + + XQuartz: Make LS parse our version properly... it didn't like our CFBundleVersion + (cherry picked from commit 980df1b4ff7d4dab9dc1462dc086542265b1fb1b) + +commit b4ca9dc2393ace2415163094b916f0d17ecba9ee +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 5 21:58:04 2008 -0800 + + When HAL returns a NULL property, print "(null)" instead of a NULL pointer + + They've promised to fix Solaris printf soon to check for NULL pointers + instead of segfaulting, but that won't help people on existing releases. + +commit 13d06f5aaf6120c902a323649615c1ce3d1b5359 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Tue Nov 4 12:53:12 2008 -0700 + + XQuartz: GL: Add capability detection for depth buffers, and multisampling. + + GL/capabilities.c: Add handleDepthModes(), and extend + handleRendererDescription() for the various depth and multisampling flags. + + Add initialization of the new config options to initConfig(). + + GL/capabilities.h: Add depth and multisample config members. + + GL/visualConfigs.c: Add depth and multisampling support to the visual config + setup. + (cherry picked from commit f527381eea6a8ae6cd791475b2060d21fcf8efb2) + +commit 34bb06b292dc8b07d8602941aab3e69a73811314 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Nov 3 19:52:48 2008 -0700 + + XQuartz: GL: Work around problems with really deep visuals. + + GL/capabilities.c: #if 0 (for now) any capabilities above 8 bits per channel, + because they introduce drawing problems. + + GL/indirect.c: Comment out some visual setup code that shouldn't be running, and + actually seemed to cause some problems. The current visualConfigs.c code seems + to do a reasonable job of setting up visuals for XQuartz. + + GL/visualConfigs.c: Make use of the proper visual .class. Eliminate depth 0. + It seems we really just want 24 for now, and 0 I think was a flaw in the original + code. + (cherry picked from commit 1e5f63f15e13a40a6e69a1505934d10d6990b6a2) + +commit 39e82a9b1250b23768136f3c397377a97f8b908c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Nov 2 15:52:22 2008 -0800 + + XQuartz: Replace deprecated API usage thanks to Robery Murphy + (cherry picked from commit 71dd052412400362793f2f0c7c02bf4f4309738c) + +commit b4db46320a437ba8894cb8cfd4ee3abdcc894b01 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 20:18:27 2008 -0700 + + XQuartz: version string updated for 2.3.2_beta3 + (cherry picked from commit 81bb4128570b44d779126a8dffcd3c5620747383) + +commit c9051b684b524549eab6d5b88ee3e195a6f6fbe8 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 5 18:25:57 2008 -0800 + + Use OsSignal in Popen/Pclose to avoid SysV signal() stupidity + +commit d63ea510138c8b6de66184c78cda39ed9981fc1f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 5 14:52:29 2008 -0800 + + Non-Linux OS'es should default to kbd driver, not now-dead keyboard driver + +commit 446d9443cea31e493d05c939d0128a8116788468 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Nov 5 11:51:06 2008 -0500 + + linux: Drain the console fd of data when using evdev for keyboards + + Works around a silly bug in the kernel that causes wakeup storms after + too many keypresses. Should fix the kernel bug too, but this at least + keeps the idle wakeup count below 1000/sec. + +commit 6d21fbf00648307208146aca0837ec63ea490659 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Nov 5 11:39:46 2008 -0500 + + kdrive: Bye bye Xvesa + +commit 9a874a71a791c6110fd57b8a5c083f777a446d0f +Author: Egbert Eich <eich@freedesktop.org> +Date: Tue Nov 4 21:31:27 2008 +0100 + + DDX/RandR: When positioning outputs assume width/height = 0 if no modes exist. + + When a user specifies the position of an output for which no modes exist + (for whatever reason) assume that the width and height of this output + is 0. The result will be the same as if this output isn't taken into + consideration at all and thus should be sane. It will prevent a segfault + when trying to determine the width and height of a non-existent mode. + +commit a4d62bbf215894bad8e19d99f7330c637d3d49e3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Nov 4 11:27:53 2008 +0100 + + AIGLX: Reinstate call to driver texOffsetFinish hook. + + It was accidentally lost when factoring out __glXDRIdoReleaseTexImage, so this + is a regression fix and should probably be backported to server-1.5-branch. + +commit 27f1ad466cd9662d638f4a8e59beafc32a8b2a8f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Nov 4 11:26:03 2008 +0100 + + AIGLX: Don't truncate offset returned by driver texOffsetStart hook on 32 bit. + +commit de1a8b68eb10c39a0d4a197107d68d7cc009edb2 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Nov 3 11:30:48 2008 +1030 + + xkb: extract the correct device in XkbFilterEvents. + + If the event is an XI event, we need to work on the correct device, not on + the VCK. + + Adds XIGetDevice(event) function to extract the device from an event. + +commit d97239956667f8181f30271759573b75bf455fbb +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 16:40:41 2008 +1030 + + Purge device-based WindowAccess code. + + Really, this was a bad idea. It's not security, the UI features that would + have been cool (e.g. clicking through windows) aren't implemented anyway, and + there's nothing you can't achieve just by using plain XI anyway. + + Requires inputproto 1.9.99.6. + +commit cbc6f983959595aa21c9dd72fac6a7070a650ef7 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 14:36:48 2008 +1030 + + xkb: when faking mouse button events, fake them on the correct devices. + + When MouseKeys are activated, keyboard devices may generate fake mouse button + events through XKB. Let's get then running through the appropriate paths, i.e. + as XI events on the correct device. + + To make matters more fun, ProcessOtherEvents drops events if the DIX device + state cannot be updated accordingly, i.e. all button events from keyboard + devices. + Hence we need to get the paired MD for the device in XkbDDXFakeDeviceButton, + and post the event through the paired MD (usually the VCP). + + Removes now-unused ddxFakeBtn.c. + + Note: this patch only half-arsedly fixed button events, motion events are a + more complicated matter. + +commit 4971315296cbf868dd738c1c0c1c504fcfe1b619 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Nov 3 17:47:36 2008 +1030 + + dix: clean up GetPointerEvents and GetKeyboardValuatorEvents. + + Split into several functions, remove some stale comments. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 6bb0e0a53656db6168a053fb51b242a8640c1461 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 24 16:22:09 2008 +1030 + + xnest: I'm sure xfree works fine, even if we're 64 bit. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 67b7e06c4fa4e8dafb64d9f3eb976836d0cc5889 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 25 19:39:48 2008 +0300 + + XKB: Remove pointless macros + + These weren't even being used, which isn't overly surprising, given that + they were already in the struct. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit d9ff20e323ba9fb309629ac21946e85709625589 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Oct 23 16:48:15 2008 +1030 + + DIX: Remove unnecessary prototype + + We don't call XkbCopyKeymap from getevents.c anymore, so axe it. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 064ee458c7183eb91ef2e0f262b312ba1e3ad6e5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 9 15:54:56 2008 +0300 + + XKB: Tiny cleanups to _XkbLookupAnyDevice + + A couple of coding style cleanups, a warning fix via removing a + now-unused label, and also put an else so we don't spuriously trip a + condition that should admittedly never occur anyway. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 97c9e6a7139e07a0761be05034fae42fcd65ba36 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 28 17:10:28 2008 +0200 + + XKB: Fix thinko, causing warning (erroneously fixed in 5544c51447) + + newTypes is a local variable which always has an address. newTypesIn, + on the other hand, might be sus. + + See also 5544c51447f551dfc6df64438873a7ce64743976. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit caf1e6a1c92a2e70de9159f93d6f5b48c202dd81 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Mar 18 10:05:00 2008 +0200 + + XKB: Move XKBrules.h to the server too + + Get our own local copy of this, so we don't have to define XKB_IN_SERVER + anymore. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit f4036f6ace5f770f0fe6a6e3dc3749051a81325a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 22 22:40:44 2008 +1030 + + Remove XEvIE + + It's unmaintained and has been broken for quite a while; MPX finally + smashed it completely. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 8c3753a0b711b5708b61f64ab4010ca01608d679 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 22 22:29:54 2008 +1030 + + A bit of whitespace cleanup in include directives. + + It's #include <foo>, not # include <foo> + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 889a8dc02bbd3926eaf16dce8f844dc58558e982 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 22 22:29:54 2008 +1030 + + Xi: XINPUT has been mandatory for ages + + Ditch all #ifdef XINPUT, since it's always built. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 4cf2f4172abc4bf848c1726e6dac535713e08f0b +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 3 12:50:28 2008 -0500 + + Add xf86MonitorIsHDMI() helper. + +commit a7951a4dad902edea76a5cd68f833f0e48ae804b +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Nov 3 10:00:54 2008 +0100 + + AIGLX: Allow 2D driver to prevent zero-copy texturing of a pixmap. + + The driver can return ~0ULL to achieve this, e.g. if the pixmap doesn't fit + into offscreen storage or if its pixel format isn't supported by the 3D engine + for texturing. + + See http://bugs.freedesktop.org/show_bug.cgi?id=17723 or + http://bugs.freedesktop.org/show_bug.cgi?id=12385 . + +commit f8af66ddb21b4fb1ae5b4f7f852418ca7b0e7aec +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 20:03:34 2008 -0700 + + XQuartz: Add option to allow access to the menu in fullscreen mode + (cherry picked from commit 637a9f4bd1ff2b55c870a08ead4940df0f9818e5) + +commit c5086badf0387d4d5af10882de90a1faa180550f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 18:58:57 2008 -0700 + + XQuartz: LP64 related casting fixes from Bob Murphy + (cherry picked from commit ea71710aaa7166ab510abe70f2dc47942de0ead7) + +commit 20239a4deebccc9f86586ef6b8ef61311a6fa6a0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 18:58:25 2008 -0700 + + Rootless: LP64 related casting fixes from Bob Murphy + (cherry picked from commit 40441c4e31167932721a79d7ca572caaa1d36e72) + +commit ecd55bc859eb5d7c639d5a6d531d9df524124247 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 15:10:34 2008 -0700 + + XQuartz: displayScreenBounds uses quartzEnableRootless rather than !quartzHasRoot + (cherry picked from commit c883a78ef0c2e7e29437881db85d3815a89ab874) + +commit 4e762b8aa37b588e6cffcdd4a0152090190005e2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 14:39:54 2008 -0700 + + Rootless: Force initialization of static variable before use. + (cherry picked from commit cece29317269385aa7a0d3047e6f90e6a17d01eb) + +commit 9f49f5172d10070ebd4a9e72ac3c5227c6f35853 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 13:00:01 2008 -0700 + + XQuartz: Silence pointer debug spam + (cherry picked from commit 9ca099e928653b5a0fb745186e17bfcc3d74ccc0) + +commit 93298c7f8f73bdb9892da0e41d2c2a67719dc736 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 12:55:46 2008 -0700 + + XQuartz: Don't map the menu bar to the screen area. + (cherry picked from commit 1115917ada127a1cd6a8b61efe7fd134e2ea85fd) + +commit 31907986a6d4dc726d8ce0071f5884ce6cfea33b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 31 12:37:32 2008 -0700 + + XQuartz: Fixed Xplugin thread safety issues, so rea-enable background window check + (cherry picked from commit 5fc73b1141eca8b678e54412ca33afa31a76d088) + +commit 227d782a1bddfa1393cddd0c73c0288e18645c47 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Oct 30 13:44:55 2008 -0600 + + XQuartz: GL: Mark visuals that are slower than others, due to lack of acceleration. + + This is used in libGL to determine a preferred visual. glxinfo -v will also + report "visualCaveat=Slow" for such visuals. + (cherry picked from commit d5c17f585a240be9f9135975738e62951cde3353) + +commit 5287602a4161cd036e3125cda09ba750190a0b47 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Oct 29 17:20:11 2008 -0700 + + XQuartz: if 0 out a block to avoid thread-unsafe lockups + (cherry picked from commit 60d7359a67900ad4601dbc73e07bcd8c803100a5) + +commit 93d7cd31c527afbf26f4e039afb6adbb6a60fab7 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Oct 29 17:18:05 2008 -0700 + + XQuartz: Purge the old XQUARTZ_EXPORTS_LAUNCHD_FD option + (cherry picked from commit 490756c7fbe0792c4bd6ae434e7a48e0beffa5c7) + +commit 0a076b6a7f3c97ff712412eee32e013d3bfd7364 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 18:32:26 2008 +1030 + + xkb: remove unused label "out", clean up program flow. + +commit 971aef64416058665bc903fee39fea1619cd3727 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 17:05:40 2008 +1030 + + dix: FreeDeviceClass() and friends can be static. + +commit 3c3a47d0f5ce7fb9548a3eefee9e72488d3ac279 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 17:00:21 2008 +1030 + + include: remove unused declaration for RegisterPairingClient(). + + Matching functions got removed in 004876355b43fb4d3c2bc5653a7dc1bfd3f985ee. + +commit 7c5dec9f716962a6e67dba99418061cebe10e1d2 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 16:56:49 2008 +1030 + + dix: remove unused GuessFreePointerDevice(). + + Not used since the MD/SD hierarchy was introduced many moons ago. + +commit 12599af285a610fb429245798330f2317c75ac2c +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 16:50:28 2008 +1030 + + dix: NextFreePointerDevice() can be static. + +commit 5d0a945a030cd7626046e9f6c8d5c6bd170649d9 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 16:29:42 2008 +1030 + + dix: SwitchCorePointer is long gone, bury it. + +commit eb014021c2b3604fc67daebd6860b5dc959fabb6 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 16:27:58 2008 +1030 + + dix: PairDevices() can be static, remove from input. + + PairDevices() is only ever called in EnableDevice(). + +commit b6b26560d65d9468c89dd046396d9aeb14e1b227 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 16:23:34 2008 +1030 + + Move EXTENSION_BASE and EXTENSION_EVENT_BASE to misc.h. + +commit f781a752e642cfe7d08f841b332c3ae507315598 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 16:16:18 2008 +1030 + + Move MAX_DEVICES to misc.h, rename to MAXDEVICES for consistency. + +commit 245d1c162c7b13c98a9a28dc7ad441366d7e8006 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 31 11:50:47 2008 +1030 + + xkb: ProcXkbSetCompatMap should do dry-runs, then normal runs. + + Was doing only dry-runs, which kinda explains why changing the compat map + didn't really have any effect. + Fallout from e8c2a3d7c996cb41c4c44ba67acae5ff9438fc06. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 70e18a3b6b9d52169bca650f6cd4ef5d8ab40d95 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Oct 30 20:38:34 2008 -0700 + + Refactor Solaris mapping code to work with standard shared/vidmem.c + + Also merge sun_bios.c into sun_vid.c and upstream Solaris patch to + keep aperture device open, to allow mappings to occur after X server + has given up uid 0. + +commit 2809a56b4bc7f09f132c70dc39c6695495351c4d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 30 16:05:40 2008 -0400 + + xace: Fix an incorrect call to the RECEIVE_ACCESS hook. + +commit 0f2fd0577fe2740a32d3a2749e2c3582f891417c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 30 15:35:33 2008 -0400 + + xselinux: send more specific message types to libaudit. + +commit 4ce19b4477057a724b548e342d4c6da2b6721824 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 30 16:02:13 2008 +1030 + + xfree86: fix xf86ScaleAxis once again. + + Maybe one day I stop doing stupid patches like + a3a7c12fcf8e4ac1418f9ea53f76091f309a721b. + + So, if X < low, reset to low, and _not_ to high. + If X > high, reset to high, and _not_ to low. + +commit f12d7ad1647d12ccf92291ebc0607defe6a634a1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 28 12:38:05 2008 -0700 + + XQuartz: Pass along SIGINT and SIGTERM from the stub to X11.app + (cherry picked from commit 183ca5d68b4f34e248749f304ce140de11bd451b) + +commit 273df54685768f74ed29926e88a63dc9f86744f1 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Oct 27 22:07:00 2008 -0600 + + XQuartz: pbproxy: Fix a bug that prevented nedit CLIPBOARD from being proxied. + + It seems that we were calling copy_completed: too soon. Now we return instead + of falling through to the free_propdata, and copy_completed:. + (cherry picked from commit 5797d5b662817a3369a74a673f4a7c995cde75cf) + +commit 313d87341aff2396645d2c315086d487c0073d27 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Oct 27 20:44:02 2008 -0600 + + XQuartz: pbproxy: Work around bugs in some apps that aren't ICCCM compliant. + + Eterm ends up setting the type of the property to TARGETS, instead of ATOM. + That's why it wasn't working. + (cherry picked from commit 9be5998ede7427f14dd9597e117b3d6b427ba4e5) + +commit 9007d3beea2e2d8b271f696d433cb30e32cda401 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Oct 27 16:34:24 2008 -0600 + + XQuartz: pbproxy: Add code to handle PICT conversion to PNG and JPEG. + + This may work, unfortunately I don't have test apps that fail. + + The way it works is by using an NSImage class initWithPasteboard: + method, which we then get the TIFFRepresentation of, and convert + to PNG or JPEG. + + The TIFFRepresentation uses NSTIFFCompressionNone; which should be + lossless. + (cherry picked from commit 8d048cfa956f4a0860250cc836a6748912b37ad8) + +commit b742da0b719198a42a086049771792af84f470ca +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Oct 26 13:17:49 2008 -0700 + + XQuartz: pbproxy: fixed blocking + (cherry picked from commit bb330a1b1c480e89727fb75ff5aeb71f4afc5ee3) + +commit c885110aedc19e551de22a526397d77013c3dfcb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Oct 26 10:22:12 2008 -0700 + + Xquartz: pbproxy: Some debugging about unhandled mime types... this will spam up quick, but will be useful for a while... + (cherry picked from commit 3647215310f5a52126661b9ec473dcfeed25b40f) + +commit e7c26964eef6732c9603b26b7396f95443c5ba8a +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Fri Oct 24 19:12:05 2008 -0600 + + XQuartz: GL: Fix several error handling mistakes in handleRenderDescriptions, that were leftover before the final code evolved. + (cherry picked from commit fe35a3639081dc78ac6cc4123cde37770f6a39fd) + +commit 21ea9d82aab8ff0e0d1904d188f96f9cfb2b051d +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Fri Oct 24 18:11:46 2008 -0600 + + XQuartz: GL: Add feature detection of color sizes, and accum sizes. + + This gives us a *lot* more visuals, and they should be more accurate. + Some of the visuals may have been wrong before. This may enable more + OpenGL programs to behave correctly. + + I also suspect libGL needs a little work to handle some of these correctly. + (cherry picked from commit 98a084ce9c455260ecdb5f8eecb67f33dbb53b69) + +commit c264826da96ad1859dd112b17eb8aa9e5278478f +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 16 11:22:29 2008 +1030 + + xfree86: If AEI is on, disable "kbd" and "mouse" devices. + + This consists of two parts: + In the implicit server layout, ignore those drivers when looking for a core + device. + + And after finishing the server layout, run through the list of devices and + remove any that use mouse or kbd. + + AEI is mutually exclusive with the kbd and mouse drivers, so pick either - or. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 6c451859552e1fc78f6589617482f9ff96d7ed8a +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Oct 20 12:19:55 2008 +1030 + + config: don't add duplicate devices through HAL. + + If HAL is restarted, the device list is sent to the server again, leading + first to duplicate devices (and thus duplicate events), and later to a + FatalError "Too many input devices." + + dev->config_info contains the UDI for the device. If the UDI of a new devices + is equal to one we already have in the device list, just ignore it. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 102c4dac7c521941f52652152b1660cd7f559d56 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 13:17:31 2008 +0100 + + x86emu: fix sparse warnings + + ops2.c:113:18: warning: Using plain integer as NULL pointer + ops2.c:207:18: warning: Using plain integer as NULL pointer + +commit ffaaa1a198a77eb6800c08d4613ee1cc0b068ba0 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 13:13:21 2008 +0100 + + xfree86: fix compiler warnings in DoModalias() + + The precedence of == is higher than that of &, so that code was + probably buggy. + + xf86Init.c: In function 'DoModalias': + xf86Init.c:300: warning: suggest parentheses around comparison in operand of & + xf86Init.c:304: warning: suggest parentheses around comparison in operand of & + xf86Init.c:308: warning: suggest parentheses around comparison in operand of & + +commit 66fd05acd6118102aaaebc230d5c03e0758c6089 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 13:11:41 2008 +0100 + + xfree86: Silence compiler warnings about function prototypes + + xf86Init.c:136: warning: function declaration isn't a prototype + xf86Init.c:243: warning: function declaration isn't a prototype + xf86Init.c:249: warning: function declaration isn't a prototype + +commit 4b96ba8ddf36f84d4b8c0f2964535bd90477a742 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:56:35 2008 +0100 + + Nuke unused miBankNewSerialNumber + +commit e85d5d707d51d6a1558dfcf0ebd50183b84be39d +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:55:50 2008 +0100 + + Ansify declaration of FontToXError() + +commit 30a7a06a9e91a91b8517f67897831c1407713e57 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:38:44 2008 +0100 + + Nuke prototype for nonexistent function + + miDoInitVisuals was removed in commit + 94825ad3c72a1c3f6a61199c302841f63241cf87, but its prototype was left. + +commit 5244690a5e0285b6243ee1f28ae6c8287a32b73d +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:37:11 2008 +0100 + + Add prototypes for strlcpy/strlcat + +commit eadf90aa65d1ea63ddcd74e60e66a79ad567c7e8 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:20:33 2008 +0100 + + xaa: Fix compiler warning (implicit declaration) + + xaaInit.c: In function 'XAAInit': + xaaInit.c:201: warning: implicit declaration of function 'miInitializeCompositeWrapper' + xaaInit.c:201: warning: nested extern declaration of 'miInitializeCompositeWrapper' + +commit aee514cfb5e5a59b7770699765ccdad8fe42f904 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:16:05 2008 +0100 + + xfree86: Fix compiler warnings (implicit declarations) + + Add missing includes to fix the following warnings: + xf86DGA.c: In function 'DGAProcessKeyboardEvent': + xf86DGA.c:1050: warning: implicit declaration of function 'UpdateDeviceState' + xf86DGA.c:1050: warning: nested extern declaration of 'UpdateDeviceState' + xf86Xinput.c: In function 'xf86ActivateDevice': + xf86Xinput.c:303: warning: implicit declaration of function 'AssignTypeAndName' + xf86Xinput.c:303: warning: nested extern declaration of 'AssignTypeAndName' + xf86Xinput.c:311: warning: implicit declaration of function 'DeviceIsPointerType' + xf86Xinput.c:311: warning: nested extern declaration of 'DeviceIsPointerType' + xf86Xinput.c:324: warning: implicit declaration of function 'XkbSetExtension' + xf86Xinput.c:324: warning: nested extern declaration of 'XkbSetExtension' + +commit add946daed531e29935593fb2e7ee70286185baf +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:14:40 2008 +0100 + + Nuke unused variables + +commit f2bda61c03f64133ef68dd1557b26ae7dc5beb0e +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Oct 26 11:05:13 2008 +0100 + + Xext: Fix compiler warnings + + Make GEClientGone static and include registry.h, to fix the following + warnings: + geext.c:225: warning: no previous prototype for 'GEClientGone' + geext.c: In function 'GEExtensionInit': + geext.c:280: warning: implicit declaration of function 'RegisterResourceName' + geext.c:280: warning: nested extern declaration of 'RegisterResourceName' + +commit 24e863b0eb6ff11010a14cfd252a39df87a09d0e +Author: Bernhard R. Link <brlink@debian.org> +Date: Sun Oct 26 00:19:34 2008 +0200 + + Bug#16501: autodetection of sbus graphic cards + + Add automatic detection of the graphic driver to load for sbus devices. + This allows xorg to work on those devices without a "Device" section. + + Debian bug#483942. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit fd97ff1bdd30c358525068a4c833f681e00719a2 +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Oct 25 22:54:15 2008 +0200 + + Bug#5851: Document the "Log" option in xorg.conf(5) + +commit 80b6768536fa439bfc5ce948bc8845a6f4af857b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 23 17:32:32 2008 -0700 + + XQuartz: Do check_xinitrc() later to avoid possible deadlock. + (cherry picked from commit af95174a088dc787d124ec548b1005f5b67c9e8d) + +commit d837d4e2af35a83c7932e4d0422097ebd1f6ba2c +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Oct 23 17:56:46 2008 -0600 + + XQuartz: pbproxy: pbproxy.h had invalid macro usage with 2 #else statements, so it wasn't building. Fix the build. + (cherry picked from commit 6bcbb9ba85d95d7df63811a482abc39c4d595366) + +commit 6a2693b2f9cfdec6f30e2ca4c4176f986f97249e +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Oct 23 17:40:23 2008 -0600 + + XQuartz: Remove the enable_stereo default. We now use feature detection to enable stereo visuals. + + We need to revisit the GL/indirect.c changes. I think indirect.c should + be using the same feature detection and GLX visual config code. The + indirect changes will require testing... + (cherry picked from commit 49b7a7c6f20ca85d4d624444eb83db2f91344591) + +commit b015a021b28623b7b734833dc9b8269c41db4e8a +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Oct 21 20:30:35 2008 -0700 + + Allow non-gcc compilers to build xf86Xinput.c + +commit b7cc6ca22a4ff7a94abee6962a07fdd0b563d26a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 23 16:33:11 2008 -0700 + + miext/rootless: Silence some warnings by using proper C prototypes. + (cherry picked from commit 050e46e09efcc7e6f090fa4a749e9076c972b760) + +commit b397cc727787a854417b11b482cce4807fc8ab58 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Oct 23 16:19:58 2008 -0600 + + miext/rootless: Fix the usage of DeleteProperty so that this builds again. + (cherry picked from commit 3de250e28a9a86bcae4464a15c2025805877ce1e) + +commit 28d4f71193d2be26d1dcae724067539ac9db1123 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 23 15:01:03 2008 -0700 + + XQuartz: pbproxy: Fix compilation on case-sensitive file systems... + (cherry picked from commit 6622efca216663c99d112c7a226bde691d1f3215) + +commit 40f9b6bf0dc62098680235a958e0733770902cca +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 23 17:33:52 2008 -0400 + + Argh, macros. + +commit 8b3c278fe7502f9343355f09213837622b0d9ca0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 23 11:39:04 2008 -0700 + + Rootless: Properly typed expose_1 + (cherry picked from commit 78e874fe17174ac8f61586573edaf7f16ece7b21) + +commit 3e999d35c26b0ffb894c257a3057d44b949744bd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 23 11:37:13 2008 -0700 + + XQuartz: Honor the Spaces preference for "When switching to an application, switch to a space with open windows for the application" + (cherry picked from commit bf561a06b2bf60395d26026ac7627d0cb254bc07) + +commit 75067d12e4f4daa080dfb0209a9abf9c5654271f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 21 19:36:48 2008 -0700 + + XQuartz: Added missing semicolons to Localizable.strings + (cherry picked from commit e9fe3f36d9529f00daeefa1379cdd6f01a88f410) + +commit a003932dccc438c4500d383982cee2376e808bd5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 21 11:23:42 2008 -0700 + + XQuartz: Default dpi to 96 instead of 75 + (cherry picked from commit 08a5a333d7fea68146cd9cf50682b811378ab3ce) + +commit 2d764e21f278ea26bae135db6dae07b94651951c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 21 11:19:06 2008 -0700 + + XQuartz: pbproxy: SIGHUP reloads preferences. + (cherry picked from commit cbc0935ef74ebd76ed3db16d6ab86043eeed42a3) + +commit 0b695262176e96f508921905ee7f9cc086c7daf0 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 23 15:01:58 2008 -0400 + + Change some #define foo() -> static void foo() + +commit aab73d719a8de6b830e47c7f47860b7990ea8d03 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 23 13:20:59 2008 -0400 + + Fix previous cherry pick for API changes + +commit 8767fc8d47276c7489ae50dd556a446a462776ea +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 4 12:11:14 2008 -0700 + + Wrap AddTraps in exa and damage. + + This fine (and unused) function wasn't ever wrapped which made it not work + under exa. + + (cherry picked from commit 06e7e1d0486e8c516a9b3219a2c86026f88825fc) + +commit 4c926dbac65ceb699b91bb0d3fd0005a5854572d +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 23 22:07:37 2008 +1030 + + dix: fix two more endian issues, correct initial "enabled" value. #18111 + + EnableDevice and DisableDevice both change the property too. + + And enabled must be set to FALSE in AddInputDevice, the device is not enabled + yet. + + X.Org Bug 18111 <https://bugs.freedesktop.org/show_bug.cgi?id=18111> + +commit 084ae9e38812f19751a086eea7ce555761ae5a17 +Author: Jerome Glisse <glisse@freedesktop.org> +Date: Thu Oct 23 11:28:53 2008 +0200 + + dri2: fail at context creation if driver fail to create it's context + +commit ff60e592f003d8bc45789a1a14e86be22f5242b2 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 23 09:19:41 2008 +1030 + + dix: don't allow VCP/VCK be disabled through properties. + +commit 98f01c2abe4771d76febf8fe70111b2bddfab776 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 23 09:13:41 2008 +1030 + + dix: fix endianess issue in AddInputDevice. #18111 + + dev->enabled is a Bool. Bool is two bytes. + BOOL on the other hand is a protocol type and always 1 byte. So copy the value + into the one-byte type before passing it into XIChangeDeviceProperty. + + Found by Michel Dänzer. + + X.Org Bug 18111 <http://bugs.freedesktop.org/show_bug.cgi?id=18111> + +commit f6cbe0326c57e3c9897f17baef78199b06537c44 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Oct 22 18:16:12 2008 +1030 + + dix: init remaining three xkb fields to zero in a new client. + +commit 0b56b44addc323a00eb7cd86240cb0dd4275bcf8 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Oct 20 17:06:40 2008 +1030 + + xfree86: AllowEmptyInput is true by default - update the xf86Info defaults. + + Also set AutoAddDevices and AutoEnableDevices to their defaults. + + And in doing so, switch the rest of the defaults over to named intializers. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit d72cd753b99fae147ef4c189700fc697f1ea7fb0 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Oct 21 22:32:57 2008 +0200 + + Close well known connections in ServerAbort() + +commit 81e197b2a5457bb9f7ed72f82c2d33fd8dbfc202 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 21 16:00:32 2008 -0400 + + Bug #18159: Spell "anisotropic" correctly + +commit 3891dd892449fcdb7a514e3c5e7e763ba7e74003 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 21 13:10:44 2008 -0400 + + exa: Add exaDrawableIsOffscreen() to the driver API. + +commit c837d182c4674c01296bb7efd7d834d9dfd55f83 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 21 09:11:59 2008 -0700 + + XQuartz: Only send mouse events while in the background if we're over a visible window. + + This "breaks" xeyes but gets rid of annoying tooltips. + (cherry picked from commit 10090a132a0110fe24c8c886d9f53e6e947f8038) + +commit 2a9613980f93959eedf9396735785d4c50546e2d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 21 09:07:08 2008 -0700 + + XQuartz: More fullscreen fixes + Start in rooted mode when enabled + Make the hotkey cmd-alt-a behave + (cherry picked from commit 22a54e46176c9cbdfaaa59ef33a6ae6a9c4969ef) + +commit e4ea1494debda4d3da03864c2640921fe0430694 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Oct 20 12:23:04 2008 -0700 + + XQuartz: Cleaned up keyboard init and map reload. + (cherry picked from commit f78c9fc06cac2cc6ddfd6e9ba435dd26a57d1f51) + +commit ebb2e1449cfb382a806e04c52d42240670717069 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Oct 20 09:46:34 2008 -0700 + + XQuartz: Fixed follow-keyboard-layout + ≈ + (cherry picked from commit a9f9fbf512c9fd5a773fce402182486edc71d5ab) + +commit f67cd31d2cf1b8ad850bd21dbed5a975d77b4c54 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 21 09:29:37 2008 -0700 + + XQuartz: More progress towards fullscreen... + (cherry picked from commit 628cae86b4ad02c49d20df1e1afdcb7abcabb649) + (cherry picked from commit b47b7ab6d6d0a7f6cbf678a5755124d6b7516d3e) + +commit d434ed400986653771bbd60c224a2275bd6147ef +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 17 09:25:26 2008 -0700 + + XQuartz: Fixed missing key-equiv for Hide-Others. + (cherry picked from commit 2c4b0f9615b646712609ebef3c0851c9a22e781b) + +commit 3695f62d072e7864fdcee385c8b5ca40f2018101 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Oct 16 22:36:00 2008 -0700 + + XQuartz: Require applewmproto-1.1.1 + (cherry picked from commit ed235e3406e603a8a92c4b72f9f9018bae72ad65) + +commit f935c11398b93860461672e88814026d75b71689 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Oct 16 13:09:21 2008 -0600 + + XQuartz: pbproxy: Fix 2 bugs with the preferences. + + Add dump_prefs() for instrospection. + + Make prefs_get_bool a little more clear. + + In get_property don't assume that the Mac realloc(NULL, 0); returns + non-NULL. We shouldn't depend on implementation-defined behavior too + much. + + Add more commentary in various spots. + + Add TARGETS in the TARGETS response. I don't know why some X11 apps + do this, but it could be something that some weird toolkit/app tests + for. + + In reload_preferences add preferences synchronization, so that xpbproxy + reloads the preferences, and picks up any changes. + + Fix a typo/misspelling of the sync_clipboard_to_pasteboard preference. + (cherry picked from commit 165cbbb90c793d9335ea76f0274b1f60ad295903) + +commit 4d978af5c71430f0043b1272f8dc6344b8f03f12 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Oct 15 21:26:58 2008 -0700 + + XQuartz: Fixed window levels. + (cherry picked from commit ef4d37c73f31048dd74efee2c63fa08b92608f87) + +commit 58eacf0b7beb8c6f1971570ede0bfd3976a84665 +Author: Rémi Cardona <remi@gentoo.org> +Date: Tue Oct 21 10:07:24 2008 -0400 + + Force LC_ALL=C when building xf86DefModeSet.c + + Fixes build in not-quite-latin locales. + +commit 2188582e5ea90edb432a2f421d0a267439ba08f9 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Oct 20 09:55:24 2008 -0400 + + EXA: Avoid excessive syncing in PutImage + +commit 8d0cb507ae568c8da92f10ff1188d797bcaa3d1a +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 17 09:59:29 2008 +1030 + + dmx: avoid hilarious #define Xcalloc xcalloc game. + +commit 8a23707b866c11807e01056db97afec56e9b19c8 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Oct 17 09:15:39 2008 +1030 + + dmx: change remainder of manual EQ allocation to GetEventList(). + +commit 8de26770a41ec87c46eed2eddfde6f867d71fe1f +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Thu Oct 16 14:28:14 2008 -0400 + + RANDR: Fix output property event delivery. + +commit d936a4235c9625bd41569cef3452dd086284e0d7 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Sun Oct 12 21:58:30 2008 +1030 + + xfree86: if AllowEmptyInput is true, enable RAW mode on the console. + + Usually, the console is set to RAW in the kbd driver. If we hotplug all input + devices (i.e. the evdev driver for keyboards) and the console is left as-is. + As a result, the evdev driver must put an EVIOCGRAB on the device to avoid + characters leaking onto the console. This again breaks many things, amongst + them lirc, in-kernel mouse button emulation and HAL. + + This patch sets the console to RAW if AllowEmptyInput is on. + + Use-cases: + 1. AEI is off + 1.1. Only kbd driver is used - behaviour as-is. + 1.2. kbd and evdev driver is used: if evdev does not grab the device, + duplicate events are generated. + 2. AEI is on + 2.1. Only evdev driver is used - behaviour as-is, but evdev does not need + to grab the device anymore. + 2.2. evdev and kbd are used: duplicate key events are generated if evdev + does not grab the device. + + 1.2 is a marginal use-case that can be fixed by adding a "grab" option to the + evdev driver (update of xorg.conf is needed). + + 2.2 is an issue. If we have no ServerLayout section, AEI is on, but devices + specified in the xorg.conf are still added [1], resulting in duplicate events. + This is a common configuration and needs sorting out. + + [1] 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 84ef8ed6fbefd8d6c0aaa3c862879f9804299bd8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Oct 15 14:11:18 2008 -0700 + + XQuartz: implemented primary-on-grab and fixed clipboard-to-pasteboard + (cherry picked from commit bcb83eea729a01026d99d1cfc2b77385b5b275fd) + +commit 0195d318465d5a6a9039091bcb252202471df5a4 +Author: Luc Verhaegen <libv@skynet.be> +Date: Wed Oct 15 21:46:27 2008 +0200 + + GLX: fix build when dri2 _is_ available. + + Caught by Julien Cristau. + +commit 398cdf959afadfa964aece13cc9d89b2dd589930 +Author: Luc Verhaegen <libv@skynet.be> +Date: Wed Oct 15 18:24:10 2008 +0200 + + GLX: fix build when dri2 is not available. + +commit 2e60ebbd254290e19492b97c960d9678513c94bf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 15 14:10:51 2008 +0100 + + XFree86: Simplify DontZap/-retro interaction + + How hard could it possibly be, right? + +commit 66a87517bd80b21e107df9d57968d81a92f91fd5 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Wed Oct 15 12:00:16 2008 +0100 + + re-enable DRI2 + +commit ced6690284fd334f225bbc94685c114ad3ab96d8 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Oct 7 13:49:28 2008 -0400 + + dri2: Update to latest protocol draft. + + Mainly rename SwapBuffers to CopyRegion, which adds the xfixes region + argument and the bitmask argument to let us extend it in the future. + +commit 87a016ae00feac3fbaa7e7a518076a3852d49554 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Oct 15 00:02:13 2008 +0200 + + exa: restore {x,y}{Src,Dst} to their original values when !done + +commit b677bff97b62c3931df853bae25ab485892ae173 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 14 14:30:19 2008 -0400 + + int10: Degrade the checksum warning to X_INFO. + + I've seen about one case in three years where this has actually been + correlated with the real cause of failure, and we've trained people to + freak out about X_WARNING, so let's be less alarmist. + +commit bd9c6b3a4d726a3f83ac6d8cf7211eddbc28f25a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 14 14:04:01 2008 -0400 + + EDID: Catch even more cases of encoding aspect as size. + + Very cute, Samsung, not only do you claim to be 16cm by 9cm in the + global size record, you also claim to be 160mm by 90mm in the detailed + timings. Grrr. + +commit ad677238bc96a8578113bbe76d605d7a87aca44c +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 14 13:00:50 2008 -0400 + + Add backtrace definitions to dix-config.h.in + +commit 8e368cf5b964f1d29fda0a463f9510457619b14d +Author: Nathaniel McCallum <nathaniel@natemccallum.com> +Date: Tue Oct 14 09:50:29 2008 -0400 + + Xorg: add -modalias option + + This scans the installed video drivers and prints a Linux-style modalias + listing of the devices each driver claims to support. + +commit 3eb52de7f28b0050582f9ac4c28bc894d3f06f4b +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 14 09:45:19 2008 -0400 + + kdrive: Hardcode a different wrong value for number of mouse buttons + + This should really come from the input driver directly, but, kdrive. + +commit f3f6ea89aa9e0ffe9e37bc059e5e6bf75be4ee9f +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Oct 8 14:12:21 2008 +1030 + + Xi: check all handlers before applying property changes. + + The current code exposes to inconsistent updates, i.e. if handler N succeeds + but handler N+1 fails in setting the property, an error is returned to the + client although parts of the server now behave as if the property change + succeeded. + + This patch adds a "checkonly" parameter to the SetProperty handler. The + handlers are then called twice, once with checkonly set to TRUE. + On the checkonly run, handlers _MUST_ return error codes if the property + cannot be applied. Handlers are not permitted to actually apply the changes. + On the second run, handlers are permitted to apply property changes. + Errors codes returned on the second run are ignored. + +commit ad67e3f063aa79247270f29e989bbfe5f62c9ed7 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Sun Oct 12 10:19:36 2008 +1030 + + dix: remove duplicate code in ReleaseActiveGrabs + + Spotted by Colin Harrison. + +commit 3fc4f40b6c6cb416c9dc4bdb35c91b4f32c03ccc +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun Oct 12 16:08:26 2008 -0700 + + Restore xf86{Enable, Disable}GeneralHandler. + + These were useful as part of the generic handler ABI, and are used by the NVIDIA + driver. + + This reverts part of commit 50081d2dfb79878cb931a15c265f0d60698dfd39. + +commit 2217d22a76cdb2460f9683a6bf74c7248612889d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun Oct 12 16:07:24 2008 -0700 + + Revert "xfree86: xf86{Enable, Disable}InputHandler can be static." + + These were potentially useful as part of the input handler ABI, even if nobody + currently uses them. + + This reverts commit 278c11f01fbc6d6bd91c5a7127928c9ef5d29fca. + +commit 5b336585a4cdf11d20831a9536ad581e959ea7f1 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Oct 10 23:23:02 2008 +0200 + + dri: don't set the dixPrivate key to NULL, as this is a staticly set variable. + + - This breaks on the 2nd server generation. + - No other subsystem seems to NULL their key. + - This should fix bug 17982. + +commit b736f477f5324f79af30fc0f941ba0714a34ccda +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 10 16:33:24 2008 -0400 + + mieq: Backtrace when the queue overflows. + + Since we're probably stuck down in a driver somewhere, let's at least + try to point out where. This will need to be rethought when the input + thread work lands though. + +commit 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 10 15:53:48 2008 -0400 + + Move xorg_backtrace() up to the OS level so we can call it from DIX. + +commit f650c1aeb06e957626bb0a74eddbb133f59dbecb +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 10 14:07:28 2008 -0400 + + Revert "Don't leak EDID_block" + + This reverts commit 05cdef18ca668ffc86b71033f71cfbd262cdd994. + + http://lists.freedesktop.org/archives/xorg/2008-October/039305.html + +commit 0660dd9d7009147c395b9ea904539f76f55b9a7f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 10 13:41:50 2008 -0400 + + EDID: Catch monitors that encode aspect ratio for physical size. + + This is not legal in either EDID 1.3 or 1.4, but hey, when did a little + thing like legality stop anyone. + +commit 956a4ba40b28251ab2d88b5d5b0796e01afd2bdd +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Oct 10 00:28:34 2008 +0200 + + pixmap: Add some notes to devKind and devPrivate. + +commit 4808bdec45775342eb9a6352b41e4919e1a69279 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 9 16:23:24 2008 +1030 + + Xi: don't memcpy the KeyClassRec from SD to MD. #16167 + + Most of its component get copied during CopyKeyClass anyway. + The ones that aren't: + postdown - never changed for virtual devices anyway. + down - shouldn't change that without sending events. + + memcpy'ing the struct also copied mapWidth, which means we didn't realloc + during SetKeySymsMap lateron, overwriting the memory assigned to us. + + X.Org Bug 16167 <http://bugs.freedesktop.org/show_bug.cgi?id=16167> + +commit 18cdd733ad3dd36fa0a23dfbf18c7d99b86c0276 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 9 17:26:00 2008 +1030 + + kdrive: fix dixflags so they're always defined before enqueuing events #17734 + + If absolute events were posted, dixflags got set conditionally on whether the + valuators are different from the last posted set of values. + If dixflags are undefined however, the DIX interprets them as relative + valuators. Fix this by making sure defining dixflags is always defined. + + X.Org Bug 17724 <http://bugs.freedesktop.org/show_bug.cgi?id=17734> + +commit d58f2c30c64e8b2d8179dac06e0a54be06099da6 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 9 16:50:54 2008 +1030 + + kdrive: lastx/y needs to be set to the event coordinates #17728 + + X.Org Bug 17728 <http://bugs.freedesktop.org/show_bug.cgi?id=17728> + +commit decec14219bcd992ec426e202ff3c8681b520b74 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 9 15:10:21 2008 +1030 + + dix: silence "unused variable" compiler warning. + +commit 0b4b683f3eeec43536e73be302a4c396fe4d9894 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Oct 7 18:44:42 2008 +1030 + + xfree86: export NewInputDeviceRequest/DeleteInputDeviceRequest + + NIDR should be used to create a new SD from e.g. within a driver. + DIDR should be used to remove a device from the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 5e213fe1022bf96747834a3ac227929b23136ee6 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 9 11:29:11 2008 +1030 + + xfree86: cache dev->isMaster before freeing the device. + +commit 05cdef18ca668ffc86b71033f71cfbd262cdd994 +Author: Zhenyu Wang <zhenyu.z.wang@intel.com> +Date: Fri Oct 10 13:45:51 2008 +0800 + + Don't leak EDID_block + +commit 2d9da7a5f384d5f38b2be79b1ea0df5a3deb52d1 +Author: Luc Verhaegen <libv@skynet.be> +Date: Thu Oct 9 22:22:53 2008 +0200 + + DGA: Track client state even when using old style DGA. + + This fixes the issue that a badly killed DGA will keep on hogging + mode/framebuffer/mouse/keyboard. + +commit 322335d5b5b6f155f56fe3c1cbe372f13dc20932 +Author: Luc Verhaegen <libv@skynet.be> +Date: Thu Oct 9 22:21:05 2008 +0200 + + DGA: Mash together xf86dga.c and xf86dga2.c. + + This in preparation for an upcoming client state tracking fix. + +commit d13c3cbd43bc5e6b459c7df822292cf02ad2c9c4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Oct 8 18:39:41 2008 -0700 + + XQuartz: Some motion made towards supporting fullscreen. + (cherry picked from commit 99be3d68b64059caada739a373e5e01844c776e0) + +commit dc166bf6423f4243ea05f17340ff9ff99ecad74b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 7 11:39:08 2008 -0700 + + XQuartz: Fixed EXTRA_DIST for new GL files. + (cherry picked from commit a11c9052030b44045f037050a5825256b539ed50) + +commit 803327929445256e159c10894e6305fbaa389982 +Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> +Date: Tue Oct 7 12:12:38 2008 -0600 + + XQuartz: GL: setVisualConfigs() copied the behavior of indirect.c which is wrong, with regard to the handling of xcalloc failure. + + Use ErrorF for an error message after an xcalloc failure, and return instead of falling through to GlxSetVisualConfigs, or abort()ing at the test branch. + (cherry picked from commit 1056700971fd5c034396ed6dbea15e092f0c6332) + +commit f1fec6f323b27a0165325d8fcf6af7ae163bde14 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Oct 8 18:45:04 2008 -0700 + + XQuartz: Call setVisualConfigs in InitOutput, and only when GLXEXT is defined. + (cherry picked from commit 97173d4eda142c73bb975cc05225b791778f85af) + +commit 52accec7dbc613a521e40449b8bb5f0c92ddb105 +Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> +Date: Tue Oct 7 11:31:48 2008 -0600 + + XQuartz: GL: Add the proper license information to the new files, and add more commentary to setVisualConfigs(). + (cherry picked from commit 190a3d5e5de9915931928fb8e6da88bb9644cda4) + +commit 63abdf61151cc90f769ed1708ee19b6c434c27c9 +Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> +Date: Mon Oct 6 18:05:12 2008 -0600 + + XQuartz: GL: Add the new C code to the Makefile.am. + + Commit the darwin.c changes I missed in the last commit, for calling + setVisualConfigs(). + (cherry picked from commit eb3c014e1710bf0b93bda10ddb9b795cd150d02d) + +commit a8f5d422c9c0a39f55e80bbd180439b6ec3a805c +Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> +Date: Mon Oct 6 18:01:23 2008 -0600 + + XQuartz: GL: Provide code for getting the capabilities of the underlying system's CGL. + + Add a setVisualConfigs that is called before the fbScreenInit, to setup the __GLXvisualConfigs. + (cherry picked from commit fc86f9e4482043eca76d9d7a96e166be1aabf674) + +commit 2998e48be343ab2a11d6d328fc961ab5b8eb9292 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Oct 4 21:25:50 2008 -0700 + + Xquartz: Fix parallel builds + (cherry picked from commit 1fe7298a3b9a2ed82c612292f9e547cf78f99ae5) + +commit 7aa535708f1f33173bf05abc17b75e0841ffc385 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 16:25:59 2008 -0400 + + Fix more xcalloc stupidity. + + Did I mention the hate? Pretty sure I mentioned the hate. + +commit 4fe80aa14a24df6d0611c47fc5654c3c4f56fdb1 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 16:22:35 2008 -0400 + + I hate you xlib. Please die in a fire. + +commit 2c5332872f808e7a646a63ae7ec63a2b80f83ee7 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 8 13:39:49 2008 -0400 + + s/kdDontZap/kdAllowZap/ + +commit 1feb69eb63e6739ff5db255ad529e84adf941a10 +Author: Luc Verhaegen <libv@skynet.be> +Date: Wed Oct 8 14:55:29 2008 +0200 + + DGA: Fix ProcXF86DGASetViewPort for missing support in driver. + + Fixes a segfault when trying to activate a DGA mode without checking + whether DGA modesetting is at all possible. + +commit d1bb5e3b47ab71aa2f18f69daaf2a4c5ce06d800 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Oct 8 03:19:45 2008 -0300 + + mi: functions here are carrying 'time' without need. + +commit 4964a9ca6c3f26376469b6d8217815a47231f0a9 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Oct 8 03:06:32 2008 -0300 + + mi: remove deprecated and unused functions. + + miPointerDeltaCursor, miPointerGetMotionBufferSize and + miPointerSetNewScreen. + +commit adf3e296e2b00164fb22e89ad4f44acbd2e3deae +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Oct 8 02:12:49 2008 -0300 + + Remove unused declarations. + + AvailableClientInput (LBX debris) and xf86XinputFinalizeInit. + +commit bca9fa2efe97d2816a2e9412cdff08a0145c8f96 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Oct 8 01:38:27 2008 -0300 + + Everyone knows that the loader is present. Silence it. + +commit 56c615368c5a8e7acb0398434c2c68578626aa38 +Author: Zhenyu Wang <zhenyu.z.wang@intel.com> +Date: Wed Oct 8 13:33:55 2008 +0800 + + Check nextEnabledOutput()'s return in bestModeForAspect() + + In case no enabled outputs, we will reference wrong index of + output array. + +commit 278c11f01fbc6d6bd91c5a7127928c9ef5d29fca +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Oct 8 01:18:49 2008 -0300 + + xfree86: xf86{Enable, Disable}InputHandler can be static. + +commit 50081d2dfb79878cb931a15c265f0d60698dfd39 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Oct 8 01:11:38 2008 -0300 + + xfree86: remove xf86{Enable, Disable}GeneralHandler and others unused. + +commit 54294e15ecf4a8ec0fd9fa8b6ed1a1b2d912ec7e +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Oct 8 00:43:22 2008 -0300 + + xfree86: fix wrong function name message errors. + +commit 57dbb90f198116dcaf17c8111a7f80644d7ebe7f +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 7 20:36:45 2008 -0400 + + Document zap/-retro interaction more. + +commit 617933e8c259ad12388c0dd13421846a873975e3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 8 02:45:59 2008 +0300 + + XFree86: Fix DontZap interaction with -retro + + -retro will now _not_ override (No)DontZap, if it's set in the config + file. + +commit d80bae2237e555025465d4d761a5cc537cc2bcdd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 8 02:43:27 2008 +0300 + + Update docs to reflect new DontZap default + +commit 42e7b64bf90604e0099702f5447163be80a2efb6 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 7 20:32:02 2008 -0400 + + -retro enables zapping + +commit 9d135ac10a7374c7ccda705f1eeb02cc53076c34 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 8 02:30:05 2008 +0300 + + Input: Make DontZap the default + + If you need to bail out the server, use Ctrl-Alt-Fx, or enable zapping + if it bothers you that much. If Ctrl-Alt-Fx is broken, nag me until + it's permanently fixed. + +commit b574365fca954a999ebaeb7203d1e0ea6d99b3ea +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Oct 7 13:09:11 2008 -0700 + + Revert "Unexport (and unimplement) xf86SetAccessFuncs" for now. + + The nvidia driver currently uses these hooks to work around problems where RAC + will disable access to the hardware at unexpected times. This change restores + these hooks until we can come up with a better API for working around RAC. + + This reverts commit c1df4fbede8058c15ce3a5759a7758fecafbb9e7. + +commit fe85ec34ec2b58188633dac4464a1e9e9977652b +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Oct 7 13:08:38 2008 -0700 + + Revert "Remove unused server state change callbackery" for now. + + The nvidia driver currently uses these callbacks to work around problems where + RAC will disable access to the hardware at unexpected times. This change + restores these hooks until we can come up with a better API for working around + RAC. + + This reverts commit d7c0ba2e9eae7044ef4c31d9c3cbb9a71ee0f9f9. + + Conflicts: + + hw/xfree86/loader/xf86sym.c + +commit 94919480d8bb66e1807b4fe87b8f326ef6e012c6 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 7 13:41:25 2008 -0400 + + int10: Fix a nasty memory leak. + +commit a57b2f172c1291f22f7ba2780c1b2f55e353c3e9 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 7 13:39:10 2008 -0400 + + int10: Don't warn when scanning for devices we don't have. + + Some BIOSes (hi XGI!) will attempt to enumerate the PCI bus by asking + for the config space of every possible device number. This despite + perfectly functional BIOS methods to enumerate the bus exactly. + +commit a65e36a873cd1ba9896cd0f9a3e94dd933666005 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 7 13:38:12 2008 -0400 + + int10: Remove useless check. + + If you have more than one PCI device with the same d/b/d/f, you're + already in trouble. + +commit 6dbfca571f6d214dc456710a60ebbbbd204cdbbd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Oct 7 10:07:03 2008 -0700 + + Depend on xtrans >= 1.2.2 for TRANS_NOXAUTH + +commit 30193fbff9d9284fbbd81fe5f7b6c4d102daf1d1 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Oct 7 10:36:12 2008 -0400 + + Reinstate cursorScreenDevPriv + +commit e7cd5d84ed1fb3637dce6e9e6ef58c8611818c4e +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Oct 7 16:09:17 2008 +1000 + + fixup another calloc build issue + +commit 60cfaa45a532bd3cfcfb4bd57b2f657c0a8b6a6b +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 6 18:47:06 2008 -0400 + + Build fix. + +commit c6d6d3e87a472b641d883a6c000f96e5bdf48532 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 6 16:18:21 2008 -0400 + + Loader: Unexport a handful of consumerless symbols from dixsym. + +commit 8a5b89e8e184f4cbf33c6dee0b06e61d8f857576 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 6 15:36:51 2008 -0400 + + xalloc+memset(0) -> xcalloc + +commit 0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Oct 6 14:19:30 2008 -0400 + + xalloc+bzero -> xcalloc + +commit 9187f6ad9ec7ba9569a93d92561aac17eaa83491 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Oct 6 12:21:20 2008 -0400 + + RANDR: Delivery output property events. + +commit 717c7492a0f6ba3fb3eabda33515881eef314155 +Author: Dave Airlie <airlied@linux.ie> +Date: Tue Oct 7 02:38:44 2008 +1000 + + exa: don't call composite routines with no buffer. + + We can get a case with gnome-terminal + links, where we get two arrays + of glyphs all with 0 width and 0 heights in them. If this happens + we manage to get to this case without any buffer setup and segfault. + +commit aacac3edac7c6b82a0a0e3bc500f563d187e5df3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Oct 4 21:07:31 2008 -0700 + + XQuartz: Bumped bundle version to 2.3.2 for beta1 + (cherry picked from commit 2021c4c4e726a6b8f27f19f16ed3d86e37dbe448) + +commit ed3134918dcbbd58a5ef8359a77e8024c98396e6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Oct 4 21:06:58 2008 -0700 + + XQuartz: pbcopy: Re-enabled some code I commented out for testing + (cherry picked from commit 9b5d11409264080e394c8f18e06237122de80014) + +commit b3a971d8b5df5ab4af0be49105ef32f67d010901 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Oct 4 18:54:15 2008 -0700 + + XQuartz: xpbproxy: Support some of the preference toggles from X11.app, cleaned up CLIPBOARD_MANAGER atom management. + (cherry picked from commit f7673bb4de3c1f71eb390a3279eed3589efc3df4) + +commit fc35c7a2e2888cb767413f5e85a79c7f422a6284 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Oct 4 21:16:54 2008 -0700 + + XQuartz: GLX - enable_stereo defaults option should work now + (cherry picked from commit 3a6898f48756fdb2898292679301ef3dc109b4f6) + +commit 7818aba1d1e74f4ffe68b7d6806622b94ae8a230 +Author: Roland Scheidegger <sroland@tungstengraphics.com> +Date: Sat Oct 4 15:50:35 2008 +0200 + + dri2: fix compilation (remove no longer existing include file) + +commit a29af6465883796a6acf04b72ce812a0632b2186 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Oct 3 23:54:10 2008 +0200 + + exa: remove "direct" case for exa{Trapezoids,Triangles} + + - By adding a small hack to the xserver i was able to easily test the performance of the normally rare direct case (using cairo). + - It turned out to be 70% slower for me (large test on an otherwise idle computer), which seems enough of a reason to remove it. + - AddTraps could also use a 2nd look, but since noone is using that it's a bit hard and less useful to test. + +commit 416870d8c9e7e383b87c8513c2296a0cb66e7ef4 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Oct 3 22:59:40 2008 +0200 + + exa: remove some excessive whitespace + +commit b72a217ad59cc527327d7b1fc81898677b977d8f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 18:30:37 2008 -0400 + + Dangling use of miDestroyGCOps + +commit f5bbc54a93f53cd4ba124712159bb44c93282a8e +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 18:18:02 2008 -0400 + + Fix compile for miSetScreenPixmap prototype. + +commit 9dbfcd89214241626ac2704d1ffffff1cc0c67ae +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 17:40:30 2008 -0400 + + Delete unused miModifyBanking() + +commit 94825ad3c72a1c3f6a61199c302841f63241cf87 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 17:39:34 2008 -0400 + + Remove unused wrapping for visual initialization. + +commit 4791f8e2ba9a0e318b7f13c83618ece036dd53ed +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 17:23:58 2008 -0400 + + staticize mi{G,S}etScreenPixmap + +commit 14d98b4a2fdea4a4f5cc9b751151672cb392fba3 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 17:21:16 2008 -0400 + + miFindMaxBand is dead code + +commit 48b47928133bc462947104bd0f4204f00b993862 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 17:16:28 2008 -0400 + + mi{Create,Destroy}GCOps are unused, nuke 'em. + +commit bd0e87c74789bd5447ec731aa2d2d6e05dd54abc +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 17:13:10 2008 -0400 + + Remove a bunch of unused API from the mi export list. + +commit ee5e07bc22f0c3af7a412b6bc430eae6a1dafe16 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 16:58:01 2008 -0400 + + loader: sort the mi symbol list + +commit 77d0b0ecfa3c67ff8d11e773a7f083721cf4c6d7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 16:53:08 2008 -0400 + + Remove unused pciNumBuses + +commit 0ce61e21d6d7dcca0090e319bbcdb678570f2c3f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 16:05:19 2008 -0400 + + Remove the Must_have_memory hack. + + Also remove an astonishing amount of misunderstanding of how casts work. + +commit e6b1c1fada19268af559d89375989973729fdb19 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:47:50 2008 -0400 + + const cleanup + +commit fe616f9230b672edb89fca7516e750dc1b20c690 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:42:58 2008 -0400 + + Drop the never-called SkippedRequestCallback list. + +commit 31136b9467c2a17bbed4a51d6a6c41e3290bd236 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:33:47 2008 -0400 + + Unexport MakeClientGrab{Imp,P}ervious + + xtrap used to use these, but it's gone now. xtest still does but it's + linked statically. + +commit eaf3fdf97014c27aececa8505c2713e7c9a537fc +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:24:35 2008 -0400 + + Unexport xf86NoSharedResources + +commit d7d9edb506bfea1c10516b6c4eb72dee3559863c +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:17:44 2008 -0400 + + Unexport xf86DeallocateResourcesForEntity + +commit 49673b43584928c22d699d1968ed6813b272aefe +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:13:39 2008 -0400 + + Unexport xf86SetEntityFuncs + +commit 949ef6b79a36d6f6bbc192c20ef0f13cc95d4f28 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:10:26 2008 -0400 + + Unexport xf86ChkConflict + + Also remove the unused internal ChkConflict() + +commit d7c0ba2e9eae7044ef4c31d9c3cbb9a71ee0f9f9 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 15:06:42 2008 -0400 + + Remove unused server state change callbackery. + +commit 9ada146a16bcf220b2dd2936fb3a0349a31e99d3 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 14:40:18 2008 -0400 + + xf86RegisterResources: Always print any failed registrations. + +commit a5d3fa90f3de763a5dcbb0ff4987562449819323 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 14:38:48 2008 -0400 + + Typo fix. + +commit cc3335858508ffbc52123eb5bb0c34f42800c8c4 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 14:37:59 2008 -0400 + + Remove the old implementation of RemoveOverlaps + +commit 8fbf1185f5d6a1836b3e4265de6f605d82478e0b +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 14:32:32 2008 -0400 + + Internalise some resource list API. + +commit 0ca4f3cee7e42a393cdd32d3a772a190ae68abc5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 13:29:55 2008 -0400 + + Unexport xf86EnterServerState + +commit c1df4fbede8058c15ce3a5759a7758fecafbb9e7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 13:08:43 2008 -0400 + + Unexport (and unimplement) xf86SetAccessFuncs. + + Because, no. + +commit 44269e604eb60ebaa6189fd4409d39a4ec6b9f4b +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 13:02:50 2008 -0400 + + RAC: NO_SEPARATE_*_FROM_* are useless. + + If anyone can come up with an example of a bus where: + + - both i/o and memory resources are addressable + - access to them can be controlled + - but they can't be controlled independently + + then by all means, reinstate this logic. + +commit 51fcb58f45824c7cde88b8b4ccbd6bdcf760280e +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Oct 3 12:39:49 2008 -0400 + + RAC: AccessEnable() and AccessDisable() are mandatory. + +commit 9c5fc7762e9ca09847965e67e247d95dfc197266 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 3 11:24:34 2008 -0700 + + Partially reverts commit 505c216d030a8eb6e9fa757ecebed9597a850c88. + + I don't know how the hell git-cherrypick messed that up to delete fbwindow.c + +commit 7bb73a9513710feaebc127998950e9f472bfcc0d +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Tue Sep 30 23:53:12 2008 -0600 + + XQuartz: pbproxy: Possibly fix a memory leak by using an [NSApp run] loop, + instead of calling CFRunLoopRun() directly. The leak wasn't reproducible on + this machine, but someone was able to produce a leak trace with Instruments + that indicates it was leaking in the CFRunLoopRun() path. + + x-input.m: dequeue and ignore events when pbproxy_active is false. + + x-selection.h: add an is_active method that is used by x-input.m to ignore + events. + + x-selection.m: Handle nearly every preference, except for primary_on_grab, + which I don't really understand yet. + (cherry picked from commit 4d51ad851e64da83cbdfb0a4a22428418a7bcf75) + +commit 2a5ce41f0371ad5df52586b8d4072578b6206321 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Sep 30 13:54:08 2008 -0700 + + XQuartz: Use "pointer" and "pen" for device names to please GDK. + (cherry picked from commit 00ca0f4d839abf47e9573a1552473e039cf787e6) + +commit d3f597a986dcbc7e4164f350300dbd2e438949d8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Sep 30 11:10:58 2008 -0700 + + XQuartz: Workaround for initial pressure/tilt being sent as 0 with motion during the proximity event + (cherry picked from commit 9a91d770a6411dd876187e64a8bda1f0745169ae) + +commit 1657dfb843c0127ea31bfd0a8ef81d0c394cbc7b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Sep 30 08:46:08 2008 -0700 + + XQuartz: Using absolute ranges for pointer location to increase resolution and better support tablets. + (cherry picked from commit d79ccb45f68b65d65718b5b77efe2fae6eeda762) + +commit 88bb8c6f485a7aaf40f684d484a33cfedfa74a70 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 29 22:33:02 2008 -0700 + + XQuartz: Removed resolved comment about localization. + (cherry picked from commit 8ed5faf058ac7b0782a9cc13a2c58b80168358d2) + +commit b1d0b196617643619d24ed520b0a1161e26b66c6 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Tue Sep 30 13:04:35 2008 -0600 + + XQuartz: pbproxy: Make the signal handler safer by using _exit, and only exit. + + Remove some unnecesssary headers. + + Remove some dead code that was never called or used in pbproxy. + + Make use of an NSAutoreleasePool in x_init. It could potentially cause a leak + on a startup without this. + + Start adding reload_preferences to the x_selection class, as well as event + handling for that. + (cherry picked from commit 602e8ba8f7ee196696bc9e3cea6ecdf3200dcf5c) + +commit ecd260143cf9f012f033ba029ad04cb49567c89a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 29 22:32:24 2008 -0700 + + XQuartz: Added some localizable strings that were missing. + (cherry picked from commit 2c8205ea8b709c5859412b466e83aec7a94acdcf) + +commit aae878b89081ffba16386e8d4987469313049bea +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 29 22:26:20 2008 -0700 + + XQuartz: Actually send the pointer event from the pen even if it happes to actually have 0 pressure and 0 tilt. + (cherry picked from commit f41583761955cb9c92c43239bfaa8ae0e5d95e33) + +commit b7ad86ff8a9115147c0cf02af9e80ec464129392 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 27 15:30:10 2008 -0700 + + Xquartz: xpbproxy: Split out app-specific stuff to app-main.m in prep for making this into a thread. + (cherry picked from commit c2012138a520560f8a2160518ea73fced410c3b7) + +commit 5446adebfb085dd05471729bf5c55bf820b1cbe3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 3 11:12:49 2008 -0700 + + XQuartz: Send AppleWMReloadPreferences where appropriate. + (cherry picked from commit 490cbe9888e2c1080495b003c429fdb1659444e1) + +commit 6020c3fbfe06530cb2b90178d17a7d63beae028a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 3 11:09:26 2008 -0700 + + XQuartz: Added a --enable-integrated-xpbproxy configure option for building xpbproxy as an app or as a thread. + (cherry picked from commit 8edc5fb38c922f28659d2f823148339a8907c4d9) + (cherry picked from commit 88033a66a5549870fd053795b019d4c22950425b) + +commit 505c216d030a8eb6e9fa757ecebed9597a850c88 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Oct 3 11:11:37 2008 -0700 + + Added dep on applewmproto 1.1.0 + (cherry picked from commit b350b066740a2e72585153e35478538cf1bca9ef) + +commit 1c1a6e965da412e767ad8bc15a5362116d64c6b0 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Sep 22 22:09:19 2008 -0400 + + Remove an utterly, utterly ancient changelog. + + Wow. + +commit 9c8a2be2c73abf06245b1eb7f05f93e104dcfe42 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Oct 2 08:55:14 2008 +0930 + + dix: fix axis scaling. + + For two axes [a, b] and [x, y] (inclusive), the formula to scale point P(ab) + to (x,y) is: + (P - a)/(b - a) * (y - x) + x + + And the whole end result rounded of course to get the integer we need. + +commit 93ef72fa26b27cf90bf5c64ec19ac295a113aaae +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Sun Sep 28 21:47:21 2008 +0930 + + dix: don't lose subpixel precision when scaling. + + Only scale x/y back from screen range if we have crossed screen, otherwise + leave it as it is. + +commit 5ef5e89f0e4b9b8820093e072430e295efce32fa +Author: Simon Thum <simon.thum@gmx.de> +Date: Sun Sep 28 22:32:44 2008 +0930 + + dix: fix non-initialization of pointer accel in master devices. + + Init MDs always with PtrAccelNoOp. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 036d424827726b0c804ae1532109253270744207 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Sep 26 17:01:12 2008 +0930 + + xfree86: don't let DGA steal key events outside of [9,255]. + +commit 56a24cf894a142b18c7f18e294074c32031f3d14 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 2 17:56:31 2008 -0400 + + xorg.conf.man: We don't look in root's ~ anymore, don't say we do. + +commit 7921c4a0bfc843c772dcb2fc185d4bcab1316330 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 2 17:08:48 2008 -0400 + + Remove some stale IPv6 debugging + +commit f836e1f11b7bf3449c3e469cc7799c4ed28d2356 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 2 17:03:54 2008 -0400 + + Unifdef ISC + +commit b1a31734731a768d586b4cb18317d4a5c5e20fa8 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 2 17:03:21 2008 -0400 + + Fix bad preprocessor line + +commit 00f01f39454001846869496d9124f62c01e5691a +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Oct 2 15:48:18 2008 -0400 + + Don't inherit XAUTHORITY from the environment. + + It's not especially obvious, and unpleasantly overloaded for the Xnest + case. Typically this gives you a server that looks for its auth data in + the authority file you were using for the running X session, which + generally doesn't have an entry for the display you just started. + + All the major dm's, and startx, pass -auth explicitly, so this shouldn't + cause too much upheaval. + +commit eb8be3e90a9c90a428696026d1e3b2152d7eefb4 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Sep 25 14:16:20 2008 -0600 + + XQuartz: pbproxy: Fix another STRING bug. + + Fix the usage of the NSString cStringUsingEncoding: - it doesn't NUL + terminate the string, which lead to a bus error. So, we use + lengthOfBytesUsingEncoding: to get the length in bytes instead of + strlen(). + (cherry picked from commit 6333d619e747c3b6bd3ba7557e35c0e5f6daa40f) + +commit edfa3f8233fde490cb4255f21473684e96d595a3 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Sep 25 12:29:57 2008 -0600 + + XQuartz: pbproxy: Fix a bug that rxvt brought out in STRING copying. Now I can copy and paste to/from rxvt correctly. + (cherry picked from commit 82a4dc5f0f31a7911ee1cce5d1b162077befa811) + +commit 12a59c44cb68843a60fc43257930d1cbeb971b7a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 24 22:51:03 2008 -0700 + + XQuartz: Fixed threading issue with TSM. + (cherry picked from commit 93ab4e0071670bb80bfa1170dd97ed9d6d51c67a) + +commit ee87c9b02401a7a08b396884ba412a503b078bbd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 24 18:57:36 2008 -0700 + + XQuartz: pbproxy: Removed stray SPI include. + (cherry picked from commit 2fb2bc77b804d7b63002c1423cb0bfc658eeee45) + +commit 591cc57627a9137159fb5a13287c1d61d8d2fc8c +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Tue Sep 23 13:59:25 2008 -0600 + + XQuartz: pbproxy: Fix 3 paths that could leak memory. + + 2 of the paths leaked, when INCR transfers were done. Now we + are leak free according to the leaks program for all transfers + I have tried so far. + (cherry picked from commit aa98db576bc02f0765cb35d0282a894ba3778213) + +commit 586fbc91df731150ff5e39170efe33f3cfac28a2 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Tue Sep 23 12:39:32 2008 -0600 + + XQuartz: pbproxy: Fix NSObject memory leaks by properly using the + NSAutoreleasePool. Now the usage is consistent. In x_input_run() + we create a pool, and release it after processing the XEvents. + + Add some getpid() output to main for debugging. It needs a bit more + testing before the next release. + + Don't retain the NSPasteboard as the old code did. That may have + contributed to the leak, and it made it so that we needed the + NSAutoreleasePool created in main(). + + Remove the _known_types, and _pasteboard instance variables from + the x_selection class. They aren't needed anymore. + + The leaks program now indicates 0 leaks after some usage. I want + to test further, but this seems much better, and my memory usage + graph indicates it's not growing. + (cherry picked from commit b245d84a72ee3929546cd11a6eba3c60fb4a4d95) + +commit 238999cfc99dbf306184f0e846465a8707bcc9d2 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Sep 22 17:36:21 2008 -0600 + + XQuartz: pbproxy: Add a comment to pbproxy.h about how the DB() + macro causes a leak (according to the leaks program). + + Attempt to fix several other leaks with release method calls. + For some reason the process still grows more than it should... + + I will need to use some better methods than leaks, and malloc_history + I suspect. Whatever is leaking, it's hard to find. I need to isolate + the cases more. + + Add a missing image/jpeg branch. + + Remove read_prop_32 - it's not used. + (cherry picked from commit 63a680354dcb545fef935ac97596dd35ceaed960) + +commit 106eb37e0214bbd864a59119b491abfc54f32629 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Sep 26 13:05:10 2008 +0930 + + Require inputproto 1.9.99.5 + + Pull and rebuild your input drivers, while you're at it. + +commit fbd09486c6e6c64db28d81caa5ef04821e49f2eb +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Sep 23 16:55:04 2008 +0930 + + Push server-known properties into xserver-properties.h. + +commit a2d83b9dc8387ec7e70689db1371cf6500b2f68e +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Sep 18 18:21:03 2008 +0930 + + Xi: add "deletable" flag to properties, add DeleteProperty handler. + + A property can only be deleted if any of the following is true: + - if a property is deletable and all handlers return Success. + - if a property is non-deleteable and the all handlers return Success AND the + delete request does not come from a client (i.e. driver or the server). + + A client can never delete a non-deletable property. + +commit 22e90472681ebc7bdd28f82bbf2753a5b259e931 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Sep 18 16:12:02 2008 +0930 + + Xi: allow Set/GetProperties to return a status, and honour this status code. + + If a property handler now bails out, return the error code to the caller. This + allows to be slightly more specific with the errors. + +commit 1e24e7b9df3d02350c7ea18e9379e87fe4d00026 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Sep 18 15:58:46 2008 +0930 + + Xi: remove configure/query device property calls. + + This removes all the meta-information about device properties (pending, + fromClient, range, valid_values, immutable). + +commit feaa5fa6712c8c6f4ca97766e2ac0338253cf3b8 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Sep 25 11:03:22 2008 +0930 + + xfixes: realize the invisible cursor before displaying it. + + AllocARGBCursor realizes the cursor but can only do so if we have devices + there already. If we don't - then the cursor needs to be realized elsewhere. + This is usually done in InitializeSprite, but since xfixes just hard-swaps the + (realized) cursor to the InvisibleCursor, we need to manually realize it + before trying to display it. + +commit e58be0f3425fb3e946a222077672c3c01308f887 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Sep 23 10:01:30 2008 +0930 + + config: print error code if NIDR fails. + +commit 30c3c13f1030268aaa6a3598d538fafd0592d77a +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Sep 22 11:10:46 2008 +0930 + + xkb: squash canonical types into explicit ones on core reconstruction. + + If we update key types from core, and groups 2 - n have a canonical type but + the same symbols as the explicit type of group 1, assume that it was a core + sym duplication according to Section 12.4 of the XKB Protocol Spec. + Ignore the canonical types and pretend there's only one group for the key - + with the explicit key type. + + The protocol spec does not cover this case, so we have to guess here. + +commit ae986d1c73d2f720bd0309d8c33328d14e8eed25 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Sep 19 18:27:24 2008 +0930 + + xkb: fix core keyboard map generation. #14373 + + According to Section 12.4 of the XKB Protocol Spec, if a key only has a single + group but the keyboard has multiple groups defined, the core description of + the key is a duplication of the single group across all symbols. i.e. + G1L1 G1L2 G1L1 G1L2 G1L3 G1L4 G1L3 G1L4 + + The previous code generated G1L1 G1L2 G1L3 G1L4 G1L3 G1L4, leading to + "invented" groups when the process is reversed. + + Note that this creates wrong key types on reconstruction from core to xkb, + i.e. any single-group key with a key type that is not one of the canonical + four (Sec 12.2.3), will get the assigned type on group 1, and a canonical type + for the other gruops. + + X.Org Bug 14373 <http://bugs.freedesktop.org/show_bug.cgi?id=14373> + +commit 5bf3f0fd4e00f96cfebd14b58580c3c8733626fb +Author: Dave Airlie <airlied@linux.ie> +Date: Thu Sep 25 15:40:19 2008 +1000 + + exa: make sure pixmap devPrivate.ptr is NULL at create time + +commit 82f150d73cc9a7d8eaf7241a51b03af05bcec159 +Author: Ian Romanick <ian.d.romanick@intel.com> +Date: Wed Sep 24 16:56:45 2008 -0700 + + GLX: Make sure GLX_SGI_make_current_read is enabled when possible + +commit 8d9defe8c2a685709318c1d43379443df3d2322a +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Sep 24 10:11:00 2008 -0400 + + Fix un-suppressing the initial cursor. + + The intended behaviour was "show as soon as someone calls + XDefineCursor". What you actually got was, uh, slightly less well + defined, since the screen's ChangeWindowAttributes hook would run after + DIX handled the cursor change. Oops. + + The trivial way to turn the cursor on is: + % xsetroot -cursor_name gumby + + Refer to /usr/include/X11/cursorfont.h for cursor names. + + Thanks to anholt for catching this. + +commit a39377cbcbd3091095efbeab25bec18ae520147e +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 23 09:22:07 2008 -0700 + + Revert "Render: Use built-in SHA1 library" + + This reverts commit d3bd31fddff7894f89ba80a3cdddff49aff08db8. + + X.org should not be providing a custom SHA1 implementation. + +commit 10a9bac0257b381367cedff395b40425d584bf59 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 23 09:21:37 2008 -0700 + + Revert "Update COPYING for SHA1 code" + + This reverts commit 64387c8573ca8b3909667e32d7a9fba9567b21d3. + + X.org should not be providing a custom SHA1 implementation. + +commit 64387c8573ca8b3909667e32d7a9fba9567b21d3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Sep 23 19:05:14 2008 +0300 + + Update COPYING for SHA1 code + +commit d3bd31fddff7894f89ba80a3cdddff49aff08db8 +Author: John Tapsell <johnflux@gmail.com> +Date: Tue Sep 23 18:56:32 2008 +0300 + + Render: Use built-in SHA1 library + + Getting an external library for SHA1 is a mess, so just use our own, + regrettably. Public domain implementation. + +commit 991ed2949ba682684952fe323f8f0f51ebdca98e +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Sep 23 10:22:22 2008 -0400 + + Rename SaveSetMap() to SaveSetShouldMap(). + + Avoids preprocessor collision with xfixeswire.h + +commit ca9fae00795a114bca4397c32b543d6326a4c547 +Author: Owen Taylor <otaylor@redhat.com> +Date: Mon Sep 22 12:42:41 2008 -0700 + + Change 'remap' to 'map' in saveset functions/macros + + Now that the code has been fixed so that Unmap means unmap and not "don't + remap", 'remap' was confusing to have in the function names/parameters, so + change it to simple 'map'. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit ad14239a358cf65e5702ec7d054aa1db4f1cdd68 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Sep 22 11:26:49 2008 -0400 + + Upgrade GLX Public License 1.0 to FreeB 2.0. + + According to the press release: + + Previous SGI contributions to the free and open source community + are now available under the new license. These contributions + include the SGI® OpenGL® Sample Implementation, the GLX™ API and + other GLX extensions. + + [...] + + "SGI has been one of the most ardent commercial supporters of free + and open source software, so it was important to us that we continue + to support the free software development community by releasing our + earlier OpenGL-related contributions under this new license," said + Steve Neuner, director of Linux, SGI. "This license ensures that all + existing user communities will benefit, and their work can proceed + unimpeded. Both Mesa and the X.org Project can continue to utilize + this code in free software distributions of GNU/Linux. Now more than + ever, software previously released by SGI under earlier GLX and SGI + Free Software License B is free." + + "The GLX API" is here read to include the original GLX source release + from: + + http://www.sgi.com/products/software/opensource/glx/download.html + ftp://ftp.sgi.com/sgi/opengl/glx/glx1_2.1.tgz + + which includes glxext.c as included in XFree86, from which our copies + in glx/ and hw/dmx/glxProxy/ are derived. + +commit 722c51960dd4948b8a64f8eff115fa69da597ef9 +Author: Owen W. Taylor <otaylor@redhat.com> +Date: Mon Sep 22 11:04:26 2008 -0400 + + Don't remap windows for SaveSetUnmap + + Since ReparentWindow() does a unmap/map pair for windows that are already + mapped, for saveset windows with SaveSetUnmap, we must unmap the window + before calling ReparentWindow() to avoid the generation of MapRequest + events, and so forth. + +commit 0bb317a78b96fddcdac319c9706b3a12f931ea44 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Sep 22 10:51:51 2008 -0400 + + Default to -br. Add -retro option for the nostalgic. + + -retro also reverts to the classic cursor display behavior, meaning, + the cursor will be visible before anyone calls XDefineCursor(). + +commit ab17f88506a2dde32c50ff72b03743cd9c384ecc +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Sep 22 01:59:31 2008 +0200 + + Don't use our version of ffs() if the system has one + +commit af0d5e2ef7b1b3f42e3522568c5f56850823c102 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Sep 20 19:41:46 2008 -0700 + + XQuartz: 64bit crash fix ... don't pass pointers through xe. + (cherry picked from commit 5f1265b82edead8f15f2affc79c2782519502fa2) + +commit 852a0b0dde34e7179394d96d09122b99bf7fe904 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Sat Sep 20 17:49:16 2008 -0600 + + XQuartz: pbproxy: Add an X error handler that returns 0. + + Move the struct atom_list into the x-selection class, so that it's + no longer a global variable named atoms. This may ease pthread + integration and reduce the chances of symbols conflicting. + (cherry picked from commit c1403c713ca80104ae3736bd2ed1eb6ffa5192b6) + +commit 7fa6fc5ad0b12bc52a1c22906709fbb003782d11 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Fri Sep 19 21:28:46 2008 -0600 + + XQuartz: pbproxy: Fix a bug that occured when a PICT format was available. + We may need another branch to convert a PICT to a PNG or JPEG. For now + TIFF works well in all of the test image copying apps when converted to + PNG or JPEG with an NSBitmapImageRep class. + (cherry picked from commit adf339d8f948fc1e308dbcae38fcfce504b5b0ab) + +commit f67490ceb5b9ddf25e734cc331705103599f3ed8 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Fri Sep 19 14:29:37 2008 -0600 + + XQuartz: pbproxy: Make the proxy handle copy request races, and PRIMARY + INCR transfers mixed with a CLIPBOARD change. + + Fix a bug with some UTF-8 transfers. I can only guess that my UTF-8 + tests before were inadequate. I can now copy/paste any characters between + uxterm and Textedit.app. + (cherry picked from commit 7ca1532e8e6e2c733c9c508eee0de73d09ecb947) + +commit b666ffd78155db228174041e9d7460b8a07dde0f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Sep 19 13:15:07 2008 -0700 + + XQuartz: "Disable" the text when syncing is disabled. + (cherry picked from commit 7713d7ab66e74b212a6c0d634a3ad82373e178db) + +commit dba290ec231422740f453b69b187f80df3f50e4b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 21 17:40:35 2008 -0700 + + XQuartz: Added a preferences UI for pbproxy options. + (cherry picked from commit d76cca5e1eae86450aa236e49a2024881d0bac01) + +commit a928cae57b47625c9e3d136840d3e5d17fd3c51e +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Fri Sep 19 00:18:44 2008 -0600 + + XQuartz: pbproxy: Add a missing include of Xutil.h. Another header + seems to have done this before, but correctness matters. + (cherry picked from commit 1b4987e779d97b90669bac2405a4672085677f7c) + +commit 749bdf19b2a50201fddd04207e31122470f435e3 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Fri Sep 19 00:02:48 2008 -0600 + + XQuartz: pbproxy: Add COMPOUND_TEXT handling. Do misc. cleanups with testing + to verify that the behavior didn't change. + + main.m: XInternAtom compound_text, and atom_pair. + + pbproxy.h: Add compound_text and atom_pair to the struct atom_list. + + x-selection.m: Add an #include of Xutil.h. Refactor the reply struct + initialization to be done in a common place. Add send_reply: to simplify + the code a bit more. Add send_compound_text: which handles the + COMPOUND_TEXT type. Add the beginnings of a send_multiple:. Change + handle_image:extension: to handle_image:. The extension: message isn't + needed anymore. + (cherry picked from commit 1e9460abdf5bafe46215966bbef3e796cb1c33e0) + +commit 00bfbee59fe3b0c8d1a55d1851206857ca563ece +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Thu Sep 18 13:10:41 2008 -0600 + + XQuartz: pbproxy: pbproxy now responds to selection request events. + + We can now copy and paste images to and from X11. Text copying and + pasting works as well. + + The NSPasteboard can contain TIFF or PICT images, and pbproxy will + translate to an image/png or image/jpeg request, and list those in the + TARGETS. + + I added a description of the basic design at the top of x-selection.m. + + I removed the request_data x_selection class struct. It's not needed. + (cherry picked from commit 4a8daf884694c9c420c45d427f1f84e608e7e48f) + +commit 811e9f5e9e9c07f4b8fb1e9a4d9df91a2e359221 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Wed Sep 17 11:59:36 2008 -0600 + + XQuartz: pbproxy: Use an NSBitmapImageRep to convert an "image/png" selection + to a TIFFRepresentation for use with NSPasteboard. + + This has been tested with the Gimp and works with some minor quartz-wm changes. + The Finder clipboard shows the image updates after an Edit -> Copy. + (cherry picked from commit 12912adaeea759d30f96d8ae51a84fd1659ea0ac) + +commit d8d555bac77509248d1145e928a2edf500b326b9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 17 10:11:00 2008 -0700 + + XQuartz: Don't enable 8bit visuals in the TrueColor server, since it's not working yet + (cherry picked from commit 1317c8ff94c4bd32617a5398e929f667bd87da58) + +commit 23ec8261b6a746cb84e1328284fdc5587bca6faf +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Tue Sep 16 21:09:22 2008 -0600 + + XQuartz: pbproxy: The greedy CLIPBOARD handling now works for text. + + This change adds some [self own_clipboard] calls in the necessary places to get the proper greedy behavior. + + UTF8_STRING and STRING properties seem to work well now with the test cases (PRIMARY, and CLIPBOARD). I can copy from several different X apps, and have the behavior be correct when pasting. I also verified that quartz-wm isn't doing the copying, by disabling the quartz-wm paths. + (cherry picked from commit 934669f732c28f07b9d934d8f8f0b63ccfebd900) + +commit 7c2eb3d41af33d1c52500111d0d34f9aab8a4542 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Tue Sep 16 15:21:18 2008 -0600 + + XQuartz: pbproxy: return the TARGETS list as a 32-bit list to fix a bug that was in the original. + + Add TRACE() calls where appropriate to try to figure out why we are losing CLIPBOARD at times, after transferring PRIMARY to the NSPasteboard. + + Use the new pbproxy_clipboard_to_pasteboard where appropriate. + (cherry picked from commit 40190675a6c1889cca3574e5d1a9c16ab74315a7) + +commit 81c836902dc5b0b83cd95262d48cbc4c81ff3ae2 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Sep 15 13:35:46 2008 -0600 + + Rename reclaim_clipboard to claim_clipboard. + + Convert the puts usage to use DB(). + + Add the initial handle_image method. + + Check for nil in the NSString instantiation in various places. + + Add some commentary to enhance the clarity of why I did some things. + (cherry picked from commit 37361567b65241eab64e8b30cd9729d0e71a86d2) + +commit 85e23affea7bf9aa7615b0292e67f170266d85f8 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Sep 15 13:31:19 2008 -0600 + + Add an image_jpeg Atom. + (cherry picked from commit ea9dc27977c5eab666f2aa2d914e4e28d36758c7) + +commit 6b42f40ff9b9ff3e74ccbb2ce5cfad65016934de +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Sep 15 13:28:50 2008 -0600 + + Rename reclaim_clipboard to claim_clipboard. + (cherry picked from commit d333a8e2b5514b8b76a78c6a13a3f5149ea8de27) + +commit 2ab56981b1a64138d6c1f9ecfb75655477b3e575 +Author: George Peter Staplin <gps@Georges-Workstation.local> +Date: Mon Sep 15 13:27:08 2008 -0600 + + Add image/jpeg type, and rename reclaim_clipboard to claim_clipboard. + (cherry picked from commit 32b175ef62b68a971784e51e937e358cb10e20ac) + +commit cbd32645f7d1054f79ad137a16766da1076c610e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Sep 15 09:33:55 2008 -0700 + + XQuartz: pbproxy: Added global variables to customize how pbproxy behaves + (cherry picked from commit 21a2d0b8d03faf1c66ec0c5c11fbd2ab24547727) + +commit 5b397642cdc29920245ebe64cc85243cac893e0e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 14 09:23:17 2008 -0700 + + XQuartz: pbproxy: First round of updates to pbproxy from George. + (cherry picked from commit 5c8b956f8f3f17e8d577d97cb66424954be72684) + +commit dac9e91870f9c787eac97c9d7d0607979c57eb5b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Sep 21 17:32:24 2008 -0700 + + mieq: Made custom event handlers safer for nevents >1 + +commit 8c46505d7d91e0644b19cccc4b342fceb6f86cab +Author: Kim Woelders <kim@woelders.dk> +Date: Mon Sep 22 08:37:29 2008 +0930 + + xkb: fix use of uninitialized variable. + + And some cosmetic changes to use stuff->change consistently. + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 2b266eda6e23d16116f8a8e258192df353970279 +Author: Peter Harris <peter.harris@hummingbird.com> +Date: Thu Dec 20 15:58:01 2007 -0500 + + Fix panoramiX request and reply swapping + + Fix panoramiX request and reply swapping + Set window and screen values in panoramix replies + Prevent buffer overrun in ProcPanoramiXGetScreenSize + +commit 03ab8f11d25b0ca39a3b37b5350bca4c1028768e +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 18 12:17:05 2008 -0700 + + When resizing a window with redirected descendents, don't expose them + + Bit/window gravity computations need to recompute exposures to manage the + bits which are saved by gravity during the resize computation. That's easy + for non-redirected windows where the bits are all within the parent's + pixmap. For redirected windows, we don't need to deal with this at all, so + just skip the whole re-computation adventure. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit d26083fe02658e7312a8da6a5b11652f9fe57bc8 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 18 12:14:58 2008 -0700 + + Switching from Automatic to Manual redirect needs to unmap/remap + + When changing a window from automatic redirection to manual redirection, the + parent clip list needs to be recomputed; the easy way to get that computed + right is to unmap/map the window, just as when redirecting the window the + first time. + + Thanks to Owen Taylor for helping diagnose this. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 8bfd88ca61a1747714781a090d1c9dd8f3ad5dfc +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 19 12:13:43 2008 -0400 + + Revert accidental edid changes from previous commit. + +commit 69b79c1a6648f0d04a1b37a728b2e3d76233530f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Sep 19 12:02:28 2008 -0400 + + Update to SGI FreeB 2.0. + + Under the terms of version 1.1, "once Covered Code has been published + under a particular version of the License, Recipient may, for the + duration of the License, continue to use it under the terms of that + version, or choose to use such Covered Code under the terms of any + subsequent version published by SGI." + + FreeB 2.0 license refers to "dates of first publication". They are here + taken to be 1991-2000, as noted in the original license text: + + ** Original Code. The Original Code is: OpenGL Sample Implementation, + ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, + ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. + ** Copyright in any portions created by third parties is as indicated + ** elsewhere herein. All Rights Reserved. + + Official FreeB 2.0 text: + + http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf + + As always, this code has not been tested for conformance with the OpenGL + specification. OpenGL conformance testing is available from + http://khronos.org/ and is required for use of the OpenGL logo in + product advertising and promotion. + +commit cc20112a65d3f641ce0261c86a541f94fae5215c +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Sep 19 08:44:04 2008 +0930 + + Xi: don't include client-side headers. + + Spotted by Mikhail Gusarov. + +commit e76b5b5e731e2d6c61ff6e6e9b2f42b20ac473d5 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Sep 18 14:51:15 2008 +0930 + + dix: calloc, not malloc, ValuatorClassRec. + + For master devices, the ptraccel code could segfault on free since we'd be + dereferencing random memory. Callocing the valuatorClassRec is the easy fix. + +commit f789408f7dbfe57a0111e185ac83d1c70f262ba8 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Mon Aug 25 14:52:35 2008 +0930 + + Xi: remove broken SDeviceEnterNotifyEvent, replace with ...Leave... + + The event format is the same for both (bar the type), so one is enough. + +commit 97b9374a8af5a4cc52f9074feb4ce40cf0b90796 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Sep 17 15:48:56 2008 -0700 + + Conditionalize Composite-based backing store on pScreen->backingStoreSupport. + (cherry picked from commit 37876602957924c7cff759a800eddd574ee2385a) + +commit b4762c0245ed2966606171cf27f40aa745fdc76e +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Sep 16 17:13:42 2008 +0200 + + exa: disable shared pixmaps + + They got re-enabled in ee7c684f21d220d5e046bab31ae617a7d64d60f6 + ("Reimplement ShmPutImage.") + +commit 52bbfc5bfa64fd09ef625f35a2fb4a0518003825 +Author: Mikhail Gusarov <dottedmag@dottedmag.net> +Date: Mon Sep 15 10:43:46 2008 -0400 + + scrnsaver is optional at build time. + +commit b6ab114212c0e4c3346ceb5b207f14c526ab81e7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 12 19:11:53 2008 -0400 + + Array-index based devPrivates implementation. + + Note: DevPrivateKey is now pointer-to-int, which means + each key now needs to point to some global storage of + size at least sizeof(int). + +commit 999f3362d50a753c1801d565766219808efdb1a5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Sep 5 17:32:16 2008 -0700 + + XQuartz: Dead code removal + (cherry picked from commit 43184cd379c4fb7254391b8a362016cbf89b5529) + +commit 6548a55ebdf43231a3c48debf54aa5aa2f1aa956 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Sep 5 17:05:03 2008 -0700 + + XQuartz: 256 color support + (cherry picked from commit 8dd6d5c825d457f26b41b79d02d57ed4a5ecf1f5) + +commit bad7cd14c2021b14971b3f707f927803a053003e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Sep 5 10:46:36 2008 -0700 + + XQuartz: Dead code removal + (cherry picked from commit bf10fb0b1f776e72db7c76db11f764e26f9d62c4) + +commit 1119fe136f8731f26fc6f50b92f5ddf78f3f83be +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Sep 5 10:46:20 2008 -0700 + + XQuartz: Changed around fd handoff model to be more robust + (cherry picked from commit 4fe605c2bc62d50e0b5764d9edda245af227630b) + +commit 183233b27beb441742a53e440c3389b4ea125b8a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Sep 12 15:25:44 2008 -0700 + + XQuartz: Don't warp the pointer on server start for XQuartz + (cherry picked from commit c0da576d4921c246a9ac747921b48ab9e718347f) + +commit 7a46dd30d332bc1d42f82b0391e806d3b067ebbd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Sep 4 09:18:40 2008 -0700 + + XQuartz: Dead code removal + (cherry picked from commit 2e45344870f5d17181df6407da3448991036d783) + +commit 1c70e53f2560cb877c8b149034f296232de67a4e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Sep 4 08:55:22 2008 -0700 + + XQuartz: Fixed proximity logic errors for tablets. + (cherry picked from commit d942849f248c368b92ca73e145e8a5bc339112d7) + +commit c661c6ae7a9cd981f914484aa4c3007922280def +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Sep 4 08:07:32 2008 -0700 + + XQuartz: Remove decls of crashtracer strings that we don't use anymore in here + (cherry picked from commit 4a653c6bfd270f2960a8c7e726e7628cfc3c9051) + +commit 54162aca404a7de2e560cc2aea01445e14742efe +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Sep 4 05:18:31 2008 -0700 + + XQuartz: Fixed a crash in RootlessNativeWindowMoved + (cherry picked from commit a16048cec08e173ce42a78a77704f5fdfcb4480f) + +commit ce781cac1b52003da6c025cd29e2c2ad97dbb324 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Sep 11 16:24:20 2008 -0700 + + Fix distcheck. + +commit 31c62495f1de6e9ba41e1f6d7fa263eeb849129b +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 10 13:11:09 2008 +0800 + + Drop a reference to user mode after create + + User mode has no customer when create until assigned + to some output. + +commit 079625570d51e41569b73b2fd9237eb8f967f408 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Sep 8 08:50:52 2008 -0700 + + Bump ABI major versions for the TryClientExceptions change from commit 883811c. + +commit 4e004c68283828660f2259a4a4120a84667dcafa +Author: Zhenyu Wang <zhenyu.z.wang@intel.com> +Date: Mon Sep 8 09:16:59 2008 +0800 + + Revert "randr: fix user mode create initial reference count" + + This reverts commit 7c5ca85a9e6d49ab572831b3e0c08bb4cafb395e. + +commit 40a9482f8c5b3eac86c221ccce78510e850f4d2b +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Fri Sep 5 06:09:51 2008 -0700 + + Add cscope files to .gitignore + +commit bf333c2f9833a178887e7bdd7fc338f1e09c387f +Author: John Tapsell <john.tapsell@john-desktop.(none)> +Date: Wed Sep 3 12:20:17 2008 +0100 + + fbdevhw: Remove pixclock check. + + The check can fail because the output from FBIOGET_VSCREENINFO is used to set + Clock in fbdev2xfree_timing(). Then in fbdevHWSetMode(), xfree2fbdev_timing() + is called which sets the pixclock based on Clock. The resulting circle results + in slight rounding errors, causing the comparision check in fbdev_modes_equal + to fail. + +commit 47bf269d5922a4998c33908a53ad1affa8de96c0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 12:54:56 2008 -0700 + + mieq: Fix my broken cherry pick. + +commit 1669308be6d4cc6265e5fa8ef47fbf2cbef6f093 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 09:23:06 2008 -0700 + + XQuartz: Added pasteboard proxy code stripped out of quartz-wm. + (cherry picked from commit 1f842c71c35db031a24de646429834d6054adf1d) + (cherry picked from commit 144746223d8dc3f6ff2a0e805aa27a6e57df558a) + +commit 46168b3b404164c1f2e7876031e70fb77192fe75 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 09:11:25 2008 -0700 + + XQuartz: Updated Tablet code to include ranges for valuators and added cursor and erasor + (cherry picked from commit 6bca78760951cb5cb57ea66b7631a2dc230dc27a) + (cherry picked from commit fafcafd6de39cf6b5967793f03b30b49db36fec5) + +commit 7f5318131ddf86bed5797c0d9641f6ff34f34be0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 03:54:42 2008 -0700 + + XQuartz: Removed "Done" button from Applications Customization. Now properly save on exit. + (cherry picked from commit 2f1e163d5db6063e54fcaa045ea67c29ce3e46aa) + (cherry picked from commit 7542c00b96461c3474b8c23545171c4b6ddfd29d) + +commit 9e70a3cf58c205948f6a415e203d825e9b660d9d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 09:33:39 2008 -0700 + + mieqProcessInputEvents: Check custom event handlers first. + +commit 700e8bf33f9b1c3921de912b8110fadf5e0626da +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 02:41:20 2008 -0700 + + XQuartz: Updated man page + (cherry picked from commit 6932d0d19ea75c64ed38b82a246b68c6bbfb8cec) + (cherry picked from commit 8e3da36b6b0a261975808bc67b5caca733a1a23d) + +commit 7430bb9093ea8cf9589d745742c7353e53a144f8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 02:37:09 2008 -0700 + + XQuartz: Removed dead code (unused option definitions) + (cherry picked from commit 3d74f77490105c0704c0b10dc7a6eb859bf6e985) + (cherry picked from commit c1e5ea9ba058f6a13f564165a3d6862335729630) + +commit b3836e5bdd7e2e04e563246d90f385e1b4741baa +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Sep 3 02:36:39 2008 -0700 + + XQuartz: Cleaned up our sleeping before adding the launchd socket. + (cherry picked from commit ebfe49dfca6e04d66232bad760f522629397cc35) + (cherry picked from commit 2cf74a76d54d795cfc3c0380a526b9177327782d) + +commit 7c5ca85a9e6d49ab572831b3e0c08bb4cafb395e +Author: Zhenyu Wang <zhenyu.z.wang@intel.com> +Date: Wed Sep 3 09:41:00 2008 +0800 + + randr: fix user mode create initial reference count + + Don't need extra reference count adding when creating user mode. + This fixes user mode destroy, otherwise we get BadAccess error. + +commit 4e1f9f51a9eea115ce2a073824e9c5cef4e2f364 +Author: Daniel Drake <dsd@laptop.org> +Date: Tue Sep 2 16:20:40 2008 -0400 + + Don't try to destroy a NULL pixmap. + +commit 613ce0955032fb032de0a3940752828d314f057a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Sep 2 15:43:15 2008 -0400 + + Fix strict-aliasing silliness in XAA. + +commit b5cdcfa55c399e83d51242e93d4f25d8bc4fec1f +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Sep 1 19:45:30 2008 +0200 + + Xevie: swap replies as necessary + +commit d3ae193f4ac87530f2745f8cb5e7b70dd516881e +Author: Thorvald Natvig <slicer@users.sourceforge.net> +Date: Mon Sep 1 19:36:56 2008 +0200 + + Xevie: always initialize rep.length (bug#17394) + + The XEvIE extension doesn't clear the rep.length field for any reply but + the version check. Hence, if there is junk data in it and that is sent + to the client, it hangs. + + X.Org bug#17394 (http://bugs.freedesktop.org/show_bug.cgi?id=17394) + +commit 0466b8811ce8ebc1d993f177cbb7a22e997640f1 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Sep 1 09:57:25 2008 +1000 + + exa: drop cw.h inclusion + + this doesn't seem to be needed, at least I can't see any warning without it. + + I'd like to build EXA into a driver and cw.h isn't exported + +commit 881bd15f445bb62c3fdea863c968c95217408b6e +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Aug 31 18:07:22 2008 +0200 + + xf86Crtc: Set mode to NULL, so nothing bad happens if crtc == NULL. + + - Fix is courtesy of math_b. + +commit f4e9a1a98f97155de62908309e87c10487125926 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Aug 31 17:45:08 2008 +0200 + + damage: choose less ambiguous function names + +commit 0cd6709db5febbe7fbd073e429421fcd81041e08 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Aug 30 16:13:58 2008 -0700 + + XQuartz: Fixed editing of Applications menu + (cherry picked from commit da647f1add4c1ae7854c0fbfbf972666ce5d12c8) + +commit c4d290fc54542ccba7c3a46bc75b0c3322d0ca48 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Aug 30 14:19:47 2008 -0700 + + XQuartz: Fixed missing symbol in quartzKeyboard debugging + (cherry picked from commit 8ad55e484f0ba9073ce07a03de660cc546a7b668) + +commit 5d7d959b1143979c3445639c9d108e02da0c1475 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Aug 30 14:18:07 2008 -0700 + + XQuartz: Don't even build with GLX support since swrast now depends on libdrm + (cherry picked from commit 3739525d57dff2b3b034b5768f357b1c25577909) + +commit 45def7f0a342f4733cafb06adbfed14932f0e01b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 29 22:16:03 2008 -0700 + + Removed dead glcontextmodes + (cherry picked from commit c6d0ac7471209d835e8d9a25adcbda893ddfa1cb) + +commit d01c5ca7935a8340a3cd68c325da6dfec005c952 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Aug 30 15:35:32 2008 +0200 + + Xserver.man: Typo (the the). + +commit 229e60db8f95232afc8cdcb7cd0572d117c84b90 +Author: Thomas Bodzar <Thomas.Bodzar@quest.com> +Date: Sat Aug 30 15:34:29 2008 +0200 + + Xorg.man: typo (the the). + +commit 1885582444fb06da73dea1f118a777bea26e1dc1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 29 21:18:26 2008 -0700 + + XQuartz: Placate automake which doesn't like escaped newlines even in comments... + (cherry picked from commit 73db1170129a31ad2d55a7e83ac6dfc8030e47f1) + +commit 8abcc12fdd5bd9edc0288a1ab8f75e65ffcb8c71 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 29 20:55:25 2008 -0700 + + XQuartz: Added debugging output to the crash log to help track down two crashes, since people don't often report their system.log spew. + (cherry picked from commit aaf0f71db197526b6b866cc1b39fbdfe051879ef) + +commit aee19c7b5542aa147b89b1ae8340e9931d81729f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 29 03:54:55 2008 -0700 + + XQuartz: xp_is_symbolic_hotkey_event catches the input menu, but not our mainMenu, so we still need to do that the old way. + (cherry picked from commit 25eccf12c89d73b8bce2c9be14841efb230acedc) + +commit 974db58f5b730c3770ee461665a02dd4334d1dea +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Aug 30 00:37:11 2008 +0200 + + damage: initial attempt at a damage marker mechanism + - This should allow drivers to recieve post submission events for X<->opengl synchronisation. + - Lacking a testcase, i'm open to suggestion how to do it better. + - The idea is: + - driver recieves event + - driver creates personal identification and inserts marker into X fifo. + - when something wants to use an X pixmap, it checks if something is pending. + - If so, it synchronizes the 2nd fifo using the initial identification. + - Driver is not required to use interrupt based systems (price too high). + - Lower latency is ofcource better. + - If this is somehow unusable for you, then come up with improvements. + - For that reason i wouldn't consider the api fixed for the moment. + +commit 454cb0802eec3c2c2cdbcc17971bced868462b83 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Aug 29 22:28:02 2008 +0200 + + damage: DamageReportRawRegion should set pDamage->damage + + - I found no evidence in the protocol, that it should be differently from all the other modes. + - It seems to have been like this from day 1. + - If anyone has evidence to the contrary, please enlighten me. + +commit ae6ca434104405302f30a58bde8738d9579d9dc9 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Aug 29 22:21:54 2008 +0200 + + damage: internal functions start with a non-capital letter + +commit 1861250cd7e84b05e8298b74e3c7e97da72ddfba +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Fri Aug 29 22:15:23 2008 +0200 + + {damage,exa}: sanitise damage + + - Redo damage naming for more consistency. + - Call post submission functions only where appropriate. + - EXA can now live without it's odd damage workarounds. + +commit 5af77d43fe812e127d5d335527fa940ab9d95f38 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Aug 11 16:59:17 2008 -0400 + + DRI2: Drop sarea use, implement server side swap buffers. + +commit 60ad8d5d05485339e89d7f1f9f1ded75de7c7ea1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 28 23:45:17 2008 -0400 + + Attempt getpeercon() on remote sockets as well as local ones. + +commit ebea78cdba0ff14a397239ee1936bd254c181e1b +Author: Tomas Carnecky <tom@dbservice.com> +Date: Thu Aug 28 18:05:40 2008 -0400 + + Prepare for array-index based devPrivates. + + TODO: static indices can be made just an int; some indices + can be combined. + +commit ec7907f8fa04dcff2649cc4846975844314f737e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 27 19:27:13 2008 -0400 + + Add an array of integers for use as per-screen cursor private keys. + + Replaces the use of the screen pointer itself as the key, which was + nice but won't work now that an array index is being stored. + +commit 86898491497a43814caf42013651086e62fe6162 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 27 19:17:15 2008 -0400 + + Remove unused GetGlyphPrivatesForScreen. + +commit 90b178cc7feda1f9c4995b98364739e71233fff3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 28 19:36:22 2008 -0400 + + Don't need to request space for Xnest pixmap private. + +commit 835b532d6f51d08998d7ab49fcb41db8266487ce +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Aug 28 14:49:35 2008 -0400 + + Build fix. + +commit 040212ee60af9d043c4c3f98bba5120c3b8e33f7 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Aug 28 13:49:35 2008 -0400 + + MIT-SHM pixmaps, if they exist, are ZPixmap. + +commit ee7c684f21d220d5e046bab31ae617a7d64d60f6 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 27 16:05:47 2008 -0400 + + Reimplement ShmPutImage. + + There's no reason to not just dispatch this straight into the GC. As a + bonus, if you do so, damage wraps correctly, and thus swcursor works. + The side effect is it's no longer possible to override ShmPutImage with + ShmRegisterFuncs(). + + Also remove the (broken) damage tracking for same from EXA, since it didn't + work right, and is now superfluous. + +commit 2db1afbf2e56d8743c701d81a5797001ce9e5c52 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 26 23:09:20 2008 -0700 + + XQuartz: Always use TIS for the keyboard layout seed since KB* aren't thread safe. + (cherry picked from commit c8244177b0dbcb28d2f5509e6f2a3e8057889790) + +commit 319405fa4a530804c19fb7d0fcece5c912e41c9d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 26 21:11:35 2008 -0700 + + XQuartz: Fixed needed xplugin version. >< + (cherry picked from commit 01b3a99dff79e0d2b316e02658c19fa79d9144ae) + +commit 3350770bd6d90fefa1133ac738c1d4eae2d568a6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 26 19:13:56 2008 -0700 + + XQuartz: Use new Xplugin API to determine if a keypress event corresponds to an OS-X hotkey that we should dispatch to Appkit. + (cherry picked from commit e7658e745f8a3eaf5cec9f54a8a1b7e5a7708e09) + +commit 7930ea9116f232a3762f0085e5ca65e06d1142fc +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Aug 25 22:10:46 2008 -0700 + + XQuartz: Made a note to come back to the xinitrc race condition in the 1.5 branch when we move up to it. + (cherry picked from commit 54a882dcbdccef3f3eb4e6398e13c88185a8986c) + +commit dc1171df5baa0c4aa366ff2b07af5b8eb44dae12 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 22 01:12:37 2008 -0700 + + XQuartz: Fixed bogus args to debug ErrorF + (cherry picked from commit f0351c2b80f30ae31f041798b84139141fc3d5a5) + +commit ac936525afe46bad329387232f8d48e77f6a4175 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 22 01:11:33 2008 -0700 + + XQuartz: Cleaned up mouse event translation a bit more. + (cherry picked from commit c286f2a718fdaf6ad10249b59abb20731da8d904) + +commit 1b42f550001c11c93d5a2144df98a5c687c010c2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 22 00:45:12 2008 -0700 + + Xquartz: Added missing ev_type for NSTabletPoint event. + (cherry picked from commit 07548f13947a212dcc020d52fe0ad679255121e2) + +commit 13a89f19208cf998808ff2896b7711310768f94c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 20 10:21:23 2008 -0700 + + XQuartz: Added more explanation to debug keylayout spew to cut down on report-spam. + (cherry picked from commit fcdc9f8b5abd724d75f53d48fdadbed9859e9e79) + +commit dd1e54d6eed0bce289517b3cb95e6b1a187ca6e0 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Aug 26 20:02:55 2008 +0200 + + exa: fix thinko from 988725f32e082aee9392a71464125157a83d1e67 + - the drawable of the pixmap is not the same as the original drawable (possibly a DRAWABLE_WINDOW) + +commit 7c14fdbacfcd2f4d56a346e6c72e44e4ba9909c1 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Aug 26 17:21:43 2008 +0200 + + exa: some minor cleanup + - Fix compile warning + - Order exa.h by source file that exports the function. + - Move the function i created earlier to private headers. + +commit de79edbd9f67762950eaac2dc79668035239897c +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Aug 26 17:03:12 2008 +0200 + + exa: report damage manually for exa{Trapezoids,Triangles} when needed + - Plus a micro cleanup of unused variables. + +commit 988725f32e082aee9392a71464125157a83d1e67 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Aug 26 16:54:29 2008 +0200 + + exa: move destination damage for internal calls to a special function + - This should improve clarity for someone who isn't familiar with the code. + +commit ce193476808f54d946351458361c62132d81b62f +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Tue Aug 26 13:18:58 2008 +0200 + + exa_glyphs: remove useless offset + +commit fd94651fc3a6f49ec153ffb823b86c1d125bb298 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Aug 26 10:58:35 2008 -0400 + + Fix driGetConfigAttribIndex unaligned access to GLboolean. + + We don't actually send the float mode so just drop it. Drop a couple of + other unused or redundant fields from GLXconfig. + +commit 41bd8d5dfe27d5c91fe7e4cdba1475a2a0741b1c +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 25 11:27:26 2008 -0400 + + EDID: Build fix. + +commit 76ed409acd772f2c041239345c6dc64cbef0e5b2 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 25 10:44:45 2008 -0400 + + EDID: Publish the whole block on the root window if we've got it. + +commit 5724f7fb5bea6fa1a354c64c0972c53d70e2f27b +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 25 10:39:36 2008 -0400 + + EDID: Publish the whole block in the RANDR property if we've got it. + +commit 668f89eba3e8f9da7843f5cb350f8dc1e5d7efbe +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Aug 22 10:32:18 2008 -0700 + + Remove unnecessary #ifdef __SOL8__'s + +commit cc78d977cac74fcfb7c9b27e7109a1e369018dd8 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Aug 22 10:14:11 2008 -0700 + + Convert Solaris #ifdef's for <sys/kd.h> to AC_CHECK_HEADERS check + + Upcoming virtual terminal support changes in Solaris kernel will provide + <sys/kd.h> on SPARC too, so this gets us ready for them. + +commit 95b466e457542bfe08b0ed2bbb5db8d28a961cfd +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Aug 21 17:24:40 2008 +0930 + + Xi: don't include .c files. + +commit c696da75c7326c5e1f1cd48292c0519ddc22e11b +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Thu Aug 21 17:23:11 2008 +0930 + + Xi: swap devices property replies. + +commit 01264f17925005969c3b71ca945fc1014bcd8c8e +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Aug 21 01:32:03 2008 +0200 + + Add swapped dispatch for randr 1.2 requests + +commit e02f864fdf19a5ab1682336be343c57fdb69ef43 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 20 13:24:03 2008 -0400 + + Suppress cursor display until the first XDefineCursor() request. + + Yes, this means the server will start without showing a cursor. Pretty + much any application that wants to interact with the mouse will define + cursors, so this essentially just delays showing it until gdm (or + whatever) loads. + +commit 64ef7ed072007b1d0b4de5ff1e5eababa418c794 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 20 13:14:03 2008 -0400 + + Centralize declaration of ConnectionInfo. + +commit f1f44940f10b0209946ec0f08104a372d7d945a0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 20 09:50:54 2008 -0700 + + XQuartz: Support windowItemModMask=0 or -1 to disable window shortcuts. + (cherry picked from commit 81187364e512606a6aebb95ab2967d9d420f57f2) + (cherry picked from commit f2ec79e4a159dec6481691e4dd615db01770dd7a) + +commit 6c5612c2e1df1e89388ffff97251f5328558f8e8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 20 09:21:44 2008 -0700 + + XQuartz: Added window_item_modifiers defaults item (and option to localization) to change the modifier keys used for the windows menu. + (cherry picked from commit e4110861d307a55d9032cb83cf024ec1f294e8d7) + (cherry picked from commit fcfc05482a88696cb713c7a2ddfcf935ae8378a6) + +commit bdc277c9b3dc6b3b95f74b20a49ce163c5fae980 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 20 09:58:48 2008 -0700 + + XQuartz: Just cleaned up formatting of event processing code... no "meat" changed... + (cherry picked from commit 745bc8ab387d6794f47d8b9dca33b4c81f6dd39c) + (cherry picked from commit a28a2be52478a1557a363140f7bd70ececf144dc) + +commit ed42108920cc695b96ed57bf9dcfea1470e74669 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 19 02:02:11 2008 -0700 + + XQuartz: Added appkit_modifiers defaults option which users can set to 'rcommand' to get access to the input menu with right command + (cherry picked from commit 02af74d7a5a7225f408915254c40856159dc7f19) + (cherry picked from commit 2da32894dff8340f6ca7c980277fca7ec835a193) + +commit be06961312e2111778bfd97b2c8a927acc61f43d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 20 09:56:06 2008 -0700 + + XQuartz: More input fixes + stuck-modifier fixes (capslock) + 3button-emulation now doesn't send the modifier key with the click + Added other options to fake_button2 and fake_button3 defaults options: + ({l,r}{control,alt,command,shift}) + (cherry picked from commit 8fb6a1cf44c35a20dfb0c05c9824f94898f88da7) + (cherry picked from commit ae9c1b3cfb3874b4d1251681c24bda91c398bcab) + +commit 436b659091dd17bb3e316377ba31f5d2a5dfa12e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Aug 14 09:34:12 2008 -0700 + + XQuartz: Updated bundle version to 2.3.1 + (cherry picked from commit eedecba0b882bb07931e8d9168589f5be7a08a69) + (cherry picked from commit 7d9d864461858b25c5eb5858fdf4b53771795f11) + +commit bc4cef1d0ae7cbb8f5fe16d576db45abd4330370 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Mon Aug 18 16:28:33 2008 +0200 + + exa: remove useless cache{X,Y}off from UploadToScreen() arguments. + +commit 38bdc34d555f956a1ff1e1bb8eef95e3ba2bac64 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 15:12:39 2008 -0400 + + Remove redundant check. + +commit 47b31233c26f710be70ffcca17e5402d03d5733f +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 15:10:12 2008 -0400 + + Simplify driver setup. + + No point warning about missing driver hooks, that just means the person + who gave you the driver is inept. Might as well just crash. Also, + just name anonymous screens as screen%d instead of failing after the 36th + screen. Bonus points if you can figure out what the failure mode would + be on the 36th screen, and what the effective screen limit was. + +commit b99fc65b53769400821a2bd8f691ece35a5b8847 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 15:06:53 2008 -0400 + + Simplify calling xf86EnableIO() a bit. + +commit b1f2c7a89ace1f6e5750783f3c43c4c5a6d24374 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 15:06:11 2008 -0400 + + The ->Identify hook is not mandatory. + + Best comment ever though. Mad props. + +commit af5125968a738ec8f496d04eb65acb7c8f812115 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 14:47:10 2008 -0400 + + Refactor misprite a bit. + + No variable declarations in header files, please. + +commit 41b68e0dea9305d66bca2fc4ad96db01f5342c6d +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 11:02:31 2008 -0400 + + Remove unused -co option. + + What did this even do anyway? + +commit 1f416fba994ed7a7e072a9f0a86b515855ea3bac +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 10:56:45 2008 -0400 + + Remove unused -bestRefresh option. + +commit 5a72c45d42abc7227c6cf3d14fd7043ea7527c54 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 10:54:11 2008 -0400 + + Remove unused -showunresolved option + +commit 9f08ffc557b52e2e8cd54fb692b66700c83d61c6 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Aug 19 10:29:23 2008 -0400 + + Remove unused xf86Info.pMouse + +commit f227fbf74f0c619ecf3275cdb4c10b1a4b3a8cfc +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Aug 19 11:36:12 2008 +0200 + + EXA: Inline Prepare/FinishAccessWindow into only caller, ChangeWindowAttributes. + + Also check the requested mask in addition to the GC state before doing work. + +commit 825b3fe11d1b813bf8d5b24a880ed04b78ae1acf +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Aug 19 11:22:40 2008 +0200 + + EXA: Don't use exaGlyphs if the driver doesn't provide a PrepareComposite hook. + + It's buggy without Composite acceleration (leading to cropped glyphs) and not + really useful in that case anyway. The bug probably still needs to be found and + fixed for drivers that provide a PrepareComposite hook but can't accelerate + text rendering though. + +commit 75e495a4cd823b6fa42a8d167ecc9f4723320dea +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 17:58:08 2008 -0400 + + Remove unused xf86Info.mouseLocal + +commit b3dfd7e3e4deef21b40c885f8e7eae34b55888b2 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 17:56:18 2008 -0400 + + Remove unused xf86Info.sharedMonitor + +commit 5e43cd28692bc05cac80f38b47104a26c0524385 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 17:46:42 2008 -0400 + + Remove the remainder of grab deactivation and closedown. + +commit cd1e8f26147919227e7624ac4c6b313d972a4d35 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 17:40:46 2008 -0400 + + Remove unused EstimateSizesAggressively option. + +commit faaf0046155abbd15415d5a6b62ead4f58935c28 +Author: Mathieu Bérard <mathieu.berard@crans.org> +Date: Mon Aug 18 17:23:26 2008 -0400 + + Remove xaaTEGlyphBlt.S + + Should have been removed in 593144dddd977f53bcd1a115f9544eeece46df4c but + ajax was asleep at the wheel. + +commit 562462e78dd6a5e2ed5b36aa22be52f31d55485d +Author: Mathieu Bérard <mathieu.berard@crans.org> +Date: Mon Aug 18 17:05:24 2008 -0400 + + Remove dead {bsd,lnx}Resource.c + +commit e3e47b35e369bf4abb0fe15865acca0b34600b1f +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 17:03:22 2008 -0400 + + Remove MAX_PCI_{BUSES,DOMAINS} and some associated #if 0. + +commit 593144dddd977f53bcd1a115f9544eeece46df4c +Author: Mathieu Bérard <mathieu.berard@crans.org> +Date: Mon Aug 18 16:46:36 2008 -0400 + + Remove some unused assembly code and assyntax.h + +commit 2d3e478384ef8af2a760f39792e35e4a6174c967 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 15:09:44 2008 -0400 + + int10: Fix int1A for %ax == 0xB101. + + pciNumBuses was pretty much always 1 post-pciaccess. That ain't good. + +commit 539717fe1f08a000d1eef9f345d24cb49e3663b5 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 14:50:33 2008 -0400 + + Remove (unused) pciMaxBusNum. + +commit 3c03d9f1efbbacec6e8be58da99bf0977a8e0fec +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 14:37:42 2008 -0400 + + Remove sparcPci.c + + There is no way this code can have been building for anyone since pciaccess + was merged. BSD and Linux were already using OS code on sparc, the only + people who could want this are Solaris, who should be using pciaccess + anyway. + +commit 9a39b6cfbda306eb594e87ce828afa01cd7aa01e +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 14:26:01 2008 -0400 + + Remove XF86SCANPCI_WRAPPER. + +commit 470b05a610e641094d46742393684acd786d78a8 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 14:03:36 2008 -0400 + + Remove vestigial MAX_PCI_DEVICES. + +commit 244a635fcdc9e0a7212d51b26d74f49d8e1b071f +Author: Fredrik Höglund <fredrik@kde.org> +Date: Mon Aug 18 19:27:34 2008 +0200 + + Fix the tile offset in miPaintWindow for ParentRelative windows. + +commit fdf7c747a8e1bc59dfb31b7f90dd5eab2687315b +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 13:13:03 2008 -0400 + + Remove PciProbeType and associated weirdness. + + This code was effectively only used in ix86Pci.c to select PCI config + access type. Nobody should be using that path anymore, in the glorious + pciaccess world; kernel services should get it right for you. + +commit 95bb6f53624a3e6f4d62a2f789982c5544d2fc70 +Author: Mathieu Bérard <mathieu.berard@crans.org> +Date: Mon Aug 18 11:47:19 2008 -0400 + + Remove ancient unused inline hack. + +commit e1ae8db625b5e8c298a557592ef23656b3da4886 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Aug 18 09:53:48 2008 -0400 + + Drop dead PowerPC PCI code. + + Also add a warning for anyone still using legacy PCI code. + +commit 99583b43a9a202d047ff417d47485e4c0e0c9670 +Author: Jie Luo <clotho67@gmail.com> +Date: Sun Aug 17 23:13:22 2008 +0200 + + glx: avoid possible NULLptr deref, fix #16884 + +commit 421b7e8f12083e9518fa7deda968a2f73c9a0006 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Aug 17 19:57:02 2008 +0200 + + exa: fix assert logic thinko from 361a9eb953aaa38f8ebc057185de29e50f9eef26 + + - I guess failing PrepareAccess is rare, since this a 3 year old bug. + +commit 1e62e773273539352bc21b2da5262678dd3fc7df +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Aug 15 15:19:44 2008 +0930 + + Require inputproto 1.9.99.4 + +commit 609c04b62bdb0e86f33860069033c7142eecf210 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Aug 15 14:51:59 2008 +0930 + + dix: stick a warning in about loss of subpixel precision. + +commit de1573172ad2c2e98c101727930a468213295783 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Aug 13 13:11:44 2008 +0930 + + Backport device properties to XI 1.5 instead of XI 2.0 + +commit 8b9ed7dec2954d4890ddcc7c874fc0832b16495a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Aug 14 09:08:14 2008 -0700 + + XQuartz: Fixed a stuck modifier key bug. + (cherry picked from commit eeb6e5a9e98dcf045ec230f160d5992080dceba6) + +commit 1770c85374883229ec5e9685229b2333e62705e6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Aug 14 07:32:37 2008 -0700 + + XQuartz: Made 3-button mouse simulation a little more consistent. + (cherry picked from commit d207b037d2ae213369e5627a17d8831c9bc16ad8) + +commit f51f77d25e69b51fa3fd557ffdb5573b61759706 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 13 19:09:05 2008 -0700 + + XQuartz: Reverted "Control" text to be accurately "Command" in the input prefs. + (cherry picked from commit b287c481e1cbe77ff84d10a708505f148a0c8434) + +commit 04956b80431169e0ae713a3e6ba4cdc157ce3a66 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Aug 9 10:07:32 2008 -0700 + + Transport/Apple: Add TRANS_NOXAUTH to incoming connections when the listener is flagged as such + (cherry picked from commit ba4a7924261070ad0aff7211b7a1c9581fad4646) + +commit e6813e8de65eee854bbffe6ab0f8ba158f43b10b +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Wed Aug 13 14:24:45 2008 +0930 + + Xi: byte-swap device property requests. + +commit 0ce687634fa5e0d955e896a0d0d5f584a4cfd1a4 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 13 17:28:08 2008 -0400 + + Eviscerate save-under support. + + Use a compositing manager already. Plus I really wanted to use 'eviscerate' + in a commit message. + +commit f456f32cd97684052cab4712e7f4c827132c554b +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 13 16:21:28 2008 -0400 + + Build fix. + +commit c1e9b7dc6f4600fe6c301aecd7d67461cb884df0 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 13 14:13:55 2008 -0400 + + Sledgehammer off the DRI2 build system. + +commit 544bfd06663ff71bc5275459cf74a3557530544f +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Aug 13 11:09:54 2008 -0400 + + Remove xf86Version.h and related API. + + We haven't meaningfully been API-compatible with xf86 modules in ages, + let's stop pretending. + +commit 139c3ab7b754dc425a09d5f7b6d2a8fb2b88138a +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Aug 12 17:49:49 2008 +0930 + + Xi: return the state from the correct keyboard in QueryDevicePointer. + +commit 998375f4154b000f75b2bafd4e276c0237d24dc7 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Tue Aug 12 17:49:16 2008 +0930 + + dix: remove superfluous check. + +commit 9f9268821b13038556fbc029df54ab0e9b2aa77f +Author: Mathieu Bérard <mathieu.berard@crans.org> +Date: Mon Aug 11 13:52:38 2008 -0400 + + The smart scheduler is not optional. + +commit 2e2ce817ce404a5e000c9750fa96f656fed370b8 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Aug 10 23:07:46 2008 +0200 + + Move strcasecmp(), strcasencmp() and strcasestr() prototypes to os.h + + And make sure os.h is included in files that use it. + +commit 02efa78ce2da470b252289ff2af598d06bc84ece +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Aug 10 18:29:35 2008 +0200 + + add libXinerama to the list of dependencies. + + Now that panoramiXext.h is installed bt libXinerama, it becomes required + to build Xext. + +commit be2210b69defa225d8bc4bb90d94bfd740ef8b1f +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Aug 9 23:43:50 2008 +0200 + + remove OpenBSD/amd64 specific mtrr API. + + The old code never worked anyways and was removed from OpenBSD. + OpenBSD/amd64 4.4 and later support mtrr with the same API as + OpenBSD/i386. + +commit 6e33e6f355f7f04e77a165eb67b1414724c1fba3 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Aug 9 23:43:03 2008 +0200 + + Move string comparaison functions to from dix/ to os/. + +commit 5968634996c08656a0c5e2fa35705cf7afac87e6 +Author: Dave Miller <davem@davemloft.net> +Date: Sat Aug 9 16:45:59 2008 +1000 + + glx: fix crash in driGetConfigAttribIndex + + Don't access GLboolean via int pointers + +commit 4212599c922373a224d2235c74672a3a3aa8e0b1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 8 12:17:58 2008 +0200 + + EXA: Make sure damage tracking code is inactive if the driver manages pixmaps. + + It was always supposed to be like that... It was only recently pointed out (in + a rather convoluted way) that it was not in fact the case. + +commit 073116cc44859e96374cde46325df8540621d5ee +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 8 12:15:27 2008 +0200 + + Remove commented out lines that make automake 1.9 puke. + +commit 666781cd9b62207e45eebd3eb55a930f3a345f72 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 8 01:41:28 2008 -0700 + + Removed rogue #include + (cherry picked from commit af238e99da45a4dd8d8cbb6564bb8d0a3d79d590) + +commit 4a0947bf06deacc3ae716730cfbbbeda1311bae3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 8 01:53:36 2008 -0700 + + XQuartz: Disable the Xquartz AIGLX for now since it doesn't even compile any more... + (cherry picked from commit 4545ba91e9d6ad62b6cafde3c73a672d3ded91a2) + +commit 5accc9b3ce1af539150d59b1800b66783fd3e947 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Aug 8 00:19:41 2008 -0700 + + XQuartz: Re-added deprecated code fallback failsafe for keyboard layout on Leopard with some debugging spew. + (cherry picked from commit 5854e712e9ebc210d2f8de6f5d4fb650944f314a) + +commit 465a9bb96e8a90e53e655b3245e22910201786d7 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Aug 8 17:37:06 2008 +0930 + + dix: don't try to create events if we don't have a screen. #16898 + + A NULL screen may happen during server shutdown, when the output has been shut + down but the devices still generate events. + + X.Org Bug 16898 <http://bugs.freedesktop.org/show_bug.cgi?id=16898> + +commit d684f5760f40b682a8b879641300abe689a263c5 +Author: Peter Hutterer <peter.hutterer@redhat.com> +Date: Fri Aug 8 14:18:01 2008 +0930 + + xkb: actually initialise sli before using it. + +commit e00cd54c1ac57ea6e7767e90592200f343d9d08a +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Aug 7 11:06:21 2008 +0200 + + dix: remove misleading comment in ptrvelo.c + + Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> + +commit 6ca34549b89e73e3e0ec3cb7585686b880534cef +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 7 16:27:57 2008 +0930 + + dix: remove obsolete FIXME comment. + + Thanks to Simon Thum for pointing this out. + +commit 2c3645581ee3f180d34e32c8016d5e4e1af4dca4 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Aug 7 11:55:10 2008 +0930 + + dix: SetModifierMapping should only apply to the ClientPointer and it's SDs. + +commit e1b286d495b760cf67ddf936eca11da50fba847a +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Aug 6 09:42:32 2008 +0200 + + dix: simplified debugging helper for pointer acceleration + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d95136e1510a48cc3ad066d880d56061fc6a42ee +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Jul 31 00:39:03 2008 +0200 + + xf86: don't replicate dix defaults for pointer acceleration + + the defaults from InitVelocityData() or hypothetic driver-side changes + are now respected, not overridden. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4f333d53510b82db57cfac1bfea22422cbb7be79 +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Jul 31 00:33:38 2008 +0200 + + dix: simplify velocity tracking filters + + prefer fp-mul over fp-div and remove rather pointless check + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit bf084a0769eee36ff799e5e5f2d1e875c1ebcc51 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 6 13:36:43 2008 -0700 + + glcontextmodes.[hc] were not added with the removal of the meas symlinks patch. Copied from mesa head 2008.08.06. + (cherry picked from commit 409e1dd1e9524b5c1a1ae58a759da77e587e3780) + +commit e72b1d21e44712e90595b1c31e67db6786d0d1bd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Aug 6 10:23:31 2008 -0700 + + XQuartz: Now properly disable xauth checking on launchd socket and mostly fix the xinitrc / launchd race condition + +commit d1b96cdea96f5321e0d254abde81cdaab2eca979 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Aug 6 10:37:32 2008 -0700 + + Add an xf86PrintBacktrace wrapper around xorg_backtrace to aid driver debugging. + +commit 26d31ad1c7f4c550d73419ecf76912d844186b30 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 5 15:14:08 2008 -0700 + + XQuartz: Added code and made comments more helpful for debugging first-client-auth bug. + (cherry picked from commit a8f0d32216e321b8ae6da182be9b1ea792f6e004) + +commit 0ef3243fb59fa993a7a07a08debbd4329254c265 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 5 18:45:54 2008 -0700 + + XQuartz: More fd handoff cleanup. + (cherry picked from commit 199d2dcb708c9f9d6b9ede149ea0fe9fba6c007c) + +commit e7dd3dd8f311d3872e0c4c9c2ca22c00f9d11f59 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 5 14:33:03 2008 -0700 + + XQuartz: Fixed some errors / typos in the preferences pane. + (cherry picked from commit e1e0c398bbb50394b164394e1f1870016489c25b) + +commit 6836f9aac801c3add0ae4aece05b32e85a0c5f85 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 5 14:24:25 2008 -0700 + + XQUartz: UI Cleanup. Removed done/cancel buttons from Applications->Customize + (cherry picked from commit d3157ca45c1f88edd040d721c1e944b9d2c090aa) + +commit c06e27b2f6fd9f7b9f827623a48876a225264132 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:42:15 2008 +0930 + + xkb: ProcXkbSetDeviceInfo should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit d9ca9819e975e0f6832a320f8be5958e5d942f85 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:41:40 2008 +0930 + + xkb: ProcXkbSetGeometry should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit 5ba87c3327786dd7c6e8e265a19c858e8faae8fd +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:41:08 2008 +0930 + + xkb: ProcXkbSetNames should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit 7e45c80204e06562d4475741caea65bc8758f3c7 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:40:25 2008 +0930 + + xkb: ProcXkbSetNamedIndicator should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit a609dbed7cf854a6ee9d33c7cf45615db9da1fb9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:38:59 2008 +0930 + + xkb: ProcXkbSetIndicatorMap should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit e8c2a3d7c996cb41c4c44ba67acae5ff9438fc06 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:37:39 2008 +0930 + + xkb: ProcXkbSetCompatMap should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit 3c7740aa8f21c1fda4190a1bf5d6ce089db5e35b +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:36:00 2008 +0930 + + xkb: ProcXkbSetMap should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit 31afd51dd49c0d0db2465fbc987044fab8b89f22 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 16:32:37 2008 +0930 + + xkb: ProcXkbBell should work on all attached SDs. + + If called with XkbUseCoreKbd, run through all attached SDs and replicate the + call. This way, we keep the SDs in sync with the MD as long as core clients + control the MDs. + +commit de4936d7482f820728efeef338a2041c7a9186d2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Aug 4 20:11:45 2008 -0700 + + XQuartz: Fixed proper processing of tablet button presses + (cherry picked from commit ca0babafa4e9cf1b67ec460655bffe569ac9c3e9) + +commit b70a8ba3dc52b277194ab267a101a3fd15062685 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jul 15 17:48:29 2008 -0700 + + XQuartz: Nuke Sparkle. + (cherry picked from commit 4991f54a8d84a9a8df89a99dbfc09391195578f8) + +commit 30851efdd4313506e92aeb6d3e5099dea99ab99c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Aug 5 12:54:51 2008 -0700 + + XQuartz: Fixed first-client-can't-connect bug + Readded the old exec() server startup path for regression testing. + Don't use the dynamic fd addition code since it's not quite working correctly. + (cherry picked from commit 08f3fe153edc5ab4ca010e8ce82d5c3fc0ddb72c) + +commit 277a74bcbb7d0a93c4f2e1de11daabd8c5f93ee8 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Mon Aug 4 23:26:00 2008 +0300 + + Redefine clients as a fixed array + + This removes yet another xalloc() each server generation. Also, I + couldn't find the corresponding xfree() so I guess that used to be a + memory leak there. + +commit 5532d63488ec45953ff7f925cfb4f87adb3b04a0 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Mon Aug 4 23:06:08 2008 +0300 + + Redefine WindowTable as a fixed array + + Instead of xalloc'ing it every server generation. The array is always + the same size (MAXSCREENS), anyway. + +commit e882ee7056f370e0619d137b4ec3973ecb4e3479 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jul 29 17:52:11 2008 +0300 + + EXA: Remove unnecessary #includes + + There wasn't actually any font code here, so no problem. + +commit 6c1bb64c6f2efd81856ca00591df37916713b142 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Aug 4 15:19:45 2008 +0930 + + xkb: break up XkbCopyKeymap into bite-sized chunks. + +commit 3c6a9c531f673b7a0cb9ca01860b4dbe79686363 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 15:52:07 2008 +0930 + + config: protect against potential out-of-bounds indexing. + +commit 92c51b183c2ff06361dad7f918daed6577ba4935 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Aug 1 14:24:54 2008 +0930 + + config: support type strlist for XkbOptions property. + + For backwards compatibility with server 1.4. + +commit 35b14519b4a3158592a089170ec039bbc219603e +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 29 12:59:57 2008 +0930 + + config: add parsing for input.x11_options.XkbOptions. #16874 + + X.Org Bug 16874 <http://bugs.freedesktop.org/show_bug.cgi?id=16784> + +commit d762c08aebe3b7e8c88e2e7a6fcf66057a21b403 +Author: Simon Thum <simon.thum@gmx.de> +Date: Mon Jul 28 14:07:48 2008 +0200 + + dix: export driver-side functions for acceleration + + also add additional safety for accel driver api + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 18e9fd69fe01298d825b46415b9c6bd86c75dfe5 +Author: Simon Thum <simon.thum@gmx.de> +Date: Tue Jul 29 10:07:43 2008 +0200 + + dix: use average of pointer accel profile + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 25882af6d3359e5ae42c927c555f5b257ba5665c +Author: Ivaylo Boyadzhiev <iboyadzhiev@nvidia.com> +Date: Sun Aug 3 18:55:12 2008 -0700 + + Fix a longstanding XAA CopyPlane bug. + + TmpBitPlane is a plane mask, not a plane index. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit d980913f3145cdc34baab27ff818c9631c4c8571 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Aug 1 16:15:04 2008 -0400 + + Erk. Actually check all the BARs, not just the first. + +commit 82d51e6df2bf677bdf24376092bcaa79b534f6e5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Aug 1 13:17:55 2008 -0400 + + Silence the "No matching Device section" warning in some harmless cases. + + If the device doesn't have any BARs then it's just a stub for some + lame operating systems that need one PCI device per output for + multihead. No point in warning about it. + +commit 9643e8d3482a35d355a243db7aa397ad47f29be0 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Aug 1 11:35:47 2008 -0400 + + Handle XGI cards in autoconfig. + + It's all a bit wonky since both sis(4) and xgi(4) claim to support the + Volari Z7 and V5/8 (0x0020 and 0x0040), so let's side with xgi(4), why + not. Note that the V3 (not V3XT) identifies itself as a trident chip. + +commit 63bdd4c27d47323b3282bf0b6eaecae91c79b45c +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 31 17:31:36 2008 -0400 + + Unifdef XIDLE. + + Seriously how was this still here. + +commit 8d214bc26f9b7ab6a5c54d7749cd4b6811cb0b96 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 31 15:46:52 2008 -0400 + + Document more of the OS and library assumptions. + +commit 2198e237b2ed85857c671eee2cd04dfc032befee +Author: Tomas Carnecky <tom@dbservice.com> +Date: Thu Jul 31 13:46:06 2008 -0400 + + Cosmetic cleanup to Xvfb/Xdmx configure check output. + +commit 148175fb8b365dcf00b13539b3f03ce33f3df707 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Jul 31 16:54:33 2008 +0200 + + EXA: Do still return FALSE if the driver PrepareCopy hook failed... + + Thanks to Stuart Bennett for pointing out the problem on IRC. + +commit 68fd6604a15b653d1fa244633eaaee9608a03ab3 +Author: Tomas Carnecky <tom@dbservice.com> +Date: Thu Jul 31 10:03:56 2008 -0400 + + OutputPropertyNotifyMask is a valid thing to select for. + +commit 64ebeeb5265a4c425b9397fdc86a6d81521a856e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Jul 31 10:58:52 2008 +0200 + + EXA: Fix exponential growth logic for GXcopy tiled fills. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16908 . + +commit 8405c25d9ddbfddb6b155a436f07ccad689e53bd +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Jul 31 10:55:44 2008 +0200 + + EXA: Simplify exaFillRegionTiled() control flow. + + Also only call REGION_TRANSLATE() when necessary. + +commit b37b1e66996f8335dafc97b12d25aaec452b931e +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Jul 30 18:48:27 2008 -0700 + + Make shmint.h part of the SDK. + + This includes ShmRegisterFuncs, ShmSetPixmapFormat, fbShmPutImage, and + ShmRegisterFbFuncs. Note that fbShmPutImage was already exported. + +commit a3afa6f2fb80489f7b6a88d12def09281d32ed94 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Jul 30 18:30:37 2008 +0200 + + EXA: Optimize GXcopy tiled fills. + +commit 37087bc10630ee7740df1369b3e56a44fd2ad2b0 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Jul 30 18:27:33 2008 +0200 + + EXA: Replace open coded CopyArea logic with GC op call. + +commit bb2cacd33eb85f39b9e7fa554545611957df677d +Author: Xavier Bestel <xavier.bestel@free.fr> +Date: Tue Jul 29 13:06:10 2008 -0400 + + Cosmetic fix to EDID decoding. + +commit a70754a9fdb019d85fbfca1898699f3c6f609fdd +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Tue Jul 29 14:16:25 2008 +0100 + + require inputproto 1.9.99.3 + +commit 591ef3c047ab3597fef9d687205e99c254ff2040 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 29 10:00:01 2008 +0930 + + Xi: ChangeDeviceControl presence events should set the appropriate devchange. + + Requires inputproto 1.4.4 or higher. + +commit 25dd5ce0770c5ff91a79c12223fd4af52759900b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Jul 28 12:33:58 2008 -0400 + + Add atKeynames.h in hw/dmx/input and drop evil cross-ddx #include. + +commit e39a16aa58456aaecee54edc64f189c958db0902 +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Jul 26 16:35:19 2008 +0200 + + xfree86: don't output a spurious newline to the log when loading a module + +commit 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Jul 26 15:35:42 2008 +0200 + + xfree86: use xorg.conf input devices if there is no ServerLayout + + If xorg.conf has no ServerLayout section, use the first mouse and + keyboard sections as core devices, even with AllowEmptyInput. + +commit 805f28e96ceb20bc53792ae3cf17f9c26564ae0e +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 12:10:52 2008 +0200 + + some trivial changes regarding C compat, indentation, etc. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 3209bd21d00b8673d321f70afb65720588ddacb3 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 12:06:34 2008 +0200 + + xfree86: perform pointer accel scheme selection by name, not number + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a17cb29f5acdfcdeac929d8c6be3600d44d038ef +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 12:03:17 2008 +0200 + + dix: preparation change: make runtime exchange of filter chain safe + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 1a9f9ac50f2b0db735789905cc29572a50c8ae4c +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 11:49:36 2008 +0200 + + dix: optimize precision in device velocity estimation + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit c184b91d9aa72031c2bac9f379f56633957ded30 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 11:33:25 2008 +0200 + + dix: improve the driver interface to predictable pointer acceleration + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 87aa5298576ed335ac31347e14fb30430288157a +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 11:28:09 2008 +0200 + + dix: introduce defines for accel profile numbers + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 4e32e6fb38d19c9993de86188e4f7e7916a028e2 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 11:10:22 2008 +0200 + + dix: rename classic accel _scheme_ to lightweight to avoid confusion with + classic accel _profile_ + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit d40183c665d458ac0a6e7952fbe986776a17fda7 +Author: Simon Thum <simon.thum@gmx.de> +Date: Wed Jul 23 09:28:06 2008 +0200 + + dix: add legal statements to ptrvelo.{c|h} + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit ec10eccd56be8b947cd63cae0687b8319857fe60 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jul 28 09:33:04 2008 +0200 + + GLX: Unreference drawables bound to the old context, not the new one. + + Apart from the obvious reference counting issue, this fixes + http://bugs.freedesktop.org/show_bug.cgi?id=16867 . + +commit 6ab8d6010adfd5ad6f1e1094a26c84f0aff934b1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jul 28 09:32:59 2008 +0200 + + AIGLX/DRI1: Pay more attention to return value from DRIGetDrawableInfo(). + + Could have crashed otherwise if the num(Back)ClipRects variables referenced by + the caller weren't pre-initialized to 0. + +commit b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jul 28 09:32:54 2008 +0200 + + Fix Makefile.am crack. + + Looks like an artifact from early modularization. + +commit 3575d9584edf35ec1720bc3755b6576a56613685 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Fri Jul 25 16:46:44 2008 +0930 + + config: note that HAL options must be strings. + + Only strings are parsed by the server, all others are ignored. Doesn't matter, + specifying int options as strings works fine anyway. + +commit 54651ff5ec54f4c621e060b19f31d77d519ef158 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 24 17:41:48 2008 +0930 + + xkb: remove superfluous inputInfo.keyboard treatment. + + Really not necessary, we can just walk the list and spare us the special + treatment of the VCK. + +commit 70bd8261223366dae9dfdbb999691328d85f093c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 24 17:38:16 2008 +0930 + + xkb: use PickPointer/PickKeyboard in _XkbLookupAnyDevice. + +commit 47160edec7f0d9129576d83f1593a5549879a893 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 24 12:12:45 2008 +0930 + + xfree86: warn some more about potential missing input devices. + + Put out a warning if xorg.conf has InputDevice sections, but these aren't + referenced in the used ServerLayout. This is only performed if AllowEmptyInput + is enabled. + The reason behind this is that the server used to auto-add the first + mouse/keyboard sections if none where referenced. Now, with HAL and AEI + enabled by default, setups that relied on this auto-adding break and are left + without input devices. The least we can do is warn them. + +commit f30b0823dbfc5902e54b337b5b6b570ebf216584 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 24 09:56:00 2008 +0930 + + xfree86: if AllowEmptyInput is on, warn the user that we rely on HAL now. + +commit ad4cd2e241691427689591f7769a1184c8c1c7f5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 23 17:40:28 2008 +0930 + + xkb: don't send core events on SlowKeys. + + Core events don't happen until later in the DIX, so pump device events down + instead. This makes modifiers work again when SlowKeys is enabled. + +commit 7d9dece74fc2bf130ceb8818ced5d9e3ac526900 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 21 22:12:45 2008 +0930 + + dix: fix up enter/leave system once again. + + Two corrections + 1. the "detail" field has NotifyVirtual, etc., not the "mode" field. This was + a clear bug. + 2. don't set/unset the flags for NotifyGrab or NotifyUngrab. Clients are + expected to deal with multiple enter/leave events per window if the mode is + not NotifyNormal. + + Testable with TCL menu boxes (such as used in gitk): + tk_optionMenu .menu globVar Val1 Val2 Val3 ValJunk + pack .menu + + Thanks to Michel Dänzer for pointing this out. + +commit 2ce434f54bc0d6050ef115e310df62c035e84bf2 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jul 24 18:44:16 2008 -0400 + + Clean up unused definitions from glx headers. + +commit ae67508392261ae47858692668a0c192ef4a9d7b +Author: Mathieu Bérard <mathieu.berard@crans.org> +Date: Fri Jul 25 10:05:30 2008 -0400 + + Fix AddExtension now that CloseDownProc can be NULL. + +commit eff25430b4a391409e39337962ff7697165d23c7 +Author: Daniel Drake <dsd@laptop.org> +Date: Thu Jul 24 21:06:34 2008 -0500 + + Don't abort if swrast library is not present + + GLX is enabled by default, but the current swrast behaviour causes X + to abort with fatal error if the swrast dri library dlopen fails. + + Handle the case where the swrast library is not present, and do not + register the GLX extension unless at least one screen has a usable + GL provider. + +commit 62b5690415786c4a6e8bac464aa8db578beb74f5 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 24 16:13:10 2008 -0400 + + Remove some more MEMBUG garbage. + +commit 036822584b26854e2f486f1bea84d8d19d9324de +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jul 24 16:03:58 2008 -0400 + + Drop xf86CommonSpecialKey() and atKeynames.h + + These are AT scancode specific, should really be part of xf86-input-keyboard. + Remove from server, move to xf86-input-keyboard. + +commit f3ff2386016ced7e677817e9761a535f0f385813 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 24 15:28:07 2008 -0400 + + Sync is built-in and mandatory. + +commit 3fcf4d3eb89fecaa2be7b5ac4933b693c9c3d97e +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 24 15:09:05 2008 -0400 + + XC-MISC is built-in and mandatory. + +commit 9757106bba8f7bea99c5211817fc6b5fde4e6f66 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 24 14:59:14 2008 -0400 + + Remove all empty extension reset hooks, replace with NULL. + +commit 6bcde69585fcc8f8dbfe81c115649f19274922fa +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 24 09:13:26 2008 -0400 + + Allow extension closedown hook to be null. + +commit f65c50c4e902c7b5619fb7bbee8462434d809ec7 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 24 09:07:42 2008 -0400 + + Bigreqs are built-in and mandatory. + +commit d6228cb22aa89b90834d80d98b91862c1fc01b54 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 24 09:00:22 2008 -0400 + + Shape extension is built-in and mandatory. + +commit 990fc643ae90c034187707e7de414d80640ec6da +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jul 24 15:02:40 2008 -0400 + + Ugh, remove trailing backslash. + +commit 806e8cf3c01f955411445a7095f0957ea9a9b22a +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jul 24 14:25:24 2008 -0400 + + Remove SPARC muldiv code. Was used by ELF loader, which is no more. + +commit dff1a609bb4c0171e2abb92b54c16e739aec9ca2 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Jul 21 18:29:08 2008 -0400 + + Drop the glx resize hook and stop chaining PositionWindow. + +commit 24dddcd0ef845f4120f8588dc63ec754338ffac8 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Jul 21 18:16:38 2008 -0400 + + Drop unnecessary linked list of contexts from GLXDrawable. + +commit 5c1e254cc85e9ad409b0217780545c29f62d5feb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 24 03:01:45 2008 +0300 + + Remove xorgcfg + + Us shipping a GUI configuration utility (especially as part of the + server!) was pretty pointless. There was pretty much nothing it could + configure which wasn't already runtime adjustable: if you could get a + server up with functioning input and output, there wasn't much xorgcfg + could do for you. + + Au revoir. + +commit b74927c3844bc2650d95f604fe782d95ade067f1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 24 02:42:13 2008 +0300 + + Remove ioport + + I don't know why we would possibly be shipping this. + +commit 8c0518379089d230060e9ff672ba5eba34198325 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 24 02:40:02 2008 +0300 + + Remove kbd_mode + + We only built this on BSD and Solaris, and if such a tool is generally + useful, ship it with the OS. + +commit 0d785bd635d135fcd67b4c9c88f5c8217e9b9240 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 13:43:09 2008 -0400 + + Unifdef hpux. + +commit 5035741fd4cb4918957064a8c9ded9c7c31b4e22 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 13:38:38 2008 -0400 + + Unifdef __osf__ + +commit bd8bd2c700e6ccac53b47c45766c0a3a08a59344 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 13:36:35 2008 -0400 + + Unifdef AIX. + +commit 5f5eed7f790db2f0ae0cd0f5c5ee5a312079c0b0 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 13:27:24 2008 -0400 + + Unifdef DGUX. + +commit 856db05b58b71c5ff22af727aba435a8c356abfa +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 13:25:37 2008 -0400 + + Unifdef sgi. + +commit ab6557fcd4bb4fd580bb1727dc8764f7dfb2cb30 +Author: James Cloos <cloos@jhcloos.com> +Date: Wed Jul 23 13:17:33 2008 -0400 + + Optimize commit 331cc3f0799a54910a99484264f76569beeee55a + + Reorder to minimize comparisons + +commit b699364b1c807d29666633523f5b5a608a07a8ee +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 11:43:59 2008 -0400 + + Unifdef VXWORKS. + +commit 2e3c43d306616f8accdeaffec9c108ba88324805 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 11:35:06 2008 -0400 + + Assume __GNUC__ >= 3. + + gcc 3.0 was seven years ago. Get with the times. + +commit 0c1c9d75089aac0cf673820db83801d3cab5bfc7 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 09:11:40 2008 -0400 + + Remove some broken debugging scaffolding. + +commit 0ff5bc404842f7264a8e77f9e2a0bd8d0b051356 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 23 09:09:11 2008 -0400 + + Unifdef QNX. + + Again, hasn't worked since at least 7.0. + +commit 331cc3f0799a54910a99484264f76569beeee55a +Author: James Cloos <cloos@jhcloos.com> +Date: Wed Jul 23 00:01:43 2008 -0400 + + Fix LookupColor + + Using strncasecmp(3) with the lenght of the user-supplied colour name + will result in a false positive when the db key starts out with the + same string. + + Eg, blue will also match BlueViolet (aka blue violet). + + Since the shorter strings occur first in the database, avoid such + errors by treating a 0 result from strncasecmp(3) as a positive result + when the key’s length is longer than the supplied string’s. + +commit bc3c03a3f3c091026310f0e8d55321cec570a0c5 +Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> +Date: Tue Jul 22 17:34:37 2008 -0700 + + Don't return BadAlloc when trying to set a PictureFilter with no parameters when a filter with parameters was previously set. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit 92fdd01d8e46dd4b41338754e1a34e9d3c387d4a +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Wed Jul 23 01:07:29 2008 +0200 + + [Xephyr] various X86_64 build cleanups + +commit 5de1867fbb0a336ff3fdc92cbf734849f6111b1b +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Wed Jul 23 01:00:26 2008 +0200 + + [Xephyr] Fix #15839 + + Make sure the _XSERVER64 macro is not defined in Xlib client code. + That macro is meant to be define only on pure server code, when necessary. + +commit d692e1a63e4718d3b6d486582c19f30259b813a7 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jul 22 10:21:22 2008 -0400 + + Build fix. + +commit d8937ce58137ad675f1ead8f2345eaed0ca63c8a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jul 22 16:52:50 2008 +0300 + + autogen.sh: Pass --force to autoreconf + + Ensure we get all files installed when running autoreconf by passing + --force to overwrite previously-generated ones, which fixes running it + from tarballs. + + Also revert Peter's local changes to pass arguments to configure, all of + which are the default now anyway, AIUI. + +commit 880625eef5d8b168df3e42836fa1b763c51a91b5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 22 14:34:28 2008 +0930 + + xfree86: plug memory leak, free driver's private data when deleting the device. + +commit 67d7821ae783d3f123b6ba7203abf847374a1e36 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jul 21 11:48:24 2008 -0700 + + dix: reset potential lastSlaves when disabling an SD + + Unplug a mouse, then warp the pointer and the warp pointer code will try + to update the position of the last slave device associated with the + master. That pointer will be stale and the X server will crash. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 8c8c4fdf34bfc9d54ebea99fb0af14cad167b4a0 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jul 21 16:39:43 2008 -0400 + + EDID: Various reduced blanking fixes. + + - Use a single common function to compute reducedness. + - Call it from both the old-school and new-school mode validation paths. + - Define monitor reduced-blanking support in accord with EDID 1.4. + - Attempt to filter RB DMT modes away from the "standard" EDID pool if + the monitor doesn't claim RB support. + +commit e8cd77e14d3fa40e5cf1174acaf925362b2e0a11 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jul 21 16:15:03 2008 -0400 + + EDID: For standard timing blocks, prefer DMT timings if they exist. + +commit 6ba70091e2325f534a37ef185fea568d2c43edec +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jul 21 15:40:34 2008 -0400 + + EDID: Correct DDCEstablishedModes to conform to DMT. + +commit facb255fa9267e343cbc91f841f1b64e5dc99e98 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Jul 21 16:05:53 2008 -0400 + + Need to unref pixmaps backing pbuffers too. + +commit d5ae85b5b722821499d5796cf0973ecb6ec125f1 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Jul 21 15:28:50 2008 -0400 + + Fix embarrasing GLXPixmap leak. + +commit c74ddc87c995c73109827717a49f14846c7c4024 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jul 21 15:10:20 2008 -0400 + + EDID: Add quirk to clamp max pixel clock to single DVI link speed. + + On some panels you end up with all of: + - No range descriptor + - No description of physical connectivity + - Native panel size mode in standard timings list + + In principle you're supposed to use the timings for that mode from the DMT + spec, but in practice the DMT spec has timings for both 1920x1200 normal + and 1920x1200RB, and the standard timing field gives you no way to + distinguish. And, of course, the non-RB timings don't fit in a single + DVI link. + +commit 55803473adb0a0975fea81035402bf6b4ec0e30b +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Mon Jul 21 10:32:57 2008 +0100 + + Bump inputproto to 1.9.99.2 for XI_PROP_ENABLED + +commit 69de40ee45a6e046be79b735cd1540f63b87aee9 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 21 17:05:04 2008 +0930 + + dix: shift the duplicate button mapping check to ProcSetPointerMapping. + + XI 2 allows two buttons to have the same button code. + +commit 0dbfe0ebc69c307c0626ba824de15d03de1251d4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Jul 21 03:50:15 2008 +0300 + + Revert "Try nvidia before nv under the assumption that people who install it usually want to *use* it, too." + + Per mailing list discussion. + + This reverts commit 66fb253082ea42179180303393e48846208987fa. + +commit 6b5206e7cb8e5279816b48f014d47d3f03f16972 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 18 15:38:10 2008 +0300 + + dix: Remove insane BC hacks + + If your DDX needs a 1bpp mode and doesn't set it up, your DDX is + incompetent. + +commit 66fb253082ea42179180303393e48846208987fa +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Jul 8 02:39:00 2008 -0700 + + Try nvidia before nv under the assumption that people who install it usually want to *use* it, too. + +commit 376620460ec50cb98a1e3746629b7f73c2e926d7 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jul 20 16:53:01 2008 +0200 + + Drop some more configure-generated files from the tarball + +commit 35346a42271dfe65fe0a86dc522701028bf6daf6 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jul 20 16:40:59 2008 +0200 + + Don't put xf86Build.h in the tarball (bug#9277) + + This file is generated by configure, we don't need to ship a stale + version in the tarball. + X.Org bug#9277 <https://bugs.freedesktop.org/show_bug.cgi?id=9277> + +commit 43c6d5a6f83dfdf8596c8d0faf8ac1a64f73a8c1 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jul 20 16:30:24 2008 +0200 + + distcheck fixes + + Still seems to fail because hw/xquartz has too long filenames + +commit 92b0a04ffd630a89705fc73d587182a62c34cd84 +Author: James Cloos <cloos@jhcloos.com> +Date: Sat Jul 19 18:21:37 2008 -0400 + + Fix compile failure + + This fixes a compile failure by ensuring that mouse-cfg.c + can see the MTYPE_ constants. + +commit 0b45ba488d8a3e901b83e445d17e7e9a67047b6c +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jul 18 10:54:10 2008 -0400 + + Drop the FONTCACHE extension. + + This appears to have been dead code since X-TT was merged. + +commit b85392e66b4cbfcc95897ac342f19ac8ab04d4cc +Author: Søren Sandmann <sandmann@redhat.com> +Date: Thu Jul 17 23:10:11 2008 -0400 + + Give priority to clients that are receiving expose and configure events + +commit 3b687ffe1649449b3d182f5e7690274c6c96916a +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jul 17 18:16:59 2008 -0700 + + Make xstrcasestr prototype return value match the implementation + +commit f7bfa4ae971b43c3ed81cc84e6d1e071c413f04c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 23:03:57 2008 +0300 + + configure.ac: Remove non-existant directory + + Oops. + +commit 16e40ecf43ea7df349e54f757db0223764d752ee +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 22:37:31 2008 +0300 + + Remove dead code, useless #defines, et al + +commit b0a99fb02bb7290266d7dddee4de0b9959fb3c52 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 21:42:17 2008 +0300 + + configure.ac: Fix release date + + Instead of putting something that's always wrong, at least just put + unreleased, which will be more obviously wrong if it's, well, in a + release. + +commit 711720650cc192022f0d91f5cf94292d48dbc891 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 21:39:46 2008 +0300 + + Everyone has urandom + + If you don't have urandom, please just add a fallback to /dev/random, + rather than building our own random generator. + +commit 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 21:37:50 2008 +0300 + + Dead code removal + + Remove a whole bunch of code that was never built, be it entire files or + just dead ifdefs. + +commit 0564b5454ac101d9e1218767bbbc2c2d9f3e0696 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 20:46:27 2008 +0300 + + XFree86: Restore AllowMouseOpenFail usage text + + This was incorrectly stuck behind the XFree86-Misc define, so got + deleted with the rest of misc: restore it unconditionally, as it should + be. + +commit 6c7c0ffeb71610ee00fc92b32fd2b1cc70383e38 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 20:45:01 2008 +0300 + + KDrive: Delete rafts of unused code + + Most of this stuff was gone with the last real hardware drivers that + used it. Au revoir. + +commit ad7a7ae290b05f007062161418c929d9cebeef78 +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Jul 17 18:51:05 2008 +0200 + + XF86BigFont is disabled by default + + 3c19ec47b434d4ca84db58363cc053cc0b6aa413 did that, + but pretended to make it 'auto'. + +commit 058100fd19ed33a3100d18a9ca56fdcffac361b2 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jul 17 09:35:30 2008 -0700 + + Remove more Lynx leftovers + + A couple #if defined(Lynx) && defined(sun) had become just if defined(sun), + resulting in wrong settings for Solaris builds, so they're now just deleted. + +commit 47833eef35b20a2eb0a74782edbb0877fd491c4c +Author: Mathieu Bérard <mathieu.berard@crans.org> +Date: Thu Jul 17 11:59:24 2008 -0400 + + Drop a bunch of #ifdef Lynx. + +commit af2138bfce34a28312b26106eaf9561d96712ee0 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 17 10:39:29 2008 -0400 + + Nuke some ancient code for commandline-challenged OSes. + + This appears to have been dead code even in 6.7. + +commit b9a0cee026361189dce63b87c738bd1d17e02830 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 17 10:32:35 2008 -0400 + + Drop hw/xfree86/os-support/lynxos/ + + This has never worked in any modular release, clearly no one cares. + +commit d87f170bd99f7908eb14272ac42c8963d089f54f +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jul 17 10:29:52 2008 -0400 + + Remove XF86Misc code from xorgcfg. + +commit e3ff8501749209ee2dd324d35ae16e37510e0574 +Author: Jie Luo <clotho67@gmail.com> +Date: Thu Jul 17 10:27:24 2008 -0400 + + Remove duplicate load of freetype font renderer. + + libXfont will do this for us in FontFileRegisterFpeFunctions. + +commit 8441e26266701776f1416bec864ae2949355da76 +Author: Jie Luo <clotho67@gmail.com> +Date: Thu Jul 17 10:23:37 2008 -0400 + + Remove freetype from the list of autoloaded modules. + +commit 5d11ae7a69e3a7611c667be4628a15a4b514f72c +Author: Jie Luo <clotho67@gmail.com> +Date: Thu Jul 17 10:22:29 2008 -0400 + + Fix color lookup. + + OsStrCaseCmp returned inverted comparison sense from normal strcasecmp. + +commit 478d3918d5b23fba1a7e3aaea766dfa785e5a0a6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 17 03:29:26 2008 +0300 + + XFree86: Remove remnants of XFree86-Misc + + HandleMessage: dear god, no. + +commit 95000e34df9ba066905430eb0eb39a616567183e +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 16 16:37:14 2008 -0400 + + Build fixes + +commit affec10635343668839994ea2bac16c1d4524200 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 16 14:44:33 2008 -0400 + + Remove loadable font renderer support. + +commit acc91054316208844742495dea0b80a860ef02bb +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 16 14:24:47 2008 -0400 + + Remove font module support from xorgcfg. + +commit a82e6efb7b9b2ab9a1597b002f375c5ee105e7f5 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 16 14:19:04 2008 -0400 + + Remove the numVideoScreens xprintism. + + This was to account for cases where you had video and print screens in + the same server. Lunacy. Leave the slot in ScreenInfo, but rename it, + and stop looking at it. + +commit 1a573e402ec112913a404f092b5b97d8d9210f94 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 16 13:41:53 2008 -0400 + + Update the Allow*Grabs documentation for xf86misc removal. + + The API to turn the grab-break keys back off is gone now, so don't + say it exists. + +commit 55644d2f1cddf1777587f213ed581b6087d9fdad +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 14:23:34 2008 +0300 + + Make --enable-debug usable again + + Enable region debugging causes assertion failures (should really look + into that, though), and I don't need four messages every time I move my + pointer. + +commit 22e64108ec63ba77779891f8df237913ef9ca731 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 06:25:26 2008 +0300 + + XFree86: Remove XFree86-Misc extension + + Its last remaining purpose in life has been destroyed by input + properties. Au revoir: it's been fun, by which I mean awful. + +commit b8dd07f855c555af56cbf0f69df799f424da2cca +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 03:00:25 2008 +0300 + + HAL: Remove grotesque open-coded strcasestr + + Not only was this pretty ugly, but it didn't even work on systems + without strcasestr anyway, due to the define not being in dix-config.h. + Lack of strcasestr is handled transparently with the version from + FreeBSD now anyway, so, huzzah. + +commit ad87c72edcc0d1f56658e0c4e73af335c8d5a516 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 02:59:51 2008 +0300 + + DIX: Add strcasestr from FreeBSD + + Add strcasestr for use on systems which don't have it. + +commit c3c901cf44cf16bb33c4176494361b429099a372 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 02:54:41 2008 +0300 + + configure.ac: Fix SHA1 handling + + Fix and marginally simplify the SHA1 handling. First, we allow people + to override it. Secondly, we try for libmd. Then, we try for OpenSSL + with pkg-config. In a last, desperate move, we try libcrypto on its + own. This allows the server to, y'know, _link_ when using OpenSSL, + instead of failing because we only have -lcrypto, and not -lssl. + +commit 69b57dc651e12a0d9a5a4295b185c62d5c0df63f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 02:03:36 2008 +0300 + + dix: Actually build str(n)casecmp if we don't have it + + Remember to add stuff to dix-config.h when you add new AC_DEFINES, + people ... + +commit dcf6293030126509d7d6c61d131222037d5ed7db +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 01:57:00 2008 +0300 + + strcasecmp: Actually use the right license + + Forgot to update the license when I committed the FreeBSD version, so it + still had an old SGI license. Sorry. Sorry. + +commit 441f084bfe87a6ea1c94ec63f82888b8b3d81d89 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 2 19:52:58 2008 +0300 + + config: Don't attempt to use D-Bus when not strictly necessary + + If we have D-Bus but have explicitly disabled it, don't build it. + +commit 35c89f3f5b8fa222e37b799d5bb01595e8f30d0c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 16 01:43:58 2008 +0300 + + XFree86: Remove mysticism from Makefile.am + + The variables were always the same, so just shove them in with the rest + of the plebs. + +commit b89a59248a4a0ff06b9a0ddee45881efc6063063 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jun 27 12:20:56 2008 +0300 + + XFree86: Delete OSMouse code + + This should be moved into the mouse driver, if anything. + +commit d0de5ea96d084fc5da87d8f323ddfc08fe9c03ba +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jun 25 17:56:28 2008 +0300 + + XFree86: Remove useless debugging code + + Also remove documentation which told you how to use a non-module-aware + GDB, albeit only with old, non-shared, modules. + +commit 4b1273c9c2da113f634be80caa28e81df3beae98 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jun 25 17:51:12 2008 +0300 + + XFree86: Delete empty file & function + + xf86InitXkb() has been empty for as long as I can remember. + +commit 3a54f3f48fa1c0d60604c3ee767c569b5ec23430 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 12 01:05:04 2008 +0300 + + XFree86: Clean up init a tiny bit (no code changes) + + Reshuffle and delete. + +commit ddcefb50dda9e398647d1c84c7153127ed26a4d2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jun 11 15:14:26 2008 +0300 + + XFree86: Remove trailing whitespace + +commit e6f35f28fb3526b911101bde4aa761de8b055aef +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jun 11 15:13:21 2008 +0300 + + OS/KDrive/XFree86: Sanitise colour initialisation + + OsInitColors always just returned TRUE, so just remove calls to it and + insane special-case logic. Remove unused kcolor.c implementation, and + merge oscolor.h into oscolor.c since it was the only user. Remove + open-coded strncasecmp in oscolor.c. + + Since we no longer need to call OsInitColors after reading the config + file, just call PostConfigInit() from one place, and move PM handling to + one place so we can install the signal handlers earlier. + +commit 11f9e3520249a603b95e64503ee759998ff17feb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jun 11 15:09:46 2008 +0300 + + DIX: Add strncasecmp from FreeBSD, make strcasecmp args const + + Add strncasecmp (as we're now using it) in case someone doesn't have it, + and also change strncasecmp args to be const, in accordance with + everything else. + +commit ae38151ddda9984effca5bb7c582540061201dce +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon May 19 08:35:05 2008 +0300 + + configure.ac: Add GLX_SYS_LIBS for Xvfb and Xnest + + This fixes the linking for these two when using DRI2, which requires + DLOPEN_LIBS. + +commit ccec16e519c143f4c0017a37e93ebc52ac472e4e +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jul 15 11:24:08 2008 -0400 + + Bug #7300: Move xf86RAC to hw/xfree86/common + +commit 9111944b292355f7478b4ae75bead8dc25edbbcb +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Jul 15 10:36:38 2008 -0400 + + Bug #16674: Make sure RANDR reports refresh as 0 if pixel clock is 0. + +commit 3f3f66de669caf3606eec8c5f8d405a283cbf12d +Author: Brad Smith <brad@comstyle.com> +Date: Mon Jul 14 22:20:41 2008 +0200 + + Fix the configure tests for swap16/__swap16 macros on OpenBSD. + + BSD systems need <sys/types.h> included before <sys/endian.h> for + macros to work. + <https://bugs.freedesktop.org/show_bug.cgi?id=16531> + +commit 11ee0ae9390a608a232ff94abcc0cbcf9ed7b70a +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 14 10:20:11 2008 +0930 + + xfree86: append, not prepent, new input devices to xf86InputDevs. + + If devices are prepended to the list, their wake-up order on resume is not the + same as the original initialisation order. Hot-plugged devices, originally + inited last, are re-enabled before the xorg.conf devices and in some cases may + steal the device files. Result: we have different devices before and after + suspend/resume. + + RedHat Bug 439386 <https://bugzilla.redhat.com/show_bug.cgi?id=439386> + +commit 5bcc45e07e8726a5442567472dd29cfb5c901f2d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jul 13 18:40:53 2008 +0930 + + Xi: expose Enable/DisableDevice through XI_PROP_ENABLED property. + +commit c9eb0e870c87d291311491452adf7f91a911e24b +Author: Simon Thum <simon.thum@gmx.de> +Date: Thu Jul 10 22:33:39 2008 +0930 + + Add support for multiple pointer acceleration schemes. #8583 + + Available acceleration schemes: + - xorg classic scheme. + - the new "Predictable" polynomial accel scheme. + + X.Org Bug 8583 <http://bugs.freedesktop.org/show_bug.cgi?id=8583> + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e7abe1676a6a4e4249504b8c9660cbad70569199 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jul 13 18:41:53 2008 +0930 + + Xi: protect against NULL handlers, don't try to dereference. + +commit 2bbb12c355308d10bf123911044fbdf6ae7fb59c +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Sun Jul 13 20:23:14 2008 +0930 + + Xi: remove ChangeDeviceControl for CoreCtl. + + If you want to set a device to core, attach it to a master device. + +commit 18ff17756c988b6c21b76bf898e45685649d07bb +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 10 19:23:14 2008 +0930 + + Xi: GetDeviceProperty reply includes deviceid. + +commit c3267106fb599213555829cb76df7848c4ebe23b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jul 9 10:02:41 2008 -0700 + + XQuartz: Use CFEqual to compare keyboards + (cherry picked from commit 5538e43b9ae7d06d2f48842b065810ce74286eb6) + +commit 90dd2de845ae12153296f6f1bff0c87f79c57854 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Jul 7 10:55:58 2008 -0700 + + XQuartz: Some fd handoff cleanup. + (cherry picked from commit 9c20a4804d97e67a988f00f49866997209cce518) + +commit 26d8030c3836816de8c12b2cb9d67315e5c887eb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Jul 4 19:23:21 2008 -0700 + + XQuartz: Remove deprecated keyboard code. + (cherry picked from commit 69cfc1a21e12bb38a6130dea2e5f20f1e6a3ee7c) + +commit 5cfcbd54d98cc77ee02a3a099ebbad9af511a0ee +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jul 2 00:47:08 2008 -0700 + + Set machine dependent defaults for ppc64 + (cherry picked from commit 0733ef2e8abda99cfd62966e73017949e9cd507f) + +commit e69b9f9ca45c0c6bfb93ea9143737116bf1f2453 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jun 25 11:51:27 2008 -0700 + + XQuartz: Set noPanoramixExtension earlier to avoid a possible race. + (cherry picked from commit 49668e8a88137e9f258eae970826883b88b7d8ba) + +commit 8d2e2e1d856efec4459de2a20af642dc1ec9b8a5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jun 11 11:44:45 2008 -0700 + + Xquartz: Removed include directive for removed header + (cherry picked from commit e65a36d57f338410c5a5b02cb5ae1214a81d072d) + +commit ebd70c82fdbe483d149ac9bdb5a64cc6e0c10e0a +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jul 10 14:38:34 2008 -0700 + + Add LoaderShouldIgnoreABI to allow drivers that roll their own ABI checks (i.e. nvidia) to perform the check before ScreenInit. + +commit c42427f63f0e0495e56909ee99ad1e3c4321c39b +Author: Ander Conselvan de Oliveira <ander@mandriva.com.br> +Date: Wed Jul 9 10:50:21 2008 -0300 + + Fix incorrect test regarding keyboard map. + + In the map stored in each keyboard device, the first line refers to + minimum keycode, i.e., the 0th line refers to keycode 8. When not + using XKB the wrong test caused some keys to be interpreted as + locks ('m' for instance). The had to be pressed twice to generate + both KeyPress and KeyRelease events. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit e4054e5cb3d919dfc83021be3f2b9036d0e5a2be +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 10 11:03:31 2008 +0930 + + Xi: pack the property stuff into a struct, make handlers a linked list. + + We may need more than one handler to deal with a property (e.g. one in the + driver, one in the DIX), so get the handlers into a linked list and call them + one-by-one. This is of course slightly less entertaining than the hilarious + WRAP/UNWRAP game we play in other parts of the server. + + XIRegisterPropertyHandler/XIUnregisterPropertyHandler are the interface + drivers/the DIX should use to attach themselves to the device. + + XIDeleteAllDeviceProperties destroys everything, including the handlers. + +commit 2039c6ea43244339659323d05d96c14e41996c20 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 7 22:10:17 2008 +0930 + + Xi: add support for input device properties. + + Basically just copied from randr properties, with minor changes only. + Each device supports arbitrary properties that can be modified by clients. + Modifications to the properties are passed to the driver (if applicable) and + can then affect the configuration of the device. + + Note that device properties are limited to a specific device. A property set + on a slave device does not migrate to the master. + +commit 4ab01fe5db7fb330b1ec463aa49b77859527e597 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Thu Jul 10 16:27:36 2008 +0930 + + Revert "Xi: add support for input device properties." + + Note to self: don't mix up branches with half-finished cherrypicks. + + This reverts commit 666838fcc8b71fdeae160844160187f345cbf4a6. + +commit 666838fcc8b71fdeae160844160187f345cbf4a6 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Jul 7 22:10:17 2008 +0930 + + Xi: add support for input device properties. + + Basically just copied from randr properties, with minor changes only. + Each device supports arbitrary properties that can be modified by clients. + Modifications to the properties are passed to the driver (if applicable) and + can then affect the configuration of the device. + + Note that device properties are limited to a specific device. A property set + on a slave device does not migrate to the master. + +commit acce27093571497a0626cee1cdb61ddf751dbc40 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 8 16:02:13 2008 +0930 + + Xext: store the GenericMasks in the resource system. + + This fixes a severe issue - when the client died the event mask didn't get + unregistered and a future event would dereference dangling pointers. By + storing the event masks in the resource system we can free them when the + client dies. + +commit db86b8839f286e0e2efb5638b8ab2fe608707655 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 8 15:12:45 2008 +0930 + + dix: free GenericMask allocations when destroying window. + +commit 08e2c625f620688d35f3b443ffb878e8e991ff57 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jul 9 20:07:59 2008 -0700 + + Remove README.font, since it's just an old text copy of xorg-docs/sgml/fonts + +commit 5e847c1d4fc30a0d263a861a76982660f11998cd +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jul 7 17:08:01 2008 -0700 + + Improved driver selection when autoconfiguring driver without xorg.conf + + - Allow returning multiple drivers to try for a given PCI id (for instance, + try "geode" then "amd" for AMD Geode hardware) + - On Solaris, use VIS_GETIDENTIFIER ioctl as well as PCI id to choose drivers + - Use wsfb instead of fbdev as a fallback on non-Linux SPARC platforms + +commit 235fea0e1a2101fb76a54e6505db321674530c60 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jul 7 15:21:59 2008 -0700 + + Update bsd & solaris descriptions in README.OS-lib + +commit d8af9d9ab1cd98c07fdf42490dcc0cab3c655b89 +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Jul 7 13:14:49 2008 +0200 + + Export xkbfile.h in the SDK + + It's needed by xkbsrv.h + +commit d78bebb20a00e8519788c75c90b467a5750c78be +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Fri Jul 4 04:04:19 2008 -0300 + + Remove unused function and variables. + +commit a8c4727f01949da0ae266369f0d12a96c2bf0da5 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Fri Jul 4 04:03:46 2008 -0300 + + Fix typo in the last commit. + +commit 3164288b121990a5990747c0f92d4af13b1c929a +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Fri Jul 4 03:55:59 2008 -0300 + + Remove deprecated function miPointerPosition(). + +commit d1031a8972490ebf0ef6dc2762036a7a7172466b +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Fri Jul 4 03:46:21 2008 -0300 + + Update README.OS-lib to reflect reality. + +commit f72500c4a09cce5dbbd16639b1951a4bf943e4ac +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Fri Jul 4 03:45:18 2008 -0300 + + Nuke libc wrapper remaining stuffs. + +commit 3fd5fab5663fbdce2fc0b5377155aedf9a70b6c2 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Fri Jul 4 02:51:42 2008 -0300 + + Remove inexistent function headers. + +commit 0b9ef835a0fe900c121b84e43989591e58ab1126 +Author: Dave Airlie <airlied@redhat.com> +Date: Fri Jul 4 07:29:32 2008 +1000 + + modes: fix initial xorg.conf mode selection. + + This was all kinds of broken, we ignored user preferred modes for multiple + monitors and also for side-by-side configurations. + +commit e317943c125d7fdbe62c750324640eb30c88fa15 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Jul 2 12:23:03 2008 +0930 + + xfree86: AllowEmptyInput is now enabled by default if hotplugging is enabled. + + Remove AEI check from configImpliedLayout as the setting isn't actually parsed + at this point anyway (written by Sasha Hlusiak). + + Resurrect checkInput() and check for devices there if AEI is false (this also + creates the default devices if required). + + Set AllowEmptyInput to enabled by default if hotplugging is enabled. + +commit fe5cf7cb00fd926cefff933adbdbceea7353f4c2 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jul 1 13:18:54 2008 +0930 + + xfree86: handle missing Screen lines in the ServerLayout #16301 + + If no Screen is specified in the ServerLayout section, either take the first + one from the config file or autogenerate a default screen. + + X.Org Bug 16301 <http://bugs.freedesktop.org/show_bug.cgi?id=16301> + +commit 6674b87a7dca7d6ffd9dd9af888c5256b13d7877 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 29 20:05:27 2008 +0930 + + xfree86: move declaration of configured_device to start of function. + + Last I checked C doesn't allow declarations halfway down a block. + +commit 1e96782011f0b4ba6ed1d3d3df118964a58d15fd +Author: Dave Airlie <airlied@linux.ie> +Date: Thu Jul 3 20:00:22 2008 +1000 + + dri2: bump libdrm numbers as 2.3.1 is released without ttm interface + +commit 1771edcb44b564f83f509748b4e4cd5b7586e2a8 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Jul 3 18:57:09 2008 +1000 + + modes: check the crtc is valid before using its desired modes. + + this fixes a crash I was getting on radeon rotate when gnome is running. + I'm sure g-s-d was doing something bad, but really not crashing ftw. + +commit 689292e58cc5242cbfeaa29fcf65b6dcd9dfabb9 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jul 2 11:25:50 2008 -0400 + + Fix GLX in Xvfb and kdrive. + +commit 9a73bca859be12721ef62304b1422c455d4aec49 +Author: Chris Ball <cjb@laptop.org> +Date: Wed Jul 2 09:46:06 2008 -0400 + + Remove KdOffscreenMarkUsed() as all its callers are gone. + +commit b84a27fd9fdcb579437cfa38f10cb12cf55dc7c3 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jul 2 06:25:03 2008 -0700 + + VBO: Regenerate files based on recent changes to gl_API.xml + + Since GL_ARB_vertex_buffer_object protocol isn't supported yet, these + changes are innocuous. + +commit 703a9645f3d547144ea62dd81c41f5356a5f87d8 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jul 1 17:50:48 2008 -0400 + + Auf wiedersehen, KAA. + +commit c8216aede6c4ac41976947521d884fa010913204 +Author: Jeremy Uejio <jeremy.uejio@sun.com> +Date: Tue Jul 1 13:37:12 2008 -0700 + + Sun bug #6685465: Xephyr uses wrong or bad colortable in 8-bit mode + + <http://bugs.opensolaris.org/view_bug.do?bug_id=6685465> + + This bug is caused by Xephyr not handling the RGB byte order correctly + of the server where Xephyr is displaying on. The previous code just + assumed that the order was RGB and did not take into account that + Xservers may use different order (such as BGR). + + The fix is to add a function to calculate the byte order and bits + to shift based on the visual mask and the visual bits_per_rgb (which + is usually 8, but could be server dependent). Since the shifts won't + change once the display connection has been made, I can cache these + values so that Xephyr doesn't have to keep recalculating them everytime + it tries to translate the Xephyr colormap entries for Xephyr clients to + the actual server colormap entries (i.e. calling the function + hostx_set_cmap_entry() repeatedly for every colormap entry). + +commit 2e8daee05343b2853b677acf4554def0ceeada00 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Jun 30 17:29:35 2008 -0700 + + Work around the DIX losing mmWidth/mmHeight for RandR 1.1 DDXen. + + RandR 1.1 has a physical size for each mode. It used to be that the DIX would + remember these modes and pass them back up to the DDX when changing the screen + configuration. The DDX uses RR_GET_MODE_MM to query the driver for the physical + dimensions of the screen, allowing it to preserve the DPI. + + With RandR 1.2, the physical dimensions are stored as part of the output, rather + than per mode. The DIX only uses the sizes passed in from the DDX to select the + mode pool for the "default" output, and forgets the physical sizes. Then, when + reconfiguring the screen, it makes up a new RRScreenSizeRec using the dimensions + from the output, screwing up the DPI. + + This change works around this problem by ignoring the DIX and querying the real + size from the driver. + +commit e2bbf2d248a2d2a2db4adfe9d1bda94cf184d8bd +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jul 1 12:01:56 2008 -0400 + + Don't try to load DRI2 if built without it. + +commit 66d7c9de82b5e733e4995f079a96efe612fca881 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jul 1 10:55:54 2008 -0400 + + Declare xf86InterpretEEDID() properly. + +commit e4335e876d254e446a965259e845ad955da5b5c2 +Author: root <root@samich.home.cworth.org> +Date: Mon Jun 30 15:29:04 2008 -0700 + + Revert "XInput ABI is 2.1, not 3.1." + + This reverts commit 76576c87b0de106e006d1cfa59d42d3a483e966c. + which was an incorrect revert of previous ABI bumps. Those + responsible for the accidental ABI bumps in both directions + have all been sacked. + + This allows xf86-input-mouse to build again, for example. + +commit 6447f80c17077f924b2d58e07b38d32429edcb9b +Author: Carl Worth <cworth@samich.home.cworth.org> +Date: Mon Jun 30 13:16:49 2008 -0700 + + Use AC_CHECK_LIB before PKG_CHECK_MODULES for openssl + + Previously, the code was using PKG_CHECK_EXISTS before PKG_CHECK_MODULES, + (to cater to OpenBSD systems that include openssl by default but without + a .pc file). But this meant that systems that didn't have openssl installed + at all would not get any error message at configure time. + + Now, if the SHA1_Init function is found in -lcrypto without any additional + flags, then that's used. Otherwise, pkg-config is used to find the right + flags to link against libcrypto. And if that fails, a nice error message + is now generated. + +commit 76576c87b0de106e006d1cfa59d42d3a483e966c +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 30 16:10:37 2008 -0400 + + XInput ABI is 2.1, not 3.1. + +commit bed12dd3df0129b7f28d0a42d470266bd3ae6b38 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jun 21 16:07:54 2008 -0400 + + Do EEDID in RANDR 1.2. + +commit 4fc18b5fc31aa287e807ee520dc9117296e3d306 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jun 21 16:07:36 2008 -0400 + + Hexdump the whole EDID block if extensions present. + +commit b4fbc31e109f1efe78613597f9a91d5363523493 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jun 21 16:00:05 2008 -0400 + + Actually fetch all blocks of EEDID if asked to. + +commit 211e2bdcc677122145998829a7f26610c7c567e6 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 30 10:29:17 2008 -0400 + + Bump ABI minor numbers for the devPrivate ABI functions. + +commit d6b8d9eaffaf3f976db330bc35da3d30eb656bac +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Fri Jun 27 17:16:35 2008 -0700 + + DRI: Ensure we have the DRI headers from Mesa + + Change the DRI configure check to look for the dri pkg-config file. This + prevents people who built an Xlib libGL from bombing later in the build. + +commit 7ddfb2f1587da3ec1cd27ae270e42700adf4f560 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 26 21:23:31 2008 -0400 + + Fix a leak of window devPrivates in window.c/CrushTree(). + +commit 15e4b6c57484b6afb790c7dc1db9f529ba2219cf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 24 13:46:40 2008 +0930 + + input: for non-device events (e.g. DevicePresence) use MAX_DEVICES as id. + + Using id = 0 only worked pre-MPX since XInput didn't allow XOpenDevice for the + core devices (0 and 1). Now we can now legally register for events so we may + overwrite our device-independent classes with the ones selected for the VCP. + + So, increase the EMASKSIZE to MAX_DEVICES + 1 and use MAX_DEVICES as the ID + when we don't have a device. + +commit f0c56ffd980db19bea271aeebf118bd931f6f40d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 24 12:58:49 2008 +0930 + + dix: don't dereference dev->key if it doesn't exist. + + This may happen if we check for a passive grab on a floating pointer device. + +commit 01f0b9c9784c55c94104bafa6dd545b373c64104 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 25 19:23:20 2008 -0700 + + xf86GetOptValFreq wants a pointer to double, but maxPixClock is an int + +commit 7ce6dcef118139d0ccfc136b9a07f5bf0c078d70 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 25 15:06:49 2008 -0700 + + Don't log null device name in XkbDDXLoadKeymapByNames + +commit cbc20d92de92aad5ca240310a9156ccf97c24a01 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jun 25 09:52:36 2008 -0400 + + XTrap delenda est. + +commit a81b5ce452766bbc4b2ac0849711284ba8591b46 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 25 13:23:09 2008 +0930 + + dix: free memory associated with the EventList. #16507 + + Un-deprecates CloseDownEvents. + + X.Org Bug 16507 <http://bugs.freedesktop.org/show_bug.cgi?id=16507> + +commit 3a2beb2f867fd47dc5a7723dcac345ea0b0ecf3d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 25 13:12:41 2008 +0930 + + dix: InitEventList does not need to be _X_EXPORT. + +commit 385943e0e97463ce4681a9b6a4a40d7e3c91e51e +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Tue Jun 24 23:13:32 2008 -0300 + + Set --enable-builtin-fonts as default. + + Some reasons to embed fonts by default: + 1. X server doesn't pick a good default font path so it's easiest just + to built in the core fonts and let new X hackers more happy. Developers + and distro guys are wise enough to just set --disable-builtin-fonts + when they want. + + 2. Seems that this is by far the most popular FAQ + (http://www.x.org/wiki/FAQErrorMessages). + + 3. No one gave a good argument to not do this: + http://lists.freedesktop.org/archives/xorg/2008-May/035479.html + +commit f3b29efc4d7bb346cdd3fd79e780f1022c8f46e8 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Tue Jun 24 23:07:49 2008 -0300 + + Remove NOFONTSERVERACCESS macro + + dix: this is semantically different but it goes through the same path in + the code. + +commit 2ff7eb4995b663cf12a01124745de600f38d0bfc +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Tue Jun 24 22:09:34 2008 -0300 + + xfree86: kill INHERIT_LOCK_STATE macro. + + I don't know how this survived so long. Google didn't show + anything usable related with this. + +commit a3ec22627355fc08730ad7e90022e374763d333f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Jun 24 20:32:24 2008 -0400 + + Fix a leak in the code that parses the protocol names. + + Also added some comments. + Reported by Ben Gamari (bug #16492). + +commit a4cb25f8c816adc3bdf6a28d5beb558e8be40121 +Author: Ben Gamari <bgamari@gmail.com> +Date: Tue Jun 24 12:08:35 2008 +0930 + + dix: free FocusPrivates when deleting a window. #16493 + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + + X.Org Bug 16493 <http://bugs.freedesktop.org/show_bug.cgi?id=16493> + +commit 32a7bbbba6fec0535a8faa1d6d2ecebe786bcc81 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 24 09:28:05 2008 +0930 + + xfree86: fix up leftover allocation of xf86Events. + + Thanks to Eamon Walsh for spotting this. + +commit bcc88a1d46c7ba469c4e2861875f84f8c77d4b15 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 22 22:34:30 2008 +0930 + + xkb: remove unused variable is_core. + +commit 9ed9d98dec58d1f7468d02c4b951811b8e1ca7c1 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Jun 24 22:36:32 2008 +0200 + + x86emu: fix build, fallout from 9719354 + +commit e9b4f3cd856e2401675452c387b4155246239f91 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Jun 23 16:18:20 2008 -0400 + + Fix "warning: suggest parentheses around && within ||". + +commit 8910dde96ec4318c9c44fb9717b6b52fad56cd1d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Jun 23 14:51:38 2008 -0400 + + Fix "warning: assignment discards qualifiers from pointer target type". + +commit 95d4ede538fbb68049ba3efa0acb0e9712e5cb01 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 20 23:49:32 2008 -0400 + + Fix "warning: passing argument 1 of `modeIsPresent' from incompatible pointer type". + +commit fa1545eeda2a7feebc006840a44d390177634231 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 20 23:47:22 2008 -0400 + + Fix "warning: passing argument 1 of `xf86addNewLoadDirective' from incompatible pointer type". + +commit 2725ba1fca45e5ba241695e24333d8efab1f862b +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 24 14:41:32 2008 -0400 + + Also remove xorgconfig from configure.ac. + +commit 9719354ae04a41e9834ac9ba8fd9e895092ba4f1 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 24 14:37:06 2008 -0400 + + Check for __amd64__, not __x86_64__. + + Spiritual revert of 1fa4de80fcfc697b5e5879cc351fb3e9dbf6acbe. Intel's C + compiler claims to be gcc-compatible; if they're not defining the same + macros as gcc then that's their bug, not ours. Even if we were to do + this aliasing we should do it once and for all in servermd.h. + +commit 249c892784ca5e8c75863dd82097ca2bedec4723 +Author: Roland Bär <roland@verifysoft.de> +Date: Tue Jun 24 14:13:02 2008 -0400 + + Bug #11857: Avoid running off the end of a MAXCLIENTS-sized array. + +commit 9e5b3deafb97ec1f83e6bfe067bc68df7385bc6a +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 24 14:08:04 2008 -0400 + + Bug #11842: Fix emulation of int1A PCI BIOS services. + + Use only %di to name the PCI register to read/write, rather than %edi. + DOS is only expecting the base PCI config space anyway, and the BIOS + might be using the high bits of %edi. + +commit d34430414ac0e77eec61ab0ac9ef427b236eb639 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 24 13:32:55 2008 -0400 + + Remove xorgconfig. Use X -configure instead. + +commit 574c62e305e5380bb1b0f4bfec4f7cc3e3f03ada +Author: Owen Taylor <otaylor@fishsoup.net> +Date: Tue Jun 24 12:40:47 2008 -0400 + + Bug #15369: Don't reduce Over to Src for transform + RepeatNone. + + Only do no-src-alpha optimizations for a RepeatNone source if we can + easily probe that we won't sample outside the edges of the source. + +commit 100afae578e59e31b65a6264c281ba7deea5ac39 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 24 10:52:31 2008 -0400 + + Bug #15586: (Correctly) refuse to redirect the root window. + +commit 4c4e06af7950df509fa02099788be66cf37a4d01 +Author: Paul Bender <pebender@gmail.com> +Date: Tue Jun 24 10:44:47 2008 -0400 + + Bug #15665: Fix building without Composite. + +commit 59510a76436c739fd9421f01cc4210607d9e7f57 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jun 24 10:40:36 2008 -0400 + + Remove some default modes that really shouldn't be in the default set. + +commit b622f6dc5d8d70d17be0374a85a9b16b43a62a01 +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Jun 23 23:45:57 2008 +0200 + + kdrive: fix building with --disable-xv (bug#16488) + +commit 3b587826924c60f6736dc5faf584b964fde1b4da +Author: Jesse Ruffin <jesse@eloquentpeasant.net> +Date: Mon Jun 23 14:35:20 2008 -0400 + + Bug #16302: Fix GLX drawable refcounting in DMX. + +commit c8d066a15142678041c1d82ccf530dcdb2ea74ca +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Jun 23 13:59:48 2008 -0400 + + Implement bswap in x86emu. + + Yes, this is a 486+ instruction and thus not strictly legal in vm86 + mode, but enough BIOSes use it (looking at you VIA) that we might as + well implement it. + +commit b55fbca4f0705aeff1c69d3ef851c5ff5af6ed94 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jun 20 13:27:32 2008 -0400 + + Bug #12414: Create full-fledged pixmaps in fb24_32ReformatTile(). + + ... instead of creating pixmaps that only fb knows about, which will + have no devPrivates for any other subsystem and thus cause havoc if + (when) they leak out. + +commit 155fcecb320dbcfb899d6bcd78048ce0993bf28b +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon May 19 08:09:33 2008 +0200 + + Various messages clean-ups. + +commit 41a65e110409a290288180e8e1517f053f877586 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon May 19 06:12:04 2008 +0200 + + Fix ipc check on OpenBSD + +commit ce4d4b3c1b0e25f64d6f781b09528b2f3ae33207 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon May 19 05:19:01 2008 +0200 + + build fix + +commit 19c7e9da55646f1f6e05c28cd71865cd8d84e1ff +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon May 19 02:24:17 2008 +0200 + + preserve errno around the SIGIO handler + +commit 0a81d476388c51f8aa723400dffc375e112ea97a +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon May 19 02:20:44 2008 +0200 + + Remove RCS Id. + +commit c0d7ad9c88172d753b932069743ae65f75de3aa9 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Thu Jun 19 16:51:18 2008 +0200 + + Let code build with gcc 2.95 + +commit 219dd2d44a9da40427ad48b0f09b981fe0551f4b +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun May 18 13:53:32 2008 +0200 + + sprintf() -> snprintf() + +commit cfcb3da75e807dec225cc7ea469e04d2db10bf73 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 18 11:37:00 2008 -0700 + + Make button down state a bitmask. Master buttons track union of slave buttons + + Mixing usage where some parts of the code treated this field as a bitmask + and other parts as an array of card8 was wrong, and as the wire protocol + wanted bitmasks, it was less invasive to switch the newer counting code use + booleans. + + Master devices track slave buttons by waiting for all slave buttons to be + released before delivering the release event to the client. + + This also removes the state merging code in DeepCopyDeviceClasses -- that + code was changing master device state without delivering any events, + violating protocol invariants. The result will be that existing slave + button state which does not match the master will not be visible through the + master device. Fixing this would require that we synthesize events in this + function, which seems like a bad idea. Note that keyboards have the same + issue. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 3cc5ae6a4f725483612c00fc8bcc2c61607f66a8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 18 16:14:42 2008 +0930 + + dix: don't attempt to send Enter/Leave events if we have a keyboard. + + Dereferencing into dev->valuator could crash the server, although it looks + like I could only reproduce this by having a keyboard send an event after it + was created and the WM was still replaying. Or so. + +commit 528b4e36ade482df99747081688ae52cfaeb28eb +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Wed Jun 18 22:34:02 2008 +0100 + + Set driverPriv immediately on CreatePixmap. + + If it's NULL anyway, we bail, if not, it lets + ModifyPixmapHeader know about the private. + +commit 068fa63496c7c363706f0d356b5132bc591c04c6 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Jun 18 09:23:09 2008 +0930 + + dix: fix a crash when the client has a different byteorder. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit d21155a3e9b51df946766926bc6155c8972c4439 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 15 20:00:41 2008 +0930 + + input: fix up usage of button->down, used to be a bitmask, is now an array. + + device->button->down used to be a 32-byte bitmask with one bit for each + button. This has changed into a 256-byte array, with one byte assigned for + each button. Some of the callers were still using this array as a bitmask + however, this is fixed with this patch. + + Thanks to Keith Packard for pointing this out. See also: + http://lists.freedesktop.org/archives/xorg/2008-June/036202.html + +commit 2b9c829bdebd16910bdf48b9d64862e3d34f5b7f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 18 09:55:53 2008 +0930 + + Xi: don't drop the grab status in XExtendedGrabDevice(). + +commit 4f3ed54dc9ea7780ff03378b13de0fddfdec2e15 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 17 10:43:36 2008 +0930 + + mi: remove trailing whitespaces from misprite.c + +commit 79dd600942bbac3c6b531f284b42c7b2c822da90 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Jun 17 19:09:44 2008 -0400 + + SELinux: Add an extension alias under the OS-agnostic "Flask" name. + +commit 656d3d7623c6b83024e9cdc60d1257f4d87aa268 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Jun 17 17:55:11 2008 -0400 + + SELinux: Bring server-side name registry up to date. + +commit f3490d3eba94c7d9e760d6d21991ab6677196c2b +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Jun 17 10:35:24 2008 -0400 + + Bug #15169: Make the server build again on Alpha. + + Still won't work until the kernel makes the resource files actually exist. + +commit 8c9234a163eceda2abc0a2523e0f5587ea399935 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Jun 15 10:01:28 2008 +0930 + + Xi: avoid double button mapping. + + Button events were mapped once in GetPointerEvents and then again in + UpdateDeviceState. While it might make sense to just fix up UpdateDeviceState, + it turns out to be better to leave the raw button number in the event because + DGA reports raw device events without button translation, and so when it calls + UpdateDeviceState, the button down counts get scrambled and buttons get stuck + down. + + See also: + http://lists.freedesktop.org/archives/xorg/2008-June/036201.html + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit d894e86aa5bea81147c4a7ad8630bcfb04156792 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 15 10:55:08 2008 +0930 + + randr: remove superfluous check against uninitialised variable. + + Thanks to Eamon Walsh for pointing this out. + +commit 5544c51447f551dfc6df64438873a7ce64743976 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 22:49:47 2008 -0400 + + Fix "warning: the address of ‘newTypes’ will always evaluate as ‘true’". + +commit 2391c409a2840d61fed93832650c0d6c82ebebdf +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 22:48:17 2008 -0400 + + Fix "warning: unused variable `s'". + +commit 61dafe384a88fc397d7cd55cb23f4fdc3fb0645c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 22:47:10 2008 -0400 + + Fix "warning: unused variable `tsize'". + +commit 37a64b02df02d42a19d4b777930dc5e457d97d63 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 22:41:58 2008 -0400 + + Fix "warning: ‘rc’ may be used uninitialized in this function". + +commit e90fcd8294fe763c97610d39cab50f2836f87dca +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 22:26:43 2008 -0400 + + Fix "warning: no previous prototype for ‘miRROutputGetProperty’". + +commit 0b00bbca5df140edbfaffab627bd82165f1b1420 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 22:22:22 2008 -0400 + + Fix "Warning: no previous prototype for `SecureRPCInit'". + +commit 1c2f038d69605b0ed1067e47dc75ca6f216991f5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:59:09 2008 -0400 + + Fix multiple warnings in os/xdmauth.c. + +commit 384ebe02b354bf1ad0a2ac25e4b5290f2e795ea1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:49:01 2008 -0400 + + Fix "warning: label ‘done’ defined but not used". + +commit 720e44f9730b9e275579483c2a34b16bba77e146 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:42:37 2008 -0400 + + Fix "warning: no previous prototype for ‘XevieExtensionInit’". + +commit 9d871e19c9dee5d3ee7f123249e8890417d83093 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:35:29 2008 -0400 + + Fix "warning: unused variable ‘pDev’, `pPointer'". + +commit 60f64af075e8ac3e63586452f2f3d338a05785f0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:23:31 2008 -0400 + + Fix "warning: passing argument 1 of 'pixman_fill' from incompatible pointer type". + +commit c448460fdc23262f2b711a32599090c85c70447a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:05:26 2008 -0400 + + Fix "warning: pointer targets in assignment differ in signedness". + +commit 17ed6242e73c5f733601b15732ab30c23acf14d2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:03:17 2008 -0400 + + Fix "warning: assignment from incompatible pointer type". + +commit 02a8b118cd07d98f12aab8325d8443125703ba7d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 21:01:50 2008 -0400 + + Fix "warning: implicit declaration of function ‘miPointerGetScreen’". + +commit 2d7ba09dc4b5eff5dba8d7867f285111574b1737 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jun 13 16:39:40 2008 -0400 + + Make devPrivates lookup functions ABI instead of static inlines. + + This is required to preserve compatibility across changes to the + internal representation of the privates list. + +commit 9e0e558f263a132babf8c91d31230831653f19c1 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jun 13 11:17:49 2008 -0400 + + Fix unterminated endif. + +commit 6bbfadb9094bb6437a6825b8293d13a32e041aff +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jun 13 11:00:50 2008 -0400 + + ... and stay dead. + +commit f31bd087e8a7f65cd588bd1d022bb18e72b2a60c +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jun 13 10:35:07 2008 -0400 + + Death to mfb. + + Anyone still interested in 1 or 4 bpp framebuffers, talk to fb. + +commit af86c3b7ce705c1711c8cf8bf05a7a02b8afccf6 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat May 24 21:16:34 2008 +0300 + + clean .gitignore + +commit 3108980f5e78c129b23ff32f72564cf9a746c693 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri Jun 13 15:58:56 2008 +0300 + + glx: drop unused cleargc + +commit 23b55a61f89f69454a3b0e3413b1f07d5fdf43aa +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Jun 13 11:13:56 2008 +0200 + + AIGLX/DRI1: Switch to server context for calling pScreen->GetImage. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16292 . + +commit d15b3790307053587df8daed1936ff6923881b63 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jun 12 16:00:50 2008 -0400 + + Remove xgl. + + This code hasn't been updated with anything even resembling what anyone is + shipping in nearly thirty months. It hasn't built out of the box since + 7.1. Most of its features over AIGLX are accomplished with DRI2 and + friends. + +commit c37a93b4850866c713e3cbf39a08bbc9645e24d4 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Jun 12 14:54:56 2008 +1000 + + modes: make aspect choosing work on single output case. + + In the single output enabled case we never enter the loop and test + never gets set and so we fail to match a good mode. + + This was causing my 2560x1600 to end up at 2048x1536. + +commit 23e71ef71a178505494d4b410f9314acfff81524 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Jun 12 09:04:24 2008 +1000 + + dbe: fix DoS reported by iDefense. + + This isn't a security problem just a user could DoS themselves for fun or profit. + +commit 390b155135a451fa728b73c8107aea91dfd56ed1 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 11 18:21:33 2008 -0300 + + Welcome to hotplug era. + + `rm -rf xorg.conf` does not imply an error message. Maybe a warning. + + checkInput() is defined but not used. + +commit 6e018f6a30dab1259b8fdc1ae4c84056b2acf362 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 11 18:10:55 2008 -0300 + + No need for inputPending field in xf86Info. + +commit 881e551de92e5664f92ef1961092e35cd7a77b15 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 11 18:03:33 2008 -0300 + + CopyGetMasterEvent() can be static. + +commit 656949cbe24648a5b58f7df6ed49b25af0b47601 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 11 17:57:19 2008 -0300 + + Remove more unused things. + + In function ‘miSpriteCloseScreen’: + warning: unused variable ‘pDev’ + +commit 84db8837d0faaac008be61df9f1261cd3028e923 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 11 17:47:00 2008 -0300 + + Remove unused xf86DeviceCursorUndisplay() function. + +commit dba5455f06c439c7e7d399f30dc7067e98e6e50b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jun 11 11:41:34 2008 -0400 + + Un-K&R shm extension. + +commit 9171206db349a0c6fda719746be0b15049d57aaa +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Jun 10 12:23:03 2008 -0600 + + CVE-2008-2362 - RENDER Extension memory corruption + + Integer overflows can occur in the code validating the parameters for + the SProcRenderCreateLinearGradient, SProcRenderCreateRadialGradient + and SProcRenderCreateConicalGradient functions, leading to memory + corruption by swapping bytes outside of the intended request + parameters. + +commit 5257a0f83d5f3d80d0cd44dd76d047bac3869592 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Jun 10 12:22:30 2008 -0600 + + CVE-2008-2361 - RENDER Extension crash + + An integer overflow may occur in the computation of the size of the + glyph to be allocated by the ProcRenderCreateCursor() function which + will cause less memory to be allocated than expected, leading later to + dereferencing un-mapped memory, causing a crash of the X server. + +commit c5f69b297b1227cb802394fa90efdbe1de607f3c +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Jun 10 12:21:26 2008 -0600 + + CVE-2008-2360 - RENDER Extension heap buffer overflow + + An integer overflow may occur in the computation of the size of the + glyph to be allocated by the AllocateGlyph() function which will cause + less memory to be allocated than expected, leading to later heap + overflow. + +commit 063f18ef6d7bf834225ddfd3527e58c078628f5f +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Jun 10 12:20:43 2008 -0600 + + CVE-2008-1379 - MIT-SHM arbitrary memory read + + An integer overflow in the validation of the parameters of the + ShmPutImage() request makes it possible to trigger the copy of + arbitrary server memory to a pixmap that can subsequently be read by + the client, to read arbitrary parts of the X server memory space. + +commit 95d162c4389857d960da9b0158345c1714e91f31 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Jun 10 12:20:00 2008 -0600 + + CVE-2008-1377 - RECORD and Security extensions memory corruption + + Lack of validation of the parameters of the + SProcSecurityGenerateAuthorization SProcRecordCreateContext + functions makes it possible for a specially crafted request to trigger + the swapping of bytes outside the parameter of these requests, causing + memory corruption. + +commit 656d5d98855eb608ec6581f8c574f343a216ea32 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 11 17:32:59 2008 +0930 + + kdrive: fix wrong use of &, should be | instead. + + Fallout from 26e7e69ab893d1f2b35213250ada40ec90944f62 + +commit 6528eb885dea0326aacdd026d44d82ab07f4a4fd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 11 15:01:36 2008 +0930 + + Xext: init firstValuator to zero, otherwise core XTest events may get lost. + +commit 6ab311c92d036dc63ee92ab4bb231f5f61ebe69f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 9 11:45:57 2008 +0930 + + dix: Call RealizeCursor during InitializeSprite. + + RealizeCursor should be called when the cursor is allocated. However, when the + root cursor is allocated, no devices exist yet, and thus RealizeCursor is + never called. This may lead to segfaults lateron in DDXes like Xnest that + actually need to do something for each cursor, and lateron rely on that + DDX-specific data for each cursor has been initialized. + +commit e083b5a07507d53de0d1d365ef1565346284c997 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 9 11:23:53 2008 +0930 + + xnest: wrap the xnest cursor sprite funcs around the mi funcs. + + Modelled after the xfree86 code. Call miDCInitialize to init the SW rendering + engine, then take the pointers, store it in a xnest-local variable, and put + the xnest-specific sprite funcs in place. In the xnest sprite funcs, call + through to the mi sprite funcs after doing xnest-specific stuff. + +commit ea6a02c048e8589e99ee3b459f3612eb3d041558 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 9 11:22:33 2008 +0930 + + mi: protect mipointrst.h against multiple includes. + +commit a3a7c12fcf8e4ac1418f9ea53f76091f309a721b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 8 23:38:45 2008 +0930 + + xfree86: Fix up xf86ScaleAxis + + Some driver still call it, so we might as well work correctly. Always + resetting X to the Sxhigh is sub-optimal. + +commit f8431a62d57ab3118a0b409bce977db8261e2930 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jun 10 02:15:25 2008 -0700 + + XQuartz: Under the new startup model, we no longer need to do the foreground/background dance. + (cherry picked from commit 4505bae5d7341e1241be50c25cb3d1b941701de4) + +commit c180a52332385b98635068d63a8fe0bba4835be7 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jun 10 10:47:37 2008 -0700 + + XQuartz: Removed code path for old startup + (cherry picked from commit a9ee6b0d00fab01a78408a85e6542e88c19fda7c) + +commit 49751fee3b82ebc4917bfb168ec78aad7874f1f1 +Author: Roland Scheidegger <sroland@tungstengraphics.com> +Date: Tue Jun 10 15:40:48 2008 +0200 + + glx: copy msaa visual capabilities + +commit 5170c169db78cad3fe47dee4e438b48e67f0c7d1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jun 10 01:39:15 2008 -0700 + + XQuartz: Fixed the "laggy" startup under the new model. This was caused by xinit blocking expecting SIGUSR1 and our stub never sending it. + (cherry picked from commit ee92aced10d0743c4658e53b58b5d9f5a094a415) + +commit 01ace5f3fd56bc789ad7448059fcf907ef19a1c8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jun 4 18:28:20 2008 -0700 + + XQuartz: Updated icon with more rsolutions and made it more dark-background friendly + (cherry picked from commit d8cf5623faab952a0f1196c8fe10baa09d1fc089) + +commit 607b0d09ea003f87cfb3331e59e13495a483832a +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Jun 9 09:52:04 2008 -0700 + + CreateColormap returns Success on success, not TRUE. + + Fixes a problem where enabling color index overlays disables the RENDER + extension. + +commit 2854abd39d4deb79c9ee9bcc931fad969392cfc5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 8 23:20:11 2008 +0930 + + xnest: fix up sprite funcs to stop compiler warnings. + +commit c68ca0c7b2c72df0501d26bf7f640029ff2d9568 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 8 23:14:20 2008 +0930 + + xnest: switch to using EventList rather than xEvents. + +commit 34429d16d319ef2709c22a5c22f45d0e82c78b20 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 8 23:08:34 2008 +0930 + + xnest: call miDCInitialize rather than miPointerInitialize. + + This unfortunately gives us a lots of artefacts, so cursor rendering cannot be + assumed complete. But it's better than crashing. + +commit a7d4bec884c24c0e1792fd7d6677cdd0a69978e3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 8 23:03:20 2008 +0930 + + mi: remove leftover old license comment. + +commit 585125685b5f09245021c8ee15f57950fe6cdd20 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 8 22:43:47 2008 +0930 + + ephyr: some whitespace changes. + +commit 782394fe53220deafed06ad282b5f9ce42964c42 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Jun 6 12:10:35 2008 +0200 + + mi: Fix typo in comments about deprecated functions + +commit 6b96281100f2118fe9d99536c33d48298a5bce7b +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Jun 6 11:01:03 2008 +0200 + + EXA: Fix exaGetPixmapFirstPixel() crash if the driver has a CreatePixmap hook. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16243 + +commit d25ffcfbfcfe8e059f2889873c9dbe76a28ad00c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 5 15:29:35 2008 +0930 + + mi: protect against possible NULL-pointer dereference. + +commit 874dcdb3bdb9320aae252d3c7927d412685059d5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 5 15:38:48 2008 +0930 + + dmx: remove a ifndef XINPUT, XINPUT is always defined now. + +commit 52752911ea8470dd8805f5e6c3febb9e1e1cc4b3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 4 17:04:16 2008 +0930 + + dmx: don't free event list after use. + +commit 5c5e58124581b845a6bfa7a2991a4e0ee7f7ebdb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 4 16:58:31 2008 +0930 + + dmx: add an XFlush. + + Beats me why we need it, but without it we get segfaults lateron. + +commit 246c10441bbf62646b77993b55233d5ceb93a81f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 4 16:37:25 2008 +0930 + + dmx: fix false memory allocation. + + beNumVisuals and the number of GLX Visuals can be significantly different. + +commit 17cd26225749a1daf7460b44e52f43082399b265 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 4 16:05:36 2008 +0930 + + dmx: don't dereference a nullpointer. + +commit 75eb635e3543fcb731331d01f50e62b696967667 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 3 22:25:33 2008 +0930 + + dmx: add stubs for DeviceCursorInitialize, DeviceCursorCleanup + +commit 3ff2f3a00ef3c484d1d53569b6cbc1f25dc6bd35 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 3 22:17:14 2008 +0930 + + dmx: for now, don't acknowledge SDs. + +commit 5bcd9e8953dfb5f13e90baeebea1f6eac797644b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 3 22:01:43 2008 +0930 + + dmx: learn about the existence of IsXExtensionPointer and IsXExtensionKeyboard + +commit 8da8a0fec4b1b9d9208635dedb2f449dc99e0004 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 3 21:59:33 2008 +0930 + + dmx: claim we support XI 2. + + We don't really, yet, but at least we get the full device list this way. + +commit 6f1d5147cb394b7c83c4c1447c78890fa2b40a45 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 3 21:36:03 2008 +0930 + + dmx: fix a segfault caused by GC devPrivates never being initalised. + +commit d10ba4591a599a317093ffcbdd7cece11ab6de26 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 3 21:28:26 2008 +0930 + + dmx: some more build fixes. + +commit 8d4d0b47a07a298a20ffae9fefe96c8c7ca9dccc +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Jun 5 09:19:16 2008 +0930 + + gl: include assert.h if we're compiling with DEBUG. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 8644aa47177bf20f3aa85181032ce75c08270fc5 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Jun 5 08:55:09 2008 +0930 + + mi: minor build fix when compiling with debug enabled. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit fbf4b5f16ac23359872361c8c95a617fe8c92292 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 4 11:10:46 2008 +0930 + + dix: set dst->mapWidth when allocating a new map. + +commit ff3adf3e564d94fea18e48f966de40a7ded1279e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 4 11:10:11 2008 +0930 + + xkb: reset xkb_cached_map on CloseDownDevices. + + Could lead to some invalid pointers in the second server generation. + +commit 40855d8000b9b9f4e6c6b4317542378ecf516345 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jun 4 12:19:28 2008 -0700 + + XQuartz: Removed async debugging sleep + (cherry picked from commit 7812a8bdf9fab651ea5c07b852b2999547ec628d) + +commit ee86b751192b690973ee2a1446a406bc721ce8eb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jun 4 12:01:19 2008 -0700 + + XQuartz: use a condition variable to signal when darwinEvents is ready rather than polling + (cherry picked from commit ff1c443cadf11d12a7d939e51194f6105153870e) + +commit 38da26cd36957a45b2a47ef124282f7d863a9fd3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jun 4 11:35:24 2008 -0700 + + XQuartz: Don't forget to destroy the mutex and cond after we're done with them + (cherry picked from commit c3558bb8cd889e5b957190e9f5d23afad1e17b72) + +commit ea40fcf4344c6e918d3be34354528940b05a70f3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Jun 4 11:18:52 2008 -0700 + + XQuartz: Fork for trigger + (cherry picked from commit dd0f8a0f59593d7831fe09a2a086fcd57c84910e) + +commit 2393dae6ffff7db8281a7977039450e8754cc19f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Jun 3 00:06:26 2008 -0700 + + XQuartz: Switched over to new startup path for testing. Cleaned it up a bit. Server still crashes when using the icon to launch =/ + (cherry picked from commit 7f840e9dc180421eaa9b0ea3ab993fdd5b2466e5) + +commit 45b661c67aca1a728f1793dd94d701488f1f196c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 4 13:39:39 2008 +0930 + + dix: Fix build with --disable-xinerama #16204 + + X.Org Bug 16204 <http://bugs.freedesktop.org/show_bug.cgi?id=16204> + +commit 26e7e69ab893d1f2b35213250ada40ec90944f62 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 2 11:04:41 2008 +0930 + + kdrive: don't post motion event if there was no motion. #16179 + + Based on the patch by Tomas Janousek. + + X.Org Bug 16179 <http://bugs.freedesktop.org/show_bug.cgi?id=16179> + +commit ac1db454497ff1839aa7f7ee0649ede112824ed9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 2 10:40:10 2008 +0930 + + xfree86: suspend signals while removing a device (corrected version). + + Block/Release is now symmetrical. + +commit 95ecaa411aefbcd8e2e00814132cb07b4be4e5bf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 2 10:38:45 2008 +0930 + + Revert "xfree86: suspend signals while removing a device." + + Left the signals blocked hanging after removing a master device. + + This reverts commit 74372fd0049676787904f1f9f80f836b97f5f60e. + +commit 5ba07cb54803b8c63e25e8ca1f1787860f684612 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Sun Jun 1 18:31:52 2008 -0300 + + kdrive: changes ephyr API according mpx merge. + + This fix host-cursor in Xephyr server. + + Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 5a3d06b8f42473cea3741dc722a775deaa2b73f6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jun 1 15:20:42 2008 +0930 + + xkb: delete default rules when devices are closed. + + We only have one set of default rules options in xkb. When the second keyboard + is brought up with Xkb options specified, these new options overwrite the old. + In future server generations, the rules used for the VCK are a mixture of the + default ones and ones previously specified for other keyboards. Simply + resetting the xkb default rules to NULL avoids this issue. + + Reproducable by setting XkbLayout "de" and XkbVariant "nodeadkeys". In the + second server generation, the VCK has "us(nodeadkeys)". This again produces a + SIGABRT when the first key is hit. + + I could not figure out why the SIGABRT happens. This patch is avoiding the + issue rather than fixing it. + +commit 5ebe76f13fb6e96cebe5a386024a73eceeb828ff +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 22:13:03 2008 +0930 + + config: init dev to NULL to shut up a valgrind warning. + +commit a7ae9cbd78193fdafcafd5d7af1f6fabbb434628 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 20:44:58 2008 +0930 + + dix: don't read valuators past numAxes. + +commit f79ad5674ed41c3626e8055cd2bac0135de928c6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 18:46:35 2008 +0930 + + kdrive: fix up callers to KdQueueEvent, need to pass xEvent, not EventListPtr + +commit 58d12c99abc4d06cb8b43386d4bcd126f0bedf83 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 18:45:11 2008 +0930 + + mi: Remove #ifdef XINPUT, kdrive otherwise won't get events. + +commit 942086fc965fc9a24be2db4f537f0ff54db51083 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 18:17:49 2008 +0930 + + dix: ProcQueryPointer doesn't need special grab handling, PickPointer does it + +commit 6cecae0e8651b1fa58b3cd0e0a636db46f56f6a6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 13:12:53 2008 +0930 + + dix: Remove superfluous comment. + + This code can handle devices with < 2 valuators now. + +commit 105d28652d1fb80dd8ce8511e2605dccc8812e99 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 30 15:20:35 2008 +0930 + + Xext: use GPE/GKE from XTestFakeInput #16145 + + This commit fixes two problems: + 1) XTFI used to assemble the event itself, then passed it to the device. It's + much easier to just pass the variables into GPE/GKE and let the DIX do the + rest. + + 2) XTFI would pass the VCP/VCK as default device to event processing. As a + result, updating LEDs would be updated on the VCK, not on the actual keyboard. + Instead, we now pass the events through the last-used SD, thus toggling the + LEDs on the last keyboard that sent through this MD. + + Also some cleanup in XTFI to merge validity checks a bit closer together + rather than having several different sections. + + This breaks XTestFakeMotion with Xinerama though. + + X.Org Bug 16145 <http://bugs.freedesktop.org/show_bug.cgi?id=16145> + +commit 341a61b608873c77b1a17fe7d145ed3ad716e5a3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 12:01:47 2008 +0930 + + mi: reduce noisyness. DebugF is enough if device ID can't be changed. + + Also - printing out the event type is actually helpful. + +commit 62c1a32976d571f3ced1812b8b96ed5a8e658b4a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 31 10:24:37 2008 +0930 + + dix: null out dummyDev, otherwise Xephyr dereferences random pointers. + + SendEventToAllWindow eventually causes a IsInterferingGrab(), which attempts + to dereference dev->deviceGrab.grab. + +commit 150c2f55a508ed24b230f68e30ec140c0901d9ae +Author: Julien Cristau <jcristau@debian.org> +Date: Fri May 23 03:09:04 2008 +0200 + + Add xkbstr.h and xkbsrv.h to sdk_HEADERS + +commit f9bcecbe51e4cf0cb2d82ad953f8c6741ed5558b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 29 17:42:49 2008 +0930 + + Xext: only free events in case of core motion events. + +commit 8cf7755a85f5c1e5da7805c12b7511581a368782 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 28 18:05:25 2008 +0930 + + Require x11proto 7.0.13, xextproto 7.0.4 and inputproto 1.9.99.1 + +commit 9b544fa40062b342ff3aa75f8f21d0bd4cec80ab +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 28 12:27:07 2008 +0930 + + mi: ansify. + +commit 64677f6a167a5bee99e5dfb599a3c3a6fb5dffe7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 27 21:01:26 2008 +0930 + + xfree86: fix offset error in EDID parsing. #15964 + + X.Org Bug 15964 <http://bugs.freedesktop.org/show_bug.cgi?id=15964> + +commit c8af7ce35a900ac9b898f51c1b95dabad3ba1d76 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri May 23 13:50:39 2008 -0300 + + Correct a NULL pointer deference + + The problem happens if Monitor/Card combo doesn't provide EDID info, + and the XFree86-VidModeExtension extension is used. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 3a1278907ea8059546c7b9ab0c02714832c693e3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 26 18:01:07 2008 +0930 + + xfree86: Bump XINPUT ABI to 3.0. + +commit 0050165a67bb462e0bf644a11644ad9d587c62bb +Author: Simon Thum <simon.thum@gmx.de> +Date: Mon May 26 17:56:08 2008 +0930 + + input: change dxremaind, dyremaind to floats for better acceleration #9156 + + X.Org Bug 9156 <http://bugs.freedesktop.org/show_bug.cgi?id=9156> + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 26c1958c322be3ac4dfec9ba2c41c5202bd03709 +Merge: 5fe5778 2958610 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 26 17:37:31 2008 +0930 + + Merge branch 'master' into mpx + +commit 5fe57787faa2ea4f2f57b25455d200bf924206d6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 26 17:23:34 2008 +0930 + + dix: store the absolute values in the motion history. + + The core protocol requires absolute values and it's a bit hard to get them if + we only have relative ones in the history. Switch the motion history to + absolute, and if we really need the relative values, we can probably generated + them from the abs. ones in the future. + +commit 1883485edd7eb90c0b76bca41c71e26ae2c0b91a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 26 16:35:23 2008 +0930 + + If core motion history is required, scale back to screen coords and INT16. + +commit 0b88510069bdf6d020d73b424f62c2923c0db4a4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 26 13:53:45 2008 +0930 + + Ensure the motion history is merged for master devices. + + Add each event to the master's MH as well as to the SDs. In the MD, store + min/max and the actual value. When retrieving the MH, rescale all coordinates + to the current coordinate range and only post those valuators that are + currently active on the device. + +commit d22c25bda450f6f1dfa634f0f72b32c4bec429cd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 26 09:26:18 2008 +0930 + + dix: Allocate MD's motion history to be large enough for potential valuators + + Since we can't predict how many valuators may be in a future SD attached to an + MD, we need to preallocate a history buffer that is large enough to keep + MAX_VALUATORS coordinates per event. + + In addition, the history buffer needs to memorize the coordinate ranges at the + time, thus requiring MDs to store (min_val, max_val, current_val, time) + instead of (current_val, time) for each motion history entry. + + This commit only fixes the allocation. + +commit 0877de13ac6ddfb55108aa3456d47f970c6c442c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun May 25 22:49:54 2008 +0930 + + Remove GetMotionProc from ValuatorClassRec. + + With the MD/SD device hierarchy we need control over the generation of the + motion history as well as the conversion later before posting it to the + client. So let's not let the drivers change it. + + No x.org driver currently uses it anyway, linuxwacom doesn't either so dumping + it seems safe enough. + +commit 00b4339168c10dd4ce026deb8e04bfb63dfd11dc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun May 25 22:34:11 2008 +0930 + + dmx: remove some #if 0'd code. + +commit 096117cf023dc92dcadc91677931fc6ad1feb4a0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun May 25 10:38:33 2008 +0930 + + Xi: reset motion history when swapping device classes. + + This isn't really the correct solution, but it'll have to do until I figured + out how to transfer the history over correctly. + +commit 29586101dc11d498b212510f8dedbfeca7f8c859 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat May 24 20:01:41 2008 +0200 + + EXA: Only record damage generated by rendering operations. + + Recording damage from other operations (e.g. creating a client damage record) + may confuse the migration code resulting in corruption. + + Option "EXAOptimizeMigration" appears safe now, so enable it by default. Also + remove it from the manpage, as it should only be necessary on request in the + course of bug report diagnostics anymore. + +commit f6d61d3d86971d6a202b46ff2fab8c8799a4d057 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat May 24 20:01:36 2008 +0200 + + EXA: Don't migrate twice in exaImageGlyphBlt. + + exaPrepareAccess already handles migration. + +commit d73304398255e0c3b03a497a8d4a2f8d900eef44 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat May 24 20:01:31 2008 +0200 + + EXA: Don't suggest exaCopyDirty be inlined. + + Leave the decision to the compiler toolchain. + +commit 3baf3b42e079b4e7b61c1e20df305db0724d21f8 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat May 24 20:01:21 2008 +0200 + + EXA: Specify region used for source pixmap migration in exaCopyNtoN. + + Avoids excessive migration overhead in some pathological cases. See + http://bugs.freedesktop.org/show_bug.cgi?id=15845 . + +commit ba557e0263eee0b75847c596f31c71492611b22c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat May 24 17:23:10 2008 +0930 + + Xi: remove deprecated comment. + + Axis clipping wouldn't be necessary here, it's already performed in GPE. + +commit e6cbb1e11e5da1a8b9001853c25f4e5a052e7110 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri May 23 23:00:40 2008 +0200 + + xfree86: fix build on GNU/kFreeBSD + + GNU/kFreeBSD defines __FreeBSD_kernel__, but not __FreeBSD__. + Unify preprocessor conditionals between variable declaration and use. + Debian bug #482550. + +commit 6c72961d8fa1ab1543f1b3e2cc7d34ff6d254bf8 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri May 23 22:39:35 2008 +0300 + + glx: fix memory corruption with r5g6b5 + + should cherry-pick to xserver-1.5 + +commit 21a8052fdca2115668dfc747b0b58db437b4eb6d +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri May 23 22:39:09 2008 +0300 + + glx: fix forgotten swrast -> SWRast + +commit 877e6c35ff1f0f110627590ac0f12fddf47de506 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri May 23 22:38:36 2008 +0300 + + glx: missing swrast is fatal + +commit 1345c93ad4be875951256dae87bc4fd9a1b5e08a +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri May 23 22:38:11 2008 +0300 + + glx: drop stray glcore.h include + +commit ae0504d34d245f15b2f098a63ad1a9e1c4daef35 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri May 23 22:40:03 2008 +0300 + + kdrive: need not export symbols for glx anymore + +commit 7082929ef7db20b507dce5a8cec043e787d0b55e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 23 02:27:58 2008 -0700 + + XQuartz: A 2 second delay for launchd socket connections should be sufficient. + (cherry picked from commit 2bb4251b3c6b30dbf1a556e1b51e6f03f02d2529) + +commit 5a388b27a094c71b4214aa744b2ba0fdda7fd607 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 23 02:10:14 2008 -0700 + + XQuartz: Add the launchd fd to AllSockets as well + (cherry picked from commit 83f72529394be5871671d73b6ef4f8bc83708f8a) + +commit 77b688a73025238ed9fe286a2bae8f78da65fce3 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 23 02:32:28 2008 -0700 + + XQuartz: Don't need launchd checking in configure.ac anymore since its functionality has been removed from libxtrans and into the mach startup code. + (cherry picked from commit 1e1f4fb717d2f3a3227be2a034d28d6a4f29b5d1) + +commit 225dddbaeded4d64fcc104da538449e5c4dedd2d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 23 01:39:02 2008 -0700 + + XQuartz: Move the launchd display grabbing into mach_startup + (cherry picked from commit c3866c98d23020d2151977ee1177b6054d05832e) + +commit 3a22190061c7ebefee85564b0def5e1112c07ae8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 19 03:13:09 2008 -0700 + + XQuartz: Fixed a few issues with fd passing... still not working =( + (cherry picked from commit 7dd351271522b475d8017e4bd1618f12817ee2fa) + +commit 3ae0f4fc832462444d03024c5fbb867f19d5e960 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 23 15:02:43 2008 +0930 + + dix: update valuators > 2 as well. + + master->last.valuator[x] for x > 2 is undefined. For all other devices, it's + the respective device's last valuators. + + If the lastSlave did not have a valuator that is to be updated now, it is + reset to 0. + +commit 0d1b41ace38bc918e2cc2a0a6ad107c76346fd00 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 23 13:32:33 2008 +0930 + + Xi: update device valuators based on the event. + + Event is always absolute, update the device's valuators (always absolute too), + and then change the deviceValuator event to reflect the device's reporting + mode. + +commit 7eec1c23a34591064ea64499acb24f22ada08dfa +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 23 13:23:02 2008 +0930 + + dix: don't allow relative data in deviceValuators. + + In GPE, we don't care about the device mode. Let's put the absolute values + into the deviceValuator event and worry about relative valuators on the other + side of the EQ. + +commit 75551a2ef949c2cfb53fdc4b97f3964a5e2f45f5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 23 12:55:50 2008 +0930 + + Revert "dix: Correct values in the device axisVal are calculated in GPE" + + We can't rely on GPE to update device->valuators->axisVal. If a SIGIO occurs + during event processing this may have incoherent results. + + This reverts commit f6645ddbf754c80e9a8b1672519534a887622270. + +commit fe59b1a62b2c7f467d20132db4913317bbf308eb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 23 12:51:52 2008 +0930 + + dix: more device scaling insanity. + + Assuming master->last.valuators is in screen coords, SD's are always in device + coordinates. + + 1. If an event comes in, scale masters->last to the device, drop into device's + last->valuators. + 2. Apply motion from the actual event + 3. Scale back to screen coords, check if we may need to cross screens + 4. Drop screen coords into master->last + 5. Rescale to device coords, drop into deviceValuator event and SD->last + 6. Drop screen coords into ev->root_x/y + + Whoopee... + +commit 6c9e9f8a40e20fb1761440acd2755f5fd31f4d44 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 23 11:51:53 2008 +0930 + + input: instead of lastx/y, use a last.valuators[] array on the device. + + During GetPointerEvents (and others), we need to access the last coordinates + posted for this device from the driver (not as posted to the client!). Lastx/y + is ok if we only have two axes, but with more complex devices we also need to + transition between all other axes. + + ABI break, recompile your input drivers. + +commit fb146cbb0f28e4e480e5d16d61476ac46b5d00ce +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 23 12:00:13 2008 +0930 + + dix: coreEvents doesn't have meaning here, use master instead. + + We mustn't clip x/y if we are attached, otherwise we can't change screens. + +commit fc1cc0adcb91fdfa4c547bf379a85f9558c959ff +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Fri May 23 00:33:18 2008 +0200 + + dix: Cleanup of GetPointerEvents + + Changed all the checks for x&y valuator so the more complex + calculation is only made once. + Added TODOs for valuator/axis 2 and above for future correct + handling of relative reporting of these. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit a0241d5380bb5d8b10865f8ea81a9a011de4aaf1 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Fri May 23 00:36:11 2008 +0200 + + dix: Correct clipAxis so it can handle devices with value ranges properly + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit f6645ddbf754c80e9a8b1672519534a887622270 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Thu May 22 23:33:45 2008 +0200 + + dix: Correct values in the device axisVal are calculated in GPE + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 7f85acdf70c67c567de688439e25081be5a7d5df +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 22 23:27:15 2008 +0930 + + dix: fill valuators with the correct values depending on the device mode (GPE) + + valuators[] is passed from the DDX. Depending on the device mode, update it + with either absolute values or relative values. The deviceValuator event sent + to the client will then contain the respective values. + +commit 1a3f351c50cba66f71a73239318174b09fd9b63b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 22 23:25:20 2008 +0930 + + dix: when floating a device, create a new cursor sprite. + + This is essentially necessary to allow calls to miPointerGetSprite etc. to + work for floating slave devices. + +commit e0fbe404a436aef24624a3a15e8405a9ca38aadb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 22 23:24:29 2008 +0930 + + mi: handle sprite even for floating slave devices. + + We still don't render it, but we accept all the other calls to update it's + internal state. + +commit 0f15875a271889ae3cc4997ad15f787ea28b3a08 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Sat May 17 19:24:00 2008 +0200 + + Make all conversion handling in GPE. + + This isn't quite finished yet, but at least it gives us the ability to use a + tablet as a normal mouse - with all the scaling in place. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 74372fd0049676787904f1f9f80f836b97f5f60e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 22 18:02:10 2008 +0930 + + xfree86: suspend signals while removing a device. + + Getting a keyboard event while halfway through freeing memory can be + unpleasant. + +commit 30e9a33f7d1972dcf1c29c7455b2cea4e5857913 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 22 16:00:21 2008 +0930 + + xkb: fix crash caused by uninitialised variable. + +commit e837244947fbb18192e9056c070ce439ef24d1a3 +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed May 21 16:14:55 2008 -0700 + + Actually enable building GLX without Mesa source + +commit ea4ec9e9983e25d94a3edf8a77ed2ad1db193284 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue May 20 13:59:09 2008 +1000 + + int10: add pci_device_enable support on Linux + +commit 4230b92744d54528f48ddc3b096a265b488053c9 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed May 21 17:58:15 2008 -0400 + + Clean up remaining afb references. + +commit 20ea99c655140e101f2d20cfab78fb22765fec62 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 17:03:25 2008 -0400 + + Death to afb. + + Planar framebuffer people, please talk to wfb for all your 1988 hardware + needs. + +commit c76fddeea28b4f88db97a2a3487d7a57cd9d578c +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Wed May 21 10:51:15 2008 -0700 + + Fix up paths for GL/glx -> glx renaming + +commit c3eb5b80d8cc7ca6a425ccf359718d1ef3d5af55 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed May 21 13:33:36 2008 -0400 + + Move GL/glx on level up now that it's the only thing left under GL. + +commit a8a9b40e554dd0c184866978889a39519afc466a +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed May 21 12:34:07 2008 -0400 + + Move the windows GL files to the xwin DDX. + +commit e5aad4bc087036489e2af576628aa9b612054a6e +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed May 21 11:44:12 2008 -0400 + + Get out of the mesa symlinking business. + + This copies over the files generated from mesa/src/mesa/glapi. There's + a corresponding mesa commit that makes it easy to generate the glapi files + straight into the xserver tree when the XML definitions change. + + The only few files that are copied from mesa but aren't generated are + glapi.[ch] and glthread.[ch]. Everything in there is technically DRI + driver API and the whole setup is still a bit fragile, but it's not a new + problem. + + The --with-mesa-source configure option is still around since other + parts of the server (XGL and DMX - grep for MESA_SOURCE) need that, + but for common case of building with GLX and AIGLX support, that + option is no longer needed. + +commit f558c7d4d1d87affe1ce4aec2e62ff64545f2bc8 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed May 21 10:18:16 2008 -0400 + + Use LD_EXPORT_SYMBOLS_FLAG when linking Xnest. + +commit 77ff8fd5072fa57158463bfd84656389eeb7b503 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed May 21 10:17:53 2008 -0400 + + Drop glcore GLX provider. + + Obsoleted by the DRI swrast driver. + +commit 61eaef22359ae2abcee7dcd73ee8610a83776fc7 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue May 20 16:56:27 2008 -0400 + + Stop symlinking glcontextmodes.[ch] from mesa. + +commit 88f43e5d06fb5543bc40ca060b2c5d8e2673afad +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Wed May 21 18:13:47 2008 +0300 + + glx: drop drm.h, sareaHandle from swrast loader + +commit 255142b61eb73843b16c2afdb95aa4d1f27e4f0d +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Thu Jan 3 17:53:56 2008 +0200 + + drop xprint remnants: InitGlobals + +commit 641ce9c706ce3cbf726fb3fc9623161bb96ba127 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Thu Jan 3 17:28:04 2008 +0200 + + drop xprint remnants: xpstubs + +commit 5c5a1eaf68eb11053fd5b99d24eb8024b6d5b218 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 21 21:51:27 2008 +0930 + + Replace UniSA with full Uni name in Author affiliation. + + Big boss says UniSA isn't unique enough. Who am I to argue? + +commit 7509fb498c02fe1cebe4139612b8871ec877c130 +Merge: 2ae3bed dfb7de6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 21 16:25:35 2008 +0930 + + Merge branch 'hwcursor' into mpx + +commit 2ae3bed33731d800bb28a968e3a1c8066d179740 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 21 15:51:35 2008 +0930 + + mi: shut up compiler warning (return w/o a value) + +commit 8b3d26f5b6caff1766669deb0e2100d2dee3f185 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue May 20 12:39:28 2008 -0700 + + Short-circuit PanoramiXTranslateVisualID after verifying that the visual actually exists first. + + This allows using PanoramiXTranslateVisualID to test whether a given visual made + it through PanoramiXVisualConsolidate. + +commit 6ff6465931c397f72db27a4fd0ca0dcac0609537 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Tue May 20 16:36:22 2008 -0400 + + Add loader for the swrast dri driver. + +commit 4056595fc77c20052e226b402e38a2a914dca123 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 20 18:57:31 2008 +0930 + + xkb: remove superfluous checks in if statement. + +commit 925e895b869e461a9e7f135891463c56ee633cd6 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 19 18:43:29 2008 -0700 + + Restore return type on xf86SetScrnInfoModes + + Seems to have been accidentally lost by commit 76943fec860315f3c93539e59a59080b8a7b3e75 + +commit 7a550cefd9417c22a4397ea4d103ddc347ab1a0f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 20 11:07:39 2008 +0930 + + dix: shut up two compiler warnings. + +commit f9edecd1b53a2e234def9cbd954a47c4bda2bebc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 20 11:07:17 2008 +0930 + + mi: sync declaration and definition of mieqResizeEvents. + +commit e73a03d589b47ac9131f3932da7f78d2fef7bfb5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 20 10:54:32 2008 +0930 + + fb: shut up two compiler warnings. + +commit 99d28c3ef37aeffe7d8ec41e45a650ba248c6958 +Merge: fc7e256 0178b6a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 20 10:20:14 2008 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + Xext/xprint.c (removed in master) + config/hal.c + dix/main.c + hw/kdrive/ati/ati_cursor.c (removed in master) + hw/kdrive/i810/i810_cursor.c (removed in master) + hw/xprint/ddxInit.c (removed in master) + xkb/ddxLoad.c + +commit 0178b6a4abed0df3e90ba393709ed566105e7c2c +Author: Adam Jackson <ajax@redhat.com> +Date: Mon May 19 11:22:19 2008 -0400 + + Fix reduced-blanking mode filtering in RANDR 1.2. + + If the monitor isn't reduced-blanking (either through EDID logic, or + config file setting), then remove RB modes from the default pool. Any + RB modes from the driver and config file pools will stick around though; + you asked for them, you got them. + +commit bb687465d0c5aef3cc1c865e6ea67c01a8b417fb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 19 02:45:47 2008 -0700 + + XQuartz: First stab at SCM_RIGHTS passing the $DISPLAY launchd fd from the stub to server + (cherry picked from commit cccee9cfc29f85cca635df3b8dd54199b45c4df8) + +commit 4b69d22bcb79210225379da2cefb0cd8d5ffa10e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun May 18 23:51:06 2008 -0700 + + XQuartz: Fixed dropped code in the !XKB blocks, disable XKB support until we figure out a solution for xkeyboard-config + (cherry picked from commit 2a72309c061f7060480d150791019ce232481462) + +commit e997df8cd3c4222ea9fc3f0ebda728c4d1f15df5 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun May 18 23:31:41 2008 -0700 + + XQuartz: Cleaned up ListenOnOpenFD... + (cherry picked from commit 6fb587d3d5fbbaee9e46cdce24d03e5d1c66d58a) + +commit 738672858d9399ecbc170500c15f90bf657502d2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun May 18 23:02:12 2008 -0700 + + New XQuartz icon thanks to Simone Karin Lehmann + (cherry picked from commit c27e0c8f3c5108192362735db8a80bf3a9a1cc3a) + +commit 4be2104c801340075e030d06d24ceb4d8a6d6549 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 15 12:26:32 2008 -0700 + + XQuartz: More work towards Mach-IPC startup... started working on FD passing + (cherry picked from commit 27fbfeacfa16d620801ac3492b25c1e50aec8588) + +commit 82c4075d4ba3bea03341c80b754b0f9d2f62a826 +Author: Julien Cristau <jcristau@debian.org> +Date: Mon May 19 03:15:11 2008 +0200 + + xfree86: fix initial output positions with Above or LeftOf and rotation + + The fix in fa19e84714aa84a2f2e817e363d6440349d0b619 was incomplete, + as it was still using the wrong output's initial rotation to compute + the position. + +commit 7dca84f3ee7265119fb81d598d7d2f7363e25f1f +Author: Dave Airlie <airlied@redhat.com> +Date: Mon May 19 11:16:08 2008 +1000 + + cursor: don't dereference NULL pointer is devPrivates not yet set. + + This fixes a bug on server recycle with ati zaphod. + +commit 5af5db5033582a84b616d5c50f4288adb0210459 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat May 17 14:51:09 2008 -0700 + + XQuartz: Ok, pass XQUARTZ_USE_XKB since it breaks worse without it... but we have issues when we have the keyboard configs installed... need to figure out what to do there... + (cherry picked from commit 301262b07024ad960f22d99a1267fe137f5c3fce) + +commit 2408303d79297385063cae557195bd5fd3698478 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat May 17 14:56:53 2008 -0700 + + XQuartz: Added functionality to add a file descriptor to the connection list after the server is already running. + (cherry picked from commit 543c2cd68d1ffef65d4644b860faad7191c6b9da) + +commit 01612fe612aa27262fc3c8167f52e0376941f1ef +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 15 07:08:21 2008 -0700 + + XQuartz: Disable xkb since it doesn't work after getting xkeyboard-config installed + + Need to setup configs for the quartz keyboard + (cherry picked from commit c28fecc621b1803a4d4536afbc724d141de9e6ee) + +commit 1d09deaa6e5a75420ea4f24f6b5533f0ebc3ba28 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 15 05:49:43 2008 -0700 + + XQuartz: Made DarwinSendDDXEvent a little more robust to context switching diring server init. + (cherry picked from commit 5626b0949b1a6bdd2fa3ec2ef53a688084349b87) + +commit adc62f62b9f08aa6633718989ab61b61e3c1e8e2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed May 14 01:33:43 2008 -0700 + + Xquartz: Xquartz stub now can send Mach IPC to start the server. + (cherry picked from commit 55a3bca8ea42f8677897f94bf0a429bdc08c6696) + +commit 93c082a060bfa8d2a204c0c57ec3507a8edea087 +Author: Brad Smith <brad@comstyle.com> +Date: Sat May 17 13:14:31 2008 +0200 + + OpenBSD doesn't define __x86_64__, simplify tests. + + Seeing as this code seems to be specific to OpenBSD I don't think + __x86_64__ should have been added there at all. It appears to have + been added wherever __amd64__ existed before which is wrong. I + think that part of the commit should be reverted but also all four of + the checks should be __OpenBSD__ && __amd64__ instead of two one + direction and two flipped. + +commit 895d4e274d2b4638f0e6838dfee0e543311dba34 +Author: Brad Smith <brad@comstyle.com> +Date: Sat May 17 13:05:58 2008 +0200 + + BSD's also have /dev/urandom. + +commit aad1c37b0951eae216ac323c5d8bfc6fbcf096bd +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 16 10:52:41 2008 -0400 + + RANDR 1.1 compat: remove senseless comparison against the virtual size. + +commit 14726b776d6cebb7d864b6ffa7554e1ce5637d5c +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 16 10:51:32 2008 -0400 + + xf86SetDesiredModes(): Skip disabled CRTCs first thing. + +commit 459f34b089aca4f4eee9752600c3a9e4f4e343ab +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 16 10:48:00 2008 -0400 + + Fix initial mode selection even harder. + + The first guess used to be "is the preferred mode for one output the + preferred mode on all outputs". Instead, do "find the largest mode that's + preferred for at least one output and available on all outputs". + +commit 96111c154713600dd534dd82104ac18b91466202 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 16 10:31:58 2008 -0400 + + Redo RANDR compatibility output selection. + + Old logic was just the first one that happened to have an associated + CRTC. The new logic tries to find one that's definitely connected, has + probed modes, and has the largest candidate mode. + +commit a4bbe1c8bca08f3df5ff7e50444af6aef7ec8b25 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 16 10:25:12 2008 -0400 + + Re-add sync range inference from legacy setup to RANDR 1.2. + +commit f52f6c5c7efc281f9ac204fbaa4f71383df7463d +Author: Adam Jackson <ajax@redhat.com> +Date: Mon May 5 14:37:07 2008 -0400 + + Fix hal shutdown crash. + + Removing the device invalidates its ->next pointer. Copy it aside before + destroying the device. + +commit 99e4531f7c3fafce065dfd21f65bad1cf190c3f1 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri May 16 08:16:01 2008 -0400 + + The great kdrive purge. + + Most of these drivers didn't work. ati was the only one that even came + close. The igs, ipaq, itsy, pcmcia, savage, sis530, trident, trio, ts300, + and vxworks directories have never built since modularisation, so clearly + no one can miss them. + +commit fc7e2566cc076c0d979f74871bc436df43401058 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 16 16:59:34 2008 +0930 + + Xext: fix typo in condition. + + Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762. + We must free the event if it is NOT an extension event. + +commit 6fb76acc4524d6af4bfb6bc6d862c1ee2bbb8baa +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 16 19:22:32 2008 +0930 + + mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite(). + + In the xnest and vfb DDX we don't need the call anyway, it's performed by + mieqProcessInputEvent. + +commit dfb7de6571345061d1cd88ab915064fc376529fd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 16 20:56:04 2008 +0930 + + mi: don't call from miPointerMoved into the spriteFuncs for anything but VCP. + + Calling ->MoveCursor for anything but the HW-rendered VCP causes the + SW-rendered cursor routines to be started, including mallocs, etc. Since + miPointerMoved is called during SIGIO, this is a bad idea. + +commit f611719edce2ae51dca8e53947a3938b53c20b00 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 16 19:49:29 2008 +0930 + + xfree86: always render first cursor in HW, all others in SW. + +commit 48ba58feacedf9781db81c82adbb37197d9a5cd1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 16 19:22:32 2008 +0930 + + mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite(). + + In the xnest and vfb DDX we don't need the call anyway, it's performed by + mieqProcessInputEvent. + +commit 622d7c1d899a6146773a2ebd1d632a805f24025e +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed May 14 14:49:09 2008 -0300 + + Restructure and organize the code. + + It was removed and simplified some conditionals. We don't need test for + pDev->isMaster inside xf86CursorSetCursor() because only MD enters there. + + In the last chunk, ScreenPriv fields were being assigned without need, so + that code was wrapped inside the conditional to avoid it. + + I also tried to make the identation more sane in some parts that I touched. + + Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> + + Minor modification, part of the original patch led to cursors not being + updated properly when controlled through XTest. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 5af90025fee6a92e7d94642978feed21f902d0cb +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed May 14 02:45:49 2008 -0300 + + Remove redundancy. + + The only function that cat set SWCursor before xf86DeviceCursorInitialize() + is xf86InitCursor() when VCP and is created. + + Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 9fc94edfe3df4c4a84ad70714c0a4ef8bbf57fc9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 16 16:59:34 2008 +0930 + + Xext: fix typo in condition. + + Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762. + We must free the event if it is NOT an extension event. + +commit 5127942f80983b2e053dddd5c5747d0c3d2f9d6d +Author: Brian Rogers <brian_rogers@comcast.net> +Date: Fri May 16 10:08:04 2008 +0930 + + DGA: pass nevents to UpdateDeviceState. #15936 + + Missing parameter caused event processing to go nuts when checking valuators. + + X.Org Bug 15936 <http://bugs.freedesktop.org/show_bug.cgi?id=15936> + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 28378d26b4bae377ef1212f6a51cda9b5529f1b5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 15 11:09:15 2008 +0930 + + Xi: assemble button/modifier state before updating the device. #15934 + + The state field of the event must specify the state of the devices before the + event occured. With the code as it was, the state would also include the + event (e.g. state from a button press event would show the button as pressed) + Gathering the state before updating the device should fix this. + + X.Org Bug 15934 <http://bugs.freedesktop.org/show_bug.cgi?id=15934> + +commit 7cabf81c8638739a15a1be6baa3fc569f38e7589 +Author: Eric Anholt <eric@anholt.net> +Date: Thu May 15 13:24:27 2008 -0700 + + Add necessary include for COMPILEDDISPLAYCLASS. + + Fixes build after 07f69023b0e75d98a4be8f0d1c3dd9391b8149a0. + +commit 07f69023b0e75d98a4be8f0d1c3dd9391b8149a0 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 14 16:07:51 2008 -0400 + + Move defaultDisplayClass to xdmcp-only visibility. + +commit 166177e36bfc7bd1df03663ad89500cff056d563 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 14 16:02:05 2008 -0400 + + Simplify default font path setup. + +commit 2efe1abb6fc786a4f86464978ae0d23fc7347a98 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 14 15:53:11 2008 -0400 + + Remove global argc/argv variables. + + Was only used in the logging code anymore, and uselessly so there. + +commit 6c27b911222cdee9a057de0be7e8b2eff8b1ff2a +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 14 15:44:04 2008 -0400 + + Restore compression of duplicate log file entries. + + This undoes the workaround for bug #964, which was an Xprintism. + +commit 937e5aae33d3b5112b5d10d605e25f57b48caa3f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 14 22:30:15 2008 +0930 + + dix: don't undisplay cursor if we don't own a sprite. + + Sometimes we didn't have a cursor when coming back from suspend. Reason was + that the suspend caused the server to lose the device that was attached to the + VCP, and a RemoveDevice() would then set the cursor to NULL. + Solution: only set the cursor to NULL if we actually own the sprite. + +commit cbb4e80eb7cc8dc2aff5e5268b49cdb7b3c3d5fa +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed May 14 01:13:15 2008 -0700 + + XQuartz: More work on the Mach-IPC startup path + (cherry picked from commit 49cd0b185fd6c99b07357a74734b6a4023faca84) + +commit 3b57c59bb08c9a3211f4ae57d9e2fb569d61bf2f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 13 10:40:20 2008 -0700 + + Xquartz: More work on the new Mach startup + (cherry picked from commit 6237acf75d3310d7d4f262556b677557c2907284) + +commit e435acc84cb9477455ad005cee658630cbd363a2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 12 17:57:07 2008 -0700 + + Added missing to EXTRA_DIST + (cherry picked from commit e39613f4633ed992bc276b70833a703560e528f9) + +commit f7d6d20ad64b235700185784d317417a94d1814b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 12 13:36:35 2008 -0700 + + XQuartz: Cleaned up the about box. + (cherry picked from commit 0279a5970694937e949ba533330ea48961c4edba) + +commit b37e1f1f5ccc5a48df665449b0e31c4d25cc323c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 12 11:34:06 2008 -0700 + + Don't need the fink-friendly printf in the DDX anymore. + (cherry picked from commit fe2279440450c795d67ba5a2234b0797d0bfe39c) + +commit 68b4f250eef441a3d75e3b9b2665a51d3a1538d6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 14 16:18:48 2008 +0930 + + dmx: fix build. + + Just because it builds, doesn't mean it works. + +commit 00db0f35acc00cb771ab1c23f35b0db1c25d81bb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 14 15:29:28 2008 +0930 + + dix: InitAndStartDevices doesn't need a window parameter. + + Leftover from the old pointer-keyboard pairing code, obsolete and gone now. + +commit da728f2127aaa5c1ed5d22bb9f3d0c8ff19e4933 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 14 15:17:05 2008 +0930 + + dix: don't use serverClient in AddInputDevice, use the one supplied instead. + + We pass in the client that wants to create the device anyway, lets use the + parameter instead of hardcoding the serverClient. + + Wow. I hope this is merge detritus, otherwise it'd be a sign that I didn't + have enough coffee that day. + +commit a6659291c798f417a76d9aa7944694ff27c01fa7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 14 09:42:50 2008 +0930 + + mi: protect against NULL-pointer dereference. + + Required by the recent patch to use a NullCursor instead of UndisplayCursor(). + +commit 7cdc19b29d93bf15cecfd6b69e269fab2501bca0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 13 16:39:30 2008 -0700 + + When XKB fails to open rules file, log the file name, not the NULL file pointer + +commit dc3aba8a559d4304844ee1cc306c577a63b82762 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 13 14:37:26 2008 +0930 + + Xext: emulate XI events from core events when faking input. + + We need XI events for event processing, so lets get rid of the pure core + events ASAP. + +commit 8b3802d32041547fd6ed5393a56281c5c83d260e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 13 13:47:52 2008 +0930 + + Xext: core button events have rootX/Y unset too. + +commit ed65e8b4f02a6da7f1c5d85984a9ccf6a94d0181 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 12 18:49:34 2008 -0700 + + Check for strcasestr and workaround it on systems without it + +commit 8234af6c6a3ade13f7720743bde79957c7df3f6c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 13 11:17:39 2008 +0930 + + xfree86: remove Ubuntu-ism. + + Additional #include was required due to broken libc headers or something like + that. Remove it, there's more to the world than ubuntu alone. + +commit 59b8d29b3a91c65787dfadb5610342a62e85c48c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 12 21:22:54 2008 +0930 + + Xi: Fix up ProcIVector, got out of sync with the protocol. + + When the opcode squash happened in the protocol, the processing vector got out + of sync for a few requests. As a result, client and server would interpret + requests differently, leading to a couple of BadLength problems. + +commit 1fc1a2897e9185838c29d9ffff07c39d2fdf174f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 12 20:14:05 2008 +0930 + + Remove UndisplayCursor API. + + We can achieve the same thing by simply displaying a NullCursor, there's no + need for a separate API. + +commit 913989d643595030e67e7c0a758a16ae0da62ed9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 12 20:05:43 2008 +0930 + + mi: don't try to display a cursor for devices w/o cursors. + +commit 248a1df63430717550adb0e79068d8f9fcfacb0b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 12 20:05:21 2008 +0930 + + render: don't dereference cursor if cursor is NULL. + +commit c50b5d978981b13cdb22a9ad41c1b64f90cebe51 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun May 4 13:45:27 2008 -0700 + + Bug #14692: Allow drivers to have a say in Xinerama visual consolidation. + + Create a new exported global variable, XineramaVisualsEqualPtr. Use this + pointer to decide whether two visuals are equal during visual consolidation. + This pointer can be wrapped, which allows drivers and extensions to control + which visuals are consolidated. A wrapper can reject the visuals without + calling down, but must call down and return that result if it deems the visuals + equal. This ensures that all layers agree that the visuals are equal. + + Pass the screen of the other visual into the VisualsEqual callchain. + + Don't free PanoramiXVisuals since we need it for PanoramiXTranslateVisualID. + + Don't skip the first visual on the other screen in PanoramiXMaybeAddVisual. + + Skip the loop in PanoramiXTranslateVisualID if screen is 0. + +commit 86678e7cc2b021851ff508433fa160170f500c51 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon May 12 14:53:37 2008 -0400 + + Fix fbdevhw initialization for PCI drivers. + + graphics/fb%d, not graphics:fb%d. Thanks sysfs. Thysfs. + +commit 1c8bd318fbaf65890ef16fe26c76dd5e6f14dfde +Author: Adam Jackson <ajax@redhat.com> +Date: Mon May 12 14:15:11 2008 -0400 + + X n'est pas une print API. + +commit f9fae16456c30479b0cb9317e57200af36795785 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 12 10:36:44 2008 -0700 + + XQuartz: Added some version checking protection so we don't trigger an infinite exec loop with new /usr/X11/bin/Xquartz and older X11.app + (cherry picked from commit 78032815aeb10c22ff45b49702e9c9df82ab471c) + +commit ac4e33a9cd0ca2f0ec76181d11d5b90b82690c05 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 12 09:27:27 2008 -0700 + + XQuartz: More startup work... listen if we're the actual server + (cherry picked from commit 3b0afb47c3d8ad922cb2315ed8034f4d77d4a249) + +commit a7800d9355377ac02833613c2ffc2423beec9970 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 9 16:44:31 2008 -0700 + + XQuartz: Starting to work on the new Mach IPC startup stuff for better launchd, ApplicationServices, and Dock support + (cherry picked from commit 9b67fca9b7d3050d3d5582a5210270db7eb2ed05) + +commit 04211c3532ca078420e3745a5eac3d9de120bc32 +Author: James Cloos <cloos@jhcloos.com> +Date: Mon May 12 03:03:13 2008 -0400 + + Prevent the -wm command line option from causing a SEGV + + The -wm (when mapped) option for the BackingStore support has been + causing the server to dereference a NULL pointer. + + This has probably been the case since backing store has been + implemented on top of Composite. + + It looks like (some of?) Composite didn’t expect its WIndowPtr + argument to be the root window. + + In Composite’s compCheckRedirect() function we now avoid calling + compAllocPixmap() and compFreePixmap() when the pWin pointer’s + parent member is NULL, as is it the case with a server’s root window. + + This addresses: + + https://bugs.freedesktop.org/show_bug.cgi?id=15878 + +commit 7e768c08f7809b8dba4db1931e63314e2b6e1cfa +Author: James Cloos <cloos@jhcloos.com> +Date: Mon May 12 02:53:59 2008 -0400 + + Clean up whitespace + +commit 3b6735528efc6d69ab7a7cd63dd09c87db7ef115 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon May 12 16:36:42 2008 +1000 + + pci: don't do this pci stuff when we don't have hw access + +commit 9dfb525f6c91acab5d1a65765a046bf9ee2aa082 +Author: Julien Cristau <jcristau@debian.org> +Date: Sun May 11 23:17:27 2008 +0200 + + kdrive: allow disabling Composite + + KdInitOutput() used to enable Composite when it was disabled by default, + but now this hack prevents ``-extension Composite'' from working. + Remove it, as Composite is enabled by default anyway. + +commit 1a01e96c6d15ef17a8b5ab1afa361fb12476a25e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri May 9 15:38:44 2008 -0700 + + Return a valid X error when stuck in font alias loop + + Part of fix for Sun bug 4258475 + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4258475> + +commit 7b3066d9b9099135d9c49e0682161d5568fc535b +Merge: 2a3d142 315f089 +Author: Drew Parsons <drew@emerall.com> +Date: Sat May 10 00:01:15 2008 +1000 + + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver into upstream-experimental + +commit 2a3d1421e0cc18822ae8f478fcc272e16a9e9340 +Author: Drew Parsons <dparsons@debian.org> +Date: Fri May 9 23:20:11 2008 +1000 + + Disable D-BUS from Xprint. + + Use dummy config functions to replace those from config/config.c, and + therefore do not link Xprt with $CONFIG_LIB. + + Works around an endlessly spinning loop in dix/dispatch.c::Dispatch() + (WaitForSomething() not waiting) when built with dbus, which was + causing Xprt to use 95% cpu. + +commit 315f089056da67d4c463ed002eb2b74e38493b49 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 8 19:46:03 2008 -0700 + + XQuartz: Reorganized some of the build system in prep for the Mach IPC startup work. + (cherry picked from commit 2232c91d5c277673929eab2abb5e0495c00877cb) + +commit 28ac79450c69219dc501e072c6e5028e7136380d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 8 19:47:40 2008 -0700 + + Updated .gitignore for new Xquartz layout + (cherry picked from commit cd4d2355e227549a3410485a130549dd91ccdcfe) + +commit a07c5ad172b343ef26d2b41ff25f143950441c23 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 8 16:57:42 2008 -0700 + + XQuartz: Set bundle version to 2.3.0 + (cherry picked from commit 8a0524b30e1e860f3ae35741c116fc8da28aef79) + +commit 05f23ed3ea6ee0f052aee41b6573325fe0063fd8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 6 16:12:41 2008 -0700 + + XQuartz: Fixed some issue in our bundle creation + (cherry picked from commit 330ffad5477e32c5ab9ed338bc628bd5ae9f4c98) + +commit 90b963c0da2b33bdc21483f1a089b95c7e717333 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 6 16:07:33 2008 -0700 + + Set CSRG_BASED on OSX + (cherry picked from commit ff085deba18682caa2f93d61a75b38db87d747b1) + +commit ff013b0da4e6d33b2b69ce1212e9bd62050574e1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 8 16:58:31 2008 +0930 + + config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set. + + The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user + specifies a X-specific {rmlv}, then this is overridden through the use of + input.x11_options.Xkb{RMLV}. + However, the way how the server parses options--by ignoring capitalisation, + underscores and spaces--the HAL and the x11_options would override each other. + + So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and + only actually add them to the device after parsing _all_ options. + + * rmlv ... rules, model, layout, variant + + See Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037> + (cherry picked from commit fc35d1e3be201e3821413bb2eeb8d43e1e56ba17) + +commit 901978ebe0f446532255701cd536e246e805a55b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 8 14:05:56 2008 +0930 + + config: remove trailing whitespaces. + + It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc. + (cherry picked from commit 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8) + +commit 1c54c148895225e4ab3c781fe57d09e5f64353aa +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri May 9 00:26:16 2008 +0300 + + Revert "GL: Make errors non-fatal" + + Turns out this just caused segfaults further down the line. Oops. + + This reverts commit 268d61e00cf4bc52c05f19eda7ab4f6accce12c8. + +commit f17ba5d5849c92603f453195aca384844ca76d74 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu May 8 16:04:24 2008 -0400 + + Bug #13104: Remove broken XAA a1 glyph fast path. + +commit ddaecfa13cefee7c66b39b606c8640c6544d4943 +Merge: 9c2e087 cf20df3 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu May 8 14:33:58 2008 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit fc35d1e3be201e3821413bb2eeb8d43e1e56ba17 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 8 16:58:31 2008 +0930 + + config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set. + + The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user + specifies a X-specific {rmlv}, then this is overridden through the use of + input.x11_options.Xkb{RMLV}. + However, the way how the server parses options--by ignoring capitalisation, + underscores and spaces--the HAL and the x11_options would override each other. + + So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and + only actually add them to the device after parsing _all_ options. + + * rmlv ... rules, model, layout, variant + + See Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037> + +commit 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 8 14:05:56 2008 +0930 + + config: remove trailing whitespaces. + + It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc. + +commit 1a314a1ef06222977e7ccb94331ce31c17534b2a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 8 13:16:48 2008 +0930 + + Revert "config: deprecate (and ignore) the use of input.xkb.whatever options." + + daniels: + "Hrm, I'd prefer to have input.xkb.{m,l,v,o} be the primary keys, and + have input.x11_options be a backup for that, rather than the former + being deprecated, for the reasons I listed earlier ..." + + see http://bugs.freedesktop.org/show_bug.cgi?id=13037#c51 + + This reverts commit 26188875de1ccc84ac60bfb251e3ec43de2b9e22. + +commit cf20df39cc78203d17b99223908af388ecbf7d0e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed May 7 22:24:19 2008 +0300 + + XKB: Actually explain keymap failures + + When something went wrong building a keymap, try to explain to the user + what it actually was, instead of the dreaded 'Failed to load XKB keymap' + catch-all. + +commit 641a5f955b7b3ae04eeb6bc45fb30b0b531898e4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed May 7 22:29:04 2008 +0300 + + Build: Ensure xf86DefModeSet.c ends in an empty line + + This shuts up a warning. + +commit 268d61e00cf4bc52c05f19eda7ab4f6accce12c8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed May 7 22:28:45 2008 +0300 + + GL: Make errors non-fatal + + GLX, there's more to the world than just you. If you fail to load the + software renderer, don't bring the entire server down. + + The error path probably needs better testing on this one, but it seems + mostly okay to me. + +commit 9c2e0871cfbe54e73eec1f790a7e383d08555055 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 7 13:21:26 2008 -0400 + + Bug #13104: XAA: Adapt to glyph storage changes. + + Glyph bits are now stored in a proper pixmap, not just hanging off the + end of a GlyphRec. + +commit 26188875de1ccc84ac60bfb251e3ec43de2b9e22 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 7 13:13:57 2008 +0930 + + config: deprecate (and ignore) the use of input.xkb.whatever options. + + These options are still sent by some HAL implementations (e.g. HAL on FC8), + and may overwrite the options set in the x11-input.fdi file. + For a more detailed description of why see Bug #13037, comment 42. + + X.Org Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037#c42> + +commit b6a0c6d4864f73a18beb841b16e9be56f2fcd77e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 6 17:06:34 2008 -0700 + + Allow using libmd instead of libcrypto for SHA1 hashing in render/glyph.c + + Builders can force one or the other by passing SHA1_LIB & SHA1_CFLAGS + to configure + +commit 718652eaf9221e0eeec2c971dd7baa97f827451b +Author: Adam Jackson <ajax@redhat.com> +Date: Tue May 6 17:52:37 2008 -0400 + + Bug #13104: Don't let XAA glyph pixmaps anywhere near video memory. + + Since glyphs are stored in pixmaps now, they can make their way into VRAM, + which invalidates a bunch of fast-path assumptions in the XAA code. Thus + you end up doing color-expands or WriteBitmap from la-la land and your + aliased glyphs go all funny. + + Since XAA isn't ever growing the ability to do sane glyph accel, just force + glyph pixmaps into host memory by catching them at CreatePixmap time. + +commit a85d3ac87cc354093bb1e88697c44254e7721bb9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 6 02:59:13 2008 -0700 + + XQuartz: Fixed typo + (cherry picked from commit 56b7988d2662caa4d31094695b414080e4470ed4) + +commit 077ced6384abad78253e857091e78f3685965b9d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 6 02:47:03 2008 -0700 + + XQuartz: Added uncommitted files + (cherry picked from commit e414ec462cfc63f8eb7f504f526f5a2c73f51e69) + +commit 80e502c5d1f7e9221c6ae40716d6402fd28d8806 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 6 02:28:36 2008 -0700 + + Fixed up dist + (cherry picked from commit f225222ba2bf4f03425107f258d60b73c88efaec) + +commit 7295e544332b0fa929f651304f9d4aca3db4a33e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 6 00:06:19 2008 -0700 + + XQuartz: Move server bits into bundle and setup stub in /usr/X11/bin/Xquartz in prep for startup rewrite + (cherry picked from commit 453a982e6382cff06ea27abba225440b07068f50) + +commit d41d677ab4118e73140ea2392e0d48eb361af1cf +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Mon May 5 20:55:08 2008 -0700 + + Xquartz: experimental embedding of Sparkle.framework + (cherry picked from commit b7a1a640cef8c69442859cbf89034ad362a19684) + +commit 9e0d73fd8a43647b648ec5b2f0bcaae30c03259c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 6 17:52:15 2008 +0930 + + xfree86: call SetCursor for the VCP when switching between SW/HW rendering. + + We need a manual call to SetCursor when we switch from SW to HW rendering and + the other way round. This way we display the new cursor after removing the old + one. + In addition, we only update the internal state for the VCP's sprite. This way, + when we switch back to HW rendering the state is up-to-date and wasn't + overwritten with the other sprite's state. + + The second part is a hack. It would be better to keep a state for each sprite, + but then again we don't have hardware that can render multiple cursors so we + might as well do with the hack. + +commit e4ebfed1785597b48b68e1bbdde3e5c4061b749f +Author: Dave Airlie <airlied@linux.ie> +Date: Tue May 6 16:46:37 2008 +1000 + + xf86edid: fix typo in debug output + +commit b9c1a57e7a98dea63cd362f714411547e728a85a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 6 14:51:23 2008 +0930 + + xfree86: switch between to SW cursors if more than 1 sprite is available. + + Switches back to HW cursors when sprites other than the VCP are removed. + The current state requires the cursor to change shape once before it updates + to SW / HW rendering (whatever is appropriate), e.g. by moving into a + different window. Until this is done, the cursor is invisible. + +commit 3df88c17e315b5ae580096e4bc88920d1f452e83 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 6 11:50:20 2008 +0930 + + xfree86: re-enable hardware cursor (for a single cursor) + + This commit enables HW rendering for cursors again, but only for a single + cursor. Other cursors can be created, however they will not be visible. + +commit 6acc2acd0db2826add7c47e94e4061d169a41f88 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 5 15:32:26 2008 -0700 + + Rootless: mi doesn't let us resize root, so we need to do it ourselves... + (cherry picked from commit c1ec36e28cff857664090cc8792db1ae93b783fa) + +commit efa65a0317e12c9ad34fa00fe90bf5eae9fa2670 +Author: Keith Packard <keithp@keithp.com> +Date: Sun May 4 21:52:58 2008 -0700 + + Rework composite overlay window code to fix several resource management bugs. + + The composite overlay window code had several misunderstandings of the + workings of the X server, in particular error handling paths would often + double-free objects. Clean all of this up by using resource destruction as + the sole mechanism for freeing resource-based objects. + +commit 6c1accce87c9bd640c1b4bbc49bae7d44b1cc97b +Author: Keith Packard <keithp@keithp.com> +Date: Sun May 4 21:51:08 2008 -0700 + + Empty the borderClip of manual redirect windows. (bug 15823) + + Thanks to Owen Taylor for root-causing this one. + + If a TreatAsTransparent window has any area in the borderClip, that will be + added to the totalClip region for use by other windows. That's wrong. + Instead, simply empty the borderClip for TreatAsTransparent windows right up + front. + +commit d500eeb9458336780d77baf8b7db96e1f7ff4f0d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun May 4 10:26:25 2008 -0700 + + Xephyr: Handle depth 30 and reject higher depths rather than crashing. + +commit f4a68f3701889950d3b98842d021f357f3913fea +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 2 17:35:57 2008 -0700 + + XQuartz: Fix mouse input offsets earlier since GetPointerEvents does not like negative (x,y) values + (cherry picked from commit 8d9eab3a2ec5955cc2698fdcb1fa6ed12b2aadb7) + +commit 96fa7da3b87e2f9187ec13dad259beefdc17cd94 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri May 2 16:53:45 2008 -0700 + + XQuartz: Avoid a possible crash at startup due to unfavorable context switching. + (cherry picked from commit ff10c37bdd09656cf2f7ee9577f5552caa1ffdb8) + +commit 6f63724b28c8b3fd85314fb95d1e4f363b610e19 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 2 14:56:58 2008 +0930 + + xfree86: don't try to repaint the cursor before cursors exist. + +commit 334456952930cb3e55c02fcdada2d0c074cd0520 +Merge: 8e56fd9 3b8d534 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 2 11:00:14 2008 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + Xi/exevents.c + dix/devices.c + +commit a338007be6fd4302af012109d959f43ac7eab2b1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu May 1 18:02:59 2008 -0700 + + XQuartz: Adjust the screen origin offset properly for multimonitor setups + (cherry picked from commit f2020b9836bacd0593ac0b4c8541e32714ab02a9) + +commit 8e56fd9728d63a7a48ef44503425c6e25c7c9ffb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri May 2 10:22:06 2008 +0930 + + dix: continue to check for invalid valuator ranges. + + In an ideal world, the drivers would init all axes with NO_AXIS_LIMIT. In the + real world, this is an ABI break, so let's just leave the old check in. + +commit 3b8d53452cd6c74d32d7759964a7cd9ee775f161 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu May 1 15:10:52 2008 +0200 + + EXA: Fall back in CompositeRects if the driver can't accelerate Composite. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=15780 . + +commit 01c61f3d972fc2f4e5bb536dd00d8b6bbeb0fb3d +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu May 1 01:02:39 2008 -0300 + + xorgcfg: Fix a crash if xorg.conf doesn't have a Files section. + + This patch only creates a Files section if required, so if no entries are + added, an empty Files section will not be created. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 6899ff81e8f668382e3e2f9afdd9cdf51d0e0f7d +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Apr 30 16:38:42 2008 -0300 + + Fix an off by one read error in drmSIGIOHandler(). + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit ec0419b50534006a272278b79ee51538193661cb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 30 17:30:57 2008 -0700 + + XQuartz: Moved some relevant stuff from darwin.h to darwinEvents.h + (cherry picked from commit 1fcf74a436f2e19cceb3f285b89859025d94c040) + +commit 28d1e21f1523d475cb757d3cfa33737ed62c534d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 30 17:30:32 2008 -0700 + + Dix: Cleaned up sanity checking in Get{Pointer,Keyboard}Events + + XQuartz was crashing because the Appkit thread was trying to GetXXXEvents while the Xserver thread was exiting. + This adds some more sanity checks and avoids that crash + (cherry picked from commit 34ec4bd6acb834c0e3f9a5042a0cc3f52c6f3a68) + +commit ce36ae526d88d20ff67cd6cb429fb06f48d231f6 +Author: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> +Date: Wed Apr 30 11:58:32 2008 +0300 + + Add M32R architecture support (bug #10020) + + Still needs autotools support, so this won't actually _build_: it's just + a starting point. + +commit a0e6a7d4f507c5c0a0b11adb10394af58a0a6e07 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 30 17:57:48 2008 +0930 + + dix: resize EQ to minimum size to avoid reallocs during SIGIO. + + When a new device is added, calculate the event size needed if a DCCE event is + sent and set the EQ's event size to this minimum. This avoids reallocs when a + event is sent (which may happen during a SIGIO). + +commit b71b51c982706501b6229532ce342752207426bb +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Tue Apr 29 23:37:58 2008 -0700 + + xquartz: created darwinTablet, to represent tablet events + (cherry picked from commit 50641bce730ee03738fa0c4beb8125b34fda556f) + +commit 519581b0bab5cc6dac397877da485745f18c2120 +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Tue Apr 29 23:00:09 2008 -0700 + + xquartz: remove unused params from DarwinEQInit + (cherry picked from commit 299a056737168ca1faefd675dce6d6ab13176be9) + +commit d70487a4c09cfeb90d996ab40a23a74b2c15be6f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Apr 29 23:59:26 2008 -0700 + + XQuartz: Fix to tablet-event handling code; we now scale + more conservatively (to match Linux's Wacom driver) and + we now receive all tablet-related events. + (cherry picked from commit 588683cecca2cfc65a28de035cd6ee3d64ff59d2) + +commit fea39c94bcc8b635d37530d8a27ee92acab484fe +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 30 13:17:14 2008 +0930 + + dix: fix typo from last commit. + +commit ffaccc2dc91f4ca4ea10da010206a0a7d2b5540c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 30 11:45:19 2008 +0930 + + input: replace -1 as default axis limit with NO_AXIS_LIMIT define. + + This allows easier refacturing of the coordinate limit handling. Grepping for + -1 is boring. + +commit 00acb40f2bc5bb4a1977b9b08db75630677ff787 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 30 11:29:03 2008 +0930 + + dix: fix typo in clipAxis. + + Check needs to be (min_axis < max_axis), not (min_axis < min_axis) + +commit f65a1a62f9eac2f6620d5d469dbf6c79b2eadab7 +Author: Hong Liu <hong.liu@intel.com> +Date: Tue Apr 29 09:00:11 2008 -0700 + + Keep rotation wrappers in place while transforms are in use + + LeaveVT/EnterVT cycles will free/realloc shadow frame buffers. Because of + this, the presense/absence of that data is insufficient to know whether + the screen function wrappers are necessary. Instead, the 'transform_in_use' + flag should be used. + + This patch also adds 'xf86RotateFreeShadow' for drivers to use at LeaveVT + time to free the rotation data; it will be reallocated on EnterVT. + +commit 18b33dd4ff46f63bad70b493b1d0b0758c961ada +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 29 15:24:55 2008 +0930 + + Xi: stop excessive use of _X_EXPORT. + +commit 2b179c32ac40f5258d95ae16da96a79fa8eea696 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 29 15:15:16 2008 +0930 + + include: add declaration for CopyGetMasterEvent to shut up compiler warning. + +commit ff36753755360aaa16ab8604a0ab78123884b57d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 29 14:53:41 2008 +0930 + + mi: call the custom event handlers for both MD and SD. + +commit ec2fca7e6f7ce8fdf33d959b7adeaae935ec4b37 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 29 14:40:44 2008 +0930 + + xfree86: DGA needs to call into Xi. + + Two steps: first use UpdateDeviceState() instead of replicating the device + changing code. And emulate XI events instead of core events. + +commit 8208b842b7dd3b30bafdd74147bdfa63bc00cc40 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 29 14:19:42 2008 +0930 + + Xi: add IEventBase global variable. Stores event base for X Input events. + +commit 46340b740640b76b52b8e69bc67f9201c7e974c3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 29 14:17:48 2008 +0930 + + Xi: change UpdateDeviceState to be _X_EXPORT. + +commit 3a922c5d07509703a3eeda2bbec6f332e6b0ffac +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 28 17:32:54 2008 +0930 + + Xi: apply ValuatorEvent data to the device's valuators. + + After UpdateDeviceState, the device has the current position in absolute + coordinates, the event has the correct valuator data to be delivered to the + client. + +commit f2a20294fe26f4c9d245d24d065331fefd8f830d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 28 16:56:22 2008 +0930 + + dix: store all valuators as they come from the device in the valuator events. + + The event's sequenceNumber is mis-used to determine whether the values are + relative or absolute. + +commit d5ab89f4f1acbe2614036e8934122185ac0f81ee +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 28 15:52:24 2008 -0700 + + XQuartz: Unset CFProcessPath... blech + (cherry picked from commit ce4fbfbc75c62a092214d140c7550279aebe69ef) + +commit 0c2312b21b6700c1425baccaf9c26150b4f0fd6a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 28 15:28:21 2008 -0700 + + XQuartz: xprIsX11Window can be called from the Appkit thread (see X11Application.m) + (cherry picked from commit 22cf72437601c07b8a6c744b4f2f1f4cd6713e60) + +commit c3dc4bdbb018c0606d561e2dfb9a36e9297fa312 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 28 15:42:02 2008 -0700 + + XQuartz: Disabled DPMS extension + (cherry picked from commit 1448fed9b6d484f471b9b2982c76ca921a9273b9) + +commit 07382a70c7ac9807dfb31821a4763bea2309bde6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 28 12:36:54 2008 -0700 + + XQuartz: Added thread debugging to xprFrame.c + (cherry picked from commit 41542502b321c697271c1752525b600872b6df96) + +commit 8349732a6720652bfbad7874a952be73a0e8e77b +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Apr 28 21:09:35 2008 +0200 + + EXA: Try to accelerate non-antialiased text via the glyph cache as well. + + Treat 1 bit glyphs and masks as PICT_a8 in the glyph cache. We're not able to + accelerate them otherwise. + +commit a65d530040bb561ba88c5d8c71633a7c0bf11e89 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Apr 28 21:03:12 2008 +0200 + + EXA: Accumulate glyphs whenever possible, for full benefits of the glyph cache. + +commit e7eaac59c424a205dd106fc7d70734ff4b390f28 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Apr 28 21:00:55 2008 +0200 + + EXA: Glyph cache upload tweaks. + + Track damage after using UploadToScreen directly. + + Don't waste any effort on empty glyphs. + +commit cc08c06665ffe29ad44d023d75d0f86e5338875d +Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> +Date: Mon Apr 28 21:00:55 2008 +0200 + + EXA: Use UploadToScreen() for uploads to glyph cache + + When possible, use UploadToScreen() rather than CompositePicture() + to upload glyphs onto the glyph cache pixmap. This avoids allocating + offscreen memory for each glyph making management of offscreen + areas much more efficient. + +commit 13fd2256300b61d88b840952d838f834523f5dd7 +Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> +Date: Mon Apr 28 21:00:55 2008 +0200 + + EXA: Clean up debug messages + +commit fcb5949928f1c27f67f40c094c3c673786574422 +Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> +Date: Mon Apr 28 21:00:54 2008 +0200 + + EXA: Fix overlapping glyphs in glyph cache + + Allocate each cache at a different vertical position in the + per-format pixmap. Fix width/height confusion when choosing + the cache for a glyph. + +commit 40eb14c9482457969e0bde97c49edad536285e02 +Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> +Date: Mon Apr 28 21:00:54 2008 +0200 + + EXA: Add exaCompositeRects() + + Add a function to composite multiple independent rectangles + from the same source to the same destination in a single + operation: this is useful for building a glyph mask. + +commit 54184110f6f3e5d7276d5431e739a4fcf0c3523e +Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> +Date: Mon Apr 28 21:00:54 2008 +0200 + + EXA: Use a single large glyph cache pixmap + + Add back exaGlyphs(); the new version copies the glyph images + onto a single large glyph pixmap and draws from their to the + destination surface. This reduces the management of small + offscreen areas and will allow us to avoid texture unit setup + between each glyph. + +commit e9734306088e12f2cd68bf347ecf8415be4f0268 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 28 11:47:49 2008 -0700 + + XQuartz: More startup / threading house cleaning. + (cherry picked from commit 72653c24c00dfba64ce35a3d400598bcd77defc1) + +commit 4b46fc931e61bec0abd6a86062e46dd7a408e745 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 28 10:50:51 2008 -0700 + + XQuartz: Updated Localizable.strings + (cherry picked from commit d8d9c866b90fb24c93bd6e25fa90f8f2bf58ad34) + +commit 4017ebe5bfa7a261cd1135801756c44e9fe93ca1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 27 00:01:14 2008 -0700 + + XQuartz: Added missing Xquartz.man.pre to EXTRA_DIST + (cherry picked from commit 03e707987f7f32e47dd0355c6d16bfb9169a379b) + +commit 53dba5381fdd8f644e16aaa0ecb05df4dc615b23 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 28 11:37:52 2008 +0930 + + dix: if alloc of a master keyboard fails, remove the master pointer. + +commit 1fab51edfc82e1ef60dfa29fd5d93478066a3998 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 28 11:37:21 2008 +0930 + + mi: guard against NULL-pointer dereference. + +commit b5004722a208479a4bc762ff428bf4cbeb430d53 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 28 10:26:01 2008 +0930 + + Xi: Only return VCP, VCK and floating SDs to Xi 1.x clients. + + This is better than the approach implemented with + 8973a3f7983240407dd6da59b3643f40e6a3d83a which disabled XI altogether for 1.x. + Instead, return a device list that resembles a traditional XI setup on pre XI + 2.0 servers. If the client tries to open a device other than a floating SD, + return a BadDevice error. + +commit 0bd28315afc3b7223f8ff9f17597db09500a9388 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 26 23:00:42 2008 -0700 + + Xquartz: Added missing to EXTRA_DIST + (cherry picked from commit f4b963256feb03e9e6b5521bdefeb390e9a49688) + +commit ef1c52053755fa14b4ca98b22c506f73f5f4a4b7 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 26 19:21:05 2008 -0700 + + XQuartz: Cleaned up startup and thread creation a tad. + (cherry picked from commit c861fe00e112b21ee0156d09a6cd5281642a1dcc) + +commit b114d4e861885cc5b49cd81b33ad825461811b3e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 26 17:04:49 2008 -0700 + + XQuartz: Don't subtract the titlebar off of the pointer_y + (cherry picked from commit 00a9567acce2b27a649cbebd4790e3043688a7d8) + +commit 684b5d8382bf0bc6cd55774226ee362e81c0adbf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Apr 26 19:55:59 2008 +0930 + + Xi: whoops, stray ! caused a bit of memory mess. + +commit 87071b604c4b7c3c79ab784e2c09ff691e2bc5ad +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Apr 26 19:37:57 2008 +0930 + + Revert "Xi: disable XI for clients < XI 2.0" + + Turns out some programs don't like this change. gnome-settings-daemon crashes + hard if you tell it that XI doesn't exist. So, tell them we have XI, but leave + the other change (the one that pretends no devices are available). + + This reverts commit 8973a3f7983240407dd6da59b3643f40e6a3d83a. + +commit 7447a30fb27ed50a20a85b5a2de9afe7dea8cfa5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Apr 26 19:03:13 2008 +0930 + + Xi: if a pre-XI2 client tries to list the devices, pretend we don't have any. + + XI 1.x isn't supported anymore, so let's pretend we don't have any devices. + This stops clients from opening them and thus stops interference. + +commit 8973a3f7983240407dd6da59b3643f40e6a3d83a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Apr 26 17:48:52 2008 +0930 + + Xi: disable XI for clients < XI 2.0 + + Sorry. With the huge changes in the device handling I honestly don't know how + to support XI and XI2 alongside. So let's just pretend XI doesn't exist if a + client doesn't request it supporting XI2. + +commit b304b0a65cc57127cdea103f2c5114e4ea79af41 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Apr 26 17:38:55 2008 +0930 + + Xi: add versioning support. + + Remember the version the client sent to us, so we can adjust our replies + accordingly. This requires the client to use the {major|minor}Version fields + in the GetExtensionVersion request. However, they were padding before, so we + must assume they are garbage if nbytes is non-zero. If nbytes is zero, the + client is probably a new client and we can handle it correctly. + +commit b9ca7896356f79ee27be5d5aa62052f6984282b0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 25 17:54:36 2008 -0700 + + XQuartz: Added some pseudoramiX debug traces + (cherry picked from commit 5bee1585a399eab0a7b6fc80ad476d81b5d227d3) + +commit e251c9e75afdc5e32f2bc9801712272358934266 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 16:49:35 2008 +0930 + + Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac + +commit 1d0438de176551aaeff549664f00b8bd83d465af +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 16:28:58 2008 +0930 + + Xi: remove RemoveOtherCoreGrabs() + + PickPointer() returns grabbed devices, so we can't get a double grab anyway. + +commit be5ff2b8d8a392eb8611e1fcd6da4752d68a7f9d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 16:25:13 2008 +0930 + + Xi: remove some superflous code + +commit 0209e46249b61974a6e3ed54a51cc36dfaf0064f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 24 23:48:11 2008 -0700 + + XQuartz: More multi-monitor work... reverted Ben's workaround (worked for side-by-side only) and added more debugging. + (cherry picked from commit 515b8b855ac5d2d5aef881053f73b2ad07a6dd2e) + +commit b65dbd350b8518bb90bed9cdc64dd900bc75d20c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 24 21:14:04 2008 -0700 + + XQuartz: Cleaned up multi-monitor support. + (cherry picked from commit c05abf0a19b0ef0fc4ace9400a095ce2521456bc) + (cherry picked from commit 9112f290434c246d3e797551aaaf3a89d2006b23) + +commit b093bf3ec37367172be3b44a04f0f43890ba7d7d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 15:15:31 2008 +0930 + + dix: don't search for grabbed devices, PickPointer does it for us now. + + Follow-up to 93ee33830778b9ec85ad81496572677a30022b09. + +commit 6198bad07edc51ff4a264a9361c5e9b6c74647a6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 15:02:40 2008 +0930 + + dix: remove misleading (stale) comment + +commit 93ee33830778b9ec85ad81496572677a30022b09 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 15:02:13 2008 +0930 + + dix: let PickPointer() return devices that are core-grabbed by the client. + + If the client currently holds a core grab on any device, this device has + priority, even over the ClientPointer. + +commit f5ac98747de921d48f36d4f3f66dbe73e26a6760 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 14:50:24 2008 +0930 + + Standardise copyright headers for all new files created as part of MPX. + +commit 3fc67b4205851dcffcc431a07a885828549bd9cf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 11:37:32 2008 +0930 + + Xi: remove leftover chpkpair.h file. + + Used to contain declarations for ChangePointerKeyboardPairing request + handling. + +commit 89add4ee986e38b833bb58750b3e5a664efb6f4a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 11:19:12 2008 +0930 + + dix: remove obsolete InitWindowPrivates(). + +commit dcdc66fcfc7957aa7875fbf74fa3a55989a9a187 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 11:14:32 2008 +0930 + + dix: add mi.h include to stop compiler warning + +commit 97552413d213337e4bff8c89b06d58a09d722b05 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 11:13:05 2008 +0930 + + dix: remove "unused variable" compiler warning. + +commit d9c38e84cc492b931a2238757d438f562946e5bc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 11:04:02 2008 +0930 + + dix: remove pairingClient definition. + + This variable was used originally to determine which client is allowed to + change the pointer-keyboard pairing. For now, we just let anyone change it and + see how that works out. + +commit c14b858aeced81ff43723644f2de0f5c43f55755 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 11:02:12 2008 +0930 + + Xi: fix two compiler warnings + + unused variable in exevents.c + implicit declaration in warpdevp.c + +commit 6015b7a81252cd1729e6f4045f9b0c885c95b183 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 10:41:30 2008 +0930 + + Xi: handle requests through a dispatch handler. + + Same principle as e.g. in the RandR extension, rather than having a load of + if (type == XI_whatever) + use an array of function pointers. + +commit cb8cb87bc6decf75832c3724687000ecb658226e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 25 10:09:50 2008 +0930 + + Xi: remove unused #define DISPATCH + +commit 5869e3f5551e7e2d18e06a2f220b77d8c4161db1 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 24 19:39:27 2008 -0700 + + darwin gots /dev/urandom, too yo! + (cherry picked from commit bf0144f38034bc59f108bb2c5270ff37fbe70e10) + +commit b1ae7c79db78cc3b789701f81328669f9f8ed80f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Apr 24 19:02:43 2008 -0700 + + Bug 14247: If pkg-config can't find openssl.pc, just link with -lcrypto + + X.Org bugzilla #14247 <http://bugs.freedesktop.org/show_bug.cgi?id=14247> + +commit 1daae4574c19a122baf73b6f9457b0d383b1bc66 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 24 18:22:05 2008 -0700 + + Added missing HAVE_LAUNCHD to dix-config.h.in + (cherry picked from commit 1b4b73cefbc2f3e3f6d0cb84ea202f84fb60abb5) + +commit 63853e4ad211945ed25541223207a78f83766ced +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 24 18:21:42 2008 -0700 + + XQuartz: Compile in missing glx source that we still need + (cherry picked from commit c611335dee267e41dcd1733a6bb5206b102f804e) + +commit ae982a27e4059fecd4048d245e6aa02f8dcc97d0 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Apr 24 16:37:29 2008 +1000 + + glx: test for valid read and draw privates before using them + + this should fix a bug where f-spot exiting blows up the X server + +commit f377141912594f87144d6d7f7fdd279a101d8e6c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 24 13:30:28 2008 +0930 + + Xi: don't attempt to send to a NULL window. + + Only applicable when the server comes down/restarts. In this case, + WindowTable[i] may be NULL. Let's not try to send an event then. + +commit aec485f2dcc87b340759d67b60e7dee7931aaec5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 24 13:29:46 2008 +0930 + + dix: NULL out WindowTable after freeing all the windows. + + CloseDownDevices() tries to send PresenceNotify events. If the windows are + already freed, then we are accessing dangling pointers. + +commit 9ab4e2fd8eaa87dbd16835affb1aa54dcb1a619e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 23 11:38:08 2008 +0930 + + xfree86: don't free the config-file related information in DIDR. #15645 + + In DeleteInputDeviceRequest, leave the conf_idev (which is shared with + xf86ConfigLayout.input) alone for devices that were specified in the + ServerLayout section of the config file. This way, in the next server + generation we are left with what was the original config and can thus re-init + the devices. + + This is an addon to 6d22a9615a0e6ab3d00b0bcb22ff001b6ece02ae, an attempt to + fix Bug 14418. + + X.Org Bug 15645 <https://bugs.freedesktop.org/show_bug.cgi?id=15645> + X.Org Bug 14418 <https://bugs.freedesktop.org/show_bug.cgi?id=15645> + +commit 7dc40c8eca90ec1bfab84b6f54418b64c0e62d63 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 24 12:47:29 2008 +0930 + + xfree86: Don't free master devices. + + The previous check works in the master-branch, but doesn't work with MPX. We + actually copy the SD's information into the MDs public.devicePrivate, so we + need to explicitly check whether a device is a MD before freeing the module. + +commit cc13f87cd8ac54223fdb0b3d3c043dc9b9be5a42 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 24 11:43:47 2008 +0930 + + Xext: XGE: change function definition to have return value on separate line. + + This seems to be the common style in most parts of the server. + +commit d0890c40b9a9c7965c08608e6950c078a29aac16 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 24 11:32:36 2008 +0930 + + Xext: add a few lines of comments to XGE. + +commit 745b90cde1007383ec8c887f02439a34ab427f31 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 24 11:27:22 2008 +0930 + + Xext: re-do the XGE versioning handling. + + Basically the same approach RandR takes. Remember which one the client + requested, send back the one the server supports. Also divide XGE server + version (now defined in geext.c) and the client's version (still in the + protocol definition). + +commit 5f3e5b3462bb02e828c70d0e1890b5a83d399d42 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 24 11:03:23 2008 +0930 + + Xext: remove trailing whitespaces in geext.{c|h} + +commit d09c520b322ba5c5f4d6b630a7c0c62e56732f82 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 23 10:22:34 2008 -0700 + + Moved Apple GL bits into our DDX subtree + (cherry picked from commit c9356f32892978faecb30f7b7af7488820ce37ff) + +commit b05b416c622063b84747702a54ffd9a802d6fc11 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 23 09:59:48 2008 -0700 + + XQuartz: No need to include indirect.c a second time + (cherry picked from commit 41ed532525da85d1bd2c20af5ffa28ac6d1f4996) + +commit 565492c70a280d7e749500c5c0073bdcaf175c86 +Author: Ben Byer <bbyer@apple.com> +Date: Wed Apr 23 06:00:57 2008 -0700 + + xquartz: build fixes for GLX/DRI2 fallout (note: not guaranteed) + (cherry picked from commit 85a5796b667461bf1fafc68c07b3a704cd8efd5b) + +commit 6f6505db51763d902142a8161e71cad44f52560c +Author: Ben Byer <bbyer@apple.com> +Date: Wed Apr 23 03:43:51 2008 -0700 + + glx / xquartz: we still need glxcontentmodes.[ch] kthx + (cherry picked from commit 27545fd37f8c703b72f7cfc329778abc1ceabfa0) + +commit 4e3a8af5751ff88c0cadd612821b0ef349d250c5 +Author: Ben Byer <bbyer@apple.com> +Date: Wed Apr 23 03:39:41 2008 -0700 + + xquartz: clean up linker line for main binary + (cherry picked from commit 821d7400f2ff917497b2ee58ceef2b69c2d47ec7) + +commit 3685b171da51f853bfdb312d36622dfa03ee75be +Author: Ben Byer <bbyer@apple.com> +Date: Tue Apr 22 23:53:23 2008 -0700 + + xquartz: remove vestigial aglGlx.c + (cherry picked from commit 40bd041e4255f26fcbdf0831e68619ae0f46ab39) + +commit f6e22d69af6bc8f63c3a46535a09e217696a679f +Author: Hans de Goede <j.w.r.degoede@hhs.nl> +Date: Wed Apr 23 12:28:30 2008 -0400 + + Prefer glxvisuals with stencil buffer for default visuals + + The first fbconfig which has a depthbuffer > 0 and doublebuf is choosen + when associating fbconfigs with the visuals, indepenent of stencil bits. + This happens to work ok on intel as there all fbconfigs with a + depthbuffer > 0 also have stencil bits. + + This patch fixes this by first trying to get a fbconfig for default X visuals + with both stencilbuf, depthbuf and doublebuffering, and if that fails fallback + to trying to get one with only a depthbuf and doublebuffering. + +commit 00effad583713e882c3f2518bcd3da51bf4db716 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Wed Apr 23 17:46:30 2008 +0300 + + xephyr: XEPHYR_DRI is identical to XF86DRI + +commit 6a9f7f28ec455d2879ca1a315ce77c48af49e7f4 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Wed Apr 23 17:46:15 2008 +0300 + + xephyr: sync with mesa + +commit 7ffc68c5cc7108c9e56af25f9f9b4398f5b027df +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Wed Apr 23 17:45:54 2008 +0300 + + xephyr: libGL is client lib + +commit a27c244d72603e27766ff3900ab28fe094f7397e +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Wed Apr 23 17:45:37 2008 +0300 + + xephyr: Makefile cleanup 2 + +commit d4d19b2f22002b1579438cb9cf08dd580c7ec005 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Wed Apr 23 17:45:19 2008 +0300 + + xephyr: Makefile cleanup 1 + +commit cdc4571b580a8f4fd279404215bff0fb9a5b4816 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sun Apr 20 17:06:26 2008 +0300 + + drop TOGCUP remnants + +commit 6cd9287aed3c128d9c10b9b042ba7b864143d522 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sun Apr 20 16:58:51 2008 +0300 + + drop EVI remnants + +commit a88c6b66465c039bf92a54a496516fee4d900784 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri Apr 18 17:47:16 2008 +0300 + + glcore: drop GLcore (files) + +commit dd7a53f8f21e41e1ab43f7e684ba586abc97ef7e +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri Apr 18 17:47:01 2008 +0300 + + glcore: drop GLcore (build system) + +commit 567d389d47dee233a973b101e04ce41c47a68f34 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri Apr 18 17:46:18 2008 +0300 + + glcore: build from mesa, dlopen from xorg + + * The GLcore interface is disposable + * GLcore is installed in DRI_DRIVER_INSTALL_DIR which is overloaded for + GLX_PROVIDER_INSTALL_DIR + +commit efb723e166e5fa89e90c7b400fb4c7979b1f50c0 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri Apr 18 17:45:53 2008 +0300 + + glcore: prepare for dynamic loading + + glcore gets linked with -ldl, -lpthread for s3tc and glapi + xserver needs + DLOPEN_LIBS - to dlopen the glcore dso + LD_EXPORT_SYMBOLS_FLAG - to export symbols for glcore to use + + the ld flag is added to kdrive only when GLX is enabled, the net overhead for + Xephyr is ~155KB, could be reduced with --dynamic-list. + +commit fbad87f2ae9f97fcb43546b0fa35f1100415dfec +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Apr 22 23:50:11 2008 +0200 + + autoconfig: don't call closedir() when opendir() failed + + If opendir() fails, return from matchDriverFromFiles() immediately. + Ubuntu bug 217647. + +commit 76381092e8f650ec7d1f058fa4c8a7348893f775 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 23 02:22:14 2008 -0700 + + XQuartz: Make sure QuartzAudioInit() gets run. + (cherry picked from commit bb3d034675b70e22e78df5554cab0ec2a3d913d0) + (cherry picked from commit 824b31c7f8144a67a320442abd3d854e99d2bfe2) + +commit 275cdc1c74b7e43ecd931d312469fecc8d998ed1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 23 16:16:15 2008 +0930 + + xfree86: pass correct value to mieqEnqueue (merge detritus I guess) + +commit c3659cb414ef05da8fa09009b2b82a3deeeb4f3a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 22 21:54:02 2008 +0930 + + dix: always send FocusIn events if mode is NotifyUngrab. + + In the case of a NotifyUngrab, the flag for the device may already be set but + we still need to send the FocusIn event. + +commit 00815b3e5223e822f306db45cd4884a22ac9f7ed +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Apr 21 14:34:39 2008 +0200 + + Don't set DRI2=yes if we can't find dri2proto or libdrm + +commit e77f65768efbf05cdf363a2f41f036f74eaa45de +Author: Ross Burton <ross@burtonini.com> +Date: Tue Apr 22 18:07:46 2008 +0100 + + Reuse the existing framebuffer mode in kdrive/fbdev + + When starting up kdrive/fbdev, if the current framebuffer mode is sensible use + that unless told otherwise. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit c4fd1121531b0cba1a3e90fa747871d784365c7e +Author: Ross Burton <ross@burtonini.com> +Date: Tue Apr 22 18:05:53 2008 +0100 + + Add mediumraw support to the linux kdrive driver + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 455383db95618a05ebdbeae78423e08065f0e14e +Author: Ross Burton <ross@burtonini.com> +Date: Tue Apr 22 18:04:31 2008 +0100 + + Enable the epson kdrive driver + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit 82b37d35af13a9f402755e167493ab256b664b9c +Author: Ross Burton <ross@burtonini.com> +Date: Tue Apr 22 16:38:14 2008 +0100 + + Add support for AVR32 + +commit 20a90bef8b4993f06cf76ad05e3d4c974e1614f6 +Author: Ross Burton <ross@burtonini.com> +Date: Tue Apr 22 16:37:02 2008 +0100 + + Add a default touchscreen path + + When enabling the touchscreen, open /dev/input/touchscreen0 if no path was + specified. + +commit b44e89f4683ffcfd75eaf39f1f37d7461db44689 +Author: Ross Burton <ross@burtonini.com> +Date: Tue Apr 22 16:28:39 2008 +0100 + + Update to tslib 1.0 + + Update the pkgconfig checks to tslib 1.0, and fix the LIBS definitions. + +commit 3848422d2354b7a5302fda92b05b0d728190e050 +Author: Ross Burton <ross@burtonini.com> +Date: Tue Apr 22 16:25:23 2008 +0100 + + Fix build when XKB is disabled. + +commit 744d0cfda74f8283801cc2d6c5eda48402455bc3 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Apr 21 22:06:38 2008 -0700 + + add missing DARWIN_GLX_LIBS in configure.ac + (cherry picked from commit a033c0b3dbb3b963261faa39f0236457cb00ff44) + +commit 8190ef87547b704848231bde10b1cdffc6442790 +Merge: 179a082 2ddbfd3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 22 18:04:05 2008 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + Xext/EVI.c + Xext/appgroup.c + Xext/cup.c + Xext/mitmisc.c + Xext/sampleEVI.c + dix/window.c + +commit 179a082c26f9e562492ee2e59e7f44f949f39f9c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 18 21:13:10 2008 +0930 + + Xext: route event through master if required (XTestFakeInput) + +commit fb784d99c521823339bf00b70b9824f735d88875 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 18 20:57:42 2008 +0930 + + mi: fix typo in comment. + +commit 8209fdbc7c7f2dd068b30ff184b5fbf00db78686 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 18 20:53:57 2008 +0930 + + Xext: Update sprite on fake input only for MDs and floating SDs. + +commit 2ddbfd345786aa39b6ccaed82a1ca5c145284ee3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 22 16:31:44 2008 +0930 + + xnest: re-enable XKB support. #10015 + + XKB was disabled in 08928afb0500d46b0caa0a1d1244dee2ed80e6a0, with the comment + "Disable XKB, as we can't yet use it". Seems like "yet" is over, running GNOME + and changing XKB settings seems to work in Xnest now. + + X.Org Bug 10015 <https://bugs.freedesktop.org/show_bug.cgi?id=10015> + +commit a8b8700c7345b89953c8b63cb5c347a95e6ab988 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 21 23:44:37 2008 -0700 + + XQuartz: Fixed cmd-tab to bring all windows forward. + (cherry picked from commit e48e2ce931228f4dfa36c39b8ec8c72a58025b1b) + +commit a368ab757edf36ed7bbda023673d28883ce11231 +Author: Dave Airlie <airlied@linux.ie> +Date: Tue Apr 22 15:13:57 2008 +1000 + + GLcore: make googleearth not crash the server on sw-rendering. + + I don't think this is the 100% correct answer as I get log spam saying + (EE) DoSwapInterval: cx = 0x98b8998, GLX screen = 0x96dd780 + (EE) AIGLX: cx->pGlxScreen->swapInterval == NULL + + but thats better than X exiting in my book. + +commit 449723510a1f9d024e23d9eb33795cac27f9443e +Author: Egbert Eich <eich@pdx.freedesktop.org> +Date: Tue Apr 22 13:30:03 2008 +0930 + + xkb: use the correct device instead of an uninitialised "dev". #15614 + + X.Org Bug 15614 <http://bugs.freedesktop.org/show_bug.cgi?id=15614> + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit ba87c25321c3378fd1ad0c55dcb0af0a6e82a540 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 21 20:03:08 2008 -0700 + + Make rootless use dixLookupClient rather than deprecated LookupClient. + (cherry picked from commit 582b5b01f9697b66489ea906a2ecb8bfc5915571) + +commit 8822110d7d6b684f373fc883aeb7cab9734e9ddb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 21 20:08:05 2008 -0700 + + Fixed dixLookupClient to work with client=NullClient as it did in the 1.3 branch + (cherry picked from commit e41ccc64702f856e5e09dfa652fe73c14b8a0225) + (cherry picked from commit ce5a5f93990647de85e535734ee6bb430ad591cb) + +commit 5ffb6a2fe8db5871eaf26b8535af1588c43f33d3 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Apr 21 19:55:54 2008 -0700 + + Nuke a call to deprecated LookupClient, and hopefully prevent a + null-pointer dereference, too! + (cherry picked from commit 3d28e9f953709914e18807bc74c241333671cb30) + +commit 590688131d89595bdc78ca562ee88df86c9012a6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 20 22:18:45 2008 -0700 + + XQuartz: Fixed quit dialog to be more conforming with HIG. + (cherry picked from commit 14c6b837bb03bd0956f90882f550847f13d0ca09) + +commit d20b3ac22d960fa44632cc4a14be079daa2d5a33 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 20 22:18:19 2008 -0700 + + .gitignore: Added Xquartz stuff + (cherry picked from commit 0a9a3bec2de8d1f442493e13cf9f039902a4928f) + +commit 570b0dca261920c9b01b4eb11fe9b9987b1c636a +Author: Ben Byer <bbyer@apple.com> +Date: Mon Apr 21 17:52:10 2008 -0700 + + Fix for pointer-offset issue when using a multi-display environment on X11.app. + (cherry picked from commit 9a7e14286ced55c5e2a4512e2629e03836443009) + +commit 3f081b4de55e1378728a24d069bf06575ffca2d8 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Apr 21 11:22:07 2008 +0200 + + EXA: Set pixmap->accel_blocked on the screen pixmap, too. + +commit 26c1801a27b81fdd988d5bd210ba0e76ecc274ae +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Apr 21 11:03:27 2008 +0200 + + EXA: Update sys_pitch/fb_pitch in exaModifyPixmapHeader. + + exaModifyPixmapHeader now also only evaluates arguments that have a + meaningful value. + +commit 4fa89fbe18c929e0d36305ab47e7e17841309ffd +Author: Jordan Crouse <jordan.crouse@amd.com> +Date: Mon Apr 21 12:09:00 2008 -0600 + + xf86: Change AutoConfig driver for PCI ID 022:2091 to 'geode' + +commit 6c95fae1e9d6b0eb64bc78eced05a6e9f5faf02e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Apr 21 10:45:11 2008 +0200 + + EXA: Offscreen memory eviction improvements. + + * Make sure available areas are considered to have no eviction cost. This seems + to help for https://bugs.freedesktop.org/show_bug.cgi?id=15513 but I'm afraid + that may just be coincidence. + * Only calculate eviction cost of each area once for each eviction pass. + Safeguard against potential (though unlikely) division by zero. + * Cosmetic enhancements: Name eviction cost related variables 'cost' instead of + 'score' to emphasize that smaller values are better, update Doxygen file + comment to the way eviction works now. + +commit 40c6be1408a1f0b236fdb28af27ae18aea0d578f +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Apr 20 20:36:44 2008 +0200 + + Minor xorg.conf manpage fixups + + Use __libmansuffix__ instead of __oslibmansuffix__ which isn't getting + replaced, and rewrap some text to get __xservername__ replaced in the + description of Option "Accel" (cpp doesn't like the preceding quote). + +commit 4bcfed2f9cf5dbf682d3bc98873ba97c4efdff44 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 20 08:35:42 2008 -0700 + + Revert "Removed XWin DDX" + + This reverts commit 6550078b0925f754e3eec3bbce94dbfe5de8c419. + + Doctor, I'm starting to get a pulse... + +commit 14396fdebac1868df17559220ed7aaa34c34251e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 19 23:31:05 2008 -0700 + + XQuartz: Cleanup turning off COMPOSITE + (cherry picked from commit 8f920fca6f9149185649d52569d33bf81b6c6857) + +commit d13828797fe22856b07e08a55d2b9375902194bf +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 18 20:38:31 2008 -0700 + + XQuartz: Cleaned up some casting to get rid of compiler warnings + (cherry picked from commit 6f1c85b96550adf0bc34efb6ca649b87bcc1b18c) + +commit 6550078b0925f754e3eec3bbce94dbfe5de8c419 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 19 09:29:46 2008 -0700 + + Removed XWin DDX + +commit 587c010a1cd733fded4d49dc339df0634bda8be6 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 19 09:27:21 2008 -0700 + + Rootless: Kill off rlAccel + +commit d3d00d92586c3e1cbc88087c930b65c8b3832fcc +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Sat Apr 19 12:54:40 2008 +0200 + + Removed fbpseudocolor.h from sdk_HEADERS. + +commit 5bdc4198795ffd011bb07cffe3817e4cded87f60 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Apr 19 04:06:19 2008 -0400 + + Remove fbpseudocolor + + "An experimental pseudocolor emulation layer. Not fully completed, + currently only works for 16bpp." That was almost four years ago. + It still doesn't work, only one driver even attempts to use it, it + contains an ad-hoc implementation of damage, and should really be + done up in Composite now anyway. + +commit 60ff56050b64183cb6e58f54223c8a3ddc2e704b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 18 22:17:53 2008 -0700 + + Revert "Optimize dixLookupPrivate for repeated lookups of the same private." + + The patch was wildly unsafe for SIGIO, and made everything full of + crashy crashy fail. + + This reverts commit 9b30cc524867a0ad3d0d2227e167f4284830ab4e. + +commit ed9dabb47c467dbf49836b631d5d6bda4b0d98b0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 18 20:30:43 2008 -0700 + + Last of the spam... I promise... + (cherry picked from commit 45ebee4f729b148a75e925a4863b4eb850c88f8e) + +commit 49f2bb4681fdee9e45f952ef0ac9c34a090117de +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 18 20:25:38 2008 -0700 + + XQuartz: More sanitization of the namespace + (cherry picked from commit bc50d41f9d1aec04f0de0478cbd5036f1fe9b81e) + +commit c2f0d020b5d7950267aa3df391a7a72b9ae5883b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 18 20:10:57 2008 -0700 + + XQuartz: Removed unneccessary include + (cherry picked from commit 45ff59e69eddfcceafced31cf6e73e381d0f6914) + +commit 5183fea6d38de4bcf657e9c2a983dfd81a2a223f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 18 20:06:17 2008 -0700 + + XQuartz: Handled sanitization of namespace better + (cherry picked from commit 8cb23d672177da919257c885804cecd18cf9af88) + +commit edd3fb784bad893550ee270e0a09f22f99783cf5 +Author: Ben Byer <bbyer@bbyer.local> +Date: Fri Apr 18 17:17:01 2008 -0700 + + random flailing + (cherry picked from commit 7fb9b2dc615a3bd1a3c087438af7a8b88265cfaa) + +commit a7503615a6893749d512f75d37646273f31b9dbf +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 18 19:56:41 2008 -0400 + + Death to TOG-CUP. + + If you still care about 8bpp visuals that much, fix Composite to provide + synthetic visuals. + +commit 4da9ec16e9725ebb9817b49e33ea1035b6aff09a +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 18 19:54:09 2008 -0400 + + Remove appgroup mentions from configure.ac + +commit 25827fde68d3bb02a2b7e05fae53a1d97edf1f76 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Apr 18 15:32:04 2008 -0700 + + Nuke the MIT-SUNDRY-NONSTANDARD extension. + + This extension provided bug-compatibility with pre-X11R6, but has been + stubbed out in our server since 2006 to return BadRequest when you actually + asked for it. + +commit 13adef8a17d8815f4db2aaac30ae04438e125343 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 18 19:01:06 2008 -0400 + + Finish deleting EVI + +commit eafaf40fb3368ca7e4cf48336fdb7a6c9f536bfa +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 18 18:50:05 2008 -0400 + + Death to APPGROUP. + +commit f6617b4127125516583f321c961d70f762f728be +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 18 18:28:01 2008 -0400 + + Death to Extended Visual Information. + +commit 3b93631e59ca4d312d318eac4015e0a79ad6351f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 18 11:31:54 2008 +0930 + + dix: remove coreOnly check. Core pointer must generate XI events now. + + This flag was only used when an event is generated by Warp[Device]Pointer. + Since the VCP now happily generates core events, this flag is obsolete. + +commit e0eaf8e5e3fa7a11c087851dff93f50f6907c4a5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 18 10:57:47 2008 +0930 + + Xext: Let XTestFakeInput update the sprite for XI events. + + Since XI devices can have their own sprite now, we need to update the sprite + coordinates too when processing an XI event. + Note: This doesn't deal with the device hierarchy correctly yet. + +commit cb0168b4ac5c59cdce6f0a6d89ddd9f30d93b5f3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 18 09:48:06 2008 +0930 + + Xext: xtest.c: death to tabs+spaces indendation, remove #define XINPUT + +commit eebdf69e9a52e071e0467a1f99de135df4d1eabc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 18 09:22:37 2008 +0930 + + xkb: mixing up src and dst in a memcpy is suboptimal. + +commit aa6687322de85a2d1025a3ae851fb290a089b2d3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 15 23:03:06 2008 +0930 + + Xi: when copying button classes, copy xkb_acts as well. + + This should be the last piece in the quest for the class copy. + +commit c14f5dc237a31b13d98ae2d0d6143bd91083cf13 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 20:21:45 2008 -0700 + + XQuartz: Forgot to commit xprEvent.[hc] ... + (cherry picked from commit 70e543baf2508d636f01b2b7e8cb05172195b68c) + +commit 22bb7608a025a4ec0f442637810b20e2cb0b0820 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 17:04:08 2008 -0700 + + Added XKB support for Xquartz + (cherry picked from commit 56dc1215202746590dbe8758411f47e8876e1317) + +commit 652479dba38470273313dc46f17e3bcb1bc5e383 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 15:49:13 2008 -0700 + + XQuartz: Moved some rootless-specific cruft into xpr + (cherry picked from commit 31625cc03b58317120c2ac7877e227e2322e1de8) + +commit 2a1ba20af98c0e9a6a7f1a50d32058dcc9759c21 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 15:23:00 2008 -0700 + + XQuartz: Use a mutex to ensure we only have one thread calling mieqEnqueue at a time. + (cherry picked from commit 7b087c965bce9f440ab5233d6383aa4a7de969b8) + +commit 55f80d754525398378de1ef28aa562bd29ee750f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 14:21:31 2008 -0700 + + XQuartz: A little more debugging output from threadSafety + (cherry picked from commit f6fbdbf838ab77c3a4635f0b2356b1bbb060ff5b) + +commit 0d61f6fca1efeb4f68488e323d1c0508b9b7a711 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 13:17:58 2008 -0700 + + XQuartz: Fixed some missing prototypes + (cherry picked from commit 95056afc562cfe58b116f5c36e4624018e79ff4a) + +commit dbd4c031565d269fef90af23386ff045ec78688c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 13:12:56 2008 -0700 + + XQuartz: Added framework for asserting which thread we're in. + (cherry picked from commit 00beb982510e7a82d77e1f1d43e77c84d7bf74c2) + +commit fa0645b452cbebd1800a63f1c95cb77fef4ab211 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 12:27:12 2008 -0700 + + removed Xquartz debugging code that leaked into master. Our Bad. + +commit a3d40f0549f6c6f49fffc286bcdaad758fa92367 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 11:56:48 2008 -0700 + + XQuartz: Include version info for CrashReporter + (cherry picked from commit b4992755c3e29086c5939683c38fa8fd7d2e6754) + +commit 6d11712c2a35b243c19eea3b26622d18c2446dbe +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 11:06:54 2008 -0700 + + XQuartz: Use strerror(errno)... cause I like text more than grepping header files + (cherry picked from commit 1b4c37d8f9b517fbec5b94ed4e4a5e86a31472a5) + +commit dcf4f917cc9488de72711255bbb030d9aa8f8bfb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 11:03:31 2008 -0700 + + merged darwinKeyboard.[ch] into quartzKeyboard + (cherry picked from commit 57bb07320908b74facea0a97822bb19ed6f960a9) + +commit 582397cd024c68df65ab9dececd6d2c40a5a261b +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 02:31:53 2008 -0700 + + oops, missed a spot + (cherry picked from commit 19872a6aeb8ee9cb0e33e4b4ffd794c9dbefe0cf) + +commit 0bd1c369cce05d5a4da5e3fd7033aea8c68460ec +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 02:30:36 2008 -0700 + + formatting cleanup + (cherry picked from commit 769acd29348abf9e5b0bebfca6ae695d345f3077) + +commit 700e14c22616b209867e4ea4d1811e53ca996164 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 02:21:33 2008 -0700 + + delete debugging spew + (cherry picked from commit f04f3af86a91d0cafbc86a0d71aeb0599d685f07) + +commit a440eebf2541ae0bb06bf65281b5facff2f04e00 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 02:21:11 2008 -0700 + + add support for horizontal scrolling (buttons 6 and 7) + (cherry picked from commit f525a4a432ebd0545ad1dd0a7ad84ad3e47e8b61) + +commit 612e901ef6aa3edc54b39e55e8040cda0e5ab7b6 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 01:32:56 2008 -0700 + + enable keyboard map debugging -- it's going to x11-debug.txt, anyway ... so no harm + (cherry picked from commit ab662c736e0654e2b4347091f0d9e87f26034216) + +commit 5bdfbfbedcbd9ff61cbb0b678cbf7ce7889a5826 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 01:29:46 2008 -0700 + + darwinKeyboard: refactor slightly so that we're not cutting and pasting code from dix, kthx + (cherry picked from commit a8a090b853e811b9843a5732572cbbe542224f32) + +commit 58e42683c9e998f6b8a55d5653b9caec7b6acf96 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Apr 17 00:19:56 2008 -0700 + + hack to Xquartz to prevent xmodmap from wiping out our valid modmap, per daniels + (cherry picked from commit cab54466a61281cfafc12825017c23d720cd75f4) + +commit cd3470a0cffbd6b8cec7c44227b33307c9e227ae +Author: Ben Byer <bbyer@apple.com> +Date: Wed Apr 16 22:48:54 2008 -0700 + + kludge: miEqEnqueue wants a device, even if we're passing custom messages, + so give it one + (cherry picked from commit a494ff04b2a14470eaf5a23c7cf6dbdea182c6d1) + +commit 966ae1781f3ca563e15a9a1b8cab6fab94e07fe9 +Author: Drew Parsons <dparsons@debian.org> +Date: Mon Mar 10 22:54:49 2008 +1100 + + Create dix/libXpdix.la for Xprint-specific build of libdix.la + + (cherry picked from commit 4e2c6dbabdbbaaca213fd08edd422de15d0900cc) + + required because of commit 7c0709a736c0f3aa011de67dd2c2962585ab146e, + which made requestingClient in dix specific to Xprint only. + Add to XPRINT_LIBS in hw/xprint/Makefile.am in front of + $(XSERVER_LIBS) to override definitions in libdix.la for standard xservers. + + Follows 571206832d454771e3c638c7515767958365c19c (providing -DXPRINT + to xprint subdirs). + + Note it may be possible to restructure the code so that + requestingClient is stored elsewhere than in dix. See discussions + following http://lists.freedesktop.org/archives/xorg/2008-March/033844.html + If this is done it may be possible to revert this commit (if not 571206...). + +commit 571206832d454771e3c638c7515767958365c19c +Author: Drew Parsons <dparsons@debian.org> +Date: Mon Mar 10 13:48:05 2008 +1100 + + Define XPRINT in XPRINT_CFLAGS (configure.ac) + + -DXPRINT had only been set for Xprt in hw/xprint/Makefile.am + After commit 7c0709a736c0f3aa011de67dd2c2962585ab146e it is also + required for ps/PsArea.c and PsFonts.c to ensure ‘requestingClient’ is + defined, so make it a global Xprint definition in configure.ac. + (cherry picked from commit 28a6719fd486d9a9cecad0b057d9ea7c59c66055) + +commit 9b30cc524867a0ad3d0d2227e167f4284830ab4e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Apr 17 16:10:10 2008 +0200 + + Optimize dixLookupPrivate for repeated lookups of the same private. + + This gives me a 20% speedup for EXA text rendering, though I still seem to burn + quite a lot of cycles in here... + +commit 886af8f3849a0fcfc6b63a9695107ce26d7a6955 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Wed Apr 16 16:20:19 2008 +0200 + + EXA: Avoid some fallbacks in exaCopyNtoN. + + In some cases we can still do the copying in hardware even if the + dimensions of the pixmaps are out of range. This is true when the boxes + that we're to copy are all in the card's range. + +commit dc10f0a0e243b7ba38d02a4e2c43027563aead7c +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Apr 17 11:13:47 2008 +0200 + + Fix composite on !darwin + + 2ffdb0eb641ab6949783b4eb574f77e7486ac929 changes the default value of + COMPOSITE to 'auto', but doesn't set it back to 'yes' as appropriate. + +commit 8716d081fdf61ddf956c30aff7697c70507911fd +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 3 16:29:43 2008 -0700 + + XQuartz: Don't enable rootless accelerated functionality... crashy... + (cherry picked from commit cdb4c291d8c10c3a9ea59d8e79275a30d2ea82b4) + +commit 2ffdb0eb641ab6949783b4eb574f77e7486ac929 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 16 21:54:00 2008 -0700 + + XQuartz: Don't use composite. + (cherry picked from commit 6d3d344b5b95b6dc4166556d03cfd8c9576dc3f0) + +commit 757a1bf3a3d72e17eeb362f825124c4ba40cc080 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 16 21:48:52 2008 -0700 + + Xquartz: Don't need to link against rlAccel since we don't use it + (cherry picked from commit 180ec128adef11a9a90cea1189dc31ac5de8359f) + +commit ab8c6a3c5acb2a3bf288f1d6339b09a125bbb930 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Apr 14 19:12:00 2008 -0700 + + Update ac_define_dir macro in acinclude.m4 to 2008-04-12 version + +commit b907258ebe62642af088f6e2970a45a68cf4be19 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 16 12:07:51 2008 -0700 + + Update dolt from upstream, fixing fallback to libtool. + +commit e1e189f8538f2b77ae0cf0d846d3899061e4c4b7 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Apr 15 14:49:51 2008 -0700 + + Include pciaccess in the xorg-server.pc Requires line. + + This pulls in the include path for pciaccess.h, which is needed by, among other + things, xf86.h. + +commit 9e7ced94a5e3a14762fe934aa69d91f0831cf5ca +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Apr 15 12:06:07 2008 -0700 + + XQuartz: Removed a call to RootlessReorderWindow from the Carbon thread + (cherry picked from commit cb27d5ca8230707b276763c0ec20e586203144c9) + +commit 51c8fd69ec9292f5e18cdc7f60e1716fbd6ae61a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 15 15:09:40 2008 +0930 + + dix: free the unused device classes when closing a device. + + This also requires to NULL-ify all pointers while we're actually using them, + otherwise we'd try to free them twice. + +commit 48d33ab9b672b3b3ca308000cdbd573d1e368ff9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 15 14:29:53 2008 +0930 + + dix: float attached devices _before_ disabling the master. + + It also helps if we're actually providing the correct argument to + AttachDevice... + +commit 4cf9c5909d926ec322ed1c7df47f95bd872bb607 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 15 13:56:11 2008 +0930 + + Xi: fix up button count. + + Some leftover code from the previously used alloc/free device classes left us + with a incorrect button count. So a button release didn't come through if + a different pointer was moved after the button press. + +commit 35982bc109d424c464551ab22ec90af69908c884 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Apr 11 11:09:13 2008 -0400 + + Make DRI2 a serverlayout/serverflags option. + + Add xf86DRI2Enabled() to export the value of the setting. + +commit f133d85778462134f366389bde7673bff7845fa8 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Apr 14 11:43:51 2008 +0200 + + EXA: Update pixmaps' accel_blocked field in ModifyPixmapHeader. + +commit bb8868540f017b121d698da45e552ffb55a57cea +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Apr 14 09:58:49 2008 +0200 + + EXA: Teach exaCompositeFallbackPictDesc() about x8r8g8b8. + +commit 1a9d7205cd5640eb65f019336097d86301942ea7 +Merge: 90f491c 6866e84 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 14 16:25:58 2008 +0930 + + Merge whot@wombat:~/potoroo/xserver into mpx + +commit 3e12c5bb67f3049156475d5cbf4e899aaded76bb +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Apr 14 11:45:12 2008 +1000 + + glx: silly nitpick... + + even though i and j are the same, we use i to derefence visuals everywhere else + +commit 97565c0f394f16d042c614695c8b7b4ac354f2a3 +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Apr 14 11:40:38 2008 +1000 + + glcore: make visualRating GLX_NONE - note GLX_NONE is not == 0 + + Finally glxinfo returns the set of 3 visuals and glxgears works again for me on + sw rendering + +commit c61087c82784633e522bd9392172b43656bdf45e +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Apr 14 10:47:28 2008 +1000 + + glcore: zero fbconfigs before filling them in. + + I'm not sure this the complete proper solution, perhaps it should explicitly fill + in ever field. + + This at least makes glxinfo on glcore return sensible information, it doesn't make + gears work yet though. + +commit 6866e84e3c607d00d88eab2249c2619d6707c1a4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 19:57:51 2008 +0930 + + Xi: store feedback classes in devProviates system as well. + + This is a follow-up to cb48d880856fd196ab8e8de5eb1f14944a1b4fff. + +commit cb48d880856fd196ab8e8de5eb1f14944a1b4fff +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 19:48:28 2008 +0930 + + Xi: store unused classes in devPrivates. + + Rather than freeing/allocing classes each time the device capabilities need to + swap, store them in the devPrivates system. + When a class is unused, it is pushed into the devPrivates, and later recovered + when needed again. This saves us a lot of memory allocations/frees, admittedly + on the cost of some memory. + +commit fde3c836628b6cdec3e5d107d6b1b99bc8b86912 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 17:08:51 2008 +0930 + + Xi: copy the KeySyms.map over from the source. + +commit 3c4c9938f31755c5a59995fdcfa138c99db76bbf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 16:52:14 2008 +0930 + + Xi: Fix pointer handling in KeyClassRec copy. + + We don't free the class anymore, so just store the previous pointers, do the + memcpy from the SD and then restore the pointers. + Plugs a memleak too, before xkbInfo was never freed. + +commit 755f9e5d7898056cf3bead69ce25a10e23995582 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 16:49:25 2008 +0930 + + dix: Ignore focus for passive grabs if the event is a pointer event. + +commit 6faf5b97b92953c331d6540ceb18fd0a77197fea +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 15:42:33 2008 +0930 + + Xi: fix up modifierKeyMap copying. + + Setting it to NULL isn't correct either. The correct behaviour is to realloc + it to the size necessary (or newly alloc it/free it). Otherwise we have a + memleak. + +commit 3106ba1116e3b9d893f66a93e4a91cc61e23226a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 11:48:06 2008 +0930 + + xkb: two fixes to avoid server crashes. + + - map can be NULL in some cases, so don't try to dereference it. + - don't default to inputInfo.keyboard + + This is firefighting, I presume something in the class copy may have gone + wrong to get a NULL map in the first instance? + +commit 415c6df0da1197d487456b4c48e2e28e7ded8b8e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 11:46:44 2008 +0930 + + Xi: copy feedback classes first, in some cases xkb relies on kbdfeed. + + XkbInitIndicatorMap (in XkbInitDevice) calls XkbFindSrvLedInfo. This accesses + the devices kbdfeed struct, which is all nice and dandy if it is NULL. When + copying the device classes however, kbdfeed may not be NULL and thus + XkbFindSrvLedInfo goes on its merry way to do whatever it does. + + By copying kbdfeed first, we avoid XkbFSLI to reference the "old" kbdfeed + struct of the previous SD. + +commit 961f6660902163e99727c2dcc1a039f32b083859 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 09:31:16 2008 +0930 + + Xi: modifierKeyMap needs to be set to NULL when copying classes. + + Otherwise we have a double reference to the same memory area. + +commit bf6679cba40a936d46008c886d204ed521a4971a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 08:28:07 2008 +0930 + + Xi: copy the XkbSrvLedInfo too when copying device classes. + +commit 4219e94c2f7d431be433eceddfe79760a1ee31a1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Apr 13 08:27:31 2008 +0930 + + xkb: Add XkbCopySrvLedInfo, deep-copies a XkbSrvLedInfoRec. + +commit 1fa4de80fcfc697b5e5879cc351fb3e9dbf6acbe +Author: Matt Turner <mattst88@gmail.com> +Date: Sat Apr 12 20:39:18 2008 +0200 + + Check for __x86_64__ when we check for __amd64__ + + It seems Intel C Compiler neglects to define __amd64__, __amd64, or + amd64, but *does* define __x86_64__. + +commit b1f3f42840ec01db417345a0740b59ad5e4471cb +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 11 17:49:51 2008 -0700 + + Xquartz: Added applicationShouldHandleReopen:hasVisibleWindows to handle dock icon clicking + (cherry picked from commit 55d9973b053f25bb95b26e00351dc5531caf5b04) + +commit eabcfce0a68d504d11be9479f09e66f574dd2f21 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 11 09:51:26 2008 -0400 + + Stop building mfb/afb/xf1bpp by default. + +commit 0dab6fa3582b70ccd0f01459902415c28dbc81ff +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 11 09:47:51 2008 -0400 + + So long, and thanks for all the cfb. + +commit 059b4876e6350aa1110648788cdfbb3f45b4d66d +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 11 09:46:48 2008 -0400 + + Add doltcompile to .gitignore + +commit 6d22a9615a0e6ab3d00b0bcb22ff001b6ece02ae +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Feb 22 11:01:51 2008 +1030 + + dix: Call DeleteInputDeviceRequest from CloseDownDevices (#14418) + + The DDX (xfree86 anyway) maintains its own device list in addition to the one + in the DIX. CloseDevice will only remove it from the DIX, not the DDX. If the + server then restarts (last client disconnects), the DDX devices are still + there, will be re-initialised, then the hal devices come in and are added too. + This repeats until we run out of device ids. + + This also requires us to strdup() the default pointer/keyboard in + checkCoreInputDevices. + + X.Org Bug 14418 <http://bugs.freedesktop.org/show_bug.cgi?id=14418> + +commit 90f491cf8eb869f27c4278b26c1bb84432b12d63 +Merge: cbe01b3 b4380d8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 11 08:29:52 2008 +0930 + + Merge whot@wombat:~/potoroo/xserver into mpx + +commit 3c337e18b933881e22b0d03312511f1d23a8640b +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Thu Apr 10 21:36:19 2008 +0200 + + Fixed configure.ac for autoconf 2.62. + +commit 13dcde6bf994fae09c67c3edce9de42df61ef043 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Apr 10 11:08:49 2008 -0700 + + Fix dolt to error out on compile error, and not print errors on race to mkdir. + + Both of these changes have been submitted upstream. + +commit a7e3ad1c6b455bda7c4abb352a20845d1d4574a0 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Apr 10 10:33:11 2008 -0700 + + Remove NDEBUG (assert() disable) define from the X Server. + + A few pieces of code were abusing this define for other purposes, which are + converted to #ifndef DEBUG instead. There should be no ABI consequences + to this change. + + The rationale is that having the define in xorg-server.h also disables + assert() drivers, which is unexpected, and also difficult to avoid since + xorg-server.h is included in their config.h, and you can't put a #undef in + config.h. As for removing it from the server instead of moving it to an + internal header, we probably shouldn't have unnecessary assert()s in + critical server paths anyway, and if we do we could #define NDEBUG in the + specific cases needed. + +commit b4380d8030927c940ddaea83c4cf24e0b9eb7b96 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 19:25:43 2008 +0930 + + dix: don't free MDs classes on init. + + The device classes aren't deleted anymore on a class change, so there's no + need to store the MD's original classes. We should however restore the MD to + sane defaults when disconnecting the last device, consider this as TODO item. + +commit 04dff74ffdf727015e3721aae4ea13acc498cd1c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 19:22:59 2008 +0930 + + dix: Rework Enter/Leave semaphore system. + + Instead of a simple counter, use bits to keep track of which device is where + etc. When device enters a window (or sets focus), the bit matching the device + is set, when it leaves again, it is unset. If there are 0 bits set, then + Leave/Enter/Focus events may be sent to the client. + + Same theory as before, but this should get around the insanity with + Grab/Ungrab special cases. Those cases are basically untested though. + +commit a88386ee277d136caaaeec305f8753f23f9b6274 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 14:36:57 2008 +0930 + + Xi: only DeliverFocusedEvents if the event is not a pointer event. + + A pointer device may have a focus class, but even if so, pointer events must + be delivered to the sprite window, not the focus window. + +commit 48249425275cc90242497aee9968e5f1ffc86698 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 14:36:10 2008 +0930 + + Xi: dont copy FocusClassRec if the master already has one. + + Blindly copying will override the focus setting of the master. If there's XI + applications running, they may set the SD focus, while leaving the + MD's focus as it was. In this case, after a class swap we still want to get + the MD's events to the same window as before. + +commit bce6091c6b04ff2db704ae4f161179d21dcbec59 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 09:59:45 2008 +0930 + + dix: Extend IsKeyboardDevice() to not include pointer devices. + + If a pointer devices has key classes as well, don't register it as a keyboard + device. Let's see how much that change will break. + +commit cc7dab2d04da4ca164eeec1a3296df1706585466 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 09:58:50 2008 +0930 + + dix: Dont deliver grabbed pointer events to a focus window. + + If an pointer event is being processed during a device grab, don't deliver it + to the focus window, even if the device has a focus class. Reason being that + some pointers may have a focus class, thus killing drag-and-drop. + +commit df2545b98d888924209cb889a68737c15f1aa209 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 08:50:43 2008 +0930 + + xfree86: Sanity check before retrieving the paired device. + + Some pointer devices send key events [1], blindly getting the paired device + crashes the server. So let's check if the device is a pointer before we try to + get the paired device. + + [1] The MS Wireless Optical Desktop 2000's multimedia keys are sent through + the pointer device, not through the keyboard device. + +commit 5a4c6621aaf4e886f2c3b633e837ba359fedf921 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 08:29:05 2008 +0930 + + Xi: some extra checks for validity of kbd and mouse. + + Floating SDs are paired with themselves, so the paired device may not be a + proper keyboard or mouse. Put some extra checks in to avoid dereferencing a + nullpointer later. + +commit 8e0a6529303a52acc10905dd47c72a0d60979676 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 08:25:36 2008 +0930 + + dix: When floating, set sprite to NULL before calling InitializeSprite. + + InitializeSprite won't create a new one if it already exists, with the result + of overwriting the master's sprite. This master sprite is then assigned to the + floating slave, and freed when the slave is reattached later. + Setting the sprite to NULL forces InitializeSprite to alloc a new one, and + this one can be freed without further repercussions. + +commit e7211eb0b3d10323dab681bcb18580405ea18ab2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 10 08:08:54 2008 +0930 + + Xi: When attaching, check for ptr -> ptr and keybd -> keybd. + + Some pointer devices have key classes (e.g. MS Optical Desktop 2000). The + previous test was performed as Error if ptr -> keybd or keybd -> ptr. This + doesnt work with such devices. New test is Succeed if ptr->ptr or + keybd->keybd. + +commit 7909ebe7f163716520f843fae11ac7bdeffcb57c +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 9 10:43:25 2008 -0700 + + dolt: add FreeBSD support (this and ppc have been submitted upstream). + +commit b4842d8dc3b1619033c5c123c8adc6e164098dc3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Apr 9 16:17:35 2008 +0200 + + dolt works on powerpc Linux. + +commit 0d1746995d91b55e40f233f0c38b56bafe896d38 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Apr 9 13:37:59 2008 +0200 + + Fix off-by-one error in ProcXResQueryClients(). + + Fixes memory corruption reported at + http://bugs.freedesktop.org/show_bug.cgi?id=14004 . + +commit 6d031cbdefd8072b61645955f01b470a3e6858c1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 9 14:36:26 2008 +0300 + + configure.ac: Do the dolt + + Use dolt instead of libtool whereever practical. See: + http://lists.debian.org/debian-devel/2008/04/msg00286.html + +commit b19027fbaea4c3a146926e862983e0e3411fff3d +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Apr 9 14:27:58 2008 +1000 + + quirk: add quirk for ACR 640x350 default mode is wrong + + RH #440186 + +commit 1f8188656a075dc7b1bb27a0795b5bd43610bbc8 +Author: Ben Byer <bbyer@apple.com> +Date: Tue Apr 8 20:37:25 2008 -0700 + + add missing dix-config include + (cherry picked from commit 126e9bc8c480b403dedc44c1e8c4fe1476340ed9) + +commit cbe01b3083eb65c9d4259b1071683febebf11600 +Merge: 5ffbcfe 389dae7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 9 10:46:46 2008 +0930 + + Merge whot@wombat:~/potoroo/xserver into mpx + +commit 3f51f493b6daf2464e6c2ba5a924219b88a9e57e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Apr 8 17:02:56 2008 -0700 + + XQuartz: Fix issue where clicking on an X11 window might send that event to an X11 window in another space. + (cherry picked from commit df21312c8b0e9ef0c809bfc57cdf64f27db0d8a7) + (cherry picked from commit 2d4194a8d124e7a9c7cd1b83635ba6957aa4ae1c) + +commit 389dae73cc0f3693f49807fd2de146c454ba9783 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 9 08:26:00 2008 +0930 + + Xi: If device "to" has a class but "from" doesn't, free the class in "to". + +commit 60c38d248c1a89392c2c6695c3802f4b54e4c00b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 9 07:46:53 2008 +0930 + + Xi: plug memory leak, free previous motion history before allocating new. + +commit ea05cf0813b2b7c8cd2151cb935820753ae7997a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 8 22:09:11 2008 +0930 + + Xi: check if source has a key class before copying. + +commit 08073862f8c4e1219b6459708ffd28e2bc35885f +Author: Hasso Tepper <hasso@estpak.ee> +Date: Tue Apr 8 13:00:38 2008 +0300 + + configure.ac: Fix monotonic test harder + + This was only introduced in a later version of POSIX, so define that + version to get it from more conformant systems. + +commit 5ffbcfec3d37d3b627a78acfa00dbafc5948df82 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Tue Apr 8 14:42:00 2008 +0930 + + dix: Ensure Proximity events don't kill the server. + + Add Prox events to the if-clauses with the other events + that are usually sent from the input devices. + Ensure that the event deliverers won't try to deliver + events of type '0' (some extended events doesn't have + an equivalent core-type) + + Small modification by Peter Hutterer. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 32e4a88ae613c7200d84d5621344b418b656346b +Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> +Date: Tue Apr 8 08:42:58 2008 +0930 + + xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit. + + XkbFinishDeviceInit is called once when the device is initialised, but also + when a class copy causes the key class of a device to change. In this case, + overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc + sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the + cows come home. + +commit 6271df6953bea462be7e9e01744e5dd46841e867 +Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> +Date: Tue Apr 8 08:42:58 2008 +0930 + + xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit. + + XkbFinishDeviceInit is called once when the device is initialised, but also + when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home. + +commit 726dcd9e4ebfb09c0685450dca6e9fae7e773814 +Author: Adam Tkac <atkac@redhat.com> +Date: Mon Apr 7 10:20:02 2008 -0400 + + Fix Xvfb input when building against current X sources. + +commit 0f87b41a432a6472a15ec0c9dee997e3bddbd0f2 +Author: Hasso Tepper <hasso@estpak.ee> +Date: Mon Apr 7 14:09:04 2008 +0300 + + configure.ac: DragonFly BSD support + + Add support for DragonFly BSD, which is just the same as FreeBSD for all + of these cases. + +commit 6b1a27023e48b661c4bb3b61181ac57608d8e448 +Author: Owen W. Taylor <otaylor@fishsoup.net> +Date: Thu Apr 3 14:50:05 2008 -0400 + + EXA: Fix TS origin computation when implementing RenderComposite with tiling. + +commit fd06e8f8c1d82a9d91931e8532bee0fd9c9ca9ab +Merge: b46a009 6c0cfe3 +Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> +Date: Mon Apr 7 07:56:41 2008 +0930 + + Merge branch 'master' into dcdc_rework + + Conflicts: + + Xext/xevie.c + dix/dispatch.c + +commit 539bf3c2836727e7560c64144071b086f8ea32fe +Merge: 3ab33e7 6c0cfe3 +Author: Sascha Hlusiak <saschahlusiak@arcor.de> +Date: Mon Apr 7 00:10:16 2008 +0200 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3ab33e7cd46c25dfc461b2a1b13e138225a94524 +Author: Sascha Hlusiak <saschahlusiak@arcor.de> +Date: Sun Apr 6 23:23:47 2008 +0200 + + Remove stale code + + The jstk code for Joysticks is not used by any module, was never actually compiled and uses an API + that is deprecated these days. + + No reason to keep it. + +commit b46a00918691cbd5ca80b6d3acae7614f93e073b +Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> +Date: Sun Apr 6 09:02:57 2008 +0930 + + dix: sprite may be NULL, don't dereference it then. + + In some rare cases (e.g. when the init fails) a device's sprite is NULL, + dereferencing it to xfree the spriteTrace is a bad idea then. + +commit 638a50552e3e2190eac9721deb72e7365bdd52e4 +Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> +Date: Sun Apr 6 08:36:21 2008 +0930 + + dix: remove debug error message about XI->core type conversion. + +commit 8f38feb3e464986dc523dabd3447ba13263a3a4a +Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> +Date: Sat Apr 5 20:37:09 2008 +1030 + + Xi: add comments for DeepCopyDeviceClasses, ChangeMasterDeviceClasses. + +commit 6c0cfe3d43b177c4cfaf7e228f32c655f9a98459 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Apr 4 19:01:40 2008 +0200 + + Fix the clock_gettime check for glibc-based non-Linux systems + + We need to define _POSIX_C_SOURCE on glibc, not just Linux, so add a new + test for the __GLIBC__ macro. + +commit cc7c045bae01d90d8f1b750080ba48a96e983c68 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Apr 4 12:58:12 2008 -0400 + + Fix PCI config space cycles from int10 emulator. + + The top bit of 0xCF8 is an enable bit, not part of the domain. Sending + cycles to domain 128 instead of domain 0 is rarely the right thing to do. + +commit d1de3dda8efe501d4192c8a99c34ab4265316c32 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Mar 17 14:22:39 2008 -0700 + + Fix clock_gettime presence detect on FreeBSD. + + For non-Linux, _POSIX_C_SOURCE and friends restrict symbols defined rather + than enabling defines of symbols. Additionally, CLOCK_MONOTONIC was + apparently added to the standard around 2000 anyway, not 1993. + +commit ec17900f52bbd25d07566834756e5c7e832e0463 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Apr 4 10:46:45 2008 -0400 + + Convert __DRIconfigs after we've made sure createNewScreen succeeded. + +commit 16a8ce75585ea360c39e0ffce4f7bb26a359b754 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Apr 3 16:44:32 2008 -0400 + + Only autoload RECORD if it was enabled. + +commit d0395a753079f291a78d9ab86810b5f84f237491 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 4 15:05:26 2008 +1030 + + Xi: realloc to->valuator instead of allocing it blindly. + +commit 502689847b86be5619da7134646d55a1ac322a2c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 4 15:01:53 2008 +1030 + + Xi: ALLOC_COPY_CLASS_IF should only alloc if to->field doesn't exist. + +commit 035b1b6995e670ce5593e8aceb08f9ec812c70ea +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 4 15:00:06 2008 +1030 + + Xi: remove duplicate copying of kbdfeed and ptrfeed. + +commit 52fc7aed18930fc9e6bcfdd5dbc28ae559978288 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 4 14:47:23 2008 +1030 + + Xi: only alloc memory for feedback classes if it doesn't already exist. + +commit 4eb87c8693b57d9354832c76417797394656333e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 4 14:20:18 2008 +1030 + + Xi: don't free device classes before copying them. + + First commit in a series to come. + +commit f0915fb3c4a9712200882440a64d11dc595a02bb +Author: Dave Airlie <airlied@redhat.com> +Date: Fri Apr 4 09:29:51 2008 +1000 + + quirk: add quirk for ACER EDID + +commit 2e42b67b82db0f9128dd00e339b9dfdd9fe6d667 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 2 18:05:34 2008 -0700 + + XQuartz: Change reporting of space change to debug log rather than stderr + (cherry picked from commit ed15556a9fc4ebdb88f42961052fc8456082165f) + +commit c737d04c758e03e32f692a31ed2a665ccbafa931 +Author: Ben Byer <bbyer@apple.com> +Date: Tue Apr 1 00:40:46 2008 -0700 + + The AppKit thread should not be calling directly into the X server + functions to change state when the keyboard is reloaded; instead, + pass it as an event. + (cherry picked from commit 7e653f806ff5508aace059312156f319a9ed4479) + +commit 15b0084f1ab23042190d8beeb3f088b92dee5a10 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 23:31:25 2008 -0700 + + formatting cleanup for X11Application.m (no code changes) + (cherry picked from commit eb083d3f68f459d90417558da1ed00729b749950) + +commit e9e2d88436597875f102085d216dc0a8fce1450a +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 22:55:24 2008 -0700 + + moved and renamed QuartzMessageServerThread to + DarwinSendDDXEvent to make more clear what it actually does. + (cherry picked from commit bee2b377efc930e25017636e5112093a3a6549c7) + +commit c1be4e3379d8780dff20390939b657ca0973995a +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 21:04:37 2008 -0700 + + shovelling code around ... + (cherry picked from commit 2143182ba49195bbb2e9163ea6872fd68e7a4a85) + +commit 985c631b2e1f113039e6e620f030505435fd9815 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 20:18:58 2008 -0700 + + just a bit of juggling headers around -- we're preparing + to call our Xquartz-specific event handlers directly + as mieqHandlers + (cherry picked from commit 4aedba5aa727e22316e8ca456f7218bea9ee0313) + +commit 89f1d880e83e32b72d35c4dbd6795defa6efa847 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 19:47:28 2008 -0700 + + nuke DarwinEventQueue + (cherry picked from commit 1e0ec02202eeaffae480048b91bf02140ee29f8a) + +commit 8944b77ec0c18476a25ba3179bcc45b338be22b8 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 2 17:47:42 2008 -0700 + + continue with gutting darwinEvents.c + (cherry picked from commit c34fce7051b996633291dddc061b696ff737f3fb) + +commit aa6d12e93e8661da841192ef7c3aa7c6a7731c7f +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 2 17:46:59 2008 -0700 + + turns out we weren't actually using these files. oops + (cherry picked from commit bfec44d7b4baf0ad0aae55c8209bc60ac93c5b58) + +commit 6c5962e44730395f81cdb333322c9ad5242c32d4 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 18:15:18 2008 -0700 + + remove vestigal DarwinEQPointerPost etc + (cherry picked from commit a25704c423598d596fd7f2ed4290d4b860bd5d5f) + +commit c6f0d5d1e51326e5110d27918d834eb0096df7db +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 17:48:09 2008 -0700 + + gut darwinEQEnqueue, and make it just call mieqEnqueue (for the moment) + (cherry picked from commit a9e081a60ca227c0d96d4613075d97d6b762366a) + +commit 5b6c273eaa53d7b554d69c2b4865988068e73a26 +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 17:08:45 2008 -0700 + + add prototype for DarwinEventHandler + (cherry picked from commit 9a03ae33c4f9de830f15eabf3b994882ead7c000) + +commit 3713be8b470b1ac0fcb4f1e4c6b79c526b2196db +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 16:30:16 2008 -0700 + + add logging of current thread ID to DEBUG_LOG macro + (cherry picked from commit 5848510cc5a8091b30230ab920d904ca6b159480) + +commit 1400a51ae70d8e498d9ae3975f58ba7c1768ca6f +Author: Ben Byer <bbyer@apple.com> +Date: Mon Mar 31 16:24:01 2008 -0700 + + Begin to move all of our Xquartz DDX-specific event handlers + to miEQ, in preparation to remove the DDX-specific code entirely. + (cherry picked from commit 3f4447b95f73a82b3aa0f7b0d1640aba5fb0d1bc) + +commit 8746daa6732d9837f66d925f2fd74818ecbf8ba2 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed Apr 2 15:01:33 2008 -0700 + + XQuartz: Fixed missing close-paren in preference pane text. + (cherry picked from commit ea37e151dc6032d2a1a33cef809f2a7d507aae35) + +commit b5a0a865c3045cc08c33388320d4ec3ab7065efb +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Apr 2 19:21:41 2008 -0400 + + Pick up dri2proto from the standard proto header include path. + +commit 8cde0af3c57f0375ba8ba77af9fdf74b79d9496d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Apr 2 19:06:40 2008 -0400 + + Send the GLX_EXT_texture_from_pixmap attributes to the client. + +commit 7c20f65fea3dd3170cde89d7113d85f377671bfb +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Apr 2 18:00:06 2008 -0400 + + Add @XORG_CFLAGS@ to satisfy xf86* includes. + + Pointed out by Hasso Tepper. + +commit b13ab156894074fb38cc812738bc7aeeebd9614d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Apr 2 12:38:36 2008 -0400 + + dri2: Unbreak glcore visual setup. + +commit b31de6a59044f91f8230aa581c9ca8540289c168 +Author: Xiang, Haihao <haihao.xiang@intel.com> +Date: Wed Apr 2 16:29:30 2008 +1000 + + dri2: fix crasher if DRI2Connect fails + +commit ebc56aca8bdfec1918cac3c8380895dfddea48ce +Author: Hong Liu <hong.liu@intel.com> +Date: Wed Apr 2 10:43:19 2008 +0800 + + Bug #15160: quirk Proview AY765C + + prefer first detailed timing + +commit 9500033b9ecdfaf5a56a4355ffc94d74cb17ca17 +Author: Goneri Le Bouder <goneri@rulezlan.org> +Date: Tue Apr 1 20:19:40 2008 +0200 + + xfree86: don't crash in AutoConfig if the primary device is not pci + + Only call matchDriverFromFiles() if we found a pci device. + Debian bug#472823 (http://bugs.debian.org/472823). + +commit 37b1258f0a288a79ce6a3eef3559e17a67c4dd96 +Author: Thomas Jaeger <thjaeger@gmail.com> +Date: Tue Apr 1 15:27:06 2008 +0300 + + XKB: Fix processInputProc wrapping + + If input processing is frozen, only wrap realInputProc: don't smash + processInputProc as well. When input processing is thawed, pIP will be + rewrapped correctly. + + This supersedes the previous workaround in 50e80c9. + + Signed-off-by: Daniel Stone <daniel@fooishbar.org> + +commit a4d034941100c6ca3b7cc4e59952c2745b9306cc +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Fri Mar 28 20:47:44 2008 -0700 + + Add code to track 5 valuators for pointing device, in preparation + for supporting tablet input in Xquartz. + (cherry picked from commit 22c8849ea819eb70a14b2e06330b11b22aa63ebc) + +commit 6648867d8bd1e86458d2ade77a3ee4567c3d6a97 +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Fri Mar 28 18:27:02 2008 -0700 + + add debug statements so we can see if/when our Xinput stubs are getting called. + (cherry picked from commit 6e160bbe15dd2c2b8685847c06831cb6aebc6f74) + +commit 19ff23ab0e72a27d05ed4470f75a0934d6f6c1d1 +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Fri Mar 28 18:25:03 2008 -0700 + + Remove calls to InitValuatorAxisStruct -- these are now handled in dix by + InitValuatorDeviceClass. + Add InitProximityClassDeviceStruct call to prepare for tablet support. + (cherry picked from commit 1bd980a5b114f5320360943214f8f9f23b29c1e3) + +commit 9f56fc580646a519875b5a1452738d8c6e1fa860 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 31 17:34:07 2008 -0400 + + XSELinux: Add a request to get a client's context from a resource ID. + +commit c40e0b51f0d9ef5e1f30f233d7db1e6db9d6681b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Mar 26 19:28:09 2008 -0400 + + Implement DRI2 direct rendering and update AIGLX to DRI interface changes. + + Get rid of glcontextmodes.[ch] from build, rename __GlcontextModes to + __GLXcontext. Drop all #includes of glcontextmodes.h and glcore.h. + Drop the DRI context modes extension. + + Add protocol code to DRI2 module and load DRI2 extension by default. + +commit 8074676d2df8d577b443e3fa5e22d7c71c944bd1 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Mon Mar 31 21:24:59 2008 +0200 + + EXA: Optimize the eviction scanning loop in exaOffscreenAlloc. + + Reduce the cost of the inner loop, by keeping a set of pointers to the + first and the last areas in the series, subtracting the cost of the first + area from the score, and adding the cost of the last area while walking + the list. This commit also moves the scanning loop from exaOffscreenAlloc + into a separate function. + + Idea by Michel Dänzer. + +commit 93d876891dbba41b920a9a29a5de77f647f43928 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Mon Mar 31 21:15:50 2008 +0200 + + EXA: Improve the algorithm used for tracking offscreen pixmap use. + + Replace the current score keeping algorithm with a rolling counter that's + incremented in ExaOffscreenMarkUsed, with the previous value being stored + in the area. exaOffscreenAlloc uses the difference between the counter + value and the value in the area when deciding which area to evict. + It now also takes the size of the areas into account, and favors evicting + smaller areas. + + The credit for these ideas goes to Michel Dänzer. + +commit 7034484f0887ea0f8ab956515f2d9301ea5842ce +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 28 10:23:36 2008 +0200 + + gitignore: Add two more bits + + Get slightly better at ignoring vim swap files, and let people keep + local changes if they want to. + +commit b8ea9f2a25aad88aee77a68f8e20ac07276f0dab +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Mar 28 17:00:08 2008 -0700 + + XQuartz: Fixed names of enums to be more consistent + (cherry picked from commit c309a08806daf5d716a860c709e51eacad2c745a) + +commit bd28839eb866a9e6dc3ff80f13a67611da7eaf64 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Mar 28 17:02:02 2008 -0700 + + =?utf-8?q?XQuartz:=20Another=20Expos=C3=A9=20fix:=20F9=20doesn't=20raise=20all=20windows + + =20(cherry=20picked=20from=20commit=20b9cffa20debae73737c674bf75ab65db1bd74556)?= + MIME-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: 8bit + +commit 933ffcdf7d2eaaf7caabfe6f861f04bcb149918f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 28 17:53:55 2008 -0400 + + Compile fix. + +commit 9e8451d869a4032ddb7de6a62920a3a7b0b1acc1 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 3 17:38:53 2007 -0500 + + Add E-EDID segment selection. + +commit 0b4aef4d6df7a5525d381de035fbbf78c5fffeef +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 3 16:00:00 2007 -0500 + + Refactor DDC2 code to allow for proper segmented addressing. + +commit 88ece11d6c45c6f4b94f7fb2da64a46e879d7c27 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 3 15:47:39 2007 -0500 + + Start E-EDID support in the DDC module. + + Since there's no way to safely know how many blocks xf86DoEDID_DDC2 would + return, add a new xf86DoEEDID entrypoint to do that, and implement the + one in terms of the other. + +commit b5f98fcea2024c67e598947782913982072cf4fb +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Mar 28 14:01:34 2008 -0400 + + XSELinux: Add xorg.conf option for permissive/enforcing/disabled. + Patch by Joe Nall. + + The option goes in the "extmod" subsection. + TODO: Make it easier for extension modules to handle their own options. + +commit 415e49b940bba2d08870db410ebb47d2add5d836 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Mar 25 23:01:02 2008 -0700 + + XQuartz: Sanity-check the removal of the 256-color option + Fixes the 'one-time-preferences' bug in 2.2.0_rc1 + (cherry picked from commit 38cbd13490fc21724e8eef0ec7e1a20a9cc2e39d) + +commit c1d37efe9aae5f2895b3437418f7e4bb2eb3400f +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Tue Mar 25 19:25:00 2008 -0700 + + xquartz: copy in new stubs from Xi/stubs.c to replace our old + Xinput stubs. Hey, it's a start. + (cherry picked from commit 566412b4aece24ae6af8c7c835986b685aa456a2) + +commit c4a616a741e15865ce0ff98781c6f1dca4d62887 +Author: Ben Byer <bbyer@bushing.apple.com> +Date: Mon Mar 24 22:43:10 2008 -0700 + + prevent "fake mouse clicks" from generating spurious extra events + (cherry picked from commit bd85a24969427e41389688663ead2d4dd41c9999) + +commit c747030a49dd289e873e2b686cd129d840e55468 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Mar 27 15:18:39 2008 +1000 + + quirk: fix LPL monitors properly. + + no point having a h cm fix when we really want to copy the sizes from the + other place. + + RH BZ 435216 + +commit 9df915b84d45d39aed7557c98883b20a66da2e96 +Merge: 47eb658 333e712 +Author: Sascha Hlusiak <saschahlusiak@arcor.de> +Date: Tue Mar 25 17:50:50 2008 +0100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 333e7123dc484888d79c0f5aa3977bd72f1eb341 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 25 12:48:22 2008 -0400 + + Fix that last commit. + + I can apply patches, really. + +commit 47eb658e802775021e3efec109f95431cca188ca +Author: Sascha Hlusiak <saschahlusiak@arcor.de> +Date: Tue Mar 25 17:37:25 2008 +0100 + + Support to pass arbitrary options via HAL hotplugging + + Parse "input.x11_options" and pass every key/name pair to the driver. + Remove check for input.capabilities, because that's part of the fdi files. + + Thanks to Dustin Spicuzza <dustin@virtualroadside.com> for the patch. + +commit e7a364425547103a98acabfc67d16e1ae0c2967f +Author: Sascha Hlusiak <saschahlusiak@arcor.de> +Date: Tue Mar 25 12:32:33 2008 -0400 + + Fix getValuatorEvents to compute number of valuators correctly. + +commit f028e245a7932362656701c08fcfbfa8e8949077 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Feb 28 19:45:21 2008 -0500 + + Bug #10016: Implement WM_CLASS hints in Xephyr. + +commit 862ff9ac92037e13629329eb6ba50ff6bd2c5f71 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 24 13:37:42 2008 -0400 + + Bug #11510: Fix build without RECORD. + +commit 87bfd3bd96c714a1c252d42408b5a1a4ff9dab06 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 24 13:33:38 2008 -0400 + + Bug #11508: Fix build without XV. + +commit 536f2ff5382aaaace3b55481e15366bb15d87801 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 24 12:22:19 2008 -0400 + + Bug #13962: Re-arm the DPMS timer when re-enabling DPMS. + +commit 4217ba0cf0c9bbea3774760e836ab372acf3237c +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Mar 22 17:31:08 2008 +0100 + + xaa: use xf86ReturnOptValBool instead of xf86IsOptionSet + + The latter doesn't return the option's value, just whether it's present + in the configuration. + +commit 6b9d2bb1f7f87acbf275027af9c2982e91e5faed +Author: Julien Cristau <jcristau@debian.org> +Date: Sat Mar 22 17:28:48 2008 +0100 + + exa: use xf86ReturnOptValBool instead of xf86IsOptionSet + + The latter doesn't give you the option's value, it just tells you if + it's present in the configuration. So using Option "EXANoComposite" "false" + disabled composite acceleration. + +commit 63859473965f911515bc6e8d87b32a65ec41eb73 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Fri Mar 21 19:31:31 2008 -0700 + + XQuartz: Disable 256 color option and fullscreen option + (cherry picked from commit 7c1964338a33558d3f25e369dfca99e3ef9d10f9) + +commit 93daa3a3bf1a981757024847882ce92b6bdaae83 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Fri Mar 21 19:11:59 2008 -0700 + + Xquartz: Added separate preference tab for quartz-wm settings + Added FFM and "Focus on new window" options + (cherry picked from commit 6841d078b7cb0b0db3db948d26b4d5ec7747deb8) + +commit c49e11268322712c211f29d51d664d3f8a59b00b +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Fri Mar 21 18:07:38 2008 -0700 + + XQuartz: Initial framework for dealing with spaces on OS-X + (cherry picked from commit 9831324998f9d1f05ff944c58c5bf60dcae17355) + +commit 4c76607b699431183ee7e88fa7818cb7644a5a02 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Mon Mar 17 23:57:41 2008 -0700 + + Rootless: Removed safeAlphaXXXX() in favor of using fb/pixman + (cherry picked from commit f03202ad15457c98be7ca78cc59bac88cf5f1966) + +commit 87c64cfd6901083da5a9375d0bde65691d374b5b +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Fri Mar 14 17:31:54 2008 -0700 + + =?utf-8?q?Apple:=20Xserver=20half=20of=20the=20Expos=C3=A9=20bug-fix=20(requires=20updated=20libXplugin=20from=20Apple...=20coming=20with=202.2) + + =20(cherry=20picked=20from=20commit=2037be23e8c1d8e5c7a1157e9d66ef3f30a4c472c5)?= + MIME-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: 8bit + +commit 3bbd77ff98478153afe3251de9ba11d757218213 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 20 20:03:02 2008 -0400 + + XSELinux: Do a check for whether background "None" is allowed. + +commit e323bb426ce8a072d119cb2720b773241259c137 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 20 19:42:09 2008 -0400 + + XSELinux: Correctly handle some permission bits that are used more than once. + +commit da973e962d09854b571320dee7dd9569060bc39e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Mar 20 09:18:29 2008 -0400 + + Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB + + This patch (and not setting HARDWARE_CURSOR_BIT_ORDER_MSBFIRST on big endian + platforms) fixes it for me with the radeon driver and doesn't break intel. + + Correct patch this time :) + +commit f8c1eb29e28818895d744c4e1d6897353d51790b +Author: Alex Deucher <alex@cube.(none)> +Date: Thu Mar 20 09:14:41 2008 -0400 + + Revert "Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB" + + This reverts commit 267352579612155adfd4743432d6569b2cdeebde. + + Pushed the wrong patch. + +commit 267352579612155adfd4743432d6569b2cdeebde +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Mar 19 19:12:37 2008 -0400 + + Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB + + See bug 11796 + +commit 060a99444ee25a684b0ab9b4819bf8e855aea2d8 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Mar 19 16:04:16 2008 -0700 + + Make Xevie private symbol names less generic + + Makes it easier to figure out what you're seeing in the stack trace + instead of wondering where in the server "ProcSend" is. + +commit f37046984d7839faefa4d716624e4a85ddde9634 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Mar 19 14:06:53 2008 -0700 + + Xevie cleanups, byteswapping fixes & request length check fixes + +commit edad0a9dfebcce5c54b2f9c32bd9d45549e20c51 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 18 17:51:21 2008 -0400 + + Apply __glXDisp_GetVisualConfigs message patch + From http://bugs.freedesktop.org/show_bug.cgi?id=13863 + + Problem was that the glxcmds.c __glXDisp_GetVisualConfigs + function left garbage in the tail end of the message used for extensions. + +commit cdadd2ff9bade318caac5c1d9bcdc8a001347da9 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Tue Mar 18 14:00:15 2008 +0100 + + [Xephyr/DRI] correctly route motion events targeted at GL drawable + +commit afd7428690d87097117ab20335658f6d59d60103 +Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> +Date: Mon Mar 17 14:55:44 2008 -0700 + + Cleanup logic in xf86PrepareOutputs + + Should have done this in the first place. Since we're checking for the absence + of the get_crtc callback in the first place, we'll short circuit the later call + and disable the output, so the ugly "continue" block is unnecesary. + +commit ba85caacb565b9aa0aeace52a362350304b0566d +Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> +Date: Mon Mar 17 14:13:09 2008 -0700 + + Make xf86SetDesiredModes aware of current output configuration + + By adding a new output callback, ->get_crtc, xf86SetDesiredModes is able to + avoid turning off outputs & CRTCs if the current output<->CRTC mappings are the + same as the desired configuration. This helps avoid flickering displays at + startup time, which speeds things up a little and looks better. + +commit bee2ddf35f75086cee951142098637f2c756b96b +Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> +Date: Mon Mar 17 08:33:01 2008 -0700 + + Fail CRTC configuration if !vtSema + + Unless we check for vtSema before calling into the CRTC and output callbacks, + we may end up trying to access video memory that no longer exists, leading to a + crash. So if we don't have vtSema, return FALSE to the caller, indicating that + we didn't do anything. + + Fixes #14444. + +commit db248ffb840a0c113b6eb508a0fa1e74e752474d +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 16 18:46:11 2008 +0100 + + test for the presence of pci_system_init_dev_mem() before calling it. + + This avoids creating a dependency on -current libpciaccess for + BSD systems other than OpenBSD (which don't otherwise need it). + +commit aa231f28d56402d7daea6cbd3002fbf760f79497 +Author: Donnie Berkholz <dberkholz@gentoo.org> +Date: Fri Mar 14 18:41:25 2008 -0700 + + Xephyr: Build fix: Port across XF86dri.c changes from Mesa. + +commit a955c3b587b22b8bf20cb6bedbbec4ad5fcb32ac +Author: Donnie Berkholz <dberkholz@gentoo.org> +Date: Fri Mar 14 18:41:07 2008 -0700 + + Xephyr: Distribute ephyrdriext.h in tarballs. + +commit 090b26db767d296e7a3452da83b136d1caa0ed01 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 14 21:58:27 2008 +0200 + + XkbCopyKeymap: Fix broken indentation + + An astute observer will note that the entirety of XkbCopyKeymap is indented + with spaces, and no tabs whatsoever, and not commit changes which break the + otherwise consistent indentation. + A non-astute observer will note the breakage when the commit mail comes + through with clearly broken indentation. + A polite, non-astute, observer will then fix it. + + C'est la vie. + +commit 88bec0915e3867f8dbf859a3dfbb771d0d07092d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 14 21:54:13 2008 +0200 + + mi: More meaningful assert crashes + + When we fail an assert in miregion.c (which happens every now and then, + though I haven't yet checked up why), at least generate a segfault, so + we'll get a backtrace. + +commit 57d48d94b8947c571925e6fd4c9bf041fbd1b2ac +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 14 14:37:42 2008 -0400 + + Fix a stray use of ALLOCATE_LOCAL. + +commit 824853772241acf64bc37ac8b85254194741ae13 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 14 14:24:21 2008 -0400 + + RANDR 1.2: Fix initial mode aspect ratio match in a corner case. + + Actually more like in the mainline case, where the ideal mode happens to + be the very first aspect match on the first monitor. But let's not + split hairs. + +commit 1b9878ffcfc0c0dbc4a6e674827fe508ba77db4b +Author: Bart Trojanowski <bart@jukie.net> +Date: Thu Mar 13 17:42:16 2008 -0400 + + Bug #14332: Fix PCI access cycles from x86emu. + + The address written to 0xcf8 contains the PCI slot address to send the + config cycle to. However, we would ignore that and always send the + cycle to the device whose BIOS we were running. This breaks some + integrated graphics platforms that have explicit knowledge about the + system's host bridge, for example. + +commit f7abe05b3306ed9a6f2cf5e3e45ed524d725d029 +Author: Doug Chapman <doug.chapman@hp.com> +Date: Thu Mar 13 17:40:34 2008 -0400 + + Bug #14091: Fix build (and runtime) on ia64. + +commit 5d7437c29e686a081b20823450d78c4c2f4e0aec +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Mar 13 17:37:12 2008 -0400 + + RANDR 1.2: Fix the RANDR 1.1 screen size estimation to approach reality. + + While the ScreenRec's notion of size in millimeters would get updates, + the RANDR 1.1 notion wouldn't, so your screen would appear to be square + and probably at some ludicrous DPI. + +commit 61c3f63a75d8b0cc47ffed4a0e30147fab2ae8f4 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Mar 13 17:34:54 2008 -0400 + + RANDR 1.2: Don't report a square resolution to RANDR 1.1 clients. + + It can't possibly do anything useful, and older versions of Gnome (and + proably others) get very confused by it. So do the drivers, for that + matter. + +commit 06c0372c3a1b45005eb6d50406f77f4e93f1de1e +Author: Mark Kettenis <mark.kettenis@xs4all.nl> +Date: Wed Mar 12 21:45:37 2008 +0100 + + OpenBSD support for libpciaccess. + + xserver and libpciaccess both need to open /dev/xf86, which can only + be opened once. I implemented pci_system_init_dev_mem() like Ian + suggested. This requires some minor changes to the BSD-specific + os-support code. Since pci_system_init_dev_mem() is a no-op on + FreeBSD this should be no problem. + +commit 2036851125226065891f13583ade3ce559e7bd37 +Author: Matthias Hopf <mhopf@suse.de> +Date: Mon Mar 10 19:29:07 2008 +0100 + + Return randr interface version in xf86CrtcScreenInit() + + Necessary to allow drivers to be run-time backwards compatible when using the + modes/ functions w/o providing their own copy. + +commit c7536f4b87e089a7e7c43026b189922fec70c565 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 11 13:11:04 2008 -0400 + + Silence REGION_INIT() warning. + + Evaluating the address of a BoxRec as a boolean gives this warning: + + i830_driver.c:2317: warning: the address of 'ScreenBox' will always + evaluate as 'true' + + which is pretty annoying. This patch compares the address to NULL to + avoid the pointer->bool conversion and gets rid of the warning. Seems + like a lame hack, but the warning is worse. + +commit cc05255191413b3f376edbc600122ff085f45f7b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 11 00:51:43 2008 -0400 + + Make WriteToClient take a const void * like any decent IO write function. + + Enough with the casting. Doesn't break API or even ABI, but does make + a lot of silly casts superfluos. + +commit bc504ffbba3dec2e3467bab8ba1ac25db6dd317e +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 11 00:35:31 2008 -0400 + + DRI2: Add DRI2AuthConnection(). + + DRI2 uses the same authentication scheme as XF86DRI, so implement this + entry point so DRI2 protocol code can access it. + +commit b2657ec5981122e7cc0bda0d8802aec63cde9014 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 6 16:51:57 2008 -0800 + + XkbCopyKeymap was mangling doodads and overlays + +commit ab9b0b36ac8ac72fc48c0abd91a83de49a18313c +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 10 13:40:00 2008 -0400 + + Add the "amd" driver to magic driver selection. + +commit 0f6aaf636b7ac4c98467284ff7baf1b83e0b72e7 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 10 09:14:20 2008 -0400 + + Bug #14927: Fix the math for xf86NumDefaultModes. + +commit 01c2e01f2aee580438b74bfb9da8f584f3878e6b +Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> +Date: Sun Mar 9 21:40:27 2008 -0400 + + GLX: Track changes to DRI_TEX_BUFFER extension. + + We now just pass in the __DRIdrawable. + +commit acedc03367e9e69f03b4838f0f0e8d8a8e872b9b +Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> +Date: Sun Mar 9 21:39:19 2008 -0400 + + DRI2: Return event buffer head index in DRI2CreateDrawable. + + And pass it to the DRI driver in AIGLX. + +commit 911f0c147699d3b8d97491be2ef6d2e4a6682a0b +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Mar 7 23:24:06 2008 +0100 + + Programs in hw/dmx/examples/ want client-side xkb headers. + +commit 9abaad115cb6245b12b2adb3552ace99b634ab4a +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Mar 7 14:12:28 2008 -0500 + + Fix DRI2 texture target for GLX_EXT_texture_from_pixmap. + + Thanks to Dennis Kasprzyk for pointing it out and for reminding me to + commit it. + +commit 3bf7ff70323d533a3a05c0f3e22393e63beada99 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 7 09:25:06 2008 -0500 + + Size xf86DefaultModes explicitly. + + i.e., don't check for the end of the list by ->name == NULL, since that + won't work now. Fix the consumers of xf86DefaultModes to use the new + explicit size as well. + +commit 3fcb6445dc08f42488287162e3b7009d405e9c5b +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Mar 7 08:29:49 2008 -0500 + + Fix segfault when a monitor exists but has no modes. + + Thanks to Zhenyu Wang for finding this. + +commit a8d760f567b19268329c4682495caa591f08a854 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun Mar 2 20:13:11 2008 -0800 + + Get modes code building with old X servers again. + + This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer than 1.2" + since XORG_VERSION current went backwards at some point. + +commit ca616b902b2c5d0f046c7a042c11f045479e373a +Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> +Date: Thu Mar 6 13:47:44 2008 -0800 + + Allow RandR get output property to call into drivers + + In order to report accurate values to users of the RandR property interface, + it's sometimes necessary to ask the driver to update the value (for example + when backlight brightness changes without the server's knowledge, due to hotkey + events or direct sysfs banging). + + This patch wires up the core server code with a new xf86CrtcFuncs callback, + get_property, to allow for this. + + The new code is available under the RANDR_13_INTERFACE define, which in turn + depends on the RANDR_12_INTERFACE code. + +commit 34b69e3bc0e6462eb60029fbcb4f5479494007a2 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 5 23:56:49 2008 -0500 + + Fix distcheck. + (cherry picked from commit 2a47accff8dccded4dfe031f9366c028ba927824) + +commit 8e562fe26ff77c03be0855afb08e43f3ed0bd4b9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Mar 5 15:11:41 2008 +1030 + + Xi: remove false memset from DeepCopyDeviceClasses. + + It's wrong, needs to be different, but I haven't had enough coffee to figure + out what it needs to do yet. + +commit d4101140f4e569f18554cf0cbf43138d08bd1277 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 4 22:39:41 2008 -0500 + + xselinux: Implement polyinstantiation support and related protocol. + +commit cf984dcc156958d4f8d98110e7add150628ce97e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Mar 4 16:03:04 2008 -0800 + + Make sure SIOGLIFCONF buffer is properly aligned for socket structures + +commit 27e7dacbf7ef17712be31ff90f98ee3a5c5cf909 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 4 11:38:34 2008 -0500 + + Make xf86InitialConfiguration slightly smarter. + + Old heuristic was to find the first monitor that expressed a preference, + then attempt to get all other monitors to agree. This doesn't work + particularly well when the two sets of modes don't precisely intersect, + you get overlapping-but-not-identical output geometry and things go wrong. + + New heuristic is: + - Exact user preference, if given + - Exact output preference, if the same for all outputs + - Best (largest) mode of modes common to all outputs: + - with the same aspect ratio as all outputs (may be NULL) + - with 4:3 aspect ratio + - Then the old heuristic to try to get something lit + + Note that it is simply not doable to have a reliable initial output guess if + you insist on trying to clone all outputs together. It's far too easy to + end up with displays that simply don't have modes in common. We need to + switch to right-of placement someday, once we're not limited to CRTC size + limits and we have working multi-GPU in RANDR. + +commit 95df04b744c6a3498a9a9e2ea9bb03ee780e60f8 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Mar 4 10:59:24 2008 -0500 + + Remove all mention of the vga driver from the config logic. + +commit 7b4f3616f75a541b819d99c28bb6cb73761b6066 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Mar 4 18:29:15 2008 +1030 + + Xi: add deviceid to QueryDevicePointer request. + + Why not, we had the padding anyway. + Suggested by Jim Gettys on the X.Org mailing list. + +commit 056a2ce02ce85013e89055ee44a7aa3eabedac09 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 4 02:44:48 2008 -0500 + + XACE: Check the return value of the selection create hook call. + +commit 4f2cd0ed96d3b10c78774c721c2ffbfb0556dddd +Merge: 23ae68a 453661a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Mar 4 18:11:10 2008 +1030 + + Merge branch 'master' into mpx + + This merge reverts Magnus' device coorindate scaling changes. MPX core event + generation is very different, so we can't scale in GetPointerEvents. + + Conflicts: + + Xi/opendev.c + dix/devices.c + dix/dixfonts.c + dix/getevents.c + dix/resource.c + dix/window.c + hw/xfree86/common/xf86Xinput.c + mi/mipointer.c + xkb/ddxBeep.c + xkb/ddxCtrls.c + xkb/ddxKeyClick.c + xkb/ddxList.c + xkb/ddxLoad.c + xkb/xkb.c + xkb/xkbAccessX.c + xkb/xkbEvents.c + xkb/xkbInit.c + xkb/xkbPrKeyEv.c + xkb/xkbUtils.c + +commit 72f2197545e734cd0aa785d05a57b2fc0351a763 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 4 02:02:54 2008 -0500 + + dix: Convert selection list to a linked list. + + Fixes a bug where pointers were being invalidated after a realloc. + +commit 0bd0f90d7c7928052197da7119177e5a1c9eee2c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Mar 4 03:47:36 2008 +0200 + + XKB: Fix initial map setting on startup + + Due to an unwitting sense inversion when eliminating XkbFileInfo, we were + setting the complete wrong keymap on startup (non-XKB map if we had an XKB + map available, or the XKB map if we didn't have any available). Invert the + sense properly, and add two small bits that also went missing in that commit. + +commit 613852ce6a821ce6f6382fc14629f517776a3701 +Author: James Cloos <cloos@jhcloos.com> +Date: Mon Mar 3 16:10:04 2008 -0500 + + Fix some documentation typos + +commit 3f23139137e024e09d207be05a61968100cf53e8 +Author: Jesse Barnes <jesse.barnes@intel.com> +Date: Mon Mar 3 13:05:12 2008 -0800 + + Add cscope files to .gitignore + +commit 708f07753ff22ade54e9ee8885e4198fff363b87 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 3 15:49:48 2008 -0500 + + RANDR 1.2: Inherit PreferredMode from the global configuration, if any. + + If you don't do this, then Modes "800x600" in the Display subsection will + be dutifully ignored and the driver will start at whatever resolution it + feels like. + +commit 605e6764dfd3e9cb917b9cfcd92fe89857c1a1c9 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 3 15:45:17 2008 -0500 + + Fix Motif menu drawing in Xnest. + + See also Red Hat bug #229350, OpenSolaris bug #6366490. + +commit 3b73d62791d925c465ec855f96981d151dd3c179 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 3 15:43:22 2008 -0500 + + xf86DDCMonitorSet: Honor the DisplaySize from the config file. + + We honor sync ranges and pixel clock settings from the config here, no + reason to ignore DisplaySize. + +commit 7c16b68ab879f5b4b1aedfc6b2aadbe56193dd19 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Mar 3 15:09:11 2008 -0500 + + 1.5 has branched, start 1.5.99.x. + +commit f7ab2d3821e6bccc943f088e308fd58395a186d2 +Author: David Nusinow <dnusinow@debian.org> +Date: Sun Mar 2 18:36:25 2008 -0500 + + Add missing file from previous commit. + +commit b5ce0e1d0b861dc5521fcd9db6287ed6da817726 +Author: David Nusinow <dnusinow@debian.org> +Date: Sun Mar 2 17:12:02 2008 -0500 + + Bug #13860: Ensure that the DRI mode is in octal format. + +commit c934366424b0d20e013c84e6b94b226b20e7baa2 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 2 19:27:53 2008 +0100 + + use UTILS_SYS_LIBS to pass SYS_LIBS to utils/ioports correctly + +commit 2bb9c1f36f685044b837f42076dec2ea7d22d034 +Author: David Nusinow <dnusinow@debian.org> +Date: Sat Mar 1 18:44:58 2008 -0500 + + bug #10008: Make Xvfb.1 document the correct default depth + +commit b0b9c811cda3e35a8f6d0813483f750602c55ff6 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Mar 1 20:24:50 2008 +0200 + + fix typo + +commit 3d642905477f4b1ec3223f1fbe0d0d37e959ec81 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Mar 1 16:18:18 2008 +0200 + + clean some "unused" warnings + +commit e7a6f79754816976d92857d55840262cccff80a6 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Mar 1 16:16:29 2008 +0200 + + glcore: split mesa and X in build system + +commit cdd46aa3cd2e720558186cdbe48d871ab385fcdd +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Mar 1 15:57:57 2008 +0200 + + configure: minor cleanup + + - dmx + + - darwin: remove from xorg options + + - xephyr: libxv is client lib + +commit 8af2c39bcc4ddc4693d5a2597c9622fa17b6c272 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sat Mar 1 16:54:01 2008 +0100 + + Fix big mistake in commit fd41f46ac62033a724bd1f4612f19448a21c1224. + + - When a mode is deleted, the name pointer is also free()'ed. + - This leaves other modes with an invalid pointer. + +commit ef60632e200853680282016e32a7a9fb01882852 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 29 18:00:27 2008 -0500 + + dix: Modify callers of property and selection API to use new interfaces. + +commit cc76ea6e3ac6a405f0c198c4e62be40aa8d2b546 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 29 17:55:31 2008 -0500 + + XACE: Add generic support for property and selection polyinstantiation. + +commit 34bf308a9e66f1a2f48630a15b1802afad50ec24 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 29 18:00:23 2008 -0500 + + dix: Refactoring of selection code to allow for polyinstantiation. + Introduces dixLookupSelection() API. + Removes NumCurrentSelections from API. + +commit d5715f7beaad6816db27b01b67d7a3c69164d106 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 29 16:16:12 2008 -0500 + + dix: Refactoring of property code to allow for polyinstantiation. + Introduces dixLookupProperty() API. + +commit c0e1959f285d7a7df66f42d55912a5a595decd0f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 29 16:45:11 2008 -0500 + + On second thought, revert that, it'll make large pixmaps painfully slow. + + Need to just fix the callers. + +commit 4a44fe7c8678360d0549cf0e0d63870f3623b1db +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Feb 29 16:43:14 2008 -0500 + + Bug #10465: Use calloc() for allocating PixmapRec's. + +commit 5d5fcc7198ca54fa9dc24fe974763eff9fddabee +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Feb 29 16:42:04 2008 -0500 + + Bug #10464: Set pixel value to 0 before FindColor() + +commit 8f0a4282f0ac33625eda9466e3db0bcef64e403a +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Feb 29 16:39:29 2008 -0500 + + Bug #10463: Always initialize reference pixel before AllocColor() + +commit b7eb92774a58639aff3f26bb28a3dcff910c3fb6 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jan 12 01:22:05 2008 -0500 + + EDID 1.4: Print additional CVT support data in the log. + +commit 31014d88aff8dc8a502cf0f26e4cde141e1a92f5 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jan 12 01:03:44 2008 -0500 + + EDID 1.4: Decode additional CVT support information. + + Table 3.28: Display Range Limits & CVT Support Definition + +commit d1c48955f80692a32ab6adcee1384e3d298f471a +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jan 12 00:30:58 2008 -0500 + + Fix CVT abuse in DDCModesFromStandardTiming. + + CVT is enough different from GTF that it should not be used on monitors + that aren't expecting it. This brings us closer to what the spec says + the correct behaviour is. + +commit 26c2e95fa5bf30726356cf4bdd0fea32a771a179 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jan 12 00:09:34 2008 -0500 + + Nuke a duplicate SYMFUNC(xf86CVTMode) + +commit ca5625b911e65fdfd410247b3eff57fedcfc1f79 +Author: Adam Jackson <ajax@redhat.com> +Date: Sat Jan 12 00:08:00 2008 -0500 + + Add xf86GTFMode(). + + This should probably be shared like xf86CVTMode(). + +commit 4cb4817c1072e1d31333db47d95f71d08bf0d1dc +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jan 11 23:38:48 2008 -0500 + + Remove the duplicate copy of xf86cvt.c + +commit e65e51a99b17a0510782775f010e9820ca567fcb +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jan 11 23:19:20 2008 -0500 + + Constify the built-in mode tables. + +commit 6828d8fc2b464e0755f46e3fbdeb07be0c38b620 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jan 11 22:57:42 2008 -0500 + + Clean up DisplayModeRec handling in many places. + + Use xf86DuplicateMode() instead of rolling our own, and change + malloc+memset to calloc. + +commit 85617b56e5e00e7b8c7d8ce5b49af289056921a7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jan 11 22:55:37 2008 -0500 + + Remove some #if 0 guarding code duplicated in xf86Modes.c + +commit fd41f46ac62033a724bd1f4612f19448a21c1224 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jan 11 22:38:21 2008 -0500 + + Allow xf86DuplicateMode() to work correctly on read-only modes. + + Before this it was meaningless to try to mark DisplayModeRec tables + const, since the mode name would be emitted as a pointer to an + anonymous string constant, and therefore would have to be fixed up by + ld.so and so couldn't live in .rodata. With this change the standard + mode lists can live in .rodata, and modes duplicated from them will + have their names filled in on the fly. + +commit 8ac19d16a030ec416e30d3650cf43e024ada167f +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jan 11 21:58:21 2008 -0500 + + Add several comments documenting our EDID failures. + +commit 13bfa5937d43392f686b76a99ea6331e3dce5987 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Feb 29 15:10:36 2008 -0500 + + GLX: Adjust to changes in DRI driver interface. + +commit d04ea267a4a51c16088d9ef429681a1edde536b1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 28 21:53:16 2008 -0500 + + xselinux: Don't require device "read" permission for XQueryPointer. + + These keyboard and pointer state polling calls are a real problem. + +commit 3fb17a3e647e926688c91a49a9b5b97f37dbc367 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 28 21:52:57 2008 -0500 + + xselinux: Log messages to both libaudit and Xorg.0.log. + +commit 4d91b1d5e422c5c460b1b7050baa9487a59b8aa8 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 28 21:52:32 2008 -0500 + + XACE: Adjust the location of the COMPOSITE creation hook. + Avoids incrementing the refcnt if the hook fails. + +commit 5675ae1f72145e9b719c613023da525731b42461 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 28 18:12:52 2008 -0500 + + XACE: Call the creation hook to properly label COMPOSITE window pixmaps. + +commit 27bcf40cda1d7c52b189cc76528f1f51cbe1d5eb +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 28 16:43:43 2008 -0500 + + XACE: Fix instances of DixUnknownAccess at hook callsites. + +commit 453661a9e193a511cf5e54e6d330454163817316 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Feb 27 20:43:50 2008 +1030 + + Xi: swap the control attached to a ChangeDeviceControl request. Bug #14170 + + Just swapping the request's data isn't enough, we need to swap the actual + control as well. + + X.Org Bug 14170 <http://bugs.freedesktop.org/show_bug.cgi?id=14170> + +commit aebd9dc252449747416b23c740a550d914275399 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Thu Feb 28 01:22:31 2008 -0300 + + Oops, there's one more parenthesis. + +commit f616735f17a681e3add866bf199540327c322490 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 27 22:46:14 2008 -0500 + + xselinux: Prefix a few remaining error messages with "SELinux". + +commit e40cc5305bec656108077ab13fcc8e6e82b3707a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 27 22:29:15 2008 -0500 + + xselinux: Don't throw BadAccess if DixUnknownAccess is passed in to a hook. + + The avc will still appear, however, so that the callsite can be fixed. + +commit 3b1df47bd400be9dca34b5e5d1ac2b117f8cc4ed +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 27 22:28:54 2008 -0500 + + XACE: Require "manage" permission for XKBSetNames. + +commit 08afc70513e5496cc5cd8b76c8658c4292119e4b +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Feb 28 10:45:41 2008 +1000 + + quirks: another LPL panel with the cm/mm wrong + +commit f6d51797a523ecc2d4a8f18b2681160fcd5d1d55 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Wed Feb 27 23:44:39 2008 +0100 + + EXA: Let the driver decide what repeat/extend types are supported. + +commit 41aea6194bd29ab34cc166b3fd90eee64299ddf8 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Wed Feb 27 17:06:27 2008 +0000 + + More checking for failed contexts/drawables + +commit 43e46a654fa7cf69f0c8bcb7f583008d96a98686 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Wed Feb 27 16:58:21 2008 +0000 + + Fix context sharing between direct/indirect contexts + +commit d74b0327e8355546e6b41e8ce684f461d65fa9dc +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Feb 27 09:48:10 2008 +0100 + + [Xephyr/GL] unbreak the build + + Don't touch Xephyr DRI stuff when not compiling in a DRI environment. + +commit 2257e20900460d85254734b595238e7ad5ee55c8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Feb 27 17:15:28 2008 +1030 + + dix: set dev->key to NULL after freeing it in CloseDevice. (Bug #12830) + + Otherwise XkbRemoveResourceClient may try to dereference it lateron. + + X.Org Bug 12830 <http://bugs.freedesktop.org/show_bug.cgi?id=12830> + +commit 3f0681fb0b2d0744c2ef892883ae5359b43a4a9a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 26 23:14:29 2008 -0500 + + xselinux: Stub out selection protocol requests. + +commit 4632ea22580c31d44b0786321668d9e78f02900e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 26 22:00:52 2008 -0500 + + xselinux: Rip out the selection code in advance of polyinstantiation support. + + This resolves an issue where BadWindow errors were being thrown. + +commit c8e979b3b800e4c58be454daa0213285d4ee6510 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 26 21:34:22 2008 -0500 + + security: Register resource names in the server-side name registry. + +commit d12b7b6632fb4cf41d2e28c7792eaa503f25404a +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Feb 27 07:08:00 2008 +1000 + + xf86Crtc: add higher level modesetting entry point. + + For kernel modesetting work we need a bigger stick to beat the modesetting path + +commit dcc077c753137f37aa58231f1df3c4adb92b2c4b +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Feb 26 12:13:06 2008 +0100 + + AIGLX: Switch to server context for calling DamageDamageRegion(). + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=14518 . + +commit 23ae68a4c74a2ec90b4130c37b0d0aec3f4082ce +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 26 15:12:36 2008 +1030 + + dix: before copying the classes the first time, set the VCK's classes to NULL. + + XkbFinishDeviceInit does the following: + xkbi->kbdProc= pXDev->kbdfeed->CtrlProc; + pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc; + + If we directly copy the device classes for the VCK, pXDev->kbdfeed->CtrlProc + at the time of copying is still XbkDDXKeybdCtrlProc. So at some point + XkbDDXKeybdCtrlProc is called, and calls itself, and calls itself, and... + + Setting the device's classes to NULL seems to fix things. The memory isn't + lost, it gets stored into the devPrivates and freed at device closing time. + +commit ce9fb2f8c4610016e49321018fc9b24729380afc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 26 13:19:54 2008 +1030 + + Xi: MDs return the paired device's ID in attached field of ListInputDevices. + +commit c46f7b62d2bf9f35937cfef98325ed904895396a +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Mon Feb 25 18:14:08 2008 -0300 + + Fine, we don't need pciInit() anymore. Nuke, nuke, nuke... + +commit a9050d54249ed9f54c6fe59143b846c9c7548f59 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Mon Feb 25 18:10:18 2008 -0300 + + Jesus, pciInit() was called 32 times in my machine without need! + + xf86scanpci() will always call pciInit() before any other function, so + there's no need to guarantee it after. + +commit 81272f7ec9a3465e1d102c2ce627a45f92268857 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Mon Feb 25 17:39:33 2008 -0300 + + Some doc clean up: + clean up legacy things in os-support/bus/Pci.c. + + Put InitOutput() comment to its right place. + +commit 7c582dd6de27d2f4fedf73319d2dea2bfb240efa +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Mon Feb 25 17:31:37 2008 -0300 + + remove lnxPciInit() unused function. + +commit 9727db88d57089be6483104de435626cdbad883a +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Mon Feb 25 17:08:07 2008 -0300 + + No more "-scanpci" given that we already have it in libpciaccess. + + (Yeah, lets nuke dead code!) + +commit f19f7b8e53ed6609fc1fdd272de5521417946209 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Mon Feb 25 17:07:07 2008 -0300 + + Clean some garbage caused when pciaccess was merged: + + FindPCIVideoInfo() function isn't need anymore. + + xf86scanpci() is being called only once so we don't need permanent + (static) variables there. + + restorePciState() is not used for now (until we find why multiple + cards aren't working). + +commit d61f481a4455dd2a94674d2b7b26429cf9dcece3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Feb 25 17:52:45 2008 +1030 + + Xi: remove GetPairedPointer handling. + + obsolete, ListInputDevices provides this information now. + +commit 27b21278939a06ab6a22c9902f202eae6c5fae72 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Feb 25 17:00:42 2008 +1030 + + Xi: remove ungrab handling of ExtendedUngrabDevice request. + + This can be done by UngrabDevice, no need for separate codepaths. + +commit 4b50e71bf127c8e0f289e3b76c786f0398effe65 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Feb 24 20:25:13 2008 -0500 + + Bug #13736: Fix %bx in VBEGetPixelClock to match spec. + + Reported by Yannick Henault. + +commit 6dc369028d3ca741de57ad78febf2f5f82e0696e +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Sat Feb 23 00:01:02 2008 -0800 + + XQuartz: Quit now properly warns the user + (cherry picked from commit ed3d7b3959c2a0cb63e37210455bcc6cf195b807) + +commit e6a4cde16dc99ea02ac93da1d1b9517b1073d159 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 22 18:36:29 2008 -0500 + + Use the client-side XKB headers for the config utilities + +commit 347db49ebe4596db16455ea8a1a608cfa826c5c7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 22 16:05:33 2008 -0500 + + s/via/openchrome/ in the autoconfig logic. + + Xorg's via driver is effectively dead anyway. + +commit 69f782676797744815ff76b8a11b11178066f501 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 22 16:04:35 2008 -0500 + + Match Xephyr DRI definitions to the ones in xf86dri.h + +commit 060a66b6e2feddba43ed207b6fcf2cf1f7fe39fd +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 24 15:55:58 2007 -0500 + + Normalize swapped dispatch for Fixes{ChangeSaveSet,SelectSelectionInput} + +commit 24bebdded44a9e184455b4fee7800257fee81efb +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 24 15:07:49 2007 -0500 + + fbFillRegionTiled() is now dead code. + + Only ever called from the old PaintWindow* screen hooks, but those are + gone now. As a pleasant side effect, fb loses its #ifdef PANORAMIX. + +commit ee21aba6be0078949204e315ddfffd99de60c2f1 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 24 13:13:19 2007 -0500 + + Fix Xinerama's consolidated visual handling. + + Formerly the code claimed it could only handle up to 256 visuals, which + was true. Also true, but not explicitly stated, was that it could only + handle visuals with VID < 256. If you have enough screens, and subsystems + that add lots of visuals, you can easily run off the end. (Made worse + because we allocate visual IDs from the same pool as XIDs.) If your app + then chooses a visual > 256, then the Xinerama code would throw BadMatch + on CreateColormap and your app wouldn't start. + + With this change, PanoramiXVisualTable is gone. Other subsystems that + were using it as a translation table between each screen's visuals now + use a PanoramiXTranslateVisual() helper. + +commit a4202b898f07dd733590ae5adb21e48775369781 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Feb 22 18:22:58 2008 +0100 + + XKB: Actually use the keymap we compile at startup + + During XkbInitKeyboardDevice, we compiled a keymap and promptly threw it away; + brief inspection revealed the embarassingly simple problem. Sorry. + +commit c14fd2a5cb3f45d5c4502e09f55f5e3732c5e698 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Feb 21 15:33:02 2008 +0100 + + [Xephyr/GL] properly route expose event on GL drawables + + When an expose event happens on an host GL window paired with an + internal drawable, route that expose event to the clients listening + to the expose event on the internal drawable. + +commit 437c78ef9ff1177e04b3d6781b5805d89b2ab81a +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Feb 21 15:29:27 2008 +0100 + + [Xephyr/GL] don't crash when the host returns a NULL server string + +commit f343265a289724c81017f089c024a7618267c4e3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 15 19:53:45 2008 -0500 + + XACE: Make the default window background state configurable per-window. + + To recap: the original XC-SECURITY extension disallowed background "None" if + the window was untrusted. XACE 1.0 preserved this check as a hook function. + XACE pre-2.0 removed the hook and first abolished background "None entirely, + then restored it as a global on/off switch in response to Bug #13683. + Now it's back to being per-window, via a flag instead of a hook function. + +commit 7c2f0a8befb310707ea923dbcdfde84521e52c88 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 15 19:17:40 2008 -0500 + + Remove COMPOSITE ifdefs around WindowRec bitfield as it has no ABI effect. + +commit 5cb9e15562a32c1f102d94d5e15d5fd298baff3f +Author: Eric Anholt <eric@anholt.net> +Date: Wed Feb 20 10:36:06 2008 -0800 + + EXA: Fix Render acceleration in copy and tiling cases. + + Code shuffling in a634c9b03494ba80aeec28be19662ac96657cc23 broke this by + leaving pSrcPixmap = NULL. + +commit f14a62f823e257f92745bbcde11838f2ddd32ac8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 19 21:44:10 2008 +1030 + + dix: set evlen to the size of the reallocated memory. + + What a good idea this is... I'm very proud of myself. + +commit 67a78e84a81571cedaf7fd214a21ce1bbdc4fb3b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 19 21:31:50 2008 +1030 + + Revert "xfree86: plug a memory leak in xf86LoadModules." + + This reverts commit 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 and + 6cbaf15e6109ba77819c4070f5b46c78237ec460. + + The memory returned to xf86LoadModule was allocated in doLoadModule, which + calls the respective module's PreInit. As it turns out, input and output + drivers store a pointer to the module elswhere, so freeing it in + xf86LoadModule is a bad idea. + + For further reference: hw/xfree86/common/xf86Helper.c + Input drivers: xf86InputDriverList[blah]->module = module; + Output drivers: xf86DriverList[blah]->module = module; + + Unloading the module would not look pretty then. + +commit 5f5ec5db35e82ddd9659763875e5d6c63cf1b691 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Tue Feb 19 00:00:11 2008 -0800 + + XQuartz: unsetenv("DISPLAY") before startx if X11.app can't connect to it. + Also fix casting to silence warning. + (cherry picked from commit a5cbf78471ec6e6ad672dc00118fc7edbd6ddc7c) + +commit 750d70267679ddee10590c80ec621d890bd3d4a7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Feb 3 10:25:15 2008 +1030 + + dix: Ensure enough memory for ClassesChangedEvent for a new device. + + Before we enable the device through the driver, we size it up and make sure + that the events in the event list contain enough bytes for a possible + ClassesChangedEvent lateron. + +commit 74628d639719815c1beff4cac84662fa41c55925 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Feb 3 10:15:40 2008 +1030 + + dix: change GetEventList to return length of list and set parameter in place. + + Changing DDXs to use new prototype too. + +commit 77dba004a9aaf35f183f61ff6875a491a52aa030 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Feb 3 10:10:46 2008 +1030 + + dix: add InputEventListLen and SetMinimumEventSize + + The latter is used to increase the amount of allocated memory for the event + list. This will be needed for ClassesChangedEvents that can be of more or less + arbitrary size (larger than 32 anyway). + +commit 6cbaf15e6109ba77819c4070f5b46c78237ec460 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 19 12:02:22 2008 +1030 + + xfree86: guard against NULL-pointer dereferences in xf86LoadModules. + + Should have been part of 3abce3ea2b1f43bd111664d4a57e5ccd282acab0, but I + forgot to git-update-index before I committed. + + Thanks to Bill Crawford for pointing it out. + +commit 3fe64d8d271aea0863bf01b0376f3eceec0c90b5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Feb 3 09:56:19 2008 +1030 + + Move input event list initialisation and storage from DDX to DIX. + + Rather than letting the DDX allocate the events, allocate them once in the DIX + and just pass it around when needed. + + DDX should call GetEventList() to obtain this list and then pass it into + Get{Pointer|Keyboard}Events. + +commit 09a8fc5c7a79ca22fc23224bb544f2e709681f3f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Feb 3 07:47:18 2008 +1030 + + Xi: make SizeDeviceInfo public and re-use from CreateClassesChangedEvent. + +commit 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 +Author: Arjan van de Ven <arjan@infradead.org> +Date: Mon Feb 18 18:13:10 2008 +1030 + + xfree86: plug a memory leak in xf86LoadModules. + + LoadModule() returns the only reference to a fresh piece of memory (a + ModuleDescPtr). Sadly, xf86LoadModules dropped the return value on the floor + leaking memory for each module it loaded. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3 +Author: Arjan van de Ven <arjan@infradead.org> +Date: Mon Feb 18 17:52:37 2008 +1030 + + xfree86: plug memory leak in InitPathList. + + All the failure paths were very diligent in freeing the "fullpath" temporary + string, but the success case was not. All the content only got strdup()d, so + it's not live memory anymore. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 1bec6ad8977cefa49cc297a310f5eb0b7cd0b8bc +Author: Arjan van de Ven <arjan@infradead.org> +Date: Mon Feb 18 17:46:04 2008 +1030 + + xfree86: plug memory leak in xf86LogInit() + + xf86LogInit allocates a piece of memory, stores it in lf. LogInit() will then + effectively strdup it, but lf is never freed again. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 6d9d18bf7708eb9e640ef732b5dc4c99aa6d5feb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Feb 18 17:25:15 2008 +1030 + + dix: add support for WindowAccessAllowAll in device access checking. + + AllowAll is the last check before the parent window is checked. This allows + to override a DenyAll in the parent window in a simpler way than before (the + previous method required all devices to be in the permit list). + +commit 088067c891a78670d9509f48f56bf3ff9c16a30d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Feb 18 16:46:07 2008 +1030 + + Xi: even if ChangeDeviceHierarchy fails, we may need to send an event. + + Changes are committed instantly, so if at least one change was successful, we + must send an event to the client, even if subsequent ones fail. + +commit 660739c6bc84cb74f43a277052ce163fae654417 +Author: Benjamin Close <Benjamin.Close@clearchain.com> +Date: Fri Feb 15 13:36:34 2008 +1030 + + dix: Handle the case where a device cursor was removed correctly + + In the case that the device cursor was the first in the list of cursors + the window knew about, unsetting the cursor could lead to a segfault + due to pPrev being NULL. Instead catch the condition and correctly remove + the node from the list. Since there is no cursor now set on the device, + we simply return success as the parent windows cursor will propogate + down later. + + Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit 24db28230120ecc2b65b25164b6e7b407970f9e2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Feb 18 16:16:19 2008 +1030 + + dix: set num_events to 1 by default. (no RawDeviceEvents anymore) + + This should have been part of acb412d5399f865b5048fdd683147cea0f19f0c1. + +commit 45d00433e7bfbab476dd02ec92a9fbee40af5dad +Author: Dan Nicholson <dbn.lists@gmail.com> +Date: Tue Jan 15 19:43:16 2008 -0800 + + glx: Use glapi sources from the mesa tree + + With recent mesa HEAD, the glapi sources used only in the xserver glx + module are carried in the mesa tree. Previously, these were generated + separately and committed to the xserver tree. + + The build is changed to symlink these files like the other mesa sources. + This reduces the chance for mismatches between mesa's glX API and the + xserver's glX API. + +commit fbd776894658e7afb2c55dc8582b2a3efab78a3c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Feb 16 20:01:18 2008 +0200 + + XKB: Ditch XkbFileInfo + + Sorry about the megacommit, but this touches on a lot of stuff. + + Get rid of XkbFileInfo, which was pretty seriously redundant, and move the + only useful thing it had (defined) into XkbDescRec. defined will be removed + pretty soon anyway. Is the compat map pointer non-NULL? Then you have a + compat map, congratulations! Anyhow, I digress. + + All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_ + XkmReadFile, which returns an XkbDescPtr *, because people want to deal in + XkbDescPtrs, not XkbDescRecs. + +commit e5f002eddef1abe324033a3155f01d048536a48d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Feb 16 20:00:47 2008 +0200 + + XkbProcessOtherEvent: Don't depend on now-removed header + + We don't do XKBsrv.h anymore. + +commit 2d256f098ae05033ad76672d5ebdb9dfa7e6b995 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Feb 16 19:57:37 2008 +0200 + + XKB: Always set size correctly in XkbCopyKeymap's geometry routines + + We were forgetting to set the sizes for sections and rows and a couple of + other misc bits in XkbCopyKeymap's geometry. Sort that out, and add a + couple of clarifying comments along the way. + +commit ab79110a84b2d299ecae0605fa535edbebd99565 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Feb 3 23:48:57 2008 +1100 + + XKB: Remove support for pre-built keymaps + + Don't load prebuilt keymaps anymore. + +commit 1332343910a1880854bae21a790cff198855cd24 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Feb 3 23:43:18 2008 +1100 + + XKB: Remove usage of client-side types + + Since we're no longer sharing with Xlib, don't pass Displays and XPointers + everywhere. + +commit 534fc5140b039a8c98ab715d0a6740d513b41209 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Feb 3 23:30:22 2008 +1100 + + XKB: Remove a bunch of mad ifdefs + + We have SEEK_SET and size_t, seriously. Also use DebugF instead of + ifdef DEBUG, and ditch a couple of random bits that were never used. + +commit 0f12a448dcbbbf1f40aa98d09c9d25ee511c5bbf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Feb 3 23:15:39 2008 +1100 + + XKB: Deprecate XKBSRV_NEED_FILE_FUNCS + + There's no point in having the function definitions be conditional, so + whatever. + +commit 68bd7ac1930b5cffb6657b8d5f5bf8ae58eae8d9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Feb 3 23:12:15 2008 +1100 + + XKB: Move headers into the server tree + + We need to start breaking the XKB API to enforce sanity, so drag whichever + headers we need to do so into the server tree, as the client API is set in + stone, being part of Xlib. + +commit 37867626e314e74031378a8a4ff06f69b899a3b2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Feb 1 14:41:04 2008 +1100 + + main(): Remove uncredible failure + + NO, NO, NO. + + NO. + + The only way this could possibly be worse is if you were viewing it in + Comic Sans. + +commit e4eb7e5842f0f56f07e9cf3b16249c172d0a975d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jan 30 23:24:14 2008 +1100 + + XKB: Delete xkberrs.c + + Get rid of the XKB errors code to save a bunch of space. + +commit a48cc88ea2674c28b69b8d738b168cbafcf4001f +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Feb 17 18:47:28 2008 +0100 + + Fix rotation for multi-monitor situation. + + - The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find. + - Fix bug #13787. + +commit 70c0592a97c7dc9db0576d32b3bdbe4766520509 +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Sun Feb 17 11:21:01 2008 +0100 + + Resize composite overlay window when the root window changes. + + - This allows some compositing managers to work, even after randr12 has changed the root window size. + - Thanks to ajax for figuring out the best place to put this. + - Example: + - xf86RandR12SetMode() calls EnableDisableFBAccess(). + - That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize(). + - The final step is the call to PositionWindow(). + +commit b95059c20746a71e60ef152bb627e1d5c2210d75 +Author: Jeremy Huddleston <jeremy@tifa-2.local> +Date: Sat Feb 16 01:33:13 2008 -0800 + + Added Xquartz.plist to EXTRA_DIST + (cherry picked from commit 70f9495e0c1f1459507064b673fe57b1c90d3c2c) + +commit d103820bb8635c63b34b85b45cad95ed9c152d90 +Author: Jeremy Huddleston <jeremy@tifa-2.local> +Date: Sat Feb 16 00:35:50 2008 -0800 + + Fixed unescaped newline in EXTRA_DIST + (cherry picked from commit 567c172c4d400fdfe69e7b096a3877fce5c2de9f) + +commit a7d936c4ac8e3d7227ecbfe0ddc6cc257b450458 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Mon Feb 11 16:09:03 2008 -0800 + + XQuartz: Fixed EXTRA_DIST to include localization + (cherry picked from commit 1b338c2a9330c85490a7c24d52adf24b124b70e6) + +commit 0ffb6a3ad010e80fe8f973fc228d549f9dd3effd +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Feb 14 22:20:56 2008 -0500 + + GLX: Implement support for TTM BO based TFP when available. + +commit 879515b1399f87a47010532af70f34b9b09e2a9b +Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> +Date: Mon Feb 4 13:13:35 2008 -0500 + + Add GLX provider for DRI2. + +commit b71dc54352bc56a889823040ec19c1d8e118a1f3 +Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> +Date: Mon Feb 4 11:58:24 2008 -0500 + + Add DRI2 module. + +commit 005e31d3de04e7003f84a94d30f2b75a9636266e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Feb 15 00:01:32 2008 +0000 + + AIGLX: Refactor code common between __glXDRI{drawableDestroy,releaseTexImage}. + +commit cd78f0d0fc08e4e2339ed09dad1a12802de7729c +Author: Pierre Willenbrock <pierre@pirsoft.de> +Date: Thu Feb 7 21:28:28 2008 +0100 + + AIGLX: Fix crash after client using GLX_EXT_texture_from_pixmap died. + +commit 3e0353c78571890f849a1db47b0540aacc6793bc +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 15 06:42:48 2008 +1100 + + Bah, macros are hard. + +commit c38feeb1492d9a47379b2e4d77dbadd8c421d17f +Author: Maarten Maathuis <madman2003@gmail.com> +Date: Thu Feb 14 18:52:47 2008 +0100 + + Fix typo in commit b8b7cdf6df3d338c50db670ce4cfd245f9fa8844. + +commit b8b7cdf6df3d338c50db670ce4cfd245f9fa8844 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 15 01:31:46 2008 +1100 + + Silence useless debug spew from XFree86-Misc extension. + +commit 4573cb2ce4b859744118d9a33de3599f033cdd2b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 13 20:16:56 2008 -0500 + + security: Revise set of permissions granted to untrusted clients. + + Bug #14480: untrusted access broken on 7.3. + +commit e99aadbc2635e87543fc9980d8156c3ede83544f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 13 19:46:29 2008 -0500 + + xselinux: Add use to permission map for devices. + +commit ae43d835bdaef96c3c73d7cee5b105f07340833d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Feb 13 19:39:49 2008 -0500 + + XACE: Change access modes for some device-related requests. + + Opening a device is not really "reading" it. + Requests that globally configure a device should require "manage" access. + +commit 921c298c4cdd2c879403ebdacbef48129058cad4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 14 09:48:19 2008 +1030 + + Xi: QueryDevicePointer doesn't have a shared field anymore. + +commit b885588756450e2fa25fdd191e300e1c5dd37ec3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 14 09:47:31 2008 +1030 + + Xi: remove FakeDeviceData calls. And one leftover from GrabAccessControl. + + FakeDeviceData needs more thoughtful integration. + +commit c99a9a97290c51bf2843f42d5683888cea8a3ff6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 14 09:43:49 2008 +1030 + + Xi: remove raw device events. + + Need to be better refined. + +commit b35a9efa16d9e14378a95c11fa39171b78710996 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 14 09:41:49 2008 +1030 + + Xi: Remove files for GrabAccessControl. + +commit b81c330f70c4a4c8f37216aa4856c7f8db93a375 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 14 09:32:54 2008 +1030 + + mi: remove RawDeviceEvent's ID changing. + +commit acb412d5399f865b5048fdd683147cea0f19f0c1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 14 09:27:51 2008 +1030 + + dix: Don't generate RawDeviceEvents anymore. + + These events have been removed from the protocol pending some more refinement + and more thoughtful integration. + +commit ba69904148acf755bec8fbda2eb869144f0ef7d4 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Feb 3 22:49:23 2008 +1100 + + Simplify dlloader a bit more. + +commit f750ce53ac450824d0c792d11eafdf311cf8abc0 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 17:33:48 2008 +1100 + + Remove some braindamage from ModuleDesc. + + Yay dead code elimination. + +commit e91ff09568c5579818b6641e88e95c6fe122cbe7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 17:21:34 2008 +1100 + + Friends don't let friends call xf86AddModuleInfo. + + That code only existed to leak memory. It can go now, thanks. + +commit 0bdd20a0454c94f902fd4874855125bf7510fcf5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 16:15:58 2008 +1100 + + Eradicate the VTInit code. + + "This option should rarely be used." Never sounds like a better idea. + +commit 24089b06243101b1bff4f2fd79fcbfd6a93992d5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 16:11:13 2008 +1100 + + Don't bother warning people about the keyboard driver rename, just do it. + +commit 2aaf6ac134fa9f61984b1c03929c7b596c971cc8 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 16:10:23 2008 +1100 + + Don't even attempt to parse -bpp in xfree86 DDX option parsing. + + This hasn't been valid since 1999. Get with the times, man. + +commit ef77e4c4419703b5a802f3eee92476a43f788a86 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 16:03:01 2008 +1100 + + Remove useless commentary from environment and argument processing. + +commit f3b3b37ec6197f8884417fbc26630d3a28f2e319 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 15:36:11 2008 +1100 + + Use strerror instead of errno values in user strings. + +commit b740b865e4c156a40adc6b63fcf215156fc9151a +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 15:16:01 2008 +1100 + + Silence an error message in ConfigureWindow that never happens. + +commit 89d3249c3e7611b22414bc84b10ca60aab4b9a77 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 15:11:27 2008 +1100 + + Silence FreeResource() + +commit 238b816469355159eea98600ca900e3baa8fa313 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 15:08:03 2008 +1100 + + X.Org Group -> X.Org Foundation + +commit 9113fa3de36e84bbae2727cace82b1cf0d709a86 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 15:03:57 2008 +1100 + + Silence the harmless FreeFontPath error message. + +commit 7c0709a736c0f3aa011de67dd2c2962585ab146e +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 14:59:58 2008 +1100 + + requestingClient is an xprintism, hide it for other servers. + +commit 62cfe8863823c0994f20555cb35ee3bacb9e5225 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Feb 1 14:57:25 2008 +1100 + + Redact all mention of PanoramiX from user strings. + +commit eb8dc11d19dd0b5354de408578ab0cfb865df672 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 31 21:45:14 2008 +1100 + + Remove some MAX* #defines that never get used. + +commit 2ce35f6d45c3e1761d33b786520ff5ba56a3c518 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 31 21:39:48 2008 +1100 + + Simplify critical output flushing. + +commit 3eaecdd66e791e0f3d86b23ce10be057ca44c044 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 31 21:36:14 2008 +1100 + + Disable Record by default. + +commit aa5216e89797b600f382c04e3eaa657e808a5c3e +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Jan 31 12:05:08 2008 +1100 + + Rip out useless indirection in the callback list management. + +commit 0d492b2166c4026b9078ffd86d89a31ebe590be4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 12 19:59:10 2008 -0500 + + XACE: Move the selection access hook to its own function. + +commit 4be69e41c07b784f75918141eead70415c0ec4a4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Feb 11 16:03:25 2008 -0500 + + Revert "Bug #8937: Extension setup functions not called on server resets" + + This reverts commit 5e946dd853a4ebc2722ae023429ce5797de3d7a6. + + The devPrivates rework makes this workaround unnecessary. + +commit 8a244c2bc04a4184535e42d1f2f8c9e3e55678b4 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Mon Feb 11 12:09:41 2008 -0800 + + XQuartz: Fixed layout of Applications->Customize menu + + Now resizing it won't produce weir overlaps of the widgets. Thanks to + Pelle Johansson for his help showing me how to do this. + (cherry picked from commit ef3498e92d13c82633fdbe8120396bfbe1e7489a) + +commit 3570ca1cb76f084272f7d8bd22c4cfdf03201a77 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Sun Feb 10 18:27:52 2008 -0800 + + XQuartz: Added option for setting quartz-wm click-through preference + (cherry picked from commit bf54c267cba97b2b3b9a621da0575776a388b2cb) + +commit 8004e160fa8cc75a3f1b7385fee64e5864b3b50a +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Sun Feb 10 16:34:40 2008 -0800 + + XQuartz: Converted interface to nib 3.x format + (cherry picked from commit 656aaab95773bd70fc3504b68bf7e1d292891d93) + +commit 0b0a09797302ac2171db5df20fc5110aafc8efbb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 7 15:48:04 2008 +1030 + + xkb: when copying the keymap, make sure the structs default to 0/NULL. + + It actually does help if a pointer is NULL rather than pointing to nirvana + when you're trying to free it lateron. Who would have thought? + (cherry picked from commit 7a97ca667405a42d008265c3a870210cc1da97dd) + +commit 7018f280406eb0ef899a4046de274cfdd582881b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 7 15:48:04 2008 +1030 + + xkb: when copying the keymap, make sure the structs default to 0/NULL. + + It actually does help if a pointer is NULL rather than pointing to nirvana + when you're trying to free it lateron. Who would have thought? + +commit 66f8001b61d12eaf4905ac71ccbb3f304914d00d +Author: Bart Trojanowski <bart@symbio-technologies.com> +Date: Thu Feb 7 21:26:54 2008 -0500 + + X86EMU: handle CPUID instruction + + After trying to switch from X to VT (or just quit) the video-amd driver + attempts to issue INT 10/0 to go to mode 3 (VGA). The emulator, running + the BIOS code, would then spit out: + + c000:0282: A2 ILLEGAL EXTENDED X86 OPCODE! + + The opcode was 0F A2, or CPUID; it was not implemented in the emulator. + This simple patch, against 1.3.0.0, handles the CPUID instruction in one of + two ways: + 1) if ran on __i386__ or __x86_64__ then it calls the CPUID instruction + directly. + 2) if ran elsewhere it returns a canned 486dx4 set of values for + function 1. + + This fix allows the video-amd driver to switch back to console mode, + with the GSW BIOS. + + Thanks to Symbio Technologies for funding my work, and ThinCan for + providing hardware :) + + Signed-off-by: Bart Trojanowski <bart@jukie.net> + Acked-by: Eric Anholt <eric@anholt.net> + +commit de16a8c53046764dbdf26a87acc5c984ef00d818 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 7 20:14:16 2008 -0500 + + XACE: Correct some protocol error values in the colormap routines. + +commit 31934132a490b1b8ae73010c44e0b23217d8dab2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 7 16:32:06 2008 -0500 + + xselinux: Use the device name in debugging output. + +commit 6dcb7d732bfeadc214228d68c5a13eef30248eb1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 7 16:00:52 2008 -0500 + + xselinux: Split devPrivate state into subject and object records. + +commit 2259b144f0fd4855085a656111a0c64246733e78 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 7 14:35:02 2008 -0500 + + xselinux: Add getattr and setattr to the permission map for properties. + +commit 9d5edebe9664f4ac35b82830e000a72d5ca9cbe4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 7 21:22:50 2008 +1030 + + Xi: finish XKB initialisation before copying the keymap. + +commit 96eafa3d4f05997dac8be6a8d66a92410511824c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 5 16:01:56 2008 +1030 + + xkb: when copying sections, make sure num_rows is set too. + (cherry picked from commit 41991fb991313202e8e6b513fe928ba14f8fcb87) + +commit 5c30327275509576b7848a5f842e7a1bffabe980 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 5 21:06:05 2008 -0500 + + XACE: Push the dix "structure" includes down to the security modules. + +commit bb1a577a6822f781f1e38d2434a13914e74f89aa +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 5 20:07:08 2008 -0500 + + XACE: Move the property access hook to its own function. + +commit 019ad5acd20e34dc2aa3b89cc426138db5164c48 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 5 15:44:41 2008 -0500 + + XFixes: squash a pointer/integer size mismatch warning. + +commit d3c36fe721edc55636438bc3e0e7a6c03f62784e +Author: liuhong <liuhong@devlinux-hong.sh.intel.com> +Date: Tue Feb 5 10:54:58 2008 +0800 + + validate mode clock for probed modes + + Some modes claimed in monitor EDID data may not be supported by + the monitor. So also validating the max clock for probed modes. + +commit 4b5b6e7baab58072a983d2ec136965f404c3a74a +Author: liuhong <liuhong@devlinux-hong.sh.intel.com> +Date: Tue Feb 5 10:54:10 2008 +0800 + + fix max clock unit + + max clock from EDID data is in MHz, while we need KHz to validate modes. + +commit a56ef7aaa4b6ac13c8181f68fc7dad3ca89e6973 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Sat Feb 2 23:04:46 2008 +0100 + + dix: Move motion history update until after screen crossing and clipping + + Cross screen and clip the coordinates before updating the motion history + so that it will have the same contents as the events that are reported. + +commit a0284d577aabea8406b72dd63773e341430ebe56 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Sat Feb 2 23:03:51 2008 +0100 + + dix: Skip call to clipAxis for relative core-events + + Relative events that generates both core and extention + events will have its axis cliped and screen changed by + miPointerSetPosition when the events are processed. For + absolute and non core-generating relative events the + axis must be clipped if we shouldn't end up completely + outside the defined ranges (if any). + +commit d9e23c4ff1607a62164b34717ef9afd352ce2b94 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Sat Feb 2 22:57:32 2008 +0100 + + Bug # 10324: dix: Add scaling of X and Y on the reported pointer-events + + Restore the rescaling code for x and y axis when generating + motion events. + +commit f04c0838699f1a733735838e74cfbb1677b15dc4 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Sat Feb 2 22:45:31 2008 +0100 + + Bug # 10324: dix: Allow arbitrary value ranges in GetPointerEvents + + Don't use a possitive value as a marker for if a max-value + is defined on the valuators. Use the existence of a valid + value range instead. This will also make it possible to + define arbitrary start and end-values for min and max as + long as min < max. + +commit 12e532403210c15a25200ef448bfe9701735ab20 +Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> +Date: Sat Feb 2 22:44:31 2008 +0100 + + dix: Always add valuator information if present + + Send valuator information for all event types, not only for + MotionEvents and absolute button events. + +commit 41991fb991313202e8e6b513fe928ba14f8fcb87 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 5 16:01:56 2008 +1030 + + xkb: when copying sections, make sure num_rows is set too. + +commit 521a7f26e088029707fb9a2bb80c9ddc734a3f8b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Feb 5 18:34:31 2008 +1030 + + mi: Only UpdateSpriteForScreen if we actually changed the screen. (Bug #12650) + + X.Org Bug 12650 <http://bugs.freedesktop.org/show_bug.cgi?id=12650> + +commit 10617dc0fb7166ccd5b2e92fa708390c2d7d0d27 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Feb 1 14:24:04 2008 +1030 + + xfree86: stick two more checks in for num_valuators < MAX_VALUATORS + +commit c68f063be639f39c2facbb496e8455e8e3771b41 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Feb 1 14:13:29 2008 +1030 + + xfree86: don't call xalloc from signal handlers when posting events. + + Reviewed-by: Peter Hutterer <peter@cs.unisa.edu.au> + +commit e5e531ce96264518f278f572a4d0bfcd345aa618 +Merge: 6c38682 1692dcf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 31 16:36:17 2008 +1030 + + Merge branch 'master' into mpx + + Conflicts: + + dix/events.c + +commit 6c38682084e24b18bac0ea75729b1183aeb01600 +Author: Benjamin Tissoires <tissoire@cena.fr> +Date: Thu Jan 31 15:51:32 2008 +1030 + + kdrive: AddInputClient takes a ClientPtr. + +commit 1692dcf197470d074f69d5af1608cb2ff1d08872 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 30 13:04:58 2008 +1030 + + dix: print out event type if a bogus pointer event occurs. + +commit d954f9c80348de294602d931d387e5cd1ef4b9a5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 30 10:39:54 2008 +1030 + + xkb: don't update LEDs if they don't exist. (Bug #13961) + + In some weird cases we call this function when there is no SrvLedInfo on the + device. And it turns out null-pointer dereferences are bad. + + X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961> + +commit df325be394e1f75c396b2768f81373f2989aef7c +Author: Coleman Kane <cokane@cokane.org> +Date: Tue Jan 29 09:47:00 2008 -0800 + + Bug 13101: xorg-server has a typo in hw/xfree86/os-support/bsd/i386_video.c + + X.Org Bug #13101 <https://bugs.freedesktop.org/show_bug.cgi?id=13101> + Patch #12360 <https://bugs.freedesktop.org/attachment.cgi?id=12360> + +commit 94f412cb7e954fe872fed979057cbdfbef953c6f +Author: Julien Goodwin <julien@studio442.com.au> +Date: Sun Jan 27 12:30:16 2008 +1100 + + Loader: Fix verbosity confusion + + 'Loading foo' is verbosity 3, whereas 'already built-in' is verbosity 0. + This means that gdm's log would just be full of bare 'module already + built-in' messages. + +commit 442838fcb3bf07ac57553ae5600d9e6c59a559bb +Author: Julien Goodwin <julien@studio442.com.au> +Date: Sun Jan 27 12:27:26 2008 +1100 + + xorg.conf.man: Fix monitor/output confusion in monitor positioning + + On the Intel driver at least, LeftOf/RightOf/Above/Below in xorg.conf refers + to output names, not monitor names. Fix nomenclature in xorg.conf.man. + +commit 5b8641a5fdc112c19e78ca2954878712e328d403 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jan 29 10:01:37 2008 +1030 + + xfree86: fix AlwaysCore handling. (Bug #14256) + + Assume AlwaysCore being set by default, just like the other options. + + X.Org Bug 14256 <http://bugs.freedesktop.org/show_bug.cgi?id=14256> + +commit 975ab11799c819a81da1dfe83505194410dbcb95 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Jan 26 09:39:54 2008 +1030 + + config: don't reset connection info on disconnect. + + If dbus is restarted, we try to connect again and this is difficult if the + busname and/or busobject is not set. + (cherry picked from commit 210eeef495770c1883c842ff003c28ce25f279d4) + +commit 7dde5a694a06efed0a9186f05d33f5be6f5dba71 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 25 13:54:47 2008 +1030 + + config: check connection != NULL before getting dbus' dispatch status. + + (cherry picked from commit d23266522390a4ef7203ae7c062b2b920e45f9d7) + +commit f0ba7707161b8866e6fde32d6f25be6afcdecb48 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 25 13:45:22 2008 +1030 + + config: only shutdown libhal if the connection is valid. + + Thanks to libdbus' extensive use of assert we won't just get an error, it'll + bring the whole server down for us. + (cherry picked from commit fb07fab2c07e7b0834724541dc47bfba02ba8574) + +commit 2cb0ebec2b85d96289c23c17cfdcdf97ef6877d2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 25 11:48:13 2008 +1030 + + config: add a debug message, fix a whitespace error. + + (cherry picked from commit 7732898aaa70e076000f6e6aa9420482896ed996) + +commit 4fc2d3cef8d7868b025aa14af7ed4b730e8f2c49 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Mon Jan 28 12:18:43 2008 -0800 + + Rootless: RootlessEnsureFrame: Added check for !IsRoot + This was causing an issue with Apple-DRI and was reported here: + http://trac.macosforge.org/projects/xquartz/ticket/51 + (cherry picked from commit 116800279d2ec783c63f43d3902627edde6a4cff) + +commit 16b0614c8c441eb1692bde9e58fadf54a9c6f00f +Merge: 1a88aed e915a26 +Author: David Nusinow <dnusinow@debian.org> +Date: Sat Jan 26 16:13:25 2008 -0500 + + Merge commit 'upstream/master' + +commit 0ac175597712edfeae676f536746a4d26d625e30 +Merge: 210eeef e915a26 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Jan 26 13:55:07 2008 +1030 + + Merge branch 'master' into mpx + + Conflicts: + + Xext/sampleEVI.c + +commit e915a2639752bc0ea9e6e192e020cc2031c08063 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 25 19:22:19 2008 -0500 + + xselinux: Move the extension to extmod instead of being built-in. + +commit 210eeef495770c1883c842ff003c28ce25f279d4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Jan 26 09:39:54 2008 +1030 + + config: don't reset connection info on disconnect. + + If dbus is restarted, we try to connect again and this is difficult if the + busname and/or busobject is not set. + +commit f6a78ee143e3a3ad69538adf2b9675d724468ffa +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 25 18:04:10 2008 -0500 + + XACE: Remove the extension code entirely, XACE is completely static now. + +commit 7724c30a751c653ca3e2e8a6752af27bc37de3f0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 25 17:28:17 2008 -0500 + + XACE: Stop using fake requestVectors in favor of a simple hook call. + +commit f82329b0811469ddae5c44dcfffa38185c11a67c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 25 16:20:46 2008 -0500 + + XACE: Don't need to actually register a protocol extension. + +commit d23266522390a4ef7203ae7c062b2b920e45f9d7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 25 13:54:47 2008 +1030 + + config: check connection != NULL before getting dbus' dispatch status. + +commit fb07fab2c07e7b0834724541dc47bfba02ba8574 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 25 13:45:22 2008 +1030 + + config: only shutdown libhal if the connection is valid. + + Thanks to libdbus' extensive use of assert we won't just get an error, it'll + bring the whole server down for us. + +commit 7732898aaa70e076000f6e6aa9420482896ed996 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 25 11:48:13 2008 +1030 + + config: add a debug message, fix a whitespace error. + +commit 46794d0c9665f07913980830d038c88d00407612 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 24 19:49:13 2008 -0500 + + xselinux: Rename SelectionManager to more generic SecurityManager. + +commit 466f6552190d1b83d66ebfd71e07921ed6210ee2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 23 16:11:31 2008 +1030 + + Xi: if deviceid is > 127 assume GE mask is for all devices (XiSelectEvent). + +commit 379f057646588fa3211d7ba0ec8d77d2fc0ad246 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 23 16:08:37 2008 +1030 + + Xext: add GEDeviceMaskIsSet (GE mask checking per device) + + If a mask was set for the NULL device, then we pretend the mask is set for all + devices. + +commit 91dc8c43d2343e494c59023484883f4683bdc639 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 23 15:45:02 2008 +1030 + + Xi: Change window access right check to RecieveAccess in XiSelectEvent. + +commit 94a6a65ae7414c8247aa1741ec5c7561e6f4bbe0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 23 15:43:48 2008 +1030 + + Xext: allow per-device GE masks. + + Instead of a single mask per client we allow the storage of a mask per client + per device. + +commit 6ffeecabb7f3f3173864e0f0af21a99bdc5b5044 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 24 18:11:49 2008 -0500 + + xselinux: Use a privileged bit in the state instead of passing an index + to the permission checking function. + +commit 7ba8e97cbabfef4d614a6a38314830ec0f925471 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 24 19:09:58 2008 -0500 + + xselinux: Implement "get context" protocol requests. + +commit f0bf9a5231d4f612ac916355118484d055715f32 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 24 19:02:35 2008 -0500 + + xselinux: Whitespace fixups. + +commit 734e115871ce98badb8800383c423493802ae3d3 +Author: Hong Liu <hong.liu@intel.com> +Date: Wed Jan 23 21:04:32 2008 +0800 + + Bug #12439: add a quirk to use +hsync +vsync for the probed detailed mode. + + Samsung 205BW quirk is somehow reworked. + +commit cc22b05ea06e08568d0f0abdaccf67bd32662e94 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Jan 22 18:57:11 2008 -0500 + + There is no such thing as /dev/cpu/mtrr. + +commit 1a88aed5c82c7c131e3d473ef7b8766a418fdf1b +Author: David Nusinow <dnusinow@debian.org> +Date: Mon Jan 21 21:16:13 2008 -0500 + + Add tags/TAGS to .gitignore for ctags usage + +commit be6c17fcf9efebc0bbcc3d9a25f8c5a2450c2161 +Author: Matthias Hopf <mhopf@suse.de> +Date: Mon Jan 21 16:13:21 2008 +0100 + + CVE-2007-6429: Always test for size+offset wrapping. + +commit ba315ae5ddd00763147a4b0cdcacba7691793dfc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jan 21 23:43:53 2008 +1030 + + Xi: add XACE hooks for device creation (ChangeDeviceHierarchy) + + AddInputDevice checks for permissions already, so all we do is modify a few + callers to let AID sort it out. + +commit 94a21d757ce58254accbd5dd3a86810aadeec9f0 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Jan 19 13:17:45 2008 +0100 + + AIGLX: Fix GLX_EXT_texture_from_pixmap fallback with EXA. + + Use pScreen->GetImage to obtain the pixmap contents instead of dereferencing + pPixmap->devPrivate.ptr directly. + +commit e9fa7c1c88a8130a48f772c92b186b8b777986b5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Jan 18 14:41:20 2008 -0500 + + CVE-2007-6429: Don't spuriously reject <8bpp shm pixmaps. + + Move size validation after depth validation, and only validate size if + the bpp of the pixmap format is > 8. If bpp < 8 then we're already + protected from overflow by the width and height checks. + +commit 6492d513c0022d70f838d1b2561442c7a41e401f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 18 21:44:22 2008 +1030 + + dix: if a client has a core grab, return the grab device on QueryPointer. + + The correct thing would be to return the ClientPointer. However, if the client + for some reason has a core grab on another device (e.g. as result of a passive + grab), return the coordinates of the grabbed device instead. + + This makes the use of nautilus a bit saner. + +commit cd2ad4c2ed58b49cee085174e77c242048159321 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 18 20:11:55 2008 +1030 + + dix: remove some superfluous lines in ProcChangeActivePointerGrab. + +commit 8a925d201efac52ef663ea3ff46acc5046178666 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 18 20:06:29 2008 +1030 + + dix: free the genericMasks when ungrabbing. + + This finally plugs a memory hole created by grabs registering for generic + events. + +commit 8949d81a3c79eef351d7c018c76692dcca74b63e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 18 19:45:54 2008 +1030 + + include: mark CoreProcessPointerEvent, CoreProcessKeyboardEvent as deprecated. + + ProcessOtherEvent does all the work now. + +commit d323fd64206ddb4221daa7cf7504daf62c5e7d90 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 18 19:17:42 2008 +1030 + + dix: remove inputInfo.pointer refernce in EventSelectForWindow + + If the window being changed is set as the motion hint window for any device, + the device's motion hint window is set to NULL. Which is kinda what the old + code did, except that it did it with only the VCP. + +commit 883811c2bed9c6fcb706effbf83ddc97518b6f0c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 18 18:48:46 2008 +1030 + + dix: remove inputInfo.pointer reference in TryClientEvents. + + Unfortunately, this requires a change in the TCE API, and thus a change in all + callers. Tough luck. + +commit 6e17184486c4309ec8b47c7cfd11fef60bb360ac +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 18 17:52:38 2008 +1030 + + Xi: Check for DestroyAccess when trying to delete a master device. + +commit 23f3f0e27dc90b7b3a375f2a5dd094e6f53552b5 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sun Jan 13 14:00:25 2008 -0800 + + XQuartz: Moved SetFrontProcess haco to set_front_process + So it is done by the other thread... + (cherry picked from commit 7429379eb1001ee3dc769daa8fe6b3aef1b9cc8a) + +commit 8e133d96740d010a4fd969a8188e6e71fb2cafe2 +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Thu Jan 17 15:29:06 2008 +0100 + + Fix for CVE-2008-0006 - PCF Font parser buffer overflow. + +commit 6de61f82728df22ea01f9659df6581b87f33f11d +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Thu Jan 17 15:28:42 2008 +0100 + + Fix for CVE-2007-6429 - MIT-SHM and EVI extensions integer overflows. + +commit 7dc1717ff0f96b99271a912b8948dfce5164d5ad +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Thu Jan 17 15:28:03 2008 +0100 + + Fix for CVE-2007-6428 - TOG-cup extension memory corruption. + +commit dd5e0f5cd5f3a87fee86d99c073ffa7cf89b0a27 +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Thu Jan 17 15:27:34 2008 +0100 + + Fix for CVE-2007-6427 - Xinput extension memory corruption. + +commit bbde5b62a137ba726a747b838d81e92d72c1b42b +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Thu Jan 17 15:26:41 2008 +0100 + + Fix for CVE-2007-5760 - XFree86 Misc extension out of bounds array index + +commit e85130c85f727466fc27be1cfa46c88b257499fb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 5 10:47:39 2008 +0200 + + Xephyr: One-time keyboard leak fix + + Don't leak the originally-allocated keysym map. + +commit 0137b0394a248f694448a7d97c9a1a3efcf24e81 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 5 10:43:53 2008 +0200 + + XKB: XkbCopyKeymap: Don't leak all the sections + + Previously, we'd just keep num_sections at 0, which would break the + geometry and lead us to leak sections. Don't do that. + +commit b99a43dfe97c1813e1c61f298b1c83c5d5ca88a2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jan 5 10:38:16 2008 +0200 + + OS: IO: Zero out client buffers + + For alignment reasons, we can write out uninitialised bytes, so allocate + the whole thing with xcalloc. + +commit a6a7fadbb03ee99312dfb15ac478ab3c414c1c0b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jan 16 20:24:11 2008 -0500 + + Don't break grab and focus state for a window when redirecting it. + + Composite uses an unmap/map cycle to trigger backing pixmap allocation + and cliprect recomputation when a window is redirected or unredirected. + To avoid protocol visible side effects, map and unmap events are + disabled temporarily. However, when a window is unmapped it is also + removed from grabs and loses focus, but these state changes are not + disabled. + + This change supresses the unmap side effects during the composite + unmap/map cycle and fixes this bug: + + http://bugzilla.gnome.org/show_bug.cgi?id=488264 + + where compiz would cause gnome-screensaver to lose its grab when + compiz unredirects the fullscreen lock window. + +commit e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Jan 16 14:24:22 2008 +0100 + + Yet another Xv extension byte swapping fix. + +commit b0bf4308acb706abc87c51658c2251fa86231c35 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jan 15 19:15:09 2008 +1030 + + dix: print out an error when core type can't be converted. + + Helps a bit in tracking down bugs. + +commit 2a988ed75b7634d7cb6e83bb7aa89bc8768d3a58 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jan 15 19:14:46 2008 +1030 + + xkb: don't do core key repeats, XI only is the path to light. + +commit 4fd0885978be286a68b689824f1d910f929a52b0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jan 15 18:58:42 2008 +1030 + + Xi: remove some leftovers from ProcessOtherEvents. + + Core handling not needed anymore here. + +commit 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jan 15 15:22:39 2008 +1030 + + dix: Process an input event as a single event, instead of two separate ones. + + This is a significant shift in how input events are perceived. The common + approach was to treat a core event as a different entity than the XI event. + This could result in the XI event being delivered to a different client than + the core event. This doesn't work nicely if they come from the same device. + + Instead, we treat an input event as a single event, that is delivered through + two separate APIs. So when delivering an event, we first try the XI event, + then the core event. If the window want's neither, we go to the parent and + repeat. Once either core or XI has been delivered, the processing stops. + + Important: Different to the previous method, if a client registers for core + button events, the parent window will not get XI events. This should only + cause problems when you're mixing core and XI events, so don't do that! + + Generic events don't fit into this yet, they cause me headaches. + +commit 7a0d16ef0a103bcb25fa8a20322685f017aaf5a3 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Tue Jan 15 03:27:16 2008 -0200 + + Removed some warnings. + +commit 315d6a2b1d2a3de308e98d548afe780c59a784fc +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Tue Jan 15 02:59:56 2008 -0200 + + Fix Xephyr compilation without GLX. + +commit 0969a9f7497e10794a6534321c10a0e1ac680ad7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jan 15 11:31:12 2008 +1030 + + dix: Emulate core events within CheckDeviceGrabs and ComputeFreezes. + + This should restore the correct passive grab processing. When checking for + passive grabs, the core event is emulated and we check first for XI grabs on + the window, then for core grabs. Regardless of which event activates the grab, + the XI event is stored in the device's EQ. + + When replaying the event, we take the XI event and replay it on the next + window, again including the emulation of the core event. + +commit 1f83f40525acd3aff8f50b3c519bc1f307ff1e19 +Author: Dave Airlie <airlied@linux.ie> +Date: Tue Jan 15 10:20:50 2008 +1000 + + xf86Cursors: fix memset for non-square cursors + +commit e6ea3147bfb686798dac381eb8900f9f18beb88e +Author: Bernardo Innocenti <bernie@codewiz.org> +Date: Sun Jan 13 19:50:37 2008 -0500 + + exa: make the prototype for exaGetPixmapFirstPixel() public + + This fixes a warning in amd_drv which is using it. + + Signed-off-by: Bernardo Innocenti <bernie@codewiz.org> + +commit a83a0c5a144da67dab96a857b849a5692b73245d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jan 13 16:14:29 2008 +1030 + + dix: remove obsolete comment. + + Pairings don't exist anymore and the documented issue is a non-issue now. + +commit 180a5aba4de3104fed8bc4e7d42a1e3a51575318 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Jan 12 21:24:34 2008 -0800 + + XQuartz: Fixed copy-paste error with login_shell commit + (cherry picked from commit 6deec3acc6f8010b5b53a1e55a0a2c4080ba69d2) + +commit 6fd4a5e2e4d0be0ba0773df831687e11e1262c72 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Jan 12 11:56:00 2008 -0800 + + XQuartz: Corrected copyright X.org Project -> X.org Foundation + (cherry picked from commit f21631444816fc12b8a534c2cf79e6ac6c2af7c9) + +commit f72255639c065d795f7767683e851b1b5b2d9480 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Jan 12 11:35:48 2008 -0800 + + XQuartz: added 'login_shell' option to defaults + so the user can choose something other than /bin/sh + (cherry picked from commit b549cf18cebd3435d70f62855239484974c455a1) + +commit ec24a6b5aa732ec6999a27889d9a33cf80123886 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sun Jan 6 18:29:54 2008 -0800 + + XQuartz: Fixed switching into XQuartz via expose. + (cherry picked from commit 627ed60ce5d7499761028edf379ebd95250d3e04) + +commit 6844bd2e63490870bab3c469eec6030354ef2865 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 9 19:52:00 2008 -0800 + + More Xv extension byte swapping fixes + +commit 38bf01bd1c925614a6e67a38aa3cefc7b8fe3bca +Merge: 4e85c7c 0883e83 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 10 13:38:46 2008 +1030 + + Merge branch 'master' into mpx + +commit 0883e838e25227f0af84d2a90979175724166d16 +Author: Peter Harris <peter.harris@hummingbird.com> +Date: Wed Jan 9 14:52:33 2008 -0500 + + xf86misc.c: Avoid use of swapped values + +commit 59a63d72a1407a8aaf9878eeff7ee7a66f65a42b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 9 18:42:58 2008 -0800 + + Fix reference to old versions of XFree86 to not say "Xorg 4.2 or earlier" + +commit 4e85c7c322faf14c14e4229fa294b8e3d3a4d304 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 9 17:36:39 2008 +1030 + + Xi: keep a counter of buttons down to avoid duplicate press/release events. + + If two devices are attached to the same master device, pressing button 1 on + each of them leads to two button presses from the same device. Some apps + really don't like that. + + So we just put a counter in place and only send the first press and the last + release. + +commit e070c2cbef0d6fbbafce8d417e8b29231c2fdc50 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Dec 7 20:18:49 2007 +1030 + + mi: change infamous "Tossed event ..." error for something more explanatory. + + Few whitespace errors fixed. + Two ErrorF's prefixed with [mi]. + (cherry picked from commit 117458d2db49efd3f04432ff45871b44c7d4ad57) + +commit c31aead0fe9fe424120ce221cd9f76cb6d29a5b5 +Author: Richard Purdie <rpurdie@openedhand.com> +Date: Tue Jan 8 12:12:06 2008 +0100 + + [Kdrive] make XCalibrate 'orientation aware' + +commit 30375cd6d1439a3390b41714fe116aecc94743ca +Author: David Nusinow <dnusinow@debian.org> +Date: Mon Jan 7 20:57:30 2008 -0500 + + Don't log DPMS enabling as being from xorg.conf if it's not + +commit 981bb9f1e33e4564d1b59c00c808cc43a2e9497b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 18 13:57:07 2007 +1030 + + dix: set the correct number of valuators in valuator events. + + (first_valuator + num_valuators) must never be larger than the number of axes, + otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is + wrong too. + (cherry picked from commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e) + +commit 20ace6321ac464d821c67a82c7023f74ae038176 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jan 7 20:08:56 2008 +1030 + + dix: don't try to confine cursor on screen restructure if there is no cursor. + + Stops segfaulting when using xrandr. Yay. + +commit 57a491e6d3ebec464c0c861b02c9ddcb1cc62c3c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jan 7 20:06:32 2008 +1030 + + dix: init GrabPrivateKey to correct value. + + Merge detritus from last pull. + +commit 260505e3c5a18044e97d31ea3bcc0955e46335c8 +Author: David Nusinow <dnusinow@debian.org> +Date: Sun Jan 6 16:37:13 2008 -0500 + + Log enabling of DPMS even when it's not set in xorg.conf + +commit 7e7622165940934e56ae96ae785a8f88eec1a5cf +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 6 18:23:09 2008 +0100 + + Fix the name of the XFree86-Misc extension in the xorg.conf manpage. + +commit 59df687835c68eda147de47edfe9bc415c0efb4f +Author: Julien Cristau <jcristau@debian.org> +Date: Sun Jan 6 16:57:45 2008 +0100 + + Document the AllowEmptyInput, AutoAddDevices and AutoEnableDevices flags + + Add documentation for the new AllowEmptyInput, AutoAddDevices and + AutoEnableDevices server flags in the xorg.conf manpage. + +commit 7d226d6a251cb90765be2b50a1973986c5b7605b +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Jan 5 03:14:07 2008 -0800 + + XQuartz: Cleanup for strict-prototyping + Also fixed DarwinEQEnqueue to match changes to the callback + And also use dpmsstubs.c rather than copying the code into darwin.c + (cherry picked from commit 4c5c30a4beb7a427b00b18097f548876ad3c11d7) + +commit 11967dce11cd953d123d53bb3389aa257c5158e8 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Jan 4 22:54:26 2008 -0800 + + XQuartz: Fixed copyright in About box for 2008. Happy New Year! + +commit aca75f389e2b08096c3cacec03b12a58075cf12c +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Jan 4 12:23:09 2008 -0800 + + XQuartz: Flush the debug log for easier debugging + Also cleaned up formatting in xpr's eventHandler + (cherry picked from commit 16861d6d4239c7f3918332ef07752f1e211afb23) + +commit 57468a696e1259c1e1c185fc60230e1d195defb7 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Fri Jan 4 12:37:55 2008 +0000 + + Fix Line drawing with CapNotLast set in PolySegment. + +commit 39cb782f28be4efb2621fd8c614f2367eb834412 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 3 23:16:06 2008 -0500 + + XACE: DeleteCallbackList zeroes out its argument so don't do it twice. + +commit 7f376f23db463a65176de632ca6094acb55db951 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 3 23:08:49 2008 -0500 + + devPrivates rework: Free callback lists after use. + +commit de18703d2a25999e391d11b4c82ee018fb87372d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 3 23:07:24 2008 -0500 + + dix: Fix bug+leak in callback manager DeleteCallbackList function. + +commit 20eb26f9d149993ae360a2cbd1b536b68c9f4069 +Author: Alex Deucher <alex@samba.(none)> +Date: Thu Jan 3 22:53:36 2008 -0500 + + Fix potential crasher in xf86CrtcRotate() + + xf86CrtcRotate() is called by randr 1.2 drivers via xf86CrtcSetMode() or xf86SetDesiredModes() + during ScreenInit() at which point pScrn->pScreen is not set. If a user specifies a rotation + in their config file pScrn->pScreen is dereferenced and boom. + +commit 249b9b30c11e03bb113b37cf4712bf88debf6f05 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 4 13:49:48 2008 +1030 + + Xi: remove file for the obsolete ChangePointerKeyboardPairing request handling. + +commit e4a214e40d35aa957c83b86b4e4abc86c22fbde0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 4 13:32:53 2008 +1030 + + dix: don't free device's devPrivates manually, dixFreePrivates does it. + + Merge detritus from last pull. + +commit cd0603c2dc5ee000ebce66056bc1a72f99bfb617 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 3 21:41:02 2008 -0500 + + Bug #13765: Heap corruption in XC-SECURITY extension code. + +commit e46d559739e020dc7f6fcbdc6d1fb39c57aab4b1 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 22 15:09:12 2007 -0800 + + XQuartz: Cleaned up color map configuration. + 8 bit color still doesn't work, but the -depth command line argument now works properly. + (cherry picked from commit 6765949c27c053d22882f54337cfd09203aa5383) + +commit 17a9714a6789a389d52dbb40fd1eed1e24c04d64 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jan 3 14:46:54 2008 -0500 + + Bug #13794: Update MBE extension devPrivates to new interface. + +commit b2da44c76d68a76f20e90bccb268ebf65e132b49 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 3 18:51:44 2008 +1030 + + dix: DoChangeKeyboardControl shouldn't be using inputInfo.keyboard. + +commit 9cc41b88dfebb3f1e0a7cb5c224146e651a2cda4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 3 18:47:28 2008 +1030 + + Xi: ProcXSetClientPointer should directly check for the client from the id. + + The window ID includes the client ID anyway, so we might as well just look up + the client directly instead of trying to get the window first and the client + from the window. + + This also fixes a possible issue with XACE. If the client had permission to + write on the client but not on the window, the previous approach would have + failed. + +commit 521fdc28d86d091495da3558d26ab4a938250ffe +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 3 18:43:18 2008 +1030 + + xfixes: switch a few inputInfo.pointer to PickPointer + +commit 37194b13554f0d36343cf73324b128b15bb6a338 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 3 18:36:33 2008 +1030 + + Xi: switch to using "rc" (instead of "err") as returncode. + + All the rest of XI uses rc and returns rc in case of error, so make + mpx-related stuff comply. This stops the rest of XI sending the error + manually. + This is just a cosmetic change to be in line with the rest. + +commit c7e9b67c547c97b2c943eab555b4fe2844e8a91f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 3 18:09:56 2008 +1030 + + dix: free ClassesRec when a BadAlloc occurs during CoreKeyboardProc. + +commit 8da83836b60f7cdb75d08482f4311fa0e2ab4e1d +Merge: eace889 ae869fc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 3 17:04:54 2008 +1030 + + Merge branch 'master' into mpx + + Conflicts: + + XTrap/xtrapddmi.c + Xext/security.c + Xext/xprint.c + Xext/xtest.c + Xext/xvdisp.c + Xi/exevents.c + Xi/grabdevb.c + Xi/grabdevk.c + Xi/opendev.c + Xi/ungrdev.c + Xi/ungrdevb.c + Xi/ungrdevk.c + dix/cursor.c + dix/devices.c + dix/dixutils.c + dix/events.c + dix/getevents.c + dix/main.c + dix/window.c + hw/xfree86/ramdac/xf86Cursor.c + include/dix.h + include/input.h + include/inputstr.h + mi/midispcur.c + mi/miinitext.c + mi/misprite.c + render/animcur.c + xfixes/cursor.c + xkb/xkbAccessX.c + +commit ccf6636d2ca8acdaaeb8da34db507a10a082b0de +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 2 19:28:33 2008 -0800 + + Kill xf86getpagesize even harder (dummylib & ioport) + +commit dfd682b582636a36345144bcf835e3ee46718d90 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 2 19:27:22 2008 -0800 + + X.Org bug 4947/Sun bug 6646626: Xv extension not byte-swapping properly + + X.Org Bugzilla #4947 <https://bugs.freedesktop.org/show_bug.cgi?id=4947> + Sun bug 6646626 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6646626> + + Don't use swapped data after swapping it. When done swapping data, + send the swapped data, not the address of the pointer to it, to the client. + +commit f6666dcc3b1ac60f850ea53c357a9ef61672a52a +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 2 19:19:55 2008 -0800 + + Add dixAllocatePrivate stub to dummylib for utils + + Normally not necessary, except when building non-optimized/debug causes + the inline functions from private.h to appear in os-support/libxorgos.la + +commit 73f422996016107d5f53492e4197bb05ed9c4bb9 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 2 19:17:54 2008 -0800 + + Fix names/types of new vuidMouse{Get,Set}ScreenPrivates macros + +commit 895073f6b41d9313cfe748232c492c5e9f76b443 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 2 18:09:26 2008 -0800 + + Restore include & typedef needed by dtrace + + 996b621bec1bbc4fb21970c75eaec62053bc6ccb deleted a couple lines too many + +commit 306fde4082044dfecbedd9af41e660bafb3ce438 +Author: Brian <brian@i915.localnet.net> +Date: Tue Jan 1 09:27:44 2008 -0700 + + regenerated to add framebuffer object tokens (bug 13800) + +commit 5c362c2eb2cfdf1f6d667a3e64a0a7bc4942c950 +Author: Brian <brian@i915.localnet.net> +Date: Tue Jan 1 09:07:48 2008 -0700 + + regenerated, adds GL_MAX_3D_TEXTURE_SIZE (see bug 13811) + +commit 85365ddf16e2b954d8249b380df53337420ed684 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 17:35:54 2007 -0500 + + EDID 1.4: If given a native pixel format, use it when inferring virtual. + +commit 312b30cb03e439644ea10e08fa93268116333f0d +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 17:18:30 2007 -0500 + + EDID 1.4: First detailed mode is always preferred. + + ... so act like it in the modelist generator, not just the parser. + +commit 9dbb73033ae60e7ab85f1469a696e2a52f0cb0fe +Author: Colin Harrison <colin.harrison@virgin.net> +Date: Sat Dec 29 00:02:16 2007 +0200 + + Rootless: Fix lvalue error from devPrivates change + + Instead of trying to use an invalid expression as an lvalue, use the function + call instead. + +commit 36ff05771b0699aa80ad718e24097bc25cb4fb00 +Author: Jurij Smakov <jurij@wooyd.org> +Date: Fri Dec 28 23:59:53 2007 +0200 + + GL: Add GLX compile flags lost in modular X server changes + + RISC chips that trap on unaligned loads and stores need to + define __GLX_ALIGN64. This used to get added to the cflags + in the old *.cf files but it no longer does in the modular + X server. + + Also, Alpha needs to pass -mieee to the compiler as well. + + This is a simple backport of a patch that debian, and probably other + distributions, have been applying forever. To the best of my + knowledge the patch was written by Jurij Smakov. See Debian bug + number #388125. + + I just checked and this has been rotting for more than a year in + freedesktop bugzilla as #8392. + + Signed-off-by: David S. Miller <davem@davemloft.net> + +commit bae459cfc4f17a5ec5f2810e9f913e3ad2d8b8d4 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 16:50:18 2007 -0500 + + Don't carp on EDID 1.4 blocks anymore. + + Also whine more loudly when we get something other than 1.x. + +commit 70b2d6cfeb3bcb7b862a2ae29f6ef7cb84d69486 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 16:39:00 2007 -0500 + + Check the gamma value, not its address. + +commit 592d814ee09e86e283116a7a1052762c8398e8e5 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 16:37:23 2007 -0500 + + EDID 1.4: Additional semantics for display feature bits. + + First mode is _always_ preferred in 1.4; the bit that used to mean this + now means that the preferred mode is also the native pixel format. The + old "is GTF" bit now means "is continuous-frequency" instead. + + Section 3.6.4, Table 3.14: Feature Support, Notes 4 and 5. + +commit 322d0103aee317500057c80d542d7270d69a5731 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 16:28:44 2007 -0500 + + EDID 1.4: Alternate color encodings for digital inputs. + + Section 3.6.4, Table 3.14: Feature support. + +commit f1f43caf7e26a84dbacd4e5d7d47c8b4e4982836 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 16:12:11 2007 -0500 + + EDID 1.4: Allow for gamma definition in extension blocks. + + Section 3.6.3, Table 3.13: Display Transfer Characteristics (Gamma) + +commit 861ee38817523a647e6be10d7e8fe26f66054217 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 16:06:45 2007 -0500 + + EDID 1.4: Additional aspect ratio semantics for screen size fields. + + Section 3.6.2, Table 3.12: Horizontal and Vertical Screen Size or + Aspect Ratio. + +commit 14b5c8a447db0395fb14b2d404eafb1d8e4fb817 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 15:52:42 2007 -0500 + + EDID 1.4: Extended support for digital interfaces. + + Section 3.6.1, Table 3.11: Video Input Definition. + +commit a948216dccb5ee577a50a42035dc9bc49d0a00c6 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 15:00:41 2007 -0500 + + EDID 1.4: Decode CVT 3-byte codes and add them to the mode pool. + + Section 3.10.3.8: CVT 3 Byte Code Descriptor Definition. + +commit f6df66cc89bcd0a0be2e7bca05839fdd428c1d4c +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 13:55:39 2007 -0500 + + EDID 1.4: Trivial support for new detailed sections. + + Nothing actually decoded yet, but at least we print what they are. + + New in EDID 1.4: + - Color Management Data (0xF9), Section 3.10.3.7 + - CVT 3 Byte Code Descriptor (0xF8), Section 3.10.3.8 + - Established Timings III Descriptor (0xF7), section 3.10.3.9 + - Manufacturer-specified data tag (0x00 - 0x0F), section 3.10.3.12 + +commit bac3ecde39cc914ab515991234b7dc2138005b84 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 13:33:39 2007 -0500 + + EDID 1.4: Allow for sync range offsets. + + Table 3.26: Display Range Limits & Timing Descriptor Block Definition + +commit 3b23dd9fd43a28033d0af7b02088b0c6ca433158 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 28 13:29:45 2007 -0500 + + xselinux: Fix whitespace warnings. + +commit 643c52be32c187a0fdb9a031b1e31d97cd551339 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 28 13:26:26 2007 -0500 + + xselinux: Remove "X" prefix on remaining functions and strings. + + Should be evident from the context. + +commit f4bc333fc1e8d9fa9911771d2072df4df741c553 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 28 11:56:54 2007 -0500 + + xselinux: don't FatalError on an invalid class mapping, just disable support. + +commit f3780ece528ed3ead809ba6a388fa0f8aab2a775 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 20 20:32:07 2007 -0500 + + xselinux: Implement swapped protocol request logic. + +commit 1bbf64ab115e2a1121d6f9c0830b1b977f025178 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 20 20:31:34 2007 -0500 + + xselinux: Remove unnecessary structure definition. + +commit 938da5ee389975f910721f1c2cebc2dcec793117 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Dec 28 12:23:44 2007 -0500 + + Add HDMI and DisplayPort connector types. + +commit 24105cf6582201a94bc39aeac5a795297018aeb5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 28 15:49:50 2007 +0200 + + Input: Don't reinit devices + + If a device is already initialised (i.e. the virtual core devices) during + IASD, don't init them again. This fixes a leak. + +commit 941058f8da0d725f909dc97f68c32ce244a9dc0a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 28 15:48:57 2007 +0200 + + KDrive: Xephyr: Don't leak screen damage structure + +commit b2f6cd290c43b88f0d08fb29f8657618a067d2a0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 28 15:48:25 2007 +0200 + + OS: Don't leak connection translation table on regeneration + +commit 190a0506243b39cd8dfc0e12068e3a3f416330f1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 28 15:47:57 2007 +0200 + + Config: HAL: Don't leak options on failure to add device + + This showed up in Xephyr in particular, which denies new device requests. + +commit f44fd3f9e41bf467360ace93ef5b532d8f61fb2c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 28 15:47:21 2007 +0200 + + Config: D-Bus: Don't leak timers + + TimerCancel doesn't free the timer: you need TimerFree for that. + +commit ae869fc7669764729e13fdd70149ed636753f2a3 +Author: David S. Miller <davem@davemloft.net> +Date: Tue Dec 25 22:42:50 2007 -0800 + + [SBUS]: Fix build, use getpagesize() instead of xf86getpagesize(). + + xf86getpagesize() was removed, but this one call site was + not fixed up. + + Signed-off-by: David S. Miller <davem@davemloft.net> + +commit 009f1e4e55200425de2fe0dbc1f0ac0f431fb4cf +Author: Fatih Aşıcı <fatih@pardus.org.tr> +Date: Tue Dec 25 23:09:49 2007 +0200 + + Config: Don't forget to add xkb_rules option + +commit 389e8917f66a489455f1d5c70f44c262717538ad +Author: Fatih Aşıcı <fatih@pardus.org.tr> +Date: Tue Dec 25 22:59:24 2007 +0200 + + Config: Fix a memory leak + +commit 743008a4812d6b046211ebcf4eab202687b458d5 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Dec 23 14:27:14 2007 -0500 + + Report serverClient resources in the X-Resource extension. + +commit beb29c605b8c66e1a18b89668aa421c1519645f6 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Dec 21 02:09:01 2007 -0800 + + XQuartz: *REALLY* use CFStringCreateWithCString + I need sleep! Why am I making these stupid mistakes... sorry for pointless commit spam. ugg. + (cherry picked from commit b16351fc6457aabead328472d16dc25789032940) + +commit 5dd895efa305954e2695aa22a9e49acfb65b4d5e +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Dec 21 02:06:47 2007 -0800 + + XQuartz: Use CFStringCreateWithCString + (cherry picked from commit 79782b0e14761dcf5d6635b8eec161b74f06763a) + +commit 2c24231fc2027cf5034bb1b6636332687f586726 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Dec 21 01:57:43 2007 -0800 + + XQuartz: Reduce code duplication in X11.app + (cherry picked from commit b81809cd91a9f90b7f2de77b1dcf514cee87c32d) + +commit f3042a63be0748bb60567144276d2c61b75ba0b7 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Dec 21 01:24:06 2007 -0800 + + XQuartz: Handle Pseudorami init in miinitext + (cherry picked from commit a585c94fedd4ecbc87524703c01bb128fc2aa951) + +commit fa9680a7305d7f906da1bdeb40a0863ef66316e6 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 20 19:38:20 2007 -0800 + + XQuartz: Added localization. + (cherry picked from commit 7a5cc7bfbb296a2c41a580b063324c448f7131db) + +commit 603a8b73d46d59e5f9f0be39be8317f3fadfe7e6 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 20 18:29:57 2007 -0800 + + XQuartz: Cleaned up command line arguments. + +commit 4cf3002b6020024f2fc2ed0cc40a872a066e482d +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 20 18:08:40 2007 -0800 + + XQuartz: Kill off server-main.c and launcher-main.c + Now using xinit + (cherry picked from commit 5d6ae3d299f72df714117948b3d31dcbddf6c0bc) + +commit 1f74bef1ad1399323fc0d2e309b808bf32c622e4 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 20 17:33:38 2007 -0800 + + XQuartz: Don't fork to exec app_to_run. + Plus other housecleaning... + (cherry picked from commit ae302db472f127be082d05b418ede332fae8ccc5) + +commit 2d15d439f844d4016f169664a338595c11b91b77 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 20 15:46:40 2007 -0800 + + Xquartz: Use X11ControllerMain() + (cherry picked from commit a9ac932543374aa2540f5a12cc85ef82c85b0e0c) + +commit 1393a97ea97b5f7d7b90e3e8c58b5996b600e0c6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 20 16:23:35 2007 -0500 + + xselinux: Send AVC messages to audit system instead of log file/stderr. + +commit 42802a8e6b3d3795acc4f8b7597ea5a48619b5cd +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 20 13:17:30 2007 -0800 + + Xquartz: General Cleanup + General code cleanup, whitespace, dead code removal, added missing prototypes. + Made Xquartz come to foreground later in startup, so it doesn't appear for Xquartz -version + (cherry picked from commit 36922e8ff4316c93843aa3fe959cf8df3c7d5892) + +commit 7ef7727b800fa4715b80a82850d65b88fde5fe6c +Author: Dave Airlie <airlied@clockmaker.usersys.redhat.com> +Date: Thu Dec 20 10:11:26 2007 +1000 + + entity sharing: make !shareable entity non-fatal. + + Just because the entity isn't shareable, we should bring down the server. + Just ignore the extra screen and keep going. + +commit 50e80c39870adfdc84fdbc00dddf1362117ad443 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 19 16:20:36 2007 +1030 + + include: never overwrite realInputProc with enqueueInputProc. Bug #13511 + + In some cases (triggered by a key repeat during a sync grab) XKB unwrapping + can overwrite the device's realInputProc with the enqueueInputProc. When the + grab is released and the events are replayed, we end up in an infinite loop. + Each event is replayed and in replaying pushed to the end of the queue again. + + This fix is a hack only. It ensures that the realInputProc is never + overwritten with the enqueueInputProc. + + This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511) + (cherry picked from commit eace88989c3b65d5c20e9f37ea9b23c7c8e19335) + +commit d0308b64655360517d83e07e866d103c3f2b389d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 19 18:18:10 2007 +1030 + + Xi: specify correct struct when calculating size of GetDeviceControl reply. + + This doesn't change much, as the struct previously given has the same size as + the ones now anyway. Still, we should be pendantic. + + Thanks to Simon Thum for reporting. + +commit 66b00029e587cec628d0041179a301e888277f8e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 19 18:10:50 2007 +1030 + + Xext: remove redefinition of Bool. + + Thanks to Simon Thum. + +commit eace88989c3b65d5c20e9f37ea9b23c7c8e19335 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 19 16:20:36 2007 +1030 + + include: never overwrite realInputProc with enqueueInputProc. Bug #13511 + + In some cases (triggered by a key repeat during a sync grab) XKB unwrapping + can overwrite the device's realInputProc with the enqueueInputProc. When the + grab is released and the events are replayed, we end up in an infinite loop. + Each event is replayed and in replaying pushed to the end of the queue again. + + This fix is a hack only. It ensures that the realInputProc is never + overwritten with the enqueueInputProc. + + This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511) + +commit bcad2a5a24f30cfdf9eca31915ed5a55ed094285 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Dec 18 20:19:26 2007 -0500 + + XACE: Too many arguments to selection access hook. + +commit 7721d3e9217b41aab3a0ee5eaa52f5b53cbb07db +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Dec 18 19:14:26 2007 -0500 + + Reference cvt and gtf in the xorg.conf man page. + +commit 51fab1eb30691c503f1b4dc98b465f2bc2e1394e +Author: Sam Lau <sam.lau@sun.com> +Date: Tue Dec 18 11:38:47 2007 -0800 + + Sun bug 6278039: Xevie checking wrong size in swapped XevieSelectInput requests + + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6278039> + +commit 97c82ce0510808ea9d8a37a0a121e750f6dd8158 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Dec 17 23:11:29 2007 -0500 + + XACE: Restore the old background None behavior in response to bug #13683. + + From the X11 protocol spec: + + "If background None is specified, the window has no defined background." + + This means that toolkits and apps cannot rely on the "transparent" nature + of the current implementation! At some point before the next release, + XACE will switch back to a solid background as the default. + +commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 18 13:57:07 2007 +1030 + + dix: set the correct number of valuators in valuator events. + + (first_valuator + num_valuators) must never be larger than the number of axes, + otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is + wrong too. + +commit 6a5c3e04fa43b98ccffd69ad86dd781602f88d0b +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Dec 17 14:59:12 2007 +1000 + + mi: set the private key to a unique non-zero value + +commit a18d28a5efbe6021d6c800506cece28a73545aad +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Dec 17 13:49:16 2007 +1000 + + damn then my cut-n-paste ate my end of lines... + +commit d096bbd01bf7c7e15b5a2c582718f3333e063ddc +Author: Dave Airlie <airlied@redhat.com> +Date: Mon Dec 17 13:45:15 2007 +1000 + + Xquartz ate my DMX - thanks + +commit bf20c4374aeb5160a0dc372df9b49f1bbc05f078 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sun Dec 16 01:14:32 2007 -0800 + + Xquartz: Removed launchd plist and x11-exec. The relevant code is now in xinit. + (cherry picked from commit 767b4c9d9daa5d0ea59ac1f0d70146798da631cb) + +commit 58c2898b62fbf0d8e0f175de7cc208dc29d93788 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sun Dec 16 01:21:45 2007 +0100 + + xfree86: permit access to io port 0xffff on the hurd + +commit b4ef8885e1697b83a0dcc9f7fe79155f19241798 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 15 14:00:19 2007 -0800 + + Xquartz: Fixed launchd detection + +commit ff5abc72fcc459d7eac663e5f8e4d40b28749841 +Author: Otavio Salvador <otavio@ossystems.com.br> +Date: Fri Dec 14 17:59:29 2007 -0200 + + registry: XREGISTRY_UNKNOWN needs to be defined even if XREGISTRY isn't enabled + + In case XREGISTRY isn't enabled, XREGISTRY_UNKNOWN is used but it's + not being available. It's now always available. + +commit a3f7f7b60e391e6106f5db40b3fe5fbc67ccd836 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Dec 13 20:45:14 2007 -0800 + + clarified debug message to indicate that we're sleeping + (in case we get reports about slow launch times, this will + help clarify what's happening) + (cherry picked from commit 2eea3483cf893f8f81bacd434b31408dfb38cb06) + +commit e0e59b3bbc4d8e7ac3934a6f6a9e4a15b328c475 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Dec 13 20:44:33 2007 -0800 + + we need to link against CoreServices, not ApplicationServices + (cherry picked from commit ba4d2096e7953ef5b971682f0e28535da968acb1) + +commit 062d9234e233fc4c1c617f59093da973c9d3e2ce +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Dec 13 20:40:27 2007 -0800 + + fixed bug in x11-exec that prevent icon from showing up + (cherry picked from commit e1f4a0c20d3a52d98954c4b28d0ec4d44564bc32) + +commit 95c02adea80a14e18bb51876bc1418eccdade31d +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Dec 14 15:21:40 2007 -0800 + + Xquartz: Fixed cpprules include + +commit 86730337001ba4db6d77fe42406695e32784b157 +Author: Otavio Salvador <otavio@ossystems.com.br> +Date: Fri Dec 14 08:46:35 2007 -0200 + + kdrive/ati: use operating system input devices + +commit e110255501e2f699709e6978f5e52d3be96333c8 +Author: Otavio Salvador <otavio@ossystems.com.br> +Date: Fri Dec 14 08:45:09 2007 -0200 + + kdrive/vesa: use operating system input devices + +commit 863ba390e9fdf0d37cdf03bf5eebe7fdfe6288f5 +Author: Otavio Salvador <otavio@ossystems.com.br> +Date: Fri Dec 14 00:03:13 2007 -0200 + + kdrive/fbdev: use operating system input devices + +commit ca59d3f7bdb5f3724ff45ea57912c0b1098a73d6 +Author: Arkadiusz Miskiewicz <arekm@maven.pl> +Date: Thu Dec 13 00:09:08 2007 +0200 + + Xprint: Clean up generated files + + Remember to clean generated wrapper files. + +commit 5b02a6ca5b31db69d08f2f452494c0f93a6260d9 +Author: Bartosz Fabianowski <freebsd@chillt.de> +Date: Fri Dec 7 02:38:14 2007 +0000 + + Input: Fix proximity events with valuators + + Initialise num_events to 1, so we always send a proximity event, and then + optionally valuator events. Also make sure mieq can deal with valuator + events sent after proximity events. + +commit a14a143832be844b4b890b0160ccb9fc8293c28c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 14 00:57:16 2007 -0500 + + Bump server version for devPrivates rework / XACE. + +commit a2df51f8e95a814c54b806814020155ac8bd177d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 14 00:53:54 2007 -0500 + + Bump video driver ABI and extension ABI for devPrivates rework. + +commit 86b2e59bfb79bd042a13c35fbb4ccecec576f629 +Merge: 1c1a4bc cb0d7e2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 14 00:32:24 2007 -0500 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + configure.ac + + This is the last pull before merging to master. + +commit 1c1a4bc970be061484bb8dcccf945eb08144c656 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 13 19:51:40 2007 -0500 + + devPrivates rework: more cleanup from previous merge operation. + +commit cb0d7e2c2692a332e2bd5495478ebf9a6cd601d0 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 13 16:23:46 2007 -0800 + + Xquartz: Don't hardcode libexec dir + (cherry picked from commit 67b479ef80cb740a24981335eb8d596744168a62) + +commit c39212fd7353fc1a07a30bade90f78356c748e2d +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Dec 13 15:56:31 2007 -0800 + + Xquartz: Don't hardcode LaunchAgents dir + (cherry picked from commit 07a12d71fefd78c380078efa835700f2868ab204) + +commit 82e1aff9fbc1d15e3451707e3ccbf4b13eedda94 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Dec 13 15:57:39 2007 -0800 + + Modified X11 plist to use x11-exec + (cherry picked from commit 7d9a11329e476f45e4d9f9aebcb43469321347c7) + +commit 1a5910588a60af0c136595e2457d897d9e54ac88 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Dec 13 15:55:28 2007 -0800 + + created x11-exec wrapper, which uses LaunchServices to find + (and then exec) X11.app + (cherry picked from commit fc04c9759b30d062111d4a7f3f411ed0f18cbde4) + +commit c8feb73f5841e7812d8dfdb91f1064e2033d028c +Merge: 9a7ce57 a125ce4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 13 18:38:25 2007 -0500 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + Xext/EVI.c + Xext/bigreq.c + Xext/cup.c + Xext/dpms.c + Xext/fontcache.c + Xext/mitmisc.c + Xext/xcmisc.c + Xext/xf86bigfont.c + Xext/xtest.c + configure.ac + dbe/dbe.c + hw/darwin/darwin.h + hw/darwin/darwinEvents.c + hw/darwin/iokit/xfIOKit.h + hw/darwin/iokit/xfIOKitCursor.c + hw/darwin/quartz/fullscreen/fullscreen.c + hw/darwin/quartz/fullscreen/quartzCursor.c + hw/darwin/quartz/quartz.c + hw/darwin/quartz/quartzCommon.h + hw/darwin/quartz/quartzCursor.c + hw/darwin/quartz/xpr/dri.c + hw/darwin/quartz/xpr/dristruct.h + hw/darwin/quartz/xpr/xprCursor.c + hw/darwin/quartz/xpr/xprFrame.c + hw/xfree86/modes/xf86RandR12.c + include/cursor.h + miext/rootless/rootlessCommon.h + miext/rootless/rootlessScreen.c + miext/rootless/rootlessWindow.c + render/picturestr.h + + Trying to pick up the pieces from the darwin churn here... + +commit efcdc0d7010f4e6ec833842cb010a07068edf7ab +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 13 15:38:41 2007 -0500 + + Correct the documentation comments in xf86Modes.c + + Most of those functions do not, in fact, work with circular mode lists, + and by this point the API isn't really "proposed" anymore. + +commit 1768af38c737f4c14d32f587b51a8ec3d3d6ed5f +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 13 15:06:18 2007 -0500 + + Add infrastructure for validating modes by memory bandwidth. + +commit 4359193aaa522599c502d012b9c163e993c01d79 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 13 10:59:48 2007 -0500 + + Explain a confusing #ifdef. + +commit 8cedbb0a53d47b12f03edb726db9d5879c8a63a4 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Dec 13 10:57:35 2007 -0500 + + Clean up some #if 0. + +commit 9a7ce573636e349ee2967991c7cc1407e80ae524 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Dec 12 20:44:59 2007 -0500 + + xselinux: Add new protocol for setting device create context. + +commit a125ce4a84f5fb5934fefebd7cfb22a83180874d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Dec 12 12:20:54 2007 -0800 + + Fix dist by including modeline2c.awk. + + This was broken by commit cb44b6121c4b7b9dd7ff4ff52aaab914c82ff013, which + removed modeline2c.pl from EXTRA_DIST without adding modeline2c.awk. + +commit 671592343701d8174a70f1ffb9c818784ea3af7a +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Dec 12 10:59:15 2007 -0800 + + Get rid of xf86DefModes.c. + + It's out of date and not included in the build. Instead, xf86DefModeSet.c is + built from vesamodes and extramodes using modeline2c.awk and *that's* what gets + built. + +commit d86e7f2ecc0a0129a722ffaca93dfc7c0c60e842 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Dec 7 20:40:21 2007 +1030 + + dix: when getting a bogus event, at least print out the type. + +commit eab0c4e49015fe96f6d985316f9c5fa28a7eb1fe +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Mon Dec 10 20:57:24 2007 -0800 + + Xquartz: Pre-process Xquartz man page + (cherry picked from commit dec2633c41dd0adf73264afdf251a6522d6ae76a) + +commit 1ff945a8e43e622b39b360ee49efd6ae3b77be67 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Mon Dec 10 20:47:48 2007 -0800 + + Xquartz: Make Alt work with Xmodmap again + (cherry picked from commit 0e017177dcca7185716ca760dcce9ddedc7bfef9) + +commit 7d61893b49569a72bccb63f1ae8c9ce4ef4e354f +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Mon Dec 10 20:33:30 2007 -0800 + + Xquartz: Removed Xplugin.h from EXTRA_DIST + (cherry picked from commit a746383eca77c9b9ea2cba0cf1c8fc39c0f7d536) + +commit 8f2eff643bf421bc4233fbaa2409b75d9f80d147 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sat Dec 8 23:34:40 2007 -0800 + + remove Xplugin.h, because we should use the one in /usr/include + (cherry picked from commit 3e881032f35f774ff9638678d7e3f77c81f62976) + +commit 7b573ed43672b1fac7b4e6df85a657942ab4cba6 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sun Dec 9 12:02:04 2007 -0800 + + Xquartz: Added missing link to libconfig.a + (cherry picked from commit 14ec1cf1cb7ebc183c05e13f9c2b4b4eed679ff3) + +commit cd13c4ba5b7a1bdfb419cb492a96a72dccf2681e +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 8 13:18:17 2007 -0800 + + .gitignore: added hw/xquartz/bundle/org.x.X11.plist + +commit 020b0e92b039d6ddaea0bbdb890b6a01037bf9b6 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 8 11:49:37 2007 -0800 + + Xquartz Added quartzKeyboard.h to EXTRA_DIST + (cherry picked from commit 37c9781fdb672229ceab101b080762e15512943f) + +commit 5e016fa9b2bf28971ed1794f4706c6538b1d411c +Author: Ben Byer <bbyer@bbyer.local> +Date: Sat Dec 8 06:12:46 2007 -0800 + + Added darwinEvents.h to EXTRA_DIST + (cherry picked from commit 45e5247564c423a2bf02cfec1993155858c91a14) + +commit 6bb5dacc1710cdbededb9b28ba89a184ecd0931c +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 8 01:41:37 2007 -0800 + + Xquartz: Actually add quartzForeground.[hc] + Sorry for the commit spam... I'm tired and was overly quick to commit... forgot to include a neccessary file. + (cherry picked from commit e564b7aeaab63e4c943445275af680b3b5898a94) + +commit 02df03667052fa6a4e0405b91a005dc48e9b39c4 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 8 01:28:26 2007 -0800 + + Xquartz: Actually, it should be org.x.X11 for case-sensitive FS + (cherry picked from commit c5ccb98d5d461c8a22fc0f3942a607ac90e1e37e) + +commit 740cc54f081393d4ffe1a3e91c9e504dfaee3fe9 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 8 01:24:58 2007 -0800 + + Xquartz: Use org.x.X11 instead of com.apple.X11 for preferences + Fixed inconsistency so preferences get read from the correct source. + (cherry picked from commit a74c38bd9f28735acd602d359d7ca6357aed1e93) + +commit 41a0aeaae9b7b2f8cc2468fd1f3ee11287d34828 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Sat Dec 8 00:13:47 2007 -0800 + + XQuartz: Fixed "Multiple Dock Icons" + BAM! + (cherry picked from commit d0dca8a88506f50b51f41f99a2f1feb6954c8a31) + (cherry picked from commit 0502955a2af487b51bf22916ac02e497c2d96aba) + +commit a1b0346853720e98963910b82603c5cda72bb7f9 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Dec 7 23:26:11 2007 -0800 + + XQuartz: Cleaned up configure, X11.app path in launchd script + Don't hardcode X11.app's path in the launchd plist. + Only install the launchd plist if we --enable-launchd. + (cherry picked from commit 6b74c535dc331d1d621b2541492a3336f69d70a2) + +commit 1157cfcc5a4e2a7299a4c48df04a1cc8d5093906 +Author: Ben Byer <bbyer@bbyer.local> +Date: Fri Dec 7 21:55:42 2007 -0800 + + Just a couple of small uninitialized pointer fixes + (cherry picked from commit d12b650362da100ceaecb7e859cd4ef1908d4407) + +commit 0ad1c359c5b0be63748f5c630c97be88a8cc92ce +Author: Jeremy Huddleston <jeremy@dhcp-38-248.EECS.Berkeley.EDU> +Date: Fri Dec 7 18:54:58 2007 -0800 + + Darwin: Use __APPLE__ instead of __DARWIN__ + (cherry picked from commit 54654815fa5e59b25cfd1fa72610120b72c10175) + +commit 85ed0bb44011312dfaa9f2dc31642a0f89ec0bd3 +Author: Brice Goglin <bgoglin@debian.org> +Date: Sat Dec 8 02:53:27 2007 +0100 + + Add a missing linebreak after LoadModule: "foo" + + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=454742 + +commit 4fc288a13f825db942c9dcd64f4abd0265652faf +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 7 17:28:37 2007 -0800 + + Check for <sys/sdt.h> as well when determining to enable dtrace probes + + Avoids auto-detecting dtrace is present on systems with the ISDN trace tool + named dtrace installed, but not the dynamic tracing facility named dtrace + +commit 67907904f094c803d5faf6fa2ce23c01f9a5a521 +Author: Ben Byer <bbyer@bbyer.local> +Date: Fri Dec 7 01:51:53 2007 -0800 + + fixed pathname in GL/apple/Makefile.am + (cherry picked from commit b6357cec6d837226009c0d2b69026027da36656e) + +commit 56f5066d477836a975122f4e5748c0f4fb790175 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Dec 6 20:51:32 2007 -0800 + + ALLOCATE_LOCAL is dangerous on Darwin due to memory layout differences + from Linux, so let's define NO_ALLOCA. + (cherry picked from commit 7caf51d1a5a86ae884e0087795636222c082962c) + +commit c238ef06a270c0c1d48cdb9175b6d5815c7c2a49 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Dec 5 21:36:34 2007 -0800 + + Darwin: Dead coded removal + Kill off assert macro + (cherry picked from commit d6493abedb2caf03b2bc3a6440b637df67eff081) + +commit 3a058456e0ce531b21ae2b37be8868b8e0d56e56 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Dec 7 20:23:36 2007 +1030 + + mi: unify ErrorFs, prepend [mi] + +commit c5acf401dad6fbca47f2bb870185c1d08ac947a5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Dec 7 20:19:43 2007 +1030 + + mi: unify last two ErrorF's in mieq.c + +commit 117458d2db49efd3f04432ff45871b44c7d4ad57 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Dec 7 20:18:49 2007 +1030 + + mi: change infamous "Tossed event ..." error for something more explanatory. + + Few whitespace errors fixed. + Two ErrorF's prefixed with [mi]. + +commit 8a8239f2e21795602fcff5281833b350e6b2a286 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Dec 5 21:23:36 2007 -0800 + + Darwin: Renamed DarwinModeBlah to QuartzBlah + (cherry picked from commit 08ebf86d379b1ddfb08df65d29aea5df66de4327) + +commit 540439a966cce3fc68a7e4bffdb5bcab1b20725f +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Dec 5 20:55:06 2007 -0800 + + .gitignore: Added Xcode user files + +commit bc65a243930e4b02f06a861495420b0a120eae8c +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Dec 5 19:43:49 2007 -0800 + + Darwin: Flattened quartz into darwin, renamed darwin xquartz + Leaving xpr unflattened since we want modularity to replace that with xpc (XPluginComposite) at some point + (cherry picked from commit 48e6a75fbdd0fee86e364f02ace83f20b312a2b2) + +commit e00f7061b22001989edf5bd38c2d0cc1566fdd19 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Tue Dec 4 23:18:37 2007 -0800 + + Darwin: Cleaned up keyboard interface headers + (cherry picked from commit 141f69dc3d8d6e7d8ff65607f43700ac11243041) + +commit cb44b6121c4b7b9dd7ff4ff52aaab914c82ff013 +Author: Andrew Oakley <andrew@ado.is-a-geek.net> +Date: Wed Dec 5 20:23:05 2007 -0500 + + Fix commit aa0dfb3f42f19bb351ca7f1a9507ff5ec4590e96 + From bugzilla bug 13467¹: + + Currently the xserver fails to build without this (now deleted) file, as the + Makefile tries to distribute it. The patch simply removes the reference to + modeline2c.pl. + + 1] http://bugs.freedesktop.org/show_bug.cgi?id=13467 + + Signed-off-by: James Cloos <cloos@jhcloos.com> + +commit 320abd7d1d906807448fa01ad3377daf707f46cc +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 5 19:37:48 2007 +0000 + + XKB: Actions: Don't run certain actions on the core keyboard + + Don't run VT switches, terminations, or anything, on the core keyboard: only + run actions which affect the keyboard state. If we get an action such as VT + switch, just swallow the event. + +commit 85dd8efac1bc0715f03c99d261b1c5d0980623e1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 5 19:36:59 2007 +0000 + + WaitForSomething: Ignore EAGAIN + + If select ever returns EAGAIN, don't bother complaining. + +commit b7f3618f3933a810778093fd47564a1e3bf3fde6 +Author: Rich Coe <Richard.Coe@med.ge.com> +Date: Wed Dec 5 19:36:37 2007 +0000 + + OS: Connection: Keep trying select while it gets interrupted (bug #9240) + + If we got interrupted (EINTR or EAGAIN) during select, just try again, rather + than shutting clients down on either of these errors. + +commit d8b2cad3771a09860e7be1726f67e684cf7caeec +Author: Rich Coe <Richard.Coe@med.ge.com> +Date: Wed Dec 5 19:31:07 2007 +0000 + + OS: Connection: Don't shut down disappeared clients (bug #7876) + + If a client disappears in the middle of CheckConnections (presumably + because its appgroup leader disappears), then don't attempt to shut it down + a second time, when it's already vanished. + +commit a8e27a108abeba73b2888da4e0604008f4b02045 +Author: Kanru Chen <koster@debian.org.tw> +Date: Mon Dec 3 12:46:45 2007 +0000 + + Config: HAL: Fix XKB option parsing + + Actually combine the XKB options into a string, rather than just repeatedly + writing a comma. + +commit 2d723bbd0d36f6d7763b4df3298d40720f97fdd0 +Author: Peter Harris <peter.harris@hummingbird.com> +Date: Mon Oct 29 18:05:19 2007 -0400 + + Add missing swaps in panoramiXSwap.c + +commit 0fccb24aa978b838cf0fb008e9695837e612c529 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Nov 30 20:35:26 2007 +0200 + + ProcessOtherEvent: Don't do double translation of button events + + We already deal with the button mapping in GetPointerEvents, so don't + do the remapping again in ProcessOtherEvent. + +commit c6cfcd408df3e44d0094946c0a7d2fa944b4d2d1 +Author: Hong Liu <hong.liu@intel.com> +Date: Wed Dec 5 17:48:28 2007 +0100 + + Bug 13308: Verify and reject obviously broken modes. + +commit 8d0efe4c2a48047680af40e5f6d639f426902e07 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Tue Dec 4 17:59:13 2007 -0800 + + Darwin: Rework build system to more accurately reveal code infrastructure and facilitate future modularity. + (cherry picked from commit e8399fd4d66a2b77b770c277e2fa424229a721b2) + +commit cc98a8e2415f12c7a90fd846d1ec858068e8c796 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Mon Dec 3 23:59:19 2007 -0800 + + Darwin: RIP dumpkeymap, cr, and fullscreen + Taking out the trash. + We don't need dumpkeymap since we'll be getting keymaps straight from the OS. .Xmodmap should be sufficient for any user-needed changes. If this is not + the case, please let us know, so we can address any problems you have. + fullscreen never worked AFAIK + cr isn't being used and xpr is much better. + (cherry picked from commit e41af2967e885466c4d194fa4c3b358e6be37c30) + +commit 13af2d1efcc83d1412a4c727afddd97577b00f32 +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Dec 4 17:36:21 2007 -0500 + + Restore xf86getsecs() as not having an ANSI equivalent. + +commit 447cd5d411875b62eb1a501bf00e604225b74d26 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 4 19:09:37 2007 +1030 + + dix: update comments about inputInfo.pointer. + +commit f44d7dcb5fefca3ddfd45e75d0bd0b47ec785e48 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 4 19:07:46 2007 +1030 + + dix: change the filters to be per-device. + + If we have one global filter, one pointer may change the filter value and + affect another pointer. + + Reproduceable effect: + blackbox and xterm, start dragging xterm then click anywhere with the other + pointer (attached to different masterd device!). The button release resets + the filter[Motion_Filter(button)] value, thus stopping dragging and no event + is sent to the client anymore. + Having the filters set per device gets around this. + +commit 0931f40bf1bd6e00b8d95968d761a495b2c9a46c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 4 17:08:56 2007 +1030 + + dix: comments, whitespaces, copyright fixes. + + Removing my copyright message for now, should eventually be in line with the + rest of the messages. + +commit 09c0c1a3cc4807813774a3c0e28a7ba9a87bb5c7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 4 16:51:52 2007 +1030 + + dix: remove #ifdef XINPUT. + + No escaping XINPUT anymore. + +commit f8d7729df388c142624def36ba6d8c3b15922018 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Mon Dec 3 20:20:05 2007 -0800 + + Darwin: Combine launcher and server X11.app + This should hopefully eliminate confusion some people have over which X11.app is which. + Now BOTH are in /A/U/X11.app and we intelligently determine whether to execute our app_to_run + or launch the server. If arguments are given, we launch the server. Otherwise if we can + connect to an X DISPLAY, we execute app_to_run. Otherwise, we launch the server. + + (cherry picked from commit e7026216ccaa8e4fb073800ba947c9909d4faada) + +commit 678f786715d76e972f8a77807c9caf3e90c24418 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Dec 4 12:24:47 2007 +1100 + + xf86crtc: oh mon could be NULL, so check before quirks + +commit a9df4bb555fd91707a68794c2dce24fb06e6cf64 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Dec 4 12:17:29 2007 +1100 + + xf86Crtc: pass correct parameter. + + quite how this has worked I've no idea. + +commit fe25f897c62bb324660217e15dbd3091c808dbba +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 3 18:34:40 2007 -0500 + + xf86getpagesize -> getpagesize elsewhere in os-support/ + +commit b84f2833a681585162b8dabfb02ff62e7e0ef4d6 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 3 14:52:17 2007 -0800 + + xf86getpagesize() -> getpagesize() in os-support/solaris/sun_bios.c + +commit aa0dfb3f42f19bb351ca7f1a9507ff5ec4590e96 +Author: James Cloos <cloos@jhcloos.com> +Date: Mon Dec 3 16:57:58 2007 -0500 + + Remove Perl dependency from the build + From bugzilla bug 13467¹: + + The modeline2c script is the only part of the Xorg server that requires Perl. + [This] is a simpler replacement that works with any normal AWK. + + 1] http://bugs.freedesktop.org/show_bug.cgi?id=13467 + + Bug was posted by Joerg Sonnenberger <joerg@NetBSD.org>. + +commit 60086d90168265795e07a60939e9e2fe95c6e15c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 3 11:30:58 2007 -0800 + + Use pkg-config to get -I, -L & -R flags needed for OpenSSL + + Still just uses -lcrypto instead of the full library list from --libs + +commit b77ca7cc9c23184c4ab367baf1b3ed0acf27c269 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 3 11:29:54 2007 -0800 + + Use _X_EXPORT instead of __attribute__((visibility("default"))) + +commit 1faba797cbfe1a4804b7ea6b47e1ca9d4e4324e4 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Dec 3 14:12:58 2007 -0500 + + Death to libcwrapper. + + This has been deprecated since 1.1. Since we're breaking ABI again anyway, + remove it entirely. + +commit 28b93d74a11a1064d68a214fcaa7b0aede864a38 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Dec 3 14:32:53 2007 +1030 + + ephyr: miPointerWarpCursor needs the device parameter. + + Thanks to Mitchell Quille for spotting it. + +commit 004876355b43fb4d3c2bc5653a7dc1bfd3f985ee +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 30 13:56:04 2007 +1030 + + dix: Remove RegisterPairingClient and UnregisterPairingClient. + +commit f4dc521b38560c8f93b614316a3a5511941a93a9 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Sun Dec 2 18:21:40 2007 -0800 + + Darwin: Added {/,/System/}Library/Fonts to DEFAULT_FONT_PATH + (cherry picked from commit b0069b04dddaa2df6d4cdf86f96fd8a2a257e47e) + +commit 0fff01f5660fb3bb9284f97c45dc76154435d02b +Author: Adam Jackson <ajax@aspartame.nwnk.net> +Date: Sun Dec 2 14:15:36 2007 -0500 + + Fix swapped Xv dispatch under Xinerama. + + Same-endian dispatch was properly calling through the Xinerama wrapping, + but other-endian dispatch wasn't. + +commit fa47910045c3700d8d668b5e214e5ffc1e8dc3e7 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Dec 2 12:39:05 2007 -0500 + + Clean up many #if 0. + +commit 83ba1e167c1473ac7d85239a6ee5ed629353cb16 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sat Dec 1 18:28:19 2007 -0800 + + added missing call to xcb_connect() + (cherry picked from commit dc2fb323ee11f081d447605be151024f9e2487f9) + +commit 9ad4560b3cbd42e647d6227746d4d037616d57cf +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Sat Dec 1 16:23:23 2007 -0800 + + Darwin: Alt is Mode_switch Switching to Mode_switch to maintain compatibility with Tiger X11. + (cherry picked from commit 8a76c99c0ebbaf7375f3a9c75c4f7921a79024da) + +commit f83d758dcc4878849a851c8466f6fa16b2b7cd8e +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Nov 30 16:11:15 2007 -0800 + + Darwin: properly implemented xcb check for stale sockets + (cherry picked from commit f543cb8fbb3d9213cb03396f4252ab9821319993) + +commit f54b28eeba119c42d0fcccfbe295306dd670221a +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Fri Nov 30 16:09:23 2007 -0800 + + Darwin: Undo focus-hack which didn't work right. + +commit f30abe30c5fea10e680aa12f3fe37ee8ce1a0201 +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Nov 30 13:52:06 2007 +1000 + + edid quirk for MAX 0x77e monitor + + From RH bugzilla 306441 + +commit 6216abe0c1a94efa4b2f0d14e88278f128304cd2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 30 11:34:24 2007 +1030 + + dix: avoid activating the VCP/VCK twice. + + This may set dev->key-xkbinfo to NULL, causing a segfault in xkb code lateron. + Spotted by David Huggins-Daines. + +commit 9eb8ea9e615ebd8b568711eeca36aa84aa781ad3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 30 11:32:59 2007 +1030 + + dix: only freeze the paired MD on a grab, not all other devices. + +commit 8a079be0dd0f2ce37868988cde4ac8895522b088 +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Thu Nov 29 02:19:22 2007 -0800 + + Darwin: #ifdefs around dix-config.h include and NDEBUG/assert.h workaround. + (cherry picked from commit d2b768890f0878ae4e3fec8f7219e82b79256133) + +commit 38397560612424b5b348f34c1a0bea8c47a574be +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Wed Nov 28 23:07:41 2007 -0800 + + Darwin: Removed support for darwinSwapAltMeta + (cherry picked from commit 3d153c8fa40986d194b7701f5eafa0080e32399a) + +commit 89c3dfe41e3a17a4f27b20e23623dc5777670feb +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Nov 29 19:57:24 2007 +1100 + + modes: use xf86RandR12Index to stop illegal access + + xf86RandR12Index set to -1, and if initialised it gets 0 or higher. + This allows the server to start with xinerama turned on with only one head + +commit 725710fd0bc990b2c35e4c76128ef1c668013299 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Nov 29 19:40:53 2007 +1100 + + randr: make randr code not segfault when xinerama set + +commit e4fe0a3cb789b8757f1c80f606dfe32bccada582 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 29 09:55:24 2007 +1030 + + xkb: swap a LookupKeyboardDevice over in favour of GetPairedDevice + + The former always returns the VCK, which is obviously wrong if we have + multiple devices. + +commit 23b8ca8a373d919225de9739af7b064f650eceec +Author: Adam Jackson <ajax@redhat.com> +Date: Tue Nov 27 13:20:40 2007 -0500 + + RANDR 1.2: Only enable unknown outputs if there are no connected outputs. + + Otherwise you end up with a confusing initial geometry, and xscreensaver + and friends get very angry. + +commit edebe76cfdb31072d18a6fcd3ee8f1d95006855f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 27 10:22:44 2007 +1030 + + Xi: set DeviceXXXState's length fields to the correct size of the struct. + + Setting it to the size of a pointer is an interesting but equally wrong + approach. Luckily Xlib never used this field anyway so nobody got hurt so far. + + Spotted by Simon Thum. + (cherry picked from commit 0f2398d06ce591724e388b3270800c5e22b3de2d) + +commit 0f2398d06ce591724e388b3270800c5e22b3de2d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 27 10:22:44 2007 +1030 + + Xi: set DeviceXXXState's length fields to the correct size of the struct. + + Setting it to the size of a pointer is an interesting but equally wrong + approach. Luckily Xlib never used this field anyway so nobody got hurt so far. + + Spotted by Simon Thum. + +commit 601307615e4955be23fd86a057285074242ad83e +Author: Jeremy Huddleston <jeremy@yuffie.local> +Date: Mon Nov 26 13:04:57 2007 -0800 + + Darwin,Rootless: Makefile cleanup + (cherry picked from commit 9c6d8a035b712b219833653ac637b89703a9b0c3) + +commit 8503072e1c2b89dca786d4afb72aa60a170d2fbd +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 26 16:52:41 2007 -0500 + + registry: add missing include statement. + +commit 996b621bec1bbc4fb21970c75eaec62053bc6ccb +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 26 15:59:44 2007 -0500 + + registry: swap out the DTRACE XErrorDB stuff for the new registry call. + +commit 54cb729ecc2d366c1af836cb3d2ffc8e864e9b79 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 26 15:59:01 2007 -0500 + + registry: Add a call for DTRACE compatibility. + +commit decd5a7c605e42c99b6a4523c8e1833b859d9b24 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 26 15:26:49 2007 -0500 + + registry: Rebase registry to use the server config file of protocol names. + +commit 9b0e72c8d960d056276f5fa93f3cc2872825711e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 26 15:26:04 2007 -0500 + + registry: Add a great big list of protocol names, like the XErrorDB that + ships with Xlib. This is considered temporary, until server-side XCB can + solve the problem programmatically. + +commit c0f9e204baf0218466973868c5ea6ed0f78e6b8b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 26 15:24:15 2007 -0500 + + registry: rename the SERVERCONFIGdir and relocate it to /usr/lib/xorg + by default. + +commit a344920ae86c1970e4cc34ee91e2f2008d490c49 +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 26 11:53:08 2007 -0500 + + Allow Virtual to be specified globally in the Screen section. + + The Display subsections are optional, and it's confusing to need to create + them just to set a Virtual size. + +commit c6c284e64b1f537a3243856cf78cf3f2324e4c2b +Author: Matthias Hopf <mhopf@suse.de> +Date: Mon Nov 26 15:38:20 2007 +0100 + + Initialize Mode with 0 in xf86RandRModeConvert. + + Asking for trouble if non-initialized values contain random data. + +commit a4edfbef022f9635c2c9b9eb229cb622834dc68c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Nov 24 16:16:48 2007 +1030 + + mi: only call UpdateSpriteForScreen if the screen actually changed. + + If we call it unconditionally, we flip the dev->spriteInfo->sprite permanently + when using XTestFakeInput (once in CheckMotion as called from the + processInputProc, another time in UpdateSpriteForScreen when we actually warp + the cursor). USFS also updates to the screen's root window unconditionally, + which is not really what we want if we haven't changed screen at all. + +commit bf3198c8c56289244c58d36c6869442479fd3481 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Nov 24 15:00:57 2007 +1030 + + dix: fix typo + +commit 5dabe448bda68a483bf444a4adfed2b25b30f600 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Nov 24 15:00:43 2007 +1030 + + dix: Add special treatment of NotifyUngrab for enter/leave events. + + In some cases (e.g. using x2x) the previous model broke, with a window ending + not counting down to 0 anymore. Special treatment for NotifyUngrab seems to + help here. + + Current solution: If a NotifyGrab is to be sent ignore it. If a NotifyUngrab + enter is sent, only adjust the semaphore if it is on 0. Likewise, do the same + for a NotifyUngrab leave if the semaphore is on 1. This seems to work alright + so far. + +commit 33b94da6327d3423b4ebc1a58d5894c9904e67c9 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Nov 23 16:01:11 2007 -0800 + + Re-add call to XFixesExtensionInit for static servers. + + This reverts a portion of bcbaf2a0ce34b6c5e41d2831b8b87dbd0617a89b which + removed the call to XFixesExtensionInit and some cpp lines. + +commit f6401f944d327cc5d9a7ee0bbdf4f7fc8eaa31e8 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Nov 23 16:12:49 2007 +0100 + + Don't segfault if referring to a relative output where no modes survived. + +commit fa19e84714aa84a2f2e817e363d6440349d0b619 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Nov 20 16:54:50 2007 +0100 + + Fix initial placement of LeftOf and Above. + +commit 184e571957f697f2a125dc9c9da0c7dfb92c2cd9 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Nov 20 13:05:26 2007 +0100 + + Adjust offsets of modes that do not fit virtual screen size. + + Fixes memory corruption if a too small "Virtual" was specified in xorg.conf + for the selected multi-monitor configuration. + +commit a80e64f1503a4d8b11c4a6608d296422c69e3e8b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Nov 17 22:50:07 2007 +0100 + + XKB: Generate correct key repeat events (bug #13114) + + Make sure we send the correct event for the type of device when we're + sending key repeat events, which stops repeats being sent to incorrect + windows. + +commit 63351df0eec320aa3ce27d4d2ee6bcdb58aa2d92 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 18:02:07 2007 -0800 + + Darwin: Fix compilation/linking problems + +commit bf4ef4da759c01e6794ed28ba4988a2c8ee049bf +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 17:45:15 2007 -0800 + + Darwin: Remove the PaintWindow optimization which snuck back in. + +commit 2082e7aa878fe1221fd50895a9de1f408b3157a8 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 17:18:48 2007 -0800 + + Rootless: Remove the PaintWindow optimization which snuck back in. + +commit a751bc12bee1d4d2ed35e3a0c64d9c8c9bf30a82 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 13:53:00 2007 -0800 + + Rootless: Imported changes made in xorg-server-1.2-apple branch + +commit 59c7ca6586e7c20e28ad407ca9a0883c4d621d64 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 13:29:15 2007 -0800 + + Darwin: Added missing Makefile.am + +commit 23596291c30a85e38c00aef2c01b46d561e2916e +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 13:17:44 2007 -0800 + + Darwin: More syncing witn xorg-server-1.2-apple + +commit 4e18c626350c7c2e0fb540aa64a98957699f3abe +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 12:21:59 2007 -0800 + + Rootless: Pulled in changes from fb{Blt,Fill} into rl{Blt,Fill} + (cherry picked from commit 3f857e129df7ce492191e0c51b8e53eaf6179366) + (cherry picked from commit 70374a58937d7a6f01c210bd6ac66cafb63e895a) + +commit ed9524d36e42a310bb128284f2b507f76b8c40d9 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 01:07:02 2007 -0800 + + Darwin: Copied over missing file (Localizable.strings) from xorg-server-1.2-apple + +commit 4d9cef197b12548e0716dab3557e48311519e325 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Thu Nov 22 00:35:09 2007 -0800 + + Darwin: Misc cleanups to line up with xorg-server-1.2-apple + +commit 5e950123daa167c9ffe289b3bd89e3bd288da0e3 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Wed Nov 21 23:32:00 2007 -0800 + + Darwin: Removed cvs tags from Xquartz man page + +commit 3a2f714eea475a13cde65921e24c7ee3f70ffc3c +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Wed Nov 21 23:30:37 2007 -0800 + + Darwin: Removed .svn dir + +commit 691da031319dc59b9496101358c267f317abfd1e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 22 17:44:39 2007 +1030 + + Xi: allocate motion history for master device. + + We're still missing out on the actual content of the history but at least this + way we don't segfault. + +commit 602de4f70b6f4aab93b514f3a01917bd5d4ad640 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Wed Nov 21 16:53:10 2007 -0800 + + Darwin: Use UTF8String since lossyCString is deprecated + (cherry picked from commit 1786f9464af51ff606a612aec6fe420fa9688a28) + +commit 13666e287c347aab2a5e9d8ee5f6bb29b9b85171 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 18 17:44:12 2007 -0800 + + Darwin: Added some DEBUG_LOG sauce to the XP_EVENT handling code + (cherry picked from commit ec84a4cef66a2b46ed71f9758c434ea629d2f270) + +commit 829b6641bd64c352e1e8a7c619f84dedbdb07a09 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 18 17:43:40 2007 -0800 + + Darwin: Disabled ALT_IS_MODE_SWITCH + (cherry picked from commit fd181254f85543558190140787dc7b41f6cf90db) + +commit 8486f8af91b477c7bcb8438a0e9a72d0c11d1d63 +Author: Ben Byer <bbyer@bbyer.local> +Date: Thu Nov 15 02:25:50 2007 -0800 + + Darwin: Added a lightweight debugging facility to support troubleshooting + (for example) the stuck modifier key issue + (cherry picked from commit 0e0b452d10c0af55497c3299b5f3db45d5b381cb) + +commit 74214a9f42b931f99d83ddb4efb3720881a2de16 +Author: Ben Byer <bbyer@bbyer.local> +Date: Thu Nov 15 00:56:54 2007 -0800 + + Darwin: Patch to avert (some) damage / rootless crashes, courtesy of Ken Thomases + (cherry picked from commit 148a87ff20aa5e7a6d839610aa14fa1a31505c4a) + +commit f5f833b80609f1f98c93113183bd2b1bab3bfec9 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 11 04:30:34 2007 -0800 + + Darwin: These changes are necessary, yet not sufficient, to get 8-bit indexed + color mode working in Xquartz. + (cherry picked from commit a415f62f5289fae99ea9b0038d21fad7695b1336) + +commit 8358334180a4f8c1e73fc5647a62bcd3539dee45 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 11 04:30:00 2007 -0800 + + Darwin: Fixed the call to xp_init so that we now receive Motion notifications even + if X is not the active application. + fixes <rdar://problem/5167664> xeyes dead until window activation + (cherry picked from commit c7573379a85a1480cc51650075078e41dafe56af) + +commit 512dee90878e552ad1b2bb5b27366707f6464f28 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Nov 8 22:17:38 2007 -0800 + + Darwin: fix for spurious "Are you sure you want to quit?" message + (cherry picked from commit 30cbfc786e4fedda3fe070bacceabe1d9212d00b) + +commit 28e73e99a9a59223963312c5dd43ce5566d1db9d +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Nov 8 22:12:41 2007 -0800 + + Darwin: Adding "fake RandR" support from old X11.app + (cherry picked from commit 633490c4e8dab30af7ecbe1bef076c22ad5f5da9) + +commit 01b70afaac0990b41d1fb6fadbfd64df1486b669 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sat Nov 3 05:34:19 2007 -0700 + + Darwin: Initial support for Spaces -- if you use Expose to drag an X11 + window to another Space, it will work correctly (as opposed + to just leaving a ghost window). We accomplish this by listening + for the notification from Xplugin that our window has been moved, + and then we ask X11 to move the window to the new location. + (cherry picked from commit 2d50ea8013e7c1639d570e227b53b037fb567565) + +commit b39edc01a6588697b65f831e8ab1dbb24cbe7b24 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Oct 31 23:46:50 2007 -0700 + + Darwin: Swap modifier keys for buttons 2 and 3 -- now Option-click is the middle click + (cherry picked from commit 0aa61293b62aeb69a93b2035d0aef8644343eed3) + +commit 606a8dc73d91a198d72d249934dc027a23f4c338 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Oct 31 03:39:47 2007 -0700 + + Darwin: Trap Deactivate messages and release modifiers to avoid "stuck shift lock" (etc) bugs + (cherry picked from commit 2b189a99330eb465fa0d17020fb1db1e38829151) + +commit 4c18ef4331aaee268431a3ba50991f0312b82870 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Oct 31 03:22:18 2007 -0700 + + Darwin: Workaround for a bug where the holding down Command to make a "fake" + button 2 click would actually result in a Command-2 chord. + (I.e. it wasn't releasing Command before clicking the fake button.) + (cherry picked from commit 0d5dd5dffa4c5ce3f54dfe53720a39d524dc8e37) + +commit f9269bebae27bbc9d0e03e02943166b83946623d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 22 17:30:14 2007 +1030 + + DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec. + + We free the ValuatorClassRec quite regularly. If a SIGIO is handled while + we're swapping device classes, we can bring the server down when we try to + access lastx/lasty of the master device. + +commit 7f2972d47a5d74fe92268c6d609b1eb6ad845824 +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Wed Nov 21 21:59:59 2007 -0800 + + Darwin: Really add launcher this time + +commit bcbaf2a0ce34b6c5e41d2831b8b87dbd0617a89b +Author: Jeremy Huddleston <jeremy@tifa.local> +Date: Wed Nov 21 19:51:14 2007 -0800 + + Darwin: Dead code removal, Code cleanup, Added launcher + Imported changes from xorg-server-1.2-apple to make master more current wrt + file layout, build system changes, and dead code removal. + +commit 9ed43eff48201520797f89a12bb3b2f5819bd99f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 21 17:16:27 2007 +1030 + + Xi: allow clients to specify pure client id in SetClientPointer. + + If no window was found with the given ID, try if there's a client with the ID. + Allows us to set the CP for apps that don't open windows (e.g. x2x). + +commit 33f15689922ad9f1193f803bc1636c82c23ab99e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 21 16:06:44 2007 +1030 + + xtest: switch an inputInfo.pointer over to PickPointer. + + Couple of whitespace fixes too. + +commit e5dd7a95791748c57cab75c0d8ba9d37f72edccf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 21 15:59:31 2007 +1030 + + Xext: Scruffy the janitor don't like no "register" keywords. + +commit a55ec1a9f4b62139dc5e5462d79d47b330c27c79 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Nov 20 18:31:03 2007 -0800 + + Restore checks for __i386 where needed for Sun compilers on Solaris + +commit 2f387d913aa76f1b6d21d8e2698be165301c6bc1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Nov 20 18:27:12 2007 -0800 + + Enable use of /dev/urandom on Solaris as well + +commit 4363d70c6b420648b501126d1fbdebfafc7ae09f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:58:55 2007 -0500 + + registry: Fix some mistakes in the reversion of prior commits. + +commit 140a4660aca1c283613d5b62f51668b44b45baf6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:49:30 2007 -0500 + + Revert "registry: Register XTrap extension protocol names." + + This reverts commit b38a91993364aa80cfd99721e319e1458d9fb760. + + Moving all the names into dix/registry.c + +commit ed8a39c48ab9dac085fcf58b9641364b5608f3f4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:47:52 2007 -0500 + + Revert "registry: Register XKB extension protocol names." + + This reverts commit a5cf3f21f712e46dbf9bca289e67be75f2b531d3. + + Moving all the names into dix/registry.c + +commit 17b0c729b553e2f0f8f82497698b282a47db3326 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:46:43 2007 -0500 + + registry: Remove registry code from XInput extension. + + Moving all the names into dix/registry.c + +commit e86852aff62a861823b8e419434e0401b8cdc8e0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:44:56 2007 -0500 + + Revert "registry: Register XFixes extension protocol names." + + This reverts commit 106758893b68033f14f69c4ee6591fb6a149ba37. + + Moving all the names into dix/registry.c + +commit 5269da2bde3cf4feb12fa2bd87bff6ee6d8730a1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:43:38 2007 -0500 + + Revert "registry: Register XvMC extension protocol names." + + This reverts commit 853ea337bdad17f8f6ec7d940de14ce2cbbbf93e. + + Moving all the names into dix/registry.c + +commit 03a86c8d5e20a6e47f3c294f0087f205cf2a72dd +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:42:19 2007 -0500 + + Revert "registry: Register Xv extension protocol names." + + This reverts commit 12766c5b5ffdab95255a63b2c8421ee773fd43b5. + + Moving all the names into dix/registry.c + +commit edcf490cdb965e2a5bfc0169c01732d2924da3ae +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:41:10 2007 -0500 + + registry: Remove registry code from XTest extension. + + Moving all the names into dix/registry.c + +commit 5fea1ed50f37691a5273bf2897479781de808ff5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:39:48 2007 -0500 + + registry: Remove registry code from SELinux extension. + + Moving all the names into dix/registry.c + +commit 9a8af33718d085656a672e4c27df200485c84154 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:38:24 2007 -0500 + + Revert "registry: Register Resource extension protocol names." + + This reverts commit 5c8b1a91726817816d20faefad21c7a68ab634cc. + + Moving all the names into dix/registry.c + +commit e6023e0208fae8f19c566f9df1a8aa20494f40ab +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:36:49 2007 -0500 + + Revert "registry: Register XPrint extension protocol names." + + This reverts commit f077578e42eee424b0e534774574c84af9d6f85b. + + Moving all the names into dix/registry.c + +commit 277345fb7065d74c3b0d076382affb78cbe67569 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:35:57 2007 -0500 + + registry: Remove registry code from XF86Bigfont extension. + + Moving all the names into dix/registry.c + +commit bf27edd365ffd275e5453f44d130eeacbfe0ecd9 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:34:14 2007 -0500 + + Revert "registry: Register EVIE extension protocol names." + + This reverts commit 48891d5696f56711f23743cb03be39cf6b26c522. + + Moving all the names into dix/registry.c + +commit 687427179420b18a55a1a02b8a9f2a32ea8eac8d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:32:54 2007 -0500 + + registry: Remove registry code from XC-MISC extension. + + Moving all the names into dix/registry.c + +commit 4b0274e8f712e51b18618a2a0bdbe03b17b9736b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:25:15 2007 -0500 + + Revert "registry: Register SYNC extension protocol names." + + This reverts commit 9f597f6c87e0b14cc382d8e5929e42f822db4329. + + Moving all the names into dix/registry.c + +commit 4c7cf5aa4c802dcde895c723879a80a87620c0f7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:23:57 2007 -0500 + + Revert "registry: Register SHM extension protocol names." + + This reverts commit 2c9646ad4e65bb061d910c9e2b1a8a978f21fa17. + + Moving all the names to dix/registry.c + +commit 67e82e306f67a215c6c89868cc1d3649747bd93d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:22:59 2007 -0500 + + Revert "registry: Register SHAPE extension protocol names." + + This reverts commit 4e274e90e16b1d954391e1af3e2074fb10f70ee7. + + Moving all the names to dix/registry.c + +commit 8583bf78ad056ffe2d83b54e5c9a0a217e425a7b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:21:09 2007 -0500 + + registry: Remove registry code from XC-SECURITY extension. + + Moving all the names to dix/registry.c + +commit 55744d8e5d7bf1ff27cd25de54e14e799dd1a70a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:19:44 2007 -0500 + + Revert "registry: Register MIT-SCREEN-SAVER extension protocol names." + + This reverts commit 58c3240fcbec23aad122e1c340f6bb6d3b18f779. + + Moving all the names into dix/registry.c + +commit 36ef45928c783292cef18acfdd83ae057826c989 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:18:01 2007 -0500 + + registry: Remove registry code from MIT-MISC extension. + + Moving all the names to dix/registry.c + +commit 816e6e612e4bc3cea1e67e7ea79d5b640458011f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:15:37 2007 -0500 + + Revert "registry: Register Multibuffer extension protocol names." + + This reverts commit 3877faf7d9fe00ed634077e38a198ae4b91a2bb4. + + Moving all the names into dix/registry.c + +commit 40a0da044e911ea51de003f3621331ffbe2842bc +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:13:43 2007 -0500 + + registry: Remove registry code from Fontcache extension. + + Moving all the names into dix/registry.c + +commit 46412baf60ed639ddc1d5fb601f73a75e39737f7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:11:06 2007 -0500 + + registry: Remove registry code from EVI extension. + + Moving all the names into dix/registry.c + +commit 460c43032f05aad3f0f552901a52d199f61c7f4f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:08:18 2007 -0500 + + registry: Remove registry code from DPMS extension. + + Moving all the names into dix/registry.c + +commit 76e89d45b497d4afa4e60e1d0ec50b62f54f6b88 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:06:40 2007 -0500 + + registry: Remove registry code from TOG-CUP extension. + + Moving all the names into dix/registry.c + +commit ce93c5772da52ab88faef7e5b661b681d5b60b1e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 18:03:57 2007 -0500 + + registry: Remove registry code from BigRequests extension. + + Moving all the names into dix/registry.c + +commit 0756d1271209e6ae14cc641dddca095271b43150 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:59:40 2007 -0500 + + Revert "registry: Register APPGROUP extension protocol names." + + This reverts commit b504678ba5407a6fd8d47d051305f7c3d5606dfe. + + Moving all the names into dix/registry.c + +commit 5aff37d1d69be493727856a29628bd782d50b90f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:57:06 2007 -0500 + + Revert "registry: Register RENDER extension protocol names." + + This reverts commit 8964c6d8e14ae47798762191e359b2bf138ca32e. + + Moving all the names into dix/registry.c + +commit e585a2ddb495b50a53e15cccc368ca0858fc9d23 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:55:47 2007 -0500 + + Revert "registry: Register Record extension protocol names." + + This reverts commit ea09c9acc8f0d5577f54c864ff88b7f03d93b2f4. + + Moving all the names into dix/registry.c + +commit d4577e485367468227e031eb434b739eff7b5e9a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:51:27 2007 -0500 + + Revert "registry: Register RANDR extension protocol names." + + This reverts commit c827db57e4d9ca14c82b099dcfc9b7a0c0b5ba0a. + + Moving all the names into dix/registry.c + +commit a541e826c9310d3051e53834833c6c3a08654148 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:50:26 2007 -0500 + + Revert "registry: Register WINDOWSWM extension protocol names." + + This reverts commit 4c3285c883cc50a91bc5262bbc9d073d816f860a. + + Moving all the names into dix/registry.c + +commit 993595430bd0580ab4d936be6b70fb91b8bb1d16 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:48:46 2007 -0500 + + Revert "registry: Register XF86DRI extension protocol names." + + This reverts commit b7786724080fd3928ef7b8c294346661d7ffd90b. + + Moving all the names into dix/registry.c + +commit 6b73c215c9d612534af290230b2e914d42d819cd +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:47:30 2007 -0500 + + Revert "registry: Register XF86VidMode extension protocol names." + + This reverts commit 960677e876c068400fb45e1764bb5470cd8c389f. + + Moving all the names into dix/registry.c + +commit 8e2cd7a804664bbd2d03789dcd5c93223122e929 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:45:30 2007 -0500 + + Revert "registry: Register XF86Misc extension protocol names." + + This reverts commit 2cd1b32b77e0ceeaccb3f01c4ac13a97c557668c. + + Moving all the names into dix/registry.c + +commit 0356153a58cef87d655bccacd8e2cf03d577bd19 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:43:18 2007 -0500 + + Revert "registry: Register XF86DGA extension protocol names." + + This reverts commit 3815284e899b61731b6a63c4ba14c5d773e24eb6. + + Moving all the names into dix/registry.c + +commit de93c1e9df14577e158b6dc3ccec7ee48f592386 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:40:57 2007 -0500 + + Revert "registry: Register DMX extension protocol names." + + This reverts commit 32f3f5a1e7654f8bb43ea16b9227b3994e616739. + + Moving all the names into dix/registry.c + +commit 2d3e0cdf4bd7ab069bad7244ede7c2d489e92b17 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:39:56 2007 -0500 + + Revert "registry: Register APPLEDRI extension protocol names." + + This reverts commit 3464b419230c6d17e940d967b567c5d2cb22d232. + + Moving all the names into dix/registry.c + +commit 546d46224e355d4f00232da5538548e3c8853e40 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:37:48 2007 -0500 + + Revert "registry: Register XINERAMA extension protocol names." + + This reverts commit b9f5ab98c8dea36dcce1ad15fd2e059a77e77c39. + + Moving all the names into dix/registry.c + +commit fd2d83d5bf5b35c8a2b05f725486be166783921e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:34:48 2007 -0500 + + Revert "registry: Register APPLEWM extension protocol names." + + This reverts commit eee46b4681ec55297604b0425705f2b18381f7ca. + + Moving all the names into dix/registry.c + +commit c934e1af27189571c1e7dd838872e380c3580eeb +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:32:35 2007 -0500 + + Revert "registry: Register DBE extension protocol names." + + This reverts commit 2e1e5be1d9067816525aa13a1d818e8ca6899599. + + Moving all the names into dix/registry.c + +commit b9ab6f300a46aa8879b11eac51857357cc379c2f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:31:00 2007 -0500 + + Revert "registry: Register DAMAGE extension protocol names." + + This reverts commit 20db50b4c44a14f7eeac2b1de17ada68482521da. + + Moving all the names into dix/registry.c + +commit 26586a7ad5e999b34996d147fb43998deea89178 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 17:27:37 2007 -0500 + + Revert "registry: Register composite extension protocol names." + + This reverts commit 166ef972febc00c665e1d5aeb68e75d7bbcf9879. + + Moving all the names into dix/registry.c + +commit fae39db7957c0ebdc7af36f8d8f484473beb6d38 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 15:21:31 2007 -0500 + + devPrivates rework: put back some changes that were mistakenly removed + during merge conflict resolution. + +commit 709c1a70c8c6a9e132bf0d92f78a12be72beee51 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 20 15:18:02 2007 -0500 + + Remove some duplicate include statements. + +commit be0cbe5a330f62cef47fffbc49e83b5e1637b7d0 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Nov 20 15:39:49 2007 +0100 + + kaa: update kaaCreatePixmap to support the new usage_int + +commit 5b0dfb73ca4699cc4b33720f10416de7440081b7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 19 21:01:22 2007 -0500 + + devPrivates rework: put back a comment that was mistakenly removed + during merge conflict resolution. + +commit 2d17f47cc7d6b174857617d31ad1b437d8e97d94 +Merge: 60be452 ea9c63e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 19 18:10:46 2007 -0500 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + hw/xnest/Pixmap.c + include/dix.h + +commit 60be452c2e88342f92a76ba5ec7d90b5b0211aaf +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 19 16:55:09 2007 -0500 + + xace: restore the old SaveScreens function and introduce new API, since the + old version is called from drivers... + +commit a95bb52b4366d85fc049130c60af5c9e727c565b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 19 16:34:38 2007 -0500 + + devPrivates rework: add missing include of dix/privates.h + +commit ea9c63e93b9bb731796e8a8de2d127e6cc720076 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Nov 19 15:53:49 2007 +0100 + + DEFAULT_DPI was undefined here. + +commit db9ae863536fff80b5463d99e71dc47ae587980d +Author: Adam Jackson <ajax@aspartame.nwnk.net> +Date: Sun Nov 18 11:57:01 2007 -0500 + + Bump DEFAULT_DPI to 96. + + 75 is just nonsense. + +commit ee2d4626dca6e0d4fc6f524e5de4bdefa2ed43df +Author: Tormod Volden <bugzi06.fdo.tormod@xoxy.net> +Date: Sun Nov 18 11:56:31 2007 -0500 + + Bug #12932: Use DEFAULT_DPI in randr1.2 instead of hardcoded 96. + +commit a46c30c3be33ffb304a885503c8aaa78396ed3d9 +Author: Jernej Azarija <azi.stdout@gmail.com> +Date: Sun Nov 18 11:44:36 2007 -0500 + + Bug #12531: RRModesForScreen can fail to allocate. + +commit fac7e7e4e1809e865b9b3cf5b7eb69ba9d3a3759 +Author: Adam Jackson <ajax@aspartame.nwnk.net> +Date: Sun Nov 18 11:39:26 2007 -0500 + + Document the requirement for interleaved code and declarations. + +commit bad96e5a864e40fbd47265d7fb6eaa67c55fac11 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Nov 18 15:02:24 2007 +1030 + + dix: getevents.c remove trailing whitespaces. + +commit 75e5e9f88c5f974d996dd81e672cd3709d361a44 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sat Nov 17 13:46:01 2007 +1030 + + Xi: add missing XI_DeviceClassesChangedMask to XI filters array. + +commit d15339a92c4d689d2ab8a86e4f10107f3e45eff8 +Author: Adam Jackson <ajax@aspartame.nwnk.net> +Date: Sat Nov 17 22:12:10 2007 -0500 + + Bug #9725: Don't look in root's $HOME for config files, that's just confusing. + +commit 748cfbc820f8cdeb544c54a6db495fecf2e2457b +Author: Adam Jackson <ajax@aspartame.nwnk.net> +Date: Sat Nov 17 21:23:05 2007 -0500 + + Disinfect mi/ of mfb. + +commit a969db091cab16a448f82782e85b3dd19c81627a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 17 22:34:47 2007 +0100 + + XKB: Don't ring the bell when we don't have a BellProc (bug #13246) + +commit c89b543198d5ec56ff025bdd6bb7229523478e58 +Author: Ben Skeggs <skeggsb@gmail.com> +Date: Sat Nov 17 18:20:49 2007 +1000 + + exa: set driverPriv to NULL before it might get used later with garbage + +commit 514ba4ca727f0b1076bc67500617722203d34daa +Author: Adam Jackson <ajax@aspartame.nwnk.net> +Date: Fri Nov 16 19:53:11 2007 -0500 + + Bug #1612: Use a stronger PRNG. + + Currently just reads from /dev/urandom, and only on Linux. + +commit 12dd6e9911de187e0ebee86434e8c24a67c990f9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 16 17:23:09 2007 +1030 + + dix: reset MD's devPrivate classes to NULL before device initialisation. + + XkbInitKeyboardDefviceStruct may call FatalError if it fails. FatalError then + cleans up all the devices, resulting in a segfault if the pointer is + uninitialised. + +commit be3321c2e9fad228a9ee5fef47680a47bc9e39a4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 16 12:12:41 2007 +1030 + + dix: Free both current classes and original classes when closing an MD. + +commit 3c39dd19ec2a53b8854279e3b03131098031473a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 16 12:12:14 2007 +1030 + + Xi: Deep-copy full list of FeedbackClasses. + + All feedback classes are linked lists and the whole list has to be duplicated, + not just the first entry. + + Xkb stuff still missing. + +commit 497862df2fcd67531fbe0f876c20a09884ee74df +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 16 11:20:22 2007 +1030 + + dix: explicitly float all attached SDs before closing down devices. + + Some drivers flush on shutdown, if our SD is still attached we'd be trying to + route an event through a non-existing device. + +commit 9de1ebe2a80164507cbe2ef688f284225e0ec808 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 16 10:45:28 2007 +1030 + + dix: Fix up class restoring when last SD disconnects. + + Old code was fundamentally broken, fixes now are: + - free the MDs current device classes + - copy the device classes instead of flipping the pointers + - check for the old MD, not the new one. + +commit 20fd4783247b1b93d9675dc36768dd1ed59ba2d3 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 17:01:33 2007 -0500 + + Small static cleanups on dix/ + +commit 70e50fa51f05663f289eeeea4521e737e8e24bca +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 17:00:37 2007 -0500 + + Allocate RRCrtcRecs with calloc. + +commit 8d0cd1cd2c57ee5a2fc4d577d8182d66369f0617 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Nov 15 12:16:36 2007 -0800 + + Fix a really dumb typo. + +commit f797c96845a3fab37cda6839ebecf9ac5401fd6e +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Nov 15 12:12:02 2007 -0800 + + Save pixmap allocation hints into the PixmapRec. + +commit 6bc50de02108f822977fc7545da81fce95ea7ff4 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 15:03:58 2007 -0500 + + Simplify system resource range setup. + + osRes only existed to get copied into Acc. Waste of effort. + +commit e1ff14a9246e12d42ce8ca5afbe3b957333a5620 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 14:45:49 2007 -0500 + + Delete some dead code in X -configure. + +commit 01cfba75229f4b9bf1e4fe80814931acdacde14c +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 14:27:03 2007 -0500 + + Nuke the debugging allocator. + + This has never been hooked up in the modular build, and can not possibly + have built since before 6.7. Clearly no one's using it. + +commit c67b9c5fc33002b13a2360929a37f24169710f64 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 14:24:36 2007 -0500 + + Clean up some garbage in driver enumeration. + +commit 0706e5e790060fbf046cfaff295b78806b7841c6 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 14:15:09 2007 -0500 + + Eliminate some redundancy in autoconfiguration. + + We already synthesize Monitor and Module sections for you, no need to + specify them explicitly in the fake config buffer. + +commit 2c01a49bf0a407bd5510bb9ceb4ef86a2cc36be9 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 15 13:32:59 2007 -0500 + + Don't sleep(1) at exit on any platform. + +commit 83926cb8bef6288b89e801c5e60b3f40e923e16e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 17:41:07 2007 +1030 + + Xi: Only alloc modifierKeyMap if <slave device>->maxKeysPerModifier > 0 + + Sometimes (e.g. on my debian ppc box) maxKeysPerModifier of the SD is 0. So we + try to malloc(0), bringing the whole server down with a FatalError because it + looks as if the malloc failed. This is bad, so only alloc if we actually have + something to alloc. + +commit 070195dbf88eb121e65f802e023aa37ed1f2c2ac +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 16:27:18 2007 +1030 + + Xi: fix up sloppy class copying causing segfaults. + +commit 53539688cab990a7df1851d64f3ee4e11920a86b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 16:23:48 2007 +1030 + + dix: SetKeySymMap should alloc the map if dst doesn't have one already. + +commit b40646dc104fb03ea7cc0b27fae573aecaab486e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 15:43:44 2007 +1030 + + dix: Add FreeDeviceClass and FreeFeedbackClass for centralised xfree. + + Ensures that we only have one way of freeing a device class to avoid leaks in + ChangeMasterDeviceClasses and other places. + +commit 4c9cc82fc4461d180ae2c2fbe50e7f98b0777f91 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Thu Nov 15 01:46:11 2007 -0200 + + For some reason "-nozap" appeared twice. Weird. + +commit 18833d648fd7e1a5e962b93636bbbb38aca9c454 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 12:13:59 2007 +1030 + + Xi: reset xkb-stuff to NULL after copying (DeepCopyDeviceClasses) + + Having two devices point to the same xkb stuff causes SIGABRTs. + + Also, don't init a MD's xkbInfo unless the SD has an xkbInfo. + +commit 1635832c1635374033686d3a943b77adbd60bb98 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 11:35:07 2007 +1030 + + Revert "xkb: disable xkb key repeats (temporarily)" + + This reverts commit 2b1d946392ce28b96941341778b2b526aa0fb126. + +commit b05246696d14bd35aa53b49302707b51206c72a6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 11:31:43 2007 +1030 + + Xi: free XkbSrvLedInfos as well when freeing an MD's device classes. + +commit c758e5a664a52045ad419340044beebb6774a336 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 10:47:20 2007 +1030 + + dix: Make sure core MDs copy their initial classes before they are used. + + Anything in dev->key, dev->valuator etc. of a MD must always be a copy of the + original class. The intial classes of an MD (the ones set up before an SD is + attached) as well, as we may have to restore them if no SD is attached + anymore. + +commit a08665d4d3b0a7d567a90bb9bbfe4abafd6f3887 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 10:42:29 2007 +1030 + + mi: don't call SwitchCoreKeyboard, we switch during event processing now. + +commit 64711a094893e83764bbeda538c6e877ebe2af79 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 15 10:41:34 2007 +1030 + + Xi: When switching MD classes, make a deep copy instead of pointer flip. + + Turns out it's really really hard synchronising device state across multiple + duplicated events if they all share the same struct. So instead of doing so, + when the SD changes deep-copy all it's classes into the MD. The MD then has + the same capabilities, but the state can be set separately. This should fix + xkb, key state, repeat etc. problems. + + Updating the device state allows us to remove the SwitchCoreKeyboard from the + event gathering, it's all done during event processing now. + +commit 3dde66f96b9b8431381871cf85266da3ec57a0d4 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Nov 14 15:10:59 2007 -0500 + + Start 1.4.99 + +commit c3897ca7099fc007b4134a8fabd4c707f99f2ac7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Nov 9 13:55:32 2007 -0500 + + Add -pogo option for init/teardown performance testing. + +commit cecac794451b793871f297b91a11d3b52eeb6d1b +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 8 17:25:36 2007 -0500 + + Don't sleep(1) at server exit. + +commit 1603130236c55ddabc3854d4ba62d544debcf1f5 +Merge: f207e69 f7dd0c7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Nov 14 13:35:50 2007 -0500 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + Xext/xace.c + Xext/xace.h + +commit f207e69d62bc04c7f254347b03e6d8fa8b569d66 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Nov 14 12:23:29 2007 -0500 + + xselinux: adjust receive hook to use new synthetic_event class. + +commit cc4586df600af571815d5cdda2028c0d074c8469 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 14 14:27:52 2007 +1030 + + Xi: toggle the public.devPrivate as well when switching device classes. + + The master needs to have the same devPrivate as the slave, in case a client + issues a request that goes down to the driver. + Example: if a driver wants to ring the keyboard bell, it'll pick a keyboard. + The KeyClassPtr will direct it to the matching method in the driver, but + because the MD doesn't have the devPrivate set the driver segfaults. + Even if all drivers were updated to not dereference the nullpointer, nothing + would actually ever happen. + + To avoid this, we flip the master's public.devPrivate to the last SDs + devPrivate. + +commit b44c1118f3bab6d5f28fa42e0c322fbaec005012 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 14 14:08:21 2007 +1030 + + dix: Return Success from ProcBell if no BellProc is set. + + We must not return BadDevice, this causes applications to crash. If no + BellProc is set, just quietly do nothing and report a Success. + +commit 240b10fa9c32510a380a73a8acdd8267c81e538b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 14 12:18:08 2007 +1030 + + Xi: Move updating the device state from POE into separate function. + + POE now only deals with processing the event and calling the appropriate + delivery methods. Actually modifying the device state is done in + UpdateDeviceState. This separation should make it easier to avoid setting the + state twice when master events are processed. + +commit 0bdfeb55fc559ffe0334df69ba6e9e711b26dc18 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 13 17:31:20 2007 +1030 + + Xi: remove RegisterPairingClient handling. Deprecated with device hierarchy. + +commit e96d926d64f7fb63f6bf2aa0ea0a8440a188947b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 13 17:14:35 2007 +1030 + + Xi: remove trailing whitespaces. + +commit 5031238aad2b6b7511aab0f9d15edfbdd2b4cce7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 13 16:58:23 2007 +1030 + + dix: remove trailing/wrong whitespaces from devices.c and events.c + +commit c703849e79391bb1bb01a994bb8d5cf2eb64e48b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 13 16:50:18 2007 +1030 + + dix: Attach spriteInfoRec to same memory block as the DeviceIntRec. + + No need to alloc a separate one, we never do anything special with it anyway. + +commit 51239f87ce42ad564ceee1761980391947294511 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 13 11:26:16 2007 +1030 + + dix: Send MappingNotify when keyboard maps change. + + If a slave device is attached to a master device, then we need to send a + mapping notify to the client. + Mapping notify needs to be sent if + - different slave device but on same master + - different master + + This gives you funny behaviour with the ClientPointer. When a + MappingNotify is sent to the client, the client usually responds with a + GetKeyboardMapping. This will retrieve the ClientPointer's keyboard mapping, + regardless of which keyboard sent the last mapping notify request. So + depending on the CP setting, your keyboard may change layout in each app... + +commit 2b1d946392ce28b96941341778b2b526aa0fb126 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 13 09:51:33 2007 +1030 + + xkb: disable xkb key repeats (temporarily) + + Haven't quite figured out yet how to make these repeats work. Because we share + the class between devices, the key state is already set when we process the + master device's event, causing a repeat on each event. + +commit f7dd0c72b8f861f4d5443a43d1013e3fe3db43ca +Author: Matthias Hopf <mhopf@suse.de> +Date: Mon Nov 12 15:11:03 2007 +0100 + + Only clear crtc of output if it is the one we're actually working on. + + Upon recreation of the RandR internal data structures in RRCrtcNotify() the + crtc of an output could be NULLed if the crtc was shared (cloned) between two + outputs and one of them got another crtc assigned. + +commit 70b4087c4dd1904d9d655f4afb9dfcea4f137f7a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 12 13:10:39 2007 +1030 + + dix: don't unconditionally update valuators during key events. + + Master may not have valuators, device may not have valuators. + +commit 23365d28651f7942fdafb889bcbbd019470a4274 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 12 13:08:38 2007 +1030 + + dix: allow grab modifier device to be NULL. + + This can happen if we check for a passive core grab and our device is a + floating slave device. Doesn't really change anything as SDs can't send core + events but it stops the server from segfaulting. + +commit 5a7a65a3c978a65e8ff39d0cc9878527ec42adc9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 12 12:37:39 2007 +1030 + + mi: avoid SIGABRT by setting master_event to NULL. + +commit a05f43bf3e9629df98e93c366d4327f20ed81e6c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 12 11:35:18 2007 +1030 + + dix: When the last slave is removed, set master to the original classes. + + DeviceClassesChangedEvent is sent to the client, where device == new slave. + +commit 45f884d79c0eebaa1eb24d7db76c1177f6b710c9 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Nov 9 14:45:27 2007 -0500 + + xselinux: add new synthetic_event security class, and fix registry code. + +commit b092856baba5bd43b23950f23236b5cc3ce78c1e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Nov 9 14:45:02 2007 -0500 + + registry: Register XC-SECURITY extension protocol names. + +commit 7a81bafc9bc7048560b17483e6addf58469a05d0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 9 23:10:24 2007 +1030 + + Xi, dix: Add ability to change MD classes + send event when doing so. + + Each time a different slave device sends through a master, an + DeviceClassesChangedEvent is enqueued. When this event is processed, all + classes of the matching master device are changed, and the event is sent to + the clients. + + Next time the master is queried, it thus shows the evclasses of the last slave + device. The original classes are stored in the devPrivates. + + TODO: if all slave devices are removed, the master's original classes need to + be restored. + +commit c0a05805783ee3d38fbcc0fb45f4aa3c511785f0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 9 23:07:10 2007 +1030 + + Xext: add simple macro to easily check a generic event's type. + +commit f48087b6c33c1f84bf2cfc0744b1c38697321c07 +Author: Kristian Høgsberg <krh@temari.boston.redhat.com> +Date: Fri Nov 9 05:49:26 2007 -0500 + + Regenerate GLX dispatch code for recent gl_API.xml changes (#12935). + +commit f2a3728868376a3646832d4af3a29549ce0b8f5d +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Nov 8 18:49:05 2007 -0800 + + Patch to rootless code that should fix many crashes. Credit to Ken Thomases + at CodeWeavers for the patch. From his description: + + Fix a display bug with the X server. The Generic Rootless extension + installs overrides for certain GC (graphics context) operations. Within + these overrides, they temporarily uninstall themselves, perform their work, + and then reinstall themselves. Except sometimes they would return early + and wouldn't reinstall themselves when they should. Now they do in all cases. + + Fix a bug in RootlessCopyWindow where early returns could leave the screen's + dispatch table entry for CopyWindow unwrapped. We think that this is + another case (hopefully the last) of the rootless drawing bug. + +commit 338c1aedbdf3964e542947140f7c50d58542cf12 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Nov 7 03:56:44 2007 -0800 + + formatting fixes + +commit bd269d0d783d418ef99363478fdf849fd89eed76 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Nov 7 03:55:08 2007 -0800 + + Fix for off-by-one error in menu bar height calculation -- props to Nicholas Riley! + +commit b4d14484056e6f4a7374fc1acf3f223be4bd116f +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Nov 7 03:10:52 2007 -0800 + + Undo some last-minute breakage in xpr.h + +commit 05d5b9baa05a4ba14a4383d8a981bc327d99290c +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Nov 7 02:28:49 2007 -0800 + + removed debugging output + +commit 9a8abcfa6d6d0cdc17be02a3443a7e116eb07d07 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Nov 7 02:22:39 2007 -0800 + + Fixed focus problem (clicking on an X11 window that sits behind + an Aqua window would not always bring it to the top of the stack. + +commit b34d2ffc38002f7c4980c138f57e9a828cd79c37 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Nov 7 01:56:37 2007 -0800 + + formatting changes. + +commit 50dac9b2cb3b40810fb79253adc0265a838a497b +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Nov 7 01:35:48 2007 -0800 + + Fixed Spaces issue, correctly -- dragging an X window from one + Space to another in Expose mode now works. + +commit ce7cfbe261b7fd4fcd09d1a4a61344d1555a71f2 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Nov 8 20:10:51 2007 -0800 + + Fixed check to refer to DarwinApp, not all Darwin targets + +commit d68bd5510437c1fd3850e020f7cd90901fae8e1b +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Nov 8 20:08:49 2007 -0800 + + fixing GLX in Xquartz + +commit a6ac9002956767fefa37aac95513e21ac5246d15 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Mon Nov 5 20:25:10 2007 -0800 + + formatting cleanup + +commit 67e96be13cdb45be31db121ce216295cd9496d20 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Mon Nov 5 20:01:34 2007 -0800 + + Fixed logic error that prevent JIS (Japanese) keyboard layouts from + being detected. + +commit 154fb6417e5d0bae5191984beac5ce045ce754bb +Author: Ben Byer <bbyer@bbyer.local> +Date: Sat Nov 3 05:34:19 2007 -0700 + + Initial support for Spaces -- if you use Expose to drag an X11 + window to another Space, it will work correctly (as opposed + to just leaving a ghost window). We accomplish this by listening + for the notification from Xplugin that our window has been moved, + and then we ask X11 to move the window to the new location. + +commit 5bbc468b702f62d7c91d41aabcc27eeb553f6959 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 9 11:33:27 2007 +1030 + + dix: grabbing an attached SD sets it floating for the duration of the grab. + +commit 676b26ca3e9b142cf007af3f439aa1993f2247c4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 8 17:54:17 2007 +1030 + + Xi: notify the clients when the device hierarchy has been changed. + +commit cb75f09146a3c17b1a67b636bbf7229c65c83b35 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 9 11:29:18 2007 +1030 + + dix: calloc root window's Generic Event mask, stops segfaults. + +commit 169f83e366f678ac5441ad21beb84c9b8c65d28e +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 4 19:14:10 2007 -0800 + + Disable deferred updates in xp_init to fix performance problems + -- thanks to Eric Gouriou for pointing out the issue + +commit 1c6cb353f77747c101ce47716ff1fa055fbf85a4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Nov 8 16:46:49 2007 -0500 + + Restore the XC-SECURITY option in configure.ac, but disabled by default. + +commit 9d03cad1446c27b397c198cf6247e71e46bc9e6d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Nov 8 16:41:47 2007 -0500 + + Remove SecurityPolicy file and associated references in the manpages. + +commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Nov 8 16:32:42 2007 -0500 + + Rework of the XC-SECURITY extension. The gen-auth protocol has not changed, + but the XC-QUERY-SECURITY-1 authorization method and the SecurityPolicy + configuration file have been removed. The semantics of the trusted vs. + untrusted split have been changed. This will be documented in a future + commit. + +commit 476a9d85f819f454a6901ccb7eb028d1c563c341 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Nov 8 09:11:05 2007 +0100 + + Xephyr: do not AM_CONDITIONAL inside a shell if branch + +commit 59b304d8a24fecd094296feb217823f0c73d6f82 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 8 15:44:18 2007 +1030 + + dix, mi: stop segfaults when a floating device emits events. + + For pointers: don't try to set master->valuator fields if there is no master. + For keyboards: check if device is valid before trying to access the fields in + miPointerGetScreen (btw. this disables DGA events for floating keyboards). + + Also stop the hideous number of ErrorFs if we request the paired device for a + floating dev. + +commit 3063f0c6679bdbea13f360cff8d09a88b9871da9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 8 11:51:03 2007 +1030 + + mi: change the device id to the master devices' when duplicating the event. + + Move the event duplication into a CopyGetMasterEvent(), makes the code a bit + better to read. + +commit 0e9ef65fa583bf2393dd0fda82df6f092387b425 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Nov 7 16:33:10 2007 -0800 + + Don't frob timers unless SmartSchedule is running + +commit 180220f284823c486e7001ef00f1279dc548c9c7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 8 10:00:35 2007 +1030 + + Xi: return BadDevice for slave devices on ProcXSetClientPointer + + Also clean up to return error codes instead of sending the error manually. + +commit 184a7b8917a15bb2c719153b9b016c03aab42101 +Merge: a8808ac 0b72905 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 8 09:34:35 2007 +1030 + + Merge branch 'mpx' into mdsd + + Conflicts: + + Xi/opendev.c + +commit e94ab0b502160376d1956345196f7e1c7e2e886f +Merge: 26e1fc7 9bee1c6 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Nov 7 19:04:24 2007 +0100 + + sync with 'master' + +commit 9bee1c6912817f65bbb8cf4078f0ad016d9d51cb +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Nov 7 18:56:45 2007 +0100 + + EXA: Disable problematic optimization of dest pixmap migration by default. + + Also add some code comments about these optimizations. + +commit 26e1fc7b42de850d69fba89703ffddd36480b997 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Nov 7 18:48:23 2007 +0100 + + Xephyr: don't use Xv or GL when those are disabled. + +commit 950f9995d11aff2c51139b34fb27eba594f2bd20 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Nov 7 18:43:16 2007 +0100 + + Xnest: fix lib dependancy to make libtool happy + + This fixes an undefined symbol error happening when compiling + the server with the --disable-xv configure switch. + Basically, xnest was linking against + @XSERVER_LIBS@ and @XNEST_LIBS@ and the order of the libraries + given to the linker at the end of the process was bogus. + + * configure.ac: make XNEST_LIBS contain the $XSERVER_LIBS re-ordered + in such a way that the linker finds the symbols of all the libs contained + in $XNEST_LIBS. + * hw/xnest/Makefile.am: don't link against @XSERVER_LIBS@ anymore because + XNEST_LIBS contains the right thing. + +commit 0b729051c04da7068f1e6dd319190bd0a362b2c0 +Merge: b7ee005 d7c5e8b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 7 15:37:23 2007 +1030 + + Merge branch 'master' into mpx + + Conflicts: + + Xi/extinit.c + Xi/grabdev.c + Xi/setmode.c + Xi/ungrdev.c + dix/devices.c + dix/events.c + dix/getevents.c + include/dix.h + mi/midispcur.c + mi/misprite.c + xkb/xkbActions.c + xkb/xkbEvents.c + xkb/xkbPrKeyEv.c + +commit e717409bae355df9a617a226f12fbb8c54ae77e5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Nov 6 21:36:13 2007 +0000 + + DIX/getevents: Document GetMaximumEventsNum() a little better + + Note that the number returned by GMEN can _never_ change, and be a little more + explicit about the figure for repeats. + +commit 66fe554a59bb7de37354b618945cd5f30d78250d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Nov 6 18:57:09 2007 +0000 + + COPYING: Collapse 'canonical license' into one statement + + For a few of us, the license statement is identical, and the only variant is + the copyright. For these, aggregate the copyrights, and only list the license + once. Put this at the top, and note that this is more or less our agreed + canonical license. + +commit fda832772b3e630037bf1b822534996154a50861 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Nov 6 15:05:06 2007 +0000 + + .gitignore: Ignore build directories + + Ignore directories people might use for building. + +commit 512bac25ec0e980968b93a2ebe88bd89bf99b697 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Nov 6 14:52:03 2007 +0000 + + DIX: XKB: Set xkbInfo to NULL as well as freeing it (bug #10639) + + XkbRemoveResourceClient wants to access xkbInfo if it exists, so make + sure we NULL it after freeing it. It doesn't make much sense to move + the RemoveResourceClient call first, as there's not much point in + notifying clients while we're shutting the server down anyway. + +commit a8808ac3d093f33b39de109107d396fe0a02c4fc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 7 11:42:58 2007 +1030 + + Xi: don't call CheckMotion for slave devices. + + This essentially disables enter/leave for slave devices, but re-enables them + for master devices. Which is a good thing after all. + +commit 15944b8f02752eedd61be34a6a29dd6b82a0ac97 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 7 11:33:24 2007 +1030 + + mi: duplicate event before processing it, so master has original values + + Event values may get changed in the event processing stage, so we need to + duplicate it to pump different events through for slave and master device. + +commit d7c5e8bfc1aecbd23a4cbb2eab08656587aac2e8 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 6 16:26:09 2007 -0500 + + Modified performance patches from Arjan van de Ven <arjan@infradead.org> + + Subject: [PATCH] fix some performance gaps in Xace + + The XaceHook function is used in several hotpaths. + The problem with it (performance wise) is twofold: + * The XaceHook function has a big switch() statement for the hook number in it + * The XaceHook function uses varargs to reassemble the final dispatch arguments again + + Both are expensive operations... for something that is known at compile time + + This patch turns the hotpath XaceHook call into a direct call to avoid + the switch and varargs; this gives me over 10% performance gain + on the x11perf benchmark. + +commit aaa50b64113b122aaebd46e3b78e3fb7a8d70500 +Merge: 868e303 ddce48e +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Nov 6 16:25:40 2007 +0100 + + resync with 'master' + +commit 868e303630d8b84070c2f1fd8d6da2cef045b029 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Nov 6 16:24:46 2007 +0100 + + Xephyr: fix a crash when using xrandr twice + + * hw/kdrive/ephyr/ephyr.c: + (ephyrScreenFini): don't forget to + free shadowfb data (if necessary) upon server is reset. + +commit ddce48ede036f3996f8e584b0012c396c5df42fb +Author: Elvis Pranskevichus <el@prans.net> +Date: Tue Nov 6 09:40:14 2007 +0000 + + Config: D-Bus: Fix dbus_bus_request_name failure check + + The code in connect_hook incorrectly checks for dbus_bus_request_name failure. + The dbus_bus_request_name error indicator is -1, not 0. This leads + to subsequent assertion failure in libdbus. + +commit a52c9b2a59f27266557ff9d5d2c08492e04135a6 +Merge: c7e18be 5833289 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 5 19:08:36 2007 -0500 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + dix/dispatch.c + dix/property.c + hw/xfree86/common/xf86VidMode.c + include/xkbsrv.h + render/glyph.c + xkb/xkbActions.c + +commit 58332894c061ae96d6a457f65266660f5f65e88b +Author: Adam Jackson <ajax@redhat.com> +Date: Mon Nov 5 17:17:25 2007 -0500 + + Export the server ABI versions from xorg-server.pc + +commit c7e18beb3c87eb1ada9b21c4ffacd11c1939c087 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 5 15:01:13 2007 -0500 + + xselinux: Register SELinux extension protocol names. + +commit 632c33c5c18b3e091c4fce98280af4d583e99640 +Merge: 4113f04 dda10c9 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Mon Nov 5 17:52:33 2007 +0100 + + pull 'master' + +commit 4113f040c587fc536adc693d7ee5a4c0a60b75d4 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Mon Nov 5 17:33:01 2007 +0100 + + GL: fix crash at mesa destruction time + + * GL/glx/glxglcore.c: + (_glXMesaScreenDestroy): delete the same amount of visuals + that those which were created in createMesaVisuals(). + +commit dda10c9066a660b647384179f82e1da8e063264f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 16:28:35 2007 +0000 + + Remove all traces of external RGB database (and Speedo) + + Remove all references to an external RGB database (which hasn't been enabled + for a very long time). Also get rid of some references to Speedo fonts. + +commit 6ff79ea5f7d3ff0c3b14e39849514784ccd40190 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Mon Nov 5 16:46:49 2007 +0100 + + Xephyr: fix some DRI build breakage + +commit 5e363500c86042c394595e1a6633581eb8fcd1bb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:38:28 2007 +0000 + + OS: Remove ALLOCATE_LOCAL from os.h + + Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and + remove the include of Xalloca.h as well. + +commit 83e5d9e75d0fa1135e2c9d8b59caee98c3291681 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:36:54 2007 +0000 + + DIX: Remove last alloca call + + Replace with heap allocations. + +commit 1179ddea94efae6606162e9a1b0f2bf752ae4dd0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:36:36 2007 +0000 + + EXA: Remove usage of alloca + + Replace with heap allocations. + +commit 1eb6a1d0d2817cd0ce96fb27db3ceb2d0ff024af +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:18:35 2007 +0000 + + XTrap: Remove usage of alloca + + Replace with xalloc/xfree. + +commit 934281126f6c602fa4bd0c2e29d8c9f44fe532b8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:18:22 2007 +0000 + + Xext: Remove usage of alloca + + Replace with heap allocations. + +commit fb32bb9839b615f7297fbfac2050bc216682f01c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:17:54 2007 +0000 + + Xi: Remove usage of alloca + + Replace with xalloc/xfree. + +commit 683ee1776d172035c465aa8fc84ccd53bb8ba7fd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:14:25 2007 +0000 + + afb: Remove usage of alloca + + Replace with heap allocations. + +commit ca75261beedc3e00767b3812a81b7dac4437f4a1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:14:04 2007 +0000 + + cfb: Remove usage of alloca + + Replace with xalloc/xfree. + +commit 914922fd6100a409a3dfd1c64511ed6bdc344bef +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:12:59 2007 +0000 + + DIX: Remove usage of alloca + + Replace with heap allocations. + +commit 3b77689266e729411229ec83d2a90578ebc1d82f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:12:34 2007 +0000 + + EXA: Remove usage of alloca + + Replace with heap allocations. + +commit 34cdf06e4ccb243664005cc33009d8759a7f6e4d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:12:22 2007 +0000 + + fb: Remove usage of alloca + + Replace with heap storage. + +commit 733d42065f2c24505b3874ce51c18f6063c2b67e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:11:59 2007 +0000 + + XFree86: Remove usage of alloca + + Replace with heap allocations. + +commit caf545063457591f88e1f7bcd25dbd0342f44343 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:10:55 2007 +0000 + + KDrive: Remove usage of alloca + + Replace with heap allocations. + +commit d57060f16714f5667722001bd1a4500059dd59e1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:10:21 2007 +0000 + + DMX: Remove usage of alloca + + Replace with heap allocations. + +commit def6f74f2d7342f85f3df2053e0b9c1ac483b51d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:10:03 2007 +0000 + + Xvfb: Remove usage of alloca + + Replace with heap allocations + +commit 259f4c36d581896ce605741b9e557a589013a9b8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:09:49 2007 +0000 + + Xprint: Remove usage of alloca + + Replace with heap-based allocations. + +commit 1c84337af0ac40498a53aa36289e2f6f5ff8b1c6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:09:32 2007 +0000 + + Xwin: Remove usage of alloca + + Replace with heap allocations. + +commit f7d5c292e44113ea8eb32e67e91cd02e520df5e3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:09:14 2007 +0000 + + mfb: Remove usage of alloca + + Replace with heap-based allocations. + +commit be9ee17f960cc3d8a8f999cab1579e83d9aea520 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:08:51 2007 +0000 + + mi: Remove usage of alloca + + Replace with heap allocations. + +commit 3633ae6efb57c5405c26e8ae132b9371e5f920de +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:04:27 2007 +0000 + + Damage: Remove usage of alloca + + Replace with heap allocations. + +commit 2761c103311a1160bc483fd0367d654733df8598 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:03:26 2007 +0000 + + OS: Remove usage of alloca + + Replace with heap allocations. + +commit 2d738efb959912d8a89864e41190e0064fa77906 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:01:11 2007 +0000 + + RandR: Remove usage of alloca + + Replace with heap allocations. + +commit 3c1d2fdeff0ed61d86fa7d35cb0a61535d9b2816 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 14:00:40 2007 +0000 + + Record: Remove usage of alloca + + Replace with xalloc/xfree. + +commit e0491f470e130147191388168e878e3a7348afaf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 13:59:51 2007 +0000 + + Render: Remove usage of alloca + + Replace it with heap-based allocations. + +commit 59774af86b851c7fb8989cef6c013522549000b8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 5 13:59:15 2007 +0000 + + XKB: Remove usage of alloca + + alloca has no way to return failure, and instead can possibly arbitrarily + overflow the stack. Let's avoid that one. + +commit 6e4f5cf83f35ffebb51633ab30b1826e63e37223 +Author: Ben Byer <bbyer@bbyer.local> +Date: Mon Nov 5 05:53:34 2007 -0800 + + changing ALLOCATE_LOCAL to xalloc to prevent stack overflow + +commit b1764ddf133cfdf979db62ee2491124a4798b55b +Author: Ben Byer <bbyer@bbyer.local> +Date: Mon Nov 5 05:44:54 2007 -0800 + + pulling more patches over from xorg-xserver-1.2-apple branch + +commit 10fde62fc88302f7d3b2546239b1679be249567c +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 4 18:59:41 2007 -0800 + + more CVS tags + +commit 27ecb89250398f45564fe454e20bfdd66f62c8e4 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 4 18:53:41 2007 -0800 + + Removed CVS tags. + +commit f2e310132fbe1520c1b5f3da4faa2d2d47835e72 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Oct 31 14:15:35 2007 -0700 + + Add CreatePixmap allocation hints. + + These hints allow an acceleration architecture to optimize allocation of certain + types of pixmaps, such as pixmaps that will serve as backing pixmaps for + redirected windows. + +commit 3f1b6765aadf665ede8253464da19a5878f16e56 +Author: Markku Vire <markku.vire@movial.fi> +Date: Thu Nov 1 22:43:04 2007 +0200 + + Config: HAL: Touchpads are pointers too + + Treat touchpads -- not just mice -- as pointer devices. + +commit 41c3069f7cf28155f8e6cfe0c10a12a1f5f76c7d +Author: Mark Vytlacil <mrv@wi.rr.com> +Date: Thu Nov 1 21:05:43 2007 +0200 + + XFree86: Input: Save/restore errno around SIGIO (bug #10683) + + Make sure errno is saved and restored from the SIGIO handler, so errors + from system calls in input handlers don't break the interrupted code. + +commit ff9929ed48f2dec8b536d348e25e66a0bc4ac1a6 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 4 05:13:19 2007 -0800 + + pulling in changes from xorg-server-1.2-apple branch + +commit 181468db92d44a58080fc9a76e46dfc7011bf9f1 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Nov 4 04:50:26 2007 -0800 + + add missing null-pointer checks + +commit 4d0f35c81df307609b29c0f12aa1b4c6ee6fd8d2 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Nov 2 19:27:32 2007 +0100 + + Always duplicate mode name when duplicating a mode. + + If the originating mode didn't have a name, we would end up with the name of + the original mode being setup correctly, but with the name of the copy still + being NULL. + +commit dfb1cce28ac07d412598f7b9ab2ee908978b38e7 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Nov 2 12:51:56 2007 -0400 + + Restore build of xf8_16bpp. + + It doesn't link against cfb, so don't conditionalize its build against cfb. + +commit 7a0555e9bb59d02816803a1100f807d2d29f31d4 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Oct 28 09:37:52 2007 +0100 + + Fix crash in xf86InitOrigins() + + In a multihead setup, if only the first screen can be + initialized, but the second screen is mentioned first in the + ServerLayout section, the xf86InitOrigins() function will crash + because the screen referred to in the e.g. "RightOf" part is + non-existent. + +commit 5b41d4e60be35cfb96bedec0931fd5922823b4b9 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Oct 28 09:37:52 2007 +0100 + + Don't filter modes away during VBE mode list construction. + + Pass all VBE modes back up to the driver, on the assumption that it + knows how to filter modes intelligently. + +commit c095da04fe7c73b6503ef5b93549b13796c51b22 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Oct 28 09:37:52 2007 +0100 + + Fix magic number in fbdevhw + + The transformation between fbdev and xfree86 mode timings needs to be + invertible, otherwise Xen and other framebuffers that don't have real + pixel clocks won't initialize. + +commit f4fe66f6767d1941317dc0280ac359421a152587 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Oct 28 09:37:52 2007 +0100 + + Disable explicit commenting in Monitor section. + +commit 22f0e3a8b04e574047a51c8f928a007787303294 +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Oct 28 09:37:52 2007 +0100 + + Avoid PS/2 protocol probing for /dev/input/mice + + The kernel will always upconvert to ExplorerPS/2 for all readers of + /dev/input/mice, so don't waste time on startup trying to figure + that out. + +commit b97518666dc32710fe69eee33ee56881dcff1bbc +Author: Adam Jackson <ajax@redhat.com> +Date: Sun Oct 28 09:37:52 2007 +0100 + + Fix accidental ABI usage in RANDR 1.2 drivers. + + Due to RANDR 1.2, xf86findOptionValue and xf86nameCompare are now ABI. + Make sure they're exported from the server. + +commit f01e149d1af14ef9ee0e8a6743ab6a08f3bb677c +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 1 15:41:11 2007 -0400 + + Move SIGUSR1 notification as late as possible. + + If we inherited a signal mask from the parent process that ignores SIGUSR1, + then we will send SIGUSR1 to the parent to indicate when we're ready to + accept connections. Unfortunately, we send this notification way too + early, right after creating the sockets rather than just before entering + the main loop. + + Move it to just before Dispatch() so we're not lying quite so much. + +commit a2ee5fe0c4e863c7ff4f644e5ac86f2793903103 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Nov 1 13:46:20 2007 -0400 + + Enable MIT-SHM in Xdmx. + + The extension is entirely DIX-level, no new DDX changes needed. + +commit 2338d5c9914e2a43c3a4f7ee0f4355ad0a1ad9e7 +Author: Arjan van de Ven <arjan@linux.intel.com> +Date: Sun Oct 28 09:37:52 2007 +0100 + + reduce wakeups from smart scheduler + + The smart scheduler itimer currently always fires after each request + (which in turn causes the CPU to wake out of idle, burning precious + power). Rather than doing this, just stop the timer before going into + the select() portion of the WaitFor loop. It's a cheap system call, and + it will only get called if there's no more commands batched up from the + active fd. + + This change also allows some of the functions to be simplified; + setitimer() will only fail if it's passed invalid data, and we don't do + that... so make it void and remove all the conditional code that deals + with failure. + + The change also allows us to remove a few variables that were used for + housekeeping between the signal handler and the main loop. + + Signed-off-by: Keith Packard <keithp@koto.keithp.com> + +commit 692654b4300e61a9481e6fa588bcb44a3c3ca150 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Oct 29 18:13:58 2007 -0400 + + Set up visuals for the existing X visuals. + + This makes the root visual a GLX capable visual again and adds a GLX visual + for the COMPOSITE ARGB visual cleanly (as opposed to the hack we had before). + +commit a5546a99ac4da61aee0d49c55bcb38bbce9a96aa +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Oct 29 18:06:41 2007 -0400 + + Change the GLX module to initialize after COMPOSITE. + + This changes the module initalization order so that the GLX module initializes + after COMPOSITE. The reason for this change is to be able to initialize a + GLX visual config for the COMPOSITE ARGB visual. + +commit 8ead41388e36e21eea6fa0408c847f174911eab0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 18:57:00 2007 +0930 + + xfree86: wrap keyboard devices for XKB. + + Call ProcessOtherEvents first, then for all keyboard devices let them be + wrapped by XKB. This way all XI events will go through XKB. + + Note that the VCK is still not wrapped, so core events will bypass XKB. + + (cherry picked from commit d627061b48ae06d27b37be209d67a3f4f2388dd3) + +commit e717cf08e99746761d74289c426bbd84176f4435 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 27 21:32:47 2007 +0300 + + XKB: Cope with all events in XkbProcessKeyboardEvent + + Cope with Xi and pointer events in the (now increasingly misnamed) + XkbProcessKeyboardEvent. If it's the wrong type, call through the wrapping + chain to get out; else, process it. + +commit 9db8846fa53d91193bbfe541b244e2326440011d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 27 21:31:39 2007 +0300 + + XKB: Don't update indicators on all devices, add missing include file + + Don't get XkbUpdateIndicators to update the indicators on all our devices: we + already deal with that ourselves. + Add exevents.h include to get more (proto)types. + +commit ee3aa948eb8ed181d037294ed87df6ceec81684e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 18:04:59 2007 +0930 + + xkb: Unwrap properly in ProcessPointerEvent. + + Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly + and then call the unwrapped processInputProc. Seems to be a better idea, + especially since it makes stuff actually work... + (cherry picked from commit 8f9bf927e1beecf9b9ec8877131ec12c765e4d84) + +commit d3588a0aee33fbd233082f881c0d37152c6d4d8b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 27 11:44:03 2007 +0930 + + xkb: xkbHandleActions: let wrapping take care of event delivery. + + This is hopefully better than hardcodey calling CoreProcessPointerEvent. + (cherry picked from commit 32d0440c7f6e604807cb14dd32349df6f22c903b) + +commit 352c5a311200bf491153fe9ef16126c5877a57bb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 12 17:40:11 2007 +0930 + + dix: don't compress motion events from different devices (EventEnqueue) + + (cherry picked from commit 8840829ab93c4eb62eb58753c015da5307133fe5) + +commit 8d3d027062c105b50863dce43b8070ec560bc12e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 18:52:02 2007 +0930 + + dix: add XI event support to FixKeyState. + + FixKeyState needs to be able to handle XI events, otherwise we get "impossible + keyboard events" on server zaps and other special key combos. + (cherry picked from commit 5ee409794ee604fcf84886f70429fc2d6b1ff4f1) + +commit 99e826e867c1c5520153c539ba07a884aec88d0c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 18:49:57 2007 +0930 + + xkb: enable XI event processing for xkb. + + XI events can now take the same processing paths as core events, and should do + the correct state changes etc. + + There's some cases where XKB will use KeyPress as type for an event to be + delivered to the client. Stuck warnings in, not sure what the correct solution + is yet. + + (cherry picked from commit 6334d4e7be18de5f237c12a6dc20f75aa23477d0 with some + additional compile fixes and non-MPX adaptations) + +commit 91077bfc50d54be37c217e377c55b6bf886a2fab +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 21 18:24:30 2007 +0930 + + Save processInputProc before wrapping it and restore it later, instead of + using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to + process DeviceKeyEvents after the first key press. + + This should be the correct fix now. + (cherry picked from commit 4d5df14f2c4a3108a8c8adfcf4766c0d1a9daad2) + +commit 8b9481a113b56078191e2298bf590905978f6289 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Sep 4 17:44:51 2007 +0930 + + xkb: Store the action filters per device in the XkbSrvInfoRec. + + Using a global array for action filters is bad. If two keyboard hit a modifier + at the same time, releaseing the first one will deactivate the filter and + thus the second keyboard can never release the modifier again. + (cherry picked from commit bfe6b4d2d9952a80f8dbc63eec974ef894e5c226) + +commit 493b83bd097372ae0023da9919da83af39e3fc1c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 27 21:33:52 2007 +0300 + + XFree86: Remove ridiculous SIGIO debugging + + YOU PRESSED A KEY + AND AGAIN + YOU RELEASED A KEY + AND AGAIN + YOU PRESSED A KEY + AND AGAIN + + ... not so much. + +commit a3d48de5f2b7eacf3193c60f0fb461912201210b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 27 21:35:31 2007 +0300 + + XKB: Add more bits to xkbsrv.h + + Add the device private index, given we use that in a macro here, and also the + prototype for xkbUnwrapProc, since that's also useful. + +commit e29e69960d67aa4b7a4d1551af509dbac193f438 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 27 21:34:22 2007 +0300 + + Xi: Include XI protocol header in exevents.h + + Make sure we have all the types we need to use this header. + +commit df57ae1639ba4f1719883c5bf868394e4748a022 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 28 15:46:26 2007 +0200 + + configure.ac/XFree86: Only build XF86Misc and XF86VidMode when appropriate + + Don't build XF86Misc or XF86Vidmode in hw/xfree86/dixmod when it's been + explicitly disabled in configure, or we don't have the proto modules + installed. + +commit 3b7af72fe315c7c26c89838c0c5dacbe58765d0f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Oct 26 20:32:10 2007 -0400 + + xselinux: Add a SetDeviceContext request and stubs for more requests. + +commit 2251572062b2c25643671b8d5070de1c3f7ae976 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Oct 26 15:13:50 2007 -0700 + + Restore the CompositeGlyphs -> ps->Glyphs -> miGlyphs callchain to allow acceleration architectures to wrap above miGlyphs. + +commit 497aba894904b08b15bb19916e2a163f96212a7d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Oct 26 11:25:57 2007 -0400 + + Weed out some unused fluff from __GLXcontext. + +commit 0e749ceab421d72b48e18292c5ca0e337baf5ce8 +Author: Bernardo Innocenti <bernie@codewiz.org> +Date: Sat Oct 20 20:31:57 2007 -0400 + + Include stddef.h for size_t. + + This is required by a buggy version of the openssl/sha.h header + which is distributed with Fedora 7. + +commit 80d8a3e1767609a92b0b85a7e92cea5f0748038a +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Oct 26 10:19:57 2007 -0400 + + Quiet glx visual debug info. + +commit 27b13eeb56a5cbac00b381309604505002e77228 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Oct 26 13:15:07 2007 +0200 + + Nuke superfluous ",", added missing include for xf86i2c.h. + +commit 6d59bb5709a99ab60b482bbf3393ebffda7f9407 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 26 09:12:15 2007 +0300 + + XFree86 Misc/VidMode: Remove ridiculous debug ErrorFs + + When we're building with --enable-debug, don't emit an ErrorF every time a + function gets called. + +commit 5f9095f0d29bac0190d82c87a09cf32d6a34c17c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 25 19:02:03 2007 -0400 + + registry: Remove synthetic bit from event types in lookup function. + +commit 8c6923018c7d71cd15d9cf4ef9e8528ef5ec7c2e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 25 19:01:29 2007 -0400 + + xace: Add a "manage" access check when setting the Redirect event bits. + +commit 7d14ca59c5b942c09feaa2429c394cde9d8d3fd1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 25 19:00:50 2007 -0400 + + xselinux: Don't include the client in the receive hook audit messages. + +commit f62277d421023b3150d3a1accb00a8206ab2bde3 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Oct 25 18:48:39 2007 -0400 + + Clean up unused pVisual part of __GLXcontext. + +commit 30bcaa966d6b00f1630609a78db18dee683cc43d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Oct 25 18:48:06 2007 -0400 + + Make glx destroy path handle cases where the X window goes away first. + +commit 40de9fcf18930811dd5ae355c83275af887a9f83 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 25 12:35:01 2007 -0400 + + xselinux: Label the default device directly with the process context. + +commit b633d54b94d746d26e13014634d9f63bbb7e8f7d +Merge: 4b05f19 48ca596 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 25 12:19:30 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + GL/glx/glxscreens.c + hw/xnest/Screen.c + render/glyph.c + render/glyphstr.h + render/render.c + +commit 242f56f722243938e908d1957781ee53c2999783 +Author: Naoki Hamada <nao@tom-yam.or.jp> +Date: Thu Oct 25 18:45:50 2007 +0300 + + Input: Fix key down test (bug #12858) + + Fix the botched previous key_is_down test, which would give false positives. + Also move key_autorepeats to a separate inline function. + +commit 4b05f19cb9e42d8c8eff5ca4e463f5bc2a05433d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 24 19:59:58 2007 -0400 + + xselinux: Introduce a type transition when labeling events. + +commit 0d2ef187e77b12713d2a9661932fa01dba58a945 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 24 18:23:31 2007 -0400 + + xselinux: Add audit message fields for selection and event names. + +commit 48ca5961caee62f2980017a6bdc96a1b4c747727 +Author: Matthias Hopf <mhopf@suse.de> +Date: Wed Oct 24 20:31:51 2007 +0200 + + Prefer configured DisplaySize to probed DDC data, if available. + + Based on patch by Hong Liu <hong.liu@intel.com>. + +commit 0388a59a6ef212c497cc3f64d677b1ca5b410982 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 23 20:59:21 2007 -0400 + + Revert "registry: special case minor number when looking up core requests." + + This reverts commit 31110d6837ee52fd654729d9e5c4b0c5395abab0. + + This is handled properly by StandardMinorOpcode(). + +commit 46521f529841e032e198e5df87974088548a68de +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 23 20:58:48 2007 -0400 + + xselinux: Add basic support for selection access control and redirection. + + Probably not fully baked yet. It's difficult to test since so few apps + actually follow the ICCCM with respect to cut & paste. + +commit b7ee005d327372c1e414ee6c526f9f7aee14bc86 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 24 10:26:12 2007 +0930 + + dix: Don't interfere grabs the interfering device is of different type. + + A pointer device should be able to send events while the client has a core + grab on a keyboard device, and likewise. + +commit 02508614b9f882ba1559fb4581dcf812118fdf89 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 24 10:09:18 2007 +0930 + + dix: check for core passive grabs on inferiors when replaying events. + +commit 825f09dffd94cfcd0562a01c5181998503851461 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 23 17:12:57 2007 -0400 + + xace: Still more changes to selection code. Removed the SelectionPtr from + the hook - the hook only needs the Atom to control access to the selection + object. Upgraded the SelectionCallback to take a client argument and + additional type codes so that it can be used for redirection. + +commit 660557593ea961948722298ea8ffba83891c9914 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 23 14:46:37 2007 -0400 + + xselinux: Remove synthetic bit when looking up event type. + +commit d7db549db41a27aef28cff9bfb7973bc741f88b2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 23 14:08:54 2007 -0400 + + xselinux: Unregister callbacks on server reset. + +commit 9e0a468af19d8e46330bcff37c9adc5e11d3aee7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 23 13:35:30 2007 -0400 + + xace: try to pretend events were sent when a denial occurs. + + Probably need to redo the error return paths in these functions + at some point. + +commit d502521c3669f3f22b94c39a64ab63bfd92c6a97 +Author: Pierre Willenbrock <pierre@pirsoft.dnsalias.org> +Date: Tue Oct 23 16:45:13 2007 +0200 + + EXA: Fix off-by-one in polyline drawing. + +commit a8a148919b84a293e3e7a49409ab833590357edb +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Oct 23 16:23:28 2007 +0200 + + Superfluous ','. + +commit 75f05086d04a90c3dcdcdd31bf79d7033708e3e0 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Oct 23 15:39:23 2007 +0200 + + Get rid of unnecessary GNU extended variadic macro. + +commit 7ef863720dc79107fc2cd17ce684366c87e001a4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 23 17:28:03 2007 +0930 + + dix: Create new sprite for floating devices. + + Floating devices get sprites, but still aren't spriteOwners. This prevents + them from getting rendered, and also stops segfaulting. + (not really solving the problems with keyboards though) + +commit d808d653d1fc16f1d5af76ab00fa862fb80fa3ba +Author: David Nusinow <dnusinow@debian.org> +Date: Mon Oct 22 21:30:04 2007 -0400 + + Define PCI_TXT_IDS_DIR more cleanly + +commit 29e0e180729a4f0cc020985a4de4c8bc4b9c7f5f +Author: Keith Packard <keithp@koto.keithp.com> +Date: Mon Oct 22 13:38:16 2007 -0700 + + Leave hardware-specified preferred modes alone when user preference exists. + + Instead of removing the preference bit marking the hardware declared mode + preference, leave it in place and just move the user preferred mode to the + front of the list while marking it with the USERPREF bit which will cause it + to be selected by the initial mode selection code. + +commit fbe19c66c36acfb484809111cf02579a3baf2f0f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Oct 22 18:28:03 2007 +0200 + + GLX: Fix leak of X pixmaps associated with GLX pixmaps. + +commit c6d36b1cee44a9cbb690dff62a4683d7f6fbf30c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Oct 22 18:28:03 2007 +0200 + + GLX: Don't crash on unused client array members when switching to/from console. + +commit be9b0e558d6172ef01ed880d47da897d2ceb25fa +Author: David Nusinow <dnusinow@debian.org> +Date: Sun Oct 21 23:49:14 2007 -0400 + + Add a note as to why the text file based PCI ID scheme is present at all + +commit b79b965bd9a96f79781e85c0428068caa1ba381b +Author: David Nusinow <dnusinow@debian.org> +Date: Sun Oct 21 23:46:54 2007 -0400 + + Fix compilation issue on FreeBSD (bug #12841) + + Hide getline call by checking for glibc. If not, use fgetln instead. Even + though this section is now #ifdef'ed for linux only, this should help make + it more portable if non-linux folks end up wanting it. + +commit 7f5e71fa7347fb4ec2657ccc453831c04a0f288d +Author: David Nusinow <dnusinow@debian.org> +Date: Sun Oct 21 23:41:49 2007 -0400 + + Make PCI text file directory configurable + +commit ce7f6fe1268fef4f89aa21c7b44d73ecd98efe24 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Oct 19 19:40:04 2007 -0400 + + xselinux: properly update sizes when dynamic arrays are resized... + +commit 4b14c9a9cd2033d3839c4ba364d41ab4c4b198ab +Author: Eric Anholt <eric@anholt.net> +Date: Fri Oct 19 16:34:54 2007 -0700 + + Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code. + + Not all of the DDX/miext Glyphs hook implementations have been removed, but + they should be. + +commit a3a95d3475dc91ed2e8a55bf484a6b3f2b5ac32a +Merge: a358b87 7e1cada +Author: Eric Anholt <eric@anholt.net> +Date: Fri Oct 19 15:44:17 2007 -0700 + + Merge branch 'master' into glyph-pixmaps + + Conflicts: + + configure.ac + +commit 12e889d202ac9849f534c51167cbfed91c32027a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Oct 19 18:43:38 2007 -0400 + + xace: Bug fixes, name changes to selection access hooks and fields. + +commit 7e1cada6c6b9fa41ef3ead00bf7725d626dda193 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Oct 19 15:16:19 2007 -0700 + + Disable debian pci-id-list autoconfig code on non-linux. + + It contains static paths, fails to build on non-glibc, and apparently just + exists to support distributions managing binary drivers and open-source drivers + together. Also restores previous code for fallback to vesa if nothing is + detected. + +commit 89c6108531e603bdc81faf2ea860f318a2e94a39 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Oct 19 16:21:54 2007 -0400 + + Fix software GL to provide a list of supported fbconfigs like the DRI case. + +commit 74e84b8d891632141a60e2d29463ab46f622df3f +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Oct 19 17:28:15 2007 +0200 + + Only issue XF86_APM_CAPABILITY_CHANGED for video change ACPI events (not e.g. brightness etc.). + +commit 6fdf3ddfef2707755cec0fc9cbce354fd472bb52 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Oct 19 17:20:21 2007 +0200 + + Fix ids of ACPI events according to ACPI spec. + +commit d9caa469b9bb4eb6125b890820853062fc2c4441 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Oct 19 15:26:09 2007 +0930 + + Xi: allow VCP/VCK to be OpenDevice'd as well. + + All devices deserve to be equal. Except master devices, they are a bit more + equal than the others. + +commit 155e2c559ed0dbf31b6d39d48648a3ee22b37635 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Oct 19 14:37:07 2007 +0930 + + Xi: advertise as XInput v2 capable + +commit 5ba738935f0d786e4670adf3b05ad42fc5e710fd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Oct 19 14:36:37 2007 +0930 + + Xi: remove ChangePointerKeyboardPairing in favour of ChangeDeviceHierarchy. + +commit 6dcde0e9c1d068d9fc4a772d29d1d4c6cc57aeb9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Oct 18 12:21:07 2007 +0930 + + Xi: set master device's id in ListDevices Reply. + +commit cfcc6e14b9a15f7979ba0df9c105cf563bef98fa +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Oct 19 11:28:44 2007 +0930 + + Xi: return all master devices as type IsXPointer/Keyboard when listing devs. + + Slave devices are reported as IsXExtensionPointer/Keyboard. + +commit 8e3c1dfc48930c455529313a42efa35e3b9071b2 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Oct 18 21:01:51 2007 -0400 + + Introduce a new "GlxVisuals" option that controls which visuals are added. + + Right now we default to "all" which gives us a situation much like before, + but when the "typical" option is implemented, we can change the default and + reduce the number of visuals the GLX module bloats the X server with. + +commit 9e3cfd950d279353f1795352ad2c4132aabc1bab +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Oct 18 19:12:24 2007 -0400 + + Add code to set up GLX visuals and add one for the first double buffered FBConfig. + +commit 8fc635e6a8072c7cd2777d804dd6f8eda2eecc15 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Oct 18 15:51:11 2007 -0400 + + Separate handling of GLX visuals and GLX FBConfigs. + + XIDs for GLX visuals and FBConfigs used to be interchangable and the list of + GLX visuals was identical to the list for FBConfigs. This patch splits handling + of these two data types and allows the X server to pick and choose the FBConfigs + that are exposed as visuals. + +commit 0af8180683247955ce4cfd48e6a5b4d00bbe618a +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Oct 17 17:18:47 2007 -0400 + + Drop VisualConfigPriv support from the DRI module. + + No DDX driver uses this, and this patch stops the DRI module from + poking around GLX module data structures. + +commit 7d74690536b64f7b8e8036507ab7790807349c50 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Oct 14 15:39:21 2007 -0400 + + Simplify and clean up GLX visual initialization. + + Instead of the fragile setup where we filter the modes common between the + DDX generated GLX visuals and the DRI driver generated fbconfigs, we now + just take the fbconfigs returned by the DRI driver to be our supported set. + +commit ab4bce02a9457dd9c86b774fc74caf3dd6b287ca +Author: Eric Anholt <eric@anholt.net> +Date: Thu Oct 18 15:22:42 2007 -0700 + + Add a quirk for Philips 107P5 which lacks the preferred bit on detailed timing. + + Also fix the prefer-large-75 quirk if the prefer-first-detailed bit was set, + though it's not the case for the existing prefer-large-75 consumer. + +commit 55a96aa6b0995fda6660b7e78c85b955a62b9735 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 18 14:11:11 2007 -0400 + + xselinux: add basic event labeling. + +commit e974bc1233608ec09fbd40b12217925e4d2205aa +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 18 12:33:39 2007 -0400 + + xselinux: add hooks for send and receive access. + +commit 06eb830169afd0631a31e8846c7d2533c49ea378 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 18 12:31:14 2007 -0400 + + xace: Fix bug in AddPassiveGrabToList(), was using wrong GrabPtr. + +commit 6107a245035366fe762756b6aa05ac0e3a5482bb +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 18 12:24:55 2007 -0400 + + dix: Add client parameter to AddPassiveGrabsToList(). + +commit ce50bfd3369686cfecee5a138bd84ef1107a249d +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Oct 18 17:44:48 2007 +0200 + + EXA: Skip empty glyphs. + +commit 5d74416740de883b7ef0994afea4bbd4d3901be0 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Oct 18 17:44:14 2007 +0200 + + EXA: Don't attempt to move in pixmaps that can't be accelerated. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 . + +commit 31110d6837ee52fd654729d9e5c4b0c5395abab0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 18 10:30:44 2007 -0400 + + registry: special case minor number when looking up core requests. + +commit e3fd90ae9c3ddfc5d78e62614e311b73505d7ead +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 18 10:29:10 2007 -0400 + + registry: Add "X11:" prefix to core protocol names. + +commit aa340b2c7cbe9ddab53cff08c8ba165558209187 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 19:27:16 2007 -0400 + + xselinux: add hook for device acceses. + +commit 503f918f55d0cb29585d83b022bbb8dc29f446c5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 19:14:15 2007 -0400 + + xselinux: Move functions around; add some more comments. + +commit 50b27e1ad2a98d36728dc8157492ef5c59c132cd +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 16:09:40 2007 -0400 + + devPrivates rework: update new GL/glxext code. + + Need to merge so this type of thing stops happening. + +commit c3f7b862550fa8f46633162f83db8c27e46fc672 +Merge: af4dde0 feac075 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 15:00:54 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + os/access.c + +commit af4dde0ac19ecec1d0ad988eb25b15401e7c6b36 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 14:13:02 2007 -0400 + + xselinux: Remove config file, this has been moved to the policy. + +commit baabae623b3658196b67a710dc72663c2105bf31 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 13:54:56 2007 -0400 + + xselinux: Started reworking extension using new XACE hooks. + +commit db66e66dbf26b91c655f1659859c022cc31f0db6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 13:51:11 2007 -0400 + + xace: Add an access_mode field to the extension structure. + This allows the same callback to be used for both extension hooks. + +commit e3a8cbe523bae8b771ad3c8ad497f4444f6d05d5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 17 13:48:44 2007 -0400 + + xace: add creation/labeling hook to CreateRootWindow(). + +commit feac0759522cbdc3e61ccfa373df735903c5cb27 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Oct 17 11:42:28 2007 +0800 + + Make config file preferred mode override monitor preferred mode. + + Add a new even-more-preferred bit to each mode which is used to make config + file preferences selected instead of the monitor preferred mode. + +commit f2da10f7bc2ddb6ad2f18b793afc10d04b97c51c +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Oct 17 10:50:22 2007 +0800 + + KDRIVE_LOCAL_LIBS includes some system libraries, not just internal x server libs + +commit 9aadde377991bfbd88524d02106bec3dedd6e7c9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 17 12:05:50 2007 +0930 + + mi: don't call UndisplayCursor for non-sprite-owners. + + Segfaults are bad. + +commit 8b7c4249d82d07e852d8d8c15c7ab9977dd1f31c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 17 10:41:58 2007 +0930 + + mi: call processInputProc for master devices after slave event processing. + + More work is needed to sort out grabs though. + +commit ae9fc10adec8f9bf0492d14d435f8f11e0163b27 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 17 10:41:04 2007 +0930 + + Xi: don't send core events for slave devices. + +commit de70cfdbe60eb6e7bf3e74dfd1ac34de554deff1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 17 09:52:30 2007 +0930 + + mi: fix some macros to allow multiple cursors for master devices. + + Macros defaulted to inputInfo.pointe rfor devices that weren't spriteOwners. + Changed to take the device's master device now. + + This includes sticking in a number of checks and warnings that cursor + rendering won't be called for floating devices. + +commit 773f6491c1cc8819038e753d08c32ba213f80f8f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 16 19:11:36 2007 -0400 + + xace: update the DeleteProperty prototype to include the client argument. + This should have been part of 8f23d40068151ad85cde239d07031284f0b2c4dc. + +commit 9dde53ed179336c7b483c9a94a97182ad1777dfb +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Tue Oct 16 19:55:56 2007 +0100 + + Fix walking of GLX providers. + +commit 70a5d33c9e41c077a8cd92abd43376e2956d3aed +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Oct 16 12:46:07 2007 +0200 + + Always check the return value of __glXGetDrawable first. + + Fixes spurious GLX protocol errors because __glXGetDrawable doesn't set the + error code in case of success. Maybe it should, though. + +commit 1d9ebbac8c589cae7e4952083692b6d148def9bc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 18:46:12 2007 +0930 + + dix: Make InitCoreDevices use AllocMasterDevice. + + Also change naming a bit, append "pointer" and "keyboard" to master devices + instead of -ptr and -keybd. + +commit 299573f4617c3b5599bb65069e96d050277b9471 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 18:40:15 2007 +0930 + + dix: add AllocMasterDevice for creation of new master devices. + + Devices are initiated pretty much the same as the core devices. + +commit 5fe9bfd23f17b84c3afaa82f75a7c517c9f8e0d3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 18:23:48 2007 +0930 + + xfree86: NIDR: don't call PairDevices explicitly. + set isMaster to FALSE explicitly. + + Pairing isn't necessary, attachment should be done in EnableDevices. + +commit 5eb033835e92ea951cc385fd709af9656b3772d8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 18:03:52 2007 +0930 + + mi: don't exclude inputInfo.pointer from rendering. + +commit b697c4ed145968d3c3281bb85e628f1b068b09fc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 17:47:06 2007 +0930 + + dix: CheckPassiveGrabOnWindow: only get paired device for non-keyboards. + +commit caa69d8f7b92b80669df02e1001409d7c653e7e4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 17:38:13 2007 +0930 + + dix: fix detritus from adding lastSlave field. + +commit 90d077e537ac4cb7d79d67afcf3984a3e8d65fe8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 17:37:33 2007 +0930 + + dix: GetPointerEvents: get state from master device before applying valuators. + + We need to get lastx/y from the master device before we start applying + acceleration etc. Otherwise we get jumping cursors, which is reasonably bad. + +commit b6ccf721b0a582150858d68f91967fb4e319c340 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 17:35:06 2007 +0930 + + include: add "lastSlave" field to DeviceIntRec. + + Set to the last slave device that routed events through the master. + +commit e6bd8ae0608bd8379c5ac962f69cd0bcc54f9734 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 15:59:30 2007 +0930 + + dix: set the device's sprite when using AttachDevice + + Sprite is set to the master device's sprite. + +commit 271d4c3d6255318aabb9ad1ea444f534ed456f0b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 15:50:07 2007 +0930 + + xfree86: remove XI86_SHARED_POINTER flag. + + Not needed anymore. By default, all devices are slaves of first master device. + +commit c7b878b90406781c97db751a9b454e2b6baee0e1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 15:07:31 2007 +0930 + + dix: don't treat VCK/VCP separately in DevHasCursor, IsPointer/KeyboardDevice. + +commit e9f149fb56747f7eaa0f714dce97b067b007c47e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 14:24:20 2007 +0930 + + Fix up detritus from removing GetPairedPointer/Keyboard. + +commit 840bde3d32f3627dfc3d7d8b6564a61a8014933b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 13:09:35 2007 +0930 + + dix: GetPairedDevice: return dev paired with master for slave devices. + +commit 6c259a08d917f94fd7381453b625b07826d3ef9c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 13:09:19 2007 +0930 + + include: remove unused GetPairedPointer/Keyboard declarations. + +commit fe97f7c54a1b42acd542696b6cdc9e83e89548f3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 22:46:08 2007 -0400 + + registry: Add some missing #include's. + +commit 9ecbbf198f4cec398897736e173e7e8c56bf6f94 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 08:00:06 2007 +0930 + + dix: adjust PickPointer and PickKeyboard to get the first master device. + + Simplifies it a lot, since we always have at least one master device + available at all times, so less mucking around. + +commit 0c5f65ecd3ad11fbdb1cab3cb1d0eb4f33bb4e35 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 07:57:24 2007 +0930 + + dix: don't allow slave devices as ClientPointer + +commit 9ccc9ab6f29f68298b68cdb5c9b4bd57a095f05a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 07:53:00 2007 +0930 + + dix: don't call CloseDevice on VCP/VCK separately. + +commit e4fd981b48723b77a6c1a528638a771b9cc35472 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 07:52:11 2007 +0930 + + dix: check for isMaster before calling DeviceCursorCleanup. + +commit 7503d1340726e0a529f04304d177ed2ceb8fbc91 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 07:50:13 2007 +0930 + + dix: don't check VCK and VCP separately when looking for device ids. + + Both are part of the device list again, so we cover them there. + +commit 032e906711202d376af95b37bb0cdf14a3648256 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 11:57:42 2007 +0930 + + dix: Remove GetPairedPointer, GetPairedKeyboard in favour of GetPairedDevice. + +commit 853ea337bdad17f8f6ec7d940de14ce2cbbbf93e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 22:13:02 2007 -0400 + + registry: Register XvMC extension protocol names. + +commit 58c3240fcbec23aad122e1c340f6bb6d3b18f779 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 22:09:47 2007 -0400 + + registry: Register MIT-SCREEN-SAVER extension protocol names. + +commit 3e07e73fefc100e491d1e465cb162373d1d82425 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 11:34:29 2007 +0930 + + dix: remove pairing/attachment from InitAndStartDevices. + + If we enabled in the correct order, this has all been done already. + +commit 4e274e90e16b1d954391e1af3e2074fb10f70ee7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 22:04:20 2007 -0400 + + registry: Register SHAPE extension protocol names. + +commit 9f597f6c87e0b14cc382d8e5929e42f822db4329 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 22:01:20 2007 -0400 + + registry: Register SYNC extension protocol names. + +commit 38baac71bdbb8c7e882e3e39133615cfed894a6b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 04:21:42 2007 +0930 + + dix: Set bidirectional pairing, don't allow pairing with already paired devs. + +commit 70efd3d06a15093661933bda4ec21e306dece4a4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 11:30:32 2007 +0930 + + dix: fix up Activate/Enable/Disable device. + + Set isMaster for VCP/VCK. + Init sprites for master pointer devices. + Pair master kbds with master pointers (1:1 pairing!). + Attach other devices to VCP/VCK. + +commit b504678ba5407a6fd8d47d051305f7c3d5606dfe +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:54:25 2007 -0400 + + registry: Register APPGROUP extension protocol names. + +commit 204f2dc89ef662b57400b128c30c15e8cf32f323 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 04:13:06 2007 +0930 + + include: add "isMaster" field to DeviceIntRec. + + Set to TRUE for master devices. + + Also fixing up comment for paired field in spriteInfo, will be set + bidirectional from now on. + +commit bd7d5255ce4865b684f7d8bcf80ba9872a1af22d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 16 11:18:31 2007 +0930 + + dix: add AttachDevice, needed to attach a slave device to a master device. + + For now, we don't allow attaching slaves to other slaves, and we don't allow + pairing slaves with other slaves. + Pairing is for master keyboard->master pointer only. + Attaching is for slave device->master device only. + +commit 6ec35a8cf539c900b334dd6df146b394f54e3706 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:46:56 2007 -0400 + + registry: Register BigRequests extension protocol names. + +commit 1254cc399c53eadcc32eeabf69990ed2526c7ae0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:43:06 2007 -0400 + + registry: Register Fontcache extension protocol names. + +commit e987648cf2c21dcbd77dd9a71793090a48e4f521 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:38:56 2007 -0400 + + registry: Register EVI extension protocol names. + +commit be1565f6b8fb09eba9941d6f7c485bf5fb25fe7a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 01:53:54 2007 +0930 + + dix: Set core devices to ProcessOtherEvents, set sendCore and XKB. + + Even the virtual core devices should send through ProcessOtherEvents. + +commit ce9bf9a19185a36ac2f7ae75acd320ab8d03d247 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Oct 14 01:50:40 2007 +0930 + + include: add "master" field to DeviceIntRec. + + "master" points to the device this device is attached to. Event sent by the + device will also be routed through the master. + master and spriteOwner are mutually exclusive. + +commit f6226d3bfe1515058e2092e8662ae87825501209 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:35:12 2007 -0400 + + registry: Register TOG-CUP extension protocol names. + +commit 7e182a5d89d618e20dcc77850131690733322d39 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:13:39 2007 -0400 + + registry: Register MIT-MISC extension protocol names. + +commit 32f6171862461d17ebea58a2fb6ddd16ac71358c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:10:14 2007 -0400 + + registry: Register XF86Bigfont extension protocol names. + +commit 12766c5b5ffdab95255a63b2c8421ee773fd43b5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 21:00:46 2007 -0400 + + registry: Register Xv extension protocol names. + +commit 35ae03871af88b2f420dd83448011a077852d7a0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 20:50:26 2007 -0400 + + registry: Register XC-MISC extension protocol names. + +commit 32fe282d5b8306514d641e15bc6d9fd4ab360977 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 20:45:18 2007 -0400 + + registry: Register XTest extension protocol names. + +commit 3877faf7d9fe00ed634077e38a198ae4b91a2bb4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 20:35:13 2007 -0400 + + registry: Register Multibuffer extension protocol names. + +commit 16764a2d299c7c0c98002aadd52ab4a1a36758c3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 20:29:23 2007 -0400 + + registry: Register DPMS extension protocol names. + +commit f077578e42eee424b0e534774574c84af9d6f85b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 19:43:02 2007 -0400 + + registry: Register XPrint extension protocol names. + +commit 5c8b1a91726817816d20faefad21c7a68ab634cc +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 19:35:04 2007 -0400 + + registry: Register Resource extension protocol names. + +commit 48891d5696f56711f23743cb03be39cf6b26c522 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 19:32:01 2007 -0400 + + registry: Register EVIE extension protocol names. + +commit 2c9646ad4e65bb061d910c9e2b1a8a978f21fa17 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 19:18:03 2007 -0400 + + registry: Register SHM extension protocol names. + +commit 8964c6d8e14ae47798762191e359b2bf138ca32e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 19:10:51 2007 -0400 + + registry: Register RENDER extension protocol names. + +commit c827db57e4d9ca14c82b099dcfc9b7a0c0b5ba0a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 19:06:01 2007 -0400 + + registry: Register RANDR extension protocol names. + +commit 20db50b4c44a14f7eeac2b1de17ada68482521da +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 18:56:59 2007 -0400 + + registry: Register DAMAGE extension protocol names. + +commit b38a91993364aa80cfd99721e319e1458d9fb760 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 18:50:06 2007 -0400 + + registry: Register XTrap extension protocol names. + +commit 106758893b68033f14f69c4ee6591fb6a149ba37 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 18:31:40 2007 -0400 + + registry: Register XFixes extension protocol names. + +commit ea09c9acc8f0d5577f54c864ff88b7f03d93b2f4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 18:25:12 2007 -0400 + + registry: Register Record extension protocol names. + +commit 2e1e5be1d9067816525aa13a1d818e8ca6899599 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 18:18:57 2007 -0400 + + registry: Register DBE extension protocol names. + +commit 4c3285c883cc50a91bc5262bbc9d073d816f860a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 18:04:47 2007 -0400 + + registry: Register WINDOWSWM extension protocol names. + +commit 3815284e899b61731b6a63c4ba14c5d773e24eb6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 17:57:59 2007 -0400 + + registry: Register XF86DGA extension protocol names. + +commit 2cd1b32b77e0ceeaccb3f01c4ac13a97c557668c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 17:37:58 2007 -0400 + + registry: Register XF86Misc extension protocol names. + +commit 960677e876c068400fb45e1764bb5470cd8c389f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 17:30:00 2007 -0400 + + registry: Register XF86VidMode extension protocol names. + +commit b7786724080fd3928ef7b8c294346661d7ffd90b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 17:15:34 2007 -0400 + + registry: Register XF86DRI extension protocol names. + +commit eee46b4681ec55297604b0425705f2b18381f7ca +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 17:06:22 2007 -0400 + + registry: Register APPLEWM extension protocol names. + +commit b9f5ab98c8dea36dcce1ad15fd2e059a77e77c39 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 16:18:37 2007 -0400 + + registry: Register XINERAMA extension protocol names. + +commit 3464b419230c6d17e940d967b567c5d2cb22d232 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 15:45:12 2007 -0400 + + registry: Register APPLEDRI extension protocol names. + +commit 32f3f5a1e7654f8bb43ea16b9227b3994e616739 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 15:32:17 2007 -0400 + + registry: Register DMX extension protocol names. + +commit 166ef972febc00c665e1d5aeb68e75d7bbcf9879 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 15:22:02 2007 -0400 + + registry: Register composite extension protocol names. + +commit a5cf3f21f712e46dbf9bca289e67be75f2b531d3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 14:27:32 2007 -0400 + + registry: Register XKB extension protocol names. + +commit 5277a6ff589b5ddb475b90e1aaf5dbd9172d9711 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Oct 15 13:38:35 2007 -0400 + + registry: Register Input extension protocol names. + +commit 8b5078b7d9ec08a588a78eb49096b698c6f4916b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Oct 15 13:10:10 2007 -0400 + + Fix byte swapping for GetFBConfigs. + +commit c922d2eebe29f08f463ee76293dc9042712fb21c +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sun Oct 14 20:40:18 2007 +0300 + + glx: drop duplicate GetDrawableAttributesSGIX declarations. + + They are officially autogenerated in indirect_dispatch.h now. + +commit 3d4eb17b38dcb1468493f3686dc5ea3623ef9a73 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Oct 14 18:07:03 2007 -0700 + + mass change from #ifdef i386 to #ifdef __i386__ to conform to ANSI + +commit ec0fc012e91e703bb399a380df2912f71957a220 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Oct 14 14:59:12 2007 -0400 + + Fix GLX byteswapping. + +commit 927757e1028f45f7fd94b9a2ab35567e0f34b2a8 +Merge: ccda4b6 17ffc34 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Oct 12 19:28:39 2007 -0400 + + Merge branch 'master' of git://git.freedesktop.org/git/xorg/xserver + +commit ccda4b66bdfc179e661b24adc8ec72bb7db75b2b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Aug 27 14:43:48 2007 -0400 + + Implement ChangeDrawableAttributes so we can support GLX_EVENT_MASK. + + We never need to actually send out the clobber event, so this should be + sufficient for GLX 1.3. + +commit 695eb8b2e88abc9fa3a76d8da48c3214c7dd1f08 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Aug 27 14:23:50 2007 -0400 + + Implement GLX pbuffers. + +commit 516c181f57367847c3f317f8f8f5cc3211026f4c +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Aug 23 21:40:01 2007 -0400 + + Add dispatching for GLX_SGIX_pbuffer. + +commit d7ded953c4d263e3dd3374dc03eea19e80c05bc6 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Aug 23 19:07:52 2007 -0400 + + Implment GLXPixmaps. + +commit 526f40434c86548830c4f72940462b6253fe9790 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Oct 12 18:18:00 2007 -0400 + + NULL is not a valid argument to CreatePicture, please use serverClient + as the client argument if no real client is creating the object. + +commit 2b0847c7aaf95b6b10f062dfff601032b2430a9b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Aug 8 10:07:03 2007 -0400 + + Implement damage reporting for AIGLX. + +commit 600028305cc047e824b18369a026f89c9eb7e437 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu May 31 22:55:47 2007 -0400 + + Move hyperpipe and swapbarrier extension funcs to screen private struct. + + This gets rid of a couple more global arrays and gets the two extensions + more in line with the general extension mechanism. + +commit 781515bb637de4fd79e3c83817cb6ffa8f2d8a4f +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed May 30 23:25:03 2007 -0400 + + Convert GLX module to use screen private indexes like everything else. + +commit 72a3d68a2f5abcd09fef1a55e976e1a5731d4b02 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu May 10 11:16:50 2007 -0400 + + Update the AIGLX DRI loader to use the new DRI interface. + + This lets us drop a bunch of workarounds and use the new DRI extension + mechanism. + +commit 17ffc34ad5e9a8e2269afef05f209701f1895c01 +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Oct 12 15:33:31 2007 +0200 + + Drivers include miscstruct.h which requires pixman.h. + +commit eaf0e2a21c2cb14e19852e61a4521b3c240253af +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 22:31:24 2007 -0400 + + Fix another compiler warning + +commit a5089af726b6a4f833b95a31274743c994277e20 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 22:24:31 2007 -0400 + + Fix a warning about the control logic in xchomp() + +commit cdf29ff45a3cb45573c9d0cb8f82e6ee97953fb5 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 22:23:34 2007 -0400 + + Remove some unused variables + +commit 3367091f7fa14497aab40e668cad179e244eef81 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 22:21:38 2007 -0400 + + Separate choosing driver from the file-based implementation + + This clears the implementation out of the way to prepare for development + of a symbol-based resolution scheme + +commit 3aa41bcb8215c037512ddbd68a3f7bcad3b80a1f +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 21:29:13 2007 -0400 + + Remove obsolete error message define from parser + +commit e3e12221111886c4063d2da5d70d3830c56d39e2 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 21:27:07 2007 -0400 + + Don't bother validating the Device section of the conf file + + All the previous tests can now be recovered from if not specified. + +commit 28ef7f59416677be380561709197b04df0479bef +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 20:56:46 2007 -0400 + + Re-enable validation of the screen section of xorg.conf + + This also fixes a problem where the server can't find the device section + when it is specified in the screen section. + +commit ea2d4dc468dcebe6d38e676469ec51ed1d43490b +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Oct 11 20:26:02 2007 -0400 + + When there's no xorg.conf, use the video driver autoloading function + +commit fc092334ac0a323b80a9602cb8bf60ca9dee3bfa +Author: Eric Anholt <eric@anholt.net> +Date: Thu Oct 11 16:48:56 2007 -0700 + + Bug #10304,12784,11603: Add quirks for several physical size issues. + + A lot of EDID writers apparently end up stuffing centimeters (like the + maximum image size field) into the detailed timings, instead of millimeters. + Some of them only get it wrong in one direction. Also, add a quirk to let + us mark the largest 75hz mode as preferred, which will often be used for + EDID 1.0 CRTs. + +commit 6adeba17301a309be2f34cd51eca84a13d5503fd +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 11 14:17:17 2007 -0400 + + dix: Add a new "registry" mechanism for registering string names of things. + Supports protocol requests, events, and errors, and resource names. + Modify XRES extension to use it. + +commit 45cc03726b49f6ad4afe6c3fb4ad65d1051928b4 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Oct 11 18:23:25 2007 +0200 + + Make mode checking more tolerant like in pre-RandR times. + +commit 8f23d40068151ad85cde239d07031284f0b2c4dc +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 10 19:56:03 2007 -0400 + + xace: move the property deletion hook inside the DeleteProperty function. + +commit 473bc6ec4c59e1a962b0b897c449a69aa5064ab0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 10 19:43:12 2007 -0400 + + xace: remove the special-cased "ignore" functionality from the property code. + + There will be no more faking of Success to hide things. XACE does not + provide polyinstantiation. + +commit 7e9e01a4a34fa45521067d43c5bbff942dd5d51a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 10 17:40:22 2007 -0400 + + dix: pass a valid ClientPtr to SetFontPath in all cases. + +commit 8825d36a38c76ff8faf409c853061be2bd33430d +Author: David Nusinow <dnusinow@debian.org> +Date: Tue Oct 9 22:49:07 2007 -0400 + + Allow the user to not have a screen section + + If none is present, a default one will be created. This will be attached + to either the first device section in the xorg.conf (allowing you to + specify something like using EXA without having a screen section) or a + default screen section if none is present in the file. + +commit 8665cf3327b713f334b0483593a924c197f892f2 +Author: David Nusinow <dnusinow@debian.org> +Date: Tue Oct 9 22:45:15 2007 -0400 + + Don't require that the screen explicitly attach the device section + + This will allow the screen to not explicitly have a device section. If + this is the case and there is a device section in the xorg.conf, the first + one will be used. If there is no device section at all, a default one will + be created that loads the automatically determined module. + +commit 37898b824fdc94735495e3494aa2b9a681d477b9 +Author: David Nusinow <dnusinow@debian.org> +Date: Tue Oct 9 22:11:58 2007 -0400 + + Use the best guess heuristic as a fallback for autoloading + + This prevents breaking the current behavior + +commit 847fbbf4d25132e6c1f99fcf82fe757dbca94a34 +Author: David Nusinow <dnusinow@debian.org> +Date: Tue Oct 9 22:07:49 2007 -0400 + + Fix autoloading of drivers for pci-rework + +commit 6033d8150be3a115b90226eaa42f237bb0cf3369 +Author: David Nusinow <dnusinow@debian.org> +Date: Tue Oct 9 21:17:27 2007 -0400 + + First pass at improved video driver autoloading + + This is what we're currently shipping in Debian. Enables the ability for + drivers to ship a text file listing PCI ID's they support, and have the + server read them on startup when no driver is specified. This works, but + isn't the final solution. + +commit 81d7b81146224f2b83278f5e21b3f9a36f30bd56 +Author: David Nusinow <dnusinow@debian.org> +Date: Sat Aug 25 15:00:30 2007 -0400 + + Load intel instead of i810 when autoconfiguring + +commit fdef7be5c8d5989e0aa453d0a5b86d0a6952e960 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Oct 9 18:44:04 2007 -0700 + + Sun bug 6589829: include zoneid of shm segment in access policy for MIT-SHM + + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6589829> + <http://www.opensolaris.org/os/community/arc/caselog/2007/500/> + +commit 49c8285e38e0e71c9ea43df63add08a4f2564ed1 +Author: Christian Weisgerber <naddy@freebsd.org> +Date: Tue Oct 9 15:25:16 2007 -0700 + + FreeBSD/alpha server build requires libio (missed in modularization). + +commit 042e16458b751ad0fcfa1ebbdd74d7d48036b22a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 9 23:07:51 2007 +0930 + + dix: change a few inputInfo.keyboard over to PickKeyboard() + +commit 6aab6a6e2ae0ef5fdedae09cf2cdc86f382e3a8a +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Mon Oct 8 13:25:38 2007 +0200 + + EXA: dude, don't validation driver hooks twice ! + +commit d42909b23a9be64a26aa349c1d6dcd8b228bffa7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Oct 5 13:04:10 2007 +0930 + + dix: when disabling a device, make sure all paired devices are re-paired. + + We re-pair them with the VCP, not a real device! If we would do otherwise, + somebody may change our keyboard focus and thus get us typing where we don't + want to type. + +commit ff2351246da30b56a3a8f90654993c41b8eb3921 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Oct 5 12:19:03 2007 +0930 + + dix: When pairing, only check for access right if client is set. + + If the pairing client is not set, then the pairing is initiated internally + (e.g. when a new keyboard device is configured). In this case we _must_ pair + regardless of who is the pairing client. + +commit 4611f9568cdadf9c00f4b7ca4c77c8c6f07e94f8 +Merge: ab11bad 3549a12 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Oct 4 13:07:50 2007 +0200 + + updated from 'master' + +commit ab11bad54707941eb41be62c025b983760ce3900 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Oct 4 13:05:29 2007 +0200 + + Xephyr: remove a potential crasher + + * hw/kdrive/ephyr/hostx.c: + (hostx_has_dri): be more defensive. + +commit 06c8977966e76255ce7798f4839ef6e3530264a8 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Oct 4 13:01:24 2007 +0200 + + Xephyr: better handling of the -nodri option + + * hw/kdrive/ephyr/ephyr.c: + (ephyrInitScreen): try and detect when the host has no + DRI support. In that case, switch to the -nodri behaviour. + When in the -nodri case, make sure not to skip glx visual + initialisation. + +commit ea94f59e9b8824b1a638c63e06ca16f0efd43869 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Oct 4 12:54:26 2007 +0200 + + Xephyr: don't disable glx visual init by default + + * hw/kdrive/ephyr/ephyrinit.c: + (ddxProcessArgument): disabling visual init here + is bad because it gets disabled even when we want + to use software GL, leading to Xephyr :1 -nodri + crashing in mesa. + +commit a7f210e6fcda14eae4de64186904c6c676c758ee +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Oct 4 12:51:08 2007 +0200 + + Xephyr: fix a compiler warning + +commit 5d6eac1251f1e17baa74d0893bb225b775e8ec2e +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Oct 4 12:47:05 2007 +0200 + + Xephyr: remove an unused variable + +commit 8018733c39c283a931df424dcfd11e7aefbcd8cf +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Oct 4 12:06:19 2007 +0200 + + Xephyr: better compilation without GLX + + * hw/kdrive/ephyr/ephyrinit.c: protect GLX related code with GLXEXT + macro + +commit 3549a1282365e69e70c7c2546cfa7d25923cce31 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Oct 4 11:38:01 2007 +0200 + + EXA: Disable 1x1 pixmap fill optimization for drivers that handle pixmaps. + + This reverts commit 1365aeff5499a051375e43a9fcbf54733ac93929. + + It defeated the optimization for drivers that don't provide a CreatePixmap + hook. The optimization makes no sense for drivers that do anyway, so disable + it for them completely. + +commit 604ebb5a6de372e6a8a96e0ee997db7929126860 +Merge: 1365aef 4ba76a7 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Oct 3 16:13:16 2007 +0200 + + Merge Xephyr-XV/GL stuff into master + +commit 4ba76a7e2b62d26f43c0e670de571afb75ec92f4 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Oct 3 13:03:34 2007 +0200 + + Xephyr: port XV/GL stuff of the new multiscreen architecture + + We can now launch GL or XV apps in any of the + Xephyr screens we want. + + * hw/kdrive/ephyr/hostx.c,h: + (hostx_get_window): + (hostx_create_window): make these functions be screen + number aware. + * hw/kdrive/ephyr/XF86dri.c : fix some compiler warnings. + * hw/kdrive/ephyr/ephyrdri.c: + (ephyrDRIQueryDirectRenderingCapable), + (ephyrDRIOpenConnection), + (ephyrDRIAuthConnection), + (ephyrDRICloseConnection), + (ephyrDRIGetClientDriverName), + (ephyrDRICreateContext), + (ephyrDRIDestroyContext), + (ephyrDRICreateDrawable), + (ephyrDRIGetDrawableInfo), + (ephyrDRIGetDeviceInfo): in all those functions, don't forward + the screen number we receive - from the client - to the host X. + We (Xephyr) are always targetting the same X display screen, which is + the one Xephyr got launched against. So we enforce that in the code. + * hw/kdrive/ephyr/ephyrdriext.c: + (EphyrMirrorHostVisuals): make this duplicate the visuals of the host X + default screen into a given Xephyr screen. This way we have a chance + to update the visuals of all Xephyr screen to make them mirror those + of the host X. + (many other places): specify screen number where required by the api + change in hostx.h. + * hw/kdrive/ephyr/ephyrglxext.c: specify screen number where required + by the api change in hostx.h + * hw/kdrive/ephyr/ephyrhostglx.c: don't forward the screen number we + receive - from the client - to the host X. + We (Xephyr) are always targetting the same + X display screen, which is + the one Xephyr got launched against. So we enforce that in the code. + * hw/kdrive/ephyr/ephyrhostvideo.c,h: take in account the screen number received + from the client app. This is useful to know on which Xephyr screen we + need to display video stuff. + * hw/kdrive/ephyr/ephyrvideo.c: update this to reflect the API change + in hw/kdrive/ephyr/ephyrhostvideo.h. + (ephyrSetPortAttribute): when parameters are not valid + - they exceed their validity range - send them to the host anyway + and do not return an error to clients. + Some host expose buggy validity range, so rejecting client for that + is too harsh. + +commit ab88cb8d2e7c1410f9ed2be928b38f176b132e11 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 3 18:08:33 2007 +0930 + + Xext: add missing geint.h to Makefile.am (un-breaks make dist) + +commit 9f2b493e34e93881101f31e631901d3fe56da4f0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 27 15:35:41 2007 +0930 + + xkb: remove some warning comments. + + Obsolete with 340911d7243a7f1095d79b5b2dcfa81b145c2474. + +commit 1eebb03a3190947a8102f2ddc73766cf98d34c84 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 3 15:18:17 2007 +0930 + + dix: ignore passive grab if the client already has a grab on the device. + + In some cases a button press may activate a passive core grab. If the client + owning the passive grab already has a core grab on another device, don't + actually activate it. Otherwise the client gets two simultaneous passive + core grabs, and may never ungrab the device again (only if the other grab uses + GrabModeSync). + + Reproducable: fire up gnome-session, open up gnome-terminal. Click with the + ClientPointer onto the window decoration, then click with another pointer onto + an application icon in the panel. Drag the icon out, release the button and + voila - you just lost your second mouse. + +commit 0b485067823620b5dbd9ef2b3e13bd35ad5a4410 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 3 14:22:55 2007 +0930 + + dix: send NotifyGrab/NotifyUngrab focus events regardless of semaphore state. + + This is just papering over a problem. The whole focus system needs to be + revised. + +commit 05106ac9839102c0e4a3ce5d9d83d19abf129f8a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Oct 3 11:33:10 2007 +0930 + + dix: change Enter/Leave semaphore handling to accommodate for NotifyGrab. + + This is a half-assed attempt at getting rid of some enter-leave problems. When + a grab is activated, the events didn't get sent before, leading to interesting + results. This commit papers over it but doesn't actually fix it properly. The + whole enter/leave (focusin/out) structure needs to be ripped out and changed + for multiple devices. + +commit 1365aeff5499a051375e43a9fcbf54733ac93929 +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Oct 3 12:00:16 2007 +1000 + + exa: direct access to the pixmap sys ptr is bad if the pixmap isn't mapped + +commit 566dd3b7d789ba60d0adf33b3f729cfb02ff33cd +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Oct 3 11:59:52 2007 +1000 + + exa: add new flags to denote driver handles all pixmap migration/hiding + +commit 1df1fee82d3565f6d8cfb91ce25a81c23a10a4b5 +Author: Dave Airlie <airlied@redhat.com> +Date: Wed Oct 3 11:56:04 2007 +1000 + + exa: make sure we set fb_ptr to NULL + +commit a358b87f45ce75e5d013fc904a07dfe394f74387 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Oct 2 13:13:51 2007 -0700 + + Just link against libcrypto instead of relying on openssl pkg-config. + + Also fix incorrect library inclusion by kdrive which broke the build. + +commit 439edc768eea17667846ce573c843b8377e0dfb4 +Merge: c8ccf46 93ae6fe +Author: Eric Anholt <eric@anholt.net> +Date: Tue Oct 2 12:14:04 2007 -0700 + + Merge branch 'glyph-pixmaps' + + Conflicts: + + configure.ac + exa/exa_render.c + +commit 59cebcd2e9302d15a52588ecafbbc2d2c5ae3a6c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 2 13:39:25 2007 -0400 + + xace: add creation hook for new input devices. + + Unfortunately, more information is needed to properly label the device. + This will come from the configuration file, the hotplug messages, etc. + It will either have to be passed into this function, + or this hook moved down into the callers. + +commit b77d272d7555c1e0f176ee74b8717030a6d6c7b0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 2 13:21:53 2007 -0400 + + xace: add hooks + new access codes: XTEST extension + +commit c8ccf469dcb2d7609b23faa8b4999c436263051e +Author: Keith Packard <keithp@koto.keithp.com> +Date: Tue Oct 2 08:59:40 2007 -0700 + + Do not build hw/xfree86/os-support/bus/ix86Pci.c on Linux. + + Linux has custom PCI bus support functions, so this generic code is + unnecessary. + +commit dcb4db1bf5b6fcfaed4e7162eb6c7a3a509e14bd +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Sep 19 15:46:09 2007 +0200 + + Xephyr: glx fixlet + + * hw/kdrive/ephyr/ephyrhostglx.c: + (ephyrHostGLXQueryVersion): properly query + the host for its gxl version. + +commit 6a435b00003fb00930299a0e0810c93afc23a72e +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Sep 19 15:35:51 2007 +0200 + + Xephyr: check presence of extensions in host X + + * hw/kdrive/ephyr/hostx.c,h: + (hostx_has_xshape), + (hostx_has_glx), + (hostx_has_dri): added these new entry points + * hw/kdrive/ephyr/ephyrdriext.c: + (ephyrDRIExtensionInit): + check presence of DRI and XShape extensions before + trying to use them. + * hw/kdrive/ephyr/ephyrglxext.c: + (ephyrHijackGLXExtension): + check presence of glx extension before we use it. + +commit 2b217fc055300d4c709dd27c4e8ec8166183993b +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Sep 19 15:00:43 2007 +0200 + + Xephyr: cleanup XF86dri.c a bit + +commit f731b9da7dbafad50dd5a1e8da28ce86ffab19b7 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Sep 18 18:41:18 2007 +0200 + + Xephyr: add -nodri and -noxv switches. + + * hw/kdrive/ephyr/ephyr.c,ephyrinit.c:: + add -nodri and -noxv to disable either DRI or XV. + When -nodri, mesa GL (non acceleretated) works. + +commit 50674391388b3cfe987782a3ad81b4f240f3db67 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Sep 18 18:37:49 2007 +0200 + + Kdrive: use fbcmap_mi.c instead of fbcmap.c + + * hw/kdrive/src/Makefile.am: use fb/fbcmap_mi.c + and not fb/fbcmap.c. This allows kdrive to take advantage of + extensions redefining the entry points of micmap.c stuff. + For instance it allows Xephyr to have a working GL, which is not + possible otherwise, because GL redefines mInitVisualsProc + to initialise its visuals. + +commit a5bd536869f646e4024befa84f6e677b990310bc +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Sep 18 18:28:25 2007 +0200 + + fbcmap_mi.c: add a missing api + + * fb/fbcmap_mi.c: + (fbSetVisualTypesAndMasks): added this entry point that was missing. + This is useful so that servers using this entry point can use fbcmap_mi.c, + and be obliged to stick to fbcmap.c. Note that fbcmap.c does implement this + entry point. Up to now, kdrive based server could not use fbcmap_mi.c because this + entry point was missing. The will allow Xephyr to properly use GL. + +commit 6307ee77091041af2d34e93bc164352d4438a808 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Sep 18 18:22:44 2007 +0200 + + GLX: allow skipping of visual init wrapping + + * GL/glx/glxvisuals.c: added boolean to disable + calling init_visuals(). This gives a chance to Xephyr + to take over visuals manipulation and avoid a crash at + server shutdown in __glXMesaScreenDestroy(), due to the fact + that mesa might sees more visual than what it has actually created in + init_visuals(). It might see more visuals because Xephyr can augment + the number of visuals, dynamically. + * os/utils.c: the boolean is actually defined here. + +commit ffe9ce6a843443606ad9367eca1645bf5e0635e5 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Mon Sep 17 22:13:51 2007 +0200 + + Xephyr: fix a clipping issue xephyr-dri + + * hw/kdrive/ephyr/ephyrdri.c: + (ephyrDRIGetDrawableInfo): force the back clipping rects + to equal the front clipping rects. + * hw/kdrive/ephyr/ephyrdriext.c: + (ProcXF86DRIGetDrawableInfo): properly overclip the clipping rects we + got from the client. This bug fixes a clipping rect that was too + small in height, basically. Also fix a possible mem corruption. + * hw/kdrive/ephyr/hostx.c: + (hostx_set_window_geometry): remove a useless XSync + +commit 79782726617d4b5a4f9b376f21936d035fc870e1 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Mon Sep 17 18:15:03 2007 +0200 + + Xephyr: properly clip GL drawables in Xephyr + +commit 3816d64e50a59e0ef276ddd6cb250cab98a49392 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sun Sep 9 15:20:51 2007 +0200 + + Xephyr: oops, forgot to add ephyrdriext.h + +commit cf58781eee7d91a3bbca701a2c4523a36f8e0abb +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Sat Sep 8 00:33:59 2007 +0200 + + Xephyr: make accelerated glxgears work in Xephyr + + * hw/kdrive/ephyr/ephyr.c: + (ephyrInitialize): cleanup ephyrDRI extension init. + remove functions that belongs in ephyrdriext.c . + * hw/kdrive/ephyr/ephyrdri.c: + (ephyrDRICreateDrawable): create the drawable on the host X peer + window, not on the host xephyr main window. + (ephyrDRIGetDrawableInfo): get drawable info of the host X peer + window. + * hw/kdrive/ephyr/ephyrdriext.c: make ephyr DRI extention wrap + a bunch of screen ops so that it can update the host X peer + window whenever DRI bound drawable are moved in Xephyr. + Also code the building blocks of the management of the + host X window peer. + * hw/kdrive/ephyr/hostx.c,h: + (hostx_create_window): added this new entry point + (hostx_destroy_window): ditto + ()hostx_set_window_geometry): ditto + +commit 6d1e44d3d53b451d466d43197be589d0ecc4b9f6 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Sep 4 18:28:16 2007 +0200 + + Xephyr: fix a host X hang. + + * hw/kdrive/ephyr/ephyrdri.c: + (ephyrDRIGetDrawableInfo): quickly hook + this into getting the drawable info from the host + X server. For the time being, this only gets the drawable info + of the Xephyr main window in the host. It should really get + the info of a the peer drawable in the host X. So there should be a + peer drawable to begin with. + * hw/kdrive/ephyr/ephyrdriext.c: + (ProcXF86DRIGetDrawableInfo): some cleanups. Properly get the + the drawable info otherwise there is a host X hang. + * hw/kdrive/ephyr/ephyrhostglx.c: do not + (ephyrHostGLXQueryVersion): do not use C bindings of the glx protocol + calls. Some of those actually access DRI context directly, resulting + in the context having three clients. Instead all XF86DRI proto + fowarding request should be coded by hand and only forward the + protocol requests + +commit a39b57d2f784f14e3198c8506f5eb865bacc2440 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Fri Aug 31 16:53:18 2007 +0200 + + Xephyr: add more logging to GLX forwarding + + * hw/kdrive/ephyr/ephyrhostglx.c: added more logging. + +commit 9e192d2118246ad715e23cf5626a038274eb1eaa +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Fri Aug 31 14:43:39 2007 +0200 + + Xephyr: better error handling in GLX forwarding + + * hw/kdrive/ephyr/ephyrglxext.c: + fixed various logging functions + (ephyrGLXGetStringReal): make sure all the string is sent to clients + including the ending zero. + * hw/kdrive/ephyr/ephyrhostglx.c: + (ephyrHostGLXGetStringFromServer): better error handling. + (ephyrHostGLXSendClientInfo): ditto. + (ephyrHostGLXMakeCurrent): ditto + +commit 4dd4be99df38b70d43b02d9cb19e09e0ed94462b +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Aug 30 23:54:49 2007 +0200 + + Xephyr: Make glxinfo work on the ATI R200 free driver. + + * hw/kdrive/ephyr/ephyr.c: + (EphyrDuplicateVisual): when duplicating the + visual, copy the color component masks and the class + from the hostX + (EphyrMirrorHostVisuals): don't mix blue and green mask. + * hw/kdrive/ephyr/ephyrdri.c: add more logs. + (ephyrDRICreateDrawable): actually implement this. + for the moment it creates a DRI drawable for the hostX window, + no matter what drawable this call was issued for. + (ephyrDRIGetDrawableInfo): actually implemented this. + for the moment the drawable info queried for its attrs is the + Xephyr main main window. + * hw/kdrive/ephyr/ephyrdriext.c: + (ProcXF86DRIGetDrawableInfo): properly hook this dispatch + function to the ephyrDRIGetDrawableInfo() function. + * hw/kdrive/ephyr/ephyrglxext.c: add a bunch of GLX implementation hooks + here. Hijack some of the xserver GLX hooks with them. Still need to + properly support byteswapped clients though. + * hw/kdrive/ephyr/ephyrhostglx.c,h: actually implemented the protocol + level forwarding functions used by the GLX entr points in + ephyrglxext.c. Here as well, there are a bunch of them, but we are + far from having implemented all the GLX calls. + * hw/kdrive/ephyr/hostx.c,h: + (hostx_get_window_attributes): added this new entry point + (hostx_allocate_resource_id_peer): added this to keep track of + resource IDs peers: one member of the peer is in Xephyr, the other + is in host X. + (hostx_get_resource_id_peer): ditto. + +commit 8c78df0ea36abc7d46c4f59670289f4280f75507 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Aug 30 22:31:47 2007 +0200 + + Xserver: fix potential crash + + * dix/extension.c: + (AddExtensionAlias): don't crash when failed to add + extension alias. + +commit 024abe825cd702334266f6b8da289907bbd05970 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Tue Aug 28 15:59:45 2007 +0200 + + Xephyr: add logging in the DRI extension + +commit 1dd589410c6c5e8b62b4d15ec681b01452ec68c6 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Tue Aug 28 15:58:55 2007 +0200 + + mirror the visuals of the host X at startup. + + * hw/kdrive/ephyr/ephyr.c: make Xephyr mirror + the visuals of the host X upon startup. This + is important for GLX client apps. + * hw/kdrive/ephyr/hostx.c,h: add a hostx_get_visuals_info() + to get the visuals of the host X. + +commit 26da625055a3876c93a7a005520657b971748c4e +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Tue Aug 28 15:55:05 2007 +0200 + + proxy the glXGetFBConfigSGIX call + + * hw/kdrive/ephyr/ephyrglxext.c: + (ephyrGLXGetFBConfigsSGIX): proxy the GLXGetFBConfigsSGIX call. + It is a vendor extension to get the visual configs as a list of + name/value pairs. + (ephyrHijackGLXExtension): hijack the VendorPriv_dispatch_info + dispatch table to register our implementation of GLXGetFBConfigsSGIX + (ephyrGLXGetFBConfigsSGIXReal): added this where the real + implementation of GLXGetFBConfigsSGIX is. It support bytes swapping. + (ephyrGLXGetFBConfigsSGIX,ephyrGLXGetFBConfigsSGIXSwap): these are + the dispatch entry points. They just call + ephyrGLXGetFBConfigsSGIXReal. + * hw/kdrive/ephyr/ephyrhostglx.c,h: reorganize the proxies to get + visual params from the host so that they clearly support the different + methods of doing so. + +commit 5af73f98c46dfe5640185ca90feb20c39c6e06fa +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Fri Aug 24 16:30:50 2007 +0200 + + EPHYR: Add an experiment proto proxy extension. + + * hw/kdrive/ephyr/Makefile.am: add the proxy extension to + ephyr. The proxy extension is an experimental extension that + forwards protocol packets targeted at a given extension to the + host X. + * hw/kdrive/ephyr/ephyr.c: init proxy ext. + * hw/kdrive/ephyr/ephyrhostproxy.c,h: added this new file as part of the + proxy extension. + * hw/kdrive/ephyr/ephyrproxyext.c,h: ditto + * hw/kdrive/ephyr/hostx.c: add the hostx_get_get_extension_info() entry + point. + +commit c06fa924b4781a35b86e4a78d95ff3e9d95b02d1 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Aug 23 11:53:02 2007 +0200 + + XEPHYR: more GLX/DRI proxying work. + + * hw/kdrive/ephyr/XF86dri.c: re format this correctly. + Make function decls honour the Ansi-C standard. + * hw/kdrive/ephyr/ephyr.c: protect glx/dri related + extension initialisation with the XEPHYR_DRI + macro. Initialize the GLX ext hijacking + at startup. + * hw/kdrive/ephyr/ephyrdri.c: add more logging to ease debugging + * hw/kdrive/ephyr/ephyrdriext.c: ditto. reformat. + * hw/kdrive/ephyr/ephyrglxext.c,h: add this extension to + proxy GLX requests to the host X. started to proxy those nedded to + make glxinfo work with fglrx. Not yet finished. + * hw/kdrive/ephyr/ephyrhostglx.c,h: put here the actual + Xlib code used to hit the host X server because Xlib stuff cannot be + mixed with xserver internal code, otherwise compilation erros due to + type clashes happen. So no Xlib type should be exported by the + entrypoints defined here. + +commit 0b8545144975bf7ed43c2564d01c697144eb1244 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Aug 16 17:30:13 2007 +0200 + + Implement ReputImage and StopVideo + + * hw/kdrive/ephyr/ephyrhostvideo.c/h: + (ephyrHostXVStopVideo): add this entry point. + * hw/kdrive/ephyr/ephyrvideo.c: + Basically add ReputImage and StopVideo implementations. + Now, when other windows obscur the video window, the reclipping + seems to be well handled using StopVideo and ReputImage. + To do this, I was obliged to save the frame in PutImage, so + that I could resend it un ReputImage. + +commit 810dc55866d1c2343512354646c7ab309ea1fad2 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Aug 16 17:11:22 2007 +0200 + + Ephyr-Xv: add a new line to a log + + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrQueryImageAttributes): add newline to log. + +commit 47e6dff89e48249828e828502e98951eee7f85bc +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Thu Aug 16 17:07:36 2007 +0200 + + Xephyr-Xv: fix a crash when host X support several ports + + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrXVPrivQueryHostAdaptors): properly set + port private luke. This fixes a crash when + the host Xv supports multiple ports. + Make sure number of ports cannot be zero. + +commit a38ad562a6f50e9d76a37917b936035215ea460e +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Wed Aug 15 19:40:10 2007 +0200 + + make xephyr talk DRI protocol with hostX + + * configure.ac,include/dix-config.h.in: define the XEPHYR_DRI macro. + define it when --enable-xephyr and --enable-dri are both turned on. + * hw/kdrive/ephyr/XF86dri.c: copy this from mesa source to enable + Xephyr to talk DRI protocol the host X. In mesa, this is used by libGL.so to + talk DRI protocol with the server. + * hw/kdrive/ephyr/ephyr.c: finally initialise the DRI extension + in the ephyrInitScreen() function. + * hw/kdrive/ephyr/ephyrdri.c,ephyrdriext.c: safeguard the compilation + using the XEPHYR_DRI macro. + +commit e4239a48075c77e6a8d2d5cb21f58dd67687482f +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Aug 14 22:48:41 2007 +0200 + + Initial dri forwarding big bricks. + + * hw/kdrive/ephyr/ephyrdriext.c: added this to implement a DRI extension + into Xephyr. Normally the DRI extension is only present in the + xfree86 server, but I have ported it to Xephyr. The extension calls + functions that declared/defined in ephyrdri.h ephyrdri.c that + forwards the DRI calls to the host X. It does not work yet, as this + entry is just to put the big bricks in place. + * hw/kdrive/ephyr/ephyrdri.c,h: declaration & definition of the + DRI client API that would hit the hostX server. + * hw/kdrive/ephyr/GL/internal/dri_interface.h: added this, otherwise + inclusion of /usr/include/X11/dri/xf86dri.h won't compile + +commit e01d3dd98d1b596e75d25f94dd89c7d41223011d +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Aug 9 10:55:10 2007 +0200 + + Support clipping region in PutImage. + + * hw/kdrive/ephyr/ephyrhostvideo.c,h: + (ephyrHostXVPutImage): make this support clipping region. + The clipping region is propagated to host using XSetClipRectangles. + This changes the API of ephyrHostXVPutImage. + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrPutImage): propagate the clipping region to the new + ephyrHostXVPutImage() entry point. + +commit 39d3895469f07304d72800d8dcef6c7732f13d5f +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Aug 8 14:27:32 2007 +0200 + + make EphyrXVPriv be a singleton + + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrInitVideo) make the EphyrXVPriv object be a + singleton instance, otherwise a new object is created at each + generation. + +commit 4ed083095a13ec92bb4c8e705f26500f8312c138 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Aug 7 14:16:13 2007 +0200 + + add [Get/Put]Video and [Get/Put]Still support + + * hw/kdrive/ephyr/ephyrhostvideo.c,h: + (ephyrHostXVAdaptorHasXXX): fix these. + (ephyrHostXVAdaptorHasGetVideo): added this + (ephyrHostXVAdaptorHasGetStill): ditto + (ephyrHostXVPutVideo): added this + (ephyrHostXVGetVideo): ditto + (ephyrHostXVPutStill): ditto + (ephyrHostXVGetStill): ditto + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrPutVideo): implement this + (ephyrGetVideo): ditto + (ephyrPutStill): ditto + (ephyrGetStill): ditto + (ephyrXVPrivSetAdaptorsHooks): advertise GetVideo and GetStill + when the host X supports it. + +commit 6f7961bc218169aaa0d10cfad0952adb7fac2f00 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Mon Aug 6 18:38:54 2007 +0200 + + advertise only the hooks implemented by host X + + * hw/kdrive/ephyr/ephyrhostvideo.c,h: + (ephyrHostXVAdaptorHasPutVideo): detect if + host X has the PutVideo call. + (ephyrHostXVAdaptorHasPutStill): detect if + host X has the PutStill call + (ephyrHostXVAdaptorHasPutImage): detect if + host X has the PutImage call + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrXVPrivQueryHostAdaptors): make sure to create + atoms for attribute names otherwise subsequent + calls to get/set attribute from clients won't work. + (ephyrXVPrivSetAdaptorsHooks): don't hardwire advertising + of the PutImage call. Instead, advertise the calls advertised + by the host. + +commit 1de89239bdfa68ded2ef25fbb7d08369f527f7a9 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Sat Aug 4 01:13:38 2007 +0200 + + don't crash when hostX reports an error. + + * hw/kdrive/ephyr/ephyrhostvideo.c,h: + (ephyrHostXVLogXErrorEvent): add this to + log X error events. Heavily copied from libx11 + (ephyrHostXVErrorHandler): new x error handler that + logs the error but does not exits. + (ephyrHostXVInit): add this to be called at the beginning + of xvideo lifetime. It sets an xerror handler that does not + exit. + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrXVPrivIsAttrValueValid): this validates an attribute + value. + (ephyrSetPortAttribute): before setting an attribute, + validate the new value so that we don't send a buggy + request to host X. + * hw/kdrive/ephyr/*.c: fix case in ephyrvideo code. + * hw/kdrive/ephyr/ephyr.c: fix a typo + +commit 207714b60d18e94bbe2d755a431dbb29fe5677f7 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Fri Aug 3 01:10:39 2007 +0200 + + first implementation of putimage + + * hw/kdrive/ephyr/ephyrhostvideo.c,h: + (EphyrHostXVPutImage): first implementation. does not + support clipping regions yet. + * hw/kdrive/ephyr/ephyrvideo.c: + (DoSimpleClip): clip using a clipping box. Does not + support regions yet. + (EphyrPutImage): first implementation. + Uses a simple clipping rectangle, no region yet. + * hw/kdrive/ephyr/hostx.c: + (hostx_get_window): added this to get the main + window of the host x. + +commit aa478e09e25a1cb19b808e7e52b2ee155e34f03b +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Thu Aug 2 12:49:36 2007 +0200 + + make properties setting/query code work and hopefully complete. + + * hw/kdrive/ephyr/ephyrhostvideo.c,h: + (EphyrHostXVQueryImageAttributes): add this call. It calls + XvQueryBestSize xserver entry point. It uses the protocol + level machinery because Xvlib does not expose that entry point + as a C function. + (EphyrHostXVQueryBestSize): added this wrapper around XvQueryBestSize(). + (EphyrHostGetAtom, EphyrHostGetAtomName): added this to get + an atom or atom name from the host server + * hw/kdrive/ephyr/ephyrvideo.c: + (EphyrSetPortAttribute): convert the atom into an host server + server atom before attacking the host server with it, because in + in its current form, the input atom is only valid in xephyr. + This fix makes this call work. + (EphyrGetPortAttribute): ditto. + (EphyrQueryBestSize): implement this. + (EphyrQueryImageAttributes): implement this. + +commit 24c837c0be6f85a917582156ab61d6c9c69301f9 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Jul 31 23:18:52 2007 +0200 + + implement setportattribute and getportattribute calls + +commit b8cd313be467fd14b8e5c9ba68e1a2029c1e888b +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Mon Jul 23 12:43:43 2007 +0200 + + make xvinfo work + + * hw/kdrive/ephyr/ephyrhostvideo.c: + (EphyrHostXVAdaptorGetVideoFormats): properly get visual class instead of + returning the visual id. + (EphyrHostXVQueryEncodings): properly copy the fields because simple casting does + truncate some fields. + (EphyrHostAttributesDelete): XFree the whole array instead of trying to free invidial members. + * hw/kdrive/ephyr/ephyrvideo.c: + (ephyrInitVideo): fix a typo + (EphyrXVPrivQueryHostAdaptors): set XvWindowMask mask to adaptors type. + use host adaptor name. Don't forget to set nImages field. + (EphyrXVPrivRegisterAdaptors): report an error when KdXVScreenInit() fails. + +commit aa2fae7b75f741e57bc4a9b754b5ea7518d78f47 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sat Jul 21 23:56:13 2007 +0200 + + misc fixes. + + *(EphyrHostXVQueryAdaptors): return the queried adaptors list + * (EphyrHostXVQueryPortAttributes): return port attributes number + +commit 2bf7f3c223fd32cd4922f98eadda2e3f06d9e119 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sat Jul 21 17:55:12 2007 +0200 + + link and init xv + +commit 66b28532e533ff5688705c5286425e68d6403cee +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sat Jul 21 12:08:39 2007 +0200 + + initial commit of xv support work + +commit 1e8f8b36a56a884092ee01a0bb3f40436e30fa42 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sat Jul 21 18:22:20 2007 +0200 + + works with no adaptors + + Debug the early code to make work when the host has no video adaptors + +commit 50ff2377cac50ae25218be5b30612fb8bf6046a6 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sat Jul 21 18:20:59 2007 +0200 + + add -verbosity <level> option to command line + +commit 8426eb2433f964ea19848f24dc99eb4588d10d1a +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sat Jul 21 17:55:12 2007 +0200 + + link and init xv + +commit 50a64c84e1556ef7f8efcc7f8655e0c5e023ef4d +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Sat Jul 21 12:08:39 2007 +0200 + + initial commit of xv support work + +commit 95fadbd4022ec99f42ba78ec8a18a064903e8a7f +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Mon Jul 16 17:37:21 2007 +0200 + + Add basic Exa driver entry point validation. + + In exaDriverInit(), quickly check if the programmer forgot to set some + mandadory driver hooks, in that case display a meaningful error message. + +commit e5e6514ffa0fd132e0cc1b15b94119e6e8755f43 +Author: Andrew Christan <andrew.christian@nokia.com> +Date: Tue Oct 2 13:25:51 2007 +0200 + + Xephyr: add "multiscreen" suport + + * This patch adds multiscreen support to Xephyr. For instance, + the command line : "Xephyr :4 -ac -screen 320x240 -screen 640x480" + will launch with two "screens" - namely two main windows. + The first main window represents a screen that has the number :4.0, with + a geometry of 320x240 pixels, and the second one represents a screen + that has the number :4.1 with a geometry of 640x480. + The command line: "DISPLAY=:4.1 xclock" will launch the xclock program + on the second screen, for intance. + + * this patch was edited by Dodji Seketeli <dodji@openedhand.com> for: + - better style compliance with the rest of the Xephyr code + - make sure Xephyr could be launched with no -screen option. By + default that creates a default screen of 640x480 pixel like before + - display full titles on the windows - with insctructions to grab + keyboard and mouse - like before. + +commit 81692b628f41cb64329f3cccc0503fb216a2b8e3 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Oct 2 13:11:28 2007 +0200 + + Fix #12650: "windows not receiving mouse events in multiple screens context" + + * dix/events.c, include/dix.h: + (UpdateSpriteForScreen): added this to update the mouse sprite context + when we switch from a pScreen to another. + * mi/mipointer.c: + (miPointerWarpCursor): as we are switching to a new pScreen, + don't forget to update the mouse sprite context. + +commit f965a5f3454a95ddffb2faf9b291feff46305adf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 2 16:20:27 2007 +0930 + + dix: Ignore devices when deleting passive core grabs. + +commit dc90d500085dd74e90073be008fc514bd97b160a +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Oct 2 14:05:07 2007 +1000 + + exa: increase minor version number for pixmap allocation hooks + +commit f15af2ae60bb8503c336bc3cba0560bd314a34bc +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Aug 3 16:33:33 2007 +1000 + + exa: only setup offscreen allocator if driver doesn't provide CreatePixmap + +commit ffb58f4fa8d86e87f831430b8627f27d85f971a9 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Oct 2 14:03:39 2007 +1000 + + exa: add hooks for drivers to take over pixmap allocation + + This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe + ader. + + It allocates a 0 sized pixmap using fb and calls the driver routine to do + work of allocating the actual memory. + + ModifyPixmapHeader is mainly required for hooking the screen pixmap which + isn't create by normal methods + +commit 2b075e97ec913ebe19290181e36bb169410b820b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 2 13:28:40 2007 +0930 + + mi: switch core keyboard on XI events, not only on core events. + + We only get core events through the EQ in exceptional cases, so make sure we + actually swap the core keymap for XI events as well. Gives us back the ability + to have multiple keyboard layouts simultaneously. + +commit 31555af0005a0bc4d7ef785214696ac84681e29f +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Oct 2 13:32:57 2007 +1000 + + exa: add a pixmap private pointer for drivers to retrieve. + +commit 45ec6cd1fb242363c91ad8af1fd4a27a7f02621a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 2 13:19:07 2007 +0930 + + xfree86: fix DGA to use the correct devices. + + DGAStealXXXEvent modified to take in device argument. + + The evdev driver only sends one valuator when only one axis changed. We need + to check for DGA either way (xf86PostMotionEventP), otherwise we lose purely + horizontal/vertical movements. + + Note that DGA does not do XI events. + +commit 122ae65ed90195c584a770027b4d14ef65f72492 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 2 10:50:59 2007 +0930 + + xfree86: xf86DGA: some cleanup to use the correct devices instead of VCP/VCK. + +commit 54ce7436b2579bb20728eab7c8d460b531c378af +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Oct 2 10:49:46 2007 +0930 + + xfree86: update all pointers when calling xf86SwitchMode + + Center the frame around the first pointer found and then update all pointers + on the same screen to move to the edges (if necessary). + + Note: xf86WarpCursor needs to be modified, is using deprecated + miPointerWarpCursor and will kill the server when called with + inputInfo.pointer. + +commit 113011221a4fcbd70bc592930b35f20d55809f1e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Oct 1 21:42:01 2007 +0930 + + Xi, xfree86: Remove leftovers of the XI wrapper code. + +commit 50551ec693f40b91652fe4814e9fe2e1f9ab6517 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 28 15:04:33 2007 -0400 + + xace: remove obsoleted DRAWABLE_ACCESS hook. + +commit 8b548657204000e18c7a38706a0071ae2f93159f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 28 13:34:18 2007 -0400 + + xace: add hooks + new access codes: XKB extension. + + Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of + inputInfo.keyboard and inputInfo.pointer, respectively; all use cases + are non-XI compliant anyway. + +commit 5c03d131815cfe2f78792277ab8352e69e830196 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 28 08:02:00 2007 -0400 + + xace: add new hooks + access controls: XInput extension. + + Introduces new dix API to lookup a device, dixLookupDevice(), which + replaces LookupDeviceIntRec and LookupDevice. + +commit a511c445debbd13e8c48146ecd2d7c97e793f788 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Sep 28 18:46:41 2007 +0930 + + Remove generation of core events, long live XI! + + Let the drivers only generate XI events and put those into the event queue. + When processing events, generate core events as needed. This fixes a number of + problems with XKB and the DIX in general. + + The previous approach was to put core events and XI events as separate events + into the event queue. When being processed, the server had no knowledge of + them coming from the same device state change. Anything that would then change + the state of the device accordingly was in danger of changing it twice, + leading to some funny (i.e. not funny at all) results. + + Emulating core events while processing XI events fixes this, there is only one + path that actually changes the device state now. Although we have to be + careful when replaying events from synced devices, otherwise we may lose + events. + + Note: XI has precedence over core for passive grabs, but core events are + delivered to the client first. + + This removes the wrapping added in 340911d7243a7f1095d79b5b2dcfa81b145c2474 + +commit be466d8df808c4e4067a7963617bc3f506768f2d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 27 22:23:05 2007 +0930 + + dix: GetPairedKeyboard() always returns a valid keyboard (VCK if necessary). + + We need it unconditionally in a few places, and the rest checked for NULL and + then set it to VCK anyway. So, fixing up all callers to appreciate the defined + return value. + +commit 53434edc3d306137d019d95189ecdf0dbff75205 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 27 22:14:09 2007 +0930 + + dix: take paired keyboard instead of VCK (CoreProcessPointerEvents) + +commit 2d93e69690d2c5d4a89a795ede6423796528e5df +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Sep 27 16:47:06 2007 -0700 + + Rework local client id finding code to be more uniform + +commit c7ead3a68e5839cb92129e35b21f55007fba8445 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Sep 27 16:13:28 2007 -0700 + + xorgcfg needs $(DIX_CFLAGS) for pixman-1 include path + +commit 62a9fb4cda988a896909a5620a68c51e46d0e403 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Sep 27 16:12:29 2007 -0700 + + Fix PCI rework build on Solaris (copy what BSD does) + +commit cfe549d1ba28396c44af94133d8c1d323e3c7086 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Thu Sep 27 22:36:52 2007 +0200 + + EXA: Added back the maxPitchPixels initialization code. + + This doesn't add real value yet, but it will be useful once I add code + that splits large render operations into smaller parts if necessary. + +commit c11a27ef85674f1e77ffa7f083646b848e1dc0b8 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Thu Sep 27 14:54:40 2007 +0100 + + Add the FB_ACCESS_WRAPPER checks + +commit e0bb33b3d2e4f54cf20853cde9a1664a7dbd0dc7 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Thu Sep 27 14:50:28 2007 +0100 + + Fix bug #12286 + +commit 6d5c1e0d896666bcb2b3c1de7bfa424f140be364 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Sep 27 13:04:41 2007 +0200 + + EXA: Remove bogus pitch checks. + + exaCreatePixmap should handle all cases correctly. + +commit 598698678b07cb3a9406a9ee98bd3186366949e7 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Sep 27 13:07:09 2007 +0200 + + EXA: Punt for all fallbacks in exaFillRegion*. + + Now that PaintWindow is gone, all callers already handle fallbacks. + +commit 006f6525057970a74382132237b2131286ad147c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Sep 27 13:08:41 2007 +0200 + + EXA: Make sure tile offsets passed to drivers are never negative. + + Thanks to Björn Steinbrink for pointing out the problem on IRC. + +commit da7d9aa1fb60e13a59c9f842fed7aefc5b97c195 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Sep 27 13:08:40 2007 +0200 + + EXA: Tile offscreen pixmap coordinate offsets are always 0. + +commit d6f4764bf5f3a601a0034ded039857e8ea5563b2 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Sep 27 13:08:40 2007 +0200 + + EXA: Remove some clearly bogus code from exaCopyNtoN. + + Not sure what I was thinking when I wrote this... it would cause the box + coordinates to be off for exaCopyNtoNTwoDir or fallbacks. + + Thanks to Tilman Sauerbeck for pointing out the problem on IRC and testing the + fix. + +commit c7d6d1f589d729fa689d22d82fe30afbc6e1cacb +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Sep 27 13:08:40 2007 +0200 + + EXA: Punt on fallback case not handled correctly in exaFillRegionTiled. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=12520 . + +commit 1d938a80fd4fa58d1791c146b6b5c2dfe148dce7 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Sep 26 19:42:46 2007 -0700 + + Remove unused pciAddrHostToBus functions from ix86Pci.c + + Matches linuxPci.c changes made in 8279444a54f38c5e2e5d4c2d936a10d74990e0be + Fixes compiler errors: + "ix86Pci.c", line 194: too many struct/union initializers + "ix86Pci.c", line 204: too many struct/union initializers + "ix86Pci.c", line 214: too many struct/union initializers + +commit de06a47d4ad9c845b098438d9492a5f42483a2ad +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 27 11:45:03 2007 +0930 + + dix: GetMaximumEventsNum() needs to return 3 + MAX_VALUATOR_EVENTS. + + Raw events can be generated for pointer events, so 2 + MVE isn't enough. + +commit 32d0440c7f6e604807cb14dd32349df6f22c903b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 27 11:44:03 2007 +0930 + + xkb: xkbHandleActions: let wrapping take care of event delivery. + + This is hopefully better than hardcodey calling CoreProcessPointerEvent. + +commit 27612748e0ec20f3a23839f0a12e39f598dd722c +Merge: b614614 3b114f2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 26 07:47:29 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + dix/devices.c + +commit 3b114f2603fc2adeec7f5f8f20fe4870afb8dff1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 25 07:55:17 2007 -0400 + + Input: Properly swap DevicePresenceNotify events. + +commit 31a7994ac7365562ef1d00e0a7b25f967a961a4e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Sep 24 13:33:01 2007 -0400 + + Input: Return errors to the dispatcher instead of sending them ourself. + + Also fixed two "unused variable: stuff" warnings. + +commit 56ffc381d32687242dd094395fcf2216339bab2a +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Wed Sep 26 16:47:54 2007 +0200 + + EXA: Removed duplicated exaGetDrawablePixmap() calls. + +commit aa0325db7e8ab11d9418cae14f11c488f443ccaa +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Sep 26 15:26:42 2007 +0200 + + Xephyr: fix compiler warnings + + * hw/kdrive/ephyr/ephyr_draw.c: + (ephyrDownloadFromScreen), + (ephyrUploadToScreen): fix compiler warnings + +commit 8f9bf927e1beecf9b9ec8877131ec12c765e4d84 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 18:04:59 2007 +0930 + + xkb: Unwrap properly in ProcessPointerEvent. + + Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly + and then call the unwrapped processInputProc. Seems to be a better idea, + especially since it makes stuff actually work... + +commit 3342b5ad47be25c6838321c0aafc28c329c308b5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 18:03:21 2007 +0930 + + Xi: fix the wrapper code for processInputProc wrapping. + + Followup to [1]. + If a core grab causes the device to freeze, it overwrites the processInputProc + of the device. [1] would then overwrite this while unwrapping, the device + does not thaw anymore. + Changing this to only re-wrap if the processInputProc hasn't been changed + during the event handling. + + [1] 340911d7243a7f1095d79b5b2dcfa81b145c2474 + +commit e2cb8515661b1f7826981931d82dee6e05529f04 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 18:01:17 2007 +0930 + + xfree86: pass in the XKB event processing proc instead of the XI one. + + We need to pass ProcessPointerEvent or ProcessKeyboardEvent to + XkbSetExtension, otherwise we lose the xkb layer. + +commit 27bc1a8fef2bfd3d62fb44f7c7eb0d463ed08632 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 15:24:41 2007 +0930 + + xkb: XkbFilterEvents: Remove unused variable compiler warning. + +commit bfc89c035542a10594f5f0cbde1c7e28b7d024a7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 15:23:37 2007 +0930 + + xkb: unify ErrorFs. Prefix all with [xkb]. + + Output for XkbUseMsg intentionally skipped. + +commit 8b508f5d6bd0d3995294d5ff300a856754442999 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 15:19:53 2007 +0930 + + dix: unify ErrorFs. prepend all with [dix]. + +commit 394f3c1dbee7270a1d930846d49278424c3072d4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 15:19:37 2007 +0930 + + dix: GetPointerEvents: remove unused variable compiler warning. + +commit 55fd50273ea67eb99a0c8a830349851931298387 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 15:15:34 2007 +0930 + + Xi: unify ErrorFs. Prefix all with [Xi]. + +commit 340911d7243a7f1095d79b5b2dcfa81b145c2474 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 15:12:49 2007 +0930 + + Wrap core event handling through ProcessOtherEvents. + + When processing events from the EQ, _always_ call the processInputProc of the + matching device. For XI devices, this proc is wrapped in three layers. + Core event handling is wrapped by XI event handling, which is wrapped by XKB. + A core event now passes through XKB -> XI -> DIX. + + This gets rid of a sync'd grab problem: with the previous code, core events + did disappear during a sync'd device grab on account of mieqProcessInputEvents + calling the processInputProc of the VCP/VCK instead of the actual device. This + lead to the event being processed as normal instead of being enqueued for + later replaying. + +commit b2a4883bd89d406713d4f808e72721ecc1456d67 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 26 09:20:11 2007 +0930 + + dix: add comments to PlayReleasedEvents() + + Also stick another warning in, more changes needed for XGE if panoramix is + active. + +commit 275dc77c2972147407584323b866b8acc1654ea0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Sep 25 21:40:08 2007 +0930 + + dix: add comments to ComputeFreezes() and syncEvents struct. + +commit ae8b4f7dcf1291a2f5a0d0159f3e6089eea0578a +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Sep 24 22:06:52 2007 +0200 + + EXA: Added pitch limitations. + + Drivers can now specify the max pitches that the accelerator supports. + +commit b61461425eb15fcff2a58330d74fe5a5a1f226fc +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 25 09:56:00 2007 -0400 + + xace: add hooks + new access codes: XV extension. + + May need to revisit this extension in the future, depending on observed use. + +commit 9bd04055a2175ec16756d3bf73ae03b5e163a28a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 25 09:33:51 2007 -0400 + + xace: change prototype of VALIDATE_DRAWABLE_AND_GC macro to allow access + mode to be passed to dixLookupDrawable. + +commit 988f446fe00ac2b92c484a4440613dd82191eadd +Author: Eric Anholt <eric@anholt.net> +Date: Mon Sep 24 20:23:35 2007 -0700 + + [EDID] Ignore reserved bits in deciding monitor vs detailed timing descriptor. + + Even though they're defined to zero by the spec, we've seen an EDID block + where the (empty) ASCII strings were stuffed in a byte early, leading to the + descriptor being considered a detailed timing instead. + +commit 5d9f6cf51becdeb1d2be9bdeec4bb5d0c4dd0e8b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 13 23:33:07 2007 +0930 + + dix: cosmetic change. Remove "pointer" variable, might as well use pDev. + +commit c4db4d1fcf7fa2ba802a208beee6b3adc83921f5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 13 23:27:07 2007 +0930 + + include: remove register keywords. + +commit 1c25c46f3d5f98be8dbf36684aad4302b220e163 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 13 23:22:27 2007 +0930 + + dix: fix compiler warnings about unused variables. + +commit 68e0c4988e359e3c9da933946bc703cf8530bdbc +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 12 20:48:48 2007 +0930 + + dix: fix "possible use of uninitialized variable" warning. + + The device passed through to UnrealizeCursor isn't used anyway, so setting it + to NULL is enough. + +commit b484451eab261a919fe94c0c0f56877f7571fc9e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 12 18:34:51 2007 +0930 + + dix: don't try to access "time" field for GenericEvents in PlayReleasedEvent. + + GenericEvents can't be parsed to keyButtonPointer, and there's no guarantee + that it has a time field anyway. PlayReleasedEvent needs to store the millis + when we know it (core events, XI event) and just re-use them for GenericEvents. + + Yes, this is a hack. But it looks like the time has zero significance anyway. + +commit 1c38eac442a3ab9e8469e944f382251957996c5a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 12 18:09:57 2007 +0930 + + dix: fix comment for DeliverDeviceEvents. + + DDE is not always called, grabbed or focused devices go through + Deliver{Grabbed|Focus}Event first. + + Thanks to Eamon Walsh for spotting it. + +commit 06188ce90d2a8146140773f9367f23404b464282 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 12 18:00:03 2007 +0930 + + dix: Make EnqueueEvent aware of GenericEvents. + + GenericEvents can be > sizeof(xEvents), so we need to make sure we're + allocating and copying enough memory for the event. + +commit 8840829ab93c4eb62eb58753c015da5307133fe5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 12 17:40:11 2007 +0930 + + dix: don't compress motion events from different devices (EventEnqueue) + +commit 27ad5d74c20f01516a1bff73be283f8982fcf0fe +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Sep 23 17:17:03 2007 +0300 + + Input: Generate XKB mapping changes for all core-sending devices (bug #12523) + + When we change the mapping on a core device, make sure we propagate this + through to XKB for all extended devices as well. + +commit 0e800ca4651a947ccef239e6fe7bf64aab92257c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Sep 23 12:43:31 2007 +0300 + + GetKeyboardEvents: Reject out-of-range keycodes (bug #12528) + + We can only deal with keycodes between 8 and 255, so make sure that we never + accept anything out of this range. + +commit e1860f241b7322c54c109cf5727df45b54b73916 +Author: Alex Deucher <alex@botch2.(none)> +Date: Sat Sep 22 17:54:51 2007 -0400 + + Document xf86_crtc_clip_video_helper better. + +commit 19d30c1c771c0f5c9dfc0f4cfb084dd2e528d992 +Author: Alex Deucher <alex@botch2.(none)> +Date: Sat Sep 22 17:51:27 2007 -0400 + + Revert "Fix possible crash if Xv window is outside of either crtc" + + This reverts commit 92355314103d2193ca20786915eaf608922a36dc. + + This changes ABI. False means there was a memory failure of some kind, + not that the video shouldn't be displayed + +commit 92355314103d2193ca20786915eaf608922a36dc +Author: Michel Dänzer <daenzer@debian.org> +Date: Sat Sep 22 14:25:02 2007 -0400 + + Fix possible crash if Xv window is outside of either crtc + +commit edd88170836ec985ab1a59179de69d50644b8dff +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Sat Sep 22 13:02:08 2007 +0200 + + EXA: Check ABI compatibility earlier. + + If the driver isn't compatible to the server, all bets are off anyway wrt + the contents of the fields that we're validating, which can lead to bogus + error messages. + +commit abe0a51f3f790f8c055289465e130177c4b647cc +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Fri Sep 21 17:07:36 2007 -0700 + + So, like, checking return codes of system calls (signal, etc) is good. + Also, only restore an old signal handler if one was actually set + (prevents the server from dying on OS X). + +commit eb82b19aa71333b46e927516cc228f25d3e05e4d +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Sep 20 19:55:48 2007 -0700 + + XDarwin: build fix for X11.app + +commit 5b08932bfbb7e4612733fffd2acc9682c6856d90 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Sep 20 19:27:31 2007 -0700 + + XDarwin: pulling in Indirect GLX fixes from downstream + +commit 742d5d6adc4d4a1b6fceeb3443d7931e107462f7 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Sep 20 18:03:51 2007 -0700 + + XDarwin: Fixes to quartzKeyboard.c to prevent a crash using certain non-US keyboards + +commit 374bd88d1025835fe36ca0ff6620eb1d3b0a06b0 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Sep 20 16:50:49 2007 -0700 + + XDarwin: Merging misc changes from downstream. + + The only functional changes in this patch are a removal of use of + Xtrans internals -- replaced by xcb, which doesn't seem to be used + elsewhere in the server? Pity. + Also, a fix to make all X11 windows pop to the front of the display + when the X11.app icon is clicked -- currently takes two clicks, + not sure why. + +commit 3a965fdadccea7beff09a28c9c0ef4b4975eae38 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Sep 20 16:22:24 2007 -0700 + + Don't segfault on shutdown if we never managed to connect to dbus. + +commit 50fa8722d35c12e5f0322cebe25faf99c39d4f50 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Sep 20 14:00:33 2007 -0700 + + Set noCompositeExtension to TRUE when failing to initialize the extension (e.g. when Xinerama is enabled). + +commit a247886b082cea93fa8f8980616a9c388ba70111 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Sep 20 13:06:38 2007 -0400 + + xace: add hooks + new access codes: XF86-Bigfont extension + +commit f6532a81eec5f096e27285687964b77c17987f72 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Sep 20 12:17:17 2007 -0400 + + xace: add hooks + new access codes: APPGROUP extension + +commit 82f7195a628cc7ec94abc0cfe5bae2be8af443bc +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Sep 20 09:17:09 2007 -0400 + + xace: modifications to ChangeWindowAttributes special case: separate + Receive and SetAttr. Refer to 963e69b8efc39369915e7f0c6f370ac0d5d2b60f + +commit 661b1328cf992d8855552677a94d60de1d8ce942 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Sep 20 08:41:26 2007 -0400 + + xace: add hooks + new access codes: SYNC extension + + May need to revisit this extension in the future, depending on observed use. + +commit 90bacdef723e1e49c72775144916750758d3568c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Sep 20 06:53:51 2007 -0400 + + xace: add hooks + new access codes: MIT-SHM extension + +commit 12a18cc8903fac53c3c77b23dd8093187594a4f3 +Author: David Nolden <david.nolden.git@art-master.de> +Date: Fri Sep 14 22:42:19 2007 +0200 + + compilation-fix in debug mode + +commit e93cff52fed9074aa007c2e6ec6b578f69aef3cb +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 19 14:48:20 2007 -0400 + + xace: add hooks + new access codes: DOUBLE-BUFFER extension + +commit 082c0f7fb34458ebb303cf875d1d75686eca25e6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 19 13:59:35 2007 -0400 + + devPrivates rework: move devPrivates field in drawable structure types + to just below the DrawableRec. Wish there were a better way to do this + but it has to be in the same place for all drawable types. + +commit 5b36b64192517e2470766ce7ff1d4dc04c936fad +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 19 11:11:54 2007 -0400 + + xace: add missing argument to hook call. + +commit 963e69b8efc39369915e7f0c6f370ac0d5d2b60f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 19 11:11:41 2007 -0400 + + xace: add special-case for just setting the event mask on a window, + this should only check "receive" permission, not "setattr" permission. + +commit c140d20f4ade973496dcbbd06453402ef0c0e85c +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 19 05:58:22 2007 -0700 + + XDarwin: mass change from using xorg-config.h to dix-config.h cuz we're not using the X.org ddx anymore + +commit bcb5e3e6276ce9ae7a4dae7434cf2247764da078 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 19 04:46:10 2007 -0700 + + XDARWIN: More fixes to Makefile.am + + At least on my system (10.5 with the latest and greatest modules), + Xquartz now builds out of the box. It doesn't quite work yet, but + hey -- you have to start somewhere. ;) + +commit 97c150b61bbe436453b05d3c07cd2173870aac40 +Merge: 57907e0 547ad21 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 19 07:25:55 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + afb/afbpntwin.c + afb/afbscrinit.c + afb/afbwindow.c + cfb/cfb.h + cfb/cfballpriv.c + cfb/cfbscrinit.c + cfb/cfbwindow.c + configure.ac + fb/wfbrename.h + hw/xfree86/xf4bpp/ppcIO.c + hw/xfree86/xf4bpp/ppcPntWin.c + hw/xfree86/xf4bpp/ppcWindow.c + hw/xfree86/xf8_32bpp/cfbscrinit.c + mfb/mfb.h + mfb/mfbpntwin.c + mfb/mfbscrinit.c + mfb/mfbwindow.c + mi/miexpose.c + + Note: conflicts caused by devPrivates rework vs. paintwindow changes. + +commit 5e209b21f3d6b3268fa7dab1e8df892d8352cc08 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 19 03:44:46 2007 -0700 + + XNEST: removed obsolete hack to build under Darwin + +commit 378c7ebef444cdc9ae62ebf05c7111088a0c4bc1 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 19 03:43:40 2007 -0700 + + XVFB: Removed obsolete hack to build on Darwin + +commit 7813392d1c9a38d01cfff17732278bb7798eee5d +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 19 01:52:58 2007 -0700 + + XDarwin: changes to Makefile.am to use new conditionals + +commit 170fc77d9e73151f5c1c1f0f04598b3497db4284 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Sep 19 09:54:09 2007 +0200 + + xserver: don't force DTRACE detection by default + + this fixes a breakage caused by 7a4ec34e256bf36b041c011a083916ad75a1d8bc. + When running a non DTRACE aware system that is not darwin*, DTRACE was getting + required. Now it is not anymore. + +commit 9b4f5157179a0d20756c16ea1f5130b171f72bb1 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Tue Sep 18 21:40:32 2007 -0700 + + XDarwin: We build many many different targets, let's break them out into autoconf conditionals + +commit 7a4ec34e256bf36b041c011a083916ad75a1d8bc +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Tue Sep 18 20:37:09 2007 -0700 + + XDarwin: Disable dtrace support on Darwin 9 (since it doesn't work ... yet ...) + +commit 3c19ec47b434d4ca84db58363cc053cc0b6aa413 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Tue Sep 18 20:15:44 2007 -0700 + + XDarwin: changed XF86BigFont support default from yes to auto so XDarwin can disable it + +commit 547ad2125ece93bbe01f6d09a3baf176ebd16bb3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Sep 17 20:33:56 2007 +0200 + + EXA: Make sure driver hooks get correct offscreen offsets from exaCopyDirty. + + This should ensure the driver UploadTo/DownloadFromScreen hooks can always + work as intended. + +commit 56cc24ffb21f7fd41f9ea9e8f969aa85021b9f53 +Author: Alan Hourihane <alanh@tungstengraphics.com> +Date: Mon Sep 17 20:33:56 2007 +0200 + + EXA: Don't crash in ExaCheckPolyArc. + + See https://bugs.freedesktop.org/show_bug.cgi?id=12286 . + +commit 7ac89060e02c7a803018afd580720f8326561fd8 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Sep 17 20:33:55 2007 +0200 + + EXA: Don't crash in exaGetImage when swapped out. + +commit 3876c6c80534a6f7412ec806a2ba9ada22c5e505 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Sep 17 18:47:45 2007 +0200 + + EXA: Fixed compiler warnings. + +commit d5738ff2e0f93df4729c075ce31a1041d580e50e +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Sep 17 16:59:03 2007 +0200 + + EXA: Added missing exaPrepare/FinishAccess calls in ExaCheckPushPixels. + +commit a0dafd95e1e13a2f1b77ab9f82fd365a7be19de5 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Sep 17 16:45:20 2007 +0200 + + Removed hw/xwin/winpntwin.c from Makefile.am. + + winpntwin.c was removed in e4d11e58ce349dfe6af2f73ff341317f9b39684c. + +commit 7bd65577018a574970b767b67967b65fcd5c2bf0 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Sat Sep 15 14:01:57 2007 +0200 + + Initialize output->pendingProperties. + +commit b9f7aeb20015290a8acf938a11bf9272bf3527cf +Merge: e4d11e5 06d27f8 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Sep 13 00:15:45 2007 +0000 + + Merge remote branch 'origin/master' into paint-window + + Conflicts: + + mi/miexpose.c + +commit e4d11e58ce349dfe6af2f73ff341317f9b39684c +Author: Eric Anholt <eric@anholt.net> +Date: Wed Sep 12 13:58:46 2007 +0000 + + Remove the PaintWindow optimization. + + This was an attempt to avoid scratch gc creation and validation for paintwin + because that was expensive. This is not the case in current servers, and the + danger of failure to implement it correctly (as seen in all previous + implementations) is high enough to justify removing it. No performance + difference detected with x11perf -create -move -resize -circulate on Xvfb. + Leave the screen hooks for PaintWindow* in for now to avoid ABI change. + +commit 06d27f8045966c1fb154eafaff308a01b93f265b +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Sep 12 23:57:30 2007 +0100 + + Try again to fix drawable and tile offsets in miPaintWindow + + Many coordinate spaces are hard. Let's go drinking. + +commit dd3992eb86377684a5dbe86fa19c756a9e53cda2 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Sep 12 22:39:31 2007 +0100 + + miPaintWindow draw to window for background. + + Instead of drawing to window pixmap for everything, draw to window for + background as that works for Xnest and Xdmx; draw to pixmap for borders + which neither of those X servers use. + +commit 6da39c67905500ab2db00a45cda4a9f756cdde96 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Sep 12 13:23:13 2007 +0000 + + Fix build on FreeBSD after Popen changes. + +commit 257c8ed17f4f908e0d0d5e53aaf13aa3b1313f50 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Sep 12 12:11:49 2007 +0100 + + Rewrite miPaintWindow to draw to window pixmap. + + miPaintWindow was drawing to the root window, or (sometimes) drawing to the + window after smashing the window clip list. This is losing, and easily fixed + by just drawing to the window pixmap. + +commit 43dc41034735d84765233a78bd619f3f0e7ace75 +Author: Brice Goglin <bgoglin@debian.org> +Date: Wed Sep 12 01:43:37 2007 +0200 + + Replace a non-ascii char with the corresponding groff escape in exa.man.pre + +commit a5b8053606d6e786cdcf6734f271acc05f9cc588 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Sep 11 11:37:06 2007 -0400 + + Ignore - not just block - SIGALRM around Popen()/Pclose(). + + Because our "popen" implementation uses stdio, and because nobody's stdio + library is capable of surviving signals, we need to make absolutely sure + that we hide the SIGALRM from the smart scheduler. Otherwise, when you + open a menu in openoffice, and it recompiles XKB to deal with the + accelerators, and you popen xkbcomp because we suck, then the scheduler + will tell you you're taking forever doing something stupid, and the + wait() code will get confused, and input will hang and your CPU usage + slams to 100%. Down, not across. + +commit 2e3e08d31e908ceadeef16d6069cdaf8c61d7ed1 +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Sep 11 08:50:41 2007 +0200 + + xserver: test presence of strlcpy in configure + + * configure.ac: define HAVE_STRLCPY when function strlcat is present + this serves at least to unbreak libxtrans code compilation. + +commit e8c73ac697aa472e10b4d8c093a715df0bf545af +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Tue Sep 11 00:20:45 2007 +0200 + + Xephyr: fix compilation breakage. + + * hw/kdrive/ephyr/ephyr_draw.c: + (exaDDXDriverInit): pExaScr->hideOffscreenPixmapData does not exist + anymore, so don't set it. + +commit 321e0a21600e418bbeb164043a9a21a0ff80cbe9 +Author: Ben Byer <bbyer@bbyer.local> +Date: Sun Sep 9 16:28:41 2007 -0700 + + fixed cut-and-paste typo + +commit 0ff273fd1e2ea7242b3e6c5effb2a623ef32ec6f +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Sep 6 18:52:26 2007 -0700 + + XDARWIN: fixes to make Xquartz build again + +commit f8637137ab43818d45d249b337820cbf427a05ec +Author: Ben Byer <bbyer@bbyer.local> +Date: Thu Sep 6 05:39:57 2007 -0700 + + XDARWIN: build fix for quartz/pseudoramiX.c + +commit e8093e15c7df7a3d5a9717bc9d7d7517b0743f29 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Sep 3 13:52:29 2007 +0200 + + EXA: Exclude bits that will be overwritten from migration in exaCopyNtoN. + + Also plug a region leak in exaPolyFillRect. + +commit e81af8ba643df3be53b0a46d9d4a0eaf21557c9e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Sep 3 13:14:29 2007 +0200 + + EXA: exaFillRegion{Solid,Tiled} improvements. + + Use region to exclude bits that will be overwritten from migration. + + Also make exaFillRegionSolid use the same logic as exaFillRegionTiled. + +commit 5f7da4da8de7449e1c2a4c679632a0b2a5858b7e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 31 16:59:28 2007 +0200 + + EXA: Use exaShmPutImage for pushing glyphs to scratch pixmap in exaGlyphs. + +commit be922b30486abce3a8c13996d579b211a7b56f0e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Aug 30 13:59:07 2007 +0200 + + EXA: exa(Shm)PutImage improvements. + + Improve exaShmPutImage performance and reuse its core in exaPutImage as it + seems faster than the previous code when the driver doesn't provide an + UploadToScreen hook. + + Make sure all damage records are notified of the damage incurred by actual + ShmPutImage calls. + + Remove superfluous manual damage tracking for actual PutImage calls. + +commit ea92ea415665e294a1ba233e9a1d39b6daa0cee1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Aug 30 13:54:18 2007 +0200 + + EXA: exaGetImage improvements. + + Use the new migration infrastructure to cache FB bits we need in the system + copy, for the benefit of repeated calls. + +commit aa2ed73e0ec881947c969b67269e3206da4de359 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Aug 30 13:50:42 2007 +0200 + + EXA: Remove superfluous manual damage tracking. + + These should all be covered by damage wrappers. + +commit a634c9b03494ba80aeec28be19662ac96657cc23 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Aug 30 13:48:03 2007 +0200 + + EXA: RENDER improvements. + + Exclude bits that will be overwritten from migration. + + Use exaGlyphs even when Composite can't be accelerated, to avoid PolyFillRect + roundtrip via offscreen memory. + + Initialize mask pixmap in exaGlyphs in FB in addition to system if the driver + provides Composite hooks to avoid migration overhead. + + Remove manual damage tracking where superfluous. + +commit 1f457ff3db24178eefecfbbf177aaf6554adb204 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Aug 30 13:44:20 2007 +0200 + + EXA: Improvements for 1x1 pixmaps. + + Initialize system and FB copy in exaFillRegionSolid and adapt + exaGetPixmapFirstPixel to the new migration infrastructure. + + This should mostly eliminate migration overhead for these, whether they are + used for acceleration or fallbacks. + +commit 489bc7551ffc7360ba9648ca5c98b59c7e7a1fd1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Aug 30 13:37:53 2007 +0200 + + EXA: exaImageGlyphBlt improvements. + + As we can't actually accelerate anything interesting here, just migrate out + once and call fbSolidBoxClipped instead of taking a round trip via offscreen + memory with exaSolidBoxClipped. + + Reuse pending damage region for extents and to prevent any actual migration of + pixmap contents when we're overwriting the whole pending damage region. + + Remove superfluous manual damage tracking. + +commit 2e0895a4ba27c1308713022820444c8f57f7a69f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Aug 30 13:30:03 2007 +0200 + + EXA: Improvements for trapezoids and triangles. + + Only migrate once in exaTrapezoids/Triangles instead of every time in + exaRasterizeTrapezoid/AddTriangles. Adapt manual damage tracking to new + infrastructure. + + Also move definition of NeedsComponent() closer to where it's used. + +commit 6c9d7ed61bc4a19d21c53717b8af3d90b5d82ca9 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Sep 6 13:10:16 2007 +0200 + + EXA: Hide pixmap pointer outside of exaPrepare/FinishAccess whenever possible. + + We finally want to catch all cases where the pixmap pointer is dereferenced + outside of exaPrepare/FinishAccess. + + Also fix a couple of such cases exposed by this change. + +commit 962eddd7a2863a8475f5fd8107d3112df08d1172 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Aug 29 19:55:22 2007 +0200 + + EXA: Support partial migration of pixmap contents between Sys and FB. + + The initiator of migration can pass in a region that defines the relevant area + of each source pixmap or the irrelevant area of the destination pixmap. By + default, the pending damage region is assumed relevant for the destination + pixmap, and everything for source pixmaps. + + Thanks to Jarno Manninen for reassuring me that my own ideas for this were + feasible and for providing additional ideas. + +commit f27931bdd26fc9a1e6bb5173b5537e32c51a98b3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Aug 29 19:41:52 2007 +0200 + + Add DamagePendingRegion. + + DamagePendingRegion returns a pointer to the region of a drawable that will + be damaged by the current operation for damage records that chose to get damage + reported only at the end of the operation. + +commit 5c7ee3f47fa0c067102a17dee3f75a51cc0bdb3a +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 24 19:24:18 2007 +0200 + + EXA: Track valid bits in Sys and FB separately. + + Also consolidate exaCopyDirtyToFb/Sys. + +commit 8cfcf9973c765f11d1b45b95b8091ef7e01d7f01 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Sep 5 20:10:09 2007 +0200 + + EXA: Migrate out pixmap in exaPrepareAccess. + + Also fix exaFinishAccessGC not to use the same index for tile and stipple. + +commit e510a77ba4d65d5d6ead514cd698f1b1e3f8a2b6 +Author: Dave Airlie <airlied@linux.ie> +Date: Tue Jul 17 17:16:51 2007 +1000 + + EXA: Add a couple of missing exaPrepare/FinishAccess calls. + +commit 72b347e681f5667b68257822e7cec02ab4c9cb6d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Sep 7 14:31:19 2007 +0930 + + dix: Enabling devices must not overwrite existing sprites/pairing. + + EnableDevices is (amongst others )called after a VT switch. We must not create + a new sprite or re-pair the device, otherwise we lose the input device setup + that we had before the VT switch. + + This requires the devices to be in exactly the same order as before + the VT switch. Removing a device while on a different VT is probably a bad + idea. + +commit 57907e0943da0c3fd3bf6c128d210b544629ce72 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Sep 6 16:55:51 2007 -0400 + + devPrivates rework: register an offset for every resource type, use + signed values so -1 actually works correctly, and provide a macro for + adding an offset to a pointer. + +commit 84eb7e62248ddc2761af8cefe33d1b7147477528 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Sep 6 13:36:37 2007 +0100 + + Fix Xdmx build + +commit 35ec8b89f4cdf5ec48b292d47b2dad42d2fb9534 +Author: Ben Byer <bbyer@bbyer.local> +Date: Thu Sep 6 05:34:14 2007 -0700 + + DDX changes for XDarwin + + Creating a real DDX section for XDarwin instead of + stuffing it into the XORG section in a half-assed manner. + +commit d627061b48ae06d27b37be209d67a3f4f2388dd3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 18:57:00 2007 +0930 + + xfree86: wrap keyboard devices for XKB. + + Call ProcessOtherEvents first, then for all keyboard devices let them be + wrapped by XKB. This way all XI events will go through XKB. + + Note that the VCK is still not wrapped, so core events will bypass XKB. + +commit 5ee409794ee604fcf84886f70429fc2d6b1ff4f1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 18:52:02 2007 +0930 + + dix: add XI event support to FixKeyState. + + FixKeyState needs to be able to handle XI events, otherwise we get "impossible + keyboard events" on server zaps and other special key combos. + +commit 6334d4e7be18de5f237c12a6dc20f75aa23477d0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 18:49:57 2007 +0930 + + xkb: enable XI event processing for xkb. + + XI events can now take the same processing paths as core events, and should do + the correct state changes etc. + + There's some cases where XKB will use KeyPress as type for an event to be + delivered to the client. Stuck warnings in, not sure what the correct solution + is yet. + +commit 49dbe9a757a3d7a0b9ab318242c6cc0cbd4dd1f0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 17:27:28 2007 +0930 + + dix: close virtual core devices after other devices. + + If a device is paired with the VCP, deleting the VCP before the device will + segfault the server when the sprite should get updated. + +commit 03680a384aa423ece75b658f00b96db2628c39fa +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Sep 6 15:43:47 2007 +0930 + + dix: don't change the device struct while processing core events. + + The device state needs to be changed while processing the XI event. Core + events are always processed after XI, so by then the device is already set up + properly. However, we now rely on DeviceButtonMotionMask to be equal to + ButtonMotionMask. It already is, but stick a big fat warning in so nobody + attempts to change it. + + This commit disables XKB for the VCK, thus essentially for all devices. + Temporarily anyway. + +commit f3f614cd01ae56d84d61b4f5c907c6edd7c8c6d3 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 5 20:34:00 2007 -0700 + + Revert "configure.ac: exclude pci-access dependency from XDarwin" + + This reverts commit 20c6677d1b5f8d77325dd878ffa3df1d0fb01864. + +commit bf1641b94cffa54b786e18eaeff3839d8790b9f2 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 5 20:33:43 2007 -0700 + + XDARWIN: Add launchd support + + This adds a bit of glue to configure.ac to support launchd detection; + on OS X (or other platforms which choose to implement launchd), this allows + the system to automagically start the Xserver as necessary to serve clients. + +commit 71c21dea748ea0dcad758679c40ee39192d170f9 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Wed Sep 5 18:45:50 2007 -0700 + + added HAVE_LAUNCHD check to configure.ac (mostly for OSX) + +commit 81c28ffd2b13a83770eadcfd7829d35d319d637f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Sep 5 17:46:23 2007 -0700 + + Fix key repeats during VT switch. + + Add keyc->postdown, which represents the key state as of the last mieqEnqueue + call, and use it when we need to know the posted state, instead of the + processed state (keyc->down). Add small functions to getevents.c to query and + modify key state in postdown and use them all through, eliminating previously + broken uses. + +commit e332335241af28ef0ab66b102d0cbc4e5c73ac68 +Merge: 7381e91 accd71b +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Wed Sep 5 15:51:23 2007 -0700 + + Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/xserver + +commit 7381e9149e3cbb7e672070781a16e3f096202be9 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Wed Sep 5 15:51:11 2007 -0700 + + added an exclusion for setting XORG on darwin + +commit accd71bda6f958ea6892ad3a10879232d345774c +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Sep 5 14:19:19 2007 -0700 + + Deliver correct event when releasing keys on VT switch. + + In commit 41bb9fce47f6366cc3f7d45790f7883f74289b5a, the event delivery loop + for Xinput enabled keyboards was changed and accidentally used the wrong + index variable, causing random events to be delivered when returning from VT + switch. + + In addition, in commit aeba855b07832354f59678e20cc29a085e42bd99, + SIGIO was blocked during delivery of these events, but not for the entire + period the xf86Events array was being used. Block SIGIO for the whole loop + to avoid other event delivery from trashing the key release events. + (cherry picked from commit aa7ed1f5f35cd043bc38d985500aa0a32e857e84) + +commit 8b77dc7e808f61f1ed10fe05cf898bb47459a76d +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Wed Sep 5 14:48:38 2007 -0700 + + XDARWIN: build breakage fix + +commit 20c6677d1b5f8d77325dd878ffa3df1d0fb01864 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Wed Sep 5 14:31:01 2007 -0700 + + configure.ac: exclude pci-access dependency from XDarwin + + XDarwin doesn't need any of this pci stuff since it doesn't talk directly to hardware, + so it doesn't make sense to require it when building on OSX/Darwin. + +commit ff01e44e33fd072958fb0157dae072f1b1c88944 +Merge: 8ba8c16 47300ed +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Wed Sep 5 13:56:08 2007 -0700 + + Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/xserver + +commit 8ba8c16af773ec83a0b1c0661a23d746b401944e +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Wed Sep 5 13:46:30 2007 -0700 + + build fixes for XDarwin + +commit 47300ed2be59d0ba7ea9345b954bf3104877c095 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Sep 5 12:34:29 2007 -0700 + + Fix server version reporting to be the server package version. + + Previously, the server version reported by xdpyinfo and Xorg -version would + bear some vague resemblance to a X.Org katamari version, but in the presence + of modularization (and client-server relationships with different katamari + versions on each side) those numbers don't really make sense. Instead, just + report the package version. + + When branching a stable branch, master's version should be immediately updated + to the endpoint of the stable branch plus a snapshot of 1 (for example, + 1.4.0.1 after server-1.4-branch). The stable branch should then be changed to + RC0 at that time (1.3.99.0, for example). + + This scheme was partially attempted for server 1.3, but lacked the appropriate + master updates, thus why it had to be revisited now. While here, we can also + remove a lot of versioning complexity since everything is based on the package + version. + +commit 6c89d1237c4fdce961b30a8eaee964af5d56565e +Author: Dodji Seketeli <dodji@openedhand.com> +Date: Wed Sep 5 17:46:49 2007 +0200 + + Kdrive: unbreak kdrive linking + + * configure.ac: re-sort Kdrive libs so that symbols get properly resolved. + Basically, all some libs are present in both $KDRIVE_LIBS and $XSERVER_LIBS, + and some libs orders are not correct. So I made sure Kdrive servers don't have + to link against $KDRIVE_LIBS *and* $XSERVER_LIBS. They just have to link + against $KDRIVE_LIBS now. + * hw/kdrive/*/Makefile.am: update those makefile to reflect the change in configure.ac + +commit 0003ccfcdfae1b473aa024342304b84256d378b9 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Sep 5 11:18:36 2007 -0400 + + xace: add new fields to resource access hook to allow parent resource objects + to be passed in at create time. Also added a missing devPrivates initializer. + +commit 28e48cd8e6e4c412a49d7177daad6d3c93c28e08 +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 5 04:43:17 2007 -0700 + + Another pathname fix for event_status_driver.h + +commit b6c0697fd67323893a9ad3676c33f2f1ec48e15e +Author: Ben Byer <bbyer@bbyer.local> +Date: Wed Sep 5 04:40:03 2007 -0700 + + fixed path for event_status_driver.h + (The path currently used is deprecated on Tiger and invalid on Leopard.) + +commit c4fff050836feeef8390b7197f1de39af2997811 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Sep 5 16:19:45 2007 +0930 + + Revert "Input: Fix stuck modifiers (bug #11683)" + + This reverts commit 6b055e5d9751e3679ff98065e43225ec8a960053. + + MPX relies on the XI event being delivered before the core event. Device grabs + break, amongst other things. I guess stuck modifiers need to be fixed some + other way. + + Conflicts: + + dix/getevents.c + +commit bfe6b4d2d9952a80f8dbc63eec974ef894e5c226 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Sep 4 17:44:51 2007 +0930 + + xkb: Store the action filters per device in the XkbSrvInfoRec. + + Using a global array for action filters is bad. If two keyboard hit a modifier + at the same time, releaseing the first one will deactivate the filter and + thus the second keyboard can never release the modifier again. + +commit cc5c926267be099d793e6dfec17916f21c73c64d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Aug 30 15:51:22 2007 +0930 + + randr: RRPointerScreenConfigured needs to move all pointers. + + Previous version only moved the VCP, causing "bogus pointer events" lateron. + Now we run through the device list, updating each pointer separately if + necessary. + + Also stick a big warning into RRPointerMoved, not sure what device we need to + work on here. + +commit 136fde2c7b5ed590bc6c63d11ede31e92dc679a2 +Author: Ademar de Souza Reis Jr <ademar@mandriva.com.br> +Date: Tue Jul 3 13:44:28 2007 -0300 + + Add Xserver man section about catalogue:<dir> FPE + + catalogue:<dir> FPEs were introduced in libXfont 1.2.9 + +commit eb6a933dc60bec5601260794eeb973e946af37b6 +Author: Ademar de Souza Reis Jr <ademar@mandriva.com.br> +Date: Tue Jul 3 13:44:03 2007 -0300 + + Add xorg.conf man section about catalogue:<dir> FPE + + catalogue:<dir> FPEs were introduced in libXfont 1.2.9 + +commit 205183a733237ea418a25c7423b689fcc8eae628 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Sep 4 16:19:22 2007 -0700 + + Fix driver build by including an appropriate Requires.private line on pixman. + + We'd previously been substituting PIXMAN_CFLAGS, but we've got a better tool + now, plus I deleted the PIXMAN_CFLAGS substitution without noticing. + +commit d67e210f3458b62d7d4a6032aabfda0004d661c1 +Author: Gerte Hoogewerf <g.hoogewerf@gmail.com> +Date: Tue Sep 4 16:09:38 2007 -0700 + + Add stub symbols to make xprint build. + +commit f7f79724fdea0cc6fda0e90e56431df937d49335 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Sep 4 15:10:49 2007 -0700 + + Increase despair by fixing xprint build after my _DEPENDENCIES changes. + +commit e89d16be07e45e487913509788a9e8cb1ee09bc7 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Sep 4 14:49:49 2007 -0700 + + Revert part of 529acb175440969af9d7fa38aab8d7dea0dc2661 because libtool is smart. + +commit bf5948518763b5e21eff806a0a9abc5f7757fa10 +Merge: 4062db4 735da3d +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Tue Sep 4 22:40:31 2007 +0200 + + Merge branch 'master' of git+ssh://herrb@git.freedesktop.org/git/xorg/xserver + +commit 4062db4020c671fc0921a3a4e7fe5d8dc1be2e1d +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Tue Sep 4 22:39:14 2007 +0200 + + typo in comment + +commit ce9e83d913511fe619da42f805d7bcd1a2a60d90 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 4 14:01:55 2007 -0400 + + xace: add hooks + new access codes: Damage extension + +commit 735da3dcd09f59c40f68eca8c9a91c2e826cd1b9 +Author: Egbert Eich <eich@freedesktop.org> +Date: Tue Sep 4 16:42:57 2007 +0200 + + Fixing xf86I2CGetScreenBuses(), now dereferencing the correct pointer. + +commit 7c5de093d499de63d39fe038d86da0a085262017 +Author: Egbert Eich <eich@freedesktop.org> +Date: Tue Sep 4 15:07:17 2007 +0200 + + Fixing sig11 in xf86I2CGetScreenBuses(). + + Dereferencing a pointer once too often caused a + sig11 in xf86I2CGetScreenBuses(). + +commit 9adea807038b64292403ede982075fe1dcfd4c9a +Author: Hong Liu <hong.liu@intel.com> +Date: Tue Sep 4 08:46:46 2007 +0100 + + bgPixel (unsigned long) is 64-bit on x86_64, so -1 != 0xffffffff + + This patch should fix bug 8080. + +commit 529acb175440969af9d7fa38aab8d7dea0dc2661 +Author: Eric Anholt <eric@anholt.net> +Date: Sun Sep 2 15:16:01 2007 -0700 + + Fix Xorg build by listing circular dependency libraries twice. + + One of these I introduced by listing dix and mi in the same library list to + simplify other servers. The other had been hacked around using libosandcommon, + which is now gone. + +commit c56930e6ca90a61d2f4cbd845f7d0a51a66f83cb +Author: Eric Anholt <eric@anholt.net> +Date: Fri Aug 31 18:27:41 2007 -0700 + + Remove backend.[ch] from neomagic to fix distcheck. + +commit f98dfec79dadb70fa7bba84e7335f92b3a73dc02 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Sat Sep 1 21:14:22 2007 -0700 + + [COMPOSITE] Composite used for pixmap population on redirect. (Bug #7447) + + compNewPixmap copies bits from the parent window to the redirected child + pixmap to populate the pixmap with reasonable data. It cannot always use + CopyArea as that only works across matching depths. Use Composite when + the depths do not match. + +commit 1afdf8b0a92437dffe84fa98b6083b3d8fd55e27 +Author: Adam Jackson <ajax@redhat.com> +Date: Fri Aug 31 22:11:13 2007 -0700 + + [RANDR] Don't mark Xinerama as active if no crtcs are enabled. (bug #11504). + + Clients expect any Xinerama-enabled screen to report at least one + monitor, but with RandR, there may not be any enabled crtcs. In this case, + tell the client that Xinerama is not active. + +commit 0dc2bb6101704d0fd25f36e2c3df79687f119f5b +Author: Marius Gedminas <mgedmin@b4net.lt> +Date: Fri Aug 31 21:36:37 2007 -0700 + + [RANDR] Compare only milliseconds of config time. (Bug #6502) + + The timestamp transferred in the X protocol is a 32-bit number of + milliseconds. + + The timestamp stored in the server is a structure that contains two fields: + months (!) and milliseconds. + + When the server passes the config timestamp to the client, it discards the + months part and sends only the milliseconds part. + + When the server receives the config timestamp from the client, it tries to + guess the "months" part by looking at the current time and then maybe adding + or + subtracting one. The guess is wrong after the server has been running long + enough (several hours). + + I have added two ErrorF calls around the 'if' statement that returns + RRSetConfigInvalidConfigTimestamp in randr/randr.c and my Xorg.0.log has + this: + + randr request got good config time: 0:-2103495671 + + for the first few successful xrandr calls, and + + randr request failed with RRSetConfigInvalidConfigTime: client passed + 1:-2103495671, server has 0:-2103495671 + + when it fails. The server has been running for 8 and a half hours. + + The obvious fix would be to ignore the months field and only compare the + milliseconds. + +commit 07630d897ef37cad8b79d073d9edc891d5a7bddd +Author: Eric Anholt <eric@anholt.net> +Date: Fri Aug 31 15:16:01 2007 -0700 + + Bug #7364: Require renderproto 0.9.3 on 64-bit, and fix build with it. + +commit ca82d4bddf235c9b68d51d68636bab40eafb9889 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Aug 31 13:00:23 2007 -0700 + + Bug #7186: Fix an excessive request size limitation that broke big-requests. + + MAXBUFSIZE appears to be a leftover of some previous time. Instead, just + use maxBigRequestSize when bigreqs are available (limiting buffers to ~16MB). + When bigreqs are not available, needed won't be larger than the maximum + size of a non-bigreqs request (256kB). + +commit a02db0d500cac20d0f0f107d27c064a175018421 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Aug 31 12:24:07 2007 -0700 + + Convert servers to using _DEPENDENCIES to ensure proper rebuilds. + + This cleans up server Makefile.ams a little bit, but also means that people + messing with configure.ac need to be careful with whether they put libraries + in the _LIBS or _SYS_LIBS targets. Hopefully the comment in configure.ac will + clarify the issues. + +commit c9ceb4878063ca22487c708d9d1f86e367f2cec8 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Aug 31 11:03:54 2007 -0400 + + xace: add hooks + new access codes: Composite extension + +commit fd04b983db6a70bf747abe02ca07c1fbbaae6343 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Aug 31 09:55:27 2007 -0400 + + xace: add hooks + new access codes: Render extension + +commit 3f42af8c0ef1e5379bc836f589e0cbee43c02ac5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Aug 30 18:22:12 2007 +0930 + + config: Use [config/dbus] consistently for error messages. + +commit 0fcde83d94507eadd9f99d4e6a63584b221c989c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Aug 30 18:20:20 2007 +0930 + + config: return BadValue to caller if add/remove doesn't have parameters. + + If message iterator cannot be created, the caller didn't supply any + parameters. Return BadValue, instead of dying a horrible death while being + stuck in an endless loop. + +commit 87495fc7064d5e0a7575a0713b6895a4172df0fa +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Aug 30 21:57:41 2007 +0100 + + Allow yres_virtual to be greater for some kernel fbdev drivers. + (temporary fix for older fbdev drivers) + +commit 1005b29cc6939851b40397cc9cd0de9476ad3046 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 30 14:48:24 2007 -0400 + + xace: Correct some access modes. + +commit d8ab2353cbd7694b556b7b9d550104dc8c460a1b +Author: Eric Anholt <eric@anholt.net> +Date: Thu Aug 30 10:39:53 2007 -0700 + + Remove dead xf86GetPciSizeFromOS and xf86GetPciOffsetFromOS. + +commit c2d80529fc7f514d80cf3cbed6f580cb999aca1b +Author: Eric Anholt <eric@anholt.net> +Date: Thu Aug 30 10:20:55 2007 -0700 + + Remove the now-dead PciAvoid symbol. + +commit 53f346b158fa8e10de5a8777fa6d8d86f918878b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 30 13:20:04 2007 -0400 + + xace: add hooks + new access codes: SHAPE extension + +commit 766c693ef3637ee6fc402df594060ed2c1346761 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 30 13:06:28 2007 -0400 + + xace: add hooks + new access codes: MIT-SCREEN-SAVER extension + +commit cda92bbf12107865e93c03c71b901ef51466dc31 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 30 11:48:45 2007 -0400 + + xace: add hooks + new access codes: XFixes extension. + + Required a new name argument to the selection access hook to handle + XFixesSelectSelectionInput. + +commit 47ab4d648b31ea1d5800e0bc84cf5f25025bffe3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 30 11:40:39 2007 -0400 + + devPrivates rework: convert CursorRec and CursorBits over to new interface. + +commit 1d11e4bc4ccb169fb23fc18583f0b648f0a6a4e0 +Author: Egbert Eich <eich@freedesktop.org> +Date: Thu Aug 30 12:50:21 2007 +0200 + + Fixing a misleading comment which could suggest a GPL violation. + + The author of the int10 code looked at the VBIOS POSTing code + in DOSEMU to get some initial idea on how to POST a VBIOS. + To give credit to the DOSEMU Team for this inspiration a comment + was added to the code which could suggest that code from the + GPLed DOSEMU was directly incorporated into this code. + This patch should clearify the situation. + +commit 45efe85003195bd45501630cef08349abb180c3a +Author: Eric Anholt <eric@anholt.net> +Date: Wed Aug 29 16:05:51 2007 -0700 + + Remove stale changelogs from kdrive. + +commit 5aaf00190157114780ab51f7268b396459ed1cad +Author: Eric Anholt <eric@anholt.net> +Date: Wed Aug 29 16:05:23 2007 -0700 + + Add more generated files to .gitignore. + +commit 87295b66a972a2bd194a79af6aa4f715018fcded +Author: Eric Anholt <eric@anholt.net> +Date: Wed Aug 29 15:54:32 2007 -0700 + + Bug #9629: Remove badly-licensed neomagic kdrive files. + + Licensing issues of these files include: + - They claim to be licensed under the GPL, yet we haven't allowed that in the + xserver repository in the past. + - They refer the user to the top of the tree for GPL license text, yet it isn't + there. + - They claim to be derived from the (MIT-licensed) ati kdrive code, yet don't + follow the licensing terms of those files. + +commit 4795df62456b73c6790f271e0a20a83c60496490 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 29 14:40:10 2007 -0400 + + xace: add hooks + new access codes: TOG-CUP extension. + +commit e39694789e31e221fc8dec44ace9c697daf7acad +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 29 14:16:46 2007 -0400 + + xace: drop map-window checking hook, add new hooks for controlling the + delivery of events to windows and clients. + + This is tentative. It's likely that an additional last-resort hook will + be necessary for code that calls TryClientEvents or WriteEventsToClient + directly. It's also possible that new xace machinery will be necessary + to classify events and pull useful resource ID's out of them. + + The failure case also needs some thinking through. Should event delivery + "succeed" or should it report undeliverable? + + Finally, XKB appears to call WriteToClient to pass events. Sigh. + +commit 41355a53c29bbf879da0c6ea562294fcc7ef89ff +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Aug 28 15:10:20 2007 -0400 + + xace: add hooks + new access codes: core protocol input requests + +commit adf46b57ce6c69ab13a38b09a8104c802d54d052 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Aug 28 10:08:38 2007 -0700 + + Replace BSD custom PCI code with a stub implementation thanks to pciaccess. + + Note that pciaccess doesn't yet have Net/OpenBSD support, but the relevant + code should go there instead of disconnected code in the X Server. + + While here, remove the now-disabled INCLUDE_XF86_NO_DOMAIN from the headers, + and un-disable xf8StdAccResFromOS for those OSes without domain support which + will need it. + +commit 4017d3190234e189a0bbd33193a148d4d3c7556b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Aug 28 09:28:25 2007 -0400 + + devPrivates rework: since API is already broken, switch everything + over to new system. + + Need to update documentation and address some remaining vestiges of + old system such as CursorRec structure, fb "offman" structure, and + FontRec privates. + +commit 85547073265ae9bc4ae3af920a6d3214fd1ca0c5 +Merge: 860a09c 7d54399 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Aug 28 07:25:21 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + include/miscstruct.h + mi/mibstore.c + mi/midispcur.c + os/Makefile.am + +commit 3fe67d23edaae3ddde20cd5f349aa5dfde1d26a3 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Aug 27 19:02:41 2007 -0700 + + Remove the BusAccWindows resource code which is now unused. + + This was a bunch of poorly defined resource ranges per OS/platform combination + which were supposed to represent what regions could potentially have resources + allocated into them. + +commit 9e2112b2b56af099a7f380ece9b5c1d25b20cce4 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Aug 27 18:50:34 2007 -0700 + + Remove unused xf8GetBlock and xf86GetSparse entry points. + +commit 801c359574d08ff2d6ac75a3325ff522bc862e30 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Aug 27 15:46:05 2007 -0700 + + Fix fbdevhwstub for pci-rework. + +commit 7d54399cfdaa7f54e28828267a76b89c4e8e798f +Author: Keith Packard <keithp@koto.keithp.com> +Date: Sun Aug 26 22:11:45 2007 -0700 + + Add XSERVER_LIBPCIACCESS to xorg-server.h when using libpciaccess + +commit affda73a1d6e291516880dfbcb74b661374524c6 +Author: Eugeniy Meshcheryakov <eugen@univ.kiev.ua> +Date: Mon Aug 27 00:41:03 2007 +1000 + + Xprint: fix handling of TrueType font name + + Debian bug #272368 + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=272368 + In certain locales, some characters from some TrueType fonts were not + appearing in the Xprint postscript output due to the font not being + identified in the postscript output. + +commit 6f44a2c8a8d6e8f95681ebc7b2dd5ad9c3a02c6e +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Jul 29 14:16:10 2007 -0400 + + Refactor PictureInitIndexedFormats. + + The plural version is now static, which is fine since it was only ever called + from within picture post-init anyway. The body of the work is now done with + a one-shot (public) function that operates on a single format at a time. + +commit ae7f71a8b3d6756161e55d998d6eec37d2695c98 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Aug 25 15:08:20 2007 -0400 + + Implement core protocol backing store exclusively in terms of Composite. + + Composite's automatic redirection is a more general mechanism than the + ad-hoc BS machinery, so it's much prettier to implement the one in terms + of the other. Composite now wraps ChangeWindowAttributes and activates + automatic redirection for windows with backing store requested. The old + backing store infrastructure is completely gutted: ABI-visible structures + retain the function pointers, but they never get called, and all the + open-coded conditionals throughout the DIX layer to implement BS are gone. + + Note that this is still not a strictly complete implementation of backing + store, since Composite will throw the bits away on unmap and therefore + WhenMapped and Always hints are equivalent. + +commit bf0883ae5081bd75569115a3eb27c6d3d336c9f2 +Author: David Nusinow <dnusinow@debian.org> +Date: Sat Aug 25 14:53:17 2007 -0400 + + Fix bug in debugging info related to pci-rework merge + +commit 4eed88af8b7b6881b44ccf9f4a5c5875af6d2b78 +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Aug 24 18:06:50 2007 -0700 + + Remove files made obsolete by pci-rework. + +commit 1ab4b3e183d04bb20fb5039f7d2671752ab24cf6 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Aug 24 16:00:31 2007 -0700 + + Bump video driver ABI for pci-rework. + +commit 91f358336f77c0e4f577be65cca977d17298e36c +Merge: b9a806f 8b6b40b +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Aug 24 15:04:21 2007 -0700 + + Merge branch 'pci-rework' + +commit b9a806f0b3d495c7616b469281e5892ae7f3f6b3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 24 19:04:55 2007 +0200 + + exaPolyFillRect: pGC->alu doesn't matter with a single rectangle. + +commit d0f0d1092c7587a02404e1db07740e6334462ba6 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 24 14:10:13 2007 +0200 + + exaGetImage: Don't migrate pixmap out of FB with no DownloadFromScreen hook. + + Based on the assumption that GetImage is relatively rare, so the overhead of + the migration is probably bigger than any potential savings. + +commit 5d9e2c282145897008d7d941e2a0a3fdc71f2373 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 24 14:03:14 2007 +0200 + + EXA: Improve ShmPutImage. + + Share as much code with exaPutImage as possible, and fall back to fbShmPutImage + when that fails. + +commit 6085522d91e875c0e1ab8d4300e7378701c19b7c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 24 14:02:35 2007 +0200 + + Export fbShmPutImage to modules. + + To be used by EXA. + +commit c19f227b468d039c5ea136cc8a53c420da30263b +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 24 13:05:52 2007 +0200 + + EXA: Only mark offscreen memory as used when it really is. + +commit 095850596114178119a8cc854716ce0cc6e05121 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Aug 24 13:04:48 2007 +0200 + + __glXDRIbindTexImage: Fail if no texture bound to pixmap's texture target. + + We would most likely crash somewhere in Mesa if we tried to continue in this + case. + +commit 8b6b40b7271acd81a9548f502c18f46f3b640640 +Merge: ab7a6d8 3305d17 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Aug 23 18:19:17 2007 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/common/xf86.h + hw/xfree86/common/xf86Init.c + hw/xfree86/common/xf86pciBus.c + hw/xfree86/int10/generic.c + hw/xfree86/int10/helper_exec.c + hw/xfree86/loader/xf86sym.c + hw/xfree86/os-support/bus/Pci.c + hw/xfree86/os-support/bus/Pci.h + hw/xfree86/os-support/bus/linuxPci.c + hw/xfree86/os-support/linux/int10/linux.c + +commit 93ae6fe18c417a22f1fccb22add4890a20cae713 +Author: Carl Worth <cworth@cworth.org> +Date: Thu Aug 23 16:33:05 2007 -0700 + + Avoid leaking a Pixmap for every glyph + +commit 3305d17195e3a0a5555300555bd7703312fa489f +Author: Matthieu Herrb <matthieu@deville.herrb.com> +Date: Thu Aug 23 22:48:19 2007 +0200 + + Fix indentation. + +commit a66c0f1dca2958835ff65a5b50579e3304ed316a +Author: Matthieu Herrb <matthieu@bluenote.herrb.com> +Date: Thu Aug 23 22:11:56 2007 +0200 + + Remove an extra cast. + + Thou should not apply patches manually without testing. + +commit 12d27cf33c6d963eae77795c0d247175907162a5 +Author: Otto Moerbeek <otto@openbsd.org> +Date: Thu Aug 23 21:59:25 2007 +0200 + + A high resolution device that's moving fast can potentially generate + an int overflow, making dx*dx+dy*dy negative. Now pow(negative, + non-integer) yields NaN, so you loose. Use fp math to avoid that. + +commit ff089e6cae634ac3eb509abd448a250bcbb17275 +Author: Brian Paul <brian.paul@tungstengraphics.com> +Date: Thu Aug 23 19:38:53 2007 +0200 + + glx: fix crash when freeing visuals + + Don't set screen->num_vis to a value greater than the actual number of visuals. + + X.Org Bug #10809 <http://bugs.freedesktop.org/show_bug.cgi?id=10809> + +commit 943dd6ad99670c283a6869ea6c5f751acbd73134 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Thu Aug 23 12:15:03 2007 -0400 + + Revert "Revert "Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix"" since the pixman changes have been pushed now. + + This reverts commit 57f7f2a5327a2d967a726bb4706e4f6b2f4b2cea. + +commit 13949f997289068354e83bc83e50d97b8232efb1 +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Aug 23 11:27:33 2007 +0200 + + Get rid of the type1 font module. + + It is completely replaced by freetype these days. + +commit 88a9828ef906bba973debc191e35ea669b7ec271 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Aug 23 18:02:10 2007 +0930 + + dix: Only check device events for possible ACLs. + + We shouldn't be able to restrict events like Expose, etc. with device based + ACLs. So we just ignore all non-input events when checking for permissions. + +commit 76bf3cd7b8c6189b6b08518cde00c8bd991bdfb7 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Aug 23 16:22:03 2007 +1000 + + randr: fixup crtc and output destroy + + if you are moving pointers, you want to move the pointers not just a byte + +commit 81f8b652d99ee0f7116c1e34aed0e585d23a91fb +Author: Alex Deucher <alex@botch2.(none)> +Date: Wed Aug 22 19:26:34 2007 -0400 + + Add _X_EXPORT to exported functions in hw/xfree86/modes/* + + Also add missing exports to hw/xfree86/loader/xf86sym.c + +commit 57f7f2a5327a2d967a726bb4706e4f6b2f4b2cea +Author: Eric Anholt <eric@anholt.net> +Date: Wed Aug 22 09:02:03 2007 -0700 + + Revert "Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix" + + The corresponding pixman code hasn't been pushed, so revert until the code is + ready. + + This reverts commit 53941c8e68014619d3ded7f8bc0f07d9a38bb9b1. + +commit d0dc9698ae4324d44ed4c0482d6858d0b73bff33 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Aug 22 09:00:45 2007 -0700 + + Revert "Fix <pixman.h> include to <pixman/pixman.h>" + + The pixman headers have been located under pixman-1/ instead of pixman/ since + around 2007-08-06, and pixman-1.pc has the updated include paths to account + for this. + + This reverts commit feb1b3e45513bd6eaa2e6a5ee536183f20d9cb68. + +commit bc2d516f16d94c805b4dfa8e5b9eef40ff0cbe98 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Aug 17 12:14:16 2007 -0700 + + Fix overly-restrictive integer overflow check in EXA pixmap creation. + + The result was that at 32bpp, pixmaps of width 8192 or greater couldn't be + created, due to treating a pitch value as a width. + +commit feb1b3e45513bd6eaa2e6a5ee536183f20d9cb68 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Aug 22 16:54:29 2007 +0100 + + Fix <pixman.h> include to <pixman/pixman.h> + +commit b6a7c0112c42a3287e53647c38b2c0c5bf8fefa0 +Merge: 53941c8 6ef4ecd +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Tue Aug 21 14:26:34 2007 -0400 + + Merge branch 'master' of ssh+git://sandmann@git.freedesktop.org/git/xorg/xserver + +commit 53941c8e68014619d3ded7f8bc0f07d9a38bb9b1 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Tue Aug 21 14:26:14 2007 -0400 + + Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix + bug 11620 (reported by Jens Stroebel. + +commit 6ef4ecd82670c37a354243166750d76a97959c8b +Author: Julien Cristau <jcristau@debian.org> +Date: Tue Aug 21 18:17:35 2007 +0200 + + config: fix default xkb model (pc105, not keyboard) + +commit 1834cfb4470341aace64a2fa47d04f85dbf98a47 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Aug 21 10:44:37 2007 -0400 + + Fix an error message to not point to @xfree86.org. + +commit 265a633cf1fcbf497d6916d9e22403dffdde2e07 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Sun Aug 19 20:29:37 2007 -0700 + + Screen size changing should leave FB alone when X is inactive. + + xf86RandR12ScreenSetSize must protect calls to EnableDisableFBAccess with + suitable vtSema checks to avoid invoking driver code while the X server is + inactive. + +commit 7dc8531548cc9573e28bb04363dcbb3af5864c9a +Author: Keith Packard <keithp@koto.keithp.com> +Date: Sun Aug 19 20:28:05 2007 -0700 + + Ref count cursors used in hw/xfree86/modes code. + + The multi-crtc cursor code in hw/xfree86/modes holds a reference to the + current cursor. This reference must be correctly ref counted so the cursor + is not freed out from underneath this code. + +commit 1f6ddae003ec65d6bc567831bf32bf75dfefdd6c +Author: Alex Deucher <alex@botch2.com> +Date: Tue Aug 21 00:37:33 2007 -0400 + + add xf86_crtc_clip_video_helper to xf86sym.c + +commit c839859d1bc35451923a2cbd5dfac4f3ca5eb3f9 +Author: David Nusinow <dnusinow@debian.org> +Date: Mon Aug 20 21:09:27 2007 -0400 + + Move module defaults from the header to the source file. + + This is where they should have been in the first place. All the rest of + the code in the server defines such things in the source files, not the + headers. + +commit 53c04351c462d2ae307684e50d5960debe1ee557 +Author: Alex Deucher <alex@botch2.com> +Date: Mon Aug 20 19:46:38 2007 -0400 + + move intel crtc xv clipping helper to the xserver + + The code is generic and can be used by any overlay-based card when + adding randr 1.2 support. Tested on radeon. + +commit a1fe36b772f7edc162ea97368f86588c0fb77148 +Author: Julien Cristau <jcristau@debian.org> +Date: Mon Aug 20 12:57:06 2007 +0200 + + xfree86: Fix build on Linux/alpha. + + A bunch of CFLAGS had gone missing, so the build failed with errors like: + ../../../../../hw/xfree86/os-support/linux/lnx_ev56.c:7:19: error: input.h: No such file or directory + ../../../../../hw/xfree86/os-support/linux/lnx_ev56.c:8:24: error: scrnintstr.h: No such file or directory + +commit 2c1431a76e7219e3bd14fd7f7888a8bc4fea0f58 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Aug 20 10:06:13 2007 +0930 + + dix: ProcChangeActivePointerGrab: make sure variable is initialised. + + Thanks to Ben Close for spotting it. + +commit 65a49f0ca198e0366175367729a101211388b16b +Author: Blair Sadewitz <blair.sadewitz@gmail.com> +Date: Sun Aug 19 20:29:22 2007 +0200 + + Autoconfiguration of wsmouse for NetBSD. + +commit 3c448b0eb67337b56641e09a6d168aad6745e3ef +Author: Fredrik Höglund <fredrik@kde.org> +Date: Sat Aug 18 19:02:18 2007 +0200 + + EXA: Fix a couple of logic errors in exaGetPixmapFirstPixel. + + The fb pointer would be left uninitialized when exaPixmapIsOffscreen + returned false. When it returned true and the pixmap was damaged, + fb would be initialized from the pixmap's devPrivate.ptr before the + exaDoMigration and exaPrepareAccess calls, at which point + devPrivate.ptr would still be pointing at offscreen memory. + +commit 23fbd5292d356067e85e1eec4eb4f743532b0503 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Aug 17 15:29:16 2007 -0700 + + Actually build Secure RPC authentication support (missed in modularization) + +commit 6a32a96d8df184c3ace4847beb48fdcb846d2286 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Aug 16 17:43:29 2007 -0700 + + stride is in FbBits-sized chunks, but xoff is not. + + Fixes corruption problems with composite rendering to redirected windows in + depth 16. + +commit 32666d77227fcd2c066de16bf3c07366f92b0457 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Aug 16 14:57:18 2007 -0700 + + Bug #12015: Use the right offsets in the dst arguments of pixman_blt. + +commit daee59b1703ac07c2def9e9fecc479e59b93f761 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Wed Aug 15 19:19:11 2007 +0200 + + EXA: Wrap Trapezoids to prevent excessive migration of the alpha pixmap. + + miTrapezoids creates an alpha pixmap and initializes the contents + using PolyFillRect, which causes the pixmap to be moved in for + acceleration. The subsequent call to RasterizeTrapezoid won't be + accelerated by EXA, which causing the pixmap to be moved back out + again. + + By wrapping Trapezoids and using ExaCheckPolyFillRect instead of + PolyFillRect to initialize the pixmap, we avoid this roundtrip. + +commit 860a09cfb8afc0a293c7eb5e01762724eb86847a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 16:10:44 2007 -0400 + + devPrivates rework: Nevermind, can't const due to return value warnings. + + This reverts commit 6fd0a0b08de912421718aca17fe34a55ae285ae7. + +commit 6fd0a0b08de912421718aca17fe34a55ae285ae7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 16:01:42 2007 -0400 + + devPrivates rework: add const qualifier to key type. + +commit b2b7817497dd5da73d23ec9cc637c563041fc490 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 15:30:25 2007 -0400 + + devPrivates rework: use camelcase standard for name of key type. + +commit 0a994d4f859a4e48d41a90ed9d2a282bb528c555 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 12:54:35 2007 -0400 + + xace: add hooks + new access codes: core protocol selection requests + +commit 3ef2e9e623819c625a92f464fb14f1e5c181df42 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 12:27:48 2007 -0400 + + xace: add hooks + new access codes: core protocol pixmap requests + +commit be536b79f2a364399937314cfa6c88bf8188da9c +Author: Jeremy C. Reed <reed@glacier.reedmedia.net> +Date: Thu Aug 16 11:23:28 2007 -0500 + + Update for support on NetBSD and DragonFly. From + Joerg Sonnenberger and pkgsrc. + +commit 1d4bea6106d7a1c83e1dfe37fad8268589feaa0b +Author: Jeremy C. Reed <reed@glacier.reedmedia.net> +Date: Thu Aug 16 11:20:12 2007 -0500 + + Add some more support for DragonFly. From Joerg Sonnenberger + and pkgsrc. + +commit fe9bc481efb0821134e10760c23993c6a7386450 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 12:02:59 2007 -0400 + + xace: add hooks + new access codes: core protocol font requests + +commit e89301c8790df9fc49de13dd7c7f36e5340c0c31 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 10:57:49 2007 -0400 + + xace: add hooks + new access codes: core protocol client requests + +commit 5bee8db003a5d552ee1d85bb6c40a3cb93bd6b2b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 10:44:51 2007 -0400 + + xace: drop background-none checking hook, add new hook for controlling + access to other clients. + +commit b82557c9fb60f11fd2696c8fb2ae17b9dfd915ed +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 16 10:36:05 2007 -0400 + + xace: add hooks + new access codes: core protocol screensaver requests + +commit 568ae737d1d5d476a0bf85659d88910c4e0ef5e0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 15 14:14:45 2007 -0400 + + xace: add hooks + new access codes: core protocol server requests + +commit 14c13b8d62eb37cba8a044daffcddec578ba1644 +Author: Dave Jones <davej@redhat.com> +Date: Thu Aug 16 09:46:27 2007 +0200 + + Kdrive: fix nasty thinko in TslibEnable() + +commit 026534f945ae5652592a090a9d41375ca37ab618 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Aug 15 16:47:53 2007 -0700 + + Update pci.ids to 2007-08-15 snapshot + + Remove nvidia ids in extrapci.ids that are now in pci.ids + +commit 6cef7b9611297cb1d93cefe3890b26b69c87bce2 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Aug 15 16:44:49 2007 -0700 + + Correct XErrorDB path and make it configurable (used by DTrace support) + +commit 3c9553ac2cac7f3a41966def44a50d722d7e645b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 15 14:14:25 2007 -0400 + + xace: rename hostlist security hook to "server" as this hook will be used + for other types of server access besides just the host list. + +commit dc84bb3418933297a8c005070902d9a91ed3d18f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 15 14:13:53 2007 -0400 + + xace: add hooks + new access codes: core protocol cursor requests + +commit b424e01ec59d9600a02823f1522949325797268c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Aug 14 13:20:42 2007 -0400 + + xace: add hooks + new access codes: core protocol property requests + +commit 14d0397cded699378fa3c19f4e61dbab7d3a9b2c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Aug 15 22:12:29 2007 +0930 + + dix: ProcUngrabKeyboard: make sure grab is initialized. + + This should fix the random segfaults with ProcUngrabKeyboard. + + Thanks to David Nolden for spotting it. + +commit 0f9e89b4e309e570d7d366489d250ca2143f0ad7 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Tue Aug 14 22:47:49 2007 +0200 + + Fix the value comparisons in the IDLETIME wakeup handler. + + LessThan/GreaterThan comparisons were used in the wakeup handler, + and LessOrEqual/GreaterOrEqual in the block handler. + + Change it to use LessOrEqual/GreaterOrEqual in both functions, + since this is what XSyncNegativeComparison and + XSyncPositiveComparison imply. + +commit 42d6112ec21949a336ee8b34469f2695273ee2d6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Aug 14 13:09:38 2007 -0400 + + xace: add hooks + new access codes: core protocol GC requests + +commit 9a183d7ba50e31afa133cc03aee7991517a283ea +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Aug 14 11:39:26 2007 -0400 + + dix: remove caching of drawables and graphics contexts. The security checks + simply bypass the cached values so they are unused. + +commit 2763056ab5ae31bed422a0948198d98c6ace6d55 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 13 13:40:47 2007 -0400 + + xace: add hooks + new access codes: core protocol window requests + +commit 6a195e816b9d60f728d77cc1c23538e7af00a879 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Aug 13 10:43:48 2007 -0400 + + Revert "Implement damage tracking for AIGLX." + + This reverts commit 2243b30e54df07892f75e3d65b687abe5b183cf3. The existing + DRI interface doesn't let us get from a __DRIdrawable to the corresponding + X drawable, and thus, we can't implement AIGLX damage tracking with the + current interface. + +commit f367285fd5825e0adc271982a529c9904ad65c89 +Merge: b1272ee ff4bd3a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Aug 12 15:31:10 2007 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + Xi/exevents.c + dix/devices.c + dix/getevents.c + include/dix.h + mi/mieq.c + +commit 03f9da672466b9ab9a9814d784b8c44f1030587e +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sun Aug 12 03:07:04 2007 +0200 + + xfree86: Improve default mouse handling on the Hurd + + Make /dev/mouse the default device. This makes Xorg works with empty + or missing InputDevice sections. + +commit c5741438a3a171f493e9da32a6b39f73403f6993 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Aug 10 16:13:55 2007 -0700 + + Only use evdev drivers in Xephyr #ifdef linux + +commit 59961e47df4ea621a6713a8c7d060555f8746c3a +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Aug 10 16:08:41 2007 -0700 + + xorgcfg needs PIXMAN_CFLAGS in order to build libc_wrapper.c + +commit 2243b30e54df07892f75e3d65b687abe5b183cf3 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Aug 10 15:53:05 2007 -0400 + + Implement damage tracking for AIGLX. + +commit ff4bd3addb48df3eacc4b121cc249a7f38eb981a +Author: Eric Anholt <eric@anholt.net> +Date: Wed Aug 8 14:24:42 2007 -0700 + + Fix the swapped decode of the EDID DTD h/v sync polarity fields. + + As a result, we can remove the quirks that existed to flip the bits back around + for us. This is not confirmed in all cases due to lack of bugs containing EDID + blocks associated with the quirks, but is likely true. + +commit 2926cf1da7e4ed63573bfaecdd7e19beb3057d9b +Author: Gustavo Pichorim Boiko <boiko@mandriva.com> +Date: Thu Aug 2 18:09:52 2007 -0300 + + [PATCH] Allocate the right number of entries for saving crtcs + +commit b2dcfbca2441ca8c561f86a78a76ab59ecbb40e4 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Wed Aug 8 12:16:12 2007 -0700 + + RRScanOldConfig cannot use RRFirstOutput before output is configured. + + RRFirstOutput returns the first active output, which won't be set until + after RRScanOldConfig is finished running. Instead, just use the first + output (which is the only output present with an old driver, after all). + +commit b1272eefd9a3e340d65c14903f337747ec82d021 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Aug 8 15:00:02 2007 +0930 + + Fix typo from last commit. Oh well. + +commit c02128532e910e813fba94983733942d30c2d5cb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Aug 8 13:10:00 2007 +0930 + + dix: Allow flexible devices for passive core grabs. + + A passive core grab doesn't specify the device, and is thus created with the + ClientPointer as device. When this grab is activated later, don't actually + activate the grab on the grab device, but rather change the device to the one + that caused the grab to activate. Same procedure for keyboards. + + Makes core apps _A LOT_ more useable and reduces the need to set the + ClientPointer. + + Only applies to core grabs! + +commit ab3f601149e15789edfb7c9a0c33387070279582 +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Tue Aug 7 23:17:32 2007 -0300 + + Updates some piece of the dead mouse evdev code under the new hotplug scheme. + I exported the evdev driver to Xephyr server. I'm running it using something + like: + $ ./hw/kdrive/ephyr/Xephyr :1 -mouse evdev,,device=/dev/input/event4 -keybd \ + evdev,,device=/dev/input/event1,xkbmodel=abnt2,xkblayout=br + + It also closes /#5668. + +commit 7d1a749b210ba5b9f8d0e5a1feb9a9ef9fa4d992 +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Tue Aug 7 22:59:12 2007 -0300 + + Export device path key options to be called by the command line of server. + +commit aee3588a4a6829326770c84b860061f47f2cbcae +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Tue Aug 7 22:49:07 2007 -0300 + + Update KdUseMsg() for completeness. + +commit 30259d5a4e95ff20b30807e5e207ab5995a3fdaf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 7 20:58:49 2007 +0300 + + Hotplug: HAL: Fix error handling + + Don't use our DBusError for property getting, because we simply don't care: + this fixes D-Bus error spew to stderr. Thanks Michel Dänzer for debugging + and testing. + +commit aef255425a3521d66c3405d34f7787628a22703e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 7 16:37:42 2007 +0300 + + Config: HAL: Use input.xkb namespace + + Use an explicit input.xkb.foo namespace, not input.xkb_foo. + +commit 838e59c02ec06446fc180fb9d86fa8793c7b9903 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 6 16:07:20 2007 +0300 + + configure.ac: Add $CONFIG_LIB to server libraries + + Make sure all DDXes get $CONFIG_LIB. Build-tested with Xvfb and Xdmx. + +commit b4193a2eee80895c5641e77488df0e72a73a3d99 +Author: Keith Packard <keithp@koto.keithp.com> +Date: Tue Aug 7 12:45:53 2007 -0700 + + RRScanOldConfig wasn't getting crtcs set correctly + + The output crtc is set by RRCrtcNotify, which is called at the end of + RRScanOldConfig. Several uses of output->crtc in this function were wrong. + +commit 2b93cbb5f8bac9b1b75f723baaa728430b5fefff +Author: Keith Packard <keithp@koto.keithp.com> +Date: Tue Aug 7 12:44:19 2007 -0700 + + Decrement mode count when removing RandR output mode. + + Removing an output mode without decrementing the mode count scrambles the + output mode array badly. + +commit fef4c7a6f1a1ef34233b36137bb66d9a657307fb +Author: Eric Anholt <eric@anholt.net> +Date: Tue Aug 7 09:01:14 2007 -0700 + + Fix driver build after pixman changes. + +commit 1339e57485db5a285cfbecbe0bba7154458680ad +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Tue Aug 7 04:24:34 2007 -0300 + + Fix typo. + +commit d9ee5f3e3a3a814ebcd257736c305b41139cc354 +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Tue Aug 7 04:22:26 2007 -0300 + + Clean a little bit the code. + +commit 7a5eb3e96b74daaaeb6babf46b13d698280aa3f6 +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Tue Aug 7 02:16:44 2007 -0300 + + Let xkb options be passed through command line in kdrive servers. I start my + Xephyr using something like: + + ./hw/kdrive/ephyr/Xephyr :1 -fp /usr/share/fonts/X11/misc/ -mouse ephyr -keybd ephyr,,xkblayout=br,xkbmodel=abnt2 + +commit 955d5f6c0d14fae63bfe7c4ab39ee0a708919479 +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Tue Aug 7 01:39:29 2007 -0300 + + When we call Xephyr with '-pointer' a new pointer is added inside the server + and the Xephyr virtual mouse keeps alive. With this patch the semantic changes + turning '-pointer' && 'Xephyr virtual mouse' always false. + + Now we can open a device pointer and pass its options in Xephyr's command line + without having other pointer unused. + +commit b8abeaf74ee8296d4bc3164a5a253624f984a6d4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Aug 7 12:32:46 2007 +0930 + + dix: get the paired keyboard for a passive grab (ProcGrabButton). + + Taking the VCK is only correct if no physical device is connected, and even + then it's not really a good idea. + +commit a0b87f87fb8753955505958bf3d438eef191302d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Aug 7 10:49:33 2007 +0930 + + dix: check for core event to determine if grab is a core grab (CreateGrab). + + Checking for VCP/VCK is simply not a safe way to check if a grab is a core grab. + +commit aa3c6aaaab213200591d29ddb2921adfb87ee5b4 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Aug 6 19:00:59 2007 -0400 + + Require pixman-1 0.9.4, update pixman includes to new scheme + +commit 74feba4d77d74979a0ea478d666439ffc55001e5 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Aug 1 14:30:03 2007 -0700 + + Don't unwrap too early in libwfb for Composite. + + Don't call fbFinishWrap until the pixman_image_t that stores the pointer is + actually freed. This prevents corruption or crashes caused by accessing a + wrapped pointer after the wrapping is torn down. + +commit f6aa2200f2fb4f4d4bb51e67d68e86aabcac0c4b +Author: Roland "Test-tools" Bär <roland@verifysoft.de> +Date: Mon Aug 6 12:37:52 2007 -0700 + + Probable off by one buffer overflow in .../xorgconfig/xorgconfig.c + + X.Org Bug #11858 <http://bugs.freedesktop.org/show_bug.cgi?id=11858> + Patch #11005 <http://bugs.freedesktop.org/attachment.cgi?id=11005> + +commit d744df32a15103aa14237175f506350d25b2fec0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 6 12:23:21 2007 -0400 + + xace: add hooks + new access codes: core protocol colormap requests + +commit acc9a42c926a3f84159780de12ecc1dc6186068a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 6 12:16:59 2007 -0400 + + Temporarily disable Security and SELinux extensions + while changes to XACE are being made. + +commit 102df4f9bac59d95963572d1a7f31d1a064ca4ca +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 6 09:16:30 2007 -0400 + + xace: drop site-policy and declare-extension-security hooks, add 2 new hooks + for controlling access to screens and screen savers. + +commit 9eddede039f6cbcc323b7e3e4e841c43d3ed4f43 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jul 16 18:01:00 2007 +0930 + + mieqEnqueue: Don't try to update the time for GenericEvents. + + Doing so may overwrite the event's length field and cause havoc. Also check if + realloc'd memory did actually return valid pointer. + +commit e717eb82dc2e55f852919312d04f5cfc8ee55bc8 +Author: Dave Airlie <airlied@redhat.com> +Date: Thu Aug 2 10:50:01 2007 +1000 + + xserver: stop bcopy from going really slow + + The outport is most likely unnecessary on any currently used hardware, + the byte copy is necessary from what I know on IA64 and friends so leave it. + + Add a new API entry point which lets a driver select the old behaviour if + such a needs is ever found. + + This gives me ~20% speed up on startup on 945 hardware. + +commit 600ef07113caa7a901c7d486bc8ebd1ae47f885c +Author: Tiago Vignatti <tiagov@balalaika.(none)> +Date: Fri Aug 3 15:33:41 2007 -0300 + + Fix kdrive command line parser. + +commit 375864cb74cced40ae688078b1f7750998972535 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Aug 3 13:23:34 2007 -0400 + + security: drop support for XC-QUERY-SECURITY authorization method. + +commit d445d2f22b5c97fa010370f4ba9cb0555df4a853 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Aug 3 10:56:18 2007 -0400 + + security: drop the "declare extension security" dix call. Use the + SecurityPolicy configuration file instead. + +commit 0a71e1542a07abc5e32501973a7cf6de3f641317 +Author: Carl Worth <cworth@cworth.org> +Date: Thu Aug 2 22:48:32 2007 -0700 + + Create a Picture as well as a Pixmap at the time of AllocateGlyph + + This avoids some inefficiency in creating a temporary Picture + for every glyph at rendering time. My measurements with an i965 + showed the previous patch causing a 10-15% slowdown for NoAccel + and XAA cases, (while providing an 18% speedup for EXA). + + With this change, the NoAccel and XAA performance regression is + eliminated, and the overall EXA speedup, (before any of the + glyphs-as-pixmaps work), is now 32%. + +commit a2af34d5a861982a03afad8e586bb0181b72bbd0 +Author: Carl Worth <cworth@cworth.org> +Date: Wed Aug 1 15:48:30 2007 -0700 + + Use per-screen Pixmaps for glyphs + + Instead of system-memory data which prevents accelerated + compositing of glyphs, (at least without forcing an upload + of the glyph data before compositing). + +commit 19b3b1fd8feb343a690331cafe88ef10b34b9d98 +Author: Carl Worth <cworth@cworth.org> +Date: Tue Jul 31 17:04:13 2007 -0700 + + Use strong hash (SHA1) for glyphs + + Using a cryptographically strong hash means that comparing the + hash alone is sufficient for determining glyph equality (no need + to compare the glyph bits directly). This will allow us to replace + system-memory copies of the glyph bits, (which we've only been + holding onto for comparisons), with Pixmaps. + +commit 516b96387b0e57b524a37a96da22dbeeeb041712 +Author: Carl Worth <cworth@cworth.org> +Date: Mon Jul 30 17:31:47 2007 -0700 + + ProcRenderAddGlyphs: Avoid allocating a glyph just to find it cached + + This is a cleanup without any real savings (yet). Previously, the + implementation would allocate a new glyph, then (often) find it in + the cache, and immediately discard the allocated object. This + re-organization first uses a new FindGlyphByHash function and only + allocates the glyph if nothing is found. + + This isn't a real savings yet, since FindGlyphByHash currently still + does a temporary glyph allocation, but this is expected to be replaced + immediately as we switch to an alternate hashing mechanism (SHA1). + +commit 4c6abe1c7c8abcf203572bbf86b21d97ea4e756f +Author: Carl Worth <cworth@cworth.org> +Date: Mon Jul 30 21:43:20 2007 -0700 + + Split HashGlyph functionality out into HashGlyphInfoAndBits + + This is in preparation for a future change that will take advantage + of being able to compute a hash for a separate xGlyphInfo and chunk + of bits without a combined Glyph object. + +commit 363d764ea32b938f3dff35df7cf3370363c04d5c +Author: Carl Worth <cworth@cworth.org> +Date: Mon Jul 30 15:10:11 2007 -0700 + + ProcRenderAddGlyphs: Take advantage of the for loops to simplify the code a bit + +commit dc8a528cd6b9a4da3e60fa31428c37f5b34a897f +Author: Carl Worth <cworth@cworth.org> +Date: Wed Jul 25 14:57:13 2007 -0700 + + ProcRenderAddGlyphs: Convert while loops to for loops where more natural + +commit e34fcd2bf42dbd72ab6ce2df80f2dcaa13416e74 +Merge: 32c0dcc f3955c0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 2 14:27:03 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + dix/devices.c + dix/property.c + include/dix.h + +commit f3955c0a020b39021050cd33c20a17f14fc4b579 +Author: Arkadiusz Miskiewicz <arekm@maven.pl> +Date: Wed Aug 1 21:04:22 2007 +0300 + + XFree86: xf1bpp: distclean generated files as well + + Make sure we clean up after ourselves: not sure why distcheck didn't flag + this one. + +commit a04c95f4446e5c169dea71019321d790ab4fa139 +Author: Julien Cristau <jcristau@debian.org> +Date: Wed Aug 1 20:37:05 2007 +0300 + + configure.ac: Fix argument quoting for argv[] + + m4 quoting. Yar boo sux. + +commit 99a88826e5e8cfa25c5f8a88c12799d33114729c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 20:34:58 2007 +0300 + + configure.ac: Actually use -lrt in monotonic clock test + + If we need -lrt to use clock_gettime, then make sure we link with it. + +commit 1c80e04f876e9254b93ef87eadfcff71234340c6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 20:08:31 2007 +0300 + + configure.ac: Disable D-Bus config API support by default + + This is problematic, so don't even bother with it unless someone wants it. + respeclaration is dead, long live HAL. + +commit c46663367329615bd2c9b63e93c9534036e5a2ae +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Aug 1 18:32:09 2007 +0200 + + GLX/DRI: Remove some unused variables. + +commit 17cb4f64e3c39725e83b1e311c09422d7e1c0e52 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Aug 1 18:13:18 2007 +0200 + + GLX_EXT_texture_from_pixmap: Use client provided texture target when available. + + This prevents situations where the server doesn't use the target the + client thinks it does, usually resulting in the texture being sampled as all + white. + +commit a4197db9504adae6af005b2218eee36b8af0d98b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 14:04:51 2007 +0300 + + GL: GLX: Make sure glxbyteorder.h is distributed + +commit ad7421fc764e2b82e20d90f12225a03a1d636f18 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 08:30:00 2007 +0300 + + Bump version to 1.3.99.1 for development + + This is not actually .1, just bumping for a different devel version. + +commit 43e71a54502d9ab28ece7f6296d1416d60948dad +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 08:16:35 2007 +0300 + + XFree86: xf1bpp: Fix previous build system commit + + Amateur error. + +commit 6d6bc93b0a13c5356544561e326d4aedf33e61c2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 08:11:22 2007 +0300 + + Build system: Add missing files + + A couple of headers weren't added to the build. + +commit 505ec436af3a173e0ba32c6f14b4cf9837a553eb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 08:11:08 2007 +0300 + + XFree86: Properly clean up after ourselves + + CLEAN is not a useful variable. CLEANFILES/DISTCLEANFILES, on the other hand, + are useful variables. + +commit 1ace9770fed4a2ba354ff06a96189428beb36088 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 08:10:38 2007 +0300 + + Build system: Non-dtrace distcheck hacks + + automake 1.10 really wants foo.c for foo.O, so give it some dummy files to + deal with if it really needs them. + +commit cacbdf18ee771d43228c2e96e8ef9a32251ceb55 +Author: Daniel Drake <d.drake@mmm.com> +Date: Wed Aug 1 08:08:37 2007 +0300 + + Remove duplicated licenses + + Some files had two copies of the same license. + +commit bd49332e4772bd57ffb76c829f0e4770ab876057 +Author: Daniel Drake <d.drake@mmm.com> +Date: Wed Aug 1 08:07:08 2007 +0300 + + Add proper COPYING file + + I went through the entire xorg-server distribution and aggregated all + the licenses I could find (except the questionable GPL files, see my + last mail). + + There are many many permutations on essentially the same license terms, + but I have been pedantic and treated slight differences as separate + licenses. + + Here is a description of the process I used: + + tar xvjf /usr/portage/distfiles/xorg-server-1.1.1.tar.bz2 + + cd xorg-server-1.1.1 + find -name '*.c' -o -name '*.h' | xargs gvim + + egrep -Rli "permission|copyright" * | grep -v "\.[ch]" \ + | grep -v "\.in$" | xargs gvim + + cd .. + tar xvjf /usr/portage/distfiles/xorg-server-1.3.0.0.tar.bz2 + diff -urNp xorg-server-1.1.1 xorg-server-1.3.0.0 + + git clone git://anongit.freedesktop.org/git/xorg/xserver + cd xserver + git diff xorg-server-1.3.0.0.. + + For each file, licenses have been aggregated as follows: + + If 2 files have identical license text but different copyright notices, + the copyright notices are aggregated and the license text + is included only once. + + Note that by identical I mean really identical, i.e.: + 'AUTHOR(S)' is not the same as 'AUTHORS' + 'KEITH PACKARD DISCLAIMS' is not the same as 'KEITH PACKARD AND COMPAQ + DISCLAIM' + + Otherwise, licenses and accompanying copyright notices have been + stacked. + + When going through the changes from 1.1.1 to 1.3.0.0 then HEAD, licenses + have been added and removed (so I have reflected this since the original + version of my COPYING file). It's slightly concerning to see that even + between 1.3.0.0 and HEAD, new license permutations are being added. I'd + suggest that a primary license be chosen and this would be indicated at + the top of this COPYING file. + +commit 51b735394f0aa9f953f9c320617c7a56028ec458 +Author: Daniel Drake <dsd@gentoo.org> +Date: Mon Apr 30 11:37:46 2007 -0400 + + [PATCH] xserver: Add COPYING terms + + I went through the entire xorg-server distribution and aggregated all + the licenses I could find (except the questionable GPL files, see my + last mail). + + There are many many permutations on essentially the same license terms, + but I have been pedantic and treated slight differences as separate + licenses. + + Here is a description of the process I used: + + tar xvjf /usr/portage/distfiles/xorg-server-1.1.1.tar.bz2 + + cd xorg-server-1.1.1 + find -name '*.c' -o -name '*.h' | xargs gvim + + egrep -Rli "permission|copyright" * | grep -v "\.[ch]" \ + | grep -v "\.in$" | xargs gvim + + cd .. + tar xvjf /usr/portage/distfiles/xorg-server-1.3.0.0.tar.bz2 + +commit 7fa58385724fa7f441107a1793b601ba3dcb1f4c +Author: Arkadiusz Miskiewicz <arekm@maven.pl> +Date: Wed Aug 1 08:01:28 2007 +0300 + + XFree86: xf1bpp: Fix parallel build + + One of the constructs wasn't parallel-build safe: fix that. + +commit 18ab4d559409d4b682aab99fb75f8d861122eab6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 07:27:53 2007 +0300 + + Darwin: Remove missing file + + Xserver.m is missing and still hasn't been added, so just remove it for now. + +commit 0bd6fe7401b2524cf34793c0b0c642e3d32fae00 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 07:27:30 2007 +0300 + + Config: Add missing include + +commit 48b3034d13bbbb69072eb11f4579389cc32b0850 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 07:01:51 2007 +0300 + + Config: Add current FDI file + + Add the FDI file we're using at the moment, until it gets into upstream HAL. + +commit 82b720cf3e09d8a6adcd40b25c4d48b34ba1ae80 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 06:57:11 2007 +0300 + + Config: Fix merge detritus + +commit 6b055e5d9751e3679ff98065e43225ec8a960053 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 06:55:36 2007 +0300 + + Input: Fix stuck modifiers (bug #11683) + + Disclaimer: It's 6:51am. I'm trying to be as understandable as possible. + + What was happening previously was this: + * Press Alt + * Extended event generated and processed: state is now Alt down once + * Core event generated + - keyboard switched: inherited state is Alt down once + - event processed: Alt down twice + * Release Alt + * Extended event generated and processed: state is now null + * Core event generated and processed: Alt down once + + If we switch the order: + * Press Alt + * Core event generated: + - keyboard switched: inherited state is null + - event processed: Alt down once + * Extended event generated and processed: state is now Alt down once + * Release Alt + * Core event generated and processed: state is now null + * Extended event generated and processed: state is now null + + When we carry over the previous state, it needs to be the _previous_ state + (state and modifiersPerKey), assuming that we're going to catch now-core + events for any of these. For example, if Ctrl is held down as we pivot, we + need to carry Ctrl over with a count of one, for which an extended + core + release will then clear. Carrying over the union of the previous state _and + the state resulting from the immediate action_ was what broke things. + +commit 0e0174d45ecbeb7b6dddc4af53da9d6211038e0e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 03:30:07 2007 +0300 + + XFree86: Allow disabling of HAL + + If NoAutoAddDevices is given as a server flag, then no devices will be added + from HAL events at all. If NoAutoEnableDevices is given, then the devices will + be added (and the DevicePresenceNotify sent), but not enabled, thus leaving + policy up to the client. + +commit cd8e99e56ec5d02026e401cc15e0f8d75f2a4727 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 03:29:12 2007 +0300 + + Input: Don't enable devices when we open them + + Thanks to Xi's braindead design, it's otherwise impossible to query input + devices without enabling them. Hurrah. + +commit 0a31db14b7c7c21ef550dbcc73a9f649f3613cbe +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 02:54:14 2007 +0300 + + Config: D-Bus core: Fix hook removal + + Make sure we properly initialise the entire hook when adding it, and + bust out when we're done removing. + +commit 89f628394f7d831f2ba1e45c5884c3983bef6031 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 02:08:02 2007 +0300 + + XFree86: Input: Fix whitespace + +commit aec0d06469a2fa7440fdd5ee03dc256a68704e77 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Jul 31 16:33:37 2007 -0700 + + Fix a crash when rotating the screen. + + Remember output->crtc before setting a NULL mode because RRCrtcNotify now sets + output->crtc to NULL. Use the saved crtc to set the new mode. + +commit a93033b0bc14ed0bb95c680ded26b63cfe5fd1d3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 01:53:08 2007 +0300 + + XFree86: Module: Bump input version + + config_info changes the size (and ordering) of DeviceIntRec, so bump the + input major. + +commit 1150969b826e2bd6d8345fa245ed499f2e4cf101 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 01:52:20 2007 +0300 + + Convert all my license statements to the standard form + + Convert all my license statements to the standard, accepted form: + cf. <20070717142307.GD13478@fooishbar.org> + http://lists.freedesktop.org/archives/xorg/2007-July/026451.html + + keithp's license on configure.ac changed with his verbal permission. + +commit 8658f5d923a69fb55b4cd9e1e84c2d271679f6e2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 01:10:50 2007 +0300 + + Hotplug: Add HAL support + + Add support for HAL-based hotplugging, in which we just get the list of + input devices and properties from HAL. Requires an FDI which is not yet + in mainline HAL. + +commit aa75b3481724834da2f855d8dd2ff36074bd5706 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 01:09:07 2007 +0300 + + Hotplug: D-Bus: Dispatch harder + + Dispatch until we've got nothing left to dispatch, since apparently + dispatching will only ever fire a single message ... + +commit 4d238c5c67461ed747aa6c021d1532734f4c63fe +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 01:08:26 2007 +0300 + + Input: GetPointerEvents: Deny events from devices without valuators + + For some reason, my keyboard has 25 mouse buttons, but zero valuators. This + causes GPE to blow up spectacularly, trying to get (and set) co-ordinates from + devices without valuators. For now, just prevent this from ever happening, + and whack a dirty great FIXME in. + +commit 7c9e8fd56e1830f7a971187d14877ebbdf35c4b0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 1 00:19:14 2007 +0300 + + Input: Allow enabling and disabling of devices + + Add DEVICE_ENABLE to KDrive and XFree86 to allow us to enable and disable + devices on the fly. + +commit 0afeb0241a83796575da827bd81375c99ff10af5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 20:48:57 2007 +0300 + + DIX: Clean up null root cursor handling + + Move the null root cursor handling out of main() and into CreateRootCursor. + +commit 62ec6d09b3adaea82ff52c8672e6f611c15ec56d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 20:47:28 2007 +0300 + + dix.h: Remove duplicate ffs() prototype. + +commit 4d3379d418a781938358e511fd41deb4115a032c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 14:31:35 2007 +0300 + + Fonts: Fix builtin fonts + + Make sure the font path is always 'built-ins' when we use built-in fonts, + rather than having it as a fixed path for a while, then clobbering it + halfway through startup. + +commit 9ac7e8a559fe6008cafc95e8264680c50e72ba19 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 14:30:53 2007 +0300 + + Hotplug: D-Bus: API version 2 + + Use uint32s instead of int32s where practical, and add an API version + request. Also, try to return all devices added, not just the first, + and box device arguments. + +commit 1cdadc2f43d9069572814510d04b1a560c488fcb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 14:28:58 2007 +0300 + + Hotplug: Separate D-Bus into core and hotplug API components + + Break up D-Bus into two components: a D-Bus core that can be used by any + part of the server (for the moment, just the D-Bus hotplug API, and the + forthcoming HAL hotplug API), and the old D-Bus hotplug API. + +commit 8bfa41e1bf3f588780d7e9f6f900b1fde0570a7e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 04:29:43 2007 +0300 + + gitignore: Add automake lex/yacc wrapper + +commit 06dd2748da8b7af343f6cab409b9f351567de5f3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 00:27:40 2007 +0300 + + configure.ac: Properly check XFree86 proto modules + + Not sure why these are conditionals, anyway. This one really needs + revisiting, but at least causes configure, rather than the compilation, + to bomb out. + +commit fd10312b4224197b937d9e696b53dc2a16c8912f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 8 00:26:26 2007 +0300 + + configure.ac: Fix KDrive VESA/fbdev conditionals + + Make sure we actually respect anything explicitly given on the configure + line, instead of just stomping it with what we detect. + +commit f37612c6f2375ca904411e6caa0be19fa24f032c +Author: Nicolas Trangez <eikke@eikke.com> +Date: Sun Jul 8 00:23:57 2007 +0300 + + Hotplug: Remove unused function definition from hotplug.h + + configDispatch hasn't been used in a long time. + +commit 951c058e7800308f7c472e77178c14400f45c1b3 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Jul 31 14:23:58 2007 -0700 + + Don't fail compScreenInit if the driver added its own alternate visuals. + +commit 722d73a0ef54c2ebd8ef38c4a6afa0e7c5aa3e30 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Jul 31 10:34:56 2007 +1000 + + Revert "Fix RandR 1.2 conversion of two colour to ARGB cursor on MSB first platforms." + + This reverts commit 0f057ebb272f0ee0b51b9ab37d4b07da0924fec4. + + This screws my cursor up just starting a bare X server on Intel, + I get the X more like <> than ><.. + +commit 57b5b97a0710fc043b8a1c01d756cdb73dfe4567 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Jul 29 11:02:47 2007 -0400 + + ReduceCompositeOp returns a Render op, not a boolean. + +commit f62beb6f3609e8b6e61325ac89017590811bbd07 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Fri Jul 27 13:23:15 2007 -0400 + + Remove all trace of Option "BiosLocation". + + This code was deeply dangerous. If anyone actually had a use for this code, + we should find a better way of doing it. + +commit 486fd4145aed93093d1f1655de40c0a8582bb8b1 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Fri Jul 27 13:10:39 2007 -0400 + + exaGetPixmapFirstPixel: avoid framebuffer readbacks if possible. + + If the pixel in framebuffer memory isn't modified since we uploaded it, we + can just read from the system memory copy, wihch avoids both a readback and + an accelerator stall. + + In principle this function is still wrong, and all the framebuffer pixel + access should be going through (w)fb so we can get pixel layout corrections. + +commit 50cb6c7e4419e067c1f080d1de940811d21fc725 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Jun 15 15:29:00 2007 -0400 + + Don't map the front buffer in libdri if the ddx driver doesn't set the size. + + This lets drivers map the front buffer themselves + by setting dontMapFramebuffer. + +commit cec793ef7a6dac9fa2a6538683e363a72672cde9 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jul 26 11:49:46 2007 -0700 + + Include picturestr.h in xf86Crtc.h to pick up definition of PictTransform. + +commit 27845fe197b74bf453d99f352e83513e201fdaae +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jul 26 09:32:16 2007 -0400 + + libconfig shouldn't be an installed library. + +commit 276f8e2ca42eec982d16b86d67217d68ff98f81d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jul 25 17:42:23 2007 -0700 + + Include comment/copyright/license for AC_DEFINE_DIR in acinclude.m4 + +commit eba2be448bdd298ff2f7b8603bd9e976da1fdf72 +Author: Brice Goglin <Brice.Goglin@ens-lyon.org> +Date: Wed Jul 25 20:53:45 2007 +0200 + + Minor fixes in cvt and gtf manpages + + Reported by "A. Costa" <agcosta@gis.net> in + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432065 + +commit 8d230319040f0a7f72231da2bf5ec97dc3612e21 +Author: Gustavo Pichorim Boiko <boiko@mandriva.com> +Date: Tue Jul 24 16:19:19 2007 -0300 + + Fix the output->crtc initialization in the old randr setup + +commit 0f057ebb272f0ee0b51b9ab37d4b07da0924fec4 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Jul 25 17:04:04 2007 +0200 + + Fix RandR 1.2 conversion of two colour to ARGB cursor on MSB first platforms. + + Doesn't seem necessary to do anything here... + +commit 5b424b562eee863b11571de4cd0019cd9bc5b379 +Author: Gustavo Pichorim Boiko <boiko@mandriva.com> +Date: Mon Jul 23 18:27:41 2007 -0300 + + Set the crtc before the output change is notified + + Set the new randr crtc of the output before the output change notification is + delivered to the clients. + Remove RROutputSetCrtc as it is not really necessary. All we have to do is set + the output's crtc on RRCrtcNotify + +commit 7da38bb6a15247948c90e00a59230453fcf13cbd +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Jul 21 15:27:40 2007 -0400 + + Partial redundancy elimination in PropertyNotify generation. + +commit 0f91abd5c68eb044d09733d18ef0f6b8ed128200 +Author: Julien Cristau <jcristau@debian.org> +Date: Thu Jul 19 20:37:26 2007 -0400 + + Fix alpha build failures + + Don't include <asm/pci.h> in os-support/linux/lnx_axp.c, use "lnx.h" and + <unistd.h> instead + +commit dc9c5196282ba61bd542e198dfe0d53d93181591 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Jul 19 13:28:00 2007 -0700 + + Make PreferredMode option in config file override EDID mode preferences. + + When the PreferredMode option is selected in the config file, remove the + M_T_PREFERRED bit from all other preferred modes to force the config file + mode to be selected. + +commit 73a93c5a6b68f7ba21f9e75f50b1032603a3b39e +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Jul 19 13:26:36 2007 -0700 + + Query modes on disabled (but not ignored) outputs. + + Code that disabled mode detection on disabled outputs would confuse + applications by listing said outputs as connected but without any modes. + This makes the disabled state in the config file affect only the initial + configuration and not subsequent modifications by RandR. + +commit 9fc36a391c11170cde1a28f548a2cae5f6f20d5b +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Jul 14 12:36:15 2007 -0700 + + Make pending property changes trigger mode setting. + + The DDX code was ignoring pending properties for computing when mode setting + was required. This meant that configurations differing only in property + values would not cause the mode to be set. + +commit aed6569309223ecc7e26fa84e4d430e422455607 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Jul 14 15:21:46 2007 -0400 + + Refactor how Composite adds visuals to the screen. + + Besides being slightly simpler to read, it's now trivial to add a depth-16 + visual to a depth-24 screen just by adding a line for it in the alternate + visual list. Visuals for indexed depths are slightly tricky still. + +commit 21bbd7d64b5f74915afd7a312e589654442f3461 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 21:42:50 2007 -0500 + + Delete some pre-dlloader debugging scaffolding. + + If your loader is as bad as elfloader, then it makes sense for the + server to have some stubs for you to assign to / break on. However it + is no longer 1996. + +commit 1f71f0c0574bafb36da20fec669f9a1138c69a47 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 21:28:03 2007 -0500 + + Remove (long-)deprecated xf86EnablePciBusMaster. + +commit 0a63d874e9c2f4fe4b38839a744461f9d41040b2 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 21:22:49 2007 -0500 + + Always normalize the module name. + +commit 9a1c6afd12caf0143483f72bfbba0c4c3daaa6ff +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 21:19:50 2007 -0500 + + Remove dead code for screen crossing. + +commit 8ca2fe8914af1a67bf597f99025e5cbe9b08da57 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 21:11:13 2007 -0500 + + Delete dead module test code. + +commit e2413cc7cae4e578b8e9b408ea85bef596b03ea3 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 21:07:37 2007 -0500 + + Remove MEMDEBUG + + This existed (but may not have worked) in the monolith, but is gone now. + +commit d1d65a84150dfbc3a4dbe108f237a85ab6e09bbb +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 21:01:08 2007 -0500 + + Dead ifdefs for BITMAP_SCANLINE_UNIT == 64 + + This appears to be a legacy of cfb24 not being smart enough to deal with this + case. But since cfb24 unexists, die die die. + +commit cbe74394a5ed21ed80c0aab6eefd2716122cce11 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Feb 6 20:44:34 2007 -0500 + + Nuke dead X -configure code. + +commit 5657fb065cc79ba3ca5a836f45637ba9894f9abf +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Tue Jul 17 12:12:02 2007 +0200 + + exaDriverInit: Fail if pScreenInfo or a member of it is invalid. + + EXA may attempt to use the invalid value and crash otherwise. + +commit bbe7ce10fa93017374d7a4611427b70a22d7507a +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jul 16 17:25:59 2007 -0700 + + Update pci.ids to 2007-07-16 snapshot + + Remove nvidia ids in extrapci.ids that are now in pci.ids + Add nvidia ids to extrapci.ids that are in xf86-video-nv but not pci.ids + +commit ac979c165128704116cd40086320b6edc79018e2 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Jul 14 12:13:17 2007 -0700 + + MakeAtom needs length without trailing NUL. sizeof("string") includes NUL. + + I made a mistake in some new code using MakeAtom, passing the size of the + string instead of the length of the string. Figuring there might be other + such mistakes, I reviewed the server code and found four bugs of the same + form. + +commit 393171034c15d8a1b82232b8f9455a358035e932 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Jul 14 09:03:40 2007 -0700 + + Add RandR reflection support. + + Replace the ad-hoc transformation mechanisms with matrices. + Prepares for more general transformation as well. + +commit 8773ad023eb28950eb0f802d2ca31a67f84adddc +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Jul 14 08:47:50 2007 -0700 + + Screen size bounds check in ProcRRSetCrtcConfig not masking out reflections. + + When checking how to validate the selected mode and position against the + current screen size, the test against 90/270 rotation did not mask out + reflection, so that when reflection was specified, the 90/270 test would + never succeed. This caused incorrect bounds checking and would return + an error to the user instead of rotating the screen. + +commit 881a620b4d6ea7a54af14c8f8fbe6924c9aa9291 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Jul 14 08:45:10 2007 -0700 + + When sync'ing logfile, also flush it. + + When the logfile is set to sync, the actual sync occurs whenever the log + file is flushed. If the log file is not also set to flush, no syncing + occurs. + +commit 031b009ea678809bf1ddca883c2082b304c408c9 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Jul 13 14:54:45 2007 -0700 + + Use %S instead of %s for strftime seconds when printing build time + +commit c0e91777a9874fe2cd9a7e9180263f512c1e8f8d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jul 12 16:37:11 2007 -0700 + + Add __SOL8__ to xorg-server.h.in since xf86-input-kbd needs it to build + +commit 6b4231e3b5b49b731c9a00930ae465fff8539831 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jul 12 16:36:27 2007 -0700 + + Use kbd driver when xorg.conf specifies "keyboard" or "Keyboard" (bug #11301) + + X.Org Bug #11301 <https://bugs.freedesktop.org/show_bug.cgi?id=11301> + Sun Bug #6560332 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6560332> + +commit 9fcb30ebf7b7b2137955f759e95c1d58c4f27a11 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jul 12 13:00:32 2007 -0700 + + Make SOLARIS_INOUT_ARCH substitutions work better with automake-1.10 + +commit 7c0ca27f6dd0a800dc27429a33dbc8e133f9a9c1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jul 11 17:15:29 2007 -0700 + + "fbpict.c", line 215: void function cannot return value + +commit 0a4e9311158ed3ecda0722640f860ace2f87a97e +Author: Hanno Boeck <hanno@gentoo.org> +Date: Thu Jul 12 10:17:07 2007 +1000 + + xnest: fix linking since dbus + + Fixes bug 8955 + +commit b2f9ca6ac400d426d7a1ef0162f7e7ce28288dd1 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Jul 10 21:33:34 2007 -0700 + + Redirect fix: Manual + Automatic - Manual = Automatic + + A window with redirect manual *and* redirect automatic which loses the + manual redirecting client becomes redirect automatic. + +commit 561989f2f0fc31e3d3bf8df978a9cb3d4c85af59 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Jul 10 21:06:51 2007 -0700 + + Generate ChangeLog file for make dist. + + Copy Makefile.am snippet which generates a complete git change history to + the ChangeLog file during the distribution generation process. + +commit e316fa59fea8b7b18cdf3a227890351a9567ec65 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Jul 10 14:20:55 2007 -0400 + + Add per-monitor config file option for maximum pixel clock. + +commit ffdf8f3e452638e6b050fccabee465d6c0300f45 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jul 10 13:56:38 2007 +0930 + + DeliverEventsToWindow: ensure that genericMask has a defined value. + +commit 161624a5a45808fd56141dc2c64be729944f03ed +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Jul 10 09:02:40 2007 +0200 + + GLX: Only build code dealing with GLXPixmap damage field when DRI is enabled. + +commit 4abd00dab7e648dab8172f6009371e4e63d0c521 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Jul 10 09:02:08 2007 +0200 + + Make sure DRI drawables are cleaned up when client dies. + + The previous scheme didn't work when the client didn't create the core drawable, + e.g. the root or composite overlay window. Use refcounting via special client + resources to fix that. + +commit 583e988b9f7cfb9293144c8309023c0dd1766715 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jul 10 09:19:02 2007 +0930 + + Install geext.h, otherwise drivers won't build. + +commit 9809715afaafee9baf2aef348c1ebda7e8b3f076 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jul 9 10:42:03 2007 +0930 + + Change CheckMotion to ignore non-pointer events but acknowledge XI events. + + Call CheckMotion from ProcessOtherEvents() to make sure absolute XI events + update the sprite before an event is sent. + +commit 62efc3951a96648cf975302aa6651cb67b87fa64 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jul 6 17:00:20 2007 +0930 + + DeliverGrabbedEvent: stop segfault when gemask == NULL. + +commit 3312e4dd5e055b2cb445b5d5c617aa7a611eedc1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jul 6 16:41:52 2007 +0930 + + Call CheckMotion for all core events. + + We need to do this to update the sprites x/y coordinate before we assemble a + button event. Absolute devices may send a buttonEvent with valuators attached. + If we don't update the sprite before assembling the event, the valuators are + lost and the button press is delivered to the previous position of the device. + Doesn't have any effect on relative devices. + +commit c1a6841a64576b7e688e9ca0d3e0db8acf52d4ae +Author: Paulo Ricardo Zanoni <prz05@c3sl.ufpr.br> +Date: Tue Jul 10 10:08:44 2007 +0930 + + ProcX{Change|Query}WindowAccess: change device list from char* to XID*. + +commit 5957aa6fdc580ccad4557eeefa0636ffad823f33 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jul 9 08:47:05 2007 +0200 + + Fix regression from recent composite changes. + + One pWin->redirectDraw test was converted incorrectly, causing incorrect + rendering in some cases. + +commit 5ccc09b18244f91a06b3bea20b02a97280d1a229 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jul 6 15:43:08 2007 +0930 + + Use the same struct for generic event masks throughout the code. + Renaming those structs too. + + Previously grabs were using a different struct than windows, which was + reasonably stupid. + +commit bcb23527421578bd4c9397d4c2c19cbefa22fc59 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jul 5 15:56:25 2007 -0400 + + Clean up unused #ifdefs from fb. + +commit 9ff7ff2fda30f334515b16ef0867c1500c41bc0f +Author: Keith Packard <keithp@neko.keithp.com> +Date: Wed Jul 4 23:38:27 2007 -0700 + + Fix MEMORY SMASH in XkbCopyKeymap. + + XkbCopyKeymap reallocates the destination keymap when it is not large enough + to hold the source data. When reallocating the map->types data, it needs to + zero out the new entries. The computation for where to start bzero'ing was + accounting for the size of the data type twice, once implicitly in the + pointer arithmetic, and once explicitly with '* sizeof (XkbKeyTypeRec)'. + This would often lead to random memory corruption when the destination + keymap had existing map->types data. + +commit 9131d560a0d42067cc4e726e445e060216c9acdc +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Thu Jul 5 02:47:34 2007 -0300 + + Postpone options variable assignment to fix segfault when we got a device but + its driver is incorrect. Also if (!ki && !pi) can never be true. + + This one also adds the device option field. + +commit 41b485d5507821e41c3281c3c565647ae7582101 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Thu Jul 5 02:40:07 2007 -0300 + + kdrive must to know that devices are unplugged. + +commit a92dc6b5295e4f352115fed2856169929819863f +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Thu Jul 5 02:28:14 2007 -0300 + + Remove redundant linking in kdrive. Fix configure.ac variable name and clean + it up a little. + +commit 41b5155c8be75c4e171c0f64616cc09598b8ec54 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Thu Jul 5 01:57:41 2007 -0300 + + For each kdrive server put a dependencie on its own libraries. + +commit 16e429bcbf2f62cfc58162ab2857afb7376dda41 +Author: Jonathan Lim <jlim@sgi.com> +Date: Wed Jul 4 20:08:49 2007 +0200 + + Bug 5000: Fix domain support for SGI Altix + +commit f106c04b627d9f57b38627971dc79c75129e66d6 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Jul 3 14:47:19 2007 -0700 + + Have Composite always report server version. + + It was reporting the lessor of the server and client versions, which doesn't + make sense with the 0.4 semantic change in clipping. + +commit 4f88d68bdb90cc7d12170355105b4fd020acd306 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Jul 3 14:43:17 2007 -0700 + + Force advertised Composite version to 0.4 instead of using header version. + + Installed protocol header version may be newer than the server code base. + Use internal version number for Composite extension to make sure the server + doesn't advertise capabilities it doesn't support. + +commit 866f092ca0160a366add01b48ad03438926c4d16 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Jul 3 14:29:11 2007 -0700 + + Make Composite manual redirect windows not clip their parent. + + This patch changes the semantics of manual redirect windows so that they no + longer affect the clip list of their parent. Doing this means the parent can + draw to the area covered by the child without using IncludeInferiors. More + importantly, this also means that the parent receives expose events when + that region is damaged by other actions. + +commit 2a75c774975b50dd4e71b7dbea7bd65ca2984a43 +Author: Dodji Seketeli <dodji@seketeli.org> +Date: Tue Jul 3 11:00:29 2007 +0200 + + ExaOffscreenMarkUsed: Don't crash when there's no offscreen memory. + +commit 0ede39a25cf5b0b6c2c89677f810c21ce42b95df +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Jul 3 10:55:13 2007 +0200 + + Fix build when int10 doesn't use x86emu. + +commit 028a00bc518dc6908839e8ce7c50ab1837100945 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Jul 2 18:41:55 2007 -0400 + + Make x86emu's I/O cycle tracing more useful. + + Print debug messages only when the appropriate debug bit is set in the + 8086 state vector, so you can focus in on the call you're actually + interested in. + +commit 00e8295b7e0c7c0ba97707903004272818e3d87d +Author: Gero Mudersbach <geroxp@web.de> +Date: Mon Jul 2 11:40:11 2007 -0700 + + Bug #10814: Add needed quirk for Samsung 225BW like the 226BW. + +commit 667e95f2e8389d9f23c50446d6d664eddd16d260 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Jul 2 11:36:11 2007 -0700 + + Correct the xf86EdidModes.c file description. + +commit 3de1f0d03b329b01856f664651db23ffefb58646 +Author: Eric Anholt <eric@anholt.net> +Date: Tue May 29 10:08:58 2007 -0700 + + Fix documentation of association of outputs to monitor sections in xorg.conf(5) + +commit c1a16bdcfe7aa907fe78f27dc606a8e5a2699952 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 27 18:08:03 2007 +0930 + + Add 'evfill' field to GEExtensions. + We need this to allow extensions to fill in extra data for an event before it + is sent to the client. This is probably to be used like + FillUpEventsFromWindow(). + +commit 4d76075dbb618a47ff9fc15c4be2e2d34210fa8d +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Fri Jun 29 14:06:52 2007 -0400 + + Death to RCS tags. + +commit 2691c05fd647d9fa10f791ac397ecb9c423a076f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jun 29 11:56:18 2007 +0930 + + Make sure window->optional is allocated before assigning it. + + DeletePassiveGrabFromList() may remove the window optional, so we need to + re-alloc it if it isn't there anymore. + + Thanks to Colin Harrison for spotting the bug. + +commit f7f3fe7fe7233a2ffc43106c48f44cbbd82b7c19 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jun 28 18:59:05 2007 -0400 + + Remove the remnants of OS/2 support. + + This has never worked in any modular server release, and as far as I know + was never tested in 6.7 through 6.9. + +commit 8a06ff9ffa4816d192e58e43e7fe569b97b4dd7c +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jun 28 16:41:28 2007 -0400 + + Fix another usage of MAX_PCI_DEVICES. + + Fixes cases where the VGA device is above the 128th device on the system. + +commit 928836a5abd85466e920eb487fab9ccb295e0c5b +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jun 28 16:29:28 2007 -0400 + + Bug #10770: "Inputdevs" isn't a valid config file keyword. + +commit 62f43d8b33f67d8f3d0bd65787ffae9e6b634d65 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 27 16:24:42 2007 -0300 + + Relink properly all kdrive servers when changes happen. + +commit 3860996d5666b76600b1537e2cbd58e36b086308 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 27 16:06:12 2007 -0300 + + Remove double-defined. + +commit 1e189ed1daab58c1de67d387306fde0a9e7984a4 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Jun 27 10:16:40 2007 -0700 + + Handle tileStride > 1 in fbEvenTile. + + Patch courtesy of James Jones. + +commit bf1ad1aa4270dccf1540943d97e80b317c0adb56 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jun 27 09:19:28 2007 -0400 + + Add VBE PanelID support. + + Originally found only in the i810 driver. + +commit d73835efda4995a310188537233a984f4b73628d +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 27 03:34:13 2007 -0300 + + More janitor work. Remove 'defined but not used' warnings from kdrive and some minor cosmetic. + +commit 38f8e536684193c3f70b23be22d818053c676072 +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 27 03:19:37 2007 -0300 + + Janitor work. Remove 'defined but not used' warnings from xorg and other cosmetic. + +commit 1340f34ec98c41781164018d43bd7bb858d8132b +Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> +Date: Wed Jun 27 03:04:55 2007 -0300 + + Fix kdrive XKB. + +commit 08779c62ba2f4cbfa47e3cf738daf8abd74b60cf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 27 11:16:55 2007 +0930 + + Reset grab->next to NULL when we're creating a grab. + + This is definitely necessary in CheckDeviceGrabAndHintWindow (thanks to Paulo + Zanoni for spotting it). We're resetting it everywhere else too, just to be + save. + +commit 49136d3e9fe2d065090ee90c18a49f65fb027c9f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 26 19:43:54 2007 +0930 + + mieqEnqueue: use modulo for queue tail wrapping. + + This was previously committed by Michael Daenzer, but was lost during a pull. + +commit 8396bf7c8b4eb6b8f2d1e1ef19887064c69591da +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 26 12:58:37 2007 +0930 + + Init genericMasks to 0, make sure list is NULL terminated. + +commit 9725516b4274ceaf9d6caf372c5439b4c9db2316 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Jun 22 17:05:21 2007 -0700 + + Split checks for dtrace & getpeerucred() + +commit edb9ccf3ecb4e35a840aa13815979c5fbd73f32d +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 25 10:51:38 2007 +0200 + + Make sure DRIScreenPrivIndex is -1 when no DRI screen private is allocated. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=11340 . + +commit c4e850a781e3b85631cb386d24efcca2a835d4c9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 25 13:38:25 2007 +0930 + + Quickfix to stop core key events from doubling up. + +commit 4c601b904ee6fb01da3343ff9ef00d36f1341fcb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 25 10:53:05 2007 +0930 + + configFiles(): don't return anything when declared as void. + +commit bec4e47d128ec40b58a2c9aae475f6a6fc4323c3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jun 25 10:51:42 2007 +0930 + + NULL-terminate device list when synthesizing core devices. + + This fix is required for 93ca526892c0d22afa05cce6496198c652043a19 to work. + +commit 8e5102b9f01821048e72e7f068193a0b3e1816f9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 21 15:47:48 2007 +0930 + + Set the detail field for DeviceKeyEvents to the keycode. + + (cherry picked from commit 0c33dc152e372cdc8ae59d9a5696b0774bcd03b7) + +commit 87564543d92c1ee1f8cb6fb9716a15d693e08cf5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 19 18:20:05 2007 +0930 + + Only decrement buttonsDown when the button count is greater than 0. + + Device drivers flush their buttons on device init and cause a button down + event to be generated. If we unconditionally decrease the buttons, we won't be + able to ever get a passive device grab. + + Format documentation for CheckDeviceGrabs to make it readable. + (cherry picked from commit 3e894974cdd6a75683d4601f71622d1da7ec4395) + + Conflicts: + + Xi/exevents.c + +commit 24ee89fd60f489f2d3af0399e0d667057df74d02 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 19 15:31:56 2007 +0930 + + Add a few comments to devices.c + +commit 93ca526892c0d22afa05cce6496198c652043a19 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 13 15:28:15 2007 +0930 + + Split up memory for devices configured in the config file. + + If we're using a continuous block here, we segfault when a device removal + triggers an xfree call. + +commit b141b85c254afff3ce2221d899787fab3dc295bd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jun 13 15:26:03 2007 +0930 + + Check for identical grabs when adding a new passive grab. If an identical grab + + exists, remove the old one and prepend the new one. + + X.org Bug 2738 <https://bugs.freedesktop.org/show_bug.cgi?id=2738> + +commit 19cde59c41cf167cc609debfee75bfc015beac12 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Fri Jun 22 00:38:50 2007 -0400 + + In fbFill() make sure the drawable is validated when pixman_fill() succeeds. + + In fbSolidBoxClipped() don't return when pixman_fill() succeeds. + +commit d2177c80915f2fe2e8a5c948d4ba2fa51dbfbea2 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Fri Jun 22 02:08:21 2007 +0100 + + Skip driver mode detection/configuration when !vtSema. + + When the server is not active, make sure the driver functions related to + mode setting are not called. + +commit 32c0dcc8c0d1edba5d7e418fd2dc916847a4f069 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 21 15:39:19 2007 -0400 + + xselinux: adjust the config file format to that expected by libselinux. + + This file will eventually be moved out of the X source tree. + +commit 2030e9e5395be43bd8eab15b65c21ca4c2f1e619 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Jun 21 15:37:18 2007 -0400 + + xselinux: use new libselinux support for context labeling. + + Remove all the config file parsing code and use the new lookup interface + instead. + +commit 4d5df14f2c4a3108a8c8adfcf4766c0d1a9daad2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 21 18:24:30 2007 +0930 + + Save processInputProc before wrapping it and restore it later, instead of + using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to + process DeviceKeyEvents after the first key press. + + This should be the correct fix now. + +commit f6f3322fc7562dbfccaf798b05d42ea222860ba8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 21 18:16:21 2007 +0930 + + Revert "Save processInputProc before wrapping it and restore it later, instead of" + Mixed up source trees, this was a very bad fix. + + This reverts commit 8431f6083076cf1e701366767d8f8d32a628200f. + +commit 8431f6083076cf1e701366767d8f8d32a628200f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 21 17:00:41 2007 +0930 + + Save processInputProc before wrapping it and restore it later, instead of + using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to + process DeviceKeyEvents after the first key press. + +commit 0c33dc152e372cdc8ae59d9a5696b0774bcd03b7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jun 21 15:47:48 2007 +0930 + + Set the detail field for DeviceKeyEvents to the keycode. + +commit e523859a952d49b20f3d10152cc0ef695d2c12a1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 20 17:54:38 2007 -0700 + + Include module name in "already built-in" message + +commit 5138f710a1574fef6f553f3fe2fccac0620d2584 +Author: Arcady Goldmints-Orlov <arcadyg@nvidia.com> +Date: Wed Jun 20 16:31:55 2007 -0700 + + Fixed fbSolidBoxClipped() to fill the right place. + + Changed an X2 to a Y1. + + Signed-off-by: Aaron Plattner <aplattner@nvidia.com> + +commit c9b79a355845c895aca8303a39798264d80b6212 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Jun 20 18:56:06 2007 +0200 + + exaPolyFillRect: Don't track damage explicitly. + + All callers should already do it. + + Also don't leak pReg. + +commit 87966c5d2889873cea6cbc16b7e4399490dfaec1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Jun 20 18:42:00 2007 +0200 + + exaGetImage: Don't migrate or try to accelerate for 1x1. + + This is mainly to avoid wasting effort for XSync(), but just reading a single + pixel directly is probably faster than DownloadFromScreen anyway. Though in + light of the latter, even larger thresholds might be useful. + + Also move the swappedOut check before the migration checks because migration + can't actually occur when swapped out. + +commit 1f97a7647606226cde61d6ad7a94f2b0b571a06c +Merge: 5dee64f 2e7fef7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 19 17:20:52 2007 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + dix/devices.c + hw/xfree86/common/xf86Xinput.c + hw/xfree86/loader/xf86sym.c + mi/mieq.c + +commit 40f27a2df4906d9ceb1c78f6163a62c497321535 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Jun 19 09:11:16 2007 +0200 + + mieqEnqueue: Make local queue tail variables unsigned. + + So the modulo arithmetic actually works as intended... thanks to Peter Hutterer + for pointing out the problem. + +commit 5dee64fc99f34e091abce65d47c4b6f026ab4849 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 19 11:31:22 2007 +0930 + + Add a few comments to ProcXGrabDevice. + +commit 9e257029c760883c4ea0715d4fd06476f3fe8053 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 19 11:28:07 2007 +0930 + + Add implicitGrab field to GrabInfoRec. + Is set when passive grab is implicit as result of a ButtonPress event. If this + is the case, we need to store the XI mask as well as the core mask to ensure + delivery of XI events during the grab's lifetime. + + Remove all core grabs on other devices when client issues a GrabPointer or + GrabKeyboard request. Let's assume that the client really only wants one + device to interact, so this seems like a reasonable solution. + +commit ab7a6d860d4a275a810a64b1ba7b13726ed10575 +Merge: e9130b8 2e7fef7 +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jun 18 16:51:13 2007 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/os-support/bus/Pci.c + hw/xfree86/os-support/bus/linuxPci.c + +commit 2e7fef7d0837939e822c40b6ac77e7f0e66d57bd +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Jun 18 12:08:39 2007 -0400 + + Make xf86{En,Dis}ableInterrupts no-ops on Linux. + +commit 831d3b7f8d053aba649c8d04af3bef96376bdc3a +Author: Lennart Buytenhek <buytenh@wantstofly.org> +Date: Mon Jun 18 12:05:55 2007 -0400 + + Compile fixes for Linux ARM platforms. + +commit 562ca3f2f9005e7c5ed0a24b0759051ded2173e9 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Mon Jun 18 12:00:49 2007 -0400 + + In NewInputDeviceRequest, only call EnableDevice if xf86Screens[0]->vtSema is + true, preventing unwanted behavior in the case where a device is added while + the user is in a different VT. + +commit 3e894974cdd6a75683d4601f71622d1da7ec4395 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jun 15 17:16:16 2007 +0930 + + Only decrement buttonsDown when the button count is greater than 0. + Device drivers flush their buttons on device init and cause a button down + event to be generated. If we unconditionally decrease the buttons, we won't be + able to ever get a passive device grab. + + Format documentation for CheckDeviceGrabs to make it readable. + +commit 42c2e14b254f6f882b3e79444360ab855db43e27 +Author: Matthieu Herrb <matthieu@deville.herrb.com> +Date: Fri Jun 15 00:14:02 2007 +0200 + + swap xOrigin and yOrigin in SProcRenderSetPictureClipRectangles. + + Fixes Xrender clipping rectangles when X server and client are of + different endianness, shown by xterm 225 among others. + +commit 0aaf51546666f71e8d1711978bc7988ec2ecc7d9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Jun 12 16:55:26 2007 +0930 + + Zero deviceMask and genericMask when creating a grab via CreateGrab(). + +commit 78179ae827bb5d19abb1340084362bc51ad5c1e5 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 22:46:42 2007 -0400 + + Remove fbmmx.[ch] files + +commit eb2d7fe02f9cbca57b462bba05498e2d59316fbc +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 22:43:01 2007 -0400 + + Replace fbFillmmx() with pixman_fill() and remove fbmmx.[ch] + +commit f52ae237d3eec79ccd64cdd77271aeacc37af70c +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 22:02:39 2007 -0400 + + Require pixman 0.9.2 + +commit d1d85c04e248f46b1cf1b1d25fdd56aa69b8f0ee +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 21:25:42 2007 -0400 + + Delete fbBltmmx(). + +commit e2a720c9a17dc860ee0a858c2b21fd71e86cdcd0 +Merge: 878cac7 3f9adb1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Jun 11 15:29:11 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + dix/dixutils.c + +commit 3f9adb18f127318d054f30a57e3a77176e14c692 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 15:19:27 2007 -0400 + + Port a few forgotten fbSolidFillmmx()'es to fbFillmmx(). Use pixman_blt() instead of fbBltmmx() + in fbCopyNToN(). + +commit 878cac71aa0018deee861b297638c0744dba631b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Jun 11 14:19:37 2007 -0400 + + xselinux: use new libselinux support for private Flask definitions. + + Removes indirect dependency on kernel headers. + +commit d06099b38e8445e6e31f5178ffefcc31a71080ef +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 13:28:24 2007 -0400 + + Remove fbCopyAreammx() and fbSolidFillmmx() + +commit d4a034370c8ae71b2cc4fe824ceee58b19624f35 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 13:26:24 2007 -0400 + + Split fbSolidFillmmx() into a new FbFillmmx() function. Call that from fbFill(). + +commit 3210902a7334f3d8d6c18a34a3cb3f55803b0043 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 13:14:50 2007 -0400 + + Split fbCopyAreammx() into a new fbBltmmx() function; call this + + function from fbCopyNToN(). + +commit 8d5f4368eac1b259db3e61f877a4cc10f04efa2f +Author: Clark Rawlins <clark.rawlins@escient.com> +Date: Mon Jun 11 16:53:38 2007 +0200 + + Really make sure BUILD_TIME doesn't have a leading zero. + + date +'%k%M%S' still gives a leading zero in the hour after midnight... + + Add a leading 1 and remove it in xf86PrintBanner(). + +commit 54e023cec07aa7e392da36e11d0a4667b8341370 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon Jun 11 09:16:46 2007 -0400 + + Don't pass regions to pixman_image_composite() anymore. + +commit 5cbec267b6426960c90f6bcff1d051af5084538c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 11 12:38:41 2007 +0200 + + Make sure BUILD_TIME doesn't have a leading zero. + + It causes the compiler to treat it as an octal constant instead of decimal as + intended, which could even cause a build failure in the cases of 08 and 09. + + Thanks to Clark Rawlins for pointing out the problem. + +commit 1aceec61ff203848576c47a1eab13f90a67d7176 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 11 09:23:19 2007 +0200 + + DRI: Clip cliprects obtained from DRIGetDrawableInfo to screen dimensions. + + This is to avoid issues with redirected windows which are located partly or + fully outside of a screen edge, resulting in unusual cliprects which the 3D + drivers generally can't handle. The symptoms in such cases would be incorrect + rendering or even crashes or hangs. + +commit 5d896e43fd056d935935b4eb66562791edc247a1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 11 09:23:19 2007 +0200 + + DRITreeTraversal: Stop walking tree when we've seen all DRI windows. + +commit 0fb44c6f9a0415184818ba8357a21ff920e907dc +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 11 09:23:19 2007 +0200 + + DRI: Fix build warning. + +commit 644f7ddc0cb029e2ebca43742fd8a46a1a3f4c9f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 11 09:23:18 2007 +0200 + + dixLookupClient: Use access parameter. + +commit 30a3297fed9af3a594aba0875a8f58a0a38b33fc +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 11 09:23:18 2007 +0200 + + mieq queue handling cleanups. + + In particular, fix handling of wraparounds in mieqEnqueue. + +commit c1a49a9269f14b6975a1a2c751bb179757373f11 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Jun 10 22:14:57 2007 -0400 + + GNU is wrong and ` is not left-quote. + +commit 67a0a4da1a225ee3bd6bbd1846f8141fe333c884 +Author: Dave Airlie <airlied@linux.ie> +Date: Mon Jun 11 11:55:11 2007 +1000 + + update xproto dependency to at least 7.0.9 + +commit c079cce9d884ab03f305b3fba4a4e1247c023480 +Author: Daniel Ciocea <daniel.ciocea@eosystems.ro> +Date: Fri Jun 8 18:12:21 2007 -0700 + + Fix sync polarity on Samsung SyncMaster 205BW monitor. + + need to use standard VESA sync polarity instead of the + EDID provided -hsync -vsync values. + +commit 9c47b86bd9a4633fda5fd305a09ac8623187efa0 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jun 7 13:57:12 2007 -0700 + + Add new fb symbols to wfbrename.h. + + Avoids crashes when wfbComposite calls the wrong image_from_pict. + +commit 567b5bf765254a4ae9cc7711bb6acfa89a9fd61c +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Tue Jun 5 20:26:49 2007 -0400 + + Delete fbCompositeCopyAreammx() + +commit 49ed31c0b323dd8c5887a803c199875e6f2330d8 +Author: Søren Sandmann Pedersen <sandmann@redhat.com> +Date: Tue Jun 5 17:44:21 2007 -0400 + + Remove most of the fast-path MMX operations from fbmmx. fbCopyAreammx + + and fbSolidFillmmx are still needed by other code. + +commit dfbe32b5b828cc4e3da36a0e2e6ad641164eaa5e +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Jun 4 18:07:00 2007 -0400 + + Remove the old Kerberos 5 authentication code. + + Before you complain, this code hasn't seen material change since at least + X11R6. It certainly does not build with any modern version of Kerberos. + Anybody wanting krb5 auth to their X server should probably be using + GSSAPI instead of internal krb5 API anyway. + +commit 793470a8356976ddd427280a738dfb6e1c0e4e70 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Jun 4 12:33:49 2007 -0400 + + dix: fix null pointer dereference in new resource lookup function. + +commit 75dece08fb72803d5116e6776e9f1534ff20e37b +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Mon Jun 4 09:09:20 2007 -0400 + + xf86PostMotionEvents[P] calls xf86SendDragEvents, xf86SendDragEvents + unconditionally checks device->button->buttonsDown. + + Let's make it possible to have a device with motion, but no buttons. + + Without segfaulting. + +commit fbb9b203950e9d0e82574cde5b3e006b0e6b404f +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Mon Jun 4 06:59:42 2007 -0400 + + Let's not do a calloc and a free on every call to xf86PostMotionEvents. + +commit 3f4295e643ca56c40f33af7966e8efd367ef8749 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Mon Jun 4 06:48:06 2007 -0400 + + Add xf86PostMotionEventP, takes a pointer instead of a variable number of + arguments. + + Bump input ABI to 1.1 since we export this. + +commit a4f3473c88370b8411e016ebab619cffd33e58f9 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Mon Jun 4 06:39:02 2007 -0400 + + Fully init the AbsoluteClassRec in InitAbsoluteClassDeviceStruct. + (Specificly, we were missing the screen field.) + +commit 0cbc3a4da2ddb6e4f30f60d2bc7f405d31aa554a +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Mon Jun 4 02:03:44 2007 -0400 + + Print the build time as well as the date if we can. + +commit 9a7aaeb3f6ff79af60fde91cd0575a54ba0b9587 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon May 28 13:54:16 2007 +0300 + + XFree86: Input: Assume core events per default + + Assume that a device will be sending core events, unless explicitly + specified otherwise. + +commit 94361cbba7f866144691f6f5e9251a550e0e0cb8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon May 28 13:54:47 2007 +0300 + + XFree86: Input: Perform case-insensitive comparisons on option names + +commit e5ce982381c4092252d6b55fcefcc9a3cd21e656 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Sun Jun 3 09:40:37 2007 +1000 + + Include pixman.h from fb.h or compile of some files will fail + + Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> + +commit 90eb22656c34d2d08a8dccaf05e6d081c56bd7f3 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Jun 2 16:49:26 2007 -0400 + + Minor cleanup/robustification to config parsing. + +commit f6a983533bdc84752562ef0be25b320678bf08a1 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Jun 2 16:37:39 2007 -0400 + + Don't warn about default behaviour when autoconfigging. + +commit 21e8f4eb02842f877336db08c332d8ee4a381ee0 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Jun 2 16:13:01 2007 -0400 + + Don't print lack of DRI support as an error in AIGLX init. + +commit 0e1384d8318637f75d04d3d1b7600f7cad40117e +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Jun 2 16:07:20 2007 -0400 + + Delete VDIF support; it was never used anyway. + +commit 66702f3c1c6c884e83744c72da173cc32f22b2f4 +Author: Henry Zhao <henryz@localhost.localdomain> +Date: Fri Jun 1 23:55:40 2007 -0700 + + Need to use minPitch in miScanLineWidth() to get the shrinked + linePitch. + +commit 26b21157cf934ae387b15faa9ebb060120e6a0d6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 31 17:05:14 2007 +0930 + + Add a deviceMask to the GrabRec and don't interfere with passiveGrabs. + + This quickfixes event delivery problems with XI events when a grab was on. + deviceMask is only used when the grab was from a ButtonPress to preserve + potential XI event masks. + + This is not an ideal solution but it works until I have time to work on + PassiveGrabs. + +commit fa877d7ff25c4ec45288e1fea70d4f5e1baf3ef3 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed May 30 13:06:45 2007 +0100 + + Fix mode validation against the maximum X/Y values configured + at server startup, and not against the virtual X/Y parameters + as they can change. + + This fixes an issue when canGrow is TRUE and modes get dropped + when using the virtual X/Y parameters. + +commit 182ab3a3d5b28daa86e6d6155e76ce759687ae6d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 30 17:44:31 2007 +0930 + + Fix up comments for event.c + +commit b5db863945fa8045995b3bf742c44e40f2650f04 +Author: Paulo Ricardo Zanoni <prz05@c3sl.ufpr.br> +Date: Wed May 30 16:15:15 2007 +0930 + + Allow value None for windows when setting ClientPointer. + + We need this for clients that need to set the ClientPointer but don't have a + window on display yet. If used, it will set the device as the ClientPointer + for the requesting client. + +commit 99eae8bea6724a24477375ad5b2d31cc4883cf6b +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Tue May 29 22:04:36 2007 -0400 + + I/O enable/disable update for the Hurd + +commit 3c6f1428489c1f71acd41066ea73ef4ae7c60f17 +Author: Julien Cristau <jcristau@debian.org> +Date: Tue May 29 22:01:30 2007 -0400 + + Make sure that the ramdac symbols are present in the server + + The former ramdac module is now built into the server, so its symbols need to + be explicitly exported to drivers (Debian #423129). + +commit ee20c481eede0954f4a8bef5113979b101863c32 +Author: Matthieu Herrb <matthieu@deville.herrb.com> +Date: Tue May 29 14:54:27 2007 -0600 + + Remove wscons keyboard handling stuff that doesn't belong there anymore. + +commit 60de6c7ef9bdcee043f63e8e0d493e6feba6a9d0 +Merge: 3a6549a 2f13b7c +Author: Matthieu Herrb <matthieu@deville.herrb.com> +Date: Tue May 29 12:14:49 2007 -0600 + + Merge branch 'master' of ssh://herrb@git.freedesktop.org/git/xorg/xserver + +commit 3a6549a163aba26bf4ac58b050c493fba0df14c6 +Author: Matthieu Herrb <matthieu@deville.herrb.com> +Date: Tue May 29 12:14:23 2007 -0600 + + Make this build on OpenBSD + +commit 2f13b7c113c17239e382dd3640e9c29201d8ab1f +Author: Drew Parsons <dparsons@debian.org> +Date: Wed May 30 02:13:36 2007 +1000 + + Update Xprint build for pixman. + + Xprt links libfb, which now uses pixman. Update configure.ac to + require module $PIXMAN for XPRINT. + Also, use $(top_builddir) to reference libfb.la and other local + libraries, rather than using the relative reference ../.. + +commit ba0b7d47ab0c24d5a29228f8af583044060464bd +Author: David Nusinow <dnusinow@debian.org> +Date: Mon May 28 21:57:04 2007 -0400 + + Fix for GNU/kFreeBSD + +commit 2267bf48b385c93243e26c3bb84ebb04c7fdb39f +Author: Bastian Blank <waldi@debian.org> +Date: Mon May 28 21:55:05 2007 -0400 + + Fixes for s390 + +commit 857ddbb660a21cad1c16f4fb2dc8a904d6655304 +Author: Eugene Konev <ejka@imfi.kspu.ru> +Date: Mon May 28 21:53:02 2007 -0400 + + Allow configurable serverconfigdir for security policy location + Allow the location of the SERVERCONFIGdir variable to be defined at + compile-time. This allows us to specify where the security policy will be + located (Debian uses this to put it in /etc). The default is to the + previous location. + +commit 78d01d1008973899d931ef44b47d5f0b5f220b0d +Author: Gerhard Tonn <gt@debian.org> +Date: Mon May 28 21:48:58 2007 -0400 + + Miscellaneous fixes for S/390. + +commit d98bd4bf908c2c51fcfd3a4c3230de17f2567244 +Author: Branden Robinson <branden@debian.org> +Date: Mon May 28 21:44:59 2007 -0400 + + Overhaul xorg.conf manpage + + Major stylistic cleanups, greatly expanded cross-reference ("SEE ALSO") + section and some typo fixes. + + This patch by Branden Robinson. Forward-ported by Fabio M. Di Nitto. + +commit 6bf8d5019313ee2251a44dfb7ad3435a3c6db7eb +Author: David Nusinow <dnusinow@debian.org> +Date: Mon May 28 21:42:10 2007 -0400 + + Read ROM in chunks + This patch speeds up reads of the ROM by reading in large chunks rather + than one byte at a time. This patch was by Dann Frazier. + +commit 6fdd134a0c3e6fdde9b089100e8783705c9cc6ac +Author: David Nusinow <dnusinow@debian.org> +Date: Mon May 28 21:39:12 2007 -0400 + + Fix up xnest manpage + I believe this patch was originally by Branden Robinson + +commit 6a870992d81a6bacfa9d313c15784fdb281d474f +Author: Keith Packard <keithp@dulcimer.keithp.com> +Date: Fri May 25 20:33:08 2007 -0700 + + xf86XVFillKeyHelper assumed root clip never changed. + + When the root window changed size, xf86XVFillKeyHelper would not revalidate + the GC, leaving the clip at the old size causing lossage (and possibly + memory corruption if the screen and frame buffer shrank). + + Fixed by just using a scratch GC; saving memory, eliminating bugs and + shrinking the code. + +commit 3c982bc1a49509dda7bc469b0eced44df02755b3 +Author: Luo Jie <luojie@nlsde.buaa.edu.cn> +Date: Thu May 24 11:13:03 2007 -0700 + + Reinstate an apparently mis-deleted ';' from a for loop with no body. + + Fixes an error returning "No core keyboard" with multiple keyboards. + +commit 4d7469f75fadfc4a59664e88e18eb304203670f4 +Author: Luo Jie <luojie@nlsde.buaa.edu.cn> +Date: Thu May 24 11:04:06 2007 -0700 + + Fix a typo in using memcpy in xwin. + +commit 0b988450462ddb005311e68502357baf272e6371 +Author: Luo Jie <luojie@nlsde.buaa.edu.cn> +Date: Thu May 24 11:02:28 2007 -0700 + + Fix os/utils.c compile with mingw. + +commit 1f48995d66c0072caa7e5ce2845be642221dd56d +Author: Luo Jie <luojie@nlsde.buaa.edu.cn> +Date: Thu May 24 11:01:15 2007 -0700 + + Fix build of composite, dix, and randr when Xinerama is disabled. + +commit 8f98be7db303bc3db650054efb86843c70114451 +Author: Eric Anholt <eric@anholt.net> +Date: Thu May 24 11:00:04 2007 -0700 + + Fix bswap detection on BSD (mis-added '_' in function names). + +commit 9616a042855399f0ee9c6489ea824621ea5fee18 +Author: Matthias Drochner <drochner@netbsd.org> +Date: Tue Apr 10 16:15:40 2007 -0700 + + Fix build on NetBSD/amd64. + +commit ddb26bccd275f4fc011f7a2be685d1ce58555a00 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu May 24 12:20:24 2007 -0400 + + dix: Add a bunch of new access codes. + + These were determined through an analysis of the core protocol and 35 of + the most common protocol extensions. There remain four bits for future + use. + +commit 649e7f82d8d4333443493056b81eb20d6cf022bc +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu May 24 12:10:05 2007 +0200 + + Consolidate portPriv->pDraw assignments into xf86XVEnlistPortInWindow. + + This avoids a crash in xf86XVReputVideo and also cleans up the code slightly. + +commit 047bf3349bb697c73c95729a8bbf15f72605901f +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed May 23 16:56:05 2007 -0400 + + Delete trapezoid rendering code; replace with pixman calls + +commit 9d87ef4e0dff40ea39f1b209c67b90079fc79065 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed May 23 15:50:25 2007 -0400 + + - Make image_from_pict() non-static + - Delete fbedge.c and fbedgeimp.h + - Use pixman_rasterize_edges() in fbtrap.c + +commit 2a960c442bd7560630f52b55d82ec0517542ee5a +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed May 23 13:08:26 2007 -0400 + + Port renderedge.c to pixman + +commit 3ba3ede9bbdfc6376b6f6e0b6ce8280a05e6584d +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed May 23 12:56:04 2007 -0400 + + Add missing offsets for window coordinates - reported by Colin Harrison + +commit 2a4aa63a23ddd816b647b851a01865861827a7eb +Merge: 9cee4ec cc648e6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue May 22 14:50:26 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + include/miscstruct.h + +commit cc648e609d472472bac4a2e568eb3598b3690ba3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue May 22 10:51:56 2007 +0200 + + EXA: Export ExaOffscreenMarkUsed. + + Can be used to inform EXA that an offscreen area is used outside of EXA. + +commit e6a7198e7cd96f1fe0654cc6811a977821579258 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue May 22 10:51:55 2007 +0200 + + Bug #8991: Add glXGetDrawableAttributes dispatch; fix texture format therein. + + Adapted to master branch by Michel Dänzer <michel@tungstengraphics.com>. + +commit 6324bfc468f7a645d2fee59f1c921a4328a4639f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue May 22 10:51:53 2007 +0200 + + AIGLX: Zero-copy texture-from-pixmap. + + When available, use the 2D driver texOffsetStart hook and the 3D driver + setTexOffset hook to save the overhead of passing the pixmap data to + glTex(Sub)Image. + + The basic idea is to update the driver specific 'offset' for bound pixmaps + before dispatching a GLX render request and to flush immediately afterwards + if there are any pixmaps bound. This should ensure that the 3D driver can + use pixmaps for texturing directly regardless of the X server moving them + around. + +commit 5006d08d7fc56d3d380cc6b75297f94e8594eb54 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue May 22 10:51:52 2007 +0200 + + DRI: Add TexOffset driver hooks. + + To be used by AIGLX for GLX_EXT_texture_from_pixmap without several data copies. + + The texOffsetStart hook must make sure that the given pixmap is accessible by + the GPU for texturing and return an 'offset' that can be used by the 3D + driver for that purpose. + + The texOffsetFinish hook is called when the pixmap is no longer being used for + texturing. + +commit ff2eae86b6a8760befbbc5d605debebe7b024c05 +Author: David Nusinow <dnusinow@debian.org> +Date: Mon May 21 19:50:04 2007 -0400 + + Fix boolean thinko that prevented working without a server layout + +commit 56fd92715567cd32e4b725b3791de9ac4e3879aa +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Mon May 21 20:00:25 2007 -0400 + + Remove fast path code from fbpict.c + + Remove the various fast path functions from fbpict, and instead use + pixman_image_composite(). + +commit d0e8f474099dea40bbea555427772724ccb787d1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 21 13:06:21 2007 +0930 + + Change GrabDevice's parameter name back to "coreGrab". + Was changed during a global search/replace for + 5c680e94938c16e04a4349715cf11796b80400db. + + Otherwise people like me introduce bugs (e.g. in + 333bab4b235801efd2b2de5b60df5b0c44048d3e) + +commit 167e1773de0fb566559d4362ff929eedcdb6d055 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 21 10:45:10 2007 +0930 + + Remove unused include "gestr.h" + +commit 7e2c935920cafadbd87c351f1a3239932864fb90 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Fri May 18 20:06:14 2007 +0200 + + Add a new IDLETIME system sync counter. + + This counter exposes the time in milliseconds since the last + input event. Clients such as screen savers and power managers + can set an alarm on this counter to find out when the idle time + reaches a certain value, without having to poll the server. + +commit 756acea23a0cc56c470bcd77c6f5638d923ab3d1 +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Fri May 18 13:39:12 2007 -0400 + + Use pixman_image_set_indexed() to make 8 bit work + +commit 7916419a0092b8bf9713c0840f9e969950d7aa85 +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Fri May 18 11:58:24 2007 -0400 + + Comment out setup of general MMX code + +commit 998164bac648756e5b5254aa36e075ae360d3972 +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Fri May 18 11:36:20 2007 -0400 + + Move fbCompositeGeneral() to fbpict.c and remove fbcompose.c + +commit a2e3614eb8f0fa198615df492b03ff36bc9c1121 +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Fri May 18 11:33:11 2007 -0400 + + Break image_from_pict() into a few subfunctions. + +commit c5ef84c325440af5fbdf9f44c3781d99a0392df9 +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Thu May 17 21:31:08 2007 -0400 + + Make the general compositing code create a pixman image and call + + pixman_image_composite(). Leave the general code commented out for now. + +commit 076d070e186afeb416976ae74fbfd50c86db10c5 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu May 17 20:24:18 2007 -0700 + + Use Screen block handler for rotation to draw under DRI lock. + + DRI uses a non-screen block/wakeup handler which will be executed after the + screen block handler finishes. To ensure that the rotation block handler is + executed under the DRI lock, dynamically wrap the screen block handler for + rotation. + +commit 915563eba530c5e2fdc2456cf1c7c3cc09b3add0 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu May 17 20:22:43 2007 -0700 + + Disable all outputs and crtcs at startup. + + Leaving devices enabled during server startup can cause problems during the + initial mode setting in the server, especially when they are used for + different purposes by the X server than by the BIOS. Disabling all of them + before any mode setting is attempted provides a stable base upon which the + remaining mode setting operations can be built. + +commit 0375009a97c2ab7f0e0f0265463d45c0580388c6 +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Thu May 17 12:59:24 2007 -0400 + + Remove excessive unrolling in fbCompositeSrc_x888x8x8888() and fix bug where + the source alpha was used instead of 0xff. + +commit 0b4db74922299df785e6273fdb1bf65c38d36070 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 17 18:00:07 2007 +0930 + + Squish the flags into the upper bits of the mode field for EnterLeave events. + This way we have enough space for the detail field. + +commit 333bab4b235801efd2b2de5b60df5b0c44048d3e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 17 17:59:02 2007 +0930 + + Clean up, correct some comments. + Send event type down with the RawEvents. + +commit bc334286b060bc8d0c829b18acebadf24fbdaf19 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 17 10:36:46 2007 +0930 + + Init device axis with -1,-1 minimum values. + + This is needed to be able to cross to screens located east/north of the + current active screen. + +commit 546465ee6aa6584780aec6357f32d205c807ae71 +Author: Soren Sandmann Pedersen <sandmann@redhat.com> +Date: Wed May 16 17:42:04 2007 -0400 + + Make fbFetch_b8g8r8() actually write the read value to the buffer + +commit 0fcd17c9181901c419cc32bc24c07fe5a6934d81 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue May 15 17:59:13 2007 -0400 + + Use pixman short formats, revert the gradient_stop change + +commit f4c1d5fc28a5a7fe2592505350f9e2331f6049b7 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue May 15 17:12:22 2007 -0400 + + Use pixman types for transforms and vectors + +commit f2e30e7d0a1d075e7e83c5b5ceca9e4752951138 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue May 15 16:51:21 2007 -0400 + + Use the pixman fixed point types and macros + +commit 3da842bf930d7875599ca0c06cb4a09cfa987ac5 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue May 15 14:57:14 2007 -0400 + + Revert various fast path functions to their pre-pixman-merge state + since they fail rendercheck. Remove their associated macros. + + See bug 10903. + +commit 1568b6b6a0d7337f29c7b87cc46ae64b3b0f8fdf +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Sat May 12 20:33:23 2007 -0400 + + Port large amounts of the region code to pixman + +commit dde0ceac4ea7639d0096bfd26f37c5851778854c +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Sat May 12 17:41:47 2007 -0400 + + Add new InitRegions() function called from dix/main + +commit e037052ac522150786abf44d3a04c813cc490050 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Sat May 12 16:58:54 2007 -0400 + + Turn boxes and regions into typedefs for pixman types + +commit 8e56f5be4b70773c899f01b9ccd2e88d523327e4 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri May 11 11:45:37 2007 -0400 + + Add dependency on pixman 0.9.0 + +commit a8c56372ba8aa36bac09877c478ff53ea5358df7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 15 10:24:22 2007 +0930 + + Revert "Allow events to grabWindows event if the device is not grabbed." + + This reverts commit 339b73e710a0920608a3fbcb20b406f0f6c4e0f6. + Allowing those events can lead to race conditions. + + Conflicts: + + dix/events.c + +commit 81fc6a128b64ad412064405ed45db0175398e3f0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 14 18:12:56 2007 +0930 + + Add ungrab support to ExtendedGrabDeviceRequest handling. + Polish the code a bit. + +commit 5c680e94938c16e04a4349715cf11796b80400db +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 14 12:34:53 2007 +0930 + + Remove double-grab option. We only want one grab per device. + +commit 4dc973f08c54294e06bc831bd2839fd3aa24ecfb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon May 14 10:42:03 2007 +0930 + + Add ExtendedGrabDevice handling. + Add XGE handling in DeliverGrabbedEvent. + + We can now grab something selecting XGE events, but the current code is a + bit messy and doesn't work too well yet. + +commit a277f04ab08514462b7f10b4dd92eb326af85501 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed May 9 22:03:12 2007 -0400 + + Remove mfb and cfb from include paths where they're not needed. + +commit 20c5250e487e032d392e2e4624021fccb1bfb72c +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed May 9 21:49:44 2007 -0400 + + Use system copy of cbrt() if available. + + Also move the replacement inline into miarc.c, since that's the only user. + +commit 8dcc37520d5e8c8b52cee81faa67fd5205548377 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed May 9 18:57:05 2007 -0400 + + Use _X_INLINE instead of ad-hoc #defines. + +commit 6ff239cb4e67c0a2ea497a1714e5585c1d941af3 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed May 9 18:38:33 2007 -0400 + + Make the use of ICEIL slightly less ugly. + +commit 178d426311bb3c7160f72b5d95b0a137eda09ba9 +Author: Colin Harrison <colin.harrison-at-virgin.net> +Date: Fri May 11 10:08:42 2007 +0100 + + Missing piece from bug 9808 + +commit ebaa6c920c82401952a0ccc991b94574306449bd +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu May 10 15:25:31 2007 +0200 + + Disable Simba PCI bridge routing code (Bug #8020). + + The code in hw/xfree86/os-support/bus/sparcPci.c:simbaCheckBus() + is trying to mimmick VGA routing by disabling I/O space responses + behind the Simba PCI-PCI controller. + + Unfortunately, doing this also happens to disable access to the + IDE controller I/O space registers, thus crashing the system. The + granularity of the I/O disabling in the Simba controller is not + fine enough to disable VGA without also disabling the IDE controller + registers. + +commit 86c4941727f7c673ae6bb88c67443fa25935c7f5 +Author: Colin Harrison <colin.harrison-at-virgin.net> +Date: Wed May 9 16:55:27 2007 +0100 + + fix an occasional crash in GetWindowName() (bug: 9798) + +commit be44018a3c6172caf3e91c36ea321420d104e79f +Author: Colin Harrison <colin.harrison-at-virgin.net> +Date: Wed May 9 16:55:09 2007 +0100 + + Fix bad use of hwnd (bug: 9808) + +commit d3248b66a650c6c629cd66240e25004869217d2e +Author: Colin Harrison <colin.harrison-at-virgin.net> +Date: Wed May 9 16:54:46 2007 +0100 + + Migrate some code to the new mi apis + +commit 021e5df85d7c9373a2fed55512751d16e08128db +Author: David Nusinow <dnusinow@debian.org> +Date: Mon May 7 21:03:40 2007 -0400 + + Add more informative logging for module default loading + + When the modules section is parsed, if a module is set to be loaded by + default, this will be logged. If it is redundantly specified in xorg.conf, + this will also be noted. None of this logging will happen if the xorg.conf + lacks a modules section. + +commit 1b3a0508a7aee1c7b14cd62216b4727fcc9181d4 +Author: Jesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com> +Date: Sun May 6 01:30:59 2007 -0700 + + Fix documentation for Copy hook -- it can copy memory to the scanout + buffer too. + +commit 030a578391c634bc68add6ada3f251cf3f8c3069 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu May 3 22:51:07 2007 -0400 + + Provide UseDefaultFontPath option + + This provides a new option, UseDefaultFontPath. This option is enabled by + default, and causes the X server to always append the default font path + (defined at compile time) to the font path for the server. This will allow + people to specify additional font paths if they want without breaking + their font path, thus hopefully avoiding ye olde "fixed front" problem. + + Because this option is a ServerFlag option, the ServerFlags need to be + processed before the files section of the config file, so swap the order + that they are processed. + +commit e91b9ddc7aa95abc2d4d314e8db204860771a099 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu May 3 22:00:23 2007 -0400 + + Improve modules loading defaults + + Provide default modules that may be overrided easily. Previously the + server would load a set of default modules, but only if none were + specified in the xorg.conf, or if you didn't have a xorg.conf at all. This + patch provides a default set and you can add only the "Load" instructions + to xorg.conf that you want without losing the defaults. Similarly, if you + don't want to load a module that's loaded by default, you can add "Disable + modulename" to your xorg.conf (see man xorg.conf in this release for + details). This allows for a minimal "Modules" section, where the user only + need specify what they want to be different. See bug #10541 for more. + + The list of default modules is taken from the set loaded by default when + there was a xorg.conf containing no "Modules" section. + + A potential problem for some users is that some users disable a module, + most notably DRI, by commenting out the "Load" line in their xorg.conf. + This needs to be changed to an uncommented "Disable" line, as DRI is + loaded by default. + +commit d2f813f7db157fc83abc4b3726821c36ee7e40b1 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed May 2 19:10:22 2007 -0400 + + New fbWalkCompositeRegion() function + + This new function walks the composite region and calls a rectangle + compositing function on each compositing rectangle. Previously there + were buggy duplicates of this code in fbcompose.c and + miext/rootles/safealpha/safeAlphaPicture.c. + +commit e0959adcd8df2c61e98e76e708fceef9c7cd54eb +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue May 1 13:41:48 2007 -0400 + + Add fbCompositeRect() as another special case in the switch of doom in fbpict.c + + This is phase one of getting the two region walkers in fbcompose.c and + fbpict.c merged together. + +commit cb22bdbe678a9948eda75d464d6701a729664ef0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu May 3 10:05:58 2007 +0930 + + Add selected RamDac functions to xfree86LookupTab. + + Adding those makes drivers for s3 and tga work again. + +commit c1e1d6b98a6708860e5b5f6e21d8d5b1d8ce9075 +Author: Brian <brian@yutani.localnet.net> +Date: Wed May 2 15:55:40 2007 -0600 + + In __glXCreateARGBConfig(), insert the new GL mode at the _end_ of the linked list. + + Previously, the new mode was added at the head of the list. This caused the + positional correspondence between modes and the XMesaVisuals array to be off + by one. The net result was GLX clients failing when they tried to use the + last GLX mode/visual. + + We still have the problem of DRI drivers not being able to use the extra + mode/visual introduced by __glXCreateARGBConfig(). glXCreateContext fails + with BadAlloc if it's attempted. This is also the source of the often- + seen warning "libGL warning: 3D driver claims to not support visual xxx" + Look into fixing that someday... + +commit bd0abb2844ef9faf28703e592cfebb886004234c +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Wed May 2 17:20:48 2007 +0200 + + Bug #10823: Fixed default OSNAME value. + + We try to get OSNAME from uname by default now. + +commit 71fc5b3e9309182978ead676965d65ca93a4e3b9 +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 2 11:41:11 2007 +0200 + + Fix for a divide by zero that can be triggered by a malicious client. + + Problem reported by Derek Abdine of rapid7.com. Thanks. + +commit c03d9a7217f9895feed8cfed3ede4752faf6187c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 2 18:16:40 2007 +0930 + + Cleaning up a bit. + + Register correct event in EventSwapVector. + Fix up event swap for GE events, register XI's swap function at GE. + +commit e6fd4a24ebd205013b41e44aacbbfb847709d2fd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 2 17:49:20 2007 +0930 + + Add handling for FakeDeviceEvent request. + Fix a stupid bug from last commit, mask names were wrong. + +commit af25720598bb35d9d953ac8d9a07528289ebfb4a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 2 13:51:16 2007 +0930 + + Add missing files for ProcXiSelectEvent. + + Should have been a part of 5e439109292e54b5c4d1a7bc7b6ac0e42ee285f7. Oh well. + +commit 58c0fd29272fb6c2f193cff82fb0b0573c607eec +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed May 2 13:50:09 2007 +0930 + + Adjust EQ to support long events. + Add RawDeviceEvent (pointers only for now). + + This commit changes the event queue to use EventLists instead of xEvent + arrays. Only EQ is affected, event delivery still uses xEvent* (look for + comment in mieqProcessInputEvent). + + RawDeviceEvents deliver driver information to the client, without clipping or + acceleration. + +commit 0214d0b96a9b900a8cf5c7f2183add3a411441f3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 1 15:49:41 2007 +0930 + + Start devices after windows are initialized. + + This fixes the hotplug segfault introduced with the multihead changes and + cleans up the code a bit as well. + +commit 11d0e2109b699714055e263e8963f2c39eded28b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 1 14:16:36 2007 +0930 + + Correct enterleave semaphore value for root window. + +commit 8b42ba64e169a35df2a90528dcb0cd06be0f67a1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 1 12:12:58 2007 +0930 + + Send PointerKeyboardPairingChangedNotifyEvent using XGE. + + Needs updated inputproto and libXi. + +commit 325380adb20ec2b82e176d75599fd4bc97a3b918 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 1 11:02:05 2007 +0930 + + Check and re-set paired devices when initializing sprites. + + If we don't do this, a device that is paired before a sprite has been + initialized for the paired device will not actually get the right sprite and + segfault the server on focus events. Happens for the VCK. + +commit b043a184509cfe5c4c4691ecde1a4a065e53d575 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue May 1 09:54:33 2007 +0930 + + Check VCP's and VCK's ids when searching for a new device id. + + Both VCP and VCK are not in the inputInfo.devices list anymore, so we need to + check them separately. If we don't do this, we end up re-using ids 0 and 1, + causing all sorts of grief for clients. + +commit 873ef75b1e8c94d39670c981c4d830ab8bcc018b +Author: Colin Guthrie <gmane@colin.guthr.ie> +Date: Mon Apr 30 10:33:12 2007 -0600 + + fix __glXErrorCallBack() proto + +commit 6b33459bf5aac23c3ecc7002d091c02f327d907a +Merge: 18252a5 3c91a99 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 30 10:26:19 2007 -0600 + + Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/xorg/xserver + +commit 5e439109292e54b5c4d1a7bc7b6ac0e42ee285f7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 30 12:57:42 2007 +0930 + + Add GenericEvent extension to Xext. + + This adds (unconditional) support for the GE extension. Anything from now on + that sends events in MPX will have to use the GE extension. No GE, no MPX + events. GE is not actually used yet from anywhere with this commit. + + You will need to update x11proto, xextproto, libX11, libXext and xcb to the + matching xge branches. Things will _NOT_ work without the updated protocol + headers and libraries. + +commit 3c91a993e8c752002adf85c317216e1487c20780 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:49:41 2007 +0200 + + EXA: Fix OffscreenValidate build with DEBUG_OFFSCREEN enabled. + +commit a261e1325057974d58440812b93c00c0caa4423a +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:49:35 2007 +0200 + + EXA: Remove DrawableDirty. + + Convert the remaining callers to PixmapDirty. + +commit b1b6674a919943a8ac37e54d02e8d0d23a642b1d +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:49:28 2007 +0200 + + EXA: FillSpans improvements. + + * Don't need to track damage. + * Always migrate for fallbacks. + +commit 584697a2231ac782f362a925e1489c15483a8791 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:49:09 2007 +0200 + + EXA: SolidBoxClipped improvements. + + * Centralize handling of fallbacks and damage tracking. + * Always migrate for fallbacks. + +commit 982d7c2c0b948ba04c8eefa475d660981e6ed9f9 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:48:59 2007 +0200 + + EXA: CopyNtoN improvements. + + * Centralize handling of fallbacks and damage tracking. + * Always migrate for fallbacks. + +commit d2245386eed200e77a8c84bdda36ab29e39fd593 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:48:31 2007 +0200 + + EXA: GetImage improvements. + + Only migrate when appropriate. In particular, don't migrate to offscreen in the + no-fallback case as copying from system memory should usually be as fast if not + faster than DownloadFromScreen, in particular if the bits need to be uploaded + to offscreen first. + +commit 0880aaac9c83019fec2e3d32871f74c7a407f8b3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:48:19 2007 +0200 + + EXA: PutImage improvements. + + * Migrate for fallbacks when appropriate. + * Add damage tracking in ExaCheckPutImage. + +commit 7fca16901187ade48e83e6a2684ef464b1912357 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:48:11 2007 +0200 + + EXA: ImageGlyphBlt improvements. + + * Don't waste effort on invisible glyphs. + * Only track damage for bounding box instead of each glyph separately. + * Always migrate for fallbacks. + +commit a8d6ebdf9338dc2f6ff9a532e6fec460a70d3b1e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:47:53 2007 +0200 + + EXA: Defer to FillRegionTiled in Composite when possible. + + Committed separately as this case is hard to hit and has only been tested + lightly. + +commit 81b055605c34b5823f6c5f63cc0f92f43c6b7252 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:47:43 2007 +0200 + + EXA: Composite improvements. + + * Defer to simpler hooks in more cases (inspired by XAA behaviour). + * Move damage tracking from lower to higher level functions. + * Always migrate for fallbacks. + +commit ce317a5b76c053f449122c46e1372bf8e067cb4c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:47:16 2007 +0200 + + EXA: Glyphs improvements. + + * Don't waste effort on invisible glyphs. + * Add damage tracking where necessary. + * Always migrate for fallbacks. + +commit 0c8905ebc91cf654facef84ee52231a358deec5c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:47:08 2007 +0200 + + EXA: PolyFillRect improvements. + + * Convert rects to region and use it for damage tracking. + * When possible, defer to exaFillRegion{Solid,Tiled} using converted region. + * Always migrate for fallbacks. + * Move damage tracking out of ExaCheckPolyFillRect. + +commit 567f18a09bfb05f448be40c7ebe0f210f955601c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:46:49 2007 +0200 + + EXA: FillRegion{Solid,Tiled} improvements. + + * Support planemasks, different ALUs and arbitrary tile origin. + * Leave damage tracking and non-trivial fallbacks to callers. + * Always migrate for fallbacks. + + This is in preparation for using these from more other functions. + +commit e869573b52fac69fb88cea120daaeec59c7a3461 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:45:48 2007 +0200 + + EXA: exaAssertNotDirty improvements. + + * Return early if the valid region is empty or the pixmap is pinned. + * Fix loop for several cliprects. + +commit d3f8667341bfe6dc7d0258c4ad69377f37d88d95 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:44:27 2007 +0200 + + EXA: Fix exaEnableDisableFBAccess for nested disables and enables. + +commit 5e4b3232dafe3b0dec65bf639bebaba4774210b7 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:38:22 2007 +0200 + + Fix fbCompositeTrans_0888xnx0888 build for wfb on big endian. + +commit 2866e0bac9b8dd3892c5e68abcfc6c97cebaf88a +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Apr 29 23:38:13 2007 +0200 + + Fix a couple of picture repeat fields incorrectly compared to RepeatNormal. + +commit 78a20455356ccc310f73cfc65ad65a7677eee7e5 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 27 15:20:24 2007 -0400 + + Pixman merging + + More msvc++ porting + +commit 6c4f1826bf2c5f30f5fe6e489a02b6375478b380 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 27 08:13:08 2007 -0400 + + Bug fix in fbCompositeIn_nx8x8888 + + Make sure both halves of the dst word is set to zero when the masks + are both 0. + +commit f28eea0647f007c2e2415ecc6fceef46201faad4 +Merge: 339b73e ae04f2c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 27 16:34:36 2007 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + dix/devices.c + dix/events.c + +commit 339b73e710a0920608a3fbcb20b406f0f6c4e0f6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 27 13:24:27 2007 +0930 + + Allow events to grabWindows event if the device is not grabbed. + + This kinda makes popup windows useable if the WM doesn't set the + ClientPointer. Kinda. + +commit ae04f2cb0a068cdc1e519627bf745de0c9e4a85a +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Apr 26 15:28:04 2007 -0400 + + Fix the 'relink' target for kdrive servers. + +commit 6c8152d6ee9eeb21a68a8bbfed1540939e5bcd1f +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Apr 26 14:59:04 2007 -0400 + + Remove old edid_modes.c, it lives in hw/xfree86/modes/ now. + +commit 2208c6087d6bffcb24a30891a56430e28735874c +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 14:40:30 2007 -0400 + + Change expand_alpha_rev to expand_alpha in mmxSaturateU + +commit a300ef84cee26febfbe08c497d0d063588130bdd +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 14:37:53 2007 -0400 + + Fix typo in previous commit + +commit 0ebe48be59368b55c618f60d4656300bd7f52ed9 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 14:36:32 2007 -0400 + + Pixman merge + + - Changes to support MS Visual C++ + + - use inline instead of __inline__ + + - Fix rounding errors (Billy Biggs, from xserver via pixman) + +commit 4fe918b38553133c27e5ae672e5c43984a9bbaea +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 12:41:01 2007 -0400 + + Fix bug 8871 - scrolling corruption with a compositing manager + + Call miHandleExposures() in CopyArea/CopyPlane explicitly in cw to + generate GraphicsExposes correctly. + +commit 0ff7c94fcf6497ee8575f81cf97eeeb3a857739e +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 10:56:02 2007 -0400 + + Pixman merge + + Make use of fbCompositeSrcAdd_8888x8x8mmx + +commit 701ccb4a22cfd646ccb7f19b7b3a476aeb5ce2da +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 10:49:06 2007 -0400 + + Pixman merge + + - Remove stray default label + + - Integrate new MMX ops SolidMaskSrc_nx8x8888mmx, In_8x8mmx, and + In_nx8x8mmx + + - Formatting changes to reduce diff noise + +commit a54ef54db19dcd36ed86b33cff2bc369f9690a15 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 10:24:25 2007 -0400 + + Pixman merge + + Make sure fbCompositeSrc_x888x8x8888mmx and fbCompositeSrc_8888x8x8888mmx + are used when possible. + +commit 3571b8e65b0857322d12e291305cfe29ea497c3c +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 26 09:45:11 2007 -0400 + + More pixman merging + + - Move some code around to minimize diff noise + + - Add mmx ops from pixman that never made it into X + + - Merge Jeff Muizelaar's bugfixes to fbCompositeSrc_8888x8x8888mmx and + fbCompositeSrc_x888x8x8888mmx. + +commit cfc01115af4136b2dad8218ba6b389513a356a2e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 26 22:18:35 2007 +0930 + + Fix cursor rendering for multi-head. + + Before putting anything on the screen, check if the GC was made for the + ScreenRec we want to render to. If not, toss the GC and create a new one. This + is not the best solution but it does the job for now. Same thing for ARGB + cursors except that it's even uglier. + + Also remember the screen the cursor was rendered to and check for the right + screen in the BlockHandler, SourceValidate and a few others. Only remove or + restore the cursor if we are rendering to the same screen, otherwise we get + artefacts that are both funky and really annoying. + +commit 82f97e1c0cc15b050edc82a8f3b9a423d6cf5fe7 +Author: Paulo Ricardo Zanoni <prz05@c3sl.ufpr.br> +Date: Thu Apr 26 15:58:50 2007 +0930 + + Enable event delivery for multiple heads. + + Requires moving the spriteTrace into the DeviceIntRec and adjusting a few + functions to take in device argument, most notably XYToWindow(). + + Cursor rendering on the second screen is busted. + +commit c0346e57e6d3857994f7af76060c502c2fdea294 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 26 12:02:45 2007 +0930 + + Require inputproto 1.4.2. + + Requirement was introduced with c7e2ba0c9b9b1fc1aed8f91f86471c4c8e650b78. + +commit 67347739b0571b2978468e8088480b105f505ad2 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed Apr 25 14:19:39 2007 -0400 + + Don't treat convolution filters as transformations. + + Some rearrangement of code to get it closer to pixman. + +commit c056ce95d89ef1df57edf47149fc34cd3925496e +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed Apr 25 13:21:47 2007 -0400 + + Port MSVC++ CPU detection code from pixman. (Vladimir Vukicevic). + +commit c19ece1d8c32dc81740a4036a642661f54064e75 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed Apr 25 12:34:19 2007 -0400 + + Integrate optimization from xserver from David Reveman where repeats + + get handled by fbFetchTransformed() rather than in the region walking + code. + +commit 48c73dfc369fdf8f6023436ebe82bb604f76bb80 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed Apr 25 12:09:22 2007 -0400 + + Add function fbCompositeSrcAdd_8888x8x8(), and fix a bug where + + srcRepeat = FALSE would be set in the wrong place. + +commit 66ba3d758a368bf83d75bab8b08bdb6b34925e40 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Wed Apr 25 10:31:38 2007 -0400 + + Various fixes from xserver via pixman (Billy Biggs) + +commit c09e68ce30dabd6b7068b163b9d2382d85d0d0bc +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Apr 25 16:46:26 2007 -0400 + + Paper over a crash at exit during GLX teardown. + +commit 9c80eda826448822328bb678a7d284cc43fffb17 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Apr 25 16:35:04 2007 -0400 + + Disable RANDR's fake Xinerama protocol when there's more than one screen. + + ... in the protocol sense. Xinerama doesn't have any provision for more + than one protocol screen each with its own geometry. + + Red Hat bug #231257. + +commit d322608dc929d5f8cda07a53143a4f28423e0460 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Apr 25 16:29:48 2007 -0400 + + Fix a buffer overrun on machines with excessively large PCI busses. + + Formerly we sized an array with a compile time constant, then initialized + its size to the same constant, but the Linux PCI init code would increase + that "constant". So if you happened to have more than 128 PCI devices, + you'd happily scribble into whatever variables happened to be in .bss + after that array. + + Only really fixed for Linux atm. Other OSes will simply (still) fail to + work on video devices above the 128th PCI device. + +commit 3ba1e8ab6d69566e1a3f8f0eb4605631aeffc8e5 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Apr 24 17:20:14 2007 -0700 + + Include xf86Rename.h in xf86RandR12.h. + +commit 0a2fe443d25b1ca25349aba3f748df986952e20f +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Apr 24 19:02:44 2007 -0400 + + Use READ/WRITE macros for new functions introduced in previous commits. + +commit 7e16da7b78c422f96387502b9cc29eaa1741543f +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Apr 24 18:15:34 2007 -0400 + + Remove #if 0'ed blocks + +commit 18252a515d4989b983a3b7389636045e06d0f246 +Author: Brian <brian@yutani.localnet.net> +Date: Tue Apr 24 14:10:09 2007 -0600 + + bump release date to reflect input code updates + +commit 2d9a7a768747ca39a800475f12c424c298018dc6 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Apr 24 14:46:59 2007 -0400 + + From pixman (Jeff Muizelaar) + + Fix up the fast-path compositing operators; those are useful for + sources without alpha, but can't be used for sources with + alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as + this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would + be nice to optimize fbBlt for common cases involving 8, 16, 24 and + 32bpp. + + From Keith Packard. + +commit fde4a5adf02d3067a064ebf6bdd666aa5784cfe9 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Apr 24 13:30:43 2007 -0400 + + From xserver via pixman (Jeff Muizelaar) + + Add some optimizations from jaymz. Also adds some compile + warnings that will hopefully go awa y as we continue merging. + +commit 13e1d5ea55b0a3b7729316c8e37d3d8fca2075b5 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Apr 24 12:59:18 2007 -0400 + + Fix format vs formatCode in previous commit + +commit 077a5d4555676d5775e990468a697b6890c6d609 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Apr 24 12:57:55 2007 -0400 + + Add functions fbCompositeSrcSrc_nxn() and fbCompositeTrans_0565xnx0565 + from xserver via pixman. Add READ/WRITE and fbFinishAccess as + appropriate. + +commit 09436fb7c38a9819bde770c4c21143591671c4d7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 24 22:52:33 2007 +0930 + + Disable devices before removing, remove unrecoverable devices. + +commit c7e2ba0c9b9b1fc1aed8f91f86471c4c8e650b78 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 24 21:34:47 2007 +0930 + + Use DevicePresence events to tell the client about enabled/disabled devices. + + Include the device id in the event sent to the client. + +commit ce099a9b78195540ec251a6a3dbe26019c1a686d +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 23 12:34:01 2007 -0600 + + fix bug in which maxKeysPerModifier wasn't getting set + +commit b5e1f7869b2f12a1c2baa7f699ae609fc9ad50aa +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Mon Apr 23 14:16:30 2007 -0400 + + Remove #if 0'ed merge leftovers + +commit 84838268b34661d598f8e4856fab355f414930d9 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Mon Apr 23 13:19:54 2007 -0400 + + Gradient fixes + + * Port fix for bug 7685 from pixman. Patch by Carl Worth + + * Add projective version of radial gradient code. + + * Make sure that all Pict*Gradient types have PictGradient as prefix, + since code in various places relies on that. + +commit 38d14e858980a1b0c087344d24bf6aebf755663c +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun Apr 22 18:04:27 2007 -0700 + + Adjust the screen pixmap's dimensions in xf86RandR12ScreenSetSize. + +commit ca784df84e07227a4cc0a1add079884f557b7a00 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Sun Apr 22 16:26:01 2007 -0700 + + Fix unbalanced fbGetDrawable added in commit 0a9239ec. + +commit 55bd8668e7d4100579bcd6c16a804d9f25267070 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 20 14:53:37 2007 -0400 + + Remove #if 0'ed leftovers from merge + +commit 41dd7ab067adde8f66cd9f74c5a6570c325518a5 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 20 14:51:40 2007 -0400 + + Fix gradient walker to not reset needlessly + + Previously the gradient walker was doing excessive resets, (such + as on every pixel in constant-colored regions or outside the + gradient with CAIRO_EXTEND_NONE). Don't do that. + + Carl Worth, from pixman + +commit c1b73f0f2acd56b423b91a04f1e1b3cdcad0069f +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 20 14:34:13 2007 -0400 + + Fixing gradient repeat mode computations in previous patch. From David + + Turner. + +commit 38f718799c68995c2d9a1680355bd55fd925009e +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 20 13:59:11 2007 -0400 + + Remove a few memory references in fbFetchTransformed + +commit 9c4b14d4f6a1fe018acd64789434216cd1560a4a +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 20 13:23:58 2007 -0400 + + Integrate David Turner's gradient optimizations from pixman + +commit cd2c1714eb4946bf7b1fc194fe074f8024a2ec23 +Author: Brian <brian@yutani.localnet.net> +Date: Sat Apr 21 12:40:51 2007 -0600 + + add slang_mem.c + +commit 67545333ec0b08db783e94e9e3ec55873dea19a3 +Author: Brian <brian@yutani.localnet.net> +Date: Sat Apr 21 12:40:33 2007 -0600 + + replace occlude.c w/ queryobj.c + +commit 39bc8bb0fdc854dcf9bbc0857fec84d50fa4f3b2 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Apr 20 14:22:42 2007 -0700 + + Don't call xf86RandR12TellChanged if it doesn't exist. Add some exports to xf86Rename.h. + +commit 3daa5c1a991d659b1386a09e33b044470d489cb3 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Fri Apr 20 09:43:16 2007 -0400 + + Fix pixman bug 5777, patch by David Reveman + +commit 9c2e955f6792e80fb84f848ed9e6ebbfd79f7130 +Author: Brian <brian@yutani.localnet.net> +Date: Fri Apr 20 07:21:19 2007 -0600 + + regenerated to add GL_CLIENT_ATTRIB_STACK_DEPTH (bug 9823) + +commit 96ef0f78438b60436c3940817980a3ab4070c7e8 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Apr 19 17:39:51 2007 -0700 + + Disable SourceValidate in rotation to capture cursor. + + SourceValidate is used exclusively by the software cursor code to pull the + cursor off of the screen before using the screen as a source operand. This + eliminates the software cursor from the frame buffer while painting the + rotated image though. Disabling this function by temporarily setting the + screen function pointer to NULL causes the cursor image to be captured. + (cherry picked from commit 05e1c45ade9c558820685bfd2541617a2e8de816) + +commit 7ca4baffb5569ea12b578a4a3f69e93d272d6c6d +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Apr 19 17:37:18 2007 -0700 + + Was accidentally disabling rotation updates in mode set. + + Setting a mode on an unrotated CRTC was causing all of the rotation updates + to be disabled; the loop looking for active rotation wasn't actually looking + at each crtc, it was looking at the modified crtc many times. + (cherry picked from commit 8b217dee3a6c46b13fc9571a4a9a95bc55686cdb) + +commit 806a537e644d8cc9e53f3ac52efb49453e5aa1fb +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Apr 19 17:49:34 2007 -0700 + + Revert "Suppress software cursor removal during rotated shadow buffer drawing." + + This reverts commit 999b681cf3973af4191506e49cde06963b11a774. + Replacing this with simpler code that just disables SourceValidate + during rotation redisplay. + +commit 0a9239ec258828ec1da6c208634a55fc4053d7da +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Thu Apr 19 18:19:34 2007 -0400 + + Merge David Reveman's gradient optimization patch from pixman + +commit d0e55774e0da641ba85c5173f27f68de27372747 +Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> +Date: Thu Apr 19 11:39:53 2007 +0200 + + libdri: Make sure the new DRIInfo keepFDOpen member is honoured. + +commit e1f0b3e70b696d7ea4cf9e6ed30d751e7fdbc577 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 19 12:00:24 2007 +0930 + + config: Return errors as negative numbers, device ids as positive numbers. + Update dbus-api documentation. + +commit c6972c893359f8fa7631ae674330f3f4f7010ba0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 18 12:10:05 2007 +0930 + + Change dbus 'listDevices' call to not require an argument. + Update dbus-api documentation, plug memory leak on dbus reply error. + +commit d61ed6c8a2823a3532439d5cb9f355129c93f523 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 19 18:08:55 2007 +0930 + + Check for NULL devices in CloseDevice(). + +commit 9c30f7422121a0443c8d612d06181e17d8af9730 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 19 12:00:24 2007 +0930 + + config: Return errors as negative numbers, device ids as positive numbers. + Update dbus-api documentation. + +commit 999b681cf3973af4191506e49cde06963b11a774 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 18 14:33:27 2007 -0700 + + Suppress software cursor removal during rotated shadow buffer drawing. + +commit 28bb34eec63bf3c98f38ba7fc044f6419aaa3307 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 18 13:48:28 2007 -0700 + + Belatedly bump XORG_VERSION for 7.2. + +commit 5d8e8a7f4b3226bffd9e4d6d9326688f475b0183 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Apr 18 13:22:26 2007 -0700 + + Remove libminimi build. + + It appears to have been a leftover of a previous incarnation of the build + system that didn't handle miinitext.c well. + +commit 53fb42e65c2b2ff58a4a324b7f05cff8a587720a +Author: Erik Andrén <erik.andren@gmail.com> +Date: Tue Apr 17 21:34:47 2007 -0700 + + Syncmaster 226 monitor needs 60Hz refresh (#10545). + + I've managed to solve my own bug (#10545) by applying the following + patch to the xserver. + + Please apply. + + <Conspiracy mode on> + This monitor is "Vista Certified". I wonder if this is a pure coincidence... + <Conspiracy mode off> + + With kind regards + Erik Andrén + (cherry picked from commit a63704f14a1d97b9a00fef6fa290e74e51b9732b) + +commit ae75afcb1b5419102c5be10b8826ceed50d2ef5d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 18 12:10:05 2007 +0930 + + Change dbus 'listDevices' call to not require an argument. + Update dbus-api documentation, plug memory leak on dbus reply error. + +commit 9cee4ec5e6e06d23aafb302494b082c77ade4623 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Apr 17 16:01:56 2007 -0400 + + xace: change the semantics of the return value of XACE hooks to allow + arbitrary X status codes instead of just TRUE/FALSE. + + The dix layer in most cases still does not propagate the return value of + XACE hooks back to the client, however. There is more error propagation + work to do. + +commit 47bd311e3dcc501cbb202ce79a55ac32e9db50f2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Apr 17 13:46:55 2007 -0400 + + security: remove debugging code. + +commit 1f06d32ef58749d0f0c062193d237ee98f60e90f +Merge: cf962a8 fc162c6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Apr 17 12:10:22 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + dix/privates.c + +commit b6aec7f6f906a18d13586d63afabf1ee4fbb11c3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 17 16:51:16 2007 +0930 + + Change FocusIn/Out semantics to match Enter/Leave semantics. + +commit 451d5464b4e8a2516b8a4598b3c4eb14656be90e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 17 11:17:04 2007 +0930 + + Change enter/leave semantics for events with detail Notify{Nonlinear}Virtual. + + Core enter/leave events with detail Notify{Ancestor|Inferior|Nonlinear} are + only sent for the first/last pointer to enter/leave. Events with detail + Notify{Nonlinear}Virtual are sent at all times, but not to those windows that + currently have one or more pointers inside their boundaries. + +commit fc162c6cfa06f0b012743d6d79cef45cf0166229 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Apr 16 09:55:58 2007 -0700 + + Allow outputs to be explicitly enabled in config, overriding detect. + + Option "Enable" "True" will force the server to enable an output at startup + time, even if the output is not connected. This also causes the default + modes to be added for this output, allowing even sync ranges to be used to + pick out standard modes. + (cherry picked from commit a3d73ba2cb7e13a6d129cd88d6a7f7d756e2ced2) + +commit c41e3bd713206c0bbd8ab8cef4c83eb7ba7e1c3c +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Apr 16 09:53:42 2007 -0700 + + Use default screen monitor for one of the outputs. + + By default, use the screen monitor section for output 0, however, a driver + can change which output gets the screen monitor by calling + xf86OutputUseScreenMonitor. + (cherry picked from commit f4a8e54caf6b9431711383a39f55a18e7fd654f4) + +commit 97a2c2579c56c304705c934f3b536473645747df +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Apr 16 09:39:47 2007 -0700 + + Using wrong log level in extension to built-in message + + was: typo in built-in module log message + (cherry picked from commit 00cfd1f765895b4d1b2234f3203727a8871b64b0) + +commit deda7791dfa34d0563c8d7fa2a0660ac27e6858c +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 16 11:35:22 2007 -0600 + + remove sources deleted in Mesa + +commit 02d42f344ce020c9b84723671cb9c68d5c064933 +Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> +Date: Mon Apr 16 17:24:53 2007 +0200 + + Changes for single-entity multi-screen DRI. + + The entity (device) has a locking SAREA and a master file descriptor + that optionally isn't closed between server generation. + + The locking SAREA contains the device hardware lock. + Each DRI screen creates an new SAREA containing the drawable lock, + drawable-and private info, the drawable SAREA. + + The first screen optionally shares its drawable SAREA with the + device SAREA. + + Default is to close the master descriptor between server generations, + and to share the drawable SAREA of the first screen with the device locking + SAREA. Thus we should (hopefully) have full backwards compatibility. + + Mesa changes to support single-device multiple screens are pending. + +commit b5823ea3e1ed5a0449d44da05165a46719dcf287 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sun Apr 15 22:59:19 2007 -0300 + + RandR 1.2 spec says CRTC info contains screen-relative geometry. + + Was reporting mode size instead of adjusting for rotation. + (cherry picked from commit e2e7c47a528447e90cff6cf10d2ce457742ef48d) + +commit cc4eb1c7ea1bace7ed69cfd80c99d22933282ae1 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Fri Apr 13 15:04:29 2007 -0300 + + Add quirk for Acer AL1706 monitor to force 60hz refresh. + + This Acer monitor reports support for 75hz refresh via EDID, and yet when + that rate is delivered, the monitor does not sync and reports out of range. + Use the existing 60hz quirk for this monitor. + (cherry picked from commit 1328a288e9030a472a915077160f090d1afd4126) + +commit eba81a0a01f8a61151d8bf9f3d83bda85ca26e73 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Apr 14 18:30:09 2007 +0300 + + glx: move __glXMesaProvider from GLcore module to glx module. + + This treats the GLcore provider similar to DRI provider, using a subset of + XMesa as the GLcore interface. + +commit 6b040b79f0e247b6f2da8f7d239443743e96de67 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Apr 14 18:29:52 2007 +0300 + + glx: drop xmesaP.h include from xf86glx.c + + The declarations for the xfree86-specific XMesa functions were moved up to + xmesa.h, requires Mesa as of 2007-04-13. + +commit 2c833f60acb3dc358815a99cd295ef7fc695c45d +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Apr 14 18:29:25 2007 +0300 + + glx: drop stray CAPI define. + + SI imports/exports were dropped from Mesa. + +commit ea27b09d3a973d9a4943f205b24940b8624cf405 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 13 17:15:22 2007 +0930 + + Deliver FocusIn/FocusOut events for all devices. + Don't use VCK in SetInputFocus and DeliverFocusedEvent. + +commit 7ccebc50b98ac175fdbdfaab081bcead62e60ee3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Apr 13 13:08:44 2007 +0930 + + Documentation for events.c. + +commit 2bb3c81fc1ca98c909309f3af7e9c8ca6b695657 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 12 16:35:43 2007 +0930 + + Use paired kbd instead of VCK for EnterLeaveEvents, sanitize variable naming. + +commit e7b47b1758ed20e75ee267b3a09e91bf2861f6fd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 12 16:24:42 2007 +0930 + + Change core enter/leave semantics for multiple pointers. + + Send EnterNotify when first device enters the window, LeaveNotify when the + last device leaves the window. Additional devices will not cause additional + Enter/LeaveNotifies. + +commit 547d720938b3668666d60110d79b150b1e9325c6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 12 11:16:19 2007 +0930 + + Remove workaround for a NULL core pointer in ProcessInputEvents. + + This workaround is obsolete with 33a5d9605e3e282f6aa1921d7321a2a12ef02c42 + +commit d4dad6f84f82a4ade5005c3aa93511c1295875b8 +Merge: f1f8b56 33a5d96 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 12 11:11:03 2007 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + configure.ac + dix/events.c + hw/xfree86/common/xf86Xinput.c + +commit 33a5d9605e3e282f6aa1921d7321a2a12ef02c42 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 11 18:28:57 2007 +0300 + + XFree86: DGA: Don't call ProcessInputEvents from CloseScreen + + By the time CloseScreen gets called, we can't call ProcessInputEvents, as + the event queue will get unhappy. So just unregister our hooks instantly, + and hope that they don't get called. + +commit 0910540e4322bba72a2fa0a907072eab2547a7b6 +Author: Remigiusz Marcinkiewicz <enleth@enleth.com> +Date: Wed Apr 11 01:09:26 2007 +0300 + + Config: Extend D-BUS API + + Return device ID where available. + Add listDevices call, which does what it says on the box. + +commit aecbc712144dd1aaf462bd758821438b1d22d957 +Author: Remigiusz Marcinkiewicz <enleth@enleth.com> +Date: Wed Apr 11 00:38:16 2007 +0300 + + Input: Allow a pointer to a device to be returned in NIDR + + Allow a pointer to the first device added to be returned, so we know which + device(s) were added by the NIDR call. + +commit 4f05f9591e5492c72f3856bd7a2ff13378f59f2b +Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> +Date: Tue Apr 10 23:57:48 2007 +0300 + + Input: Always add devices with first available ID + + Scan the device list when adding a new device, and make sure we can use + the first available ID, instead of always incrementing. + +commit 20674dcbb2373a0af287883bc008fb6fb23d4466 +Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> +Date: Tue Apr 10 23:55:36 2007 +0300 + + Config: Fix memory leaks + + Fix memory leaks that could occur along the error path. + +commit 82962bbae2b4fda274625d1712ef839ce1ab9dc8 +Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> +Date: Tue Apr 10 23:54:32 2007 +0300 + + Input: Add DeleteInputDeviceRequest + + Add DIDR, which asks the DDX to remove a device, analogous to + NewInputDeviceRequest. Only implemented for XFree86 at the moment. + +commit 7b82a836c66ba88566255052caff63577e1a0384 +Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> +Date: Tue Apr 10 23:52:08 2007 +0300 + + XFree86: Fix memory leaks, option parsing, in NewInputDeviceRequest + + Plugged some possible memory leaks, and added some more checks on the + options, particular for driver/identifier. Added an unwind. + +commit 4771fa8747791498e504d73afccfb5833499a38b +Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> +Date: Tue Apr 10 23:48:00 2007 +0300 + + XFree86: Fix memory leak in option parsing + + Fix option parsing functions and callers thereof to not leak memory. + +commit 07c56abf84080c020a3e7b7703a447c7f996975c +Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> +Date: Tue Apr 10 23:43:58 2007 +0300 + + Input: Plug memory leak in device free + + Remember to also free the motion history, if we're using the DIX-managed + history. + +commit e92743bc9839c36914a44f3e5bc8cd85773ac794 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Apr 8 14:02:02 2007 +0300 + + getevents: Copy modifier state from extended to core devices + + Make core events carry the same modifier state as the extended events, so + that holding down Ctrl on keyboard A and pressing Q on keyboard B won't + cause your app to quit. + +commit e49f836d6fa2768cd6d2a6d0227b5dbf516013dc +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Apr 8 13:56:41 2007 +0300 + + mieq: Use larger default queue size + + Use a default queue size of 512 rather than 256, else Xephyr is too slow + without a host cursor, so events get stuck in the queue. + +commit 4aae2de74b9224bac2b2e2522637dac09abc3837 +Author: Jared D. McNeill <jmcneill@netbsd.org> +Date: Tue Apr 10 12:57:15 2007 -0700 + + Add a real xf86EnableIO/xf86DisableIO for NetBSD/PPC. + +commit f77a8ea849d171a8ca00b2b7334866ace1ffbf73 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Apr 9 14:29:46 2007 -0700 + + Rotate screen size as needed from RandR 1.1 change requests. + + Screen size must reflect rotated mode size when setting rotated mode using + RandR 1.1 SetScreenConfig request. + (cherry picked from commit efcec7dbd3c2736c7b421d29c4d37e231aa681d2) + +commit bcf17df69a232e5e84609abacdca36274316e170 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Apr 9 14:12:27 2007 -0700 + + Disable CRTC when SetSingleMode has no matching mode. Update RandR as well. + + xf86SetSingleMode tries to resize all crtcs to match the selected mode. When + a CRTC has no matching mode, it now disables the CRTC (instead of crashing). + + Also, poke the RandR extension when xf86SetSingleMode is done so that + appropriate events can be delivered, and so that future RandR queries return + correct information. + (cherry picked from commit dc6c4f6989f87149d8605604f4514f5cbf11de67) + +commit 67e1c98895a566f927e1ae2384d56cfca104f971 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Apr 9 19:08:52 2007 -0400 + + Look for the PCI ROM file elsewhere in sysfs. + + /sys/devices reflects the bus topology, and we don't care that much. + Easier (and more reliable) to just look in /sys/bus/pci/devices, which + is a flat view. + +commit a08d5157f70567a0aa9583d4a15e62437340cf34 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Apr 9 19:04:56 2007 -0400 + + VT activate or waitactive are fatal if they fail. + + Also, be sure to waitactive on the way down, to make sure we're off the VT + before exiting. + +commit 72b477f964c748a1ab668781643cc11877f19738 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Apr 9 18:59:01 2007 -0400 + + Don't write out empty sections from the parser. + +commit 1f6741db19d4c91b1eacb497dff1814acb1bf0c3 +Author: Stefan Huehner <stefan@huehner.org> +Date: Mon Apr 9 14:33:15 2007 -0700 + + Bug #10560: Code-Cleanup: function declarations () -> (void) + + X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560> + Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511> + +commit f24391dbfd12a84253dfec794ee7884afd52e197 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Apr 9 12:30:31 2007 -0700 + + In AIGLX EnterVT processing, invoke driver EnterVT before resuming glx. + + As the driver EnterVT function generally re-enables the hardware and + prepares it for rendering, it must be called before any gl functions are + called which could touch the hardware. + +commit 4c2e28b0916b5f75cfefb6df9fa0a7a09675539a +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Apr 9 12:28:53 2007 -0700 + + Add setrlimit call in -core option to make dumps occur. + + Default core size limit for most environments is 0, which disables core + dumps. Add code in the -core option processing path to set the core limit to + the maximum value. + +commit f1f8b562aaaa6ec32ab0d0697f964d92d6d536a4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 9 19:31:59 2007 +0930 + + Alloc sprite memory in devices' devPrivates, allow undisplaying cursors. + + Improve memory usage by allocating the sprite's memory only to devices that + actually have a sprite and provide means to remove a device's cursor from the + screen (more hotplugging, yay!). + This commit breaks ScreenRec's ABI. + +commit 7cef789fa13ae53bfba6dc7b5a7928b7362b2522 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 9 18:37:48 2007 +0930 + + Close down virtual core devices when closing all devices. + +commit 6081b8c76f7d934bd4e9584a2f6d55636c5289d2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 9 18:35:47 2007 +0930 + + Don't explicitly init sprite for VCP, EnableDevice() will take care of that. + +commit 00b1d52f4103a07568dcebcdaa860b9b51f19b4d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 9 18:32:00 2007 +0930 + + Adding some comments to devices.c. + +commit aa77ffb510abe004802ab9acc6996e4c6fe3ebb2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 9 18:27:22 2007 +0930 + + Fix: pick new ClientPointer when device is closed. + +commit 4beeab8424774ea4c3142f29b90e33f1fc7cb154 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Apr 8 13:39:06 2007 +0300 + + XFree86: Treat evdev and vmmouse as mouse drivers (bug #10512, #10559) + + When we see an evdev or vmmouse section, assume that it's a mouse, and + don't add a default mouse device. This will break users who have an + evdev keyboard section but no mouse, and want the mouse to get added + by default. + +commit 0a6ac992363343487dfe0a0fc985ea55bd448382 +Author: Brian <brian@yutani.localnet.net> +Date: Sat Apr 7 12:41:57 2007 -0600 + + regenerated to fix bug 10371 + +commit 7e385598613778de14c0feea0d32f17d7aa66a8e +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri Apr 6 13:38:12 2007 +0300 + + GLcore: fix after moving xf86glx_util.[hc] to Mesa. + +commit cf962a849db2b259ca558c6265ea7e3328a4d312 +Merge: 5ad5625 5a804f2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 5 14:41:39 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + + Conflicts: + + configure.ac + +commit 5ad562565ac8ef9257da3afb0de1ae4f90f80fe9 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 5 14:18:05 2007 -0400 + + devPrivates rework: properly free devPrivates on compatibility structures, + type pixmap. Requires ddx'es to call the free function from DestroyPixmap. + +commit 5a804f2e97ab59745482660a635b801ac2b9e769 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Thu Apr 5 19:14:31 2007 +0300 + + configure: minor cosmetic, move GLX extension options together. + +commit a4e2fc703484fffed8dd50c1b4b24c564be4d3cd +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Thu Apr 5 19:13:47 2007 +0300 + + glx: Remove stray __GLinterface. + + __GLinterface was droped from glcore.h + +commit 38ca7d388c47c4800c74442172d6595a9b3dfcc7 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Thu Apr 5 19:13:14 2007 +0300 + + glx: fix symlink, glcontextmodes.c was moved to mesa/src/glx/ + +commit 1d550bb2c5cb5b3e588f0e0b68a421dc1cb8bd7c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Apr 5 12:12:58 2007 -0400 + + devPrivates rework: minor fix; use calloc and avoid initialization. + +commit 5c4deb71a1cb981ea7e2e25d2b3a1179f27efa5a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Apr 5 14:21:46 2007 +0930 + + Synthesize WarpPointer events for the actual device rather than the VCP. + +commit ed75b056511ccb429c48c6c55d14dc7ae79e75a3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Apr 4 12:00:15 2007 -0400 + + dix: add new, combined resource lookup function. Move all dix lookup API + deprecated so far to a new file dix/deprecated.c. Remove the deprecation + warnings for the time being. + +commit 63e46e4fc3e98751f2edbed9c79ef3d5dc2dadc6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Apr 4 15:59:51 2007 -0400 + + devPrivates rework: properly free devPrivates on compatibility structures, + excluding pixmap. + +commit f8482967ae8080f49dd1bbb0b79cc65020df679f +Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> +Date: Wed Apr 4 12:28:48 2007 +0200 + + Add an EXA driver callback to determine whether a pixmap is + + "offscreen" in exa terms, which means accessible to the GPU. + Bump exa minor. The change is backwards-compatible. + +commit 7f36ba57062096e9c67889d5b7dd64e2fb0004e7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 4 17:38:10 2007 +0930 + + Allow for multiple animated cursors. + +commit 676188531b2bd7679ee1831b5c517df3e6d215c5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Apr 4 17:35:06 2007 +0930 + + Unrealize cursor only once, not per device. + +commit c10df5b967d4da4e11786520317e2917de5541fa +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Apr 3 15:47:01 2007 -0700 + + Swap RRScreenChangeNotifyEvent dimensions when the screen has one crtc and it's rotated. + + RandR 1.1 clients expect the size fields in this event to be the unrotated + dimensions of the screen. This behavior is "weird", but that's the way the old + code worked so we need to be bug-compatible with it. + +commit 1cb84768f376b477a08a558854609b0743f2bd29 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Apr 3 15:31:16 2007 -0400 + + security: rewrite to use new devPrivates support. + +commit 14aea12cadef647369e44639ff5024dd7034570a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Apr 3 15:23:56 2007 -0400 + + xace: forgot one of the hook call arguments. Add it. + +commit 353e19fd5e18ad55a0dd12a7b63f6af9df7bfe6b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Apr 3 14:06:02 2007 -0400 + + devPrivates rework: zero out newly allocated private space. + +commit e1dea151db6405e12d991feacba9446320739ee8 +Author: Brian <brian@yutani.localnet.net> +Date: Tue Apr 3 11:21:50 2007 -0600 + + Implement a minor hack in dmxCheckFunctionKeys() to detect special keys. + + Keep track of status of (left) alt/ctrl keys so that ctrl-alt-q to exit + can be detected. Not ideal, but works for now. + +commit 0ee40c935750e25a9e178cdd70f6b2c667e79344 +Author: Brian <brian@yutani.localnet.net> +Date: Tue Apr 3 09:31:00 2007 -0600 + + s/intead/instead/ + +commit 23974f20bf0e0c2786cc75af026af5484f6dc331 +Author: Brian <brian@yutani.localnet.net> +Date: Tue Apr 3 09:30:24 2007 -0600 + + add DDXRingBell() stub to solve link problem + +commit a240c039c47c0be22ea5e100692307b26d938747 +Author: Brian <brian@yutani.localnet.net> +Date: Tue Apr 3 09:27:57 2007 -0600 + + Split the xserver/fb/fbcmap.c file into two files. + + Now, fbcmap_mi.c contains the fb functions which just wrap mi functions. + Previously, these were in fbcmap.c and compiled when XFree86Server was defined. + Now, clients of fbcmap should either use fbcmap.c or fbcmap_mi.c and not worry + about setting the XFree86Server symbol. + +commit 1cc8db72816cd079f30255046e10043c350bf683 +Merge: 645d87c a39f297 +Author: Matthieu Herrb <matthieu@roadrock.(none)> +Date: Tue Apr 3 16:04:45 2007 +0200 + + Merge branch 'master' of ssh://herrb@git.freedesktop.org/git/xorg/xserver + +commit 645d87cf8ef724d4591614f9994cdc4d7549a7a8 +Author: Matthieu Herrb <matthieu@roadrock.(none)> +Date: Tue Apr 3 15:47:18 2007 +0200 + + CVE-2007-1003: XC-MISC Extension ProcXCMiscGetXIDList() Memory Corruption + +commit 207f710d16337839c2427aa16fad70a49834153e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 3 19:02:14 2007 +0930 + + Delete all grabs from all devices when deleting a window. + +commit 5f382c9c7fbda6eccf8e76c28a90b55ff2f0aef3 +Merge: 9b0b340 f09ee16 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 3 15:07:18 2007 +0930 + + Merge branch 'master' into mpx + +commit f09ee168e234d0a9416e15f2916726b975cad293 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 3 15:07:00 2007 +0930 + + Revert "o fix minor error in comment for GetPointerEvents()" + + This reverts commit 96ce17aa94413c4b8bcb61cae71167050130a307. + +commit 9b0b3406682b5a3161e6c3895771523214c37207 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Apr 3 15:06:26 2007 +0930 + + Make GrabDevice differ between core grabs and device grabs. + +commit a39f297ada4fa87c858395ae2aacefac5f8fba05 +Author: Keith Packard <keithp@viola.jf.intel.com> +Date: Mon Apr 2 14:15:36 2007 -0700 + + Don't erase current crtc for outputs on CloseScreen + + Erasing this variable causes some outputs (SDVO on intel) to fail + to be correctly reset at server reset time. + (cherry picked from commit 56262a4ee943f328d089a8eb4aa70b9a4bd5d135) + +commit 11797ffdcc22160317a5ebbc9291472570a51c6d +Author: Eric Anholt <eric@anholt.net> +Date: Mon Apr 2 18:21:58 2007 -0700 + + Move modes/ debugging output under Option "ModeDebug" in the Device section. + +commit e44f106ffc796c025abdfb66717c06db8b12b4e4 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 16:26:15 2007 -0600 + + clean-up, debug code + +commit 8d8bc8927760fad631bef83fa2841b455ff6d511 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 16:21:57 2007 -0600 + + fix formatting + +commit 3e482de7b145a5eed79b81c30c359fe43647824a +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 15:38:15 2007 -0600 + + checkpoint: more clean-up + +commit 76a7a5ca1f068c27c9b5fbd49d5a1da80ed6f488 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 15:24:05 2007 -0600 + + formatting fixes + +commit 69baad321d35dae0bfa535be0c6ed2131fed1e60 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 15:21:22 2007 -0600 + + clean-up dmxCoreMotion() dmxCoreMotion2() + +commit 44eb15adeee3b299677070f39625daa53679bd13 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 15:12:04 2007 -0600 + + checkpoint clean-up + +commit 0f873a9d4f02b399c37b4058c6a9a2e21aa205e8 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 14:51:38 2007 -0600 + + remove some debug code + +commit 3a0ce1084a18e17a3c8a009d99c228652b8763a9 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 14:51:21 2007 -0600 + + for completeness, init dummy's min/maxval[1] values (vertical axis) + +commit 12016f20f7f5365f30cfbeb05568b3fb89759e5a +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 14:50:48 2007 -0600 + + As for normal mouse device, init valuator maxval[] to real values, not zero. + +commit 0aaf28e5633a59563b89a2e42d19fabc84adc3ed +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 12:41:30 2007 -0600 + + In dmxBackendMouGetInfo() initialize the info->minval[], maxval[] arrays to the size of the backend display. + + It seems that the changes to X input exposed a problem that wasn't detected + before. The axis clipping code in GetPointerEvents() uses those limits to + constrain the pointer's coordinate range. The max was zero so the pointer + couldn't move. + +commit 0013bf6ddb3867c9a504603434d8c2ec83f3f3bc +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 12:39:04 2007 -0600 + + undo 1280 valuator hack + +commit 08a88d1803f672555141011e082fbc0edeedcf05 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 12:28:14 2007 -0600 + + Pass num_valuators=0 for ButtonPress/Release. This seems to fix the button coordinate problem + +commit 70683e338dacc48e3adf489d66ec33b29dfc3b77 +Author: Brian <brian@yutani.localnet.net> +Date: Mon Apr 2 12:26:27 2007 -0600 + + formatting fixes + +commit e8777a91f37d828b9df839bf3d9cf2f954bdddb0 +Merge: a120547 96ce17a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 2 15:36:26 2007 +0930 + + Merge branch 'master' into mpx + + Conflicts: + + Xi/closedev.c + Xi/exevents.c + Xi/extinit.c + Xi/listdev.c + dix/window.c + hw/xfree86/common/xf86Xinput.c + include/extinit.h + mi/mipointer.c + +commit 96ce17aa94413c4b8bcb61cae71167050130a307 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 15 17:50:02 2006 +1030 + + o fix minor error in comment for GetPointerEvents() + +commit a12054757d21edacc1c24c3077b9214726652829 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Apr 2 11:20:44 2007 +0930 + + Xi: fix ProcXListInputDevices to include the virtual core devices. + +commit f2808005f4ee72c5fd7f5f3dcca181306485113e +Author: Alberto Mardegan <mardy@users.sourceforge.net> +Date: Sat Mar 31 16:51:24 2007 +0200 + + Bug #6620: Fixed a missing 'else' in ATIPseudoDMAInit(). + + Before this, we'd write some registers twice on R200 hardware and also + possibly end up with a bad value in atis->cce_pri_size. + +commit 5257b32e492bd2082bef6a4cd0fea03ce093c0f8 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Mar 28 15:51:24 2007 -0700 + + Bump video driver ABI to 2.0 for cw change (commit 6ed08949af4f7ac09170d3d9581e4092b24a84ee). + +commit 73fdc16bc4f4e21ff604b3f9ded23b40398fb1b6 +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 16:07:26 2007 -0600 + + formatting fixes + +commit ebdc8ce5c108dc3b6b0004e7c7939d1a5bef8676 +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 16:05:46 2007 -0600 + + Checkpoint DMX updates: things are working much better now, but still not 100% right. + + Use new dmxCoreMotion2() function which enqueues motion events with + GetPointerEvents()/mieqEnqueue(). + The clipAxis() code in GetPointerEvents() is causing some grief. The + limits seem to have always been (0,0) according to the original calls + to InitValuatorAxisStruct() in dmxinputinit.c. + Terrible hack for now: Call InitValuatorAxisStruct() with hard-coded max + values of 1280 (my screen width). + +commit e9130b8bac73a0843d5ff6b2216eccfb3e094a48 +Merge: 2c6d471 92e8cdb +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Mar 30 13:39:15 2007 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 3c7413e0c2f87e154aa8aa4a83bd585a6d1091e8 +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 14:07:04 2007 -0600 + + Tweak some parameters, etc. Things seem a little better now, but still a ways to go. + +commit 7989dacdcb1449b10d7733dda11cd96e260e9fae +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 13:44:24 2007 -0600 + + num_valuators=1 for GetPointerEvents(), hack ButtonPress/Release position + +commit 1ea842960fddbc6363cc6e7f914d70ba45525a6b +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 13:43:15 2007 -0600 + + more debug + +commit 92e8cdbd32b0d86cabd4ad88e3240bf90c018b9a +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 13:19:33 2007 -0600 + + Checkpoint fixes to DMX for X input changes. + + Xdmx builds and runs now. + Keyboard seems OK, and mouse pointer moves, but everything else is flakey. + Something is still seriously wrong. + +commit d92da3d5f309392ac398c0975ef17bb04312d5e2 +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 12:56:34 2007 -0600 + + more formatting fixes + +commit 44acb2517d9fb07790d9d799aa9cc727d1b7d35c +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 12:54:22 2007 -0600 + + Fix some bad formatting. + + Doing this: + if (something) stmt; + is evil if you're debugging and want to break on stmt! + +commit 9f24798af50896cc3262c1201f75c10a688f2a83 +Author: Brian <brian@yutani.localnet.net> +Date: Fri Mar 30 12:49:34 2007 -0600 + + ompile fbcmap.c w/ -DXFree86Server instead of linking libfbcmap.a. + + The former works, the later doesn't (DMX blows up on visuals/pixel formats). + This undos Daniel's patch, which undid my prev patch. Revisit someday. + +commit 76756f27561c6386cba0d338441e8ec7b98500ce +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Thu Nov 30 04:20:32 2006 +0200 + + Make xf86glx.c unaware of Mesa internals + + Use newly added XMesaCopyContext() and drop the GlxSetRenderTables() call + for Xgl, as this is now done inside XMesaForceCurrent(). This leaves xmesaP.h + but only for the declarations of the three XMesa/XFree86 functions. Also, + GlxSetRenderTables() stays but is only used in hw/xgl/glxext/ . + + Also drop xf86glxint.h, no longer used. + + Depends on mesa commit 7439a36785b6a2783e80a40a96c09db8f56dc2bc of 2007-03-30. + +commit 63d8f01819ef44ea3bf0d4fb20ba1d698ae91cd2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Mar 30 14:59:43 2007 +0930 + + dix: Fix wrong cursor refcount. + + Calloc cursor struct to ensure devPrivates are zeroed out and don't + increase the refcnt for devices automatically when allocating a new + cursor. Use new DeviceIsPointerType() to detect if device is a pointer + _before_ device has been activated and can thus be identified and set + up grab functions accordingly. This way we can increase the refcnt + when we get a pointer grab. + +commit 20e4314b178e1a093bce85e93329d4bcfb4f4210 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 29 19:12:32 2007 +0930 + + dix: Try to get closer to the correct refcnt for cursors. + + This commit introduces a memory leak, as the refcnt never seems to get + down to 0 and thus cursors will not be freed. Solves the problems with + GNOME segfaulting every 30 seconds though. + +commit 307d2b57bbfcc281656011533627bea6ab98189e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 29 15:23:41 2007 +0930 + + Xi: remove 'register' keywords. + +commit 0c607f4b1902f993597e09ea7a2c83bc1cca9b96 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 29 14:43:50 2007 +0930 + + dix: Pick keyboard instead of using virtual keyboard in Grab/UngrabKey. + +commit 82a8b99a6c46018885600011913267d8af9dfe13 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Mar 28 15:17:02 2007 -0400 + + Move the XAA private indices to be static. + + Technically this is an ABI break, if you aren't smart enough to be using the + getter functions. Cope. + +commit 8c7f56d92d8471ee059c14d322af5f7f555dd5c6 +Author: Tomas Janousek <tomi@nomi.cz> +Date: Wed Mar 28 14:46:30 2007 -0400 + + Bug #10296: Fix timer rescheduling. + +commit 327bc332a61294209d39286228199f54bdde73d1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 28 13:00:03 2007 -0400 + + xace: minor comment fixes. + +commit 299ff4c82998d2a32204bfbecde4993dfbd3d4a5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 28 12:57:11 2007 -0400 + + xace: provide creation-time resource hook call in CreateWindow(). + +commit 99b220969f2f8ba829bc8294b27ca90fd9311be4 +Merge: 728ad64 82a8b99 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 28 12:54:04 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + +commit 5ba4d9eedf1b4ce4795bf910cd184872e2d9b3fc +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Mar 28 12:03:19 2007 -0400 + + Refuse to create tiny modes from EDID detailed timing. + +commit 2c6d47108880584f1221ff86c6c8947627f9f607 +Merge: c4fe1bc 8522044 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Mar 28 08:08:04 2007 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/Makefile.am + hw/xfree86/dri/dri.c + +commit 85220446359a75ea2c359b418b4051c04eea739c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 28 13:03:32 2007 +0300 + + GL: Update for Mesa changes + Added s_fragprog.c to fix the build. + +commit 1af2ef0b25fd8017a3271e624a5f1548f02b09f9 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Mar 27 13:13:45 2007 -0700 + + Enable Composite by default now that it disables itself in the known bad cases. + +commit 0bfc3cc22db94ec6867596606fe93228e315c847 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Mar 27 13:12:21 2007 -0700 + + Disable composite when Xinerama is active. + + It will likely take a decent bit of work to make that work right. + +commit 5e7936371c9e1ac48e19bf1e9e3f71f037fd9b5d +Author: Eric Anholt <eric@anholt.net> +Date: Mon Mar 26 20:18:18 2007 -0700 + + Disable Composite when the screen's visual is pseudocolor. + + Rendering fails badly in this case, and I don't care enough to fix it. + +commit 8afc7e2eb3ebec48d3879bf269143259c8bc18c8 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Mar 26 15:55:38 2007 -0700 + + Refuse to initialize Composite if Render is not present. + + Composite relies on the presence of Render, in particular for the automatic + compositing. + +commit 6ed08949af4f7ac09170d3d9581e4092b24a84ee +Author: Eric Anholt <eric@anholt.net> +Date: Tue Mar 27 17:31:28 2007 -0700 + + Move libcw setup to the only renderer requiring it (XAA). + + Additionally, protect libcw setup behind checks for Render, to avoid + segfaulting if Render isn't available (xnest). + + The previous setup was an ABI-preserving dance, which is better nuked now. + Now, anything that needs libcw must explicitly initialize it, and + miDisableCompositeWrapper (previously only called by EXA and presumably binary + drivers) is gone. + +commit e76b6349516d5d1c8f7167d6f5419e0d06a546c3 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Mar 26 16:04:50 2007 -0700 + + Fix indentation of fakexa help text. + +commit 728ad64d979fd9e5cca28e8c15118c18d707c431 +Merge: 0331c6a 6a0bed1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 27 13:16:40 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + +commit 6a0bed16e80a91891cee6c7033c90875bc2af193 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Mar 27 16:51:12 2007 +0200 + + Fix typo in GL/mesa/shader/slang/Makefile.am. + +commit b8f846a9dfc6697d59ad5482ba7c9d738875318e +Author: Dave Airlie <airlied@linux.ie> +Date: Tue Mar 27 14:17:40 2007 +1000 + + gl: oops dodgy s appeared pointed out by jcristau on irc.. + +commit a63ee90bc2d490f6c5c1802c164391963cf6c1d9 +Author: Dave Airlie <airlied@pegasus.(none)> +Date: Tue Mar 27 11:05:52 2007 +1000 + + gl: update for latest mesa glsl-compiler merge + +commit d387a3ddf76716791e5e8b8f0954ca0df3c579d6 +Author: Dave Airlie <airlied@pegasus.(none)> +Date: Tue Mar 27 11:00:13 2007 +1000 + + fix loading of GLcore after recent loading changes + +commit 92ba435bd9aa7b6eca9aef8e5193576ef62fc9db +Author: Eric Anholt <eric@anholt.net> +Date: Mon Mar 26 12:44:58 2007 -0700 + + Update xorg.conf manpage for new RandR 1.2 monitor options. + +commit 0331c6a8fcba1dc27ef45aaf5f694799d0085413 +Merge: 84a066c f7c5aa0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 26 10:28:05 2007 -0400 + + Merge branch 'master' into XACE-SELINUX + +commit f7c5aa0dc0fa3569a2ee412c4f996960f936b6ed +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 26 10:21:44 2007 -0400 + + Remove dead NEED_DBE_BUF_BITS code. + +commit 2e3cc861f90415f200826bc71dab6298d759c42b +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 22:01:34 2007 -0400 + + Since ddc, i2c, and ramdac are in core now, remove their ModuleData stubs. + +commit e88fa75c9b468b88bb7b87b1da235c6eb2fe8164 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 18 17:39:08 2007 -0400 + + Static cleanup on Xi/ + +commit 4b5802ddbd45271be3cadeae0a83a6742df2515b +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 17:57:54 2007 -0400 + + General DIX static and dead code cleanup. + +commit 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 17:57:22 2007 -0400 + + Static and dead code cleaup for Xext/ + +commit af769892a91c9af59de53ca3bcd77fc4967daffb +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 17:56:32 2007 -0400 + + Static and dead code cleanup from mi/ + +commit 62224e39727fd6f1cf11a461983662f615a9fea1 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 17:55:15 2007 -0400 + + Static cleanup for xf86 ddx. + +commit e8bc1988d9ff10b65717574175f70df3c4d6334d +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 15:13:05 2007 -0400 + + Un-staticise VTSwitchEnabled, since kbd wants it apparently. + +commit 70e493d223b1e943e652191150bd0b7e1a6ebcfb +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 14:55:28 2007 -0400 + + Static and dead code cleanup over afb/ + +commit f36bf1a3e4ce9465ea4a6159c209924a3cafbe58 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 12:28:13 2007 -0400 + + Delete a dead file. + +commit 9a0f25de7ca3c68af867b38936103d17daa92ac6 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 25 12:27:01 2007 -0400 + + Static cleanups, dead code deletion. + +commit ac2356843e38b3400142bc54b65393c12976fc07 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Mar 25 09:41:33 2007 +0930 + + dix: Increase allocation size for core keyboard keymap to avoid buffer overrun when copying keymap from extension devices. + +commit 5f9c10e8da0d9d96cc00a38cdf9a8c3030063e03 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Mar 25 15:00:03 2007 +0930 + + Clean up DeviceIntPtr, prepare for Server 1.4 ABI. Move sprite-related + information into a new SpriteInfoRec, remove isMPDev flag. + +commit e54311395e1e7ae458c8ce59da0914706c4a04f6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Mar 25 09:41:33 2007 +0930 + + dix: Increase allocation size for core keyboard keymap to avoid buffer + overrun when copying keymap from extension devices. + +commit 1072b88a8f352484e70bc749e300c936e5600480 +Author: Dave Airlie <airlied@linux.ie> +Date: Sun Mar 25 10:06:00 2007 +1000 + + loader: fix already built-in message + +commit 804080a7096347d48c686f2c8fbfd06326bce400 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Fri Mar 23 23:41:36 2007 -0700 + + Make pending properties force mode set. And, remove AttachScreen calls. + + Yes, two changes in one commit. Sorry 'bout that. + + The first change ensures that when pending property values have been + changed, a mode set to the current mode will actually do something, rather + than being identified as a no-op. In addition, the driver no longer needs to + manage the migration of pending to current values, that is handled both + within the xf86 mode setting code (to deal with non-RandR changes) as well + as within the RandR extension itself. + + The second change eliminates the two-call Create/AttachScreen stuff that was + done in a failed attempt to create RandR resources before the screen + structures were allocated. Merging these back into the Create function is + cleaner. + (cherry picked from commit 57e87e0d006cbf1f5b175fe02eeb981f741d92f0) + + Conflicts: + + randr/randrstr.h + randr/rrcrtc.c + + I think master and server-1.3-branch are more in sync now. + +commit 1f77120775dc05fc84a00dd55190af2fa50ae509 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Fri Mar 23 14:39:10 2007 -0700 + + Ensure that crtc desired values track most recent mode. + + desiredX and desiredY were not recorded during xf86InitialConfiguration. + desiredX, desiredY and desiredRotation were not recorded during + xf86SetSingleMode. + (cherry picked from commit 36e5227215e0912ddf8a010db042467f00efe0fc) + +commit 84a066cc88fe4326ddacd04ab5e1158a80571c33 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Mar 23 10:33:53 2007 -0400 + + xace: pass serverClient as default argument to dixChangeWindowProperty + instead of NullClient. + +commit 476f2b5aefa518262b69e487555e6094818d857a +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Mar 23 01:17:14 2007 -0700 + + Incorrect extra memory copy in RRChangeOutputProperty. + + Left over from previous version of the code, this memmove will break when + the mode is not Replace. + (cherry picked from commit 945aa0aa556429b50dea8e8ebc0008304b093eb7) + +commit 7093367c3976bef5b9d219d9f2a7dc7dd3eeb091 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Mar 23 01:05:55 2007 -0700 + + Fix Pending property API, adding RRPostPendingProperty. + + Pending Properties take effect when the driver says they do, so provide an + API to tell DIX when a property effect is made. Also, allow driver + to reject property values in RRChangeOutputProperty. + (cherry picked from commit 8eb288fbd69e2ffd02521d2c6a964c8180d08ec8) + +commit 86d76390eb182f271f5fa5dc19205e97a867f7e7 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Mar 23 01:03:40 2007 -0700 + + Make sure RandR events are delivered from RRCrtcSet. + + Some paths were skipping the event delivery stage. + (cherry picked from commit 9ca7ba5d6012295a77ed773c656e786440da973d) + +commit 510eaa346e68fd82c852c7b41fb0e2c5be12da78 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Mar 23 00:59:11 2007 -0700 + + Clean up xf86CrtcRec and xf86OutputRec objects at CloseScreen. + + Erase pointers to structures which are freed at server reset time. + (cherry picked from commit 492c768065f49306a2194a88edf96b85de0ff4ff) + +commit 479b2be4badab0a67b1f091feb83c1364e27d783 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Mar 23 00:57:18 2007 -0700 + + Clear allocated RandR screen private structure. + + Use xcalloc instead of xalloc when allocating this structure to ensure + consistent contents at startup. + (cherry picked from commit 16f4c0c1750824f2e5a001cef82a4122a7a2beb0) + +commit b63e0d2545bb75e14d9de019a88f31e20a2f7377 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Mar 20 07:17:27 2007 -0700 + + Clean up Rotate state on server reset. + + The rotation state is stored in the xf86_config structure which is not + re-initialized at server reset time. Clean it up at CloseScreen time. + (cherry picked from commit f8db7665dcd7af78ca4db2461e0bf787ec662cb1) + +commit e1cc68add0bcdd5e0e4e15cf6ee8a3da136d3534 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 22 17:33:16 2007 -0400 + + xace: drop the name argument from the property callback. + +commit c9fb8a35332d101897607d8f06ed5a6512eac7cf +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 22 17:23:26 2007 -0400 + + dix: move access codes to separate header file, add DixCreateAccess. + +commit 1b766ffc0647d5e9a9bf6938d33548d977b5535e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 22 15:55:35 2007 -0400 + + dix: reorganize property code to better support xace hook; requires new API for + changing a property, dixChangeWindowProperty, taking an additional client argument. + +commit 1b58304ac837735920747ed0f0d10ba331bdaeb7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 22 13:06:50 2007 -0400 + + xace: add new argument to property hook for property structure itself. + +commit 5486be4898766205149fadce71529724eb78fbf3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 22 10:59:21 2007 -0400 + + dix: devPrivates support for PropertyRec. + +commit f8cd19bd1692d12a6047c088a626a6ae715d469d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 22 17:47:01 2007 +1030 + + Xi: add GetClientPointer and GetPointerPairing requests. + + dix: use PickKeyboard for ProcSetInputFocus and ProcGetInputFocus instead + of the core keyboard. + +commit a3296d111dc4d76aa3afa7e338cbab93eb390ec4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 21 17:01:26 2007 -0400 + + xace: add access_mode argument to selection hook. + +commit 4c1fb8069d5dd30a73277698503e9dcc2e9d64c6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 21 16:17:14 2007 -0400 + + dix: add new selection fields supporting redirection. + This is a minor ABI break. + +commit 4fa482b4be1150bcffeabb64d018c00ac5951e41 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 21 14:49:56 2007 -0400 + + xace: bump major version since the hooks have changed. + +commit 9c144f8ac5cea25deaa543767dbaf371d029c608 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 21 14:39:00 2007 -0400 + + xace: add XACE_SELECTION_ACCESS hook for selection redirection/access. + +commit 3e9f7a5504ab41d845e88f293d8498c963d8a7d8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 21 02:35:31 2007 +0200 + + XFree86 DGA: Guard against NULL pointer dereferences. + Ass, u, me ... + +commit f292de2ef13dc994a38029cee9e2642576893332 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 21 02:04:12 2007 +0200 + + XKB: Fix size_syms calculation bug + + Apparently it needed to be nSyms*15/10, not *12/10; make it match the + other allocation code. + +commit f34b9a20b0181d3c2641c305e91180711afbd4b9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 21 02:03:37 2007 +0200 + + XKB: Be a tiny bit more conservative with type allocation + + Make sure size_types will _always_ be 0 if we don't have any types. + +commit 021fc5cb2cb4a7972b4a6fcb570c1da92787d68d +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Mar 18 16:31:19 2007 -0400 + + Static markup and dead code cull over xkb/. + + The former <X11/extensions/XKBsrv.h> has been pulled into the server now as + include/xkbsrv.h, and the world updated to look for it in the new place, + since it made no sense to define server API in an extension header. Any + further work along this line will need to do similar things with XKBgeom.h + and friends. + +commit 9398d62f27ee1b287e4458fd8b011c10f7b59efd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 21 00:18:24 2007 +0200 + + XFree86 input: Add backwards compatibility for motion history + Add the old motion history API back, as a shim around the new mi API. + +commit 0f75c47e0c5f4b2778930a6fabf894fc1dffd9d3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 21 00:12:02 2007 +0200 + + xfree86 input: Re-enable DGA support + Re-enable DGA support for relative mouse motion. + +commit 80d29475b9a2ebbb303a8e324e09a15c528d5556 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 21 00:10:38 2007 +0200 + + mieq: Allow event handlers for arbitrary events to be set + Allow arbitrary events to use mieq by letting custom handlers be set. + +commit b8df961843a95b29258ae9c5d46ccfc620d8de1c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Mar 19 18:03:26 2007 -0700 + + Define XF86PM on Solaris x86 builds now that we have sun_apm.c + +commit 2945deba1d4a7dce4f6dd0c568297a1c537fdfb4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 19 17:09:10 2007 -0400 + + xace: drop XACE_WINDOW_INIT hook, it has been superseded by ResourceStateCallback. + +commit 78c962da76efe644b8d485265f1ecdda84b45d27 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 19 17:04:51 2007 -0400 + + xselinux: use the new ResourceStateCallback instead of the XACE_WINDOW_INIT hook. + +commit 6a89106e9c963a495fd40427d242ba0abd44f764 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 19 16:51:29 2007 -0400 + + xselinux + security: remove confusing CALLBACK macro. + +commit 0acf993e2878d0866fd4e2db8252c1ea6841e494 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Mar 19 16:11:01 2007 +1030 + + dix: Move sprite initalization/pairing from ActivateDevice to + EnableDevice. + zero out spriteTrace, otherwise GetCurrentRootWindow() may return + invalid data. + + Evdev adds previously hotplugged devices on its own when rescanning, + and ActivateDevice does not get called for those devices. Sprites need + to be initialized or paired before the device gets started, so the + safest place to do so is EnableDevice (which actually does get called + by the evdev driver). + +commit 015d728bcde5b16a72a976579755421e3023626b +Merge: 65b0eb6 b167583 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Mar 19 09:42:56 2007 +1030 + + Merge branch 'master' into mpx + + Conflicts: + + dix/devices.c + dix/events.c + mi/misprite.c + +commit 720f302d241e88e6e9f2962207da1aa9a79728b7 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Mar 17 20:14:05 2007 -0700 + + Slow down DDC I2C bus using a RiseFallTime of 20us for old monitors. + + This time value makes the bus run slowly enough for even the least reliable + of monitors. Thanks to Pavel Troller for finding the necessary change. + +commit b5a8a71e64c76b8dd42962cbd7984215c6ce4aa8 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Mar 17 17:26:11 2007 -0700 + + Remove extra (and wrong) I2C ByteTimeout setting in DDC code. + + The DDC code sets the I2C timeouts to VESA standards, except that it had an + extra setting of the ByteTimeout value which was wrong (off by a factor of + 50). Removing this should help DDC work on many more monitors. Note that the + Intel driver duplicated these settings, along with the error. Yay for cult + and paste coding. + +commit 2489dae9f7def788910eee5733931392df83a0d6 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Mar 15 20:26:07 2007 -0700 + + Correct ref counting of RRMode structures + + RRModes are referenced by the resource db, RROutput and RRCrtc structures. + Ensure that the mode reference count is decremented each time a reference is + lost from one of these sources. The missing destroys were in + RRCrtcDestroyResource and RROutputDestroyResource, which only happen at + server reset time, so modes would be unavailable in subsequent server + generations. + +commit 9d0c3b52f25df89738fb1a62ccffda8c8cbb4689 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Feb 20 23:04:26 2007 -0800 + + Eliminate RRModeRec devPrivate field. + + The xf86 mode setting code was mis-using this field to try and store a + pointer to a DisplayModeRec, however, each output has its own copy of every + DisplayModeRec leaving the one in in the RRModeRec devPrivate field pointing + at a random DisplayModeRec. + + Instead of attempting to rectify this, eliminating the devPrivate entirely + turned out to be very easy; the DDX code now accepts an arbitrary RRModeRec + structure and set that to the hardware, converting it on the fly to a + DisplayModeRec as needed. + (cherry picked from commit 3506b9376c2b0db09bfff58d64e07af88a6e8195) + +commit 2c93083edd29a65e73bb2e8eff9d353e92845c9b +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Sun Feb 18 23:49:38 2007 -0800 + + Add support for user-defined modelines in RandR. + + The RandR protocol spec has several requests in support of user-defined + modes, but the implementation was stubbed out inside the X server. Fill out + the DIX portion and start on the xf86 DDX portion. It might be necessary to + add more code to the DDX to insert the user-defined modes into the output + mode list. + (cherry picked from commit 63cc2a51ef87130c632a874672a8c9167f14314e) + + Conflicts: + + randr/randrstr.h + + Updated code to work in master with recent security API changes. + +commit b167583fe234a536aa6187e17f21da85be4f0b7f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 15 17:50:02 2006 +1030 + + o fix minor error in comment for GetPointerEvents() + +commit 65b0eb60b0b9e6405aa2e3d4c712ec4d2f0da070 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Mar 16 15:52:24 2007 +1030 + + Xi: move IsPointerDevice into dix. + dix: IsPointerDevice and IsKeyboardDevice, use same ways to identify type + of device as XI does for the XListInputDevices reply. + Autopair each non-pointer device with VCP when activating, pair with + real device after activation. + Don't return non-keyboard devices when calling GetPairedKeyboard or + PickKeyboard, otherwise we segfault for 'evdev brain'. + +commit 3bffb281260476d2f74f0bf451d85d2f7cacd6c4 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Mar 15 16:16:16 2007 -0700 + + Don't wedge when rotating more than one CRTC. + + Rotation block handler was re-registering the rotation damage structure, + creating an infinite loop in the damage code. Track registration of the + damage structure to avoid this. + (cherry picked from commit b14f003b0ed1252766c9e3b1c086ea2809521047) + +commit 9562b6abe1da566cf73a08c4f4c4339fb67fbc71 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Mar 15 10:50:45 2007 -0700 + + Allow xf86_reload_cursors during server init. + + xf86_reload_cursors is supposed to be called from the crtc mode setting + commit hook; as that happens during server initialization, check for this + case. + (cherry picked from commit 5b77bf2d020b1ee56c1c5f2db089a8f7f64a76a6) + +commit 3b71b0f89f1db837da91650baa0ef4bb7ef2e98f +Author: Eric Anholt <eric@anholt.net> +Date: Thu Mar 15 13:21:00 2007 -0700 + + Set the RandR version returned, rather than just passing the proto's version. + +commit 2fe74ef339c3a4902ae8214f5a0454662895422c +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Mar 15 16:56:01 2007 +0100 + + Fix calculations in x86 emulator for the long long case (Andreas Schwab). + +commit 456f429ad655ab4d80e30c58291d801966a613b2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 15 21:48:19 2007 +1030 + + dix: fix: don't return when device is same as argument. + fix: set access default rule to 0 on init. + +commit ae75019ccf1edac9e8be31b6a96293624f672ccb +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Wed Mar 14 23:59:29 2007 -0700 + + Create driver-independent CRTC-based cursor layer. + + This moves most of the cursor management code out of the intel driver and + into the general server code. Of course, the hope is that this code will be + useful for other driver writers as well. + + Check out xf86Crtc.h for the usage information, making sure you add the + needed hooks to the crtc funcs structure for your driver. + (cherry picked from commit 4d81c99a4660a0bf9014f789de55edabd185bd14) + +commit c5b07fb717289f61b54d7b093421bcb92124b839 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Mar 14 17:42:30 2007 +1030 + + kdrive: update kdrive to new mi API with additional device argument. Includes + an update of ati_cursor.c and i810_cursor.c + +commit c3eb248cf93a3afd9168acfb88254606beddd7a8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Mar 14 13:21:33 2007 +1030 + + dix: fix: don't skip first item in list when seeking for a device cursor. + +commit ce9409acebd994cf1809050f2cc8e1db66130f12 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Mar 13 19:16:56 2007 +1030 + + dix: Get the state from the paired device and the real device to fill the + state field in the event, rather than using the virtual devices. + ProcessPointerEvent: name argument "device" instead of "other". + Add GetPairedKeyboard(). + +commit 4bf1b280f7cb676ec2b172f26dd2ad9bac2eb2ca +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Mar 9 14:18:14 2007 +0000 + + Set pScreen on context + +commit c366b82bd50066019cf82b3464445d5bc27d6f9f +Author: Jay Estabrook <Jay.Estabrook@hp.com> +Date: Fri Mar 9 12:26:55 2007 +0000 + + Ensure domain is stripped from the bus ID. + +commit 577464af4362e5a32cf7165b5128655dd86c6200 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Mar 9 17:13:05 2007 +1030 + + dix: restore commit b3b2a6a0d43d1724e04d69588f8a55c3270e5523 that for some + reason got wiped. + fix ProcGrabKeyboard to use PickKeyboard + fix PickKeyboard to actually work. + +commit 07806f4081f8dcd3b5733b590eb6e5b4cae734ad +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Mar 9 15:45:25 2007 +1030 + + Xi: Add SetClientPointer request handling. + +commit 405483496538f1c82cbd7fe1e76c5d94e1a90525 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Mar 9 14:16:23 2007 +1030 + + mi: remove 'register' keywords. + +commit fe05ba75a10ec080e7ec34bff6936103185586b3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 8 12:14:30 2007 -0500 + + devPrivates rework: pass address of pointer to private callbacks instead of + the pointer itself. + +commit 18339375cd332f0ab1cbdade3dcd9140212ce1ca +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 8 12:14:06 2007 -0500 + + xselinux: remove context validation function for now. + +commit b9cff1670f29949a5bc41afc19aca443f434febb +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 8 12:13:52 2007 -0500 + + Add ResourceStateCallback similar in function to ClientStateCallback. + +commit 2fcb45eb5dc1803b372df8b5765f6a43bea83611 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 8 12:13:36 2007 -0500 + + devPrivates rework: redo field offset registration, drop RC_PRIVATES class. + +commit 947f8d249bac61beb10669d935888c4c280b5062 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 8 12:13:18 2007 -0500 + + devPrivates rework: redo interface again, dropping parent and type parameters + as well as preallocation routine. + +commit c45f6762080ef00b41d9f73441a9f0e605253008 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 7 11:22:42 2007 -0500 + + devPrivates rework: hook up new mechanism in backwards-compatibility mode + on existing structures that support devPrivates. + +commit b3b2a6a0d43d1724e04d69588f8a55c3270e5523 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 8 22:16:17 2007 +1030 + + dix: Check if client has a grab on any other device before mouse/kbd + event is delivered to the client. Client's don't cope well with + receiving core events from other devices when having a grab on a + pointer or keyboard. + +commit 63169ce52d354b4345dcfc46b89f0ea88379718f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 8 17:50:19 2007 +1030 + + dix: remove 'register' keyword for all variables. + +commit ceca5670fee99b5feceaa2453f1ac32d1bfe7dcd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 8 17:17:23 2007 +1030 + + dix: Each device needs to differ between a core grab and an XI grab, + otherwise a Xi grab may overwrite or release a core grab. + Replace grab and associates with coreGrab and deviceGrab structures, + adjust rest of dix/Xi/etc to compile. + + xfree86: Don't check for core devices, we'll have the virtual ones anyway. + If we check, the first mouse device is duplicated and sends + double events. + +commit 40ae4f246d8818410490236ab183204a84765629 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Wed Mar 7 20:52:31 2007 -0800 + + Remove stale monitor data when output becomes disconnected. + + Remove parsed EDID and EDID property from disconnected outputs. + (cherry picked from commit ae9d5aa479dd50cc81b755079fcf96a0d02f135a) + +commit b5fde366e2e21234ac0b81222fd5c42ca3e49cba +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 7 12:29:55 2007 -0500 + + Properly free device devPrivates - memory leak fix. + +commit a3d2c5d622d9ca36d6fa2966aff09524e3ea39ac +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Mar 7 11:02:47 2007 -0500 + + XORG_VERSION_CURRENT, not XF86_VERSION_CURRENT. + + If only this was the least wrong thing in this code. + +commit aaef4d6a4121d9341b670a0ce8fabc3b491049cf +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 7 09:57:02 2007 -0500 + + devPrivates rework: move reset functions into a single call. + +commit bb111291d854b4329e47367ce3c67e8a2785e6e9 +Merge: 74175e0 e9bfb2b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Mar 7 09:03:46 2007 -0500 + + Merge branch 'master' into XACE-SELINUX + +commit 537bc2ead4d154552cbdc3a19e335f82af63792c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Mar 7 18:19:20 2007 +1030 + + Xi: Don't deactivate core grabs from non-core button/key releases. + + dix: set coreGrab flag for grabs caused by GrabPointer and button presses. + remove virtual core devices from device list, only real devices are in + the list now. + Auto-pair each keyboard with a real pointer if one is available, + provides multiple keyboards automatically after startup if devices + are configured. + fix GuessFreePointerDevice() to do what it's supposed to do. + + mi: fix: call miPointerMove from miPointerWarpCursor. + fix: remove unused id field from miCursorInfoRec + don't update sprite for virtual core pointer. + +commit e9bfb2b3d7dfaafd90d2ad0fa3d0e1acced4380b +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Mar 6 23:19:30 2007 -0800 + + Add hw/xfree86/docs/README.modes, documenting new mode setting APIs. + + This document covers both API and xorg.conf usage of the new mode setting + APIs. + (cherry picked from commit a59c31b0f7b94ed1f395c7586c37ef5fe7ba2a25) + +commit 72a23d88d73a8c72ed18847b004db05092d3e7be +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Mar 6 23:15:34 2007 -0800 + + Add xf86CrtcScreenInit to share initialization across drivers. + + xf86CrtcScreenInit performs initialization that needs to happen at + ScreenInit time. + (cherry picked from commit 558a4f5588ad2ec11254e0b5d6ce9515b137369e) + +commit 81526232bc0119d2ec7b8590be4f78cf066ae359 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 6 17:19:11 2007 -0500 + + remove PIXPRIV check as this flag is always set. + +commit a7cd53deb99957dec27a55ffd75e548b322ae0ce +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Mar 6 15:32:13 2007 -0500 + + remove PIXPRIV checks as this flag is always set. + +commit 024bbc7cbb924daaf3e305ddfc8e74509acd1e15 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Mar 6 16:18:59 2007 -0800 + + Bug #9931: Fix linear allocations with a non-1-byte granularity. + + This was introduced in 83080809f9a1c1d24b0318e54632f25f5940da25. Instead of + aligning the offset, it doubled it. Results were appropriately spectacular. + +commit 9d94c137596d3f9d9118ec70455b7a30b3582046 +Author: Ben Byer <bbyer@apple.com> +Date: Tue Mar 6 11:09:30 2007 -0800 + + updated todo list + +commit 81d581e655fc989da3be4256b83849a63b8607b7 +Merge: a05ffca d5aba03 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Tue Mar 6 10:37:29 2007 -0800 + + Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver + +commit a05ffca8dd0da9bdb5c1bf4c481028aeabf21e34 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Tue Mar 6 10:36:51 2007 -0800 + + rewrote event handling, Xquartz now has working mouse and keyboard. use it\! + +commit d5aba03feff41722c72b4c6193f09d141cbf1678 +Author: Drew Parsons <dparsons@debian.org> +Date: Tue Mar 6 23:53:23 2007 +1100 + + Xprint: shorten font filename to fit in tar length limit + + The length of the Xprint font file NewCenturySchlbk-BoldItalic.pmf + pushes the full path over the traditional 100 character limit for + tarballs (when module version number is included). Shorten it to + NewCentSchlbk-BoldItal.pmf to get back below the limit and rename + other font files in that family to match. + +commit 3206e9225897989638ad553e1f392b918ac4d21f +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Tue Mar 6 02:31:59 2007 -0800 + + moved new event-handling code from X11Application.m to darwinEvents.c in preparation for making all Darwin servers use it + +commit 0ccd1443fd6db397b42e5b99ce733ce1316c785e +Merge: ec1ef8a 9b6bb06 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Tue Mar 6 01:04:50 2007 -0800 + + Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver + +commit ec1ef8a56d6217ca2b04899043874ce0bcad9784 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Tue Mar 6 00:57:23 2007 -0800 + + Fixed Darwin's Makefile.am to fix a problem building X11.app + +commit 9b6bb06f13a71f6078f762b4a78fa516faccb638 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Mon Mar 5 23:49:35 2007 -0800 + + Allow relative positions to use output names or monitor identifiers. + + Previous version used monitor identifiers if present, otherwise output + names. That caused existing working configurations to break when additional + information was added to the configuration file. + (cherry picked from commit 3f5cedf00a82f08a433c95ffbb7f8ac69dcf6a50) + +commit bed76caa6caaea6a6598755b82a54425a9d9f73e +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Mon Mar 5 23:36:00 2007 -0800 + + Use EDID data to set screen physical size at server startup. + + Screen physical size is set to a random value before the RandR code gets + control, override that and reset it to a value based on the compat_output + physical size (if available). If that output has no physical size, just use + 96dpi as the default resolution and set the physical size as appropriate. + (cherry picked from commit 843077f23a1b49bd712d931421753e3a09d4008c) + +commit 47f8361c3a64834587e54507653d8d5b258c2530 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Mon Mar 5 22:07:01 2007 -0800 + + Add xf86SetDesiredModes to apply desired modes to crtcs. + + xf86SetDesiredModes applies the desired modes to each crtc (as selected by + xf86InitialConfiguration initially and modified by successful mode settings + afterwards). For crtcs without a desired mode, pScrn->currentMode is used to + select something workable. + (cherry picked from commit bcade98ccaa18298d844a606cb44271f0254c185) + +commit 33d2cf93fb50464941e74efe246b10aee212223a +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Mar 3 23:10:31 2007 -0800 + + Move xf86SetSingleMode into X server from intel driver. + + This function applies a single mode to the screen (as from RandR 1.1, + XFree86-VidModeExtension or XFree86-DGA) using a policy that selects one + output to reconfigure to the requested mode and then makes all other outputs + fit within that size. + (cherry picked from commit 5a595c1f767a8d666348b845d18934aee0cfe38f) + +commit 689d52b6242434507a64a8fff27b01607628c393 +Author: Jens Granseuer <jensgr@gmx.net> +Date: Mon Mar 5 15:31:44 2007 -0800 + + Bugzilla #7145: fix build with gcc 2.95 + + Bugzilla #7145: <http://bugs.freedesktop.org/show_bug.cgi?id=7145> + Patch #8987: <http://bugs.freedesktop.org/attachment.cgi?id=8987> + +commit 74175e0af74c530cb712a6772d3c5d61d1be9748 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 5 12:34:37 2007 -0500 + + devPrivates rework: remove some debugging code from dixFreePrivates. + +commit 23fc429aad5b2721911862617772c314e1036bb0 +Merge: e684824 fe7b8f4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Mar 5 12:18:54 2007 -0500 + + Merge branch 'master' into XACE-SELINUX + +commit e684824709fa8ffe03dde3c8dfbc58c267515a4f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 1 15:00:02 2007 -0500 + + devPrivates rework: redo interface and implementation. + +commit fe7b8f4237874e3e45fe25a6bf06faddfa1ab8e1 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Mon Mar 5 03:48:27 2007 -0800 + + began to factor out code to move to darwinEvents.c + +commit 537dc5ecde46d0525c503d1d2b39b6eb89a1298e +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Mon Mar 5 02:30:56 2007 -0800 + + started moving new input code into darwinEvents.c so that it may be shared by the three servers + +commit 39aa79177196e21bcdbaf8e44adead9ef91e6ee5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Mar 5 15:31:16 2007 +1030 + + dix: Add GuessFreePointerDevice(). Runs through device list and tries to + find a pointer that hasn't been paired yet. + + xfree86: Use GuessFreePointerDevice() for newly connected non-sprite devices. + +commit 8ba5e8d82014b774a52f3e050ddbbb8bde4e0933 +Author: Dave Airlie <airlied@linux.ie> +Date: Mon Mar 5 13:46:41 2007 +1100 + + add a standard connector type and name for us as an output property + +commit 2e31872e05c2408d53ba0182bcddc5dabb3615fe +Author: Dave Airlie <airlied@linux.ie> +Date: Mon Feb 26 09:40:00 2007 +1100 + + modes: add commit/prepare hooks + +commit 1f0075786fedde538a95e2f39681052e25021d88 +Merge: 57aa5e9 12175b6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Mar 5 12:37:17 2007 +1030 + + Merge branch 'master' into mpx + + Conflicts: + + configure.ac + dix/getevents.c + hw/xfree86/ramdac/xf86Cursor.c + mi/mipointer.c + xkb/xkbUtils.c + +commit 06b01186f6ae17aafdd1f628c306466ddea9e065 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sun Mar 4 17:15:24 2007 -0800 + + Remove debugging ErrorF from rotation code. + (cherry picked from commit e6af7569f201842b4754aec6e72b30dc2daefdfb) + +commit c14507b6837387d867792a24778786311b2b38d5 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sun Mar 4 17:06:37 2007 -0800 + + Handle non-zero origin rotated crtc. Damage crtc area on re-rotate. + + Box transformation from source to dest area was broken, leaving the wrong + areas painted when the crtc origin was non-zero. + + When rotating from left to right, the pixmap doesn't get reallocated, and so + no damage was left in the pixmap from xf86RotatePrepare. Separately damage + the whole crtc area when this occurs to repaint the area. + (cherry picked from commit 2a50ca2160bc05af1c24421ec079e902ff730277) + +commit 97978b515b7af5fbaaa32b1729e835f3bfb9f5c6 +Author: Drew Parsons <drew@pug.localdomain> +Date: Sun Mar 4 16:28:54 2007 +1100 + + Xprint: fix font symlinks + + Change symlinks to Xprint base fonts in model/PSdefault using local + relative links. This facilitates moving the Xprint config files, for + instance for FHS compliance placing data files in /usr/share rather + than /usr/lib. Also ensures NewCenturySchlbk-BoldItalic.pmf is + installed. + +commit 215e3691b76a63e6af19865790193b20b105ec5a +Author: Ben Byer <bbyer@xyzzy.local> +Date: Sat Mar 3 21:52:56 2007 -0800 + + stopped using XTrans internals in X11.app because they're apparently no longer public + +commit ea8dcc458ea8870126cf8d3e21cab9d63d094c5e +Author: Ben Byer <bbyer@xyzzy.local> +Date: Sat Mar 3 21:51:20 2007 -0800 + + Makefile fix for X11.app + +commit 18508212599bf0964c450c69b9790208e5d428be +Author: Ben Byer <bbyer@xyzzy.local> +Date: Sat Mar 3 21:41:33 2007 -0800 + + fixed X11.xcodeproj to get CFLAGS and LDFLAGS from autoconf script + +commit 7f2b9f3790456044d01bf8e6404f9a1239b41da6 +Author: Ben Byer <bbyer@xyzzy.local> +Date: Sat Mar 3 19:27:53 2007 -0800 + + autoconf fixes for XDarwin (created DARWIN_LIBS) + +commit 12175b668a94e23994f724b366a691ec312cce69 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 15 17:50:02 2006 +1030 + + o fix minor error in comment for GetPointerEvents() + +commit ea1a72946d1aa4c256e6afb9d834c582ba4ac3a1 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Feb 28 14:26:47 2007 -0800 + + Add a canGrow argument to xf86InitialConfiguration. + + canGrow indicates to the DDX that the driver can enlarge the desktop via the + xf86_config->funcs->resize hook. If so, xf86InitialConfiguration will set + virtual[XY] to match the configuration it chooses and will leave the crtc config + size ranges alone. If FALSE, it will bloat the screen to fit the largest probed + mode and also set the crtc config max size to limit the desktop to the initial + virtual[XY] size. + +commit 04d15da95d608766c7832a7aa881be499c1395ba +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Feb 28 13:36:58 2007 -0800 + + Add a screen resize hook to xf86CrtcConfigRec. + + This hook is called when the DDX needs to resize the screen. The driver is + responsible for changing virtualX and virtualY, along with any other related + screen properties (devPrivate.ptr, devKind, displayWidth, etc.). + + Use the size range from the crtc config instead of randrp->virtual[XY] when + reporting the min and max screen sizes to the DDX. + +commit b11dfac287d65de7b83f63749087cba4e8ddaf4a +Author: Matthias Hopf <mhopf@suse.de> +Date: Fri Mar 2 12:30:26 2007 +0100 + + Legacy framebuffer support wasn't compiled if Xorg wasn't explicitly enabled. + +commit 57aa5e908dc11d5d8c27ed705c526f1416c1e8ad +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Mar 2 17:14:37 2007 +1030 + + dix, Xext, Xtrap, Xi: replace inputInfo.pointer with PickPointer where + possible. More replacements to come. + +commit e43b8a4e40991ca6e545bda4cf9b9bd7a2bf22e2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Mar 2 15:21:46 2007 +1030 + + dix: Add ClientPointer to client, used for picking which pointer to use in + ambiguious request. PickPointer and PickKeyboard are used for getting + the appropriate pointer when situation is unclear. + Fix some issues with InitializeSprite. + + dix, xfree86: Remove last traces of InitSprite. + +commit 2dafc46e3d814e02b25e5a2fa2e931f0257402a8 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Thu Mar 1 17:44:39 2007 -0800 + + Fixed pointer events in Xquartz -- Keyboard events work, but + the keycodes are incorrect. + +commit 74f1de1de9633119c2cf26086875717181c8a6f7 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Mar 1 12:07:33 2007 -0500 + + devPrivates rework: unhook resource system; will try a different approach. + +commit 39ecd6fff4f946deebe310b4b26b171c842db223 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Thu Mar 1 01:45:19 2007 -0800 + + Rewrote parts of the Xquartz event-handling code (thanks daniels and whot!) + It should still be considered a work in progress, but mouse events almost work. + +commit ed7ccc481ad1caaa518cafe944c2327a5d0b6c65 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Thu Mar 1 00:51:10 2007 -0800 + + AIGLX support for Darwin -- works well enough to run + glxgears and glxinfo, but still needs more testing. + +commit 43bd35fcf85b51b7e5714844bade90184dbd746f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 1 17:19:37 2007 +1030 + + dix: Remove InitSprite, work can be done by InitializeSprite. + Free sprite struct if a spriteOwner is paired. + + xfree86: Use PairDevices instead of passing booleans around when creating a + sprite. + + Xext: Switch back to using LookupPointer/KeyboardDevice instead of + inputInfo.xyz. + +commit 90ca76ba28fcd8bed945e33cf9674784fa2eb533 +Author: Jay Cotton <jay.cotton@sun.com> +Date: Wed Feb 28 17:40:58 2007 -0800 + + Add sun_apm.c for Suspend-and-Resume support on Solaris + + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6205248> + +commit 06c3021aec720837bef432656e88ae9b4e35101d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Feb 28 16:09:11 2007 -0800 + + Don't crash setting a NULL mode with a randr classic DDX. Also remember to update the screen size during modesets. + +commit 68c64ad7b1eea79c786b5a7f3459076780163a47 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Mar 1 09:51:20 2007 +1030 + + Xext: Update device's lastx/lasty when sending a motion event with XTest. + +commit 8b245758845523d5f8f017bb9d0e9aa57b616c28 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Feb 26 17:45:40 2007 -0800 + + Return BadMatch if a client tries to clone non-cloneable outputs. + +commit 2a35d44b6d87f96a7ce90dc8f0142f48cc176e95 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Feb 28 15:43:06 2007 +1030 + + Update device valuators on XTest motion event, otherwise the cursor jumps + between coordinates stored in device and coordinates sent by the event. + +commit d9bcb22d199e8444b9762a35754e04d327dd5915 +Merge: 272d934 c16343a +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Tue Feb 27 16:28:20 2007 -0800 + + Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver + +commit 272d9341d0f7c3e9e0c9b9a8c0d4d8779cdcc5cf +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Tue Feb 27 16:27:26 2007 -0800 + + fix for hw/darwin/Makefile.am to properly use XSERVER_LIBS + +commit c16343ac2ca18391b21022b2edd02ad9f413d2b3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Feb 27 14:14:47 2007 -0500 + + Make mfb, cfb, and afb support configurable at build-time. + +commit 5680efc0d2baf0a9451e82e490e3690fc23dda0f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Feb 27 09:55:48 2007 -0800 + + Sun bug 6529003: Xorg should not be including <sys/immu.h> on Solaris + + <sys/immu.h> was removed from the latest Solaris Nevada build, but it's + been useless to Xorg for a long time (it only declared a couple of kernel + variables) + <http://bugs.opensolaris.org/view_bug.do?bug_id=6529003> + +commit ab0fc8c1ad7ea2dc3389a4a4bb1c45bbded5e7ad +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Tue Feb 27 00:14:35 2007 -0800 + + verbiage corrected per daniels + +commit cdd4c84572cc3bdd004f8dca6d8b64e710344ac0 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Mon Feb 26 23:57:02 2007 -0800 + + added hw/darwin/README.apple file with some todo items and props. + +commit 776d4d6587c57f94bca8732f915d07a0d4e137c8 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Mon Feb 26 23:40:00 2007 -0800 + + X11.app now builds correctly + +commit 154d2c13f4ec22b7e6332808bbcd049d63784891 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Mon Feb 26 19:39:26 2007 -0800 + + more changes for X11.app + +commit fa06e11f972e2a75c84b2f1586997ffc1239cbd9 +Author: Ben Byer <bbyer@bbyer.apple.com> +Date: Mon Feb 26 17:06:53 2007 -0800 + + added hw/darwin/apple directory, which contains source and data files to build + a version of the X11.app shipped with Mac OS X, using the X.org server. + +commit a16360733ea393ec1fc267e88fc604d9d7534484 +Author: Jay Estabrook <Jay.Estabrook@hp.com> +Date: Sun Feb 25 19:58:26 2007 +0000 + + Fix root bus/domain selection on alpha + +commit 566610680c4e1cab3e7fc7146adbeaba52fdd0ad +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Fri Feb 23 15:20:35 2007 -0500 + + Don't install libi2c.a + +commit 81372f9096b952f4be545654b0b44ac37ef4f2c2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 23 13:23:12 2007 -0500 + + devPrivates rework: hook up new interface in resource system; add new + resource-adding function that takes an additional ScreenPtr argument. + +commit 16f2b8892d9ebcef6410a675d10549043223f617 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 23 13:20:43 2007 -0500 + + devPrivates rework: add new interface implementation. + +commit 779faccfb78648a9f7e70b77dcfa9f6e19559772 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 23 13:19:53 2007 -0500 + + devPrivates rework: add dix header file containing new interface. + +commit bc4ae25433e38a25a2012f9f233d500665172a4b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Feb 23 12:06:51 2007 +1030 + + xfree86: Don't initialize sprites for devices that don't own a sprite (stops + keyboard hotplug segfaults) + +commit af550ea91c451cf4f831c2413266a19d1f211d0e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Feb 22 14:38:40 2007 -0800 + + Move SecurityPolicy file format from Xserver(1) to it's own man page + + Don't make users looking for Xserver information page through pages of + details only interesting to the handful of people writing security policies. + +commit b1142cdbce76fed8cb22ba6d7ac027751dd56a76 +Author: Brice Goglin <brice.goglin@ens-lyon.org> +Date: Thu Feb 22 12:26:04 2007 -0800 + + Bug #10034: 'man Xserver' typos: s/dqoute/dquote/ + + Bugzilla #10034: <http://bugs.freedesktop.org/show_bug.cgi?id=10034> + Patch #8780: <http://bugs.freedesktop.org/attachment.cgi?id=8780> + +commit 4b8b0e377a27ec904b2028c89aed11c6416af26c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 22 20:00:59 2007 +1030 + + Xi: Add access control request handling. + + dix: New file access.c to handle all access control for devices. + +commit 9a3eb0357e779d5d5f76858f23667956c4c5d721 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 16 19:30:03 2007 -0500 + + devPrivates rework: add RC_PRIVATES class, make ResourceRec visible in + the API, and add extra fields and structure supporting private storage. + +commit cd0af7a7856e8246e27acc5513d219a094211625 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Feb 21 10:08:41 2007 +1030 + + Xi, dix: Only one client at a time can change the pointer-keyboard pairing, + using xRegisterPairingClient request. + +commit 3344a4eda704edc7dc30037f095de277a60a70bb +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Feb 15 16:27:50 2007 +0100 + + DRI: Make sure number of DRI windows is accurate in driver ClipNotify hook. + + Always call DRI{De,In}creaseNumberVisible (which in turn calls + DRIDriverClipNotify) after updating pDRIPriv->nrWindows. + +commit 3c7a27dc77595ad018bb7c4f7cef6bc178268cb6 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Feb 14 16:17:18 2007 +0100 + + DRI: New ClipNotify driver hook. + + The hook is called whenever the clipList of any DRI window changes, be it via + DRIClipNotify, DRICreateDrawable or DRIDrawablePrivDelete. This allows the + driver to keep track of which DRI windows are visible where. + +commit eedf148e5a1273ebbf4dc8dcac9c435712fc00ea +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Feb 2 18:27:40 2007 +0100 + + Track number of visible DRI windows separately for transitions. + + This allows e.g. doing page flipping with multiple DRI windows as long as + only one of them is visible. + +commit 8a42af6a935b1cf0e15102e986bb527f4fab31a8 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Feb 19 15:28:37 2007 -0800 + + Check for clientGone before sending events from XFixes (bug #1753). + + Freeing resources during client closedown can cause cursor changes which + attempt to send cursor events through the XFixes extension; a client in the + process of closing down has no file to send events to, causing a crash when + this path is hit. + +commit 4660eaaffb36f526f71d5847ae1309c10ee133c6 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Sun Feb 18 14:09:51 2007 -0800 + + configure fixes for darwin + +commit 5631a67f648f5f151a849a918ee12871c71c32e9 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Fri Feb 16 10:06:22 2007 -0800 + + Don't set subpixel order during startup; the screen won't be ready. + + in xf86CrtcSetMode, scrn->pScreen will be NULL during server startup time, + so don't try to set the subpixel order. subpixel order will be set in the + randr initialization anyways. + (cherry picked from commit 5f6f8616d862ce4a37f6d3df4bdbc44fd21cc82a) + +commit 096965ec9c7514f0c9fc0d17e5166f2d26781f87 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Feb 16 02:17:11 2007 -0800 + + Ensure drivers can use new modes header files. + + New modes header files required a few minor changes to be used by external + drivers, the most notable of which is the publication of the config file + parser header files. + +commit 55797dd252382d35ebab5d9e18a5e0e77872d775 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Feb 16 00:56:00 2007 -0800 + + Respect rotation in initial screen size computation. + +commit e4507825bf0328ea59673f2bbe652de3a9105c86 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Fri Feb 16 00:41:29 2007 -0800 + + Enable startup-time rotation; change rotation pixmap creation API. + + Add monitor "Rotate" option taking one of "normal", "left", "inverted" or + "right". However, because initial mode selection is made before the screen + is completely initialized, we cannot create the shadow pixmap object at this + point. Pend the shadow pixmap creation until the block handler. + + Note that this code is not completely functional yet. + +commit 8606aeb9b2ab2dafc11e64436db4d3a7e67dbcc0 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Feb 15 22:23:16 2007 -0800 + + RRConfigureOutputProperty is a variable length request. + + Replace REQUEST_SIZE_MATCH with REQUEST_AT_LEAST_SIZE + +commit a88844eccb0e423e71d4fcb286866a026308babd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Feb 17 20:35:07 2007 +0200 + + configure.ac: disable dmx per default + + Disable DMX until it gets ported to the new input API. + +commit e9a2cc7d9fcc73e16576be2522522cce675dc3f3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Feb 17 16:17:48 2007 +0200 + + config: error message cleanup + + Demote failure to connect from ErrorF to DebugF. + +commit 81876bc5ddc2f3eda5078fe4bd101917fb32e586 +Author: Ben Byer <bbyer@apple.com> +Date: Sat Feb 17 04:07:11 2007 -0800 + + oops, missed a spot + +commit d287b76471f66c9aea54f969d050b35643cb2501 +Author: Ben Byer <bbyer@apple.com> +Date: Sat Feb 17 03:47:42 2007 -0800 + + cleaned up some linking ugliness in hw/darwin/quartz + +commit 81444486be4f182dde778bac6f7edcbfc4368482 +Author: Ben Byer <bbyer@apple.com> +Date: Sat Feb 17 02:23:11 2007 -0800 + + autoconf goodness for XDarwin, courtesy of pogma + +commit cf4994b0db2fef4c10ce8804adef766bc5118daf +Author: Ben Byer <bbyer@apple.com> +Date: Sat Feb 17 01:21:43 2007 -0800 + + dix mods for Darwin + +commit cece0601571f6304e392a3a40505664544b249f3 +Author: Ben Byer <bbyer@apple.com> +Date: Sat Feb 17 01:00:13 2007 -0800 + + build fix for configure.ac / BUILD_DARWIN, oops + +commit 00b0657b815b95964401c3e36eed54063afbd003 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Sat Feb 17 00:55:32 2007 -0800 + + glx fixes for XDarwin + +commit 93777c7b96e560da087963040e372aecbfca7bbc +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Sat Feb 17 00:22:39 2007 -0800 + + more patches to make the Quartz part of XDarwin work again + (thanks Peter and Torrey!) + +commit 612144c811fdf06b7c03cf48a321388fe411acd4 +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Sat Feb 17 00:09:58 2007 -0800 + + More build fixes / updates for XDarwin: + quartz/cr: "Cocoa Rootless" support (deprecated in favor of xpr?) + quartz/fullscreen: Fullscreen support using Xplugin (not yet functional) + +commit 68d39d8571d8717d26cedc84015d537549520a14 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Feb 16 23:02:13 2007 +0200 + + kdrive/ephyr: fix keysym type confusion once and for all + + Take keysyms in as an XID in hostx_load_keymap() and explicitly + convert them to CARD32 for loading into the server. Fixes Xephyr on + AMD64, wa-hey. + +commit 5507cb885d861e974be240120ada2ace2a980a72 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Feb 16 23:01:27 2007 +0200 + + kdrive: delete input debugging, yet again ... + + I have no idea how this keeps on coming back. + +commit 2534f5a9027c196f677923aaa38fa9ed9917f73d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Feb 16 15:33:48 2007 -0500 + + Remove nasty function pointer type from DevUnion, return to documented type. + +commit 84efe23ae834dd3a4d3f3e08832b69469c7382aa +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Fri Feb 16 04:37:38 2007 -0800 + + updated darwin/quartz/xpr (libXplugin interface for Mac OS X) support + +commit 5e7f7436a755a33e48ab91831cc6af710a8344ef +Author: Ben Byer <bbyer@bbyer.(none)> +Date: Fri Feb 16 04:12:26 2007 -0800 + + merged in miext/rootless changes for XDarwin support + +commit f350909d1696fcfda87e8f12c729254d762313c9 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Feb 15 21:50:48 2007 -0800 + + Kludge around duplicate code added in hw/xfree86/modes. + + Code added in hw/xfree86/modes came from the server-1.3-branch. + Portions of this code had previously been integrated into xf86Mode.c + and edid_modes.c. + + To preserve hw/xfree86/modes as much as possible, the duplicate code from + the other files has been disabled; a more careful review would figure out + where that code actually belonged. + +commit 258beebc77510f84fbea66d6ebf29c5097bd11db +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Feb 15 20:13:15 2007 -0800 + + Report correct RandR 1.0 sizeID. Report correct subpixel order. + + RandR 1.0 sizeID must be computed the same way every time, so when reporting + it in the ScreenChangeNotify event, just construct the usual 1.0 data block + and use that. + + subpixel geometry information can be computed by looking at the connected + outputs and finding any with subpixel geometry and using one of those for + the global screen subpixel geometry. This might be improved by reporting + None if more than one screen has information and they conflict. + +commit ef6b1235fd7d6dc422e8a150c089496a8e648067 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Feb 15 11:27:35 2007 -0800 + + Allow new modes code to build inside drivers as well as server. + + Use config.h for driver builds where xorg-config.h isn't available. + +commit 3dbe8f6b6ea32a9a137ad6e9235f74009b095bd8 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Thu Feb 15 17:51:01 2007 +0100 + + Distribute hw/xfree86/modes. + +commit d4eb4d065032112a38444e36f791cb468a5ca8f4 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Feb 15 20:36:20 2007 -0800 + + Merge crtc/output-based mode selection code. + + This code comes from the intel driver, so there's no history in this tree. + + As the crtc/output-based mode selection code uses ddc, the ddc and i2c + modules have been merged into the server. Attempts to load them are safely + ignored now. + +commit 37fe4c49dc3a5faf2d3d56112b6bd78453045f6a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Feb 16 09:57:57 2007 +1030 + + mi: Move WarpPointer event generation to miPointerMove to avoid duplicate + events, cache event array allocation. + +commit c2f3f705f1db8ca78292912544a7e416116175f3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 15 14:38:24 2007 -0500 + + Bug #6988: Change behavior of Security extension per user feature request. + +commit 811675733e97416c990e6dc9c19271b43d96248d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Feb 15 19:09:00 2007 +0200 + + os: fix client privates leak + Minor leak here. Oops. + +commit 8f6961d385bda92703f18090cff551409d2710c9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Feb 15 19:08:46 2007 +0200 + + configure.ac: add xdarwin stubs + Add stub AM_CONDITIONALs to at least fix the build. + +commit a3b62623b8aac56b219633bdb2c2f6de19b0580b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Feb 15 17:07:42 2007 +0200 + + change versioning for new server version scheme + See: + http://xorg.freedesktop.org/wiki/XDC2007Notes#head-2719037a1905516c45cf74f0e155c8703221e446 + +commit f452507ca9209598401d15da0039aaa4e1fed1a3 +Merge: 0463283 8116757 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 15 09:47:20 2007 -0500 + + Merge branch 'master' into my-XACE-SELINUX + +commit 04632835b7402456fdcf6c8fa01970cd2804e27c +Merge: 88f89b9 9ecf79c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Feb 15 09:27:05 2007 -0500 + + Merge branch 'master' into my-XACE-SELINUX + +commit 0f6dd4aea6176507dbe1c90c950d332fecbcaacb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Feb 15 16:14:57 2007 +0200 + + kdrive/ephyr: free screen struct + Free screen->driver on screenFini, instead of just leaking it. + +commit 9ecf79ca0111dd899ca88dd54156f71013220fcc +Author: Ben Byer <bbyer@apple.com> +Date: Thu Feb 15 05:22:21 2007 -0800 + + Beginnings of an update Darwin driver + +commit 136bb4874aadf4a731d7eb8671e8bb641f9980a7 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Feb 15 05:14:38 2007 -0800 + + iokit support for XDarwin + +commit 3ead1afe78d2913f08c8144cb2d3813c6b159488 +Author: Ben Byer <bbyer@apple.com> +Date: Thu Feb 15 05:09:29 2007 -0800 + + Beginning of patches to add XDarwin support to the modular tree; + special thanks to Torrey Lyons and Peter O'Gorman for making this possible. + + This is the automake framework for the XDarwin.app interface files. + +commit f6c3b9fa97ccf85e96f15435d564a1c261e40532 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Feb 15 13:51:20 2007 +1030 + + xfree86: mouse and keyboard hotplugging support. New mouse devices will get + new cursors, keyboard devices use VCP's focus until paired. + +commit d570ff7c81858a3174686b46a088f67563b4a2d5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Feb 14 17:09:33 2007 +1030 + + fix: WarpCursor needs to send MotionNotify. + +commit c4fe1bcce1c1e4822e688959b331b47a051d6e0a +Merge: e540d57 d570ff7 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Feb 14 15:39:52 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + +commit e540d572c5acba877b3ce01e7b31e399dac2d44a +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Feb 14 15:38:10 2007 -0800 + + Merge fix missed on previous commit. + +commit 81aa7f059d3cfd8d28420b7932b8ff7e06d67979 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Feb 14 12:48:15 2007 -0800 + + Add missing dirty marking in a couple of fallback cases in the exaGlyphs path. + +commit a5f19c5150a7b3dc2ff3ad759ee1a6ab0ad8925c +Author: Eric Anholt <eric@anholt.net> +Date: Wed Feb 14 10:39:46 2007 -0800 + + Mark sync when UploadToScreen succeeds in exaGlyphs(). + +commit a492d494f51caf15a5cb979dc335387486c105d1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Feb 13 18:32:59 2007 -0800 + + Update Xvfb man page: remove monolith build instructions, use /var/tmp instead of /usr/tmp + +commit 25104ed2e6050f86691104b34eeaf3147eb83c4a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Feb 14 11:26:53 2007 +1030 + + dix: fix typo in condition. + +commit 33ef546b942977bb2573156eaba5269350d16f99 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Feb 14 11:18:43 2007 +1030 + + dix: Clean up GetPointerEvents. If pDev == inputInfo.pointer, assume that + we do not want Xi events. + + mi: Remove POINTER_CORE_ONLY flag. + +commit a23b0b069cac8a48e2b306b2095515d75f647705 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Feb 12 17:50:00 2007 -0500 + + Typo fix. + +commit d21c95f80bdba2f29eedd57fb0b00e580391c08e +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Feb 12 17:22:39 2007 -0500 + + Hook up --with-builderstring for vendor build identification. + +commit 46784d24c11767455a4986449a8037295912dcee +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Feb 12 17:18:29 2007 -0500 + + Remove spurious LIBADD from xf4bpp + +commit 16eb7254f861465f988ae3861ac3449c2c966062 +Merge: 3814862 c4b7e9d +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Feb 9 12:38:49 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + +commit c4b7e9d1c16797c3e4b1200b40aceab5696a7fb8 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Feb 6 14:57:22 2007 -0800 + + Add an RDTSC implementation to the x86 emulator. + + This instruction is being used in some debug VBIOSes. This implementation + doesn't even try to be accurate. Instead, it just increments the counter by a + fixed amount every time an rdtsc instruction in encountered, to avoid divides by + zero. + +commit 262b9b104a04e55969593ef96a16004e53ecd00a +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Feb 6 17:30:22 2007 -0500 + + Use the new 8888x0565mmx function in fbpict.c + +commit 876b806ec09d5ff0c6cd19df91006c4eefedfaa6 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Feb 6 17:16:23 2007 -0500 + + Reapply patch to fix AMD CPU detection + +commit 13568d2aa43da4216bbcb46e1125ff28c323ac54 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Feb 6 17:12:01 2007 -0500 + + Revert "Fix for AMD cpu detection. Bug 9614, Dan Williams." + + This reverts commit b2cd3b133748cc5aa541905a703a6fdb1cbbb1e6 since + unrelated changes in fbpict.c broke the build. + +commit 5a3334410367a2186b2c667fa1eb6cf0baf93e95 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Feb 6 17:11:01 2007 -0500 + + Add new fbCompositeSrc_8888x0565mmx() function, based on patch by Dan + Williams. Bug 9682. + +commit b2cd3b133748cc5aa541905a703a6fdb1cbbb1e6 +Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> +Date: Tue Feb 6 16:43:37 2007 -0500 + + Fix for AMD cpu detection. Bug 9614, Dan Williams. + + Credit for the fixes in this patch goes to: + + Marco Gritti <mpg at redhat dot com> + Jordan Crouse <jordan dot crouse at amd dot com> + +commit 7cd73b00a29469d37a7f526cc9b35cc927a13ae2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Feb 5 14:48:48 2007 +1030 + + dix: If POINTER_CORE_ONLY is set, GetPointerEvents() only creates a core event + + mi: fix: Create motion event in miPointerMoved + +commit 760a38c4c7ab66ae653d3acb92f5cda4bd44edd6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Feb 5 03:39:36 2007 +0200 + + XkbCopyKeymap: fix copy-and-waste accident + + When we reallocated modmap, we accidentally clobbered syms with the + result, leaving syms definitely too small, and modmap also potentially too + small (as well as not actually allocated anymore). + +commit 17d85387d1e6851d35474b65929e268ca64ef65b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jan 18 15:23:57 2007 +1100 + + dmx, vfb, xnest: fix fbcmap compilation + + Don't always define XFree86Server, but only for damn fbcmap.c. + Split fbcmap.c into its own library to achieve this. + +commit a309c936bb79e2fea04a96ce33c7da99ed902484 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Feb 5 11:38:44 2007 +1030 + + xkb: Daniel's patch to stop evdev keyboard segfaults. + + mi: Remove quickfix from ba547d4f6a2707f51f0d826389d2d418fb62367a + +commit 236f04b638e7d4d1656c6bedd8a6e8d7cec285ec +Author: Dave Airlie <airlied@linux.ie> +Date: Mon Feb 5 09:09:12 2007 +1100 + + remove array_cache from everywhere + +commit eb228e8d1eaa78911541b2fec5d04a74c1299718 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Sun Feb 4 22:06:59 2007 +0000 + + clean up more of the vbo fallout + +commit fb1bc1c65b88527b42a0e4abed23e5ddaae711b7 +Author: Dave Airlie <airlied@linux.ie> +Date: Sun Feb 4 18:39:58 2007 +1100 + + add vbo to .gitignore + +commit d8e148ec841d340327e6813127b0e0ffc4db712d +Author: Dave Airlie <airlied@linux.ie> +Date: Sun Feb 4 18:39:04 2007 +1100 + + update xserver for vbo code in mesa + +commit 5dcad9e9d7d9993d65f989219bee94a060bbf476 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Feb 2 14:44:55 2007 -0800 + + Fix bus error on startup in 64-bit Xephyr + + hostx_get_visual_masks takes unsigned long * arguments, but was being + passed pointers to CARD32's. + +commit 170a55022ebc7b148bff93886eda152a0d5ce79a +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Feb 2 20:56:12 2007 +0000 + + remove file + +commit e6a505be84f5f72349d6860dc5a5058367516019 +Author: Dan Nicholson <dan@conor.dwcab.com> +Date: Fri Feb 2 20:53:01 2007 +0000 + + The array_cache sources don't exist anymore in the Mesa tree, + so we shouldn't try to build them. + +commit af20485ec370801f2aabfaeae17bbd030a849bd1 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Feb 2 19:14:46 2007 +0000 + + Remove array_cache for recent Mesa changes + +commit cf5b29d75dad7c74543f49f010c817623a3df747 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Fri Feb 2 12:57:38 2007 +0200 + + dmx: drop leftover __GLXdrawablePrivateRec struct. + +commit 4f2f3233c808fd86bf9f6c09937feda9e0b367fd +Author: Eric Anholt <eric@anholt.net> +Date: Thu Feb 1 15:10:29 2007 -0800 + + Fix the size expectations of xRRSetCrtcGamma. + + It was using REQUEST_SIZE_MATCH (client request length must equal request size) + rather than REQUEST_AT_LEAST_SIZE (client request length must be at least + big enough for request size), and this request has data following the request + structure. + +commit 8274ea6aa97b06a56b7468c3908894c0ff72b687 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Feb 1 12:15:54 2007 -0800 + + Set the Damage version supported in the server, instead of using damageproto. + + This was caught by distributions upgrading damageproto to 1.1, before the + server they had supported it. The server then advertised the new version + without supporting the protocol. + +commit 8bce182568f14edfb03911d8c5d791fd83bb6222 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Jan 29 17:30:59 2007 -0800 + + Restore a few important lines killed in the previous commit. + + Typical results were failure to sync, and a black screen. + +commit 3814862a869ee83d307eb01225d5949039f435d8 +Merge: a216de9 31f2d4a +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 29 15:14:31 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/os-support/bus/linuxPci.c + +commit 31f2d4a57e04f5ea635fbb50c508405c4fc37b65 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Jan 29 09:39:33 2007 -0800 + + Bug #9680: Remove bogus blank length limiting in xf86SetModeCrtc(). + + Our modes typically come from EDID or default modes, and when the monitor + asks for a specific mode, deciding to tweak it usually results in incorrect + display. And if the user is specifying a mode by hand, tweaking it then is + still pretty rude. + + Reviewed by: ajax + +commit 4aaaa70d1b52346213fad46777c006a93c4ece5d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jan 29 18:23:24 2007 +1030 + + Xi: Adding ChangePointerKeyboardPairing request + Adding PointerKeyboardPairingChanged event + Correct error values for XWarpDevicePointer + + dix: Adding device argument to SendMappingNotify + Adding spriteOwner flag to devices + +commit f3418b52dcf2ab4982504856ab9fae3e726ee6d2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jan 29 16:10:03 2007 +1030 + + mi: Fix cursor rendering issues. + +commit 15a81b6325d359990017b8e9f17ce18a7eff1354 +Merge: 3759254 cc3d66d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jan 28 17:18:57 2007 +1030 + + Merge branch 'master' + +commit cc3d66d4a53fee8f1d940bb8c7f032c94b9c25f6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 15 17:50:02 2006 +1030 + + o fix minor error in comment for GetPointerEvents() + +commit 3759254c0967ae83bdcbf097d9e8a58733c8e6f9 +Merge: ba547d4 ca5ebe3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Sun Jan 28 17:05:55 2007 +1030 + + Merge branch 'master' + +commit 1627af54497bee659ea30f2850b39cbbf576e22d +Author: Jonathan Lim <jlim@sgi.com> +Date: Fri Jan 26 13:00:45 2007 +0100 + + Call linuxPciOpenFile() for r/w access if applicable. + + Currently, the call to linuxPciOpenFile() is always made for read + only access which causes the subsequent mmap call to fail when the + memory is mapped read/write. + + Xorg #9692 + +commit a216de9b7ff55e2b73c487d037f248f00bd2e63b +Merge: 24506ea cf7ca9d +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 25 10:17:32 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + +commit cf7ca9d09cba14d107152a5179de38e5ef7bd784 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 24 20:20:48 2007 -0800 + + Plug memory leak in doLoadModule() + +commit 5abd50e37ceda134897891ed32e05215db67e0b4 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 24 18:54:38 2007 -0800 + + Correct help lines for configure's --with-vendor-name flags + +commit b32a40817fc0e2ac2edf2fa22a8813087fce2e7b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 24 16:29:49 2007 -0800 + + Correct variable descriptions in comment for SecurityCheckResourceIDAccess + +commit 24506ea65be4cb29c5e1486aa0a529a40ce5c230 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jan 24 15:33:49 2007 -0800 + + Move xf86ReadLegacyBIOS to the one place that uses it. + + xf86ReadLegacyBIOS is only used by one function in int10/generic.c. + Move a generic implementation of that function there, rename it to + read_legcay_BIOS, and delete all remnants of it from all other places. + +commit fdb3a0798f0d17e72ec7293d59a7a81b5ffdf95b +Merge: 39b51e1 a53586e +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jan 24 14:49:39 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + +commit a53586eebc166e35c1f48942205832810061daee +Author: Eric Anholt <eric@anholt.net> +Date: Wed Jan 24 13:36:25 2007 -0800 + + Warning fix for RRCrtcSetRotations(). + +commit 7a12952fd437b105ea0d013d680f9c3a775a183c +Author: Eric Anholt <eric@anholt.net> +Date: Wed Jan 24 13:34:29 2007 -0800 + + Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA. + + This is a new behavior for version 2.1 of EXA, and only takes effect if the + driver has requested that. Otherwise, the previous behavior remains the same. + +commit b6b855932109b4bc3454f07bef8cb079d79ca369 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 25 00:29:20 2007 +0800 + + Make Xinearama screen information reflect CRTC rotation. + +commit 39b51e1bfc4924fc3bda4342ef9c6c0125d9f4fa +Merge: 637b19b 788cfce +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Jan 23 13:25:56 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 788cfce911793a26aed16f38f30678ecee82c873 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Jan 23 10:15:22 2007 +0100 + + Bump video driver ABI version to 1.2. + + This is necessary because server-1.2-branch bumped to 1.1 for xf86CVTMode and + we have xf86XVFillKeyHelperDrawable on top of that. + +commit 637b19b3ee7345c2d449ce94ceabe998d817c02e +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 22 09:58:33 2007 -0800 + + Eliminate pciControlBridge, pciGetBridgeBuses, and pciGetBridgeResources. + +commit a232e4ae938fa3a68f7614995676eda7929260db +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 22 09:16:45 2007 -0800 + + Convert xf86GetPciHostConfigFromTag to get_parent_bridge. + + Convert xf86GetPciHostConfigFromTag to a new function called + get_parent_bridge. This name better represents what + xf86GetPciHostConfigFromTag is used for: walking up the lists of PCI + bridges from a device. + +commit 844560a02fa6c4ce18ea2af3ec27beaa60b7af11 +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 22 09:13:59 2007 -0800 + + Elminiate ARCH_PCI_OS_INIT. + + Never, ever use the ix86Pci stuff on Linux. This renders the whole + ARCH_PCI_OS_INIT mechanism useless. Remove it. + +commit 7dfb3cea913b02a6b36c308d1330bd40abe6b41f +Merge: c279d5f 2dc8662 +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 22 08:44:36 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 2dc866252c84ed0e7b3afa25e8a5312f448d405b +Author: Eric Anholt <eric@anholt.net> +Date: Mon Jan 22 08:41:50 2007 +0800 + + Really fix optimized render cases being hit when they shouldn't. + + I don't know how this define slipped in there. Fixes + 6fdfd9dad91d7b7aa292f8c4d268dd27c34de8d3. + +commit 88f89b9ac1b92a0916c46488350ff68c3ffdd490 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 19 19:15:49 2007 -0500 + + Policy updates: use x prefix in property and ext types. + +commit 2fb8b7f8199c35ae0870cb54b40ee28a4e01d479 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 19 19:14:51 2007 -0500 + + Split ObjectSIDByLabel into two functions since property labeling now + involves an additional compute_create lookup. + +commit 0d6d373af95d0004d33b987d14ad7e04dd5d2003 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Jan 19 14:52:23 2007 -0800 + + Update Xserver man page to match commit ed33c7c98ad0c542e9e2dd6caa3f84879c21dd61 + + Remove unused -xkbdb and -noloadxkb options. Rename -ar1 and -ar2 to + -ardelay and -arinterval, respectively. + +commit c279d5fdc53612a90f33fafe9e9c59ced008dd51 +Merge: 88f248e 14d6a9b +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 19 12:59:54 2007 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 700fccf863593cbea1691789f1f1cafc08a32fee +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 19 14:56:38 2007 -0500 + + Remove the root window context line from the configuration file. + This context will be derived through a type_transition rule instead. + +commit 3a9791b456f35adb252a9059b19265c6c447f1ba +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Jan 19 14:53:09 2007 -0500 + + Policy updates. + +commit 14d6a9b327381a6bb2dac59c62728e5fd0f0bcfb +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Jan 19 18:30:21 2007 +0100 + + fbdevhw: Only deal with RGB weight if default visual is True- or DirectColor. + +commit 27a01e100bff21ac0b70c6d72071d7226fc91264 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Jan 19 18:28:05 2007 +0100 + + fbdevhw: Consider mode set equal to mode requested if virtual width is larger. + +commit 65f4690ecb4576f60396fcccff8e5bd5d4b6645f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Fri Jan 19 17:54:03 2007 +0100 + + __glXDRIscreenProbe: Use drmOpen/CloseOnce. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=9275 . Based on patch from + Alan Swanson. + +commit 8b3a591cd39f2d51209dc71b641cac79663e1b16 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jan 18 16:03:30 2007 -0800 + + Update pci.ids to 2007-01-18 snapshot + + (includes a whole bunch of ATI device id updates) + +commit 0f0c321adf2850b3d7aafe281362bfe424cb0ca1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jan 18 15:31:53 2007 -0800 + + Make xf1bpp build correctly with compilers that don't support -include + +commit a811e92104028ae60ba69f73e32ee1e0533b088c +Author: Eric Anholt <eric@anholt.net> +Date: Thu Jan 18 14:28:01 2007 -0800 + + Account for CRTC rotation in the cursor containment code. + +commit df147c10ce597c56c16cbca552e8a3e3ecb3cdaa +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 17 16:47:07 2007 -0800 + + Xserver man page: remove bc, add -wr + +commit 2dfd1aab244a2c8da3b62b522b9a8434e474af17 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 17 14:39:28 2007 -0800 + + Always include compiler.h in cfbmskbits.h instead of checking #ifdef XFREE86 + +commit 42a48786acf54f83167de4f561526986d4e27033 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Jan 17 14:34:42 2007 -0800 + + Add a setter for randr_crtc->rotations. + +commit 88f248e67143175532cbafd6faf8fc6df97c7894 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jan 17 14:04:43 2007 -0800 + + Replace PciBusId with 'struct pci_device *' + + There's no need to store the slot information for a PCI device as its + ID. Instead, skip the middle man and just store a pointer to the + pci_device structure. + +commit 0361611080267727f570e17f2212aaa890223f6e +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jan 17 13:06:04 2007 -0800 + + Convert xf86IsolateDevice to a 'struct pci_slot_match'. + + This change was accidentally not committed on the previous commit. + +commit c1808f148405a28256e0480d6f8714691b0e964e +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jan 17 13:02:27 2007 -0800 + + Convert xf86IsolateDevice to a 'struct pci_slot_match'. + +commit d2f8c42c48ecc398d224d9e3b280a66042e68664 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jan 17 12:59:17 2007 -0800 + + Convert xf86FindPrimaryDevice to use a static buffer and snprintf. + + Rather than allocate a 9 byte buffer on each invocation, use a static + 16 byte buffer. Use snprintf for safety. This commit should probably + be cherry-picked to the trunk. + +commit 28976bebec8b6475d0703f8356edd116e25d40b2 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jan 17 12:15:09 2007 -0800 + + Eliminate unused fields in pciAccRec. + +commit f36a447d20c0a89b78c5899eeb303cab568ebac6 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Jan 16 14:49:19 2007 -0800 + + Eliminate use of Tag field. + + The Tag field was removed from the int10 structures in commit + ca9c41e09ddb72d150d86f5d372eb07eeca7c1a2. This file was over looked. + +commit cde17015dff1ced2aabb8b76c08f9110237821a5 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Jan 16 13:01:03 2007 -0800 + + When changing a non-pending property, call the screen rrOutputSetProperty hook. + +commit e3add7c8ecbb2a0a662860f208f6ae7d1857c717 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Jan 16 12:59:34 2007 -0800 + + Don't forget to add the property we configure to the properties list. + +commit 780b55ec6f97864b50f00170b201e93eba188f1b +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 15 15:30:16 2007 -0800 + + Fix accidental commit (bug) in linuxOpenLegacy. + +commit 31bd8d150749c548eb70404395b4a52d46412f43 +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 15 15:19:30 2007 -0800 + + Fix domain insanity. + + Eliminate xf86GetPciDomain. The domain from libpciaccess is the + domain. Period. This means that 0 is a valid domain. Make sure that + INCLUDE_XF86_NO_DOMAIN is *not* set. Always run in "domain mode," + even if the only domain possible is 0. + +commit 079a6a55a516778871a8b2f8e9c8dd9162105a76 +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 15 11:39:24 2007 -0800 + + Convert to new pci_device_cfg_write_u* interface. + +commit d8bd0c41de11d12976a5ea9f185b7ac6c7060b71 +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 15 11:38:22 2007 -0800 + + Convert to new pci_device_cfg_write_u* interface. + +commit a87af8218f97da76433a5192d5e51aca0d5c3ed0 +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Jan 15 11:21:37 2007 -0800 + + Remove unnecessary files from the sources list. + +commit 1c326bf75fc0d2c39507834d159d031291eddac4 +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 12:07:19 2007 -0800 + + Eliminate unused INCLUDE_XF86_MAP_PCI_MEM define. + +commit 3936caa00535d0b7543be5a4b315562111a6b3ab +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 10:59:35 2007 -0800 + + Refactor pciTagConvertRange2Host and pciConvertRange2Host. + +commit 1a493509e30412a0f6c6f8f8e47a446678dbbc1a +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 10:58:59 2007 -0800 + + Fix typos in conditionally compiled code. + +commit 8279444a54f38c5e2e5d4c2d936a10d74990e0be +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 10:41:03 2007 -0800 + + Eliminate unused pciAddrHostToBus infrastructure. + +commit e32fa10a04a15ce1b15c6faa7a64e68ee3906d59 +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 10:33:17 2007 -0800 + + Remove prototype for pciGetBaseSize. + +commit 7411f5c389db73a6731d853d603029b8cf0a66ba +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 10:32:04 2007 -0800 + + Eliminate pciHostAddrToBusAddr from interface. + + pciHostAddrToBusAddr is no longer used anywhere in the tree. Remove + it with extreme prejudice. + +commit 60c5e023e8ddaae8e011f80736e7cc3e8c12583d +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 10:24:03 2007 -0800 + + Eliminate some dead code. + +commit dd12a94885bad9c9d064dcf7e0d9a7a7114ae3e6 +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 10:21:25 2007 -0800 + + Eliminate xf86GetPciEntity from public interface. + + xf86GetPciEntity was folded into the only place (xf86CheckPciSlot) in + the tree that still called it. + +commit c3016a29964761478305cf2f5241c563ff3eab0a +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 12 09:56:00 2007 -0800 + + Missed file from previous commit. + + Convert xf86ReadLegacyVideoBIOS to take a 'struct pci_device *' + parameter instead of a PCITAG. + +commit ca9c41e09ddb72d150d86f5d372eb07eeca7c1a2 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 11 21:09:20 2007 -0800 + + Convert int10 and vgaHW to use 'struct pci_device' instead of PCITAG. + + Convert all uses of PCITAG in int10 and vgaHW to 'struct pci_device'. + This allows the conversion of xf86ReadLegacyVideoBIOS and + xf86MapDomainMemory to 'struct pci_device' from PCITAG. + +commit ba547d4f6a2707f51f0d826389d2d418fb62367a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Jan 12 14:42:02 2007 +1030 + + mi: Quick fix to stop segfault on non-core keyboards. + +commit 5e2f8dee6331645fcbd2734c43698eb4f9c5b116 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Jan 11 14:05:39 2007 +1030 + + mi: remove core pointer special handling. No event has core pointer as + device now. + + dix: zero pSprite memory, stop segfaults on server restart. + +commit 7fccec91c46baac4f8d2965180dc535b4eb7d65c +Author: Eric Anholt <eric@anholt.net> +Date: Wed Jan 10 13:10:43 2007 -0800 + + Bug #9555: Always define _GNU_SOURCE in glibc environments. + + This keeps us from having to define _POSIX_C_SOURCE, _BSD_SOURCE, and + _XOPEN_SORUCE to get the C environment we want in different places. It also + fixes the build on linux due to RTLD_DEFAULT having not been defined. + +commit 78f9592c112d4245f6119b98c244bbb4cae3e5aa +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Jan 10 16:04:20 2007 +0000 + + lnx_ev56.c has to be built with -mcpu=ev56. Fix it. + +commit ea82333dc1799a7e013205adbc89874bc8d273cb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Jan 10 14:52:13 2007 +1030 + + Xi: add missing call for SProcXChangeDeviceCursor + add DeviceEnterNotify and DeviceLeaveNotify + fix: QueryDevicePointer crashed if called with keyboard device + +commit 6a2fb2928714ce77ee342cdc23a1178e5e766cf2 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Jan 9 16:34:40 2007 -0800 + + Track rename of DamagePost -> DamageAdd. + +commit da09964a931cc64d05ab571bf545fdad35a6d395 +Merge: e1f73d2 e3aa6ad +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Jan 9 15:27:34 2007 -0800 + + Merge branch 'origin' into pci-rework + + Conflicts: + + hw/xfree86/int10/generic.c + +commit e3aa6ad201eb20862c11c000e76206e317a96dc9 +Author: Matthieu Herrb <matthieu@blues.laas.fr> +Date: Tue Jan 9 14:14:19 2007 +0100 + + Multiple integer overflows in dbe and render extensions + CVE IDs: CVE-2006-6101 CVE-2006-6102 CVE-2006-6103 + +commit 359d20532bdcef6a540a551578d000afbb609c2d +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Jan 9 09:53:45 2007 +0100 + + Require glproto >= 1.4.8 for GLX. + + It builds against 1.4.7 as well, but it hardcodes the GLX_EXT_tfp tokens that + were finalized in 1.4.8, so GLX_EXT_tfp breaks if the client side was built + against an older glproto. This will hopefully alert people to rebuild other + components (in particular Mesa) against the new glproto as well. + +commit 88740c4855babedbea420b5e1b35ae105d1f1026 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jan 8 17:36:07 2007 -0800 + + Use PKG_CHECK_EXISTS(libdrm) to determine if DRI should be enabled on Solaris + +commit 282a4dcaabc5f0cd6f7d3819aa648333b93b265e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jan 8 19:22:41 2007 +0100 + + Attempt to fix drawable type checks in dixLookupDrawable(). + + Not sure this is 100% correct either, but it fixes at least one reproducible + crasher where it returned a pixmap to dixLookupWindow(). + +commit a7ab7932938820a795bb6fb8e0444e0824433b99 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jan 8 17:31:16 2007 +1030 + + xfree86: fix XI86_SHARED_POINTER flag setting + +commit 95e1a88050dde61e9b2407428042a43e47b46e18 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Jan 8 12:31:18 2007 +1030 + + Xi: Adding ChangeDeviceCursor request + +commit 0b73a7eb17fd848c6bdc6a65ba835aa2cbfc3cfd +Author: Eric Anholt <eric@anholt.net> +Date: Fri Jan 5 18:12:04 2007 -0800 + + Add support for the DamagePost (XDamage 1.1) request. + + This makes damageproto >= 1.1 a requirement to build. + +commit dfb2c10413e22afd8d486a982870f874326d5ef4 +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Jan 5 10:15:09 2007 -0800 + + Add missing #else from previous commits. + +commit f90c3e226b105bf77beb94723fc08bdff14834be +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 4 15:38:16 2007 -0800 + + Re-regenerate from Mesa scripts. + + DO NOT HAND EDIT THESE FILES! For cryin' out loud, there's even a + comment to that effect in the file's header... + +commit b7ca5d14ce7ba410b0dab5c2289f6d7b75e763df +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 4 15:37:33 2007 -0800 + + Incorporate new byte-order related configure changes. + +commit 8dd5771a1b91c331860b667fb18e484452000aad +Merge: 45aa26c 7d2ec92 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 4 15:01:38 2007 -0800 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + GL/glx/indirect_dispatch_swap.c + GL/glx/swap_interval.c + +commit 45aa26ccb4f61c2919ce2475d0907c6e1b177da2 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 4 14:55:51 2007 -0800 + + Regenerate from Mesa scripts. + + Regenerate source files from Mesa scripts. This causes the generated + files to use glxbyteorder.h. + +commit 6d603bb47ff9d238637adbf30c6e9697e6e7e6fa +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 4 14:49:26 2007 -0800 + + Add new header file containing byte-order wrappers. + + Move the byte-order related wrappers out of the individual source + files into a dedicated header file. Modify the single hand-coded + source file that uses the byte-order wrappers to use the new header + file. + +commit 7d2ec92170ebbdfa10a05734cb7cfaac97d19d65 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Jan 4 12:24:48 2007 -0800 + + Keep track of how many visuals we set up for GLcore, to avoid an invalid free. + + The proper fix would involve actually setting up the ARGB visual for GLcore, + but I just want the server to not crash at exit. + +commit aab2ca204279b638c7e5bb6b8427c58be9704c57 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Dec 21 09:16:19 2006 -0800 + + Try dlsym(RTLD_DEFAULT) first when finding symbols. + + The previous mechanism failed when finding drm symbols now that libdrm has + moved to being linked by libdri instead of being linked into the server. + +commit 2fd4626fa6969b84d8e2f9db16d6e2d44c4bc499 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jan 3 15:44:55 2007 -0800 + + Make GLX byteswap macros more portable + + - Use autoconf tests instead of platform-specific #ifdef's to decide + which macros to use. + - Provide fallbacks for platforms like Solaris that don't provide any + of the existing known forms. + +commit 66fa87292ef26bd0f464481287f3af992cd5741c +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Jan 3 10:27:07 2007 -0800 + + Fix BSF and BSR instructions in the x86 emulator. + + Patch courtesy of Michael Yaroslavtsev. + +commit 3b5b7ef5c2ab1d196806f6359e0972fd78d204dd +Author: Fredrik Höglund <fredrik@kde.org> +Date: Wed Jan 3 21:05:35 2007 +0100 + + Move the code for resetting the DPMS mode in response to input events, + from WaitForSomething to mieqProcessInputEvents. + + mieqProcessInputEvents already handles resetting the screen saver. + +commit 953a9ef949b4c57d28daeec57031fe1ce368c27c +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Dec 21 23:50:39 2006 -0800 + + Track physical screen size and send out updates when that changes. + + Events and internal data structures need to be updated whenever the physical + or pixel size of the screen changes. The code was ignoring the physical + size, so changing only that would not be registered anywhere. + (cherry picked from f42e3cea236fa0091ed398a818fc8e17b0e1b3df commit) + +commit e79602fca2f2cced66136729cdda4d356b0bdda0 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Dec 30 21:52:22 2006 -0800 + + Use RRScreenSetSizeRange in 1.0 compat. Check RRGetInfo for error. + + The RRScreenSizeSetRange function is used externally for 1.2 API drivers, + but can also be used in the 1.0 compatibility code. This also ensures that + the right changed bits are set so that clients are correctly notified when + the range changes. + + RRGetInfo can return an error, use that to return BadAlloc to clients + instead of blindly going on with various requests. + (cherry picked from f05dd384d38c76dd9662933a03625dfef5b1c81f commit) + +commit dc5eb4523298f966bd5fd9ae6672160034b5e82c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Dec 31 17:59:44 2006 +0100 + + fbdevhw: Override RGB offsets and masks after setting initial mode. + + This is a hack, but it should be a NOP for all the setups that worked before + and actually seems to fix some others... + + Based on a patch by Peter Teichmann from + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338241 . + +commit d077c0da470ab7291e8d838eaace57b066477d6f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Dec 31 17:23:31 2006 +0100 + + fbdevhw: Use displayWidth for fbdev virtual width when appropriate. + + The fbdev API doesn't allow setting the pitch explicitly, so we have to set + the virtual width to the pitch we're using for drawing. This fixes corruption + after changing the virtual width with RandR. + +commit c385bcf0bde38dd869f7065f859dd4b4126f5690 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Dec 30 16:44:31 2006 +0100 + + fbdevhw: Fix some issues with the previous commit. + + Fix a TRACE_ENTER typo and only update the internal fbdev mode state cache + after actually setting a mode. + +commit f6815cb68b0f6698497348fc6e4214dacef33b95 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Dec 30 10:18:28 2006 +0100 + + fbdevhw: Consolidate modeset ioctl calling, report failure if it modifies mode. + + The fbdev API allows the driver to 'accept' modes it doesn't really support by + modifying it to the nearest supported mode. Without this check, e.g. vesafb + would appear to accept all modes, even though it actually can't set any modes + other than the bootup mode at all. + +commit 083b790515faaf134a78abc4b0a7ef0d6ea5db75 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Dec 28 13:21:25 2006 -0800 + + Switch the default migration heuristic for EXA to "always". + + This has been what has been used the most successfully post-damagetrack. + The current thinking is that: + 1) We should be able to accelerate basically everything. So we don't need to + try to migrate trees of pixmaps permanently out of framebuffer to speed + CPU drawing up. + 2) Migration is cheaper in the thrashing case, so we don't want to go to a lot + of effort to try (and fail badly) to find a working set. + +commit cfbc7379f0232bb336461f6d2a8496d3d0763e7e +Author: Eric Anholt <eric@anholt.net> +Date: Thu Dec 28 13:15:11 2006 -0800 + + Export exaMove{In,Out}Pixmap(). + +commit 683ca3f7afaf15fd3ca7918f6175b5a9e4a6f05b +Merge: 05f9150 9563b2e +Author: Eric Anholt <eric@anholt.net> +Date: Wed Dec 27 16:11:31 2006 -0800 + + Merge branch 'exa-damagetrack' + +commit 05f915050cad72d4fb39cbb886be57beeac18749 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 27 16:38:06 2006 +0000 + + dix/events: take screen number, not pointer, in PostSyntheticMotion + Since we were using PostSyntheticMotion incorrectly anyway, update the + declared API to match. + +commit c1674660a7115ebf993dcde78f4e45f756e4c951 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Dec 24 06:28:44 2006 +0200 + + os: test for userland, not kernel + + It doesn't matter which kernel we're running on, the relevant part when + dealing with includes is what our userland is. + +commit 83080809f9a1c1d24b0318e54632f25f5940da25 +Author: Marc Aurele La France <tsi@ualberta.ca> +Date: Sun Dec 24 06:28:21 2006 +0200 + + xfree86: deal with pitch that isn't a multiple of the granularity + + When the pitch isn't a multiple of the granularity, allocate more space to + compensate. + +commit 329f6417275bb1201ba66c29b202028eeab3a355 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Dec 9 22:51:59 2006 +0200 + + XkbCopyKeymap: make sure sym_interpret is always valid + + Make sure we're not copying sym_interpret across from an empty source. + +commit 43a4376bd72ef1b6486cddb60ad57b2d6169292a +Merge: 4b1c9ac d9e079d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 22 13:53:55 2006 -0500 + + Merge branch 'master' into my-XACE-SELINUX + +commit d9e079d2a385203fdd18d958cfc19d759cab4ba8 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 22 13:07:09 2006 -0500 + + Zero out client devPrivates on allocation. + +commit 4b1c9ac3d13767e395b47e76b37f9f3a569e7be1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 22 13:04:50 2006 -0500 + + Policy updates. + +commit cd71e861830081807e5b93ae89c73c17986c6330 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Dec 20 13:45:24 2006 -0500 + + Naming change: Security*Access -> Dix*Access. + Clarify some error message strings. + +commit 9fd2f167ec02ee170b87f02ddca89eba0b2e2389 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 20 16:30:36 2006 +1030 + + xfree86: fix xf86ProcessCommonOptions() core and shared pointer assignment + + TAG: mpx-0.3.0 + +commit 056c919d849a78c8d507bfcecfa74c0b0165751a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 20 14:49:17 2006 +1030 + + removing MPX extension files + +commit b55e1239ac3b2962a33d8af1f911cc0f01f40f23 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 20 14:43:38 2006 +1030 + + xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard + +commit 202b46eb6bf0d5f94973c2bf1e4ebe9d154eadbf +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Dec 20 13:05:53 2006 +1030 + + xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default + to MP devices. + + Xi: Adding QueryDevicePointer request/reply + Adding WarpDevicePointer request/reply + +commit e437f357b6850a6c87ca6696870b3abd40e5b8ed +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 19 16:38:34 2006 -0800 + + xorg.conf man page should say "XFree86-DGA", not "Xorg-DGA" + +commit a81dbaae0597492f0245080c6f5af7158e05e2d0 +Merge: fb6d676 d442998 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Dec 19 16:11:19 2006 -0500 + + Merge branch 'master' into my-XACE-SELINUX + +commit d442998e39611be6805ea261f2286a2fd00f49b1 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Dec 8 13:35:36 2006 -0800 + + Only do the _POSIX_C_SOURCE hackery on linux where it's required. + + On other OSes, the nasty hack was resulting in prototypes being hidden, so just + don't do it. + +commit 228b9f77696190e47d4c96d6e0809bf645751557 +Author: Eric Anholt <eric@anholt.net> +Date: Fri Dec 8 13:32:22 2006 -0800 + + Include sys/select.h to get FD_ISSET. + +commit 9563b2eea2f61246b6a9e14e00c701f693efa4e1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Dec 19 18:57:22 2006 +0100 + + EXA: Lots of damage tracking fixes. + + Mostly due to exaDrawableDirty() now calculating the backing pixmap coordinates + internally, for cases where they aren't trivially known. There's a new + exaPixmapDirty() function for the other cases. + +commit 467c00cf450826e0bf06fe94470ec193af625d68 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Tue Dec 19 18:45:25 2006 +0100 + + exaGlyphs: mark dirty for software path also. + + This affects drivers with no UploadToScreen or UploadToScreen failures. + +commit 4334860e69e7d5b156082bd05c7a86708e5bad4c +Merge: 7e47176 fdcc22c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Dec 19 16:29:26 2006 +0100 + + Merge branch 'master' into exa-damagetrack + + Conflicts: + + exa/exa_accel.c + exa/exa_migration.c + +commit fdcc22ca1704d3519156c66804528c21b04fea65 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Dec 19 16:11:17 2006 +0100 + + exaCopyNtoN: Fix usage of 'dx' and 'dy' instead of 'reverse' and 'upsidedown'. + +commit 67c2a86e59e915d9a5681e9d233478cfea3e51ed +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Tue Dec 19 15:44:18 2006 +0100 + + EXA: Compare backing pixmaps instead of drawables against driver limits. + + The driver operations are always contained within the backing pixmaps, it + doesn't matter if the drawables are bigger. + +commit 6b1e354dbb6e8ed9f2c654bbe7f8bbf241843d1c +Author: Eric Anholt <eric@anholt.net> +Date: Tue Dec 19 15:24:19 2006 +0100 + + EXA: Disable SHM pixmaps. + + See https://bugs.freedesktop.org/show_bug.cgi?id=6772 . + +commit ca5ebe3971d8ebcfed00c5ebcd026cdd0ce0c6ba +Merge: 4d07b50 1b029fd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 19 10:51:01 2006 +1030 + + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver + +commit 2d0a63126b3d3a17005b7e122617ee0c5f44a55b +Merge: d8b5394 1b029fd +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 19 10:31:40 2006 +1030 + + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver + +commit 1b029fd896b76096905c516925ce0214fe14632c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 18 14:51:04 2006 -0800 + + Xorg & Xserver man page updates for 1.2 release + + - Added -extension & +extension to Xserver man page + - Changed Xorg synopsis from X11R6 to X11R7 + - Clarified Xorg ancestry description + - Moved Solaris to free/Open Source OS list + - Removed references to MetroLink module loader & getconfig + - Converted (1) to (__appmansuffix__) in a few more places + - Replaced http://www.freedesktop.org/cvs/ with http://gitweb.freedesktop.org/ + +commit d8b5394eda9d92b7193004931caa6c24a337b2e6 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Dec 18 17:35:34 2006 +1030 + + Cleaning up ifdef MPX from remaining files, removing it from configure.ac. + Removing building mpx extension from Makefile.am + +commit 03c554283e49e449fd1282cf32564d15d9fd2c77 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Dec 18 15:33:54 2006 +1030 + + mi: removing MPX ifdefs + global sprite renaming in mipointer and misprite + fixed: multiple remove cursor call in miSpriteInstallColormap + fixed: wrong core pointer usage in miSpriteStoreColors + + dix: bugfix in CheckCursorConfinement + removing MPX ifdefs + removing MPX event generation (using Xi solely now) + bugfix GrabDevice: uninitialized field in grab struct caused segfault + + xfree86: removing MPX fdefs + + Xi: removing MPX protocol events + +commit a5fcf1e5e7452c9be82f63b6c2be2a25c4109523 +Author: James Steven Supancic III <arrummzen@arrummzen.net> +Date: Sat Dec 16 12:02:38 2006 -0500 + + Fix RENDER issues (bug #7555) and implement RENDER add/remove screen + support (bug #8485). + +commit c92f7bef54fa737766d65fe32c200f405f39228c +Author: Kevin E Martin <kem@freedesktop.org> +Date: Sat Dec 16 12:01:49 2006 -0500 + + For Xvfb, Xnest and Xprt, compile fbcmap.c with -DXFree86Server + +commit 012807356883128fde58bb2d4f91dd356d6418fc +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 15 18:27:16 2006 -0500 + + Add loud warnings to deprecated lookup functions. + Hopefully this will alert external driver maintainers. + +commit ab1d5b0c31a1cfce95ab6b1d06f209f2c44e19ac +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 15 17:26:58 2006 -0500 + + Convert callers of LookupClient() to dixLookupClient(). + +commit f11dafaafc68f5cff1a1538d9566907786d8ab72 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 15 16:51:58 2006 -0500 + + Convert callers of SecurityLookupDrawable() to dixLookupDrawable(). + +commit 10aabb729d1586db344f9c1abdf1cf45e7ddaa7a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 15 16:36:29 2006 -0500 + + Convert callers of LookupDrawable() to dixLookupDrawable(). + +commit 25d5e0a629f82d95bd71daf9a920a70e095b5188 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 15 15:50:46 2006 -0500 + + Convert callers of SecurityLookupWindow() to dixLookupWindow(). + +commit 04c721854fbf1bd6379c165a53fab2bdc09961c0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 15 14:11:40 2006 -0500 + + Convert callers of LookupWindow() to dixLookupWindow(). + +commit 670bbb87310503fcc17203cecfa6f4f2f5db51d2 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Wed Dec 13 01:21:32 2006 -0800 + + RandR 1.2 rotation code must adjust width/height. + + Mode lines reflect the monitor mode, not the projected size into the frame + buffer. Flip width/height around so that the dimensions are oriented + correctly. + (cherry picked from 612a8e61803da8db0e305cbb093696b8e4284572 commit) + +commit 6c6901434ab469dd03b79fc98cd4a2b64d339305 +Author: Keith Packard <keithp@mandolin.keithp.com> +Date: Wed Dec 13 00:58:54 2006 -0800 + + RandR 1.0 refresh rates unscrambled. SetScreenConfig uses RRCrtcSet right. + + RandR 1.0 refresh rates were scrambled when working with a 1.2 driver that + returned sizes in a mixed order. SetScreenConfig was treating RRCrtcSet as + returning an RandR status instead of a Bool. + (cherry picked from 6dc711833d7387372012fdff1ce1df3aefa2d234 commit) + +commit 628c7daeb12713d28e85e6b49fa037a7748dff83 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Dec 12 22:59:03 2006 -0800 + + RandR: config time updates when hardware config changes. + + The config time in the RandR protocol reflects when the hardware state has + changed. It was getting changed anytime the driver changed the usage + of the hardware as well. + (cherry picked from 98d18a6578130adb411ca4bcc776fcb7e07f189f commit) + +commit d742025f435f3eb7458cf8284d59300bc9a850aa +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Dec 12 20:16:49 2006 -0800 + + RandR mode list needs both output and crtc modes. + + When an output no longer reports the current mode, it must still be included + in the list advertised by the X server. Walk the crtcs to ensure it is + included. + (cherry picked from 78689d0d6630afcbcd3ce5394d12c2564a489f45 commit) + +commit 9e32bf98bc9ab17a137664d01f59a8f426f7ff3b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 19:31:58 2006 -0500 + + Remove now-unused macro definitions from dix.h. + +commit 00f0705b3bb444ac934fc902cd23130f1777eab2 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 19:15:21 2006 -0500 + + Remove instances of macros SECURITY_VERIFY_GEOMETRABLE and SECURITY_VERIFY_GC. + +commit 5e334f06a1ef89891f9df2a371e4662340bec26b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 18:27:09 2006 -0500 + + Remove instances of macros VERIFY_GEOMETRABLE and VERIFY_GC. + +commit 51b69ff499c05f59cb1e577c4e8abf6f7f283b3e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 17:53:43 2006 -0500 + + Remove instances of macro SECURITY_VERIFY_DRAWABLE. + +commit 0cf75e74322e2b6a6efc7acf892e04365fde503b +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 17:27:12 2006 -0500 + + Remove instances of macros LOOKUP_DRAWABLE and VERIFY_DRAWABLE. + +commit ab1886df73b73360fa3bd7ce8e01affc074cbc8d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 15:42:19 2006 -0500 + + Add new, combined dix lookup functions (tweak). + +commit 60cdc592fe042c03ceb5d4c3344acfbbf5d8ae28 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 14:46:03 2006 -0500 + + Add new, combined dix lookup functions. + +commit 6c46645cfc1afda8aeabfe0ed4d9342673b702f1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Dec 14 14:45:42 2006 -0500 + + Naming change: Security*Access -> Dix*Access + +commit a96788058e48f3e97c66da6dafd58828f0c2ce53 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Dec 14 10:50:18 2006 +1030 + + mi: removing MPX ifdefs + global sprite renaming in mipointer and misprite + fixed: multiple remove cursor call in miSpriteInstallColormap + fixed: wrong core pointer usage in miSpriteStoreColors + + dix: bugfix in CheckCursorConfinement + removing MPX ifdefs + removing MPX event generation (using Xi solely now) + +commit b88ad820fac81d0dfd557a384bf0406e8893e7af +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Dec 13 12:13:11 2006 +0000 + + Set Int10Current->Tag for the linux native int10 module + Fixes bug #9296 + (cherry picked from 731952c561a3972d09d1315f4fd31466e459ccb9 commit) + +commit fb6d676de5aa606d943715437a12a68d9a41f386 +Author: Eamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil> +Date: Tue Dec 12 16:17:51 2006 -0500 + + Add xserver object class to list of object classes. + +commit 7b90944258eba66b61328480759833ad7589bcca +Author: Eamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil> +Date: Tue Dec 12 15:59:38 2006 -0500 + + Change MLS levels in config file contexts to more sane defaults. + +commit 568c09481e5d62091d032837171a36f409f39379 +Author: Eamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil> +Date: Tue Dec 12 15:59:08 2006 -0500 + + Split AssignClientState() into two routines, new routine is server-specific. + +commit 62e7722ebd8d341a23eb56cb330eeb00e6a975a6 +Merge: e124806 f3c6090 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Dec 12 13:54:33 2006 -0500 + + Merge branch 'XACE-SELINUX' into my-XACE-SELINUX + +commit e124806994675e16ca8e3937388f2cadeb529fc3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Dec 12 13:35:22 2006 -0500 + + Remove trailing whitespace (whitespace police). + +commit ca77c121075a9de1f47d42f6aaf91c20185231de +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Dec 12 13:26:52 2006 -0500 + + Naming change: Security*Operation -> Xace*Operation + +commit a60da1db7cced28c07960a713eb18deb45beb432 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Nov 29 22:19:57 2006 -0500 + + Add required root window context to config file. + +commit 5719afe6d3a246985709e6f045617c1e16a7da51 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 26 20:20:57 2006 -0400 + + Change symbol in libaudit library test. + +commit 354c80da66af141e8ba6d75fed75a0f482987956 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 5 16:07:26 2006 -0400 + + Improve error handling, messages during initialization. + +commit 3714d9149928754afcd6b2466a1371ca32e17985 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 4 16:23:35 2006 -0400 + + Experimental window property holding security context. + +commit 7f16c38ae2b47b195609d8fedefb7b28f612b2d4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:31:18 2006 -0400 + + Add SELinux extension configure-time support. + +commit a7f4bbea87ada1d699bfd9e3b6a98f06191650f6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:17:01 2006 -0400 + + Add SELinux extension to the module/extension loader. + +commit 28e80cd65b1207b123c02f895851bb6d207aa3c1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:15:19 2006 -0400 + + Add SELinux extension configure-time support. + +commit 83aad2be8a80890f349c2f9caf84786333f7cc8c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:11:04 2006 -0400 + + Add SELinux extension source files. + +commit 81281cb298a5825bc7a2e692375a86199293bbbe +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Dec 12 11:28:24 2006 +0000 + + Fix bad commit + +commit 792e0f71c6a435b2e28f8a4cdcc790f3b982e62c +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Dec 11 14:54:49 2006 +0000 + + Fix Xming fails to use xkb bug + bug #5049 (Colin Harrison) + +commit 27d4b84f268ac21601f7f52a7e257f70753396b3 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Dec 11 14:50:08 2006 +0000 + + Fix Tooltip from minimized clients + + Bug #3678 (Colin Harrison) + +commit ae3c24da34cd8eeb77a6389861856fd51e0841f5 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Dec 11 18:09:59 2006 +1030 + + dix: Moving SpriteRec into DeviceIntRec + removing global sprite structure + beginning to remove MPX ifdefs + + xnest: Fix to make xnest compile again + +commit fb8364bca30fe9268e807b0a9a3ebf875ee1fce2 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sun Dec 10 11:24:05 2006 -0500 + + Accept EDID > 1.3 but < 2.0 if we find it, assume it's compatible. + +commit e1f73d220873fa091695e46b7fcd008663a95a6f +Merge: 27d682f d56249a +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Dec 8 17:24:15 2006 -0800 + + Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/common/xf86Configure.c + hw/xfree86/common/xf86Helper.c + hw/xfree86/common/xf86pciBus.c + hw/xfree86/int10/helper_exec.c + hw/xfree86/os-support/bus/Pci.c + hw/xfree86/os-support/bus/linuxPci.c + hw/xfree86/os-support/linux/lnx_pci.c + hw/xfree86/scanpci/Makefile.am + hw/xfree86/utils/pcitweak/Makefile.am + hw/xfree86/utils/scanpci/Makefile.am + +commit d56249a15ead51ad4d2117d5538ada24af05b693 +Merge: f1f8df1 ec84f72 +Author: Jeremy C. Reed <reed@glacier.reedmedia.net> +Date: Fri Dec 8 15:52:37 2006 -0600 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit f1f8df1889ab656bb57596e2f85408f15f42cd5d +Author: Jeremy C. Reed <reed@glacier.reedmedia.net> +Date: Fri Dec 8 15:51:44 2006 -0600 + + For MANDEFS, also replace __mandir__ for $(mandir) which includes + the prefix. Noticed wrong path to man pages on both Ubuntu and on + NetBSD with pkgsrc. + +commit ec84f72d077eaf2e7768a1f5398f65a5e1714d08 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 8 21:31:47 2006 +0200 + + XkbCopyKeymap: always initialise map and preserve + + If we don't have map or preserve in the source map, make sure the + destination is initialised to NULL, and freed if it's a valid type. + +commit e59aeac1ff13ea53f44dba1ac7800f37f4532ca1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 6 23:44:06 2006 +0200 + + xfree86: remove stray debug line + +commit 729fca33a417ae3dfb180caf0ea8946ef9eee1df +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Thu Dec 7 12:09:18 2006 +0100 + + Revert "xfree86 DDX: Delete DDX screens in ddxGiveUp()." + + This reverts commit a6381e69845f58d2b3282992b1f881015190f1bc. + + See https://bugs.freedesktop.org/show_bug.cgi?id=9224 . + +commit 4ea6dfb984063117eef5c2f931205b1c3eb3108b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 6 23:24:39 2006 +0200 + + whitespace police + +commit 4cba1a1ebfbdd7ab489b1b1ffb6656cbe88eb61e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 6 23:21:38 2006 +0200 + + config: bus reconnect support + + Add support for reconnecting to the bus when it restarts. + +commit 0c5dab5c8eaa174f28054b9d20244a709c015210 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 6 23:21:15 2006 +0200 + + config: move config.h to hotplug.h + + Also, move configInitialise to after OsInit, since the next commit will + make it use a timer. + +commit 72e7f2ac6cf0db474d0defa7918f2a3ba76c0e46 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 6 23:18:52 2006 +0200 + + GetPointerEvents: always send valuator events for MotionNotify + + Always chase a DeviceMotionNotify event with a DeviceValuator, which is + not required in the spec, but will silently break the lib if you don't + include. + +commit c458a70d650bd62b8f4706f022d1f3f347636db1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Dec 6 20:30:44 2006 +0200 + + GetPointerEvents: fix typo + + Fix typo that resulted in inverted axes when using an absolute positioning + device that didn't report y, and thus relied on the previous value. + +commit edabf45425f9ed79547f918cc0dfff4c268de386 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Dec 2 16:37:19 2006 +0200 + + configure.ac: add CONFIG_LIB to Xvfb + +commit 8724af248cd6c93182fecd060fed09a556361080 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Dec 2 16:20:34 2006 +0200 + + kdrive/mga: fix compiler warning + + Change a case that only made one test for an if, preventing the compiler + warning about all other PICT_* types being unsupported. + +commit 2f0a800ffdc881cdb3adf84f1ed97bbb63cba34c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 27 22:22:53 2006 +0200 + + config: move to block/wakeup handler + +commit 99378b58dbc63160382ad9c41f9cb0dd2a24e9d1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 27 22:22:33 2006 +0200 + + kdrive/tslib: remove vendor-specific hacks + + Parts of the KDrive merge accidentally contained a bunch of + vendor-specific hacks; sorry. + +commit 8884a73a3f4efa8276c5e38b9573201574c4f1f6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 27 22:39:56 2006 +0200 + + xfree86/input: re-add support for disabling drag events + +commit f2903c12bb4bb0b7c94b96c55af8fa55507f9d7d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Nov 7 11:13:32 2006 +0200 + + SyntheticMotion: don't dereference sprite.screen when not using Xinerama + + (cherry picked from aa052e43c6c293e14f78837e00c6b7581f9713bb commit) + +commit d17ec01e8395a8f14b75a10c8bf082b3f5a4fb36 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 1 00:41:41 2006 +0200 + + remove CID support (bug #5553) + + Remove CID from all our fontpaths. + (cherry picked from 69820a10e33e4582c192360996e866007114639d commit) + +commit abe5e079af715713097ab0daad29a3e9f523c398 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Dec 6 07:58:03 2006 -0800 + + Update pci.ids to 2006-12-06 from pciids.sf.net + +commit 724f9cb578086e8483a2d0636dd6eb05d664d31c +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Dec 5 13:44:05 2006 -0800 + + Bug #9219: Use pWin->viewable instead of pWin->realized to catch InputOnly windows too. + +commit 3690de9b1b0902d395bc7d071fc05ebc8f75be2b +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Dec 5 12:42:12 2006 -0800 + + Bug #9219: Return BadMatch when trying to name the backing pixmap of an unrealized window. + + Before this change, ProcCompositeNameWindowPixmap would name the screen pixmap + if !pWin->realized. + +commit eb1d9f51af19dab20a95c2830ca1c508d8ee66bb +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 5 18:50:19 2006 +1030 + + Ironing some glitches caused by the merge + +commit 3c8f166022a2d19af14eb670fa382503ba1451cd +Merge: 2a51149 f9f7d7f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 5 18:28:33 2006 +1030 + + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver into mpx + + Conflicts: + + dix/events.c + +commit 2a511492f9a235d3f5390ab87b6c643cbea92d88 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Dec 5 15:45:18 2006 +1030 + + Xi: adding MPX checks to ProcessOtherEvents + + mpx: adding QueryPointer request and reply + adjusting names of requests to Xlib compatible naming (xMPX*** instead of + mpx***) + +commit f9f7d7f3be53c808abb5eaceb7a1abc55744a210 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Dec 4 13:36:30 2006 -0800 + + Check for __sparc as well as __sparc__ for compatibility with Sun cc + + (gcc defines __sparc__, Sun cc defines __sparc) + +commit ac90ce58ba1da3ed605adf75f4d54c34b578c402 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 1 21:12:21 2006 -0500 + + Naming change: Security*Operation -> Xace*Operation + +commit f44f14fe564d834568a0afefba944223a73ea0f5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Dec 1 20:48:15 2006 -0500 + + Define calls away when not building XACE, allowing ifdef's to be removed. + +commit a5d6499d666fea4a9988118ddd3a5e4c9cfcc32c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 1 16:42:37 2006 -0800 + + Fix syntax error in configure check for SYSV_IPC that broke with Sun cc + +commit 89b2aa9be81613cb1a06bd535bf50ecf2a00208d +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Mon Nov 27 21:40:24 2006 -0800 + + Destroying RandR crtc or output overwrites memory. + + RRCrtcDestroyResource and RROutputDestroyResource had matching + bugs that would overwrite memory past the end of the storage + of the crtc or output arrays. Oops. + (cherry picked from 4202b23ed86405a4cebfdcf239df1b023c1d10ca commit) + +commit 23ba72323af785516db6cbcf6c1b2fa907a8232f +Author: Keith Packard <keithp@ukulele.keithp.com> +Date: Thu Nov 30 23:16:42 2006 -0800 + + RandR ListOutputProperties has nAtoms element, not nProperties + + Earlier RandR 1.2 encoding revisions used 8-bit nProperties field. + Final RandR 1.2 spec uses 16-bit nAtoms field instead. + (cherry picked from 66b6358a393972946f16394918db2401c51dc5ed commit) + +commit 416f1bb99a6d4557f2863ae941868e47e11bbb3b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Dec 1 15:56:52 2006 +1030 + + mpx: SelectEvents and GetEventBase requests. + Some renaming and cleaning up in extinit.c + MPXLastEvent added + + Xi: ShouldFreeInputMask() from XI is not static any more, used in mpx + + dix: GetPointerEvents() allocates MPX event for MPX devices. + DeliverDeviceEvents() caters for MPX devices. + +commit ccd804c6c01cdfffe938fa5336be9b5668a6f0c0 +Merge: 9423ac1 82912ad +Author: Drew Parsons <drew@pug.localdomain> +Date: Fri Dec 1 15:21:57 2006 +1100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 9423ac134a2a9800787c4978d384827cc4e61fc8 +Author: Drew Parsons <drew@pug.localdomain> +Date: Fri Dec 1 15:21:05 2006 +1100 + + GNU/FreeBSD support in GLX: include byteswap.h for FreeBSD systems + defining __GLIBC__, as done already for Linux and Hurd (cf. bug #5613). + Also includes some more __GNU__ checks on top of those made in + commit ade4bf09076d13dbf3549c0a2d987a0afe76d5c1. + Thanks Petr Salinger (Debian bug #400869). + +commit 82912ad7709e8cf4a5f8a9fa6b47f789842a3fe9 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 30 20:13:52 2006 -0800 + + Make solaris version of xf86OSRingBell return void like other OS'es + +commit 8956f63a941bf0a5f157d47b33e6221601a75040 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 30 19:53:29 2006 -0800 + + Tell automake to STFU about the *.O files + + automake will not stop whining about the *.O files not being in normal library + name format, so just tell automake they are PROGRAMS so it builds them without + bitching. + +commit f3c60900e575e65254cd2576cc6c90b97c8f63ae +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Nov 29 22:19:57 2006 -0500 + + Add required root window context to config file. + +commit 143558500a89a5c887c75c03798bae68c953cac9 +Merge: e3d3d29 ee9bdd3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Nov 29 20:41:41 2006 -0500 + + Merge branch 'master' into my-XACE-SELINUX + +commit ee9bdd3f4a14a42fb0747acc420966f0f669129b +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Nov 29 12:01:43 2006 -0800 + + Add DIX_CFLAGS to util builds. + + Fixes a build breakage when $(top_srcdir) != $(top_builddir) because + -I$(top_srcdir)/include is missing for the cvt, ioport, pcitweak, and scanpci + builds. + + Signed-off-by: Adam Jackson <ajax@nwnk.net> + +commit a6381e69845f58d2b3282992b1f881015190f1bc +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Nov 29 19:25:09 2006 +0100 + + xfree86 DDX: Delete DDX screens in ddxGiveUp(). + + This allows video drivers to clean up in the FreeScreen hook things they set up + in the PreInit hook. + +commit afd6af65510b0147f16f08314045b3506bfa9d89 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 29 17:55:15 2006 +1030 + + mpx: Infrastructure for MPX extension, GetExtensionVersion request works. + +commit b0c8558b9d9a9984c0067960392e28f5a7622b29 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sun Nov 26 19:31:48 2006 -0800 + + Ensure RandR resource types are registered before resources are created. + + Now that resources can be created during server initialization, make sure + the crtc, output and mode resource types are created before attempting to + create associated resources. + (cherry picked from commit ec83d674167e7045d5317b179c9998e3172a26dc) + +commit 6245e9dd4719c5dc15ff45d49cf626123794038b +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Nov 21 16:52:28 2006 -0800 + + Allocate correct size for RRPropertyRec (oops). + + Neglected to change the allocation size from sizeof (PropertyRec) to + sizeof (RRPropertyRec). Lots of fun crashes this way. + (cherry picked from commit 0626eb8e5c9fa05de6bdc9aa0c654f5148bf7cff) + +commit 24abce8032940e96bb2ccf9e463a7fff6f36283a +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Nov 21 01:15:26 2006 -0800 + + Change RandR property datatype to include pending/valid values. + + This patch tracks the protocol changes which introduce more complex + semantics for RandR output properties including pending and valid value + information. + (cherry picked from commit af55c65bea40669fdc038aa34c6a1ec9ecb33e87) + +commit f62ac3ec39c6593df476985c630e499864c19c72 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 28 10:31:40 2006 -0800 + + Separate DDC mode list creation from MonPtr creation. + + This will be used by the intel driver, and likely other RandR 1.2 drivers. + +commit fbd09443385c533416fa530399d54f130afaf985 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 28 10:15:51 2006 -0800 + + Replace bad mode name-setting code with xf86SetModeDefaultName(). + +commit 4ad0bde661be2af4a17771d66066d49736e85cbe +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 28 10:12:02 2006 -0800 + + Clean up a bunch of long lines and trailing whitespace. + +commit 05778432dc6e688bc0beff0c20ffd7e27b74888e +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 28 10:07:57 2006 -0800 + + Move code to get a mode list from EDID data from ddcProperty.c to edid_modes.c. + +commit 38ecc66cd9c61346a46697bbf1d8319f4f6f9800 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 28 10:06:15 2006 -0800 + + Typo that was missed in testing. + +commit 834e4b079866594b50be64ae79f3cb2a5baa2070 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Nov 28 18:57:13 2006 +0100 + + Fix potential NULL pointer access in timer code. + + https://bugzilla.novell.com/show_bug.cgi?id=223718 + +commit bdf718907b3202815a04ec28a868689708f43da9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 28 18:06:34 2006 +1030 + + dix: missing parameter to SetCursorPosition in CheckMotion ifndef MPX + + mi: missing include in misprite.c ifndef MPX + +commit e88bc0e55a6937ff0b47fe38f60bfa8991196578 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 28 14:34:36 2006 +1030 + + mi: Bugfix: FreeCursor ignores negative refcounts. + + mieq: Bugfix: Motion notifies did overwrite DeviceMotionNotifies + +commit 5dbcd34a0a6c0d10dbfea8fdc9d7dfe7a0261b19 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Nov 27 16:26:14 2006 -0800 + + Register dependency on new RandR protocol. + +commit 16f8f10dc2106bc6253b2d89a1f8efee8d80e2ba +Author: Eric Anholt <eric@anholt.net> +Date: Mon Nov 27 16:21:31 2006 -0800 + + Move mode handling helpers from ddcProperty.c to xf86Mode.c. + +commit b4b0d901d98371a8aa7b17d195e18e83e2a6a618 +Merge: 64de3ba d6cd031 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Nov 27 15:43:15 2006 -0800 + + Merge branch 'randr-1.2' + + Conflicts: + + dix/events.c + dix/getevents.c + hw/xfree86/common/xf86Mode.c + hw/xfree86/dri/Makefile.am + hw/xfree86/os-support/drm/xf86drm.c + hw/xfree86/os-support/xf86drm.h + +commit d6cd0313c7f23f32c9c7dda00ff739e772bf7db3 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Nov 27 14:46:50 2006 -0800 + + Add some mode helper functions from the intel driver. + + This also removes static from some other functions that had been copied out + to at least the intel driver, but perhaps others that were doing mode list + handling. + +commit 85ea408e38f452bcf9109f14fd1016d159692a99 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 27 18:07:16 2006 +1030 + + mi: malloc checks for misprite and midispcur, code cleanup + removed IsMPDev() + +commit 023da4e804ad260eaf0c50d2ec7213dd514e2113 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 27 15:54:33 2006 +1030 + + mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor() + instead of IsMPDev() + +commit a2340a73687dfd93affb6de28a33d73fd808c96b +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 27 14:47:23 2006 +1030 + + mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case + of errors. + Some copyright notices. + misprite.c passes DeviceIntPtr around and down to DC (previously + miCursorInfoPtr and the plain device id). + Large cleanup in misprite.c to avoid code duplication. + +commit 1c7568b8a1417257fa67c7fca69aa253099b9461 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 23 17:15:14 2006 +1030 + + mi: closing memory leak, miPointer is freed in miPointerCloseScreen + bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX + adding DeviceIntPtr parameter to ScreenRec's cursor functions. + cleanup of miPointer code to use same scheme in each function + + dix: MPHasCursor() function determines checking whether to invoke + cursor rendering. + + animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies + on the core pointer right now. + + xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on + the core pointer right now. + + rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on + the core pointer right now. + + ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on + the core pointer right now. + +commit 64de3baf85f6df274f71f736016f0848567cd9f6 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Nov 22 14:46:51 2006 -0800 + + Add a -showDefaultLibPath option. + + A corollary to the previous change, this option prints $libdir. + +commit 0a2a6e4070718b90af7ca0e047f028e0cabdfb9d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Nov 17 18:27:23 2006 -0800 + + Add a -showDefaultModulePath option. + + As discussed on the mailing list, people would rather have an X command-line + option to print the module path so installers can know where to put modules, + rather than the installers using `pkg-config --variable=moduledir xorg-server`, + since some distros choose not to install xorg-server.pc. + +commit 61832cb94c8a4d62cddb92188caeed86519e9d62 +Author: Brian <brian@i915.localnet.net> +Date: Wed Nov 22 09:16:43 2006 -0700 + + Regenerated from Mesa w/ latest gl_API.xml file + +commit 61863f09d22935406371e92bb75173d55ff9b29f +Author: Brian <brian@i915.localnet.net> +Date: Wed Nov 22 09:16:17 2006 -0700 + + Regenerated from Mesa, fixes glMap* protocol problem (bug 8899) + +commit f52d53e060d0468b658a565688d1f92c156405c7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 22 17:58:57 2006 +1030 + + dix: DeliverEventsToWindow adjusted for MPX + + mi: sprite debugging disabled + +commit 8c16f21d5df08b028e93440d632939a5fdbf5876 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 22 17:06:47 2006 +1030 + + dix GetSpriteWindow() adjusted for MPX + added device dependency for MPX to DoEnterLeaveEvents, + EnterLeaveEvents, EnterNotifies, LeaveNotifies and + FixUpEventFromWindow. + +commit 70383105de279df553874efa56b37a7b3e426ea1 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 22 15:27:16 2006 +1030 + + mi: added DevToSprite() conversion function + fixed miSpriteRealize to use passed pDev argument instead of looping. + + dix: changed sprite dependency and added MPX functionality to parts of + events.c (XineramaChangeToCursor, XineramaCheckPhysLimits, + XineramaConstrainCursor) + + Xi: fix: accessing other->buttons for keyboard segfaulted the server + +commit 33ff4cec5ff7533ec725f71d357c096dfb0acb79 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Nov 21 21:23:17 2006 +0000 + + Issue CloseDownDevices() in os/log.c and remove from dix/main.c. + + This ensures that all calls to FatalError() will shutdown the input devices. + +commit efd4f3c6ffec804c68ba5df17cc117da264fb7c4 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 21 20:31:30 2006 +1030 + + dix: WindowsRestructured() calls CheckMotion() on all devices + + mi: core pointer was checked twice in miSpriteReportDamage, + miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas + and miSpriteRealiseCursor + using damage bug (see comment in file) to avoid artefacts + +commit 9db851c22d4befb95bfb074b96620261d8e32ac9 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 21 18:15:04 2006 +1030 + + dix: moved sprite from static to be pointer of type SpritePtr + added SpriteRecs for MPX devices + changed sprite dependency and added MPX functionality to parts + of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion, + CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits, + PointerConfinedToScreen) + added DeviceIntRec param to GetSpritePosition(). This required some + minor changes in ddx, xtest, xkb and xfixes. + + mi: changed miPointer to pointer instead of static struct. + +commit fd8b9a6eaee28a453a00af14195b81ef1890a577 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 21 15:24:43 2006 +1030 + + TAG: MPX_BEFORE_DIX_API_BREAK + +commit 447efdc01d4f8922205ba26e52c9e5ff9f5cb90e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 21 14:46:00 2006 +1030 + + mi: constrain MPX cursors to screen + +commit 1107d8bea22eea26f7b666f1c00a53360b7d237e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 21 14:00:46 2006 +1030 + + mi: added device ID to miSpriteCursorFuncRec functions + added MPX code to midispcur.c + + BUG: Core pointer changes whenever MPX cursor changes shape. + +commit 3bad452d12d620df91b1f37d06c650ded96bfafe +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Tue Nov 21 11:26:21 2006 +1030 + + mi: added MPX to miSpriteReportDamage + added id field to miCursorInfoPtr, required to pass through to miDC + core pointer uses mpCursors array as well. + added miDCBufferRec for future use with MPX + + TAG: MPX_BEFORE_MIDC_API_BREAK + +commit b1bbdf464d2f8799fa3429c1c27ca998c5f3e94a +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 20 17:58:30 2006 +1030 + + mi: added MPX to miSprite functions. + + NOTE: This version will render multiple cursors but with an artefact each time + when devices alternate. + +commit 7b4b619d4c268804199f9f4775eb56604f0b80e8 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Mon Nov 20 13:10:07 2006 +1030 + + mi: moved core pointer information from miSpriteScreenRec into a + miCursorInfoRec. + bugfix in mipointer, semicolon after preprocessor statement + +commit ca2874b273232d9f51881b1cd754ed6847bfaf47 +Merge: c9a5f9d e2f6dac +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Sat Nov 18 19:56:32 2006 +0000 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit c9a5f9d3911c2e6a8f81b0721c9eb914fb7719b5 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Sat Nov 18 19:55:42 2006 +0000 + + Shutdown input devices if FatalError occurs during startup. + Fixes Xdmx problems when the input device has been initialized + and the keyboard map has been destroyed. + +commit e2f6dacc736527790ed8e304698678afc17f71c6 +Author: Dave Airlie <airlied@linux.ie> +Date: Sat Nov 18 11:26:55 2006 +1100 + + dri: setup libdrm hooks as early as possible. + + This is due to radeon doing drm stuff before DRI extension gets initialised + +commit 90bea69dfdd63f58ee326887359ad1b35a31cb5f +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 17 18:03:43 2006 +1030 + + mi: + added miCursorInfoRec to contain info of the MPX cursors. + calling miUpdatePointerSprite() from event queue for MPX devices. + adding device-specific processing to miPointer*() functions. + + dix: Call to SetCursorPosition in CheckMotion() temporarily disabled. + + xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ + + NOTE: This build will not display cursor images. + BUG: The second mouse does to take correct x coordinates. + +commit 94e106a898c44daeb228bcb031b85f996ddc96b0 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Fri Nov 17 15:10:37 2006 +1030 + + dix: moved isMPdev field to end of _DeviceIntRec structure + + mi: + added miMPPointers array to mipointer.c + added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer + we use inputInfo.pointer as standard value. ABI BREAK! + + ramdac: + forcing failed HW Cursor initialisation. MPX needs software rendering. + changes to use new miPointerSpriteFunc (this required externing + inputInfo, should probably be fixed at a later point). + + RAC: changes to use new miPointerSpriteFuncs. + +commit ef47d9c3ba63e9a6243fe5c81ccc60c8246352b4 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Nov 16 13:50:48 2006 -0800 + + Reduce calls to RRGetInfo. + + RRGetInfo can be expensive. Don't invoke it when quering Xinerama + information or setting a new CRTC configuration. + (cherry picked from commit b5aa9eb8e6eda36856a075f4b008c33f6c706bad) + +commit 07b26e690cd9a4fc626132feed0702515cbe5a88 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Nov 16 09:48:33 2006 -0800 + + Remove RandR output options. + + RandR output options are now expected to be handled by properties instead. + (cherry picked from commit 8b2a7e94a1dc2776ab2cfaaebb309be02502602a) + +commit f17e3c34dfd1f1418440bdebf45764e4dbf550f0 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Thu Nov 16 02:18:03 2006 +0200 + + Fix GL context destruction with AIGLX. + + The logic for freeing GL contexts introduced by "Fix AIGLX VT switching." is + inverted. As it is now, GL context destruction is deferred for glxDRIEnterVT(). + +commit ae3c9ad4abe66784d7ee474455003d2745699286 +Author: Bjorn Helgaas <bjorn.helgaas@hp.com> +Date: Thu Nov 16 17:29:06 2006 +0100 + + Bug 9041: Check the return code in xf86MapDomainMemory(). + +commit 5388423eb05daefcc71067b6ab96b6e57c44ef5c +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 16 20:43:27 2006 +1030 + + mieq: EQ processing handles MP devices + + global: MPX define added to xorg-server.h.in + + xfree86/common: small fix to avoid byte overflow + +commit c957a16180810fbd58526e1a670d82384fb4a61d +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 16 15:11:14 2006 +1030 + + dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents() + + mieq: avoid merging events from different devices in mieqEnqueue() + + xfree86/common + isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent() + and xf86PostButtonEvent() + +commit 7ce2dc57844872cc340b60387d4d1cb3d982633e +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 16 12:51:08 2006 +1030 + + dix: + merge with code cleanup from master + GetPointerEvents treats events in the same way as XINPUT devices when flag + has POINTER_MULTIPOINTER set. + + xfree86/common: + added XI86_MP_DEVICE flag and parsing in xf86ProcessCommonOptions + added POINTER_MULTIPOINTER define. Is used in xf86PostMotionEvent and + xf86PostButtonEvent for the flags that are passed into GetPointerEvents() + + global: + added flags to configure.ac to enable/disable MPX define + added flags to dix-config.h.in to define MPX + +commit 4d07b503727ba86315b90d6f45b06ed6185724b2 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Thu Nov 16 10:55:15 2006 +1030 + + dix: cleaned up GetPointerEvents() to avoid code duplication. + +commit 6ff7f2ad6a5e2e769244590578e6809974b5235d +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 7 13:13:53 2006 -0800 + + Fix build on FreeBSD after input-hotplug. + (cherry picked from commit 4e6e4baead6c565363abbcd9e06cc685be121596) + +commit bffb1f9b67c8d3d264c0c3fd703cf7e57dcdf7b7 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 15 17:53:13 2006 +1030 + + removed unused variables drag and local from xf86PostMotionEvent + +commit f737cd925efe452787443b039ae65b8d85081bb3 +Author: Peter Hutterer <peter@cs.unisa.edu.au> +Date: Wed Nov 15 17:50:02 2006 +1030 + + o fix minor error in comment for GetPointerEvents() + +commit 2eab230d9bd3f73ffe1b5a42111f89e85904ee11 +Author: Jeremy C. Reed <reed@glacier.reedmedia.net> +Date: Tue Nov 14 16:37:18 2006 -0600 + + For NetBSD, define PCVT_SUPPORT (System has PCVT console). + + Noticed by Joerg Sonnenberger. This fixes problem with console + switching. + + This was in original imake NetBSD.cf. + +commit 26d2e45bdb0cf4d18ba7b0365425da49d60b3d5c +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Nov 14 15:33:07 2006 +0100 + + Bug #9023: Only check mice for "mouse" or "void" if identifier is != NULL. + +commit a724b7f1302ba7a59f140b521f13d2ddf0fcf9bf +Merge: 6facd95 f80a8ae +Author: Jeremy C. Reed <reed@glacier.reedmedia.net> +Date: Mon Nov 13 20:32:26 2006 -0600 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 6facd958c2e7098cb68eac2810a88b8cd40f19c0 +Author: Jeremy C. Reed <reed@glacier.reedmedia.net> +Date: Mon Nov 13 20:23:06 2006 -0600 + + On DragonFLy, default to /dev/sysmouse (just like on FreeBSD). + + TODO: use autoconf to handle this so the code is not platform + based but feature based. + +commit f80a8ae6e6820378ea70ac0849cee8bf3055e0e8 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Nov 13 18:26:05 2006 -0500 + + Disable Xprt server build by default. + +commit 5bfe7f4dfc6ab51b6790d74faf11574385234423 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Mon Nov 13 01:54:32 2006 +0200 + + DRI: call drmSetServerInfo() before drmOpen(). + + Also, remove some libdrm remnants. + +commit acb5ff4c73ac4d52201d7c421f488e2ead5c8b9c +Author: Jurij Smakov <jurij@wooyd.org> +Date: Sat Nov 11 14:09:15 2006 +0200 + + ffs: handle 0 argument (bug #8968) + + Handle an argument of 0 in ffs(), instead of looping indefinitely. + Add an ffs prototype to dix.h, and add includes to ffs.c. + (cherry picked from 34164e551e4c3909322d50b09835ca4ac1d49d68 commit) + +commit ca094684196886a4a1c10273049fae0705a3edc2 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Nov 10 18:02:05 2006 -0800 + + Correct symlink-mesa.sh usage message + +commit 28337cc1060bc08adef81c304dd9ed02d0a0e37b +Author: Eric Anholt <eric@anholt.net> +Date: Thu Nov 9 19:51:17 2006 -0800 + + Fix typo before the last commit. + +commit e1720b1089328af80ca0cb85e5289ced05263f95 +Author: Eric Anholt <eric@anholt.net> +Date: Thu Nov 9 18:53:37 2006 -0800 + + Bug #8868: Remove drm from SUBDIRS now that the directory is gone. + +commit 0dee48b8af3e054228aef0d15c1cb1c9e23790cc +Author: Keith Packard <keithp@mandolin.keithp.com> +Date: Wed Nov 8 23:17:55 2006 -0800 + + Add RRInit function to create resource types for RR objects. + + To allow RandR objects to be created before the screen object exists, + the resource types must be registered with the resource database. + A driver wishing to create RandR objects must call RRInit before doing so. + + Also, fix a segfault when setting Output data before it is associated with a + screen. + +commit ec77a95a02329a2ee3a94d7de9d2a234aecb9ca0 +Author: Keith Packard <keithp@mandolin.keithp.com> +Date: Wed Nov 8 21:36:35 2006 -0800 + + Allow RandR objects to be created before the associated ScreenRec. + + xf86 drivers need to create RandR object in the PreInit stage, + before the ScreenRec is allocated. Changing the RandR DIX code + to permit this required the addition of functions that later associate the + objects with the related screen. + + An additional change is that modes are now global, and no longer associated + with a specific screen. This change actually makes mode management cleaner + as there is no more per-screen list of modes to deal with. + + This changes the RandR 1.2 ABI/API for drivers. + +commit fd91630b73100e9d77ccb492c52807448bc772a5 +Author: Dave Airlie <airlied@linux.ie> +Date: Thu Nov 9 09:30:33 2006 +1100 + + make X server use system libdrm - this requires libdrm >= 2.3.0 + + This patch blacklists the load "drm" line, moves some functions in dri module + links dri module against libdrm, and removes the X copy of libdrm + +commit 0409e1627a167db2efc1355f292d3c02a6989ffc +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Nov 8 16:17:20 2006 -0500 + + 'make dist' fixes. + +commit 7e0aeebb8f8a5dff3cb4d88756e535dd70edeec4 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Nov 8 12:03:37 2006 -0500 + + Bug #6786: Use separate defines for server's Fixes support level. + +commit b5d09d4adb8088719ff494a4281a793717046576 +Author: Rich Coe <Richard.Coe@med.ge.com> +Date: Wed Nov 8 18:10:14 2006 +0200 + + CheckConnections: don't close down the server client (bug #7876) + When an appgroup is shutting down, the list of clients can change, so make + sure we're not trying to shut the server down. + +commit 0567a6337b84fa045b5732e98203f488274aa2a2 +Author: Bram Verweij <amverweij@gmail.com> +Date: Wed Nov 8 18:00:52 2006 +0200 + + xfree86/linux acpi: fix tokenising + Split on a space, rather on the 'video' string, as strtok takes a char, + not a string. + +commit e7900d68c3ee657158813f0650886d680c0a9a3c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 8 15:36:47 2006 +0200 + + remove trailing whitespace + Whitespace police in full effect. + +commit 2035f115b7db3c4b7deabeab0d814b3107d6ef30 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 8 15:28:10 2006 +0200 + + xfree86: remove xf86Keymap.h + +commit 809e2841aaa54662a42498aacec558bc813bba1c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 8 15:27:58 2006 +0200 + + xfree86: add general handler, port ACPI to it (bug #5665) + + Add 'general' handler registration, which will not trigger DPMS when an + event comes in. + Make ACPI use this. + +commit b5438f7fb2879e0226b578f60b22a490e73c3a83 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 8 15:24:58 2006 +0200 + + Get*Events: massive reorganisation + + Reorganise the code logically, and put more comments in. + Clip valuators in proximity calls. + +commit b0a7443ca8bd224994f98c1c1e25de88f2573224 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 8 15:23:52 2006 +0200 + + configure.ac: axe redundant SDL test + +commit 332f179db7c38310db1f752d45f51b6d8301fd30 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 8 15:23:35 2006 +0200 + + kdrive/sdl: fix compilation + +commit 988757a44197c91027109076e2e33ff6510ed71d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 8 14:06:51 2006 +0200 + + config: error messages non-fatal, and before we free them + + Move error messages before we free the error structure, and make them all + non-fatal. + +commit e2b78df5800fb4e3f0ed01b38a1974ba3577949c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Nov 7 11:13:56 2006 +0200 + + xkb: warning fix + +commit b55007d8cc9d20baa23d5de67683e414c827d3e5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Nov 7 11:13:32 2006 +0200 + + SyntheticMotion: don't dereference sprite.screen when not using Xinerama + +commit f93d10ce9bb4a6de83b561f44fb7b046def16234 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Nov 6 18:33:45 2006 +0200 + + dix: remove staggeringly broken vendor workarounds + + Dear SGI, + No. + + Scant regards, + Daniel + +commit 389275d240e4ba19d62fda0f138a45c7ecb245ff +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Nov 5 02:47:59 2006 +0200 + + XkbCopyKeymap: don't iterate broken types, or dereference null pointers + + Don't iterate invalid destination types (>= num_types) when coping key + types. + Don't free key_aliases if it's NULL (theoretical, but sure). + Make sure dst's label_font gets allocated if it's NULL. + (Thanks, Chris Lee.) + +commit d585b4189aff8d7952847f75b19b4f092ab3b88b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:47:55 2006 +0200 + + xkb: fix uninitialised warning + + Fix uninitialised warning with memset(); we never actually use it + uninitialised, but gcc doesn't know that. + +commit b6d7b537ed8975363ad0f7c4180a62822358e418 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:43:22 2006 +0200 + + os: fix sun extensions test + + 'else if' is not very valid, plus the logic is kind of broken, so just + move it outside the ifdef in the first place. + +commit 8ba0c7b62c78dead722b0c8aa414f37bac4414b7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:41:03 2006 +0200 + + xace: avoid 'unused variable pScreen' + + Initialise pScreen explicitly, as REGION_* macros ignore pScreen. + +commit c3ea1f7db494365032526dc06a7283384bd0ecd1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:38:31 2006 +0200 + + dix/mi: still more warning fixes + + Fix up prototypes for PrintChildren and PrintWindowTree in the dix. + Make miPrintRegion be unconditionally defined, and move the prototype into + regionstr.h. + Change a bunch of ScreenPtr pScreen = foo; to + ScreenPtr pScreen; pScreen = foo; in window.c, so we avoid unused variable + references (as inline REGION_* doesn't reference pScreen). + +commit 3a9b96425851b495503bd2eb0fd0d01c08f6a097 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:33:09 2006 +0200 + + dix: add missing prototypes + + Add missing prototype for ffs, and include headers from ffs.c. + Move PostSyntheticMotion prototype to input.h. + +commit 6716488fa256798070017232405b107d5c985479 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:30:23 2006 +0200 + + dix: remove unused debug code + +commit 51813d77bfb84609a58a98e678efe9b6c0bf5503 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:29:05 2006 +0200 + + dix: remove unused variable + +commit 844090a5b557705dd0adce2b7ed98813b5104d85 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:21:29 2006 +0200 + + xfree86/xf86misc: warning fixes + +commit 61b570d0c1eb448f0aa08b4598118f0d43bc7345 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:21:09 2006 +0200 + + xfree86/os-support: update prototype for OSRingBell + +commit c51fadc07d938f6a3edfd5620170fcb7d6486a11 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 21:20:45 2006 +0200 + + mieq: annotate with some more comments + +commit 578899139f133746634a7bf8845e25362b5dfca2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Nov 4 20:35:55 2006 +0200 + + RemoveGeneralSocket: don't touch EnabledDevices + + RemoveGeneralSocket. Harmless, but. + +commit ae58d349c1cf5d63ad3616c485baa858350978d5 +Author: Laurence Withers <l@lwithers.me.uk> +Date: Sat Nov 4 19:34:37 2006 +0200 + + CreateColormap: fix return value (bug #7083) + + Return BadMatch when an unsupported visual type is given, not BadValue -- + this is correct according to the spec. + +commit 96f78e3886791b723ccd9ba40bea701603537b0c +Author: Erik Andren <erik.andren@gmail.com> +Date: Sat Nov 4 19:29:49 2006 +0200 + + remove XFree86 changelogs (bug #7262) + + Without being able to tie these to specific commits, the text changelog is + useless, as well as being huge. + +commit 5a40448f2d0ac2c86c617bebe3fb649174bf0d7f +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 7 15:48:05 2006 -0800 + + A couple more cases of error message before freeing strings. + +commit 05f1c302460a14c8fa9a943a12d69adcd3c30d58 +Merge: 3e7e0e3 46af6d1 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Nov 7 18:42:54 2006 -0500 + + Merge branch 'autoconfig-for-7.2' + +commit 3e7e0e35094d09e0e764818ed125314be75be01a +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 7 14:13:23 2006 -0800 + + Report the error before freeing the error strings. + +commit 4e6e4baead6c565363abbcd9e06cc685be121596 +Author: Eric Anholt <eric@anholt.net> +Date: Tue Nov 7 13:13:53 2006 -0800 + + Fix build on FreeBSD after input-hotplug. + +commit 20e9144c0746943624ff77a61791b8596f3f8458 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Nov 7 12:49:28 2006 -0800 + + Add $(DIX_CFLAGS) to remaining Makefile.am files + +commit 5e946dd853a4ebc2722ae023429ce5797de3d7a6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Nov 7 13:50:19 2006 -0500 + + Bug #8937: Extension setup functions not called on server resets + +commit 1dcda4f3c56214464c0b6123fea6daa69aae69fc +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Nov 7 01:29:51 2006 -0800 + + Avoid dereferencing sprite.screen when Xinerama is not running. (#8925) + + With Xinerama support built into the X server but not in use, + sprite.screen is NULL and yet the SyntheticMotion + macro would dereference it. Avoid that by just passing sprite.screen + to PostSyntheticMotion which can then dereference it when Xinerama is + enabled. + + Also, define PostSyntheticMotion in dixevents.h and include dixevents.h in + getevents.c + +commit c20d3bf7533da0bf26beaf7d8c359d18edbd70e8 +Merge: 028bbdc 3d39c02 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Nov 7 01:21:28 2006 -0800 + + Merge branch 'origin' into randr-1.2 + +commit 3d39c02fe6aaa602c52f1d4f0ea6cd3bd000cf9f +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 6 21:25:52 2006 -0500 + + More work on Bug #8875: revert previous fix and try using client argument + instead of serverClient. Also don't use totalClientSize as it is not + initialized until after the first call to InitClient. + +commit 75fe0670eb1f71144246f1c20759d58788bbee00 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 6 15:30:25 2006 -0500 + + whitespace adjust + +commit 0539d9cf2423fc0bed6f5c413beba3080f8abd85 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Nov 6 15:29:17 2006 -0500 + + Bug #8875: Security extension causes Xorg to core dump on server reset + +commit aa0261a98e9d5b1349b33e2639bd83c556dd4000 +Author: Juliusz Chroboczek <jch@pps.jussieu.fr> +Date: Mon Nov 6 02:29:49 2006 +0100 + + Improve vm86 error handling in Xvesa. + +commit 6b2c65fdd169037c6ede250d4a8fec3d29a080ae +Author: Juliusz Chroboczek <jch@pps.jussieu.fr> +Date: Mon Nov 6 00:30:09 2006 +0100 + + Fix typo in Xvesa: incorrect reporting of DAC capabilities. + +commit 028bbdc0417173803695808ba9f48498519273a3 +Merge: 50504c6 8deaaa3 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Nov 4 17:46:26 2006 -0800 + + Merge master back to randr-1.2 + +commit 50504c68e1d407232cf83465981b235e542ef31f +Merge: 8b87ce1 cde8806 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Nov 4 17:43:19 2006 -0800 + + Merge branch 'randr-1.2-origin' into randr-1.2 + +commit 8b87ce19741753eafbd99e7093bc3dea8f26e838 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Nov 4 17:41:25 2006 -0800 + + Allow X server to build against libdrm 2.1 + +commit 7ffbe9d232e3a4621a204448d67e434736465cbe +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Nov 4 17:41:09 2006 -0800 + + Add DIX_CFLAGS to hw/vfb/Makefile.am + +commit 2db62bce0725ba2d88cbe40fc440b6bda45046f3 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Nov 4 17:40:34 2006 -0800 + + Define fbHasVisualTypes in fb.h as it is exported + +commit 8deaaa312ad7f9b492a2ae8ad17d74650112c25c +Author: Bernhard Rosenkraenzer <bero@arklinux.org> +Date: Sat Nov 4 18:59:39 2006 +0200 + + automake: avoid use of reserved _SOURCES keyword (bug #8866) + Avoid using _SOURCES unless we're directly referencing a program or + library to be built; use _SRCS instead. Shuts automake 1.10 up. + +commit f72927d26cd112d321f7bf187df3c740b3129d22 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sat Nov 4 19:00:57 2006 +0200 + + xfree86/hurd: remove OsMouseProc (bug #5613) + Remove OsMouseProc, let the mouse driver deal with it. + +commit 0273610578485564c3c0be11b336b6554cc31b43 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sat Nov 4 19:02:04 2006 +0200 + + xfree86/hurd: add bell support, remove SERVER/LOADER defines (bug #5613) + Add no-op bell ringing support, and remove obsolete @SERVER_DEFINES@ and + @LOADER_DEFINES@ from CFLAGS. + +commit ade4bf09076d13dbf3549c0a2d987a0afe76d5c1 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sat Nov 4 19:03:13 2006 +0200 + + mesa/indirect: include byteswap.h on GNU userland (bug #5613) + Include byteswap.h on all GNU-userland systems (including with the Hurd + and FreeBSD kernels), not just Linux. + +commit 412e93349e1656c9650115328af4be0e59a66f74 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sat Nov 4 19:05:02 2006 +0200 + + kdrive: make building of Linux support conditional (bug #5613) + Only try to build Linux support on Linux. We should probably disable all + OS-dependent DDXes if we don't have a workable OS (and only build + Xephyr/Xfake), but that's future work. + +commit cde8806c2930788ba8076e94651d391e45f3ccdb +Author: Eric Anholt <eric@anholt.net> +Date: Fri Nov 3 16:36:34 2006 -0800 + + Don't bump the refcnt if the new mode is NULL. + +commit 97fd471a627be185bee8cda3f709cfccea3fa12d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Oct 27 12:36:56 2006 -0700 + + Fix standard VESA modes. + + The built-in mode timings were off slightly for the 640x480@60, 640x480@72, + and 1024x768@75 modes. + +commit 22ee2e4e1f1d9fd9ca9f25c9bf25370034b771d4 +Merge: 49a2668 bd0c829 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Nov 3 12:54:56 2006 -0800 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 49a26681b2bdd95ed65c425f1fa1441d2f092a6e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Nov 3 12:54:43 2006 -0800 + + Add DTrace probe points for X server <-> client communications + + See http://people.freedesktop.org/~alanc/dtrace/ for more details + +commit bd0c829654903ca45543dfa59cda967c4fafd8ac +Author: Bjorn Helgaas <bjorn.helgaas@hp.com> +Date: Fri Nov 3 18:54:06 2006 +0100 + + Do not map full 0-1MB legacy range + + If we're mapping something in the "legacy range" (0-1Mb), we shouldn't + expand the requested range to the entire 0-1Mb range. Typically this + is for mapping the VGA frame buffer, and some platforms support mmap of + the frame buffer but not the entire 0-1Mb range. + + For example, HP sx1000 and sx2000 ia64 platforms can have memory from + 0-0x9ffff, VGA frame buffer from 0xa0000-0xbffff, and memory from + 0xc0000-0xfffff. On these platforms, we can't map the entire 0-1Mb + range with the same attribute because the memory only supports WB, + while the frame buffer supports only UC. But an mmap of just the + frame buffer should work fine. + +commit c1828a8ff51c8db326c47e6710f4f42fab94fb6d +Author: Egbert Eich <eich@freedesktop.org> +Date: Fri Nov 3 18:32:48 2006 +0100 + + Fixing mach64 driver bailing out on ia64 + + Mach64 driver bails out on ia64 because it cannot map device + memory. It turns out that some bogus and unneeded code attempts + to find the root bridge of the device and fails to do so proberly + as there this host-to-pci bridge is not existant. This code has + been around for years although it completely unclear what it had + been intended for. Fixing this by eliminating the bogus code. + +commit d50fc413b39f52663b46084c28e81fc4933a7b49 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 18:53:41 2006 +0100 + + Fix device path in altixPCI.c to be domain aware. + +commit 1d731fc54a2cf5d3f353d8ee1c7c4989df27f011 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 18:50:15 2006 +0100 + + Add domain support to linuxPciOpenFile(). + + Loosely based on patch from David S. Miller <davem@davemloft.net> + See also bug #2368. + +commit caaa113acf4144fd47a1ac93ca440d78d1983e54 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 18:38:45 2006 +0100 + + Fixing domain support for ia64 + + ia64 specific functions + defines. + Still uses /proc interface for some scaning code. + Based on code from Egbert Eich <eich@freedesktop.org>. + +commit 16c5043fc0c84b14323cd211c2645106455ac320 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 18:22:09 2006 +0100 + + Fix 2 warnings. + +commit 072c022e731c3aadf34096f16364e29df47280d2 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 17:58:19 2006 +0100 + + Fix obviously wrong boundary checks + cleanup unused vars. + + Also disable compilation of code that is no longer used anywhere in the whole + Xserver tree. + +commit 5afc6c1a14fea2966017493b045fa7209faeb8eb +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 15:42:03 2006 +0100 + + Added linux 2.6 compatible domain aware device scanning code. + + Additional scanning code uses the /sys interface of 2.6 kernels. + Cleaned up the use of tags and already split domain/bus/dev/fn. + +commit 6319f7d713971f70f06166480f069eca3bcace36 +Author: Egbert Eich <eich@freedesktop.org> +Date: Thu Nov 2 12:50:52 2006 +0100 + + Make int10 fully domain aware. + +commit f4dd2665b0f9aa9c00a5152c73bc72cb7514eeb5 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 12:36:12 2006 +0100 + + Added missing domain stripping in already domain aware code. + +commit 46901063e8edc82b67989f4e5eec39d17c67dc98 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Nov 2 12:25:03 2006 +0100 + + Build with -D_PC on ix86 only. + +commit 543b397277d1f03b8091e44812010abcd5d80102 +Merge: 4056e6e 645d057 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Nov 2 19:00:35 2006 -0800 + + Merge branch 'origin' into randr-1.2 + +commit 037f23e6f8fbe6e6fc8e71ed21958fc553df72d0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 2 18:30:58 2006 -0800 + + Convert Xprt DDX to new motion history api + +commit 7dc54a40e900cbea1e509620623b091d54a3c2d1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 2 16:38:47 2006 -0800 + + Remove references to xf86Info.kbd* from solaris code + +commit e46f7f78b362e76f5a553184e3f5ec7e109aa39d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 2 16:38:12 2006 -0800 + + sun_bell.c needs to #include "xf86_OSlib.h" + +commit 58bf9a142d1957f4d77038ee4ce7b1116b1f7955 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Nov 2 14:43:02 2006 -0800 + + PostSyntheticMotion needs to be extern, not static, since it's in getevents.c + +commit 1ecd45fb8e4250fb51daa2bdf1a960af0f8b53fb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 04:51:03 2006 +0200 + + Makefile.am: add config to DIST_SUBDIRS as well + +commit 01afa533aa872d1a101a41153f95d800e68fea3e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 04:32:37 2006 +0200 + + xfree86/os-support: axe more unused files + +commit 57c1409151cb1f6e0e528fb92ebda58f86f12c1a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 04:21:06 2006 +0200 + + xfree86/os-support: remove unused file from dist + +commit de5a4c63747a417cdece919f4fb5a4004a3ee7bb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 04:18:33 2006 +0200 + + xkb: note that we allow full xi interaction + We now allow maps to be set (etc) on different keyboards, so stop putting + XkbXI_KeyboardsMask in unsupported. + +commit 1d65429a9e03871969552d0c31b022546cc46b12 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 04:12:55 2006 +0200 + + xfree86: don't attempt to enable and disable non-DIX devices + Don't try to enable and disable devices with no entry in the DIX, such as + the evdev brain. + +commit 64139c1950ea825c0a0124abc5f88499e91f797f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 03:22:09 2006 +0200 + + bump to 1.2.99.0 + +commit 18c246a13b887b865de6a17e6cd1c259b9bc383d +Merge: 794f2e7 4843d82 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 03:21:37 2006 +0200 + + Merge branch 'input-hotplug' + +commit 4843d823f4d38d8bd468ce3a8feddbff229ed416 +Merge: ba9f513 a7b944f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 03:18:13 2006 +0200 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ba9f5138fc32a7a7b97bcf941bc92751b7c6c2c0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 03:16:10 2006 +0200 + + xfree86: allow starting with no input devices + Add a server flag (AllowEmptyInput), which will inhibit adding the + standard keyboard and mouse drivers, if there are no input devices in the + config file. + +commit be291a6d9764cf29a7d9a8114d47d9f41ce856e9 +Merge: a2d6242 6fdfd9d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 03:15:25 2006 +0200 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit a7b944f0d96c3e0e15e75378a04def1ac96089fb +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 1 16:17:49 2006 -0800 + + If getpeerucred() is available, include pid & zoneid in audit messages too + +commit fbfb35189ef6666707097704b43e052cb2f919ae +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 1 15:11:48 2006 -0800 + + Bug #1997: AUDIT messages should contain uid for local accesses + + <https://bugs.freedesktop.org/show_bug.cgi?id=1997> + +commit a2d6242106bb3a440faa9cad157e0120dbfa7b6e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 00:46:33 2006 +0200 + + kdrive:remove Change{Keyboard,Pointer}Device + This was removed in the DIX, so just axe it. + +commit d9a5e3e964b6c91fbca88b50674fce9660b972a4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Nov 2 00:45:23 2006 +0200 + + XkbCopyKeymap: be more careful with levels, allocate compat/geom + Take various extra precautions with copying levels across (thanks Chris + Lee for a gdb session), including allocating when we don't already have a + coherent map. + Only free type components if they're present. + Allocate geometry and compat components if we don't already have them in + the dest map. + +commit 6fdfd9dad91d7b7aa292f8c4d268dd27c34de8d3 +Author: Eric Anholt <eric@anholt.net> +Date: Wed Nov 1 14:29:59 2006 -0800 + + Fix several cases where optimized paths were hit when they shouldn't be. + + This fixes a number of rendercheck cases. + +commit 40f84793bca40dcc6883d51aefa1bda44bd1ac61 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Nov 1 14:34:46 2006 -0800 + + Propogate $LIBS for xtrans, clock_gettime, libm, etc. to libs used for each server + +commit d7d931abe01a8cf555b027f2bcfcccd5e9053e52 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 1 23:48:58 2006 +0200 + + configure.ac: remove check for rate/period + Keyboard stuff is now handled in the kbd driver. + +commit 81728558a044fdde0e1d63da7b6314755f77296e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 1 23:10:26 2006 +0200 + + input: add non-keyboard bell ringing function + Add a generic 'ring the bell' function (console bell on Linux and BSD, + /dev/audio on Solaris), and add DDX functions for this. Make this the + core keyboard's bell. + Port Xvfb and Xnest to this. + Port XFree86 to this, with OS-specific hooks for Linux, BSD, and Solaris + taken from foo_io.c in the old layer. + +commit 3df454719f9cbf6a046cb7458019ec621b3b42ee +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Nov 1 23:02:57 2006 +0200 + + kdrive: add KdRingBell prototype + +commit 4056e6e79a4e37101d298ae29139c83d3816368b +Author: Keith Packard <keithp@mandolin.keithp.com> +Date: Wed Nov 1 00:29:46 2006 -0800 + + Move physical size from mode to output. + + Modes can be shared across different sized monitors this way. + + Also caught some missing byteswapping and an incorrect return type. + +commit c03311a1e78daa291477a67b1bb7206772108c5d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Oct 31 16:05:48 2006 -0800 + + Fix automake error: BUILT_SOURCES was defined multiple times on Solaris + +commit a2434ec5f3c9dc79d1f05c2d704a82a766718ed4 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Oct 31 15:57:59 2006 -0800 + + Make _POSIX_C_SOURCE hack work with Solaris headers + + Solaris headers are very literal - if you ask for POSIX_C_SOURCE 199309L, + they limit to only the functions in that standard and no more, unless you + also specify __EXTENSIONS__ to allow functions beyond the standard base. + +commit 645d0576205532a3610ae351267d5b84d76236bd +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Oct 29 18:19:56 2006 +0100 + + Handle building in a separate objdir + +commit 59584c375f4e4b2670a92002ecb7a78a0bc50cce +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Oct 29 17:49:46 2006 +0100 + + kill GNU-make'ism. + +commit 0107320fac0913aae2cb169992e31c670b4bd2f7 +Merge: 06b6b97 a34446f +Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> +Date: Sun Oct 29 15:23:35 2006 +0100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 06b6b971d065226b983ba25da7ea8236ec37df04 +Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> +Date: Sun Oct 29 15:22:37 2006 +0100 + + Make sure we have 64-bit file-offsets in libdrm. + +commit 644ee2434a4e09f5baea00a486911f8c24b9a261 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 29 03:52:11 2006 +0300 + + kdrive: avoid null dereferences + Avoid jumping into NULL pointers for OS or card functions which do not + exist. + +commit 738d2e88171bcce8782d670a1cda9a1d941d7977 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 29 03:48:02 2006 +0300 + + kdrive: move bell ringing into an OS function + Move the bell into an OS function, and use that if it's declared; else, + fall back to using the driver's function. + Remove the Linux keyboard bell function; just move it into the OS layer. + Use named initialisers when converting the old structures, and eliminate + unused functions. + +commit 96e32805d12fc36f0fa0926dbfb0dd8a5cadb739 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 29 03:43:34 2006 +0300 + + Xi: disallow changing core keyboard and pointer + Just short-circuit the change core keyboard/pointer requests. + +commit 68f595ca6c7883e030947b7f95c50e92aa733f2b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 29 03:41:34 2006 +0300 + + GetTimeInMillis: use correct units for clock_gettime + Make sure we're treating the nanoseconds as a long, not an int, so we + don't overflow. + +commit 51a06b3c44509c72279b5cfcf2b52b9a35c461b0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 29 03:40:57 2006 +0300 + + WaitForSomething: only rewind when delta is more than 250ms + Only rewind time when we're more than (original delta + 250ms) away from + executing the timer. + When we're walking the timer list, use a goto to iterate all of them from + the start again, since timers may drop out of the list. + Don't bother trying to be smart in TimerSet, we'll pick it up in + WaitForSomething anyway. + +commit a34446f5b3d90714969a90583c49cb1eae1c9651 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Oct 27 13:43:43 2006 -0400 + + Add missing file to list in Makefile.am + +commit 92d04e746bd9b8ad3ee217c165ace20468e079cf +Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> +Date: Fri Oct 27 18:26:30 2006 +0200 + + Import libdrm functions for the drm memory manager. + +commit e3d3d29db5eef057b4e8294377c9c3147436bc2f +Merge: 92387e9 004d00e +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 26 20:21:16 2006 -0400 + + Merge branch 'master' into my-XACE-SELINUX + +commit 92387e99d085b0b081fcedb2f20304eb0ac536b1 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 26 20:20:57 2006 -0400 + + Change symbol in libaudit library test. + +commit 196c5836f463c28f633bbba847f59acd5935359d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 27 01:27:31 2006 +0300 + + CoreKeyboardProc: annotate with FIXME + Setting an empty keymap by default isn't wildly useful. + +commit f9a1e456f8a4eaa1a9c71fd0fe5231140975c22d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 27 01:25:39 2006 +0300 + + CoreKeyboardProc: don't leak keymap and modmap + SetKeySymsMap does a copy here, so try not to leak them. + +commit a5be65401769fabcb5001dc63035c69f9e4a2712 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 27 01:25:21 2006 +0300 + + mieqEnqueue: only compare DEVICE_BITS of deviceid + Only compare DEVICE_BITS of the two deviceids, so we don't decide that + a valuator event isn't for us, because (id | MORE_EVENTS) != id. + +commit 85212eb504f860b054eb0f0a5029fed86cb8d1c0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 27 01:23:58 2006 +0300 + + getValuatorEvents: make sure we put MORE_EVENTS in the right places + Make sure we put MORE_EVENTS in with the device id if there are, in fact, + more valuator events coming. + +commit 794f2e7291ccb4e48f9fbfc8f08302e3aac0f79f +Author: Myron Stowe <myron.stowe@hp.com> +Date: Thu Oct 26 20:38:58 2006 +0300 + + xfree86: re-enable chipset-specific drivers for Linux/ia64 + Re-enable chipset-specific support for Linux/ia64, by linking in + lnx_ia64.c. + +commit 8c0556e7cb1de8c387ddd886a03a8f8afff1fd0e +Merge: cdc8a4b 004d00e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Oct 26 15:21:22 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 004d00e6689f452fc9fdf91f5ffc6d6aed697d54 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Oct 26 01:10:08 2006 +0300 + + GetTimeInMillis: simplify monotonic test + We don't actually need to get the CPU clock ID, which means we don't need + the monotonic_usable test. Since there's now only one branch, the + compiler will treat that as likely, so we don't need xproto 7.0.9 anymore. + + The fallthrough to gettimeofday() is preserved. + +commit cdc8a4b7b2f099b8860a54c5c9f488e6f7c4913a +Merge: 3da918a d285833 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Oct 26 00:28:30 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit d285833290316cb5dd1e7f1e52c96be3e9cf21cd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 23:57:00 2006 +0300 + + GetTimeInMillis: spuport monotonic clock + Add support for CLOCK_MONOTONIC from clock_gettime, and use that in + GetTimeInMillis() if available, falling back to the old gettimeofday() + implementation. + + This is _slightly_ faster on some 64-bit architectures, and _slightly_ + slower on others (though barely measurable). + +commit d3e57faffee63df1424a209d0418d3a712f91ae6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 23:55:43 2006 +0300 + + WaitForSomething: allow time to rewind + If time rewinds dramatically, reset all the timers to fix their expiry. + +commit e21604914dccece6bc64c69b55512d1f1a969235 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Wed Oct 25 09:48:23 2006 -0700 + + Merge master back in and clean up some unfinished code (closes 8745) + +commit becbda6d519a11c2c211afb8d46f9ea1a2676bc3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Oct 25 11:39:27 2006 +0200 + + Fix test for Option "IgnoreABI". + + This option has plenty of potential for wasting the time of bug triagers + without pretending it's always on. + +commit 59511974db843fa7e11133894cfc10c20fdaf60f +Merge: 054f8cd 598ac7a +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Oct 24 17:26:20 2006 -0700 + + Merge branch 'master' into randr-1.2 + +commit 598ac7a83698327b607084abaebcbd22f8d25fbb +Merge: 828c34e 948a97b +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Oct 24 17:23:12 2006 -0700 + + Merge branch 'origin' + +commit 828c34e83ccdf3bcd2844d5af8b0cac4164b04ab +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Oct 24 17:23:02 2006 -0700 + + Byte swap RRSelectInput enable flags. + +commit 3da918a16c8908fdfaf89f2a1bcaec19e01528a9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 02:22:07 2006 +0300 + + mipointer: remember to update pointer location + Update pointer location so it doesn't get quickly reset by the next + pointer update. + +commit aabc087998e680c2fcf0ebc1c5022c1fe8f58f0c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 02:21:39 2006 +0300 + + GetPointerEvents: always ensure correct number of events + Ensure correct number of valuator events are returned, and that we always + increment events correctly. + +commit 65cd5aa4d754624566c2263015f1a018d137fce1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 01:12:45 2006 +0300 + + kdrive/input: remove unnecessary #ifdef XINPUTs + Xi is now mandatory, so don't bother with the ifdefs. + +commit 0514d53e10b3521bb708a9cbde4bab525248eadb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 01:10:44 2006 +0300 + + xfree86: remove motion history handling + Remove motion history handling, as we now deal with this in the DIX. + +commit b1debebf8fe20ded20ba27e871fd1a6a9de029e3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 01:10:20 2006 +0300 + + mi: remove mi motion history + This is now unneeded as we do motion history in the DIX. + +commit b9e180e632d04bf685ade9e32bd0b20882794486 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 01:09:19 2006 +0300 + + port all users to the new DIX motion history API + Port KDrive, Xvfb, and Xnest, as well as the virtual core devices, to the + new motion history API. Make GetPointerEvents also update the history. + +commit 5b38eb69cdaa154791c7f74e35dbe4d3256b19bd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 01:08:29 2006 +0300 + + dix: add motion history support + Add motion history support (sort of based on the XFree86 DDX's + implementation) to the DIX. + +commit 11fb58be77ac163844e494b2b0a260cf28a7ecd1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 01:07:36 2006 +0300 + + miscellaneous warning fixes + Use the correct type for time, and fix the mi prototype of EnqueueEvent. + +commit 2a74b8a91da1a98669993078f7fe9081f2d743ce +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 25 01:04:53 2006 +0300 + + xfree86: re-bump input abi to 1.0, yet again + +commit 37d1fffe79c35ada056ce9a56292c000014fe48a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Oct 24 23:06:57 2006 +0300 + + inputstr: try to keep device structs the same size + Try to make sure DeviceIntRec and friends stay the same size, + regardless of whether or not XKB is enabled. + +commit 9f9ac01a819ee96fb5be5d7d346c91f461bf3979 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Oct 24 23:01:05 2006 +0300 + + inputstr: fix indentation + +commit 27d682fa030501611a5b52f41f29738134b45c0b +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Oct 24 09:04:14 2006 -0700 + + Fix from HEAD accidentally reverted during merge. + +commit 8b909135664abb69ada522e8e39495d9eca717ac +Merge: 21291d6 948a97b +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Oct 24 08:57:59 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/Makefile.am + hw/xfree86/common/xf86.h + hw/xfree86/common/xf86DoScanPci.c + hw/xfree86/os-support/bus/linuxPci.c + hw/xfree86/scanpci/extrapci.ids + hw/xfree86/scanpci/pci.ids + hw/xfree86/scanpci/pciid2c.pl + hw/xfree86/scanpci/xf86PciStdIds.h + +commit 0cd6a3d8efb5cc1ce4f85ab95bcdf4fb66c7245d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 06:56:07 2006 +0300 + + xfree86/input: add proximity support, free valuators + Re-add support for proximity events, and remember to both va_end our + varargs, and free our valuators. + +commit cccf7ae0ff24d0c84b5144c457f3f86bbbc36e12 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 06:55:21 2006 +0300 + + GetProximityEvents: add (untested) function + Add untested first guess at what GetProximityEvents should look like. + +commit 35fa4ac12b3da33f81e2a12bc9661ed075f323ed +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 06:23:45 2006 +0300 + + GetPointerEvents: break into separate functions + Break out clipAxis, clipValuators, and getValuatorEvents, into + separate functions, to be used by the proximity event code. + +commit a7c2d9a15dc2ff253bb69c3b0738ad993521b9c7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 06:08:27 2006 +0300 + + kdrive: numerous warning fixes + +commit c8f76fb3a473a022d497bd0acd6c84f58fc6efbe +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 05:12:15 2006 +0300 + + xfree86/input: disallow pointer device changes, fix drag event calculation + Don't allow users to change the core pointer. + Fix xf86SendDragEvents to check the device button state, not the core + pointer's. + Remove unused xf86CheckButton. + +commit c5b5b046e86b159a9d32451308f38246cc4587f7 +Merge: fab1d37 948a97b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:58:30 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit fab1d37ecbeee9777ad1485b0cc62b55042d5014 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:57:00 2006 +0300 + + xfree86/options: don't blindly dereference NULL pointers + Sure, conf_idev should be initialised, but if it's not, try to make the + best of a bad situation. + +commit 523fe64ba16cf7a40f4095432d81300726d83e8d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:56:28 2006 +0300 + + kdrive/lots of DDXes: make stubs use KdOsAddInputDrivers() + In theory, removing LinuxPciScan should make these drivers OS-independent. + +commit 57f98e2b72d5c7fea93a9f6da86228ffb4856bf3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:55:41 2006 +0300 + + kdrive/tslib: port to new absolute API, remove debugging + Port to new absolute device (not touchscreen) API, and remove some + leftover debugging. + +commit a6dc629052f0ad509cfa30e98217043a63c09552 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:54:59 2006 +0300 + + kdrive/os: add KdOsAddInputDrivers + Add KdOsAddInputDrivers, which adds all relevant input drivers. + + Could possibly be refactored to KdAddInputDrivers, which called through + OsFuncs to a new function, if it existed. + +commit ac240b00ff6fc354c1aa641406ae8b49244c0b8b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:54:07 2006 +0300 + + kdrive/input: use Absolute instead of Touchscreen + Adjust to suit Zepheniah's new absolute device API. + +commit b1ba4b3e8ad427af1fa8618b0bd839f741ec2ce3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:53:15 2006 +0300 + + kdrive/neomagic: include vesa.h, use DebugF + +commit 29f28dd1a8a7ed07e945a67946e3510f4b32d12a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:52:52 2006 +0300 + + configure.ac: add XSERVER_LIBS to XNEST_LIBS + +commit 2f33f4065d89ae2b6fdda43c7105d72f89920cae +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:52:35 2006 +0300 + + Xnest: port to new input API + Port Xnest to Get{Pointer,Keyboard}Events, plus the new mieq API. + +commit 08928afb0500d46b0caa0a1d1244dee2ed80e6a0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:51:52 2006 +0300 + + Xnest: disable XKB, reshuffle code + Disable XKB, as we can't yet use it; move Composite disabling to + ddxInitGlobals, along with XKB. + +commit cd3b16a57efaf89108054f18a94c91e2dd74fafa +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:51:13 2006 +0300 + + Xvfb: port to new mieq API + +commit bf4df9b73f0c1a84093aaf9a2e2cbc56fb341c60 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:50:53 2006 +0300 + + include: move POINTER_* flags from inputstr.h to input.h + Given they're just numeric constants, they should be included in + input.h, not inputstr.h. + +commit 4dd91c45abea9fb561a5acb10290e29487df6722 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:50:03 2006 +0300 + + miinitext: Xi and XKB are not hardware-only extensions + Xi is now a required extension, and XKB can be used without hardware, + so include them both when NO_HW_ONLY_EXTS is defined. + +commit 562096a012f4bb8f44d5ec6320a32f4010c189e4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:49:22 2006 +0300 + + XkbCopyKeymap: increment shapes and outlines when copying + Remember to increment the source and destination shapes when copying, + instead of just endlessly copying the first one. + +commit eec182259112fba240751f974f7e5ca09fce8b9d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 02:48:30 2006 +0300 + + dix/getevents: move SyntheticMotion to getevents.c + Mostly, this is just a cheesy hack to ensure that getevents.o gets + included when linking. Sigh. + +commit bc701a14292da5abfb601e3a040651a74f46df8f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 23 00:08:32 2006 +0300 + + dix/getevents: cosmetic cleanups, remove keymap copy from GKVE + Remove keymap copy from GetKeyboardValuatorEvents, as + SwitchCoreKeyboard now takes care of this for us. + Remove unused variable and function prototype. + Update comments to be as informative as possible. + +commit b03e2f7029506640a8fe5cb88818b329c23503ff +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 22 19:56:49 2006 +0300 + + xi: fix NIDR return yet again + For a one-line function, it was pretty broken. + +commit 90de7ce25a84cfe6c6790f9af2bc2399d25b9b9c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 22 19:54:36 2006 +0300 + + xi: fix return type for NIDR + +commit f46dc272913ffb6b5b234a7ec6f4ba5cae44a831 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 22 19:51:35 2006 +0300 + + xi: add NewInputDeviceRequest to stubs + +commit 31a6307b7ba5adaa96deb8101ddfcda0262f537d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 22 19:49:31 2006 +0300 + + xi: change DEVICE_TOUCHSCREEN to ABS_{AREA_CALIB} for stubs + +commit eae6594d03a606ddf1f433b5897b5938aa940c1e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 22 16:39:44 2006 +0300 + + Xi: swap control in DevicePresenceNotify + +commit be21630164e865eca72ff2a686a38ae4e30fd79c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 22 16:33:02 2006 +0300 + + dix, Xi: make use of deviceid in DevicePresenceNotify + Use the deviceid and control fields in DevicePresenceNotify since + the last push to inputproto to send a DPN whenever a control changes + on a device. + +commit f08b6b2367705cb5b60e996e6328197430bf1919 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 22 12:30:02 2006 +0300 + + kdrive: change DEVICE_TOUCHSCREEN to DEVICE_ABS_{CALIB,AREA} + +commit 77e724585f6c53feb55475b94d8cfcb6acf1159b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 20 00:44:46 2006 +0300 + + minor formatting fixes + +commit 948a97b97e93cee05a23f1f1ae699c5e181bc8ce +Author: Drew Parsons <dparsons@debian.org> +Date: Sat Oct 21 23:09:22 2006 +1000 + + Minor typo fix to xorg.conf man page. + +commit 04554a3adcddc32de5fdb0b3122da0bcdd4c24a9 +Author: Drew Parsons <dparsons@debian.org> +Date: Sat Oct 21 22:06:43 2006 +1000 + + Minor typos in Xserver man page. + +commit e26a494f417c3c700636ee68892c3015b2e0f27a +Merge: 736b0d5 aeba855 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Sat Oct 21 04:26:14 2006 -0400 + + Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 736b0d5078597abbda80444deef852879260af90 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Sat Oct 21 04:24:49 2006 -0400 + + DEVICE_TOUCHSCREEN becomes DEVICE_ABS_CALIB. + + Update the DEVICE_ABS_CALIB stuff to include the new elements. + + New DEVICE_ABS_AREA support. + + dev->touchscreen becomes dev->absolute, with _CALIB and _AREA stuff in it. + + Update xfree86 to compile with this, kdrive needs an update too. + +commit edd5f1745461f995670969cb736d1569ca94643f +Author: Carl Switzky <Carl.Switzky@Sun.COM> +Date: Thu Oct 19 17:30:54 2006 -0700 + + Add ast driver/device info to Xorg server & config utilities + +commit aeba855b07832354f59678e20cc29a085e42bd99 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 20 00:30:28 2006 +0300 + + move keymap copy to event processing, from enqueuing + + Move the keymap copying to event processing time (in + ProcessInputEvents), instead of being at event enqueuing time. + Break SetCore{Pointer,Keyboard} out into separate functions. + Change mieqEnqueue to take a device pointer, that asks for the + _original_ device associated with this event. + +commit a8d3dad9d9f2b9053843e655abe463a68ba8dcb7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 20 00:28:40 2006 +0300 + + xi: add DEVICE_ENABLE control + + Add DEVICE_ENABLE control, which allows runtime enabling and disabling + of specific devices. + +commit b0780312d80ea4af0136227f90fdd7ada3db71c5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Oct 19 13:51:53 2006 -0700 + + Pre-release message should tell users to check git, not CVS, for updates + +commit c5dc997baf57ffa08025efadbbaf761296ce4bc4 +Author: Joshua Baergen <joshuabaergen@gentoo.org> +Date: Thu Oct 19 11:14:26 2006 -0700 + + Create xorg.conf.example (Gentoo bug #138623). + +commit d029c8f1b72019446a5c873f55ffa43504b03dfb +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Oct 18 18:11:06 2006 -0700 + + Use getisax() instead of asm code to determine available x86 ISA extensions on Solaris + +commit a8a0abdbea0573c861a5af9d58f3ce66790455ca +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Oct 18 10:59:07 2006 +0300 + + config/dbus: always unref the connection, not close + +commit 80642f37d40216035786eaf490952d16f6b5f597 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Oct 17 14:53:28 2006 -0400 + + Stop building xorgcfg by default. + +commit 5e17cde27b064174584d478130b0f95dcef78deb +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Oct 17 17:06:44 2006 +0200 + + StorePixels() macro could create invalid *x++=*x... code - fixed. + +commit 205c6788d7a34704e36b23f1a93d89e9b986266a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 16 23:48:09 2006 +0300 + + config/dbus: properly initialise vtable + + Properly initialise the vtable, so we don't end up with an unregister_function + pointing to god knows where. + +commit 85ac2f16abe9f6e88b4e71609da334d336a9a600 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Oct 16 12:39:05 2006 +0100 + + Small modification to blocking signals when switching modes. + +commit 0901eec87ee9f3a2a067695bdbd569ff42149879 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Oct 15 16:57:09 2006 +0200 + + Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms. + +commit a232693c8c2a206aac47c07b133c071938204e0b +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Oct 15 16:48:59 2006 +0200 + + Add per-drawable Xv colour key helper function. + + This allows overlay Xv adaptors to work slightly better with compositing + managers. + + Bump the video driver ABI minor so drivers only need to check for this at build + time. + +commit 5563861ab7e56ec891cfce6b34af43fec53ccee3 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 13 19:05:28 2006 -0700 + + Make sure xorgcfg files are included even when dist made with --disable-xorgcfg + +commit e1dd1904c6c7ce33f347d822272831d54a6497c8 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Oct 19 13:51:53 2006 -0700 + + Pre-release message should tell users to check git, not CVS, for updates + +commit 62d24097932708fbbb62a23614fe63b4b7acf3bd +Author: Joshua Baergen <joshuabaergen@gentoo.org> +Date: Thu Oct 19 11:14:26 2006 -0700 + + Create xorg.conf.example (Gentoo bug #138623). + +commit 357b37b3826fa6e9878c0bd895164259c2ed3c0d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Oct 18 18:11:06 2006 -0700 + + Use getisax() instead of asm code to determine available x86 ISA extensions on Solaris + +commit 1b1698af41b9038d9f9dbf521737d0baab5a2237 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Wed Oct 18 04:57:22 2006 -0400 + + Pass SetDeviceValuators down to the driver. + NOTE: This changes the LocalDeviceRec struct, which breaks input drivers. + +commit 5eca750fe2f3f243fb352271ad8da196af0cb16a +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Tue Oct 17 14:53:28 2006 -0400 + + Stop building xorgcfg by default. + +commit df979b75c8cd8a7e0566aea58031bb9b8f5cd3d3 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Oct 17 17:06:44 2006 +0200 + + StorePixels() macro could create invalid *x++=*x... code - fixed. + +commit d430e76a161c963169067875c3654f5fd8f42b19 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Oct 16 12:39:05 2006 +0100 + + Small modification to blocking signals when switching modes. + +commit 6dd4fc4652f942724039dc2317c560ea7276ab59 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 16 00:22:00 2006 +0300 + + xkb: fix virtual modmap size computation + Compute virtual modmap size bounded by nVModMapKeys-1, rather than + nVModMapKeys. + + This is sort of a best guess. The other way seems a little more + logical, but also leads to segfaults pretty quickly if you hammer + GetMap hard enough. So let's try this one. + +commit a484ba15277e66e7ef9b21b238dcbf760695bc63 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 15 23:47:34 2006 +0300 + + XkbCopyKeymap: copy server vmods, and name atoms + Copy server->vmods, and all the atoms in names. + +commit ad355fecee3965be576596aeed5da54d776edf1d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 15 21:59:06 2006 +0300 + + xkb: make sure we set the map on the right device, not necessarily core + Forgot that all XKB requests took a device spec: the comparison of + 'if working on the core keyboard, does this device send core events; or, + is this device the core keyboard?' was broken. Instead, what we want is + 'if working on the core keyboard, does this device send core events; or, + is this device the one we're working on?'. + +commit 4ae7745a0dc86de6346409a69c1e396e0b954514 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 15 21:48:01 2006 +0300 + + xfree86 input: always open devices on NewInputDeviceRequest + +commit acd8419948003032056a56d46adbef7c35e7739c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 15 20:42:31 2006 +0300 + + config: unref connection, don't close it + Just unref the connection instead of explicitly closing it (thanks, Rob + McQueen). + Add a commented-out unregister_object_path call: unfortunately, when we + call it, libdbus segfaults. But if we don't unregister the path, we + can't register it again. So regenerations are broken either way, but a + little less violently like this. + +commit fc9b5f84b244ea08480b73bd15ac919b875800fb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 15 20:01:01 2006 +0300 + + dix/devices: add devices in proper forward order + Add devices in forward order with the normal linked list convention. + Previously, AddInputDevice would add all the devices in reverse order to + off_devices, before they were added again in reverse order to devices with + EnableDevice. + This just makes both work in forward order, which provides the ordering as + you'd expect when hotplugging devices (i.e. adds them to the head, not the + tail). + +commit ec35e7198debf938f1115f584e675ce5995743e3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 15 19:44:49 2006 +0300 + + config: add replies and dbus api documentation + Add replies, which use standard X error values, to the two currently-supported + input configuration requests. + Document the D-BUS API we use. + Make sure we free everything when we encounter an error. + Add a _source option to all incoming requests, noting that it came from a + client. + Reject all requests to add a device where an option name contains an + underscore. + +commit 7e4717683d6c08d1e490a60b7493a94bbc57bf8d +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Oct 15 18:12:28 2006 +0200 + + exaDrawableDirty: Fix initialization of BoxRec. + + This will hopefully fix the partial window corruption experienced by some + people. + +commit 3ad1642f1bbaa5f96558cdf3384b40f7122f8781 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Oct 15 16:57:09 2006 +0200 + + Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms. + +commit f9bfee50981006a2c58d3f73e2b0d123bb2a41b7 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sun Oct 15 16:48:59 2006 +0200 + + Add per-drawable Xv colour key helper function. + + This allows overlay Xv adaptors to work slightly better with compositing + managers. + + Bump the video driver ABI minor so drivers only need to check for this at build + time. + +commit a05044cfc14a8bc6cc31236dcecada60bec09924 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 14 22:14:56 2006 +0300 + + xkb: better support of XkbDfltXIId + XKB.h specifies that XkbDfltXIId should be used where the client doesn't + care about the device identifier. We take this to mean core devices, + where practical. + +commit 4d8030076ed1a7680bdfcb7b89af1045bdc40304 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 14 22:14:07 2006 +0300 + + dix: move GetKeyboardEvents/GetPointerEvents to a new file, export symbols + Move GKE and GPE to a separate file, to help stem the events.c explosion. + Mark GKE/GKVE/GPE as _X_EXPORT. + +commit 6afc7c284690b1e2bb7544b5bc4f31a3f6a05519 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 14 15:54:35 2006 +0300 + + dix/devices: remove XACE merge debris + +commit 93302452e737bd91a893eb495592538d40d921e5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 14 15:54:12 2006 +0300 + + XkbCopyKeymap: add geometry support + Add a first cut at geometry support, which seems to generally work. + +commit b9108a13fc126d97c0393f911a1d9292563444ce +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 13 19:05:28 2006 -0700 + + Make sure xorgcfg files are included even when dist made with --disable-xorgcfg + +commit 054f8cd2675a80b14bc1ce266377fcfee2335cee +Author: Keith Packard <keithp@neko.keithp.com> +Date: Fri Oct 13 17:34:53 2006 -0700 + + Limit pointer to valid crtc areas. Add event swapping. Fix change tracking. + + Add function to keep pointer within valid crtc areas. + Finish event delivery and swapping code. + Separate configuration from layout changes to send correct events. + +commit 335b503c5e7041bb0c44611e496d1c46f554e630 +Merge: bd3d93b cf948b7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 13 18:10:45 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit cf948b7b04dfeb61a294889027b9a54f6b9b478e +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Oct 13 14:48:10 2006 +0100 + + Block IO on switchmode just as we do for VT switching + to avoid cursor movements signalling io. + +commit 4b53a5e4b147ab748b28dffc1d330b7148d8efa6 +Merge: 23f6f08 042d4a4 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 11 20:50:31 2006 -0400 + + Merge branch 'master' into my-XACE-SELINUX + +commit a6df780e4d3f90cc699b0b864bade03d6f15afd7 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Oct 11 15:41:22 2006 -0700 + + Fix bug #8608. + + Regenerate files based on recent commits to Mesa (that fix Mesa bug + that return pixel data. + +commit 042d4a407d0eca9131d0420b0b9189559aac326d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Oct 9 16:32:11 2006 -0700 + + Bug #8459: Don't forget to include AM_CFLAGS in libfb_la_CFLAGS on non-MMX platforms. + + Reported by Edgar Toernig. + +commit 1b94c117e0f294ef2f89bf24d45ba7a8e45efe35 +Author: Matthias Hopf <mhopf@suse.de> +Date: Tue Oct 10 19:37:22 2006 +0200 + + Fixing probably long-standing bug in domain support. + +commit 6776c0f0e9677a65ec36ceef9618ff701b99596c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Oct 9 17:24:37 2006 -0700 + + Use bash on Solaris to run symlink-mesa.sh + + symlink-mesa.sh won't run with Solaris Bourne Shell (/bin/sh) so explicitly + run it with /usr/bin/bash instead + (cherry picked from cde68728860179dc84e615ccb378ce992513fd62 commit) + +commit bd3d93be82d91e4cf35ae317dfd658d1706257ea +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 23:21:12 2006 +0300 + + xkb: remove random broken vendor workarounds + +commit 33406da096b4ae21134484113b280e07d0c8f0d9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 23:20:56 2006 +0300 + + GetKeyboardEvents: add first_valuator argument to GKVE + +commit ef7e05e9de57b9c9c27ed3307eede6d8fc6c1af3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 21:42:15 2006 +0300 + + xfree86/xinput: pass first_valuator params, don't clip to first screen bound + Pass first_valuator to GetPointerEvents/GetKeyboardValuatorEvents. + Don't clip axis bounds to that of screen 0 when initialising axes. + +commit 1546a398144619a14ff06aaf84ebc1bf293eac66 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 21:40:53 2006 +0300 + + GetKeyboardValuatorEvents: also take first_valuator param + Take a first_valuator parameter, which specifies the first valuator. + +commit b05a11478edc7e6d1e38ef7f8d6788c7bd917493 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 21:23:12 2006 +0300 + + doc/extensions: rename to c-extensions + The old name could be somewhat confusing. + +commit 41bb9fce47f6366cc3f7d45790f7883f74289b5a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 20:34:32 2006 +0300 + + mipointer: take device arguments, split miPointerAbsoluteCursor + Update mipointer API to take a device argument to (almost) all functions, + and split miPointerAbsoluteCursor into a couple of separate functions. + Remove miPointerAbsoluteCursor call from mieq, as we now deal with it in + GetPointerEvents. + Make miPointerSetPosition (successor of miPointerAbsoluteCursor) take + pointers to x and y, so it can return the clipped values. + Modify callers of miPointer*() functions to generally use the new + functions. + This should fix things with multi-head setups. + +commit be8dfafd1d58b27bbfd953fc1216311523353db1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 20:32:16 2006 +0300 + + warning cleanups + Fix still more warnings. + +commit ca474e0920dd29ebe7ccf346cddc526732ad01ba +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 20:30:49 2006 +0300 + + Xi: move SendEventToAllWindows and FindInterestedChildren to exevents + Move SendEventToAllWindows and FindInterestedChildren from chgptr to exevents, + so the DIX can more easily use it. + Clean up two warnings (type mismatch, unused variable) in exevents.c. + +commit c2fab469b66f2796c541e911202faa411d116b04 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 18:26:26 2006 +0300 + + dix/devices: clean up debugging + +commit 4493acb88c59721f7807093a3ed3c39396c2076d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 17:51:03 2006 +0300 + + xkb: add FIXMEs to procedures which need to act on all core devices + Add FIXME comments above request handlers which need to act on all core-sending + devices if called on the core keyboard. + +commit ef68273f5bdb27a492ec0b69548ec4fbede46c08 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 17:44:37 2006 +0300 + + mi/mipointer: deprecate functions which don't take a device + Deprecate all mi pointer functions which don't take a device argument, and + replace them with versions which do, in preparation for MPX. + +commit 6eab4c55890660089067da0e944256b1ed3a8c67 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 17:24:33 2006 +0300 + + doc/extensions: document C extension use in the X server + +commit 80cdd26581508dd17c5d0a5739cd540113996bbb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 17:23:54 2006 +0300 + + mi/pointer: mark public pointer functions as deprecated + Deprecate miPointer functions which don't take a device pointer. Pointer + movement should be handled through GetPointerEvents, and functions which + take a device as an argument (e.g. miPointerPosition) will be added. + +commit 97030b6c6b0fb6ff629ae31e483704d0a2207a53 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 17:07:05 2006 +0300 + + config: fix compilation + Accidentally built with --disable-config, didn't notice that the previous + commit to clean up the debugging broke things horribly. + +commit 14b157bdb1f2cd5feba03ba0815d7c5b2dd6633f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 17:04:12 2006 +0300 + + include: actually declare DebugF + DebugF is ErrorF when DEBUG is defined, else a no-op. + +commit 9e37de193f5d7412ffd8de76d5eed0158c0a3609 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 16:32:15 2006 +0300 + + configure.ac: reactivate warnings when building with gcc + We were inadvertently stomping XSERVER_CFLAGS after adding the warnings, so + move them after we do that. + +commit b559cbb1601f93cb03ea3dcfb2c5ca94ee6b73bb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 16:23:14 2006 +0300 + + dix/CoreProcessKeyboardEvent: remove debugging for every key event + Also change #ifdef DEBUG/ErrorF/#endif to DebugF in FixKeyState. + +commit 3ae4d250185e71a0a218c062426f92b9b1adbf05 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 16:20:42 2006 +0300 + + xfree86 Xinput: remove still more excessive debugging + There isn't any more debugging left for input events in the XFree86 DDX. + +commit 58314756aeecbb8fb04706c3e04d98e9ac531a02 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 16:18:05 2006 +0300 + + GetPointerEvents: add first_valuator parameter + Add a first_valuator parameter. Looks correct by inspection, but untested + with first_valuator != 0 as yet. + +commit 84f5d2291c1fe92fd8358e999e909bf3aab86c98 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 15:30:24 2006 +0300 + + GetPointerEvents: fix relatively harmless typo + Change !(cp->button || !cp->valuator) to (!cp->button || !cp->valuator). + +commit cfc3e9ede2dc83741bd38bf3df13f096ecb8adc0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 15:27:52 2006 +0300 + + config: remove excessive debugging + +commit 8d8e7f8bae4099f9e90ef9aac687607dae1d32bf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Oct 8 15:26:54 2006 +0300 + + kdrive/input: remove excessive debugging in NIDR + +commit 22a836fafd39a8ef413826dc2c94bc5f96990e2d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Oct 7 14:16:51 2006 +0300 + + xfree86/loader: bump input major ABI version + Bump input major ABI version to 1.0, since we removed the OS keyboard + layer. + +commit 4c342246300e06bdf5c9c62cc1d2f6aa57a524db +Merge: 8382234 49a70c8 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Oct 6 18:01:13 2006 -0700 + + Merge branch 'XACE-modular' + +commit 3686cd0fbf56d883f2f3b3fda11ffba1058b74e4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 6 17:20:42 2006 +0300 + + xkb: make XkbSetControls work on all core-sending devices + +commit 7b4dc171b036107cfba87a1a16bf692b982005a5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 6 16:26:54 2006 +0300 + + xkb: remove unused #ifndef + +commit ab56f0c5b516269bb99ae8b5f479e49e61a3af76 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 6 16:12:36 2006 +0300 + + xkb: simplify core device loop in GetKeyboardByName + +commit 4b6e2f12f7296e17b2850f36b3adcf8156125cbe +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 6 16:08:21 2006 +0300 + + xkb: make LatchLockGroup work on all core-sending devices + Apply the settings to all devices sending core events, if we're working on the + core keyboard. + +commit ebf9b3bbbb04acb78cdf8a84e47a96755fbfe854 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Oct 6 14:17:59 2006 +0300 + + xkb: update all core-sending keyboards on GetKeyboardByName + Update the keymaps of all keyboards which send core events on + GetKeyboardByName; still a few other procedures which need this treatment. + +commit 1178796a4dff5ebf0bd9fb3cacb35be9709b41e5 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Oct 5 22:31:35 2006 -0700 + + Add preferred modes for each output. Round vrefresh. Deliver crtc events. + +commit 23f6f08b7b5c9a4297fd223d232a7e9f45376550 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Oct 5 16:07:26 2006 -0400 + + Improve error handling, messages during initialization. + +commit de63a469dcd0a8ae98554bca540ac0106cccf2a5 +Merge: 9c7440b 8382234 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Oct 5 20:29:19 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit b4659faf9b455b44ac8e691cc7a8fc00a967c80b +Merge: c4f30c6 8382234 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Wed Oct 4 14:46:04 2006 -0700 + + Merge branch 'master' into randr-1.2 + +commit df351f1efbcc95f94c719fcf993c480155c511e9 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Oct 4 16:23:35 2006 -0400 + + Experimental window property holding security context. + +commit c4f30c63538e1451f15ed1991439869127d9b148 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Oct 3 21:06:11 2006 -0700 + + Add mode origins and output options. Fix memmoves in resource free funcs. + + Output options and mode origins both affected driver ABI. memmove mistakes + were causing 'Freeing resource which isn't there' messages. + + Prune unused non-user defined modes from available list now. + +commit 8382234a7f318057de66490299d63807cefb5201 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Oct 3 17:49:48 2006 -0700 + + Update pci.ids to Tue 2006-10-03 daily snapshot + +commit 96edf7b853c1045d12d957a2957a11879100a2de +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Oct 3 17:48:50 2006 -0700 + + Don't insert RCS tag into generated pci id header files + +commit 75e0cc41b201b9ceb2615e7cec0dd5b4c136b343 +Merge: 6926776 20c0cee +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Oct 3 13:58:03 2006 -0400 + + Merge branch 'my-XACE-modular' into my-XACE-SELINUX + +commit df800d87e04ce984a8a9ab4252ac6478ab1e4426 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Oct 2 11:28:47 2006 -0700 + + Add (void) casts to clear compiler errors about ?: results having type mismatch + +commit 9c7440bdf5a4ecd113e102004c804a2ba354c422 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 2 20:58:33 2006 +0300 + + xkb: remove the world's most staggeringly broken vendor workaround + Certain versions of LynxOS needed to sleep up to five seconds for closing a + pipe to actually, y'know, be useful. + +commit d7c89c7c1c8c1e110345d9d8d300adbf5fe5804a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 2 02:15:36 2006 +0300 + + symlink-mesa.sh: expand *.{c,h} + +commit d6ea96b13e2ea01c51998c41ae2a3677bdedf61c +Author: Ivan Pascal <pascal@info.tsu.ru> +Date: Mon Oct 2 02:17:14 2006 +0300 + + xkb: fix wrapping when switching between groups + Use XkbCharToInt as that's what we're doing. + +commit 3c98cebb6e954855528794fec46830f456cbdec1 +Merge: fa1ac94 2cf1098 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 2 02:18:17 2006 +0300 + + Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit fa1ac94178cf976d4c8dae9a4dc8703303a62d4b +Author: Ivan Pascal <pascal@info.tsu.ru> +Date: Mon Oct 2 02:17:14 2006 +0300 + + xkb: fix wrapping when switching between groups + Use XkbCharToInt as that's what we're doing. + +commit c31672e6aab168262bd7824a8082ecdf841fc3c0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Oct 2 02:15:36 2006 +0300 + + symlink-mesa.sh: expand *.{c,h} + +commit 2cf1098436d6b4382d9ed3f6b88214d37bdd8ddb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Sep 30 17:05:46 2006 +0300 + + dix/events, mi/eq: remove utterly ridiculous debugging + Remove debugging which can cause long-lived Xorg logs to grow well above 1GB + if built with --enable-debug. + +commit 20c0ceedfbce9ae5c70703900b52973917ac4cd0 +Merge: 49a70c8 84eb2c0 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 29 15:37:00 2006 -0400 + + Merge branch 'master' into my-XACE-modular + +commit 518db35ca3f569e7cb95dbddeddb93f3691de498 +Merge: 5d99e05 84eb2c0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Sep 29 00:35:21 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 5d99e05f05a42a82a9f02844df9bfebaa673759d +Merge: ad631af 5893375 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Sep 29 00:35:07 2006 +0300 + + Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ad631afcf3fbc74024cddaaacd05d38addc047a2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Sep 29 00:34:23 2006 +0300 + + make core keyboard/pointer map functions act on all core-sending devices + Make Set{Keyboard,Modifier,Pointer}Mapping act on all devices which send core + events. + Change LegalModifier to accept a DeviceIntPtr. + +commit 84eb2c0a06de60e88e14bb03fabe661d7cd8f1d3 +Author: Brian <brian@yutani.localnet.net> +Date: Thu Sep 28 15:09:40 2006 -0600 + + Replace hard-coded filesnames with loops (all .c and .h files). + Should fix problems with Mesa adding/removing source files, for the most part. + Patch by Dan Nicholson. + +commit 4bc5dc2854e33bf343cdea44a3c3b4c41f6f4145 +Merge: cf6e968 f9542e7 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Sep 28 13:27:13 2006 -0700 + + Merge branch 'wfb' + +commit f9542e749544c7a3084fd72ecc6642ca3262f7c7 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Sep 28 13:26:54 2006 -0700 + + Restore the global xx* symbols and add them to wfbrename.h. + + I don't think they're ever used, but it's best to just leave them alone for ABI + compatibility. + +commit cf6e9687ffcc52af0d64e9098186570719a575a2 +Author: Jeff Smith <whydoubt@yahoo.com> +Date: Thu Sep 28 15:34:17 2006 -0400 + + Bug #8449: Yet another Mesa symlink script resync. + +commit a5d639cd87f30f9b3d765352d27253940f33b2b7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Sep 27 16:15:27 2006 +0300 + + remove merge detritus + +commit 2206a92a97901977910a6e39b4174ca805f9f4a7 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Aug 30 19:15:55 2006 +0200 + + Push information about cliprects of DRI windows to the DRM. + +commit 54d371e7a4ebab79a0f616669e2f601d8370cef3 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Aug 30 19:12:17 2006 +0200 + + Add wrapper for new ioctl to update drawable information in the DRM. + +commit ad321fad4b9ab3a2c70cfff37ca6c8faaa5cce9c +Merge: 5e9d33f f7c1d94 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Sep 24 17:56:43 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit f7c1d942416db8d0d4c5a21f5ece1ccacb926b69 +Author: Brian <brian@yutani.localnet.net> +Date: Sat Sep 23 10:38:10 2006 -0600 + + Check for visual==NULL in dmxBECreateColormap() before calling XCreateColormap() + to prevent potential segfault. + +commit 945b7c63946f5257d0f9b0dcf2f8f4882fb2c6f8 +Author: Brian <brian@yutani.localnet.net> +Date: Sat Sep 23 10:35:25 2006 -0600 + + The fbcmap.c file used by Xdmx _must_ be compiled with XFree86Server defined. + Otherwise, Xdmx generates a slew of protocol errors. + +commit 891e9c3e6cbd0869a57395b96c8e18ff522c2bb4 +Author: Brian <brian@yutani.localnet.net> +Date: Sat Sep 23 10:28:24 2006 -0600 + + Replace broken DMXDBG3() with DMXDBG2() + +commit a10039a100dfe5f87e29e9cc4fa656176e0890f9 +Author: David Nusinow <dnusinow@debian.org> +Date: Thu Sep 21 23:58:32 2006 -0400 + + Allow the xfree86 ddx utils to be optionally built. Patch by Eugene Konev. + +commit ce78b0cd2b1c35d60eb5683a1d00222aa4797c79 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 21 20:42:47 2006 -0400 + + Close with Pclose() that which we open with Popen(). + +commit c1655f0fd457f9bdf0857c5e0904639925bb01f1 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Sep 21 14:45:17 2006 -0700 + + Bug 8386: Grow parser buffers to fit an entire line if it's longer than CONFIG_BUF_LEN. + +commit b36fde9257263fa502147df37e8331184c323e14 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Thu Sep 21 09:52:04 2006 -0700 + + When no mode is specified, don't validate mode-specific parameters. + +commit 8b4ed47c5d39f219866e3c72fa973c6fc4c70f18 +Author: Drew Parsons <dparsons@debian.org> +Date: Thu Sep 21 22:19:44 2006 +1000 + + * Install Xprint's Xsession script to $(sysconfdir)/X11/Xsession.d + * Removing outdated references to CDE and dt, rename script to + 92xprint-xpserverlist. + +commit 219546fd76750f358ffb6738f17b9237c58c15a6 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Wed Sep 20 22:43:05 2006 -0700 + + Steal Xinerama code from SiS driver. Add missing files. + + Provide a Xinerama implementation when DIX version isn't enabled. This + version exposes each crtc as a separate 'screen' and reports the size of + that patch. The extension also sends ConfigureNotify events to the root + window whenever crtcs change so that applications will re-fetch xinerama + information. This actually works for metacity. + +commit bde0a4c12cb393a6d7f1552b067624da1b0502ae +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Wed Sep 20 19:42:34 2006 -0700 + + RRSetCrtcConfig status fix. RRGetScreenResources timestamp fix. + + RRSetCrtcConfig was returning the wrong status values. + RRGetScreenResources was always returning currentTime. + +commit d812f486a01a6276aed7b4ebd3cd8eb8ddfe10d3 +Author: Donnie Berkholz <donnie@supernova.(none)> +Date: Wed Sep 20 15:39:39 2006 -0700 + + Really fix sparc on 64-bit kernel/32-bit userland. + + Commit b3a3020fd018df8bc5a8193d36e1a1c7ae8af8ba used a sparc64 ifdef instead of + sparc. But for 32-bit userland, __sparc64__ is not defined so the wrong code is + used. + +commit 09f7499851bd2f2eba1e30460c61c7a82ed9e853 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Wed Sep 20 13:15:20 2006 -0700 + + typo + +commit 9f870e0aa1ada238d6a0cd099996e8c47f6ba1d9 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Wed Sep 20 13:14:53 2006 -0700 + + When setting output state, leave output unchanged when setting to current. + +commit d16e83413e7e06adebd629d04de57bbedd8c3765 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Wed Sep 20 12:47:17 2006 -0700 + + Hide or rename more global symbols to avoid clashes with libfb. + + Rename composeFunctions, xxSetup, and xxPrintVisuals. Hide the other xx* + symbols by making them static. + +commit d08718d8fd31477e90f13b9e122504c515b46ee0 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Wed Sep 20 12:05:52 2006 -0700 + + Avoid calling xalloc(0). Change rrScreenSizeSet to rrScreenSetSize. + +commit ef1f3248cb5fff0a02c0059f865c4d931eba23a6 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Sep 19 22:48:54 2006 -0700 + + Split out 1.0-style info and new property routines to their own files. + +commit 07112adb0802d28488de5a495aa61bb3cfc280b6 +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Tue Sep 19 00:46:27 2006 -0700 + + RRGetScreenResources and RRGetOutputInfo are working now. + + Removed separate id field in RRModeRec. + Pull screen subpixel order from Render extension. + Implement RGetScreenResources and RRGetOutputInfo + +commit afe5e9483b352ed06075ed68a6ffa50799194e2d +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Mon Sep 18 12:18:22 2006 -0700 + + RandR working with old clients and old API. + +commit 2be1ac15aee592782d7693b8de2c3815478a094e +Author: Keith Packard <keithp@guitar.keithp.com> +Date: Mon Sep 18 12:11:18 2006 -0700 + + Remove smashing of CFLAGS from server build. + + CFLAGS is a user variable, extracted from the environment at configure time + and settable by the user at build time. We must not override this variable. + +commit bf07893947cfca945598e194ed416fda6162b11c +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sun Sep 17 23:03:23 2006 -0700 + + Split out RandR dispatch code from randr.c to rr*dispatch.c. + + More disassembly to ease ongoing development. + +commit 3e745745fecef1cb59e53bde52ded311b51e1dac +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Sep 16 23:21:37 2006 -0700 + + Split RandR implementation into separate files. + + RandR is getting too big to live in one file; split into one file per object + type (crtc, mode, screen), leaving the rest of the code in randr.c. + + Code is slowly approaching the point where it will drop-in as a replacement + for the old 1.0 implementation. + +commit d17fb9672e238a089e463ac74cc4cd3325b67e1f +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Sep 16 21:44:42 2006 -0700 + + Start moving to new randr 1.2 definition + +commit 8dec74321d916f204f8182f1b93a65defbe50e78 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Jul 17 14:43:07 2006 -0400 + + Successful legacy RandR API/Protocol emulation for query. + + These changes clean up minor errors to make it possible to list the + available modes for a monitor using legacy APIs in both the X server DDX and + RandR protocol. Setting modes is untested, so it probably doesn't work. + +commit cab3a0145f2483fe43b5db5f5dd2076db9757fe5 +Author: Keith Packard <keithp@neko.keithp.com> +Date: Mon Jul 17 01:21:11 2006 -0400 + + RandR: New data structure, old API. At least it compiles now + +commit d95c758630f4aacec339a7ec80d2c4a9d7de1e4a +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Jul 1 19:46:38 2006 -0700 + + Preliminary RandR 1.2 work + +commit f057de4f73fa593fa3fc5f05f65b89e76273b158 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Sat Sep 16 03:49:11 2006 -0400 + + Don't install librac.a. + + Thanks, automake. + +commit 6926776f0ecd1e8e81c5c40ccd3a97227bc44dcb +Merge: 6950267 49a70c8 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 15 15:28:13 2006 -0400 + + Merge branch 'my-XACE-modular' into my-XACE-SELINUX + +commit 49a70c8570b03aff8239324a2474918a6fbc52a0 +Merge: d1110c5 05231e3 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 15 15:26:57 2006 -0400 + + Merge branch 'master' into my-XACE-modular + +commit 46af6d1e953f1eefb6edbba3d29fb9700e42c2bb +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:28:44 2006 -0400 + + Always believe the monitor when it reports a reduced-blanking mode. + + CVT reduced blanking modes are typically only seen on digital connections to + LCDs, but there are some monitors that report them as supported over the + VGA connector too, which is perfectly legitimate, electrically speaking. + +commit 63acf18b7e4ce3a9f7deab3a9088a1c41cab0191 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:26:37 2006 -0400 + + In xf86MatchPciInstances, fail gracefully when there's no PCI device at all. + + This allows the autoconfig logic to fall through sanely on non-PCI machines, + which importantly includes Xen virtual machines. + +commit a8f9936f55c5364bb02e8c3187507eb1f70e2ef2 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:24:41 2006 -0400 + + Prefer driver-provided modes when matching name strings to modelines. + + Well, kinda. Strictly we prefer M_T_BUILTIN strongest since those are modes + where the driver has said it absolutely can't do anything else (VBE). Then + we look for user-defined modes, ie, modelines from the config file. Then + we consider modes reported by the monitor via EDID. Finally if nothing has + matched yet we consider the default mode pool. + + Within each of the above-mentioned classes, modes with the M_T_PREFERRED bit + take priority over other modes in the same class. + + This logic ensures that the timings sent to the monitor exactly match the + timings it reported as supported, which occasionally don't match the numbers + you might get for that mode from CVT or GTF. + +commit 81ef1b6d6063c20db4963abf7b7848e235aa4ebb +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:18:58 2006 -0400 + + Mark EDID modes as driver modes. Infer virtual size from driver modes. + + This allows the server to guess an appropriate initial virtual size and + resolution. The heuristic is to select the largest driver-reported mode + that matches the monitor's physical aspect ratio. We revalidate this + estimate after mode validation, since we may have filtered away all + modes that would fill that size. + + Also, the EDID preferred timing is now marked as M_T_PREFERRED as well. + +commit 43d9edd31e31b33b9da4a50d8ab05004881c8d5a +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:09:02 2006 -0400 + + Attempt to add the 'mouse' driver in more situations. + + Always add a mouse driver instance configured to send core events, unless + a core pointer already exists using either the mouse or void drivers. This + handles the laptop case where the config file only specifies, say, + synaptics, which causes the touchpad to work but not the pointing stick. + We don't double-instantiate the mouse driver to avoid the mouse moving twice + as fast, and we skip this logic when the user asked for a void core pointer + since that probably means they want to run with no pointer at all. + +commit 739224d05eb4f356c9cab9dcb8a44a8d78287765 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:03:32 2006 -0400 + + Load the default module set when no Module section is given in the config. + + Also, synchronize that list with the list for the pseudoconfig file used + when starting with no config file. These really need to be better unified. + +commit beac2bf1e48e6b77dbf7d95f086abc5abcd90cf0 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:01:13 2006 -0400 + + Expand the default sync ranges to be large enough for 800x600@60. + +commit 71a15a7d5721073eccb3a275f353b3aa584c0d68 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 19:00:10 2006 -0400 + + Publish the raw EDID block as a property on the root window. + + This was removed in the patch for bug #5386, but is still useful. + +commit 7939c8dfb7c7bed4febcdc12922fb2e17619ea36 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 18:57:57 2006 -0400 + + Bump the default pixel depth to 24, and default bpp to 32. + +commit 72af975f9c8de0ff6796f1ce4b76dcf841d21e99 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 18:56:34 2006 -0400 + + Fix up EDID blocks where the max pixclock exceeds the preferred mode clock. + + Base EDID only lets you specify the maximum dotclock in tens of MHz, which + is too fuzzy for some monitors. 1600x1200@60 is just over 160MHz, but if + the monitor really can't handle any mode at 170MHz, then 160 is more + correct. Fix up the EDID block before the driver can see it in this case, + so we don't spuriously reject modes. + +commit d05e0a97bb704a4986cf638487205da759c4ce17 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 18:49:12 2006 -0400 + + Enable DPMS by default. + +commit 334f7db9f653113d5d46236911d7de2ec4173f28 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 18:46:10 2006 -0400 + + Allow hsync and vsync ranges to be overridden independently again. + +commit ced46e17777b635df9371c4cfaec3f8968b4dbcf +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 18:41:59 2006 -0400 + + Record all standard timings from EDID as modes, instead of just the first five. + +commit d89fee68d0e49211871cd9eb3893ed55c1d478a6 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 18:41:15 2006 -0400 + + Record the maximum dot clock of the monitor, and filter by it. + +commit fa8ef7166839a7435e0017683f3e3c7f7904b285 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Sep 14 18:33:00 2006 -0400 + + Don't translate monitor gamma to X gamma. + + The X gamma is used to set the output ramp of the card. Setting a 2.2 output + gamma going into a 2.2 monitor gives an effective gamma of 4.84, which is + very much not what you want. + +commit 511c60bc7399b07c267d686a969880e5ec92408a +Author: Luc Verhaegen <libv@skynet.be> +Date: Thu Sep 14 18:30:36 2006 -0400 + + Bug #5386: Synthesize modelines from EDID data. + +commit 05231e336db8f959c15dda518641976f061df1a6 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Sep 14 14:13:39 2006 -0700 + + Use correct opcodes for GLX_EXT_texture_from_pixmap. + + Regenerate from glX_API.xml 1.3 from Mesa. The glproto package and libGL + (from Mesa) must also be updated. + +commit 0a62840e2ce25e5c2554e7e5ab4c9c5b96899e2d +Author: Bill Nottingham <notting@redhat.com> +Date: Wed Sep 13 15:40:23 2006 -0700 + + Bug 7641: fix comment written to Xorg.conf (s/VertSync/VertRefresh/) + + X.Org Bugzilla #7641 <https://bugs.freedesktop.org/show_bug.cgi?id=7641> + Patch #6349 <https://bugs.freedesktop.org/attachment.cgi?id=6349> + +commit 182e5e0f4ba4c98a34bc52bdf4032ba315fe80ad +Author: Drew Parsons <dparsons@debian.org> +Date: Tue Sep 12 14:30:46 2006 +1000 + + Xprint: revert installation of /etc/X11/Xsession.d/cde_xsessiond_xprint.sh + pending resolution of #8232. + +commit 594d4019c613b0f4bf8f48cc074ecc3c8366f1d7 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Tue Sep 12 01:15:40 2006 +0200 + + transformIsIdentity() now doesn't accept a zero matrix as the identity. + + Added a non-zero test for one of the diagonal values. + +commit fc30370d14125f86ee1192890a184881fa139546 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Mon Sep 11 19:43:09 2006 +0200 + + Bug #8226: Fixed SetPictureTransform()'s handling of the argument matrix. + + It now recognizes scaled variants of the identity matrix, too. + +commit 2b357e9a2f9038cf9cd07da908e3103a3d0965c9 +Author: Donnie Berkholz <dberkholz@gentoo.org> +Date: Sun Sep 10 22:17:20 2006 -0700 + + If we're installing libxf86config, install headers needed to build against it. + +commit 58933757862c458e2da39bd464e50d9c0e41b313 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Sun Sep 10 15:50:51 2006 -0400 + + Warning fix, and a syntax fix in a #if 0 section of code. + +commit 0a3740a0000191e3039fe183ae51b938d0548340 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Sun Sep 10 15:49:25 2006 -0400 + + Typo correction, 'i' is not a '1', so no longer crash on some Xi requests. + +commit 8d709f0280b458515b32c2b87938749428e5c149 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Sun Sep 10 15:48:35 2006 -0400 + + Remove a merge artifact so that we can compile. + +commit b3a3020fd018df8bc5a8193d36e1a1c7ae8af8ba +Author: Jesse Barnes <jbarnes@nietzche.virtuousgeek.org> +Date: Sun Sep 10 11:13:18 2006 -0700 + + the new PCI mapping routines are broken on sparc64 (in fact they look + broken for any 32 bit X server running on a 64 bit kernel) so #ifdef + them out for now. the PCI rework tree will make all this crap go away, + so I think we can tolerate the extra #ifdef for the next release. + +commit 60db190ecfce52cbfa888c0af3210634f9186bed +Merge: 5e9d33f 6525610 +Author: Zephaniah E. Hull <warp@agamemnon.b5> +Date: Sun Sep 10 03:49:17 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 65256109bb8f5a26704ed960e1dd113981df5787 +Author: Drew Parsons <dparsons@debian.org> +Date: Sun Sep 10 17:40:37 2006 +1000 + + * Define XPSERVERLIST with `/etc/init.d/xprint get_xpserverlist` + instead of `/bin/sh /etc/init.d/xprint get_xpserverlist` + - allows the initscript to set its own different shell under #! + - allows disabling of XPSERVERLIST by making the script non-executable + * Allow files to be installed by using dist_*_DATA instead of EXTRA_DIST. + Also, use dist_*_SCRIPTS to install scripts. + * Fix minor typos in man pages. + +commit 6950267dd690ef8e29b1c32a157dd64c9b79c06d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:31:18 2006 -0400 + + Add SELinux extension configure-time support. + +commit fb34c02861ab3629c1c85c156e73b158518db7c7 +Merge: 9c503f0 d1110c5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:30:12 2006 -0400 + + Merge branch 'my-XACE-modular' into my-XACE-SELINUX + +commit d1110c5c83a7f439158f369ab2f3ae614fa9d2a5 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:28:48 2006 -0400 + + Generalize the handling of configuration files that ship with extensions. + +commit 9deb579dc9366590203afe0576bf88643ab36c89 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:25:17 2006 -0400 + + Zero out newly created ExtensionEntry structures, but only after the + devPrivates have been initialized. + +commit cec392656cda1c938d5462e1949e6eef489f9168 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:24:23 2006 -0400 + + Zero out newly allocated ClientRec structures. + This is required to initialize the devPrivates to a known state. + +commit 0fba09cdfcc78161f5c92bef6cca53e5309656bd +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:23:06 2006 -0400 + + Include dix-config.h. + +commit c93877100eb98647c5b6b8556730d54677f730b6 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:21:57 2006 -0400 + + Don't need to allocate memory now that devPrivates are being used. + +commit 9c503f09ce78d952d0ece77c424e42b6df3fa9ad +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:17:01 2006 -0400 + + Add SELinux extension to the module/extension loader. + +commit 9aa44e3e4c321f42d8e64f83c7f0932470593c26 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:15:19 2006 -0400 + + Add SELinux extension configure-time support. + +commit 150eabc4c8a08c81c48493583f922a1240b7e91c +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Sep 8 15:11:04 2006 -0400 + + Add SELinux extension source files. + +commit 86450998da616e3d00d4d6293acc35eccc2061e7 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Sep 7 15:35:16 2006 -0400 + + Fix AIGLX VT switching. + + See https://bugs.freedesktop.org/show_bug.cgi?id=7916 + + There may be a simpler, less intrusive fix that involves just rearranging + DRI locking between 2D and 3D drivers around VT switch. + +commit 5e9d33fe87f9d24e55c468d4b2bb761c9efdb26a +Merge: 629798c 64479ff +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Sep 7 15:43:31 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 629798c73ad76a77fa6a55bc6403fd9b95ade2bb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Sep 7 15:17:04 2006 +0300 + + XkbCopyKeymap/SrvXkbCopyKeymap: free geom harder, add cheery comments + Unconditionally free geometry when copying the keymap (so we have none on + core, oh well), add a couple of heartening comments. + +commit 64479fffa22581cc7d753065c33eda5520b7db9a +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Sep 6 16:13:21 2006 -0700 + + Remove prototypes and externs for non-existant functions and variables. + +commit a0179281a6522ec59830e8f2549633741bc56e10 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Sep 6 15:45:48 2006 -0700 + + Remove prototypes for non-existant functions. + +commit 8356be492c6b46abdffa08b13836571ed872e16f +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Sep 6 15:20:55 2006 +0200 + + Make sure _XSERVER64 is defined when it should be and gets tested. + +commit f6ce0839ba5b73247097826d28f7388fe248ec0c +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Wed Sep 6 13:18:02 2006 +0200 + + Fix #include paths for fontcacheproto headers. + +commit f39fd4242902eaa862321d39337f429dd14ebacf +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Sep 5 15:23:54 2006 -0700 + + (unsigned long)(1 << 31) = bad news on x86_64. + (cherry picked from 410e5b1d738ba47b36778e6cbed44023a27ce259 commit) + +commit 410e5b1d738ba47b36778e6cbed44023a27ce259 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Sep 5 15:23:54 2006 -0700 + + (unsigned long)(1 << 31) = bad news on x86_64. + +commit 0b81fccd2ee4e054e5cffb739de07460ff2c13f7 +Merge: 20c4ac6 c281351 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Tue Sep 5 18:03:25 2006 -0400 + + Merge branch 'master' into my-XACE-modular + + Conflicts: + + configure.ac + +commit c2813514cf7b1a36caa848cbc2ceef99cf2eb769 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Aug 31 15:36:13 2006 -0700 + + Add missing file from previous commit. + +commit 0f9cfb2f752a9010ff07f4b2bd891db0cc30b8e6 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Aug 31 13:54:10 2006 -0700 + + Implement GLX_SGI_swap_control. + + Regenerate from glX_API.xml 1.2. Add infrastructure to support + GLX_SGI_swap_control for AIGLX when the DRI driver enables it. Tested + with R300. + +commit a9ef5862919313582f72fc0cfb5ab0af4df6507e +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Aug 31 13:47:50 2006 -0700 + + Fix problems with vertex program protocol + + There were two sets of bugs in the vertex program (ARB and NV) + protocol. First, several of the ARB functions were missing the + 'doubles_in_order="true"' annotation. Second, after the ARB decided + that glVertexAttrib*ARB functions must not alias fixed-function state + for GLSL, Nvidia re-assigned GLX protocol opcodes for + glVertexAttrib*NV (circa Septeber 2004). For some reason gl_API.xml + was never updated to reflect this, and the updated version of the + GL_NV_vertex_program spec never made into the registry. + + This is just a server-side regeneration from gl_API.xml version 1.68. + +commit 69d5becce4ca2cfc8f8de53672ed54a47de62164 +Author: Matthew Allum <mallum@openedhand.com> +Date: Thu Aug 31 17:30:24 2006 +0100 + + Fix previous commit breaking other kdrives pulling in fbdev.a + +commit fd609956f27d76ee76ac8623787f0fc8633a5546 +Author: Matthew Allum <mallum@openedhand.com> +Date: Thu Aug 31 17:18:57 2006 +0100 + + Add framebuffer device command line switch for Xfbdev + +commit 2fb7b8795a9a36cce61f6449f6ca26ffd1b071f0 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Aug 29 16:35:32 2006 -0700 + + Minor extension tweaks. + + GLX_EXT_texture_from_pixmap should always be enabled. + GLX_SGI_video_sync is only for direct rendering and should never + appear in the server's string. + +commit 1c8851ad491dd02d1c79e620b46384956838ed42 +Merge: d59b52f 5ddbf4b +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Aug 29 16:34:04 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit d59b52fc08f2d80b38993e383e61c3eeb0bb0763 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Aug 29 14:40:13 2006 -0700 + + Make sure unsupported extensions are disabled. + + GLX protocol isn't supported for GLX_SGI_swap_control or + GLX_SGI_video_sync. Remove them from the list of available extensions + until they are supported. + +commit db6d04d4b87fd9b6409a3ddf0479a88440c2eda1 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Aug 29 14:35:08 2006 -0700 + + Add support for AIGLX drivers to enable GLX extensions that they support. + +commit 5ddbf4bcd46fe0d3d682668c2748c712fea410ae +Author: Matthew Allum <mallum@openedhand.com> +Date: Tue Aug 29 22:07:15 2006 +0100 + + Re-add support for tslib (1.0 release) and Xcalibrate extension. + +commit 4524a2bf6f22c871ed109b027a065f0262137dc5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 29 23:49:26 2006 +0300 + + configure.ac: move tslib from KDRIVE_PURE_LIBS to KDRIVE_LIBS + Yeah. That was dumb. + +commit 942b4369990a255257f66835caf8671432c405a3 +Merge: 77d315b 393dc0a +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Aug 29 13:30:37 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 77d315bd2fd2f9014c831d313efbe5821189177c +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Aug 29 13:30:20 2006 -0700 + + Remove __glXNoSuchRenderOpcode because it is no longer used. + +commit 260c3f32b69c98f8fc5360f860f69d32c19f04a7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 29 23:18:12 2006 +0300 + + configure.ac: fix XSDL test + +commit 393dc0a3388d56186181b2bd9bcc1d267747e709 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 29 22:53:54 2006 +0300 + + kdrive: remove @KDRIVE_LIBS@ from Xfoo_DEPENDENCIES + +commit cff23616fe45e10c6786a303c8dcfc0a80463a53 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 29 22:44:09 2006 +0300 + + configure.ac: allow disabling of XSDL + +commit 89d272bb183e85715d8e6047929fb2d912033d82 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Tue Aug 29 15:05:31 2006 +0300 + + [PATCH] kdrive/linux keyboard: remove more debugging spew + +commit bd6f539ff9409aa7d9056fabe120b457b0a15997 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Tue Aug 29 13:21:58 2006 +0300 + + [PATCH] kdrive/linux keyboard: silence excessive debugging noise + +commit 5436fce09003e20744a388fa4ae49007c9cf8ede +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Tue Aug 29 13:21:40 2006 +0300 + + [PATCH] GetKeyboardValutorEvents: be even more careful + + Don't accept devices without a keyboard feedback class. + +commit 0eb7299f445455a7bcacf2410e83227b23259675 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Tue Aug 29 13:19:12 2006 +0300 + + [PATCH] XkbCopyKeymap: still more range fixes + + Make sure we don't stomp preserve if it doesn't already exist, and fix a + couple of range-related thinkos in level name copying. + +commit 7fa3383e3c8eea7d1eb0e556393f2431cf8e6ed2 +Merge: 8d77d44 ebbdc13 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 29 15:16:01 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ebbdc1342a243b301723390696f742dc91f59764 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Mon Aug 28 18:17:32 2006 -0400 + + Remove calls to LoaderCheckUnresolved(), since it's now a stub. + +commit 8d77d44fda3aacbae62864a3620e09095b79e92d +Merge: d6f36bd 2fde560 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 27 23:08:49 2006 +0300 + + Merge branch 'origin' into input-hotplug + +commit 20c4ac6e038607ebbf6c04639670514c016d8597 +Merge: 13c6713 8d4f21a +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Aug 25 18:49:46 2006 -0400 + + Merge branch 'my-XACE-SELINUX' into my-XACE-modular + +commit 13c6713c82763a85c725c998b37ad02156d803ba +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Fri Aug 25 18:17:01 2006 -0400 + + Add four new XACE hooks: auditing, key event notification, window init + +commit 2fde560bbb9c1148f26fd969dc30c4e736672b7c +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Aug 25 13:01:51 2006 -0700 + + Enable GL_EXT_texture_filter_anisotropic and GL_EXT_blend_equation_separate. + + Re-generate from gl_API.xml 1.65. This provides the missing bits for + GL_EXT_texture_filter_anisotropic and GL_EXT_blend_equation_separate. + Enable those extensions. + +commit e2d529963ed40b5f113cf82c17809d241cd4aac1 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Aug 25 12:05:16 2006 -0700 + + Enable vertex and fragment programs. + + Implement glGetProgramStringARB and glGetProgramStringNV. With these + functions implemented, GL_ARB_{vertex,fragment}_program, + GL_NV_{vertex,fragment}_program, and related extensions can be enabled. + +commit 21291d6ca7188e5733ed0c93215ee0f1f0f90cc9 +Merge: 1a5561c cd2da4e +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Aug 25 09:34:21 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit d6f36bd28009881ef7f7a20cdadb3808d808ed97 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 25 12:43:17 2006 +0300 + + xfree86/parser: use 'kbd' driver when 'keyboard' specified + Now that we've completely ditched the old driver, we should probably make a + best-effort attempt to keep configs working. + +commit 7c4167f0d6b33c9c602b04fcfd246fd3aeddd709 +Merge: 393f834 cd2da4e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 25 11:15:33 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 393f8347edcccfc24d8902a86ea9def7ada2537b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 25 10:46:32 2006 +0300 + + xorgconf.cpp: kbd, not keyboard + +commit c33e39c86be2010b169ffbd8adbe53b93222dc5f +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Aug 24 20:33:57 2006 -0700 + + Finish support for GL_ARB_texture_compression. + + Fill in __glXDisp_GetCompressedTexImageARB and + __glXDispSwap_GetCompressedTexImageARB to finish support for + GL_ARB_texture_compression. With this extension (and the related + compression extensions), the server-side GLX supports all of the + protocol for GL 1.4. w00t! + + The bad news is that this has received only minimal testing, and Mesa + does not contain any good tests for GL_ARB_texture_compression. + +commit cd2da4e41eae233b50f8830d9a8f5d1d916a5a1b +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Aug 24 18:00:16 2006 -0700 + + Remove GL/glx/g_disptab.c, GL/glx/g_disptab_EXT.c, and + GL/glx/g_disptab_EXT.h. Unfortunately GL/glx/g_disptab.h has to be + kept around a bit longer. + +commit a29e6dd2d2d45c18c52737bb3b7945aafcea5032 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Aug 24 17:58:52 2006 -0700 + + Add some missing bits of GL_SGI_color_table. + +commit ae608b2071d882966e9c7ede71f846b1ecec0b23 +Merge: 2c86527 b879356 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Aug 24 14:56:33 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 2c865277fe1d056981d1020e1af001d2319252c0 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Aug 24 14:54:49 2006 -0700 + + Regenerate from gl_API.xml 1.63. Enable extensions. + + gl_API.xml 1.63 corrects some problems with GLX protocol for + GL_EXT_paletted_texture and GL_SGI_color_table. Regenerate from that + file, and enable those extensions and GL_EXT_shared_texture_palette. + +commit 7d5de5c6657304246473d7ddd5c29bb0c7a3bc34 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Aug 24 14:49:46 2006 -0700 + + Regenerate from gl_API.xml 1.62. Functions move, no real changes. + +commit 3a36b0a24aa9e9e238faa7f00100f59800f5142b +Merge: db1ab1b b879356 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 24 23:35:28 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit db1ab1bdb2f79eca593fe247056309a16ebd29c6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 24 23:33:59 2006 +0300 + + XkbCopyKeymap: fix various range issues + Fix a bunch of range issues caused by incorrect assumptions (e.g. that the + design was at least halfway sensible), and copy types by hand, instead of + just blindly memcpy()ing the lot, since it itself cleverly contains a ton + of allocated pointers. + +commit 5fb8d947bb88d715b9b236342885c445cb5a9387 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 24 23:16:43 2006 +0300 + + configure.ac: more thinkos + Fix auto tests for vidmode and xf86dga. I win at life. + +commit 4e37c07ba6e5d299d4f8922dc6cf054c814f7baf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 24 23:16:17 2006 +0300 + + config: clean up debugging messages, make failure to acquire name fatal + Bomb with FatalError when we can't acquire the bus and name. + Clean up a bunch of debugging ErrorFs to be hidden behind #ifdef DEBUG. + +commit b879356ce96929d02bcb75b9aa24b17ac7e28125 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Aug 24 15:50:15 2006 -0400 + + More #ifdef USE_DEPRECATED_KEYBOARD_DRIVER. + +commit 4ed311cf1c29090c53e474a3001c5702ff8409df +Merge: 73e58ad b29b236 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Aug 24 20:17:10 2006 +0200 + + Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver + +commit b29b236d88789fd45d823a55dbedb393bb134c5b +Author: Lukáš Turek <8an@centrum.cz> +Date: Thu Aug 24 15:57:09 2006 +0200 + + Adapt to Mesa header name change. + +commit ce4a0a4ddafd3833d7025f83ed3729915c8aba70 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Aug 24 13:56:22 2006 +0100 + + Apply patch in bug #7919, blit improvements in + multiwindow mode for Xming/CygwinX + +commit 866ca1f929c95689bac9f0a0b3478f7b4d77214b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 24 15:46:44 2006 +0300 + + configure.ac: fix XF86VidMode test + +commit 2b06c69c8feaf3bdc065635ee711efa45b3033b3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 24 14:51:26 2006 +0300 + + GKVE: pass correct arguments to XkbCopyKeymap + Fix horrendous thinko. Indicators now work perfectly. + +commit 4adf9af313c9f63b6ad734e174efe1d36ddb5813 +Merge: 33af05d 67bd672 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 24 10:59:33 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 67bd672c880869ef625ae0c0163c3ec1eba46abf +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Aug 24 08:47:06 2006 +0100 + + Fix typo + +commit 733c4beb16c2c4ad9e9a4ea9a85b09fc5062a775 +Author: David Nusinow <dnusinow@debian.org> +Date: Wed Aug 23 22:39:42 2006 +0000 + + Add xorg.conf IgnoreABI option which does the same thing as -ignoreABI + +commit b983773d446cef6a0948ca264ed48126e404ae9a +Merge: 0623d36 d9a8656 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 17:16:50 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 0623d3643fc28ebc514b2ca872c985d0cf0c753a +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 17:16:02 2006 -0700 + + Fix the sorting of the extension string. Add a few extensions that + are supported by the new code. A few of these were actually supported + before but weren't advertised. + +commit 5d2caacff570dd68bb3fb05e776e02515b2a9da0 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 16:47:00 2006 -0700 + + Refector __glXDisp_Render and __glXDispSwap_Render to DoRender. + Refector __glXDisp_RenderLarge and __glXDispSwap_RenderLarge to + DoRenderLarge. + +commit 866bb3f34046045c9fa0744db1d76e035b3da9c7 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 16:41:53 2006 -0700 + + Memo to myself: Whenever a Makefile.am changes, autogen.sh must be + re-run. This is especially true if the change is to remove a source + file. + + Fix RenderLarge to actually use the new protocol decode tables. + +commit d9a86566c21afd7985673f3ed851b055d9dac46f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Aug 23 16:15:19 2006 -0700 + + Add LOCALCONN to dix-config.h template for xtrans + +commit f6fd7d8f8393f93705e76b2b2777a0d9bcafa991 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 16:05:37 2006 -0700 + + Convert protocol decode tabels for Render and RenderLarge to use nice, + compact N-way search trees generated by scripts in Mesa. + +commit 7ae82b5fc8721be78b43a322bbf2c46aac08b8cf +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 16:00:48 2006 -0700 + + Fix __glXDispatchInfo::dispatch_functions and + __glXDispatchInfo::size_table. dispatch_functions had the const in + the wrong place, and size_table was declared as an array of two + pointers to int_fast16_t instead of a pointer to an array of 2 + int_fast16_t. cdecl to the rescue! + +commit 39a620d17809dc71fb5ad61a955fe3c442f90a05 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 14:24:34 2006 -0700 + + Rename __glXDrawArraysSize to __glXDrawArraysReqSize. This makes its + name match the pattern of all the other functions in + __glXRenderSizeTable. + +commit 86406455f0e5fc977431948611e9bb5fda1e1d46 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 13:30:59 2006 -0700 + + Re-generated files after a fix to glX_API.xml (in Mesa). + +commit d7a7f12361d31001bbd9394a57de029ef0b934b8 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 23 13:30:13 2006 -0700 + + Convert protocol decode tables for Single, VendorPrivate, and + VendorPrivateWithReply message to use nice, compact N-way search trees + generated by scripts in Mesa. + + The Render protocol decode tables are next... + +commit bdec9680fa74dd23cf319d09af1940f8cf71a5b1 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Aug 23 14:43:23 2006 -0400 + + Make sure Composite is never enabled for Xnest. + +commit 9f2a108051aad9b024ab737b45fc12290a113e37 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Aug 23 14:38:34 2006 -0400 + + Make 'Xvfb -render' also disable Composite, lest we segfault on startup. + +commit 33af05d58f1f4f021036e9ce4b60fd76dbaebe73 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 23 19:05:50 2006 +0300 + + XkbCopyKeymap: use correct range for MapNotify + We haven't copied {min,max}_key_code by the time the notifies run, so use + src instead of dst to determine number of keys, et al. + +commit 6323a11d0db4d3cf0317af83f0362730142f5325 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 23 18:53:04 2006 +0300 + + XkbCopyKeymap: optionally send NewKeyboardNotify/MapNotify events + Optionally send a NewKeyboardNotify or MapNotify event when copying the + keymap; modify GetKeyboardValuatorEvents to make use of this. + +commit 728fbadd16a748b45c80bc2c65c46f82cf803578 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 23 14:33:59 2006 +0300 + + gitignore: ignore vi swap files + +commit 8f8487ff997670a4af0293fed77ff920cfc39fb1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 23 14:33:41 2006 +0300 + + xkb/gkve: copy XKB map, not pointer-assign + Write a new function to copy an XKB map (does everything but geometry at + the moment), and use that instead of nasty pointer assignments. + +commit 52ba722e4c89c052609b4fc62e965d92778aa2dd +Merge: 9138d5a 0554125 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Mon Aug 21 18:49:31 2006 -0400 + + Merge branch 'XACE-modular' into my-XACE-modular + +commit 05541259bdb0dfaab015a01caa3722b7a1b782e2 +Merge: c2535f6 a1ac044 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Aug 21 13:07:41 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular + +commit a56b98bb047003a05e26ca9365c212a2da7ac200 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Fri Aug 18 18:03:41 2006 +0300 + + dix: enable null root cursor + + Enable a blank root cursor, selectable with --enable-null-root-cursor at + configure time. + +commit 0704bb298cc826cd117815898c6bc015a693c2c9 +Merge: c140369 a1ac044 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 18 17:30:14 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit a1ac0440bba690368aa4226468ce571be1a09d95 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 18 17:30:00 2006 +0300 + + dix: fix whiteroot thinko + Note to self: run git update-index _after_ testing, not just before. + +commit c14036977fef7b8787c0b68f5262fa0b6a2834f5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 18 17:24:34 2006 +0300 + + input.h: add InitCoreDevices prototype + +commit 1c2cb30cd88ba4453f9da339025f8ff39f7f5412 +Merge: 633b6a6 70ddd0f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 18 17:05:50 2006 +0300 + + Merge branch 'origin' into input-hotplug + +commit 19f673b7788d32c220e7e06734f1074b0e4a999c +Merge: cb0a565 70ddd0f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 18 17:05:41 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit cb0a565d2b2cf8823abbd77b4426cc2237731dc1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 18 17:04:48 2006 +0300 + + dix: add whiteroot flag + Add a -wr option to use a white root window, and use a BackPixel rather + than BackPixmap for both white and black root windows. + +commit 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Aug 18 14:43:10 2006 +0100 + + Fix bug #5735, Serious flaw in CygwinX clipboard + integration prevents paste from X to Windows apps + (Brett Stahlman & Colin Harrison) + +commit 708b225689b5a4ba9ffe3372b584b715ef9eacdc +Merge: e1f4565 ee5e2cb +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Aug 18 09:13:52 2006 +0100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit e1f4565be5ce80be4655e81f77f4073fa3fbf8d0 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Aug 18 09:11:48 2006 +0100 + + Fix bug #7302, make Xn.hosts work from the + Microsoft Windows install directory on Xming. + (Colin Harrison) + +commit 1880defe4eaba02f9585b154d0883235eabc6d11 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Aug 18 09:09:53 2006 +0100 + + Fix bug #7281, clipboard viewer should not + call SetClipboard viewer when bogus in Xming/CygwinX + (Colin Harrison) + +commit a1a8e4f7f5917f537eb3dd51d3d6fa3e129236ce +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Aug 18 09:08:12 2006 +0100 + + Fix bug #7280, round title corner background + should be transparent not black in Xming/CygwinX + (Colin Harrison) + +commit ee5e2cbd2bee610a95facc6b486c4a5070973099 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Aug 17 17:29:32 2006 -0400 + + Un-cut-and-paste the mode rejection message. + +commit 43e42eef1f5a22703eb64fc9cffecde036ea38e0 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Aug 17 16:22:07 2006 -0400 + + Fix default mouse device on Linux, again. + + It would be really nice if we only did this in one place instead of 40. + +commit 633b6a69f560c0a77dcff78fdef5fcf0041e2e04 +Merge: 95dbfcf 7da5144 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 17 21:25:14 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 7da51447eaab34292e14077fb5a48e6b2e587781 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 17 21:24:07 2006 +0300 + + events.c: fix tiny XEvIE thinko + Make sure xeviehot gets updated after the ConfineToShape() call. + +commit 5d082f05632906c29296a44ef5c3a4962c0cbe62 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 17 21:18:18 2006 +0300 + + events.c: make XEvIE a little less verbose + Change a lot of: + #ifdef XEVIE + xeviehot.x = + #endif + sprite.hot.x = ... + #ifdef XEVIE + xeviehot.y = + #endif + sprite.hot.y = ... + to one single + #ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; + #endif + at the end of the functions. + +commit 95dbfcf8828c041c218145afc87d21a6c9c7bc02 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 17 21:18:18 2006 +0300 + + events.c: make XEvIE a little less verbose + Change a lot of: + #ifdef XEVIE + xeviehot.x = + #endif + sprite.hot.x = ... + #ifdef XEVIE + xeviehot.y = + #endif + sprite.hot.y = ... + to one single + #ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; + #endif + at the end of the functions. + +commit c6c39afde3e5f43b623ca6b52162b83c98a28d45 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 17 21:13:09 2006 +0300 + + dix/events.c: add YAFIXME + Add another FIXME to the cacaphony of XXX and FIXMEs in this file. + +commit f9624e0109cf12b6af43fb4235aaa0b54340a4bb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 17 16:09:51 2006 +0300 + + kdrive/input: verify SIGIO with --enable-debug + +commit 73e58adda96c1d1b5176d819107faa7697c3eb94 +Author: Matthias Hopf <mhopf@suse.de> +Date: Wed Aug 16 18:17:58 2006 +0200 + + Fixed segfault w/ broken Xinerama configs. + +commit cd3f744b1f983f71476db99c050045d981c5f5b2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 15 15:54:13 2006 +0300 + + fix missing brace, trim unused variables + +commit 5d073697adb3864133fa3221b82ab8d2f4a59758 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 15 15:37:10 2006 +0300 + + kdrive/input: minor warning cleanups + And also a compiler error fix when VERIFY_SIGIO is defined. + +commit 47c1c948e69cfba950ad37a3133fa2db0bd0ff2c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 15 15:25:16 2006 +0300 + + kdrive/input: only run special key behaviours on non-XKB + Only attempt to manually deal with special key behaviours (e.g. terminating + the server) when not using XKB, and leave locking behaviour up to GKVE. + +commit 34228d8b280ef105a0c60b8de5dacf70a5ce24b5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 15 15:23:53 2006 +0300 + + GPE: fix absolute button events / GKVE: (non-XKB) don't repeat lock keys + Fix absolute button events in GPE, where we would previously send valuator + events without bumping numEvents accordingly, causing the core event to + go missing. + In the non-XKB path in GKVE, implement proper lock behaviour (one press to + enable, one press to disable, discard releases). + Fix debug_events prototype. + +commit d003bada3352ec7d734498c4c732904876a9d1e2 +Merge: d6433be a815b9b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 22:48:55 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit a815b9b990e068f02d9cbba2b17f2cc3a30a9310 +Merge: 37943e2 984babe +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Aug 12 21:58:33 2006 +0300 + + Merge branch 'master' of git+ssh://gsap7@git.freedesktop.org/git/xorg/xserver + +commit d6433be3cca807dd78fbb1f45d9ba0212283083d +Merge: 2bf9e3d 984babe +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 21:50:52 2006 +0300 + + Merge branch 'master' into input-hotplug + +commit 2bf9e3dc1ec5fd7bf84a4a96899e5663a721d4a4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 21:50:39 2006 +0300 + + make DIX more tolerant of devices without a CtrlProc (Debian #269860) + Return BadDevice on client requests for devices without a CtrlProc, instead + of tanking horribly. + +commit 984babe86bf82002b4d6589b2750c7b5a5489bd5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 21:43:38 2006 +0300 + + remove obsolete vendor defines + Remove random behaviour changes for SGI and MetroLink. + +commit 37943e2f1abc6709ff739000372b0394d5cd18c5 +Author: George Sapountzis <gsap7@yahoo.gr> +Date: Sat Aug 12 20:54:33 2006 +0300 + + Call exaTryComponentAlphaHelper() for solid src also. + + Also, rename to exaTryMagicTwoPassCompositeHelper() as it is now called for + non-component-alpha masks also, and add function description from + http://anholt.livejournal.com/32058.html. + +commit f7919c287936f55569c2301ebb1b5f52358e70fa +Author: Bastian Blank <waldi@debian.org> +Date: Sat Aug 12 20:43:25 2006 +0300 + + xfree86: don't do legacy IO on ARM or S/390 (Debian #362641) + Don't attempt to poke legacy IO ranges on ARM or S/390. + +commit 59dcc62906d8ee597cd43aa307f414cb47995cea +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 20:39:08 2006 +0300 + + xfree86: remove Xqueue support completely + +commit e641000b98e7c2e92e3c801eaa42aa15d5c16ad0 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sat Aug 12 19:41:59 2006 +0300 + + xfree86: add Hurd support (#5613) + Add support for GNU/Hurd. + +commit 5a3488ccac8e5dabd9fc98bc41ef178ead1b2faf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 19:25:06 2006 +0300 + + configure.ac: fix execinfo.h test (Debian #363218) + Define HAVE_EXECINFO_H as well as HAVE_BACKTRACE, when we find execinfo.h. + +commit 26c3cd1c9e3f52548389817a6d89a377e20c4269 +Merge: 008aa7e c4951e0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 18:58:18 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 008aa7eb6ed090384e6c44f861410e317c78a1cd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 12 18:56:05 2006 +0300 + + completely remove OS keyboard layer + Completely axe the keyboard layer from os-support. + +commit c4951e0a6b6cf3eeee710cc5cda1d9bc929ee3d7 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Aug 10 20:49:06 2006 -0400 + + Fix a mode sanity check to not break reduced-blanking setups (LCDs). + +commit e1921f014b102e3eecf3b41972f8672cf23264d6 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Aug 10 20:43:15 2006 -0400 + + Rename some mode tokens to better reflect their use. + + Per #5386, M_T_EDID -> M_T_DRIVER, since it's really for any driver-detected + mode. Also add M_T_PREFERRED bit, to select a 'best' mode out of a set. + +commit c2535f67923bde0bfb0e72363467110806e2f40f +Merge: c0cb8d1 db82e12 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Aug 10 10:37:59 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular + +commit 9525c2709ea3245c6518d4c3b5a0a4afff37181d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 20:29:57 2006 +0300 + + configure.ac: fix xephyr conditionals + Fix Xephyr build conditions, allowing it to actually be disabled. + +commit 6d8d4abaaacf08140b673472d985117d448a62e7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 20:28:06 2006 +0300 + + configure.ac: allow conditional building of XF86{DGA,Misc,VidMode} + Allow conditional building of the above three extensions, defaulting to + auto. + +commit 1a5561c4ecccaf32b03c41373adf376100d457aa +Merge: 190f229 db82e12 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Aug 10 10:20:37 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit cec284f2b3e948deb9e56a1a8519fddf693ab952 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 18:03:58 2006 +0300 + + kdrive: properly ifdef composite enabling + +commit 45bce556e8665412b9f6e89f88ed5bedb41de1ba +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 18:02:47 2006 +0300 + + GetMaximumEventsNum: be more conservative + Be slightly more conservative in our maximum event count if we're using + XKB (and thus don't need to count the extra repeat events). + +commit 172d45b9b75f95c997d1e9358040eead496e2a06 +Merge: 3832a3d db82e12 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 14:14:54 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 3832a3d7db0f3b5d7167e3b3b5ea6d6b3d96351a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 14:13:51 2006 +0300 + + GKVE: don't repeat modifiers when using XKB + Make sure we don't ever repeat modifiers (previously was repeating when + using XKB); only do explicit KP/KR repeats in the non-XKB case. XKB will + take care of repeating when we're using it. + +commit 9f188416bb6b4837d4c3f8773053d5eee0ff0ee1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 14:00:34 2006 +0300 + + core devices: clear devicePrivates on close + +commit 539d1f33475484d35fb5a377efc76dba2d868e3f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 10 14:00:14 2006 +0300 + + GKVE/GPE: have DDX allocate events + Don't allocate events on every GKE/GKVE/GPE call, just have the DDX manage + it instead. Introduce GetMaximumEventsNum(), which is the maximum number + of events these functions will ever produce. + +commit db82e12fac5eaa16a39fc1bd0bc31ad95089dc95 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Aug 9 14:55:17 2006 -0400 + + Remove TargetRefresh option from the autoconfig logic. + + The default target of 75Hz is almost always wrong for LCDs. + +commit fcd4167e8913f77bdf9e17a6955d0f2a9f4eeb10 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Aug 9 14:48:51 2006 -0400 + + Remove the bc flag from the -help text, since it's gone. + +commit 767f372dd02232469f9fd804b811a17eaf762e1e +Merge: c4f5de6 462bb61 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Wed Aug 9 20:23:30 2006 +0200 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit c4f5de6cc3b935025829af971b0b8010c1ecfedb +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Wed Aug 9 20:21:52 2006 +0200 + + Sanitized glxdri's Block/Wakeuphandler calling. + + __glXDRIleaveServer() and _enterServer() used to call DRIDoBlockHandler + (resp DRIDoWakeupHandler) directly. They are now calling DRIBlockHandler + (resp DRIWakeupHandler) to account for driver specific block/wakeup + hooks. + +commit 5506b4ad200745236f997c121e8200179c47b749 +Merge: 4be9abb 462bb61 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 9 07:21:01 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 4be9abb8504b3761b5f3a01851e4eb3da86c76e2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 9 07:20:16 2006 +0300 + + kdrive: remove ddx_DEPENDENCIES + Remove foo_DEPENDENCIES as they weren't guaranteed to just be libs, + and loader arguments (-lfoo, -Lfoo) might've crept in. + +commit 462bb61b0fe968fae1b99cf98ec6f7de09105dcd +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Aug 8 18:07:22 2006 -0700 + + Add CompositeRegisterAlternateVisuals. + + This provides drivers the ability to add their own alternate visuals and then + register them with Composite for implicit redirection. + +commit 190f229ed77d87797e0f2f6762c86b3ad3a3dcbe +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Aug 8 16:47:32 2006 -0700 + + Make xf86PciVideoInfo static since it is only used within this file. + + Dummy out all of the PCI bus and device access control functions. We + need a better way to do this, and that will probably be in + libpciaccess and / or the kernel. + + Refactor xf86GetPciInfoForEntity to use pci_device_find_by_slot. + + Refector xf86CheckPciSlot to use xf86GetPciEntity. + + Eliminate disablePciBios and the one place that calls it. + +commit 5508f7646f9754b054e961a1025b7a52913b563b +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Aug 8 16:43:31 2006 -0700 + + Remove prototypes from some functions that were previously removed. + +commit 9df53d903ed68073bf7d2c2a275b6f6556a85c0f +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Aug 8 16:42:23 2006 -0700 + + Rename xf86ReadDomainMemory to xf86ReadLegacyVideoBIOS, since that's + what it is actually used for. Modify a few routines in linuxPci.c to + take pci_device structures as parameters in stead of PCITAGs. + +commit fe351a711ef55c3ae1e784d4551147c080eda109 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 8 14:54:10 2006 +0300 + + GKVE: send XkbMapNotify, not XkbNewKeyboardNotify + Sending MapNotify is more correct in this case than NKN, so do that. + +commit 31089816317f27c668b12a15c74fdd226a8df9f7 +Merge: ab3ebfe 12dbd8a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 8 12:01:12 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit ab3ebfefdb7d21aba72a5030f6f93bf4fafed709 +Author: Tiago Vignatti <tv02@c3sl.ufpr.br> +Date: Tue Aug 8 12:00:34 2006 +0300 + + xorgcfg: fix compilation error + Add missing parentheses to IS_KBDDRIV macros. + +commit 12dbd8a02f797ad57a1be683a02a1fcb1ca35438 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 23:43:40 2006 +0300 + + remove optional R3 backwards compatibility + Remove the permitOldBugs flag, which enabled backwards compatbility with + broken R2/R3 era clients. + +commit 7721ee308fbbb6fc9c969f15fe04b3346c04f843 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 23:03:02 2006 +0300 + + config client: fix minor race with event queue + Fix a small race whereby you could remove a device while events from it + were still in the queue, by calling ProcessInputEvents immediately before + RemoveDevice, to (hopefully) flush the event queue. + +commit 458c63a84110f64c7fce397a531a3a779c2239a2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 23:02:17 2006 +0300 + + enable adding devices after removal of a middle device + Allow new devices to be added after a device that _wasn't_ the last on the + list was removed, by ensuring inputInfo.numDevices always increases, and + never decreases. + +commit a31d11a7a8485cdc799f76c4d407d3b7f7c9b350 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 23:01:23 2006 +0300 + + GKVE: get rid of bogus double-release check + Get rid of a bogus double-release check which broke non-XKB servers. + +commit bedc4ecf23c7150e3156e0d24602ed3bc3977225 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 23:00:45 2006 +0300 + + xephyr: aid input debugging + Add the 'ephyr' mouse and keyboard drivers to the driver list so we can + re-add devices. + Set the names properly in Ephyr{Keyboard,Mouse}Init, not in InitInput. + +commit baf93b3abe1e88d82ee6a3d6939f50f96ded271a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 21:12:45 2006 +0300 + + kdrive: move map initialisation to KdNewPointer + Do a linear n -> n initialisation on the map up until KD_MAX_BUTTON in + KdNewPointer, moving it out of both KdParsePointer, and KdPointerProc. + Also remove dead pointer acceleration code. + +commit ccb53340b66a778abf10182fd88a7d699207fb84 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 21:12:00 2006 +0300 + + ephyr: cleanup + Remove extraneous KdAddPointerDriver call. + +commit d1c18af27e0aed73104743afb4bf4b8d3d1186cf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 21:11:38 2006 +0300 + + GPE: use button map for DBP/DBR, not just BP/BR + Make sure we use the button map for extended events, not just core. + +commit 9b7ecbd1dd8d092221897e29c85f3306c7367716 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 21:09:32 2006 +0300 + + kdrive: prevent overrun in map + We actually need n + 1 elements for the mouse button map, not n. + +commit eb6e8d4042252b13328dbb122e0e6186796a80ac +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 21:05:37 2006 +0300 + + kdrive: increase maximum number of buttons + Increase KD_MAX_BUTTONS to 32. + +commit 1c72290cdf4d9b214e1b9c0526cb7cb8641051f3 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Aug 7 09:57:58 2006 -0700 + + Use DrawablePtrs instead of PixmapPtrs for Prepare/Finish access. + + Also, define some wfb functions even if FB_ACCESS_WRAPPER is not defined. This allows a client to use libfb and libwfb at the same time. + +commit afcad4ad99bbfc8bdcd0f4fdd70e072108410d30 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 18:11:05 2006 +0300 + + xfree86 ddx: always free GKE/GPE events + free() events we get passed back from GKE and GPE so we don't just, er, + leak them all. *cough*. + +commit 98fdf874eeadd5b37413922d8afba8415d0c56bb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 16:51:39 2006 +0300 + + move all autorepeat logic to DIX + Move core autorepeat logic for keyboards down to the DIX, remove it from + KDrive. + +commit 5c7001fef8ffc6e3d8585a37d3f79a9495be8ed0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 16:51:09 2006 +0300 + + memcpy() events in + memcpy events into our event structure instead of doing pointer assignment. + +commit c85e64cba1d2d88f676ca7cf23b52a6f8219e90e +Merge: a406f6b f54b71b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 7 15:54:55 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit f54b71b772a1f587394ae3968782b611e52f0e2d +Author: David Nusinow <david@nee.(none)> +Date: Sun Aug 6 18:11:00 2006 +0000 + + Document enable/disable flag for AIGLX in xorg.conf manpage. + +commit a406f6bfeaa46e3236f7ab46813fe6c30b936a35 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 4 12:40:19 2006 +0300 + + mieq: don't leak events + free all events posted through mieqEnqueue. + +commit 997ba45b192f21810099ed888792a45f1677a9ce +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 4 11:18:16 2006 +0300 + + fix incorrect button test + Test for n (1..nButtons) being under nButtons, not button (1..(1<<nButtons)). + +commit 9138d5a51e411f598bc0e75a3e73d2c16187a518 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 3 18:24:04 2006 -0400 + + Make SecurityLookupIDBy* part of the base functionality. + +commit 45c229f526bf1dafb5e81b50d700449ba4e1613d +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Thu Aug 3 14:26:06 2006 -0400 + + Remove LBX code. + +commit 96e45626c43b7674b66e0258b0b1730d5ce71357 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 2 20:29:59 2006 -0400 + + Rebase Security extension to use devPrivates for storing security state. + +commit 83ebf61ec03ff31005375900bee1e55e0e694c4b +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 2 13:33:33 2006 -0700 + + Eliminate the last few places outside xf86pciBus.c that use + xf86PciVideoInfo. In all cases this means converting the code to use + the pci_device_iterator interfaces. + +commit 5bfb2ee9652e5ef6d076ef8b6df54baaa43b8e0c +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 2 13:29:21 2006 -0700 + + Remove the last remants of the pci{Read,Write}{Long,Word,Byte} + functionality. This also allows the removal of PCI_CPU, PCI_CPU16, + and a few other dangling bits of cruft. + +commit a0f2e1cae46f189ed97e2d92b485d315b3d2627a +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 2 10:54:41 2006 -0700 + + Move xf86FindPciDeviceVendor and xf86FindPciClass from xf86pciBus.c to + xf86int10.c. Refactor common code from those functions to do_find. + +commit de8234606f87ce79d016f7ddeabdf57c4ad212f3 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 2 10:44:11 2006 -0700 + + Modify xf86FindPciDeviceVendor and xf86FindPciClass to use the + pci_interator interface instead of the xf86PciVideoInfo array. + +commit 3c23dec5962b8b81ae838fe0ee2c7b0a789f5386 +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> +Date: Wed Aug 2 13:39:49 2006 -0400 + + Call ClientStateCallback on serverClient devPrivates initialization. + +commit 23f44df9009023e77508f03ac4a7595c7e3d40cb +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 2 09:55:32 2006 -0700 + + Remove pciConfigPtr and all of the associated cruft. + +commit 966ebd3d2d84b440e89504d055a0e937303ed11d +Merge: a941766 39169fd +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Aug 2 08:14:58 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit ee02e647882a4be29e1130bd79904ee79ed6b802 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Aug 1 13:45:43 2006 -0700 + + Wrap libwfb memory access. + + Use the READ and WRITE macros to wrap memory accesses that could be in video + memory. Add MEMCPY_WRAPPED and MEMSET_WRAPPED macros to wrap memcpy and + memset, respectively. + +commit 39169fd373b97f34923f6494d697d9429d0b8aa3 +Author: Matthew Allum <mallum@polystyrene.(none)> +Date: Tue Aug 1 13:39:22 2006 +0100 + + Back out 'mystery' spurious host window hints. + +commit f737cc38baea6af8bf284c9e207e60a7d90eebe1 +Author: Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil> +Date: Mon Jul 31 19:58:42 2006 -0400 + + Adding devPrivates support to the ExtensionEntry structure. + +commit b04d64854712678701d5243aacf5cc93444cfadc +Author: Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil> +Date: Mon Jul 31 19:35:08 2006 -0400 + + Added devPrivates support to the ExtensionEntry structure. + +commit a94176627cdd6122ffadb618995f9bcec872609a +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 31 14:33:58 2006 -0700 + + Eliminate all uses of the businfo field of pciDevice / pciConfigPtr. + +commit a69335dc299be6de8b82ed34de1cb30f1255feb4 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Jul 31 14:15:55 2006 -0700 + + Make ReadMemoryProcPtr take a const pointer. + + Fixes some warnings when using READ with a const pointer. + +commit 26c9587f90806cce1c0d2a98e656e9c311a34ee5 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 31 13:54:36 2006 -0700 + + Build fixes for last pull from HEAD. + +commit 65dc25d8f86b962f2adc765a9ff327419f98092b +Merge: 69533fc b74c845 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 31 12:30:30 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit b74c845a1233f78b841ff8840272c50873300c20 +Merge: 3112a6c 02daa6b +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 31 10:26:06 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3112a6c4f26d5e9258b8def7ce4109b4bd408c67 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 31 10:25:31 2006 -0700 + + Noting uses libdummy.a, so don't build it. Only libdummy-nonserver.a + is actually used. + +commit 02daa6bb103e53e5a33db2bb6acbe57d0bf2c30e +Author: Matthew Allum <mallum@polystyrene.(none)> +Date: Mon Jul 31 17:32:05 2006 +0100 + + Improve XRes to; + - Better estimate general pixmap memory usage. + - Account for pixmaps shared between clients. + - Account for window background and border pixmaps, + and GC stripple and tile pixmaps. + +commit 69533fc04f38c67fd424776c5191a4ba57ba8c8f +Merge: ef1aeca 24051ef +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 31 09:26:04 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/Makefile.am + hw/xfree86/common/xf86AutoConfig.c + +commit 24051ef97406f28c102cf46a78223400b61fdae2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 30 12:15:33 2006 +0300 + + remove filename that's too long for tar + +commit ecb7d43a76d507d04891ab7f189b23be5eccda51 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 30 11:52:41 2006 +0300 + + add sym.h to sources + +commit bf2d7499c84c94f228d03b21448f5688b3cda1a8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 30 11:17:02 2006 +0300 + + add securitysrv.h + +commit e87e68634d8eb66ab783e2802e2d5d12ff1031be +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 30 11:11:59 2006 +0300 + + remove .cvsignores from EXTRA_DIST + +commit ed0c807de9f07468385fcbd2e8a9c0737759a461 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 30 11:08:54 2006 +0300 + + bump to 1.1.99.3 + +commit a68dc013a33d867e65a7e76b3eec5947b862a5b4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 30 11:08:47 2006 +0300 + + remove README (which doesn't exist) from EXTRA_DIST + +commit 87fe85f38b6f781bf0e2eb555526e3d77779f9fa +Merge: 3518e2d 654619d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 30 10:51:34 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 654619d76c779606f2315782fc01d1410399fa3b +Author: Kevin E Martin <kem@freedesktop.org> +Date: Fri Jul 28 17:16:32 2006 -0400 + + Revert xkb changes that broke XkbGetKeyboard() + +commit 79016d4036786b091a9b9d1133a6cdfedd6c277d +Author: Luc Verhaegen <libv@skynet.be> +Date: Fri Jul 28 16:02:02 2006 -0400 + + Bug #5386 (partial): Move CVT mode generator from cvt(1) to server core, and + export it from the X server to modules. + +commit e6ae1612be519ee6224d354244d076d85d44a750 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jul 27 18:24:59 2006 -0700 + + Add fbHasVisualTypes and fbSetVisualTypesAndMasks to wfbrename.h and include -DXFree86Server. + +commit 2a4ceb09ed5a09dc5763754ab865ec23df91ac9f +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jul 26 19:39:17 2006 -0400 + + Remove dead function prototypes. + +commit 990a4009057e068f41d20b95aa0c59357185650d +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jul 26 19:03:39 2006 -0400 + + Remove getconfig horrorshow. Replace with a static built-in rule list for now. + +commit 377a581ddf5e428a368efb1b59fcb317666fecdd +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Jul 25 15:27:31 2006 -0700 + + Switch to using void* pointers. + + Pass the size of the data pointed to by src or dst as an argument to + wfb{Read,Write}Memory. This allows one set of macros to be used with any size + pointer. Assumes that sizeof(FbBits) >= sizeof(FbStip). + +commit a4005c15fbb48231cb958c32b2c791a2d23a135a +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Mon Jul 10 18:58:09 2006 -0700 + + Add framebuffer access wrapper infrastructure. + + Create fbPrepareAccess macros to call into the driver to set up the + wfbReadMemory and wfbWriteWemory pointers. Call these from fbGetDrawable and + fbGetStipDrawable. + + Add the READ and WRITE macros, which expand to simple memory accesses for fb, + and calls through the function pointers for wfb. + + Add fbFinishAccess macro to give the driver an opportunity to clean up. Add + calls to this in the appropriate places. + +commit 319efac445cebda5a2ac1db67efebe54bc47ba9d +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Jul 7 18:45:30 2006 -0700 + + Prefix all of the exported symbols in libwfb.so with "wfb". + + For now, just #define all of the exported symbols in wfbrename.h. Later, + we should add FBPREFIX() around the exported symbols and use -fvisiblity=hidden + to hide the rest. + +commit 7608a63ff7409f399c9a26962a304b84196a1868 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jul 6 17:05:21 2006 -0700 + + Build infrastructure for libwfb.so. + + Builds fb/* twice, defining FB_ACCESS_WRAPPER for libwfb.la. Define a macro, + FBPREFIX(X) which expands to fbX for libfb.la and wfbX for libwfb.la. Use the + macro on [w]fbModuleData so the new module loads. + +commit 39158e98acb29e97a2682d4a37385f9141b484c4 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jul 26 18:39:28 2006 -0400 + + Remove another latent PowerMAX hunk. + + All your favorite running jokes of 2005, today! + +commit ef1aecaaf6cd7e9e4f9d0c6373664e774500bc13 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Jul 26 13:25:13 2006 -0700 + + Pass correct pointer to xf86MapLegacyIO. + +commit 3518e2d0debc97e2bacdefe604b280e7fdfdd216 +Merge: eb7733a 3821f6a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 26 11:29:21 2006 +0300 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit eb7733a48a92405660d5d2ab60913b62c30daaed +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 26 11:28:45 2006 +0300 + + kdrive: drop excessive NewInputDeviceRequest debugging + +commit 3821f6aeaa714582ee0a631de96c6e7cfd96303e +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jul 26 01:56:02 2006 -0400 + + Unlibc-wrap DMX glxscreens.c and fix tag-removal typo. + +commit 28ba8d56912ae56d7b9835188f621b0a491add30 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Jul 25 15:38:09 2006 -0700 + + Gut anything having to do with the PciBusPtr (or PciBusRec) type. + Bump required version of libpciaccess to 0.5.0 so that + pci_device_get_bridge_buses can be used. + +commit 380b51d605a82c98082a2cebd70a0d1d0735eaa7 +Merge: 82f6b7e 8977b07 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Jul 25 11:30:04 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/common/xf86Init.c + hw/xfree86/int10/pci.c + hw/xfree86/scanpci/xf86PciData.h + hw/xfree86/scanpci/xf86PciStdIds.h + hw/xfree86/scanpci/xf86PciStr.h + hw/xfree86/scanpci/xf86ScanPci.h + hw/xfree86/utils/pcitweak/pcitweak.c + hw/xfree86/utils/scanpci/scanpci.c + + Re-removed most of the conflicting files. + +commit 4ea475924c557ad0819b796f5369e5e669465709 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jul 25 20:00:48 2006 +0300 + + re-add OpenedHand copyright + Ae-add OpenedHand copyright, accidentally dropped in KDrive new world + order patch. Sorry guys. + +commit 82f6b7e75e04e3fb951ab71ad3c553c8b34ea995 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 13:52:58 2006 -0700 + + Don't re-look-up pointers that are already stored in structures. + +commit 2fd6b995ff927c8ca7267c201f535564b82e691f +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 13:33:34 2006 -0700 + + Global s/xf86MapDomainIO/xf86MapLegacyIO/. Let's call a duck a duck, + okay? Since xf86MapLegacyIO is called from only one place, cut the + parameter list down to the one parameter that actually conveys some + information: the one that gives a PCI device. Change from using a + PCITAG to a pci_device. + +commit aed6fe0bb12c68b94e564252bc03594728ed8c5b +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 13:13:05 2006 -0700 + + Refactor linuxGetSizesStruct to take a pci_device pointer instead of a + PCITAG. Modify xf86BusAccWindowsFromOS and xf86AccResFromOS to call + linuxGetSizesStruct directly with a pci_device pointer. Remove + linuxGetSizes. + +commit e48762799248eb7e16ea2c0df1561ae1430f2112 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 12:23:23 2006 -0700 + + Modify xf86BusAccWindowsFromOS and xf86AccResFromOS to use the + libpciaccess interfaces. + +commit 4b474cbc1a0fe17da2438a15291f04ee67ea28f8 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 12:17:27 2006 -0700 + + The functions xf86PciBusAccWindowsFromOS and xf86BusAccWindowsFromOS + are identical. Just have one call the other. + +commit 7dff8d98a9ed11f92806cb8c4b3f10e01c5d063f +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 11:56:37 2006 -0700 + + Remove source files that have been dead since day-1 of this branch. + +commit eb95128f615e2f3fab17dcafd4fc260c6d4d0644 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 11:53:37 2006 -0700 + + Changes that were missed on the previous commit. Perhaps oddness + caused by doing git-update-index at the wrong time. + +commit 05f8b772aec2b05d92078bb60a07bd8413386363 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jul 24 11:23:03 2006 -0700 + + ScanPciDisplayPCICardInfo now uses pci_device interface for PCI + scanning. Log messages simplified to make the code shorter and less + convoluted. ScanPciDisplayPCICardInfo is now void since it was only + called from one place with a constant parameter. + +commit ca3f4fc1b0c21a0620ab1eb35c199cd55d795095 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 23 19:02:12 2006 -0400 + + add fallback ChangeDeviceControl, allow XOpenDevice on closed device + Add a fallback ChangeDeviceControl, which allows the attributes we know about + so far. + Allow XOpenDevice on closed devices. + +commit e73e5e2a4d8f22889d840a7719479f9af686cb9c +Merge: a73cef1 8977b07 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jul 22 13:56:30 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 8977b07434d75ca396d236dc1324f0c862b633c7 +Author: Dave Airlie <airlied@linux.ie> +Date: Sun Jul 23 03:36:47 2006 +1000 + + glx: fix typo from tag removal + +commit a73cef1f005ca66db18e952e676ee5a21b829700 +Merge: 672ca15 70869fc +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jul 22 12:07:22 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 70869fc6777f87cd05794446caa739e3d9a91ffe +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 23:39:37 2006 -0400 + + Yet more dead code. + +commit 7c1b2ee7a8238c267bc97e78bbff204dc7723dd3 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 23:35:13 2006 -0400 + + static markup, more dead code. + +commit 1c4f90b1d05d4c49279f3224a6dd94850a6bd8d0 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 23:03:21 2006 -0400 + + Open-coded path checks make baby Jesus cry. + +commit 114264584ca43091a5e07282566a30a6378a1502 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 22:55:41 2006 -0400 + + Remove a useless open() of the module we're about to load. + +commit 985611d5cd079f97da700c7b8e898d33da004be0 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 22:37:59 2006 -0400 + + Delete some long-unused testing code. + +commit 525257eb98b46209c69c8576daa6bd7afc1f48a9 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 21 19:16:38 2006 -0700 + + Fix stupid typos. + +commit 672ca156bfb11440e6e234650bfba9d38e1edb52 +Merge: d14d91f 6cf844a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:58:42 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 6cf844ab69926b6d23619a12c97734af3881ba67 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:57:28 2006 -0400 + + loader: walk directory paths with readdir(), don't stat() everything + Walk the directories with readdir, and don't stat everything we can + find. Thanks to davej for the public humiliation reminding me to go back + and re-fix this one. + +commit d14d91f094c3897c889f6aafb66d738820dae0aa +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:57:28 2006 -0400 + + loader: walk directory paths with readdir(), don't stat() everything + Walk the directories with readdir, and don't stat everything we can + find. Thanks to davej for the public humiliation reminding me to go back + and re-fix this one. + +commit e18d34f4238e13e226b0407fa2f5f77d2038de39 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 21 16:47:45 2006 -0700 + + Make the various implementations of xf86ExtendedInitInt10 use the + libpciaccess interfaces. This eliminates all calls to mapPciRom, + which in turn allows the elimination of hw/xfree86/int10/pci.c. + +commit 87a6346bf7f086b5f98b2b2ecd52f27efe864e56 +Merge: b73fb2a 0486d39 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:36:25 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 0486d3966d2888ef86d36c19f31bdbc2a3e8c652 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:35:04 2006 -0400 + + fix kbproto dependency + Depend on kbproto >= 1.0.3, for unconditional definition of + XkbSA_XFree86Private. + +commit b73fb2ae35a82e0bdd48f01132e971fb84946ff1 +Merge: e7ac27a aff404f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:30:26 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit e7ac27ad81efbea6128b3cec443ca98e228d14ad +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:29:28 2006 -0400 + + revert accidental deletion of lnx_io.c; re-delete lnx_kbd.c + Thinko'd which file to remove after merging from master. + +commit 81913a12910e39d7ea6af8657c1c66cc6791cd65 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:10:26 2006 -0400 + + remove undead files from master + Remove dead files which worked their way back in when merging from master. + Ugh. + +commit 7465010d59ec435bd00b738f0cef766b352dc7eb +Merge: 1d31ed7 0aaac95 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:05:41 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug + +commit 1d31ed778284082e1060bff63317c94581d9eb9b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 19:02:52 2006 -0400 + + xephyr: load keysyms at init, not enable + Load keysyms at init time, not enable, so we don't get the wrong map width. + +commit 63dfaa1d5ba556e09314ec914936e5471aab94b0 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 18:47:18 2006 -0400 + + Delete internal usage of the symbol ref/req lists. + +commit bca9364f3f4a2376edbcf57a34f704ce28be21ba +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 18:41:46 2006 -0400 + + Remove the loader's required and referenced symbol lists, dead code. + +commit 07ad92d2c4cb07db8487d76efc822fd7b88137cb +Merge: 18624a9 22db3fd +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 21 15:25:35 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/common/xf86DoScanPci.c + hw/xfree86/common/xf86Init.c + hw/xfree86/common/xf86pciBus.c + +commit aff404f293ed86a44a093a51a9f11e79e6c3f4f6 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 18:24:37 2006 -0400 + + Detach xf4bpp from cfb. + +commit 0aaac95b0d12089b256c97f6ff955c8c229ae095 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Fri Jul 21 17:56:00 2006 -0400 + + Remove RCS tags. Fix Xprint makefile braindamage. + +commit eeaad0e956640aac653d194a992df7792e4abcbb +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Thu Jul 20 18:19:07 2006 -0700 + + Fix the RandR failure path for rotated screens. + +commit 22db3fdb54d2f7f6b72638b46c186af6db04e214 +Merge: 2f98841 93cd538 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 21 13:55:37 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3eeb62e8f587732e6b433c2b9c6879eb26a3f1b4 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Jul 21 16:33:28 2006 -0400 + + bug #890: completely remove deprecated keyboard driver + Remove all remnants of the old built-in keyboard driver. + +commit 60ea7b51fe2b8a19a08b63db48504971a7a50ee6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 21 15:23:37 2006 -0400 + + xorg ddx: move to new input API, remove old keyboard driver + Remove most of the rest of the old keyboard driver. + Move to the new Get{Keyboard,Pointer}Events API, which is mostly + complete at this stage: just missing the proximity events. + +commit d32dc8bf19e1071fc30af2f0bc6a6699b351f39e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jul 20 18:40:47 2006 -0400 + + be more careful in IVAS + + Don't walk off the end of a NULL pointer in InitValuatorAxisStruct. + +commit 7711c56d2e2aeae4dcd6d9297bc144c1cb3cfab1 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Thu Jul 20 18:38:57 2006 -0400 + + xephyr: fix keymap, pointer; dix: fix multiple axes + + Initialise our axes properly in the DIX, and make sure we don't + unnecessarily clip maxval when it's not set. + Fix keymap copying in Xephyr (to some degree: it's still broken), + and set nAxes and nButtons properly. + +commit f18c3122a57df9770087e5fc70ac488552222233 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Thu Jul 20 16:49:17 2006 -0400 + + sanitise debug output + + Don't spit out huge chunks of pointless ephemera, especially without + --enable-debug. + +commit 463e0fe35bec3c91b19be9aacf34babb146a88c9 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Thu Jul 20 16:45:15 2006 -0400 + + update KDrive to new input API + + Update KDrive to fit the new API (mieqInit and InitPointerDeviceStruct), and + include InitTouchscreenDeviceStruct in the DIX. + +commit 1987af8c498a1bf394a8951ca6d5b0b7f7a35188 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Thu Jul 20 16:39:54 2006 -0400 + + add virtual core devices to DIX + + Add virtual core devices, with proper keymaps etc, to the DIX. + +commit 737e6e4836a6af26fedc22cda8e7d366b52c8fa7 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jul 19 20:10:48 2006 -0400 + + define SDevicePresenceNotifyEvent prototype + +commit 7f36cc533e7f6ae44e973c5f00f9bfec7c6b7b50 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 19 20:09:13 2006 -0400 + + distribute config.h + +commit e896195eab726a2b307200958308eda8c93dd3cd +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 20:05:33 2006 -0400 + + remove extraneous font debugging code + + Some of it didn't compile, and some of it was just unnecessary. + +commit 99c57674c002c5e88c6db34488a27b05004c9197 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 19:59:11 2006 -0400 + + avoid using font servers with built-in fonts + +commit ecfad74c48f633916305bcc25baaaad74aa52b78 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 19:55:13 2006 -0400 + + add support for built-in fonts + + Use --enable-builtin-fonts to only use built-in fonts, and avoid loading + fonts. + +commit 0a2068d123520d35818c38a555ae3ba06d8ca7fb +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 17:29:23 2006 -0400 + + Xi: add XExtension{Keyboard,Pointer} types + + Report XExtensionKeyboard for non-core keyboards, and XExtensionPointer for + non-core pointers/mice. + +commit c7577f9b88aac84d59404f29d994ee7af583d33b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jul 19 17:27:58 2006 -0400 + + Xi: add DevicePresenceNotify + + Add support for DevicePresenceNotify events. + +commit 3a23e499017d5823157806029263edac53c663fd +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 17:00:23 2006 -0400 + + make XInput mandatory + + Always build Xi, since GetPointerEvents/GetKeyboardEvents relies on it. + +commit 02d09105113fb9b560a770fe15f7bb041165831c +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 16:51:04 2006 -0400 + + new KDrive input world order + + Convert KDrive to GPE/GKE interface. + Add first-class drivers and enumerate every device separately through + Xi, instead of lamely attempting to aggregate them. + Add XKB support to the Linux keyboard driver. + Add 'thumb button' support to the tslib driver. + Rejig InitInput, so each DDX has to add a list of drivers it supports. + Support NewInputDeviceRequest, et al. + +commit a274e7296b1bdd6f6c921f28b087610cec9548e0 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 13:56:23 2006 -0400 + + add GetPointerEvents/GetKeyboardEvents framework + + Add GetPointerEvents (with XFree86 pointer acceleration) and GetKeyboardEvents + to the DIX. Extend the ValuatorClass structure to account for same. + +commit b308dbf273f8c26361b0fee7aca64aec3245f60b +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 12:15:18 2006 -0400 + + add DEVICE_TOUCHSCREEN and DEVICE_CORE Xi controls (DeviceIntRec ABI break) + + Add DEVICE_TOUCHSCREEN and DEVICE_CORE controls to the Xi code, and the + TouchscreenClassRec and a coreEvents flag, to toggle propagation of core + events. + +commit c9a3d9baa81ceb940032ffe529d9eadf2d202ab2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 19 11:41:16 2006 -0400 + + xorg DDX: implement NewInputDeviceRequest + + Implement NewInputDeviceRequest for Xorg, mainly written by Kristian Høgsberg. + Move MatchInput to xf86Helper.c, as xf86LookupInputDriver. + +commit 02a95311568e24e1055ea52c7df8cb7aa3f38ad0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 19 10:05:12 2006 -0400 + + add basic D-BUS configuration mechanism + + Also move LookupDeviceIntRec into the DIX, and add InputOption type, and + NewInputDeviceRequest prototype (DIX requests DDX to add a device). Does not + link without an implemented NIDR. + +commit 93cd53860c3aca182a0a02543c41b5d71d65926b +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Thu Jul 20 16:52:31 2006 -0400 + + kdrive: allow debugging + +commit cd0874dda1c30ef91a7d2b3cd455676422599ccf +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 20:13:02 2006 -0400 + + never define MEMBUG + + Definining MEMBUG causes allocations to randomly fail. + +commit 093943d4d02f1dbc8935b8cf835866a6e3885193 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 20:09:55 2006 -0400 + + define DEBUG in DIX + + Which makes #ifdef DEBUG actually useful. Incredible. + +commit 68b0678254240a984db9adefefb0cf68e9bfd4e4 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 20:08:32 2006 -0400 + + exa: only disable cw when COMPOSITE is built + +commit 27df2eda795681c9f05e2907d74e2c102d3441e4 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 16:18:28 2006 -0400 + + fix KdXvCopyPackedData to actually work + + Remove extraneous bit shift in KdXvCopyPackedData, so it's actually + useful. + +commit 00b24f119f03da86fa98ffea545c5b041810ce53 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jul 19 17:01:20 2006 -0400 + + fix minor typo + +commit f8a7a1e40c14a85ebde11c5854c07a8d529d38b9 +Author: Daniel Stone <daniel.stone@nokia.com> +Date: Wed Jul 19 17:06:00 2006 -0400 + + fix XEvIE build without XKB + + Don't unconditionally play with XKB stuff in XEvIE. + +commit 2f98841fde6bad807967ed15e954291240714198 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jul 20 16:08:27 2006 -0700 + + Remove unused variable. + +commit 985c34bf06af70a7296db8307899a17347a25558 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Thu Jul 20 17:33:13 2006 -0400 + + Remove the DDXTIME conditional, for being unused. + +commit c69c00d6523a35232a32e54a533811fc2b37815a +Merge: 4636935 84683f1 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jul 20 12:08:38 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 84683f19b4d1c712281036bcabf8dc623e64b26a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jul 18 18:16:12 2006 -0400 + + get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE + Get rid of almost all uses of these definitions. They're still defined for + delinquent out-of-tree drivers, and also for the Mesa build. As well as + for miinitext.c. But largely gone. + +commit 881953813c7307f2aac4057b48d233e5f4a574cd +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Mon Jul 17 13:50:38 2006 -0400 + + Fix the Linux ACPI reopen code to use a repeating timer, rather than a + one-shot sleep-and-reopen attempt. + +commit f029e9a32dcaa95b84e08ec173a0cc78fd92bdbf +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sat Jul 15 22:05:38 2006 -0400 + + Un-glx-libcwrap DMX GLX proxy so it works without GL/include. + +commit 46369350d40819ecc2a9f37ed4aaa95866b80997 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 14 15:51:55 2006 -0700 + + Add some const qualifiers to serveral function parameters. + +commit 490fb304599b1f24b36439e5c1397781e7d2f612 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 14 15:26:56 2006 -0700 + + Rearrange code in xf86int10ParseBiosLocation to use strncasecmp. This + eliminates the need for the first use of xstrdup in this function. + The second use of xstrdup was *never* necessary and has also been + eliminated. + +commit d3ee49bcbafe4b4e6b308686020847e978473779 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 14 15:13:35 2006 -0700 + + Refactor common code from the generic.c and linux.c version of + xf86ExtendedInitInt10 to xf86int10GetBiosLocationType and + xf86int10GetBiosSegment. + + These changes were tested on MGA hardware on x86-64 with various + combinations of InitPrimary and BiosLocation. + +commit 8793c7fd4ba7d1b3e2eff3f2c18d042ee9bb3f62 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 14 09:11:39 2006 -0700 + + Refactor identical xf86InitInt10 function from generic.c and linux.c + to helper_exec.c. + +commit 1450fd596433f7adfe3d0798dc2ddceb9d0a9034 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jul 14 09:10:32 2006 -0700 + + Trivial refactor of libint10_la_SOURCES. + +commit 18624a9b7cf88e769c53cc3a876b3647c5d5057c +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jul 13 21:10:48 2006 -0700 + + Modify linuxGetSizesStruct to use pci_device instead of pciConfigPtr. + +commit 12595a77d6c2f037f48dfe751bdc10505b3317df +Merge: 37838de 4c225a3 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jul 13 12:48:03 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 4c225a3a8b2e7e5e5510347d8473f1318bbac769 +Author: James Steven Supancic III <arrummzen@arrummzen.net> +Date: Thu Jul 13 10:03:57 2006 -0400 + + Bug #7482: Fix Xdmx's Render code to match reality; fixes BadLength client + crashes. + +commit bb3aa94845a74d7718ba9539bb76203ec82957fc +Author: Drew Parsons <dparsons@debian.org> +Date: Tue Jul 11 18:26:55 2006 -0700 + + Bug #7346: Disable Composite extension in Xprt + + Xorg Bug #7346 <https://bugs.freedesktop.org/show_bug.cgi?id=7346> + Patch #6184 <https://bugs.freedesktop.org/attachment.cgi?id=6184> + +commit 10f3e32726d5b4981abd1a3a022e5b4f219fb41e +Author: Gustavo Pichorim Boiko <boiko@mandriva.com> +Date: Mon Jul 10 16:37:53 2006 -0700 + + Fix the configure check for the --{enable,disable}-dpms option + +commit 2194d99d9ca3c607e0f5ddd911ee3df536d77564 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Jul 9 16:16:08 2006 +0200 + + Replace GNU make-ism. + +commit 90a9b82272446fdaebe71c966325fd7e670f75c6 +Author: Matthew Allum <mallum@polystyrene.(none)> +Date: Sat Jul 8 21:57:07 2006 +0100 + + Fix crash in Xephyr when running on host X with keymap width < 4 ( i.e xvnc ) + +commit 21e3e3ca298dce22e5fad6ef38aa6fe9736a1d3b +Merge: e805621 39b2f7b +Author: Matthew Allum <mallum@polystyrene.(none)> +Date: Sat Jul 8 21:13:52 2006 +0100 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit e8056218944e873135c93039d1e9646d51364467 +Author: Matthew Allum <mallum@polystyrene.(none)> +Date: Sat Jul 8 21:10:58 2006 +0100 + + Add support to Xephyr for simulating 8bit grayscale. + +commit 39b2f7b2182aedb1ab45415efb4c263012ace512 +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Sat Jul 8 19:55:53 2006 +0200 + + Bug #3042: Use autoconf to get the correct name of a struct member. + + This allows us to remove the kernel version ifdefs from the code, which + are ugly and broken. + +commit 63f13e01ee6e7df1753f2113f4cff9538596be0a +Author: Tilman Sauerbeck <tilman@code-monkey.de> +Date: Sat Jul 8 11:33:44 2006 +0200 + + Bug #7097: do case-insensitive comparison for some hotkeys. + + xkb's strcasecmp implementation has been moved to the dix so it's now + safe to just use strcasecmp(). + +commit 5416f90e9c939027005fc01fa3ce3df56919ae0d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jul 6 21:22:34 2006 -0400 + + Implement GLX_MESA_copy_sub_buffer. + +commit b84374b2917a91a7732e780ffab6a29c807a3ecc +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jul 6 02:28:55 2006 -0400 + + Add GLX_MESA_copy_sub_buffer marshalling support. + +commit 2152e2d364bdd179cf218cde446c763d8c8bb833 +Author: Ed Catmur <ed@catmur.co.uk> +Date: Thu Jul 6 17:45:36 2006 -0700 + + Remove hardcoded 'lib' in XPRINTDIR. + +commit 233c004641483a75985e09fea5416ab2c7a97fc4 +Author: Ed Catmur <ed@catmur.co.uk> +Date: Thu Jul 6 17:41:53 2006 -0700 + + Generate xprint.pre from xprint.cpp. + +commit b3e4d1d1f4bcf900146d7b8cd19e008209294663 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jul 6 18:51:29 2006 -0400 + + PPC64 build fix. + +commit f847f3c0a956c0aec8ade8e32f770daae147f40b +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Jul 6 15:33:31 2006 -0700 + + xorgcfg now needs libxkbui version 1.0.2 or better. + + Old versions of libxkbui use XkbStrCaseCmp which doesn't exist any longer; + the server fails to link with that version of the libkbui library, so + require the current version (1.0.2). + +commit 27ffd7e03c05dd2083a10e5acebd2b385d729eeb +Author: Keith Packard <keithp@neko.keithp.com> +Date: Thu Jul 6 14:43:10 2006 -0700 + + GL proto version 1.4.7 needed for texture-from-pixmap defines. + + GLX_TEXTURE_TARGET_EXT and GLX_TEXTURE_RECTANGLE_EXT are defined as a part + of the new texture from pixmap GL extension in gl proto version 1.4.7 and + are now used by the X server code. + +commit d7a96dd6f18e54c26fc5881772d033ac078db3a1 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jul 6 17:39:14 2006 -0400 + + Switch the default mouse device on Linux to /dev/input/mice. + +commit 37838de62edc474f44c0a48bd56470a6c23f8956 +Merge: fd49a0d 8d07ee0 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jul 6 13:01:57 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + + Conflicts: + + hw/xfree86/os-support/bus/linuxPci.c + +commit 8d07ee070ecf0d403d9d27c80764d343b80af6f0 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jul 6 12:48:51 2006 -0700 + + Refactor linuxGetIOSize and linuxGetSizes. Eliminate the unnecessary + optimization in the search loop. + +commit 704e645207d88a2d0a372cf69f6abd778ed4c30b +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jul 6 14:22:33 2006 -0400 + + Remind dlloader that it needs to search the global scope as well as the + loaded modules. Fixes LoaderSymbol() on symbols provided by the server. + Spotted by Aaron Plattner. + +commit fd49a0dcc13280cf195bd6c7ee0f23d0840cb665 +Merge: e66e7b4 28b95fd +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jul 6 09:52:15 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 28b95fd9d1c2f078aaaac75c310a27b17c74a6fc +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jul 6 03:25:38 2006 -0400 + + Drop unused GL/include subtree. + + Woo, less Makefile's to generate. + +commit fc1a55671dceae0e2a701e044ff8203fae5eb1ba +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jun 29 04:35:45 2006 -0400 + + Implement glXCreateWindow and glXDestroyWindow. + +commit ee012588d28b468bd41da8d216210f8cb2bf8cb5 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jun 29 04:25:54 2006 -0400 + + Move __GLXdrawable lookup and creation into GetDrawableOrPixmap. + + Also refactors __glXSwapBuffers to use GetDrawableOrPixmap for + getting the __GLXdrawable. This patch paves the way for GLXWindows + with XIDs different from the X Windows they are created for, a + prerequisite for glXCreateWindow(). + +commit 8b5bc6a9ab487fdea754266b120c686d75d9e100 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Jun 29 00:05:01 2006 -0400 + + Drop global GLX error integer variables and use __glXError() instead. + + Also drop glxerror.h (__glXError is now declared in glxserver.h) + and global.c (last remaining globals are in glxext.c now). + + With this change we now support all GLX 1.3 error codes. + +commit 7cf3ec7b59223f15314a0629f122ecb796678421 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jun 28 17:00:23 2006 -0400 + + Move createDrawable from __GLXcontext to __GLXscreen. + +commit eea8efe4516750b2505b52ebc9f769f5e8a6f94c +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jun 28 15:59:01 2006 -0400 + + Add marshalling for GLX 1.3 requests. + + Also, hook up glXGetDrawableAttributes and glXQueryContext to existing + DoGetDrawableAttributes and __glXQueryContextInfoEXT. + +commit e66e7b48e15543f3753951a19376f0446759963a +Merge: a9d4842 eb35f81 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Jul 5 15:21:36 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit eb35f812a5b65adcc5f6cbb91b31b69cae5d7f3d +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jul 5 13:27:26 2006 -0700 + + add another file to .gitignore + +commit 863f5cc31b747bc9f2fcd6a9e20c613a11733bf4 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jul 5 13:26:34 2006 -0700 + + fix compiler warning in hw/xfree86/common/xf86Config.c + +commit f059b61ab3af25b03c704669eddb838d3ce4366c +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jul 5 11:47:25 2006 -0700 + + fix compiler warning about xnestRecolorCursor() not being defined + +commit cc3e99f747586f9d32622e5a682de39891b1fcba +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jul 5 10:13:19 2006 -0700 + + fix some more compiler warnings due to defines being declared differently + +commit 59836c0f2abee3339e1aa30dacadb82e477943d6 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jul 5 09:30:48 2006 -0700 + + fix wrong function pointer type in hw/dmx/dmxcmap.c + +commit 12563db59dd613ecc926e3bed9534152ebc0a2fb +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jul 3 12:52:27 2006 -0700 + + Revert "Optimize out computing a gradient pixel if the mask value is 0." + + This reverts cf46242e337481cd3b9b39d77dd621d2a63b11f9 commit. It wasn't meant + to be pushed to master yet, and doesn't work. + +commit 002e28c12c74aa63777f65cbfb382c2bfd0d6850 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jul 3 12:48:12 2006 -0700 + + Correct AGP memory deallocation argument on *BSD. + + This fixes leaks and eventual crashes with RandR resizing on Intel. + +commit cf46242e337481cd3b9b39d77dd621d2a63b11f9 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Wed Jun 28 18:35:59 2006 +0200 + + Optimize out computing a gradient pixel if the mask value is 0. + + Obtained from: kdrive CVS (DavidR XGL fb/ megapatch) + +commit a838fb70c52a829872680f6a2a2e7dd6d2dc9247 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jul 3 19:22:36 2006 +0200 + + Bump server version to 7.1.99.2 for gradient and repeat fixes. + +commit 25d871d98462f0481ee419295ddc94b8c79dc881 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jul 3 19:22:26 2006 +0200 + + Fix source picture filter check for multiple screens. + + Now, we only check for filter commonality if we're operating on a source + picture, and we compare the id (screen-independent index of the filter name) + rather than the pointer to the filter (per-screen state). + +commit 7106a77df37c06d2b5568eceeb9297096bff3137 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Sun Jul 2 12:41:35 2006 +0200 + + Fix bugs in support for new repeatTypes in XAA and EXA. + + EXA now won't pass pictures with new repeatTypes to drivers. We can add a flag + for them to support it at a later time. + +commit f5e92542a14f51029347b6476e4e4af69144930b +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Fri Jun 30 12:03:47 2006 +0200 + + Bug #7366: Fix crashes when setting filters on source pictures. + + Now, filters may only be set on source pictures when the filter is common to + all screens. Also, like SetPictureTransform, ChangePictureFilter is now not + called on source pictures. + +commit 6ef457913955d4289081c7d07d528963ccf5272c +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Fri Jun 30 03:01:14 2006 +0200 + + Bug #7366: Fix two crashes in operations on source pictures. + + A screen's ChangePictureTransform now isn't called when changing the transform, + as source pictures aren't associated with screens. Also, attempting to set + an AlphaMap to a source picture will fail with BadMatch just like a Window + would, preventing another crash. + +commit 50a3e1ad18c815a5adafee22beccdf970bae62d6 +Author: Rudo Thomas <rudo@matfyz.cz> +Date: Sat Jul 1 12:34:36 2006 -0700 + + Missing close parenthesis in one of the setuid() fixes. + +commit 124a81eb389dfa510ac07ca93ee17c4c9d6e56ea +Merge: d3d6c5f 179737d +Author: Keith Packard <keithp@neko.keithp.com> +Date: Sat Jul 1 11:12:50 2006 -0700 + + Merge branch 'origin' + +commit d3d6c5f4d05e0ca5b566e19657e0fe2b3898482a +Author: Paul Mackerras <paulus@samba.org> +Date: Sat Jul 1 11:10:18 2006 -0700 + + Bug #7381: Coordinates get wrapped in accelerated line drawing on pixmap + + XAAPolylinesWideSolid was adding the drawable origin onto each element in the + pPts array. Since the values got stored back into the pPts array, they got + truncated to 16 bits, causing the overflow I saw. This patch avoids storing + the coords back into the pPts array (and actually reduces the size of the + code too :). Now the 32-bit sum of coords + origin doesn't get truncated to + 16 bits, and the problem is solved. + +commit 179737d4a07ed10a734fe017b5680f8e78ffda96 +Author: Jens Granseuer <jensgr@gmx.net> +Date: Wed Jun 7 01:46:00 2006 -0700 + + Bug 7145: fix build with gcc 2.95 & other c89 compilers + + Move variable declarations to start of blocks as required by c89 + +commit a9d4842893b65232d61fe4c63f074d30e81021d2 +Merge: 66cac9b 6bd4c25 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Jun 30 11:49:29 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 6bd4c254396cb0f4e8ae21ff455ebb15cd9f4f10 +Author: Martin Bochnig <mb1x@gmx.com> +Date: Mon Jun 26 01:52:24 2006 +0200 + + Updated Solaris aperture driver to build on sun4v & amd64 kernels + Updated for Solaris 10 changes to DDI + +commit 66cac9b17498497d939bfb7a4075bcee5a485e5f +Merge: 7c4e540 54d9acd +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Jun 28 14:11:49 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit 54d9acd5113318274e291abab4554b8e678227df +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Jun 27 19:44:52 2006 -0400 + + Add damage tracking to GLX_EXT_tfp implementation. + + - Only update when pixmap content actually change; + - Only update the regions that acutally changed. + + This is a worthwhile optimization, but it doesn't completely remove + the bottleneck, as mesa still uploads then entire texture whenever + it changes. + +commit adfe8e7437ff739f54d1d074008e8cc0e3bcb4d3 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Tue Jun 27 21:49:00 2006 +0200 + + Bump server release to 7.1.99.1. + + This will be important for a couple of cairo workaround tests. + +commit 63c169e3b1f7d6a7375a414fcd50cce32358a525 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Tue Jun 27 04:11:47 2006 +0200 + + Fix MMX Saturate implementation. + + The code was expanding the source blend factor from the wrong channel. Fixes + cairo's clip-operator test. + +commit 7c4e54025345455f420cd2abaa7a40679689d3cb +Merge: 9d0a15d ff6b59a +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Jun 26 14:39:44 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework + +commit ff6b59a0dbadbe61a53e48c23965d3073d95791b +Merge: b3c8693 48c8715 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jun 26 13:02:33 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit b3c869304cd85af034aa9debaa874e29d14fcbe6 +Author: Peter Breitenlohner <peb@mppmu.mpg.de> +Date: Mon Jun 26 10:48:44 2006 -0700 + + Free small, one-time memory leak in xdmcp -from handling + + Part of Patch #6046 <https://bugs.freedesktop.org/attachment.cgi?id=6046> + +commit 48c871564d493203d434d5da015903399287f619 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jun 26 15:57:32 2006 +0200 + + Move EXA_PM_IS_SOLID() to the public API, since drivers will want it frequently. + +commit afb84c2fca56887b3bfe7aa93f337c49b087acdc +Author: George Fufutos <fufutos610@hotmail.com> +Date: Sat Jun 24 15:23:14 2006 +0200 + + Bug #6911: Check return value of exaGetPixelFromRGBA(). + +commit 930b9a069a425818d4e9965f53be7df1f4d7d422 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Jun 24 15:21:17 2006 +0200 + + Bug #6818: Avoid infinite loop in exaLog2() with negative arguments. + +commit 36756fdb2ddc154b406f664a6af0f38d26e6973d +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Jun 24 15:09:24 2006 +0200 + + Make sure <execinfo.h> is actually included when needed. + + configure only defines HAVE_BACKTRACE, not HAVE_EXECINFO_H. + + This could cause problems on platforms where the size of a pointer is greater + than that of an integer, see + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363218 . + +commit 4426215a6e99f84550aaac23ac9c2018668bfbc1 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Jun 24 15:02:56 2006 +0200 + + Bug #7213: Fix the XFree86-DRI extension for byte-swapped clients. + + These clients are by definition non-local and thus not direct rendering + capable, but they still need the QueryVersion and QueryDirectRenderingCapable + requests to find out cleanly. + +commit a195a3debca02572d9f7d7a9976b5bf67acc5d08 +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Sat Jun 24 14:54:52 2006 +0200 + + Fix byte swapping in some GLX requests. + +commit bc6cfde19887eff7a07dc739ffa29609fb55b83d +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Fri Jun 23 20:07:34 2006 -0700 + + Use correct OSNAME setting so we can find os-specific modules like libdrm. + +commit c7ac485a59709572307b9a4a9abacc52c7021b65 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Wed Jun 21 09:34:55 2006 -0700 + + Remove the default case from fbcompose.c switches which should cover all cases. + + Instead, stick the NULL return default case afterwards, so that the compiler can + warn us when we've got unimplemented cases. Removes some unimplemented and + unused 8bpp, depth 4 picture format names. + +commit 2cf1f39ca974c81a2f52d2f7509aa3d098a87176 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Wed Jun 21 09:30:59 2006 -0700 + + Add a manpage for EXA. + +commit 9d0a15dca56b14821cad474f9db9c332acb3b1e6 +Merge: 6c514ca d67fd10 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jun 22 16:21:10 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + hw/xfree86/loader/xf86sym.c + +commit 6c514ca14c2326c2cf82b73196429789d11e4a01 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Thu Jun 22 15:51:16 2006 -0700 + + Use XSERVER_LIBS instead of XORG_LIBS for -lpciaccess. The former is + only for libraries that are built as part of the xserver build. + +commit d67fd106968e371d8be3966ed5ecdd3c69f36e3a +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jun 22 12:47:51 2006 -0400 + + Add kdrive servers to .gitignore + +commit bf17c6dede1c0cf1edee10f2cc7e1e619b944d3a +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jun 22 12:24:09 2006 -0400 + + Drop libz from the server's link line, it was only needed for LBX. + +commit c0cb8d1fb80540e093da54da3ee2f55bdf139274 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 21 18:12:41 2006 -0700 + + Use XACE, not XCSECURITY to decide if SecurityLookup* are exported + +commit 3177dc498a955cd58cd6054a7c7e69724db4a59b +Merge: 3f19803 91dcac5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 21 18:06:06 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3f19803e0b1adc66e695f63f915b8dc85eb84215 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 21 18:05:51 2006 -0700 + + APPGROUP requires both X-ACE & XC-SECURITY now + +commit 91dcac5295486cc55a34ad91704bfa483bd31eeb +Merge: d8135eb 77c947b +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jun 21 20:49:30 2006 -0400 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit d8135eb9e414bf6957f64c5102ee0ef7c2404c6f +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jun 21 20:49:21 2006 -0400 + + Unbreak unbreaking the loader. Re-add the symbol reference lists so that the + linker will include everything it's supposed to. This is a terrible solution, + but ld semantics don't let you do anything better. + +commit f83cee0338eca095ad601374a87775be823a2565 +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + +commit 15c9002d68a7eeb02a6db1f231af7a18a3cf7512 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 21 16:24:20 2006 -0700 + + Correct ifdef - should be XACE, not XSECURITY + +commit 90af38fa0c46c2081d2becac262a614c26ba6ef1 +Merge: 3e098ef 77c947b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 21 16:23:31 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + Xext/appgroup.c + +commit 3e098efa35ba70ad4d5699af3130a3b02e1cb06e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 21 16:21:03 2006 -0700 + + Correct ifdef - should be XACE, not XCSECURITY + +commit 77c947b900faf34f425eef1549d8210c475e093b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 21 16:18:41 2006 -0700 + + Move Xserver internal API for appgroup from Xagsrv.h to appgroup.h + + (Since all use is inside the xserver module, might as well keep the header + in the Xserver module instead of in proto/XExt to allow easier synchronization + of updates.) + +commit aa131c51e06e735d7b54cadf51205f703a3de4ef +Merge: 1708b0c 77aa701 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Jun 21 14:39:52 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 1708b0c7d962b80073500eb1c483447bbf965bc9 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Jun 21 14:39:39 2006 -0700 + + Eliminate "ugly" spaces around parenthesis. Add const qualifier. + General code clean-ups. + +commit a3c26d01a16e4ae20a5d1acf9d888e95760c3da1 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Wed Jun 21 14:38:07 2006 -0700 + + Move declaration of "j" inside #ifdef block where it is used to + eliminate compiler warning. + +commit 40aafaf154ba8a2cba857689d1481be2d4a610c2 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 21 14:36:09 2006 -0700 + + fix a number of compiler warnings in os/* + +commit 77aa701e898c6525322cc4029d95167dd9f6e618 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 21 14:16:48 2006 -0700 + + add some function prototypes to hw/xprint/DiPrint.h as they are exported + +commit 865884d050e1778180f7677e15f9ee1625ea4bb2 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 21 14:16:28 2006 -0700 + + fix compiler warning in dix/xpstubs.c when XPRINT is not defined + +commit ed18d776f02e2ab235954501ef64936af9f9d909 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Jun 21 16:22:14 2006 -0400 + + Fix #2488 for fb too: sample pixel center when transforming. + +commit ea5e0eabd1303a55d8fc10f44d21a3d371ce8919 +Author: Matthias Hopf <mhopf@suse.de> +Date: Wed Jun 21 17:08:51 2006 +0200 + + Bug 4320: Fastpath corner case improvement for Composite. + +commit 9af315a9be19b48faa1249e0575cbe3d1e31dec5 +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + +commit f68ecfa482b2c2037f929710310c7b9ce6fe9291 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jun 20 19:01:34 2006 -0700 + + Add X-ACE to build system + + - Added --disable-xace to configure.ac and issue configure error if trying + to build XC-Security without X-ACE + - Added XACE #define to dix-config.h + - Added X-ACE sources to Xext/Makefile.am + +commit a46c06dab8392cf8012c7cc0b916de9a9e569671 +Merge: 49b368c d44b2a0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jun 20 18:40:18 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + Xext/appgroup.c + Xext/security.c + dix/devices.c + dix/dispatch.c + dix/dixutils.c + dix/events.c + dix/extension.c + dix/property.c + dix/window.c + os/access.c + +commit d44b2a0a57fb89741173c31676af0ccc822387dc +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jun 20 18:22:51 2006 -0700 + + Move Xserver API for security extension to securitysrv.h + +commit a54435946544a039fc333bb5e3438501d0d1ffc6 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jun 20 18:14:27 2006 -0700 + + Move Xserver API for security extension to securitysrv.h + +commit 49b368c0bb04816c4a3579071c596b2398cae3ec +Merge: 63f6e6b 481d401 +Author: Alan Coopersmith <alanc@alf.(none)> +Date: Tue Jun 20 16:22:39 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 481d4012e74d9b0e98911f0ae02700ecf4cfc5ac +Author: Alan Coopersmith <alanc@alf.(none)> +Date: Tue Jun 20 16:16:19 2006 -0700 + + Don't add -ldl to XORG_LIBS if it's not needed for dlopen + +commit 63f6e6bbfd0d3677e29621af982c9392ead98dd7 +Merge: 88ede2c 6df52fb +Author: Alan Coopersmith <alanc@alf.(none)> +Date: Tue Jun 20 16:03:34 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 6df52fb7745c185c0168060f69cc6b4f5315914e +Author: Alan Coopersmith <alanc@alf.(none)> +Date: Tue Jun 20 16:02:55 2006 -0700 + + Delete code that's been inside #if 0 since X11R6.7. + +commit 75398cff82b56c0a8fc301e84e2087f59a61a360 +Merge: 1f91b57 2b58685 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Jun 20 15:49:47 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + + Conflicts: + + hw/xfree86/loader/Makefile.am + hw/xfree86/loader/xf86sym.c + +commit 88ede2cec79281a43cecb43ee6dec65770f82530 +Merge: 227a319 2b58685 +Author: Alan Coopersmith <alanc@alf.(none)> +Date: Tue Jun 20 15:29:55 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 227a3193405147fbbee2971cc15bac92cc13285a +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Tue Jun 1 21:09:25 2004 +0000 + + Add XACE extension source files. + + (Copied from XACE-SELINUX branch in Xorg monolith CVS since these were never + imported to modular cvs or git trees.) + +commit 1f91b5726c721778de0627c0139100744db06934 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Jun 20 15:03:13 2006 -0700 + + Fix a compiler warning about varibles being used without being set. + + Add some const qualifiers. + + Remove some "ugly" space around parenthesis. + +commit 2b58685402e70f123e131fd8146e6083ff5214a4 +Author: Matthieu Herrb <matthieu@deville.herrb.com> +Date: Tue Jun 20 21:07:53 2006 +0200 + + Check setuid() return value. Bugzilla #7116. + +commit 4365d16c8629e824973ee0c357efdfbfd28b672c +Author: Kristan Høgsberg <krh@redhat.com> +Date: Mon Jun 19 22:13:22 2006 -0400 + + Pull over convolution filter fixes from xgl-0-0-1 branch. + + Cherry-picking patches: + + 8a5ea68800b9d7dca90ff4e573ad8533852f1ea3 and + 4d755fe14274a7293748ce9aa666ab85df6297c5 + +commit f818e0ab60da3779ab2602c6e6d3ff261b50917e +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + (cherry picked from 0106715000196c7b349a0b4494b61545f0f5e138 commit) + +commit 0707eb33d6826e1300a905edea28c12134600b12 +Merge: 37f0ae0 98d17bb +Author: Alan Coopersmith <alanc@alf.(none)> +Date: Mon Jun 19 17:09:51 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 37f0ae02457bd22b27f8f30a373e5cb19f2fbaea +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:04:52 2004 +0000 + + Replace XC-SECURITY code with XACE security hooks + (cherry picked from 8526cd6395490b03b279f1962df777fb0e4a9878 commit) + +commit 98d17bba716619e3402bd74c7c3e1c01d055ef6e +Author: Alan Coopersmith <alanc@alf.(none)> +Date: Mon Jun 19 17:07:59 2006 -0700 + + Tell git to ignore emacs *~ droppings and git .msg files + +commit 569c808a2375be71f835ee8693605487484bd22e +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jun 19 16:42:09 2006 -0700 + + Fix crash when using PICT_x4a4 by supplying an appropriate fbFetchPixel_x4a4. + +commit 8d9ccc90a54c786ca4ba5620ab0a965e3f3bc8ea +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:15:41 2004 +0000 + + Add XACE extension + (partially cherry picked from 8d4f21ab53c44ca48501d6211ea6db0c0b8af916 commit) + +commit 55426650417df4ec22ea0e2a67f6074f0ac1d54e +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jun 19 15:04:46 2006 -0700 + + Clean up gcc warnings from picture format CARD32 -> enum change. + +commit 520c80f4b807ae6419e70fe2b524532465b509ac +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jun 19 14:40:27 2006 -0700 + + Don't forget to step the rows when verifying the equivalence of fb/sys areas. + + This is only used by fakexa, but we would have missed some errors without this + fix. + +commit e793f0eeee3e9c83b6a7b50d451fb6db12839087 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jun 19 14:06:02 2006 -0700 + + Correct component ordering when fetching [ax]4b4g4r4 pixels. + + Noticed by: rendercheck + +commit e1672a12eb70836a2ceec803d505294897ae8cd2 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Mon Jun 19 13:20:56 2006 -0700 + + Convert PICT_* names from #defines to an enum to aid in debugging. + +commit 9742d55c820a260a42a4537502295931d4529deb +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Mon Jun 19 14:40:14 2006 -0700 + + update .gitignore to handle Xprint move + +commit d97a21acb878bc4e5e6542912fbd820503bba312 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Mon Jun 19 14:36:54 2006 -0700 + + fix compiler warnings in hw/xfree86/i2c/fi1236.c + +commit 29c78321e86956c4ce0c1c899d82557f927e04da +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Mon Jun 19 14:36:41 2006 -0700 + + fix compiler warning in hw/xfree86/i2c/tda9850.c + +commit 9f2793551f335e5fb08990fc8bb9e05e0ffb68d5 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Mon Jun 19 11:50:47 2006 -0700 + + fix compiler warning in hw/vfb/InitOutput.c + +commit b20ae5ddb7682bafcee6f8bf0c8208a3f70b882b +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Mon Jun 19 11:38:52 2006 -0700 + + fix compiler warnings in hw/xfree86/xf4bpp/ppcGC.c + +commit 4d258f31967141e3c4a6e4abbef89ffa717e85aa +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Mon Jun 19 11:27:47 2006 -0700 + + fix compiler warnings in XTrap/xtrapdi.c + +commit 870cecb72c2cba44dc64cb202917453603c8f287 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Mon Jun 19 11:22:42 2006 -0700 + + fix compiler warnings in XTrap/xtrapdiswp.c + +commit a28652f9c35fbc009245382a5cc2a022f42366fc +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Mon Jun 19 00:57:18 2006 -0400 + + Another round of loader sense-beating. Remove the (unused) server export + lists, a really bad hash table, the last vestiges of the other backends, + and some miscellaneous cleanups. Good for dropping 300k from the size of + the built server on x86. + +commit 98a602fab1f307a07a96868d7dae12b6f8d7f405 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Sun Jun 18 23:54:04 2006 -0400 + + Don't bother building RAC as a module, that's just absurd. + +commit 76aaf7eae7409162c5ed2963f2e27d019cb30263 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Sun Jun 18 19:47:29 2006 -0700 + + Add a couple of (doxygen) comments I wrote while looking at modesetting. + +commit 6aaf0e5b581b06fc73e56f863a26cd9d684eb9c0 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Sun Jun 18 19:12:15 2006 -0700 + + Add options to disable EXA acceleration for Composite/UTS/DFS, and always print + + out how much memory EXA is managing for offscreen pixmaps. + +commit 21ef7e17ef6dca177461c9438b9df707a4d664a2 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Sun Jun 18 18:57:55 2006 -0700 + + Add some missing .gitignore stuff for Mesa symlinks and other generated files. + +commit 71fbda8049f64c7fefae8ab817fb5f37ee2ee134 +Author: Adam Jackson <ajax@theobromine.nwnk.net> +Date: Sun Jun 18 21:07:28 2006 -0400 + + Xprint/ -> hw/xprint + XpConfig -> hw/xprint/config + +commit 868e2cab706e317618646e064b0559d4e68c7b32 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Fri Jun 16 10:17:51 2006 -0700 + + Add explicit dependencies (Xorg_DEPENDENCIES = ) on the internal libraries + (such as libcw.la) that we link into the server, causing it to be rebuild + automatically when they're updated. Some system libraries are included, but + don't appear to cause any harm. You would think this would be automatic... + +commit 53f74b6aa95fe57fda45fd8a051595e772f00402 +Author: Eric Anholt <anholt@FreeBSD.org> +Date: Fri Jun 16 10:14:30 2006 -0700 + + Bugzilla #5120, #7246: In CW's GC ops, validate the backing GC against the + backing drawable if the serial numbers differ. Fixes crash in XAA which + occurred when the DDX bumped the serial number on the backing drawable and + expected it to get re-validated, and we didn't because the wrapped drawable + hadn't been bumped. + +commit 72ac20c0e878ad48ff61f7e846cbf1005a4eb435 +Merge: fc3e814 b900883 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Tue Jun 13 21:13:02 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit b90088321e6ef84970aa97d7c851af93f49bf4b7 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Mon Jun 12 15:22:31 2006 -0700 + + Add arrayobj.c to the Makefile as well. + +commit f9f33b72e34eaeccea2a20f4a3dd68c2dbefc90e +Author: Michel Dänzer <michel@tungstengraphics.com> +Date: Mon Jun 12 20:19:11 2006 +0200 + + Track per-drawable damage to minimize UTS and DFS transfers. + + Based on work by Eric Anholt. + +commit 6060b612de6b41f872d034c6130770c1d189d0a3 +Author: Eric Anholt <eric@anholt.net> +Date: Mon Jun 12 20:12:31 2006 +0200 + + Provide option to report damage after operation is complete. + +commit fc3e81473a98d3b932faa73c0c01c21366a48a9e +Merge: 4bedaad 041ef23 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Mon Jun 12 09:41:06 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 041ef23192b193b87f6cfc3e74e2e77f9f47cd4b +Author: Ian Romanick <idr@localhost.localdomain> +Date: Mon Jun 12 09:39:18 2006 -0700 + + Add new Mesa files arrayobj.c and arrayobj.h. + +commit 4bedaad17dc75dfbada91f47e1007a8c090300a9 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Mon Jun 12 09:29:05 2006 -0700 + + Add new Mesa files arrayobj.c and arrayobj.h. + +commit 4e3c9ab8c90d474a2224dbfa0807bc01fc012f7c +Author: Ian Romanick <idr@localhost.localdomain> +Date: Fri Jun 9 16:56:54 2006 -0700 + + Remove some static declarations for things that were removed in + previous commits. + +commit 8b6596b1e1864dd79a3c53ee3ceb7a8e9bdb6ec7 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Fri Jun 9 16:08:06 2006 -0700 + + Move probe_devices_from_device_sections, + add_matching_devices_to_configure_list, and check_for_matching_devices + from xf86Helper.c to xf86Init.c. These functions are only called from + a single place in xf86Init.c, so it makes sense for them to live + there. They were originally in xf86Helper.c because they evolved out + another function that was already in that file. + +commit 7810d87cd6ae9316d88f6a2e7696deb8837cec27 +Merge: dcfaa9f caad8b7 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Fri Jun 9 15:16:50 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit caad8b724b97074e41de447fe77dda189f287a26 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 11:24:57 2006 -0700 + + fix compiler warnings in record/set.c + + (note this only fixed up the function definitions for the static functions + which can not cause any abi incompatibility) + +commit 51489bb5ed86cb6aa07e26a13618765c29f913e4 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 10:59:47 2006 -0700 + + more .gitignore updates + +commit c4d251bd3e88cf8dfd6872537dbe30c07344b196 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 10:46:18 2006 -0700 + + updated .gitignore with more pre-generated files + +commit 9f31ef83be61a900c701fcbc9a43ffae40ca7005 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 10:44:46 2006 -0700 + + fix compiler warning in hw/xfree86/loader/loaderProcs.h + +commit 490ffc205a7714145cac0c63efeb6374ea28141f +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 10:44:25 2006 -0700 + + fix compiler warning in hw/xfree86/loader/loadmod.c + +commit 6119845d1ff832ea2b7c9cbe7ed6c6637cdcf305 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 10:14:08 2006 -0700 + + fix compiler warnings in hw/xnest/Keyboard.c + +commit 1a7335ff932baa59a3283c50dd6007d81989b7e3 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 10:02:08 2006 -0700 + + remove unneeded externs from Xprint/ps/psout.c + +commit 9583859d538394e98ac1f38b8e6f0997e321621d +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 09:59:22 2006 -0700 + + remove unneeded "extern" in Xprint/ddxInit.c + +commit cb9e29c184474edd75645e3b52e22a097a242e40 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 09:54:50 2006 -0700 + + removed unneeded extern in Xprint/ps/PsWindow.c + +commit 96c19a3ec1b7e43782d373b8015fa0ca24cb4f5b +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Fri Jun 9 09:51:28 2006 -0700 + + put function prototype for ShapeExtensionInit() in proper place + + based on FIXME in mi/miinitext.c + +commit dcfaa9f4f8fb10b75be50c9a49ccd88caf6d0f6a +Merge: af9afe4 576e6fb +Author: Ian Romanick <idr@localhost.localdomain> +Date: Thu Jun 8 15:03:00 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 576e6fb1124a47493371210adf99d6f2076e72c5 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jun 8 17:49:02 2006 -0400 + + Bug #7120: Multimonitor (non-Xinerama) support for xwin servers. + (Tom Whittock) + +commit d42cf4a2a4980fdd29fb15c4fd8fddda67b36256 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Thu Jun 8 17:46:53 2006 -0400 + + Bug #7121: fix clipboard handling in Xming (Colin Harrison) + +commit af9afe4cc50df973bea2293a803f7dfdefaa6411 +Merge: caffac3 3930da3 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Thu Jun 8 11:37:09 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 3930da3f6209312dd0f10aba0b16ef45996a07fe +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:27:29 2006 -0700 + + fix compiler warnings in Xprint/ps/psout.c + +commit c496a3b9c981dc079fcc6c0ac4db3aa912b3dcf1 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:23:53 2006 -0700 + + fix compiler warning in Xprint/ps/PsImageUtil.c + +commit ea24b5a25c2544f3b3de6480da125edb23a6b3a9 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:22:01 2006 -0700 + + add proper function prototypes for Xprint/ps/PsCache.c to Xprint/ps/Ps.h + +commit ee2bb4d1929e20436cf0e830ece02fe07db2d524 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:15:34 2006 -0700 + + fix compiler warnings in Xprint/ps/PsArea.c + +commit 92303d534a91cb0ea30e4cd0f639efd70b9739b4 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:12:16 2006 -0700 + + fix compiler warning in Xprint/ps/PsGC.c + +commit cf6169f9e99e6e8ab264f284cfa13cb379b36207 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:09:56 2006 -0700 + + fix compiler warnings in Xprint/ps/PsFonts.c + +commit 1abc7f96edf37a1e2c766b9cdba7fc9b2cb06d19 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:06:51 2006 -0700 + + fix compiler warnings in Xprint/ps/PsInit.c + +commit 2dc291384c550badf55542ae645240e166676848 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 11:04:40 2006 -0700 + + fixed compiler warnings in Xprint/ps/PsPixmap.c + +commit aef092e0290143c2b8b1cb98fdf55c9630032aaf +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:53:17 2006 -0700 + + fix compiler warnings in Xprint/ps/PsPolygon.c + +commit 511b231ded61159ebd70cab020ca1ca003fd0784 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:41:34 2006 -0700 + + fix compiler warnings in Xprint/ps/PsPrint.c + +commit 35fccb0068e8d73d1e6a16aefdc771506e620f83 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:40:24 2006 -0700 + + remove some compiler warnings in Xprint/ps/PsText.c + + Note that one of the existing warnings is pointing out a + real bug (uninitialized use for fontPage in PsPolyText16()) + if anyone really cares about this code. + +commit caffac38432009e8dc01e7d3e72a7fa6fba2f078 +Merge: c5b3aa1 9fa7372 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Thu Jun 8 10:38:43 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 1ac30947f4a222ba78558eddf8e5f03cec31f613 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:35:18 2006 -0700 + + fix compiler warnings in Xprint/ps/PsWindow.c + +commit 9fa73721f0c3df73e508da909a5665f47a54cb57 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:27:28 2006 -0700 + + fix up EnableDisableExtension() and EnableDisableExtensionError() prototypes + +commit c405659626477f2009603d8c0e381b8b62277bb6 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:19:24 2006 -0700 + + comment out QualifyName in Xprint/Init.c which is not used anymore + + If someone else wants to delete this function, that's fine with me too. + +commit a940b851faba569e36983f7885aefa72f7bf2ade +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:17:53 2006 -0700 + + fix function pointer warning in Xprint/Init.c + +commit 9e0c82386ae389bcc296a5ad44e996790b033ad3 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:16:37 2006 -0700 + + fix already-defined warning in Xprint/Init.c + +commit 40fb7eecaf14a76f35ac2dc350ad2fffdaf6e0d0 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 10:11:17 2006 -0700 + + fix noDamageExtension warning in Xprint/Init.c + + Also took out duplicate definition of this variable in mi/miinitext.c + +commit 494895e0fbbf0a71bc535c0a2358c9db54c95c5a +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 09:43:44 2006 -0700 + + Properly define dispatchExceptionAtReset to fix compiler warnings + +commit d90eecf40ea768b2bf6340f15bb0af9dab2f3cf3 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 09:11:41 2006 -0700 + + add some missing function prototypes to Xprint/AttrValid.h to fix compiler warnings + +commit bccde1609153dee93f6fe5a138fc0c0f2fe08212 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 09:01:59 2006 -0700 + + fix incompatible pointer warning in Xprint/ddxInit.c + +commit 60bd8893d50ed1da9b94f4b96a07ea432e23f467 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 09:01:21 2006 -0700 + + Properly #ifdef out ddxBeforeReset() to fix compiler warning + +commit ac21e6a594eac69101aa8920d70a9d60412b57f6 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Thu Jun 8 09:00:42 2006 -0700 + + remove unused variable warning in Xprint/ddxInit.c + +commit 71dd44b0ad617dd36ce4ed328f9e1e8c5ef713a5 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 19:17:26 2006 -0700 + + Fixed up most "warning: function declaration isn't a prototype" warnings from Xprint/ + +commit 839305bac98856a2bb1d96691e4dcf49db229f90 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 19:12:23 2006 -0700 + + Remove unused variables from Xprint/attributes.c + +commit c5b3aa120bf96ee169d07c33a2698499944a1624 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Wed Jun 7 17:46:23 2006 -0700 + + Added a comment about some suspicious code. + +commit 50112dfcc82dd476727fa453b9e3d1852e06d678 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Wed Jun 7 17:46:05 2006 -0700 + + Fixed severly broken calls to pci_device_find_by_slot. I mis-read the + tag bits when I originally coded it. I mistakenly thought that the + original code masked off the PCI function bits, so I just always + passed 0 as the function. That was a mistake. + +commit f9e7128d948a0b62e6f03295305e0080d9233fd8 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Wed Jun 7 17:44:06 2006 -0700 + + Added missing include of Pci.h. This caused the server to terminate + when the symbol PCI_DOM_FROM_TAG couldn't be resolved at run-time. + +commit 23182315f34e3a0065739b43b15d4560e75b41a1 +Merge: bc05158 757f40f +Author: Ian Romanick <idr@localhost.localdomain> +Date: Wed Jun 7 17:03:48 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 7a40ac2585028860730ffcd333eb3fe9de63680c +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 16:23:45 2006 -0700 + + remove a bunch of unused variables in Xprint/Init.c (fixing the compiler warnings) + +commit 163980138cc0bfc9124456781b3dc45a49e2a129 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 16:11:20 2006 -0700 + + remove some unused local variables in Xprint/Oid.c + +commit 8e41640db884a4633b598d0a52b269e6547c8bf0 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 15:56:43 2006 -0700 + + add bison generated files to .gitignore + +commit 78f4ab6b89fca3086b9c9471b40c11c23fbb6142 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 14:12:40 2006 -0700 + + Fix compiler warning about undefined ReinitializeRootWindow function + +commit 757f40fca50a99377e437949ee77b983c8cd6087 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 14:09:13 2006 -0700 + + updated the .gitignore file with more auto-generated files + +commit bc05158a5ab00c548e4b04b5638afe07bc702260 +Merge: 46f55f5 cc46580 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Wed Jun 7 14:09:12 2006 -0700 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver + +commit 46f55f5dead5d70cdff30531d80a72f6be042315 +Author: Ian Romanick <idr@localhost.localdomain> +Date: Wed Jun 7 14:09:02 2006 -0700 + + Initial batch of changes for PCI rework. All future changes will be + tracked individually. + +commit cc465800ddca5fb6c9ec09fdfa8f1f05359cf396 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 14:03:35 2006 -0700 + + Fix compiler warnings about SetVendorRelease and SetVendorString + +commit 785c9789704ed142fe98cd17b5995e4a95b7141f +Merge: 21ebcfd 36d786e +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 13:20:21 2006 -0700 + + Merge ../xserver + +commit 36d786e9f051c5c95c1cc8c098c84e118ed3cc85 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 12:47:50 2006 -0700 + + add more files to .gitignore + +commit 8f5aa38abf1158a789b5528df9d98826342e30cf +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 12:33:44 2006 -0700 + + fix compiler warning about XKB_IN_SERVER redefinition + +commit 101ae616962c355388722e05ab8413eb5f5c3402 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 12:06:22 2006 -0700 + + Add PanoramiXExtensionDisabledHack to globals.h as it was missing. + +commit e5b72bd9c6fb06640a5de4031be0dc9b04b4b215 +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 12:05:39 2006 -0700 + + Remove 3 compiler warnings in the Xext/xevie.c file + +commit e3c11f66516521959127b9ab8fd88cc4c954f5bb +Author: Greg Kroah-Hartman <gregkh@suse.de> +Date: Wed Jun 7 12:05:01 2006 -0700 + + Added first cut at a .gitignore file to make using git easier. + +commit 21ebcfd7027b2a6182d4065e56a2ef814f5181ae +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jun 7 14:17:31 2006 -0400 + + Demolish now-unused loader functions. + +commit f90761b06eaa5fa44fe85289e54eed5f47eff3b9 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jun 7 13:58:24 2006 -0400 + + Add a token for EDID-supplied modes. + +commit d00aa6b8559d3e5f70c6558ce0abd12f7d758491 +Author: Adam Jackson <ajax@benzedrine.nwnk.net> +Date: Wed Jun 7 11:44:36 2006 -0400 + + Delete a (now misleading) message from the crash handler. + +commit f8535edec736cf19740bd41ed2adfe531f2c26ac +Author: Keith Packard <keithp@neko.keithp.com> +Date: Tue Jun 6 10:29:34 2006 -0700 + + Remove ChangeLog file. + +commit 8444bb77c91cf8a23d32b3cc9749e2a3d3f9f9eb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Jun 5 20:22:06 2006 +0000 + + When we can, bound the maximum number of PCI devices to attempt to scan, by + the number found on the system. Only implemented for Linux right now. + +commit 11cf4d2fde9219e8d6ca427acae89a0c9f5d71b1 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 5 07:15:23 2006 +0000 + + Update AC_DEFINE_DIR to version compatible with CVS autoconf which requires + double eval to avoid leaving ${prefix} in output + +commit 52fc7c8dc70226cc7f03454e9be86a627672295f +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jun 5 03:00:24 2006 +0000 + + Ensure all *ModuleData symbols are marked _X_EXPORT. Start removing + XFree86LOADER ifdefs, non-loadable hasn't been supported for a while + now. Remove completely gratuitious REMOVE_LOADER_CHECK_MODULE_INFO + ifdefs surrounding a call to a function added in XFree86 4.1 (!). + Miscellaneous static markings. + +commit d22582dc5a070f72d4653e24d1e4ebe4a112276e +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Jun 4 16:13:26 2006 +0000 + + Remove a stray LBX reference. + +commit ddc6b99505e227f99585b8c2392da524022a73e6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jun 3 11:24:33 2006 +0000 + + Bump to 1.1.99.2. + +commit 4fd668940f2155c4b06d24b6da8bcccd01f66f4c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jun 3 10:58:37 2006 +0000 + + Bug #6619: Fix disappearing hardware cursor. (Colin Harrison) + +commit ee71cb61f8da29bcf36ea4b199d629e34f89b119 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jun 3 10:54:38 2006 +0000 + + Bug #6956: Fix crash when removing session leader before its children. + (Rich Coe) + +commit cd384af3058fe15077c57eccdffed3b61e261e7f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jun 3 10:50:23 2006 +0000 + + Completely remove relocation pointer table. + +commit 8e8c6faecddbe014d8760822e1f705b43a00fa33 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jun 3 10:48:37 2006 +0000 + + Add support for kFreeBSD systems. (Robert Millan, Aurelien Jarno) + +commit 5b703f847d166176920077c1e6ba1d9559fc8481 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jun 2 12:05:32 2006 +0000 + + Fix type confusion. + +commit 56f21bda1ce95741c88c423b60bd709eef26eb12 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 22:30:52 2006 +0000 + + Bug #6583: Only open /proc/bus/pci/devices once. (Bill Nottingham) + +commit a9ed5a87902a839a5a135af03db78f113b18bd86 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 22:06:41 2006 +0000 + + Kill LBX, too. + +commit df6da66525836d515f408a82f1a13ca5251ff0f7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 20:56:39 2006 +0000 + + Simplify the unsupported XI function list. + +commit 97203f1cf6e5b7c6389f69cbb1b75ac675d09531 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 20:41:21 2006 +0000 + + Clean up a warning, and remove excess multiple-suffix code. + +commit 6d594ebc667afd404556ec3e108c810946b20ac5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 20:22:39 2006 +0000 + + Ditch more alternate-loader braindamage. + +commit c9468177486833d521ec62c7b0266b4be8200de7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 20:18:30 2006 +0000 + + Kill a.out, COFF and ELF loaders with FIRE. + +commit a3a4221495dfe4cc0a3874a08dd5364ef45a7f2e +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jun 1 19:53:06 2006 +0000 + + Add bitmap to the ignored module list. + +commit ee689c104287140db38bbd26959ab1b4847c168e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 19:49:55 2006 +0000 + + Ignore requests to load GLcore and speedo. + +commit 07c731a2bc21e6b98f28a2c0ebc42f01b67b824b +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jun 1 19:37:53 2006 +0000 + + Bug #5089: Die, libbitmap, die! + +commit 32be08ba7242da74de5defd6a4dcb536a273f57a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 19:22:38 2006 +0000 + + Remove horrendously ugly DDX backward-compatibility. + +commit d81edb9e00680e3c0001f343fa1d0c310b86cb93 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 19:22:01 2006 +0000 + + Forgot to remove this one too. + +commit a73e0f8cdfec1c9199ffe696146ba7d677c4c10d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jun 1 18:47:47 2006 +0000 + + Die XTESTEXT1, die! + +commit fc5ca97284ef237a91f6adb433148ff57a673c08 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue May 30 22:56:36 2006 +0000 + + Powerpc machines also need ioperm_noop.c + +commit 07b168c8d8b2d79a4e7cf8dc5124eafc0f2bbcd0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue May 30 16:10:59 2006 +0000 + + Properly document the DPMS, SyncOnGreen, and TargetRefresh options. + +commit 107defd920d9b1eb52b15e8ca8665bc48bb933d6 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon May 29 19:53:18 2006 +0000 + + Remove superfluous definition of tfp tokens. + +commit fd8bde8bb0f9d796b3464973b53285c0a6d22a31 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon May 29 11:14:03 2006 +0000 + + Remove -xkbmap argument. + +commit db0680cf70b8367e1f8a7fff9c0f6ec414db0542 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon May 29 09:26:32 2006 +0000 + + Minor #include cleanups. + +commit c38aab293a06f43c04f14223f94f822d91d73396 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat May 27 23:15:05 2006 +0000 + + check buffersize before reading next char, fixes the "mouse stuck at left" + bug (bugzilla #3113) for BSD systems using wscons. (Dale Rahn). + +commit 2102fdd0a58e18aeaa842b2ec73b6071970fafb7 +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Fri May 26 00:12:18 2006 +0000 + + RGB color database and XErrorDB install to "share" not "lib" by default (by + app/rgb and libX11). + TODO: They are customizable, so maybe cpprules.in should be extended. + +commit 354086d7e8e13fc7acbcc6603ca2a03c8cc806ee +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Thu May 25 23:32:33 2006 +0000 + + Don't do fixup_video_driver_list if no drivers. (I had signal 11 and core + dump when drivers not installed yet.) + TODO: fix fixup_video_driver_list to handle NULL argument. + +commit c6b1cff43238deded11dc58945778aec3d844598 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Thu May 25 13:27:42 2006 +0000 + + update to build against Mesa CVS HEAD (Carlos Eduardo Rodrigues Diogenes). + +commit 99724c16c9c58eb3e20ba91c79464747b8ee3fcf +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Thu May 25 10:14:39 2006 +0000 + + typo + +commit 5c7aef148de23f39027fda647bbb53bb5b992683 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Thu May 25 09:57:47 2006 +0000 + + Don't destroy a pixmap twice on server exit (bugzilla #4247). + +commit 693079442377daa2dc48bf318a0d7dd256cb2738 +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Wed May 24 22:58:03 2006 +0000 + + NetBSD also has curses.h instead of ncurses.h. (TODO: Maybe instead of + checking for SCO, UnixWare, Sun SVR4 and NetBSD, the curses.h versus + ncurses.h should be tested in configure.) + +commit 9477e5e0be04f4f6fa311de8b3693fbc8a082fbf +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Wed May 24 22:43:13 2006 +0000 + + On NetBSD, add -li386 for i386 and -lx86_64 for x86_64 to SYS_LIBS. (x86_64 + on NetBSD not tested.) + +commit b3031532ca96b22e81863202efb8bbcb9d701fac +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Wed May 24 20:11:38 2006 +0000 + + Remove tolower() which was missed in the _XkbStrCaseCmp/strcmp changes. + +commit eb696f72a0819edef550bce9ff55730c02f70452 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue May 23 16:17:09 2006 +0000 + + Add AC_SUBST([SOLARIS_ASM_CFLAGS]) that I forgot when splitting them out of + the XORG_CFLAGS. + +commit bc0c56c407117d1545e20d21f7d30eb3472d618b +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon May 22 15:47:56 2006 +0000 + + Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state + they were in prior to the fix for #6438. Based on a patch from Andy + Ritger. + +commit cc3b882bd141218052cdde0144fc2a707ceee83d +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat May 20 00:55:44 2006 +0000 + + Update to 2006-05-19 snapshot + Remove entries now present in pci.ids + Regenerate from updated pci.ids & extrapci.ids + +commit 0b2c2b6bba5b578d5f0ac2d709d5d2ce7cb32bef +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri May 19 20:29:47 2006 +0000 + + Remove dead DPMS timer functions from the installed headers. (Fredrik + Höglund) + +commit deebf6bd51117c01a3217f134bd952481b9e41ab +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu May 18 23:52:51 2006 +0000 + + Bug #4139: Fix a BAR remapping bug that could lead to IERR and system hang. + (Egbert Eich) + +commit 91239d83f4e27835cf871348b5ff6c892bd4f4f4 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu May 18 23:52:41 2006 +0000 + + file getemptypci.c was initially added on branch server-1_1-branch. + +commit c11cfcfaffc79be5686c666f881c4c08f69e1b86 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu May 18 23:48:57 2006 +0000 + + Bug #6377: Ignore disabled BARs, and allow matching BARs aligned to less + than 16 bytes. (Felix Kühling, ATI) + +commit fa9a49a92db52de968d7147c71c6b9a8fd480f1e +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu May 18 18:18:41 2006 +0000 + + Bug #5877: Avoid burning CPU when acpid dies. Require acpid to be running + for ACPI support on Linux. Minor errno handling fixes. (Valery + Inozemtsev, Adam Jackson) + +commit 7893dadb2f6df218a4f4ea30a41c1aa9838da1f0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu May 18 14:39:59 2006 +0000 + + Bug #6827: Fix texel fetch in fbFetchTransformed to avoid crashes. Still + not 100% correct, but better than 7.0. (Radek Doulik, Matthias Hopf) + +commit 2892dd6d2e34957650ef1630a94d471dfa71f888 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed May 17 16:20:03 2006 +0000 + + Make Xv symbols conditional. (Enrico Wiegelt) + +commit a317bf482257f0e1b612dec7961fdfa564f0b9f2 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed May 17 15:00:18 2006 +0000 + + Make DBE support conditional. (Enrico Wiegelt) + +commit 321dbed5f5a857a23525167ab85d4d7699429132 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon May 15 18:27:18 2006 +0000 + + Bug #5209: Fix APM/ACPI support, again. (Michel Dänzer, Valery Inozemtsev) + +commit dd38d3bd673cf830c2cd591fe1245909aa729892 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun May 14 16:22:24 2006 +0000 + + Don't use AM_CONDITIONAL inside shell conditionals. Bugzilla #6916. + +commit 6558ba4e62dba99f2a4d830f1c16f8d1c255b316 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri May 12 21:53:28 2006 +0000 + + Fri May 12 17:51:26 2006 Søren Sandmann <sandmann@redhat.com> + Keep track of the previous item and update its next pointer when deleting + from the linked list. + +commit 9e239a0df7ededb50de091e5271cbfddd2b683c3 +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu May 11 11:23:43 2006 +0000 + + Bug #5796: Wrong fastpath selection for repeating sources. + +commit 9db5d2dfc33e384ea4db1b7cbc377e0b05cfb3ff +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu May 11 10:18:08 2006 +0000 + + Bug #4320: Improved XAA Composite fastpath. + +commit 9a2a63ca3ff30d15e82a29e75a3720ba5b446978 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed May 10 15:44:27 2006 +0000 + + Bug #3561: Crash fix in the Record extension. (Paul Anderson) + +commit ab1a0249ba5e3174f18a1db212bc511fd7d74cb0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue May 9 22:36:01 2006 +0000 + + Bug #6867: Yet another Render crash fix. (Michel Dänzer) + +commit 24310f827b71009c7510a674d2f92ced89847e37 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue May 9 18:12:50 2006 +0000 + + Revert accidental commit + +commit 86ffb46358965509aa3ee536f15cb5a4e5e04426 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue May 9 18:04:29 2006 +0000 + + Bug #5209: Re-enable building APM and ACPI support. (Michel Dänzer) + +commit b46d6a44fa97a3e66de828385026b7f84d9e59b8 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed May 3 23:45:16 2006 +0000 + + Make Xephyr build on Solaris: + Add #include <sys/file.h> on Solaris for FNONBLOCK/FASYNC definitions + hw/kdriver/linux/Makefile.am Move agp.c & agp.h to KDRIVE_HW_SOURCES since + they're not needed for Xephyr-only builds + Add -lrt to XEPHYR_LIBS if needed to get nanosleep(). + +commit fc91ca069dd55490b99b096f029e0864b049120c +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed May 3 17:50:10 2006 +0000 + + Redact a few mentions of speedo font support. + +commit b9a9cf618566bdd796556b8a1f31949f66184352 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue May 2 14:09:30 2006 +0000 + + Typo in ALLLOCATE_LOCAL() arguments, causing mis-computation of the buffer. + Bugzilla #6642. + +commit 1e8a594957d84a37e66183e9c0cb9d42b62bdb24 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue May 2 01:37:25 2006 +0000 + + Fix Solaris build with Sun compilers to work when exa is built before + hw/xfree86/os-support/solaris (as it is by default now). + +commit 724dbc2f8bbe2f21bf16f20ca7b8bb555516626c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue May 2 01:30:37 2006 +0000 + + Use min() [defined in include/misc.h] instead of MIN() [not defined in any + Xorg header]. + +commit ad124742ae2a265a54a4a7ac91709ec6fd6ced34 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Apr 30 20:33:27 2006 +0000 + + Remove stray mfb/cfb references. + +commit 291e89d4f2a4bb3177b2dfe6421680e23f120b8e +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Apr 30 19:16:14 2006 +0000 + + Remove NEED_LINEHELPER BC cruft for pre-R6 DDXes. + +commit fdcacc5a4bc1d6cb7347fc66041a9c686c5c74d1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Apr 28 03:27:12 2006 +0000 + + Add Polylines and PolyPoint acceleration as well. This is primarily to + clean up fallback debugging output, so I can focus on more imporant + cases. Performance is comparable but without hardware stalls, and + passes Xlib9. + +commit 005529a1c9c9e78f06565dff081f03b74988081e +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Apr 28 03:26:30 2006 +0000 + + Correct some bugs causing performance issues in the "Smart" scheme. + +commit 8738bc295bba229e36d064713e0c28aa8720c494 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Apr 27 20:27:27 2006 +0000 + + Improve EXA fallback debugging output to include the locations of pixmaps. + This is being used in tracking down recent compositing performance + regressions. + +commit 83b061776a57025076fc26d6d01fe2e049c2243b +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Apr 27 19:17:34 2006 +0000 + + Add trivial PolySegment acceleration for 0-width horizontal/vertical lines, + which still happen somewhat frequently and were cluttering up my + fallback debugging output. x11perf says it's a major performance win in + those cases (though probably irrelevant), and it passes Xlib9. + +commit 69164ec00c749787dd59d5913ec6b3d159ad74d7 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Apr 27 02:15:19 2006 +0000 + + In drawing glyphs, shortcut our way to exaComposite instead of going + through the whole CompositePicture stack and doing things like + computing damage over again. This is a sizeable win for text drawing + with a compmgr. Also avoid calling down into the server for dealing + with the scratch pixmap when we are able to do UploadToScreen + successfully and never need it. + +commit 3d4ca57b69c40d27fe191170d0819013f8cc4947 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Apr 26 18:27:40 2006 +0000 + + Add a helper for the Component Alpha Over case, which breaks the operation + down into an OutReverse and an Add. Turn off the fallback to software + glyphs when component alpha, now that we expect all (new) drivers to be + able to support it. Also, make Xephyr fall back in the CA Over case to + exercise this code. This speeds up my rgb24text and ls -lR in + gnome-terminal by a factor of 5. + +commit 26fa45b64258894201496f921eccb0cb7028c28c +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Apr 26 11:40:58 2006 +0000 + + Bug #6751: Use the Linux PCI ROM interface on Linux properly. The old + domain code, still modified BARs not a good idea, Just talk to sysfs, + if 0 read, fallback to old methods. + +commit c339b221d3f59130a39e63d4cec3de7e3de95bf3 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Apr 26 11:31:07 2006 +0000 + + Bug #6750: This patch detects Intel bridges that are transparent but aren't + reported as such. From the Linux kernel fixups. This patch also removes + the reserved BIOS area from the area to allocate resources in. + +commit 6d156c044085881c6ecbd8a13521c0a26df71c30 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Apr 26 01:33:15 2006 +0000 + + Improve the migration debugging output. + +commit eaed7545a25a08b3223bf620c2ab6f80fe7cfdf6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Apr 26 01:32:55 2006 +0000 + + Fix a bug in the intersection computation that could concievably cause + incorrect results to be returned (but would probably usually be + over-conservative). + +commit 5d00859c6e7d4b7ebce56f438ec4993334de2328 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Apr 25 23:56:17 2006 +0000 + + Bug #4668: Check if the lists of glyphs don't have any intersecting glyphs, + and if they all have a maskFormat matching the format of the actual + glyphs If so, we can avoid the temporary pixmap for accumulating + glyphs, which reduces the number of operations done, and makes it + easier on the migration system. This fixes some significant performance + issues, particularly with subpixel antialiasing. Note that it does + increase the amount of damage computation which is done, so is not + always a win with a compositing manager running. + +commit 074dc9a023b3967ce00aa42c26a7c988423afe8a +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Apr 25 16:47:23 2006 +0000 + + Add an option to verify at the point of migration that pixmaps which aren't + marked dirty are in fact not dirty. This will hopefully help catch + issues like the previous commit. Leave it on in fakexa. + +commit 702d9226d57ec1584de2e8a85c268795650b1094 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Apr 25 15:46:04 2006 +0000 + + Don't forget to mark the drawable as dirty in exaPutImage(). Fixes + corruption with drivers that have UTS. (Michel Dänzer) + +commit 39ca0867c7dd6f3bdecc52aec8df435946682098 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Mon Apr 24 05:44:06 2006 +0000 + + Remove another reference to cfb16. + +commit 81f3c2937df6230542f3223c201da8c41ff59945 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Mon Apr 24 05:39:47 2006 +0000 + + strlcpy() doesn't exist on Linux, so use the implementation in os/. + +commit a715634d23fb3124261dbbd8d7d4e6522551bb9b +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Apr 23 13:14:50 2006 +0000 + + Don't access free memory after unloading a module. Bugzilla #4168. + +commit 79dc6892610c9f8385cde4f0d601cc7481225c16 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Sat Apr 22 03:22:17 2006 +0000 + + When reading the kernel keyboard mapping (readKernelMapping in + os-support/linux/lnx_KbdMap.c) we overrun the usefully-named global + array 'map', scribbling on other random static variables elsewhere. + This is fixed by changing the size of at2lnx. (David Woodhouse). Bug + #5169 + +commit b37c515320dc8df2b1d160cc3f37d6bfac109b91 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 19 21:56:13 2006 +0000 + + Add support for x4a4 format (depth 4 at 8bpp). Bug #6325. + +commit c947d796aad0b81d661a10b787deed967376da79 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Apr 18 19:18:43 2006 +0000 + + Missed in previous commit: Add a new migration scheme, called "Smart" for + lack of a better name. This one behaves somewhat between Greedy and + Always. It moves in if we can accelerate, unless the destination is + clean and shouldn't be kept in framebuffer according to the score, in + which case we migrate out (and force-migrate anything where migration + is free). This should help fix lack of acceleration for drivers without + UTS since removing exaAsyncPixmapGCOps, and has removed one performance + trap with Radeon I'd noticed. It is the new default. + +commit b17a4de83e7ab18bef29ae898195889638f1cc6a +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Apr 18 19:14:07 2006 +0000 + + Add a new migration scheme, called "Smart" for lack of a better name. This + one behaves somewhat between Greedy and Always. It moves in if we can + accelerate, unless the destination is clean and shouldn't be kept in + framebuffer according to the score, in which case we migrate out (and + force-migrate anything where migration is free). This should help fix + lack of acceleration for drivers without UTS since removing + exaAsyncPixmapGCOps, and has removed one performance trap with Radeon + I'd noticed. It is the new default. + +commit 771b366abe0bc060592b548612ec413291e14bf0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Apr 18 18:50:35 2006 +0000 + + Fix exaGetPixmapFirstPixel to migrate as unaccelerated. Also adds a bit of + fallback debugging info to PolyGlyphBlt. + +commit 782d61a03176264e0a9eb222ae97be3d175cf0ab +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Tue Apr 18 17:28:44 2006 +0000 + + Update all prefixes in config tools, so they mostly work again. Also, make + RgbPath commented out when using xorgconfig. Start using + /dev/input/mice as the default mouse location on Linux. + +commit 0f065059dcaf9c452f1cdec115f619f697fd71cc +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Mon Apr 17 07:27:43 2006 +0000 + + Wrap a couple more SDK headers in if XORG, as per Dave Airlie's commit on + 2006-01-18. + +commit ba632f697a782cd47870705b6cecaac2c60d30ff +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Mon Apr 17 07:10:31 2006 +0000 + + Fix kdrive build by linking in libexa before KDRIVE_LIBS. + +commit 0e62d92d5b809bc3a6503e9bc386cf961fc22557 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 14 23:43:32 2006 +0000 + + Coverity #804: Another leak on OOM path. + +commit d61219aaadf9e4aa83644a69627d3a1d3282c95f +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 14 23:38:11 2006 +0000 + + Coverity #806: Another memory leak on OOM path. + +commit 1b04e313920447e4c1f42bdd5a61f188d463210c +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 14 23:32:22 2006 +0000 + + Coverity #847, #848, #849: Three more memory leaks. + +commit 6545051902f2ce00c98bd1373f97ebc942667e9c +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 14 23:10:59 2006 +0000 + + Coverity #1003, #1004: Two more useless null checks. + +commit ab1d420022fb09d36a0d6ad948c38147c65b9adf +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 14 23:09:38 2006 +0000 + + Coverity #1005: Avoid a null deref. + +commit d01e0956a8903fb41e8a34c78973b9b2860b6446 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 14 23:08:10 2006 +0000 + + Coverity #1007: Fix a silly null check. + +commit 6d29f659318364afe046dc242d6f506ce40a944a +Author: Luc Verhaegen <libv@skynet.be> +Date: Fri Apr 14 23:01:35 2006 +0000 + + CVT means Coordinated Video Timing instead of Common. + +commit 82b6ea1a4b414426072bf001daeb3e9de0e93589 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 14 22:51:19 2006 +0000 + + Bug #6580: Don't install xf86drm.h, that's libdrm's job. + +commit aefa347bded9a3179ab139d0ccddce314040e9b9 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Apr 13 21:08:25 2006 +0000 + + Fix build for added file to Mesa CVS. This is always fun. :( + +commit 6aadd454e70d83921685b58bf57ec30d95920734 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Apr 10 10:11:19 2006 +0000 + + Fix stupid thinko. + +commit c9f6e60d42dec82d06995c05a2a011c338cadd87 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Apr 10 08:50:33 2006 +0000 + + Coverity #826: Fix potential memory leak. + +commit 1357af2474be9a3bce7ee2350fd4252eee89a3b1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Apr 9 17:39:10 2006 +0000 + + Coverity #340: Fix potential NULL dereference. Clean up proliferation of + 'register int n' in loops of ProcXkbGetNames. + +commit f324be00c547effc698ae6679d12ffe90bd90e43 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Apr 9 17:28:42 2006 +0000 + + Coverity #324: Fix potential NULL dereference. (Alan Coopersmith) + +commit 7637aa17f21e26d979fbb210a638d6751c98b1eb +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Apr 9 17:26:17 2006 +0000 + + Coverity #169: Fix potential fgets() into NULL (?!?). + +commit d5bc41b88272b4a3a1841cc1189720b0549db215 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Apr 9 17:15:51 2006 +0000 + + Coverity #323, #445, #446, #447: Fix potential NULL dereferences. + +commit 2387bfa5ff5ed82f3f732fb9152c1ea95850a914 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Apr 7 18:56:04 2006 +0000 + + Bump the ABI versions. Due to Glyph privates and the XV update below, the + video driver ABI needs to be bumped to 1.0. The rest of the ABI minor + versions were bumped to include the LoaderGetABIVersion function. + Add a DrawblePtr argument to the XV hooks. This allows drivers to determine + that the target window is redirected and draw to the appropriate place. + +commit dc43909219fe2a4d03139638814b89032b2921b9 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Apr 7 17:49:32 2006 +0000 + + Fri Apr 7 13:46:45 2006 Søren Sandmann <sandmann@redhat.com> + Use FreeResource instead of deleteCompOverlayClient() + +commit 94e7213d594dbbb53a6bb05d1dab7514c4ff5350 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 16:08:50 2006 +0000 + + Remove libc wrapper types from Xisb interfaces. + +commit 47bdc9528c2dd4ea9d59a0944c023173ea7a7a66 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 7 16:07:50 2006 +0000 + + Coverity #844, #845, #846: Fix memory leaks. + +commit 2c90c3bfef8563f739a72bb645dd52b35b6ff6d5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 7 15:57:17 2006 +0000 + + Coverity #987: Avoid potential NULL dereference. + +commit 843146cfbaef234e13df9a62b6f0232a5efdf7f0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Apr 7 15:53:21 2006 +0000 + + Coverity #1216: Fix double-close of file on error. + +commit 5dacc822327689c0f096093756473c96fba67d76 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Apr 7 02:20:11 2006 +0000 + + Coverity #333, #334 - eliminate unncessary test for always true condition + in fbEvenStipple. + +commit 75a9afdbf42e4196471774102e1758f18866bec6 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:53:43 2006 +0000 + + Coverity #488: Avoid smashing an array on malformed config files. + +commit 20c1ef2cc30abe45eeaf5b0833cbc0095ed05c02 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:50:07 2006 +0000 + + Coverity #769: Fix a potential memory leak for systems that allocate on + malloc(0) + +commit 5ef711032b821be82fd7281fe64872bcbaff0327 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:41:00 2006 +0000 + + Coverity #838: Plug two more memory leaks. + +commit 69477ea4b6e666940c5dd4422bedfa6432dead04 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:37:11 2006 +0000 + + Coverity #837: Fix another another memory leak. + +commit b472ce7307dd88a21c7713a2b127e34f5c2bc817 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:35:43 2006 +0000 + + Coverity #836: Fix another memory leak. + +commit 9c84ed5f8d9eded1a8b509c9cad1ca0ebcf2166a +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:34:29 2006 +0000 + + Coverity #835: Plug memory leak in extension section parsing. + +commit 12924d0da36ad2266bb040caac58534c07e85261 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:29:39 2006 +0000 + + Coverity #812: Fix parser memory leak. + +commit 49abff79957799e9229d5c0226ee1b0d7505003d +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:26:33 2006 +0000 + + Coverity #818: Avoid memory leak on error path. + +commit bda292120fc97f890c1f58a31177c0f7c0bfa048 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:23:50 2006 +0000 + + Coverity #985: Avoid segfault on malloc failure. + +commit 536628bb4bcb0a0d749e0c01412a5eb5d6d24063 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 01:18:01 2006 +0000 + + Coverity #1037: Sanity check idx before use. + +commit 53e97ce4ddd993248561c245143b61915ea254b5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Apr 6 22:04:12 2006 +0000 + + missed a line while removing cfb16 + +commit 4ae12636694af05cee4287b119bde08e9ceaa8aa +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Apr 6 18:59:11 2006 +0000 + + Remove cfb16, no longer used. + +commit e1fc15a85fb367ee9afd63c920c3327c3f45158d +Author: Fredrik Höglund <fredrik@kde.org> +Date: Wed Apr 5 21:08:45 2006 +0000 + + Put the screensaver extension back in the Xext module. + Move the screenSaverSuspended variable to DIX globals. + Restore the old link order for the Xorg and Xdmx binaries. + +commit 383c2e1e9ec54ab9de356993ad552c1aa6ec094f +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Apr 5 19:52:12 2006 +0000 + + Include fbmmx.h in fb/fbwindow.c when USE_MMX is defined. Fixes build + problem on x86-64 resulting from fbHaveMMX being a macro instead of a + function on that platform. + +commit 4697da177d545a2f8bb6fd0d6588a1c40532c339 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Apr 4 18:30:28 2006 +0000 + + Initial checkin + +commit 83ea57bcc82f478a7ecdcd6ed73ca4be01cd9c26 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Apr 4 14:39:06 2006 +0000 + + Bug #5729: Convert xf8_16bpp to fb. chips(4) users please test. + +commit 4c7da861185080d15b3ff4301af4af0e85a71f93 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Apr 4 14:17:04 2006 +0000 + + Bug #5300: Fix missing spaces in the Build OS line in the log. (Egmont + Koblinger) + +commit fb6f61b50f1c701041680e49f6a406a6603f1577 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Apr 4 12:36:16 2006 +0000 + + Bug #4806: Dump the raw EDID contents in hex to the log file for better + debugging. (Philip Prindeville) + +commit 14af50371c7f23855781924cdf6afa6ab7566a87 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 22:00:06 2006 +0000 + + Bug #2142: Make font path logging more readable. (Eduard Fuchs) + +commit 373f9f92566290d979730c09c9c5c5d50e23390c +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 21:45:54 2006 +0000 + + Bug #4766: Convert all Xprint drivers to fb. + +commit d9b8bfbfafe8758ceb629606607e37546d51ca52 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 21:16:30 2006 +0000 + + Bug #5478: More use of fbSOlidFillmmx. (Jim Huang) + +commit b0e67782653033c6518944adfbf23e466bd8bc39 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 19:50:15 2006 +0000 + + Bug #6346: Build fix when using gcc -mno-sse. (Jonathan Adamczewski) + +commit 66500819b1ca730a7b1df400a8368a08cbe49335 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Apr 3 11:37:30 2006 +0000 + + Bug #1358: Make ISO_Prev_Group cycle/wrap as ISO_Next_Group does. + +commit 2a6c11aa3b06f13dad94f3441c7184e6720a2bf4 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Apr 3 09:12:28 2006 +0000 + + Fix a server crash due to memsetting beyond allocated memory when running + GL applications. + +commit f6ca2b3ea92b7fe98408c51a17a590435e808b1d +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 02:15:55 2006 +0000 + + Coverity #38: Dead branch elimination. + +commit 9b9dd747d8f4697c6d5c947c160d5991c7c8fde5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 02:13:47 2006 +0000 + + Coverity #75: Dead variable elimination. + +commit 3f87aeefb4be3ac23ae636d3756ffdc446eaa62d +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 02:12:11 2006 +0000 + + Coverity #82: Dead variable elimination. + +commit 61926dbe592468076f8c9a666f0098d067d2213e +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 02:09:05 2006 +0000 + + Coverity #271: Fix an unbelievably boneheaded NULL chase. + +commit 7ef95da8a3e22e710882590fc47d56893159cb5d +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 01:51:54 2006 +0000 + + Coverity #616: Fix a rare memory leak. + +commit 01ebd633017249c496f378df511586c973d49708 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 01:43:33 2006 +0000 + + Coverity #833: Fix a rather nasty memory leak. + +commit a01f17d6dec02f80144e108f748783cb4e429ebb +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 01:35:05 2006 +0000 + + Coverity #983: Move some risky debugging code inside #ifdef DEBUG. + +commit c03cfca3806f45948627715b25b46839a07be979 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 01:31:59 2006 +0000 + + Coverity #986: Prevent a NULL chase. + +commit 07ecf49521973bbb205b199c39e1171f1163df2b +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 3 01:28:11 2006 +0000 + + Coverity #992: Prevent a NULL chase. + +commit c6b3b3354c2d9139b19b132051d434e97dd19715 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Apr 2 22:51:42 2006 +0000 + + Bump to 1.1.99.1. + +commit 7e085f52b6f07c076bd3bcfdce27c17d14d7822e +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Apr 2 22:31:13 2006 +0000 + + Use xf86LoaderCheckSymbol to check for DRI symbols instead of dlsym, + avoiding RTLD_DEFAULT. (__glXDRIscreenProbe): Change GLX-DRI to AIGLX + in LogMessage for consitency. + +commit b2097b99a2e6cc045ee9b6d80946bc06c4d9302c +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Apr 2 21:45:03 2006 +0000 + + ../stub + +commit 4e3a4cfdd1d7153eb88aab05ed02ddb32601ae93 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Apr 2 06:22:05 2006 +0000 + + Use RTLD_DEFAULT, rather than relying on NULL happening to map to it as it + does on Linux. + +commit 323fec20292fc5ad90bfee9015ecccdc13c968ad +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Apr 2 00:46:20 2006 +0000 + + Reorder link order for Xdmx to fix new screensaver variable reference + properly; remove previous awful hack. + +commit a605b9ffd3c2e7d227e35b911761f720bf07b7e6 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Apr 2 00:09:43 2006 +0000 + + Fix some includes to point into X11/fonts/ properly. + +commit e5b1d38e142807b59ce4ec89764c949f707ec541 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Apr 1 23:53:33 2006 +0000 + + Disable Xprint freetype support momentarily. Needs ttf2pt1.c, which exists + in the monolith but has an advertising clause in the license. + +commit ccca76b8083b83825fa16483b44e8926a35412bb +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Apr 1 23:41:23 2006 +0000 + + Clean up warnings and a debug printf. + +commit 6afa814ab16f351b2eb787e5bf481a1f9738b391 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Apr 1 23:28:17 2006 +0000 + + Pull out fb's tile handling during fbValidateGC so we can do the necessary + exaPrepare/FinishAccess()es. Revealed by xtest with fakexa. + +commit 277f612d4eeb89adb8ccda4e8fd3d211d8d1705e +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Apr 1 23:19:08 2006 +0000 + + Hack around the new screensaver variable for DMX, which is otherwise + blissfully ignorant of it. + +commit 5f95146fcfcae60cc29265799ba3b851647105d6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Apr 1 22:35:16 2006 +0000 + + Export exaPrepare/FinishGC to the rest of EXA, and use it in the ImageGlyph + implementation to avoid unprepared access to the tile. Also, relocate + the fbGetDrawable to avoid using a stale dest pointer after + exaSolidBoxClipped() may have migrated it. Revealed by xtest. + +commit c720ffe875e4b2038746ff9b4767f8b90db0a307 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Apr 1 22:17:44 2006 +0000 + + Use fb's depth-to-planemask computation, which doesn't suffer from getting + a 1 planemask at depth 32. Fixes Get/PutImage xtest tests. + +commit 5c0a2088e229d05c38e5df7daea45af0d7db7daf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 1 21:49:44 2006 +0000 + + Bug #6428: Fix off-by-one error when walking off the end of the vmodmap + list. + +commit 1e764feab595b781dab22d6e41c26f118c9d41b5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 1 21:20:31 2006 +0000 + + Bug #5801: Check for MTRR support under Linux. Minor refactoring of MTRR + checks for other OSes. + +commit 978c7b14a18caffde5600480824d04492fc32aef +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 1 21:02:40 2006 +0000 + + Make Xprint AC_ARG_ENABLEs and AC_ARG_WITHs unconditional also. + +commit 71a6f2ef6c1138c5c6918a54dfb856183f4f242c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Apr 1 20:58:42 2006 +0000 + + Unconditionally run XP_USE_FREETYPE AM_CONDITIONAL, not only in the Xprint + path. + +commit d1e90113fc32b6ddc4dbe1a074763c31bc133e75 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 31 23:22:29 2006 +0000 + + Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new + gradient testing in rendercheck. + +commit 2e38fedd29e7e55d01e3edce6a73b8ceaac17911 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 31 19:41:28 2006 +0000 + + Add an option to EXA for the DDX to request that EXA hide the pixmap's + devPrivate.ptr when pointing at offscreen memory, outside of + exaPrepare/FinishAccess(). This was used with fakexa to find (by NULL + dereference) many instances of un-Prepared CPU access to the + framebuffer: + - GC tiles used in several ops when fillStyle == FillTiled were never + Prepared. + - Migration could lead to un-Prepared access to mask data in render's + Trapezoids and Triangles + - PutImage's UploadToScreen failure fallback failed to Prepare. + +commit f480dc797b51f080f912efc7867d6d8e50be074c +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 31 19:25:42 2006 +0000 + + Revert mistaken commit to exa_unaccel.c. Should have been to + exa_offscreen.c: Correct a typo in debug-only offscreen validation + code. (Wang Zhenyu) + +commit 1a8167c1baa767fc056d1e17d96d0ea98a5f3b17 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 31 19:16:51 2006 +0000 + + Correct a typo in debug-only offscreen validation code. (Wang Zhenyu) + +commit 7ea30b507f4ce5ce20fbfaca80f7d5b53a99eb1d +Author: Fredrik Höglund <fredrik@kde.org> +Date: Fri Mar 31 18:49:38 2006 +0000 + + Move the screensaver extension from module to builtins. + Add the server side implementation of the ScreenSaverSuspend request. + Require scrnsaverproto >= 1.1, and change the linking order of the Xorg + static libs. + +commit acca49b1a5a6c034f3b9d51d9016b8a7d43da809 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Mar 31 17:39:35 2006 +0000 + + Fri Mar 31 12:37:16 2006 Søren Sandmann <sandmann@redhat.com> + Fix copyright statement + +commit b074ce22470ba0a51eda2af7100d09a260a1e8bb +Author: Egbert Eich <eich@suse.de> +Date: Fri Mar 31 15:11:51 2006 +0000 + + fixed typo. + +commit 710bb2e6c8b2874406e48fa8ad24539290c98d41 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 31 14:52:57 2006 +0000 + + Reindent with -cbi0. + +commit 7c44bb8c49656133eae675377edea55322d254ca +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 31 07:33:34 2006 +0000 + + Simplify XkbWriteXKBKeymapForNames a bit, and remove debug spew. + +commit 4c317bbc1259fa555dc5d5278226b21c42845c0c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 31 07:21:41 2006 +0000 + + Add full FreeType support for Xprint. (Drew Parsons) + +commit 759033703ce17b20d57756206f48a7ae410a50d1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 30 21:44:36 2006 +0000 + + Remove the exaAsyncPixmapGCOps mostly-unaccelerated ops vector, and always + plug in the accelerated one, even if the destination pixmap is + currently offscreen. This was a leftover from when kaa originally got + accelerated offscreen pixmap support, and its only concievable use was + to avoid a little overhead on ops to in-system pixmaps that weren't + going to get migrated. At this point, we probably care more about just + getting everything accelerated that we easily can, which should happen + with the new migration support. + +commit b9203dc068ccd4c0d22d49a94b910783432b96a8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 30 21:25:43 2006 +0000 + + Don't do an extra fallback path for CopyWindow while swappedOut, since + exaCopyNtoN takes care of the fallback anyway, and we don't care about + the performance of this path. + +commit 5c04610f8aeceed9ec7cd0ca8c5eb314cacc3c25 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 30 21:21:59 2006 +0000 + + Add a dependency on EXA, so it rebuilds when the library does. The manual + indicated I shouldn't do this, but experience indicates I should. + +commit 8ec42a10ff04e51e8d0b4cffb15064d901bc398d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Mar 30 20:08:44 2006 +0000 + + Mark the ARGB FBConfig as nonconforming to prevent drivers and apps from + falling over. + Add @GLX_DEFINES@ so GLcore gets compiled with TLS support if configured. + Only destroy the mesa buffer if it got initialized. + +commit 08e319091fae7a60ae9fa757659cfde2966af9e9 +Author: Egbert Eich <eich@suse.de> +Date: Thu Mar 30 18:53:41 2006 +0000 + + Added notice to last ChangeLog entry + Fixes for some vsw4 failures on 64bit BE platforms such as PPC64 and s390x. + Provided by Hong Bo Peng of IBM (slightly modified). Patches try to + resolve some of the careless mixtures of ulong and uint (which are + different size on + 64bit). > This patch will break the driver ABI! < Bugzilla #6438. + +commit 9da1d2257d02155cc8b4541cf5fcb4e64d756945 +Author: Egbert Eich <eich@suse.de> +Date: Thu Mar 30 18:48:11 2006 +0000 + + Fixes for some vsw4 failures on 64bit BE platforms such as PPC64 and s390x. + Provided by Hong Bo Peng of IBM (slightly modified). Patches try to + resolve some of the careless mixtures of ulong and uint (which are + different size on + 64bit). Bugzilla #6438. + +commit 6d7ad353bafe914f0b50887daaeaae89ada6ebd3 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Mar 30 18:29:53 2006 +0000 + + Regenerate these files using updated scripts to avoid unused variable + warnings. + +commit 2153fa97482bae5737def3ecd4fe1cdc03834991 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 30 05:24:27 2006 +0000 + + Bug #2986: Add PutImage acceleration for the ZPixmap, planeMask ~= + FB_ALLONES, bitsPerPixel >= 8, GXcopy cases. With the radeon driver on + my machine, this gives about 10% speedup in PutImage + 10x10 and 500x500, and 40% speedup for 10x10 ShmPutImage, up to 65% + improvement in 500x500 ShmPutImage. Also fixes a crasher in GetImage + that slipped in at the last minute. + +commit 3cf46cc1e32efc0e4be1d88be111ba0438e0f021 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 30 05:15:58 2006 +0000 + + Add an UploadToScreen implementation, for testing PutImage support, and + make the DownloadFromScreen more robust. + +commit e799dd68e2bd0fa8ac3c344111fb12e1f32d4c10 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Mar 29 22:25:17 2006 +0000 + + Bug #2986: Add acceleration of GetImage using DownloadFromScreen for the + ZPixmap, planeMask ~= FB_ALLONES, bitsPerPixel >= 8 case. I'm pretty + convinced that this is the only case that we care about at all. Tested + with xwd -root and xwd on a gnome-terminal, in a composited environment + or not. + +commit 4bb5ab0b4453208573b91b334940f190a8f7210a +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Mar 29 22:03:18 2006 +0000 + + Add a DownloadFromScreen implementation, used for testing GetImage + acceleration, and set the migration scheme to Always on init (since + this is all for testing, and Always should make migration happen more + frequently than Greedy). + +commit e31e8ace1043eab340d6b60a6e98b23ebf102786 +Author: Deron Johnson <deron.johnson@sun.com> +Date: Wed Mar 29 17:51:54 2006 +0000 + + Fix composite overlay window bug 6411 + +commit ff6f88348c7498e83b0b143ef3737fd6eb0995e4 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 29 01:05:09 2006 +0000 + + More warning cleanup. + +commit 52d9ce7f4fc599d30dec2e61fc1720597043d91c +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 28 21:45:14 2006 +0000 + + Fix another typo. + +commit 7df64898eac46a487e8eab2af7213d133b9ca419 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 28 07:46:04 2006 +0000 + + Fix a couple of typos. + +commit bd283c2464e2c0e1fd0aca1dedff0f39c2564c34 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Mar 28 07:21:50 2006 +0000 + + Add a new export, LoaderGetABIVersion. This function allows modules to + query the versions directly instead of having to guess. Bug #6416: Add + LoaderGetABIVersion. + +commit a06342eccc76035ff859fee4d283b288c90ee923 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 28 02:57:07 2006 +0000 + + Add --enable-glx-tls ./configure option to enable use of TLS for storing + current GL context. Use this option to let AIGLX load DRI drivers + compiled for TLS. + +commit 77531dfb9f9f3ca0e38ad0555ee3735d6f28cf19 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Mar 28 01:22:01 2006 +0000 + + Silence some editorializing in the configure help text. + +commit 7deaaa797cf8e7ca71e9b34fa6f413d1ed2b3dab +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Mar 28 01:21:00 2006 +0000 + + Big old pile of warning fixes. + +commit 7342dbe4b2108827eaf30993ceeecbd828da2290 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Mar 28 00:18:31 2006 +0000 + + Remove long-dead screen region code. + +commit 0e88cefbfecbff0c7dd606ce0caca840f45cbc0d +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Mar 27 23:03:47 2006 +0000 + + Prune XKB code to only what we need to run the server. Remove dead + !XKB_IN_SERVER codepaths. Remove HAVE_CONFIG_H codepaths. + +commit 5be8a66d324f3d5840b134ad29069eace64e6f12 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Mar 27 22:28:32 2006 +0000 + + Fix remnants of previous busted _XkbStrCaseCmp commit. + +commit 9e202dfe40e2bdd66f461a6ba531e927f82096ae +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Mar 27 22:25:56 2006 +0000 + + Remove remnants of XkbCF code. + +commit 7257590651328f89d23e80da1ec6241542a660cd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Mar 27 21:15:06 2006 +0000 + + Move XFree86 DDX XKB actions into dixmods. + +commit d7b9e2b0e9d6889ea6b05e63892e612f4e5f19f5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Mar 25 23:09:50 2006 +0000 + + Bug #3819: Remove open-coding of strcasecmp. + +commit b3570dd94aa72f94e537a17680150e91e7712f5a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Mar 25 22:37:58 2006 +0000 + + Remove INITARGS braindamage, change to void; add XkbExtensionInit prototype + to xkb.h. Explicitly initialise nTypes in xkb.c. + +commit 1ef60ce8ebb681b3cfb5e515be5c187c0442dcda +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Mar 25 22:35:48 2006 +0000 + + Really remove all DDX pre-config code. + +commit ec10f70b2114e5369a5b2f34b084dcf55634dcb4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Mar 25 21:52:49 2006 +0000 + + Remove XkbCF DDX configuration code. + +commit aae4238360b842ac34dc8ee16e165a1821f9a801 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Mar 25 20:17:58 2006 +0000 + + Fix two glaring unconditional-NULL-dereferences. + +commit a68c11bb1d7c5419004a1714e49dffac57304e78 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Mar 25 19:52:05 2006 +0000 + + Mark everything in xf86sym.c as _X_EXPORT. + +commit ae935832facfa81a9689882406ecca74b0346790 +Author: Fredrik Höglund <fredrik@kde.org> +Date: Fri Mar 24 20:50:13 2006 +0000 + + Refactored the screensaver and DPMS timer code to use the screensaver timer + for both screensaver and DPMS. Removed the SetDPMSTimers() and + FreeDPMSTimers() functions. + +commit d1746ec0f0c8a0b750f390e7a7faf21b67683f4a +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Mar 24 17:58:39 2006 +0000 + + Make sure DRI module is loaded before calling DRI functions. + +commit f1616508c95d12dfaad2cfd61b40228b3dba6f60 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Mar 23 23:54:08 2006 +0000 + + Add ast driver/pci id (Carl Switzky, Sun Microsystems) + +commit 6d2896b384e17512e8f12036daabcd575d21f804 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Mar 22 22:49:52 2006 +0000 + + Improve error logging. + +commit 5449634e3c9428005aba5b3322ced7e86c62f185 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Mar 22 21:37:49 2006 +0000 + + Wed Mar 22 16:28:46 2006 Søren Sandmann <sandmann@redhat.com> + Use inline assembly for copy area, since gcc doesn't generate movq + instructions. + +commit 5b3084c64f7bd1232603ffb3e985600b8d045453 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Mar 22 21:13:08 2006 +0000 + + Wed Mar 22 16:05:09 2006 Søren Sandmann <sandmann@redhat.com> + Use inline assembly for solid fills, since gcc doesn't use the movq + instructions. + +commit a08e5e0c68baaf85b0fc3ecde74a6bcf80bcd4bf +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Mar 22 18:44:26 2006 +0000 + + Wed Mar 22 13:42:44 2006 Søren Sandmann <sandmann@redhat.com> + Patch by Keith Packard to make sure redirected windows don't get considered + "FullyObscured". + +commit 966d93ef6d1f2ed02f3b81b5bf5a1ebbdd48c93d +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 21 22:54:38 2006 +0000 + + Make the server distcheck and tag 1.0.99.1 snapshot. + Bump CVS version to 1.0.99.1. + Distcheck fixes. + +commit 8e3ad87d01c102591c7dc25614f6ac10e444a1b1 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 21 22:32:13 2006 +0000 + + #include indirect_dispatch to get prototypes for FBO functions. + Fix a couple of warnings. + +commit dcc43d57cbe9d2b65384fe9ba2e4e4fbb43cb0a1 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Mon Mar 20 20:10:29 2006 +0000 + + Finish glx_ansic.h wrapper changes to make Xvfb and Xnest link again. + +commit 9509c6799e31e96677b6d07bdf24ea91ddd30020 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Mar 20 19:32:18 2006 +0000 + + dead file removal + +commit 61a020265c5915e3d671d5b2047b81a5d15594c3 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Mar 20 18:43:18 2006 +0000 + + Bug #5549: Fix build for sparc64. (Matthieu Herrb) + +commit 6eb4e2303aaab8d64e3f6cbc0bbee55689bdcb82 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Mar 20 14:01:05 2006 +0000 + + Bug #6213: Check geteuid's return value, not its address, otherwise + unprivileged users can set the modulepath and run arbitrary code. Patch + from Matthieu Herrb. (CVE-2006-0745, Coverity #4) + +commit 8c1bb37d0649b269b78c457b8b41ff59a41d89af +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Mar 17 08:55:07 2006 +0000 + + Typo fix, reindent. + +commit 2d2d38d17cc2558f8a41166a4a1578bc4c663c37 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Mar 17 01:47:25 2006 +0000 + + Check for glproto when building GLX and make sure we have at least 1.4.6. + Drop glx_ansic.h wrapper and call xalloc, xrealloc, xfree and str-funcs + directly. + +commit 2c11cde3367fcd22740b577a4364b1e41cf3e1d2 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Mar 17 00:35:18 2006 +0000 + + More patches from David Reveman: + Add GL_ARB_texture_non_power_of_two, GL_EXT_framebuffer_object and + GL_NV_texture_env_combine4 extensions. + Add __GLXcontext destructor and flush context cache there and on + loseCurrent. + Chain back to new __GLXcontext destructor. (__glXMesaContextForceCurrent): + Set render table on forceCurrent. (init_screen_visuals): Index pVis + array correctly. (GlxGetMesaProvider): Add this. + Hook up FBO marshalling. + +commit 14aafc258cd774cf937f9798a888c2d3c97ccacf +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 16 18:43:55 2006 +0000 + + Change EXA so that exaMoveOutPixmap() retains the framebuffer copy of the + pixmap, and damage is tracked so that a later exaMoveInPixmap won't + result in an upload if no upload is necessary. This will likely improve + the performance of the "Always" migration scheme significantly, and is + a step in the path to more exact damage tracking between framebuffer + and system memory. + +commit d0d336efd58896718f31a400651bacd9b769fb5a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Mar 16 16:29:17 2006 +0000 + + Add support for ZX2 PCI-E local bus adaptors. (Alex Williamson, HP) + Use soft timeout register to avoid MCAs when probing for non-existent local + bus adaptors on ZX2. (Alex Williamson, HP) + +commit 175980580e572745a9a381b4432e3ba0457d3ba3 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 23:05:53 2006 +0000 + + Bump to requiring fixesproto >= 4.0 and compositeproto >= 0.3. + +commit 6fe377af5a82deb6f8b0f3b75414335e7845caac +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Wed Mar 15 21:25:38 2006 +0000 + + - OpenBSD needs -Wl,-export-dynamic to export symbols from main executable + to modules. + - Probe for OpenBSD aperture driver and define HAS_APERTURE_DRV + accordingly. + +commit 21f7f2fb113ee4f9cd011c3cc2d45d43bbdd35fa +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Wed Mar 15 18:43:32 2006 +0000 + + Enable correct handling of the BTS instruction (opcode 0f ab) The code was + there but #ifdefed out. Insead of BTS, BT was executed. This patch + enables the BTS function and hooks it up the the correct opcode. (ATI + Technologies Inc.) + +commit b726aa502a871c700bc42b5325abf2c6820ff756 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Wed Mar 15 18:37:44 2006 +0000 + + Update to build against Mesa CVS HEAD. + +commit c74464d92cd673ff0669375757caab798cc57e95 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Mar 15 16:59:45 2006 +0000 + + Don't let pinned pixmaps get migrated in when using the "Always" migration + scheme. This notably keeps the visible screen from getting migrated in + to a new location in framebuffer. + Reported by: Michel Dänzer. + +commit b9c43cde1e368903786977b06368d5e36db9ffe8 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:56:10 2006 +0000 + + Coverity #1042, 1043: Nuke some dead variables. + +commit 5e106a71b9f8077216d41619402952b0005dd8a4 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:49:04 2006 +0000 + + Coverity #807: Fix a memory leak in XFixesExpandRegion. + +commit a3ef63696cac950b2520e7c85564befc0a830fde +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:36:31 2006 +0000 + + Coverity #490: Fix a range check in xf86vidmode extension. + +commit 152090ce442e94de1ae920208a92931af6493c8c +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:33:12 2006 +0000 + + Coverity #487: Check version number correctly. + +commit 72cc6307257fcbb800267464487bf918ee674328 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:32:05 2006 +0000 + + Coverity #491: Check version number correctly. + +commit 460f2ea4a594a53536f34c4ad27795fceec50bcc +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:21:04 2006 +0000 + + Coverity #794: Fix a highly unlikely memory leak. + +commit 116d158e85ec43577ff69aeb3271ab1f888500c9 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:16:24 2006 +0000 + + Coverity #269: Compare the requested ABI class against the ABI class of the + module, not the module class. + +commit d8221a9b70a11606a0f7e1f69afee6049d7f182f +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:11:34 2006 +0000 + + Coverity #484: Fix an off-by-one in module refcounting. + +commit 6bb2dc02a7cffd6ed7dd28e88d584920a4150749 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 16:01:47 2006 +0000 + + Coverity #337: Remove useless NULL check. + +commit 1e5c0842af99027cc6c30a16f967d8b60c9a894d +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Mar 15 15:34:57 2006 +0000 + + Coverity #1053: Nuke a dead variable. + +commit 7314d16cde4c3f99d9d9f1d539f0c5ff4942e653 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Wed Mar 15 03:18:42 2006 +0000 + + Fix DRIExtensionInit() to not register callbacks when it hasn't been + initialized for the current server generation. Fixes a problem where it + would use stale private index and blow up in colorful ways if no driver + called DRIScreenInit() on the second generation (which happens due to a + bug in radeon that i'll fix separately). Note: clearing the index in + DRIReset() wouldn't work as DRIReset() is called before the + CloseScreen() chain + +commit 02d80a0de93f7592e69065b0fbe5820dcdebdb44 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Wed Mar 15 03:12:32 2006 +0000 + + Make xf86 linear allocator smarter when dealing with alignment constraints + when falling back to X/Y allocations. Fixes various problems of Xv + allocation failures, notably with "nv" driver. + +commit c1601717d536419693b3ef6e8a3d69b9f2fdc2b3 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Mar 15 01:20:08 2006 +0000 + + Add a new migration scheme, "always", which will move pixmaps to their + desired location always (unless they don't fit in FB, in which case + they all get moved out for software rendering). The default remains as + before, but can be controlled by the MigrationHeuristic xorg.conf + option (which is intentionally not documented, as it may be + short-lived). This is part of the exa-damagetrack work, which appears + stable in testing with fakexa, unlike the work as a whole. + +commit a90cff266cc81993ed804fb320c1dbfe5e0d4787 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Mar 15 00:13:52 2006 +0000 + + Add more doxygen documentation, including notes on WaitMarker() and + MarkSync() that I noticed were needed while reading the VIA driver. + +commit 693e42114f1127528448126d78a5209dd1198d8d +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Mar 14 21:30:12 2006 +0000 + + Move migration logic to a new function, exaDoMigration(). This is largely a + manual conversion to allow for different migration schemes to be + implemented reasonably, but does include some minor improvements such + as accounting for pinned pixmaps not being acceleratable, and for our + current GetImage and GetSpans not being accelerated. + +commit d30905478078036383977ae9d4a3685c2e2c642f +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Mar 14 20:38:06 2006 +0000 + + Pull code for getting the (0,0) pixel from a pixmap out to a separate + function, since it gets repeated (with bad error handling, in one + case). + +commit 01aa209f2056ef04e3f2735756a0f8b4a67a3d87 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Mar 14 19:32:27 2006 +0000 + + Bail out early if screen doesn't support DRI. + +commit 0cc34266d6e84bb491fcf9aa74e34615b2fca4fc +Author: Deron Johnson <deron.johnson@sun.com> +Date: Mon Mar 13 22:43:42 2006 +0000 + + Updated ChangeLog for my latest composite and xfixes changes. + +commit 450018f48b2796345a4eaccbb94c1971ebd30114 +Author: Deron Johnson <deron.johnson@sun.com> +Date: Mon Mar 13 21:59:55 2006 +0000 + + Part 3 of 3 (Other parts are in proto and lib) Composite Version 0.3: + CompositeGetOverlayWindow, CompositeReleaseOverlayWindow Xfixes Version + 4.0: XFixesHideCursor, XFixesShowCursor + +commit e5956f49b217b0ee9c9f35b6a58f339a8d22b1d7 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Mar 13 01:54:59 2006 +0000 + + First batch of AIGLX fixes from David Reveman. + Add getter for Mesa provider. + Export this for Xgl. + Move resource tracking out of drawable constructor to allow wrapping. + Use corrent reply size #define. + Add this function. (DoGetDrawableAttributes): Fix array length. + +commit eb63e50d95da4e1e08fc6fcec46ac63d5e3b7bf4 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 12 17:14:03 2006 +0000 + + Fix build when AIGLX is false. + +commit 9ed3463450469c3108e0be7e4baabc0a403a78b2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Mar 12 03:04:52 2006 +0000 + + Improve doxygen formatting, and attempt to clarify the 1:1 ratio of + successful PrepareCopy()s to DoneCopy()s. + +commit 9a7fba5fd07c8831d0acab8d901605de537ae273 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Mar 12 03:02:26 2006 +0000 + + Make exaCopyNtoNTwoDir() call DoneCopy() at the end of each string of + consecutive Copy() calls (rather than exactly once at the end of the + function). + Reviewed by: jbarnes + +commit c3342c8000f6d2bfb61e2cf95e028d11b59698fa +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Mar 12 00:11:34 2006 +0000 + + Merge accel_indirect branch to HEAD. + +commit b1b731c28630965d9e2defe62d1108270dc8264c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Mar 11 02:43:51 2006 +0000 + + Fix buffer size checks to prevent 2-byte buffer overflows. (Coverity #480, + #481, #482, #483) + +commit fc0772de36315f19f5b57220db69f48a3b1fdc9a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Mar 11 02:10:14 2006 +0000 + + Add HAS_MMAP for Xvfb + Fix Xvfb option parsing to exit on bad arguments, not just issue error + messages and continue on. (Coverity #492) + +commit f2ecbb30187000547a98ca7cbaee433ea4ba8fe3 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Mar 11 01:58:32 2006 +0000 + + Pass sizeof the correct buffer to XmuSnprintf. (Coverity #489) + +commit d6955798489813ef77cca13cf5f5c67d49e6dece +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 10 21:36:24 2006 +0000 + + If fakexa is enabled, create a larger buffer in the Ximage, but keep the + same width/height for front-buffer drawing. The fakexa code then uses + this extra space for offscreen pixmaps. Note that this tones down the + absurdity of fakexa's offscreen pixmap alignment requirements (odd + alignment is too weird, so stick with "24", which is still strange but + exists out there). It also fixes a couple of bugs in the fakexa + implementation revealed by using offscreen pixmaps. + +commit 5b1a7b478f072f56e836f2d4c0fbc1985842e2bb +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 10 21:32:34 2006 +0000 + + Move the exaDrawableDirty in exaPrepareAccess to exaFinishAccess, which is + after the drawing is done. Previously, a failed PrepareAccess could + have migrated and cleared the dirty flag before the damage was ever + done. + +commit ffdbb547becc71f1cfdd035d0d6c71539f185fb1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 10 08:06:42 2006 +0000 + + Coverity #1011: Remove a useless NULL check on a pVbe that had been + dereferenced many times before. + +commit 1bc72dce5f8bc40e369e69b684816fdaaa07da43 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 10 08:03:24 2006 +0000 + + Coverity #857: Fix resource leak in error path by freeing earlier. + +commit 55f677d600370b19d62ef821025481f2be6f5edb +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 10 07:58:27 2006 +0000 + + Coverity #813, #814, #815, #816: Fix resource leaks in error paths of + config parsing code. + +commit 2bd41105496b729395fbcf97f09581eb0efb3510 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Mar 10 07:45:25 2006 +0000 + + Document the restriction on PrepareAccess() failure, from discussion with + benh. + +commit 21dcd0304879f38ea8ea01ba88e7cc7783771adf +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Fri Mar 10 01:34:45 2006 +0000 + + Just like FreeBSD, let DragonFly's default mouse Device be /dev/sysmouse + (since /dev/mouse don't even exist by default). + +commit 9a99afdfb292f303f914039952fdd772eed9e03a +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Fri Mar 10 01:22:26 2006 +0000 + + Add DragonFly support. (It is like FreeBSD.) + This patch is from DragonFly developer Joerg Sonnenberger and the pkgsrc + collection. + I tested using /dev/sysmouse with moused using my serial /dev/cuaa0. + +commit 7a0f7f739804bc7d9c5562701abee8d134878977 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 9 23:29:44 2006 +0000 + + Coverity #349: Fall back to software early if pSrc->pDrawable is NULL, or + pMask is non-NULL but pMask->pDrawable is NULL. This prevents NULL + dereferences on gradients and other Pictures which have no pDrawable. + +commit 8a3ff42abb726d1604af39b4653ede5f760b7e69 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 9 23:25:35 2006 +0000 + + Commit changes missed in last commit (mis-typed path and didn't notice): Do + a first pass of doxygen documentation of EXA. This removes the + corresponding pieces of exa-driver.txt, which were becoming stale. + Hopefully the documentation will stay much more up-to-date this way. + Many thanks to jbarnes for writing exa-driver.txt which was used a lot + in writing this documentation. + +commit ab35c3fbc135bafdfc5057ef5d6227ca3534ed26 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 9 23:18:15 2006 +0000 + + Do a first pass of doxygen documentation of EXA. This removes the + corresponding pieces of exa-driver.txt, which were becoming stale. + Hopefully the documentation will stay much more up-to-date this way. + Many thanks to jbarnes for writing exa-driver.txt which was used a lot + in writing this documentation. + +commit d8f8bfeccef0750d79f852b9ae7152e841227d5a +Author: Matthias Hopf <mhopf@suse.de> +Date: Thu Mar 9 14:23:57 2006 +0000 + + Do Xorg configure checks for Xgl only as well + +commit 2822cbc1fb2271844e7ae10c3629aaa940ae4042 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Mar 9 06:04:07 2006 +0000 + + Rearrange EXA driver structures so that there's a hope of maintaining ABI + when extending the driver interface. The card and accel structures are + merged into the ExaDriverRec, which is to be allocated using + exaDriverAlloc(). The driver structure also grows exa_major and + exa_minor, which drivers fill in and have checked by EXA + (double-checking that the driver really did check that the EXA version + was correct). Removes exaInitCard(), which is replaced by the driver + filling in the rec by hand, and the exaGetVersion() and related + EXA_*VERSION which are replaced by always using the XFree86 loadable + module versioning. + +commit 65aa33f9173b1554924437685698f7c5f645a3c4 +Author: Lars Knoll <lars@trolltech.com> +Date: Wed Mar 8 06:19:37 2006 +0000 + + render/picture.c Initialize the format of a source picture to + PICT_a8r8g8b8. Fixes a failure in the gradients test of rendercheck. In + the long term we could do better by setting the format to something + without alpha whenever the gradient doesn't contain colors with alpha. + This triggers a reduction of the over operation to a pure source + operation. + +commit cb5090e8d60f4e9780c859faeea5c24587f6bee7 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Mar 8 03:32:07 2006 +0000 + + Bug #6150: Do the obvious fix of an insane sanity check in + xf86InitFBManager. (Julio M. Merino Vidal) + +commit 2e6f801fe1a749f6a4db2cfd8a43abec5caceae0 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Mar 7 23:58:22 2006 +0000 + + Numerous amounts refactoring and comment adding (see ChangeLog for file by + file details). The primary intention for these changes is to pave the + way for the new device probing and PCI configuration code that I'm + working on. + +commit b7d2dfc1e5e07051732303731ff3e4e76852dd94 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Mar 7 20:06:15 2006 +0000 + + Add appropriate MIT license. Oops. + +commit 9d8c0e4bcbb111e860b7c3c33c224c22589006b1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Mar 7 19:57:46 2006 +0000 + + Add a new flag to ephyr, "-fakexa", which turns on an EXA acceleration + implementation that calls fb to get its work done. The purpose is to + have a trusted EXA driver for use with testing changes to the core of + EXA. However, fakexa has not received much testing yet, lacks offscreen + pixmaps support, and doesn't reliably provide garbage when EXA doesn't + get its syncing right. All of these should be fixed soon. + +commit 0a3d6c739968bf5af81fc0e8ea7211c20d52080b +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Mar 7 19:49:31 2006 +0000 + + Remove stale EXA files, which failed to get removed during the move to + top-level, somehow. + +commit 68a8963f726cb92624665669813b6d952d53556e +Author: Luc Verhaegen <libv@skynet.be> +Date: Tue Mar 7 16:00:57 2006 +0000 + + Fix cvt -r check again. CH7011 TV encoder had 800x600 PAL hit the check. + +commit 0693083335185ce05ee64546151f3fc43ce98575 +Author: Lars Knoll <lars@trolltech.com> +Date: Mon Mar 6 21:00:09 2006 +0000 + + render/picture.c Correctly initialize devPrivates variable in source only + pictures to 0 + miext/cw/cw.h Don't try to access devPrivates of source only pictures + +commit 448997ebcd2bab02be1059b07b91b63b0d05d268 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 5 16:43:10 2006 +0000 + + Only output SetClientVersion message if verbosity > 1, like other + extensions do + +commit d921173833cc207380eb08b6675393f5e8139d5f +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 5 16:35:08 2006 +0000 + + define SYS_LIBS to hold system dependant libraries that may needed. and add + it to libraries list where needed. Update ChangeLog for previous + changes too + +commit 82cbd2ee0d20225b9edbb5246c8ed116b4614e1a +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 5 16:33:17 2006 +0000 + + Don't hard-code -DUSE_DEV_IO here. configure generates the proper OS + specific values here. + +commit b56a1513d27f84dcd55f3dc6053f183aa6f7855b +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 5 16:32:40 2006 +0000 + + Definitions for bswapxx() macros on OpenBSD. + +commit 4335868476af7c821c64def52b102b93ae91f8b0 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Mar 5 16:13:21 2006 +0000 + + Fix build with non GNU make. + +commit b2f8f410c0bb8bc24039b2a593f8a2a483659914 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Mar 3 09:54:54 2006 +0000 + + https://bugs.freedesktop.org/show_bug.cgi?id=4341 Make Xming error messages + more meaningful. + +commit 29237c1977e454511e0d0244c68d34d572b68458 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Mar 3 09:50:55 2006 +0000 + + https://bugs.freedesktop.org/show_bug.cgi?id=4538 Fix mouse button release + on multiwindows scrolling. + +commit 06f01623fde61f1a11c2c1ecfae6a4c346473b05 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Mar 3 09:43:42 2006 +0000 + + https://bugs.freedesktop.org/show_bug.cgi?id=5138 Check for NULL pointer + +commit 054c291b274b238893e408e070aef13a7933400b +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Thu Mar 2 18:35:08 2006 +0000 + + Fix build against Mesa CVS HEAD: added s_blit.c to symlink-mesa.sh. + +commit c1a82b9554028640dc4e08f042f1a8faf3372627 +Author: Brian Paul <brian.paul@tungstengraphics.com> +Date: Thu Mar 2 03:43:26 2006 +0000 + + added s_blit.c file + +commit 5f4d11c8d926cf396e0a8e203e14a8e1e123e011 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Wed Mar 1 16:31:53 2006 +0000 + + fix spelling error, document EXA_TWO_BITBLT_DIRECTIONS device flag + +commit 044a3abb382a4850722c391f04d09d3160790814 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Wed Mar 1 16:28:34 2006 +0000 + + Add accelerated two directional blt support to EXA + +commit 96ca329382141fd50dccb1cc35a71a333d80bce4 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Feb 28 23:07:09 2006 +0000 + + Remove redundant definition of struct Inst. Safeguard xf86AddDriver against + future additions to DriverRec. + +commit 1cfa9f647e0241f4b9e56556b128d7bfd987eaca +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Feb 28 16:55:26 2006 +0000 + + Bug #5216: Allow options to appear with other components. + +commit e3b6b95f29cb2ea00b4290d694c5e202b8d180ad +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Feb 28 16:26:16 2006 +0000 + + Bug #5627: Fix Xprint font symlinking. (TIlman Sauerbeck) + +commit e7f0b84fa7bd0c40cb456ec4e447103442c8dae3 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Tue Feb 28 05:20:20 2006 +0000 + + fix exaInitCard by making it a real function + +commit 088e5768faa90fe16de41b135b1111b5d25c64ad +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Mon Feb 27 18:12:24 2006 +0000 + + Fixing the Mesa build again, sigh. Add slang_execute_x86.c. Add + -I../shader/slang to swrast INCLUDES. + +commit 345d99c972cac67f2cdc38750e4ba2dea1cdb360 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Feb 27 16:19:39 2006 +0000 + + Typo fixes (Nicholas Joly, XFree86 bugzilla #1658) + +commit 6b08a5013b4e9e350ba461c9a59d30bb41feef8f +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Sat Feb 25 20:26:49 2006 +0000 + + EXA driver doc cleanups and additions. + +commit f41ec003f39c575299429897d4287233184583ad +Author: Roland Scheidegger <rscheidegger_lists@hispeed.ch> +Date: Sat Feb 25 01:17:10 2006 +0000 + + Add two radeon pci ids (one is used for a radeon mobility X700 XL in a + medion notebook, the other is for a AIW X800 VE) + +commit 01a0bf881ada03ca3c27bdef7423c760c3bc2f9c +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Feb 24 17:01:57 2006 +0000 + + OpenBSD supports PCVT and WSCONS. PCCONS is long gone. + +commit d3e1587c20c155b7873b6646ddf0b96f806f8a7f +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Feb 24 16:50:42 2006 +0000 + + file glxdri.c was initially added on branch accel_indirect_branch. + +commit 5d9a620726d2b0ad89625574478d2fd4536485b0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Feb 23 19:25:57 2006 +0000 + + Remove redundant composite op reduction, done in Render now. + +commit 028d6903f674fa77617f333b25356710d1682b05 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Feb 22 16:29:07 2006 +0000 + + Bug #5978: Added missing swap of input variables. Added missing cases for + GL_SECONDARY_COLOR_ARRAY and GL_FOG_COORD_ARRAY (Colin McDonald) + +commit 43324132afcbb6b231efcc24ec72ee44678d5771 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Feb 22 16:08:56 2006 +0000 + + Added Mesa include directory + +commit 43fbcc28c960ce5abe1d3223441c3dc5a10cde27 +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Wed Feb 22 02:47:00 2006 +0000 + + Update to build against Mesa HEAD. (Thank you Felix for feedback on xorg + list.) + +commit cfdacab33a62b47f22bb54683e3ca20ec9824864 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Feb 21 00:02:08 2006 +0000 + + Eliminate unused PCI BIOS reading functionality. The old code used several + function pointers to implement a level of flexability that was never + used. The code also had unused support for extracting a single image + type from a larger expansion ROM. + Fix the spelling of PCI_BIOS_OPEN_FIRMWARE. + Fix a couple errors in #ifdef debug code. + These changes have been tested on x86 and x86-64 Linux. + +commit 5fd0f94006775e2271107c960dfa3314dddd9a5f +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Feb 20 23:45:50 2006 +0000 + + Eliminate all the code for querying the PCI class from the PCI ID database. + Class information is not, and never has been, stored there. Therefore, + this is just a bunch of elaborate code to read 0x00000000. + This has received testing on x86 and x86-64 Linux. + +commit 6d7083bd69724586338d79784655328f1fcd2ae5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Feb 20 22:16:49 2006 +0000 + + indent fixes (OMG SO UGLY), and nuke old RCS keywords. + +commit 5480c537cee79b324736eac3e438a4713dfa1036 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Feb 20 21:50:49 2006 +0000 + + ANSIfy Xi/. Mostly automated via protoize(1). + +commit cc42e153c2437fe9c94b0c20e1b56277474d94d0 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Mon Feb 20 03:00:09 2006 +0000 + + Update to build against Mesa HEAD. + +commit ed3ea887a6b1c9fdc83895c40da34076121f05e9 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 21:49:51 2006 +0000 + + Fix the encoding of DES's name. + +commit ea0b3f65f77a78df1671b09739c00762a8875607 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 21:45:12 2006 +0000 + + Fix build of Xorg by putting xf86bigfont back into builtin instead of + module sources list. + +commit d97f29be22e22e6f5bc23229ffa5ef087f992c8c +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 21:35:32 2006 +0000 + + Bug #5453: Don't forget to still do AM_CONDITIONAL for XVMC even if XV is + disabled, and also force XVMC disabled if XV is disabled. (Dag-Erling + Sm�rgrav) + +commit d33c2e0d1079f93f4ba8b28d19950d384a9e7c32 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 16 19:36:39 2006 +0000 + + Add oscolor.h + +commit 60d4839a2d373cc6d8c0d5004284494d3a994a63 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 16 19:03:07 2006 +0000 + + Forgot to include this file in previous patch + +commit 8987b2c1efc9a4667e278e6ba411772ba2a4a4e6 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 16 07:17:31 2006 +0000 + + Make more extensions optional in build (for kdrive). Fix kdrive build for + actual hardware. Fix kdrive pointer signed/unsigned types. Add + kdrive-required YX rotation functions. Replace rgb text file loading + with static rgb color table. + +commit c8acb342695936db062c966029019a458d45459e +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Thu Feb 16 06:52:12 2006 +0000 + + Fix an occasional crash on VT switches: the server would save a pointer to + the current cursor when disabling FB access and would try to restore + that cursor when re-enabling. However, that cursor might have been + destroyed in between. This fixes it by updating the saved cursor + pointer when a cursor is set and vtSema is FALSE. + +commit c845e152f52b3e8cef579797c5c8834ad2fd2cd5 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 05:46:08 2006 +0000 + + Bug #5871: Drop special build infrastructure left over from libcwrapper + times. (George Fufutos) + +commit c2f685e64464ccf86ed47ae37f74bf46877e0739 +Author: Dave Airlie <airlied@linux.ie> +Date: Thu Feb 16 05:18:20 2006 +0000 + + Fix XSERVER64 should be _XSERVER64 + +commit 1bbd5e49b1dcc2e3f9785bd2bb58f946b9998099 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 04:59:45 2006 +0000 + + Bug #5869: Remove traces of EXTMODULE define, which doesn't appear to be + useful any more. (George Fufutos) + +commit c03b06bdf04fa8500d0f85314c7268848b4d50be +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 04:39:00 2006 +0000 + + Bug #5888: Remove orphaned laymodule.c from miext/layer removal. (George + Fufutos) + +commit 3b32e902c7a12aa2320da27d984029cde28fd8c3 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 01:49:23 2006 +0000 + + Add entry missed in my last commit. + +commit c4767794ef5b014ae25fe8541e72348ecfb1ee49 +Author: Zephaniah E. Hull <warp@aehallh.com> +Date: Thu Feb 16 01:03:09 2006 +0000 + + Export xf86ActivateDevice, used by the evdev driver. + +commit dc0354104cb4057dfcc7b2ccb8e2ae8474d70b15 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 16 00:14:11 2006 +0000 + + Move EXA implementation up to the top level and remove its XFree86 + dependencies. It was nearly abstract enough already to be used by + multiple DDXes. This will be useful for EXA development through + providing a fake acceleration implementation within Xephyr, so that + testing can be done on new EXA code without worrying about buggy + drivers. + +commit c170aa830d0ce3dbff6b30081e04c3f91bf921be +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Feb 15 23:27:40 2006 +0000 + + Forced commit to note repocopy from hw/xfree86/exa/ + +commit 6770f1bdb145e7a6c431d0523f10d12155f58273 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Feb 15 21:09:14 2006 +0000 + + Define NO_LIBCWRAPPER in dix-config.h, and rely on Mesa including + dix-config.h if DIX_HAVE_CONFIG_H is defined to get it and _XSERVER64, + instead of defining things like this per directory. + +commit 7d7fc927cd90146788780477b8e3379d91c3b910 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Feb 15 20:47:44 2006 +0000 + + Remove a few #ifdef vms; whatever problem that was solving should assuredly + be solved some other way. + +commit f105b8da11fcf337512b3c39da3368f98da07a33 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Feb 15 20:44:13 2006 +0000 + + Mark everything in dixsym.c as _X_EXPORT. + +commit 010d6effa6fa210251b12459882e88aeee82c2c0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Feb 15 19:15:32 2006 +0000 + + Mark everything in {ext,font}sym.c as _X_EXPORT. + +commit 3fe482c77e7b3e46739d011d8bbdee527d7a42fc +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Feb 15 19:05:55 2006 +0000 + + Mark everything in misym.c as _X_EXPORT. + +commit 6ad4325b87889e1aada9333d750b7bb586c38b52 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Feb 15 18:26:45 2006 +0000 + + Update to build against mesa head. + +commit 50e2ff9a2500078ebbd833fddab0d93f3a50b6a6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Feb 15 03:20:55 2006 +0000 + + Remove the waitSync from KdDisableScreen and push it off to drivers' + disableAccel hook, which is more correct anyway. This makes kdrive.c + not have any knowledge of kaa, opening the way for using exa from + kdrive. + +commit 0446aafa9467f43515fb578d50f45e2c3153c8cf +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Feb 15 03:07:23 2006 +0000 + + Avoid some more libcwrapper damage that prevented kdrive linking. + +commit 5c9b6f0fb01252d704de1bbdf3015dee7f956593 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Tue Feb 14 08:14:42 2006 +0000 + + DRIGetSecs() would call getsecs() when XFree86LOADER is defined, relying on + the wrappers to provide it. Wrapper gone, and getsecs doesn't exist on + linux so it now blows up. Fixes it by just calling gettimeofday() in + all cases instead. + +commit 049dca0f43eb2179d2c61033a17ff1a89f8fb689 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Tue Feb 14 08:11:41 2006 +0000 + + Remove useless line of code that contained a bug and triggered a gcc + warning. This variable will be overriden before being used anyway. + (Bugzilla #5595) + +commit 1132d0e6102d4564f70f0e8c98854e3acf25b109 +Author: Dave Airlie <airlied@linux.ie> +Date: Tue Feb 14 06:27:59 2006 +0000 + + update to latest Mesa CVS HEAD + +commit bb8c36690ab411c11aa8dd3d4520d513eb8f9091 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Feb 14 04:20:37 2006 +0000 + + Bump shadow module version number to 1.1.0 from 1.0.0 + +commit cc9dfab0b31c7956f99d1f1b9c195065b5e18c29 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Feb 13 18:57:38 2006 +0000 + + (Reverted) + +commit 83dd6241c8cd81e8d897bd17588ada92a945e647 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Feb 13 18:55:44 2006 +0000 + + Reverted, did nothing anyway, I'm not smart today. + +commit 4a7f6f53cad541e8c5042a6472e3b3886fc9b7e6 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Feb 13 18:09:51 2006 +0000 + + Further op reduction when both src and dst alpha are absent. + +commit 28ced9f3e0dd4bd81067f590a1d64ba0844edb06 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Feb 13 05:29:00 2006 +0000 + + Add missing ChangeLog text for r1.2 of GL/glx/indirect_reqsize.h + +commit 4839e91fcab4c344e672154a447d8c7035fce1f4 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Mon Feb 13 05:03:13 2006 +0000 + + HAS_MKSTEMP vs. HAVE_MKSTEMP (From Fredrik Höglund) + +commit 1a4f20541a9f4f41f444d826d743899ea2dee2db +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Mon Feb 13 04:56:27 2006 +0000 + + Fix linux build without libc wrappers (From Fredrik Höglund) + +commit 2dc7b5e0d96a187bfbb355caa788f0fdcd88eaad +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Mon Feb 13 04:43:40 2006 +0000 + + Move call to xf86WrapperInit() to OsVendorInit() in xf86Init.c and remove + stubs in other DDX. + +commit 34d0b9228f46c2f87be74dddc9c7d97aab091d03 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Feb 12 20:53:35 2006 +0000 + + Simplify ops that would use the alpha channel when an alpha channel is + always 1.0, and short circuit PictOpDst for good measure. + +commit 5f45776ef3b9256bea44842d1c50f269422531a1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Feb 12 10:30:47 2006 +0000 + + Add missing HAVE_DIX_CONFIG_H which caused issues with mismatched screen + structure interpretations, and remove a bunch of unused junk from + kdrive-config.h. Xephyr almost works on my amd64. + +commit 5249416d091d59c248c8dda44529b8aa4910b1a0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Feb 11 22:40:50 2006 +0000 + + Add stub xf86WrapperInits so that the servers will build even if os/ was + built with XFree86LOADER set. + +commit a2a5254675a6b7ef0f7da9caa76c028b7c526502 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Feb 11 19:16:51 2006 +0000 + + Add <string.h>, <stdlib.h>, and <stdio.h> to clear undefined function + warnings after the removal of libcwrapper headers. + +commit d6337c83241f0fa4bb03039a9767b58d8a1a7c91 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Feb 11 17:42:31 2006 +0000 + + <sys/limits.h> -> <limits.h> so we can compile on non-BSD OS'es + +commit 4fafba61d5402d4e4d2c21ba1be3ed8969b99334 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Feb 11 03:03:45 2006 +0000 + + Remove libcwrapper damage from GLX (requires fresh Mesa HEAD), and get it + compiling in kdrive. + +commit c3d14036729fd186d4ec7ca1de603e1f2d174e2f +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Feb 10 22:00:30 2006 +0000 + + Remove libcwrapper usage from xorg server modules. The libcwrapper is only + of (marginal) use in the drivers, and that usage remains. + +commit a8cec1b656f57746758613213de1d6e5acb79451 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Feb 10 09:00:02 2006 +0000 + + Merge from kdrive: use RECT_PRIM to avoid tearing in xvideo. + +commit efc3fab7f4b29f56fffd21304c64c03a48aa5b4b +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Feb 10 07:52:05 2006 +0000 + + Make kdrive (i.e. Xephyr only) buildable on FreeBSD and probably other OSes + without linux VT switching, fbdev, and vm86 support. + +commit fa3a65e33d8c893c7867ea507afc7caa1361aa9c +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Feb 10 07:47:21 2006 +0000 + + Remove the include of X11/misc.h, which fails to compile and isn't + necessary. + +commit d875bdb2756b082ce93bd86016c369ea85c04d17 +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Fri Feb 3 02:44:19 2006 +0000 + + hw/xfree86/os-support/xf86_OSlib.h Fix sysmouse handling on DragonFly, + mostly garbage arrived. From Joerg Sonnenberger. + +commit 0946bb9427695a4314e5c43de573b3a75a18e466 +Author: Jeremy C. Reed <reed@reedmedia.net> +Date: Fri Feb 3 02:37:52 2006 +0000 + + Fix sysmouse handling on DragonFly, mostly garbage arrived. From Joerg + Sonnenberger. + +commit 5e2a7af23bd0f46fbddca34098cb297be58b7a55 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 2 21:07:06 2006 +0000 + + Move the frequently-repeated code to get the pixmap that backs a drawable + to a new function, exaGetDrawablePixmap(). + +commit ee3c7ccb175752dbeaed6b0113d0819b3fcd2398 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 2 20:51:54 2006 +0000 + + Remove more debugging leftovers. + +commit 3366b6836572461209bb2f8aa28d9e662067dc54 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 2 20:09:14 2006 +0000 + + Rearrange and rename EXA code to be a bit more logically organized. Also + removes a little bit of debugging leftovers. Summary: + exa.c -> exa.c (miscellaneous code) exa_accel.c (all acceleration code) + exa_migration.c (migration logic) exaasync.c -> exa_unaccel.c (software + fallbacks) exapict.c -> exa_render.c (render extension stuff) + exaoffscreen.c -> exa_offscreen.c exaPriv.h -> exa_priv.h + +commit 25d4ff870d49533d82a77f144722ff7934d52e0b +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Feb 2 20:04:15 2006 +0000 + + Forced commit to note repocopies: exa.c -> exa_accel.c exa_migration.c + exaasync.c -> exa_unaccel.c exapict.c -> exa_render.c exaoffscreen.c -> + exa_offscreen.c exaPriv.h -> exa_priv.h + +commit 2ab487d4d20e4e34e73cc6d87f41bf0836c7a8af +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Feb 1 22:20:05 2006 +0000 + + Add a new function RRGetRotation() which does exactly the same thing as + xf86GetRotation(), but allows for drivers to provide their own RandR + implementation. xf86GetRotation could be obsoleted by this change. + +commit f4898b409376803c9a9dd8475bdd5576ff1cc59d +Author: Luc Verhaegen <libv@skynet.be> +Date: Tue Jan 31 14:49:43 2006 +0000 + + Further bug #5386 fixes: Fix some problems with the EDID code: Some + bitoffsets were wrong. Unknown Detailed Sections weren't handled + properly and defaulted to Detailed Timing. + +commit 437b385ce4cc3ff00e14d3d39f4a2f6c8f0c67a0 +Author: Luc Verhaegen <libv@skynet.be> +Date: Tue Jan 31 13:55:01 2006 +0000 + + Bring the cvt utility up to date with bug #5386 changes. Fix 2 issues with + the generator routine: the allocated modeline wasn't nulled and + mode->name's \0 wasn't copied over. PrintModeLine was rewritten and + HDisplay gets rounded up to character width instead of refused. + +commit 8f3c69dcf17691f71bca7b0a2cd34f7788a97b8c +Author: Luc Verhaegen <libv@skynet.be> +Date: Tue Jan 31 13:04:02 2006 +0000 + + Accept modes with less than 25% horizontal blanking again (you can push old + gtf timing to below 25%), only stop cvt reduced blanking. Users should + be free to blow up their monitors if they so choose. + +commit 701b63cf1dcd3e49602114fb1dde45a74b4e1122 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Mon Jan 30 20:04:56 2006 +0000 + + Update to build against Mesa trunk. + +commit dd50015b05b901fe0c60717512c854389610aea2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jan 28 02:20:37 2006 +0000 + + Add libc_wrapper support for random(), which will be used in upcoming EXA + memory manager work. + +commit 3d1667278ff309d7f8e61a6d330f712bae5bcd41 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jan 28 00:37:52 2006 +0000 + + Remove leftover variables for cfb24 build, and finish commenting out Xglx + standalone stuff, which some versions of automake get whiny about. + +commit ab01eb247f9e5d7c9995bf2d6432358cd64bf11d +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Jan 27 12:27:34 2006 +0000 + + update pci ids + +commit 261aa4403c77203f8f02b399ddd382c731dda324 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Jan 26 09:04:22 2006 +0000 + + remove that, and will put it in a i810 driver specific Changelog + +commit 94e678fd014c61d12591d7398b6591f24c3d71f1 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Jan 26 08:49:19 2006 +0000 + + add changelog for i810 updates + +commit c5e93182905332383ca3ef5db3f334cec69c8dda +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Thu Jan 26 04:32:45 2006 +0000 + + Really allow linking against Mesa trunk to work. + +commit 0dc0f17f27f99da79c99031b41b0c0e95ef035f5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jan 26 04:10:43 2006 +0000 + + Speed up checkout and autogen by removing disused iplan2p4 and ilbm. + +commit 023d2b4e3c392eed1f149dc5b13a83429cd052a3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jan 26 00:23:44 2006 +0000 + + Add forgotten HAVE_BACKTRACE define. + +commit 14fdd81614cdd6ef7e01976a43da8b6a3bf8386e +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jan 25 23:05:26 2006 +0000 + + Remove xf8_32wid, it's dead code with no maintainer interest. Also remove + cfb24, since xf8_32wid was the only user. + +commit 2e28f4104ddf94a8f9a70fe6b2a2a6859ffedc8f +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Jan 24 22:05:33 2006 +0000 + + Allow current trunk to build against Mesa trunk + +commit 0d9ed2624fe8fb95c57930da523351556ba11351 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Jan 23 22:01:34 2006 +0000 + + Commit #4633 - Initial mouse pointer incorrect with EXA which also fixes + the repaint of the cursor image with randr events. + +commit 9148d8700b7c5afc2644e5820c57c509378f93ce +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Jan 23 13:59:14 2006 +0000 + + Commit slight variation of bug #5460 which is the merge of the new shadow + code from kdrive. + +commit cfd3988ed906ab48ca4362256f8dbb8852d7ca0a +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Jan 23 13:58:19 2006 +0000 + + wrap with if XORG / endif + +commit f51ecc66e9ad6d2c3541b1dafa7659da5a0a3a86 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Jan 23 13:54:59 2006 +0000 + + #include "gcstruct.h" + +commit 80f45fa4dfa011c2ae7bcb34f87aafb91763f1fe +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Jan 23 13:54:34 2006 +0000 + + add damage.h & damagestr.h to SDK headers + +commit af5b3ea4b3df9e9c6dd6993c5e7238a366a3f508 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Jan 19 14:51:09 2006 +0000 + + add randrstr.h to sdk_HEADERS + +commit 03ebd37baba2f5af3ab502ff02ec14c15859dc3f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Jan 19 12:25:01 2006 +0000 + + Make error() bomb with exit code 1, not 0. + +commit adce1f16e0d815e5c762407da3544a7d2eff9303 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 19 00:06:57 2006 +0000 + + Only try to use byteswap.h on linux. Assume that everyone else (thinking of + BSDs here) has sys/endian.h, and use macros as appropriate for the + names. This should probably be in a gloabl header. + +commit 1c3f8727b2349c9b988eaa744f11366322d42538 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jan 18 19:42:56 2006 +0000 + + More kdrive merge, fast path fbBlt to use memcpy() when possible. Good for + -5% to 60% speedup on XGetImage, and 0% to 10% speedup on copies within + host memory. Based on work by Jaymz Julian. + +commit e70b64b93024d05519014fb1b76fe26bd9f3a496 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Jan 18 07:15:55 2006 +0000 + + Updated xgl code drop from Novell + xserver tree changes + +commit b5356e0afaf2b660c8905f63d5fdcb03402b81c5 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Jan 18 07:00:50 2006 +0000 + + typo in last change + +commit 506eca5f57b960a6650c3387047a6ae8a22181e9 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Jan 18 06:56:52 2006 +0000 + + Wrap sdk_HEADERS in if XORG as otherwise installing non-xorg servers + breaks. + +commit 8ccf4f2b8fdb5e57d2ec5f2d54731fbf83fb9d8c +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Jan 18 06:49:17 2006 +0000 + + This is a fix from David Reveman from the xserver tree, Make fbPadPixmap + work with negative stride + +commit a1f9262c6acd195c0fcf5f602d5ca0c252993521 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Jan 17 21:27:49 2006 +0000 + + file glxvisuals.c was initially added on branch accel_indirect_glx. + +commit c2dedf4d17f8a5b1a8037fd2b4e29122ef78945a +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Jan 12 22:14:56 2006 +0000 + + Thu Jan 12 17:09:18 2006 Søren Sandmann <sandmann@redhat.com> + Add new functions to enable and disable events on Map and Unmap. + Use them here to make sure Composite redirect doesn't cause Map/UnmapNotify + events that would confuse window managers. + +commit 847d83ec3c90c5b298eaf19ba55251b4a30f4155 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jan 12 00:21:59 2006 +0000 + + Bug #2996: libglx / libGLcore should use a dispatch table + Port all changes from the (monolithic) accelerated_indirect-0-0-1 branch to + the modular trunk. This will break the Darwin and cygwin builds. Other + than the changes to symlink-mesa.sh and the various Makefile.am files, + to code is identical to what's in the branch. + Reviewed by: airlied, krh + +commit c56e9a8849ce8dd5c09732ae1860e409e7886690 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jan 10 03:24:53 2006 +0000 + + Bomb when symlink-mesa.sh continues, instead of silently failing. + +commit 2949c705f11f8710301555c039bcecbe748cabd9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jan 10 03:23:05 2006 +0000 + + Add all subdirs used to DIST_SUBDIRS, and files to EXTRA_DIST. + Attempt to build xeglmodule.c, not xglxmodule.c. + Add xf86Sbus.h to EXTRA_DIST, as _HEADERS doesn't appear to get the same + treatment as _SOURCES in terms of automatically DISTing. + +commit 4fc9eb592a446ad5711bdaa82c60e9fe010fd76a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jan 10 02:32:20 2006 +0000 + + Bomb out if symlink-mesa.sh failed. + +commit 890ec849479db2510a9b4bc5e5e2f7978ca37b83 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jan 10 02:30:56 2006 +0000 + + Add xgl to DIST_SUBDIRS. + +commit 53dbd00a75313ec5301ca95b2e91d5d02bdaf820 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Jan 8 23:43:54 2006 +0000 + + Remove remaining #ifdef DPSEXT stanzas. + +commit 7fc9bc44e099f8f046bf707cb87ef7d736933f80 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jan 7 01:29:05 2006 +0000 + + Compile fix, again, stupid non-clean builds + +commit 9d62d1e6903ccc095f784279a699b3f40a8f0cf8 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jan 7 00:45:17 2006 +0000 + + Bug #5218: Don't crash on unconfigured interfaces. (Andrei Barbu) + +commit 3c58072956c28ebc3ca2eb50c1ff09823e1219d7 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jan 7 00:33:41 2006 +0000 + + One more build fix. + +commit 07303c1b42afd1ada98cbc11d1ba616d366017fb +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jan 7 00:05:46 2006 +0000 + + This version will actually compile + +commit 7f46aba35ee482e9b28ecc81d1a99d423fc88a70 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jan 6 23:52:23 2006 +0000 + + Compile fix + +commit 25babf2791ad42101a86ba2a0f14564328256ee2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jan 6 23:36:53 2006 +0000 + + Missed file. + +commit 13c9e0c094c4e34cd1e43a7cc08b2dca39a32412 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jan 6 23:06:15 2006 +0000 + + Bug #5525: Build a working Xprt. (Drew Parsons) + +commit fe0c838b5d8bc8d9cf5a686bb7d3e90682d2d19a +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jan 6 18:06:02 2006 +0000 + + Move drawable lock acquisition into DRIClipNotify from DRIValidateTree, so + we only take it when clipping a DRI drawable instead of on every tree + update. Note drawable lock acquisition per- screen instead of globally, + and drop it in BlockHandler if necessary. + +commit 39ce5f1544029412f4060f3e89ce1d87222ef42b +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jan 6 17:05:26 2006 +0000 + + Remove unused X11R4 DDX compatibility function miClipNotify. + +commit 07ecb969d7eb8d4ab0bb0b8a55a5f40f3c8ec5e3 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jan 4 03:29:15 2006 +0000 + + Forced commit to note that glyph privates commit was: + Obtained from: xserver tree (David Reveman) + +commit b6b88d2f62d8c596171f487dd25fbdbc85d0c5a8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jan 4 00:05:16 2006 +0000 + + Correct rounding in divide-by-255 code. Obtained from xserver. + +commit b9c0ae867e1b52186c26841a77745f7f5a0a76dd +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Jan 3 22:36:46 2006 +0000 + + Remove the manual AddFilter for convolution, which I'm pretty sure + shouldn't be necessary due to it already happening from + PictureSetDefaultFilters. + +commit 601ab861b46a62b0742ffd3e937c4fab129664f0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Jan 3 22:06:23 2006 +0000 + + Add glyph privates for Xgl, which uses them to implement a glyph cache. EXA + would probably also like to do this. This breaks module ABI for EXA and + XAA, and likely breaks proprietary drivers as well. + +commit 1729fc882ceec392331566c95efd5968fe9e97fd +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Dec 31 08:06:00 2005 +0000 + + Change REGION_INIT(pScreen, &foo, NullBox, 0) to REGION_NULL(pScreen, + &foo). While it is no longer (or rather, once again not) required as of + regionstr.h r1.4, it matches the style of the rest of the xorg code. + +commit c25536a7937b11a5347bfb8796d5cb6eb0445b51 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Dec 31 08:01:31 2005 +0000 + + Initialize the fourcc value in stack-allocated glitz_pixel_format_t + structures. Greatly reduces the number of uninitialized-value accesses + during Xgl startup according to valgrind. Allocating and filling these + in by hand on the stack seems very shady to me. + +commit e6dab3d7c429a2d30d31f188c4554e870011e051 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Dec 30 12:05:47 2005 +0000 + + Fix the AC_TRY_RUN for sys/linker.h which had no hope due to lacking a + main() to instead use a nice AC_CHECK_HEADERS that works. Also, fix the + nearby SYSV IPC check which was lacking an argument and giving bogus + results (it's "AC_TRY_LINK(includes, main, yes, no)"). + +commit eef16c36ad6e90fd8eaad4d8bdbc1205bc28a66f +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Dec 30 05:44:14 2005 +0000 + + Add #undef BSD44SOCKETS, without which the listener socket on FreeBSD would + be created without the port number due to xtrans's define not being + used when xtrans was compiled in the X Server. + +commit 7aa0ea23bc9b8df582fe06f2bc39dcfe34583c7e +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Dec 30 04:11:42 2005 +0000 + + Add an empty all-local target for FreeBSD make's sake, which doesn't deal + with .PHONY. + +commit 49a9249239b0dd105b83a101db6e32549978f0d5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Dec 29 21:11:41 2005 +0000 + + Make kdInputMachine static const, shrinks .data a bit. + +commit 6d7ee4167d9daeef9b793789a70aa724c4fe6bf4 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Dec 29 20:54:08 2005 +0000 + + Style fix, make SCREEN_EPILOGUE two arguments instead of three. + +commit b1efb3810cfea8116d76bae3ff3acfee521f4793 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Dec 29 20:42:54 2005 +0000 + + Missed one + +commit 858b4bc14a7adc7314ce5043c7ff8ca1891dd0c9 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Dec 29 20:38:29 2005 +0000 + + missed changelog entry: + Enough build fixes to get {sdl,ephyr,fake} to link. + +commit 54922aeadb29df0a1819afd3f616131aa56e140a +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Dec 29 20:29:26 2005 +0000 + + Disable building LBX by default. + +commit fc69a2e729532ee062af6676fb187a89f7fffe8a +Author: Dave Airlie <airlied@linux.ie> +Date: Thu Dec 29 08:42:49 2005 +0000 + + Remove PowerMAX_OS define it never worked , it'll never work again, + finishes running joke of OLS2005 + +commit 25d3852b833bc0b61ce8313ce116251a2602b827 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Dec 29 00:44:20 2005 +0000 + + Undo spamming of libv's ChangeLog entry. + +commit d6646307f063b938c44d6193a2e8872e178aa90f +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Dec 29 00:19:33 2005 +0000 + + Add necessary *CONFIG_H declarations and a force-off of XF86* extensions in + miinitext in the XGL case. Prevents mismatched structure sizes on my + _XSERVER64 machine. At this point, with the uncommitted render/ diffs, + Xglx starts up but displays badly. + +commit 3664c3ebf348d07ae3fe301fb8720adf32cf6d64 +Author: Luc Verhaegen <libv@skynet.be> +Date: Wed Dec 28 15:22:21 2005 +0000 + + Bug #5153: standalone CVT modeline generator. + - add hw/xfree86/utils/cvt/, cvt.c, cvt.man.pre and Makefile.am. + - Adjust configure.ac and hw/xfree86/utils/Makefile.am for cvt. + - Add MonPtr->reducedblanking and Option "ReducedBlanking" to the Monitor + section. + - Check for reduced blanking in xf86CheckModeForMonitor and disallow modes + with less than 25% blanking otherwise. + - Fix some warnings in hw/xfree86/common/xf86Config.c. + +commit 08708f7d616a7c0a596fb71dd7acd76d45257fec +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Dec 28 11:48:14 2005 +0000 + + Merge from xserver: Make the existing ChangePictureFilter and + ChangePictureTransform screen hooks get called at appropriate times. + +commit 31d0fdde19598ce9375cc9638ad4e2c8b5af8d9a +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Dec 28 10:46:56 2005 +0000 + + Remove a debugging printf + +commit 64ac7401ad5022462279dff4dcfb12844c9857ae +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Dec 28 10:43:02 2005 +0000 + + Fix a copy'n'paste-o that would result in mis-rounding of the results of + several composite operators in A and G channels. + +commit 9ceffb6b92e55f0d74d71489900d43940f14dfd9 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Dec 28 10:37:17 2005 +0000 + + Merge from xserver a header for shm's server internal functions, which are + called by DDXes. Desired by XGL, and should be used in other locations, + probably. + +commit b1b40ed6a87f72d07825624730cca193d5a89baf +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Dec 28 10:31:46 2005 +0000 + + Initial commit of XGL build infrastructure and XGL code changes for + building within the xorg server tree. Requires additional, uncommitted + dix changes to successfully build, and successful running is still yet + to happen. + +commit 36061c75ae42aa733cde9b3fd05e0c8280b31655 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Dec 28 10:10:59 2005 +0000 + + Forced commit to note repocopy from xserver CVS as of a few minutes ago. + +commit 05c139d4cdfd11d39c0168d0c80ac1dbdd069b4c +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Dec 28 10:02:54 2005 +0000 + + Enough build fixes to get {sdl,ephyr,fake} to link. + +commit aeb770f645e2d591b255ec4ab06addcb1beafa5f +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Dec 28 02:43:50 2005 +0000 + + recommit previous changes to evdev.c + +commit ce7c0c89375ec74f89ae5727998fd75fb768d280 +Author: Dave Airlie <airlied@linux.ie> +Date: Wed Dec 28 01:57:11 2005 +0000 + + some updates for default colormap install + +commit 022aa1127c7dcd133ce73dbc12a10bfba8b1ed6e +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Dec 28 01:01:06 2005 +0000 + + Get Xsdl closer to linking. + +commit 27d79ab2bcebb634d0b69c851c72283a7514eb0c +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 27 23:03:15 2005 +0000 + + s/XSERVER/KDRIVE/ + +commit 72817714a0787536ce8e8ad0d5473dea0f1c1abe +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 27 23:01:27 2005 +0000 + + Remove Imakefiles. + +commit 9dd0af6cb4e2c8976ada57a4f4ed16faae090a9d +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 27 08:31:37 2005 +0000 + + Skeletal kdrive build system. Totall non-functional atm. + +commit 7fd73d2953cf9449c15462cf4bf67639db64f997 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 27 08:29:50 2005 +0000 + + Build fixes: XSERVER_LIBS -> KDRIVE_LIBS, config.h -> kdrive-config.h + +commit 2f3ac6e5fcbd0e954a094fb6b975d7c8816c44b7 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 27 08:26:03 2005 +0000 + + Start importing kdrive. + +commit 6798fd0170f4225ce4e69148978533fcee9bdc34 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Dec 26 19:13:52 2005 +0000 + + Bug #4190: Add a rule for 'make relink' since automake sucks. + +commit 8fc4ea8620913776a903ee2b4f22c306d5778623 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Dec 26 18:55:09 2005 +0000 + + Nuke unsupported NDBM routines. Shrink the hash table a bit, over + 25% of the buckets were going empty. + +commit ed33c7c98ad0c542e9e2dd6caa3f84879c21dd61 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Dec 26 04:23:58 2005 +0000 + + Remove unused -xkbdb and -noloadxkb options. Rename -ar1 and -ar2 to + -ardelay and -arinterval, respectively. Remove XKB banner from help text. + +commit 7e3cb9a09ac422179be89773f7fb14a462d25434 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Dec 25 22:25:15 2005 +0000 + + Remove unused layer module. + +commit 9b083369ded2258cbc8ac2058e06ec8a3b171178 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Dec 23 20:11:12 2005 +0000 + + Change list of X server man pages in "See Also" section to list the ones + actually included and remove the ones that are no longer. + +commit 5fd978b1e7bce9169f87712a4a7c2c36a68ac00a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Dec 23 07:40:44 2005 +0000 + + Make LBX configuration default to auto. + +commit 5230e86b1cc841bfb35806618052aa835b7eb7e7 +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Dec 23 04:13:37 2005 +0000 + + fix up xglglx.c + +commit feb735c5bb0cd391136f1c73476703dff82dc9b0 +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Dec 23 02:07:58 2005 +0000 + + Well there were a couple of snapshots later than CVS available outside of + Novell, so I've done a crazy merge to try and get them into a workable + CVS, I suspect I may have failed.. there is a pre-xgldrop-merge tag if + I did. + +commit ade104ce5a016623c1ce97b0d52b531185b35baf +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Dec 23 01:51:40 2005 +0000 + + check drawable is available + +commit 7fb521e80d6e2c05e9475e74fbf80bfbe74cda95 +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Dec 23 01:50:04 2005 +0000 + + from davidr's tree update some fixes + +commit c88a3145d057ab72466a3ea8b789bf419e4efc33 +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Dec 23 01:49:21 2005 +0000 + + from davidr's tree if source picture defined return + +commit c59508566f11982aa3f4be383597d0e6178718c2 +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Dec 23 01:13:28 2005 +0000 + + fix glx up for newest glitz interface + +commit d822bc159672e7327054e572b659ae7dde040e83 +Author: Dave Airlie <airlied@linux.ie> +Date: Fri Dec 23 00:08:35 2005 +0000 + + make xgl code at least build against latest glitz. + +commit 6e2086395d99081d8d682b90cec650a06e41fc2c +Author: Dave Airlie <airlied@linux.ie> +Date: Thu Dec 22 23:32:49 2005 +0000 + + fixups for newer glitz API + +commit f3ae42c0fd910b7f9feb9be91ccb056bce0cd999 +Author: Dave Airlie <airlied@linux.ie> +Date: Thu Dec 22 23:31:15 2005 +0000 + + small fix towards new glitz interface + +commit 2af7e94eab6847159a3439301ecc93c62a12b1a0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Dec 22 13:54:08 2005 +0000 + + Adjust the rules for auto-generating some source files, so that they work + on both GNU make and FreeBSD's make. + +commit 0d7ec5c7d9b451066a079fe56bcc9722341a91ff +Author: Kevin E Martin <kem@kem.org> +Date: Wed Dec 21 02:30:08 2005 +0000 + + Update package version for X11R7 release. + +commit b37e738d5f4e1769bdee98acca788aeeb1556bcc +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 20 21:40:19 2005 +0000 + + Fix an fb regression on A8 pictures. (Fredrik Höglund) + +commit 03d37eb03864cfc1a2f8d239d5a4c8341bf274f7 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 20 21:34:21 2005 +0000 + + Bug #5359: Fix a segfault (Mark Kettenis) + +commit 7b89b643c12fa0f7a662b3ff76e05ece53101312 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Dec 19 16:44:21 2005 +0000 + + Bug #5116: Refer DRI section details to dri.fd.o. + +commit 3ef3add90351e3cb7b54dbcedc234bc5d3d65f1c +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Dec 19 16:34:07 2005 +0000 + + Stub COPYING files + +commit 3566307c8d44f89622ea51169f67c79092cb56d1 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Dec 19 09:18:29 2005 +0000 + + Fix typos. + +commit 137447c5f3c6f1914ac869297f823ae93ce428ac +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Dec 15 01:54:45 2005 +0000 + + Update to 2005-12-14 snapshot from pciids.sf.net + +commit 2cf86fce41e3fd2ac48c5088da11e19077e42e65 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 15 00:20:27 2005 +0000 + + Update package version number for final X11R7 release candidate. Update + release string to 6.99.99.904. + +commit f1ba3b4f33a928a3a59538799b3863de5c87e70e +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Dec 14 20:11:16 2005 +0000 + + Bug #4718: Command line flag to disable ACPI. + +commit cf605eb91619a8c0589a08674ffc3e018471b3fc +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 13 17:35:26 2005 +0000 + + Build libglx correctly when not building the Xorg DDX. + +commit b076dd787ff71c4b385ab4e2e4eb367f3de378f6 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 13 17:34:06 2005 +0000 + + Spell it XINERAMA_SRCS, not PANORAMIX_SRCS. + +commit 3666dbb5f3e06fa6a72def64556d64cf73141777 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Dec 12 23:33:55 2005 +0000 + + Remove unnecessary include of dgaproc.h that broke Solaris builds. + +commit 438a5549f08ab03443d45dd46323579a2f2e4ba2 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Dec 12 03:06:18 2005 +0000 + + Bugzilla #4715 <https://bugs.freedesktop.org/show_bug.cgi?id=4715> Files in + xserver/xorg/Xext not included in tarball after make dist + +commit 62f3ef930adc7edd49b27dd1f7b0f51bc8bc0afa +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 18:35:21 2005 +0000 + + Bug #5258: Restore binary compatibility with 6.8.2's PictureRec. (Aaron + Plattner) + +commit b99dea9dcf99f907a3536c0db1c39cc67931a5b1 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 18:32:46 2005 +0000 + + Bug #4935: Fix includes. (Eric Anholt) + +commit f4957ee94810b471110deebf03d7413399b45db3 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 18:30:51 2005 +0000 + + Bug #4809: Re-fix that doesn't break distcheck. (Alan Coopersmith) + +commit de22d0c2264bd6dbacbbb4160d09c7e84ad37e70 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 15:30:05 2005 +0000 + + Fix a thinko so the code matches the comment + +commit 6fcb049cd0d2291da5943176716d1f7bbb85fdc2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 06:49:39 2005 +0000 + + Bug #1288: Additional refactor of the driver probe logic to keep ati loaded + before atimisc. + +commit 17ac5e9fec1e07bd18ae1407043c300cb4695ede +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 05:36:41 2005 +0000 + + Push the fallback drivers to the end of the list so driver probe order + stays useful. + +commit 80ea67e37980d07438749f1aa4dfdd7ee1086799 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 03:59:41 2005 +0000 + + Bug #4361: Change driver probe logic to read the driver list from disk + instead of using a compile-time array. + +commit 7fa2d11d85d43f42aa9c02f8d772c91d1b04df43 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Dec 9 03:57:41 2005 +0000 + + Bug #4361: Define XF86CONFIGFILE properly so config file generation works + +commit 26b41ff43959a07a778bc3d6e4db8da036f09de3 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Dec 9 03:02:21 2005 +0000 + + Fix sgml docs build. + +commit d6f98cbdb8fb74c504a92939d3741420eeed7110 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Dec 8 19:33:09 2005 +0000 + + Bug #3944: Fix 24bpp packed pixel. (Søren Sandmann Pedersen) + +commit f9ccebe8c5cd674c08fe8ed860d1c456e42c937e +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Dec 8 19:27:13 2005 +0000 + + Bug #4928: Fix compilation for Alpha. (Stefaan DeRoeck) + +commit 3a6bdf0715b994d6ecaa5b6e448695a8a8ec7d72 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 8 19:21:12 2005 +0000 + + Add configure option to set the top level font dir. + +commit 008c2dd5e4614e6a21123ee3a2ac9c5d3bafa97a +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 8 17:55:19 2005 +0000 + + Add configure options to allow hard-coded paths to be changed. + +commit 39189c2b86a4c2ab5f3f161d423eb072356668e5 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 8 17:54:40 2005 +0000 + + Allow hard-coded paths to be configurable. + +commit 20c0ebe7b3feb85abf9bf140b7799aafc6f59513 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Dec 7 16:18:02 2005 +0000 + + Change to use the app-defaults default dir configured in libXt. + +commit 4a39354e14c3c360046b04ea0d4825832b05df05 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Dec 6 22:48:51 2005 +0000 + + Change *man_SOURCES ==> *man_PRE to fix autotools warnings. + +commit 84faf8dc9747bc4f1db5ebc2f23e17cf1460e2e9 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Dec 6 16:22:47 2005 +0000 + + Bug #5230: Fix whitespace bugs. + +commit 9439297b7bc07dcb90f0d01da09eea1bac3d42ff +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Dec 6 15:50:35 2005 +0000 + + Bugzilla #5219 <https://bugs.freedesktop.org/show_bug.cgi?id=5219> Make + sure all optional sources are included in EXTRA_DIST, even if they + aren't used on the platform the distballs are made on. + +commit f259fd680caccb59546d7788704e46e51a9c6146 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Dec 3 22:47:47 2005 +0000 + + Disable the xf8_32wid logic for now, breaks distcheck + +commit 26f9c4305660c2b3dc7fe8d214bcdd3c24e1b198 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Dec 3 17:04:45 2005 +0000 + + Bugzilla #4809 <https://bugs.freedesktop.org/show_bug.cgi?id=4809> Patch + #3908 <https://bugs.freedesktop.org/attachment.cgi?id=3908> xf8_32wid + and cfb24 only need to be built on sparc + +commit 98231c6b38c98976f4ac2b9417ecfbc37a8cbe9a +Author: Kevin E Martin <kem@kem.org> +Date: Sat Dec 3 05:47:25 2005 +0000 + + Update package version number for X11R7 RC3 release. Update release string + to 6.99.99.903 (i.e., 7.0 RC3). + +commit 7c00afd0ec94e491f1a9ef32d6543ed51ea3319d +Author: Kevin E Martin <kem@kem.org> +Date: Fri Dec 2 06:02:45 2005 +0000 + + Define XFree86Server only where it is required. + +commit 924518605b613eb66aa569877fa9f131e6f2a2fd +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 1 23:39:00 2005 +0000 + + Fix GL build when srcdir != builddir (Donnie Berkholz). + +commit 14b9315379fe8c783013906616d868f93fd51c83 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 1 22:06:49 2005 +0000 + + Add missing XvExtension and XvMCExtension defines. + +commit df8fa21d3189e20260328b88cc8a86224a9b1ebf +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 1 16:20:09 2005 +0000 + + Fix typo: xorg_bus_linuxbsdpci ==> xorg_bus_linuxpci + +commit ccfaf82367c9d057fd8314ce36b47f0a8eb696b6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Dec 1 05:04:07 2005 +0000 + + Bug #5160: Fix the modular build to try to use the same logic for choosing + the architecture/os-specific bus support as monolithic. + +commit 9c0bd9687fe7d20f2f0793332ae0db06f035eb23 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Nov 30 22:59:22 2005 +0000 + + Import libdrm 2.0 + +commit 4ec0b623b6ab5f8a1e5af2cc3d839251acf81ce2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Nov 30 02:36:25 2005 +0000 + + Bug #5093: Fix fb for non-SSE machines. (Xavier Bachelot) + +commit ed826d563cba82c516fd41f6a29ee50aa1fe6c6a +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Nov 29 23:34:30 2005 +0000 + + Only build dlloader modules by default. + +commit da5d66f2ff27b21fe5c39a4abb4f627edd707f1d +Author: Kevin E Martin <kem@kem.org> +Date: Tue Nov 29 16:39:33 2005 +0000 + + Fix usage of XFree86LOADER/XFree86Module/IN_MODULE and update loadable + module builds to reflect this change. + +commit 51a721a6dbb42702347aad3115147e4922fc1a25 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Nov 28 22:05:09 2005 +0000 + + Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 + update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) + +commit 381931b15b15d0a2ec384b0c22864412c44f9c6e +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 23 07:14:46 2005 +0000 + + Add configure option to install libxf86config.a (disabled by default). + +commit 594ca0966e8fd5992ebf95170cc42e19c698fec6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Nov 22 02:11:00 2005 +0000 + + Bug #5118: Use "rm -f" instead of "$(RM)", which isn't always defined. + +commit 1c8c1179c0789e3e134d31a62dbb88bfdb594b26 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Mon Nov 21 04:24:07 2005 +0000 + + Fix Xprt library dependencies in the case that Xprint is auto-detected by + configure. + +commit a1f110bda80bb3b8e4f602385ca5ccd96cf3f786 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Nov 20 23:01:02 2005 +0000 + + Make sure XKM_OUTPUT_DIR (used in code) ends in / (so paths don't get hosed + when appending file names) but XKB_COMPILED_DIR (used in Makefiles) + does not so install-sh -d doesn't get confused when the directory + already exists. + +commit 385730d23944c24dd9af45b27f62c1161abc48b2 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Nov 20 04:15:15 2005 +0000 + + Add xext to list of modules xorgcfg depends on. + +commit 63aa96c08a8390621b017ea498c88cf88152024b +Author: Kevin E Martin <kem@kem.org> +Date: Sat Nov 19 07:15:50 2005 +0000 + + Update pkgconfig files to separate library build-time dependencies from + application build-time dependencies, and update package deps to work + with separate build roots. + +commit d3b6653a2892e8c929c79fe3ace19ac9d8366fc4 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Nov 19 03:53:04 2005 +0000 + + Bug #4824: Build XTrap support by default, matching monolith. + +commit 627ac1fe1dbcbc070575da7bee9e686a7dce5262 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Nov 18 23:34:04 2005 +0000 + + Bug #5060: Fix non-Linux DRI on 64 bit post Linux 32/64 changes. + +commit e3ec048ff2fe0ee0862472e9b147b7ce488ea898 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Nov 18 22:43:50 2005 +0000 + + Bug #4928: Unbreak Makefile.am for Alpha chips. (Stefan DeRoeck) + +commit de95d8ee197a0bb738037195997d754a20e10254 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Nov 18 18:02:24 2005 +0000 + + Bug #4859: Don't segfault on bad DDC read. (Tony Houghton) + +commit 21f7d03dbc347f6bf97a40671275ac75df15bd10 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Nov 16 07:28:19 2005 +0000 + + Fix builds when not building the Xorg DDX. + +commit fb2d9df869af0c96f1488ef7cf364e01a9d28f3f +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Nov 15 00:29:23 2005 +0000 + + Make fb build on darwin/ppc without addition #define hacks + +commit 16b315affa30e34b9bab81778978484137a5d9bb +Author: Kevin E Martin <kem@kem.org> +Date: Mon Nov 14 21:04:12 2005 +0000 + + Use glcontextmodes.[ch] from Mesa. + +commit 0c110c80e7afbef50bb354cf1df30123ed048250 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Nov 14 20:18:03 2005 +0000 + + Add GL_CFLAGS so that GLX can find its proto headers when using separate + build dirs. + +commit fc81c13e4dafb0eb818879454ee7ae3fa3dae6d0 +Author: Kean Johnson <kean@armory.com> +Date: Mon Nov 14 18:49:30 2005 +0000 + + Dont prevent SCO platforms for using the default ZAxisMapping now that the + OS layer correctly sends z-axis events when the wheel button is used. + +commit bd9fb533b31c2427d854199fa59dccd357cf874b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Nov 14 00:01:34 2005 +0000 + + Default xkb-output directory needs trailing slash. + +commit 267cbffa41fffff69c692911d128462f5bab2a69 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Nov 13 20:53:24 2005 +0000 + + Bug #5019 <https://bugs.freedesktop.org/show_bug.cgi?id=5019> xserver + installs manpages into 'man1' instead of 'man1x' + +commit 3179d29b8212c197634d81fbeb8dd2e8df995735 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Nov 12 18:03:34 2005 +0000 + + use RGB_DB not RGB_PATH as that's what configure defines (Jürg Billeter + <j@bitron.ch>) + +commit 0e7e4c7064df64c29b1a0ccd84fba1be7c748f18 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Nov 10 04:59:21 2005 +0000 + + Fix typo to enable DGA support. + EXTMODULE is required to build DGA support into extmod. + +commit e4554db8f87c6a39a3087186395972000bd2085c +Author: Kean Johnson <kean@armory.com> +Date: Thu Nov 10 02:41:20 2005 +0000 + + Dont pass wheel mouse buttons as real buttons, map them as Z-Axis movement + on SCO and USL. Re-instate the ZAxisMapping default for the mouse + driver. + +commit 1b26fe6d2092c202141a0371f47ef1cd7c66ec00 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 9 21:28:54 2005 +0000 + + Update package version number for X11R7 RC2 release. Update release string + to 6.99.99.902 (i.e., 7.0 RC2). + +commit f886e632b8dab1bfa0de42b9759a8284ecd9b94f +Author: Matthias Hopf <mhopf@suse.de> +Date: Wed Nov 9 17:05:41 2005 +0000 + + Bug #4915: ButtonMapping option which allows to define arbitrary button + mappings (including left-handed mouse etc.). Fixed incorrect usage of + non-reversed, but ZAxisMapped buttons for state detection. Nuked unused + part of reverseMap. + +commit a25871ae52dd5ce094ba8c1b2021dd027d3e71bd +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 9 01:00:46 2005 +0000 + + DRM 1.0.5 import + +commit c9709c0a38af46368726857f7261cbeb84e53911 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Nov 8 22:47:57 2005 +0000 + + Add newly checked in files to Xorg server build. + Fix release date. Enable DGA extension by default. + +commit f8430a1b8651f4b52d9d3b54694a60d929b48925 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Nov 8 19:04:56 2005 +0000 + + Bug #2880, add functions for byte and word level access to pci config + space. + Fix broken utf8 again. + +commit 5390c7ab05d23f64e6d9afaa558be246a6d6e1b4 +Author: Kean Johnson <kean@armory.com> +Date: Tue Nov 8 06:33:30 2005 +0000 + + See ChangeLog entry 2005-11-07 for details. + +commit f5814bf3fff5352ed6edef4c58aadf2d4593f094 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Nov 8 03:12:43 2005 +0000 + + Don't reference noXkbExtension when building without XKB. (Bob Terek - Sun + Microsystems) + +commit e73cdba865f36ebf78c2dc4ff674b4d9bfe85013 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Nov 7 21:03:49 2005 +0000 + + Fix Xvfb to work properly in depth 15 mode. Fixes XTS5 XCloseDisplay-3 + server crash. + +commit 890ed0e082e048fa8daf48229b40558381bd131d +Author: Thomas Hellstrom <unichrome@shipmail.org> +Date: Sun Nov 6 16:40:59 2005 +0000 + + Fix a bug where a system memory pixmap got a wrong address if memcpy() + fallback was used for downloading from screen. + +commit 70aedcf32a0c924fd073f5b36d20813e8323026b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Nov 5 18:56:50 2005 +0000 + + Bug #4948: <https://bugs.freedesktop.org/show_bug.cgi?id=4948> Incorrect + URL in log file for Xorg CVS. Also fixed wording of statement to not + refer to monolithic CVS since modular uses the same code, so it was + appearing in modular builds too. + +commit 89c661d61f1b9c70a08237476fa1f7f42c1783ab +Author: Kevin E Martin <kem@kem.org> +Date: Fri Nov 4 21:37:32 2005 +0000 + + Only use fbCopyAreammx if planemask is FB_ALLONES (fixes XTS5 XCopyArea + tests 22 and 23). + +commit 0b150a05e6fadca7ee8240697d6cbeadea0c53b3 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Nov 3 17:12:53 2005 +0000 + + Whitespace change just to make sure I created the branch correctly. + +commit 90cf8e339b71c2f8f2d7a362e6e1ca8078d7f4fd +Author: Kevin E Martin <kem@kem.org> +Date: Thu Nov 3 17:08:06 2005 +0000 + + Fix vendor string and release version reported by the servers. Enable + security, lbx and xevie extensions to give us parity with monolithic + tree. + +commit f23defeef285b4a5bb58405589294bd557c9bb01 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Nov 3 16:57:01 2005 +0000 + + Use APP_MAN_SUFFIX for Xserver man page instead of hardcoding section 1 + +commit f5daec674aeb4fe6ccbc95ead8a319bbeb368d9f +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 2 15:56:40 2005 +0000 + + Add support for enabling/disabling DBE (part of generic enable/disable + extension support in the server). + +commit a311bfa73afa1af76f81958d23bc8e0c631d6828 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 2 15:53:57 2005 +0000 + + Fix support for enabling/disabling extensions loaded from modules. + +commit 462a2407d540eac831c9be4dcee8a16aa1cea6ac +Author: Kevin E Martin <kem@kem.org> +Date: Tue Nov 1 15:01:51 2005 +0000 + + Add xorg-server.m4 for driver dependency checking. + Update pkgcheck depedencies to work with separate build roots. + +commit 56101c9d6ec3585a0a8550da4b83dd399e3bcce6 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Oct 31 05:45:40 2005 +0000 + + Fix fd leak by closing them in the ACPI code instead of just using + shutdown. + +commit 7993486e80711bd6f6f5b6c2b1f2ac32bfba735b +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Sun Oct 30 17:38:49 2005 +0000 + + RandR: Add a driver func to let the driver determine the physical size of a + screen size (display mode). Useful for faked widescreen modes, modes + which are scaled by the driver, etc. This really helps fixing RandR's + sometimes dumb DPI assumptions. + +commit c818d3a1a5439c54fc687927a99d69712602ed5e +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Sun Oct 30 09:27:06 2005 +0000 + + Add xf86RandRSetNewVirtualAndDimensions to loader symlist + +commit fdbb3ea60949a12eb2f4805d16e8acc2348e39c7 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Sat Oct 29 21:31:23 2005 +0000 + + Add function for drivers to change RandR's idea of the virtual screen size. + (This allows drivers to reserve a larger virtual size at start and + change it later) + +commit e921eec1c6d6ce32630977bd876c529a7c694459 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Oct 29 00:12:33 2005 +0000 + + Make X -> Xorg symlink at install time. + +commit f842c229d4c4dbd5c01364f9e99709bedfd32be6 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Oct 28 16:01:17 2005 +0000 + + build fix on alpha + +commit 7416fd61a17a70a2c27c4b1d19796955c296dc7a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Oct 27 21:03:27 2005 +0000 + + Improved stack trace dump code for Solaris - try fork & exec of pstack + first so we can see the names of non-exported symbols that aren't + visible to walkcontext/dladdr1 code. + +commit b588bdfe2ac3758d7188706078d79fa276a303e3 +Author: Dave Airlie <airlied@linux.ie> +Date: Sat Oct 22 04:38:50 2005 +0000 + + programs/Xserver/GL/mesa/X/xf86glx.c: Missing initializer in xf86glx.c + spotted while debugging something else. + +commit 59279da49806b032027bb54410bc2513d21e3d9e +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Oct 21 19:06:13 2005 +0000 + + Bug #1429: Report input device type correctly. (Stéphane VOLTZ) + +commit 4a8072011895e6f472e429af7503fc07e0561144 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Oct 21 18:50:09 2005 +0000 + + Bug #4730: Byte-swap the pixmap ID correctly. (Neil Campbell) + +commit 81e913d3106066de73792f59f3e50e2b5458c567 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Oct 21 18:23:33 2005 +0000 + + Bug #4840: Typo, x$xRES -> x$RES. (George Fufutos) + +commit f5a58178347878e0409b592330a07867bea02bef +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Oct 20 23:24:47 2005 +0000 + + Make sure that the __gl*_size prototypes are seen in all the places that + they need to be seen. + +commit 279cf9f79da5778b6e14ecc437379d73e3bec5b0 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Thu Oct 20 22:41:28 2005 +0000 + + Bug #4817 <https://bugs.freedesktop.org/show_bug.cgi?id=4817> Restore '=' + to '==' in test for mmx_capable. + +commit 1f43d218cc24358a0379535ed517c23011633c31 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Thu Oct 20 21:45:40 2005 +0000 + + EXA: The "optimization" for using a fill operation instead of 1x1 copies + checked the destination drawable's dimensions (!) instead of the + tile's. Really.... + +commit 15f56b203dbc14ea59885d40fd4bed3da9e8e190 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Oct 20 18:52:51 2005 +0000 + + Move xf86XTrapModule.c to dixmods, guess at a build system. + +commit da43c778f4a831061ad2c8b8a312b7a54c9cd79e +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Oct 19 22:45:54 2005 +0000 + + Bug #3224: Degrade XKB fallback message to X_WARNING. + +commit 4ebd26f04b32f1b09e0759f1a83437d0b1c4d646 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Oct 19 22:36:22 2005 +0000 + + Bug #3196: Fix Load foo.so syntax. + +commit af211a9bc1bcab0aa631558e5d6ce013095f9802 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Oct 19 22:30:09 2005 +0000 + + Fix PCI bus scan on ia64 E8870 chipsets. + +commit 5744308e2957781449bfe6fee9b465617a88384d +Author: Kevin E Martin <kem@kem.org> +Date: Tue Oct 18 22:06:54 2005 +0000 + + Update package version number for RC1 release. Update release string to + 6.99.99.901 (i.e., 7.0 RC1). + +commit 2769c3e72c470b472dae013e256a7ee73c3e53f2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Oct 18 19:43:48 2005 +0000 + + Fix distcheck by forcing Xorg to be installed before chmod/chown. + +commit dd0d010e9c34278f968be486a6c5c91e021b6609 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Oct 18 19:14:08 2005 +0000 + + Fix parallel builds my ensuring libdmxconfig builds first. + +commit 79e6ac79f983b6cbd88a868dfd2235d9cbe75e8b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Oct 18 07:18:21 2005 +0000 + + Don't use $< in explicit rules since neither BSD nor Solaris make allow + that. + +commit fb282ef43a1936dcdefa57f16a8363b2adaf983b +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Oct 18 04:03:01 2005 +0000 + + Add miext/damage so misym.c can export DamageDamageRegion. + +commit 959db6028d232dc76396cb658aa48d3b4e605aed +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Oct 18 04:02:31 2005 +0000 + + Export DamageDamageRegion. Not bumping the ABI version since we did that + already for this release. + +commit b61c828b0455ec1d4a7ffb54b5ac9b65764a458b +Author: Kevin E Martin <kem@kem.org> +Date: Tue Oct 18 02:23:58 2005 +0000 + + DRM 20051017 import + +commit d6a40bcd4a745b5d6d1070deb696b21d128ca0fe +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Oct 18 00:32:55 2005 +0000 + + Change default install dir for app-default files from + $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match + the monolith & allow localization + +commit e7007f7d51c9e1d39118865fefb1716c579a70bd +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Oct 17 22:42:03 2005 +0000 + + More automake 1.7 braindamage: use mkdir -p, not . + +commit 151ba8b67fd88a721f9f72d3019212b22f5cd3e2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Oct 17 22:25:58 2005 +0000 + + Work around automake-1.7 braindamage by providing an explicit rule for + XOrgCfg. + +commit eec3df1503e561aff6656e15c73b25a0bba1b06b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Oct 17 17:11:12 2005 +0000 + + Fix whitespace in AS_HELP_STRING uses, convert all help strings to use + AS_HELP_STRING. + +commit 1859c62607d567aa05334df1662f7249c983f793 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Oct 17 07:18:59 2005 +0000 + + include/dix-config.h.in Add support for more extensions + Add missing files to EXTRA_DIST + +commit ccfe9e7e9b49cbbf7c50fbf1a5c33178f27f79eb +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Oct 16 21:57:34 2005 +0000 + + Link Xprint config directories in $(C_LOCALE) list to C locale dir, not + en_US + +commit a7d6a4fb321415b8aaad72760ff8a1ca3fd077f9 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Sun Oct 16 03:02:53 2005 +0000 + + Change '==' to portable '='. + +commit c2e461c7e970830ea430de3e5f352d144e9f0239 +Author: Kevin E Martin <kem@kem.org> +Date: Sat Oct 15 20:44:44 2005 +0000 + + Fix typo and add new Makefiles to AC_OUTPUT + Fix typos + Add xorg.conf.man to CLEANFILES + Add missing files to EXTRA_DIST + +commit 34b7b57b3c80507f63a542c6adb4b5c8ed80b642 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sat Oct 15 19:34:28 2005 +0000 + + Doh, remember to add this file. + +commit 744aa34ca5228ea176cc56a7bdd48bbf5f29b0b5 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Oct 15 02:19:09 2005 +0000 + + Add an additional meaning to the "dirty" flag. Now, if !dirty && !area, the + pixmaps's contents are undefined, so we won't need to upload the + undefined contents in MoveIn. Use the ExaCheck* for async ops as well, + so that dirty is always tracked. While the performance impact for my ls + -lR test was not significant (though the avoiding-upload path was being + hit), it's likely to be important for the upcoming Get/PutImage + acceleration from ajax. + +commit 21e7339c1eead1148eea462bc99cf8faf02c8d39 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Oct 14 22:44:56 2005 +0000 + + Hook up lbx. + +commit d62943c040fd3d45079c9918c57f74f993b585d4 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Oct 14 22:19:51 2005 +0000 + + Set default font path to match the default in the monolith so fonts are + actually found. + +commit 0ee70f53ef9b05052ee079560df107d05a9c5407 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Oct 14 22:01:46 2005 +0000 + + Install Xorg & xorg.conf man pages even when not building docs + +commit 0676a2874a62a3661a718cdf21e75ffc77197ad9 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Oct 14 20:01:36 2005 +0000 + + Add sysv and sco os-support subdirs and add simple EXTRA_DIST Makefile.am + in those dirs. Remove unsupported os-support subdirs (bsdi, dgux, hurd, + nto, os2, pmax, qnx4) that have no maintainer and we don't dist. + Add Options. + +commit 57abb5b171b2fe88252aeb788463e533106d66b9 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Oct 14 08:29:16 2005 +0000 + + remove reference to non-existent agpgart.h + +commit 7e3e9ed97ba25bb84286f97fe6882a37c9aa7e25 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Fri Oct 14 06:10:06 2005 +0000 + + Add XTRAP_LIB to XPRINT_EXTENSIONS to fix xprint build when xtrap is + enabled. + +commit 821584fcd3bf83f3aaacd35e54323f71d976db44 +Author: Donnie Berkholz <spyderous@gentoo.org> +Date: Fri Oct 14 05:36:39 2005 +0000 + + Require glproto >= 1.4.1 if building DRI with GLX. This fixes a build + failure on a number of hyperpipe functions. + +commit 8df7628a2ad93edf8271f13e0b43c0fa8f766668 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Oct 14 00:41:51 2005 +0000 + + Remove reference to XF86config-4. Add xorgcfg(1) to See Also list. + +commit b54c8154ca19edce00b9c6379d5daf94268bade1 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Oct 14 00:34:49 2005 +0000 + + Set substitutions needed in xorgconfig man page. + +commit 1df705e465a103c94ffbb9fe97bdbe6b0aefc746 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Oct 13 20:30:38 2005 +0000 + + AC_SUBST VENDOR_STRING & VENDOR_RELEASE for xorgcfg's app-defaults file + +commit b349b20d783252d5126451142419aae554f9b776 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Oct 13 18:08:24 2005 +0000 + + Dist NOTES. + Dist helper shell scripts. + Dist XAA.HOWTO and a few more unused C files. + Dist xorgconf.cpp. + Fix DIST_EXTRA typo. + Clean yacc and lex generated files only during make maintainer-clean as we + don't expect users to have those tools installed. + +commit 35a767590e481b15ae66dccc2dd91098992b2751 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Thu Oct 13 01:13:58 2005 +0000 + + Fix stupid mistake in yesterday's allocator commit, would cause exa to + consider a random available memory size + +commit a16dabd05ee7ec97877f07bd40ed83c01e72fc22 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Oct 12 11:15:44 2005 +0000 + + Remove an RM line that appears unnecessary and was breaking the build at + xf86DefModeSet.c with FreeBSD make, where RM was undefined. While here, + make the build of xf86DefModeSet.c depend on its sources, so it'll + rebuild properly, and make it a normal CLEANFILE rather than a + DISTCLEANFILE, since the intention seems to be to build it at the + user's build time. + +commit b819c8378fbf29f185332e8435a80eb35991cd1f +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Oct 12 08:22:31 2005 +0000 + + remove unneeded line of code + +commit e573b272bf2b06fb62d0306ddc966f3230ead967 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Wed Oct 12 07:46:36 2005 +0000 + + Use proper access size when reading pixel based on bpp of the source pixmap + +commit 55efb41f6cc064763cbfd3ee2a1239dc46cb109a +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Oct 12 07:35:20 2005 +0000 + + If a window background is a 1x1 pixmap, read the value out and go to + exaFillRegionSolid rather than sending piles and piles of Copies to the + hardware. + +commit fce11fdf03acc1f3f1dafb79fc8fff0251cf5473 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Oct 12 02:11:06 2005 +0000 + + Fix typo (DIST_EXTRA -> EXTRA_DIST) + +commit 12994b9afbc18bfb7209f677abf673415c9ddf15 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Tue Oct 11 23:11:37 2005 +0000 + + Fix a couple of bugs in the offscreen allocator. One mostly harmless was + causing our search loop for evictable blocks to possibly skip a good + candiate, and another was the allocator would occasionally use + area->offset as if it was the base of the pixmap, while for a pixmap + that is not in available state, it is not. This caused some funny + miscalculation leading to overlapping pixmaps and accesses beyond the + end of the framebuffer. To make things cleared, I renamed save_offset + to base_offset, made sure it's the one used everywhere in the + allocator, and only align "offset" for the client at the end of + exaOffscreenAlloc(). + +commit 8444a1f3918b0433f89cae31673ab63628b4543d +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Oct 11 21:01:04 2005 +0000 + + missed commit + +commit 3b683b63eed603ae58a8cddab48eb81f7ba0dbdf +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Oct 11 20:12:24 2005 +0000 + + missed ChangeLog entry for previous commit + +commit b4450f3242ab408e80bc3d6d5d1cf6765f3e5339 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Tue Oct 11 19:03:02 2005 +0000 + + Add DGAReInitModes, Part 2 + +commit d91d18e1d6d663244288748ab86a35a6c151a535 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Tue Oct 11 19:02:18 2005 +0000 + + Add DGAReInitModes in order to allow the driver to change the list of + supported DGA modes. (Part 1) + +commit c1a2abadfbb862cbaac3e23d0c1317ce5473ebdd +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Oct 11 14:50:47 2005 +0000 + + fix a typo + +commit 697f64a22ac5a7742a0022605a1074351296d4f8 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Oct 11 14:50:03 2005 +0000 + + check randrp has been initialized + +commit 2828d92c6ca400b603b6a20a221d9c858732292f +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Oct 11 14:45:01 2005 +0000 + + programs/Xserver/hw/xfree86/common/xf86RandR.c + programs/Xserver/hw/xfree86/loader/xf86sym.c Add a new function + xf86GetRotation to allow third party modules to obtain the current + rotation. + +commit cad18ec979e38ef80a606f0e4abf2142b9d0d2b1 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Oct 10 10:07:47 2005 +0000 + + don't move x or y depending on the screen size change + +commit 7f72f94aa4f0655b8aab6c67eef2a5f5ac4b418f +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Oct 10 09:31:49 2005 +0000 + + rework that again + +commit 7c1d9a31a36552467d194e7d009c17dc526256c2 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Oct 10 09:24:28 2005 +0000 + + a furthur tweak to the randr cursor position fix + +commit 13f958fbe8420e406f24c01d320f29002ee860b7 +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Mon Oct 10 05:58:41 2005 +0000 + + Add missing {Prepare,Finish}Access() wrappers for the tile pixmap in the + fallback case + +commit d82aeb55ca3b6abe4cafa7b9c39777a5f67308e5 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Oct 9 23:47:52 2005 +0000 + + Bug #3254 <https://bugs.freedesktop.org/show_bug.cgi?id=3254> Make sure + screensaver & DPMS timeouts don't overflow when multiplied by + MILLI_PER_MIN. (Reported by Zachary J. Slater) + +commit 29b5f846d261976f466d2c7181d6a75de670066b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Oct 9 17:47:34 2005 +0000 + + Bug #4715 <https://bugs.freedesktop.org/show_bug.cgi?id=4715> Add + SecurityPolicy to EXTRA_DIST (Bill Crawford) + +commit 046234b3ebdfe221de9e87d70d287f69a6f59d6e +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Oct 9 02:03:22 2005 +0000 + + Don't try the accelerated glyphs path for component-alpha text (which I + don't expect drivers to be able to accelerate without exa assistance). + Instead, drop back to plain old miGlyphs for a 62.5% +/- 1.5% reduction + in runtime of my ls -lR test (n=5) with component alpha. While a + reasonable approach would seem to be making a better test to see + whether the entire path would be accelerated and force migration + appropriately, my attempt at this made the situation much worse. + +commit 526d1502df8db6799c9d1155b86ce79cef90872b +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Oct 7 21:29:39 2005 +0000 + + another update to the RandR fix (thanks Aaron) + +commit 5a71a5667eb5b01e0f65f9310f4af1f6c5711ab7 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Fri Oct 7 19:01:10 2005 +0000 + + Add Xprint init scrips to EXTRA_DIST. + +commit 470213753b158225b44a39a872599344acbc7101 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Oct 7 18:15:08 2005 +0000 + + update the last RandR fix + +commit 348242f35aeb2869ef390241035b5f3266fc0288 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri Oct 7 15:39:52 2005 +0000 + + programs/Xserver/hw/xfree86/common/xf86RandR.c Use PointerMoved instead of + SetCursorPosition, as PointerMoved will call AdjustFrame to reposition + the window if necessary and avoid the cursor ending up offscreen. + +commit 578e18d11b3d61449c1dd7eba04e1748f19c68f3 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Oct 7 14:27:47 2005 +0000 + + Add darwin to dist + Include missing docs in EXTRA_DIST + Include headers and other files in dist + +commit 148df64a05d69adaac4b0f3684b846eb1da60219 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Oct 7 04:11:02 2005 +0000 + + Add README.compiled to dist tarball + +commit ff258ac2783203ed2a7698894d951391d1aecebc +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Thu Oct 6 23:45:29 2005 +0000 + + Clients tend to set picture->repeat when not necessary. Most HW cannot + accelerate repeat NPOT thus triggering software fallback (this is the + case with gnome desktop for example). This adds a simple optimisation + to exa that removes "repeat" when it's obviously useless, that is, the + single picture instance covers the entire rectangle beeing used + +commit e4ed43c3a6c248ba2b82b8bbf29da537a68407e6 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Oct 6 22:25:35 2005 +0000 + + symlink.sh: + New files linked: + xorgconf.cpp Options + usb.3 usb_hid_usages + lynx_ppc.S + BUSmemcpy.S IODelay.S PortIO.S SlowBcopy.S + sun_inout.s + xaaTEGlyphBlt.S + xkbcomp/compiled/README + New files excluded: + All of lib/GL/apple + xlibi18n/*/*.mapfile + xxserver/xorg/configure.ac, xkb/Makefile.am: + Install README.compiled in the xkb output dir + +commit 1614a31a9dad9482ae4526c194c2bae1c4993f8f +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Oct 6 21:55:41 2005 +0000 + + Bug #4699: Correct some memory leaks in EXA and damage related to region + handling. + +commit cd9ff6aec81e04bbfe14364407ccb28df05fc063 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Oct 6 20:16:13 2005 +0000 + + cpp processing for Xvfb man page + +commit 370b8c8f1cb1a3531d52ea3b430852a0d76b2a4c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Oct 6 20:14:43 2005 +0000 + + App-defaults file not supposed to have .ad suffix when installed Fix cpp + rules to set needed flags for app-defaults file + +commit 2770233069d3845c681bea8eccff22e92254487e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Oct 6 19:59:26 2005 +0000 + + Don't build "ev" example on systems without <linux/input.h> + +commit 460145a5d52b5325fa5e920cee3699fcf7dd9afe +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Oct 6 19:37:39 2005 +0000 + + Add cpconfig.c to EXTRA_DIST. + Add CURSOR.NOTES to EXTRA_DIST. + Add extrapci.ids to EXTRA_DIST and fix xf86PciIds.h rule. + +commit e63f76caa1b1342422567fdcb9f8af24792c8ca1 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Oct 6 17:55:54 2005 +0000 + + Sun bug #6326551: xkbSetDetectableAutoRepeat broken when using XEvIE + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6326551> + (Derek Wang, Sun Microsystems) + +commit 5f30a7b10286b4f55821acd4eb5580a8f5a3c56a +Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Date: Thu Oct 6 08:08:04 2005 +0000 + + Bug #4689: Treat DirectColor as TrueColor in Render. It fixes some crashes + with xcompmgr when using apps that use a DirectColor visual for their + windows + +commit 9000c0321baf1e25e1796e6a333aad0e5a22cbe2 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Oct 6 04:05:30 2005 +0000 + + Install correct man page and add to dist + +commit 9b894df44b575f768a2400d044d8c1eb6ef2ec97 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Oct 6 02:40:41 2005 +0000 + + Include dmx-config.h for modular build + Use <X11/extensions/dmxext.h> intead of "dmxext.h" + +commit 30c1369bf5816ffd7bd52d9a9dbcb72500684e2f +Author: Kevin E Martin <kem@kem.org> +Date: Thu Oct 6 02:35:22 2005 +0000 + + Add support for building DMX config and examples programs Add missing files + to EXTRA_DIST Install Xdmx man page + +commit 1f9b6dc1ccd999c90ba825cf5fbdfa29770224a6 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Oct 6 00:34:29 2005 +0000 + + Clean up generated files to pass distcheck + Clean up generated files to pass distcheck Distribute getconfig.man.pre, + not getconfig.man + +commit 61cd478b545de0313271cf6852e2df770e8f5914 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Oct 5 22:39:41 2005 +0000 + + Bug #3652: Server-side GLX support for GLX_SGIX_swap_barrier and + GLX_SGIX_hyperpipe extensions. (Eric Kunze, SGI) + +commit e891d9c078bd31447ae3e1fc7f8c15953b0bb916 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Oct 5 22:19:09 2005 +0000 + + Update to 2005-10-05 snapshot from pciids.sf.net (includes a couple new + Radeon id's). + +commit dc6ac8e46f80157960a24a1be1fb83f22dff45a0 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Oct 5 21:38:40 2005 +0000 + + Add DGA configure option and add various files that we should be dist'ing. + Simplify xf86DefModeSet.c rule a bit. + +commit 8391eaa4aa1ae3744ad8c45f5d148ba362d2c9dd +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Oct 5 21:13:49 2005 +0000 + + Preprocess and install XOrgCfg.ad as in the monolith. + +commit a9df169f108b15d312421e498675cd2e48206660 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Oct 5 17:27:58 2005 +0000 + + Add missing $(DESTDIR) to custom install target + +commit a6cbe0776fcc8fb19a2bf2ecef41559eed6e5cef +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Oct 5 16:39:09 2005 +0000 + + Fix the rest of the XFree86 DDX options that require an argument to say so + instead of reporting "unrecognized option" when the argument is + missing. Also give correct error instead of "unrecognized option" for + options only available to root. + +commit 8c524f9966d2a167ea71dd81e235140e0db31471 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Oct 5 15:33:40 2005 +0000 + + Xdmx & Xprint also need xau & xdmcp module dependencies + +commit 9f3ad65251832631630f7e587b409b750a144bd3 +Author: Luc Verhaegen <libv@skynet.be> +Date: Wed Oct 5 07:27:52 2005 +0000 + + Fix lnx_pci.c's xf86GetOSOffsetFromPCI return value. Clears up the resource + ranges awkwardness and the "INVALID MEM ALLOCATION" warning. + +commit da989e988cc96c0ec4f07fceb4c36b30c2e37f4a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Oct 5 02:18:10 2005 +0000 + + Xnest depends on xdmcp & xau modules too + +commit 9e8b5f3d478ca18a9ff9c26745de77c91a5d36d9 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Oct 5 01:38:50 2005 +0000 + + Make Xorg -config stop lying to people and claiming it doesn't exist when + you fail to specify a file name. Also, include it in the list of + available options for non-root users when listing all available flags. + +commit 34a8411ede185553f1387ee0bf534cf77b0fc004 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Oct 5 00:55:08 2005 +0000 + + Bug #4038: Unbreak the SYSVIPC check for cross builds. (Detlef Vollman) + +commit f47f00ab747563678c8625de5e5b2a588660064e +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Oct 4 11:24:09 2005 +0000 + + Mark the temporary pixmap dirty if UploadToScreen succeeds. Failure to do + so resulted in a solid black glyph if the font rendering actually + resulted in a fallback (subpixel AA, for example) and the temporary got + migrated after 10 or so glyphs. + +commit 89a1a91b88b94b341075bc208941337ce11465b7 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Oct 4 07:42:21 2005 +0000 + + Add miext/cw to the module loader include path so that misym.c can export + miDisableCompositeWrapper. + +commit 43625a47063c246e7bf9d687caded0b7e2ea0dc6 +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Oct 4 07:31:53 2005 +0000 + + Bump the video driver module ABI minor version to 8 so modules statically + linked against miDisableCompositeWrapper won't load on older servers. + #include "cw.h" instead of #include "cw/cw.h" + +commit ca57db6fc1e6100c47ad935d626fdd490ed6116e +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Tue Oct 4 04:30:33 2005 +0000 + + Export miDisableCompositeWrapper. + +commit b2e451b93c20efc49a6cc565239432b2c705fe37 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Oct 4 03:44:14 2005 +0000 + + Correct the test for whether projective transform is necessary. Also, use + "affine" to describe the variable (universally) on suggestion from + vektor. Corrects a rendercheck failure. + +commit cdded97a0ad717f4f9120b37d2687fa661696c9b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Oct 4 00:45:42 2005 +0000 + + Add #include <xorg-config.h> for modular build + +commit 4ae4fc7d51aeb0f27bed52f7e6a346745f3ea453 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Oct 4 00:43:16 2005 +0000 + + Add gtf to xserver/xorg/hw/xfree86/utils + +commit d51962378ef6371456e034d6d7f6780e05bc1207 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Oct 3 19:31:50 2005 +0000 + + Bug #3781: Only use fbCopyAreammx when alu == GXcopy. Originally Gentoo bug + #96053, patch by bartron@gmx.net. + +commit 6d4b350dee9495e54e6e5492815885f1d8455ac9 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Oct 3 16:46:14 2005 +0000 + + Bug #3815 <https://bugs.freedesktop.org/show_bug.cgi?id=3815> Patch #3463 + <https://bugs.freedesktop.org/attachment.cgi?id=3463> GNU/kFreeBSD + Xserver support (Robert Millan) + +commit 22b4200b01310e7b4743ef0b3541c3053a2d8279 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Oct 3 15:41:10 2005 +0000 + + Whoops, need to be in DIST_SUBDIRS too. + +commit 14a2bd33307fd937804a9fbb03787ec30858a05c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Oct 3 15:37:57 2005 +0000 + + Add missing ] (Dawid Gajownik) + Add getconfig (Dawid Gajownik) + +commit 84141fc299b03b5552be093f9b698a85bc670d65 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Oct 3 11:43:55 2005 +0000 + + Merge r1.36 of fbcompose.c from xserver CVS: Special case projective + transforms so we can avoid doing the expensive + 64-bit math. Unroll the bilinear interpolation loops for an extra boost. I + tested this with the up/downscaling cairo-benchmarks with Xvfb and saw + a 12% +/- 4% decrease in time taken to run them. + +commit c024262eae4e00567ccb66a59b4d572621233cbc +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Oct 3 10:20:29 2005 +0000 + + Merge r1.2 of fbedge.c from xserver CVS: Optimize spans where the same + value is being added to multiple pixels. This improves the speed of + rendering wide trapezoids. I tested this with a small set of xlibs + cairo-benchmarks with Xvfb and saw a 4% decrease in time taken to run + them. + +commit a7e3c6fa8ceb6a3a423377aa32ab0da5a6ab9286 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Oct 3 06:31:48 2005 +0000 + + Real configure check for execinfo.h (Yuri Vasilevski) + +commit e3d2a7d57bc57453d66aa63ca7fe4d910b64737c +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Oct 3 06:29:14 2005 +0000 + + Bug #4393: uClibc lies and defines __GLIBC__ even though it's not source + compatible with glibc, so the backtrace support check fails. Work + around this by wrapping the code in a configure check for execinfo.h, + and emulate detection for the monolith. (Yuri Vasilevski) + +commit 5037d3441d65f1fb6493c3b55137ef1b5eddd6b0 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Oct 2 22:17:38 2005 +0000 + + Bug #1465 <https://bugs.freedesktop.org/show_bug.cgi?id=1465> + /etc/init.d/Xprint should use PROJECTROOT from build (Grzegorz + DÄ?browski) + +commit b05e78dd40e1fe915096362f32c3af8aee0ed36a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Oct 2 19:30:57 2005 +0000 + + Fix typo in MAN_SRCS (Dawid Gajownik) + +commit 8814896da83b19be01beedd0b2b3380298778328 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Oct 2 08:53:18 2005 +0000 + + Fix include path for commit of bug #4616. + +commit ecaa46380ed0a920186407b9294c5c60f75f1a13 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Oct 2 08:28:27 2005 +0000 + + Bugzilla #4616: + - Merge various fb/ bits of COMPOSITE support from xserver, which weren't + necessary before due to cw hiding the issues. Fixes offset calculations + for a number of operations, and may pull some fixes that cairo has + wanted for XAA as well. + - Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep + cw from getting initialized from the damage code. While it would be + cleaner to have each DDX initialize it if it needs it, we don't have + control over all of them (e.g. nvidia). + - Use the miDisableCompositeWrapper() to keep cw from getting set up for + screens using EXA, because EXA is already aware of composite. Avoiding + cw improved performance 0-35% on operations tested by ajax in x11perf. + +commit 2c82429f8957ed0268c0e4e4fe5aed9093f33960 +Author: Ian Romanick <idr@us.ibm.com> +Date: Sat Oct 1 22:25:13 2005 +0000 + + Refactors __glXImageSize and __glXImage3DSize into a single function. It + replaces all calls to the old functions with calls to __glXImageSize + with the new parameter list. + I have also added 'target' as a parameter. This is a stepping stone to the + code in patch #2410. Basically, if the texture target is one of + GL_PROXY_*, the image size is always zero. This gathers all the checks + for that into a single place. I have *not* modified the existing + callers to take this into account. They still do their own checks for + GL_PROXY_*. However, when the generated versions of those functions are + added to the tree, they *will* rely on that. + The code growth is mainly due to the new 40 line comment before + __glXImageSize. + I have tested this with a few of the texture using demos and tests from + Mesa, including tunnel, texdown, and drawpix. + Reviewed by: Adam Jackson, Eric Anholt, and Brian Paul. + +commit e27b3e4ea1ddf9b2e9c2d63a0e60400b523a8a94 +Author: Ian Romanick <idr@us.ibm.com> +Date: Sat Oct 1 22:19:04 2005 +0000 + + Remove some more incorrect prototypes for the __gl*_size functions. + +commit e270e6394b623b48d416feeef0c3856f2e303c8d +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Oct 1 17:53:38 2005 +0000 + + Bug #3822: out of bound reads in fbbltone and fbblt (Mark Kettenis, Thierry + Deval). + +commit 54b2a14f0fa4397f3e9ae75dd63d5cacfdd778eb +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Oct 1 17:30:58 2005 +0000 + + Bug #3411: fix handling of keyboard Autorepeat rate in xorg.conf. + +commit a07dd03748c8fa2633e294ee4d9ab38265970e5e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Oct 1 07:17:55 2005 +0000 + + Add hw/xfree86/getconfig + +commit abc6aa50fb52fa4fa9b9436dbc3a70f86e62dc27 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Oct 1 06:27:12 2005 +0000 + + Oops - fix build/install of fbdevhw.man + +commit 13e0db19d8c0b1df636f218bcbfbb2c54fa7576f +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Oct 1 06:19:02 2005 +0000 + + Adding more doc files & fbdevhw man page + +commit b5ce065a5e91e2ad3213ea8c711cfe7ed9060c16 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Fri Sep 30 08:54:44 2005 +0000 + + RandR: Fix failure handling (Closes #4635; Thomas Winischhofer) + +commit 4608a2b654be84b2e345bcada63422d18c74a06e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Sep 30 02:37:57 2005 +0000 + + Man page processing/installation and other doc file updates + +commit aa74468aa59b95424cd0000179b8985b267d639b +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Sep 30 02:03:45 2005 +0000 + + sparse cleanups. s/0/NULL/ and mark a few things static. + +commit c65fde5343719d3e9ebc76cc371c6f5f7948de8c +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Sep 28 20:38:42 2005 +0000 + + Make the server distcheck: + - Fix up the XpConfig directory to remove the stuff it installs + - Add a few files to CLEANFILES here and there + +commit 58abce3f90504dd48838a2f7ae7bb5db6a6cff70 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Sep 28 20:01:37 2005 +0000 + + - Use the dirty flag (which should be set correctly all the time, + particularly thanks to Prepare/FinishAccess) to avoid DFS/memcpy on + pixmap move-out if it's unnecessary. This was disabled in KAA because + cache misuse on ATI made me guess that this code was wrong. + - Unwrap Glyphs on closescreen. + +commit f53404bdbba23fd46420564565ab815f7c20b101 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Sep 28 16:55:25 2005 +0000 + + Add kbd_mode build system + +commit 940158a6f2e98069a47293d713df674e16ad8a11 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Sep 28 03:37:22 2005 +0000 + + Replace all uses of __glEvalComputeK (and the doubly redundant + EvalComputeK) with calls to one of __glMap[12][df]_size. This was + tested with progs/samples/eval (from Mesa). + +commit 806d74bc0640f4f3dcc034b36a36aea289b01685 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Sep 28 01:57:47 2005 +0000 + + Add __SVR4 #ifdefs to work in non-Imake builds. + +commit 88957862b812b3e1e19d5e11365a22dc249cf4d2 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Sep 27 23:28:46 2005 +0000 + + Fix distcheck build and install errors. + +commit 003655c02ad3a031031bb4ac859966a513f63e10 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Sep 27 18:36:14 2005 +0000 + + Make XpConfig build system call mkfont{scale,dir} + +commit 156b2cf3f76ae53cc37b6f5910b446c776ccc9ba +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Sep 27 17:49:35 2005 +0000 + + Add forgotten Makefile.am + +commit f3d0cb4a5722e0512bbdcd179215532795cba38f +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Sep 27 16:15:55 2005 +0000 + + Get XpConfig build system in pretty much working state + +commit 1c2e8b1ecc8b7b8c8562461eed7892ff22d17e71 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Sep 27 15:11:56 2005 +0000 + + Fix make dist to include only sgml files. + +commit ca64aab609c3585234410cd8d908f8e1efe5c788 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Sep 27 14:09:31 2005 +0000 + + Add build system for building docs and fix setuid issues. + Add build system for sgml docs. + +commit 1a4e30d508e62ab304722c3525748ff0e3c2899d +Author: Kevin E Martin <kem@kem.org> +Date: Tue Sep 27 13:47:26 2005 +0000 + + Include xorg-config.h so the generated file will also include it. + +commit 30ff9e26196bdba8435e0dcdb96864e81c8cb136 +Author: Ian Romanick <idr@us.ibm.com> +Date: Tue Sep 27 00:04:40 2005 +0000 + + Fix some problems that caused incorrectly annotated prototypes for + __gl*_size functions to be used. The result was that, on x86, the code + would be compiled with FASTCALL semantics, but the callers would not. + This should fix GLX protocol errors that people are seeing. There + doesn't appear to be a bugzilla associated with this problem. + +commit 6c5c54b9a2872f1bb7de36a8d2d4efcef70b14c6 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Sep 26 23:07:44 2005 +0000 + + Various small fixups to get XpConfig to 'build' + +commit 604f7c64efb57a48ec667c2ed62d3b4bad0c302b +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Sep 26 22:45:43 2005 +0000 + + Check in skeleton Makefile.am's for the rest of XpConfig + +commit 8907195d784ff2c72a00b64edab6a8ac3b31dec5 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Sep 26 20:58:26 2005 +0000 + + Take care of more files from monolith's Xserver/hw/xfree86/etc dir: + hw/xfree86/utils/ioport/Makefile.am + Add ioport and pcitweak utils from monolith hw/xfree86/etc dir. + Generate xf86DefModeSet.c from vesamodes & extramodes + Add apSolaris.shar to EXTRA_DIST + +commit 9abccb5e65628c938c6f01b685ab8fbffae7bc3b +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Sep 26 19:33:06 2005 +0000 + + Add initial build system for XpConfig + +commit 0531c4be2f1a30082cfec5e411ab34d17978d66e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Sep 26 02:41:38 2005 +0000 + + alanc@alf:/export/alanc/X.org/head/cvs-rw/xc [7:40pm - 628] head -14 + ChangeLog + include xorg-config.h for modular build + Adjust XF86CONFIG defines for modular build + Fixes for modular build: + - include modular server config headers + - change default XCONFIGFILE to xorg.conf + - define XKB_RULES_DIR if not defined by Imake + +commit 256fa24945bcaa6e5a68a48c1b757f8084e88a38 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Sep 25 17:48:09 2005 +0000 + + Add SecurityPolicy file for XCSECURITY extension. + Add README to EXTRA_DIST + +commit 54639964cc344f1086196729fde37515f11e7972 +Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> +Date: Sat Sep 24 21:56:00 2005 +0000 + + Changed the license to a X/MIT one + +commit 3192f400c72b3b606fcc1798d577737502897b43 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Sep 24 18:45:45 2005 +0000 + + Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen + stubs from drivers, comment the non-empty ones. + +commit a5477ae7ac9a56c1a586950db1dee6661bff149d +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Sep 24 02:40:51 2005 +0000 + + Add scanpci, xorgcfg, & xorgconfig utilities. + +commit 2ba865b3f57340fd1d75f7614c17f615cc127b89 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Sep 23 23:04:04 2005 +0000 + + Fri Sep 23 19:00:06 2005 Søren Sandmann <sandmann@redhat.com> + Apply patch from Ronald Wahl to make sure that the stack pointer is not + modified at points where we access external variables. (Bug 4269). + +commit 7554e1bf29e5aef8e76f88bac2994ea45a924f2b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Sep 23 00:27:07 2005 +0000 + + Sun bug #6321613 + <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6321613> + xorgcfg dumps core when it reads a configuration file that has a + Monitor Section, but does not have a "VendorName" entry inside it. + (Henry Zhao, Sun Microsystems) + +commit 99793543c0fcfd4d699549fcc2bf0ed12aed6a19 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Sep 22 12:40:41 2005 +0000 + + put back some agp related allocation messages + +commit 02566dff4abbda6888f719727c169b966617a83d +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu Sep 22 12:33:36 2005 +0000 + + fix typo + +commit 56e7766c775385b0c6e09e6a65a1c8e10dba786e +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Sep 21 22:26:07 2005 +0000 + + Bug #4541: Fix text drawing in the case where a list contains no + non-zero-sized glyphs. Several variables weren't updated, resulting in + rendering simply stopping when this case was hit. (Anders Kaseorg) + +commit 32497ff479d0c34c05eb5acfcd5f7e186bac3227 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Sep 21 18:14:32 2005 +0000 + + Accept --with-xkb-output argument to specify output dir for compiled xkb + keymaps. Define XKM_OUTPUT_DIR and XKB_BIN_DIRECTORY. + Add XKM_OUTPUT_DIR and XKB_BIN_DIRECTORY. + Add XKB_CFLAGS. + +commit 361a9eb953aaa38f8ebc057185de29e50f9eef26 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Sep 21 10:27:53 2005 +0000 + + - Change migration-in rule slightly: previously, if your score was less + than the max, it was bumped, and then if you were above the threshhold + you got moved in. Instead, do the above-threshhold check separate from + score starting out less than max. While this will likely make thrashing + cases worse, I hope it will fix some issues with long term performance + (think of an xcompmgr with a backbuffer it's doing only accelerated + operations to. If some new pixmap comes in and bumps it out, even once, + it will never get a chance to re-migrate because its score will be + maxed). Change migration-out to be the same way for symmetry, though it + shouldn't ever affect anything. + - Fix a lot of debugging output, both in terms of printing quality, and + completeness. The fallback debugging covers a lot more now, pointing + out new areas for improvement. Debugging toggles are now centralized in + exaPriv.h. + +commit 6a29c4cec156a135d1d9cdb65995f7a84de7cb56 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Sep 21 07:43:01 2005 +0000 + + Add support for hardware accelerating tiled background painting. One + example of this is the root weave, which paints slightly slower on SiS + now in my testing. However, according to keithp some apps use this + feature for a sort of cheap backing store, which this could help with + significantly. While I haven't done much performance testing with it, + it will at least rule out one possible source of terrible performance. + +commit 1115ff4c008dea6d6cafcb39e4ce6d0b3ed4fcc0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Sep 21 00:38:05 2005 +0000 + + Bug #4487: Add the bsd subdir to DIST_SUBDIRS. (Joshua Baergen) + +commit 00bd8968b264c1f69487dd99c212e0ce889b11db +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Sep 21 00:24:10 2005 +0000 + + Bug #4257: Move cfbcmap.c to cfb_common_sources. + +commit b7e723ed6f23cc8d85f1f1eced9d8ccbc2a6b38c +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Sep 20 23:32:21 2005 +0000 + + Missing backslash + +commit 15b2f94de5e2cc7e4df8d897d562dffeda31c82c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Sep 20 18:26:24 2005 +0000 + + Update CVS project tag & notice about pci.ids license in output .h. + Update to match recent changes to pci.ids, extrapci.ids, & pciid2c.pl for + people building on systems without perl. + +commit 7d0f47c43c5c177cae0f375ceaeef892e4c9663a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Sep 20 15:50:31 2005 +0000 + + Add --disable-install-setuid option so you can build as non-root and + chown/chmod later. Also disable by default on platforms that don't need + setuid root X servers (Darwin & SPARC's, according to + InstallXserverSetUID settings in the old Imake config files). + +commit b623c60745ca486667657fa39ad517d1f7a72794 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Sep 19 22:44:49 2005 +0000 + + Linux/Alpha support (Stefaan De Roeck) + +commit bd906c6bb803b286c39eca80e437a21c14e808a3 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Sep 19 18:54:05 2005 +0000 + + Update to latest version from pciids.sf.net + Sync with updates to pci.ids & PCI id list in nv driver + +commit 535cd292c809314efe4730a27b0271adfa842775 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Sep 19 18:38:26 2005 +0000 + + #include "xf86Axp.h" -> "shared/xf86Axp.h" for modular build. (Stefaan De + Roeck) + +commit a1bcf25a1f819768672ac837cb0a3d0c66937656 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 18 02:32:23 2005 +0000 + + Break EXA ABI while we still can. Add coordinates to the UploadToScreen + hook so we can upload a subset of a pixmap, and convert the current + drivers to respect that. Use this support to directly UploadToScreen in + exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR + programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches + hot). I would have bumped major version, only I can't tell what the + EXA_VERSION_* is supposed to be doing as opposed to the module version. + +commit 074913c8a9c1f66c8752387db2c81ad669e91878 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Sep 17 20:02:02 2005 +0000 + + - Don't try to upload 0 byte-per-pixel (PICT_a1) data using + RADEONHostDataBlit. + - Disable the shortcut for switching from 3d to 3d in radeon_exa.c. It + appears that we do need the cache flush here, thought it's not clear + why. Disable the 2d to 2d shortcut while here, since I'm unsure of what + we're doing. Exposed by the following bit: + - Bug #4485: Add a new routine, exaGlyphs, to handle font drawing. Glyphs + were being accumulated in from non-migratable scratch pixmaps, causing + the destination pixmap to move towards screen but the migration + necessary for source never to happen, leading to abysmal performance. + Instead, copy the scratch glyph data into a real pixmap first, then + composite from that into the destination, allowing for migration. time + ls -lR from programs/Xserver showed 26.9% (+/- 6.3%) decrease in wall + time (n=3). + - Create exaDrawableUse* wrapping exaPixmapUse*, but which are aware of + windows needing backing store. Makes migration code prettier, and + ensures that composited windows will be migrated as normal when we turn + off cw for EXA. (issue brought up by keithp) + +commit be2bdab4339e493bb0ac3d0e36508b7aa1cd6e92 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Sep 15 06:46:05 2005 +0000 + + Bug #3990: Require glproto in the cases that it's necessary (DRI or DMX + with GLX). (spyderous) + +commit ef7eef0f68af6bfbb4ee56115ac2f3c1b7425755 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Sep 15 05:55:21 2005 +0000 + + Bug #4046: Install the X.Org server setuid root. (David Schleef) + +commit 88d7eb1f7ed6afc85c07797838714f2601356018 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Sep 15 05:06:54 2005 +0000 + + Bug #3889: Create the log dir on install, and allow configuring + specifically that directory. Failure to have the directory keeps the + xorg server from starting. + +commit 25a0ecdc1868f4b53225b92e8ccd222814e2da2a +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Sep 15 04:07:19 2005 +0000 + + Don't put a version number on the module filename. + +commit 0888ad3874414e32535fecdb717ee7ab86f9d4cc +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Sep 14 07:49:22 2005 +0000 + + Build xf8_32bpp, which is wanted by the mga driver, and export elf.h, which + is wanted by the rendition driver. + +commit dfb5da93bc16b2fd2b00e939dbe101a04bdeab4f +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Sep 13 20:59:05 2005 +0000 + + Turn on DRI by default on Linux, NetBSD, FreeBSD, and fix the build of the + module for FreeBSD by setting some missing defines (XFree86Module, + IN_MODULE) in the dri directory. Note that those missing defines should + be somewhere generic, since there are other consumers of them, but I + haven't figured out where. + +commit 12fbcfefe672ec226bdbc7597bf2fd2cb0ee1e19 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Sep 13 18:37:35 2005 +0000 + + Add some initial BSD support for the xorg server. Incomplete on NetBSD, + OpenBSD, and non-i386/amd64 FreeBSD for sure. Plus I haven't actually + run it yet. + +commit 51eb6c83a3b2721703ca50758853bbf9f99fc4d2 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Sep 13 15:28:29 2005 +0000 + + Tue Sep 13 11:27:05 2005 S%Gï¿¿%@ren Sandmann <sandmann@redhat.com> + * programs/Xserver/miext/shadow/shadow.c (shadowDamageBox): Add + missing REGION_UNINIT. + +commit 133edff1b499b2c794fcc9a1860c1b5526b58869 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Sep 13 05:44:47 2005 +0000 + + Don't define POSIX_SOURCE on any BSDs, since it breaks things. + Define NO_SYS_HEADERS, as the monolithic build does. Helps FreeBSD. + Don't include validate.c in the library, since it seems to be a userland + test program. + +commit c3d6799cee7ff8411b3a05a7ab7e2a9e80c95059 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Sep 13 01:33:19 2005 +0000 + + Bug #594: CAN-2005-2495: Fix exploitable integer overflow in pixmap + creation, where we could create a far smaller pixmap than we thought, + allowing changes to arbitrary chunks of memory. (Søren Sandmann + Pedersen) + +commit b290884719e18646326f0c2412c2494a07fe3cfd +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Sep 13 00:44:52 2005 +0000 + + Bug #3284: Make the DRI lock reference count per-screen. + +commit 846f797f37c1ae57a8dad981113b1139359d8c94 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 12 08:24:48 2005 +0000 + + Add missing fontsproto and fontenc to REQUIRED_MODULES. + +commit 5b218617fa8ba52bf65aef35da39e06c662495e6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 12 07:53:16 2005 +0000 + + Add missing resourceproto to REQUIRED_MODULES. + +commit ade158d238475ce923fbc5c49275c78cf3864223 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 12 07:07:59 2005 +0000 + + Define WITH_VGAHW, since we always build it; add to Xorg headers. + +commit 34dc481a16c0c1cbd69a9ec7172331b59b85e9a7 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 12 07:02:46 2005 +0000 + + Put DMX AC_CONDITIONALS at the top level, since they must always be called. + +commit b0f6fe1f38b448b5f1a280e86b01353865866c70 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 11 21:38:41 2005 +0000 + + Add some optional (disabled) fallback debugging code to the async code, for + better tracking of when we're hitting software. + +commit 1c003ccf5d68baaae6fafdc75eff964f2a62fc35 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 11 19:08:10 2005 +0000 + + Add a pair of hooks, PrepareAccess() and FinishAccess(), which get called + around CPU access to the framebuffer. This allows the hardware to set + up swappers to deal with endianness, or to tell EXA to move the pixmap + out to framebuffer if insufficient swappers are available (note: must + not fail on front buffer!). + Submitted by: benh + +commit ca210830bd361e3d91b6bc741c495b61c424d1d2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Sep 11 18:43:55 2005 +0000 + + Simplify life for EXA drivers by reducing some {Con,Dis}joint ops. + +commit 04f81cacb9fd0944879b2c23a99fa3a1ae979b12 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Sep 11 18:33:31 2005 +0000 + + OpenBSD also doesn't like defining POSIX_SOURCE: it limits available + functionnality in headers beyond what's used by Xorg. + +commit 089b4272cf32fc9429c1a0e666c2ffb34fda0b93 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Sep 11 01:16:14 2005 +0000 + + use RGB_DB not RGB_PATH as that's what it's looking for + define HAVE_XKB_CONFIG_H so setting xkb-path works (Jürg Billeter) + +commit 2f9d01c9681d80235a70263e2e087dc6c181cdc8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Sep 8 01:15:47 2005 +0000 + + Remove some references to mfb/cfb support that is no longer there. + +commit b5d42012f9be87f3b45a089c596ce6dba8845794 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Sep 7 01:30:23 2005 +0000 + + Fix typo resulting in failure to swap between RGB/BGR properly. (Stephen P. + Becker) + +commit c8de8c23fbccb3296747f429a02c0c0682b74bf5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 5 07:43:51 2005 +0000 + + Fix tests for maximum number of colours when creating a colourmap, so a + 32-bit visual (e.g. ARGB) doesn't overflow an int when attempting to do + 1 << 32. (Benjamin Herrenschmidt) + +commit 5c5c51fa6da03f19831632a092761a1e4bcf653b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Sep 5 07:40:50 2005 +0000 + + Initialise private arrays with calloc, rather than standard malloc. + (Benjamin Herrenschmidt) + +commit 691669c0121494df90c8523f7d17e01ba0b14a57 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Sep 3 07:08:58 2005 +0000 + + xorg-server.h -> dix-config.h (thinko). + +commit 4b2f5ba1b5d59fd6bd7f82da5730f72e8df04858 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Sep 3 03:27:55 2005 +0000 + + Use macros from xtrans.m4, issue error if not found. + +commit 733a6d7a268945d149bcea159253408bedc69b12 +Author: Jesse Barnes <jbarnes@virtuousgeek.org> +Date: Sat Sep 3 02:21:36 2005 +0000 + + Add EXA driver writer documentation for the benefit of future generations + of X hackers. + +commit 854010d71dc0f1e9b73cdc764c9d2cf36f1da625 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Sep 2 03:22:01 2005 +0000 + + Add -include dix-config.h to GL/mesa/X to catch _XSERVER64, et al. + +commit 287336f3c9e5023acbfba6508b05a68ccca9ddf0 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Sep 1 19:56:14 2005 +0000 + + Teach xkb how to optionally run xkbcomp from $bindir instead of + $datadir/xkb. + +commit 94fbdb5c6d2cdc7b70ecdabe22a9de8b9aabeced +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Sep 1 14:56:35 2005 +0000 + + Make RGB_PATH configurable. + Move I2C modules back to $(moduledir)/multimedia. + +commit a65c5796133d126b1810749b5206607e7c42d787 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Aug 31 14:58:09 2005 +0000 + + Include xkb-config.h if we have it so we pick up the paths defined there. + +commit 9d3b5e89d691b79ea3361e6dc82938c22d70d0e3 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 30 22:34:14 2005 +0000 + + Save keyboard LED state on startup and restore on exit so text console mode + LEDs match text console mode state. Move push of streams module earlier + so it's loaded before we start using kbd ioctls provided by the streams + module. + +commit fa6fbd018da939fda7cc2b9a9aa2717b9675a178 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Tue Aug 30 22:31:52 2005 +0000 + + Use the $(moduledir) makefile variable instead of @moduledir@ so it can be + overridden at make install time. + Remove driverdir and inputdir from pkg-config file. The directory layout of + moduledir is fixed and well known by drivers. + +commit b4f4bf028a88ee709f4536373de2d40b6445006e +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Aug 30 19:51:59 2005 +0000 + + programs/Xserver/hw/xwin/winmultiwindowshape.c Fix off by one error (Colin + Harrison) + +commit 0e50af8b7f459aafd1d1d52414629e926167a751 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Aug 30 19:35:06 2005 +0000 + + typo fix + +commit 0c74799af4f924ba64ebd6052802b73547f55c72 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Aug 30 04:41:04 2005 +0000 + + Remove existing broken maxX/maxY code for composite (results in infinite + loops, doesn't deal with failure, doesn't present the interface to + drivers that I expected) and instead replace it with a simple fallback + to software when coordinate limits could be violated. Act similarly in + other acceleration cases as well. + The solution I want to see (and intend to do soon) is to (when necessary) + create temporary pictures/pixmaps pointing towards the real ones' bits, + with the offsets adjusted, then render from/to those using adjusted + coordinates. + +commit f20e845b04dee5fc0780811f565180e322b60b73 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Aug 30 03:42:07 2005 +0000 + + More 0 -> NULL for pointers missed in previous commit to this file. + +commit 7777d325a3d049cc233c004cba288ed5d10539c2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Aug 30 03:05:21 2005 +0000 + + Apply an xserver patch from cworth: Avoid buffer ovverrun when a + trapezoid's right edge is on a pixel boundary. + +commit e321f9e7ff7de9aa702e33a22743b55c8bb66953 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Aug 30 03:01:38 2005 +0000 + + Apply the xserver patch from vektor for bug #4208: Use NULL for pointers + instead of 0. + +commit 20813d3af065f9b719b39d2e7a3382b8fa278a48 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Aug 28 19:47:39 2005 +0000 + + Bug #3974: Fix unaligned memory access on LP64. (Matthieu Herrb) + +commit 0926cf79c030f29dce32a9dc944734960ec93d19 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Aug 26 20:21:57 2005 +0000 + + Add diagnostic messages for exaDriverInit failure cases. + +commit 5ffff7cb868a768307ff6faf164210020e6b94a2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Aug 26 20:08:09 2005 +0000 + + Bug #4160: Fix Altix kernel version check. + +commit 6b0cdc5dd9e451021c562ac4b6b2101d50187a30 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 16:46:41 2005 +0000 + + Change use of dix-config.h to xorg-config.h. + +commit 9d1b349b3765fb587b353c78cca9aa083f5d0eee +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 16:34:55 2005 +0000 + + Back out previous change until I figure out something smarter. + +commit 3075df24e7931901c6f0526e10a89631fd73c4d0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 07:35:55 2005 +0000 + + Subvert SIGUSR2 to reload all input devices. (Ubuntu #020) + +commit 89c84575ea905c7598d6b6029c9209abe1cfb074 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 07:24:21 2005 +0000 + + Undo rate/period change after function body, so the damage doesn't leak + into other functions. (Debian #050) + +commit bb5e934df7f23fb365ed673a12d283ff52af79c0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 07:15:04 2005 +0000 + + Only open /proc/bus/pci/devices once. (Ubuntu #029) + +commit c937faadd0a0a5f2598b84286ac1ed8996a512e5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 06:48:24 2005 +0000 + + Better error message on failure to set iopl. (Debian #021) + +commit 6d34a2ac8a33bd6c9083106b38fab6062e033e39 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 06:35:00 2005 +0000 + + Add Xv symbol from Xext. + +commit b8f0d4c3ebee363279f9dc7318de3e3c854ca5ef +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 06:29:15 2005 +0000 + + Spit out an error when there is no valid FB device, instead of just failing + silently. (Debian #070) + +commit b48a24e7969d99a0116bc780c70d3e1c18b34769 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 06:23:41 2005 +0000 + + Don't assume that all sun4m CPUs support muldiv; the Cypress CPU, which + implements the 4m MMU but only v7 instructions, does not. (Debian + #100). + +commit fd158d3d5215b0a013f5305a76097b0b8fa14cf6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 05:49:44 2005 +0000 + + Get prototype for ntohl from SuSv3-compliant location, fixing it for + systems which define ntohl as a macro only, not both macro and + function. (Debian #076) + +commit 53e489c0e39b89f41213a726fe1b611d7d9a18db +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 05:47:36 2005 +0000 + + Work around ATI expansion ROM problem on IA64 caused by prototype HP + McKinley systems. (Bdale Garbee) + +commit 40374d1149d6dcf0b4521faae8bdfecc8a3af077 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 26 05:00:07 2005 +0000 + + Accept 'Enabled' and 'Disabled' for Extensions section (Ubuntu #990) + +commit ea80b5db257f4c22cf5a152084aef5fe05079db0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Aug 25 22:11:04 2005 +0000 + + Fix a use-after-free of cursor data by refcounting for the sprite.current + reference. The particular path seen was XFixes' ReplaceCursor() + resulting in the sprite.current being freed, but then it getting + accessed during the ChangeToCursor() that happens as a result of + WindowHasNewCursor(). + +commit 54cc45b09bc6c860b3de2012b57c4b35ca18ffd2 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Aug 25 21:22:41 2005 +0000 + + Thu Aug 25 17:15:01 2005 Søren Sandmann <sandmann@redhat.com> + Add all the drivers to the module_LTLIBRARIES instead of having separate + variables for them. Pointed out by Kristian Høgsberg. + +commit ff22adc09763b2bd860e7f780a5d0855cab0ab30 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Aug 25 14:19:43 2005 +0000 + + Remove sun_inout.s so make dist works (discussed with Alan Coopersmith). + +commit 344a24b6229f477c892dd855546391bc1e091bd7 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Aug 25 04:09:45 2005 +0000 + + Use system curses library on Solaris for xorgcfg text mode. + +commit 0711502f1847ed461672b9842218b9afa9d349ed +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Aug 24 23:48:11 2005 +0000 + + Bugzilla #4226: Change the pixmap migration strategy for the CopyNtoN case. + Now, if either source or dest were in framebuffer, try to get both + there, but prefer system memory for both otherwise. Required making + exaasync.c go through the try-acceleration path. This significantly + improves window resizing under composite, because previously the + pattern of creating a new pixmap and copying default contents from the + screen caused a fallback every time due to the new destination pixmap + being in system memory. + +commit 2261710fe0dffd60433e3362ac12adf4db570fe5 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Aug 24 23:38:25 2005 +0000 + + Fix a bug where NULL could be dereferenced during the pixmap kick-out + process by referencing the correct offscreen area. Also drive-by the + comments related to these for clarity. + +commit 55c5c6953a3a661758a42b147f9542950a62fc4d +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Aug 24 22:43:27 2005 +0000 + + Bugzilla #4090: Introduce getters for pixmap pitch and offset, to + simplify/clarify it for driver writers who probably don't want to know + what pPixmap->devPrivate.ptr or pPixmap->devKind mean. Converts the sis + driver to use them, and bumps the EXA module minor version. + +commit 079ad773e09ed0c5baf01de3d4f02a5568da5634 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Aug 24 22:37:15 2005 +0000 + + Fill in xf86DeallocateGARTMemory stub based on lnx_agp.c version. Add + include of xorg-config.h for modular builds + +commit 8fd250e5e4c2016614b82e2d653b7fbf8a3a5b99 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Aug 24 21:51:28 2005 +0000 + + Bugzilla #4089: Fix crashes in !EXA_OFFSCREEN_PIXMAPS case by not trying to + do migration when the EXA pixmap private is NULL. + +commit 79dc5f3d5fe5a66f5fa53af9afc30d27d1af0bce +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Aug 24 21:28:40 2005 +0000 + + Don't export non-standard symbols generated GCCs stack protection feature + (__guard, __stack_smash_handler). + +commit d2952de6e3d9197529695bb88d8c3af679ad71af +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Aug 24 19:41:43 2005 +0000 + + Wed Aug 24 15:39:07 2005 Søren Sandmann <sandmann@redhat.com> + Add GLX_{INC,LIBS} for xprint. + Add @DIX_FLAGS@ to AM_CFLAGS + +commit 81e708440ced309adc62ebf43d00becd32338db5 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Aug 24 19:35:51 2005 +0000 + + Wed Aug 24 15:29:50 2005 Søren Sandmann <sandmann@redhat.com> + Conditionally include dix-config.h + Conditionally include dix-config.h + +commit 9657e0e9def47dba5b0bfa7461874362712a07bb +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Aug 24 15:18:06 2005 +0000 + + Don't try to build dmx/input/lnx-*.c if <linux/keyboard.h> isn't found + Don't try to build dmx/input/usb-*.c if <linux/input.h> isn't found + Replace -rdynamic with $(LD_EXPORT_SYMBOLS_FLAG) for compatibility with + compilers other than gcc + +commit 825a95a1fab69f84c99ae132888fced22e28be33 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 24 11:18:35 2005 +0000 + + Remove use of dix-config and xorg-config.h from public headers. + +commit 1fb4a5a4ea993a7913a7bcc362315d31b2907836 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Aug 24 09:12:50 2005 +0000 + + Add xcmiscproto and bigreqsproto to REQUIRED_MODULES, since Xext uses them. + +commit b47535bd661743946851099f226f9e6aa4cc8c90 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Aug 24 08:49:31 2005 +0000 + + programs/Xserver/GL/windows/glwrap.c Wrap PointParameteriNV & + PointParameterivNV for Windows builds. + +commit 9f498a37dd3d8456d2a97be9c039b63abc81a5fe +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 23 20:58:29 2005 +0000 + + Display more friendly mouse protocol names. Enable mouse wheel mapping by + default. + +commit cff4b1c2166aa2e75618c8df09554a602c3a68c5 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 23 20:12:26 2005 +0000 + + Check for getconfig in GETCONFIG_DIR if it's not found in module dir. + +commit bfd13645867aab831b7a0f2b1757cb80837c07d9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 23 09:20:49 2005 +0000 + + Add missing saver, evie, video, trap proto pkg-config checks. (Georgi + Georgiev) + +commit 27afac2ce6a77bc68669c1af6a61c589aa9ef384 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 23 08:59:30 2005 +0000 + + Fix test for Xnest presence. (Donnie Berkholz) + +commit fed61462be281c568df6407f94ea519748f0b720 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Aug 23 08:58:40 2005 +0000 + + Fix up warning on debugging. + +commit e848eb289c9251742a88e76017603952394f4262 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 23 01:14:35 2005 +0000 + + Rename app-defaults entries from xf86cfg to xorgcfg to match name passed to + XtAppInitialize. (Henry Zhao, Sun Microsystems) Also, display vendor + version instead of 4.0 for server version. + +commit 6076fca82528da8d50b0ed6be8da6f811321474d +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 23 00:32:27 2005 +0000 + + User message cleanups/updates for modern configurations. + +commit b07602014061cb41540f6a7e74e4132e67aa1117 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Aug 22 21:47:59 2005 +0000 + + If MAKE_XKM_OUTPUT_DIR is defined, call trans_mkdir to create directory if + it doesn't already exist. (ported from Solaris Xsun bug #5039004) + When BuildLikeSun is set, define MAKE_XKM_OUTPUT_DIR and set the xkb output + directory to /var/run/xkb. + +commit 4a19a33db6d04b5835830a665daa679ee2fcafe7 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Aug 22 21:29:18 2005 +0000 + + bugzilla #2880 (https://bugs.freedesktop.org/show_bug.cgi?id=2880) + attachment #2987 (https://bugs.freedesktop.org/attachment.cgi?id=2987) + Use system method to access PCI config space for inb and inw in + addition to inl (Olivier Baudron and Kevin Martin). + +commit 5557a40a022b0ede36edd3370a60f5fc3d147796 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Aug 22 19:52:26 2005 +0000 + + Fix linking errors for xprint. + +commit 7693f668efd206a6c259166665bc36d3c6335e8d +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Aug 22 12:05:18 2005 +0000 + + programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c + programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c + programs/Xserver/hw/xfree86/os-support/linux/Imakefile Add basic ACPI Linux + support so that events can be passed to the driver. (Alan Hourihane) + +commit 02c834f198eab4c4686d8156b88508fe102099c1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 22 09:15:31 2005 +0000 + + Include Xv and XvMC headers in the SDK. + +commit 3c4d605c7e8a9f6d296086a5b03b4f11b90590db +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 22 09:15:20 2005 +0000 + + Fix linkage for Xnest, Xvfb, Xdmx and Xorg DDXes; include all libs. + +commit 79be1f6d4d1ab48841d31d5553dd36b1b3632650 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 21 19:29:55 2005 +0000 + + Fix inclusion order of dix-config.h, so _XSERVER64 gets defined before X.h + or Xdefs.h get included. (Jürg Billeter) + +commit 8d6e743bc4e6854ee0bb0fa4f197acd6d7683ccd +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 21 19:23:17 2005 +0000 + + Add _XSERVER64 definition to config headers. + +commit 588105173840355717d7b2f7f652289a41166c3f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 21 19:15:11 2005 +0000 + + Huge cleanup. Group into sections: hardware feature detection, extension + detection/configuration, DDX options. Make building of Xorg DDX fully + optional. Clarify and correct some help texts. Change all comments to + use dnl instead of #. Quote all tests correctly, and guard + pure-variable tests with 'x' (e.g. test $DMX = yes -> test "x$DMX" = + xyes). Since the DDXes seem to have pretty divergent extension support + these days, get rid of EXTENSION_LIBS, DMX_EXTENSIONS and + XPRINT_EXTENSIONS, and go back to building extension lists by hand in + the DDX-specific sections. Use portable POSIX constructs everywhere + (e.g. test foo && test bar, instead of test foo -a bar). + Clean up old cruft. + Set _XSERVER64 on 64-bit architectures, and use x86_64 for host_cpu instead + of amd64 (Jürg Billeter). + +commit 367f45073953f8f99a2d9dd054f479e1070f856e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 21 08:43:46 2005 +0000 + + Change xorg_bus_sbus to xorg_bus_sparc; build sparcPci.c on all SPARCs. + +commit 71b3fea94e8845f35e47503636ca1fe78d2d48ca +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 21 08:24:52 2005 +0000 + + Typo fix (SOURCE -> SOURCES). + +commit db2909ce76b178663de301c09fb97f2936b1997e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 21 06:56:19 2005 +0000 + + Add test for SPARC. Build SparcMulDiv.S on all SPARCs. + Make the default font path configurable. + +commit d96e6666862553d59fc1f9fdd14fb65f36d589af +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Aug 20 18:52:07 2005 +0000 + + Add sparcPci.c to EXTRA_DIST. + +commit a402c876a465904ac71ebf39af67ea451b2457dc +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 20 18:11:17 2005 +0000 + + Make DRI/GLcore builds srcdir != builddir safe, and invoke symlink-mesa.sh + in our builddir, not our srcdir. + +commit 238d45d2f148e1e0af4b1619cc1d5e8cc4bf9661 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 20 18:10:03 2005 +0000 + + Make Xprint build optional. + +commit abab3fd628c2d1096e8534192f33c1068a573c12 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 20 18:09:21 2005 +0000 + + Make Xext linkage srcdir != builddir safe. + +commit bb1d99ee72cc560e95010ea1008d5e796177ae62 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 20 18:07:59 2005 +0000 + + Build libxkbstubs.la to stub XKB DDX functions (e.g. VT switches), and + build libxorggxkb.la from within the Xorg DDX to replace the previous + xf86VT.o, et al, hacks. + +commit 8a32ed46480d78b69f289c90098f5ed4a830851f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 19 15:48:18 2005 +0000 + + Really hopefully the last xorg-commit test. + +commit 2fd951434507d2a2c0266a052bdca6e223d31bfa +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 19 15:45:55 2005 +0000 + + Another test commit for xorg-commit. + +commit 39630b301f769118959b20d962404555714a5812 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 19 15:25:19 2005 +0000 + + Testing xorg-commit, nothing else. + +commit b13d3382de0027e897532926983b79caaa1eb655 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 19 15:21:54 2005 +0000 + + Fix dates on Søren's entries. + +commit 8ec79e05feacd61562b53ebf36a8b30967affc1e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Aug 19 15:15:51 2005 +0000 + + Make symlink-mesa.sh call srcdir != objdir safe. Remove requirement for + XF86Rush protocol headers, which we don't even use. + +commit 057a8709a116feb0fd0004141bbac20d2766f3db +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Aug 19 00:13:46 2005 +0000 + + More updates for Panoramix -> Xinerama rename + +commit bed3235d222fd6e2207f6c0d551c67d5a53322cd +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Aug 18 21:28:09 2005 +0000 + + Thu Aug 18 17:27:09 2005 Søren Sandmann <sandmann@redhat.com> + Move fbmmx to a convenience library since the mmx flags may be harmful when + applied to non-mmx code. + +commit a0366ddb8cb1c57b85a5806eb348abc19c7f92d6 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Aug 18 17:14:11 2005 +0000 + + Replace gnu-makeism with portable rules + +commit ea5c49cb17ac956d6dea6bf563e392e61c39da2b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Aug 18 01:40:33 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2331 + <https://bugs.freedesktop.org/attachment.cgi?id=2331> Lines ending in + <backslash><space> break with cpp from gcc >= 3.3 (Peter Breitenlohner) + +commit 22694500e0dd8752b4c01e340f587ecba1ff7fb7 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Aug 17 23:20:27 2005 +0000 + + Add xf86Sbus.h to EXTRA_DIST files (bugzilla #4128) + +commit df938987d6c19fbdfff8d3334bb497f4814ae384 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Aug 17 19:03:18 2005 +0000 + + Add buildsystem for Xprint, and: + Wed Aug 17 14:50:58 2005 Soren Sandmann <sandmann@redhat.com> + Include <X11/extensions/Print{,str}.h> instead of "Print{,str}.h" + Include <X11/fonts/fontstruct.h> isntead of "fonts/fontstruct.h" + Wed Aug 17 14:54:49 2005 Søren Sandmann <sandmann@redhat.com> + Conditionally compile in xprint.c + Add Xprint + +commit f2f6820c3f01810a4da5a8bb4e43119ef2a3fcb6 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Aug 17 17:20:13 2005 +0000 + + Wed Aug 17 13:13:00 2005 Søren Sandmann <sandmann@redhat.com> + Make asm labels local. Bug 4073, patch from Diego Pettenò. + +commit ad7f2fc67376f4fbfe81047273de12f7926f0b17 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Aug 16 16:21:09 2005 +0000 + + symlink.sh: Temporarily disable xkbdata, add type1mod.c + Tue Aug 16 12:09:09 2005 Søren Sandmann <sandmann@redhat.com> + Add ft and type1 modules. + +commit 24597a1ee2c567ec6bc2f2208457f2778937a034 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 16 00:40:25 2005 +0000 + + 2005-08-15 Alan Coopersmith <alan.coopersmith@sun.co>m + Convert sunPostKbdEvent to use xf86ProcessAction like xf86PostKbdEvent. + +commit b86282b764387ef8315fc4045d4e1ca1bb74fee1 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Aug 15 23:48:35 2005 +0000 + + Set ZAxisMapping default to "4 5 6 7". + +commit a6c8d0d71eef7cb964797f7595be36ee0ac10a1a +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Aug 15 19:42:48 2005 +0000 + + Mon Aug 15 15:41:26 2005 Søren Sandmann <sandmann@redhat.com> + Link this module with libXext.la. + Mon Aug 15 14:56:57 2005 Søren Sandmann <sandmann@redhat.com> + Remove the xkb* files. + Add xkbVT.o and friends as the last things on the link line so they will + override the symbols in libxkb.a. Add a comment on how this situation + might not be considered ideal. + +commit 46aede552aa43cd59f81980303826b5c3d889c02 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Aug 15 18:59:16 2005 +0000 + + Mon Aug 15 14:56:57 2005 Søren Sandmann <sandmann@redhat.com> + Remove the xkb* files. + Add xkbVT.o and friends as the last things on the link line so they will + override the symbols in libxkb.a. Add a comment on how this situation + might not be considered ideal. + +commit bcc95c83406a4498227ffd8384bc272fd8cdc49c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Aug 15 18:32:08 2005 +0000 + + Add AC_SYS_LARGEFILE to match flags used in monolith + +commit 809906a754a1289b7e88489241a2065aa0bf27a2 +Author: Dave Airlie <airlied@linux.ie> +Date: Mon Aug 15 08:24:45 2005 +0000 + + make mouse support work - note you need to change the evdev devices in the + source.. hacky... + +commit fe5abff38e65c1a49886924efdf0242ab8048008 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Aug 15 07:30:05 2005 +0000 + + Egbert's 64bit fixes for mixed 32/64bit clients + +commit ebedc8bbb54b9b4e1814bc2758216af2bab93540 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Aug 14 19:46:55 2005 +0000 + + - Fix the exa pixmap offset/pitch alignment to deal with non-POT alignment + requirements. MGA, notably, uses a multiple of 3 in some cases. + - Rename the pixmap offset/pitch alignment fields to more clearly state + their meaning. + +commit e3509c940fa1fc3988d23f884ca8bffc87d091e5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Aug 14 16:24:30 2005 +0000 + + Don't link libXext, as it is linked in to the server also. + +commit 05071ae0fb847c211b1f20770d3b57fc2172738c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Aug 13 07:41:33 2005 +0000 + + Don't link in libx86emu.a as this a) fails badly on non-x86 systems, and b) + is done via x86emu.c including all the source files anyway. + +commit 1ffe9ceb2f6a7261fb62c90dfea861f9dadd27ce +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Aug 13 06:15:35 2005 +0000 + + Oops, forgot a file in earlier Solaris kbd commit + +commit c29051f9d108fe49c23d9cf36fd08cc64c87262a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Aug 13 00:11:28 2005 +0000 + + Add LintTarget() + Bugzilla #1068 <https://bugs.freedesktop.org/show_bug.cgi?id=1068> Port + Solaris keyboard code to work with kbd driver. + Also incorporated "audio bell" feature from Xsun keyboard DDX to play bell + tones via /dev/audio (specified via Option "BellDevice" "/dev/audio" in + keyboard device options). + +commit 616a65c4cc528278168db1414776f3a867cd463e +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Aug 12 18:50:33 2005 +0000 + + Fri Aug 12 14:49:24 2005 Søren Sandmann <sandmann@redhat.com> + Apply another patch from Billy Biggs to fix precision issues. + +commit 1eed84f227311730ce1f9ffab190e95de967c7da +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Aug 12 18:47:17 2005 +0000 + + Fri Aug 12 14:45:54 2005 Søren Sandmann <sandmann@redhat.com> + Fix up multiplications based on patch by Billy Biggs. Part of bug 3945. + +commit 8bfffb96b552a3facb77ff9e81658e80becbf2f4 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Aug 12 18:31:07 2005 +0000 + + Fri Aug 12 14:29:09 2005 Søren Sandmann <sandmann@redhat.com> + Apply patch from Billy Biggs that fixes rounding problems with division. + Part of bug 3945. + +commit 812ed2e17bfe8e232313cf9ab78000a564cb6b3c +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Aug 12 17:43:38 2005 +0000 + + Fri Aug 12 10:45:01 2005 S%Gï¿¿%@ren Sandmann <sandmann@redhat.com> + Make this function compute the same results as the fbByteMul macro. + +commit 370b111f4882a95248bcc4727438c95a065c174d +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Aug 12 16:30:57 2005 +0000 + + Use '$(DRMSRCDIR)/shared-core' instead of '$(DRMSRCDIR)/shared' for DRM + includes. This matches the way drivers are built in the Mesa tree and + fixes a build problem in the Savage driver. + Convert uses of __glPointParameterfvARB_size to + __glPointParameterfvEXT_size and uses of __glPointParameteriv_size to + __glPointParameterivNV_size. This eliminates the need to hand-edit + indirect_size.c after it is generated. + +commit 5f5117729de3a8a4eb6e17dc0979e4b1c1ef9918 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Aug 12 01:17:58 2005 +0000 + + Fix segfault when "kbd" fails to load and "keyboard" driver is not + configured. + +commit 13e16ee93a328a55494c2933143c66559fe7ba98 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Aug 11 15:46:42 2005 +0000 + + Thu Aug 11 11:43:32 2005 Søren Sandmann <sandmann@redhat.com> + Make sure we don't crash on glyphs with NULL bits. Bug 659. + +commit 3e471ddf1dbf58ed021d6f31bdaf438872f03ca8 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Aug 11 14:36:29 2005 +0000 + + Add check for whether the platform is MMX capable and add the relevant + flags if so. + +commit 130fffc0cdbfdc29f33f1ee97c09e744c19e243a +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Aug 10 20:22:57 2005 +0000 + + Wed Aug 10 16:17:38 2005 Søren Sandmann <sandmann@redhat.com> + Add back non-SSE implementations. Define USE_SSE if the CPU is amd64/x86-64 + +commit ef50bba5694ef276a239882fae3502638b4ec784 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Aug 10 19:42:36 2005 +0000 + + Revert previous patch as it causes build failures + +commit b99360e264c9531593ce8eb67bd006275ca5e5a0 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Aug 10 19:15:44 2005 +0000 + + Add XF86DDXACTIONS to AM_CFLAGS + +commit 73a335a926e50afde36816ab47dae689202df319 +Author: Jon Smirl <jonsmirl@yahoo.com> +Date: Tue Aug 9 16:51:05 2005 +0000 + + Point xegl at the DRI driver + +commit 29d0ba9f06d90a1c7f619db87d681ca53fa1bf38 +Author: Jon Smirl <jonsmirl@yahoo.com> +Date: Tue Aug 9 15:58:20 2005 +0000 + + Touchup xgl for modular tree + +commit 435e2a09de7c9dd843b05f4a0484371a67940515 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 9 01:18:04 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=3950> Xorg prints version numbers in + wrong format for modules compiled for Xorg 6.99 & later (Adam Jackson & + Alan Coopersmith) + +commit 5849c69db80b2320bddb7fafb519300cc0435c84 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Aug 8 18:02:08 2005 +0000 + + Mon Aug 8 13:39:45 2005 Søren Sandmann <sandmann@redhat.com> + Conditionally include xorg-config.h + +commit 5e6e5e6d8c6add3aac5c3aebc984d3afb842edc1 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Aug 8 17:38:37 2005 +0000 + + Mon Aug 8 13:36:23 2005 Søren Sandmann <sandmann@redhat.com> + #undef PIXPRIV here. + +commit a11ce76b0625501a202fa34e18777b7bd42b2713 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Aug 8 06:25:21 2005 +0000 + + Build with modular X.org libraries and headers. + composite/compwindow.c Don't damage unmoved windows. Let border clip reset + leave damage alone, pending actual damage for painting. + +commit 129e812c339879b68bb162331ac9b7e0f86a7474 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Aug 8 02:30:31 2005 +0000 + + Re-add _XOPEN_SOURCE as it's needed *sometimes*. Place it in #ifndef to + avoid whinging. + +commit 4dfc3357a78a52ef70750608138dfeef0371cbc4 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Aug 8 00:38:41 2005 +0000 + + Add autogenerated source files and other various non-CVS material to + .cvsignore files + Use XORG_CFLAGS. Ensure that all exa files are in SOURCES + remove _XOPEN_SOURCE as it's always in xtrans.pc these days and gcc whines + libdamage.la needs libcw.la when COMPOSITE is defined, but that + libdamage.la must be after libcomposite.la, so add libcw.la to + DAMAGE_LIB instead of EXTENSION_LIBS. Regularize library link order + across all X servers + +commit 7d2b08aa4786eb4d181c88f7dc6b7eb059cc9dad +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Aug 7 20:42:50 2005 +0000 + + Invert the sense of the composite configure flag to match reality. + +commit fcaa6f30c489578589af19ef798ab31150e696a2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Aug 7 19:02:32 2005 +0000 + + Bug #3989: Fix Composite builds, enable Composite build by default. (Olli + Helenius) + +commit 3639fb243450ae447e9901de9f909e975a919514 +Author: Chris Lee <clee@c133.org> +Date: Sat Aug 6 23:56:18 2005 +0000 + + Enabling EXA by default in the modular build. + +commit a16357ebc9344fbf3e393da9e7b28164ad5b9dc8 +Author: Chris Lee <clee@c133.org> +Date: Sat Aug 6 23:46:38 2005 +0000 + + Last bits of changes to make exa build properly in the modular server. + +commit cc67bd187f06bfade0d2fe1b4cca92805458b210 +Author: Chris Lee <clee@c133.org> +Date: Sat Aug 6 23:34:09 2005 +0000 + + EXA support in the modular build. + +commit 33326f4ee884aa677e4568c3eaed4311a8ed0f2a +Author: Chris Lee <clee@c133.org> +Date: Sat Aug 6 23:27:33 2005 +0000 + + Adding exa support to the modular server. + +commit b90a88e80310e5650e2abed4c151889d9c0bd316 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Aug 6 19:48:12 2005 +0000 + + Add checks for functions used in os/access.c & os/connection.c: + getdtablesize(), getifaddrs(), getpeereid(), getpeerucred() + +commit 2304c14fe5d3796c557a86d0ece1f0fb92591469 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Aug 6 19:14:24 2005 +0000 + + Fix endian test to work on big-endian platforms correctly + +commit fc29d014aa586229cdc976aa1bfe38bd949f7cde +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Aug 6 16:29:20 2005 +0000 + + Merge in patch release RC handling code from 6.8.2 (Kevin Martin) + +commit 9828a38ed695fed9788ace8bba575e521fa354b7 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Aug 6 03:14:50 2005 +0000 + + Solaris build fixes needed for modular builds + +commit f51047c0b6749ae8f04925eb62706b4743328383 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Aug 5 15:43:31 2005 +0000 + + Fix 32-bit vs. 64-bit test for Solaris + +commit 4220a0c4ccd0672460d31db239829384aee69f9a +Author: Matthew Allum <breakfast@10.am> +Date: Fri Aug 5 09:08:32 2005 +0000 + + Make Xephyr work without shadow fb + +commit fedbce2186bbe3bd8d23a4d74c35f10286930a7d +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Aug 5 00:13:31 2005 +0000 + + EXTRA_DIST hacks to get all the OS support files into the tarball. + +commit 39a80312e0c6e9f3b260d2f8279c71aef0a60d12 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Aug 4 22:31:20 2005 +0000 + + - Bug #3960: Add remaining GLX and pci.ids stuff to DIST (Cha Young-Ho, + Olli Helenius) + - Fix some distcheck problems for non-solaris systems + - Change server version number from the Xorg rev to an independent one + - _POSIX_SOURCE and _XOPEN_SOURCE defined to the right values + +commit ed4d77a16a226a7bc88d0d4f5c595d16cdf46360 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Aug 4 21:05:12 2005 +0000 + + Thu Aug 4 16:08:00 2005 Søren Sandmann <sandmann@redhat.com> + Make the fbCompose paths use the existing inline functions instead of + macros. Various other cleanups. + Remove macro definitions, move typedef to fbmmx.c + +commit e62be6d2721e7f43c7bba6b8da4e5ec8c364697d +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Aug 4 18:45:46 2005 +0000 + + - Check for vsnprintf + - Don't build the Xorg DDX on darwin + - Workaround for gcc defining __ppc__ but not __powerpc__ + +commit 13bec87f45509452c643e20745e12878584d606a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Aug 4 02:39:56 2005 +0000 + + Fix inline assembly versions of in*/out* for Sun compilers Add check for + ancient USL console code on Solaris to allow building on old Solaris + x86 versions + +commit 9802106864a6b2c24df8e9fcb3c3471033abd5c6 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Aug 3 01:41:34 2005 +0000 + + dist fixes for cw and GL (Donnie Berkholz, me) + +commit d7c246f35b1ba7ecbbc086dd1229b298faddec96 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 2 23:57:52 2005 +0000 + + Only build ix86Pci.c on x86 & amd64 platforms Set DEFAULT_INT10 to x86emu + on everything but Linux/x86 Fix Sbus.c inclusion on sparc platforms + +commit 3d0d95004c65cd3a29c94fec99e13ab7fdc19c7c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 2 20:47:47 2005 +0000 + + Add check for walkcontext() to enable stack trace dumper on Solaris + +commit bb5258a21d9efbb7d8b4226a44bd5738eb46d32a +Author: Keith Packard <keithp@keithp.com> +Date: Tue Aug 2 17:57:36 2005 +0000 + + Mark generated files as BUILT_SOURCES and CLEANFILES to ensure they are + regenerated after 'make clean' and to make parallel builds work right. + +commit 0c608a690e85064345d7ebdf6b03e2f3bd861708 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Aug 2 06:48:20 2005 +0000 + + Note yacc and lex generated files as BUILT_SOURCES so they are created + before anything is compiled; required for parallel builds + +commit d31de217e6e9bfb0e1cc99141d80def9382de9a9 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Aug 2 03:36:09 2005 +0000 + + distcheck fixes + +commit c83772fef7ea0379db9bab1120f064b80b74f377 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 2 01:50:48 2005 +0000 + + Set OSNAME for "Build Operating System" line in Xorg log + +commit 005a9cf1f5fe688f303b954870afd35635fc33bf +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Aug 2 01:03:25 2005 +0000 + + Fix Solaris assembly source to work with libtool + +commit 48b130285ad1309a1ff5b2148b3bae5f5b642488 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Aug 2 00:47:08 2005 +0000 + + Move AM_CONDITIONAL for ia64 to global scope + +commit 03379474e0fd9c21ac058e2319618934359b3262 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Aug 2 00:45:30 2005 +0000 + + only do the AS_HELP_STRING workaround once, d'oh + +commit 2d7b1893befb84850f3221cbe70b3bce4e621d63 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Aug 2 00:41:07 2005 +0000 + + - Workaround for AS_HELP_STRING compatibility with older autoconf. + - New intermediate build target for Xorg server + - ia64 fixes + +commit 7c84189ea1dc236bc979bb4bf158ecb1a6b45137 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Aug 1 22:22:16 2005 +0000 + + Bugzilla #3566 <https://bugs.freedesktop.org/show_bug.cgi?id=3566> Patch + #2906 <https://bugs.freedesktop.org/attachment.cgi?id=2906> Fix for + RENDER, repeating pictures and offscreen memory (Owen Taylor) + +commit 2acd29c93fd3b3d438887f0ca9be6713db81c1e8 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Aug 1 22:13:20 2005 +0000 + + Bump autoconf dependency to 2.57 from 2.53. Add 2.57 compatibility hack for + the new AS_HELP_STRING syntax from 2.58+. + +commit b7a43fa0f112d92cce71642142e07276da4de681 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Aug 1 19:00:21 2005 +0000 + + Bug #3739: Fail soft on unknown extension string. + +commit 0285804811bd24ad7de8894f8188b87e821e54cc +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Aug 1 18:41:54 2005 +0000 + + GLX fix for loadable servers: indirect_size.c goes in libglx, not libGLcore + +commit 78d51253e229bcb428039911d80a5d89d4bf4491 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Aug 1 16:07:14 2005 +0000 + + Fri Jul 29 17:20:53 2005 Søren Sandmann <sandmann@redhat.com> + Fix rounding bug. + +commit fd84b3b56280ef88a8c848c4338f0bea906ce6d8 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jul 30 18:56:32 2005 +0000 + + Clear compiler warnings. (Stefan Dirsch) + +commit 9e9f9cb4878d597b3fa6de7732d2866e24c32f54 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Jul 29 21:55:57 2005 +0000 + + Need to define SVR4 on SVR4-ish systems since many headers and source files + check for it, expecting Imake to have defined it already. (Should be + replaced with more specific checks & defines, but there's too many to + get them all right now.) + +commit 14ade55b83aa72240a555b3b9def9f40a6a38cd9 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 29 21:22:58 2005 +0000 + + Various changes preparing packages for RC0: + - Verify and update package version numbers as needed + - Implement versioning scheme + - Change bug address to point to bugzilla bug entry form + - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to + reenable it) + - Fix makedepend to use pkgconfig and pass distcheck + - Update build script to build macros first + - Update modular Xorg version + +commit 2654f88cee86fae9db169dc8668492857fbbad98 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 29 18:40:54 2005 +0000 + + Fix code to handle printing 7.0 release candidates properly. + +commit d5d669b04ecbd91bb2db9ddc6238acabbeaabbe0 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 28 23:33:57 2005 +0000 + + If neither --enable-dmx or --disable-dmx are specified, default to "yes" on + Linux, "no" on everything else (matches defaults in monolith Imake) + +commit 86529c07d6ff69ef936ee370be07b373e2961360 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Jul 28 23:28:34 2005 +0000 + + Fix distcheck for server + +commit 3e4bf8a8f46e14078c64c56ad303c80cd9d8d5be +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 28 02:38:23 2005 +0000 + + Rework wrapping of common mouse driver to not require mousePriv.h, so that + modular tree xserver can be built on Solaris. Wrap more ioctls in + SYSCALL() to restart on signals. + +commit cfd6c74067de7fdb2aeddee6780c29231a56acdc +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Jul 27 17:50:13 2005 +0000 + + Add dbestruct.h to sdk_HEADERS + +commit 5ced854186b851ba2c9ac84eb6d7f141fdee487b +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Jul 27 17:35:25 2005 +0000 + + Add miwideline.h mistruct.h mifpoly.h to sdk_HEADERS + +commit 7bd6b0640e69552ed4c9daac26e41410dd7338b4 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Jul 27 08:16:35 2005 +0000 + + Add #include <dmx-config.h> for building dmx/glxProxy in the modular tree. + +commit b9ccd89918e1c79d6013fe563c7fa933c1274837 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Jul 27 08:11:26 2005 +0000 + + Fix dmx/glxProxy build + +commit 8f6664fcff319ee155e7864ce25fa11c1fa5594b +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Jul 26 23:40:45 2005 +0000 + + Add these files to the sdk: + cbf32.h cfb16.h cfbmap.h cfbunmap.h cfbunmap.h cfbmskbits.h xf86sbusBus.h + mifillarch.h mispans.h + +commit 3cbb55f309b8eaba246d1d948b59883f9ed28bf4 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Jul 26 22:17:27 2005 +0000 + + Install xorgVersion.h + +commit df5d47560c19b01f2998806c4b62f459a6b5fc02 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Jul 26 18:56:45 2005 +0000 + + xserver/xorg/fb/Makefile.am: install fboverlay.h + +commit b25e6f82a1189a67208a2a4980d732ab77e64a35 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Jul 26 18:21:22 2005 +0000 + + fb/Makefile.am: add fbpseudocolor.h to sdk_HEADERS + hw/xfree86/xaa/Makefile.am: add xaaWrapper.h to sdk_HEADERS + +commit e7502158d6922a149d0aaf1de209f0b58fa444bf +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Jul 24 16:24:17 2005 +0000 + + Add xf86DeallocateGARTMemory stub so that Xorg can be built on Solaris + again. + +commit 7c1148c0fbc00716bb7ec621a1b968b4127cbb00 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 23 19:32:57 2005 +0000 + + Fire the Mesa symlink script from the configure stage. + +commit f331a325447449982efba8adc5bc079371dfb77a +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 23 19:29:58 2005 +0000 + + Add the symlink script for the Mesa source. + +commit a5532e456d763718036e84891ff57c6f7417615a +Author: Stuart R. Anderson <anderson@netsweng.com> +Date: Sat Jul 23 18:16:06 2005 +0000 + + Change the default depth back to 8 like it was originally. Disable the + addition of depth 12 & 30. It causes more than MAXFORMATS depths to be + added to the screen which causes an array in the Screen structure to + overflow and crash on server reset. + +commit d8a1241a24d75c258548875350bff4d0acc795ab +Author: Stuart R. Anderson <anderson@netsweng.com> +Date: Sat Jul 23 17:49:45 2005 +0000 + + Add a safety check to catch when numDepths GCperDepthexceeps MAXFORMATS + +commit 93d29b4554d26b22ca43311264f85ea8e14804c2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 23 02:04:39 2005 +0000 + + Emit makefiles for glapi, slang, and grammar. Conditionally define GLX_LIBS + if GLX support is requested. Add GLX_LIBS to the link deps for Xvfb and + Xnest. All GLX support should work now for the vfb, xnest, and xfree86 + DDXes. + +commit 525d663ec5a8a181a1e36f3787b24cdb77290c17 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 23 02:02:18 2005 +0000 + + glapi build (forgot this one somehow) + +commit 6aaceef3231818682dccf1969b211f1dc798da1f +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 23 02:00:52 2005 +0000 + + Fix the build system to reflect the rest of the Mesa core. Almost links, + needs a code fix to Mesa though. + +commit d7e2cadb13ef0e77d864c8282489f544b0e1dede +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jul 21 02:29:05 2005 +0000 + + GLX needs gl.h from Mesa too + +commit bf32f4739c6ef7f41cde6cc409d42e00462402fb +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Jul 19 20:51:46 2005 +0000 + + programs/Xserver/hw/xfree86/os-support/shared/agp_noop.c + programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c + programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h + //bugs.freedesktop.org/show_bug.cgi?id=3164> Add xf86DeallocateGARTMemory() + function call (Austin Yuan) + +commit 931abdba8410bf1188d69d54c57543a21ea36968 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Jul 19 02:50:00 2005 +0000 + + Change #include "X.h" to <X11/X.h> + +commit 4f2e731aba0c5694abb65a877395cc5f9869c556 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 17 07:34:31 2005 +0000 + + objdir != srcdir fixes. + +commit a6bd7ad985e138874bb0e1f33f545651dfde32a9 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Jul 17 01:52:33 2005 +0000 + + Set GLX automake conditional after we've tested for mesa source and set GLX + to "no" if it's --with-mesa-source wasn't set. + +commit ead37b08699f665a856c7ba29578c27c27db4100 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jul 16 20:52:25 2005 +0000 + + Mark variables modified in signal handlers as volatile (part of Sun bug id + 4496504) + +commit bbb49449cbc0815fd9c4faf9b6ee32be99a8aa3d +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 16 16:30:40 2005 +0000 + + Fix --with-mesa-source parsing, and turn GLX off if no path to Mesa given. + +commit d69e9872ae91c9c17a33e1ed763f98453d950b39 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 16 16:29:30 2005 +0000 + + Typo fix, and re-add GLcore to the dixmods build + +commit 8bc883c48c8f99502707998a8257c0563cae7d3a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jul 16 09:00:44 2005 +0000 + + Update build instructions. Add details about how the expat, fontconfig, + libpng, freetype, and xterm builds are now handled. + Update text docs from SGML masters. + +commit 8e600b87643f7f4e19923dd6a0f2eec83303363a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jul 16 07:39:48 2005 +0000 + + Only pass -rdynamic when using gcc + +commit 4f04e26c69747929243f176feaa90f3042481f53 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 16 04:30:33 2005 +0000 + + Say --with-mesa-source to get GLcore built. + +commit 4913316f25e76381844cf15aa64eff620c2807a1 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 16 04:29:28 2005 +0000 + + Switch to MESA_SOURCE which we're already AC_SUBSTing + +commit 7facb209a705ca406b05272c233ea0cfd6a5b266 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 16 04:24:21 2005 +0000 + + Hook in the GLcore build + +commit 2f9a7c6ee1012b2c7664c53f405affaf82bd0953 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 16 04:13:33 2005 +0000 + + Hey look, GLcore links + +commit 5f81eb1d89f623dd9281e686a4d4d4f403e459c6 +Author: Kevin E Martin <kem@kem.org> +Date: Sat Jul 16 03:49:59 2005 +0000 + + Fix the *-config.h includes so that it is possible to build modules without + having to use -include in the Makefile. + +commit 0635acab08bade9bfd9d2abd3ea5a3fe525bc647 +Author: Kevin E Martin <kem@kem.org> +Date: Sat Jul 16 03:46:01 2005 +0000 + + Add record module building support Change module building to not use + -include Fix xnest, dmx and vfb builds to -DXFree86Server for fbcmap + compilation + +commit 92b23ff426936909e1ff5e063b75e5f112b93ca1 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jul 16 01:17:52 2005 +0000 + + Update to match recent changes to pci.ids & extrapci.ids for people + building on systems without perl. + +commit 6ce3743948a7151c721194594091a7e1183e2f32 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 16 00:51:14 2005 +0000 + + start the GLcore build system + +commit 2f0487521da3da6784dd964c915071b82d749108 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 15 23:08:31 2005 +0000 + + Fix the *-config.h includes for the files that have moved in the modular + tree. + +commit a407fa373bb72f29050e3f027042011075b3bdf0 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 15 22:51:05 2005 +0000 + + Move drm up to os-support since the files are shared by multiple platforms. + Fix the dri and drm build. Fix server-side DMX extension build. Make + xf4bpp use the correct version of mfbline.c for mfbseg.c. Add #ifndef + _HEADERNAME_H_/#define _HEADERNAME_H_/.../#endif to the headers. + +commit eb6fa0dc15516a0a436090efc6d85f22baeec015 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jul 15 22:14:28 2005 +0000 + + Enable GLX build by default + +commit 0e352a8b2b4c78c291074b9531ed7afa7a20ac17 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jul 15 21:59:39 2005 +0000 + + disable GLcore momentarily until a build system exists. --enable-glx should + work now. + +commit 4bf453086418e93e81b24d3d2a0f49a9357acff3 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 15 05:48:29 2005 +0000 + + Fix keyboard state when XEVIE is not enabled (Keith Packard). + +commit 562acf2e69dcf08f8db8f8eeaa162949d45f70b2 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Jul 14 23:41:15 2005 +0000 + + Add -I$(top_builddir)/hw/xfree86/dixmods/extmod to Xext/Makefile.am Patch + from Stefan Dirsch + +commit defeb56fc9559661fa632935a4c76c500c7edcf4 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Jul 14 22:20:16 2005 +0000 + + Fix the build when DRI is enabled + +commit 6b546d0ec07e493b501e82300b3e6c143cd4d0ac +Author: Kevin E Martin <kem@kem.org> +Date: Thu Jul 14 03:36:44 2005 +0000 + + Add #include <xnest-config.h> to the Xnest source files for modularization. + +commit 7375f4d13626bbba4204e2f08f41c212b2eed992 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Jul 14 03:32:09 2005 +0000 + + Add support for Xnest + +commit c582560c62fd8181b7521e470f118a59c418a95f +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 14 02:59:34 2005 +0000 + + Add partial in*/out* assembly support for Sun compilers on x86 + +commit 64bf3a81a3212dc2c0f55aebdc74a618ca6a32c0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jul 14 02:53:31 2005 +0000 + + loadable extmod build system. + +commit 6c96e0c9e4b3f1e8dfa5dcf7366bb838dc0724ec +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jul 14 01:36:58 2005 +0000 + + loader support for extmod + +commit 8ea4a1b759eae0279ce619c663f2cd2f6dee8d71 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 14 01:00:39 2005 +0000 + + First pass at Solaris os-support + +commit f07e905553783dc0133015bcbf94d3b6be68b19c +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Jul 14 00:28:47 2005 +0000 + + - Add build system for xf86-video-ati + - Add build system for xserver/xorg/hw/xfree86/dri + - Add glcore.h to symlink.sh + - Symlink.sh: add some more DRI files, symlink glcore.h from + extras/Mesa/include/GL/internal to proto/GL + - proto/GL/Makefile.am: install glcore.h + - xf86-video-ark: s/module-dir/xorg-module-dir/ + +commit 939b7720f17ec5ac5edcc6cfe70453160ecb0161 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 14 00:02:05 2005 +0000 + + Merge SVR4/pre-Solaris 8 and Solaris 8+ sections for greater consistency, + easier maintenance, and to fix some missing headers when building the + modular Xorg on Solaris. + +commit 23d25a656d7fdbafa1c78be2950fb405f0a1b87b +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jul 13 23:41:21 2005 +0000 + + Remove references to DDX-specific extensions + +commit f4626bb72b9955846abee018ae31c1aeb51b8dbf +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jul 13 22:59:39 2005 +0000 + + dlloader is the default in 6.9, but the loader doesn't get told to prefer + dlloader modules unless you -DDLOPEN_HACK. + +commit 4f38526566dbcc296d124bb852adfa30ac4d927e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Jul 13 22:54:02 2005 +0000 + + - Use fbdevhwstub.c if <linux/fb.h> is not found + - Use x86emu on Solaris instead of vm86 + - Better per-OS control over which xf86Kbd*.c and *Pci.c files to build + - Set various #defines to be defined or not on Solaris as needed + +commit db8aa17f15f62f243400b0267bf281dd27738644 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jul 13 22:19:36 2005 +0000 + + updated comment for libbitmap + +commit 4f9e76ed6a61b414ffc94550727a138c3f73996f +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jul 13 22:09:52 2005 +0000 + + Dear libtool: Loadable modules do not need version numbers. kthnxbye. + +commit 40ad7321f5d8d216523d575c4414736d8cfe9e88 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jul 13 21:52:51 2005 +0000 + + Generate useful loadable modules by actually linking in the blobs from the + DIX + +commit 0e08818d3951c324e5953bd23a8a9457b3fec78f +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jul 13 21:41:02 2005 +0000 + + Hook dbe into the build + +commit 2d4ddb5606b7328c591a7bffafbb49bdaf2adcf9 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Jul 13 21:36:27 2005 +0000 + + double-buffering extension + +commit c2ec9fbb15c776b9c64451cf32927b1b8d1c560c +Author: Kevin E Martin <kem@kem.org> +Date: Wed Jul 13 21:17:53 2005 +0000 + + Only build Xi/stubs.c on DDXs that don't support the Xinput extension + +commit 74a534f63c1ed016f24dbc3ca31f05b81076e8f0 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Jul 13 20:19:38 2005 +0000 + + xc/programs/Xserver/hw/xfree86/drivers/i2c/*.c: include xorg-config.h + instead of config.h xserver/xorg/hw/xfree86/i2c/Makefile.am: Add i2c + drivers + +commit 1dc3e96e4077a912dd3aa13fa80099f5864b641f +Author: Torrey Lyons <torrey@mrcla.com> +Date: Wed Jul 13 16:30:53 2005 +0000 + + Fix compilation where uint is not defined. + +commit 19e20c1470c1f8d15f2a78fb29545bde06a65516 +Author: Lars Knoll <lars@trolltech.com> +Date: Wed Jul 13 08:58:37 2005 +0000 + + don't clobber %ebx in the assembler. + +commit bfb10bd2dcca65ba5d346c9d7da594a81c35c101 +Author: Lars Knoll <lars@trolltech.com> +Date: Wed Jul 13 07:28:17 2005 +0000 + + Fix potential buffer overflow and a smaller bug in the convolution filter + +commit 778a2703b233641e298fa81ef9c477943c496305 +Author: Lars Knoll <lars@trolltech.com> +Date: Wed Jul 13 07:12:33 2005 +0000 + + fix compilation + +commit 66bc36473c238fdee7e6c1d31e6e5f6813a7541a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Tue Jul 12 23:36:27 2005 +0000 + + Use builddir, not srcdir, for built files. + +commit d6808a48d2dffd72f618fa372fba993736638799 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Jul 12 18:16:03 2005 +0000 + + Fix scanpci -v core dump when subsys vendor/device id's are NOVENDOR & + NODEVICE. Bug #3763 <https://bugs.freedesktop.org/show_bug.cgi?id=3763> + Patch #3074 <https://bugs.freedesktop.org/attachment.cgi?id=3074> + +commit cda9c7b2678ea08ac6176a9eee72e6e511134b8e +Author: Lars Knoll <lars@trolltech.com> +Date: Tue Jul 12 14:50:10 2005 +0000 + + add x86emu. + +commit 41002623f314444bd416fd5f445a0425c5b59df0 +Author: Lars Knoll <lars@trolltech.com> +Date: Tue Jul 12 10:02:10 2005 +0000 + + Add MMX Code paths for the basic composition operations in + fbComposeGeneral. + +commit 697cf74fb50a550b8f7e124dc8f463a55519795f +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jul 12 03:09:20 2005 +0000 + + Make Xprt run when linked against Xlib for Xrm + +commit 419448ea7b0d7f672e568cb1d8b4e190a1f54825 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Jul 12 03:03:16 2005 +0000 + + Pull libdri out of the build for now until I get something better worked + out + +commit f054bf2ff6b94e285e7f2d174163c01b07b07143 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Jul 12 01:29:41 2005 +0000 + + build fix + +commit 02427d4d04f70109a499578c6762654463ebdae4 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Jul 12 01:20:36 2005 +0000 + + Add support for building Xdmx and Xvfb + +commit 3fe6b5bb30e8e1b9017a9cf818fcceb279a28e65 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Jul 12 01:17:39 2005 +0000 + + GLX server support + +commit 377e3bddd4d73154520a9582d75de2b20ae532a5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Jul 12 00:55:43 2005 +0000 + + Forgot to add these for some reason + +commit e348ac4b4dfb1112c19fe5fe5441182e66716087 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Jul 12 00:52:48 2005 +0000 + + Prepare Xdmx and Xvfb for modularization by adding appropriate #include + <{dix,dmx}-config.h> to the source files. + +commit b7a9a6a03560bdf6584c71bf0b546301bba9ab89 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Jul 11 17:52:00 2005 +0000 + + Remove unneeded xf86drm.h includes to fix modular build. + +commit cf4dfd650dbc2bb65eae4eea2acfb4a4c5295548 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jul 11 02:29:50 2005 +0000 + + Prep for modular builds by adding guarded #include "config.h" everywhere. + +commit c5548086f3864c828f0cad65d2708cefd2025947 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jul 11 00:42:52 2005 +0000 + + Start filling in glx build. Add xf86Version.h and a few DRI headers to the + sdk (needed for modular driver builds). + +commit 955fe17133d841758a18072a9acabedc81dc4562 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Jul 10 21:45:55 2005 +0000 + + add some convenience variables for the drivers + +commit 78fab90230c61241af29f0c94f401ce0bc749b6b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jul 9 16:51:58 2005 +0000 + + Bug #3740 <https://bugs.freedesktop.org/show_bug.cgi?id=3740> Patch #3058 + <https://bugs.freedesktop.org/attachment.cgi?id=3058> + 08-Jul-2005 nv driver updates from Mark Vojkovich: + Change some console restore code for NV11. Hopefully, we can more reliably + restore the console for desktop systems using DVI. This may correct a + recent regression on NV11. + Also, new PCI IDs. + Add new nVidia PCI ids to match nv_driver.c changes. + +commit 3c92389185f0c9fa3b8c299a084b10c12bcab52c +Author: Zack Rusin <zack@kde.org> +Date: Sat Jul 9 14:15:35 2005 +0000 + + Patch from Thomas Winischhofer to kick out all pixmaps to system ram upon a + VT switch and vice versa when returning. + +commit 327741486e807c068383a771c04c9042b0589c37 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 9 02:22:29 2005 +0000 + + Don't try to link fb, shadow, or vgahw into the loadable Xorg server, as + they're only supposed to be loadable modules. + +commit 2b8e4db9ac4b4c8f8fd73c00436d6abec2faa535 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jul 8 20:27:30 2005 +0000 + + -lXfont isn't enough for libbitmap, you need to get the -L from pkg-config + +commit e84648df7d7eb700b7c2d35fdef0be1f463853fa +Author: Zack Rusin <zack@kde.org> +Date: Fri Jul 8 17:07:52 2005 +0000 + + mark drawable as dirty on copying/painting windows + +commit 4ab73a73f4aa1f02cc8dada185b5dcbddfe43878 +Author: Zack Rusin <zack@kde.org> +Date: Fri Jul 8 07:43:00 2005 +0000 + + heh, oops (thanks Thomas) + +commit 0a28516a6e641b41e674f69fc228b0babbe1743b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 7 19:07:28 2005 +0000 + + More compiler warning fixes for missing prototypes: + Add prototype for XkbSetExtension() + Add #include <ctype.h> for isspace() & isdigit() + Add #include <grp.h> (for initgroups()) and remove extra * + Add prototype for xorgGetVersion() + +commit 2c3c4060fd2a52f147eda01b11222c341c6e3dee +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 7 16:18:52 2005 +0000 + + Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Add prototype + for XdmAuthenticationInit() (Peter Breitenlohner) + +commit d0dc574adb79ffacf90b786d4ccfcd1cd8598728 +Author: Zack Rusin <zack@kde.org> +Date: Thu Jul 7 15:05:02 2005 +0000 + + Check vtSema before accelerating primitives and sync in fallbacks only if + we got vtSema + +commit 6cba5f1260c20b3bc072fdcc5f3e49fa28ba6414 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 7 14:59:48 2005 +0000 + + Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2332 + <https://bugs.freedesktop.org/attachment.cgi?id=2332> This patch avoids + 79 gcc-3.4.3 warnings 'xxx' declared `static' but never defined mostly + due to including "ftfuncs.h" with the declaration of static functions + defined in "ftfuncs.c". (Peter Breitenlohner) + +commit 7da3f4a786d9b61f4129c7dbbef80c84abbfde68 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 7 03:12:40 2005 +0000 + + Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Fix warnings + about redefined macros (Peter Breitenlohner) + +commit f86562540d1c945bfd96d4b89259d81e4ed25255 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jul 7 02:47:06 2005 +0000 + + Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2325 + <https://bugs.freedesktop.org/attachment.cgi?id=2325> Avoid 38 + gcc-3.4.2 warnings: suggest parentheses around assignment used as truth + value suggest explicit braces to avoid ambiguous `else' suggest + parentheses around && within || suggest parentheses around arithmetic + in operand of ^ "/*" within comment (Peter Breitenlohner) + Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2326 + <https://bugs.freedesktop.org/attachment.cgi?id=2326> This patch + removes these 2 gcc-3.4.3 warnings: missing braces around initializer + implicit declaration of function `XpOidTrayMediumListHasTray' (Peter + Breitenlohner) + +commit 4047191124c237518110e698bde6dab445644449 +Author: Damien Ciabrini <braun@club-internet.fr> +Date: Wed Jul 6 15:34:22 2005 +0000 + + Added hardware support for transformation matrix (zoom, rotation, etc...). + Fixed the composition function for RGB and A8 format. Avoid syncing + hardware after HW fills or copies. + +commit 4073f24c90d4aff3f7d83af4c0e733eed082b53b +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Jul 6 15:14:30 2005 +0000 + + add missing PictureTransformPoint3d call + +commit c48f631cdb6a279ab1a24a486b05956cfa9ca3da +Author: Damien Ciabrini <braun@club-internet.fr> +Date: Wed Jul 6 13:57:41 2005 +0000 + + Fix offset alignment code in the offscreen memory allocator to prevent + textures from being allocated in the next free memory area. + +commit baa99be190c51b533bf8748c6c6a9bce62594e96 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jul 6 07:16:19 2005 +0000 + + Put the correct value in the length field of the reply. Previously, the + number of tag/date pairs was specified. This was incorrect. The correct + value is the number of values (one for the tag and one for the value). + Xorg bug: #3210 + +commit 6ba4a2e78a73858648b5b6a39306446d519c3a75 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 5 23:01:51 2005 +0000 + + Add more defines for XWin DDX Make building of cfb*, afb and mfb + conditional Set FD_SETSIZE=256 on cygwin + +commit 71ed3ae0c696152e82a98ce2ac0fa67ce6f23464 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 5 22:58:29 2005 +0000 + + wrap fInternalWM with XWIN_MULTIWINDOWEXTWM + +commit 456844a613240ce56181f6f3ec7873be9b2dc85d +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Jul 5 18:42:32 2005 +0000 + + Remove Speedo font module documentation. + Remove Speedo from list of font directories + Update default font path to remove Speedo, add TTF. + +commit 20c15003f9648de0c03f7d4fa4508afd896b19f5 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 5 18:25:44 2005 +0000 + + Fix crash on server shutdown + +commit d72fef26d44e649f39a56730830148d48d77ee9e +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 5 17:52:35 2005 +0000 + + Fix simultanious presses of Left and Right Control and Shift keys. + https://bugs.freedesktop.org/show_bug.cgi?id=3677 + +commit 0f2c8221c938ce8eebd9f0e111a6b87223c18f9e +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 5 16:35:42 2005 +0000 + + Fix typo which broke window titles + +commit 0bb2eb8eaaf4054fefbc45bf3cb47bbcf10b7cfd +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 5 15:43:20 2005 +0000 + + Fix problem with fake Control press on Alt-Gr + https://bugs.freedesktop.org/show_bug.cgi?id=3680 + https://bugs.freedesktop.org/show_bug.cgi?id=3497 + Fix static declaration of winGetBaseDir + +commit 3af77ad3e754c4d419a1996ca73a9fd01f92388a +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 5 14:09:48 2005 +0000 + + External windowmanagers could connect in multiwindow mode which lead to + strange results with the internal windowmanager. + +commit 426282268bcdd0e0ca973fa79b414e9065fbfd9d +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jul 4 23:40:09 2005 +0000 + + Build miinitext.c and fbcmap.c as DDX specific files + Do not define _POSIX_SOURCE on cygwin. + +commit 845a0ac68b02148db6f2cca81debf20b2331607b +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jul 4 23:11:20 2005 +0000 + + Revert last changes. They have to be addressed in a different way + +commit 048045a9e714fc85c26028c4de36dff47644b826 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jul 4 22:18:40 2005 +0000 + + Add XWin DDX, make Xorg DDX conditional Make XF86VidMode and XF86Misc + conditional + Add XWin DDX + Added DDXTIME, DDXOSFATALERROR, DDXOSVERRORF and DDXBEFORERESET + Added fbcmap.c + Added miinitext.c + Added -I$(top_srcdir)/Xext/extmod to INCLUDES + +commit 508cdb5cb01a91b1bf3ef31da80b6b1d36286bf0 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jul 4 22:10:43 2005 +0000 + + Include xwin-config.h if HAVE_XWIN_CONFIG is defined Cleanup X11 includes + handling Warning fixes + +commit 5e50ae22bf206d6c2cc05e772e05fa5a363acb81 +Author: Zack Rusin <zack@kde.org> +Date: Mon Jul 4 18:55:53 2005 +0000 + + remove the temporary debugging output + +commit 7586ac6edea64b30d6187f9ec4d867521c1e769c +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jul 4 18:41:04 2005 +0000 + + Bug #2216: Multiseat support. From various Debian and Ubuntu patches by + Aivils Stoss, Andreas Schuldei, Branden Robinson, and Daniel Stone. + +commit ba011dc77dcfaea2843481fbba45a76d8cb9aa83 +Author: Lars Knoll <lars@trolltech.com> +Date: Mon Jul 4 14:47:03 2005 +0000 + + don't be too smart and try to replace PictOpOver by PictOpSrc when we have + an external alpha map. + Make fbmmx.c compile on gcc 4.0.1. + +commit a4df8ad75579d9c183f110d79d87cfb9aaf23acd +Author: Lars Knoll <lars@trolltech.com> +Date: Mon Jul 4 14:23:59 2005 +0000 + + Fix handling of "super luminescent" colors Fix off by one error in the + transformation handling. + +commit e34f31762e0454930f30547a9407cc8b941c70f2 +Author: Zack Rusin <zack@kde.org> +Date: Mon Jul 4 14:15:57 2005 +0000 + + This fixes the close screen mess (crash reported by Thomas). Also hide the + private Exa screen definition. Properly cleanup on screen close and do + not delete the private screen in the DriverFini call. + +commit 4ef813961dc8dea8924a79e0954d5b6da12e77c0 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jul 4 09:01:43 2005 +0000 + + provide the uint datatype on WIN32 + +commit 7dc547252af3b23652b1d496957645726c7125a4 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Jul 4 00:16:23 2005 +0000 + + Fix builds on non-GLIBC systems (missing __GLIBC_PREREQ). Add Solaris stack + backtrace dumper. + +commit d010de6979a6c51a628f2f8e6d7f479a542d1e8b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 15:51:23 2005 +0000 + + Abandon the nostdinc experiment. + +commit b0d80e76d28dbc1ee14453950db000bb4d7f377f +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 12:17:04 2005 +0000 + + Add missing include paths. + +commit 461eb6ebd9273dc3dcd601ee0a0491981a98acd9 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 12:16:29 2005 +0000 + + Change HAVE_CONFIG_H to HAVE_DIX_CONFIG_H. + +commit c1e69798ad14fb706f5f6de67e3f53df56f524c6 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 12:15:16 2005 +0000 + + Add explicit PSZ defines, remove unnecessary dix-config.h include. + Add -DXF86PM, forgotten from last commit. + +commit 4e501d35e260775a43f340b3e1a9aa092570aba4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 10:51:16 2005 +0000 + + Remove needless usage of DECkeysym.h. + +commit a107f599518a175dd689417b48788a746303966a +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 09:39:54 2005 +0000 + + Predicate usage of xf86OSPM functions on #ifdef XF86PM. + Remove needless include of ../input/mouse/mouse.h. + +commit 0bb669638f032e61471007b2fa88285aa5d63903 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 08:53:54 2005 +0000 + + Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h". + +commit 401e4580d6dd9867a691045688680ce410f84cb5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 07:55:00 2005 +0000 + + Move misc.h and os.h from proto/X11 to xserver/xorg/include. + +commit 46b64bd5c66abb1bb9f3538c887d10867607bfff +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 07:37:35 2005 +0000 + + Fix more include paths; add dix-config.h to XKB code. + +commit e03198972ca78b03ad13cb49112c03a052bb763b +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sun Jul 3 07:02:09 2005 +0000 + + Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings. + Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. + Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all + source files in the xserver/xorg tree, predicated on defines of + HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to + <X11/fonts/foo.h>. + +commit b8aef6c474ffc6d637bec178674898ea95ccde47 +Author: Kevin E Martin <kem@kem.org> +Date: Sun Jul 3 03:28:27 2005 +0000 + + Fix build issues. + +commit 826a6f029faeabaa783a93dfdccca846f9326b58 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Sat Jul 2 18:59:44 2005 +0000 + + Continuing Makefile cleanup; add DIX_CFLAGS and XORG_CFLAGS everywhere. + +commit e58c09d31bdf90210e2ec1ef976cea0459cdc02a +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 2 18:06:05 2005 +0000 + + Bug #3687: Print backtraces on fatal signal on glibc systems. + +commit e6602b041fe489d51a1d7fac55cbbb12b1826ba1 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 2 17:02:23 2005 +0000 + + Bug #3546: Use MAP_LENGTH instead of a magic number. (Mark McLoughlin) Bug + #3664: Further fixes to Xnest modifier state handling. (Mark + McLoughlin) + +commit 9b1debcdb6c7df956c06350a6525afb8e6d691fa +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 22:43:43 2005 +0000 + + Change all misc.h and os.h references to <X11/foo.h>. + +commit 657b4cb8aa0076acae85997c4f0c353b4d86b632 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 22:32:34 2005 +0000 + + Change all misc.h and os.h references to <X11/foo.h>. + +commit 303c281f956d55e35b05ef8521d0b60d24aa7a10 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 21:15:20 2005 +0000 + + Add auto-generated header files. + +commit 9a6ec34d2545a23586f11ad51c81f41a940d73d0 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 21:13:36 2005 +0000 + + Use canonical autogen.sh, which supports srcdir != objdir autogen. + +commit 7ecc2d526c4ea5db2589644a2fec0daf71df36da +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 21:12:24 2005 +0000 + + Remove fbcmap.c hacks from the DIX. + +commit 6251f9c00a866f64207d23b0a06306ead15298e8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 21:11:16 2005 +0000 + + Minor build system tweaks. + +commit 641f32c4368db07831d9d703161a9d4699307621 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 20:54:30 2005 +0000 + + Adding initial build system. + +commit 507d30546f56bfd172fc43857459c78c1026e97c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 20:54:01 2005 +0000 + + Adding initial build system. + +commit a822df1cc16d150614dead70fd00750095a05c35 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 20:49:35 2005 +0000 + + Adding initial build system. + +commit ded56b1a74e6b3e4c48054b7e142d924b19e6104 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri Jul 1 20:29:53 2005 +0000 + + Adding initial build system. + +commit aabb868920658c9d3979dc194c6bd9702171f101 +Author: Zack Rusin <zack@kde.org> +Date: Fri Jul 1 13:30:29 2005 +0000 + + removing all debugging output from the default build :) + +commit 0fa9d1fb4886c418e3d8e0886ad815513eda0633 +Author: Zack Rusin <zack@kde.org> +Date: Fri Jul 1 12:24:30 2005 +0000 + + Leave debugging output for only the interested parties. + +commit 0df446ab8875430508ff51d3548955a215475084 +Author: Zack Rusin <zack@kde.org> +Date: Fri Jul 1 10:39:21 2005 +0000 + + Missed this. Spotted by Thomas. + +commit b5b2a0522efd61bd99b5d5d75cdd27960cd1c7e1 +Author: Lars Knoll <lars@trolltech.com> +Date: Fri Jul 1 10:05:43 2005 +0000 + + Add support for gradients and solid fills to Render. + Changed the semantics of the Convolution filter a bit. It now doesn't try + to normalize the filter values but leaves this to the client. This + gives more reasonable behaviour in the limit where the filter + parameters sum up to 0. + +commit 30c019e847adef6f7f3963df8ef1f3f994669a54 +Author: Zack Rusin <zack@kde.org> +Date: Fri Jul 1 08:56:12 2005 +0000 + + Adding the new acceleration architecture: Exa. It's meant to replace XAA in + the coming months. + +commit 276821605ee50e71f30dd52f2c12237fc61f288f +Author: David Reveman <c99drn@cs.umu.se> +Date: Fri Jul 1 03:14:54 2005 +0000 + + Fix return values in Xgl render texture implementation + +commit 5e381441fff411316ea202a9f85aceb0e0dcf46b +Author: Alex Deucher <agd5f@yahoo.com> +Date: Fri Jul 1 02:56:04 2005 +0000 + + - Fix Support for Philips FM1236/F tuner on ATI AIW 9600 XT (Jeff Smith) + Bug 3401 + +commit c4d1b4e0424d53cd0470e0e3f57c10ee8fe3d8c2 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Jun 30 21:33:46 2005 +0000 + + Added another test of checkForInput for WIN32 Windows keyboard and mouse + events are added to the input queue in Block- and WakupHandlers. There + is no device to check if input is ready. + +commit 1230c55ac3f75f4902b51b223d40354a54d0d0ab +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Jun 30 18:50:20 2005 +0000 + + Pass serverClient instead of NULL to ConfigureWindow. This should fix a + crash reported by Øyvind Harboe + +commit 0929f79c1baa5b65808ab034591510906623e841 +Author: Matthew Allum <breakfast@10.am> +Date: Thu Jun 30 13:39:00 2005 +0000 + + Another Xephyr focus/modifier fix + +commit b6c7afe0b9faed7025c70334d464fd75ce5c84c4 +Author: Lars Knoll <lars@trolltech.com> +Date: Wed Jun 29 15:19:14 2005 +0000 + + compile + +commit d8a98454e305973dd7fec76db2ef80705cf7c298 +Author: Lars Knoll <lars@trolltech.com> +Date: Wed Jun 29 11:57:16 2005 +0000 + + Add support for gradients and solid fills to Render. + Changed the semantics of the Convolution filter a bit. It now doesn't try + to normalize the filter values but leaves this to the client. This + gives more reasonable behaviour in the limit where the filter + parameters sum up to 0. + +commit ce0e11aeac76119b96b463605bc1f5318e3d2bde +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Jun 28 21:05:31 2005 +0000 + + Bug #2447: Fix argument order to xf86DrvMsgVerb. (Luc Verhaegen) + +commit 5ef5aec9bb5ee85295c0913afca891572d1315a4 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Jun 28 02:04:54 2005 +0000 + + Update to latest snapshot (27-May-2005) from http://pciids.sf.net/ + +commit b262a18aad36b2de729f6d00d144ac7277687f19 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Jun 26 02:48:36 2005 +0000 + + Cosmetic correctness fixes: miEmptyBox and miEmptyData are variables, and + miGlyphExtents is a function. + +commit aa7fb99bc76e62036c73ff50f58337558859b814 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jun 25 21:28:48 2005 +0000 + + Bug #3030: Fix Xnest keyboard state handling. (Mark McLoughlin) + +commit 8562f800b879ae461317da9640961f753e107250 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jun 25 21:16:54 2005 +0000 + + Bug #3626: _X_EXPORT tags for video and input drivers. + +commit 582a9f0d2ec01f1a3c5625e2f45a4599be7a11d5 +Author: Zack Rusin <zack@kde.org> +Date: Sat Jun 25 12:39:58 2005 +0000 + + Correctly handle empty rects on region initialization. + +commit 56201222067e793a3542bcdcd39bb257b4fad2a6 +Author: Matthew Allum <breakfast@10.am> +Date: Thu Jun 23 16:50:07 2005 +0000 + + Fix issues with focus in and modifiers from host confusing Xephr + +commit a668b6c11a2d6b4800407ad918481d90be87a732 +Author: Matthew Allum <breakfast@10.am> +Date: Thu Jun 23 16:34:07 2005 +0000 + + redo tslib + +commit 5e863851a61207ade1ac807bc8cff7d9cf02dbbe +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Jun 19 01:30:29 2005 +0000 + + Build workaround. Add glcontextmodes.[ch] from Mesa. + +commit 9743adbe94f29417818b90e18aebb96a72f332f0 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Jun 16 20:50:12 2005 +0000 + + Add Type1 subdirectory to lib/Xfonts, update build system accordingly. + +commit 68e856ff5b1842ba10421714b5f6b21d528f6071 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jun 15 18:31:52 2005 +0000 + + DRM 20050615 import + +commit 6e301a8e97e99d58eaed25453f66c6d73bafd460 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Jun 15 18:31:52 2005 +0000 + + Initial revision + +commit f0c76610b72a5b54bae5a5eb51ff4c420a27320e +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jun 15 16:46:59 2005 +0000 + + Conditionalise another use of XEvIE. + +commit 28ee3dd955302a1e99ffdc66cf0f512c6234d043 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Jun 15 16:27:16 2005 +0000 + + Conditionalise building of XEvIE code with #ifdef XEVIE. + +commit c6166ee74137084775c7550b708c5f71f16e7d3f +Author: Lars Knoll <lars@trolltech.com> +Date: Wed Jun 15 14:51:12 2005 +0000 + + Fix projective transformations in fbcompose.c Bugfix for convolution + filters + +commit bd54b96034e640f202821eac0a2c40e66c1ddfd0 +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Jun 15 05:50:15 2005 +0000 + + Shut up compiler + +commit 7fa782dfd548498474830c7268032ffc5fb406a5 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Jun 13 21:51:46 2005 +0000 + + Add xkbfile to symlink.sh, conditionally include "config.h" in + xc/lib/xkbfile + +commit 0802a2824c06d294ea42f0f6256644da5c0038c2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Jun 13 18:14:53 2005 +0000 + + Correct the CHIPSET lines for the 3dfx cards so the tdfx driver will + recognize them. I'm not sure if this file is supposed to be maintained + still, but I'd like to close FreeBSD ports/32121 which has been around + for far too long. + +commit 2eab094816726542c4de6c9db5efa102ab1e1593 +Author: David Reveman <c99drn@cs.umu.se> +Date: Mon Jun 13 16:38:06 2005 +0000 + + Build fixes + +commit 49476ca73c86a599a1bc49cba1117d42f59996a8 +Author: Lars Knoll <lars@trolltech.com> +Date: Mon Jun 13 14:40:25 2005 +0000 + + add the convolution filter from xserver to xorg + +commit f0ab6d57df66da5de1a8182f8250cc2c8e1450ad +Author: David Reveman <c99drn@cs.umu.se> +Date: Mon Jun 13 06:00:35 2005 +0000 + + Remove xgloffscreen.c + +commit f5aeaa7710de5ba4aad125bc8472bad1f17e23c6 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jun 13 00:09:23 2005 +0000 + + Bug #3513: Silence unhandled event messages from Xnest when running with + -parent. (Mark McLoughlin) + +commit 521916d0074901db58ab6b9edab52373da28bdb3 +Author: David Reveman <c99drn@cs.umu.se> +Date: Fri Jun 10 12:30:39 2005 +0000 + + New implementation of GLX_MESA_render_texture + +commit bdb3eb86f02e233b6aeef0995ea9afeaa7b035ac +Author: Kean Johnson <kean@armory.com> +Date: Fri Jun 10 06:54:07 2005 +0000 + + file usl_xqueue.c was initially added on branch sco_port_update. + +commit 988ffddfe082fb27fadf9aa60ab22dce6855508c +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jun 10 04:01:14 2005 +0000 + + Bug #2799: Input shape. (Keith Packard) + +commit d24ed90547122832d4168ad761f68e107bb1a2db +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jun 10 02:14:44 2005 +0000 + + Axe a few dead fields from the port priv struct and add my name to the + "Copyright" line of the license to ati_video.c that already has my name + in the text. + +commit 75065f3a54ec760bbe81160fa233810f14d8aaa2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jun 9 23:22:55 2005 +0000 + + Perform a warnings sweep on hw/kdrive. A number of these were my fault, but + some come from others. + +commit e11e60b361d63ae02918dd6b43038a5c92b73a49 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jun 9 21:59:26 2005 +0000 + + Greatly improve the correctness and performance of the MGA render + implementation. Includes cache flushing to prevent bad first reads of + the framebuffer, fixing blending of many formats, falling back on many + unsupported operations, and falling back early to prevent migration. + Passes all of rendercheck except some of the blend (!) tests. + +commit 9f81ce945680515e6db7da6c87458bee7c0f053d +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Jun 9 21:48:45 2005 +0000 + + Re-enable GL_HP_occlusion_test. The problems in Mesa that caused this bug + were fixed by Brian Paul in Mesa version 6.1. The current Mesa version + in the X.org tree is 6.2.1. + Xorg bug: 762 + +commit 92b3775ae8bdd4a84d7e101b36b306fbd3ac17a2 +Author: Matthew Allum <breakfast@10.am> +Date: Thu Jun 9 16:22:27 2005 +0000 + + TSLib fixes. Add fullscreen support to ephyr + +commit 545c082cf9c86f2a809ea6b4dca33643afb0c3d3 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jun 9 10:44:45 2005 +0000 + + - Replace the syncAccel hook in the kdrive structure with a pair of hooks + in the kaa structure: markSync and waitMarker. The first, if set, + returns a hardware-dependent marker number which can then be waited for + with waitMarker. If markSync is absent (which is the case on all + drivers currently), waitMarker must wait for idle on any given marker + number. The intention is to allow for more parallelism when we get + downloading from framebuffer, or more fine-grained idling. + - Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and + kaaWaitSync. These will need to be refined when KAA starts being smart + about using them. Merge kpict.c into kasync.c since kasyn.c has all the + rest of these fallback funcs. + - Restructure all drivers to initialize a KaaInfo structure by hand rather + than statically in dubious order. + - Whack the i810 driver into shape in hopes that it'll work after this + change (it certainly wouldn't have before this). Doesn't support my + i845 though. + - Make a new KXV helper to avoid duplicated code to fill the region with + the necessary color key. Use it in i810 and mach64 (tested). + +commit 72ca8e1b5432db57401e66af8a07fcd8cbbbb9f1 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Jun 9 03:11:58 2005 +0000 + + Add agpgart support for Solaris x86/x64. [Requires Solaris "Nevada" build + 16 or later to get kernel side for now.] (Sophia Li - Sun Microsystems) + +commit ca37d5755259ca03c61cf0567be3dea99d0c79f6 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jun 9 03:01:57 2005 +0000 + + Bug #2469: More accurate damage reports. (Jonathan Lennox) + +commit cdc15e2294a9bffc570e33bc31170081abfc55fb +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jun 9 02:29:42 2005 +0000 + + Bug #1846: Add intentionally undocumented -disablexineramaextension flag to + the server to work around ignorant clients on large display walls. + (Kevin E. Martin) + +commit e3cdec7cdcd76f6294ba1f296e4bcdee43b1eb3c +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jun 9 02:19:10 2005 +0000 + + Bug #1880: Remove unused xnestConfineWindow. (Mark McLoughlin) + +commit 0f7136191b54e587b66958985e14d8b0687c5ee1 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jun 9 02:03:50 2005 +0000 + + Bug #3434: Don't define fbAddTraps twice. (Mike A. Harris) + +commit e7fec996eb43a0bea94a37d329e3902299e6e895 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Jun 8 16:13:11 2005 +0000 + + Merge from CYGWIN Added layout "French (Canada)" as ca_enhanced Added Czech + (QWERTY) layout + Merge from CYGWIN Print error code if winStoreColorsShadowDDNL fails + +commit d0d164e6daf6c1d8afe8099fb6187d8a74ff652b +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Jun 8 09:01:41 2005 +0000 + + Fix crash reported by Øyvind Harboe + +commit d146c41882e50dd1ed6022f8a5866514067ba9d2 +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Jun 7 08:53:40 2005 +0000 + + GLX improvements and remove use of pbuffers for offscreen rendering in Xgl + +commit 8237b31f60245a8e67735d6c231dfb7dd0bbc388 +Author: Jon Smirl <jonsmirl@yahoo.com> +Date: Mon Jun 6 04:06:38 2005 +0000 + + Keyboard sort of works now with evdev + +commit c5026577cbc70c7365a9c81b2775136b45c850d2 +Author: Jon Smirl <jonsmirl@yahoo.com> +Date: Sun Jun 5 17:32:41 2005 +0000 + + Create a default colormap + +commit 021a5cd170051aae25cf61651d07b47a4df31ab4 +Author: Jon Smirl <jonsmirl@yahoo.com> +Date: Sun Jun 5 01:58:41 2005 +0000 + + Enable egl server in automake + --enable-xeglserver + +commit aa959672863aad71c807d6c09938bb296c347bcf +Author: Jon Smirl <jonsmirl@yahoo.com> +Date: Sat Jun 4 23:33:03 2005 +0000 + + Initial Xegl check-in. Works on EGL fbdev driver Input is totally broken. + +commit 88d49bed008264092245c4f6c53174f93f6ab387 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Jun 3 21:49:11 2005 +0000 + + Need to set initial screen size at device open time too. + +commit 0d206e177f46eedfffd8f88e985efdfaf117021c +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Jun 3 08:12:22 2005 +0000 + + Backout last winRaiseWindow patch which caused stacking problems + +commit 2fc290f646eb48f3c20ccff98355c2d082569160 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Jun 1 17:45:17 2005 +0000 + + Solaris VUID mouse protocol updates: + - support for mouse-like devices that report absolute coordinates + - support for mouse-like devices that need to know screen size so they can + scale absolute coordinates to screen size + - fix 3-button emulation + +commit 8537146e3662cdc66ef4692bfd3886a676096fb8 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon May 30 18:44:55 2005 +0000 + + Bug #3368: Cosmetic cleanup to DIX export list. + +commit 547c47aaea9f31f7c873376b0db859c1c1d3d918 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon May 30 18:36:19 2005 +0000 + + Bug #3407: Clean out ancient #ifdef X11R5 conditionals. + +commit cebd7348d271591b7ebeebe3b332f835cfa8a068 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat May 28 00:08:03 2005 +0000 + + Change hardcoded /usr/X11R6 to PROJECTROOT. Change hardcoded XF86Config to + XCONFIGFILE. + +commit 1cb18a4bad565d1f783a4cefb3ed467699051068 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed May 25 12:14:29 2005 +0000 + + Workaround bug in pthread.h + +commit 62343f5162066f19ca6e62d1c85a4a40d45b3295 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun May 22 01:12:49 2005 +0000 + + Bugzilla #2800 <https://bugs.freedesktop.org/show_bug.cgi?id=2800> Xevie + extension crash with signal 11 on keyboard Bugzilla #1205 + <https://bugs.freedesktop.org/show_bug.cgi?id=1205> Xevie client + receives two KeyPress events on consumed keys when XKB is enabled + Patch #2223 <https://bugs.freedesktop.org/attachment.cgi?id=2223> Fixes for + both of these and some other Xevie bugs (Derek Wang - Sun Microsystems) + +commit a8a61bbe22361b12d4a2dd511894987a338e3eef +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat May 21 07:46:38 2005 +0000 + + Initial experimental support for AMD64 builds on Solaris 10 x86. Improved + support for 64-bit SPARC builds on Solaris as well. + +commit ef4401ff8a8c4d7c22ef6af7bf47ccb24f83967f +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu May 19 18:53:51 2005 +0000 + + Bug #3334: Clean up remnants from the PEX, XIE, and BEZIER extensions. + +commit 1e51e18382de61a67027759eccee9ccbb0924304 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu May 19 01:25:02 2005 +0000 + + Wed May 18 21:20:35 2005 Søren Sandmann <sandmann@redhat.com> + s/dst/src that I missed in the previous patch. Pointed out by Owen Taylor. + +commit be3875994d7778ffad0cd957a4bd1500bf58ac2c +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed May 18 20:49:31 2005 +0000 + + Wed May 18 16:47:44 2005 Søren Sandmann <sandmann@redhat.com> + Actually assign the computed results. (Reported by Michael Dänzer, patch + by Owen Taylor). + +commit 07d1e9ae5f0da65427ac52f065b173d340d70d6d +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed May 18 19:44:35 2005 +0000 + + Bug #3066: Promote frameBufferPhysicalAddress to pointer from CARD32; bump + DRIINFO version to match. Fix various pointer printfs in libdri to be + 64-bit aware. Silence a warning about redefining noXFree86DRIExtension. + (Jesse Barnes) + +commit b87a32fb0eafa6d5f12a6faa634662c71fdc97fa +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed May 18 17:47:35 2005 +0000 + + Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the version + number of the DRIInfoRec, disambiguating it from the XF86DRI protocol + version number. Modify DRIQueryVersion to return the libdri version + number, which all DDXes were requesting implicitly. Fix the DDXes to + check for the DRIINFO version they were compiled against. + +commit fddcde777f50611099d8888456d93be7e566c84e +Author: Egbert Eich <eich@suse.de> +Date: Wed May 18 15:38:50 2005 +0000 + + VBESetVBEMode() calls int10 0x4f02 to set a VBE video mode. This can be a + standard mode solely determined by the mode ID or it may be a detailed + mode with almost arbitrary mode parameters. The mode parameters are + passed to the BIOS in a memory area pointed to by es:di. If bit 11 in + the video mode is set this memory area is evaluated. When we don't have + such an area (passed to VBESetVBEMode() this function should unset this + bit for sanity reasons. (Bugzilla #3329) + +commit f28d644d9fb1feeab1bbb3d5e68255bfa20905d8 +Author: Zack Rusin <zack@kde.org> +Date: Wed May 18 14:24:14 2005 +0000 + + rewrite the rootless compositing code (1) compiles which is already a huge + improvement ;) , 2) matches the new render composition semantics) + +commit bbbb0a3a84bf21f5120c73ef387d6190154c0f65 +Author: Egbert Eich <eich@suse.de> +Date: Wed May 18 10:31:53 2005 +0000 + + Avoid segfaults if the number of user supplied monitor ranges exceed the + number of preallocated slots. We should really make this dynamic - but + I don't think this ever caused a problem so it's more or less academic. + A. Avoid that *SyncStart starts before *BlankStart. If *BlankStart > + *SyncStart it is made = *SyncStart and its width is made maximal but such + that the blank does not exceed *Total. Since the Sync width has the + same restrictions as the Blank width monitors should still be able to + clamp after the sync pulse. B. Over time mode validation has become + inconsistent when people started to add additional features to the mode + validation. One such feature is that the mode->Crtc* values have been + (ab)used to allow the driver ValidMode() function to pass driver + normalized timing values back to the validation function. The + introduction of these features made the code less readable and created + numerous possibly unintended side effects in the validation semantics. + I've attempted to consolidate these changes making the code more + consistent and eliminating a number of side effects. This should not + cause problems for the majority of drivers, still it should receive + testing - especially with ATi Mach64 and Radeon code. (Bugzilla #3325). + +commit a90af4a2e6e38cbe20af13aaa7822836c01290ae +Author: Thomas Hellstrom <unichrome@shipmail.org> +Date: Sun May 15 17:45:47 2005 +0000 + + Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loop + if the offending region refuses to be removed. + +commit f58a54668b96884ece6ecbff732e880677d5d19e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat May 14 20:13:45 2005 +0000 + + Change return statements to fix compiler errors: "fbcompose.c", line 2815: + void function cannot return value "fbcompose.c", line 2861: void + function cannot return value + +commit a9d820b454bbb418d04e1d3c3d5d4dd10d7bb3af +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri May 13 22:53:44 2005 +0000 + + - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in + <X11/...> + - For Xcomposite and Xdamage, don't link the build system out of the xc + tree + - Link the public X11 headers into their own directory + - Add links to XKeysymDB and XErrorDB + - Add links to all the Xlib man pages + - Add links to the lcUniConv subdirectory + - Conditionally include config.h in Xlib source + +commit 8993e70d8da89e130455369ccb504b3adea5344f +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue May 10 00:12:17 2005 +0000 + + Bugzilla #2561: Disable some keycode translations on PC98, which had + various bad effects including modifier keys not working. + +commit e78abf3bdfbf5fc13fbc5b1d3ec00e9484297b89 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon May 9 23:42:26 2005 +0000 + + Bugzilla #2429: Correct the sysarch prototype for FreeBSD/alpha. + +commit 3f1a1551df2a9f45b3b8821f3f168d4dc8b8b438 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon May 9 23:26:02 2005 +0000 + + Increase the maximum number of buttons from 12 to 24. Helps with + button-happy mice like the Logitech MediaPlay. (Bugzilla #2390) + +commit eca5dff173d5af0a31bbf84579909b88a86e4c92 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon May 9 12:46:53 2005 +0000 + + Render performance improvements. (Lars Knoll, Zack Rusin) + +commit 2de24db63eb65974ac547facf2a99aa4709d54b3 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun May 8 23:34:15 2005 +0000 + + Render performance improvements. (Lars Knoll, Zack Rusin) + +commit 2c9b1e337b2e82e10909f62e8cd8c2c7a402fdd8 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun May 8 21:14:55 2005 +0000 + + Only call ConfigureWindow from winRaiseWindow if the windows message + dispatch loop is running. + +commit 78e4cb67d0f595f4fba5e98a9fa46de044556905 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri May 6 00:45:30 2005 +0000 + + Fix build issues on Mac OS X 10.4.0. + +commit d5739efd2c266081ed6b844767dcdd0a3331bfd3 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed May 4 04:14:58 2005 +0000 + + Port X.Org to FreeBSD/powerpc. This makes a bit of math for sysmouse in + mouse.c explicitly signed, avoiding the need for -fsigned-chars. (Peter + Grehan, grehan at FreeBSD dot org) + +commit 6700847458427cbdbaf837ab06bfea9b80d92df2 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Mon May 2 22:01:08 2005 +0000 + + Fix comments for pointers in parameter lists to work with fussy compilers + +commit e50ab8feade400efd8e88ee0b2deeb924f169034 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Mon May 2 21:57:32 2005 +0000 + + Fix message type (respose->response) and fix */*comment*/ blocks to work + with fussy compilers. + +commit baa0cfc15442287557e44fa2614d89ab0b5c2539 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon May 2 14:07:31 2005 +0000 + + Print correct logfile in FatalError message + +commit bc977945a53206d70ef9817d6ede4137eb5f7e3c +Author: David Reveman <c99drn@cs.umu.se> +Date: Mon May 2 00:33:52 2005 +0000 + + Set stencil size for Xgl GLX visuals + +commit 5b4462ed9bbb17212dd57617cb7e837142b6270a +Author: David Reveman <c99drn@cs.umu.se> +Date: Sun May 1 22:55:25 2005 +0000 + + New algorithm for calculating glyph extents in Xgl + +commit e4b33f4e91a5379c99ecf78ffb6a3e836cb42491 +Author: Egbert Eich <eich@suse.de> +Date: Wed Apr 27 15:42:15 2005 +0000 + + Catch SIGCHLD in OsBlockSignals() too to make sure this signal doesn't + intercept reading the authority file (Fabian Franz, Bugzilla #3137). + +commit 246b14cb29250517912d9c661ab037a953f4bbf4 +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Apr 27 10:34:33 2005 +0000 + + Minor optimization + +commit 28a2d841cee596c0242b1649587d6b180529c0ef +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Apr 27 09:29:33 2005 +0000 + + Line drawing improvements to Xgl + +commit abcc8c352e5fe6dd3b7ce5c6a25f435f877264c3 +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Apr 27 08:45:16 2005 +0000 + + Fix typo + +commit 8bc5a387c365d6367813eac374150440d0edbf6e +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Apr 26 11:04:23 2005 +0000 + + Add glCopy operation and glPushAttrib/glPopAttrib support to Xgl GLX + +commit f010131a1964b5ec35f3b333ffa7459c38f8ce45 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 26 06:12:07 2005 +0000 + + xc/programs/Xserver/Xprint/Init.c + //bugs.freedesktop.org/show_bug.cgi?id=2879) attachment #2556 + (https://bugs.freedesktop.org/attachment.cgi?id=2556) Refix for bug + 2879 - downgrade 15bit PseudoColor to 14bit - the current datatype for + the |ColormapEntries| is a |signed short| which is too small for + |32768| colors (=integer overflow). + +commit ba24ae89d33fbf3aacb8bbaf920d7436b77fda46 +Author: David Reveman <c99drn@cs.umu.se> +Date: Mon Apr 25 17:18:01 2005 +0000 + + Add scissor based clipping to Xgl GLX + +commit 07cc29cf69ff1e079efe3c9bfc55e8ac0f9bac93 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 25 00:25:39 2005 +0000 + + Bug #2138: When the server is built with MakeDllModules YES, prefer + dlloader modules to elfloader modules, and vice versa when + MakeDllModules is NO. Based on 028_loader_speed_hack.diff from Ubuntu + (Daniel Stone). + +commit 6c37648754c9bd901adecf8d38f9bb46db65efad +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Apr 25 00:11:21 2005 +0000 + + Bug #2141: Rework misleading warning message when APM support is + unavailable. (Previous patch on 2005-04-14 changed the wrong message.) + +commit a369d390a87ab0189c465be6cfd914e4b9329691 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sun Apr 24 01:10:12 2005 +0000 + + xc/config/cf/X11.tmpl + xc/programs/Xserver/Xext/Imakefile + xc/programs/Xserver/dix/Imakefile + xc/programs/Xserver/dix/main.c + xc/programs/Xserver/dix/xpstubs.c + xc/programs/Xserver/mi/miinitext.c + //bugs.freedesktop.org/show_bug.cgi?id=2792) attachment #2526 + (https://bugs.freedesktop.org/attachment.cgi?id=2526) bug 2792 part II: + Make Xprint headers in dix/, mi/, os/ and Xext/ conditional on whether + the Xprint extension is build or not. Patch by Egbert Eich + <eich@freedesktop.org> and Roland Mainz <roland.mainz@nrubsig.org>. + +commit 13fcfee37305f46e95ff81d7d5eec4d88a63a63b +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat Apr 23 22:55:40 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=3118) attachment #2525 + (https://bugs.freedesktop.org/attachment.cgi?id=2525) Get Xprint server + working again which was broken by the + 05/04/20 05:49:46 commit commit (the CPP symbol |XPRINT| is not universally + available when building the Xserver and should be used with care). + +commit 39eb2797183bf871a2dd01bff63dd35c146471f5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Apr 23 19:16:10 2005 +0000 + + Bug #3016: Don't complain as loudly about failing to load a module that's + already loaded. + +commit 139f900c56a6f44df2b411fe4bbc025a147e3abe +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Apr 23 19:01:13 2005 +0000 + + Bug #3109: Handle R_ALPHA_BRSGP relocations in elfloader. (Sergey Tikhonov) + +commit 0e80fe0e607cc73856332563becd70ef92d1aa75 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Apr 22 22:11:26 2005 +0000 + + Clean up formatting, projectroot substutition, and grammatical nits. + +commit dcfb97204b021738c0ee9f1f8f40243dfa0b2ce0 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Apr 22 22:04:37 2005 +0000 + + Work around clash between Solaris headers and module loader headers over + definition of FILE. + +commit 07bd7df6a6a07834277b4bf505db6727841e1153 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 22 20:49:50 2005 +0000 + + Bug #3069: Drop the BuildLowMem hack, it doesn't compile and isn't useful. + +commit d450a70e00b50427ecb2065d3cc44f43d102cade +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 22 17:45:14 2005 +0000 + + Bug #2373: SGI Altix platform support. (Shrijeet Mukherjee, Jesse Barnes, + Bjorn Helgaas, Egbert Eich.) + +commit 16c2499b8f5c2405e36c7d5a922bb0b150df1762 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 22 16:49:22 2005 +0000 + + Bug #2373: SGI Altix platform support. (Shrijeet Mukherjee, Jesse Barnes, + Bjorn Helgaas, Egbert Eich.) + +commit 8565b6c0e2851cc3f194ba72d3db02a4e2976528 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Apr 21 00:31:31 2005 +0000 + + Change xf86bigfont.h include to X11/extensions/xf86bigfont.h. + +commit b241c703a2c4164420dd26ee11f583bbf9cfe0f3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Apr 21 00:31:13 2005 +0000 + + Change keymap.h includes to X11/keymap.h + +commit 44528218d5ca75b842e4cefd8fdc58be2f35f0f4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 23:33:53 2005 +0000 + + Change dmxext.h and dmxproto.h to <X11/extensions/...>. + +commit efa9d5f4757bfc0588cee361bcc78dd8a09efa62 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 23:11:12 2005 +0000 + + Change "eviestr.h" to <X11/extensions/eviestr.h>. + +commit db5bd04097fd815ab6523f187679682a5e5047fa +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Apr 20 16:40:52 2005 +0000 + + Fix includes right throughout the Xserver tree: + apply changes to windows specific includes + Fix includes right throughout the Xserver tree: + apply changes to Xdmcp.h + +commit 8963a220f36cf0ae2a8a653fd39c983140e29736 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Apr 20 16:34:46 2005 +0000 + + warning fix for Win32 + +commit e6a0820d1b479058bddef66018d321940e79260c +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 15:16:36 2005 +0000 + + Change "xf86bigfstr.h" to <X11/extensions/xf86bigfstr.h> for includes. + +commit 025724f9f5874159c20ebd705288ec60b960caac +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Apr 20 14:17:35 2005 +0000 + + Add missing space after -query hostname + +commit 35cd1684622f4528c68e07eea798c33bc4b93667 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 14:16:37 2005 +0000 + + Change xf86bigfstr.h to X11/extensions/xf86bigfstr.h for includes. + +commit c7c27e61870b42de044b183c854a960582d98dbf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 13:33:54 2005 +0000 + + Change xf86bigfont.h to X11/extensions/xf86bigfont.h for includes. + +commit abd246c6c272a2c6f9c37404b2ed439911880e75 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 13:01:55 2005 +0000 + + Add glyphstr.h to includes. + +commit 956dfa22f6076969776546fb1151e900d8d773a1 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 12:49:46 2005 +0000 + + Conditionalise usage of Xprint functions and headers. + +commit 2cdfab0ed7eb33a6a50f9b7ec212b498dd8318b5 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 12:42:02 2005 +0000 + + Change keysymdef.h to X11/keysymdef.h for include statement. + +commit fa5539247d3b246db9ff1469d08167178c85d7ad +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 12:39:28 2005 +0000 + + Change Xalloca.h to X11/Xalloca.h for include. + +commit 292c4cff26687e6ef86c285b97813ab587daf009 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 12:25:48 2005 +0000 + + Fix includes right throughout the Xserver tree: + change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h; + change "foo.h", "extensions/foo.h" and "X11/foo.h" to + <X11/extensions/foo.h> for extension headers, e.g. Xv.h; + change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files. + +commit c062d7f96f47bdd31640be1fbce682d0774db3d9 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Apr 19 18:21:01 2005 +0000 + + Prevent recursive calls to winRaiseWindow. + +commit 4e914c5ed7679a1102f3e25af0c087380f834865 +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Apr 19 14:51:29 2005 +0000 + + Hash texture objects and display lists in Xgl + +commit 6bde764de102a56d2c71b971eaa36535e9760b52 +Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> +Date: Sun Apr 17 23:02:25 2005 +0000 + + Added a log pring for the parameters + +commit 8594b8f2893e58ae824e140334c18ba3d7467217 +Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> +Date: Sun Apr 17 23:00:58 2005 +0000 + + Added new tuner FM1236MK3 PAL version + +commit 7f74e3aebdf79fbca4141e6ffcdad39812df9335 +Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> +Date: Sun Apr 17 22:58:03 2005 +0000 + + This is the UDA1380 sound coder-decoder module + +commit 7a4e5f4006319e025e3ff561eccc3f1ad6c661a0 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Sat Apr 16 00:21:21 2005 +0000 + + Fix cases in Darwin build where a variable is declared static and later as + extern (XFree86 Bug #1576, Jordan Frank). + +commit 4f686f158b00478a3d074128f9e4cb6dc0d928cd +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Apr 15 23:34:39 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2885) attachment #2434 + (https://bugs.freedesktop.org/attachment.cgi?id=2434) Fix Solaris build + bustage caused by namespace collision between symbols defined in + <sys/kbd.h> and those in "xf86_OSlib.h". Patch by Alan Coopersmith + <alan.coopersmith@sun.com>. + +commit 7472fcfdd40e29cd2847e45d4bd2dd11ccc41ff5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 15 00:18:58 2005 +0000 + + Bug #2141: Rework misleading warning message when APM support is + unavailable. + +commit 504067819a4f1a8564dcacc278933f533618b666 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Apr 14 17:51:51 2005 +0000 + + Bug #3025: gcc4 build fix. + +commit e40db7f26af39a8b1f3675a2c87ce90c4fd59d85 +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Apr 13 14:27:47 2005 +0000 + + Add GLX code to Xgl + +commit ddfa6f00da7c80b246b57c592361baa4bc5a8e9d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Apr 13 00:05:37 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=3001) attachment #2404 + (https://bugs.freedesktop.org/attachment.cgi?id=2404) Improve rendering + performance when glXSwapBuffers()| or |XPutImage()| are called for the + PostScript DDX via optimizing the codepath around + |PsOut_OutImageBytes()|. Patch by Simon Toedt <simon.toedt@gmail.com> + and Roland Mainz <roland.mainz@nrubsig.org>. + +commit f45208a7e9c39345ac431c2e7da8777d6c466dcc +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Apr 11 11:06:21 2005 +0000 + + update static file from pci.ids + +commit b47f39b417cbe220690155a08c6bc18cd7cfa388 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Mon Apr 11 10:57:33 2005 +0000 + + import latest pci.ids file + +commit 00a551393ce7aa9d2b23634737ced5071e3cdd35 +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 11 10:54:13 2005 +0000 + + Reenable BackingStore in Xvfb. + +commit 1fbd38f3b46df62561f8be74cbc05fcf8ad88a21 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Apr 11 10:16:25 2005 +0000 + + Added wizard page for clipboard selection and additional server parameters + +commit 6848b0353897a6a5d1218b266c22fb87a7c6d730 +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 11 10:05:38 2005 +0000 + + Correct the mask bits when checking for a 64bit memory base in PCI config + space (bugzilla #2963). + +commit adac7011965ed75ea399b93dae917cb48180c77a +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 11 09:33:43 2005 +0000 + + Preventing hight for drawing from becoming negative when face->dy < 0. The + height value is used in miFillPolyHelper() to calculate the size of + memory to be allocated. A negative value will lead to a crash (Bugzilla + #2690, Keith Packard, Egbert Eich). + +commit 5e2080ef93a598c6d68e1b2f446f251ab025b702 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Apr 11 01:06:15 2005 +0000 + + xc/programs/Xserver/Xprint/attributes.c + xc/programs/glxgears/glxgears.c + xc/programs/xdbedizzy/xdbedizzy.c + xc/programs/xedit/Imakefile + xc/programs/xedit/Xedit-xprint.ad + xc/programs/xedit/util.c + xc/programs/xedit/xedit.h + xc/programs/xlogo/print.c + xc/programs/xlogo/xlogo.c + xc/programs/xlogo/xlogo.h + xc/programs/xman/Imakefile + xc/programs/xman/print.h + xc/programs/xmore/Imakefile + xc/programs/xmore/print.c + xc/programs/xmore/print.h + xc/programs/xmore/printdialog.c + xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c + xc/programs/xphelloworld/xphelloworld/xphelloworld.c + xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c + xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c + //bugs.freedesktop.org/show_bug.cgi?id=790) attachment #2379 + (https://bugs.freedesktop.org/attachment.cgi?id=2379) Implement support + client+Xserver support for passing output (stdout+stderr) of the + spooler command started by the Xprint server back to the application + using the "xp-spooler-command-results" XPJobAttr attribute + (applications can fetch the attribute value after the XPEndJobNotify + event was received; more details can be found in + http://xprint.mozdev.org/docs/dtprint_fspec.ps). + +commit 9af443f5976ab3987e4ee9d397391e82206676b4 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Apr 9 19:20:03 2005 +0000 + + Fix passing of non-RGB visuals. The old code did not initialize the + structure properly which lead to a crash in 8bpp mode + +commit f02440dfa3439ab493c7918b472c23bb22e29707 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Apr 6 15:18:59 2005 +0000 + + First import of xlaunch frontend for Xming + +commit de5d24a200e4426e458fc447884d1a5b0257faaa +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 4 10:17:06 2005 +0000 + + Fixed sentinels in Xt, editres and xedit to reduce number of warnings with + gcc4 (Andreas Schwab). + +commit 277ff06e9999f2efe0f082a3565f6279219c13e4 +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 4 10:11:51 2005 +0000 + + Fix typo leading to bogus code in xorgcfg (Andreas Schwab). + +commit 7eb6b69ebd945c753ee0988e1a85dffde982446e +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 4 09:55:25 2005 +0000 + + Support for HP's IPF ZX1 systems (Alex Williamson). + +commit 231c00e8fba91b580ec3e2703dd1ceacf13a6624 +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 4 09:47:07 2005 +0000 + + When not using dlopen ia64 needs an extra cache flush to ensure the icache + is coherent when modules are loaded (Alex Williamson). + +commit 55dc930a180553c08d8546cc2078451c20e34934 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Sat Apr 2 02:29:24 2005 +0000 + + Fix XDarwin's handling of Wacom tablet mouse buttons (Based on patch + suggested by Daphne Pfister). + +commit 03d126081e5ba57ea2304753289528a896f3baaf +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Apr 1 21:45:20 2005 +0000 + + xc/programs/Xserver/Xprint/Init.c + xc/programs/Xserver/Xprint/ps/Imakefile + xc/programs/Xserver/Xprint/ps/Ps.h + xc/programs/Xserver/Xprint/ps/PsArea.c + xc/programs/Xserver/Xprint/ps/PsColor.c + xc/programs/Xserver/Xprint/ps/PsImageUtil.c + xc/programs/Xserver/Xprint/ps/PsInit.c + //bugs.freedesktop.org/show_bug.cgi?id=2879) attachment #2287 + (https://bugs.freedesktop.org/attachment.cgi?id=2287) Follow-up to + bugzilla #1299: Add new visuals in the Postscript DDX (including + TrueColor 16bit, PseudoColor 15bit/12bpg(12 bits per R-, G-, B-channel + as in PostScript Level 2 (and above) colors can have 12 bits per + component (36 bit for RGB)), PseudoColor+GrayScale+StaticGray + 12bit/12bpg) and switch the default visual from PseudoColor 8bit/8bpg to + PseudoColor 12bit/12bpg. + +commit fe37cc7e7b3036e538930c16bbdb39a7915b1685 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Apr 1 21:28:50 2005 +0000 + + programs/Xserver/hw/xfree86/loader/xf86sym.c + programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c Fix setjump0 + declaration for DllLoader. + +commit ef60998a828951e61f1480e29c2fec62e7454bbc +Author: Kevin E Martin <kem@kem.org> +Date: Fri Apr 1 20:21:38 2005 +0000 + + bugzilla #2880 (https://bugs.freedesktop.org/show_bug.cgi?id=2880) + attachment #2285 (https://bugs.freedesktop.org/attachment.cgi?id=2285) + Use system method to access PCI config space. + +commit 33ab2a2abc8c1e4ca9c7139454c60f5ad8a61a94 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 1 20:05:11 2005 +0000 + + Bug #2835: Add symbol exports to support the ReadDisplay extension. + +commit cbccac448a1466ab098e8fe5dbfff98264c7260a +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Mar 31 23:18:10 2005 +0000 + + - Add new Radeon pci ids (ATI devrel), bug 2827 + +commit 59d7222b13775efb2159159cc897e7789bdf10b2 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Sun Mar 27 00:17:12 2005 +0000 + + Sat Mar 26 19:00:30 2005 Søren Sandmann <sandmann@redhat.com> + Remove accidentally committed prototype. + +commit 476ae15640d2b97cb0ebccab8255ccf728596c62 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Sat Mar 26 23:50:24 2005 +0000 + + Sat Mar 26 18:49:21 2005 Soeren Sandmann <sandmann@redhat.com> + programs/Xserver/fb/fbmmx.h + New function. + Hook it up here + +commit 0d33b588376a4d86d50ed8b7e06eaf0dbd8c5ba5 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Mar 25 23:11:14 2005 +0000 + + xc/programs/Xserver/Xprint/ps/Imakefile + //bugs.freedesktop.org/show_bug.cgi?id=2821) attachment #xxx + (https://bugs.freedesktop.org/attachment.cgi?id=xxx) Remove the cfb + dependicy from the PostScript DDX as this is not needed in a vector DDX + (mfb is still needed to fill the |BitmapToRegion()| callback with + |mfbPixmapToRegion()|). + +commit 5f320335c3a8148ae98f82a00ff44954197f4251 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Wed Mar 23 21:09:48 2005 +0000 + + bugzilla #2194: fix an alignement problem on 64 bit architectures. + +commit f4e9f522fe8bec3dd6294d062c2244a06623add3 +Author: Thomas Hellstrom <unichrome@shipmail.org> +Date: Wed Mar 23 21:03:41 2005 +0000 + + Bugzilla #2750 (https://bugs.freedesktop.org/show_bug.cgi?id=2750) + Linux-only fixes: Fix case where a smaller write-combining region + blocks write-combining setting of the whole frame buffer. Fix bug in wc + setting code when regions are first splitted and setting of + write-combining then fails. + +commit 1be6e2388bcc5835ab62f0855d443fb508697deb +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Mar 23 20:49:52 2005 +0000 + + xc/programs/Xserver/hw/vfb/InitOutput.c + //bugs.freedesktop.org/show_bug.cgi?id=2791) attachment #2197 + (https://bugs.freedesktop.org/attachment.cgi?id=2197) Add support for + 12bit PseudoColor and 30bit TrueColor to Xvfb. + +commit 26aec10adad51deb35a8398abb884d90be077a6b +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Mar 23 19:58:45 2005 +0000 + + xc/programs/Xserver/Imakefile + xc/programs/Xserver/Xprint/DiPrint.h + xc/programs/Xserver/Xprint/Imakefile + xc/programs/Xserver/Xprint/Init.c + xc/programs/Xserver/Xprint/ddxInit.c + xc/programs/Xserver/dix/Imakefile + xc/programs/Xserver/dix/main.c + xc/programs/Xserver/dix/xpstubs.c + xc/programs/Xserver/os/Imakefile + //bugs.freedesktop.org/show_bug.cgi?id=2792) attachment #2193 + (https://bugs.freedesktop.org/attachment.cgi?id=2193) Fix build bustage + when |PrintOnlyServer| is set to |NO|. Patch by Roland Mainz + <roland.mainz@nrubsig.org> and Julien Lafon <julien.lafon@gmail.com>. + +commit ac18f8e308221af368fd4153b4eee7b89f8dd4bc +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Mar 23 00:32:49 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2789) attachment #2187 + (https://bugs.freedesktop.org/attachment.cgi?id=2187) Fix Xvfb to honor + the "-dpi" option (instead of using a hardcoded value of 100DPI). + +commit 45bcb8e22ad949c456368b7d4f4226110f8b5cfc +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Mar 22 21:30:43 2005 +0000 + + Bug #1821: Typo fix in xorg.conf man page (Jens Schweikhardt) + +commit cc95e597b51f06e835c6a9def1bc6681029bf41e +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Mar 22 17:49:14 2005 +0000 + + Tue Mar 22 12:47:16 2005 Søren Sandmann <sandmann@redhat.com> + Only validate the source if it is a viewable window. Stops the cursor + flickering when it is above an unviewable window. + +commit 1d68ede0eed62b48354a954a62fca98aa2ce9d2d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat Mar 19 20:51:34 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2771) attachment #2148 + (https://bugs.freedesktop.org/attachment.cgi?id=2148) Remove RENDER + extension from exclusion list for the standalone print server (Xprt) to + get this extension enabled if the print DDX support it. + +commit 64f1b3fe7e85245865666607d7b32ef7807df08f +Author: Michel Daenzer <michel@daenzer.net> +Date: Fri Mar 18 22:36:47 2005 +0000 + + Add support for production version of ATI RN50/ES1000. (ATI Technologies + Inc.) + +commit 36dcc9bb1d51fb8c0d67c7e15700e3473a06e47b +Author: Torrey Lyons <torrey@mrcla.com> +Date: Thu Mar 17 01:12:07 2005 +0000 + + Fix build on stock Mac OS X: Out of the box, Mac OS X does not include + Freetype2, Expat, or PNG. Also global variables should be initalized in + the Xserver. + +commit 82f5a127522e48ff7ff78400eadbce0a5a362064 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Mar 16 21:25:43 2005 +0000 + + Wed Mar 16 16:17:43 2005 Søren Sandmann <sandmann@redhat.com> + Only validate the source if it is a viewable window. Stops the cursor + flickering when it is above an unviewable window. + +commit 226c0907d4327a440fb0ac5380a19538ffdc6fa0 +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Mar 16 21:05:51 2005 +0000 + + Add cursor support to Xglx + +commit 7109ae147c3a9d243d11f386cfbcfbf7b4ea7918 +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Mar 16 20:05:19 2005 +0000 + + Fix a few problems in Xgl + +commit 04ccba4d40bef6cee902b118598272f26eebb1df +Author: Egbert Eich <eich@suse.de> +Date: Wed Mar 16 12:16:06 2005 +0000 + + Don't fail calling function when DriverFunc() for RandR fails as + DriverFunc() also returns FALSE when the specific sub function isn't + supported. In the case of xf86RandRGetInfo() we simply rely on what has + been set before and return TRUE. In the case of xf86RandRSetConfig() we + only bail with FALSE if we have to do a rotation and the call fails. We + presently cannot do rotation on the fly without the help of a driver + function (Bugzilla #2745). + +commit 1011762254b41db5ce67cb652a2d4965efd7ec20 +Author: Egbert Eich <eich@suse.de> +Date: Wed Mar 16 11:54:54 2005 +0000 + + Make message that gets printed when loader encounters a .o with no symbols + less conspicuous. + +commit 816606b9eabee334ce6e0b79e8aa67544f428c19 +Author: David Reveman <c99drn@cs.umu.se> +Date: Fri Mar 11 12:26:20 2005 +0000 + + Return early from xglFillRect when no rectangles should be filled + +commit 4de5aa428514f2cacc60d4708dad996dedee1092 +Author: David Reveman <c99drn@cs.umu.se> +Date: Fri Mar 11 00:58:49 2005 +0000 + + Use negative stride and PBOs in Xgl + +commit 8653db5d57199d53c9b2b993c35a7b70c8949989 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Mar 10 20:05:46 2005 +0000 + + Force rebuilding of window stack if a window changes it's state from + minimized. + +commit 522628f25b4a075c8daf547991ea5b80c5efe9c7 +Author: Egbert Eich <eich@suse.de> +Date: Tue Mar 8 10:26:59 2005 +0000 + + Adding more errnos to the libc wrapper (Bugzilla #2672). + +commit db7c9d349b86216ed00888181c64ab707fbe18d4 +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Mar 8 09:27:09 2005 +0000 + + Return early from xglCopy if fall-back is more efficient + +commit e09d1d2ae3ccd59408b1dc6f264897ae12dfa2b8 +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Mar 8 09:12:17 2005 +0000 + + Better ShmPutImage support in Xgl + +commit 5d9885c5b95286c8d7f777c7232283e8b1e81d1b +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Mar 8 09:03:38 2005 +0000 + + Minor improvement to CopyArea in Xgl + +commit 51155ca68bf7539bd3ace2ac068a2be1fbcf400c +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Mar 8 08:48:22 2005 +0000 + + Improve Xgl offscreen memory manager + +commit e26a096cb662700387c7b43289d1f6f7ab4a0aac +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Mar 8 08:30:47 2005 +0000 + + Fix Xgl glyph caching + +commit 8d0e520721ab7697d2d4f639425499b79c61b43f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Mar 7 23:02:59 2005 +0000 + + xc/programs/Xserver/dix/atom.c + xc/programs/Xserver/dix/colormap.c + xc/programs/Xserver/dix/cursor.c + xc/programs/Xserver/dix/devices.c + xc/programs/Xserver/dix/dispatch.c + xc/programs/Xserver/dix/dixfonts.c + xc/programs/Xserver/dix/dixutils.c + xc/programs/Xserver/dix/events.c + xc/programs/Xserver/dix/extension.c + xc/programs/Xserver/dix/gc.c + xc/programs/Xserver/dix/glyphcurs.c + xc/programs/Xserver/dix/grabs.c + xc/programs/Xserver/dix/main.c + xc/programs/Xserver/dix/pixmap.c + xc/programs/Xserver/dix/privates.c + xc/programs/Xserver/dix/property.c + xc/programs/Xserver/dix/resource.c + xc/programs/Xserver/dix/swaprep.c + xc/programs/Xserver/dix/swapreq.c + //bugs.freedesktop.org/show_bug.cgi?id=2560) attachment #2037 + (https://bugs.freedesktop.org/attachment.cgi?id=2037) ANSI-fy + Xserver/dix code. The conversion preserves the comments which annotate + variables. These have been moved into doxygen(esque?) "stubs" above + each function. Patch by Mike Owens <etc@filespanker.com>. + +commit cb0aa2b4d8875f1ea66e720ca7c6cc2f403be26a +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Mar 7 22:26:59 2005 +0000 + + Prevent winRaiseWindow from calling ConfigureWindow if the message was sent + from within winDestroyWindowsWindow + DestroyWindow send a WM_WINDOWPOSCHANGED to another window causing a + restacking of all windows, even of the window which is just about to + destroyed and whose structures may not be intact anymore. + +commit 978f3b496b9951ee8120a0efcc5cd12503e26770 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat Mar 5 21:38:29 2005 +0000 + + xc/programs/Xserver/Imakefile + xc/programs/Xserver/hw/xnest/Imakefile + //bugs.freedesktop.org/show_bug.cgi?id=2653) attachment #2020 + (https://bugs.freedesktop.org/attachment.cgi?id=2020): Cleanup Xnest + usage of the DPMS dummy stub functions from dpmsstubs.c instead of + using it's own copy of these functions. + +commit 602209990dbbc96b4c5a96e2221a418cf29e613d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat Mar 5 20:47:12 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2543) attachment #2019 + (https://bugs.freedesktop.org/attachment.cgi?id=2019): Fix + |xf86SignalHandler()| which resets the signal handler before setting + the flag indicating a signal has been caught, theoretically allowing + the possibility of infinite recursion. Patch by Andrew Church + <xzilla@achurch.org>. + +commit d995fe631a5706de93a05fda498333442af3d207 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Mar 2 14:21:40 2005 +0000 + + xc/programs/Xserver/hw/xnest/Screen.c + xc/programs/Xserver/hw/xnest/Window.c + //bugs.freedesktop.org/show_bug.cgi?id=2546) attachment #2005 + (https://bugs.freedesktop.org/attachment.cgi?id=2005): Fix Xnest to + update the shape regions in the backend server whenever a client + changes them in Xnest (the fix is to add a new wrapper which calls + |xnestShapeWindow()| before calling |miSetShape()|). Patch by Mark + McLoughlin <mark@skynet.ie> + +commit 3f79c5eefc0d62d3a9b095472cd75b446ba2a56e +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Mar 2 11:20:30 2005 +0000 + + xc/config/cf/DragonFly.cf + xc/config/cf/Imake.cf + xc/config/cf/Imakefile + xc/config/imake/imake.c + xc/config/imake/imakemdep.h + xc/extras/drm/shared/drm.h + xc/include/Xos_r.h + xc/lib/xtrans/Xtranssock.c + xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h + xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h + xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c + //bugs.freedesktop.org/show_bug.cgi?id=1712) attachment #2004 + (https://bugs.freedesktop.org/attachment.cgi?id=2004): Add support for + DragonFly/BSD platform. Patch by Jeroen Ruigrok <asmodai@tendra.org> + and Mike Verona <firedragonfly@gmail.com>. + +commit 6c6151b2339a05c60ec58e013f915f79a3f9d756 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Mar 1 18:58:17 2005 +0000 + + If a context is already attached copy it instead of reattaching to keep + displaylists and share displaylists Enable tracing of often called + functions with GLWIN_ENABLE_TRACE ForceCurrent is a no-op now + +commit d323c4f59a653f364164d2a57fbbd102306a6ee9 +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Mar 1 16:57:54 2005 +0000 + + Minor improvement to pixel transfers in Xgl + +commit 2d2c1732620a83215983ee7a7dd469a1a85fcc12 +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Mar 1 16:34:31 2005 +0000 + + Add dither support to Xgl + +commit b4b27e9eaa43401ae70e5d03823012bf8c78848f +Author: Keith Packard <keithp@keithp.com> +Date: Mon Feb 28 20:45:15 2005 +0000 + + Force DPMS normal on screen enable + Add placeholder for bit used to redirect input + Add macrovision register defines + +commit 409c0618bced6df02eed7af77107ff74508c0f3f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Feb 24 22:53:17 2005 +0000 + + on WM_WINDOWPOSCHANGED raise window directly and in sync without utilizing + the async windowmanager thread. Fixes some restacking problems occuring + which were timing dependent Do not raise the window on WM_ACTIVATE + Removed unused code for WM_WINDOWPOSCHANGING ESC is debug key. Print + status but do not abort processing the message + +commit 775efdbd79448040b822fcc0556e98d3968ba8c3 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Feb 23 19:17:10 2005 +0000 + + Bugzilla #2599 (https://bugs.freedesktop.org/show_bug.cgi?id=2599) + attachment #1964 (https://bugs.freedesktop.org/attachment.cgi?id=1964): + move miScreenInit in front of pScreen->function initializations to + prevent it from resetting ClipNotify. + +commit c4b3fcda98a92c204534f04bd386ace5d3620d86 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Feb 21 03:44:10 2005 +0000 + + Move the draw tracing supplies into ati_draw.h, and do some touchups on it. + (When tracing drawing, I want to know what I'm drawing to, at a + minimum). + +commit de34b0eefc9f8a29147659454398cabb187c7cb6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Feb 21 03:05:55 2005 +0000 + + Extend the filter support to R200, and do the check for filter settings in + Check rather than Prepare, to avoid migration of things we won't be + able to accelerate. + +commit 535c178286f94cc593b6cda753bbeb9b7cf6df4c +Author: Michel Daenzer <michel@daenzer.net> +Date: Fri Feb 18 19:55:35 2005 +0000 + + Bug #2576: Add support for ATI RN50/ES1000. (ATI Technologies Inc.) + +commit 2f07222106358a02f56bf1e344d1fbf7ead14cbd +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Feb 18 17:52:48 2005 +0000 + + Bug #2455: Make x86emu handle JNL correctly. (David Wong) + +commit 01b156240ce66703b38a67ee3cfbb475352cdf68 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Feb 12 14:55:24 2005 +0000 + + winmultiwindowwindow.c + winmultiwindowwndproc.c + Cleanup some message debugging + +commit 8df7126f09d6d7cb35a5912a71531cad28ba2545 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Feb 12 14:47:17 2005 +0000 + + win.h + winfont.c + winmultiwindowshape.c + winmultiwindowwindow.c + winpfbdd.c + winshaddd.c + winshadddnl.c + winshadgdi.c + Fix incorrect wrapping of functions. Ensure the pointers from pScreen point + to the called function even if wrapped functions changed it + Set the window properties to NULL to avoid referencing freed memory because + of timing problems after deleting a window + Do not wrap ChangeWindowAttributes. All functions are noops currently + +commit 676fdb03f3fb27ac24834aeb895df7d6d6e83f78 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Feb 12 14:43:07 2005 +0000 + + print window handle in message outout + +commit 046bdb17169ecb1361a42ab52043da699590d39a +Author: David Reveman <c99drn@cs.umu.se> +Date: Fri Feb 11 20:19:20 2005 +0000 + + Fixes a few problems in Xgl + +commit 35bd81dfec62402f9d6c68d98e651e8cd87a8758 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Feb 11 19:38:04 2005 +0000 + + Fri Feb 11 14:28:22 2005 Søren Sandmann <sandmann@redhat.com> + When COMPOSITE is enabled, call CopyWindow even when the pixels "don't + move" on screen. + Don't reject modes that are not supported by the unused monitor. + +commit e5ccccfbd45c78c1be5e311b2cb4135a9a27540b +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Feb 11 06:37:38 2005 +0000 + + Bug #826: Make xorgconfig respect font installation outside $PROJECTROOT. + (Donnie Berkholz) + +commit e7369daba58bb4fad5cef37fefbd851e59446045 +Author: Egbert Eich <eich@suse.de> +Date: Wed Feb 9 11:12:54 2005 +0000 + + Added PCI2Host bus translations for linux PPC and fixed fixed bugs in + macros that apply these functions (Bill Randle Bugzilla #325 and #327). + +commit aab9a8dd99e52297ed9b40c936600429f38fe9ad +Author: Keith Packard <keithp@keithp.com> +Date: Wed Feb 9 03:56:35 2005 +0000 + + Add initial evdev framework + +commit a85c33b52c40fbae544c7dd40df8c8968e0cf7e9 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Feb 8 22:45:21 2005 +0000 + + update Xgl to changes in damage API. Remove some flags to support software + mesa + +commit db2c83551cd3516800b88784c461fb33ee15aacf +Author: Keith Packard <keithp@keithp.com> +Date: Tue Feb 8 22:43:54 2005 +0000 + + hw/kdrive/ati/radeon_composite.c Support linear filtering + Change how touch screens work -- make them just another 'mouse' device. Add + unfinished (and unused) code to accelerate tiled fills. + +commit 70d3a9192feefd54be93ea71231574c3ed815bf2 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Feb 8 15:20:01 2005 +0000 + + Updated fix for ABNT2 and HK_Toggle keys. + +commit 384099457e9d938871019ba2e5afc20280328884 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Feb 8 10:15:49 2005 +0000 + + Backout ABNT2 and HK_Toggle fix since it broke keys F1 and F4. + +commit ea5b09f95d6f25d8b0f8858c36b680055edd0da9 +Author: Egbert Eich <eich@suse.de> +Date: Mon Feb 7 18:16:05 2005 +0000 + + Save gs register before calling the vm86_old syscall thru int 0x80. This is + required for linuxthreads as the TLS uses this register to keep track + of local thread storage (Bugzilla #2431, J. Scott Berg). + +commit 4d55065b35baa7e13f6e726cb9d6675562648000 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Feb 7 15:08:31 2005 +0000 + + Moved keyboard layout table to external file. + +commit e132cb7590b5518ef1b7fce5f9151beed916fafc +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Feb 7 15:05:39 2005 +0000 + + file winlayouts.h was initially added on branch CYGWIN. + +commit c12ef1b34a55544f54401a5a66a36cd728e2f944 +Author: Egbert Eich <eich@suse.de> +Date: Mon Feb 7 11:56:31 2005 +0000 + + Check the pixel clock choosen for a specific refresh rate against the + maximally allowed pixel clock when choosing mode lines for + VBESetVBEMode() and VESA BIOS version >= 3.0 (Bugzilla #2486). + +commit 859be7a52b778df8acb676683351a6562a6d4400 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Fri Feb 4 01:14:49 2005 +0000 + + Applied patch (id=1354) by Mike A. Harris from bug #1901: The attached + patch updates a couple of PCI IDs for the Savage driver -- + Debian/Ubuntu/Red Hat/Fedora. + +commit 5feca068d740b165d3c36a690f5a68b7588b6625 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Feb 3 09:58:47 2005 +0000 + + Bugzilla #1865 (https://bugs.freedesktop.org/show_bug.cgi?id=1865) + attachment #1827 (https://bugs.freedesktop.org/attachment.cgi?id=1827): + check for va_copy not being defined and use __va_copy if available + +commit 3dda2fe0e2e7e4d2c058d32fa8691d12386b978d +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Feb 2 18:06:14 2005 +0000 + + Force ShowWindow if XWin was started via run.exe. Fixes mainwindow not + showing bug + +commit e8d3da3c753677cc1ae86bc5a79f2b7eba181d74 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Feb 2 17:17:56 2005 +0000 + + Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) + attachment #1819 (https://bugs.freedesktop.org/attachment.cgi?id=1819): + Define APIENTRY on windows to prevent <GL/gl.h> from loading + <windows.h> removed leftovers from attachment #1818 + +commit 81b862509c87281705f8a8641c28ae2f45f15751 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Feb 2 15:03:44 2005 +0000 + + Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) + attachment #1818 (https://bugs.freedesktop.org/attachment.cgi?id=1818): + Include Xwindows.h before GL/gl.h on windows to prevent loading + windows.h which pollutes our namespace with some symbols. + +commit b532bfb483cc8ea87c28302e3d676234cab7c3f0 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Feb 2 04:07:04 2005 +0000 + + Bug #1294: Make sure RenderAccel hooks get wrapped in XAA init. + +commit 44e2d9167943182fea530dfd7ec16aa53db20f4c +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Feb 2 00:55:21 2005 +0000 + + xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h + xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c + //bugs.freedesktop.org/show_bug.cgi?id=825) attachment #956 + (https://bugs.freedesktop.org/attachment.cgi?id=956): Fix build + problems on Linux/SPARC. Patch by Jeremy Huddleston + <eradicator@gentoo.org>. Approved in the 2005-01-31 Xorg + release-wranglers phone call. + +commit 15c555a25df76e0e95bc8eaa2ca7ec80a7695a6c +Author: David Reveman <c99drn@cs.umu.se> +Date: Tue Feb 1 21:22:02 2005 +0000 + + Use negative stride for trapezoid masks in Xgl + +commit 2f0bdf77dd37d1763c4f4f409d55a6aad6031b9f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Feb 1 18:14:01 2005 +0000 + + xc/programs/Xserver/xkb/ddxLoad.c + Bugzilla #2245 (https://bugs.freedesktop.org/show_bug.cgi?id=2245) + attachment #1649 (https://bugs.freedesktop.org/attachment.cgi?id=1649): + cleanup the generation of xkbcomp command lines. Allocate them + dynamicly and remove unmaintainable length calculation. + +commit d3ca132061a861cb9292b5a95dbcb2f67695883b +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jan 31 10:49:30 2005 +0000 + + winmultiwindowwindow.c + Create windows with SWP_NOACTIVATE flag (updated) (Kensuke Matsuzaki) + Fixes for window ordering problem (updated) (Kensuke Matsuzaki) + +commit 374b9aa8ce14cd20a6768519eee63948c83488d6 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jan 31 10:47:32 2005 +0000 + + Added hungarian keyboard layout. + +commit 8d277ceb22929fcb44f2d4def8c5b70535eb087f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jan 31 10:43:37 2005 +0000 + + winmessages.h + winmsg.h + winmsg.c + winmultiwindowwndproc.c + winwin32rootlesswndproc.c + Make logging of messages configurable with environment variables + +commit 2982d173cad762b801869b7ceacc237afdad88d6 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jan 31 10:32:19 2005 +0000 + + resolve SHGetFolderPath dynamicly since it is not available on all Windows + systems. + +commit 8ac3be3f6c4bcaa8c3f6080cbfe72db4967feff8 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Jan 30 21:18:46 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1692> Remove reference to + nonexistent Monitors file from xorgconfig (Report & patch from Dejan + Lesjak <dejan.lesjak@ijs.si>) + +commit 206072c475408b8d4cfd75d897854d8478fe0905 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Jan 30 20:12:07 2005 +0000 + + programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c Fix option + dontVTSwitch under *BSD, when XKB is disabled. Bugzilla #2252. + +commit 327922f006dcc2e30ec0391d7fa786560fcd1599 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jan 29 01:01:03 2005 +0000 + + Update to latest rev from http://pciids.sf.net/ + Remove entries that now duplicate pci.ids Add entries for new Nvidia boards + added in recent nv driver update + +commit d23c46dd3e2cbf84012055bad43b1bb15809a244 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jan 28 16:13:00 2005 +0000 + + Modifying X.Org Xserver DDX to allow to run X with ordinary user + permissions when no access to HW registers is required. For API changes + which mostly involve the modifications to make the RRFunc (introduced + with 6.8) more flexible please check Bugzilla #2407. NOTE: This patch + applies changes to OS specific files for other OSes which I cannot + test. + +commit 1562ec5cc3706acfac1db04366f78e4949ef5502 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Jan 27 20:33:34 2005 +0000 + + Functions like glGenTextures and glBindTexture are in OpenGL 1.1 and can be + resolved at linktime. Fixes tuxkart (at least with wine) + +commit 5ca5fe71119f35f1f24aeb49e2608684024d450a +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 27 05:25:57 2005 +0000 + + Add an OUT_RING_REG macro for use with DMA_PACKET0, which is like OUT_RING + but includes debugging to ensure that the reg being submitted is the + one that follows in the packet. Convert most uses of OUT_RING to it, + and convert a couple of OUT_REG sets to DMA_PACKET0/OUT_RING_REG. Also, + add checking to see if more registers are submitted to a DMA_PACKET0 + than should be, to avoid hangs during stupid mistakes (checking for + less isn't done). + +commit 0bd459488bf88084d703d801bfd5e79ea6d2b5a5 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 27 03:52:49 2005 +0000 + + Move the bailing out due to ATIUploadToScreen() being unfinished up + farther, so that the traces aren't as confusing. + +commit a973af4a9ade68b271d0695898d72aea50d8953b +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 27 03:50:48 2005 +0000 + + Remove an unused field. + +commit 59c7005bb155393c44792d457d98d72e34bb1b51 +Author: Egbert Eich <eich@suse.de> +Date: Wed Jan 26 15:50:17 2005 +0000 + + When we tested if a PCI base address was unassigned we didn't take into + account that this bar could have been the upper part of a 64bit base + address. This fix makes this code 64bit bar aware (Bugzilla #2382). + +commit 7c3dd0a5a76bea2c64972ae19d99775b5a992513 +Author: Egbert Eich <eich@suse.de> +Date: Wed Jan 26 15:45:49 2005 +0000 + + Rewrite of RemoveOverlaps() to make the code more readable. It was + virtually impossible to determine if the old code did what it was + supposed to do. Also changed paradigm: Trust the based address more + than the (guessed) size. (Bugzilla #2383) + +commit 9817582328cdafee59de616136172c2ce361a4b3 +Author: David Reveman <c99drn@cs.umu.se> +Date: Wed Jan 26 10:58:52 2005 +0000 + + Xgl improvements + +commit 13b5a93b70839053b9165b5087872164f0612536 +Author: Egbert Eich <eich@suse.de> +Date: Tue Jan 25 10:08:18 2005 +0000 + + Fix interpretation of 64bit PCI bases: read hi long word from the right bar + (Michael Yaroslavtsev, Bugzilla #2322). + +commit 8813898ef6b9eb470e079bcdcffa89d1243b63b9 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jan 25 06:04:21 2005 +0000 + + Fix R100 text by forcing the 3d engine to idle before executing more 3d + commands. Add docs for the ISYNC_CNTL register, which doesn't quite do + what we want. + +commit 33155b4fd3ce025d555f07833f96b760d5cdfbd3 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Jan 25 03:37:05 2005 +0000 + + Finish converting RB2D_DSTCACHE to RB3D_DSTCACHE. Remove an extra pixel + cache flush in the idle function. Init an extra reg for r200, and + annotate the TCL_BYPASS better. Also, clean up some style nits from the + last commit. + +commit 3b1f1508b13520626839d45185dec09a42b9ff71 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jan 25 02:39:48 2005 +0000 + + Add tracing. Hack Radeon cache registers to use 3D addresses. Works on M6 + +commit 6eaca06dac037851ae5c9575048faf932ad5ffc8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Jan 25 01:40:18 2005 +0000 + + Fix a leak of a region when the driver's CheckComposite fails. + +commit 8a1bee8ea9a028eef65b8884f73a79fbe84a9f3a +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Jan 25 01:38:26 2005 +0000 + + Silence a warning about uninitialized variable (though it would be). + +commit 67eeede4e16324990e1a6afc237a3f51b8edea39 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jan 24 20:44:49 2005 +0000 + + Bug #2004: Make DDC delay slightly longer. (Thomas J. Moore) + +commit 55736aa8c17f762b15e9bcd7b3f68f8680b7cb33 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jan 21 14:25:26 2005 +0000 + + Alan Cox requested that we check the kernel version before we use kernel + VGA font save/restore as the required features have been added to Linux + 2.6.11 (Bugzilla #2277). + +commit d7263b11f043c8c0f83d6e05095143c70177926b +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 20 20:51:27 2005 +0000 + + Reinitialize offscreen memory before enabling cursor on VT switch-to + +commit 13c6b2f0b6c464ce11f6c332b2fa1a529bdbab01 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 20 16:22:04 2005 +0000 + + Add a set of macros for dealing with the repeated code to wait for a while + reading a register/attempting DMA. Now it'll wait for a certain number + of seconds rather than a certain number of times through the loop + before deciding that it's timed out and resetting the hardware. Also, + add more timeout handling, and reset the draw state after resetting the + engine. + +commit dbe45c71590ac319250d04a2bf37ec07cd79e42a +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 20 07:28:02 2005 +0000 + + Use RadeonSwitchTo3D() instead of doing the WAIT_UNTIL ourselves (RST3D() + also does DC_FLUSH, which may be important). + +commit fc43c154943fb1d277a9cffa9a4db7e76db461bc +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 20 07:09:00 2005 +0000 + + Add R200 XV support, and make R100 (hopefully) use linear filtering instead + of nearest. Also, use RadeonSwitchTo3D instead of doing the WAIT_UNTIL + ourselves. + +commit 77755065345eb71c997c1ff74dcfd2b2bbbf1305 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 20 01:09:48 2005 +0000 + + Make R200 PDMA work -- primary queue sizes are now 9 bits, not 8. + +commit 9bd876768b2165ec3903ad0848ae2ae950330290 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Jan 19 22:23:20 2005 +0000 + + Fix debugging ErrorF() so it compiles when DEBUG is true. + +commit ff433adba3a643512fdd44e41cd08965fab9c9cb +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jan 19 06:35:28 2005 +0000 + + Prefer 32bpp to 24bpp. Fix 16 color planar mode (!) + +commit cbcdae5a3f7c4009121f86de52bba6c657f20fff +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jan 17 17:17:45 2005 +0000 + + more static server build fixes + +commit 79a7120983eff6fa114d4250fe01b62d4a99a612 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sun Jan 16 01:59:23 2005 +0000 + + Bug #1895: Fix fbComposeGetSolid for BGR. (David S. Miller) + +commit 24cdd188dc3c10b56d6a7b46dafefb16c6d13efc +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Jan 14 22:07:59 2005 +0000 + + Fri Jan 14 17:03:40 2005 Søren Sandmann <sandmann@redhat.com> + Fix from Keith Packard for bitgravity bugs in the Composite extension, + reported by Amir Bukhari. + +commit 7db2e666e2dc9a1dba468e35e9d382e76ed8be54 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Jan 14 21:56:51 2005 +0000 + + Fri Jan 14 11:12:46 2005 Søren Sandmann <sandmann@redhat.com> + Use mmx CopyArea in a few more places. + +commit 761f937fdee9ccd10ad54c1f06e12f2f102547a6 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jan 14 19:29:18 2005 +0000 + + - Don't suspend Xserver on APM standby request as this seems to cause + problems on may systems which don't support APM standby and might not + be required as according to the APM specs the chips should receive + enough power to retain its state. + - Print out power state change requests to log file in all verbosity + levels. + - Don't change server state if no driver PM function is registered. + (Bugzilla #2279) + +commit 16f9d2d72a2378470e9c5b31c59fa6c9a00892d6 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jan 14 18:42:26 2005 +0000 + + Let the OS instead of X save/restore text console fonts on Linux. So far we + relied on the generic VGA layer to restore text console fonts for us + when shutting down the server or VT switching back to the text console. + This has worked rather well but it has some downsides on Linux: a. Many + people use fbdev as console text mode. In this case it is not necessary + to save/restore console fonts as the console is running in graphics + mode anyway. b. Some architectures don't have a fbdev console but + require a full POST of even the primary card (ie. IA64). This posting + has to take place before we even have a chance to save anything. + Therefore the fonts we save are the once written to the chip by POST, + not what has been programmed by the user. c. Certain chipsets utilize + the BIOS to perform mode setting. This may interfer with the vga + save/restore font function in a strange way. It would therefore be + preferrable to let the OS - which has been used to set up the font in + the first place - take care of saving/restoring the data. I will attach + a patch which will do so for Linux. To make this fully functional a + small patch needs to be applied to the Linux kernel. To disable this + feature add: #define DoOSFontRestore NO to your host.def. (Bugzilla + #2277) + +commit 6c0b03a2362f33ae24a2f6845ed1418c9af4b8bc +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jan 14 17:14:08 2005 +0000 + + Build fixes for static server. + +commit df4a1fa9c5cc5d54a9347a2bf4843cae87a942f1 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Jan 14 12:17:10 2005 +0000 + + Added copyright notice. + +commit 2137bc6eb9f36f4ba999023d83c637024f3a6e4c +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Jan 14 08:37:30 2005 +0000 + + xc/programs/Xserver/afb/afbbres.c + xc/programs/Xserver/afb/afbbresd.c + xc/programs/Xserver/afb/afbclip.c + xc/programs/Xserver/afb/afbhrzvert.c + xc/programs/Xserver/afb/afbline.c + xc/programs/Xserver/afb/afbmodule.c + xc/programs/Xserver/afb/afbpixmap.c + xc/programs/Xserver/afb/afbpolypnt.c + xc/programs/Xserver/afb/afbpushpxl.c + xc/programs/Xserver/afb/afbtegblt.c + xc/programs/Xserver/cfb/Imakefile.inc + xc/programs/Xserver/cfb/cfballpriv.c + xc/programs/Xserver/cfb/cfbbitblt.c + xc/programs/Xserver/cfb/cfbcppl.c + xc/programs/Xserver/cfb/cfbgc.c + xc/programs/Xserver/cfb/cfbglblt8.c + xc/programs/Xserver/cfb/cfbmap.h + xc/programs/Xserver/cfb/cfbpixmap.c + xc/programs/Xserver/cfb/cfbscrinit.c + xc/programs/Xserver/cfb/cfbtab.h + xc/programs/Xserver/cfb/cfbteblt8.c + xc/programs/Xserver/cfb/cfbunmap.h + xc/programs/Xserver/mfb/maskbits.c + xc/programs/Xserver/mfb/maskbits.h + xc/programs/Xserver/mfb/mergerop.h + xc/programs/Xserver/mfb/mfb.h + xc/programs/Xserver/mfb/mfbclip.c + xc/programs/Xserver/mfb/mfbfont.c + xc/programs/Xserver/mfb/mfbgc.c + xc/programs/Xserver/mfb/mfbmisc.c + xc/programs/Xserver/mfb/mfbpushpxl.c + //bugs.freedesktop.org/show_bug.cgi?id=1114) attachment #667 + (https://bugs.freedesktop.org/attachment.cgi?id=667): Convert afb and + cfb{,16,24,32} to be dlloader-friendly. Patch by Adam Jackson + <ajax@freedesktop.org>. + +commit 61b3c3aef5437f14d413a60da792257b01e9f8fa +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Jan 13 23:07:41 2005 +0000 + + Thu Jan 13 17:45:13 2005 Søren Sandmann <sandmann@redhat.com> + Make sure the pixmap is a valid new resource + Make sure the context is a legal new resource. + Handle null attrib_list. + Handle null attrib_list; copy attrib_list to data; actually allocate the + new GLXDrawable. + +commit 433c38f22fa96486a43dc0c9871cc09875251b34 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Jan 13 20:49:21 2005 +0000 + + Thu Jan 13 15:40:29 2005 Søren Sandmann <sandmann@redhat.com> + Add MMX implementation of non-repeating source IN repeating mask, aka + "translucent window". + Add MMX implementation of CopyArea. + Use MMX implementation of CopyArea. + Use the new implementations. + +commit a303670107f205c6ca76919ca6cd6af6013073f1 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jan 13 01:22:53 2005 +0000 + + Bug #2114: PPC64 Linux build fix: use system definition of eieio(). + Originally Gentoo bug #66223. (Tim Yamin, Donnie Berkholz) + +commit 15895b411779aa3c14ffb92fb58cd8ec24845ea7 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Jan 12 16:10:00 2005 +0000 + + winmsg.c + Introduce function winTrace which prints log message with verbosity 10 + Use winTrace for 3 heavily called functions + +commit 8aabc94596dae0fd4ce2c975de75946685faf2cd +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jan 11 17:33:03 2005 +0000 + + Document the -silent-dup-error switch + +commit b6301dc41090899b20003eab1356bc09fc5eed1a +Author: Egbert Eich <eich@suse.de> +Date: Tue Jan 11 14:59:02 2005 +0000 + + Minor format fix. + Added explanatory comment and debug code. + Added comment. + +commit 27fc6874b34d70a7ddae5ed8f516f6cfaab518b8 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jan 11 12:03:34 2005 +0000 + + Do not grab ALT-TAB when window is in multiwindow mode + +commit d365664c58919edb5e121a7c884384438df79776 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jan 11 11:58:12 2005 +0000 + + Fix crash with not matching definitions of PATH_MAX + +commit 65b893a707ad8b3e4d0971825c05a965dca36d10 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Jan 10 23:38:50 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2167) attachment #1641 + (https://bugs.freedesktop.org/attachment.cgi?id=1641): Fix broken + Solaris print queue enumeration. + +commit c6b5a9431178ac7eb90ec498e6830366865d1268 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Jan 10 18:47:55 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2254) attachment #1659 + (https://bugs.freedesktop.org/attachment.cgi?id=1659): Refix for gcc4.0 + build failure. It seems that the |ExecCommand()| function has no + consumer and can safely be removed. + +commit eb701e9b4481f984fdcfece181126f7424e2bf45 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jan 10 17:54:31 2005 +0000 + + winkeybd.h + Adjust keysyms for Hiragana_Katakana toggle and backslash/underscore on + Japanese and ABNT2 keyboards + +commit 2ef9d01c4d3b03f0a5d829304f2a7e2cc1327f3b +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Jan 10 14:16:29 2005 +0000 + + xc/programs/Xserver/Xprint/Util.c + xc/programs/Xserver/Xprint/attributes.h + //bugs.freedesktop.org/show_bug.cgi?id=2254) attachment #1654 + (https://bugs.freedesktop.org/attachment.cgi?id=1654): Fix gcc4.0 build + failure. Patch by Egbert Eich <eich@freedesktop.org> and Roland Mainz + <roland.mainz@nrubsig.org> + +commit 57387e115caf5a4b9501cc8f6ddeb1946b0e6547 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jan 10 13:13:08 2005 +0000 + + winkeybd.h + winkeyhook.c + Make keyhook feature work in multiwindowmode too Hook windows keys + +commit f417159e51afe22de7d4e6ba9f154313c6af59bc +Author: Egbert Eich <eich@suse.de> +Date: Mon Jan 10 12:20:33 2005 +0000 + + Make option 'DontVTSwitch' work again with kbd driver under Linux. The kbd + driver now calls the OS layer to handle special keys. Possibly other + special keys and other OSes need to be looked at also. (Helmut + Fahrion). + +commit fe4e74241f6791cb1cefdddeb492ed0f56ce99b4 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun Jan 9 17:35:47 2005 +0000 + + xc/programs/Xserver/xkb/ddxList.c + //bugs.freedesktop.org/show_bug.cgi?id=2245) attachment #1647 + (https://bugs.freedesktop.org/attachment.cgi?id=1647): export + Win32System and Win32TempDir remove #ifdef WIN32 block for building + xkbcomp commandline create win32 tempfile in system tempdir use + PATH_MAX*4 for commandline buffer unlink tmpfile again + +commit ba25f7e8dcaa2690ce3eab839904fac034002e0b +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun Jan 9 15:29:45 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2245) attachment #1645 + (https://bugs.freedesktop.org/attachment.cgi?id=1645): cleanup some + #ifdef __UNIXOS2__ and WIN32 blocks. make OutputDirectory check the + size of the buffer quote all file and pathnames in the xkbcomp + commandline use PATH_MAX*4 for commandline buffer + +commit 2410b61f430c3ac4be79043f8b00defe6d53148c +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sun Jan 9 00:38:08 2005 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=2240) attachment #1642 + (https://bugs.freedesktop.org/attachment.cgi?id=1642): Fix incorrect + usage of /usr/bin/tr in startup script (the used "[\n]" is neither + correct or portable, using "\n" seems to be sufficient (this fixes + various "random" issues, including including Debian bug #258419 and + Debian bug #264983). Patch by Drew Parsons <dparsons@debian.org>. + +commit 709a2343a8c12ea7e158c63a9737b11744b50994 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Jan 8 13:01:03 2005 +0000 + + Fix a possible null-pointer dereference (Keishi Suenaga) + +commit d332a909f8b8741af75047d78a62a3d19e0776e1 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Jan 6 21:29:09 2005 +0000 + + Imakefile + InitOutput.c + XWin.rc + winerror.c + wintrayicon.c + winvideo.c + winshaddd.c + Set PROJECT_NAME in Imakefile to create alternative window titles for + Cygwin/X and Xming + +commit d6a74f2c4aec9c914ec0837bd0bf0d212019093f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Jan 6 16:02:47 2005 +0000 + + Imakefile + InitOutput.c + XWin.rc + winerror.c + wintrayicon.c + winvideo.c + Set PROJECT_NAME in Imakefile to create alternative window titles for + Cygwin/X and Xming + +commit 3165236483de936b4ca22f8b6d2d2b8b1a1a4909 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Jan 6 13:24:57 2005 +0000 + + Fix crash with non-nullterminated strings (reported by Øyvind Harboe) + +commit 591ac9c811de0871d3bdcc19cada0ff6715bf67c +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Jan 4 00:16:20 2005 +0000 + + Bugzilla #2211 (https://bugs.freedesktop.org/show_bug.cgi?id=2211) + attachment #1627 (https://bugs.freedesktop.org/attachment.cgi?id=1627): + xorgconfig default keyboard model outdated (should be pc105, not + pc101/pc102) + +commit af8bd7161724b6709ffe582dfd830c05d9bf4f26 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Jan 3 21:32:22 2005 +0000 + + Mon Jan 3 12:45:10 2005 Søren Sandmann <sandmann@redhat.com> + Clean-ups and support for AMD64. Bug 1067. Patch by Nicholas Miell + (nmiell@comcast.net) + Add support for AMD64 + Many cleanups using <mmintrin.h> instead of __builin_ia32_*, and intrinsics + instead of inline assembly. Also unconditionally use pshufw on AMD64. + s/USE_GCC34_MMX/USE_MMX/g + +commit 5f39eff85109a73d006832ad35d9d5b58f93ef0c +Author: Egbert Eich <eich@suse.de> +Date: Mon Jan 3 15:43:55 2005 +0000 + + Added missing return value (Bugzilla #2205) Problem found by Stefan Kulow. + +commit ae6d52092bca6068a7847b3944148336ab489869 +Author: Egbert Eich <eich@suse.de> +Date: Mon Jan 3 15:39:35 2005 +0000 + + Added missing return value (Bugzilla #2206) Problem found by Stefan Kulow. + +commit 83e13e21c8d9a3b54cae2ecc2943be3316659870 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Dec 24 14:40:28 2004 +0000 + + Print error message if CreateProcess fails Simplify popen simulation code + for WIN32 Remove temporary file after executing xkbcomp + +commit 106703edf67139fa52f6810f9ced0ce5ba86a3cd +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Dec 22 18:39:41 2004 +0000 + + Back out the previous day's broken R200 "fix" -- the same number of coords + are always emitted. Fix the real problem, which was not enough regs + being initialized in ati_draw.c. Fix a typo that was resulting in alpha + coming out as 0 * src or 0 * broken instead of src * 1 or src * mask. + Assign the blending results to R0, as appears to be necessary. Unbreak + the dst-alpha-blend-with-no-dst-alpha code. Yow. And set the right DMA + count for the r200 traps code. + +commit 3035739e5b7d5a9042292d64455feb4b38788fe4 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Dec 22 08:28:16 2004 +0000 + + Bug #2123 <https://bugs.freedesktop.org/show_bug.cgi?id=2123> Attachment + #1587 <https://bugs.freedesktop.org/attachment.cgi?id=1587> Call to + uname should not check for return == 0, but for >= 0 instead + +commit fa0677ab43722462042f87c4636a7d59d1cb873f +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Dec 21 09:51:47 2004 +0000 + + Fix r200 render (for real this time?) by setting tex1_comp_cnt right for + non-mask rendering. Reenable it. Also, R200TexFormats was used instead + of R100 in one place. Harmless so far, because the formats were in the + same order. + +commit 4b0247b9e0a6b7f40cd2738fb29d2ed1acba99e7 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Dec 21 09:49:30 2004 +0000 + + Whitespace nit. + +commit 894431412613265fd315cf7a707ffa741f93cf47 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Wed Dec 15 20:51:25 2004 +0000 + + Use snprintf. + +commit eea11301fd9247a28b1daeb340a018c7ea309c41 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Wed Dec 15 15:05:35 2004 +0000 + + Another fix for MiscPassMessage(): Initialize returned "status". + +commit 264c3eefe6c0cdee1ff0a5de914f051ab23026b7 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Dec 15 12:22:39 2004 +0000 + + latest changes from CYGWIN + +commit c7fec26b50f8a64360d1252cdf48370935fb2f76 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Wed Dec 15 00:32:56 2004 +0000 + + Make MISC extention's PassMessage() actually work and fix memory leaks + +commit d0b17bda4dc469e2ce72f4f8965916b316e1deb7 +Author: Egbert Eich <eich@suse.de> +Date: Tue Dec 14 08:59:20 2004 +0000 + + Removed #ifdef'ed out code together with the comment explaining why it was + #ifdef'ed out. + Fixed typo. + Added comment to a changed that's been committed with one of the previous + commits. + +commit 0e6a122316a94c96051f1d832990032a386097bc +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Dec 13 03:42:32 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1695) attachment #1230 + (https://bugs.freedesktop.org/attachment.cgi?id=1230): Fix crash in + Xscreensaver code which allowed any authentificated X client to crash + the Xserver using |XScreenSaverUnsetAttributes()|. Patch by + ajax@nwnk.net + +commit 159e443a2209eb3ea305e84b847b76ef1637d005 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Dec 13 02:13:32 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1688) attachment #1530 + (https://bugs.freedesktop.org/attachment.cgi?id=1530): Fix the current + implementation to make it possible to slow down the mouse pointer or + use arbitrary fractions (without running into rounding error issues). + The change is using the same method of preserving rounding errors that + the exponential method is already using. Patch by Jan Brunner + <Jan_B@gmx.ch>. + +commit f1768677f73150c686cf5678f5f5d63c0cfa8e56 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Dec 12 23:29:20 2004 +0000 + + Reduce vidmode logging. + +commit 9286a5d032ea6bed102db39281c3d2537da4dccc +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Dec 12 22:58:37 2004 +0000 + + Add fix for 460gx pci scan code. + +commit 8266a2581d21a1a2880a0e8babb8b0305c435ec0 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Thu Dec 9 22:40:35 2004 +0000 + + Fix crash with more than one screen reported by John Davidorff Pell. + +commit 081b33d73f73572cfefba7e5489408a7117b6e9f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Dec 8 15:48:15 2004 +0000 + + import changes from CYGWIN branch + +commit 6c317c1c1323bd11292f8f9f179d75c96a18e616 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Dec 8 05:52:20 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #1287 + (https://bugs.freedesktop.org/attachment.cgi?id=1287): Avoid DRI + initalisation when the Xfree86-DRI extension was turned off. Patch by + Kristian Høgsberg <krh@bitplanet.net>. + +commit b9476cd96faf19153c11e3370e9fced8045600f4 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Dec 8 05:48:16 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #938 + (https://bugs.freedesktop.org/attachment.cgi?id=938): Allow more + extensions to be enabled/disabled. + +commit 47935dd7f010f2f77768774ceb6f85667efe4264 +Author: Matthew Allum <breakfast@10.am> +Date: Mon Dec 6 22:29:31 2004 +0000 + + Xephyr on Xorg fix + +commit 8091b301c941473ab99626a6e66f72acdb6750f7 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon Dec 6 21:54:19 2004 +0000 + + xf86Config.c references USE_DEPRECATED_KEYBOARD_DRIVER so define it if + needed when building this file + - bug fix: pointerMsg -> keyboardMsg in auto-configuration code. + - make the 'kbd' driver the default for autoconfiguration everywhere. + +commit cde3a175005104e061c1ff133f07c598868bdc4e +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Dec 6 18:28:12 2004 +0000 + + include windows.h + +commit 9c94971617db11861aed82e16804fc14a9ca1260 +Author: Egbert Eich <eich@suse.de> +Date: Mon Dec 6 15:53:00 2004 +0000 + + Use the same method of finding the screen pixmap of COMPOSITE extension is + compiled in or not. + Removed stale make variable. + Updated xaaWrapper.c: Under certain circumstances the accel path was not + used when possible. Removed some debugging stuff and stale code that + had been commented out. + Check if maps are really installed before attempting to list them. + +commit 4945034792b28d1a222a615404bfceaf48a130c5 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Dec 6 12:26:50 2004 +0000 + + problem with max() macro. this one slipped though again + +commit 531776becf95f66e6e435aad0dc21ead436ff5aa +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun Dec 5 21:33:23 2004 +0000 + + missed another wBOOL issue + +commit 9bd1328c49aafae67a6a6d9fd17063c75d8547a2 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun Dec 5 21:24:48 2004 +0000 + + redone ddraw.h to be able to mix it with w32api style COM header files. + obj_base.h is not needed anymore. Using <objbase.h> instead. + Use Xwindows.h instead of windows.h + do not include win_ms.h + remove extra definition of sleep() + Set HOME to Documents and Settings/username if not set + Use Xming basedir instead of ProjectRoot for system.XWinrc + Fix callback functions to use wBOOL instead of BOOL + Fix compiler warnings. Added debug output. + Fix warning about undefined macro max + +commit bf0a760331e2fe4dbc00e78f87022c7464d9ca4f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sun Dec 5 04:39:34 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=1800): Fix Postscript DDX's 1bit + StaticGray visual to report only 1bit of significant bits in color + specification (instead of 8bits). Patch by Julien Lafon + <julien.lafon@gmail.com> + +commit 44f4713a056b7a6a076b2f65fbed43e0cfe9ff06 +Author: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> +Date: Sat Dec 4 00:43:13 2004 +0000 + + Encoding of numerous files changed to UTF-8 + +commit f264a7ea741f57fbc3bb900cfbb9e0cc23f46e90 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Dec 3 12:04:15 2004 +0000 + + Removed scprintf, aprintf and snprintf stuff and use newXprintf + +commit 16a683f4d164899ecfdafb853f48cff10fd13fd4 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Dec 3 11:57:42 2004 +0000 + + Bugzilla #1865, https://bugs.freedesktop.org/show_bug.cgi?id=1865 Added + X(NF)printf and X(NF)vprintf functions which allocate the buffer with + X(NF)alloc + Bugzilla #1865, https://bugs.freedesktop.org/show_bug.cgi?id=1865 extend + snprintf to work on NULL. + +commit fe2a2213d1db8700f6078379f86ebe8827793c20 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Thu Dec 2 23:47:39 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=1998): Fix Xserver standalone + build when RENDER extension includes are not availabe. + +commit 30a4202f3d59a32fd6f93dfd257d93ee21b68ed9 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Dec 2 21:58:58 2004 +0000 + + Use __printf__ in gcc function attributes to avoid clash with libc wrapper + define, and remove the last bits of the old workaround. + +commit e62d85baa31fc853aefdef49962ad4cb86ae8245 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Dec 2 21:49:54 2004 +0000 + + Remove some of the ifdef WIN32 checks from WaitForSomething + +commit 2782b8871196ef28f9a6c84bf6c8b5086d00d5d4 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Dec 2 14:19:01 2004 +0000 + + Adjust the width of the rootless backbuffer to match 32 bit alignment + Make multiplemonitors default for -internalwm + +commit 3b3e24dc4d89b471d80428dd9ad122f259b1fc81 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Dec 2 13:38:30 2004 +0000 + + Set HasFfs to NO + Fix link order problems with mingw. Add libdix.a after libmi.a. + Pass -DHAS_FFS to compiler + remove inline code for ffs(). It will link to dix/ffs.c instead added + declaration for ffs() + +commit 2620676306d1eccd24a6bf0637a60842656e6f7c +Author: Phil Blundell <pb@reciva.com> +Date: Wed Dec 1 19:43:29 2004 +0000 + + Patch from Florian Boor <florian.boor@kernelconcepts.de>: + Check return value from ts_config. (TslibInit): Likewise. + +commit 96545d038837bbc7dc435ed7c1f631454e86cecb +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Dec 1 14:57:45 2004 +0000 + + Remove code which sneaked in recently. It is not proven to be correct, just + a workaround and disabled by default + +commit 3f063fc49cc2d456359a1b0b9f36f27befdb09b0 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Dec 1 14:16:07 2004 +0000 + + Set XERRORDB environment variable to relocate the XErrorDB file + +commit 908442301478b21febab17e31aa55918eaaa5101 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Nov 30 23:43:33 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=811): Updating generated + Xprt.html which was forgotten during the previous work. + +commit af717ae57dd6c5e6ad41b4142d62cdbb55f13777 +Author: Egbert Eich <eich@suse.de> +Date: Tue Nov 30 08:38:44 2004 +0000 + + Make Xorg the default server to install. + Avoid PIO access on IA64. Some IA64 machine check if legacy ports outside + the VGA range are accessed. The ATi driver however does this to probe + for ISA Mach8/32/64. Since no IA64 has ISA slots this restriction + should not be relevant to the user. + Avoid recursive calls of xf86scanpci(). This function normally detects that + it has been called before by checking if the PCI structure is filled + out. So far if this was not the case (because PCI probing has failed + for some reason) the function is traversed again. With the chipset + specific PCI bus probing this can lead to an endless recursive loop as + the post-probing code calls xf86scanpci() from within this function. + The OS specific PCI code for Linux worked only if bus 0 was populated as it + checked for the presence of /proc/bus/pci/00. Fixed to check for + /proc/bus/pci/<bus_to_look_for> instead. + +commit 59ccc6465ca15e046ad11362ae5fbb3c71d2c148 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 29 12:34:55 2004 +0000 + + Fixed windows.h include for cygwin. + Bugzilla #1945: Stop unnecessary reordering. + +commit df2f2ff5a4ebf6c5289da64bf3f572341a0f7656 +Author: Phil Blundell <pb@reciva.com> +Date: Sun Nov 28 23:20:17 2004 +0000 + + Re-read "fix" structure from kernel after mode selection, in case line + pitch has changed. + +commit 6062f6a6e7b3c444a35e3f11b2541df2aa0066a2 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Thu Nov 25 22:42:51 2004 +0000 + + xc/programs/Xserver/Xprint/Imakefile + xc/programs/Xserver/Xprint/Xprt.html + xc/programs/Xserver/Xprint/Xprt.man + //freedesktop.org/bugzilla/show_bug.cgi?id=811): Add missing manual page + for "Xprt" (DocBook master file (Xprt.sgml) and the generated files + (Xprt.html, Xprt.man). + +commit cbce4cf96dfa2eeecb253d73d7d9acecbc52ad67 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Nov 25 12:48:21 2004 +0000 + + Bugzilla #1914: fix size limit for -fp argument + +commit 2b75c19ea2bb76512d51e99c5c9ecb073fdb9163 +Author: Matthew Allum <breakfast@10.am> +Date: Wed Nov 24 17:50:50 2004 +0000 + + minor Xephyr fix + +commit a96254234fc9410944406f6ae878815cd3cfcee3 +Author: Matthew Allum <breakfast@10.am> +Date: Wed Nov 24 17:08:06 2004 +0000 + + XEphyr -parent switch fixes + +commit a7a07d0c71aa3f2e224cceea7e8d8348523136ee +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Nov 24 16:56:03 2004 +0000 + + Finally the multiwindow mode defines a default cursor + +commit ca4da62478a3ad86ab087245bf8eb7d7fadf31de +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Nov 24 09:07:58 2004 +0000 + + Add <sys/types.h> include to unbreak build on FreeBSD. + +commit da3df7522d15855fa871c45f3b8db23e7c639a44 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Nov 24 02:45:33 2004 +0000 + + Remove this file and all references to the binary expiry code. + Remove old obsolete include/extensions/damage.h. + Include srvrv_ctrl(xfree86) in macintosh US XKB symbol file so VT switching + works again on mac (#1872). + Remove out of place #define's of printf to xf86printf. This definition + should only be in xfree86/os-support/xf86_libc.h + +commit 9a26d6f39e199bad287d4e538ef75700a0102788 +Author: Thomas Hellstrom <unichrome@shipmail.org> +Date: Tue Nov 23 17:29:47 2004 +0000 + + Bugzilla #1883 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1883): Fix + insufficient SHM detection in XvMC local test. Removed reference to + getpagesize() which caused linking problems on s390. Reported by Stefan + Dirsch <sndirsh@suse.de> + +commit fec868bf0f67a8f62fc69d55e2ff72b6cacea6f8 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Nov 23 17:10:55 2004 +0000 + + //freedesktop.org/bugzilla/show_bug.cgi?id=1204): Fix X11 test suite + (caused by DAMAGE layer) failure with Xvfb when rendering text using + |XDrawText*()| (XDrawText() tests 1, 3, 4, 27, 28, + 29, 30, 34, 37, 39, 41, 43 and XDrawText16() tests 1, 3, 9, 10, 11, 12, + 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 34, + 37, 39, 41, 43). Patch by Hong Bo Peng <penghb@cn.ibm.com> and Stefan + Dirsch <sndirsch@suse.de>. + +commit b09f2a0495071a068c2b6b36084c974acf7aab9b +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 22 16:04:04 2004 +0000 + + Windows does not have ffs() implementation. added one + Enable RootlessSafeAlpha and RootlessAcceleration for the Windows port too + +commit bb43f234c5d418e064c89b928b81b53987f14e92 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 22 15:00:04 2004 +0000 + + Use GetTempPath for finding a place where to store temporary files on + Windows + +commit bc7493801d1f5177d9ba3fe09accc2a2d72cfe3d +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 22 14:28:25 2004 +0000 + + Fixes for building multiwindow and internalwm on mingw + Changed some debugging output + +commit 255c3c0e8ca0f402b2c327d70c8a254ba65eda03 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 22 14:12:33 2004 +0000 + + Xming: Place logfile in users tempdir + +commit 0f7874cbfc01da339cc6be221351ddffdb37805d +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 22 13:23:25 2004 +0000 + + Use a simple hashtable as ConnectionTranslation instead of a plain array on + Windows because socket fds are not sequential and do not start at 0 + +commit e6bc551e3451efe4fcbb55475d6d0ff53fcc9807 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 15 18:13:41 2004 +0000 + + Use CreateProcess instead of system() to spawn xkbcomp on windows. system() + can not handle spaces in the path component. Quoted all filenames on + the commandline. + +commit 6618567311f41f5e237f12b4204aa32ce174a514 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 15 15:58:51 2004 +0000 + + Remove override of HasSnprintf + +commit 9826b83826190e514ed115e15691ca015780f9bc +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Nov 15 15:06:51 2004 +0000 + + Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added + mingw (Win32) port + +commit cecb668149e1956fb29bc89855182349122e2f4e +Author: David Reveman <c99drn@cs.umu.se> +Date: Sun Nov 14 23:21:29 2004 +0000 + + Add xglPixmapToRegion + +commit 343f965749af0a985573c525dc6084c2519b6ffe +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Nov 14 17:29:56 2004 +0000 + + Fix typos in output file. (Bugzilla #1849, reported by Yi Ren-Chen) + +commit 636a9e786881dd42cd6fd579e13b7895cf9f10eb +Author: Phil Blundell <pb@reciva.com> +Date: Sat Nov 13 18:03:16 2004 +0000 + + Don't leave stale pointers hanging around after ts_close(). (TslibFini): + Likewise. + +commit 36d9e01c0d36eaf0d9cb1e77dd2908b09d55a35d +Author: Phil Blundell <pb@reciva.com> +Date: Sat Nov 13 16:41:00 2004 +0000 + + New global variable. (KdProcessArgument): Set it to TRUE on -nozap switch. + (KdUseMsg): Add help for -nozap and -rgba switches. + Declare. + Honour dontZap flag. + +commit 3b0dce3620e4cce74c3a2c7f9077cc28be11740d +Author: Thomas Hellstrom <unichrome@shipmail.org> +Date: Sat Nov 13 11:09:23 2004 +0000 + + lib/XvMC/Imake + Added support for automatic loading of the correct hardware XvMC driver. + This involves a protocol extension of the XvMC protocol. The XvMC + revision number was bumped. + +commit a97548b1c9bb69b5824609c1da1ad66c3a9c5065 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Nov 11 20:10:28 2004 +0000 + + Cosmetic fix to make xf86pciBus.c use standard min() macro. + +commit e5040e24f03a2fe770139e6f37acef3da48aa0f9 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Thu Nov 11 16:09:58 2004 +0000 + + oops commited wrong version previously + +commit e380fd548ed5452d08184723145dd992ad72288c +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Thu Nov 11 15:44:31 2004 +0000 + + update shared lib revisions on OpenBSD (Bug #1828). + update references to xf86site.def in comments (Bug #1827). + fix kbd driver for wskbd protocol and pure wscons console driver (Bug + #1825). + don't add '-4' to generated default file name (bug #1826). + typo in resource name (XFree86 bug #1300, X.org bug #1825) + +commit d7f46f71d892768ea85552a0d5458b69b561fe21 +Author: Matthew Allum <breakfast@10.am> +Date: Thu Nov 11 14:55:30 2004 +0000 + + Xephyr grab fix + +commit 2854fa438ff721637f2e53fbafa141b3db8a9082 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Nov 9 17:06:15 2004 +0000 + + Bug #557: Don't use "bool" as a variable name in xf86cfg, to avoid compiler + bugs. (Donnie Berkholz) + +commit 367b963b6333ee58e197845f1389a95ff26f108e +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Nov 9 15:58:41 2004 +0000 + + Bug #1765: Add support for R_ALPHA_SREL32 relocations in elfloader. + Originally Debian patch + 202_alpha_elfloader_support_R_ALPHA_SREL32.diff. (Falk Hueffner) + +commit 50cdff7ee2a1b448da24e85efae02237cff9b6b7 +Author: Matthew Allum <breakfast@10.am> +Date: Tue Nov 9 11:36:49 2004 +0000 + + Xephyr improvements + +commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 +Author: Matthew Allum <breakfast@10.am> +Date: Mon Nov 8 22:39:47 2004 +0000 + + Add support to Xephyr for lower depths than hosts + +commit e494e24c508b34b144355cb380aac16abf2fb891 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Nov 6 11:56:57 2004 +0000 + + Wrap all mwextwm and internalwm code with XWIN_MULTIWINDOWEXTWM + +commit 16ee24cd994fa3f8d479c972f18c8207a5116cb7 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri Nov 5 19:51:38 2004 +0000 + + Use ROOTLESS instead of platform specific defines. + +commit 64c7f8e667eef955b266c359291206c7188ce20c +Author: David Reveman <c99drn@cs.umu.se> +Date: Fri Nov 5 13:26:07 2004 +0000 + + Use UTF-8 encoding in Xgl sources + +commit 1d994e1d14225c1dec5251edeae40e24923a31c6 +Author: David Reveman <c99drn@cs.umu.se> +Date: Fri Nov 5 12:46:29 2004 +0000 + + Use negative strides in Xgl if pixel data have bottom-top scanline order + +commit 2dd76d646c517e1988897692e9ff8b6194d25c87 +Author: David Reveman <c99drn@cs.umu.se> +Date: Thu Nov 4 23:19:13 2004 +0000 + + Add working Xgl server code + +commit 1aef1060647d22b676a29f6dcf1ac54f9fe7ff5d +Author: Kensuke Matsuzaki <zakki@peppermint.jp> +Date: Thu Nov 4 11:52:22 2004 +0000 + + Add InternalWM mode. + +commit 522c878fca3bfe97cd408e37065f827c004faa04 +Author: Egbert Eich <eich@suse.de> +Date: Tue Nov 2 08:54:53 2004 +0000 + + Removing unneeded private FreeType2 symbol. + Updating to EDID 1.3. (Bugzilla# 1490, Jay Cotton, Egbert Eich). + Removing unneeded code. + Fixed KGA handling for i810. KGA handling for chips derived from C&T chips + is slightly different. The changes make the code consistent with the + C&T (chips) and i740 drivers. + +commit 1074992c285835ca9d96d11e8352bbe2cdbc2a28 +Author: Egbert Eich <eich@suse.de> +Date: Mon Nov 1 16:05:27 2004 +0000 + + Fixed sig11 which occured when calling a CloseDisplay() after + XScreenSaverSetAttributes() followed by XScreenSaverUnsetAttributes(). + Caused by missing FreeResource() in XScreenSaverUnsetAttributes(). + Removing unused DDC sections that caused misinterpretation of DDC data due + to a missing break statement in a switch. + Fixed typo: #if <-> #ifdef. + +commit 7e588ba9abdcc2078b6c361c81806337b8ff0827 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Oct 30 20:33:43 2004 +0000 + + Add -d flag for compilers like the Sun C compilers that produce dependency + lists themselves. To use with the Sun compilers, add to host.def: # + define UseCCMakeDepend YES # define DependFlags -cc $(CC) -d -xM (Sun + bug id #4245688 - fix by Alan Coopersmith) + Add Solaris to the platforms on which mprotect is run to set execute + permissions when necessary. (Sun bug id #6175128 - fix by Alan + Coopersmith) + Internationalize digital output (Sun bug id #4119396 - fix by Steve + Swales), add -bgpixmap option to set XPM file as background (originally + from STSF project version of xclock by Alan Coopersmith) + xc/programs/xmodmap/handle.c,pf.c xmodmap was printing line numbers which + are one too low in error messages (Xorg bugzilla #1739, Sun bug id + 4637857 - fix by Sam Lau) + +commit 612bd1c27322a69a98b59193e7d31501688359bd +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Fri Oct 29 02:07:15 2004 +0000 + + Add facility for catching signal 4 from driver. This can be used to check + for OS SSE support. (Part 2) + +commit 09fdfaa28d2afe33dfadd4293b39a34da268fbdb +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Fri Oct 29 02:06:17 2004 +0000 + + Add facility to catch sig 4 from driver. This can be used to check for OS + SSE support. (Part 1) + +commit b0185a4bf77a668e65e94197bdb13331680521c7 +Author: Thomas Winischhofer <thomas@winischhofer.net> +Date: Thu Oct 28 22:12:23 2004 +0000 + + Add xf86[GetGammaRamp|ChangeGammaRamp|GetGammaRampSize] to symlist in order + to allow drivers to use them + +commit 9d4823adc8319a20d2ace3d0944ca32e300f6eeb +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Oct 28 14:23:08 2004 +0000 + + Import recent changes from CYGWIN branch + +commit db65fce04ddec1dac0d92ad3abc95ab4996bd206 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Mon Oct 25 19:09:11 2004 +0000 + + Fix rootless Cygwin crash due to acceleration code illegally modifying a + const structure (Reported by Kensuke Matsuzaki). + +commit a57e85b52357f15f52e81c8d9b310a76e0c62b3f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Oct 25 07:12:21 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1664 - RFE: Add + support for the DOUBLE-BUFFER extension to the Xprint server and DDX. + Additionally a "pixmap-scrubber" optimisation is added to the + PostScript DDX to remove all content from a vector pixmap when a + |PolyFillRect()| call covers the whole pixmap surface with a solid fill + (this avoids that a backbuffer vector pixmap gets constantly filled + even when the content is not visible anymore after |XdbeSwapBuffers()| + has cleared the hidden buffer with the background color). + +commit e0cc4871491ab7a8c52749ff2c077d8f11516b15 +Author: Phil Blundell <pb@reciva.com> +Date: Wed Oct 20 18:06:58 2004 +0000 + + Add epson. + Build Makefile in hw/kdrive/epson. + +commit 258c9016a0c966187a81f9d956766791d6e8c505 +Author: Phil Blundell <pb@reciva.com> +Date: Wed Oct 20 18:02:32 2004 +0000 + + Block SIGIO before disabling input fds. (KdEnableInput): Unblock it after + enabling them again. + +commit cbd5fbcb7e5b802cbcff317fdc2f848043207690 +Author: Phil Blundell <pb@reciva.com> +Date: Wed Oct 20 08:20:51 2004 +0000 + + Import Epson 13806 driver from Costas Stylianou: + New files. + +commit 0584d92b36910d42e4fba96cee5f3380eeb3b493 +Author: Egbert Eich <eich@suse.de> +Date: Mon Oct 18 14:21:46 2004 +0000 + + Made handling of DevelDrivers for x86-64 more conformant to other + platforms. + Compress all font encodings (Stefan Dirsch). + Fixed warnings. + Turn on forwarding XNSpotLocation event to XIM server in OffTheSpot and + Root mode (bugzilla #1580, James Su). + Added another compose key combination for the Euro symbol (Stefan Dirsch). + Added support for UTF-8 in ja_JP, ko_KR and zh_TW locales (Mike Fabian). + Changed default encoding for ru from KOI8-R to ISO8859-5 (Mike Fabian). + This is the encoding that is also used by glibc. We may break other + libcs - lets see who complains. + Added explanation for DESTDIR to install to a different directory than /. + Added some early bailouts to atiprobe if PCI structure pointer is NULL to + prevent sig11. + XV support doesn't depend on 2D acceleration any more. This patch removes + this limitation from the NSC driver. This is a patch that I have + committed to XFree86 a while ago but never ported over to X.Org. + Matthieu Herrb contributed some build fixes. + Fixing SetDPMSTimers() so that DPMS*Time == 0 disables the appropriate + timer. This takes advantage of the fact that TimerSet() with a timeout + argument 0 behaves like TimerCanel(). + Use /dev/xconsole (named pipe) or devpts for system logger (Werner Fink). + Create missing links for backward compatibility to XFree86 (Stefan Dirsch). + Changed comment to mention xorg. + Changed cursor for the 'kill' action from XC_draped_box to XC_Pirate. If + you don't like it we can change it back (original author unkown). + Added 'pic' to the man page rendering command pipeline (Werner Fink). + Added missing return value (Stefan Dirsch, Roland Mainz) + +commit 77dab254402073bf96234a6b1056b2277578a976 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sun Oct 17 20:29:35 2004 +0000 + + - Add interlaced support to S3 driver (bug 332, Leo Savernik) + - EmulateWheelTimeout (bug 323, Mathias Fröhlich) + - single button double-click (bug 322, Rob Brown) + +commit 9a0cf1eb43878308c0a83e4f935933b647edc6d5 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Oct 17 10:46:14 2004 +0000 + + Remove some remaining AMOEBA specific code. + +commit 5505555c15bfa2de1f596ae0997335fdbf07eb5a +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Oct 15 22:29:40 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1647 - Fix the + problem that |XpSubmitJob()| returns a random value (patch by Stefan + Dirsch/SuSE). + +commit 60caca718d23012c4c85ce70547610fe05168342 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Oct 15 22:08:38 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1646 - Fix the + problem that |PsCreateColormap()| returns a random value (patch by + Stefan Dirsch/SuSE). + +commit 4782b2f7c10708f9662d9fc743c692d0bec85743 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Oct 15 21:43:31 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1637 - Fix + problems in oid code which may cause the usage of an invalid string + pointer (original patch by Egbert Eich). + +commit 881b5756dc96dc33f6966ec6fccd324f63559dc2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Oct 14 23:10:30 2004 +0000 + + Bug #1628: Convert xf86{BusToMem,MemToBus} to PIC code, eliminating a text + relocation and enabling the server to be built as a + position-independent executable. (PaX Team) + +commit a0251ee285e1f1e28d06927d8ab7d35d59fda607 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Thu Oct 14 02:20:52 2004 +0000 + + Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1629 - Fix crash + on AMD64, regression caused by bug 1496 ("Xorg Xprt does not support + "*xp-listfonts-mode: xp-list-internal-printer-fonts" to toggle the + usage of printer-builtin fonts"). + +commit 3a055ea35b687e381da4d729dbdd0ebac47f673b +Author: Vladimir Dergachev <volodya@mindspring.com> +Date: Wed Oct 13 23:02:42 2004 +0000 + + Modified: + xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c + xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.h Squash annoying warning + about fi1236_dump_status + +commit 3364e7fbd44537b98212820fb2b1941abf0d5ef3 +Author: Egbert Eich <eich@suse.de> +Date: Tue Oct 12 19:13:43 2004 +0000 + + Set fbdev mode as the default mode on PPC (Olaf Hering). + Added support for IBM space saver keyboard (Stefan Dirsch). Added support + for Cherry CyMotion Master XPress (Marcus Schaefer). + Change order of SetDisplayDevice(), HWRestore(), UnbindGART() and + RestoreBIOSMemSize() to be exactly opposite to the Save procedure in + EnterVT() (Matthias Hopf, Alan Hourihane). + Fix text mode restauration by removing the assumption that the register + which determines which head is programmed is set. to the active head by + the BIOS (Mark Vojkovich). + When I wrote the resource code 5 years ago I made some assumptions which + turned out to be false: I've assumed that the bus number of the PCI + hostbridge would be the PCI bus the bridge links to. This is not + correct. Fixing this assumption is not easy. However I hope that the + attached patch will make the system work regardless as it 'ignores' + host bridges from which the target bus is not known. This should not + matter at all as we really don't care about host bridges (unless we + have bridge specific code which retrieves information about the + bridge). + Fixed server crash on reset when a structure allocated in PreInit() was + freed on CloseScreen(). + Fixed ring buffer lock ups that happened because the structure that + contained ringbuffer data was not zeroed after allocation. + Fixed numerous warnings due to signed unsigned comparisons. + programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c: + (NVBacklightEnable): Changed the order in which the sequencer registers + and the backlight control registers are written. The sequencer control + register need to be written first otherwise DPMS screen blanking + produces vertical bars on a mobile device. lib/Xau/Imakefile: Build + libXau static library PIC so it can be linked into toolkits that would + like to wrap its functionality. + +commit 4ab7d316eceb23c81c1b208f9291750cf6b37513 +Author: Egbert Eich <eich@suse.de> +Date: Mon Oct 11 09:58:04 2004 +0000 + + Improving DPMS handling on VT swich and server termination/abort: previous + version called the driver directly and too late. + Unblank secondary screen explicitely. Don't rely on the value read during + register save as the BIOS have blanked the secondary head. + Checking if server isn't switched away before calling sync. Sanity check + for possible bugs in aother areas of the code. + Fixing default amount of of allocated video memory from AGP for i810: Use + 16MB if less than 192MB are installed else use 24MB (Matthias Hopf). + +commit ca1fda2a3f674a6d59de236612c7077387738ec3 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Oct 10 17:48:43 2004 +0000 + + programs/Xserver/Xext/saver.c Fix for XFree86 bugzilla #1224. + +commit fa9847aeb9094aafc3798aee1fc8379e77a18d6a +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri Oct 8 00:35:08 2004 +0000 + + Allow rootless implementations to override frame reordering. This is used + on Mac OS X when genie-restoring from the Dock to ensure that the + animation completes before drawing the frame. + +commit d737bc3300cf1847bcea08ca781f37ee3ee62692 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Oct 5 17:28:15 2004 +0000 + + Make xorgconfig ask again instead of giving up and throwing away all your + answers when you give a bad file name or bad amount of video RAM. (Sun + bug id 5070654 - Derek Wang) + +commit 75217be88ccb87a54c84e31697ffb98b5f9b8e0a +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Oct 4 05:34:32 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=661 - Xprt + producing spurious characters in PS output when using the bitmap cache + (Originally reported against Solaris Xprt as Sun bug id #4369307, and + fixed in Solaris by Jay Hobson. + +commit 658b4ed81f777df2d8b9f47904de90bde1897113 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Oct 4 05:04:14 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1299 - Add more + visuals to the Postscript DDX (8bit GrayScale/StaticGray, 1bit + StaticGray and the basic infratructure for "deep" visuals with more + than 8bits per RGB gun). + +commit e622b346113f65788110777d7d1b5fc436600a4d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sun Oct 3 23:29:21 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1496 : Fixed Xprt + font handling which did not support "*xp-listfonts-modes: + xp-list-internal-printer-fonts" or "*xp-listfonts-modes: + xp-list-glyph-fonts" to toggle the usage of printer-builtin and glyph + fonts in XListFonts*(), XLoad*Font(), etc. Additionally the Xprint DDX + now explicitly list "xp-listfonts-modes" in + "document-attributes-supported" (for document-level) or + "xp-page-attributes-supported" (for page-level) when the DDX implements + this feature (as described in the CDE DtPrint specification). + +commit 8b2f127ea0db2c7fee223b69f4fceee0427fb2e4 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sun Oct 3 15:34:33 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1416 - Fix Xprt + PostScript DDX crashes when copying offscreen pixmap content to the + same pixmap. + +commit 7b27bf869dcf02bccf730706fc451c6f4c72b1f0 +Author: Vladimir Dergachev <volodya@mindspring.com> +Date: Sun Oct 3 15:01:31 2004 +0000 + + Modified: + xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.c Make sure formatting + style is consistent within a single function. MT2032 functions are best + be in separate file anyway. + +commit 4046653cb63f4cd752212e7cf65fad5408d8f5b8 +Author: Vladimir Dergachev <volodya@mindspring.com> +Date: Sun Oct 3 14:38:31 2004 +0000 + + Modified: + xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.c Fix compilation with + gcc 3.4.x Cleanup xf86DrvMsg noise. + +commit ebe7b3fe160259b6f19fe760d6ff4f5bb1dd4b72 +Author: Vladimir Dergachev <volodya@mindspring.com> +Date: Sat Oct 2 01:35:33 2004 +0000 + + xc/programs/Xserver/hw/xfree86/drivers/i2c/*_module.c Change version + strings to XORG. + +commit 0d474149f1cb68a60927529f6eac611a12acf5e6 +Author: Vladimir Dergachev <volodya@mindspring.com> +Date: Thu Sep 30 22:58:07 2004 +0000 + + Initial code from GATOS. This needs to be cleaned up, for example the bt829 + code is practically untouched since xatitv (which was a standalone test + program). However, it all worked and was debugged over long period of + time, so I prefer to to mess with these for now. + New drivers: fi12xx (including MT2032 - this would be be split off later). + tdaXXX msp34xx bt8xx + +commit 1dfafe2aeec864a9bdfd6da3324243b2be8e3a62 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Sep 29 04:17:44 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1489 - Use |long| + instead of |int| for BIGREQUESTS commandline option. + +commit de89181444a2f2258a446fe20a25e37fd225a568 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Sep 24 02:11:14 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1453 - Fix spaces + in usage output for BIGREQUESTS extension (option "-maxbigreqsize"). + +commit 884cb060eea2b914191c269a0c9955ed83d07ff9 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Wed Sep 22 23:52:39 2004 +0000 + + Update XDarwin project to Xcode 1.5 format and remove unused + QUARTZ_SAFETY_DELAY code. + +commit 35a3bf13a8be96bb29dce32399c3684c6baa527d +Author: Torrey Lyons <torrey@mrcla.com> +Date: Wed Sep 22 23:38:33 2004 +0000 + + Add option for XDarwin to track system keyboard layout changes as they + occur (John Harper and Torrey T. Lyons). + +commit 1b3fa4d53b287cbe9d38c5f8c9fbbc2298690959 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Wed Sep 22 22:52:03 2004 +0000 + + Warning fixes. + +commit de68a3339b9f19630e29a17773cad060b1f65300 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Sep 22 17:20:56 2004 +0000 + + Allow overriding DPMS defaults (timeouts & default for on/off) from + #defines/-D options. + programs/Xserver/hw/xfree86/common/xf86DPMS.c Use defaultDPMSEnabled global + for the default state of DPMS if not set in any config files. + programs/Xserver/hw/xfree86/os-support/sunos/solaris-sparcv8plus.S Add + support for required assembly inline functions for Sun compilers on + Solaris/sparc. + Add support for Solaris/sparc libraries. + +commit d7514b9162648f894211884b199ef2edc458aa86 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Sep 22 04:38:03 2004 +0000 + + Bug #1252, #1253, #1255, #1256: Various typo fixes from Dave Jones. + +commit 269012e6014d7c23bf6805ba14ca0b598cdd6313 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Tue Sep 21 22:01:14 2004 +0000 + + Add offscreen GLX direct rendering with XDarwin's xpr backend (John + Harper). + +commit 0514f8b65616d8878000764485e71384b71e3860 +Author: Egbert Eich <eich@suse.de> +Date: Tue Sep 21 17:57:36 2004 +0000 + + Merged over libXpm security fix provided by Chris Evans, Matthieu Herrb and + Alan Coopersmith from release 6.8.1. + Fail during initialization with error if font/fontset is not set for + widget. This prevents a sig11 later when the non-existent font/fontset + structs are referenced. + Check if xf86Info.kbdProc pointer is really set before calling it on abort + as this pointer won't be set if the new modular keyboard driver is used + (Matthias Hopf). + Added new libs to the bindist control files. + Removed inclusion of unnecessary kernel header on Linux. This may fail in + an -ansi environment. + +commit 814b74662103710665c0b5659a93974ad609276c +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Sep 20 08:44:54 2004 +0000 + + Bugzilla #1402: The last patch was broken on linux. Take definition of + badSysCall out of the OS specific block. + +commit b600fcda38f4ab4796b5536cbedc5dee1abd25b1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Sep 20 03:12:00 2004 +0000 + + Fix the R200 Render code. Composite and Trapezoids are now supported just + as well as on R100. + +commit 908287addaff10a0f5f6f14bf06a9b85870737ec +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun Sep 19 12:59:52 2004 +0000 + + Bugzilla #1402: fix BigFont extension if SHM is compiled in but not + working. Does not access SHM and privates if the SHM syscall failed + during extension initialization. + +commit 90ff3688cdc0c2c1b5ccdbd9cc0659b9a355e85f +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 19 10:57:31 2004 +0000 + + Unbreak the AGP DRI case. That was quite a pile of broken code. + +commit 9297c6149f83de22395503c484a2ca65dbffaf6b +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat Sep 18 23:18:35 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1404 - Fixing + random crashes (like in DAMAGE code etc.) in Xnest due uninitalised + GetWindowPixmap. Original patch by Alexander Gottwald + <ago@freedesktop.org> + +commit 6344bb51e2a97d9678cec2ec1dab19abfe9d9e8d +Author: Torrey Lyons <torrey@mrcla.com> +Date: Sat Sep 18 00:38:30 2004 +0000 + + Bugzilla #1032: Make rootless acceleration functions compatible with + Damage. + +commit cedb9a8d62df3391fd89a8b05a2dd64bd098a7df +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri Sep 17 21:57:26 2004 +0000 + + Update Apple's list and hash utility routines to latest versions (John + Harper). + +commit b56f4532d1a5febb8df45da0e3d3ad7bf8838e5f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu Sep 16 13:22:52 2004 +0000 + + Remove code which prevented the use from specifying the window size in + nodecoration mode. + +commit c4083511acd1d0f20a242b8cd3ed62629629ce8f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Wed Sep 15 17:58:50 2004 +0000 + + add support for mice with more than 3 buttons and one scroll wheel (Chris + B) + +commit 516f452e78170bc643117a71bd2246a83b071316 +Author: Egbert Eich <eich@suse.de> +Date: Wed Sep 15 09:23:59 2004 +0000 + + Adding support for OS dependent probing of IA64 chipsets. Not all IA64 + chipsets can be probed without OS support as probing them is only + possible using ACPI. One example of this are the HP ZX1/2 chipsets: + previously the code assumed that these chips were present when no other + of the known chipsets could be probed. This assumption brought SGI + Altrix machines with 64 CPUs to a grinding halt. + +commit a3aa6a2d865239c5b8f29cbd849ae3288e36b8a9 +Author: Egbert Eich <eich@suse.de> +Date: Wed Sep 15 09:05:22 2004 +0000 + + Unregistering events in XSelectInput() when unregistering IM filter + callbacks may be a bad idea as others may be interested in this event. + Removed the call to XSelectInput() altogether as we are in root window + anyway (Lubos Lunak). + Fix size of a variable that gets assigned the value of SmartScheduleTime + (long) to long. This should help to prevent smart scheduler lockup on + 64 bit systems due to overruns (Andreas Schwab). + +commit f642fc729b481c55073c75beca301b2f17881179 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Sep 14 23:21:22 2004 +0000 + + Refix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1361 - RFE: Allow + enabling/disabling of more extensions (fixing duplicate symbols caused + by previous checkin; attachment #899) + +commit 0d95bdfbabf4c526f6f54d6f1de8811f4e6d5d5f +Author: Phil Blundell <pb@reciva.com> +Date: Tue Sep 14 23:08:10 2004 +0000 + + Only set screen parameters if resolution has changed from current values. + Patch from scoony@noos.fr. + +commit ba3b6fd23be5f1f900fcff57bc586e08bc524e99 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Sep 14 06:26:54 2004 +0000 + + Add proper PCI/AGP detection, based on Mike Harris's code for Radeon, but + using the MMIO mirror of the bits instead of config space. + +commit d9df39ee2b5b462be87718046b16d30c231563ec +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Sep 14 00:51:25 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1361 - RFE: Allow + enabling/disabling of more extensions + +commit 80dc84d067c5af29e33a0c7ac62eecc8ba4e0871 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 12 23:22:31 2004 +0000 + + - Fix a segfault on VT switch with DRI. Still dies due to cursor allocation + troubles. + - Move the RemoveBlockAndWakeupHandlers to match + RegisterBlockAndWakeupHandlers. + - Enable R100 trapezoid "acceleration" when DRI is working, so that it can + be exposed and worked on. + +commit ab50679aabdda9e6197568f745d02fe1e65c7a24 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 12 23:01:24 2004 +0000 + + Fix a bad argument missed in the previous commit for ATIDRIDMA* functions. + +commit 2d069b1d1950b5f6f9140e5573e349e6559251e6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 12 22:21:12 2004 +0000 + + Move the RegisterBlockAndWakeupHandlers to before DRI initialization. The + change to use that instead of manual wrapping made the DMA dispatch + come after the lock had been dropped, causing lots of pain. + +commit 27b5a65f05c78a0b6de0d0ace4f4275d990cc3a4 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 12 20:31:39 2004 +0000 + + Reset the CCE/CP on engine reset, and make the ATIDRIDMA functions take a + more useful argument. + +commit fcd52d276f0276490ef08af2f0d6c52ed631f130 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 12 20:19:15 2004 +0000 + + Add missing kaa.h include for kaaInitTrapOffsets. + +commit b5d406e8c84d8aba2b45e985e43d02c2e6770019 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 12 20:02:10 2004 +0000 + + Fix handling of is_agp. is_agp is whether the card is actually AGP, while + using_agp should say whether AGP is being used as part of DMA/DRI. + +commit 7cab70d1cb7298035429dd8953e521a31fc6770d +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Sep 12 19:52:51 2004 +0000 + + Improve error handling, especially in the DRI case. Do some FatalErrors + instead of ErrorFs for things that are really bad, and put limits on + some loops. Now, sometimes instead of hanging the entire system, we + (mostly-) cleanly drop to console when the card has hung. + +commit 0cd662ea80579c317d706ebe04971bb29d0f9b4f +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Sep 11 09:28:19 2004 +0000 + + - Add disabled WIP trapezoid code for R128 and R100. The R128 rendering is + not doing an add of 1 per triangle like I hoped, and instead seems to + be saturating all the pixels or something. The R100 acceleration + renders pretty well, with some gaps. Note that both are slower than + software due to lack of DMA to submit vertices. + - Mostly fix R128 and Radeon transform support, including supporting + bilinear filtering on R128. Subpixel offsets are still probably an + issue (reported by rendercheck), but I want to make 100% sure about my + understanding of the protocol before changing everybody, including fb. + - Add support for dst formats without alpha to R128 Composite. + - Remove the R128 Blend code, which has long outlived its usefulness. (I + kept it around for one reason: It could be useful for the w/h > 1024 + case with no mask and a non-src op. That seems pretty infrequent and + not worth the trouble). + +commit 396100dd235105a0e2c9013f1e07e4dae0cc3404 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Sep 11 09:23:12 2004 +0000 + + - Don't require Imrecise mode for Trapezoid acceleration. It looks like we + might be able to do Precise in hardware, so leave it up to the driver. + - Add a helper function for computing a set of offsets for smooth trapezoid + rasterizing using many sharp trapezoids. + +commit 501dcf37aac4ec9298e8c79ca65c048c362bce31 +Author: Matthew Allum <breakfast@10.am> +Date: Wed Sep 8 11:31:49 2004 +0000 + + cursor fixes + +commit 20918ab480c8c8285a68e9f974b0208a18acec94 +Author: Matthew Allum <breakfast@10.am> +Date: Tue Sep 7 19:00:04 2004 +0000 + + avoid ephyr breakage when tslib enabled + +commit 8bf6ea903be4c052c747e3e81fc977155072299d +Author: Matthew Allum <breakfast@10.am> +Date: Tue Sep 7 12:44:19 2004 +0000 + + fixes to Xephyr debug mode + +commit b3322257815ec4550e1634453167535b02c1bfbd +Author: Kevin E Martin <kem@kem.org> +Date: Fri Sep 3 23:41:21 2004 +0000 + + Update formatted docs. + +commit b2135e589baeb2ea26da50b9167feaea23bcce3c +Author: Kevin E Martin <kem@kem.org> +Date: Fri Sep 3 16:18:23 2004 +0000 + + First set of documentation updates. + Include more correct fix for rootless interaction with damage (Bug #1168, + Keith Packard). + +commit d7fef52254126aa5897a5c58faeda1f61d5b13d8 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Sep 2 04:04:47 2004 +0000 + + Workaround for servers using rootless layer with damage (Bug #1168, Torrey + T. Lyons). + +commit 0e56515aa3ebc5ee8cc33213fb22b69bb4b3a0da +Author: Kevin E Martin <kem@kem.org> +Date: Thu Sep 2 01:38:17 2004 +0000 + + Fix AGL display problems (Bug #1210, Torrey T. Lyons). + +commit 2753c8e2c84cc1fb6d73a05258ab7200068e7830 +Author: Matthew Allum <breakfast@10.am> +Date: Wed Sep 1 15:30:58 2004 +0000 + + see changelog + +commit 7c0aaa53bf8dcf3d0a8c9e78d31cf62b1766fb35 +Author: Matthew Allum <breakfast@10.am> +Date: Wed Sep 1 11:13:36 2004 +0000 + + '-dpi' fixes for Xephyr + +commit 16ff3a872731633b6f1f4920f793153722026189 +Author: Matthew Allum <breakfast@10.am> +Date: Wed Sep 1 08:31:20 2004 +0000 + + Actuall select events for -parent option + +commit 2d065c4c33b9ec17c4c791070cf8189cb57bbb9c +Author: Matthew Allum <breakfast@10.am> +Date: Tue Aug 31 16:33:05 2004 +0000 + + Added ephyr server sources + +commit 6ec9ecd591fba9e9b69b8ebbd2fa08c0a2beac08 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Aug 30 22:16:46 2004 +0000 + + Add a set of three hooks for accelerating trapezoids, and use it for the + RasterizeTrapezoid screen function. These hooks will be called for + imprecise, non-sharp trapezoids with A8 destinations. + Note that the current main consumer of trapezoids, cairo, is requesting + precise, sharp trapezoids by not changing the default Picture + attributes, but gets non-sharp effects in software because fb bases its + choice of sharp/non-sharp on the mask format being A8 vs A1, and cairo + asks for A8. Follow fb's (poor?) example by ignoring the sharp setting + and basing the choice off of the mask being A8. + +commit ccaf332ce3a9393715317edd3b92420c27fc94eb +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Aug 30 16:43:10 2004 +0000 + + Rather than initially place pixmaps in framebuffer based on a size + heuristic, delay the decision until the first + kaaPixmapUse{Screen|Memory}, and put it in framebuffer if UseScreen was + called. Provides a significant improvement in cairo speeds (100% + speedup in cairogears here) and is likely to improve text performance + as well. + +commit 14b2db63e7ae0c0d356062cd15811484038f97d9 +Author: Kevin E Martin <kem@kem.org> +Date: Sun Aug 29 21:06:00 2004 +0000 + + Fix make install when BuildServersOnly is YES (Bug #1213). + Fix build failures when UseDeprecatedKeyboardDriver is YES and + DoLoadableServer is NO (Bug #1229, Kristian Høgsberg). + Fix failure when using DLL loader and LD_BIND_NOW is set (Bug #1212, Adam + Jackson). + +commit ac038e9cc6f7708fdd9f36494861d2f611d5a90a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Aug 29 00:48:17 2004 +0000 + + Don't define _XOPEN_SOURCE before including math.h on Solaris - it's not + needed on older releases, and breaks builds on Solaris 10. (Same as + bugzilla #189). + +commit 89d702763875831604751bac396c3d2400ec59b6 +Author: Egbert Eich <eich@suse.de> +Date: Fri Aug 27 21:44:54 2004 +0000 + + Fix for XV memory allocation: Also use tiled area for allocation even if it + hasn't been used before. + +commit 971755765d6ef9cadf11127478af59189034d356 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Aug 27 21:09:23 2004 +0000 + + Bug #1101: Fix PaintWindow in the pixmap case when the window's origin is + not at the backing pixmap's origin. Resulted in incorrect rendering in + at least aisleriot, fluxbox, and KDE apps, and probably many more. + While here, move the ParentRelative loop above the drawable grab -- may + improve correctness with ParentRelative background origins as well. + Note that the border code doesn't handle ParentRelative yet. + +commit 1840a50bb763d5c94195eaffa3954c1afd77a31a +Author: Kevin E Martin <kem@kem.org> +Date: Fri Aug 27 20:39:17 2004 +0000 + + Add missing reply for DMX (Rik Faith). + +commit f30fbc600f3e5c3b4aceafb8256594af0069f2c9 +Author: Egbert Eich <eich@suse.de> +Date: Fri Aug 27 20:20:54 2004 +0000 + + Fixed typos. + +commit 276cf271527b7a6f464025457e5dd452ac13605e +Author: Egbert Eich <eich@suse.de> +Date: Fri Aug 27 20:16:28 2004 +0000 + + - adding missing file + +commit ecd889c6ff7427b4e7d3f820586aac178a4dfdc2 +Author: Egbert Eich <eich@suse.de> +Date: Fri Aug 27 19:27:12 2004 +0000 + + Added support for LynxOS 4.0 (Thomas Mueller). + Fix arm netwinder build (Donnie Berkholz). + +commit 7c087078694a6895a9bcbe62d091665c05a86b5a +Author: Egbert Eich <eich@suse.de> +Date: Fri Aug 27 12:32:14 2004 +0000 + + - Make DDC code more VESA compliant: when MaxClock is set to 0xFF it means + 'no value specified'. Therefore setting it to 0. + +commit c0bff215de2d034118d06cac42e234008612204b +Author: Kevin E Martin <kem@kem.org> +Date: Fri Aug 27 01:15:10 2004 +0000 + + Fix xtest failures in Xvfb from XMatchVisualInfo test. + +commit 5335bc8a0657b3e378795b44698ed23020c13891 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Aug 26 20:32:59 2004 +0000 + + Bug #1138: Wrap funcs in CW's GC ops as well. While this is unnecessary + according to the rules as I understand them (bug #1045), not everybody + follows the rules. GC funcs were being called on the same GC from + within GC ops, and the cwValidateGC caused a loop in the funcs chain + that resulted in a crash, notably in cwPolylines. + +commit c8672e7ac79c872344f287f7cc106cb5c006e619 +Author: Egbert Eich <eich@suse.de> +Date: Thu Aug 26 11:58:08 2004 +0000 + + Fixed support for LynxOS 3.1 (LynxOS 4 will follow) (Thomas Mueller). + 2 + +commit 198e62c44b99ee0890b944f92b162387f77aa10d +Author: Torrey Lyons <torrey@mrcla.com> +Date: Sat Aug 21 00:46:01 2004 +0000 + + Documentation only update: Update XDarwin application version for release. + +commit 74d84d7b122802230579a4da8c2e6914d2f5f060 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Aug 20 05:22:39 2004 +0000 + + Fix keyboard driver failing to initialize if DoLoadableServer is NO (Bug + #1133, Kristian Høgsberg). + +commit bd3e6e44259155cb37f39eb2ca5e1f0de1c2ebb7 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Aug 19 04:08:40 2004 +0000 + + Add missing no.*Extension symbols (Bug #1131, Aaron Plattner). + +commit 87842285007e9ac4f9de0349abee1fb66b7c795f +Author: Kevin E Martin <kem@kem.org> +Date: Wed Aug 18 21:11:17 2004 +0000 + + Fix CopyArea for non-redir dst, redir src (Bug #1105, Eric Anholt). + +commit 9223baf985778c536ce93846c431b46a0192cf32 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Aug 18 18:41:41 2004 +0000 + + Fix AIX build problems (Bugs #1020, 1102, 1103, Dan McNichol). + Remove old config files (Bug #1123, Jim Gettys). + Remove old log message (Bug #1123, Jim Gettys). + +commit a45bc0df7a1c369e8429e84414ac813187c90059 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Aug 17 17:55:02 2004 +0000 + + Fix DRI module loading (Bug #1057, Ronny Vindenes). + Fix Xvfb at 8bpp (Bug #1091). + Fix link order when building with Xprint in glxgears (Bug #1060, Alexander + Gottwald). + +commit 75de2fe82e7da755555028a724f68b9fb9ddfb14 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Aug 16 22:48:50 2004 +0000 + + Update release and date for first RC. + Fix kbd/keyboard driver for DoLoadableServer NO. + Revert change since it is better to set date in the config files. + +commit 1798cac6fa2e909c9f3df26b97ee8232a0bf1592 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Aug 16 20:17:51 2004 +0000 + + Add kdb <-> keyboard aliasing when UseDeprecatedKeyboardDriver is NO (Bug + #1072, Kristian Høgsberg). + +commit 6cac342517892a20bab6a6177f8b5742feaaed38 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Aug 16 15:48:53 2004 +0000 + + document broken composite in XWin + +commit 9aa6beb6b7e6272b05a03e0a4fd34eb8ad21bf47 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Aug 16 02:07:53 2004 +0000 + + Fix banner to print out proper version information. + +commit 9da0c214ab5f4ee9c1610b4888f5c7c0dd2bcacc +Author: Keith Packard <keithp@keithp.com> +Date: Sun Aug 15 21:13:11 2004 +0000 + + Clip destination instead of source. Should be the same, but it looks nicer + to me. + Clean up transition between cheap and expensive GC wrappers by using the + prologue and epilogue macros. Before, the GC would be left unvalidated + sometimes which would cause all kinds of entertaining bugs against a + DDX which cares (XAA). + +commit a68f350195c1c54034f98e2b78c2c3da70044884 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Aug 15 19:05:01 2004 +0000 + + Remove debugging code which did a full tree walk on every window operation + Eliminate needless (and, it turns out, dangerous) call to ChangeGC on + DestroyGCPrivate. + in cwSetWindowPixmap, check if the pixmap is the screen pixmap and disable + the wrapper by setting the private to NULL. + +commit 5db70ae2575e3e8669d7a66e2218ba28e8bdfa68 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Aug 15 15:40:19 2004 +0000 + + Remove #error used for testing. + +commit 1e728c3e88f6a74b93dc11827c9fcfe7b39ca5a5 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Aug 15 03:34:18 2004 +0000 + + Copy bits from parent window when allocating pixmaps so that Background == + None works. + Copy filter to backing picture during validation. + Mark picture serialNumber when setting Filter or Transform so Validate + occurs. + Initialize xf86Screens[i]->pScreen to NULL so that RADEON driver doesn't + crash during server reset using old pScreen. + +commit 943308517905d16bda1bb27cd745bd291a84dbf6 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Aug 15 00:43:39 2004 +0000 + + Redraw window borders when switching window pixmaps around + Make cw "own" the window pixmaps by wrapping + GetWindowPixmap/SetWindowPixmap. + +commit 597fdae93e6e1b7e4052097baf3d91e7a134c162 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sat Aug 14 23:59:52 2004 +0000 + + More kbd fun: write out "kbd" from Xorg -configure (#1078). + +commit e483fe3ec384da556c31292001a86ec95c2ddc46 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 14 21:57:58 2004 +0000 + + Fix offsets again. Really, it works this time. Promise. + +commit e6216b48f5feee72f107348cb21bad724536ec62 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 14 21:36:10 2004 +0000 + + Fix offsets, do whole region at once by using GC clipping + +commit ed425d1d88a72586d5d7a4aad9d0be0b06637070 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Aug 14 20:29:28 2004 +0000 + + Bug #1077: Fix source copy performance problem exposed by Composite. + +commit cc3ad0ed4302f54318e190a2b10646337f242d40 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 14 19:53:36 2004 +0000 + + Fix clip list computation and setting to ignore clip changes to "real" + GC/Picture and track serial numbers correctly when copying + pCompositeClip down. + +commit 183c6d06455114c61f6db57ec0a084caf11ece3a +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Aug 14 19:51:11 2004 +0000 + + Wrap CopyWindow in cw, which fixes scrolling in many apps. + +commit e61b5d38ab30c4f73ba0d070f485a32708a03eb6 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 14 07:12:37 2004 +0000 + + Use XLIB_SKIP_ARGB_VISUALS environment variable to disable all depth 32 + visuals. Necessary to keep Flash from crashing. + Must call ValidateGC/ValidatePicture on "real" GC/Picture to ensure + pCompositeClip is set correctly. + Need to take the composite clip from the "real" GC/Picture and turn it into + the clientClip for the backing version. + Adjust pixmap screen origin to account for drawable->x/y Change debugging + output a bit (disabled by default) + +commit 05f6329eb6f564ad4fc366d75f4ebf9f3ba4b5dd +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Aug 13 23:57:38 2004 +0000 + + Don't enable speedo & type1 modules if they're not being built + Clean up a couple of hardcoded paths & vendor names to use defines set by + Imakefile + +commit 3f84e4f71d9c7c560f9bef675b1cc96fa1d83b14 +Author: Kevin E Martin <kem@kem.org> +Date: Fri Aug 13 19:51:34 2004 +0000 + + Fix Xprt bug by disabling code that merges multiple audit messages (Bug + #964, Roland Mainz). + +commit 922fd3a2e568571171dfd64a94f804350829230f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Aug 13 19:18:29 2004 +0000 + + Added $(MESASRCDIR)/src/mesa/glapi to INCLUDES. Removed $(SERVERSRC)/mi + from INCLUDES. Rearranged INCLUDES for better readability. + Removed mipointrst.h and miscstruct.h from #include since they are not used + anymore. + +commit f63f4b768cd5ec5bffd270e448e6e51b8ad67016 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Fri Aug 13 18:24:07 2004 +0000 + + Fri Aug 13 19:53:10 2004 Soeren Sandmann <sandmann@redhat.com> + Fix for lockups on some versions of Matrox Mystique. #687, Patch from Mike + Harris. + Call xf86EnableDisableFBAccess though the function pointer instead of + directly. #1041, Patch from Aaron Plattner. + Swap the phsyical size of the screen when rotiation. #1050, Patch from + Aaron Plattner. + Fri Aug 13 19:47:12 2004 Soeren Sandmann <sandmann@redhat.com> + Make HAVE_FT_BITMAP_SIZE_Y_PPEM conditional on the FreeType version instead + of proping it. This way it will work with the monolithic version too. + #1062, Patch by Owen Taylor. + +commit a29bfbd3d0a5d39ccee5b83ac1ba632091b031bb +Author: Keith Packard <keithp@keithp.com> +Date: Fri Aug 13 08:16:14 2004 +0000 + + Empty damage object when freeing pixmap. + Wrap InstallColormap so that the DDX doesn't see colormaps from our ARGB + visual (avoids lovely green tint to screen). Also, set visual->nplanes + of ARGB visual to all used (including alpha) planes so DIX can set + pixel values correctly. + Translate automatic update regions correctly to account for borders + When nplanes == 32 (ARGB visuals), mask in all ones for alpha values to + allocated pixel values. + Remove redundant fbAddTraps declaration + Fix fbCopyWindow to work on non-screen pixmaps (not needed yet) + Replace broken clipping code with that from modular tree. + Respect subWindowMode. + +commit 24bed5cff908a6f8b1857e3dadac22d6db54c69e +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Aug 13 07:47:21 2004 +0000 + + Fix copy'n'paste-os of x/y in CopyPicture for AlphaXOrigin and ClipXOrigin. + +commit 5825e4559e7aaf3b40205a0dca49a785c8de7b92 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Aug 12 23:14:50 2004 +0000 + + Fix after Mesa 20040812 merge: revert glxext.h to vendor branch, and fix + bug #1022. + +commit 2889ad2cb8827f20b6d69da4fe99db33bf9c5ff2 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Thu Aug 12 20:24:36 2004 +0000 + + Fix crash in rootless XDarwin due to rootless being initialized before + damage extension. + +commit 961333143e2df3e3f33e8624fc61e79cf3e86cd1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Aug 12 08:45:33 2004 +0000 + + Apply a kludge to initialize the composite wrapper before DamageSetup. If + not, DamageSetup will wrap some operations first, and the cw + initializes during ExtensionInit, so cw comes higher in the wrapping + chain. cw going first will result in damage getting confused when the + drawables get changed around. + +commit 6e0228722cc2fa37a0e2359bc3dab3646e36c4b7 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Aug 12 08:11:59 2004 +0000 + + Fix various cw issues, including a couple reported by deronj: + - Fix wrapping of GC ops/funcs according to policy described in bug #1045. + - Remove ValidateGC/ValidatePictures on the redirected drawables/pictures + -- it's not needed, and DDXs shouldn't be seeing redirected drawables + in render or GC ops/funcs when cw is running. + - Mark all GC/Picture state as dirty when moving from redirected to + non-redirected, since it hadn't been passed down in Change* or + Validate* while redirected. + - Remove CreatePicture wrapper that didn't do anything. + - Comment on why AddTraps wrapper isn't needed. + +commit 789cf3ed846045d91f950cb177ef6bae4c8966fc +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Aug 12 07:57:03 2004 +0000 + + Fix some issues reported by deronj: + - Hopefully fix a crash in compCheckRedirect on unrealizing windows. + - Remove an extern that doesn't point at anything. + +commit 1a073786e0159a80ac3b8772a1d89b0618a8ff33 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Aug 12 05:11:57 2004 +0000 + + Update version and date for next snapshot + +commit 47ee5f4ba72f0e0bc92a5e04073c70808e85fc08 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Thu Aug 12 01:57:51 2004 +0000 + + Add call to SourceValidate() when pDst == pSrc, so misprite.c get a chance + to remove the sprite before the area is copied. The drivers handle pDst + != pSrc (#1030). + +commit 09d0056b8bc103f67a35980934f03d28fed51164 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Aug 12 01:30:57 2004 +0000 + + Wrap the Propolice fix in #ifdef __SSP__; Propolice doesn't define this yet + but an RFE has been submitted upstream. + +commit e30c22dbbffa2605f8d7ac010c8208a135a2293a +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Aug 12 01:16:36 2004 +0000 + + Back out the propolice fix for a second, it causes linktime errors. + +commit 9d0213525f4f692c250f10309146fe9db76ba12d +Author: Keith Packard <keithp@keithp.com> +Date: Thu Aug 12 00:09:30 2004 +0000 + + Paint to parent window instead of parent window's pixmap (helps for servers + that don't have a pixmap for the root) + Fix offsets for render drawing. + +commit c7bc76f663008119b3681d4b7adef7dc9ffdc236 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Wed Aug 11 23:53:36 2004 +0000 + + Fix leftover XF86_VERSION_SNAP macro. + +commit eb607030e32cbad846696a20cfb3045c5f8f65c1 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Aug 11 23:10:02 2004 +0000 + + Teach the loader about the extra symbols needed for Propolice-protected + modules to work under elfloader. From Travis Tilley (Gentoo). + +commit fd439afdfe7ba451aff19b62d1764e4dfd0b782f +Author: Keith Packard <keithp@keithp.com> +Date: Wed Aug 11 22:40:14 2004 +0000 + + Add COMPOSITE change to fbCopyWindow (not needed yet) + Xnest was half-using midispcur and doing a bad job of it. Replace all of + that code with mipointer which does a lot of the work. + Support DDXen which don't provide GetWindowPixmap, or which return NULL for + the root pixmap. + +commit f95293e5253904883d3b40f9e68e6175247754a3 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Aug 11 22:27:50 2004 +0000 + + Fix bogus contact address in Xserver/os/util.c (Bug #738). + +commit 56520ecd5ceb9526541c241634b467eba6a8f7cf +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Aug 11 22:13:01 2004 +0000 + + In CopyPicture, add missing call to ChangePicture to notify about the + changes that CopyPicture has done. + +commit f77f1d50723aceb5059a96f7a4068046b7961c51 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Aug 11 21:14:18 2004 +0000 + + Apply PPC64 build patch (Bug #303, Mike A. Harris, Alan Coopersmith). + +commit 3dbaeb2e126d9424b21df91f0be9129c4eea6f1b +Author: Kristian Høgsberg <krh@redhat.com> +Date: Wed Aug 11 20:25:13 2004 +0000 + + Patch xorgconfig to generate config files with correct keyboard driver; use + "kbd" by default, "keyboard" if UseDeprecatedKeyboarDriver is YES + (#1040). + +commit ca458e3c9b25c3efc10532eb8e31bdcff44dc321 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Aug 11 13:55:03 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=492 - + /etc/init.d/xprint did not source xorg.conf for font paths additionally + to xfree86 config files + +commit 81881b96861d707b0729e0146a4b53b3dd234885 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Aug 10 21:37:35 2004 +0000 + + Update version to 6.7.99.1 and fix problem with snapshot string generation. + +commit 21c7c8cdc7d2f607177634601cef8b0290fb0e80 +Author: Kevin E Martin <kem@kem.org> +Date: Mon Aug 9 22:37:22 2004 +0000 + + Fix install problem on platforms not using xorg.cf/xfree86.cf (Bug #339, + Harold L. Hunt II, Alexander Gottwald). + Fix crash when using X core font in zh_CN.UTF-8 locale (Bug #368, Yu Shao, + David Dawes). + Fix glXMakeCurrent(Dpy, None, NULL) crash (Bug #719, Adam Jackson). + HP-PA build fix (Bug #828, Guy Martin, Paul Anderson). + Fix SDK build for GATOS and Wacom driver (Bug #829, Bryan Stine). + Fix attempt to read video ROM before enabling it (Bug #843, Ivan + Kokshaysky, Mike A. Harris). + Fix detection of primary adapter (Bug #843, Ivan Kokshaysky, Mike A. + Harris). + Clarify xset man page description of how to use the keyboard repeat rate + settings (Bug #846, Mike A. Harris). + Fix problem where print-screen key would get remapped to sys-req in certain + keymaps, which broke GNOME printscreen functionality (Bug #847, Owen + Taylor). + Fix several render problems: + - MMIO mode support + - Hang on IGP chips + - VT switching hang + - 3D render corruption (Bug #922, Hui Yu). + +commit 26847ef9268f687c4f45f3d048eff4b06c2ba3bf +Author: Kristian Høgsberg <krh@redhat.com> +Date: Mon Aug 9 03:40:50 2004 +0000 + + Move the new render symbols to dixsym.c instead so they are grouped with + the other render symbols. + Initialize screen_x and screen_y to 0. This fixes a problem with the new + Damage based sprite, where intersection test against the root pixmap + would fail because the two fields were not initialized (damage.c, + 166-170). + +commit 57eab4dc87670da42e645a4c341d1ee661b43b5b +Author: Kevin E Martin <kem@kem.org> +Date: Mon Aug 9 02:08:35 2004 +0000 + + - Fix building without Xfixes extension + - Fix building without Xevie + - Fix building without DPMS + - Fix "Extensions" section config file support to accept general boolean + options + +commit a2e51b13ea5a2e5fc5626905b6c2caac6358eb11 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Aug 8 20:56:56 2004 +0000 + + Disable legacy keyboard driver "keyboard", unless + USE_DEPRECATED_KEYBOARD_DRIVER is defined. Print warning if the old + driver is used. + +commit 3431692bf44e7be01187b421cfb0e46131c5e4c7 +Author: Kristian Høgsberg <krh@redhat.com> +Date: Sun Aug 8 17:02:19 2004 +0000 + + Add new render symbols to list of exported extension symbols so + DoLoadableServer works again. + +commit 1e694d2b51a954d1bc4afdde390723e9a1a5b9bf +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 7 01:23:07 2004 +0000 + + Fix minor timestamp lossage in mieq. + Replace miSprite implementation with Damage-based one. Otherwise damage and + misprite conflict causing looping. + Change pScreen usage around a bit to eliminate warnings + +commit 45fde3b041c071ae5a604cefbbfa4da5c1e828f8 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 7 01:19:01 2004 +0000 + + Eliminate mfb support. Fix visuals to match "normal" PC hardware (making + lightpipe work). + +commit 2bdbc2c0d39b1618440a6a8ed1c38a11703e898c +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 7 01:02:41 2004 +0000 + + Clean up cw initialization, make sure wrappers re-wrap on exit. + +commit cff0043a347ba06e8ab16a84a35c99794b45149b +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 7 00:58:21 2004 +0000 + + Remove alpha-related fields from visual structure to retain binary + compatibilty. Applications using ARGB visuals will need to use Render + or other mechanisms to compute pixel values instead of AllocColor + +commit 196aafb19a3cfdc8c21f9bf75814cf0d84ff4446 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Aug 6 23:42:10 2004 +0000 + + Add RenderAddTraps. Rewrite trapezoid rendering code. + +commit e847bcda0827ffb87689a0162c648570de6d6f69 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Aug 6 00:31:28 2004 +0000 + + Fix missing ';' in cw.c and unwrap the render wrapper properly. + +commit ae1580c494fde2b56f9faa40f7ebcf637728efc8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Aug 5 18:24:58 2004 +0000 + + - Add a new Render function, CopyPicture, which will update a picture with + the flagged bits from a source picture. Approved in principle by + keithp. + - Use CopyPicture and SetTransform to update most of the backing picture's + state in the composite wrapper. Filters are still missing. + - Don't allocate a picture private, now that we calculate clipping properly + and don't need the serialNumber or stateChanges. + - Use the format of the source pixmap rather than generating the format + from the window's visual. + - Wrap the rest of the Render primitives that were stubbed out before. + +commit 73e14bd611fa7eac649a2b4c7964959d9eae887b +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Aug 4 23:18:38 2004 +0000 + + - Always validate the backing GC in cwValidateGC, not just when the clip + list changes. + - Use FillTiled instead of FillSolid for painting tiled border/background + pixmaps, and don't needlessly change the scratch GC's defaults. + - Use the preferred dixChangeGC instead of DoChangeGC. + - Simplify a silly loop and clean up a couple of comments. + +commit d240c41a3ab9cde9921cc96cf86e630ca5c9005a +Author: Egbert Eich <eich@suse.de> +Date: Wed Aug 4 12:21:48 2004 +0000 + + Optimization of CJK rendering when using versions of freetype prior to + 2.1.8 (Chisato Yamauchi). + A small backward compatibility fix to make the freetype module build with + freetype version < 2.1.7. + Fixed/added some debugging code. + +commit 751fd11a9ad1a473d7311362246b0869a008001b +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Aug 4 10:05:37 2004 +0000 + + - Add two new XAA hooks, SetupForCPUToScreenTexture2 and + SetupForCPUToScreenAlphaTexture2. These add a dstFormat argument after + the previous format argument, which the driver needs to use to properly + set up the destination format. Two new arrays are added for the list of + destination formats supported that correspond to the previous format + arrays for sources. + - Make Render acceleration only occur when the new hook for that + acceleration type is supplied and the dst format list is set, along + with the src format list being set. Without knowing the destination + format, the Render acceleration couldn't properly support all the + destinations it might encounter. + - Bump XAA module minor version. + - Update the Radeon Render acceleration to use the new hooks when the XAA + module is sufficiently new. Fix a bug in the src/dst alpha booleans for + ops, and use them to set blend_cntl to support destinations without + alpha. Add missing PICT_a1r5g5b5 texture format, and add list + terminator. (!) + +commit 9c1d52a69db841ac85ef97d7223361b83a66ae29 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Aug 3 10:12:25 2004 +0000 + + Merge from CYGWIN branch + 2004-08-02 Kensuke Matsuzaki + Fix the bug that we can't copy & paste multi-byte string to Unicode-base + Windows application. Rename fUnicodeSupport to fUseUnicode, because it + don't mean wheather Windows support Unicode or not. + +commit defcfe3c7ee3e39ef02da08b7227b758dbede325 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Aug 3 09:33:54 2004 +0000 + + programs/Xserver/hw/xfree86/ddc/xf86DDC.h + programs/Xserver/hw/xfree86/vgahw/vgaHW.c + programs/Xserver/hw/xfree86/vgahw/vgaHW.h + programs/Xserver/miext/shadow/shadow.h + programs/Xserver/miext/shadow/shpacked.c + programs/Xserver/miext/shadow/shplanar.c + programs/Xserver/miext/shadow/shrotate.c Fix glitches in pointer to + functions declarations. + +commit e6d0b18c24f7f84aabed763be1cc8414883fab95 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Aug 3 08:52:17 2004 +0000 + + Fix declaration of XAACachePlanarMonoStippleProc. Rename + XAACachePlanarMonoStippleWeak to XAAGetCachePlanarMonoStipple() for + consistency with other parts of xaa and fix forward declaration in + xaalocal.h. Fixes last comments on Bug #962. + +commit bfbb40c28ce6e98c82973bd96054d4787579eaa6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Aug 3 05:49:48 2004 +0000 + + Major improvements to Composite wrapper. Several issues remain, but it now + appears stable in limited testing. + - Allocate the picture private, avoiding segfault. + - Wrap PaintWindow to draw the background/border to the backing pixmap + (based on Deron Johnson's comptran.c). + - Set the x_off/y_off returns to translate coordinates properly. + - Don't bother allocating temporary areas for the modified coordinates. + Layers above are responsible for handling lower layers changing the + arguments, so cw doesn't have to worry about it. mibstore.c has to do + the allocation because it calls down twice (front buffer and backing + store). (Suggested by keithp) + - Handle the mode argument to PolyPoint, Polylines, and FillPolygon. + - Remove some dead elements in the cw privates. + - Kill a prototype warning in compinit.c by adding the cw.h header. + +commit b7ba272da0910c6558f71cfedd0bf9836fc892c1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Aug 3 05:39:19 2004 +0000 + + The Damage extension has to wrap after (be called before) the Composite + extension so that the redirecting of drawables by the wrapper doesn't + confuse Damage. + +commit d112e55992e9e03e74fdf5738c8c47cd90033a37 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Aug 3 02:44:23 2004 +0000 + + Bug #962: Remove LoaderSymbol calls introduced by the dlloader work so + DoLoadableServer NO builds work again. + +commit 734cb34dc1697530ecd971b84e1061ed86b4c2a4 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Mon Aug 2 21:15:30 2004 +0000 + + Mon Aug 2 21:49:33 2004 Soeren Sandmann <sandmann@redhat.com> + Remove double cast. + +commit e6b9cc79c204420117a1f7b23d131ec24923d612 +Author: Egbert Eich <eich@suse.de> +Date: Mon Aug 2 19:35:07 2004 +0000 + + Removed distro specific stuff. + Fixed FreeType module to build with FreeType versions older than 2.1.7. + Fixed typo. + Added vtSema to protect call of driver DPMS function. + removed unneeded variable + Modified RandR driver hook to reduce the number of function calls to one. + Function is sufficiently generic to be extended in the future. + +commit b759da83ae62a897b7727d9180a68b962b571286 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun Aug 1 16:16:18 2004 +0000 + + added README for Cygwin/X + This file currently contains the Cygwin/X specific release notes from 6.7.0 + and a first collection of what will make up the release notes for the + next release + +commit d638a50f3f039d84d86c00696d7d3ec22560bc3c +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Jul 31 18:33:56 2004 +0000 + + adjust prototype for winInitCmapPrivates to match Egberts change. + +commit 488be6611919af97d7e4f8b0994487882eb78e18 +Author: Kevin E Martin <kem@kem.org> +Date: Sat Jul 31 09:41:27 2004 +0000 + + Fix typo + +commit 383b6b59864098b03d991628ff5933d997793ea1 +Author: Kevin E Martin <kem@kem.org> +Date: Sat Jul 31 09:14:06 2004 +0000 + + Add "Extensions" section support to configuration parser + +commit d690556d496c7331bd112903a0c9e6553c7d3342 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jul 31 08:24:14 2004 +0000 + + Integrate COMPOSITEWRAP branch including composite wrapper. This code still + has several issues, including: + - CopyWindow and PaintWindow wrappers missing (will be done soon) + - Some segfaults seen in the Render wrappers. + - Xprt server build breaks with Composite. + - DDXs must be recompiled for Composite due to VisualRec size change. + - Composite bugs pointed out by Deron Johnson in email. + Also, reorder XFixes initialization according to comments by Keith which + are also in xserver CVS. + +commit 8763cca7f9927bd6c9caf804bf09dcfea929eed0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jul 31 07:26:50 2004 +0000 + + Update xfixes server code to major version 3 from xserver CVS, and perform + minor diff-reduction versus xserver CVS. + +commit 25bd6ff4a622d09fb0c247b7c40281744c61431e +Author: Kevin E Martin <kem@kem.org> +Date: Sat Jul 31 04:23:21 2004 +0000 + + Add new extension enable/disable feature. This code is a small step in the + right direction -- i.e., moving towards full run-time config of + extensions. Currently, only XTEST, XINERAMA, RENDER, XKB, and XEVIE are + supported. + +commit 326729ebca863c99cf913445126294a3c6d3db5d +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jul 31 01:48:27 2004 +0000 + + - Add some XFIXES bits apparently missed in the DAMAGE-XFIXES merge + - Add missing XCSECURITY ifdef. + - Sync some whitespace to xserver CVS and surrounding style. + +commit 370bda820b2912b93dcc34c088075f8e65a9e5cb +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jul 31 01:38:46 2004 +0000 + + Integrate latest damage bits, including the addition of Composite code. + Includes REGION_INIT -> REGION_NULL necessary to avoid segfaults with + inlined region macros. + +commit 7542d8a17ad469f9c760f0f843bd6a4fb6deb57d +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Sat Jul 31 01:37:47 2004 +0000 + + Turn on XEVIE https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified + Files: miinitext.c + +commit b2065f376b932e49f1f96dfb92ddb52d15796abe +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Sat Jul 31 01:34:26 2004 +0000 + + Integration of XEVIE branch to trunk, latest updates + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: + Imakefile xevie.c + +commit e68bfc801680f2852c59099aa3d7502e49b48b2c +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Sat Jul 31 01:33:40 2004 +0000 + + Integration of XEVIE branch to trunk, Some updates from latest reviews + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: + events.c + +commit 706b2a7e02aa0085769fb87782118488d0f90eaa +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 31 01:21:19 2004 +0000 + + Change several LoaderSymbol calls introduced by the bug #400 patch to + *Weak() resolver functions. + +commit 9e13805b02f37497971c789b4035abc29463c550 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sat Jul 31 00:44:45 2004 +0000 + + adjust prototype for winInitCmapPrivates to match Egberts change. + +commit 4da507a03fd5659e5944d9e47dd2f8920636383b +Author: Kevin E Martin <kem@kem.org> +Date: Sat Jul 31 00:32:43 2004 +0000 + + Fix compiler warning + +commit 64a6d3e9c84a36b4e0550d112f288b695c5056cd +Author: Hui YU <hyu@ati.com> +Date: Fri Jul 30 22:20:21 2004 +0000 + + Support for New radeon chips: R420/M18, R423, RV370/M22, RV380/M24, RS300. + Add special handlings for DELL triple-head server (RV100). Misc. bug + fixes for flat panel, host aperture, etc (Bug #946) + +commit d3c98fed2c37a863a6765a3e288bcdbc2738878a +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 21:53:09 2004 +0000 + + Add support for on-the-fly screen rotation when supported by hardware (Aron + Plattner). + +commit 4baf0029418d3eeeac5d1026a7cfea3234e44e48 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 21:46:38 2004 +0000 + + An experimental pseudocolor emulation layer. Not fully completed, currently + only works for 16bpp. + +commit 63a152f7812d0981e3e7aa41a42e59cd0c3e50dc +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 21:39:20 2004 +0000 + + removing some unnecessary restricitons on the allowed visuals. + +commit 0ba15599466ddb644728c6b68e64e05b1317ac2e +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 21:10:46 2004 +0000 + + Adding a colormap index to the InitColormapPrivate() func call. Without it + it was completely useless. + test if colormap with index really exists in the list of installed maps + before using it. + +commit bbfe7bed3fe4d9bd089327cd59e6faedb592dabb +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 20:56:53 2004 +0000 + + Set DPMS to ON when VT switching away or shutting down the server. Failing + to do this may leave the text console blank. + +commit 40b975e3acb11c1ec2fd4c5984f5efa20b669489 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 20:51:09 2004 +0000 + + Improved error messages. + build fixes for AMD64. + Made shm* functions in the libc_wrapper more standard conformant by setting + errno correctly. + Use xf86ExendedInitInt10() in VBEExtendedInit() to be able to pass flags. + +commit 7643199de1c4f12a2aadeaf2d539a37ddb45672b +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 20:38:27 2004 +0000 + + Fix static build. + add i845 to the list of chips that allow memory size tweaking. + +commit 48514fee3c8ec26f36e142ffc9272e510b9a4238 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jul 30 20:30:57 2004 +0000 + + Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all + framebuffer formats except cfb and the overlay modes should work, and + r128 and radeon need to be loaded from the ati driver (both issues to + be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga + drivers. elfloader users shouldn't be affected. + +commit 29012adb37c533f57c684ad94c4d83a6c31793e5 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri Jul 30 19:28:03 2004 +0000 + + Add generic rootless layer documentation missed from last commit. + +commit 784e4d1cc02dea837a38a4140a18013953296366 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri Jul 30 19:12:18 2004 +0000 + + Merge many XDarwin improvements: + - Fix launch of X clients by double clicking in the Finder when there is a + space in the path (Torrey T. Lyons). + - Interpret scroll wheel mouse events correctly when shift is held down + (Benjamin Burke). + - Add option to always use Mac command key equivalents (John Harper and + Torrey T. Lyons). + - Add support for dynamic screen configuration changes in rootless mode + (John Harper and Torrey T. Lyons). + - Add documentation on generic rootless layer (Torrey T. Lyons). + +commit c2275b31adc3c4292c171055db16e00ee0e69e43 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 19:04:14 2004 +0000 + + Removed bugs on TweakMemorySize() which prevented it from working at all. + Initialized last element of BIOS version number string to 0 to avoid random + problems. + +commit 5ed0aefc67e86abaddf1b6bffdc832996b86fb46 +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 18:40:36 2004 +0000 + + Fixed typo in a comment. + Deleted bogus comment. + Added debugging support. + +commit d380647739e4767da69edc44bbb441b3b9554b03 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri Jul 30 18:22:13 2004 +0000 + + Add initial Xinput support for XDarwin (Greg Parker). + +commit 41641c11ec8994f1bc4bd1b05ae2cb38167c8312 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Fri Jul 30 17:37:09 2004 +0000 + + Make XDarwin not default to StaticColor on ix86 (Shantonu Sen). + +commit f4c84e7dbf0f25a2544d4400e600310421683f3c +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Jul 30 12:03:56 2004 +0000 + + Fix for http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=940 + - Filter /etc/init.d/xprint throught CPP/|MakeScriptFromCpp()| to allow + platform-specific customisation. + +commit ed923a42b800e3f701084ef5828cabbbefe8361f +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:41 2004 +0000 + + file cw_render.c was initially added on branch COMPOSITEWRAP. + +commit 69e379ddaf85feda6a163b5f4e855ffe86b254df +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:41 2004 +0000 + + file cw_ops.c was initially added on branch COMPOSITEWRAP. + +commit 0ee93acd103af947fef0a28e32b5b3f2857789bf +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:40 2004 +0000 + + file cw.c was initially added on branch COMPOSITEWRAP. + +commit 3bdaa0e7fa7b6f5d550907d5fe7d0fb16c53e243 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:40 2004 +0000 + + file cw.h was initially added on branch COMPOSITEWRAP. + +commit 94e1ea569171334eb40a2d4a63138c02915203db +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compwindow.c was initially added on branch COMPOSITEWRAP. + +commit 705536d04c4f09c84bb04827c07bb899584f399d +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compinit.c was initially added on branch COMPOSITEWRAP. + +commit b80dbd886d7cc3a72772f3231a8c8e8df7f6679f +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compalloc.c was initially added on branch COMPOSITEWRAP. + +commit beb26caf68d3e25bf85fd63dbb499eca4b1f05ba +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compext.c was initially added on branch COMPOSITEWRAP. + +commit 97afc846003bb521cf9d6e92b298024d83db8759 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jul 30 06:54:40 2004 +0000 + + file compint.h was initially added on branch COMPOSITEWRAP. + +commit 854c1afa867ff617b47c4cde3cfd86bd26e9931a +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 30 04:44:13 2004 +0000 + + Fix "DoLoadableServer NO" build + +commit 71164d118c192e96eb2b0fc45514233e9563a568 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Fri Jul 30 01:21:57 2004 +0000 + + Integration of XEVIE branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 + Modified Files: cursorstr.h input.h inputstr.h windowstr.h + +commit 82a6a659248bb66a0364eb9eaf331747834fb5c6 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Fri Jul 30 01:20:42 2004 +0000 + + Integration of XEVIE branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=947 + Modified Files: Imakefile Added Files: xevie.c + +commit dd7077cadcdc323e1a301ed5eefa7ff12599aa4d +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 30 01:15:57 2004 +0000 + + Cleaned up code since client's saveSet is no longer defined as a pointer* + (forgot one change in previous check-in) + +commit 813d75f9d3c7b540977926e37310fa683daf12e1 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Jul 29 23:43:40 2004 +0000 + + Use LibraryTargetName when not building a loadable server + Move extern function declarations to window.h + Cleaned up code since client's saveSet is no longer defined as a pointer* + Added externs back in + Change #if to #ifdef to fix compiler warning + Add function declarations that were inadvertently removed by previous check + in + Disable extensions that are not (yet) supported by DMX + +commit 274d5044ac41523ff23912c223177c429c710e09 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 18:49:42 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Modified Files: Imakefile miinitext.c + +commit 406c49eb810cbdcfd833cac4eeaa465598238691 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 18:46:37 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + DAMAGE calls some shape functions. Modified Files: Imakefile shape.c + +commit 0bca00e1205bf1a4537cbf7be6339b3b1f9b953f +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 18:43:58 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Modified Files: dispatch.c dixutils.c events.c window.c + +commit d4a101d4ef9943dcddf08b00b2d3ab4319597193 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 18:37:54 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + These RENDER changes come from the experimental freedesktop tree formerly + known as "Xserver". Partly motivated by compatibility with DAMAGE as + pulled from that tree, also some of the code just is better + implemented. + Modified Files: filter.c picture.c picture.h picturestr.h + +commit e1281790bb3d7cdcc5de85829806dd53da67e326 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 18:16:56 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Modified Files: cursorstr.h dix.h dixstruct.h regionstr.h window.h + +commit d2f798b6dbaebd0300f42c2e083a962c37647620 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 14:42:24 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + Added Files: Imakefile damage.c damage.h damagestr.h + +commit 682ee8a9f8d55c6a6f517a277d1bfad2a0f28594 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 14:40:33 2004 +0000 + + Integration of DAMAGE-XFIXES branch to trunk + https://freedesktop.org/bugzilla/show_bug.cgi?id=859 + +commit 6ed1c3845517c7731dcc74baa51bb801838afaff +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Jul 29 14:33:43 2004 +0000 + + bugzilla 859 -merging DAMAGE-XFIXES into trunk + +commit 736e511824c4f5e77e637c680a4e45f0b7631644 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Jul 28 03:57:19 2004 +0000 + + Fix shared reqs for Xlibi18n, Xaw6 & Xmu for Solaris + Improved support for Compose and Kana Lock LED's on Sun keyboards + Add event definitions for additional keys on Sun Japanese keyboards + VUID mouse protocol support for Solaris Make default mouse message clearer + on machines that use a default other than /dev/mouse. + +commit d374dffb20364a3df184cc28888ee7edbe50f474 +Author: Rik Faith <faith@alephnull.com> +Date: Wed Jul 28 00:28:00 2004 +0000 + + When using DMX console input, make detached screens display as grey (vs. + white for attached and black for dead-space). + +commit 1498414cc85c148ef15b9b57d9f9b6b850bf2702 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Tue Jul 27 20:26:47 2004 +0000 + + Fix Xprint build on Darwin. + +commit ddd58356123f61b863754eb0bdd42a8defa0461b +Author: Torrey Lyons <torrey@mrcla.com> +Date: Tue Jul 27 20:24:00 2004 +0000 + + Fix XDarwin's broken build of libGL and server side GLX. GL library is only + known to build correctly on Mac OS X 10.3.4 and still needs some work + for earlier versions. + +commit 8ef3e7052e8e1db869411e9f6fc88491e3f05474 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 27 09:53:14 2004 +0000 + + Merge latest changes from CYGWIN branch + Use find | xargs combination instead of simple shell globbing to prevent + commandline argument overflow + +commit a12a678bc9af8df1a3078f574b0c910e3e6983f8 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Jul 27 06:20:52 2004 +0000 + + Fix a bug that caused an entire batch of events to be thrown out when one + of an unknown type is encountered. (Ty Sarna, NetBSD). + +commit 19002e47a0dbf55e035b674116a533ec9814edfa +Author: Alex Deucher <agd5f@yahoo.com> +Date: Tue Jul 27 02:50:41 2004 +0000 + + - enable maven support for TV detection, DPMS, and DDC on crtc2 on G400 + (Ryan Underwood) (http://bugs.xfree86.org/show_bug.cgi?id=1098) + - expose I2CStart; needed for mga maven support (Ryan Underwood) + +commit 2a7b137d41eb8ce6efc45b47b5df0c89eb4f5d93 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Mon Jul 26 22:41:47 2004 +0000 + + remove extra ';' (Alan Hourihane, Keith Packard). + +commit 799208dd44a65b18dda97b4843a27a2628f955f4 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jul 26 19:06:04 2004 +0000 + + Bug #377: Make lib{glx,GLcore,dri} work when compiled as dlloader modules. + +commit f15f881727cee9a879bd43be8dc849320f8d3cbd +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jul 26 17:14:27 2004 +0000 + + Eliminate bogus rate check in fbdevModeSupported. Hmm. Potentially bogus + rate selection necessary for Mac fbdev + Don't know about fb changes to pixmaps, so can't track dirt. + Add Mac specific 1280x854 mode. Warn when requested mode isn't found. + Add ability to soft-boot video cards. + Add region expand request. FIXME: need test cases + +commit 20913b7d5daf90e0f7ad1ee967ad2f0daaec40f9 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Jul 24 17:35:39 2004 +0000 + + Fix a problem with wsmouse driver loosing events on 64bit architectures + (XFree86 Bugzilla #1438, John Heasley). "To fix this, I've added a + mouse buffer (Xisb buffer) "scale" value to the MouseDevPtr type. If + set, it is used as structure size of which we want space for a few." + +commit c57944cd9aaac717d4d4ada44626e35925b39bbd +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jul 24 17:02:49 2004 +0000 + + Check for mmio before restoring crtc/crtc2 pitch registers + +commit 5fdff8b95e8f90221a46717c2f84715ab238460c +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Jul 24 16:32:39 2004 +0000 + + Bugzilla #884: OpenBSD/amd64 support. + +commit cc3e0173d9fae8a40eb46606d9951e3aa1df975a +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Thu Jul 22 19:24:50 2004 +0000 + + Thu Jul 22 20:03:11 2004 Soeren Sandmann <sandmann@daimi.au.dk> + Call MMX solid fill routine when available. + Call MMX operations when available. + New HasGcc34 macro + New file with many operations implemented with MMX intrinsics, conditional + on having GCC 3.4 on i386. + +commit 9565d9e0cf85e6f5fb47acebdd66212bd6cc3e08 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 22 18:17:59 2004 +0000 + + Correct pitch so that accelerator can run on 1400x1050 screens. Add a few + more register sets for cursors. + +commit 67dbad6b3b9163eafae7d9dd7698708e10372a21 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jul 22 06:48:19 2004 +0000 + + DRM 20040721 import + +commit 829b2c72a6433ebaf63f2d2726259c73cca4bd1a +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jul 22 06:48:19 2004 +0000 + + Initial revision + +commit 448e0754e369d433a61ae337bbfd7dba195c5e69 +Author: Phil Blundell <pb@reciva.com> +Date: Wed Jul 21 20:33:35 2004 +0000 + + Include -lts if appropriate. Patch from pattieja@bentham.ispvip.biz. + +commit 0c32a94623b13dd1ac5b015b465bdf890f498282 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Tue Jul 20 15:15:13 2004 +0000 + + Bugzilla #889: Bind -from address to port number 0 instead of 177 + +commit 07e6011106dcfa0ab69861aa7dcbb88382625c16 +Author: Phil Blundell <pb@reciva.com> +Date: Tue Jul 20 14:33:42 2004 +0000 + + Select optimized + 16bpp shadow copy functions if screen is 16bpp. Select -YX versions for + 90 and 270 rotations if architecture is ARM. + +commit 797114414096d7bf7ed0d73a878d0cffef262301 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Jul 19 22:01:52 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=893 - Fixing the + bug that Xprt did not honor ${LC_ALL} when looking for model-config + dirs. + +commit 8853f9331826899229e5b7c964e9c852c0371ce5 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Jul 19 12:07:01 2004 +0000 + + Add support for a8b8g8r8 and x8b8g8r8 pictures, which showed up frequently + with metacity usage. + +commit adf4b38f49da063576b48f9c0750b78bb753b3de +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Jul 19 11:42:49 2004 +0000 + + Breakage in last commit to this file: pCurPriv->area isn't set up until + Enable, these days. + +commit d2e74e419d2c75c5a5b97236d2714730e6f69ee0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Jul 19 11:19:12 2004 +0000 + + Set the right number of texture coordinates for r200 Render support (still + disabled, needs to be tested). + +commit cefcb7f123c962c3715b0c46f30430e87c82a017 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Jul 19 11:16:13 2004 +0000 + + - Add Radeon picture transform support. + - On R128, don't refer to an old Composite's mask transform when the + current Composite doesn't have a mask. + - Staticize some global variables in r128_composite.c. + +commit 9fe216a45836b98b5aea55725019668de3900e83 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Jul 19 07:53:54 2004 +0000 + + Use the offscreen memory manager as much as possible to do the reservation + of memory at startup. Do some drive-by cleanups while I'm here + (sorry!). + +commit e2bb9f38cdcb74fd7630f4efe310ad14d597171e +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Jul 19 07:20:01 2004 +0000 + + Add support for transforms of textures on R128. + +commit c04264727860cbe2e276e1934d6700d0baaf9f73 +Author: Rik Faith <faith@alephnull.com> +Date: Sun Jul 18 22:19:33 2004 +0000 + + Addition of console input after removal of core backend input that is not + on screen 0 can cause a segfault. Fix by preventing reinitialization of + detached inputs. When Xinerama is active and screen 0 is detached, + pixmaps for XGetImage must be obtained from another screen. + +commit 0addd0d499046fc8a6cdc18fc41d34cac2ba77ea +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sun Jul 18 05:21:20 2004 +0000 + + Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=858 - Fixing the + problem that clients cannot use the TrueColor visual without calling + |XInstallColormap();|. + +commit 7f9e263658b1c9c435db851a8afd904a2f584d13 +Author: Kevin E Martin <kem@kem.org> +Date: Sat Jul 17 20:44:14 2004 +0000 + + Revert change to MAXFORMATS to maintain binary compatibility + +commit c47a1bdd7463b6863018e2c4237acfd28b89f38f +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Jul 17 01:13:31 2004 +0000 + + Fix typo in debug message in MakeAllCLTSServerListeners + Add $(GETPEER_DEFINES) to DEPEND_DEFINES for makedepend + Add "localuser" and "localgroup" access types to server-interpreted + authentication scheme. + +commit 3e52373fc8179a59efc9e7ab22ce0cb5160d0409 +Author: Carlos Romero <kcrashcore@bellsouth.net> +Date: Thu Jul 15 09:56:40 2004 +0000 + + Enable i810. + +commit aeb78eaa980ac93f6af3e947ab1ad8bce5bc5bd1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jul 8 08:21:25 2004 +0000 + + Commit the rest of the dirty optimization from 20040703 and add a missing + header include. I don't know how this happened, but I'm going to blame + a "few" fscks having happened between testing the code and committing + (due to other driver changes that made me not blame dirty for the + failures I saw) for disappearance of kasync.c changes. Fixes a lot of + corruption. + +commit b46767352822b09e5dab8b54cbb7a37a9b62de53 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jul 8 06:57:58 2004 +0000 + + Remove duplicate protos in kdrive.h. + +commit 764d9e822b01fdfe3ff088028959cbc48b349026 +Author: Carlos Romero <kcrashcore@bellsouth.net> +Date: Wed Jul 7 20:43:25 2004 +0000 + + missing xkb/[xkb.h, xkbDflts.h] and hw/kdrive/mga/g400_common.h + +commit f96ef08d48b01f6119799ede9ffc43d0134cbf8b +Author: Carlos Romero <kcrashcore@bellsouth.net> +Date: Wed Jul 7 19:21:07 2004 +0000 + + Initial kdrive XKB/XINPUT support, use --enable-xkb --enable-xinput + +commit a5c9b3229ce418a5e3eacc40b7a7f11c0a26d958 +Author: Rik Faith <faith@alephnull.com> +Date: Wed Jul 7 04:32:52 2004 +0000 + + Bugzilla #817 + +commit 1498d7a096f0855fa965585acd9ca4a2780cc959 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Jul 6 23:51:00 2004 +0000 + + - Disable building DMX on OSs that have not been verified to build + correctly (Kevin Martin). + - Fix DMX build when Xinerama is not enabled (Kevin Martin). + +commit 0e45f2a7536bf4b66d6f64d96b44431310884af3 +Author: Egbert Eich <eich@suse.de> +Date: Tue Jul 6 14:49:13 2004 +0000 + + ifdef'ed some IA32-only assembler statements. Presently these chipsets are + IA32 only, anyway (Egbert Eich). + Disabling generic VGA testing for IA64 architectures. Temporarily disabling + support for ZX1 bus. This code is extremely invasive and is executed as + fallback without testing for a ZX1 chipset. It brings a SGI Altrix to a + grinding halt. (Egbert Eich). + +commit df2b55a25b7056ac92c1f6cbee9f16bd0a37ba8c +Author: Egbert Eich <eich@suse.de> +Date: Tue Jul 6 14:37:48 2004 +0000 + + Separated Intel drivers from default DriDrivers to avoid building them on + IA64 (Egbert Eich). + Fixed wrong function prototype (Egbert Eich). + Don't test for generic VGA on IA64 (Egbert Eich). + Fixed a segfault when accessing a structure before verifying the pointer + exists (Egbert Eich). + Added a showcache option for debugging (Egbert Eich). + Increase default video RAM size to 16MB when DRI is enabled and more than + 128MB are available (Egbert Eich). Fixed lockups during mode switch. + Problem was introduced when attempting to copy the behavior during + LeaveVT()/EnterVT() but but forgetting to call I810DRILeave() before + I810DRIEnter(). The entire DRILeave()/Enter() scenario has been + commented out as it didn't seem to be necessary (Egbert Eich). + Fix TweakMemorySize() (tested with i855/i865) (Egbert Eich). + increased MAX_DEVICES to 128 (Egbert Eich). + Use OS provided PCI config space access as default method (Egbert Eich). + Added support for Linux 2.6 proc file format. + Fixed unaligned accesses to pieces of the VBE info block. VESA did not + align elements to size (Egbert Eich). + +commit 7c466d64c34e68e0bc50e083861874161ae02db9 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jul 3 10:23:03 2004 +0000 + + Clean up Rage 128 composite code. Now it composites more operations + correctly and is simpler. + +commit 020701566916c8569f5af7f2efe1de36fea2002e +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jul 3 09:16:30 2004 +0000 + + Add a "dirty" flag to the pixmap private. Clear it when setting up an + offscreen pixmap area, and set it when any rendering occurs. When + moving a pixmap out of offscreen, don't read data back if it wasn't + dirtied (compared to the system memory copy). + +commit fd594b0559caa98ee0823be956aecf9c9d2e52bc +Author: Phil Blundell <pb@reciva.com> +Date: Fri Jul 2 21:30:00 2004 +0000 + + Call ts_read multiple times, to avoid events getting stuck in the pipeline. + +commit 7976ee51afcad41b611e642d2feb31d805dedcf6 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Jun 30 20:06:56 2004 +0000 + + Add Distributed Multihead X (DMX) support + +commit d5db59bd79f5d8788b99056bf9d969b5b3ad99e1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Jun 29 20:37:51 2004 +0000 + + Add an offscreen area scoring to improve choosing offscreen areas to kick + out when allocation can't find a free area of the requested size. When + offscreen pixmaps get used, the offscreen area's score is increased by + a constant value. Every certain number of increases, all offscreen area + scores get decreased by a fraction. When choosing a set of areas to + remove for a new allocation, the set of areas with the smallest total + score is chosen for removal. While this is not the smartest system, it + prevents things like always removing the first offscreen area in memory + (likely the most recent) to be kicked out when doing replacing. + +commit ea78d1c6fcd27d28e69cb97faf72b7b719f6f93e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Jun 28 18:08:26 2004 +0000 + + Add GLX_ALIAS_VOID for GLX_ALIAS of functions with return type void to fix + builds with non-gcc compilers that refuse to let you do return + function_that_returns_void(...) + programs/Xserver/hw/xfree86/os-support/shared/sigiostubs.c Remove includes + of xf86drm.h that break non-DRI builds + +commit 7ff67f2872ddd15908f789ec9bdb76e8211d6431 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 28 00:48:51 2004 +0000 + + Separate out off-screen allocation from Init. Fix Enable to update + off-screen addresses. Wrap RandR to update off-screen addresses. + Set off_screen_base and memory_size fields correctly. + +commit 5b75aae2cf1ad38556e9a55da72ad65419aa7f84 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 26 04:13:03 2004 +0000 + + Add ARGB cursor support for Radeon cards. + +commit 8bc0bc6d36dbc5000069017a1984905065164016 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Jun 25 08:58:18 2004 +0000 + + #Bug 784: Ignore unconfigured interfaces with xdmcp + +commit c5ab3fdd928d12b4dc28108f2242b3b75e1ac65f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Jun 25 08:56:04 2004 +0000 + + #Bug 780: add RRSetScreenConfig + +commit f8226cee08a00b49f32dc3db814478490febe45d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Fri Jun 25 00:02:11 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=791 - Adding + special support for Canon C3200N + +commit ad6b9644a39343437967b4c3b2442dbd47508443 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Thu Jun 24 06:26:27 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=660 : Fix + for the issue that GetPrinterList does not return printer descriptions + on Solaris. The patch implements a framework which allows the printer + enumerator scripts to pass additional printer attributes to the + information pool (currently only "xp-printerattr.descriptor" is + implemented). + +commit 884908a63c624585c9b5fcf22d565236298c2916 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Jun 22 10:18:13 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=789 : Adding + a workaround for the issue that Xprt may hang when the CUPS spooler + frontend sends messages to stdout. + +commit c66cc2a219e860ae3c0b5d4ad18b22a6dc4e16df +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jun 21 13:51:57 2004 +0000 + + Bug 783: rootless patches for cygwin + +commit ed7f92e791f052d64cffef4b44eae5160fb24689 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jun 21 13:44:14 2004 +0000 + + Bug 778: add ddxBeforeReset + +commit 68d92cca1a696521599db6a826d2187ec0c15f01 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jun 21 13:35:05 2004 +0000 + + Bug 782: Merge native OpenGL for Windows from CYGWIN branch + +commit d6e8b1affec7351549c0006cc63b6923091cdd68 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Jun 21 13:19:32 2004 +0000 + + Bug 777: Merge from CYGWIN branch + +commit dfdbb60bf5f613b3554d5435f08f16bde72aa353 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Jun 21 00:29:46 2004 +0000 + + Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=772 - RFE: + Switch default resolution from 300DPI to 600DPI + +commit dd831c7a5c1b0c540a78350aadaeb34a8aa67395 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat Jun 19 21:56:01 2004 +0000 + + Refix for http://freedesktop.org/bugzilla/show_bug.cgi?id=764 : Rework + previous solution and make Xprt to default to "-noreset" (the default + of Solaris version of Xprt) and add a "-reset" option which can be used + to restore the default behaviour on demand. + +commit da78a4ddd833f78baf1d2579a1adea8208016ddb +Author: Damien Ciabrini <braun@club-internet.fr> +Date: Wed Jun 16 21:36:54 2004 +0000 + + Update MGA composite patch commit. (some files were missing in the previous + commit) + +commit e56e24af252bd3b8e58076adf0f8eabf1103f187 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:37:59 2004 +0000 + + Merge DRI-trunk-20040613 changes in programs/Xserver/GL. + +commit 2e1868b560315a8b20d688e646c489a5ad93eeae +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:25:21 2004 +0000 + + DRI trunk-20040613 import + +commit f45c46c630855e8e0d1c28b1f0d3b2ad54334619 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:25:15 2004 +0000 + + Initial revision + +commit 22bad9474b8822f03f84a8a39edce624bfb9befa +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:22:17 2004 +0000 + + DRI XFree86-4_3_99_12-merge import + +commit 1c133c27ccc1f09b95922fdece3c8d73cc182def +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:22:05 2004 +0000 + + Initial revision + +commit b61ff0daa4bd1e3b828dc5b985c3a2f3c92b202e +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:16:01 2004 +0000 + + DRM 20040613 import + +commit bcc1eab1fd57e8cb686d625934a6e527b7ae4ea2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:16:01 2004 +0000 + + Initial revision + +commit 580b9a7da1bf0e20acdcddd676d471b3d6589023 +Author: Jaymz Julian <jaymz@artificial-stupidity.net> +Date: Mon Jun 14 08:43:57 2004 +0000 + + MGA composite support from Damien Ciabrini - thanks! + +commit 95d65cf6bb753d10f4db3d857fb98bb09389228e +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Jun 13 04:50:21 2004 +0000 + + Manual page X(7) does not reference Xprt(1x), xplsprinters(1x), etc. + xc/config/cf/Imake.rules Correct comment to match rule name for + InstallDriverSDKObjectModule + xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbd.c Log results of + ioctls to probe keyboard type & layout + +commit 4ffde8a6b3299f002c10b1abd881e4c6849767ea +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jun 10 19:22:58 2004 +0000 + + - Pass the right pixel mask (all ones) in to PrepareSolid in the + solid-fill-based composite acceleration. + - Use a real pixmap when doing an UploadToScratch (For pDrawable->type == + DRAWABLE_WINDOW, you need to get the backing pixmap). + - Pass back the x/y offsets from kaaGetOffscreenPixmap unconditionally, + because they'll be used in the scratch case. + - Turn on the Render acceleration for Rage 128 and Radeon 100-series at + last! + +commit c3bc6dd551436d5e37a07f37b3b77a83bb5b5da0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jun 10 09:50:59 2004 +0000 + + Align scratch area offsets to the offscreen byte alignment. + +commit cf3f95d2164604047866b283fe0071574bf16dbc +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jun 10 08:37:28 2004 +0000 + + Oops, testers reported that the last patch actually didn't work (conflicts + occurred), so the R300 PDMA doesn't work. Disable. + +commit 0b7647ee359537953b67b0dbf9daa807e356062b +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jun 10 05:57:31 2004 +0000 + + Bug #242: Fix setup of R300 cards, by providing R300 CP code from + volodya-project and initializing PDMA. + +commit b3a18ca8b827cfe2ebb295a03a9776028242c1a0 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Mon Jun 7 05:13:29 2004 +0000 + + Neomagic driver enabled + +commit 893ea125597f3c6273f45a51673d4dc514e754e9 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Mon Jun 7 05:05:10 2004 +0000 + + small fixes. README added + +commit d9cca52feba13b69f3eea9e1d958b8a4711e7d67 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jun 4 17:06:18 2004 +0000 + + Add (stubbed out) Xgl server code + +commit f8a1dd3ce725195baa6f38a880299752c6c6c2c4 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jun 4 16:10:50 2004 +0000 + + Add top-level build support for GL X server (not working yet) + Fix a few allocation bugs with alternate visual ids Allow for non-8/8/8 + alternate visuals + Turn off any existing shadow before enabling it again (avoids + re-registering existing damage) + Add some validation code to catch re-registered damages + +commit 6741fadc52598af0096f106a2cefd640abb434b3 +Author: Phil Blundell <pb@reciva.com> +Date: Wed Jun 2 20:49:50 2004 +0000 + + New conditional. (REQUIRED_MODULES): Demand xcalibrateext if building + XCalibrate. + New file. + Add xcalibrate.c. + Read raw events if requested. + +commit d4d0c8470c4272dec642ab4c68f44a83cda06971 +Author: Phil Blundell <pb@reciva.com> +Date: Sun May 30 20:40:30 2004 +0000 + + Add -lts if using tslib. + +commit 8124810950d7e0b9db7f66dadee7218b0c26c4c3 +Author: Carlos Romero <kcrashcore@bellsouth.net> +Date: Sun May 30 13:51:18 2004 +0000 + + Initialize permedia engine for acceleration to work. + +commit ea1bbf8d83d3780ccce5ebcdff48f0b19863cee1 +Author: Ralph Thomas <ralpht@68k.org> +Date: Sat May 29 12:15:46 2004 +0000 + + Adding driver for VIA CLE266 graphics chip. Currently it only accelerates + copy and fill operations. + +commit 6af411b02e808220d3afcef14abb97eec86cf1f3 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Fri May 28 04:56:49 2004 +0000 + + Hey, I like devfs. + Try /dev/fb/0 if /dev/fb0 fails. + +commit a7b42f685e7a4bf57cf89a3ef664a581ecedb50f +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Thu May 27 14:11:42 2004 +0000 + + file ChangeLog was initially added on branch CYGWIN. + +commit 05a3dbf5dc55ea534c68fc9d05b3949805a0752e +Author: Egbert Eich <eich@suse.de> +Date: Wed May 26 17:44:29 2004 +0000 + + Updated x86emu and resynced with upsteam at Scitech. + +commit 9549f628e066396e6bc9a7edfc919bdd6860f170 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue May 25 20:33:46 2004 +0000 + + getconfig: file '/usr/X11R6/lib/X11/getconfig/xorg.cfg' has bad signature + (Change "Xorg Project" to "Xorg Foundation" to match getconfig script) + +commit f8124d3ef5890d59c3ce41bee46b5e3576d0f9b1 +Author: Carlos Romero <kcrashcore@bellsouth.net> +Date: Tue May 25 13:02:44 2004 +0000 + + Add pm2 to the build + +commit 32d0920ef9ec3c5e61089b88dedc82ffab294276 +Author: Carlos Romero <kcrashcore@bellsouth.net> +Date: Mon May 24 19:31:41 2004 +0000 + + Initial import of Permedia2 driver + +commit 5b2211ec3545f1634f807daf84b6c4bc2c0fdecf +Author: Egbert Eich <eich@suse.de> +Date: Mon May 24 19:05:01 2004 +0000 + + Muffle compiler warnings. + fix option name in log message. + improve debugging messages. + +commit 932efe8e6d4e6280aed9b5e25af56888c964d37b +Author: Keith Packard <keithp@keithp.com> +Date: Fri May 21 03:32:27 2004 +0000 + + Allow for multiple composite-based visuals, then add an RGB24 visual in + addition to the ARGB32 one. This allows 'glitz' to run on top of any X + server using mesa. + Switch to using 32bpp for depth 24 pixmaps (even when the frame buffer is + not depth 24). + +commit cde51fd05b2bd413d8db8ad750e6a72398a7039c +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 20 19:51:44 2004 +0000 + + Miscomputing pitch in 24bpp modes because of rounding errors. + +commit b9d920f3dc060d230a4a7b2d40210524acf50666 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 20 05:27:03 2004 +0000 + + Fix SYNC_ALWAYS (debugging) code to use mach64WaitIdle instead of + KdCheckSync -- the boolean used in the latter won't be set yet. + Oops. == instead of =. + Must sync hardware before rasterizing trapezoids in case the mask is in + off-screen memory and has just been erased. Yes, it is silly to place + masks in off-screen memory. That's a separate issue. + +commit 94648799c82e59166155ca5abf22a9391693e6a1 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 20 02:42:20 2004 +0000 + + Pin header-only pixmaps in memory. + Off-screen reallocation could have used a stale pointer. + Separate framebuffer mapping computation from actual frame buffer mapping. + Now map the frame buffer from vesaEnable so that VT switch shares the + same mapping code. This makes sure any shadow framebuffer is allocated + again. + +commit cade317d31dddab61199d5e90bcff36fb12f3cd1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon May 17 20:18:02 2004 +0000 + + Overhaul of the ATI driver: + - Add monochrome hardware cursor support. + - Try to auto-detect AGP support for DRI on Radeons. And fail. Detect it + properly on R128. + - Set up card for pseudo-DMA if possible. Convert 2D rendering code to + prepare DMA packets only. Use generic code to decode DMA packets to + MMIO if PDMA is unavailable. Add WIP code to support "real" DMA without + DRM support. + - Dispatch pending DMA commands when the server sleeps. Otherwise some + things, such as typing in an xterm, wouldn't show up for a time. + - Fix Radeon Composite acceleration in many ways, and add Rage 128 + Composite acceleration. Disable them both due to still-not-understood + issues they have. They fail with In, Out, AtopReverse, and Xor, and + text rendering is strange. + - Add textured XV support for R100 and Rage 128. No brightness/sat + controls, but it does support multiple ports, and cooperates with + Composite. + - Add WIP code for hostdata uploads. + - Many cleanups and fixes. + +commit 834537e212e01314b60737278b7abc6bb7cef102 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon May 17 07:19:49 2004 +0000 + + Make kaaMoveInPixmap public. This will be used by the ATI driver's xvideo + support to ensure that the destination is in framebuffer. + +commit 85f46e0bcdf60d145a6868ee71d10688c9113e6e +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon May 17 07:14:23 2004 +0000 + + Add new CheckComposite hook. This allows a driver to avoid the migration of + pixmaps for a Composite operation if the operation can't be supported. + This hook is optional. + +commit 47fb207c8ae2b54e976066f78892a1ee3fb35d30 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun May 16 05:08:39 2004 +0000 + + xc/programs/Xserver/fb/fb.h + xc/programs/Xserver/fb/fboverlay.c + xc/programs/Xserver/fb/fbscreen.c + - Change #ifdef for checking for old format miScreenInit to + FB_OLD_MISCREENINIT for easier portability to xservers with updated + screen structs but old function prototypes. Make it automatically + defined if FB_OLD_SCREEN is defined. + - Add _LP64 to list of #ifdefs for 64-bit platforms to support + 64-bit Solaris. + +commit fc2dd516c3c7382915452207180a1c483d0d73ca +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun May 16 00:03:54 2004 +0000 + + xc/programs/Xserver/hw/xfree86/xf86config/Imakefile + xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.c + - Clean up server name changes from TM branch + - Set default XKB rules file name correctly + - Use default font path from Imake configuration for the default font path + in generated xorg.conf files. + - Use path variables from Imake configuration for paths to files, in case + vendor has configured them to install somewhere other than the + defaults. + +commit b1aa9499ffb827f4b1acc75f197e332bba382565 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat May 15 14:43:05 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - + RFE: Xprt default BIGREQUESTS extension buffer size should be 8MB (to + make |XpPutDocumentData()| happy and to improve performance). + +commit 74b2a7694791297a4f798ecc05c7eb8f68634722 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri May 14 00:34:28 2004 +0000 + + Add new flag, KAA_OFFSCREEN_ALIGN_POT, which tells KAA to align pixmap + pitches to a power-of-two number of bytes. Useful for Render + acceleration on older cards. + +commit 2bea33e881693e7d7dcf938db79c888a71dfb2fb +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri May 14 00:27:29 2004 +0000 + + Don't let the visible screen get "migrated" offscreen, which manifests + itself as a hang. + Reported by: Ginokas <ginokas@free.fr> + +commit 40354e761892dc2ef88d2e722d8d7896642003eb +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu May 13 22:57:15 2004 +0000 + + Add generic functions for copying packed/planar XV data, copied from + mach64. + +commit 2e330e980f61b256c55f5b9debb00574e4e85b26 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu May 13 21:41:48 2004 +0000 + + Move fourcc.h to a generic location in src/. + +commit f52a4d472d2463482d865c5006208182c294e670 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 13 21:25:51 2004 +0000 + + Follow GLX in setting ARGB visual nplanes to 24. + Retry current mouse protocol when sync is lost + +commit aa5a87847290d49b03a33351ebfd8df652a42489 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu May 13 21:15:06 2004 +0000 + + There's no need to explicitly set softCursor -- kdrive handles this if the + cursor hooks aren't set. + +commit 4078457919708a8dbf9db8ee6e4871ecbf72518f +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed May 12 01:49:46 2004 +0000 + + Fix problems in render fb implementation found by rendercheck: + - fbCombineSaturate was pointed at fbCombineDisjointOver, instead of + fbCombineDisjointOverReverse as it should. Instead, point + fbCombineDisjointOverReverse at fbCombineSaturate (which is likely to + be faster). + - fix previously-unused fbCombineSaturate implementation. + - fbCombineMaskAlphaC was just a copy of fbCombineMaskValueC. Make it do + what it's supposed to (return a cs.alpha). + - fbCombineAtopC didn't invert the source alpha value. + - fix copy'n'paste errors in fbCombine(Dis/Con)jointGeneralC, also source + alpha wasn't treated in a component fashion. + - fbCompositeSrc_8888* didn't handle when the source lacks an alpha + channel. Rather than adding that and possilby slowing down the (normal) + alpha case, don't let x8r8g8b8/x8b8g8r8 Pictures be used in + fbCompositeSrc_8888* because Over with one of these is just Src. + +commit a43d5412b4d79d67af20dc8af144a9ca80263e9d +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Sun May 9 16:20:13 2004 +0000 + + file ChangeLog was initially added on branch CYGWIN. + +commit 0498d818fe40cb4eb03983e27a980791bbadf6db +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sat May 8 02:06:46 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=608 + ("Can not print on Debian/CUPS due to error |Xprt_64:lpr: unable to + print file: server-error-not-accepting-jobs|"): Xprt did not setup the + list of supplementary group ids, causing print failure when the the + calling user must be a member in a specific group to be allowed to + print. + +commit 75d96afcc4a1f201da665bd73b7067e8e7139a3f +Author: Egbert Eich <eich@suse.de> +Date: Thu May 6 17:31:17 2004 +0000 + + BugZilla #601: Fixing makedepend choking on floating point exception + because CHAR_BIT is defined to __CHAR_BIT__ which is a compiler + intrinsic define. BugZilla #605: Fixing build on IA64 which is broken + due to the inclusion of the kernel header asm/page.h. Kernel headers + however don't work with + -ansi. The inclusion of asm/page.h can however savely be removed as it + there are plenty of other ways to determine the page size. + +commit 7124cfaa006e840ba48dcc466c0dc8b34503a686 +Author: Keith Packard <keithp@keithp.com> +Date: Thu May 6 16:19:32 2004 +0000 + + Use current resolution by default, change rate to 75 to match + fbdevModeSupported cut-off (?). Glenn McGrath <glennm@hydrix.com> + +commit e4ac2411eddf1f01ef9204f27b6d1ce8f1749439 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Thu May 6 01:53:52 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=551 - + PS DDX will not build on platforms with BuildFreeType NO. Patch by Alan + Coopersmith <alan.coopersmith@sun.com>. + +commit b1c65e1ca6828ea82ee7790f22c26503b0a5e17d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Thu May 6 00:24:32 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=536 - + RFE: PS output should contain the FreeType2 version being used. + +commit 8d4f21ab53c44ca48501d6211ea6db0c0b8af916 +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:15:41 2004 +0000 + + Add XACE and XSELINUX extensions to the build system + +commit 0106715000196c7b349a0b4494b61545f0f5e138 +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:07:37 2004 +0000 + + Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE + +commit 8526cd6395490b03b279f1962df777fb0e4a9878 +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Wed May 5 20:04:52 2004 +0000 + + Replace XC-SECURITY code with XACE security hooks + +commit 6d066cb10990d951449b342b40dec1f1b1ae593c +Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> +Date: Tue May 4 19:44:02 2004 +0000 + + Merge the new release from HEAD + +commit b5f200ce9d495c6ce94e0170909465a30e8799d9 +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 4 03:28:06 2004 +0000 + + Attached is a patch to fix a build error whe ncompiling with tslib support, + a variable wasnt set, i just changed it to be like the other + MAkefile.ams :) -- Glenn McGrath <glennm@hydrix.com> + +commit 5ca651e66f3d0ab189962bb4609b87a865364ef8 +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Apr 30 12:48:56 2004 +0000 + + file winmessages.h was initially added on branch CYGWIN. + +commit 2c2c1704b542f29fe5ac9917e1141040a0dbd3e9 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Thu Apr 29 23:59:15 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 - + Xorg Xprt starts to consume 100% CPU when being idle for some time + (internal screensaver goes mad after 10mins) + +commit a8429d76103ff0f4fc61db86201c741f91bfcba2 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Apr 28 07:26:46 2004 +0000 + + Add completely fake X server -- draws to allocated buffer, has no keyboard + or mouse. + +commit 85e4e5445218d70f627fb132a8e8f18470e6749d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Mon Apr 26 11:07:03 2004 +0000 + + Work-in-progress for + http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=542 - GLX + support for PS DDX / part #1: Fix visual setup (attachment #243) + +commit 46472cbee679f9757c4003a0dcf158aeb3852f47 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Apr 26 02:39:58 2004 +0000 + + xc/config/cf/sun.cf + xc/config/cf/sv4Lib.rules + xc/programs/Xserver/Imakefile + xc/programs/Xserver/hw/xfree86/os-support/sunos/find_deps.pl Make Solaris + builds work when using MakeDllModules (it's not the default yet, but at + least it works now if you turn it on) Also improve default compiler, + optimizer, & linker flags for Solaris builds using either Sun cc or gcc + xc/programs/Xserver/cfb/Imakefile.inc + xc/programs/Xserver/cfb/stipsparc.s + xc/programs/Xserver/cfb/stipsprc32.s Remove text relocation error when + building shared versions + +commit 36e3e5430e1ca7103a4e0b796eb3817975b40d90 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Sun Apr 25 22:42:09 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=541 - + Xorg Xprt may crash with "Freeing resource id=40200000 which isnt + there" + +commit 2fb588620030ad393f8500d60e16144d59e4effe +Author: Egbert Eich <eich@suse.de> +Date: Fri Apr 23 19:54:30 2004 +0000 + + Merging XORG-CURRENT into trunk + +commit 0664db19bf37f9dd69cca6adff4e238e310c3092 +Author: Egbert Eich <eich@suse.de> +Date: Fri Apr 23 18:54:16 2004 +0000 + + Merging XORG-CURRENT into trunk + +commit 68fd529608c58334f13beb88dbcc1d5db85b9b00 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Apr 21 23:24:20 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=535 - + Xprt should not annouce extensions which are not supported + +commit 1af13123fa79ad1c6747aad60ed458bbd69da12d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Wed Apr 21 10:03:41 2004 +0000 + + Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=530 - + Land XPRINT branch on XORG-CURRENT + +commit 449e83a9470ec4bdd0871e2f263f608b24455423 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Apr 18 03:00:43 2004 +0000 + + xc/lib/GL/glx/Imakefile + xc/lib/GL/mesa/src/Imakefile LargePICTable required for Solaris SPARC + builds + xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c + xc/programs/Xserver/hw/xfree86/common/xf86Events.c Add != NULL to if + statements to get past syntax error reported by Sun Forte 6.1 cc. + xc/config/imake/imake.c + xc/config/cf/sun.cf + xc/config/cf/sunLib.tmpl Allow compiling with Sun compilers installed + somewhere other than /opt/SUNWspro + xc/programs/Xserver/hw/xfree86/common/compiler.h + xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h Check for + defined(sparc) as well as defined(__sparc__) since Sun compilers don't + define __sparc__ + +commit 425251a752805affb6ce14baa58d92c384f39501 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sat Apr 17 18:47:05 2004 +0000 + + Bugzilla #495: LocalClientCred should use getpeerucred on Solaris 10 + +commit 7215fb186f076a24d0a04c9c20ac9b92cae1f49b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Apr 16 00:21:24 2004 +0000 + + xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_mouse.c Solaris mouse + enhancements, including autoprobe support, VUID wheel mouse events, and + streams module pushing. Bugzilla #434. (Russ Blaine & Alan Coopersmith, + Sun Microsystems) + xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c Xorg doesn't + reset console to text mode on Solaris x86 8 and later Bugzilla #469. + +commit c6c6d0de2309019999fa75a2f36a4f4a93ad2f31 +Author: Egbert Eich <eich@suse.de> +Date: Thu Apr 15 10:17:35 2004 +0000 + + Merged changes from RELEASE-1 branch + +commit 9d24a5fa91bf165bbd2048a844edeb59b5e34aad +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Wed Apr 14 00:01:22 2004 +0000 + + file XWinrc.man was initially added on branch CYGWIN. + +commit 01bb5eb5032a7566c86a51053146dba98a3ed749 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:46 2004 +0000 + + file psout_ftpstype3.c was initially added on branch XPRINT. + +commit cb3f3d8f2283d384dc5a3af3f38053cc8a2d192e +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:46 2004 +0000 + + file psout_ft.c was initially added on branch XPRINT. + +commit 7cfb4c2b33ae2147b5d6ddc2afc8b777686a666f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:46 2004 +0000 + + file psout_ftpstype1.c was initially added on branch XPRINT. + +commit 4ae42e79d46d7db30f7b6f321bbb0d134862138d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:46 2004 +0000 + + file PsFTFonts.c was initially added on branch XPRINT. + +commit b5fb71922b02024aa5a8f349c9d2c956e2f83f0f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:45 2004 +0000 + + file xprint.sh was initially added on branch XPRINT. + +commit ca9a9a58be51a21f123b11dd68047034696cae84 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:45 2004 +0000 + + file xprint.csh was initially added on branch XPRINT. + +commit 7c1f840108172d6b18af47465ea72f4820640598 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:45 2004 +0000 + + file cde_xsessiond_xprint.sh was initially added on branch XPRINT. + +commit 579221198aeac7010435b29db1ad8fe9ee2d7c5d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:44 2004 +0000 + + file spooler.c was initially added on branch XPRINT. + +commit 7677b4992fee7eb73cc97914163dcf689ad13d6a +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:44 2004 +0000 + + file spooler.h was initially added on branch XPRINT. + +commit d3907ca519b476c99e29a58c22258f22dbe63244 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:44 2004 +0000 + + file document was initially added on branch XPRINT. + +commit 3646bb9c894d5f011e2df4fac402118d8350102e +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:39 2004 +0000 + + file spooltodir.sh was initially added on branch XPRINT. + +commit 8c006df3c6d8e5ac95f0b0fa38a030100541598f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:39 2004 +0000 + + file model-config was initially added on branch XPRINT. + +commit 95a84bc0cb809e5c7141d0411e329a3ec300b8aa +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file ZapfDingbats.pmf was initially added on branch XPRINT. + +commit 5527b39e668ea7a88c41186dbb6d7b66e892547a +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-Roman.pmf was initially added on branch XPRINT. + +commit 69c405ac66b1a15076e247dd1b578b7b4b210b00 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-Italic.pmf was initially added on branch XPRINT. + +commit b6b75f677292ed0c694921df0abf40038dd5e99d +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-BoldItalic.pmf was initially added on branch XPRINT. + +commit 6605566bcf008551d33a9a68bd03e9a0c57c4f60 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-LightItalic.pmf was initially added on branch XPRINT. + +commit 38ad2972bffea1019214785ee479f7670ca70d1f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-Light.pmf was initially added on branch XPRINT. + +commit 10d8eace174a9778a3313ac36a3422637b020d5f +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-DemiItalic.pmf was initially added on branch XPRINT. + +commit fb5ac8e2bdfe1217663679f5eae8045473456752 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-Roman.pmf was initially added on branch XPRINT. + +commit 5ec311b05dc1e509c115ccca808ee05090cfddad +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-Italic.pmf was initially added on branch XPRINT. + +commit 70947a8f1addf4ca17e50d9e6ae590266ac446cc +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Symbol.pmf was initially added on branch XPRINT. + +commit 436ff77b21515cd9fe9732e0bd5361f2bfba44ed +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Times-Bold.pmf was initially added on branch XPRINT. + +commit 4db563027844245d6c9085f997e75da743410885 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-Bold.pmf was initially added on branch XPRINT. + +commit 79110faa2eac849756b859071ce68fba64de57aa +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file NewCenturySchlbk-BoldItalic.pmf was initially added on branch XPRINT. + +commit 4e1ae7e9cc04806f4436759764cc680ecf1f014c +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Souvenir-Demi.pmf was initially added on branch XPRINT. + +commit 433913bacf988908b94c420452c042eebcb381ac +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-Demi.pmf was initially added on branch XPRINT. + +commit d5bae63138ab833fdd56bb983436ac514536d7b6 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-DemiOblique.pmf was initially added on branch XPRINT. + +commit 3acd6856617e784ee30333dc9b779189a3f44052 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-Book.pmf was initially added on branch XPRINT. + +commit 5f73192458136fe4b6b82372c3b1653fbf831ebd +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica.pmf was initially added on branch XPRINT. + +commit e129abc3bf269e857aa65065cc18a31a56ba0373 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica-Oblique.pmf was initially added on branch XPRINT. + +commit 576a4cddf995082d10e2e29e1b58c1564eb11ee7 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica-BoldOblique.pmf was initially added on branch XPRINT. + +commit cf26c87833a79427b665abce67ca19f2b68bc8e5 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Helvetica-Bold.pmf was initially added on branch XPRINT. + +commit a091408c372a2aa89fb83b023248f45aa8cd4173 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier.pmf was initially added on branch XPRINT. + +commit 9e4221d08ff9a408fb25a32887390b14788b1558 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier-Oblique.pmf was initially added on branch XPRINT. + +commit 6b2674078079a5959a2b7758e6c628a14ec1a46c +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier-BoldOblique.pmf was initially added on branch XPRINT. + +commit 6aee2d37b95170a65ee08c0866c425f115ebc9f1 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file LubalinGraph-BookOblique.pmf was initially added on branch XPRINT. + +commit 7a59fe1dd987e1ef0abd92e0ac80dd87a15137fe +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-Demi.pmf was initially added on branch XPRINT. + +commit 22e0316acc8992033fc82a38f663fce130e4031b +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-DemiOblique.pmf was initially added on branch XPRINT. + +commit f8aded3a7f8c97731e33b4362243da947fb4e774 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-Book.pmf was initially added on branch XPRINT. + +commit 2224187c05d4dc05f7e03e22307cf7816d69f789 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file AvantGarde-BookOblique.pmf was initially added on branch XPRINT. + +commit 9eafaaf83294d1988b30bde4485a299cf8ae5035 +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file Courier-Bold.pmf was initially added on branch XPRINT. + +commit f9eea9864e333efde97143278916da44639cc18a +Author: Roland Mainz <roland.mainz@nrubsig.org> +Date: Tue Apr 13 03:16:38 2004 +0000 + + file ps2pdf_spooltodir.sh was initially added on branch XPRINT. + +commit 20248eedd69c42c27605d7bcfb265994f5846f17 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Sun Apr 11 16:39:48 2004 +0000 + + fixed Changelog format + +commit bc7168ee763ffac9cbb992096a53b346cd640a13 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Sun Apr 11 16:24:03 2004 +0000 + + Added ROP + +commit 784d37ee369b94c83c4cc6e280a39f32da8aa678 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Sun Apr 11 15:51:04 2004 +0000 + + Fixed size calculation in solid rendering + +commit 056322336cbb6093d74aa9d22bbfd42e2248a16a +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Sun Apr 11 15:20:17 2004 +0000 + + Basic bitblt implementation + +commit c231856a1343e38381e1b4e545ff1ac279141bf0 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Sun Apr 11 00:53:10 2004 +0000 + + First acceleration function implemented (DrawSolid) + +commit 47436a8af82a00d0d392cef4d5906729d9a37649 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Sun Apr 11 00:15:57 2004 +0000 + + Finnally got MMIO working all timecat ChangeLog cat ChangeLog cat ChangeLog + :-D + +commit 1740b938e4c4f1cd3de700ea26143b01c0312325 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Tue Apr 6 18:09:44 2004 +0000 + + Return back to VESA only version + +commit 07bc231872e7e056fa3049a0fcd963c61f826f80 +Author: Franco Catrin L <fcatrin@tuxpan.com> +Date: Mon Apr 5 18:19:34 2004 +0000 + + small fixes, but still can't get this driver woking again + +commit b526276faa765df893197e04370a915ed73947dc +Author: Brent Cook <busterbcook@yahoo.com> +Date: Mon Apr 5 02:52:35 2004 +0000 + + removed hardcoded vesa references so we can operate with any backend. fbdev + works for initializing the screen, but input fails shortly after. + +commit 920e6ff81baeec16465f81bacbcff711ce82e149 +Author: Brent Cook <busterbcook@yahoo.com> +Date: Sun Apr 4 07:30:07 2004 +0000 + + Begin separating VESA calls into a more generic backend wrapper like the + ati driver, cascading between VESA and FBDEV. We only have init + functions done so far; need to add all of the others. Fixed some + compiler warnings. Whitespace and formatting cleanups (using 4 spaces, + no tabs) + +commit 530371ceaf7f593badf38bbc2d2e50f6a920d24f +Author: Brent Cook <busterbcook@yahoo.com> +Date: Sat Apr 3 22:26:37 2004 +0000 + + added touchscreen support, detect all known PCI chips in the Neomagic line. + We'll not bother with ISA for now. + +commit 962b898868dcab959c390986dcb0b4dd750dc107 +Author: Brent Cook <busterbcook@yahoo.com> +Date: Sat Apr 3 22:22:48 2004 +0000 + + initial import of original driver by Franco Catrin L. Wraps VESA for most + parts, with some hardware acceleration enabled for the cursor on the + NM2300. + +commit 8a2fce3b90b5efc8bab19675cb8e02690e24442e +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Sat Apr 3 05:01:21 2004 +0000 + + file winkeyhook.c was initially added on branch CYGWIN. + +commit 12d5371ed2fbefab069dea46be972a7269b8c2db +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 18:31:54 2004 +0000 + + file xfixes.h was initially added on branch DAMAGE-XFIXES. + +commit a4b319dbf375461c975450659723e6326153e536 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 18:31:54 2004 +0000 + + file xfixes.c was initially added on branch DAMAGE-XFIXES. + +commit 5319d30d45d5f8ec04a496327f32cc6431c6a511 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 18:31:54 2004 +0000 + + file select.c was initially added on branch DAMAGE-XFIXES. + +commit 76f247bd0ef23d688028c63b5f8bd3e9ad6b1b45 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 18:31:54 2004 +0000 + + file saveset.c was initially added on branch DAMAGE-XFIXES. + +commit 83f0f1babb612774f609c71879a225c43f63ac1f +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 18:31:54 2004 +0000 + + file cursor.c was initially added on branch DAMAGE-XFIXES. + +commit 52bc7693dbe7e3db916f8d463d9a750e3c6ffa4d +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 18:31:54 2004 +0000 + + file region.c was initially added on branch DAMAGE-XFIXES. + +commit 5d9098cb17cd88cfdf49de92bec2a787d6681649 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 18:31:54 2004 +0000 + + file xfixesint.h was initially added on branch DAMAGE-XFIXES. + +commit ace9aa7c45ff2ea6b3476006574da5c27d05afd4 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 17:41:24 2004 +0000 + + file damage.c was initially added on branch DAMAGE-XFIXES. + +commit 72dc7569c6bbc216f613be21ea4f79d3ef1d5534 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 17:41:24 2004 +0000 + + file damage.h was initially added on branch DAMAGE-XFIXES. + +commit 95da7b7e061b6925d8cd85bc7b25708ff253fcb1 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 17:41:24 2004 +0000 + + file damagestr.h was initially added on branch DAMAGE-XFIXES. + +commit 629c3792225cec28572081ebc8dda3fd803fe616 +Author: Egbert Eich <eich@suse.de> +Date: Tue Mar 30 14:23:15 2004 +0000 + + 36. Conversion: __AMD64__ > __amd64__ (Egbert Eich). + 35. Fixed stretching option and centering in C&T driver (Egbert Eich). + 34. Added support for memory size tweaking in BIOS for i845 (Egbert Eich, + thanks to Christian Ziez) + 33. Removed video playback dependency on Accel in NSC drivers (Egbert + 3Eich). + 32. Fix HW cursor state on Savage driver when entering VT as some BIOSes + seem to enable it unconditionally (Egbert Eich). + 31. Fixed Emulate3Button message to distinguish between 'hard' (ie. + configured) and 'soft' (ie. automatic emulation that is disabled as + soon as the middle button is pressed) (Egbert Eich). + 30. Free XrmDB in XCloseDisplay() only when implicitely allocated by + XGetDefaults(). If Client allocates it itself it should free it also. + Trying to free it for the client may result in segfault if the client + has already freed it (Egbert Eich). + +commit b5e400867feab935aa04e9aadb12deb0601b7f83 +Author: Egbert Eich <eich@suse.de> +Date: Tue Mar 30 14:14:31 2004 +0000 + + - backing out XFIXES and DAMAGE related code that accidentally went in + here. + +commit 0017ddaa6406524d0a86ff7020eed4c33758ddbd +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 02:16:15 2004 +0000 + + file damageextint.h was initially added on branch DAMAGE-XFIXES. + +commit 4b5112fd0593b34e6e096d88b0841a28636600f6 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 02:16:15 2004 +0000 + + file damageext.c was initially added on branch DAMAGE-XFIXES. + +commit 733bfa4b5dd5255713a98f390a1fb65be6e16c2d +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Tue Mar 30 02:16:15 2004 +0000 + + file damageext.h was initially added on branch DAMAGE-XFIXES. + +commit b1ed473ef2e1da99d7fe3df14fdef4d8b6365626 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Tue Mar 30 00:31:28 2004 +0000 + + file winrandr.c was initially added on branch CYGWIN. + +commit fec5095bdfb376d0046e2f52188c68bef4e31fd7 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 28 07:14:30 2004 +0000 + + file xorgcfg.man was initially added on branch XORG-RELEASE-1-TM. + +commit 136a9364be80f407f498e9e9695cadaab39227ad +Author: Keith Packard <keithp@keithp.com> +Date: Sun Mar 28 07:14:30 2004 +0000 + + file XOrgCfg.cpp was initially added on branch XORG-RELEASE-1-TM. + +commit 881afb356d6992bcfbbfcbdf31f1f71c64d648da +Author: Keith Packard <keithp@keithp.com> +Date: Sat Mar 27 17:01:11 2004 +0000 + + file Xorg.man was initially added on branch XORG-RELEASE-1-TM. + +commit d2119ac7c56ba94db1d8639937b13e72288a328c +Author: Keith Packard <keithp@keithp.com> +Date: Sat Mar 27 17:01:11 2004 +0000 + + file xorg.conf.man was initially added on branch XORG-RELEASE-1-TM. + +commit 5a9f3a36a35549f30fc67a8e3a3e9a201efb91ec +Author: Egbert Eich <eich@suse.de> +Date: Fri Mar 26 20:02:03 2004 +0000 + + file xorgHelper.c was initially added on branch XORG-RELEASE-1-TM. + +commit b2b0e70fe5c65c8f2d518f5f0ce89a86938701ed +Author: Egbert Eich <eich@suse.de> +Date: Fri Mar 26 19:54:39 2004 +0000 + + file xorgconf.cpp was initially added on branch XORG-RELEASE-1-TM. + +commit 83880dd464a415d3d0efa546b1f0b9887342e809 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Fri Mar 26 17:11:49 2004 +0000 + + 29. XkbWriteRulesProp fails if XkbRulesFile is NULL. Bug #376. (Alan + Coopersmith) + +commit 861a33678243349b987ff30912985968ede8ac84 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Fri Mar 26 01:22:18 2004 +0000 + + oops + +commit 23d552bbef2984afee889f82ded154478548ee15 +Author: Egbert Eich <eich@suse.de> +Date: Thu Mar 25 11:00:52 2004 +0000 + + file xorg.cfg was initially added on branch XORG-RELEASE-1-TM. + +commit d1e52f13ad4610ec4907432c21384d08d6aaaf27 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Mar 25 05:11:16 2004 +0000 + + oops + +commit f0336f18ee4106050104cb060c38fe87541615da +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Thu Mar 25 03:45:49 2004 +0000 + + built,working DAMAGE/XFIXES in mono tree + +commit f1394ec3cec09ff9c5fbbff3c1f595a642b25f91 +Author: Torrey Lyons <torrey@mrcla.com> +Date: Wed Mar 24 22:15:25 2004 +0000 + + Change XFree86 Project to X.Org Foundation in localized XDarwin splash + screens. + +commit d2bbcc0deed3a607d347ed4ef07ded9bcb44f1bb +Author: Torrey Lyons <torrey@mrcla.com> +Date: Wed Mar 24 22:12:34 2004 +0000 + + Change XFree86 Project to X.Org Foundation in XDarwin splash screen. + +commit 84d25a5e178835234261a63f0a1b8131c01bbe1f +Author: Egbert Eich <eich@suse.de> +Date: Wed Mar 24 15:58:45 2004 +0000 + + file xorgVersion.h was initially added on branch XORG-RELEASE-1-TM. + +commit 685d1630c1540e29644849254bd45708aa5763bb +Author: Egbert Eich <eich@suse.de> +Date: Tue Mar 23 12:46:30 2004 +0000 + + file xorgconfig.man was initially added on branch XORG-RELEASE-1-TM. + +commit 6631bd586f74f89e2dce74fe1cc25ee982883323 +Author: Egbert Eich <eich@suse.de> +Date: Tue Mar 23 12:46:30 2004 +0000 + + file xorgconfig.c was initially added on branch XORG-RELEASE-1-TM. + +commit 05a16f4acce3b6ef4ddafe044f96774de3f75b7c +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Mon Mar 22 13:43:35 2004 +0000 + + file glwindows.h was initially added on branch CYGWIN. + +commit 3c2e2d9ae0704931737bb0879a49a8575a07d13b +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sun Mar 21 22:55:35 2004 +0000 + + bug #357. Fix XDarwin so it builds on Mac OS X 10.2 and earlier. Merged + down from -RELEASE-1-TM and -RELEASE-1 + +commit 122be5328ffea0a3b92612b8ea0f5b02736ac175 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Mar 19 23:16:06 2004 +0000 + + no bug report. Restore Credits to the hw/darwin ddx that were deleted + previously. RTF may or may not be "human readable," but with a little + effort it's about as readable as SGML, IMNSHO. + +commit 551c93da612923f8d32707adc16431979bad6fb0 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Mon Mar 15 04:33:23 2004 +0000 + + file winkeynames.h was initially added on branch CYGWIN. + +commit 0c97b290015186acbaadae9a9bf79f37c3d38b40 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Mon Mar 15 04:33:23 2004 +0000 + + file winkeymap.h was initially added on branch CYGWIN. + +commit dae90c3af98edd5e95289abd930b3872c996c503 +Author: Egbert Eich <eich@suse.de> +Date: Sun Mar 14 08:34:49 2004 +0000 + + Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 + +commit 4e996f9d76f51e9b1e33bef610bb9c2a746c8b9c +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Mar 12 21:05:47 2004 +0000 + + file winpriv.c was initially added on branch CYGWIN. + +commit c79b4bfd15534de12aaf8eca9965403b4913ca4b +Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> +Date: Fri Mar 12 21:05:47 2004 +0000 + + file winpriv.h was initially added on branch CYGWIN. + +commit 24c02f84cc31475bfba27417dfef66b11c09b25c +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Fri Mar 12 01:11:23 2004 +0000 + + file X-boxed.ico was initially added on branch CYGWIN. + +commit 45b638b87f0daf94f9fce566179775fb2889c663 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Mar 10 11:49:11 2004 +0000 + + Twenty link errors for Xizzle now - count 'em. 20. + Get rid of all references to SCO. + Change SDK include dir to $(includedir)/xizzle. Add SDK libs where + necessary. + Reformat to be nicer and easier to shuffle around; also, fix lib ordering + so we get so much closer to the elusive final link. Shuffle + common/xf86Init.c into libxizzle.a. + Fix a couple of early snafus - s/BUILDXI/XINPUT/, et al; make the SDK stuff + conditional as needed; fix the SBus includes. + Name library os-support/libxizzleos.a, not os-support/foo/libxizzlefoo.a. + Clean up ARCH_SOURCES so it's always initialised to something. + Move linked libraries to _LIBADD, which somehow escaped my attention. Make + inclusion of drm/libxizzlelinuxdrm.a dependent on DRI. + s/VERSION/VBE_VERSION/; + Axe this redundant dir. + All Xizzle-specific: axe hw/xizzle/Xi, shuffle link order, fix list of + required modules to be vaguely sane, add some pertinent libs/incs. + +commit 519f76a0867fb2711d311b7929632408c3633e37 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Sun Mar 7 23:45:10 2004 +0000 + + 24. Update license for Xinerama code from DEC to the version requested by + Compaq for X11R6.5.1 that allows redistribution without written + permission from DEC. Originally X.org Defect #9263. freedesktop.org + bugzilla #283. (Alan Coopersmith) + +commit 505fe2ba307e9270627ca7f3cb6b4e1dbacc327b +Author: Egbert Eich <eich@suse.de> +Date: Fri Mar 5 13:41:12 2004 +0000 + + 23. Merged with XFree86 4.4.0. Added changes that went into infected files. + Reverted darwin/bundle/**/Credits.rtf to XFree86 versions to avoid + future conflicts on ASCII but not humal readable files. (There should + probably be separate CreditsXorg.rtf files) (Egbert Eich). + +commit 1b22db1ebcf1ba98ca8519fa38210e275373f8f6 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Thu Mar 4 02:13:09 2004 +0000 + + 21. X server crashes when X-Resource has to byte-swap. Sun bug #5007488. + freedesktop.org bugzilla #267. (Alan Coopersmith) + +commit 47c9395969593a4e897e8c8110d5f2414e47b06a +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Mar 3 17:03:46 2004 +0000 + + file solaris-ia32.S was initially added on branch XORG-CURRENT. + +commit ed066cc67b1fca03fb38c80ecb8194b5b40963be +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Mar 3 17:03:46 2004 +0000 + + Enable inlining of assembly functions for inX/outX on Solaris 8 with Sun + compilers + +commit 867451f1ab7b9870621725bd4be3dd8694c364b8 +Author: Egbert Eich <eich@suse.de> +Date: Wed Mar 3 12:12:50 2004 +0000 + + Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 + +commit 2934f0731b3d2bc9c1e25ceab26d9e0d9cadb054 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Tue Mar 2 20:00:16 2004 +0000 + + file winvalargs.c was initially added on branch CYGWIN. + +commit f72efebf280547c80ff7010e32f56416e7121164 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Tue Mar 2 19:26:34 2004 +0000 + + Replace a handful of calls to ErrorF and exit(1) with a single call to + FatalError. These direct calls to exit(1) made it impossible to do + anything ddx-specific in these cases; note that most of these calls + occur during argument processing. + +commit 7557d4da10cc482fcec40acadf7744b04c1615a0 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Tue Mar 2 19:00:06 2004 +0000 + + bug #230 Revert to Xinerama 1.1 In order to make a "quick" release it has + been decided that the priority is to preserve the server's internal + API/ABI so that third-party drivers that depend on symbols like + noPanoramiXExtension, etc., would not need to be recompiled. Toobad gcc + on Linux doesn't support ELF's weak symbols as that would have been a + reasonable solution for preserving the ABI. N.B.: While symbols, i.e. + functions and variables revert to the old name, I did not revert build + names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and + it's just a build issue that has no impact on the binary output of the + build. + +commit 215a13aa8f537dcb62b0a2f6d335901ee47e9e9b +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Mar 1 16:38:20 2004 +0000 + + Add the .stab.indexstr section produced by Sun's compilers to the list of + SHT_STRTAB sections with debug information to ignore when loading ELF + objects. + +commit d87b05563dc13ba8d9825ec3bb772702dce6c9fe +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Mon Mar 1 03:33:28 2004 +0000 + + file indirect.c was initially added on branch CYGWIN. + +commit f81d63ec5396c8d7f62ddd6ff6bab10b32493264 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sun Feb 29 20:11:11 2004 +0000 + + bug #240 Instead of both Meta keys generating Meta_L, and both Alt keys + generating Alt_L, etc, fix the implementation so that you get Meta_L + for the left Meta key and Meta_R for the right Meta key. Ditto for Alt, + Control, and Shift. + +commit 6c412a43e42538a51d3a4d92a6db12b0b6cf0e9b +Author: Jaymz Julian <jaymz@artificial-stupidity.net> +Date: Sat Feb 28 09:47:55 2004 +0000 + + sdl x server so that we can x-on-x the fb stuff for ease of debugging. if + anyone uses this in production, a big scary monster will eat them. hrm, + perhaps i should make it have a --i-know-what-i'm-doing param that it + doens't start without, heh + +commit bb93fef9877a885da2c6108410155fa996b19abf +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Feb 27 19:35:49 2004 +0000 + + bug #238 test for root-window that XFree86 fixed in their + programs/Xserver/Xext/shm.c + 3.37 and programs/Xserver/Xext/xvdisp.c 1.26 got zapped when Xinerama2 was + merged into the tree. (Xinerama has since been reverted to 1.1, but + that's another story.) + +commit cb718ce08eb25c3999c91b8d614fb88237fad03d +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Feb 27 16:17:12 2004 +0000 + + Revert to Xinerama 1.1 In order to make a "quick" release it has been + decided that the priority is to preserve the server's internal API/ABI + so that third-party drivers that depend on symbols like + noPanoramiXExtension, etc., would not need to be recompiled. Toobad gcc + on Linux doesn't support ELF's weak symbols as that would have been a + reasonable solution for preserving the ABI. N.B.: While symbols, i.e. + functions and variables revert to the old name, I did not revert build + names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and + it's just a build issue that has no impact on the binary output of the + build. + +commit df0313d35bc89abe9374ed25533db283430716e0 +Author: Egbert Eich <eich@suse.de> +Date: Thu Feb 26 13:36:15 2004 +0000 + + readding XFree86's cvs IDs + +commit 147aae87fde5edeed395f77e60f0f8e812d3b6af +Author: Egbert Eich <eich@suse.de> +Date: Thu Feb 26 09:23:53 2004 +0000 + + Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 + +commit 8844423f890194bcb0419a38249029f1997c8c66 +Author: Stuart Kreitman <stuart.kreitman@sun.com> +Date: Wed Feb 25 23:28:43 2004 +0000 + + file xevie.c was initially added on branch XEVIE. + +commit b052486adb9ea26f37be120966eb60cd3ac3db2f +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Wed Feb 25 21:47:10 2004 +0000 + + bug #230 Revert to Xinerama 1.1 In order to make a "quick" release it has + been decided that the priority is to preserve the server's internal + API/ABI so that third-party drivers that depend on symbols like + noPanoramiXExtension, etc., would not need to be recompiled. Too bad + gcc on Linux doesn't support ELF's weak symbols as that would have been + a reasonable solution for preserving the ABI. N.B.: While symbols, i.e. + functions and variables revert to the old name, I did not revert build + names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and + it's just a build issue that has no impact on the binary output of the + build. + +commit 14ab4ade74e946c09d633b15ab4d447d7b69ea29 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Tue Feb 24 15:22:40 2004 +0000 + + bug #214. Merge most of 4.4RC3 + +commit 9343c8f5ac180043c29ead5e83a3efef16d7b3f2 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Tue Feb 24 15:16:35 2004 +0000 + + bug #188, #214, see versions 1.1.4.3 and 1.1.4.4 of this file. fix bad + merge + +commit 03d893bff9bf5d6be9663a21cc983873d8e8d4c7 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Mon Feb 23 21:37:29 2004 +0000 + + merge most of XFree86 RC3 (4.3.99.903) from vendor branch. bug #214 + +commit 4ee0a53de870192d57c02baffa106b10bae6e0bf +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Mon Feb 23 20:35:22 2004 +0000 + + Import most of XFree86 4.4RC3. This import excludes files which have the + new license. If we want to, later we can import 4.4RC3 again and pick + up the files that have the new license, but for now the vendor branch + is "pure." + +commit dcdd47ebbd4e9b5f4cbb598a5217004df0e80844 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Mon Feb 23 20:35:19 2004 +0000 + + Initial revision + +commit 30ac3efde2c3f08b98f31833df4ea7d87f33b092 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Mon Feb 23 16:32:14 2004 +0000 + + bug #188 report bugs to X.org bugzilla, not XFree86 + +commit d52f3ac58fd596fca392394f16acff84115f6e1d +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Feb 18 21:43:19 2004 +0000 + + Additional fixes to allow building with Sun compilers on Solaris x86 + +commit 07109fd63e0999905e6f7df8fd7f9c713d0dc2cc +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Wed Feb 18 21:30:12 2004 +0000 + + Sun cc on Solaris x86 defines __i386 but not __i386__ so the x86 + architecture #ifdef should accept either form + +commit a27ffd2678ef76453c4fa27932462425d804df6d +Author: Warren Turkal <wt@penguintechs.com> +Date: Wed Feb 18 02:12:44 2004 +0000 + + completely get rid of NeedNestedPrototypes + completely get rid of NeedVarargsPrototypes + remove a lot of NeedFunctionPrototypes + ansify many function declarations + +commit d17586c4dc858d0127fa021e6db62f8cc28ef7a6 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Feb 16 20:19:59 2004 +0000 + + [fd.o bugzilla #189] _XOPEN_SOURCE defines break builds on Solaris Express + +commit b146ef1548d36d6897fbd674f1c3b8324bed11a7 +Author: Warren Turkal <wt@penguintechs.com> +Date: Sun Feb 15 15:04:57 2004 +0000 + + Moving toward a working input extension. + +commit e90274c2bba1f66a68c2bc30ddb589dbf6fa0929 +Author: Egbert Eich <eich@suse.de> +Date: Wed Feb 11 19:29:37 2004 +0000 + + 2. Fixing segfaults that may happen in some corner cases when VT switching + and during int10 initialization (Egbert Eich). + +commit 453a0743eb524da88dd364ccac86f35e61899e64 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sun Feb 8 00:17:31 2004 +0000 + + revert to RC1 version of file with the license we like + +commit d6f33d897221450f3cfcc1162e2a6d09b227326e +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sun Feb 8 00:12:27 2004 +0000 + + revert to RC1 version of the file with the license we like + +commit bd20c8d340fce0700ae813bd5b55fe7f4b9e0c98 +Author: Jaymz Julian <jaymz@artificial-stupidity.net> +Date: Thu Feb 5 09:09:51 2004 +0000 + + Polling input mode for the kdrive os layer. And a moose! + +commit af798d27743dbc4f70e85e297daa5863ec89640b +Author: Jaymz Julian <jaymz@artificial-stupidity.net> +Date: Wed Feb 4 16:08:27 2004 +0000 + + More NULL checks. These ones are more useful than the last (which just made + debugging a bunch of problems easier), since you can implement less in + the basic simplest case driver now (not that i'm lazy, mind :-p) + +commit 3c64b65d805915e5c5628663113c54c3e9c3013b +Author: Egbert Eich <eich@suse.de> +Date: Thu Jan 29 08:08:57 2004 +0000 + + Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004 + +commit 2ec70aa70133190ad31a83114fdb9a218e6aa8e6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Jan 25 05:31:24 2004 +0000 + + Disable GLX visuals code on !GLXEXT, and remove a useless prototype. + +commit 01e9cc858ac646b3140d1d85ea9c069bc708fb28 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Jan 25 01:30:33 2004 +0000 + + - Add glx visuals code based on XFree86's Radeon driver. + - Reserve areas for back/depth/span when USING_DRI && GLXEXT. This would be + better in a TransitionTo3d, but we'd need to work with the offscreen + memory manager for that. + - Misc. fixes to ati_dri.c for DRI+GLX. Needs more work still. + +commit f2bedd17af7c3b9241c02dc1c899f32fc0cd2f10 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Jan 25 01:16:19 2004 +0000 + + Oops, turn fallback output back off. + +commit 26c5a8dfdd2aa09db46c4cf963ca697df3e777ef +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Jan 25 01:04:12 2004 +0000 + + Whitespace cleanup. + +commit 6870c081572fcf32997e7906a54d09da0ca58ac3 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 15 09:19:56 2004 +0000 + + Oops, lost a diff needed for the non-screen format pixmap code + +commit 3867e03cb63e49aeb1742a8a4bdaed0b7a23749e +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 15 09:15:53 2004 +0000 + + Fix up some mis-used variable names + +commit f233bbf3652327e62e03efbb8a355e6af2703a1c +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 15 09:13:01 2004 +0000 + + Accelerate non-screen format pixmaps. + +commit 751fb0374b12679f63c922adf0f0e7cadd83d861 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Thu Jan 15 06:06:44 2004 +0000 + + file winresource.h was initially added on branch CYGWIN. + +commit a265167f19e37aec2173c0ca6c9955450aa69941 +Author: Anders Carlsson <andersca@gnome.org> +Date: Wed Jan 14 10:00:00 2004 +0000 + + Add IPAQ modeline by Dennis Noordsij. + +commit 6c97b277d9140b9d6bca047c56e303f6fc1d92e0 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Jan 11 00:10:34 2004 +0000 + + Support 1x1 repeat sources in R128's Blend. + +commit 92702565657d48f1fcc2bae1b5989b1d6d3dd164 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jan 9 08:43:48 2004 +0000 + + Change PCI ID information field to be one of r128, r100, r200, r300. This + is all the information we need so far. Put that information into atic, + and use it correctly in the code (unlike before). + +commit 5d51dfc69cb245f6a1c7b106954a3365524741e2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Fri Jan 9 08:40:32 2004 +0000 + + Use the scratch area for Composite when one of src or dst is in memory. + +commit 6d8001f4688e2149fcdd480401c46c7540680576 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 8 20:18:13 2004 +0000 + + Compile fixes for non-DRI case and for non-C99 compiler. + +commit 1be4b2d5e8048eb3653fad3a1267a0da865bcee8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 8 08:25:49 2004 +0000 + + Forced commit: Previous commit included the removal of the 8192 scanline + limit on offscreen memory in the fbdev case. I remember daenzer (who + originally put that code in) saying he wasn't sure of it, and there + doesn't seem to be any reason for that limit given how acceleration is + done. + +commit b27729ec88f5d4153a0debfe2347bbed022329ba +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Jan 8 08:16:24 2004 +0000 + + - Add a new UploadToScratch kaa hook for putting the data for a single + pixmap into temporary offscreen storage. Subsequent UploadToScratch may + clobber the data of previous ones. This allows hardware acceleration of + composite operations on glyphs. + - Add a new UploadToScreen kaa hook for doing the actual moving of data to + framebuffer. This would allow us to do things like hostdata blits or + memcpy to agp and then blit. + - Add an UploadToScreen on ATI which is just memcpy, but which will be + replaced with a hostdata blit soon. + - Add UploadToScratch on ATI and reserve 64k of scratch space. This + provided a 3x speedup of rgb24text on my Radeon. + +commit d640cf4cb4e031a0e93dfd5955405847fe4475c0 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Thu Jan 8 05:10:33 2004 +0000 + + file winprocarg.c was initially added on branch CYGWIN. + +commit 77183abbc499c69fbbbae1d92a6b012c5f80b6c4 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Thu Jan 8 05:10:32 2004 +0000 + + file winglobals.c was initially added on branch CYGWIN. + +commit eb5bb9c1a16db308eae84ea45a5920c768d4a2ff +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Thu Jan 8 05:10:32 2004 +0000 + + file winclipboardwrappers.c was initially added on branch CYGWIN. + +commit e93d468df21840007cbeea03ed545e75f0f0baf1 +Author: Harold L Hunt II <huntharo@msu.edu> +Date: Thu Jan 8 05:10:32 2004 +0000 + + file winauth.c was initially added on branch CYGWIN. + +commit 737eddfa4b6a8851e20823405b7269dd49c49b89 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jan 7 09:50:28 2004 +0000 + + Disconnect the sis300 driver. I've never managed to fix it, and it breaks + the build on PPC. + +commit 5a2c23f8a18767f0eb2fe2846ca3ba18fd236284 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jan 7 02:30:29 2004 +0000 + + Speed things up slightly by removing Z values from emitted vertices and by + emitting as a tri fan rather than a tri list. A rect list would save an + additional vertex (out of 4) per rectangle, but there's no measurable + speed difference and the tri fan may be useful when transforms come + into play. + +commit cff782078cec9b10606c5873816b7acd9977ce4d +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Jan 4 20:51:53 2004 +0000 + + - Don't forget to UNINIT miComputeCompositeRegion's regions + - Fix a bit of whitespace nearby. + +commit 34d1529731fff0cb61c71f76edc5c6499ece68d1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Jan 4 20:47:30 2004 +0000 + + - Correctly set the texture coordinate set source for the second texture + unit. + - Re-enable Radeon's Composite accel now that fonts work again. + +commit 9f1a92cd092e87f774ce4ed99d4b3e15f905d4f7 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jan 3 21:52:14 2004 +0000 + + - Call appropriate Done function for Composite. + - Don't allow src transforms for Copy acceleration. + - Minor whitespace fixes. + +commit 3db761a17b60b80acb83f365628b093f0ba6958c +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jan 3 11:46:57 2004 +0000 + + - Add more Composite operations, including Saturate, to Radeon Composite + accel. I don't 100% trust that the math works for Saturate, but I can't + tell from existing information. + - Fix texture pitch fallback checks. + - Fallback when src or mask have transforms. + - Disable Radeon Composite accel until the offset thing is fixed. + - Set offscreenPitch to 64 on Radeon thanks to new information and a kaa + fix. Fixes acceleration at width!=1024. + +commit d15acfa79b64b8dab1e930ce8e5423a212a1360b +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jan 3 11:25:27 2004 +0000 + + Split the various attempts at accelerating Composite into separate + functions. Along with making things more readable, it fixes a problem + where the coordinates would get messed up if acceleration failed due to + things like pixmaps being in the wrong locations. + +commit 1e1a35e20c1d281bc9700b349cda1e67f65905dd +Author: Eric Anholt <anholt@freebsd.org> +Date: Sat Jan 3 11:17:44 2004 +0000 + + Actually align the offset of allocated offscreen areas. + +commit 354f8f7e943d1a0732f4181420211efff27532b8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Dec 31 23:24:33 2003 +0000 + + Some strange \240 character snuck into the original commit of this file. + +commit 5f947b04da13256e5f514c40dedb98c6e1cbe0f1 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Dec 30 08:45:53 2003 +0000 + + There's never a copy between different depths. Remove the check. + +commit c8eb20a08ee9174374b6f5ac6e79f31fce26e181 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Dec 30 08:23:56 2003 +0000 + + - Add new Composite hook for kdrive drivers, which only ensures that the + pixmaps are offscreen and don't have alpha maps. It is the last case + checked before going to software fallback + - Use the new Composite hook in the ati driver to implement acceleration of + most Composites that get done in an xcompmgr environment on r100 series + cards. It is only available when using the DRM. There are still some + corruption issues, but the DRI is still non-default and I need to get + this into version control. + +commit adfc1ed8e1e150100accf014e46241201275138f +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 29 09:04:20 2003 +0000 + + Add dependency lines so that servers are rebuilt when server libraries are + changed. + +commit df03e80ae9162ec87f503322ccbcf2846ad38bef +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 29 06:24:01 2003 +0000 + + Merge dri-0-1-branch to trunk. Notable changes: + - Add libdrm and libdri. Portions of the DRI extension are stubbed out. + - Use the DRM in the ATI driver when available. This provides a minor + performance improvement in x11perf, and opens the possibility of using + the 3d hardware for acceleration in the future. + - Implement solid fill acceleration for Composite in KAA. + - Implement Blend hook for Composite and use it on r128. + - Fix a bug of mine that resulted in overuse of offscreen memory. + - Fix many miscellaneous bugs in ATI driver and add PCI IDs. + +commit 9bea538745f1a0c14faaac0e61dee5cf86f98dc6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Dec 28 09:56:54 2003 +0000 + + file kaa.h was initially added on branch dri-0-1-branch. + +commit fb8cd7454baec0bc0f693d222f3920ce03dde7c6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Dec 28 09:56:54 2003 +0000 + + file kaapict.c was initially added on branch dri-0-1-branch. + +commit f388f1509cb131cdf0675415214c9610d3d322c7 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Dec 23 22:29:38 2003 +0000 + + file r128_blendtmp.h was initially added on branch dri-0-1-branch. + +commit 918958705dd97ce678b8901666c85fb359d0e013 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sun Dec 21 13:39:58 2003 +0000 + + Use a different icon + +commit e97c634593dd171a05aa0fa5a35d218dcc3ecfb0 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sat Dec 20 00:28:31 2003 +0000 + + merge XFree86 RC2 (4.3.99.902) from vendor branch + +commit 12e532010b9e8cb67bedd44d489c9c40dd265165 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Dec 19 20:55:39 2003 +0000 + + XFree86 4.3.99.902 (RC 2) + +commit 4b75c7f6358b28978b05ffa4b73853d936454f50 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Thu Dec 18 19:32:17 2003 +0000 + + First pass at "Standard" Xinerama. The sources for this came from Heather + Lanigan's xinerama tree on Sourceforge.Net. No attempt has been made to + handle previous, non-standard versions of the protocol. Nor has any + attempt been made to preserve the ABI of previous versions -- that part + will be added at a later time, and then probably only on systems that + have nice object/linker semantics, e.g. ELF systems with weak symbols. + +commit 305c444de3baa863d7abc4221e8cebb973805847 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 8 01:55:10 2003 +0000 + + Add initial SiS 300-series (300, 305, 540, 630, 730) driver based off of + the ATI driver. It suffers from hw/sw synchronization problems, it + looks like, but may be good enough to work on Render acceleration + experiments. Committing it as-is so I don't lose it again. + +commit 8a7481a27496c842ec2ef5bac5e4d0b5e6279deb +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sat Dec 6 13:24:29 2003 +0000 + + merge XFree86 4.3.99.901 (RC1) from vendor branch + +commit e82928826f60a2e76a670c936bd557838fc1764c +Author: Kensuke Matsuzaki <zakki@peppermint.jp> +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwin32rootlesswindow.c was initially added on branch CYGWIN. + +commit fc40d0a3cbee053d446032ae3150b06edf66a335 +Author: Kensuke Matsuzaki <zakki@peppermint.jp> +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwin32rootlesswndproc.c was initially added on branch CYGWIN. + +commit c3f26a1b989dbbf5167e6e352aebf2f53bfcc442 +Author: Kensuke Matsuzaki <zakki@peppermint.jp> +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwindowswm.c was initially added on branch CYGWIN. + +commit 0f06636a9a088fc27262da0f0bc9a20a3dbeab69 +Author: Kensuke Matsuzaki <zakki@peppermint.jp> +Date: Fri Dec 5 03:37:26 2003 +0000 + + file winwin32rootless.c was initially added on branch CYGWIN. + +commit a84f16a9ad2ed0f874d2c1816aedee96725d2657 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Thu Dec 4 22:03:38 2003 +0000 + + XFree86 4.3.99.901 (RC 1) + +commit 33fdd50a94baab1db342bfce442907db8f8ad03e +Author: Keith Packard <keithp@keithp.com> +Date: Tue Dec 2 01:59:38 2003 +0000 + + Wrap ClipNotify to see region motions during MoveWindow. + Check window reorigin in PositionWindow and bump pixmap serial numbers to + revalidate GCs. + Fix picture clip region origin in automatic update + Initialize client private 'critical' value + Clean up pixmap bounds checking code to only affect contents allocated by + fb. + Oops. Call SourceValidate for Composite operations. + Add Xchips server (vesa based) + +commit 6db77925406a0ee600998ad558a50190ba631649 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file radeon_sarea.h was initially added on branch dri-0-1-branch. + +commit 313046b42832fa2434d617997d5701157b55e7c8 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file radeon_common.h was initially added on branch dri-0-1-branch. + +commit 2ad126286e524392741164babe530210892c377f +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file r128_sarea.h was initially added on branch dri-0-1-branch. + +commit f486c136ad8d2d893cdf3aee6aa752578a6809d7 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file r128_common.h was initially added on branch dri-0-1-branch. + +commit 1eb63ef1b5d0ce10117196df3e81e8312a55a93c +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_sarea.h was initially added on branch dri-0-1-branch. + +commit 1fa5f28406f8a7ad54049e4bec129953149bd3ed +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_dri.c was initially added on branch dri-0-1-branch. + +commit 14ce4f2c3ebc20e5f6d57adda0a7e14229541a72 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_dri.h was initially added on branch dri-0-1-branch. + +commit 8887456e7d4fc1280287ed3e35c6c4464525827b +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_dripriv.h was initially added on branch dri-0-1-branch. + +commit 6c9e7f47357b02f41b9f1f43f7f1d9b5a139e5b6 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_draw.h was initially added on branch dri-0-1-branch. + +commit 2ad20d4e99d0d8ecb922507e0bfead8b7b7d4a55 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 22:56:06 2003 +0000 + + file ati_drawtmp.h was initially added on branch dri-0-1-branch. + +commit ae2454f65698eef66b3507e586e4f8125cb1790d +Author: Anders Carlsson <andersca@gnome.org> +Date: Mon Dec 1 22:11:12 2003 +0000 + + Add support for setting the video mode. + +commit e31051ba26c18f6232798c5a5c4725f5ce53d6b9 +Author: Phil Blundell <pb@reciva.com> +Date: Mon Dec 1 21:49:41 2003 +0000 + + Call KdShadowUnset before fbdevSetShadow. + +commit 9cdd6fd9e3d6e44adf392279093f92fb6678a49c +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 04:33:36 2003 +0000 + + - Add fbdev mode-setting backend to Xati. It and vesa are compiled in when + available, with fbdev being used by default. + - Use depth 16 by default when vesa backend is used. + - Add MMIO defines for PowerPC (should be in a common location). + Many thanks for Michel Daenzer for much of this code. + +commit ec7f5539302fafd1ac7609ac423f1379f54916ab +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 03:15:13 2003 +0000 + + Add more RV250 PCI IDs. + +commit d221c484f9521c780fc3c7e88833c62e50463c6d +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Dec 1 01:46:42 2003 +0000 + + Remove sys/io.h inclusion from some files that didn't need it, and change + asm/io.h to sys/io.h in vga.c, which newer Linux complains about. + +commit 5fd7f82390d78621a8aad959eb216b8fb7e1a97f +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sun Nov 30 16:47:13 2003 +0000 + + xfree86 merge + +commit 77836ebda2a47e04c56c5842f62fab5992909712 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sat Nov 29 16:08:53 2003 +0000 + + xfree86 merge + +commit 88193e928be7cf5a526b50ad1e0b4ac9cddef297 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Sat Nov 29 15:10:02 2003 +0000 + + xfree86 merge + +commit 0097b6fe2d1739e46e4e7726aaa481b6dc84870c +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Wed Nov 26 22:49:07 2003 +0000 + + merge latest (4.3.99.16) from XFree86 (vendor) branch + +commit d803918a9fb5f80a2d6e4b711d8e43916cd09da5 +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Nov 25 22:39:54 2003 +0000 + + Add new Radeon 9200 PCI IDs. + +commit adc7f9a4ebdfe11d4cd6de9388b63dfe36450b39 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Tue Nov 25 19:29:01 2003 +0000 + + XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks + +commit 90f1536dd315cd265bfc7ef35058761a65a01734 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Tue Nov 25 19:29:01 2003 +0000 + + Initial revision + +commit d461855a73d8c9f51a18673aef7ce88f94a71629 +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Nov 23 10:12:04 2003 +0000 + + - Fix Radeon offscreen pixmap pitch alignment. + - Remove usleeps from idle and waitavail code, recommended by keithp. + - Add a workaround for apparent broken acceleration with Rage 128 and + offset alignment with 8-bit acceleration (24-hack and plain 8-bit). + - Minor cleanup of setup code. + +commit 8e09afe657b110bc1ea9e58dea81a120c343d16e +Author: Eric Anholt <anholt@freebsd.org> +Date: Sun Nov 23 02:08:16 2003 +0000 + + Add RV250 PCI IDs. + +commit b3247251fb7d9f2d50ef41d9c2089629544d534d +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Nov 20 07:49:46 2003 +0000 + + - Fix a bug in pitch alignment for offscren pixmaps. + - Add 24-bit acceleration for Xati using the 8-bit trick from mach64. + - Add offscreen pixmap support to Xati. + +commit 41dde24b229f4bc4738637d9cd0a86b74b9f8457 +Author: Eric Anholt <anholt@freebsd.org> +Date: Thu Nov 20 00:05:56 2003 +0000 + + - Fix confusion of depth/bitsPerPixel in ati_draw.c + - Disable acceleration with 24bpp due to apparent broken acceleration. + Accel at 24bpp was the cause of the crashes when people tried to use + any depth over 16. XFree86 doesn't support 24 either. + - Disable at < 8bpp, too. + - Add the other Rage 128 PCI IDs. + - Remove unnecessary setting of scissor registers (only default scissor + gets used). + +commit 7abbcce4222958b4670873a17f67ea1ec1d958e2 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Nov 19 08:32:38 2003 +0000 + + - Add PCI information (device/vendor id, bus location) to KdCardAttr to + help with ati, and future DRM drivers. + - Add new "ati" kdrive driver. It has ancestry in the r128 driver from + andersca, but took a detour through being the WIP SiS 300 driver on the + way. It supports Radeons (tested on QD VIVO and 7500) and Rage 128. + Current limitations include that it requires depth 16 and that the + other Rage 128 PCI IDs aren't included yet. + +commit e9cb70dae0a85fcd116d7ffac73d1322ec282a94 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 18 18:38:48 2003 +0000 + + Reset available offscreen segment save function pointer. (Not a functional + change, just cleaning up a bit) + Reset the screen->memory_base value when frame buffer is remapped. This + makes sure new off-screen allocations point at the newly mapped region + rather than the old (now unmapped) region. + +commit f333581b7b4066ab054dd765a1c9bae0f3407188 +Author: Seth W. Klein <sk@sethwklein.net> +Date: Tue Nov 18 04:53:16 2003 +0000 + + Added infrastructure for driver specific usage messages and added vesa + usage message. + +commit 003e87717cfe378261ed1a1e7bcb2cf0d200b1b8 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 17 22:09:12 2003 +0000 + + Recompute winSize/borderSize to fix them when changing redirection. + Sufficient, but not always necessary. + Add borderClip to damage on creation so that clients needn't guess. + Fix API to FbDots functions to make PolyPoint work with screen_x/screen_y + offsets + Add debugging code to make sure no pictures are left pointing at freed + pixmaps. "Can't" happen, but it did once. + Change KdOffscreenArea structure to eliminate separate private structure, + eliminate the ScreenPtr, change from doubly linked to singly linked + list. + Don't damage BackgroundNone windows on PW_BACKGROUND. Re-clip damage to + borderClip in DamageSubtract. + +commit c57959ad6a4c0f5329762f401fd7871ffb2ee90c +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Mon Nov 17 19:03:47 2003 +0000 + + merge XFree86 4.3.0.1 to -CURRENT + +commit acd200770513ad03dd3f4bdc7448edfd69b1ff9d +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 17 06:54:52 2003 +0000 + + Clear window when Manual Subwindows redirect is destroyed + Fix Tile/Stipple origin with non-zero pixmap window origins + Use computed depth for TrueColor visuals as fbdev doesn't have one. + +commit d568221710959cf7d783e6ff0fb80fb43a231124 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Nov 14 16:49:22 2003 +0000 + + XFree86 4.3.0.1 + +commit 9508a382f8a9f241dab097d921b6d290c1c3a776 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Nov 14 16:48:57 2003 +0000 + + Initial revision + +commit ded6147bfb5d75ff1e67c858040a628b61bc17d1 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Nov 14 15:54:54 2003 +0000 + + R6.6 is the Xorg base-line + +commit cb6ef07bf01e72d1a6e6e83ceb7f76d6534da941 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Nov 14 07:46:20 2003 +0000 + + Accelerated image text code drew glyphs at wrong location when compositing + manager enabled. + +commit 318d525bf2fe52b059b1568e9b31d144b297a781 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Nov 13 09:14:29 2003 +0000 + + Have the composite extension tell the damage extension about clients which + have redirected subwindows in manual mode. Those clients are marked + Critical and given a significant scheduling boost whenever they receive + a damage notify event. This dramatically improves update frequency. + If the kernel reported a large number of keys, readKernelMapping would walk + off the end of the kdKeysym array. + Fix usage of _IOWR; the 'size' argument is actually a datatype. + +commit e9904cefa39e1c9d3c7bf2f335dbafb23809cdba +Author: Eric Anholt <anholt@freebsd.org> +Date: Tue Nov 11 05:46:15 2003 +0000 + + Fix Makefile.am's to include header files needed for distcheck. Remove + -Werror default and add --enable-werror switch to add it back. + +commit 5dc119b73ffcae32c2d470b734dfa2f8af58e77e +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 10 20:35:05 2003 +0000 + + Fix KdXv interface to pass drawable down so that bits can be put into + drawable pixmap rather than directly into the frame buffer. Rewrite + logic in kdoffscreen to make space for new allocations, now deals + correctly with locked areas. + +commit e500986657ea8b4e14a1ff4730ecda4583c75277 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 10 06:40:23 2003 +0000 + + Must offset composite parameters by drawable coordinates in accelerated + case. + +commit d694b44259ff51cfca2c3ec9a58bf164010cc1ad +Author: Phil Blundell <pb@reciva.com> +Date: Sat Nov 8 18:51:59 2003 +0000 + + Avoid ugly shell error when libXdmcp isn't present. + New functions. (TsInit): Register them. + +commit 3e18c6363454aa87e1ad8c121019bab185e613b8 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Nov 8 00:28:19 2003 +0000 + + Fix KAA to work with screen_x/screen_y hacks from COMPOSITE Also add + kaaComposite acceleration for simple bltblt case. + +commit 1280f79054dc16ccf321006cd2de53e0f53c7b70 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Nov 7 23:29:29 2003 +0000 + + Ok, Composite extension is semi-working; when no-one asks for redirection, + the server seems to act as before. With RedirectSubwindows (root, + automatic), the server looks just like a regular X server. Now to go + rewrite the (currently lame) compositing manager to get some real + action on the screen. + Some of the fixes here are to make valgrind quiet with various ioctls used + by kdrive/linux. + Also fixed a bug where fbdev initialization was out of order in fbdev.c and + smi.c + +commit d319a0a610c90524ad29cab3c6d4d21b5298fc7f +Author: Phil Blundell <pb@reciva.com> +Date: Fri Nov 7 23:00:06 2003 +0000 + + Fix warnings. + +commit 598c5d549abbb819f3391a2c88432941b546a213 +Author: Matthew Allum <breakfast@10.am> +Date: Thu Nov 6 14:01:46 2003 +0000 + + tslib improvements + +commit 7e1a564c416f6dc337a0021b1c0e1f2cb3b27296 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 5 06:46:13 2003 +0000 + + Replace translucent compositing hacks with PictOpSrc to match eventual + extension semantics. Replace mouse acceleration with quadratic. + +commit 5378236aa647ec9a723a3e5fbd2a57eb286a1938 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Nov 2 19:56:10 2003 +0000 + + merge xfixes_2_branch back to HEAD + +commit 9e94665cf9cf0f74dff5b3cdaa4cde99e234fa45 +Author: Phil Blundell <pb@reciva.com> +Date: Tue Oct 28 22:28:33 2003 +0000 + + try /dev/misc/apm_bios if /dev/apm_bios doesn't exist + +commit bb99451f275827da580dcfa3b66cd0705fcc900a +Author: Phil Blundell <pb@reciva.com> +Date: Tue Oct 28 22:27:35 2003 +0000 + + move smi into VESA_SUBDIRS + +commit 9a05f8f7858641b780046ad69d61f21ccbb93db8 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Oct 19 20:46:23 2003 +0000 + + Minor cleanups -- remove a couple of bogus KdCheckSync calls, restructure + KdOffscreenSwapOut to avoid unneeded 'continue' + +commit 16b2ea64e7e0bd32d6dba078b4891167bd335d44 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 16 08:03:25 2003 +0000 + + Discard/reconstruct list of offscreen areas on VT switch so no allocations + can occur while switched away. + Set type of off_screen_areas member to actual type instead of pointer + +commit f4bcd36a386116c450ea6893ab3d08e81cea663b +Author: Anders Carlsson <andersca@gnome.org> +Date: Wed Oct 15 05:34:54 2003 +0000 + + Add a memory_base variable and use it. + +commit f5916edb172738c73c8f78b23981abfd8d03a079 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 15 04:59:45 2003 +0000 + + hw/kdrive/*/Makefile.am Libraries in local dir must not use global path or + make doesn't build things in the right order (-j) + hw/kdrive/mga/mga.h, mgadraw.c Fix warnings + +commit b3e47ce18ff9c86833fc6302b1e074912edce404 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 15 01:00:38 2003 +0000 + + various Split out pixmap allocation debug statements Fix bogus offscreen + pixmap size test Add migration to composite function for source + operands + VbeDPMS Remove extraneous call to VbeGetVib. + +commit 28bcd2efd134bfea3daa0738c9155b36cdf84168 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 14 21:33:04 2003 +0000 + + Avoid attempting acceleration on non-screen formats (for now) + Offscreen allocator API changes. + +commit cb46169759a833605b78409ae68c9fb57618ceba +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 14 21:10:53 2003 +0000 + + Use same assumptions as layergc about what layer kind is approprate for + unwrapping pixmap operations. This makes sure the accelerated code gets + invoked for pixmaps + Add pixmap migration support to kaa. Can't quite automatically migrate + pixmaps off-screen, but soon we will. Can kick objects out of video + memory. Move per-screen linked list pointers to pixmap private. Wrap + Composite in preparation for migrating pixmaps. Have kasync ignore + drawable type so that pixmaps trigger sync Add KdOffscreenFini to + cleanup on server reset. Switch off screen area to have only a 'save' + function; moving objects to off screen memory is done by saving then + freeing the area. + +commit 109b94951654171ada94e2ffb29568b8a1bcde77 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 14 05:08:35 2003 +0000 + + -Wall fixes. Might have fixed VESA based DPMS code as a result + +commit 4b844cafb2516139c8407822b61939cd6c743742 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 14 05:07:39 2003 +0000 + + Check for off-screen pixmap support in KaaDrawableIsOffscreenPixmap. -Wall + fixes. Allocate pixmap private space only for screens with off-screen + pixmap support + +commit cdf3377f6d3789628495ac64df80ac7dc235e46d +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 14 05:05:53 2003 +0000 + + -Wall fixes. Support off-screen pixmaps + +commit 777f31cd0b5ec387d975e6d10ae73fa325e4c311 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 14 05:05:28 2003 +0000 + + -Wall fixes. Add klinux.h to export function declarations + +commit a398339b6d5209a11af93a3b836b0cad326a0799 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 14 05:04:22 2003 +0000 + + -Wall fixes + +commit 44f2e82f1b463e272f4e521561f74eb14bf24082 +Author: Anders Carlsson <andersca@gnome.org> +Date: Mon Oct 13 02:19:47 2003 +0000 + + Use pixmaps instead of drawables in the kaa functions. Have the mga server + support accelerated operations on offscreen pixmaps. + +commit 47a9fab5e286c5224047690482a2cb36a3c17b88 +Author: Anders Carlsson <andersca@gnome.org> +Date: Mon Oct 13 01:19:37 2003 +0000 + + Add support for offscreen pixmaps. + +commit c538fa874257a2cbf53f329d3982e7a01fefe629 +Author: Anders Carlsson <andersca@gnome.org> +Date: Mon Oct 13 00:56:21 2003 +0000 + + Fix a couple of bugs. + +commit a50438b4709b32ec869e232628971b0dccd27adf +Author: Anders Carlsson <andersca@gnome.org> +Date: Mon Oct 13 00:19:58 2003 +0000 + + Add offscreen memory manager and update the servers to reflect the name + change for the kaa structure. + +commit 307f3dbd10e0c8e392865e85e9e3e4dff108df02 +Author: Anders Carlsson <andersca@gnome.org> +Date: Sun Oct 12 14:17:24 2003 +0000 + + Remove this for now. + +commit ab3305d0ac805d0c9e917c35b316d9b58dde2187 +Author: Anders Carlsson <andersca@gnome.org> +Date: Sat Oct 11 19:36:13 2003 +0000 + + Add ATI Rage 128 server. + +commit ed98d3814ee65cd9fd18eeadbd20c8fc6b4ab342 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 9 23:35:44 2003 +0000 + + use #if instead of #ifdef + +commit 4dd37de858464c576bfdcd10255a8e233a5b05d5 +Author: Anders Carlsson <andersca@gnome.org> +Date: Thu Oct 9 16:21:24 2003 +0000 + + Build smi after vesa. + +commit e5a1c9952f7d621493f08257c8b9456b7608c55a +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 9 07:29:31 2003 +0000 + + Initialize smi chip on graphics setup. Seems to help some. + +commit 10f721acc5e59ea4152b94246b62963f2ff9d678 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 9 07:12:01 2003 +0000 + + Leave iopl set to 3 so vesa module will work + +commit f74555e94264e6f703d399a5e0475c7283e20a88 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 9 06:36:26 2003 +0000 + + Add xfixes, fix smi driver to use either fbdev or vesa. Add hole mapping to + vesa server by default + +commit 346aff7ef6f47a191c7f134b7843a634189b9e83 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 9 06:35:11 2003 +0000 + + Use either vesa or fbdev, selectable at compile time + +commit adc5b8068d5532a6f3f23e64d3c668a22d5b1504 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Oct 5 05:22:35 2003 +0000 + + Fix fbdev server to allow accelerated servers on top to use RandR. Switch + smi server to fbdev (vesa bios doesnt work on the Acer I have here) + +commit f3d8476ced1e3ba4b4ca7c9e23e98c2cc7ffcc14 +Author: Phil Blundell <pb@reciva.com> +Date: Sat Oct 4 02:56:54 2003 +0000 + + few more fixes for h3600 ts + +commit aae3e6dcb3d72eba6d7d8d99079782ed1bfe63bd +Author: Keith Packard <keithp@keithp.com> +Date: Sat Oct 4 02:43:16 2003 +0000 + + configure.ac Makefile.am os/oscolor.c Xext/saver.c Xext/Makefile.am + hw/kdrive/linux/ts.c hw/kdrive/src/Makefile.am hw/kdrive/src/kdrive.h + hw/kdrive/src/kinput.c hw/kdrive/src/kmap.c Autodetect VM86 (for vesa), + AGPGART, APM, MTRR, tslib and handhelds.org touch screen. Add + USE_RGB_BUILTIN and code for fileless RGB database. Add + MIT-SCREEN-SAVER + +commit efbf205a2ac4792b71d39f8fe3ef3b1cf12697c0 +Author: Phil Blundell <pb@reciva.com> +Date: Fri Oct 3 15:27:46 2003 +0000 + + add --disable-kdrivevesa option + +commit 89a536f349525e642bb4cd233bc47864ed4a6ad7 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 2 02:30:28 2003 +0000 + + Add smi server + +commit 5a21f4f4d0c03e0e34f1979fd7cec8f0d19b00d4 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 1 06:43:50 2003 +0000 + + Add XDM cookies. Fix up support for pkgconfig X bits + +commit a42e31b28c493dc3d6b32cde4e72ff17fc983183 +Author: Matthew Allum <breakfast@10.am> +Date: Tue Sep 30 22:14:59 2003 +0000 + + Fixed tslib driver to handle VT switches + +commit a0876ade6479c40dcef63f70f4c6c5a5988edeba +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 30 20:49:47 2003 +0000 + + Enable maintainer mode from autogen.sh. Fix vesa build to create library + before program. Remove bogus AC_SUBST lines for XSERVER_CFLAGS and + XSERVER_LIBS + +commit e8c02296476f068bc8158d112dc15df00dddac2a +Author: Matthew Allum <breakfast@10.am> +Date: Tue Sep 30 20:15:14 2003 +0000 + + Added --enable-tslib configure option + +commit a42384e9356ec79510682bacf08410e87d7102ff +Author: Keith Packard <keithp@keithp.com> +Date: Mon Sep 29 01:42:40 2003 +0000 + + Use other freedesktop.org packages to build the server + +commit 6a098a88af174db1674662c09e2385b4e6e0bb4e +Author: Anders Carlsson <andersca@gnome.org> +Date: Wed Sep 24 23:36:54 2003 +0000 + + Add beginnings of offscreen memory manager. + +commit 918a8273eeabcb14fc82742cc68223d8a7c2a67a +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 24 21:07:06 2003 +0000 + + hw/kdrive/src/kdrive.c + hw/kdrive/src/kdrive.h Add -switchCmd option to set command that is + executed whenever the VT is enabled or disabled. This permits input + device to be customized by external apps when switching to X. + +commit 20bbd750d0d359e55cbdcc86aeea6013ac665bce +Author: Anders Carlsson <andersca@gnome.org> +Date: Mon Sep 22 21:14:59 2003 +0000 + + Accelerate server. + +commit 49771e3f074cae3947b0084e6514a19dc4c4cad1 +Author: Anders Carlsson <andersca@gnome.org> +Date: Thu Sep 18 20:48:48 2003 +0000 + + Add mga server to the build. + +commit 07ab15d61d2468fc858453cdabe7296d19fc9e10 +Author: Anders Carlsson <andersca@gnome.org> +Date: Thu Sep 18 20:47:43 2003 +0000 + + Add mga server + +commit b260825e880615f589e2bad35491ebb598e21a0f +Author: Anders Carlsson <andersca@gnome.org> +Date: Thu Sep 18 14:44:57 2003 +0000 + + Try this. + +commit b889d4ba2c2e59769a3ff6fd00ee5bb395108827 +Author: Anders Carlsson <andersca@gnome.org> +Date: Thu Sep 18 14:42:00 2003 +0000 + + Try things out. + +commit 85ff67670c6216a8c4368a8bd70fd0434a4e0aca +Author: Anders Carlsson <andersca@gnome.org> +Date: Tue Sep 16 21:07:16 2003 +0000 + + Add fbdev server to the build. + +commit be12dcdcf39a30f69fe73cbb5a4acacef8024db6 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 12 07:00:19 2003 +0000 + + Switch to freedesktop.org libXfont + +commit eca43a59ec95646836f9704714823249a15747fa +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 12 01:51:16 2003 +0000 + + Clean up mach64 for autofoo + +commit 6b16b827bb125b43b41b7f8558991e90ada316de +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 12 01:49:46 2003 +0000 + + Add some configure options, make the mach64 server build + +commit ce55d3234dc34157f0fc8059a6793cdd17fa4519 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 11 05:15:08 2003 +0000 + + Move kdrive common sources to src dir + +commit 269b9dac5a96005fe38379377526592cb7930a51 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 11 05:12:51 2003 +0000 + + Get Xvesa building + +commit 0d775576b9b3cf410e9a463b87340612d34bc13d +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 11 03:26:03 2003 +0000 + + Add Makefile.am + +commit ef8977a30ccb55af8e8bbb635127efb94f232983 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 11 03:23:13 2003 +0000 + + More build fixes + +commit 14a8311bb3b6273617f7c7b70222e97835e9c8af +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 11 02:31:24 2003 +0000 + + Make more stuff build + +commit 8bc8fd8678b20dde2a3fc47ff5b617bc8046ea9f +Author: Mike A. Harris <mharris@redhat.com> +Date: Thu Sep 11 02:02:54 2003 +0000 + + POSIX sigaction cleanups - removed act.sa_restorer as it's not in POSIX and + is not portable + +commit 514ab46ce3c6eb0163720315474cba884d029b62 +Author: Anders Carlsson <andersca@gnome.org> +Date: Thu Sep 11 00:47:36 2003 +0000 + + Start autoifying everything. + +commit 283a7f32c449b1970e5a484351f8396a8afd99da +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jul 7 19:13:03 2003 +0000 + + Update RCS tags, fix keyboard hang on VT switch, fix scroll wheel mice, add + -rawcoord option to not transform mice on rotate, fix mtrr to use + power-of-two size, add a few vesa options + +commit 804b89284665f19e2c92a07fadc72c25fbb3f5d9 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 2 17:53:46 2003 +0000 + + Silicon motion driver for kdrive + +commit b923d897a51707c25b2dc62395d9765ba1a47bfe +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 2 17:53:46 2003 +0000 + + Initial revision + +commit 544ee9bb7a060d6a85b5168a2de74ff1db430c89 +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Wed Apr 23 21:51:18 2003 +0000 + + 136. Fix bug that prevented fbman from using the last partial scanline of a + Mach64 framebuffer (Marc La France). + 135. Make ATI Mach64 FIFO cache integrity testing optional (Marc La + France). + 134. Export ATI Mach64 hardware overlay as an XVideo adaptor (derived from + GATOS project, Egbert Eich, Marc La France). + 133. Reorganise ATI Mach64 support into separate source files (Marc La + France). + 132. Refine atimisc's decoding of the panel mode on server entry in an + attempt to reduce the effect of atyfb bugs (Marc La France). + 131. Make Rage128 and Radeon XVideo available even when 2D acceleration is + disabled (Marc La France). + 130. There is no longer any need to require hardware cursors during Rage128 + and Radeon XVideo displays (Marc La France). + 129. Initialise v4l's XVideo adaptors last (Marc La France). + 128. Reduce cut&paste effects by adding more helpers to Xv (derived from + #5645, Björn Augustsson, Marc La France). + 127. Centralise a region comparison primitive into 'mi' and use it instead + of local definitions throughout the server (Marc La France). + 126. DPMSExtension & XvExtension driver cleanups (Marc La France). + +commit 870d0f8752c11c3df42185786ab1e2bd200e4de1 +Author: Egbert Eich <eich@suse.de> +Date: Thu Dec 12 18:29:05 2002 +0000 + + 621. Let kbd driver test if Xserver is in suspend before handling any input + events (Egbert Eich). + 620. Fixed agp version checking to accept minor versions >= the specified + number (Leif Delgass). + +commit 7827fce0b5ff600d0adc3a30eab69e8141c2e548 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 13 16:37:39 2002 +0000 + + Allow input devices to be closed while the VT is switched away (needs + per-driver support) + +commit 3eaea6608bc33633c00860008f246f59ad5687a7 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 12 22:20:42 2002 +0000 + + Update ipaq-specific ts driver to match generic tslib version + +commit 612e82053d986df70bcc9c87038244eab8c3dc13 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 5 05:28:34 2002 +0000 + + Clean up touch screen hacks for controlling pointer on alternate screen + +commit 358d887cbef4d2ec34532a364dd44205eab36c23 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Nov 1 22:27:49 2002 +0000 + + Add support for ARM linux TS lib (disabled by default) in kdrive + +commit f0a8d06fcaf3fe0a652efa65966f4b0b0d688c12 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 31 18:29:50 2002 +0000 + + Refix mouse matrix computation for touch screens. Update usage message for + -screen option + +commit 28d191680ecbcd50dc1cccec12e55a3c433fbf48 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 30 21:25:53 2002 +0000 + + Uninitialized mouse matrix elements + +commit dd7c85f108d01d207248300019e88d56012c33c9 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Oct 30 12:52:06 2002 +0000 + + 441. Import Mesa-4.0.4, and resync with the DRI trunk (DRI Project). + +commit d04246c8fca4132063234ab44a68a7fac8c22261 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 18 06:31:17 2002 +0000 + + Changed arguments to vesaRandRSetConfig + +commit 7d214e2e2a2a1601ca14be6b52190c5b22611e2d +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 18 06:08:10 2002 +0000 + + Fix additions of RandR support in kmode.c + +commit 5bb4a7b6998132d574d823301333b7e119dc7213 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 18 06:00:29 2002 +0000 + + Fix other half of kdrive mach64 video code after randr update + +commit e1c304e22b1a29a5259aec1e956dbc75e0fa0138 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Oct 14 18:01:42 2002 +0000 + + Add refresh rates to RandR (v1.1) + +commit 5804e69f4c20dcd33f69673aa82da3051e6eed3c +Author: Keith Packard <keithp@keithp.com> +Date: Sun Oct 13 19:35:56 2002 +0000 + + Custom file for rotating pcmcia screens + +commit b5d1c538622b21bed8eb59b557d79323f65ffbd7 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 8 21:28:05 2002 +0000 + + Add vtxx option to kdrive servers + +commit f214cab20baf57fc23389ef9b63a3e3a50b2a4f6 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 8 21:27:18 2002 +0000 + + Clear screen on mode switch + +commit b28a8c6e2a1fbc57d96d94b7445c86f94c2d8d4d +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 8 21:25:35 2002 +0000 + + Add another mach64 PCI id + +commit 9373d9186b413e1d53200b191816b9143d19c4bf +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 4 01:44:20 2002 +0000 + + Fix mouse mapping under reflection + +commit a80e1e5aed07cb57151408b0481f18e2ffb7f146 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Oct 3 22:09:04 2002 +0000 + + Update kdrive servers to support reflection + +commit 238a2ec201a52d59a46540ddd419d8d6f6bf8daa +Author: Keith Packard <keithp@keithp.com> +Date: Sun Sep 29 23:39:47 2002 +0000 + + Update RandR to 1.0 (library version 2.0) + +commit 5d871996431e33b0d64ad9158e040e46770b6ee4 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 26 02:56:48 2002 +0000 + + Add image transformation and sub-pixel ordering to Render + +commit a2637ba1f6c8417a48c95c9b65542c696ba0c8c0 +Author: Egbert Eich <eich@suse.de> +Date: Mon Sep 16 18:05:35 2002 +0000 + + 319. Moved LdPreLib define after the vendor/OS specific config files as it + may depend on setting done there (Egbert Eich). + 318. Several fixes for cross compile environment (Egbert Eich). + 317. Added code to allow for building of static only libraries with + -fPIC for platforms which require it (Egbert Eich). + 316. Added '-m32' to gcc flags as default for ia32 builds when gcc version + is >= 3.1. This allows building a 32 bit Version of X on 64bit x86-64 + (Egbert Eich). + 315. Changed direct calls of ld to 'gcc -nostdlib' for Linux (Egbert Eich). + 314. Changed calls to as to 'gcc -c -x assembler-with-cpp' for Linux + (Egbert Eich). + 313. Added '-fno-strict-aliasing' flag to gcc version >= 3.1 (Egbert Eich). + Strict requires that one address must not contain pointers to different + types - a feature heavily used by X (Egbert Eich). + 312. Fixed a core dump problem in libXtt (?) (Egbert Eich). + 311. Removed '#pragma pack' from structures that contain function pointers + in x86emu. This causes problems on gcc 3.1 for ia64 (Egbert Eich). + 310. Added defines for missing X types to saverproto.h (Egbert Eich). + 309. Fixed compiler warings generated by gcc >= 3.1 in mesa drivers (Egbert + Eich). + 308. For platforms that allow both 32 and 64 bit libraries to be executed + split Xlib i18n modules path into + <libpath>/X11R6/lib/X11/locale/lib/common and + <libpath>/X11R6/lib/X11/locale/lib64/common. 'lib64' has been defined + to be the default path for 64bit shared libraries on these platforms + (Egbert Eich). + 307. Fixed obvious typo in OMlib (Egbert Eich). + 306. Fixed code in cfb that didn't comply with C sequence rules. Modern C + compilers tend to be more aggressive on code reordering (Egbert Eich). + 305. Changed arguments of NoopDDA() from VarArgs to void. Handling of + VarArgs by gcc isn't compatible with the way it was used on certain + platforms (Egbert Eich). + 304. Added support for 32bit pixmaps for 24bit overlay framebuffers in fb + overlay code (Egbert Eich). + 303. Fixed kdrive to print a meaningful error message instead of just core + dump when no matching graphics cards is found (Egbert Eich). + 302. fixed portability bug in xwd (Andreas Schwab <schwab@suse.de>) + 301. fixed X Server crash, which happended each time a proportional + iso10646 font was loaded with xtt backend (Yong Li + <rigel863@yahoo.com>) + 300. Added some ARM specific fixes to compiler.h (Uli Hecht). + 299. Added a virtual 'dummy' driver (Egbert Eich). + 298. Fixed core dump when certain access functions are not set in xf86Bus.c + (Egbert Eich). + 297. Fixed problem where SIGIO could be disabled after a server reset. + 296. Added configurable list of devices the xf86Misc extension is allowed + to change the mouse device to (Egbert Eich). + 295. Changed default mouse type to 'auto' when generating config file with + '-configure' (Egbert Eich). + 294. Made sure keyboard modifier settings are consistent after exit from + DGA when the xkb extension is used (Egbert Eich). + 293. Disabled keyboard processing when Xserver is suspended by power + management. This allows effective locking of laptops when stolen + (Egbert Eich). + 292. Added/improved options for lockfile syncing (Egbert Eich). + 291. Added support for backup copy of Xserver logfile (Egbert Eich). + 290. Fixed GetTimeInMillis() to use deltas instead of absolute time + returend by gettimeofday(). This ensures time is monotonic in X (Egbert + Eich). + 289. Fixed xf86Misc extension to allow modification of Expps2 mice (Egbert + Eich). + 288. Made code in xf86MiscExt.c more readable (Egbert Eich). + 287. Fixed PCI CardBus bridge handling (Egbert Eich). + 286. Added code to reenable PCI bus mastering after coming back from a VT + switch to radeon driver (Charl P. Botha <http://cpbotha.net/>) (Egbert + Eich). + 285. Dito for r128 driver (M. Harris). + 284. Dito for glint and mga driver (Egbert Eich). + 283. Fixed double scan issues for low res modes in C&T driver (Egbert + Eich). + 282. Set rgbBits to 8 for all HiQV chips in chips driver (Egbert Eich). + 281. Moved initialization of accel funtions past initialization of + offscreen fb manager in chips driver (Egbert Eich). + 280. Fixed initialization of video in chips driver (?). + 279. Fixed HALlib problem restoring text mode on G550 (Egbert Eich). + 278. Restructured and included Matrox's Merged Framebuffer changes to mga + driver (Egbert Eich). + 277. G450/550 clockchip programming fixes (Matrox). + 276. Fixed HW Cursor for HALlib frame granularity (Egbert Eich). + 275. Enabling 2D accel in 24-bit for neomagic 2360 and 2380 (Egbert Eich). + 274. Added support for builtin 1024x480 mode of Sony subnotebooks for + Neomagic driver (Egbert Eich). + 273. Fixed support for lowRes (320x240) modes in neomagic driver (Egbert + Eich). + 272. Fixed RAC function registration in S3 driver (Egbert Eich). + 271. Added some voodoo to screen initialization of S3 driver (Egbert Eich). + 270. Fixed vbe/int10 support in SMI driver. It used to core dump when BIOS + was not usable (Egbert Eich). + 269. Separated BRIGHTNESS and and CAPTURE_BRIGNTESS video attributes in smi + driver: CAPTURE_BRIGHTNESS refers to the capture chip (ie. Philips + SAA7110) while BRIGHTNESS controls the video overlay of the SMI chip + itself (Egbert Eich). + 268. Disable automatic loading of DRI when running SUN ffb as this is + inconsistent with other drivers (Thorsten Kukuk). + 267. Fixed Gamma/Brightness code in trident driver (Egbert Eich). + 266. Added FpDelay debugging option (Egbert Eich). + 260. Fixed video support for Trident 9397 (Egbert Eich). + 265. Fixed Cursor/VT switch support for vmware driver (Egbert Eich). + 264. Fixed Blit problems in vmware driver when running KDE (Egbert Eich). + 263. Added RENDER support to vmware driver (Egbert Eich). + 262. Added C&T 69030 to extrapci.ids (Egbert Eich). + 261. Improved mouse autodetection code (Egbert Eich). + 260. Restructured int10 code so that vm86 and x86emu support can be loaded + as modules. Implemented heuristic to try vm86 first and fall back to + x86emu. This allows 32 bit Xservers to run on x86_64 on 64-bit kernel + without vm86 support (Egbert Eich). + 259. Restructured elf loader: determine which section to load from + elfheader flags (Egbert Eich). + 258. Adding RENDER Support to RAC (Egbert Eich). + 257. Using borderClip instead of borderSize region for redisplay function + in miext/shadow code to avoid core dumps when vt switched away (Egbert + Eich). + 256. Replacing sprintf() by snprintf() in lbxproxy to eliminate possible + buffer overrun exploits (Egbert Eich). + 255. KP_Decimal fixes to Czech and Slovak keybards (Jan Holesovsky + <kendy@suse.cz>) (Egbert Eich). + +commit 2698ee9f29189a44de1c92df99f48d45f0111577 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Aug 15 18:07:57 2002 +0000 + + Prefer touchscreen to mouse + +commit fe477855d7d714c154dc9fcb1d0aa67fb8e4e5a5 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Aug 2 16:30:50 2002 +0000 + + Fix for iPaq IOCTL changes + +commit cf49ce6f26caee30f4160e6e0b2b658863e7a145 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Aug 2 16:15:02 2002 +0000 + + Allow both touchscreen and mouse at the same time + +commit 1a5f923c62dcffb3a81c6532f3dc071c70345cb3 +Author: David Dawes <dawes@xfree86.org> +Date: Tue Jun 4 22:19:58 2002 +0000 + + 174. Fix makedepend so that it can parse a unary '+' operator (#5185, Mark + Snitily). + 173. Fix a typo in Xvesa's emulation of instructions forbidden in vm86 mode + (#5184, Juliusz Chroboczek) + 172. Fix a bounds check in Xlib's Region code (#5183, Owen Taylor). + +commit 98f8d7af3cb7a10cc268a8bdd3039539b1bf90f2 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Feb 19 00:18:05 2002 +0000 + + kdrive/vesa: apply vm86 patch from Juliusz + +commit 6d8cedf68c7803330bc920cf7506727c4ad6108c +Author: Keith Packard <keithp@keithp.com> +Date: Thu Feb 14 16:08:05 2002 +0000 + + update kdrive manual and usage + +commit 44b20bfa587def11f3127980e67ff47e695c3e51 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Feb 1 00:52:15 2002 +0000 + + kdrive/mach64: recognize the mach64li + +commit 3abb3e073961986137f8fec1f194c60636b9e864 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jan 18 16:25:19 2002 +0000 + + kdrive: fix button emulation for iPAQ + +commit 88810cfc02941d7e54924e25aa872e5cc740d274 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Dec 20 16:47:30 2001 +0000 + + kdrive/linux/mouse.c: convert mouse data to signed values for compilers + with default unsigned chars + +commit 83388cb23282471e80d513bd3ab472b51c110b35 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Dec 10 16:34:20 2001 +0000 + + kdrive/i810: bit swap for i810 cursor (from Pontus Lidman) + +commit 4646a6c3b925676039f50bacb4f3c780f6e81bcc +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 7 02:19:04 2001 +0000 + + kdrive: work around ipaq touch screen compile problems + +commit 54feb8a4c8f0e0cb6eb40b494171fa4f3552cfc3 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 7 02:18:19 2001 +0000 + + kdrive: missing registration for mouse input type + +commit 636390fb9d6314e506f593da6556fa198b4e9bf6 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Nov 22 23:38:21 2001 +0000 + + kdrive: initialize all Linux mouse driver fields + +commit 668c25a769044f06ed47a3145a11aceeb9574c9d +Author: Keith Packard <keithp@keithp.com> +Date: Thu Nov 8 10:26:24 2001 +0000 + + kdrive: fix ALTGR keyboard mappings + +commit e76c6b2acae5622dd2d4944cd6f3673dbc70a571 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Nov 8 09:35:08 2001 +0000 + + kdrive/linux: update ps/2 mouse detection/configuration code from FreeBSD + bits + +commit 6fafe3b092f799da788a1ae75be1c23da42f0983 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Nov 8 09:33:51 2001 +0000 + + kdrive: Open APM device r/w for kernel 2.4.14 + +commit 2f2e256de71c42b7856440ec43b1c122019b95b7 +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Mon Oct 29 16:34:56 2001 +0000 + + DPMS warning fix + +commit b8d90c5ea4659a01694864e6c05a563dcea296eb +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Sun Oct 28 03:33:10 2001 +0000 + + 407. Fix for threaded libraries (Marc La France). + 406. Finish removal of SuperProbe (Marc La France). + 405. A rather large number of warning fixes throughout (Marc La France). + 404. Fix bug in HTML install script (Marc La France). + 403. Missing ident lines for some XFree86-modified files (Marc La France). + 402. Add default half-width doublescanned modes (Marc La France). + 401. Mark all driver-registered resources with ResBus (Maarc La France). + 400. Fix DPMS-related build problem (Marc La France). + 399. Log a message just before calling each ChipProbe() during '-probe' + processing (Marc La France). + 398. Temporarily disable ISA probing on SPARCs and PowerPCs (Marc La + France). + 397. Add PCI IDs for Sun hardware (Marc La France). + 396. Fix memory leak in resource relocation (Marc La France). + 395. Do not relocate resources that only conflict with disabled non-video + PCI devices or disabled PCI ROMs (Marc La France). + 394. Re-organise SBUS code (Marc La France). + 393. Add as-yet-unused definitions for PCI resource types other than I/O + and memory (Marc La France). + 392. Add doc for Solaris, but don't format it yet (Marc La France). + 391. Normalise driver names (Marc La France). + 390. For SPARCs, disable DGA support in ATI driver (Marc La France). + 389. Clean up some debugging messages (Marc La France). + 388. Fix newport driver for when a /proc fs isn't mounted (Marc La France). + 387. Fix DAC handling bugs in s3 driver (Marc La France). + 386. Fix resource registration bug for PCI Tseng's (Marc La France). + 385. Add aperture driver for Solaris (not yet used) (Marc La France). + 384. Rework scanpci to fix problems that prevented it from completely + displaying non-PCI bridges and Simba bridges (Marc La France). + 383. Fix build problems in some input drivers (Marc La France). + 382. Fix int10 compile problem for SPARCs and PowerPCs (Marc La France). + 381. Ensure master aborts on secondary buses complete normally during PCI + scans (Marc La France). + 380. Some memory mapping and Solaris cleanups (Marc La France). + +commit a8518b35617a479f50c735c015115b853f4aa327 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 24 20:14:52 2001 +0000 + + kdrive/savage: Long lines cant be drawn with accelerator + +commit 28fd5f7525848cf0109f9cf2d6311f3717570a5d +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 12 06:33:12 2001 +0000 + + kdrive: add new auto-detecting and auto-switching mouse driver + +commit 5f310d7f8b566b1e331286752d349f87ef43a811 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Sep 29 04:16:39 2001 +0000 + + kdrive: restructure APM/VT switch support to reset keyboard state and flush + buffer on APM resume + +commit bb2e1c53b58ac94539f0d11ae195186a9ee0a2f7 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 21 21:58:34 2001 +0000 + + hw/kdrive: Xv window private should be allocated on demand + +commit 59cd35f634468acfa2e48711da09fabc811d96f9 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 14 19:25:17 2001 +0000 + + hw/kdrive/vesa: initialize mouse matrix for non-rotated case correctly + +commit fbaf3ceae0519ebdfee4b6a73b1bc0000f141cf2 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 14 19:24:11 2001 +0000 + + hw/kdrive/trident: solid fill checks busted for planemasking + +commit 216090d1aedb23c691a75da25b14d8543b932e1c +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 5 07:12:43 2001 +0000 + + kdrive: Add primitive ct65550 server. Update kdrive/vesa code to support + DPMS using VESA bios routines. Include support for Toshiba SMM DPMS as + well + +commit f856b952ec7251d6e95f0b93d62fb026d07b0ebc +Author: David Dawes <dawes@xfree86.org> +Date: Thu Aug 9 20:45:15 2001 +0000 + + 187. Add an MS mouse driver for KDrive (#4754, Juliusz Chroboczek). + +commit f4db75ac431c14e0c24ff7549c6ce1e3b0b86b87 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Aug 9 09:08:55 2001 +0000 + + kdrive/mach64: support Xv under RandR + +commit 628d7695d1696f6f5cba6ea1f2548aa5d0f38c80 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Aug 9 09:06:08 2001 +0000 + + kdrive: disable sigio debugging + +commit 958c0374a6709386e91b4b3ed7ba8fa81d415ebf +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jul 24 21:26:17 2001 +0000 + + kdrive: add apm support, fix MTRR unmapping bug + +commit b7eb8a35b51aa2edc9ff59f091ee88ea7000b757 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jul 24 19:06:04 2001 +0000 + + kdrive: Unmap vesa device when disabled + +commit d2d221a012950b98e48e47b6dea38e6ad385fef8 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jul 23 03:44:17 2001 +0000 + + kdrive/mach64: Force read of GUI_STAT on every op to avoid problems across + suspend/resume + +commit 79486b3b5c792a990cb73b4efa453218262e605f +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jul 20 19:35:30 2001 +0000 + + Too many changes, but all in kdrive: + Add support for global screen origins (-origin option), handles both + Xinerama and mouse crossings. + Fix XV enable/disable sequences -- can't use card wrappers as cards have + more than one screen. + Change vesa/fbdev to use new depth-independent rotation shadow update + Fix vesa to allow starting rotation value (again) + Make vesa driver write all colormap changes in one INT10 call + +commit 9826d5a1339570c037ae1ef29c9a237874a6ffa2 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jul 19 08:46:30 2001 +0000 + + kdrive/fbdev: only setting first colormap entry on static hardware + +commit 35d8b5f44269c97497c73d3638b8f0345757c04c +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jul 16 19:48:00 2001 +0000 + + kdrive/fbdev: fix static color case + +commit 090a429573dfb965ebc4ea8ea57e3bef5f9a8539 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 11 16:42:17 2001 +0000 + + kdrive/fbdev: dont set DPMS mode repeatedly to the same value + +commit 99fb2eb76d8f93578e4aba75c73b9be0766f7b6f +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 11 05:02:24 2001 +0000 + + Generalize kludge in fbdev that normalizes pixel formats to something that + Render can handle + +commit 562474091a3d52a062eb89d25a7d38200a785425 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jul 11 02:58:19 2001 +0000 + + Fix TOUCHSCREEN support in kdrive + +commit 67cd53abfce7ed17ae4c428332a9e0fd908da97a +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jun 29 14:00:41 2001 +0000 + + Rework kdrive input fd handling, enable multiple simultaneous mice + +commit c872ee82045e8c7ce019df2577d06bec549cd71c +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jun 29 13:57:45 2001 +0000 + + kdrive: typo in MTRR calculations + +commit 63dd090655ba995b8f26386bb50cb5b7568f7da0 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Jun 29 13:55:53 2001 +0000 + + kdrive: dont touch hardware when disabled + +commit 01a53daa03a8ee36ce136dde3a9a9b152e9c2e2f +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 23 03:41:24 2001 +0000 + + Clean up mach64 video code to add ReputVideo and make StopVideo not crash + the machine + +commit 31d47ec8bed1b02d04563ba502eaeb028975f653 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 21 21:44:09 2001 +0000 + + kdrive/mach64: remove useless Xv debug printfs + +commit bd61c15279e2195c72b3add32961ed21e293d48b +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 21 01:01:30 2001 +0000 + + Add RCS tag + +commit 66c9184807997d2a0a155ba1697906c07396863f +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jun 21 00:58:51 2001 +0000 + + Fix screen physical size in RandR code for kdrive fbdev and pcmcia servers + +commit f8a456f094d8f61c021bbfb6e6f0a4723ebdc73f +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed Jun 20 21:53:31 2001 +0000 + + Add RandR support to the Kdrive pcmcia driver. + +commit 918ff10f2697ee8c17013bd31596072a38c5ac9b +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 19 09:31:47 2001 +0000 + + Finish Xv support for kdrive/mach64 + +commit 6d86517b0ed0db51f3eaf19c186db52feb1e47e0 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 16 05:53:05 2001 +0000 + + Screen flipping broken pointer remapping + +commit 54aea8ec0c1c3633788fd9b19636093860c75d53 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Jun 16 05:48:49 2001 +0000 + + Patch DPMS support in kdrive/mach64, add preliminary (broken) Xv support + +commit f386ca6c69ba10cd8c0dd60bb25cde37ecfc8bc7 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 13 19:18:44 2001 +0000 + + Support initial rotation in kdrive/fbdev, use that as the normal + orientation + +commit 93dbdc89c172fd5d6450f21ebc91011771ac0100 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Jun 13 19:18:03 2001 +0000 + + Add -dpi support to kdrive + +commit a6517a3056a88fca35a47185a0e6d83f3e8b0015 +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 11 01:38:54 2001 +0000 + + Advertise supported rotations in kdrive/vesa server + +commit 4f8254b31f30bd12224c2fdcecfbd67b41ecd7e1 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 5 17:17:39 2001 +0000 + + Attempt to make kdrive/fbdev run on static gray hardware (iPaq 3150) + +commit bf4dbfbf45e4e6b1b86c624b1995a1050b7a0eef +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Tue Jun 5 16:57:44 2001 +0000 + + fix some warnings due to new shadow code + +commit a4ba10ba6ffb1c01a0df5b34669b9fb24ad0e7d9 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jun 5 16:49:31 2001 +0000 + + kdrive/fbdev: RandR initialization sequence change + +commit 7fcf46356ba70563f036f535e60667727db442ae +Author: Keith Packard <keithp@keithp.com> +Date: Mon Jun 4 09:45:42 2001 +0000 + + Allow for hardware acceleration under RandR with Layer. Hardware/Software + cursor switching still busted + +commit 54e66d92db917923e33e018e628a7629d6705507 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Jun 3 21:52:46 2001 +0000 + + Update RandR protocol + +commit 88ae32841d766c7d0df79ee25e1db62996d4ecb3 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Jun 3 18:48:19 2001 +0000 + + Add mach64 driver to Tiny-X + +commit 14ed0c3d6d674df4edcbcd8840a7cea4b41a0673 +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 30 15:36:25 2001 +0000 + + Fix kaa to not try Copy for pixmap sources + +commit a2bd75d15a99d4ee117e17921f0426228d53f5e8 +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 29 21:55:41 2001 +0000 + + Xfbdev: Make sure screen gets re-enabled on RandR failure + +commit 562925c439cf1746f2caa720d4f2dce54ba0311b +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 29 17:47:55 2001 +0000 + + Fix Xipaq build after layer/RandR additions + +commit 78b53386b51cde4fe4664963ddafa36b814360f2 +Author: Keith Packard <keithp@keithp.com> +Date: Tue May 29 04:54:13 2001 +0000 + + Add miext/layer for more complete RandR support in kdrive/Xfbdev + +commit 06f758797ab3651b0e293ae26daf4df77702fdde +Author: Keith Packard <keithp@keithp.com> +Date: Sat May 26 01:25:42 2001 +0000 + + Add initial RandR support to Xvesa + +commit ba8351609869165aa2de92b7a876dc2d2768cb5b +Author: David Dawes <dawes@xfree86.org> +Date: Fri May 25 18:40:59 2001 +0000 + + 38. Fix xmh's use of XtNewString() with getenv (#4694, Tim Waugh). + 37. Xdm/PAM fixes: leave it to PAM to observe whether or not an account is + locked, and reinitialize credentials after calling initgroups(), + because sometimes the credentials pam_setcred() gives are in the form + of group membership (#4693, Mike Harris). + 35. Fix warnings when building mieq.c (#4689, Adam Sulmicki). + 34. Fix some bugs in the cz and sk entried in XKB's keymap/xfree86 file + (#4692, Ivan Pascal). + 33. Add 'hr' entries to XKB's keymap/xfree86 and rules/xfree86.lst files + (#4687, Nerijus Baliunas). + 32. Include <X11/Xutil.h> in shape.h to get Region typedef (#4686, Adam + Sulmicki). + +commit e9314bd34ec39cc699591123cc8a05a934b66b85 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Fri May 25 07:44:29 2001 +0000 + + wrap some stuff around #ifdef TOUCHSCREEN + +commit e6497f39af98cd25719eab72b0be04fa4146172f +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Thu May 24 19:31:46 2001 +0000 + + fix ifdef->if + +commit 0e1a49a7dd00ae494d92ab480d9776ec5320cb3e +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed May 23 17:28:39 2001 +0000 + + add missing pieces for the pcmcia driver + +commit 85d827f5329fa93dea1125788457fac6835cd134 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Wed May 23 08:56:09 2001 +0000 + + Add PCMCIA server for HP VGA Out PC Card and the Voyager VGA Card. Use on + the Compaq IPAQ. Use -listmodes to see supported modes. Hack the + touchscreen driver to work as a mouse pad for the VGA screen. Fixup key + bindings so xmodmap can remap IPAQ's buttons as mouse buttons. + +commit f9104754cda1212cf48d6d24a0a586c5368d7549 +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 23 03:29:44 2001 +0000 + + Add RandR extension + +commit dc383e8f77f99e8c2b799a6ab4e4998a1fcacb24 +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Sun Apr 1 14:00:04 2001 +0000 + + 317. glxinfo needs libGLU (Marc La France). + 316. Rage128 fix to Cards database (Marc La France). + 315. Minor fix to PCI resource overlap handling (Marc La France). + 314. Loader code simplification and IA-64 cache flushes (Marc La France). + 313. Workaround in the ATI driver for troublesome interaction between + loader and compiler optimisation (Marc La France). + 312. Warning fixes for `gcc -fno-builtin`, which appears to be the default + on some systems (Marc La France). + more of #301, tags, warnings and build fixes. + +commit 518e205b06d0dc7a0cd35fbc2c6a4376f2959020 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 30 17:35:55 2001 +0000 + + kdrive/igs: add missing register definitions that used to be in igsregs.t + +commit eb3da37564593b7c9fb574af824e2f5e0cc6bb24 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 30 02:18:41 2001 +0000 + + Add files for Xmuu and i810 driver + +commit f39a62d122b6e63e2971d8593bf6b24933f66ec8 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Mar 30 02:15:20 2001 +0000 + + Add Xmuu library to remove requirement for Xt/Xaw from most X utilities Add + i810 and Xv support to kdrive + +commit a161cfd72870ae6dca66ef02f5cdd13b7ac75fd6 +Author: David Dawes <dawes@xfree86.org> +Date: Wed Mar 21 16:43:16 2001 +0000 + + remove Id line + +commit 0aa54b4d409647778b563d77ef6100085d86c6f3 +Author: David Dawes <dawes@xfree86.org> +Date: Tue Feb 13 21:15:15 2001 +0000 + + 144. Fix the neomagic driver so that it saves/restores the palette (#4452, + Ken Hornstein). + 143. Fix a palette saving bug in the vgahw module (#4452, Ken Hornstein). + 142. Fix a typo in Xfbdev.man (#4446, Juliusz Chroboczek). + 141. Major updates to the savage driver, including: + - DDC support + - I2C support + - XVideo YUV overlay support for Savage/MX and Savage/IX + - DGA support + - yanks Ani Joshi's depth/bitsPerPixel patch for searching the BIOS + - fixes interactions with frame buffer and SVGATextMode consoles; VT + switching now seems quite reliable for almost everyone + - yanks unused options + - adds new options for hacks to deal with the status register hangs + - adds one special case memory configuration for Savage 4 + - adds support for doublescan modes (320x240 works) + - adds LCD panel detection + - fixes a panning bug at depth 24 (panning must be to even pixels) + - adds a workaround for bugs in the latest ProSavage BIOSes (#4445, 4448, + Tim Roberts). + 140. Make 'X -configure' use the long monitor name when present in the DDC + info (#4444, Andrew C. Aitchison). + 139. Make glxinfo respect $DISPLAY (#4443, Meelis Roos). + 138. Fix TrueType font problems in 4.0.2 (#4439, Juliusz Chroboczek). + 137. Document the "DisplaySize" keyword in the XF86Config man page (#4438, + Andrew C. Aitchison). + +commit 3dfa6cce9938413e10cc400ba6d9b19b8f28e485 +Author: David Dawes <dawes@xfree86.org> +Date: Sat Jan 27 18:20:40 2001 +0000 + + 88. Set the version strings in man pages dynamically (David Dawes). + 87. Remove the XF86_VERSION string from xf86Version.h, leaving just the + numerical values. All the version information is now derived from that + single set of values (David Dawes). + +commit 60c7a912e257045d1189a19a38d9dbedc20ae78b +Author: David Dawes <dawes@xfree86.org> +Date: Wed Jan 24 00:06:10 2001 +0000 + + 79. Preprocess all man pages to make sure that the references to pages in + sections that are platform-dependent are correct. Also fixed some misc + formatting problems found while doing that (David Dawes). + +commit dacbf5671da08d161cd7a32496e0b58f50a93453 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Jan 23 06:25:05 2001 +0000 + + Integrate jg patch for iPAQ + +commit 2869e08a328cb6aa51c17b96bdebd37e9eeefc88 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Dec 13 18:06:54 2000 +0000 + + kdrive: non-x86 compiles broken in kmap.c + +commit ec4916836c42cb4a1dc1622dddd27951a90a52c9 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 8 23:04:57 2000 +0000 + + kdrive: dont try MTRR on non-x86, fix backspace mapping + +commit d09a156d92dbcd9368be20dabe47ea197f19357e +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 8 22:59:37 2000 +0000 + + kdrive: allow screen size specification + +commit 6b61d48f2146f18c94d5f2b3d16a822c0eee9841 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 8 21:40:29 2000 +0000 + + kdrive/vesa: type cast warning fix + +commit b59eabd230110d604515868893d9aa06e6d3b748 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 8 21:40:02 2000 +0000 + + kdrive: A few iPAQ inspired changes to event management + +commit a25637fe789c5127451233c759074780cbc110ac +Author: David Dawes <dawes@xfree86.org> +Date: Mon Dec 4 21:01:00 2000 +0000 + + missing ident lines + +commit 1adbdf76a903aa37d553c1c2cc43a783f21acaa5 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Dec 1 00:01:32 2000 +0000 + + kdrive: add Xkdrive/Xfbdev man pages, update Xvesa manual + +commit 5f8e75f27d49719f5fd07d48481435f93779da6c +Author: Keith Packard <keithp@keithp.com> +Date: Wed Nov 29 08:42:25 2000 +0000 + + kdrive: add MTRR support, add clock support to trident driver + +commit 02568ec5a8f278faaa26c973fcb424da3fd31f2b +Author: Keith Packard <keithp@keithp.com> +Date: Sun Nov 19 20:51:12 2000 +0000 + + kdrive: vesa get mode using uninitialized value + +commit 8f634a6516caca0e4be875e696820a820e480cff +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 20 00:19:51 2000 +0000 + + Add VGA BIOS modes to Tiny-X Xvesa server + +commit f16d5d6817f15be35293ee995d073eb57fafe283 +Author: Keith Packard <keithp@keithp.com> +Date: Wed Oct 11 06:04:40 2000 +0000 + + Add composite operator support to trident + +commit d579bd5676ea570a8f2765cd2f6ba40074171593 +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Tue Oct 10 14:05:48 2000 +0000 + + Static build fix and ident lines. + +commit 5f5b9ed1ad0591d70354c2b90609051d169fc33e +Author: Keith Packard <keithp@keithp.com> +Date: Sun Oct 8 02:08:39 2000 +0000 + + kdrive: Add timeout to screen switching to avoid unintentional flipping + +commit fb8b58270fcaee236337d3818df04e651acbcea9 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 6 22:13:40 2000 +0000 + + kdrive: support jgs new linux keysyms + +commit 15d45ffbd9af5ccce07264d6182b2222c417a2a5 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 6 22:05:53 2000 +0000 + + kdrive: fix any-edge screen-switching behaviour + +commit fae164a4958b95e3ba4e4d5125da4611fcb14f6d +Author: Keith Packard <keithp@keithp.com> +Date: Fri Oct 6 05:54:09 2000 +0000 + + kdrive: ignore mouse/keyboard fds in WakeupHandler while switched away + +commit b814019be970bc45f808ec19eef0a48b789d6646 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Oct 3 17:22:14 2000 +0000 + + kdrive: zero out fbdev screen private as its supposed to be + +commit e0ccbaab226bd3e1d619d66c9ec718c67c0a559a +Author: Keith Packard <keithp@keithp.com> +Date: Thu Sep 28 20:58:21 2000 +0000 + + kdrive: fix typo initializing touch screen + +commit 6171187e92152a443f7d5dd7f0dad866b3e275ea +Author: Keith Packard <keithp@keithp.com> +Date: Wed Sep 27 20:47:37 2000 +0000 + + kdrive: memory/fd leaks fixed in fbdev/vesa/trident drivers + +commit 367cab99ece8655bbd8a65096bb68bcfd7ef6fea +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Tue Sep 26 15:57:04 2000 +0000 + + 721. PCI chip ID updates to ATI driver (Marc La France). + 720. Fix i810 driver for -probe and -configure (Marc La France). + 719. Change message when default modes are deleted (Marc La France). + 718. Fix Xinerama byte swapping bug (Marc La France). + 717. IA-64 and Alpha fixes for pswrap, Mesa, DRI, Xpm, libX11, Xt, Xaw, + Xmu, dps, Type1 fonts, cfb24, most output drivers, ELF loader, ramdac + module, xf4bpp and xf86cfg (Marc La France). + 716. Improve IA-64 support by removing a plethora of 32-bit'isms (Marc La + France). + 715. Default HasLinuxDoc to NO (Marc La France). + ident lines and warning fixes. + +commit 94368c3b92b8513d5135fb3c20165f108b0e96fd +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 26 04:31:23 2000 +0000 + + kdrive: Add iPAQ and Touch screen support + +commit 03e3689701007ea40422b4d729b65aaebcd84869 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Sun Sep 24 13:52:40 2000 +0000 + + reversed a tag accidentally - put it back. + +commit 61e8a40f0d4e886bec96c3f9ee90433a3fab9d54 +Author: Alan Hourihane <alanh@fairlite.demon.co.uk> +Date: Sun Sep 24 13:51:22 2000 +0000 + + DRI merge + +commit 2bbb90ebd927607e0b2c7cd8f3a402b44705fe03 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 22 06:25:29 2000 +0000 + + Changes for PPC support under linux and a few overlay additions + +commit 02777941e6ac8c79f934ba95b6b2e7f388ffbd14 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 19 23:50:48 2000 +0000 + + kdrive: fix bug in vesa 4plane in 8bpp mode + +commit 5b9f49f64c7fb51afbfaab4f848fc7d67851582c +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 19 23:49:55 2000 +0000 + + kdrive: use VESA instead of FBDEV for trident driver + +commit 18692160c964c80ba83b63bc207660b6254e11cb +Author: Keith Packard <keithp@keithp.com> +Date: Tue Sep 19 23:49:17 2000 +0000 + + kdrive: make sure allocation worked before accessing + +commit d6e151ce4deaff506c580da7e3baf055db1c3ae3 +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 15 15:19:00 2000 +0000 + + Tiny-X: Add mouse matrix to rotate mouse, allow enable to fail, add render + by default + +commit f7421d836186cd6dfb919c5a48d556a68d6c5a5d +Author: Keith Packard <keithp@keithp.com> +Date: Fri Sep 15 07:25:13 2000 +0000 + + Add rotation to fbdev and vesa + +commit 5ec29fe9ea788e0dcc47534a2eca479b2c465160 +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Thu Sep 7 19:44:26 2000 +0000 + + Ident lines + +commit db1a883d32ce8138dde288d32c11e147cdfc81a0 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Sep 3 05:12:28 2000 +0000 + + Rework tiny-x vesa driver for shadowing and multiple screen support. Allow + enable to fail and avoid crashing + +commit c97fb611dd7dedef6d075ef9d56f3d32c8018d39 +Author: Keith Packard <keithp@keithp.com> +Date: Sun Sep 3 05:11:46 2000 +0000 + + Rework vesa driver for shadowing and multiple screen support. Allow enable + to fail and avoid crashing + +commit 38059656849a5bab5b56b23359a90aca4ba396c7 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Aug 29 17:20:15 2000 +0000 + + Use VESA driver underneath + +commit 77331f967077ca2fefbfb117c7e9bc2bf65b5e31 +Author: Keith Packard <keithp@keithp.com> +Date: Tue Aug 29 17:19:51 2000 +0000 + + Changes from Juliusz for emulating some in/out insns, make ready for other + layers to use + +commit 3095deed7701a1a14be85dff4a6994028b5a6d09 +Author: David Dawes <dawes@xfree86.org> +Date: Mon Aug 28 15:29:19 2000 +0000 + + 565. Support for multithreaded libraries on NetBSD when used in conjunction + with the GNU pth library (#4113, Chris Sekiya). + 564. Add /usr/pkg/bin to NetBSD's DefaultUserPath (#4112, Bernd Ernesti). + 563. Add a (Linux-specific) VESA driver for Keith's small X server (#4111, + Juliusz Chroboczek). + 562. Update Hungarian xkb maps (#A.145, Peter Soos). remove koi8-r encoding + file since it's built-in + +commit f32448679118b77825625aafdc4d6ae4d636cc21 +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Mon Aug 28 02:43:14 2000 +0000 + + Ident lines + +commit 83a388c96d665b6bfb0ae195c8c74e0e1520ab8f +Author: Keith Packard <keithp@keithp.com> +Date: Sat Aug 26 00:24:38 2000 +0000 + + Try to avoid hitting hardware during server reset when not active, add + KdPicture code + +commit 4223801110c8d5873dd668880dff411765dfc18d +Author: Keith Packard <keithp@keithp.com> +Date: Wed Aug 9 17:52:45 2000 +0000 + + Add overlay support for savage. Make sis setup code work on nIc + +commit 325fb002e8832a05361516bbaf19d1e8b67a3486 +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 24 23:57:56 2000 +0000 + + Fix 640x480x60 mode, drop inb/outb on non-x86 machines + +commit a6d519e527a81341ad333cb25b410dfde07176ae +Author: Keith Packard <keithp@keithp.com> +Date: Wed May 24 23:52:48 2000 +0000 + + Add modes, cursors and acceleration + +commit 240aeb4cda91d19f5b19ebd7f7d6c1aad19f1642 +Author: Marc Aurele La France <tsi@ualberta.edu> +Date: Thu May 11 18:14:13 2000 +0000 + + 162. Fix possible SEGV in generic int10 module (Marc La France). + 161. Fix *BSD aperture driver to allow for int10 (Bernd Ernesti, Marc La + France). + 160. Fix vesafb restore problem in ATI driver (Marc La France). + 159. Fix a few more compilation glitches (Marc La France). + +commit 3731c184d69e3c1face0c731926433d522d48067 +Author: Keith Packard <keithp@keithp.com> +Date: Sat May 6 22:17:53 2000 +0000 + + Lots of Tiny-X changes: + Add overlay support in the Tiny-X Savage4 driver (required changing lots of + Tiny-X code). Savage4 now support 8/16, 8/32 overlays. + Add IGS Cyberpro 5050 driver. This chip has bus support for embeded + systems. + +commit 4b54f22b6accf438f31fbbe79877545c38375351 +Author: David Dawes <dawes@xfree86.org> +Date: Wed Feb 23 20:30:15 2000 +0000 + + remove/disable standard RCS ident lines that are in some files some bindist + updates don't define noPanoramiXExtension when Xinerama is not enabled + Add xfontsel to programs/Imakefile + +commit be2dad5954b8fee09a84f417e41bb65745dadf76 +Author: David Dawes <dawes@xfree86.org> +Date: Fri Jan 21 18:41:49 2000 +0000 + + missing ident lines + +commit 306ac1db85c30a796c9a69c639e7f2e4efd98d50 +Author: David Dawes <dawes@xfree86.org> +Date: Fri Jan 21 01:12:02 2000 +0000 + + 3554. Fix "controlization" in XLookupString for chars > 127 (#3569, Ivan + Pascal). + 3553. Take advantage of FB speedups in Tiny-X (#3568, Keith Packard). + 3552. Speed up FB and do 32bit accesses instead of 64bit accesses (#3567, + Keith Packard). + 3551. Eliminate saving the contents of the screen durint VT switching + (#3562, Keith Packard). + 3550. Make using fb easier for driver writers (#3561, Keith Packard). + 3549. Fix TCP font server connections (#3560, Keith Packard). + 3548. Implement the "OverclockMem" option for the Millennium and Millennium + II (#3558, Andrew Aitchison). + 3547. Speed up some FB performance problems (#3557, 3559, 3560, Keith + Packard). + 3546. Work around a bad code generation bug in gcc 2.7.2.3 that shows up in + XAA (#3550, Rik Faith). + 3545. Add a -brief option to xclock to show only hours and minutes when in + digital mode (#3549, Keith Packard). + 3544. Fix some dead key problems with xkb symbols for Swiss French and + Swiss German keyboards (#3546, Charles Lopes). + +commit 6d978d21b0bea6c73b65f2f47c68de4b94dd73c4 +Author: Robin Cutshaw <robin@intercore.com> +Date: Thu Dec 30 03:42:58 1999 +0000 + + Itsy cleanup. + +commit 30e35cb44b6ea11d0eac8ce0d986517f3224852a +Author: Robin Cutshaw <robin@intercore.com> +Date: Thu Dec 30 03:03:21 1999 +0000 + + 3516. Jumbo Tiny-X patch with Itsy support (#3527, Keith Packard). + +commit f13b792a3a8d307a18cd6a41aa5a06622009e42f +Author: Dirk Hohndel <dirk.hohndel@intel.com> +Date: Fri Nov 19 13:54:06 1999 +0000 + + 3336. Fx up new MMIO macros (#3337, Matt Grossman). + 3335. Clean up compiler warnings in lib/font/bitmap (#3411, Matt Grossman). + 3334. TGA fixes, add sync on green (#3410, Matt Grossman). + 3333. Fix NULL pointer dereference in libXaw (#3406, Christopher Sekiya). + 3332. Add Rage128 support (#3405, Rik Faith, funded by ATI). + 3331. Add MTRR support for NetBSD and OpenBSD. Add new NetBSD aperture + driver (#3404, Matthieu Herrb). + 3330. Xterm patch #121 (#3402, Thomas Dickey). + 3329. Rendition driver bugfixes and alpha related cleanups (#3400, Dejan + Ilic, Marc Langenbach, Egbert Eich). + 3328. Add void input device (#3392, Frederic Lepied). + 3327. Changed the Xon serial option to be able to select xon/xoff for + input, output or both. Add support for Graphire models. Change wacom + init phase to use new Xoff option (#3391, Frederic Lepied). + 3326. Change the SwapAxes option to SwapXY in elographics/microtouch driver + to match an already existing option in the Dynapro driver. Add a Focus + class capability to the elographics driver (#3395, Patrick Lecoanet). + 3325. Update mouse rate handling (#3388, Harald Koenig). + 3324. Fix NULL pointer dereference in misprite.c (#3380, Edward Wang). + 3323. Add FBDev and ShadowFB support to glint driver. Add new option + "NoWriteBitmap" (#3383, Michel Daenzer). + 3322. Update SuperProbe to handle S3 Savage4, Savage200 and clean up + Trio3D/Savage3D detection (#3382,3384 Harald Koenig). + 3321. Add new framebuffer code and tiny X DDX architecture (#3379, Keith + Packard). + 3320. Add DGA2 documentation (#3378, Mark Vojkovich). + 3319. Update XFree86 manpage wrt -bpp/-depth/-fbbpp (#3377, Andy Isaacson). + 3318. Make SuperProbe check primary cards, only (#3374, Harald Koenig). + 3317. Add SilkenMouse to *BSD (#3373, Matthieu Herrb). + 3316. Allow SilkenMouse to work if not all drivers of an OS support SIGIO + (#3372, Keith Packard). + 3315. Fix a few problems in TGA driver and add support for backing store + and SilkenMouse (#3371, Matt Grossman). + 3314. Add smarter scheduler (#3370, Keith Packard). + 3313. Xterm patch #120 (#3369, Thomas Dickey). + 3312. Enable xf86SetKbdRate function on Solaris 8 (#3364, David Holland). + 3311. Fix some bugs and add acceleration to Rendition server (#3360, Dejan + Ilic). + 3310. Make raw DDC information available as properties in the root window + (#3357, Andrew Aitchison). + 3309. Fix for xf86CreateRootWindow (#3355, Andrew Aitchison). + 3308. Add manpage for the chips driver (#3353, David Bateman). + 3307. Update contact info (#3352, Andrew van der Stock). + 3306. Add kbd rate support for Linux (#3363, Harald Koenig). + 3305. Update Portuguese XKB map (#3351, Joao Esteves, Francisco Colaco). + 3304. Fix text clipping in 3dfx driver (#3349, Henrik Harmsen). + 3303. Fix S3 ViRGE hw cursor (#3348, Harald Koenig). + 3302. Fix clipping in 3dfx driver (#3342, Daryll Strauss). + 3301. Enable SilkenMouse for 3dfx driver (#3341, Henrik Harmsen). + 3300. Enable SIGIO support on LynxOS (#3339, Thomas Mueller). + 3299. Get TRUE defined in sigio.c. Fix xterm compile problem on ISC (#3338, + Michael Rohleder). + 3298. Correct DPMS suspend/standby modes for 3dfx driver (#3336, Henrik + Harmsen) + 3297. Xterm patch #119 (#3335, Thomas Dickey). diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..8b82ade --- /dev/null +++ b/INSTALL @@ -0,0 +1,291 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `<wchar.h>' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..5bf760b --- /dev/null +++ b/Makefile.am @@ -0,0 +1,118 @@ +AUTOMAKE_OPTIONS=nostdinc +ACLOCAL_AMFLAGS = -I m4 + +if COMPOSITE +COMPOSITE_DIR=composite +endif + +if GLX +GLX_DIR=glx +endif + +if DBE +DBE_DIR=dbe +endif + +if RECORD +RECORD_DIR=record +endif + +if DRI3 +DRI3_DIR=dri3 +endif + +if PRESENT +PRESENT_DIR=present +endif + +SUBDIRS = \ + doc \ + man \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + pseudoramiX \ + randr \ + render \ + Xi \ + xkb \ + $(DBE_DIR) \ + $(RECORD_DIR) \ + xfixes \ + damageext \ + $(COMPOSITE_DIR) \ + $(GLX_DIR) \ + $(PRESENT_DIR) \ + $(DRI3_DIR) \ + exa \ + config \ + hw \ + test + +if XORG +aclocaldir = $(datadir)/aclocal +aclocal_DATA = xorg-server.m4 + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xorg-server.pc +endif + +EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh + +DISTCHECK_CONFIGURE_FLAGS=\ + --with-xkb-path=$(XKB_BASE_DIRECTORY) \ + --with-xkb-bin-directory=$(XKB_BIN_DIRECTORY) \ + --with-xkb-output='$${datadir}/X11/xkb/compiled' + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL + +DIST_SUBDIRS = \ + doc \ + man \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + pseudoramiX \ + randr \ + render \ + Xi \ + xkb \ + dbe \ + record \ + xfixes \ + damageext \ + composite \ + glx \ + exa \ + config \ + dri3 \ + present \ + hw \ + test + +# gross hack +relink: all + $(AM_V_at)$(MAKE) -C hw relink + +install-headers: Makefile + +find . -name Makefile | while read m; do \ + if grep -q install-sdkHEADERS $$m; then \ + (cd `dirname "$$m"` && make install-sdkHEADERS) \ + fi \ + done diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..5b1d036 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,1153 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/xorg-server.pc.in \ + $(srcdir)/xserver.ent.in $(top_srcdir)/configure COPYING \ + ChangeLog INSTALL config.guess config.sub depcomp install-sh \ + ltmain.sh missing ylwrap +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = xserver.ent xorg-server.pc +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(aclocaldir)" \ + "$(DESTDIR)$(pkgconfigdir)" +DATA = $(aclocal_DATA) $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = nostdinc +ACLOCAL_AMFLAGS = -I m4 +@COMPOSITE_TRUE@COMPOSITE_DIR = composite +@GLX_TRUE@GLX_DIR = glx +@DBE_TRUE@DBE_DIR = dbe +@RECORD_TRUE@RECORD_DIR = record +@DRI3_TRUE@DRI3_DIR = dri3 +@PRESENT_TRUE@PRESENT_DIR = present +SUBDIRS = \ + doc \ + man \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + pseudoramiX \ + randr \ + render \ + Xi \ + xkb \ + $(DBE_DIR) \ + $(RECORD_DIR) \ + xfixes \ + damageext \ + $(COMPOSITE_DIR) \ + $(GLX_DIR) \ + $(PRESENT_DIR) \ + $(DRI3_DIR) \ + exa \ + config \ + hw \ + test + +@XORG_TRUE@aclocaldir = $(datadir)/aclocal +@XORG_TRUE@aclocal_DATA = xorg-server.m4 +@XORG_TRUE@pkgconfigdir = $(libdir)/pkgconfig +@XORG_TRUE@pkgconfig_DATA = xorg-server.pc +EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh +DISTCHECK_CONFIGURE_FLAGS = \ + --with-xkb-path=$(XKB_BASE_DIRECTORY) \ + --with-xkb-bin-directory=$(XKB_BIN_DIRECTORY) \ + --with-xkb-output='$${datadir}/X11/xkb/compiled' + +DIST_SUBDIRS = \ + doc \ + man \ + include \ + dix \ + fb \ + mi \ + Xext \ + miext \ + os \ + pseudoramiX \ + randr \ + render \ + Xi \ + xkb \ + dbe \ + record \ + xfixes \ + damageext \ + composite \ + glx \ + exa \ + config \ + dri3 \ + present \ + hw \ + test + +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +xserver.ent: $(top_builddir)/config.status $(srcdir)/xserver.ent.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +xorg-server.pc: $(top_builddir)/config.status $(srcdir)/xorg-server.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-aclocalDATA: $(aclocal_DATA) + @$(NORMAL_INSTALL) + @list='$(aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(aclocaldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(aclocaldir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(aclocaldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(aclocaldir)" || exit $$?; \ + done + +uninstall-aclocalDATA: + @$(NORMAL_UNINSTALL) + @list='$(aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(aclocaldir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod u+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-aclocalDATA install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-aclocalDATA uninstall-pkgconfigDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-aclocalDATA install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-aclocalDATA \ + uninstall-am uninstall-pkgconfigDATA + + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL + +# gross hack +relink: all + $(AM_V_at)$(MAKE) -C hw relink + +install-headers: Makefile + +find . -name Makefile | while read m; do \ + if grep -q install-sdkHEADERS $$m; then \ + (cd `dirname "$$m"` && make install-sdkHEADERS) \ + fi \ + done + +# 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/README b/README new file mode 100644 index 0000000..b2499a0 --- /dev/null +++ b/README @@ -0,0 +1,38 @@ + X Server + +The X server accepts requests from client applications to create windows, +which are (normally rectangular) "virtual screens" that the client program +can draw into. + +Windows are then composed on the actual screen by the X server +(or by a separate composite manager) as directed by the window manager, +which usually communicates with the user via graphical controls such as buttons +and draggable titlebars and borders. + +For a comprehensive overview of X Server and X Window System, consult the +following article: +http://en.wikipedia.org/wiki/X_server + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/xserver + + http://cgit.freedesktop.org/xorg/xserver + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/Xext/Makefile.am b/Xext/Makefile.am new file mode 100644 index 0000000..8e31f13 --- /dev/null +++ b/Xext/Makefile.am @@ -0,0 +1,111 @@ +noinst_LTLIBRARIES = libXext.la + +AM_CFLAGS = $(DIX_CFLAGS) + +if XORG +sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h syncsdk.h +endif + +# Sources always included in libXextbuiltin.la & libXext.la +BUILTIN_SRCS = \ + bigreq.c \ + geext.c \ + shape.c \ + sleepuntil.c \ + sleepuntil.h \ + sync.c \ + syncsdk.h \ + syncsrv.h \ + xcmisc.c \ + xtest.c +BUILTIN_LIBS = + +# Optional sources included if extension enabled by configure.ac rules + +# MIT Shared Memory extension +MITSHM_SRCS = shm.c shmint.h +if MITSHM +BUILTIN_SRCS += $(MITSHM_SRCS) +endif + +# XVideo extension +XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h +if XV +BUILTIN_SRCS += $(XV_SRCS) +endif + +# XResource extension: lets clients get data about per-client resource usage +RES_SRCS = hashtable.c hashtable.h xres.c +if RES +BUILTIN_SRCS += $(RES_SRCS) +endif + +# MIT ScreenSaver extension +SCREENSAVER_SRCS = saver.c +if SCREENSAVER +BUILTIN_SRCS += $(SCREENSAVER_SRCS) +endif + +# Xinerama extension: making multiple video devices act as one virtual screen +XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c +if XINERAMA +BUILTIN_SRCS += $(XINERAMA_SRCS) +if XORG +sdk_HEADERS += panoramiXsrv.h panoramiX.h +endif +endif + +# X-ACE extension: provides hooks for building security policy extensions +# like XC-Security, X-SELinux & XTSol +XACE_SRCS = xace.c xace.h xacestr.h +if XACE +BUILTIN_SRCS += $(XACE_SRCS) +if XORG +sdk_HEADERS += xace.h xacestr.h +endif +endif + +# SELinux extension: provides SELinux policy support for X objects +# requires X-ACE extension +XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h +if XSELINUX +BUILTIN_SRCS += $(XSELINUX_SRCS) +BUILTIN_LIBS += $(SELINUX_LIBS) +endif + +# Security extension: multi-level security to protect clients from each other +XCSECURITY_SRCS = security.c securitysrv.h +if XCSECURITY +BUILTIN_SRCS += $(XCSECURITY_SRCS) +endif + +# XF86 Big Font extension +BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h +if XF86BIGFONT +BUILTIN_SRCS += $(BIGFONT_SRCS) +endif + +# DPMS extension +DPMS_SRCS = dpms.c dpmsproc.h +if DPMSExtension +BUILTIN_SRCS += $(DPMS_SRCS) +endif + +# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la + +libXext_la_SOURCES = $(BUILTIN_SRCS) +libXext_la_LIBADD = $(BUILTIN_LIBS) + +EXTRA_DIST = \ + $(MITSHM_SRCS) \ + $(XV_SRCS) \ + $(RES_SRCS) \ + $(SCREENSAVER_SRCS) \ + $(XACE_SRCS) \ + $(XCSECURITY_SRCS) \ + $(XSELINUX_SRCS) \ + $(XINERAMA_SRCS) \ + $(BIGFONT_SRCS) \ + $(DPMS_SRCS) \ + $(GE_SRCS) + diff --git a/Xext/Makefile.in b/Xext/Makefile.in new file mode 100644 index 0000000..09ce00a --- /dev/null +++ b/Xext/Makefile.in @@ -0,0 +1,927 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@MITSHM_TRUE@am__append_1 = $(MITSHM_SRCS) +@XV_TRUE@am__append_2 = $(XV_SRCS) +@RES_TRUE@am__append_3 = $(RES_SRCS) +@SCREENSAVER_TRUE@am__append_4 = $(SCREENSAVER_SRCS) +@XINERAMA_TRUE@am__append_5 = $(XINERAMA_SRCS) +@XINERAMA_TRUE@@XORG_TRUE@am__append_6 = panoramiXsrv.h panoramiX.h +@XACE_TRUE@am__append_7 = $(XACE_SRCS) +@XACE_TRUE@@XORG_TRUE@am__append_8 = xace.h xacestr.h +@XSELINUX_TRUE@am__append_9 = $(XSELINUX_SRCS) +@XSELINUX_TRUE@am__append_10 = $(SELINUX_LIBS) +@XCSECURITY_TRUE@am__append_11 = $(XCSECURITY_SRCS) +@XF86BIGFONT_TRUE@am__append_12 = $(BIGFONT_SRCS) +@DPMSExtension_TRUE@am__append_13 = $(DPMS_SRCS) +subdir = Xext +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +@XSELINUX_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) +libXext_la_DEPENDENCIES = $(am__DEPENDENCIES_3) +am__libXext_la_SOURCES_DIST = bigreq.c geext.c shape.c sleepuntil.c \ + sleepuntil.h sync.c syncsdk.h syncsrv.h xcmisc.c xtest.c shm.c \ + shmint.h xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h \ + hashtable.c hashtable.h xres.c saver.c panoramiX.c panoramiX.h \ + panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c \ + xace.c xace.h xacestr.h xselinux_ext.c xselinux_hooks.c \ + xselinux_label.c xselinux.h xselinuxint.h security.c \ + securitysrv.h xf86bigfont.c xf86bigfontsrv.h dpms.c dpmsproc.h +am__objects_1 = shm.lo +@MITSHM_TRUE@am__objects_2 = $(am__objects_1) +am__objects_3 = xvmain.lo xvdisp.lo xvmc.lo +@XV_TRUE@am__objects_4 = $(am__objects_3) +am__objects_5 = hashtable.lo xres.lo +@RES_TRUE@am__objects_6 = $(am__objects_5) +am__objects_7 = saver.lo +@SCREENSAVER_TRUE@am__objects_8 = $(am__objects_7) +am__objects_9 = panoramiX.lo panoramiXprocs.lo panoramiXSwap.lo +@XINERAMA_TRUE@am__objects_10 = $(am__objects_9) +am__objects_11 = xace.lo +@XACE_TRUE@am__objects_12 = $(am__objects_11) +am__objects_13 = xselinux_ext.lo xselinux_hooks.lo xselinux_label.lo +@XSELINUX_TRUE@am__objects_14 = $(am__objects_13) +am__objects_15 = security.lo +@XCSECURITY_TRUE@am__objects_16 = $(am__objects_15) +am__objects_17 = xf86bigfont.lo +@XF86BIGFONT_TRUE@am__objects_18 = $(am__objects_17) +am__objects_19 = dpms.lo +@DPMSExtension_TRUE@am__objects_20 = $(am__objects_19) +am__objects_21 = bigreq.lo geext.lo shape.lo sleepuntil.lo sync.lo \ + xcmisc.lo xtest.lo $(am__objects_2) $(am__objects_4) \ + $(am__objects_6) $(am__objects_8) $(am__objects_10) \ + $(am__objects_12) $(am__objects_14) $(am__objects_16) \ + $(am__objects_18) $(am__objects_20) +am_libXext_la_OBJECTS = $(am__objects_21) +libXext_la_OBJECTS = $(am_libXext_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libXext_la_SOURCES) +DIST_SOURCES = $(am__libXext_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__sdk_HEADERS_DIST = xvdix.h xvmcext.h geext.h geint.h shmint.h \ + syncsdk.h panoramiXsrv.h panoramiX.h xace.h xacestr.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libXext.la +AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h \ +@XORG_TRUE@ syncsdk.h $(am__append_6) $(am__append_8) + +# Sources always included in libXextbuiltin.la & libXext.la +BUILTIN_SRCS = bigreq.c geext.c shape.c sleepuntil.c sleepuntil.h \ + sync.c syncsdk.h syncsrv.h xcmisc.c xtest.c $(am__append_1) \ + $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) $(am__append_7) $(am__append_9) \ + $(am__append_11) $(am__append_12) $(am__append_13) +BUILTIN_LIBS = $(am__append_10) + +# Optional sources included if extension enabled by configure.ac rules + +# MIT Shared Memory extension +MITSHM_SRCS = shm.c shmint.h + +# XVideo extension +XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h + +# XResource extension: lets clients get data about per-client resource usage +RES_SRCS = hashtable.c hashtable.h xres.c + +# MIT ScreenSaver extension +SCREENSAVER_SRCS = saver.c + +# Xinerama extension: making multiple video devices act as one virtual screen +XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c + +# X-ACE extension: provides hooks for building security policy extensions +# like XC-Security, X-SELinux & XTSol +XACE_SRCS = xace.c xace.h xacestr.h + +# SELinux extension: provides SELinux policy support for X objects +# requires X-ACE extension +XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h + +# Security extension: multi-level security to protect clients from each other +XCSECURITY_SRCS = security.c securitysrv.h + +# XF86 Big Font extension +BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h + +# DPMS extension +DPMS_SRCS = dpms.c dpmsproc.h + +# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la +libXext_la_SOURCES = $(BUILTIN_SRCS) +libXext_la_LIBADD = $(BUILTIN_LIBS) +EXTRA_DIST = \ + $(MITSHM_SRCS) \ + $(XV_SRCS) \ + $(RES_SRCS) \ + $(SCREENSAVER_SRCS) \ + $(XACE_SRCS) \ + $(XCSECURITY_SRCS) \ + $(XSELINUX_SRCS) \ + $(XINERAMA_SRCS) \ + $(BIGFONT_SRCS) \ + $(DPMS_SRCS) \ + $(GE_SRCS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Xext/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Xext/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libXext.la: $(libXext_la_OBJECTS) $(libXext_la_DEPENDENCIES) $(EXTRA_libXext_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libXext_la_OBJECTS) $(libXext_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigreq.Plo@am__quote@ +@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)/hashtable.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@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleepuntil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcmisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86bigfont.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xres.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xselinux_ext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xselinux_hooks.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xselinux_label.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvdisp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvmain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvmc.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +# 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/Xext/bigreq.c b/Xext/bigreq.c new file mode 100644 index 0000000..c78a1e4 --- /dev/null +++ b/Xext/bigreq.c @@ -0,0 +1,76 @@ +/* + +Copyright 1992, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include <X11/extensions/bigreqsproto.h> +#include "opaque.h" +#include "extinit.h" + +static int +ProcBigReqDispatch(ClientPtr client) +{ + REQUEST(xBigReqEnableReq); + xBigReqEnableReply rep; + + if (client->swapped) { + swaps(&stuff->length); + } + if (stuff->brReqType != X_BigReqEnable) + return BadRequest; + REQUEST_SIZE_MATCH(xBigReqEnableReq); + client->big_requests = TRUE; + rep = (xBigReqEnableReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .max_request_size = maxBigRequestSize + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.max_request_size); + } + WriteToClient(client, sizeof(xBigReqEnableReply), &rep); + return Success; +} + +void +BigReqExtensionInit(void) +{ + AddExtension(XBigReqExtensionName, 0, 0, + ProcBigReqDispatch, ProcBigReqDispatch, + NULL, StandardMinorOpcode); +} diff --git a/Xext/dpms.c b/Xext/dpms.c new file mode 100644 index 0000000..5f1a35d --- /dev/null +++ b/Xext/dpms.c @@ -0,0 +1,363 @@ +/***************************************************************** + +Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "opaque.h" +#include <X11/extensions/dpmsproto.h> +#include "dpmsproc.h" +#include "extinit.h" + +static int +ProcDPMSGetVersion(ClientPtr client) +{ + /* REQUEST(xDPMSGetVersionReq); */ + xDPMSGetVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = DPMSMajorVersion, + .minorVersion = DPMSMinorVersion + }; + + REQUEST_SIZE_MATCH(xDPMSGetVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + } + WriteToClient(client, sizeof(xDPMSGetVersionReply), &rep); + return Success; +} + +static int +ProcDPMSCapable(ClientPtr client) +{ + /* REQUEST(xDPMSCapableReq); */ + xDPMSCapableReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .capable = DPMSCapableFlag + }; + + REQUEST_SIZE_MATCH(xDPMSCapableReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + } + WriteToClient(client, sizeof(xDPMSCapableReply), &rep); + return Success; +} + +static int +ProcDPMSGetTimeouts(ClientPtr client) +{ + /* REQUEST(xDPMSGetTimeoutsReq); */ + xDPMSGetTimeoutsReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .standby = DPMSStandbyTime / MILLI_PER_SECOND, + .suspend = DPMSSuspendTime / MILLI_PER_SECOND, + .off = DPMSOffTime / MILLI_PER_SECOND + }; + + REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swaps(&rep.standby); + swaps(&rep.suspend); + swaps(&rep.off); + } + WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), &rep); + return Success; +} + +static int +ProcDPMSSetTimeouts(ClientPtr client) +{ + REQUEST(xDPMSSetTimeoutsReq); + + REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); + + if ((stuff->off != 0) && (stuff->off < stuff->suspend)) { + client->errorValue = stuff->off; + return BadValue; + } + if ((stuff->suspend != 0) && (stuff->suspend < stuff->standby)) { + client->errorValue = stuff->suspend; + return BadValue; + } + + DPMSStandbyTime = stuff->standby * MILLI_PER_SECOND; + DPMSSuspendTime = stuff->suspend * MILLI_PER_SECOND; + DPMSOffTime = stuff->off * MILLI_PER_SECOND; + SetScreenSaverTimer(); + + return Success; +} + +static int +ProcDPMSEnable(ClientPtr client) +{ + Bool was_enabled = DPMSEnabled; + + REQUEST_SIZE_MATCH(xDPMSEnableReq); + + if (DPMSCapableFlag) { + DPMSEnabled = TRUE; + if (!was_enabled) + SetScreenSaverTimer(); + } + + return Success; +} + +static int +ProcDPMSDisable(ClientPtr client) +{ + /* REQUEST(xDPMSDisableReq); */ + + REQUEST_SIZE_MATCH(xDPMSDisableReq); + + DPMSSet(client, DPMSModeOn); + + DPMSEnabled = FALSE; + + return Success; +} + +static int +ProcDPMSForceLevel(ClientPtr client) +{ + REQUEST(xDPMSForceLevelReq); + + REQUEST_SIZE_MATCH(xDPMSForceLevelReq); + + if (!DPMSEnabled) + return BadMatch; + + if (stuff->level != DPMSModeOn && + stuff->level != DPMSModeStandby && + stuff->level != DPMSModeSuspend && stuff->level != DPMSModeOff) { + client->errorValue = stuff->level; + return BadValue; + } + + DPMSSet(client, stuff->level); + + return Success; +} + +static int +ProcDPMSInfo(ClientPtr client) +{ + /* REQUEST(xDPMSInfoReq); */ + xDPMSInfoReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .power_level = DPMSPowerLevel, + .state = DPMSEnabled + }; + + REQUEST_SIZE_MATCH(xDPMSInfoReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swaps(&rep.power_level); + } + WriteToClient(client, sizeof(xDPMSInfoReply), &rep); + return Success; +} + +static int +ProcDPMSDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_DPMSGetVersion: + return ProcDPMSGetVersion(client); + case X_DPMSCapable: + return ProcDPMSCapable(client); + case X_DPMSGetTimeouts: + return ProcDPMSGetTimeouts(client); + case X_DPMSSetTimeouts: + return ProcDPMSSetTimeouts(client); + case X_DPMSEnable: + return ProcDPMSEnable(client); + case X_DPMSDisable: + return ProcDPMSDisable(client); + case X_DPMSForceLevel: + return ProcDPMSForceLevel(client); + case X_DPMSInfo: + return ProcDPMSInfo(client); + default: + return BadRequest; + } +} + +static int +SProcDPMSGetVersion(ClientPtr client) +{ + REQUEST(xDPMSGetVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSGetVersionReq); + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); + return ProcDPMSGetVersion(client); +} + +static int +SProcDPMSCapable(ClientPtr client) +{ + REQUEST(xDPMSCapableReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSCapableReq); + + return ProcDPMSCapable(client); +} + +static int +SProcDPMSGetTimeouts(ClientPtr client) +{ + REQUEST(xDPMSGetTimeoutsReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); + + return ProcDPMSGetTimeouts(client); +} + +static int +SProcDPMSSetTimeouts(ClientPtr client) +{ + REQUEST(xDPMSSetTimeoutsReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); + + swaps(&stuff->standby); + swaps(&stuff->suspend); + swaps(&stuff->off); + return ProcDPMSSetTimeouts(client); +} + +static int +SProcDPMSEnable(ClientPtr client) +{ + REQUEST(xDPMSEnableReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSEnableReq); + + return ProcDPMSEnable(client); +} + +static int +SProcDPMSDisable(ClientPtr client) +{ + REQUEST(xDPMSDisableReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSDisableReq); + + return ProcDPMSDisable(client); +} + +static int +SProcDPMSForceLevel(ClientPtr client) +{ + REQUEST(xDPMSForceLevelReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSForceLevelReq); + + swaps(&stuff->level); + + return ProcDPMSForceLevel(client); +} + +static int +SProcDPMSInfo(ClientPtr client) +{ + REQUEST(xDPMSInfoReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDPMSInfoReq); + + return ProcDPMSInfo(client); +} + +static int +SProcDPMSDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_DPMSGetVersion: + return SProcDPMSGetVersion(client); + case X_DPMSCapable: + return SProcDPMSCapable(client); + case X_DPMSGetTimeouts: + return SProcDPMSGetTimeouts(client); + case X_DPMSSetTimeouts: + return SProcDPMSSetTimeouts(client); + case X_DPMSEnable: + return SProcDPMSEnable(client); + case X_DPMSDisable: + return SProcDPMSDisable(client); + case X_DPMSForceLevel: + return SProcDPMSForceLevel(client); + case X_DPMSInfo: + return SProcDPMSInfo(client); + default: + return BadRequest; + } +} + +void +DPMSExtensionInit(void) +{ + AddExtension(DPMSExtensionName, 0, 0, + ProcDPMSDispatch, SProcDPMSDispatch, + NULL, StandardMinorOpcode); +} diff --git a/Xext/dpmsproc.h b/Xext/dpmsproc.h new file mode 100644 index 0000000..7494dfd --- /dev/null +++ b/Xext/dpmsproc.h @@ -0,0 +1,15 @@ +/* Prototypes for functions that the DDX must provide */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _DPMSPROC_H_ +#define _DPMSPROC_H_ + +#include "dixstruct.h" + +int DPMSSet(ClientPtr client, int level); +Bool DPMSSupported(void); + +#endif diff --git a/Xext/dpmsstubs.c b/Xext/dpmsstubs.c new file mode 100644 index 0000000..80f13f5 --- /dev/null +++ b/Xext/dpmsstubs.c @@ -0,0 +1,47 @@ +/***************************************************************** + +Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "dpmsproc.h" + +#define FALSE 0 + +Bool +DPMSSupported(void) +{ + return FALSE; +} + +int +DPMSSet(ClientPtr client, int level) +{ + return Success; +} diff --git a/Xext/geext.c b/Xext/geext.c new file mode 100644 index 0000000..1e5ae6f --- /dev/null +++ b/Xext/geext.c @@ -0,0 +1,255 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif +#include "windowstr.h" +#include <X11/extensions/ge.h> + +#include "geint.h" +#include "geext.h" +#include "protocol-versions.h" +#include "extinit.h" + +DevPrivateKeyRec GEClientPrivateKeyRec; + +GEExtension GEExtensions[MAXEXTENSIONS]; + +/* Major available requests */ +static const int version_requests[] = { + X_GEQueryVersion, /* before client sends QueryVersion */ + X_GEQueryVersion, /* must be set to last request in version 1 */ +}; + +/* Forward declarations */ +static void SGEGenericEvent(xEvent *from, xEvent *to); + +#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) +#define EXT_MASK(ext) ((ext) & 0x7F) + +/************************************************************/ +/* request handlers */ +/************************************************************/ + +static int +ProcGEQueryVersion(ClientPtr client) +{ + GEClientInfoPtr pGEClient = GEGetClient(client); + xGEQueryVersionReply rep; + + REQUEST(xGEQueryVersionReq); + + REQUEST_SIZE_MATCH(xGEQueryVersionReq); + + rep = (xGEQueryVersionReply) { + .repType = X_Reply, + .RepType = X_GEQueryVersion, + .sequenceNumber = client->sequence, + .length = 0, + + /* return the supported version by the server */ + .majorVersion = SERVER_GE_MAJOR_VERSION, + .minorVersion = SERVER_GE_MINOR_VERSION + }; + + /* Remember version the client requested */ + pGEClient->major_version = stuff->majorVersion; + pGEClient->minor_version = stuff->minorVersion; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + } + + WriteToClient(client, sizeof(xGEQueryVersionReply), &rep); + return Success; +} + +int (*ProcGEVector[GENumberRequests]) (ClientPtr) = { + /* Version 1.0 */ +ProcGEQueryVersion}; + +/************************************************************/ +/* swapped request handlers */ +/************************************************************/ +static int +SProcGEQueryVersion(ClientPtr client) +{ + REQUEST(xGEQueryVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGEQueryVersionReq); + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); + return (*ProcGEVector[stuff->ReqType]) (client); +} + +int (*SProcGEVector[GENumberRequests]) (ClientPtr) = { + /* Version 1.0 */ +SProcGEQueryVersion}; + +/************************************************************/ +/* callbacks */ +/************************************************************/ + +/* dispatch requests */ +static int +ProcGEDispatch(ClientPtr client) +{ + GEClientInfoPtr pGEClient = GEGetClient(client); + + REQUEST(xGEReq); + + if (pGEClient->major_version >= NUM_VERSION_REQUESTS) + return BadRequest; + if (stuff->ReqType > version_requests[pGEClient->major_version]) + return BadRequest; + + return (ProcGEVector[stuff->ReqType]) (client); +} + +/* dispatch swapped requests */ +static int +SProcGEDispatch(ClientPtr client) +{ + REQUEST(xGEReq); + if (stuff->ReqType >= GENumberRequests) + return BadRequest; + return (*SProcGEVector[stuff->ReqType]) (client); +} + +/** + * Called when a new client inits a connection to the X server. + * + * We alloc a simple struct to store the client's major/minor version. Can be + * used in the furture for versioning support. + */ +static void +GEClientCallback(CallbackListPtr *list, pointer closure, pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + GEClientInfoPtr pGEClient = GEGetClient(pClient); + + pGEClient->major_version = 0; + pGEClient->minor_version = 0; +} + +/* Reset extension. Called on server shutdown. */ +static void +GEResetProc(ExtensionEntry * extEntry) +{ + DeleteCallback(&ClientStateCallback, GEClientCallback, 0); + EventSwapVector[GenericEvent] = NotImplemented; +} + +/* Calls the registered event swap function for the extension. + * + * Each extension can register a swap function to handle GenericEvents being + * swapped properly. The server calls SGEGenericEvent() before the event is + * written on the wire, this one calls the registered swap function to do the + * work. + */ +static void +SGEGenericEvent(xEvent *from, xEvent *to) +{ + xGenericEvent *gefrom = (xGenericEvent *) from; + xGenericEvent *geto = (xGenericEvent *) to; + + if ((gefrom->extension & 0x7f) > MAXEXTENSIONS) { + ErrorF("GE: Invalid extension offset for event.\n"); + return; + } + + if (GEExtensions[EXT_MASK(gefrom->extension)].evswap) + GEExtensions[EXT_MASK(gefrom->extension)].evswap(gefrom, geto); +} + +/* Init extension, register at server. + * Since other extensions may rely on XGE (XInput does already), it is a good + * idea to init XGE first, before any other extension. + */ +void +GEExtensionInit(void) +{ + ExtensionEntry *extEntry; + + if (!dixRegisterPrivateKey + (&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec))) + FatalError("GEExtensionInit: GE private request failed.\n"); + + if (!AddCallback(&ClientStateCallback, GEClientCallback, 0)) { + FatalError("GEExtensionInit: register client callback failed.\n"); + } + + if ((extEntry = AddExtension(GE_NAME, + 0, GENumberErrors, + ProcGEDispatch, SProcGEDispatch, + GEResetProc, StandardMinorOpcode)) != 0) { + memset(GEExtensions, 0, sizeof(GEExtensions)); + + EventSwapVector[GenericEvent] = (EventSwapPtr) SGEGenericEvent; + } + else { + FatalError("GEInit: AddExtensions failed.\n"); + } + +} + +/************************************************************/ +/* interface for extensions */ +/************************************************************/ + +/* Register an extension with GE. The given swap function will be called each + * time an event is sent to a client with different byte order. + * @param extension The extensions major opcode + * @param ev_swap The event swap function. + * @param ev_fill Called for an event before delivery. The extension now has + * the chance to fill in necessary fields for the event. + */ +void +GERegisterExtension(int extension, + void (*ev_swap) (xGenericEvent *from, xGenericEvent *to)) +{ + if (EXT_MASK(extension) >= MAXEXTENSIONS) + FatalError("GE: extension > MAXEXTENSIONS. This should not happen.\n"); + + /* extension opcodes are > 128, might as well save some space here */ + GEExtensions[EXT_MASK(extension)].evswap = ev_swap; +} + +/* Sets type and extension field for a generic event. This is just an + * auxiliary function, extensions could do it manually too. + */ +void +GEInitEvent(xGenericEvent *ev, int extension) +{ + ev->type = GenericEvent; + ev->extension = extension; + ev->length = 0; +} diff --git a/Xext/geext.h b/Xext/geext.h new file mode 100644 index 0000000..f468979 --- /dev/null +++ b/Xext/geext.h @@ -0,0 +1,81 @@ +/* + +Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the author shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the author. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _GEEXT_H_ +#define _GEEXT_H_ +#include <X11/extensions/geproto.h> + +/** Struct to keep information about registered extensions */ +typedef struct _GEExtension { + /** Event swapping routine */ + void (*evswap) (xGenericEvent *from, xGenericEvent *to); +} GEExtension, *GEExtensionPtr; + +/* All registered extensions and their handling functions. */ +extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS]; + +/* Typecast to generic event */ +#define GEV(ev) ((xGenericEvent*)(ev)) +/* Returns the extension offset from the event */ +#define GEEXT(ev) (GEV(ev)->extension) + +/* Return zero-based extension offset (offset - 128). Only for use in arrays */ +#define GEEXTIDX(ev) (GEEXT(ev) & 0x7F) +/* True if mask is set for extension on window */ +#define GEMaskIsSet(pWin, extension, mask) \ + ((pWin)->optional && \ + (pWin)->optional->geMasks && \ + ((pWin)->optional->geMasks->eventMasks[(extension) & 0x7F] & (mask))) + +/* Returns first client */ +#define GECLIENT(pWin) \ + (((pWin)->optional) ? (pWin)->optional->geMasks->geClients : NULL) + +/* Returns the event_fill for the given event */ +#define GEEventFill(ev) \ + GEExtensions[GEEXTIDX(ev)].evfill + +#define GEIsType(ev, ext, ev_type) \ + ((GEV(ev)->type == GenericEvent) && \ + GEEXT(ev) == (ext) && \ + GEV(ev)->evtype == (ev_type)) + +/* Interface for other extensions */ +extern _X_EXPORT void GERegisterExtension(int extension, + void (*ev_dispatch) (xGenericEvent + *from, + xGenericEvent + *to)); + +extern _X_EXPORT void GEInitEvent(xGenericEvent *ev, int extension); + +#endif /* _GEEXT_H_ */ diff --git a/Xext/geint.h b/Xext/geint.h new file mode 100644 index 0000000..f76d148 --- /dev/null +++ b/Xext/geint.h @@ -0,0 +1,54 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _GEINT_H_ +#define _GEINT_H_ + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include <X11/extensions/geproto.h> + +extern _X_EXPORT DevPrivateKeyRec GEClientPrivateKeyRec; + +#define GEClientPrivateKey (&GEClientPrivateKeyRec) + +typedef struct _GEClientInfo { + CARD32 major_version; + CARD32 minor_version; +} GEClientInfoRec, *GEClientInfoPtr; + +#define GEGetClient(pClient) ((GEClientInfoPtr)(dixLookupPrivate(&((pClient)->devPrivates), GEClientPrivateKey))) + +extern _X_EXPORT int (*ProcGEVector[ /*GENumRequests */ ]) (ClientPtr); +extern _X_EXPORT int (*SProcGEVector[ /*GENumRequests */ ]) (ClientPtr); + +#endif /* _GEINT_H_ */ diff --git a/Xext/hashtable.c b/Xext/hashtable.c new file mode 100644 index 0000000..9d9ef89 --- /dev/null +++ b/Xext/hashtable.c @@ -0,0 +1,295 @@ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdlib.h> +#include "misc.h" +#include "hashtable.h" + +/* HashResourceID */ +#include "resource.h" + +#define INITHASHSIZE 6 +#define MAXHASHSIZE 11 + +struct HashTableRec { + int keySize; + int dataSize; + + int elements; /* number of elements inserted */ + int bucketBits; /* number of buckets is 1 << bucketBits */ + struct xorg_list *buckets; /* array of bucket list heads */ + + HashFunc hash; + HashCompareFunc compare; + + pointer cdata; +}; + +typedef struct { + struct xorg_list l; + void *key; + void *data; +} BucketRec, *BucketPtr; + +HashTable +ht_create(int keySize, + int dataSize, + HashFunc hash, + HashCompareFunc compare, + pointer cdata) +{ + int c; + int numBuckets; + HashTable ht = malloc(sizeof(struct HashTableRec)); + + if (!ht) { + return NULL; + } + + ht->keySize = keySize; + ht->dataSize = dataSize; + ht->hash = hash; + ht->compare = compare; + ht->elements = 0; + ht->bucketBits = INITHASHSIZE; + numBuckets = 1 << ht->bucketBits; + ht->buckets = malloc(numBuckets * sizeof(*ht->buckets)); + ht->cdata = cdata; + + if (ht->buckets) { + for (c = 0; c < numBuckets; ++c) { + xorg_list_init(&ht->buckets[c]); + } + return ht; + } else { + free(ht); + return NULL; + } +} + +void +ht_destroy(HashTable ht) +{ + int c; + BucketPtr it, tmp; + int numBuckets = 1 << ht->bucketBits; + for (c = 0; c < numBuckets; ++c) { + xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) { + xorg_list_del(&it->l); + free(it); + } + } + free(ht->buckets); +} + +static Bool +double_size(HashTable ht) +{ + struct xorg_list *newBuckets; + int numBuckets = 1 << ht->bucketBits; + int newBucketBits = ht->bucketBits + 1; + int newNumBuckets = 1 << newBucketBits; + int c; + + newBuckets = malloc(newNumBuckets * sizeof(*ht->buckets)); + if (newBuckets) { + for (c = 0; c < newNumBuckets; ++c) { + xorg_list_init(&newBuckets[c]); + } + + for (c = 0; c < numBuckets; ++c) { + BucketPtr it, tmp; + xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) { + struct xorg_list *newBucket = + &newBuckets[ht->hash(ht->cdata, it->key, newBucketBits)]; + xorg_list_del(&it->l); + xorg_list_add(&it->l, newBucket); + } + } + free(ht->buckets); + + ht->buckets = newBuckets; + ht->bucketBits = newBucketBits; + return TRUE; + } else { + return FALSE; + } +} + +pointer +ht_add(HashTable ht, pointer key) +{ + unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); + struct xorg_list *bucket = &ht->buckets[index]; + BucketRec *elem = calloc(1, sizeof(BucketRec)); + if (!elem) { + goto outOfMemory; + } + elem->key = malloc(ht->keySize); + if (!elem->key) { + goto outOfMemory; + } + /* we avoid signaling an out-of-memory error if dataSize is 0 */ + elem->data = calloc(1, ht->dataSize); + if (ht->dataSize && !elem->data) { + goto outOfMemory; + } + xorg_list_add(&elem->l, bucket); + ++ht->elements; + + memcpy(elem->key, key, ht->keySize); + + if (ht->elements > 4 * (1 << ht->bucketBits) && + ht->bucketBits < MAXHASHSIZE) { + if (!double_size(ht)) { + --ht->elements; + xorg_list_del(&elem->l); + goto outOfMemory; + } + } + + /* if memory allocation has failed due to dataSize being 0, return + a "dummy" pointer pointing at the of the key */ + return elem->data ? elem->data : ((char*) elem->key + ht->keySize); + + outOfMemory: + if (elem) { + free(elem->key); + free(elem->data); + free(elem); + } + + return NULL; +} + +void +ht_remove(HashTable ht, pointer key) +{ + unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); + struct xorg_list *bucket = &ht->buckets[index]; + BucketPtr it; + + xorg_list_for_each_entry(it, bucket, l) { + if (ht->compare(ht->cdata, key, it->key) == 0) { + xorg_list_del(&it->l); + --ht->elements; + free(it->key); + free(it->data); + free(it); + return; + } + } +} + +pointer +ht_find(HashTable ht, pointer key) +{ + unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); + struct xorg_list *bucket = &ht->buckets[index]; + BucketPtr it; + + xorg_list_for_each_entry(it, bucket, l) { + if (ht->compare(ht->cdata, key, it->key) == 0) { + return it->data ? it->data : ((char*) it->key + ht->keySize); + } + } + + return NULL; +} + +void +ht_dump_distribution(HashTable ht) +{ + int c; + int numBuckets = 1 << ht->bucketBits; + for (c = 0; c < numBuckets; ++c) { + BucketPtr it; + int n = 0; + + xorg_list_for_each_entry(it, &ht->buckets[c], l) { + ++n; + } + printf("%d: %d\n", c, n); + } +} + +/* Picked the function from http://burtleburtle.net/bob/hash/doobs.html by + Bob Jenkins, which is released in public domain */ +static CARD32 +one_at_a_time_hash(const void *data, int len) +{ + CARD32 hash; + int i; + const char *key = data; + for (hash=0, i=0; i<len; ++i) { + hash += key[i]; + hash += (hash << 10); + hash ^= (hash >> 6); + } + hash += (hash << 3); + hash ^= (hash >> 11); + hash += (hash << 15); + return hash; +} + +unsigned +ht_generic_hash(void *cdata, const void *ptr, int numBits) +{ + HtGenericHashSetupPtr setup = cdata; + return one_at_a_time_hash(ptr, setup->keySize) & ~((~0) << numBits); +} + +int +ht_generic_compare(void *cdata, const void *l, const void *r) +{ + HtGenericHashSetupPtr setup = cdata; + return memcmp(l, r, setup->keySize); +} + +unsigned +ht_resourceid_hash(void * cdata, const void * data, int numBits) +{ + const XID* idPtr = data; + XID id = *idPtr & RESOURCE_ID_MASK; + (void) cdata; + return HashResourceID(id, numBits); +} + +int +ht_resourceid_compare(void* cdata, const void* a, const void* b) +{ + const XID* xa = a; + const XID* xb = b; + (void) cdata; + return + *xa < *xb ? -1 : + *xa > *xb ? 1 : + 0; +} + +void +ht_dump_contents(HashTable ht, + void (*print_key)(void *opaque, void *key), + void (*print_value)(void *opaque, void *value), + void* opaque) +{ + int c; + int numBuckets = 1 << ht->bucketBits; + for (c = 0; c < numBuckets; ++c) { + BucketPtr it; + int n = 0; + + printf("%d: ", c); + xorg_list_for_each_entry(it, &ht->buckets[c], l) { + if (n > 0) { + printf(", "); + } + print_key(opaque, it->key); + printf("->"); + print_value(opaque, it->data); + ++n; + } + printf("\n"); + } +} diff --git a/Xext/hashtable.h b/Xext/hashtable.h new file mode 100644 index 0000000..5d15984 --- /dev/null +++ b/Xext/hashtable.h @@ -0,0 +1,137 @@ +#ifndef HASHTABLE_H +#define HASHTABLE_H 1 + +#include <dix-config.h> +#include <X11/Xfuncproto.h> +#include <X11/Xdefs.h> +#include "list.h" + +/** @brief A hashing function. + + @param[in/out] cdata Opaque data that can be passed to HtInit that will + eventually end up here + @param[in] ptr The data to be hashed. The size of the data, if + needed, can be configured via a record that can be + passed via cdata. + @param[in] numBits The number of bits this hash needs to have in the + resulting hash + + @return A numBits-bit hash of the data +*/ +typedef unsigned (*HashFunc)(void * cdata, const void * ptr, int numBits); + +/** @brief A comparison function for hashed keys. + + @param[in/out] cdata Opaque data that ca be passed to Htinit that will + eventually end up here + @param[in] l The left side data to be compared + @param[in] r The right side data to be compared + + @return -1 if l < r, 0 if l == r, 1 if l > r +*/ +typedef int (*HashCompareFunc)(void * cdata, const void * l, const void * r); + +struct HashTableRec; + +typedef struct HashTableRec *HashTable; + +/** @brief A configuration for HtGenericHash */ +typedef struct { + int keySize; +} HtGenericHashSetupRec, *HtGenericHashSetupPtr; + +/** @brief ht_create initalizes a hash table for a certain hash table + configuration + + @param[out] ht The hash table structure to initialize + @param[in] keySize The key size in bytes + @param[in] dataSize The data size in bytes + @param[in] hash The hash function to use for hashing keys + @param[in] compare The comparison function for hashing keys + @param[in] cdata Opaque data that will be passed to hash and + comparison functions +*/ +extern _X_EXPORT HashTable ht_create(int keySize, + int dataSize, + HashFunc hash, + HashCompareFunc compare, + pointer cdata); +/** @brief HtDestruct deinitializes the structure. It does not free the + memory allocated to HashTableRec +*/ +extern _X_EXPORT void ht_destroy(HashTable ht); + +/** @brief Adds a new key to the hash table. The key will be copied + and a pointer to the value will be returned. The data will + be initialized with zeroes. + + @param[in/out] ht The hash table + @param[key] key The key. The contents of the key will be copied. + + @return On error NULL is returned, otherwise a pointer to the data + associated with the newly inserted key. + + @note If dataSize is 0, a pointer to the end of the key may be returned + to avoid returning NULL. Obviously the data pointed cannot be + modified, as implied by dataSize being 0. +*/ +extern _X_EXPORT pointer ht_add(HashTable ht, pointer key); + +/** @brief Removes a key from the hash table along with its + associated data, which will be free'd. +*/ +extern _X_EXPORT void ht_remove(HashTable ht, pointer key); + +/** @brief Finds the associated data of a key from the hash table. + + @return If the key cannot be found, the function returns NULL. + Otherwise it returns a pointer to the data associated + with the key. + + @note If dataSize == 0, this function may return NULL + even if the key has been inserted! If dataSize == NULL, + use HtMember instead to determine if a key has been + inserted. +*/ +extern _X_EXPORT pointer ht_find(HashTable ht, pointer key); + +/** @brief A generic hash function */ +extern _X_EXPORT unsigned ht_generic_hash(void *cdata, + const void *ptr, + int numBits); + +/** @brief A generic comparison function. It compares data byte-wise. */ +extern _X_EXPORT int ht_generic_compare(void *cdata, + const void *l, + const void *r); + +/** @brief A debugging function that dumps the distribution of the + hash table: for each bucket, list the number of elements + contained within. */ +extern _X_EXPORT void ht_dump_distribution(HashTable ht); + +/** @brief A debugging function that dumps the contents of the hash + table: for each bucket, list the elements contained + within. */ +extern _X_EXPORT void ht_dump_contents(HashTable ht, + void (*print_key)(void *opaque, void *key), + void (*print_value)(void *opaque, void *value), + void* opaque); + +/** @brief A hashing function to be used for hashing resource IDs when + used with HashTables. It makes no use of cdata, so that can + be NULL. It uses HashXID underneath, and should HashXID be + unable to hash the value, it switches into using the generic + hash function. */ +extern _X_EXPORT unsigned ht_resourceid_hash(void *cdata, + const void * data, + int numBits); + +/** @brief A comparison function to be used for comparing resource + IDs when used with HashTables. It makes no use of cdata, + so that can be NULL. */ +extern _X_EXPORT int ht_resourceid_compare(void *cdata, + const void *a, + const void *b); + +#endif // HASHTABLE_H diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c new file mode 100644 index 0000000..ce0d072 --- /dev/null +++ b/Xext/panoramiX.c @@ -0,0 +1,1298 @@ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifdef HAVE_DMX_CONFIG_H +#include <dmx-config.h> +#endif + +#include <stdio.h> +#include <X11/X.h> +#include <X11/Xproto.h> +#include <X11/Xarch.h> +#include "misc.h" +#include "cursor.h" +#include "cursorstr.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "gc.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#include "window.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "panoramiX.h" +#include <X11/extensions/panoramiXproto.h> +#include "panoramiXsrv.h" +#include "globals.h" +#include "servermd.h" +#include "resource.h" +#include "picturestr.h" +#include "xfixesint.h" +#include "damageextint.h" +#ifdef COMPOSITE +#include "compint.h" +#endif +#include "extinit.h" +#include "protocol-versions.h" + +#ifdef GLXPROXY +extern VisualPtr glxMatchVisual(ScreenPtr pScreen, + VisualPtr pVisual, ScreenPtr pMatchScreen); +#endif + +/* + * PanoramiX data declarations + */ + +int PanoramiXPixWidth = 0; +int PanoramiXPixHeight = 0; +int PanoramiXNumScreens = 0; + +_X_EXPORT RegionRec PanoramiXScreenRegion = { {0, 0, 0, 0}, NULL }; + +static int PanoramiXNumDepths; +static DepthPtr PanoramiXDepths; +static int PanoramiXNumVisuals; +static VisualPtr PanoramiXVisuals; + +RESTYPE XRC_DRAWABLE; +RESTYPE XRT_WINDOW; +RESTYPE XRT_PIXMAP; +RESTYPE XRT_GC; +RESTYPE XRT_COLORMAP; + +static Bool VisualsEqual(VisualPtr, ScreenPtr, VisualPtr); +XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual; + +/* + * Function prototypes + */ + +static int panoramiXGeneration; +static int ProcPanoramiXDispatch(ClientPtr client); + +static void PanoramiXResetProc(ExtensionEntry *); + +/* + * External references for functions and data variables + */ + +#include "panoramiXh.h" + +int (*SavedProcVector[256]) (ClientPtr client) = { +NULL,}; + +static DevPrivateKeyRec PanoramiXGCKeyRec; + +#define PanoramiXGCKey (&PanoramiXGCKeyRec) +static DevPrivateKeyRec PanoramiXScreenKeyRec; + +#define PanoramiXScreenKey (&PanoramiXScreenKeyRec) + +typedef struct { + DDXPointRec clipOrg; + DDXPointRec patOrg; + GCFuncs *wrapFuncs; +} PanoramiXGCRec, *PanoramiXGCPtr; + +typedef struct { + CreateGCProcPtr CreateGC; + CloseScreenProcPtr CloseScreen; +} PanoramiXScreenRec, *PanoramiXScreenPtr; + +static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr); +static void XineramaChangeGC(GCPtr, unsigned long); +static void XineramaCopyGC(GCPtr, unsigned long, GCPtr); +static void XineramaDestroyGC(GCPtr); +static void XineramaChangeClip(GCPtr, int, pointer, int); +static void XineramaDestroyClip(GCPtr); +static void XineramaCopyClip(GCPtr, GCPtr); + +static GCFuncs XineramaGCFuncs = { + XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC, + XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip +}; + +#define Xinerama_GC_FUNC_PROLOGUE(pGC)\ + PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, PanoramiXGCKey); \ + (pGC)->funcs = pGCPriv->wrapFuncs; + +#define Xinerama_GC_FUNC_EPILOGUE(pGC)\ + pGCPriv->wrapFuncs = (pGC)->funcs;\ + (pGC)->funcs = &XineramaGCFuncs; + +static Bool +XineramaCloseScreen(ScreenPtr pScreen) +{ + PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr) + dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey); + + pScreen->CloseScreen = pScreenPriv->CloseScreen; + pScreen->CreateGC = pScreenPriv->CreateGC; + + if (pScreen->myNum == 0) + RegionUninit(&PanoramiXScreenRegion); + + free((pointer) pScreenPriv); + + return (*pScreen->CloseScreen) (pScreen); +} + +static Bool +XineramaCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr) + dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey); + Bool ret; + + pScreen->CreateGC = pScreenPriv->CreateGC; + if ((ret = (*pScreen->CreateGC) (pGC))) { + PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) + dixLookupPrivate(&pGC->devPrivates, PanoramiXGCKey); + + pGCPriv->wrapFuncs = pGC->funcs; + pGC->funcs = &XineramaGCFuncs; + + pGCPriv->clipOrg.x = pGC->clipOrg.x; + pGCPriv->clipOrg.y = pGC->clipOrg.y; + pGCPriv->patOrg.x = pGC->patOrg.x; + pGCPriv->patOrg.y = pGC->patOrg.y; + } + pScreen->CreateGC = XineramaCreateGC; + + return ret; +} + +static void +XineramaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw) +{ + Xinerama_GC_FUNC_PROLOGUE(pGC); + + if ((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr) pDraw)->parent)) { + /* the root window */ + int x_off = pGC->pScreen->x; + int y_off = pGC->pScreen->y; + int new_val; + + new_val = pGCPriv->clipOrg.x - x_off; + if (pGC->clipOrg.x != new_val) { + pGC->clipOrg.x = new_val; + changes |= GCClipXOrigin; + } + new_val = pGCPriv->clipOrg.y - y_off; + if (pGC->clipOrg.y != new_val) { + pGC->clipOrg.y = new_val; + changes |= GCClipYOrigin; + } + new_val = pGCPriv->patOrg.x - x_off; + if (pGC->patOrg.x != new_val) { + pGC->patOrg.x = new_val; + changes |= GCTileStipXOrigin; + } + new_val = pGCPriv->patOrg.y - y_off; + if (pGC->patOrg.y != new_val) { + pGC->patOrg.y = new_val; + changes |= GCTileStipYOrigin; + } + } + else { + if (pGC->clipOrg.x != pGCPriv->clipOrg.x) { + pGC->clipOrg.x = pGCPriv->clipOrg.x; + changes |= GCClipXOrigin; + } + if (pGC->clipOrg.y != pGCPriv->clipOrg.y) { + pGC->clipOrg.y = pGCPriv->clipOrg.y; + changes |= GCClipYOrigin; + } + if (pGC->patOrg.x != pGCPriv->patOrg.x) { + pGC->patOrg.x = pGCPriv->patOrg.x; + changes |= GCTileStipXOrigin; + } + if (pGC->patOrg.y != pGCPriv->patOrg.y) { + pGC->patOrg.y = pGCPriv->patOrg.y; + changes |= GCTileStipYOrigin; + } + } + + (*pGC->funcs->ValidateGC) (pGC, changes, pDraw); + Xinerama_GC_FUNC_EPILOGUE(pGC); +} + +static void +XineramaDestroyGC(GCPtr pGC) +{ + Xinerama_GC_FUNC_PROLOGUE(pGC); + (*pGC->funcs->DestroyGC) (pGC); + Xinerama_GC_FUNC_EPILOGUE(pGC); +} + +static void +XineramaChangeGC(GCPtr pGC, unsigned long mask) +{ + Xinerama_GC_FUNC_PROLOGUE(pGC); + + if (mask & GCTileStipXOrigin) + pGCPriv->patOrg.x = pGC->patOrg.x; + if (mask & GCTileStipYOrigin) + pGCPriv->patOrg.y = pGC->patOrg.y; + if (mask & GCClipXOrigin) + pGCPriv->clipOrg.x = pGC->clipOrg.x; + if (mask & GCClipYOrigin) + pGCPriv->clipOrg.y = pGC->clipOrg.y; + + (*pGC->funcs->ChangeGC) (pGC, mask); + Xinerama_GC_FUNC_EPILOGUE(pGC); +} + +static void +XineramaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) +{ + PanoramiXGCPtr pSrcPriv = (PanoramiXGCPtr) + dixLookupPrivate(&pGCSrc->devPrivates, PanoramiXGCKey); + + Xinerama_GC_FUNC_PROLOGUE(pGCDst); + + if (mask & GCTileStipXOrigin) + pGCPriv->patOrg.x = pSrcPriv->patOrg.x; + if (mask & GCTileStipYOrigin) + pGCPriv->patOrg.y = pSrcPriv->patOrg.y; + if (mask & GCClipXOrigin) + pGCPriv->clipOrg.x = pSrcPriv->clipOrg.x; + if (mask & GCClipYOrigin) + pGCPriv->clipOrg.y = pSrcPriv->clipOrg.y; + + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + Xinerama_GC_FUNC_EPILOGUE(pGCDst); +} + +static void +XineramaChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +{ + Xinerama_GC_FUNC_PROLOGUE(pGC); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + Xinerama_GC_FUNC_EPILOGUE(pGC); +} + +static void +XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + Xinerama_GC_FUNC_PROLOGUE(pgcDst); + (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); + Xinerama_GC_FUNC_EPILOGUE(pgcDst); +} + +static void +XineramaDestroyClip(GCPtr pGC) +{ + Xinerama_GC_FUNC_PROLOGUE(pGC); + (*pGC->funcs->DestroyClip) (pGC); + Xinerama_GC_FUNC_EPILOGUE(pGC); +} + +int +XineramaDeleteResource(pointer data, XID id) +{ + free(data); + return 1; +} + +typedef struct { + int screen; + int id; +} PanoramiXSearchData; + +static Bool +XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata) +{ + PanoramiXRes *res = (PanoramiXRes *) resource; + PanoramiXSearchData *data = (PanoramiXSearchData *) privdata; + + return res->info[data->screen].id == data->id; +} + +PanoramiXRes * +PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen) +{ + PanoramiXSearchData data; + pointer val; + + if (!screen) { + dixLookupResourceByType(&val, id, type, serverClient, DixReadAccess); + return val; + } + + data.screen = screen; + data.id = id; + + return LookupClientResourceComplex(clients[CLIENT_ID(id)], type, + XineramaFindIDByScrnum, &data); +} + +typedef struct _connect_callback_list { + void (*func) (void); + struct _connect_callback_list *next; +} XineramaConnectionCallbackList; + +static XineramaConnectionCallbackList *ConnectionCallbackList = NULL; + +Bool +XineramaRegisterConnectionBlockCallback(void (*func) (void)) +{ + XineramaConnectionCallbackList *newlist; + + if (!(newlist = malloc(sizeof(XineramaConnectionCallbackList)))) + return FALSE; + + newlist->next = ConnectionCallbackList; + newlist->func = func; + ConnectionCallbackList = newlist; + + return TRUE; +} + +static void +XineramaInitData(void) +{ + int i, w, h; + + RegionNull(&PanoramiXScreenRegion); + FOR_NSCREENS(i) { + BoxRec TheBox; + RegionRec ScreenRegion; + + ScreenPtr pScreen = screenInfo.screens[i]; + + TheBox.x1 = pScreen->x; + TheBox.x2 = TheBox.x1 + pScreen->width; + TheBox.y1 = pScreen->y; + TheBox.y2 = TheBox.y1 + pScreen->height; + + RegionInit(&ScreenRegion, &TheBox, 1); + RegionUnion(&PanoramiXScreenRegion, &PanoramiXScreenRegion, + &ScreenRegion); + RegionUninit(&ScreenRegion); + } + + PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width; + PanoramiXPixHeight = + screenInfo.screens[0]->y + screenInfo.screens[0]->height; + + FOR_NSCREENS_FORWARD_SKIP(i) { + ScreenPtr pScreen = screenInfo.screens[i]; + + w = pScreen->x + pScreen->width; + h = pScreen->y + pScreen->height; + + if (PanoramiXPixWidth < w) + PanoramiXPixWidth = w; + if (PanoramiXPixHeight < h) + PanoramiXPixHeight = h; + } +} + +void +XineramaReinitData(void) +{ + RegionUninit(&PanoramiXScreenRegion); + XineramaInitData(); +} + +/* + * PanoramiXExtensionInit(): + * Called from InitExtensions in main(). + * Register PanoramiXeen Extension + * Initialize global variables. + */ + +void +PanoramiXExtensionInit(void) +{ + int i; + Bool success = FALSE; + ExtensionEntry *extEntry; + ScreenPtr pScreen = screenInfo.screens[0]; + PanoramiXScreenPtr pScreenPriv; + + if (noPanoramiXExtension) + return; + + if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) { + noPanoramiXExtension = TRUE; + return; + } + + if (!dixRegisterPrivateKey + (&PanoramiXGCKeyRec, PRIVATE_GC, sizeof(PanoramiXGCRec))) { + noPanoramiXExtension = TRUE; + return; + } + + PanoramiXNumScreens = screenInfo.numScreens; + if (PanoramiXNumScreens == 1) { /* Only 1 screen */ + noPanoramiXExtension = TRUE; + return; + } + + while (panoramiXGeneration != serverGeneration) { + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, + ProcPanoramiXDispatch, + SProcPanoramiXDispatch, PanoramiXResetProc, + StandardMinorOpcode); + if (!extEntry) + break; + + /* + * First make sure all the basic allocations succeed. If not, + * run in non-PanoramiXeen mode. + */ + + FOR_NSCREENS(i) { + pScreen = screenInfo.screens[i]; + pScreenPriv = malloc(sizeof(PanoramiXScreenRec)); + dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey, + pScreenPriv); + if (!pScreenPriv) { + noPanoramiXExtension = TRUE; + return; + } + + pScreenPriv->CreateGC = pScreen->CreateGC; + pScreenPriv->CloseScreen = pScreen->CloseScreen; + + pScreen->CreateGC = XineramaCreateGC; + pScreen->CloseScreen = XineramaCloseScreen; + } + + XRC_DRAWABLE = CreateNewResourceClass(); + XRT_WINDOW = CreateNewResourceType(XineramaDeleteResource, + "XineramaWindow"); + if (XRT_WINDOW) + XRT_WINDOW |= XRC_DRAWABLE; + XRT_PIXMAP = CreateNewResourceType(XineramaDeleteResource, + "XineramaPixmap"); + if (XRT_PIXMAP) + XRT_PIXMAP |= XRC_DRAWABLE; + XRT_GC = CreateNewResourceType(XineramaDeleteResource, "XineramaGC"); + XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource, + "XineramaColormap"); + + if (XRT_WINDOW && XRT_PIXMAP && XRT_GC && XRT_COLORMAP) { + panoramiXGeneration = serverGeneration; + success = TRUE; + } + SetResourceTypeErrorValue(XRT_WINDOW, BadWindow); + SetResourceTypeErrorValue(XRT_PIXMAP, BadPixmap); + SetResourceTypeErrorValue(XRT_GC, BadGC); + SetResourceTypeErrorValue(XRT_COLORMAP, BadColor); + } + + if (!success) { + noPanoramiXExtension = TRUE; + ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n"); + return; + } + + XineramaInitData(); + + /* + * Put our processes into the ProcVector + */ + + for (i = 256; i--;) + SavedProcVector[i] = ProcVector[i]; + + ProcVector[X_CreateWindow] = PanoramiXCreateWindow; + ProcVector[X_ChangeWindowAttributes] = PanoramiXChangeWindowAttributes; + ProcVector[X_DestroyWindow] = PanoramiXDestroyWindow; + ProcVector[X_DestroySubwindows] = PanoramiXDestroySubwindows; + ProcVector[X_ChangeSaveSet] = PanoramiXChangeSaveSet; + ProcVector[X_ReparentWindow] = PanoramiXReparentWindow; + ProcVector[X_MapWindow] = PanoramiXMapWindow; + ProcVector[X_MapSubwindows] = PanoramiXMapSubwindows; + ProcVector[X_UnmapWindow] = PanoramiXUnmapWindow; + ProcVector[X_UnmapSubwindows] = PanoramiXUnmapSubwindows; + ProcVector[X_ConfigureWindow] = PanoramiXConfigureWindow; + ProcVector[X_CirculateWindow] = PanoramiXCirculateWindow; + ProcVector[X_GetGeometry] = PanoramiXGetGeometry; + ProcVector[X_TranslateCoords] = PanoramiXTranslateCoords; + ProcVector[X_CreatePixmap] = PanoramiXCreatePixmap; + ProcVector[X_FreePixmap] = PanoramiXFreePixmap; + ProcVector[X_CreateGC] = PanoramiXCreateGC; + ProcVector[X_ChangeGC] = PanoramiXChangeGC; + ProcVector[X_CopyGC] = PanoramiXCopyGC; + ProcVector[X_SetDashes] = PanoramiXSetDashes; + ProcVector[X_SetClipRectangles] = PanoramiXSetClipRectangles; + ProcVector[X_FreeGC] = PanoramiXFreeGC; + ProcVector[X_ClearArea] = PanoramiXClearToBackground; + ProcVector[X_CopyArea] = PanoramiXCopyArea; + ProcVector[X_CopyPlane] = PanoramiXCopyPlane; + ProcVector[X_PolyPoint] = PanoramiXPolyPoint; + ProcVector[X_PolyLine] = PanoramiXPolyLine; + ProcVector[X_PolySegment] = PanoramiXPolySegment; + ProcVector[X_PolyRectangle] = PanoramiXPolyRectangle; + ProcVector[X_PolyArc] = PanoramiXPolyArc; + ProcVector[X_FillPoly] = PanoramiXFillPoly; + ProcVector[X_PolyFillRectangle] = PanoramiXPolyFillRectangle; + ProcVector[X_PolyFillArc] = PanoramiXPolyFillArc; + ProcVector[X_PutImage] = PanoramiXPutImage; + ProcVector[X_GetImage] = PanoramiXGetImage; + ProcVector[X_PolyText8] = PanoramiXPolyText8; + ProcVector[X_PolyText16] = PanoramiXPolyText16; + ProcVector[X_ImageText8] = PanoramiXImageText8; + ProcVector[X_ImageText16] = PanoramiXImageText16; + ProcVector[X_CreateColormap] = PanoramiXCreateColormap; + ProcVector[X_FreeColormap] = PanoramiXFreeColormap; + ProcVector[X_CopyColormapAndFree] = PanoramiXCopyColormapAndFree; + ProcVector[X_InstallColormap] = PanoramiXInstallColormap; + ProcVector[X_UninstallColormap] = PanoramiXUninstallColormap; + ProcVector[X_AllocColor] = PanoramiXAllocColor; + ProcVector[X_AllocNamedColor] = PanoramiXAllocNamedColor; + ProcVector[X_AllocColorCells] = PanoramiXAllocColorCells; + ProcVector[X_AllocColorPlanes] = PanoramiXAllocColorPlanes; + ProcVector[X_FreeColors] = PanoramiXFreeColors; + ProcVector[X_StoreColors] = PanoramiXStoreColors; + ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor; + + PanoramiXRenderInit(); + PanoramiXFixesInit(); + PanoramiXDamageInit(); +#ifdef COMPOSITE + PanoramiXCompositeInit(); +#endif + +} + +Bool +PanoramiXCreateConnectionBlock(void) +{ + int i, j, length; + Bool disable_backing_store = FALSE; + int old_width, old_height; + float width_mult, height_mult; + xWindowRoot *root; + xVisualType *visual; + xDepth *depth; + VisualPtr pVisual; + ScreenPtr pScreen; + + /* + * Do normal CreateConnectionBlock but faking it for only one screen + */ + + if (!PanoramiXNumDepths) { + ErrorF("Xinerama error: No common visuals\n"); + return FALSE; + } + + for (i = 1; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + if (pScreen->rootDepth != screenInfo.screens[0]->rootDepth) { + ErrorF("Xinerama error: Root window depths differ\n"); + return FALSE; + } + if (pScreen->backingStoreSupport != + screenInfo.screens[0]->backingStoreSupport) + disable_backing_store = TRUE; + } + + if (disable_backing_store) { + for (i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + pScreen->backingStoreSupport = NotUseful; + } + } + + i = screenInfo.numScreens; + screenInfo.numScreens = 1; + if (!CreateConnectionBlock()) { + screenInfo.numScreens = i; + return FALSE; + } + + screenInfo.numScreens = i; + + root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart); + length = connBlockScreenStart + sizeof(xWindowRoot); + + /* overwrite the connection block */ + root->nDepths = PanoramiXNumDepths; + + for (i = 0; i < PanoramiXNumDepths; i++) { + depth = (xDepth *) (ConnectionInfo + length); + depth->depth = PanoramiXDepths[i].depth; + depth->nVisuals = PanoramiXDepths[i].numVids; + length += sizeof(xDepth); + visual = (xVisualType *) (ConnectionInfo + length); + + for (j = 0; j < depth->nVisuals; j++, visual++) { + visual->visualID = PanoramiXDepths[i].vids[j]; + + for (pVisual = PanoramiXVisuals; + pVisual->vid != visual->visualID; pVisual++); + + visual->class = pVisual->class; + visual->bitsPerRGB = pVisual->bitsPerRGBValue; + visual->colormapEntries = pVisual->ColormapEntries; + visual->redMask = pVisual->redMask; + visual->greenMask = pVisual->greenMask; + visual->blueMask = pVisual->blueMask; + } + + length += (depth->nVisuals * sizeof(xVisualType)); + } + + connSetupPrefix.length = bytes_to_int32(length); + + for (i = 0; i < PanoramiXNumDepths; i++) + free(PanoramiXDepths[i].vids); + free(PanoramiXDepths); + PanoramiXDepths = NULL; + + /* + * OK, change some dimensions so it looks as if it were one big screen + */ + + old_width = root->pixWidth; + old_height = root->pixHeight; + + root->pixWidth = PanoramiXPixWidth; + root->pixHeight = PanoramiXPixHeight; + width_mult = (1.0 * root->pixWidth) / old_width; + height_mult = (1.0 * root->pixHeight) / old_height; + root->mmWidth *= width_mult; + root->mmHeight *= height_mult; + + while (ConnectionCallbackList) { + pointer tmp; + + tmp = (pointer) ConnectionCallbackList; + (*ConnectionCallbackList->func) (); + ConnectionCallbackList = ConnectionCallbackList->next; + free(tmp); + } + + return TRUE; +} + +/* + * This isn't just memcmp(), bitsPerRGBValue is skipped. markv made that + * change way back before xf86 4.0, but the comment for _why_ is a bit + * opaque, so I'm not going to question it for now. + * + * This is probably better done as a screen hook so DBE/EVI/GLX can add + * their own tests, and adding privates to VisualRec so they don't have to + * do their own back-mapping. + */ +static Bool +VisualsEqual(VisualPtr a, ScreenPtr pScreenB, VisualPtr b) +{ + return ((a->class == b->class) && + (a->ColormapEntries == b->ColormapEntries) && + (a->nplanes == b->nplanes) && + (a->redMask == b->redMask) && + (a->greenMask == b->greenMask) && + (a->blueMask == b->blueMask) && + (a->offsetRed == b->offsetRed) && + (a->offsetGreen == b->offsetGreen) && + (a->offsetBlue == b->offsetBlue)); +} + +static void +PanoramiXMaybeAddDepth(DepthPtr pDepth) +{ + ScreenPtr pScreen; + int j, k; + Bool found = FALSE; + + FOR_NSCREENS_FORWARD_SKIP(j) { + pScreen = screenInfo.screens[j]; + for (k = 0; k < pScreen->numDepths; k++) { + if (pScreen->allowedDepths[k].depth == pDepth->depth) { + found = TRUE; + break; + } + } + } + + if (!found) + return; + + j = PanoramiXNumDepths; + PanoramiXNumDepths++; + PanoramiXDepths = 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 = malloc(sizeof(VisualID) * pDepth->numVids); + else + PanoramiXDepths[j].vids = NULL; +} + +static void +PanoramiXMaybeAddVisual(VisualPtr pVisual) +{ + ScreenPtr pScreen; + int j, k; + Bool found = FALSE; + + FOR_NSCREENS_FORWARD_SKIP(j) { + pScreen = screenInfo.screens[j]; + found = FALSE; + + for (k = 0; k < pScreen->numVisuals; k++) { + VisualPtr candidate = &pScreen->visuals[k]; + + if ((*XineramaVisualsEqualPtr) (pVisual, pScreen, candidate) +#ifdef GLXPROXY + && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen) +#endif + ) { + found = TRUE; + break; + } + } + + if (!found) + return; + } + + /* found a matching visual on all screens, add it to the subset list */ + j = PanoramiXNumVisuals; + PanoramiXNumVisuals++; + PanoramiXVisuals = realloc(PanoramiXVisuals, + PanoramiXNumVisuals * sizeof(VisualRec)); + + memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec)); + + for (k = 0; k < PanoramiXNumDepths; k++) { + if (PanoramiXDepths[k].depth == pVisual->nplanes) { + PanoramiXDepths[k].vids[PanoramiXDepths[k].numVids] = pVisual->vid; + PanoramiXDepths[k].numVids++; + break; + } + } +} + +extern void +PanoramiXConsolidate(void) +{ + int i; + PanoramiXRes *root, *defmap, *saver; + ScreenPtr pScreen = screenInfo.screens[0]; + DepthPtr pDepth = pScreen->allowedDepths; + VisualPtr pVisual = pScreen->visuals; + + PanoramiXNumDepths = 0; + PanoramiXNumVisuals = 0; + + for (i = 0; i < pScreen->numDepths; i++) + PanoramiXMaybeAddDepth(pDepth++); + + for (i = 0; i < pScreen->numVisuals; i++) + PanoramiXMaybeAddVisual(pVisual++); + + root = malloc(sizeof(PanoramiXRes)); + root->type = XRT_WINDOW; + defmap = malloc(sizeof(PanoramiXRes)); + defmap->type = XRT_COLORMAP; + saver = malloc(sizeof(PanoramiXRes)); + saver->type = XRT_WINDOW; + + FOR_NSCREENS(i) { + ScreenPtr scr = screenInfo.screens[i]; + + root->info[i].id = scr->root->drawable.id; + root->u.win.class = InputOutput; + root->u.win.root = TRUE; + saver->info[i].id = scr->screensaver.wid; + saver->u.win.class = InputOutput; + saver->u.win.root = TRUE; + defmap->info[i].id = scr->defColormap; + } + + AddResource(root->info[0].id, XRT_WINDOW, root); + AddResource(saver->info[0].id, XRT_WINDOW, saver); + AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); +} + +VisualID +PanoramiXTranslateVisualID(int screen, VisualID orig) +{ + ScreenPtr pOtherScreen = screenInfo.screens[screen]; + VisualPtr pVisual = NULL; + int i; + + for (i = 0; i < PanoramiXNumVisuals; i++) { + if (orig == PanoramiXVisuals[i].vid) { + pVisual = &PanoramiXVisuals[i]; + break; + } + } + + if (!pVisual) + return 0; + + /* if screen is 0, orig is already the correct visual ID */ + if (screen == 0) + return orig; + + /* found the original, now translate it relative to the backend screen */ + for (i = 0; i < pOtherScreen->numVisuals; i++) { + VisualPtr pOtherVisual = &pOtherScreen->visuals[i]; + + if ((*XineramaVisualsEqualPtr) (pVisual, pOtherScreen, pOtherVisual)) + return pOtherVisual->vid; + } + + return 0; +} + +/* + * PanoramiXResetProc() + * Exit, deallocating as needed. + */ + +static void +PanoramiXResetProc(ExtensionEntry * extEntry) +{ + int i; + + PanoramiXRenderReset(); + PanoramiXFixesReset(); + PanoramiXDamageReset(); +#ifdef COMPOSITE + PanoramiXCompositeReset (); +#endif + screenInfo.numScreens = PanoramiXNumScreens; + for (i = 256; i--;) + ProcVector[i] = SavedProcVector[i]; +} + +int +ProcPanoramiXQueryVersion(ClientPtr client) +{ + /* REQUEST(xPanoramiXQueryVersionReq); */ + xPanoramiXQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_PANORAMIX_MAJOR_VERSION, + .minorVersion = SERVER_PANORAMIX_MINOR_VERSION + }; + + REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + } + WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), &rep); + return Success; +} + +int +ProcPanoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + WindowPtr pWin; + xPanoramiXGetStateReply rep; + int rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xPanoramiXGetStateReply) { + .type = X_Reply, + .state = !noPanoramiXExtension, + .sequenceNumber = client->sequence, + .length = 0, + .window = stuff->window + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.window); + } + WriteToClient(client, sizeof(xPanoramiXGetStateReply), &rep); + return Success; + +} + +int +ProcPanoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + WindowPtr pWin; + xPanoramiXGetScreenCountReply rep; + int rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xPanoramiXGetScreenCountReply) { + .type = X_Reply, + .ScreenCount = PanoramiXNumScreens, + .sequenceNumber = client->sequence, + .length = 0, + .window = stuff->window + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.window); + } + WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), &rep); + return Success; +} + +int +ProcPanoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + WindowPtr pWin; + xPanoramiXGetScreenSizeReply rep; + int rc; + + if (stuff->screen >= PanoramiXNumScreens) + return BadMatch; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xPanoramiXGetScreenSizeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + /* screen dimensions */ + .width = screenInfo.screens[stuff->screen]->width, + .height = screenInfo.screens[stuff->screen]->height, + .window = stuff->window, + .screen = stuff->screen + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.width); + swapl(&rep.height); + swapl(&rep.window); + swapl(&rep.screen); + } + WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), &rep); + return Success; +} + +int +ProcXineramaIsActive(ClientPtr client) +{ + /* REQUEST(xXineramaIsActiveReq); */ + xXineramaIsActiveReply rep; + + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + + rep = (xXineramaIsActiveReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, +#if 1 + /* The following hack fools clients into thinking that Xinerama + * is disabled even though it is not. */ + .state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack +#else + .state = !noPanoramiXExtension; +#endif + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.state); + } + WriteToClient(client, sizeof(xXineramaIsActiveReply), &rep); + return Success; +} + +int +ProcXineramaQueryScreens(ClientPtr client) +{ + /* REQUEST(xXineramaQueryScreensReq); */ + CARD32 number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens; + xXineramaQueryScreensReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(number * sz_XineramaScreenInfo), + .number = number + }; + + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.number); + } + WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep); + + if (!noPanoramiXExtension) { + xXineramaScreenInfo scratch; + int i; + + FOR_NSCREENS(i) { + scratch.x_org = screenInfo.screens[i]->x; + scratch.y_org = screenInfo.screens[i]->y; + scratch.width = screenInfo.screens[i]->width; + scratch.height = screenInfo.screens[i]->height; + + if (client->swapped) { + swaps(&scratch.x_org); + swaps(&scratch.y_org); + swaps(&scratch.width); + swaps(&scratch.height); + } + WriteToClient(client, sz_XineramaScreenInfo, &scratch); + } + } + + return Success; +} + +static int +ProcPanoramiXDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_PanoramiXQueryVersion: + return ProcPanoramiXQueryVersion(client); + case X_PanoramiXGetState: + return ProcPanoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return ProcPanoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return ProcPanoramiXGetScreenSize(client); + case X_XineramaIsActive: + return ProcXineramaIsActive(client); + case X_XineramaQueryScreens: + return ProcXineramaQueryScreens(client); + } + return BadRequest; +} + +#if X_BYTE_ORDER == X_LITTLE_ENDIAN +#define SHIFT_L(v,s) (v) << (s) +#define SHIFT_R(v,s) (v) >> (s) +#else +#define SHIFT_L(v,s) (v) >> (s) +#define SHIFT_R(v,s) (v) << (s) +#endif + +static void +CopyBits(char *dst, int shiftL, char *src, int bytes) +{ + /* Just get it to work. Worry about speed later */ + int shiftR = 8 - shiftL; + + while (bytes--) { + *dst |= SHIFT_L(*src, shiftL); + *(dst + 1) |= SHIFT_R(*src, shiftR); + dst++; + src++; + } +} + +/* Caution. This doesn't support 2 and 4 bpp formats. We expect + 1 bpp and planar data to be already cleared when presented + to this function */ + +void +XineramaGetImageData(DrawablePtr *pDrawables, + int left, + int top, + int width, + int height, + unsigned int format, + unsigned long planemask, + char *data, int pitch, Bool isRoot) +{ + RegionRec SrcRegion, ScreenRegion, GrabRegion; + BoxRec SrcBox, *pbox; + int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth; + DrawablePtr pDraw = pDrawables[0]; + char *ScratchMem = NULL; + + size = 0; + + /* find box in logical screen space */ + SrcBox.x1 = left; + SrcBox.y1 = top; + if (!isRoot) { + SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x; + SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y; + } + SrcBox.x2 = SrcBox.x1 + width; + SrcBox.y2 = SrcBox.y1 + height; + + RegionInit(&SrcRegion, &SrcBox, 1); + RegionNull(&GrabRegion); + + depth = (format == XYPixmap) ? 1 : pDraw->depth; + + FOR_NSCREENS(i) { + BoxRec TheBox; + ScreenPtr pScreen; + + pDraw = pDrawables[i]; + pScreen = pDraw->pScreen; + + TheBox.x1 = pScreen->x; + TheBox.x2 = TheBox.x1 + pScreen->width; + TheBox.y1 = pScreen->y; + TheBox.y2 = TheBox.y1 + pScreen->height; + + RegionInit(&ScreenRegion, &TheBox, 1); + inOut = RegionContainsRect(&ScreenRegion, &SrcBox); + if (inOut == rgnPART) + RegionIntersect(&GrabRegion, &SrcRegion, &ScreenRegion); + RegionUninit(&ScreenRegion); + + if (inOut == rgnIN) { + (*pScreen->GetImage) (pDraw, + SrcBox.x1 - pDraw->x - + screenInfo.screens[i]->x, + SrcBox.y1 - pDraw->y - + screenInfo.screens[i]->y, width, height, + format, planemask, data); + break; + } + else if (inOut == rgnOUT) + continue; + + nbox = RegionNumRects(&GrabRegion); + + if (nbox) { + pbox = RegionRects(&GrabRegion); + + while (nbox--) { + w = pbox->x2 - pbox->x1; + h = pbox->y2 - pbox->y1; + ScratchPitch = PixmapBytePad(w, depth); + sizeNeeded = ScratchPitch * h; + + if (sizeNeeded > size) { + char *tmpdata = ScratchMem; + + ScratchMem = realloc(ScratchMem, sizeNeeded); + if (ScratchMem) + size = sizeNeeded; + else { + ScratchMem = tmpdata; + break; + } + } + + x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x; + y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y; + + (*pScreen->GetImage) (pDraw, x, y, w, h, + format, planemask, ScratchMem); + + /* copy the memory over */ + + if (depth == 1) { + int k, shift, leftover, index, index2; + + x = pbox->x1 - SrcBox.x1; + y = pbox->y1 - SrcBox.y1; + shift = x & 7; + x >>= 3; + leftover = w & 7; + w >>= 3; + + /* clean up the edge */ + if (leftover) { + int mask = (1 << leftover) - 1; + + for (j = h, k = w; j--; k += ScratchPitch) + ScratchMem[k] &= mask; + } + + for (j = 0, index = (pitch * y) + x, index2 = 0; j < h; + j++, index += pitch, index2 += ScratchPitch) { + if (w) { + if (!shift) + memcpy(data + index, ScratchMem + index2, w); + else + CopyBits(data + index, shift, + ScratchMem + index2, w); + } + + if (leftover) { + data[index + w] |= + SHIFT_L(ScratchMem[index2 + w], shift); + if ((shift + leftover) > 8) + data[index + w + 1] |= + SHIFT_R(ScratchMem[index2 + w], + (8 - shift)); + } + } + } + else { + j = BitsPerPixel(depth) >> 3; + x = (pbox->x1 - SrcBox.x1) * j; + y = pbox->y1 - SrcBox.y1; + w *= j; + + for (j = 0; j < h; j++) { + memcpy(data + (pitch * (y + j)) + x, + ScratchMem + (ScratchPitch * j), w); + } + } + pbox++; + } + + RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion); + if (!RegionNotEmpty(&SrcRegion)) + break; + } + + } + + free(ScratchMem); + + RegionUninit(&SrcRegion); + RegionUninit(&GrabRegion); +} diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h new file mode 100644 index 0000000..6578dfa --- /dev/null +++ b/Xext/panoramiX.h @@ -0,0 +1,79 @@ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ + +/* + * PanoramiX definitions + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _PANORAMIX_H_ +#define _PANORAMIX_H_ + +#define _PANORAMIX_SERVER +#include <X11/extensions/panoramiXproto.h> +#undef _PANORAMIX_SERVER +#include "gcstruct.h" +#include "dixstruct.h" + +typedef struct _PanoramiXInfo { + XID id; +} PanoramiXInfo; + +typedef struct { + PanoramiXInfo info[MAXSCREENS]; + RESTYPE type; + union { + struct { + char visibility; + char class; + char root; + } win; + struct { + Bool shared; + } pix; + struct { + Bool root; + } pict; + char raw_data[4]; + } u; +} PanoramiXRes; + +#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++) +#define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < PanoramiXNumScreens; j++) +#define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--) +#define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j) + +#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared) + +#define IS_ROOT_DRAWABLE(d) (((d)->type == XRT_WINDOW) && (d)->u.win.root) +#endif /* _PANORAMIX_H_ */ diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c new file mode 100644 index 0000000..b6ff6f9 --- /dev/null +++ b/Xext/panoramiXSwap.c @@ -0,0 +1,133 @@ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdio.h> +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "cursor.h" +#include "cursorstr.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "gc.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#include "window.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "panoramiX.h" +#include <X11/extensions/panoramiXproto.h> +#include "panoramiXsrv.h" +#include "globals.h" +#include "panoramiXh.h" + +static int +SProcPanoramiXQueryVersion(ClientPtr client) +{ + REQUEST(xPanoramiXQueryVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); + return ProcPanoramiXQueryVersion(client); +} + +static int +SProcPanoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + swapl(&stuff->window); + return ProcPanoramiXGetState(client); +} + +static int +SProcPanoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + swapl(&stuff->window); + return ProcPanoramiXGetScreenCount(client); +} + +static int +SProcPanoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + swapl(&stuff->window); + swapl(&stuff->screen); + return ProcPanoramiXGetScreenSize(client); +} + +static int +SProcXineramaIsActive(ClientPtr client) +{ + REQUEST(xXineramaIsActiveReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + return ProcXineramaIsActive(client); +} + +static int +SProcXineramaQueryScreens(ClientPtr client) +{ + REQUEST(xXineramaQueryScreensReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + return ProcXineramaQueryScreens(client); +} + +int +SProcPanoramiXDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_PanoramiXQueryVersion: + return SProcPanoramiXQueryVersion(client); + case X_PanoramiXGetState: + return SProcPanoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return SProcPanoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return SProcPanoramiXGetScreenSize(client); + case X_XineramaIsActive: + return SProcXineramaIsActive(client); + case X_XineramaQueryScreens: + return SProcXineramaQueryScreens(client); + } + return BadRequest; +} diff --git a/Xext/panoramiXh.h b/Xext/panoramiXh.h new file mode 100644 index 0000000..2762a59 --- /dev/null +++ b/Xext/panoramiXh.h @@ -0,0 +1,73 @@ + +/* + * Server dispatcher function replacements + */ + +extern int PanoramiXCreateWindow(ClientPtr client); +extern int PanoramiXChangeWindowAttributes(ClientPtr client); +extern int PanoramiXDestroyWindow(ClientPtr client); +extern int PanoramiXDestroySubwindows(ClientPtr client); +extern int PanoramiXChangeSaveSet(ClientPtr client); +extern int PanoramiXReparentWindow(ClientPtr client); +extern int PanoramiXMapWindow(ClientPtr client); +extern int PanoramiXMapSubwindows(ClientPtr client); +extern int PanoramiXUnmapWindow(ClientPtr client); +extern int PanoramiXUnmapSubwindows(ClientPtr client); +extern int PanoramiXConfigureWindow(ClientPtr client); +extern int PanoramiXCirculateWindow(ClientPtr client); +extern int PanoramiXGetGeometry(ClientPtr client); +extern int PanoramiXTranslateCoords(ClientPtr client); +extern int PanoramiXCreatePixmap(ClientPtr client); +extern int PanoramiXFreePixmap(ClientPtr client); +extern int PanoramiXChangeGC(ClientPtr client); +extern int PanoramiXCopyGC(ClientPtr client); +extern int PanoramiXCopyColormapAndFree(ClientPtr client); +extern int PanoramiXCreateGC(ClientPtr client); +extern int PanoramiXSetDashes(ClientPtr client); +extern int PanoramiXSetClipRectangles(ClientPtr client); +extern int PanoramiXFreeGC(ClientPtr client); +extern int PanoramiXClearToBackground(ClientPtr client); +extern int PanoramiXCopyArea(ClientPtr client); +extern int PanoramiXCopyPlane(ClientPtr client); +extern int PanoramiXPolyPoint(ClientPtr client); +extern int PanoramiXPolyLine(ClientPtr client); +extern int PanoramiXPolySegment(ClientPtr client); +extern int PanoramiXPolyRectangle(ClientPtr client); +extern int PanoramiXPolyArc(ClientPtr client); +extern int PanoramiXFillPoly(ClientPtr client); +extern int PanoramiXPolyFillArc(ClientPtr client); +extern int PanoramiXPolyFillRectangle(ClientPtr client); +extern int PanoramiXPutImage(ClientPtr client); +extern int PanoramiXGetImage(ClientPtr client); +extern int PanoramiXPolyText8(ClientPtr client); +extern int PanoramiXPolyText16(ClientPtr client); +extern int PanoramiXImageText8(ClientPtr client); +extern int PanoramiXImageText16(ClientPtr client); +extern int PanoramiXCreateColormap(ClientPtr client); +extern int PanoramiXFreeColormap(ClientPtr client); +extern int PanoramiXInstallColormap(ClientPtr client); +extern int PanoramiXUninstallColormap(ClientPtr client); +extern int PanoramiXAllocColor(ClientPtr client); +extern int PanoramiXAllocNamedColor(ClientPtr client); +extern int PanoramiXAllocColorCells(ClientPtr client); +extern int PanoramiXStoreNamedColor(ClientPtr client); +extern int PanoramiXFreeColors(ClientPtr client); +extern int PanoramiXStoreColors(ClientPtr client); +extern int PanoramiXAllocColorPlanes(ClientPtr client); + +#define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr) + +PROC_EXTERN(ProcPanoramiXQueryVersion); +PROC_EXTERN(ProcPanoramiXGetState); +PROC_EXTERN(ProcPanoramiXGetScreenCount); +PROC_EXTERN(ProcPanoramiXGetScreenSize); + +PROC_EXTERN(ProcXineramaQueryScreens); +PROC_EXTERN(ProcXineramaIsActive); + +extern int SProcPanoramiXDispatch(ClientPtr client); + +extern int connBlockScreenStart; +extern xConnSetupPrefix connSetupPrefix; + +extern int (*SavedProcVector[256]) (ClientPtr client); diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c new file mode 100644 index 0000000..576844c --- /dev/null +++ b/Xext/panoramiXprocs.c @@ -0,0 +1,2555 @@ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ + +/* Massively rewritten by Mark Vojkovich <markv@valinux.com> */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdio.h> +#include <X11/X.h> +#include <X11/Xproto.h> +#include "windowstr.h" +#include "dixfontstr.h" +#include "gcstruct.h" +#include "colormapst.h" +#include "scrnintstr.h" +#include "opaque.h" +#include "inputstr.h" +#include "migc.h" +#include "misc.h" +#include "dixstruct.h" +#include "panoramiX.h" +#include "panoramiXsrv.h" +#include "resource.h" +#include "panoramiXh.h" + +#define XINERAMA_IMAGE_BUFSIZE (256*1024) +#define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ + CWDontPropagate | CWOverrideRedirect | CWCursor ) + +int +PanoramiXCreateWindow(ClientPtr client) +{ + PanoramiXRes *parent, *newWin; + PanoramiXRes *backPix = NULL; + PanoramiXRes *bordPix = NULL; + PanoramiXRes *cmap = NULL; + + REQUEST(xCreateWindowReq); + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + int result, len, j; + int orig_x, orig_y; + XID orig_visual, tmp; + Bool parentIsRoot; + + REQUEST_AT_LEAST_SIZE(xCreateWindowReq); + + len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq)); + if (Ones(stuff->mask) != len) + return BadLength; + + result = dixLookupResourceByType((pointer *) &parent, stuff->parent, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + if (stuff->class == CopyFromParent) + stuff->class = parent->u.win.class; + + if ((stuff->class == InputOnly) && (stuff->mask & (~INPUTONLY_LEGAL_MASK))) + return BadMatch; + + if ((Mask) stuff->mask & CWBackPixmap) { + pback_offset = Ones((Mask) stuff->mask & (CWBackPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pback_offset); + if ((tmp != None) && (tmp != ParentRelative)) { + result = dixLookupResourceByType((pointer *) &backPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->mask & CWBorderPixmap) { + pbord_offset = Ones((Mask) stuff->mask & (CWBorderPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pbord_offset); + if (tmp != CopyFromParent) { + result = dixLookupResourceByType((pointer *) &bordPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->mask & CWColormap) { + cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1)); + tmp = *((CARD32 *) &stuff[1] + cmap_offset); + if ((tmp != CopyFromParent) && (tmp != None)) { + result = dixLookupResourceByType((pointer *) &cmap, tmp, + XRT_COLORMAP, client, + DixReadAccess); + if (result != Success) + return result; + } + } + + if (!(newWin = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newWin->type = XRT_WINDOW; + newWin->u.win.visibility = VisibilityNotViewable; + newWin->u.win.class = stuff->class; + newWin->u.win.root = FALSE; + panoramix_setup_ids(newWin, client, stuff->wid); + + if (stuff->class == InputOnly) + stuff->visual = CopyFromParent; + orig_visual = stuff->visual; + orig_x = stuff->x; + orig_y = stuff->y; + parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) + || (stuff->parent == screenInfo.screens[0]->screensaver.wid); + FOR_NSCREENS_BACKWARD(j) { + stuff->wid = newWin->info[j].id; + stuff->parent = parent->info[j].id; + if (parentIsRoot) { + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; + } + if (backPix) + *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; + if (bordPix) + *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[j].id; + if (cmap) + *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; + if (orig_visual != CopyFromParent) + stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); + result = (*SavedProcVector[X_CreateWindow]) (client); + if (result != Success) + break; + } + + if (result == Success) + AddResource(newWin->info[0].id, XRT_WINDOW, newWin); + else + free(newWin); + + return result; +} + +int +PanoramiXChangeWindowAttributes(ClientPtr client) +{ + PanoramiXRes *win; + PanoramiXRes *backPix = NULL; + PanoramiXRes *bordPix = NULL; + PanoramiXRes *cmap = NULL; + + REQUEST(xChangeWindowAttributesReq); + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + int result, len, j; + XID tmp; + + REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); + + len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq)); + if (Ones(stuff->valueMask) != len) + return BadLength; + + result = dixLookupResourceByType((pointer *) &win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + if ((win->u.win.class == InputOnly) && + (stuff->valueMask & (~INPUTONLY_LEGAL_MASK))) + return BadMatch; + + if ((Mask) stuff->valueMask & CWBackPixmap) { + pback_offset = Ones((Mask) stuff->valueMask & (CWBackPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pback_offset); + if ((tmp != None) && (tmp != ParentRelative)) { + result = dixLookupResourceByType((pointer *) &backPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->valueMask & CWBorderPixmap) { + pbord_offset = Ones((Mask) stuff->valueMask & (CWBorderPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pbord_offset); + if (tmp != CopyFromParent) { + result = dixLookupResourceByType((pointer *) &bordPix, tmp, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->valueMask & CWColormap) { + cmap_offset = Ones((Mask) stuff->valueMask & (CWColormap - 1)); + tmp = *((CARD32 *) &stuff[1] + cmap_offset); + if ((tmp != CopyFromParent) && (tmp != None)) { + result = dixLookupResourceByType((pointer *) &cmap, tmp, + XRT_COLORMAP, client, + DixReadAccess); + if (result != Success) + return result; + } + } + + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + if (backPix) + *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; + if (bordPix) + *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[j].id; + if (cmap) + *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; + result = (*SavedProcVector[X_ChangeWindowAttributes]) (client); + } + + return result; +} + +int +PanoramiXDestroyWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->id, XRT_WINDOW, + client, DixDestroyAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_DestroyWindow]) (client); + if (result != Success) + break; + } + + /* Since ProcDestroyWindow is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return result; +} + +int +PanoramiXDestroySubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->id, XRT_WINDOW, + client, DixDestroyAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_DestroySubwindows]) (client); + if (result != Success) + break; + } + + /* DestroySubwindows is using FreeResource which will free + our resources for us on the last pass through the loop above */ + + return result; +} + +int +PanoramiXChangeSaveSet(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xChangeSaveSetReq); + + REQUEST_SIZE_MATCH(xChangeSaveSetReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->window, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + result = (*SavedProcVector[X_ChangeSaveSet]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXReparentWindow(ClientPtr client) +{ + PanoramiXRes *win, *parent; + int result, j; + int x, y; + Bool parentIsRoot; + + REQUEST(xReparentWindowReq); + + REQUEST_SIZE_MATCH(xReparentWindowReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &parent, stuff->parent, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + x = stuff->x; + y = stuff->y; + parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) + || (stuff->parent == screenInfo.screens[0]->screensaver.wid); + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + stuff->parent = parent->info[j].id; + if (parentIsRoot) { + stuff->x = x - screenInfo.screens[j]->x; + stuff->y = y - screenInfo.screens[j]->y; + } + result = (*SavedProcVector[X_ReparentWindow]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXMapWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_MapWindow]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXMapSubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_MapSubwindows]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXUnmapWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_UnmapWindow]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXUnmapSubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->id, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_FORWARD(j) { + stuff->id = win->info[j].id; + result = (*SavedProcVector[X_UnmapSubwindows]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXConfigureWindow(ClientPtr client) +{ + PanoramiXRes *win; + PanoramiXRes *sib = NULL; + WindowPtr pWin; + int result, j, len, sib_offset = 0, x = 0, y = 0; + int x_offset = -1; + int y_offset = -1; + + REQUEST(xConfigureWindowReq); + + REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); + + len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq)); + if (Ones(stuff->mask) != len) + return BadLength; + + /* because we need the parent */ + result = dixLookupResourceByType((pointer *) &pWin, stuff->window, + RT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + if ((Mask) stuff->mask & CWSibling) { + XID tmp; + + sib_offset = Ones((Mask) stuff->mask & (CWSibling - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + sib_offset))) { + result = dixLookupResourceByType((pointer *) &sib, tmp, XRT_WINDOW, + client, DixReadAccess); + if (result != Success) + return result; + } + } + + if (pWin->parent && ((pWin->parent == screenInfo.screens[0]->root) || + (pWin->parent->drawable.id == + screenInfo.screens[0]->screensaver.wid))) { + if ((Mask) stuff->mask & CWX) { + x_offset = 0; + x = *((CARD32 *) &stuff[1]); + } + if ((Mask) stuff->mask & CWY) { + y_offset = (x_offset == -1) ? 0 : 1; + y = *((CARD32 *) &stuff[1] + y_offset); + } + } + + /* have to go forward or you get expose events before + ConfigureNotify events */ + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + if (sib) + *((CARD32 *) &stuff[1] + sib_offset) = sib->info[j].id; + if (x_offset >= 0) + *((CARD32 *) &stuff[1] + x_offset) = x - screenInfo.screens[j]->x; + if (y_offset >= 0) + *((CARD32 *) &stuff[1] + y_offset) = y - screenInfo.screens[j]->y; + result = (*SavedProcVector[X_ConfigureWindow]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXCirculateWindow(ClientPtr client) +{ + PanoramiXRes *win; + int result, j; + + REQUEST(xCirculateWindowReq); + + REQUEST_SIZE_MATCH(xCirculateWindowReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + result = (*SavedProcVector[X_CirculateWindow]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXGetGeometry(ClientPtr client) +{ + xGetGeometryReply rep; + DrawablePtr pDraw; + int rc; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xGetGeometryReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .root = screenInfo.screens[0]->root->drawable.id, + .depth = pDraw->depth, + .width = pDraw->width, + .height = pDraw->height, + .x = 0, + .y = 0, + .borderWidth = 0 + }; + + if (stuff->id == rep.root) { + xWindowRoot *root = (xWindowRoot *) + (ConnectionInfo + connBlockScreenStart); + + rep.width = root->pixWidth; + rep.height = root->pixHeight; + } + else if (WindowDrawable(pDraw->type)) { + WindowPtr pWin = (WindowPtr) pDraw; + + rep.x = pWin->origin.x - wBorderWidth(pWin); + rep.y = pWin->origin.y - wBorderWidth(pWin); + if ((pWin->parent == screenInfo.screens[0]->root) || + (pWin->parent->drawable.id == + screenInfo.screens[0]->screensaver.wid)) { + rep.x += screenInfo.screens[0]->x; + rep.y += screenInfo.screens[0]->y; + } + rep.borderWidth = pWin->borderWidth; + } + + WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); + return Success; +} + +int +PanoramiXTranslateCoords(ClientPtr client) +{ + INT16 x, y; + + REQUEST(xTranslateCoordsReq); + int rc; + WindowPtr pWin, pDst; + xTranslateCoordsReply rep; + + REQUEST_SIZE_MATCH(xTranslateCoordsReq); + rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixReadAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; + rep = (xTranslateCoordsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .sameScreen = xTrue, + .child = None + }; + + if ((pWin == screenInfo.screens[0]->root) || + (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) { + x = stuff->srcX - screenInfo.screens[0]->x; + y = stuff->srcY - screenInfo.screens[0]->y; + } + else { + x = pWin->drawable.x + stuff->srcX; + y = pWin->drawable.y + stuff->srcY; + } + pWin = pDst->firstChild; + while (pWin) { + BoxRec box; + + if ((pWin->mapped) && + (x >= pWin->drawable.x - wBorderWidth(pWin)) && + (x < pWin->drawable.x + (int) pWin->drawable.width + + wBorderWidth(pWin)) && + (y >= pWin->drawable.y - wBorderWidth(pWin)) && + (y < pWin->drawable.y + (int) pWin->drawable.height + + wBorderWidth(pWin)) + /* When a window is shaped, a further check + * is made to see if the point is inside + * borderSize + */ + && (!wBoundingShape(pWin) || + RegionContainsPoint(wBoundingShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) + ) { + rep.child = pWin->drawable.id; + pWin = (WindowPtr) NULL; + } + else + pWin = pWin->nextSib; + } + rep.dstX = x - pDst->drawable.x; + rep.dstY = y - pDst->drawable.y; + if ((pDst == screenInfo.screens[0]->root) || + (pDst->drawable.id == screenInfo.screens[0]->screensaver.wid)) { + rep.dstX += screenInfo.screens[0]->x; + rep.dstY += screenInfo.screens[0]->y; + } + + WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); + return Success; +} + +int +PanoramiXCreatePixmap(ClientPtr client) +{ + PanoramiXRes *refDraw, *newPix; + int result, j; + + REQUEST(xCreatePixmapReq); + + REQUEST_SIZE_MATCH(xCreatePixmapReq); + client->errorValue = stuff->pid; + + result = dixLookupResourceByClass((pointer *) &refDraw, stuff->drawable, + XRC_DRAWABLE, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (!(newPix = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newPix->type = XRT_PIXMAP; + newPix->u.pix.shared = FALSE; + panoramix_setup_ids(newPix, client, stuff->pid); + + FOR_NSCREENS_BACKWARD(j) { + stuff->pid = newPix->info[j].id; + stuff->drawable = refDraw->info[j].id; + result = (*SavedProcVector[X_CreatePixmap]) (client); + if (result != Success) + break; + } + + if (result == Success) + AddResource(newPix->info[0].id, XRT_PIXMAP, newPix); + else + free(newPix); + + return result; +} + +int +PanoramiXFreePixmap(ClientPtr client) +{ + PanoramiXRes *pix; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + result = dixLookupResourceByType((pointer *) &pix, stuff->id, XRT_PIXMAP, + client, DixDestroyAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = pix->info[j].id; + result = (*SavedProcVector[X_FreePixmap]) (client); + if (result != Success) + break; + } + + /* Since ProcFreePixmap is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return result; +} + +int +PanoramiXCreateGC(ClientPtr client) +{ + PanoramiXRes *refDraw; + PanoramiXRes *newGC; + PanoramiXRes *stip = NULL; + PanoramiXRes *tile = NULL; + PanoramiXRes *clip = NULL; + + REQUEST(xCreateGCReq); + int tile_offset = 0, stip_offset = 0, clip_offset = 0; + int result, len, j; + XID tmp; + + REQUEST_AT_LEAST_SIZE(xCreateGCReq); + + client->errorValue = stuff->gc; + len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq)); + if (Ones(stuff->mask) != len) + return BadLength; + + result = dixLookupResourceByClass((pointer *) &refDraw, stuff->drawable, + XRC_DRAWABLE, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if ((Mask) stuff->mask & GCTile) { + tile_offset = Ones((Mask) stuff->mask & (GCTile - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { + result = dixLookupResourceByType((pointer *) &tile, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->mask & GCStipple) { + stip_offset = Ones((Mask) stuff->mask & (GCStipple - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { + result = dixLookupResourceByType((pointer *) &stip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->mask & GCClipMask) { + clip_offset = Ones((Mask) stuff->mask & (GCClipMask - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { + result = dixLookupResourceByType((pointer *) &clip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return result; + } + } + + if (!(newGC = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newGC->type = XRT_GC; + panoramix_setup_ids(newGC, client, stuff->gc); + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = newGC->info[j].id; + stuff->drawable = refDraw->info[j].id; + if (tile) + *((CARD32 *) &stuff[1] + tile_offset) = tile->info[j].id; + if (stip) + *((CARD32 *) &stuff[1] + stip_offset) = stip->info[j].id; + if (clip) + *((CARD32 *) &stuff[1] + clip_offset) = clip->info[j].id; + result = (*SavedProcVector[X_CreateGC]) (client); + if (result != Success) + break; + } + + if (result == Success) + AddResource(newGC->info[0].id, XRT_GC, newGC); + else + free(newGC); + + return result; +} + +int +PanoramiXChangeGC(ClientPtr client) +{ + PanoramiXRes *gc; + PanoramiXRes *stip = NULL; + PanoramiXRes *tile = NULL; + PanoramiXRes *clip = NULL; + + REQUEST(xChangeGCReq); + int tile_offset = 0, stip_offset = 0, clip_offset = 0; + int result, len, j; + XID tmp; + + REQUEST_AT_LEAST_SIZE(xChangeGCReq); + + len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq)); + if (Ones(stuff->mask) != len) + return BadLength; + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + if ((Mask) stuff->mask & GCTile) { + tile_offset = Ones((Mask) stuff->mask & (GCTile - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { + result = dixLookupResourceByType((pointer *) &tile, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->mask & GCStipple) { + stip_offset = Ones((Mask) stuff->mask & (GCStipple - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { + result = dixLookupResourceByType((pointer *) &stip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return result; + } + } + if ((Mask) stuff->mask & GCClipMask) { + clip_offset = Ones((Mask) stuff->mask & (GCClipMask - 1)); + if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { + result = dixLookupResourceByType((pointer *) &clip, tmp, XRT_PIXMAP, + client, DixReadAccess); + if (result != Success) + return result; + } + } + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + if (tile) + *((CARD32 *) &stuff[1] + tile_offset) = tile->info[j].id; + if (stip) + *((CARD32 *) &stuff[1] + stip_offset) = stip->info[j].id; + if (clip) + *((CARD32 *) &stuff[1] + clip_offset) = clip->info[j].id; + result = (*SavedProcVector[X_ChangeGC]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXCopyGC(ClientPtr client) +{ + PanoramiXRes *srcGC, *dstGC; + int result, j; + + REQUEST(xCopyGCReq); + + REQUEST_SIZE_MATCH(xCopyGCReq); + + result = dixLookupResourceByType((pointer *) &srcGC, stuff->srcGC, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &dstGC, stuff->dstGC, XRT_GC, + client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS(j) { + stuff->srcGC = srcGC->info[j].id; + stuff->dstGC = dstGC->info[j].id; + result = (*SavedProcVector[X_CopyGC]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXSetDashes(ClientPtr client) +{ + PanoramiXRes *gc; + int result, j; + + REQUEST(xSetDashesReq); + + REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_SetDashes]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXSetClipRectangles(ClientPtr client) +{ + PanoramiXRes *gc; + int result, j; + + REQUEST(xSetClipRectanglesReq); + + REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_SetClipRectangles]) (client); + if (result != Success) + break; + } + + return result; +} + +int +PanoramiXFreeGC(ClientPtr client) +{ + PanoramiXRes *gc; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + result = dixLookupResourceByType((pointer *) &gc, stuff->id, XRT_GC, + client, DixDestroyAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = gc->info[j].id; + result = (*SavedProcVector[X_FreeGC]) (client); + if (result != Success) + break; + } + + /* Since ProcFreeGC is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return result; +} + +int +PanoramiXClearToBackground(ClientPtr client) +{ + PanoramiXRes *win; + int result, j, x, y; + Bool isRoot; + + REQUEST(xClearAreaReq); + + REQUEST_SIZE_MATCH(xClearAreaReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->window, + XRT_WINDOW, client, DixWriteAccess); + if (result != Success) + return result; + + x = stuff->x; + y = stuff->y; + isRoot = win->u.win.root; + FOR_NSCREENS_BACKWARD(j) { + stuff->window = win->info[j].id; + if (isRoot) { + stuff->x = x - screenInfo.screens[j]->x; + stuff->y = y - screenInfo.screens[j]->y; + } + result = (*SavedProcVector[X_ClearArea]) (client); + if (result != Success) + break; + } + + return result; +} + +/* + For Window to Pixmap copies you're screwed since each screen's + pixmap will look like what it sees on its screen. Unless the + screens overlap and the window lies on each, the two copies + will be out of sync. To remedy this we do a GetImage and PutImage + in place of the copy. Doing this as a single Image isn't quite + correct since it will include the obscured areas but we will + have to fix this later. (MArk). +*/ + +int +PanoramiXCopyArea(ClientPtr client) +{ + int j, result, srcx, srcy, dstx, dsty; + PanoramiXRes *gc, *src, *dst; + Bool srcIsRoot = FALSE; + Bool dstIsRoot = FALSE; + Bool srcShared, dstShared; + + REQUEST(xCopyAreaReq); + + REQUEST_SIZE_MATCH(xCopyAreaReq); + + result = dixLookupResourceByClass((pointer *) &src, stuff->srcDrawable, + XRC_DRAWABLE, client, DixReadAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + srcShared = IS_SHARED_PIXMAP(src); + + result = dixLookupResourceByClass((pointer *) &dst, stuff->dstDrawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + dstShared = IS_SHARED_PIXMAP(dst); + + if (dstShared && srcShared) + return (*SavedProcVector[X_CopyArea]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + if ((dst->type == XRT_WINDOW) && dst->u.win.root) + dstIsRoot = TRUE; + if ((src->type == XRT_WINDOW) && src->u.win.root) + srcIsRoot = TRUE; + + srcx = stuff->srcX; + srcy = stuff->srcY; + dstx = stuff->dstX; + dsty = stuff->dstY; + if ((dst->type == XRT_PIXMAP) && (src->type == XRT_WINDOW)) { + DrawablePtr drawables[MAXSCREENS]; + DrawablePtr pDst; + GCPtr pGC; + char *data; + int pitch, rc; + + FOR_NSCREENS(j) { + rc = dixLookupDrawable(drawables + j, src->info[j].id, client, 0, + DixGetAttrAccess); + if (rc != Success) + return rc; + } + + pitch = PixmapBytePad(stuff->width, drawables[0]->depth); + if (!(data = calloc(1, stuff->height * pitch))) + return BadAlloc; + + XineramaGetImageData(drawables, srcx, srcy, + stuff->width, stuff->height, ZPixmap, ~0, data, + pitch, srcIsRoot); + + FOR_NSCREENS_BACKWARD(j) { + stuff->gc = gc->info[j].id; + VALIDATE_DRAWABLE_AND_GC(dst->info[j].id, pDst, DixWriteAccess); + if (drawables[0]->depth != pDst->depth) { + client->errorValue = stuff->dstDrawable; + free(data); + return BadMatch; + } + + (*pGC->ops->PutImage) (pDst, pGC, pDst->depth, dstx, dsty, + stuff->width, stuff->height, + 0, ZPixmap, data); + + if (dstShared) + break; + } + + free(data); + } + else { + DrawablePtr pDst = NULL, pSrc = NULL; + GCPtr pGC = NULL; + RegionRec totalReg; + int rc; + + RegionNull(&totalReg); + FOR_NSCREENS_BACKWARD(j) { + RegionPtr pRgn; + + stuff->dstDrawable = dst->info[j].id; + stuff->srcDrawable = src->info[j].id; + stuff->gc = gc->info[j].id; + if (srcIsRoot) { + stuff->srcX = srcx - screenInfo.screens[j]->x; + stuff->srcY = srcy - screenInfo.screens[j]->y; + } + if (dstIsRoot) { + stuff->dstX = dstx - screenInfo.screens[j]->x; + stuff->dstY = dsty - screenInfo.screens[j]->y; + } + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); + + if (stuff->dstDrawable != stuff->srcDrawable) { + rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + if ((pDst->pScreen != pSrc->pScreen) || + (pDst->depth != pSrc->depth)) { + client->errorValue = stuff->dstDrawable; + return BadMatch; + } + } + else + pSrc = pDst; + + pRgn = (*pGC->ops->CopyArea) (pSrc, pDst, pGC, + stuff->srcX, stuff->srcY, + stuff->width, stuff->height, + stuff->dstX, stuff->dstY); + if (pGC->graphicsExposures && pRgn) { + if (srcIsRoot) { + RegionTranslate(pRgn, + screenInfo.screens[j]->x, + screenInfo.screens[j]->y); + } + RegionAppend(&totalReg, pRgn); + RegionDestroy(pRgn); + } + + if (dstShared) + break; + } + + if (pGC->graphicsExposures) { + Bool overlap; + + RegionValidate(&totalReg, &overlap); + (*pDst->pScreen->SendGraphicsExpose) (client, &totalReg, + stuff->dstDrawable, + X_CopyArea, 0); + RegionUninit(&totalReg); + } + } + + return Success; +} + +int +PanoramiXCopyPlane(ClientPtr client) +{ + int j, srcx, srcy, dstx, dsty, rc; + PanoramiXRes *gc, *src, *dst; + Bool srcIsRoot = FALSE; + Bool dstIsRoot = FALSE; + Bool srcShared, dstShared; + DrawablePtr psrcDraw, pdstDraw = NULL; + GCPtr pGC = NULL; + RegionRec totalReg; + + REQUEST(xCopyPlaneReq); + + REQUEST_SIZE_MATCH(xCopyPlaneReq); + + rc = dixLookupResourceByClass((pointer *) &src, stuff->srcDrawable, + XRC_DRAWABLE, client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; + + srcShared = IS_SHARED_PIXMAP(src); + + rc = dixLookupResourceByClass((pointer *) &dst, stuff->dstDrawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; + + dstShared = IS_SHARED_PIXMAP(dst); + + if (dstShared && srcShared) + return (*SavedProcVector[X_CopyPlane]) (client); + + rc = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (rc != Success) + return rc; + + if ((dst->type == XRT_WINDOW) && dst->u.win.root) + dstIsRoot = TRUE; + if ((src->type == XRT_WINDOW) && src->u.win.root) + srcIsRoot = TRUE; + + srcx = stuff->srcX; + srcy = stuff->srcY; + dstx = stuff->dstX; + dsty = stuff->dstY; + + RegionNull(&totalReg); + FOR_NSCREENS_BACKWARD(j) { + RegionPtr pRgn; + + stuff->dstDrawable = dst->info[j].id; + stuff->srcDrawable = src->info[j].id; + stuff->gc = gc->info[j].id; + if (srcIsRoot) { + stuff->srcX = srcx - screenInfo.screens[j]->x; + stuff->srcY = srcy - screenInfo.screens[j]->y; + } + if (dstIsRoot) { + stuff->dstX = dstx - screenInfo.screens[j]->x; + stuff->dstY = dsty - screenInfo.screens[j]->y; + } + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); + if (stuff->dstDrawable != stuff->srcDrawable) { + rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + if (pdstDraw->pScreen != psrcDraw->pScreen) { + client->errorValue = stuff->dstDrawable; + return BadMatch; + } + } + else + psrcDraw = pdstDraw; + + if (stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) || + (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) { + client->errorValue = stuff->bitPlane; + return BadValue; + } + + pRgn = (*pGC->ops->CopyPlane) (psrcDraw, pdstDraw, pGC, + stuff->srcX, stuff->srcY, + stuff->width, stuff->height, + stuff->dstX, stuff->dstY, + stuff->bitPlane); + if (pGC->graphicsExposures && pRgn) { + RegionAppend(&totalReg, pRgn); + RegionDestroy(pRgn); + } + + if (dstShared) + break; + } + + if (pGC->graphicsExposures) { + Bool overlap; + + RegionValidate(&totalReg, &overlap); + (*pdstDraw->pScreen->SendGraphicsExpose) (client, &totalReg, + stuff->dstDrawable, + X_CopyPlane, 0); + RegionUninit(&totalReg); + } + + return Success; +} + +int +PanoramiXPolyPoint(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + int result, npoint, j; + xPoint *origPts; + Bool isRoot; + + REQUEST(xPolyPointReq); + + REQUEST_AT_LEAST_SIZE(xPolyPointReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyPoint]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq)); + if (npoint > 0) { + origPts = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + xPoint *pnts = (xPoint *) &stuff[1]; + int i = + (stuff->coordMode == CoordModePrevious) ? 1 : npoint; + + while (i--) { + pnts->x -= x_off; + pnts->y -= y_off; + pnts++; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PolyPoint]) (client); + if (result != Success) + break; + } + free(origPts); + return result; + } + else + return Success; +} + +int +PanoramiXPolyLine(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + int result, npoint, j; + xPoint *origPts; + Bool isRoot; + + REQUEST(xPolyLineReq); + + REQUEST_AT_LEAST_SIZE(xPolyLineReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyLine]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq)); + if (npoint > 0) { + origPts = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + xPoint *pnts = (xPoint *) &stuff[1]; + int i = + (stuff->coordMode == CoordModePrevious) ? 1 : npoint; + + while (i--) { + pnts->x -= x_off; + pnts->y -= y_off; + pnts++; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PolyLine]) (client); + if (result != Success) + break; + } + free(origPts); + return result; + } + else + return Success; +} + +int +PanoramiXPolySegment(ClientPtr client) +{ + int result, nsegs, i, j; + PanoramiXRes *gc, *draw; + xSegment *origSegs; + Bool isRoot; + + REQUEST(xPolySegmentReq); + + REQUEST_AT_LEAST_SIZE(xPolySegmentReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolySegment]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); + if (nsegs & 4) + return BadLength; + nsegs >>= 3; + if (nsegs > 0) { + origSegs = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + xSegment *segs = (xSegment *) &stuff[1]; + + for (i = nsegs; i--; segs++) { + segs->x1 -= x_off; + segs->x2 -= x_off; + segs->y1 -= y_off; + segs->y2 -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PolySegment]) (client); + if (result != Success) + break; + } + free(origSegs); + return result; + } + else + return Success; +} + +int +PanoramiXPolyRectangle(ClientPtr client) +{ + int result, nrects, i, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + xRectangle *origRecs; + + REQUEST(xPolyRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyRectangle]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); + if (nrects & 4) + return BadLength; + nrects >>= 3; + if (nrects > 0) { + origRecs = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + xRectangle *rects = (xRectangle *) &stuff[1]; + + for (i = nrects; i--; rects++) { + rects->x -= x_off; + rects->y -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PolyRectangle]) (client); + if (result != Success) + break; + } + free(origRecs); + return result; + } + else + return Success; +} + +int +PanoramiXPolyArc(ClientPtr client) +{ + int result, narcs, i, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + xArc *origArcs; + + REQUEST(xPolyArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyArcReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyArc]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + narcs = (client->req_len << 2) - sizeof(xPolyArcReq); + if (narcs % sizeof(xArc)) + return BadLength; + narcs /= sizeof(xArc); + if (narcs > 0) { + origArcs = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + xArc *arcs = (xArc *) &stuff[1]; + + for (i = narcs; i--; arcs++) { + arcs->x -= x_off; + arcs->y -= y_off; + } + } + } + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PolyArc]) (client); + if (result != Success) + break; + } + free(origArcs); + return result; + } + else + return Success; +} + +int +PanoramiXFillPoly(ClientPtr client) +{ + int result, count, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + DDXPointPtr locPts; + + REQUEST(xFillPolyReq); + + REQUEST_AT_LEAST_SIZE(xFillPolyReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_FillPoly]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + count = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq)); + if (count > 0) { + locPts = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + DDXPointPtr pnts = (DDXPointPtr) &stuff[1]; + int i = (stuff->coordMode == CoordModePrevious) ? 1 : count; + + while (i--) { + pnts->x -= x_off; + pnts->y -= y_off; + pnts++; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_FillPoly]) (client); + if (result != Success) + break; + } + free(locPts); + return result; + } + else + return Success; +} + +int +PanoramiXPolyFillRectangle(ClientPtr client) +{ + int result, things, i, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + xRectangle *origRects; + + REQUEST(xPolyFillRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyFillRectangle]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); + if (things & 4) + return BadLength; + things >>= 3; + if (things > 0) { + origRects = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + xRectangle *rects = (xRectangle *) &stuff[1]; + + for (i = things; i--; rects++) { + rects->x -= x_off; + rects->y -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PolyFillRectangle]) (client); + if (result != Success) + break; + } + free(origRects); + return result; + } + else + return Success; +} + +int +PanoramiXPolyFillArc(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int result, narcs, i, j; + xArc *origArcs; + + REQUEST(xPolyFillArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyFillArc]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); + if (narcs % sizeof(xArc)) + return BadLength; + narcs /= sizeof(xArc); + if (narcs > 0) { + origArcs = 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 = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; + + if (x_off || y_off) { + xArc *arcs = (xArc *) &stuff[1]; + + for (i = narcs; i--; arcs++) { + arcs->x -= x_off; + arcs->y -= y_off; + } + } + } + + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PolyFillArc]) (client); + if (result != Success) + break; + } + free(origArcs); + return result; + } + else + return Success; +} + +int +PanoramiXPutImage(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int j, result, orig_x, orig_y; + + REQUEST(xPutImageReq); + + REQUEST_AT_LEAST_SIZE(xPutImageReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PutImage]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + orig_x = stuff->dstX; + orig_y = stuff->dstY; + FOR_NSCREENS_BACKWARD(j) { + if (isRoot) { + stuff->dstX = orig_x - screenInfo.screens[j]->x; + stuff->dstY = orig_y - screenInfo.screens[j]->y; + } + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + result = (*SavedProcVector[X_PutImage]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXGetImage(ClientPtr client) +{ + DrawablePtr drawables[MAXSCREENS]; + DrawablePtr pDraw; + PanoramiXRes *draw; + xGetImageReply xgi; + Bool isRoot; + char *pBuf; + int i, x, y, w, h, format, rc; + Mask plane = 0, planemask; + int linesDone, nlines, linesPerBuf; + long widthBytesLine, length; + + REQUEST(xGetImageReq); + + REQUEST_SIZE_MATCH(xGetImageReq); + + if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { + client->errorValue = stuff->format; + return BadValue; + } + + rc = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; + + if (draw->type == XRT_PIXMAP) + return (*SavedProcVector[X_GetImage]) (client); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + + if (!((WindowPtr) pDraw)->realized) + return BadMatch; + + x = stuff->x; + y = stuff->y; + w = stuff->width; + h = stuff->height; + format = stuff->format; + planemask = stuff->planeMask; + + isRoot = IS_ROOT_DRAWABLE(draw); + + if (isRoot) { + /* check for being onscreen */ + if (x < 0 || x + w > PanoramiXPixWidth || + y < 0 || y + h > PanoramiXPixHeight) + return BadMatch; + } + else { + /* check for being onscreen and inside of border */ + if (screenInfo.screens[0]->x + pDraw->x + x < 0 || + screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth || + screenInfo.screens[0]->y + pDraw->y + y < 0 || + screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight || + x < -wBorderWidth((WindowPtr) pDraw) || + x + w > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->width || + y < -wBorderWidth((WindowPtr) pDraw) || + y + h > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height) + return BadMatch; + } + + drawables[0] = pDraw; + FOR_NSCREENS_FORWARD_SKIP(i) { + rc = dixLookupDrawable(drawables + i, draw->info[i].id, client, 0, + DixGetAttrAccess); + if (rc != Success) + return rc; + } + + xgi = (xGetImageReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .visual = wVisual(((WindowPtr) pDraw)), + .depth = pDraw->depth + }; + if (format == ZPixmap) { + widthBytesLine = PixmapBytePad(w, pDraw->depth); + length = widthBytesLine * h; + + } + else { + widthBytesLine = BitmapBytePad(w); + plane = ((Mask) 1) << (pDraw->depth - 1); + /* only planes asked for */ + length = widthBytesLine * h * Ones(planemask & (plane | (plane - 1))); + + } + + xgi.length = bytes_to_int32(length); + + if (widthBytesLine == 0 || h == 0) + linesPerBuf = 0; + else if (widthBytesLine >= XINERAMA_IMAGE_BUFSIZE) + linesPerBuf = 1; + else { + linesPerBuf = XINERAMA_IMAGE_BUFSIZE / widthBytesLine; + if (linesPerBuf > h) + linesPerBuf = h; + } + length = linesPerBuf * widthBytesLine; + if (!(pBuf = malloc(length))) + return BadAlloc; + + WriteReplyToClient(client, sizeof(xGetImageReply), &xgi); + + if (linesPerBuf == 0) { + /* nothing to do */ + } + else if (format == ZPixmap) { + linesDone = 0; + while (h - linesDone > 0) { + nlines = min(linesPerBuf, h - linesDone); + + if (pDraw->depth == 1) + memset(pBuf, 0, nlines * widthBytesLine); + + XineramaGetImageData(drawables, x, y + linesDone, w, nlines, + format, planemask, pBuf, widthBytesLine, + isRoot); + + WriteToClient(client, (int) (nlines * widthBytesLine), pBuf); + linesDone += nlines; + } + } + else { /* XYPixmap */ + for (; plane; plane >>= 1) { + if (planemask & plane) { + linesDone = 0; + while (h - linesDone > 0) { + nlines = min(linesPerBuf, h - linesDone); + + memset(pBuf, 0, nlines * widthBytesLine); + + XineramaGetImageData(drawables, x, y + linesDone, w, + nlines, format, plane, pBuf, + widthBytesLine, isRoot); + + WriteToClient(client, (int)(nlines * widthBytesLine), pBuf); + + linesDone += nlines; + } + } + } + } + free(pBuf); + return Success; +} + +/* The text stuff should be rewritten so that duplication happens + at the GlyphBlt level. That is, loading the font and getting + the glyphs should only happen once */ + +int +PanoramiXPolyText8(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int result, j; + int orig_x, orig_y; + + REQUEST(xPolyTextReq); + + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyText8]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j) { + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; + } + result = (*SavedProcVector[X_PolyText8]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXPolyText16(ClientPtr client) +{ + PanoramiXRes *gc, *draw; + Bool isRoot; + int result, j; + int orig_x, orig_y; + + REQUEST(xPolyTextReq); + + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_PolyText16]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j) { + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; + } + result = (*SavedProcVector[X_PolyText16]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXImageText8(ClientPtr client) +{ + int result, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + int orig_x, orig_y; + + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_ImageText8]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j) { + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; + } + result = (*SavedProcVector[X_ImageText8]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXImageText16(ClientPtr client) +{ + int result, j; + PanoramiXRes *gc, *draw; + Bool isRoot; + int orig_x, orig_y; + + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + if (IS_SHARED_PIXMAP(draw)) + return (*SavedProcVector[X_ImageText16]) (client); + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, XRT_GC, + client, DixReadAccess); + if (result != Success) + return result; + + isRoot = IS_ROOT_DRAWABLE(draw); + + orig_x = stuff->x; + orig_y = stuff->y; + FOR_NSCREENS_BACKWARD(j) { + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; + } + result = (*SavedProcVector[X_ImageText16]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXCreateColormap(ClientPtr client) +{ + PanoramiXRes *win, *newCmap; + int result, j, orig_visual; + + REQUEST(xCreateColormapReq); + + REQUEST_SIZE_MATCH(xCreateColormapReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->window, + XRT_WINDOW, client, DixReadAccess); + if (result != Success) + return result; + + if (!(newCmap = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newCmap->type = XRT_COLORMAP; + panoramix_setup_ids(newCmap, client, stuff->mid); + + orig_visual = stuff->visual; + FOR_NSCREENS_BACKWARD(j) { + stuff->mid = newCmap->info[j].id; + stuff->window = win->info[j].id; + stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); + result = (*SavedProcVector[X_CreateColormap]) (client); + if (result != Success) + break; + } + + if (result == Success) + AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); + else + free(newCmap); + + return result; +} + +int +PanoramiXFreeColormap(ClientPtr client) +{ + PanoramiXRes *cmap; + int result, j; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->id, XRT_COLORMAP, + client, DixDestroyAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = cmap->info[j].id; + result = (*SavedProcVector[X_FreeColormap]) (client); + if (result != Success) + break; + } + + /* Since ProcFreeColormap is using FreeResource, it will free + our resource for us on the last pass through the loop above */ + + return result; +} + +int +PanoramiXCopyColormapAndFree(ClientPtr client) +{ + PanoramiXRes *cmap, *newCmap; + int result, j; + + REQUEST(xCopyColormapAndFreeReq); + + REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); + + client->errorValue = stuff->srcCmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->srcCmap, + XRT_COLORMAP, client, + DixReadAccess | DixWriteAccess); + if (result != Success) + return result; + + if (!(newCmap = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newCmap->type = XRT_COLORMAP; + panoramix_setup_ids(newCmap, client, stuff->mid); + + FOR_NSCREENS_BACKWARD(j) { + stuff->srcCmap = cmap->info[j].id; + stuff->mid = newCmap->info[j].id; + result = (*SavedProcVector[X_CopyColormapAndFree]) (client); + if (result != Success) + break; + } + + if (result == Success) + AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); + else + free(newCmap); + + return result; +} + +int +PanoramiXInstallColormap(ClientPtr client) +{ + REQUEST(xResourceReq); + int result, j; + PanoramiXRes *cmap; + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->id, XRT_COLORMAP, + client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = cmap->info[j].id; + result = (*SavedProcVector[X_InstallColormap]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXUninstallColormap(ClientPtr client) +{ + REQUEST(xResourceReq); + int result, j; + PanoramiXRes *cmap; + + REQUEST_SIZE_MATCH(xResourceReq); + + client->errorValue = stuff->id; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->id, XRT_COLORMAP, + client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->id = cmap->info[j].id; + result = (*SavedProcVector[X_UninstallColormap]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXAllocColor(ClientPtr client) +{ + int result, j; + PanoramiXRes *cmap; + + REQUEST(xAllocColorReq); + + REQUEST_SIZE_MATCH(xAllocColorReq); + + client->errorValue = stuff->cmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (*SavedProcVector[X_AllocColor]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXAllocNamedColor(ClientPtr client) +{ + int result, j; + PanoramiXRes *cmap; + + REQUEST(xAllocNamedColorReq); + + REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); + + client->errorValue = stuff->cmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (*SavedProcVector[X_AllocNamedColor]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXAllocColorCells(ClientPtr client) +{ + int result, j; + PanoramiXRes *cmap; + + REQUEST(xAllocColorCellsReq); + + REQUEST_SIZE_MATCH(xAllocColorCellsReq); + + client->errorValue = stuff->cmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (*SavedProcVector[X_AllocColorCells]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXAllocColorPlanes(ClientPtr client) +{ + int result, j; + PanoramiXRes *cmap; + + REQUEST(xAllocColorPlanesReq); + + REQUEST_SIZE_MATCH(xAllocColorPlanesReq); + + client->errorValue = stuff->cmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (*SavedProcVector[X_AllocColorPlanes]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXFreeColors(ClientPtr client) +{ + int result, j; + PanoramiXRes *cmap; + + REQUEST(xFreeColorsReq); + + REQUEST_AT_LEAST_SIZE(xFreeColorsReq); + + client->errorValue = stuff->cmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (*SavedProcVector[X_FreeColors]) (client); + } + return result; +} + +int +PanoramiXStoreColors(ClientPtr client) +{ + int result, j; + PanoramiXRes *cmap; + + REQUEST(xStoreColorsReq); + + REQUEST_AT_LEAST_SIZE(xStoreColorsReq); + + client->errorValue = stuff->cmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (*SavedProcVector[X_StoreColors]) (client); + if (result != Success) + break; + } + return result; +} + +int +PanoramiXStoreNamedColor(ClientPtr client) +{ + int result, j; + PanoramiXRes *cmap; + + REQUEST(xStoreNamedColorReq); + + REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); + + client->errorValue = stuff->cmap; + + result = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, + XRT_COLORMAP, client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(j) { + stuff->cmap = cmap->info[j].id; + result = (*SavedProcVector[X_StoreNamedColor]) (client); + if (result != Success) + break; + } + return result; +} diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h new file mode 100644 index 0000000..0fcde4f --- /dev/null +++ b/Xext/panoramiXsrv.h @@ -0,0 +1,63 @@ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _PANORAMIXSRV_H_ +#define _PANORAMIXSRV_H_ + +#include "panoramiX.h" + +extern _X_EXPORT int PanoramiXNumScreens; +extern _X_EXPORT int PanoramiXPixWidth; +extern _X_EXPORT int PanoramiXPixHeight; +extern _X_EXPORT RegionRec PanoramiXScreenRegion; + +extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig); +extern _X_EXPORT void PanoramiXConsolidate(void); +extern _X_EXPORT Bool PanoramiXCreateConnectionBlock(void); +extern _X_EXPORT PanoramiXRes *PanoramiXFindIDByScrnum(RESTYPE, XID, int); +extern _X_EXPORT Bool +XineramaRegisterConnectionBlockCallback(void (*func) (void)); +extern _X_EXPORT int XineramaDeleteResource(pointer, XID); + +extern _X_EXPORT void XineramaReinitData(void); + +extern _X_EXPORT RESTYPE XRC_DRAWABLE; +extern _X_EXPORT RESTYPE XRT_WINDOW; +extern _X_EXPORT RESTYPE XRT_PIXMAP; +extern _X_EXPORT RESTYPE XRT_GC; +extern _X_EXPORT RESTYPE XRT_COLORMAP; +extern _X_EXPORT RESTYPE XRT_PICTURE; + +/* + * Drivers are allowed to wrap this function. Each wrapper can decide that the + * two visuals are unequal, but if they are deemed equal, the wrapper must call + * down and return FALSE if the wrapped function does. This ensures that all + * layers agree that the visuals are equal. The first visual is always from + * screen 0. + */ +typedef Bool (*XineramaVisualsEqualProcPtr) (VisualPtr, ScreenPtr, VisualPtr); +extern _X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr; + +extern _X_EXPORT void XineramaGetImageData(DrawablePtr *pDrawables, + int left, + int top, + int width, + int height, + unsigned int format, + unsigned long planemask, + char *data, int pitch, Bool isRoot); + +static inline void +panoramix_setup_ids(PanoramiXRes * resource, ClientPtr client, XID base_id) +{ + int j; + + resource->info[0].id = base_id; + FOR_NSCREENS_FORWARD_SKIP(j) { + resource->info[j].id = FakeClientID(client->index); + } +} + +#endif /* _PANORAMIXSRV_H_ */ diff --git a/Xext/saver.c b/Xext/saver.c new file mode 100644 index 0000000..e06f408 --- /dev/null +++ b/Xext/saver.c @@ -0,0 +1,1418 @@ +/* + * +Copyright (c) 1992 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + * + * Author: Keith Packard, MIT X Consortium + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#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 <X11/extensions/saverproto.h> +#include "gcstruct.h" +#include "cursorstr.h" +#include "colormapst.h" +#include "xace.h" +#include "inputstr.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#ifdef DPMSExtension +#include <X11/extensions/dpmsconst.h> +#endif +#include "protocol-versions.h" + +#include <stdio.h> + +#include "extinit.h" + +static int ScreenSaverEventBase = 0; + +static Bool ScreenSaverHandle(ScreenPtr /* pScreen */ , + int /* xstate */ , + Bool /* force */ + ); + +static Bool + CreateSaverWindow(ScreenPtr /* pScreen */ + ); + +static Bool + DestroySaverWindow(ScreenPtr /* pScreen */ + ); + +static void + UninstallSaverColormap(ScreenPtr /* pScreen */ + ); + +static void + CheckScreenPrivate(ScreenPtr /* pScreen */ + ); + +static void SScreenSaverNotifyEvent(xScreenSaverNotifyEvent * /* from */ , + xScreenSaverNotifyEvent * /* to */ + ); + +static RESTYPE SuspendType; /* resource type for suspension records */ + +typedef struct _ScreenSaverSuspension *ScreenSaverSuspensionPtr; + +/* List of clients that are suspending the screensaver. */ +static ScreenSaverSuspensionPtr suspendingClients = NULL; + +/* + * clientResource is a resource ID that's added when the record is + * allocated, so the record is freed and the screensaver resumed when + * the client disconnects. count is the number of times the client has + * requested the screensaver be suspended. + */ +typedef struct _ScreenSaverSuspension { + ScreenSaverSuspensionPtr next; + ClientPtr pClient; + XID clientResource; + int count; +} ScreenSaverSuspensionRec; + +static int ScreenSaverFreeSuspend(pointer /*value */ , + XID /* id */ + ); + +/* + * each screen has a list of clients requesting + * ScreenSaverNotify events. Each client has a resource + * for each screen it selects ScreenSaverNotify input for, + * this resource is used to delete the ScreenSaverNotifyRec + * entry from the per-screen queue. + */ + +static RESTYPE SaverEventType; /* resource type for event masks */ + +typedef struct _ScreenSaverEvent *ScreenSaverEventPtr; + +typedef struct _ScreenSaverEvent { + ScreenSaverEventPtr next; + ClientPtr client; + ScreenPtr screen; + XID resource; + CARD32 mask; +} ScreenSaverEventRec; + +static int ScreenSaverFreeEvents(pointer /* value */ , + XID /* id */ + ); + +static Bool setEventMask(ScreenPtr /* pScreen */ , + ClientPtr /* client */ , + unsigned long /* mask */ + ); + +static unsigned long getEventMask(ScreenPtr /* pScreen */ , + ClientPtr /* client */ + ); + +/* + * when a client sets the screen saver attributes, a resource is + * kept to be freed when the client exits + */ + +static RESTYPE AttrType; /* resource type for attributes */ + +typedef struct _ScreenSaverAttr { + ScreenPtr screen; + ClientPtr client; + XID resource; + short x, y; + unsigned short width, height, borderWidth; + unsigned char class; + unsigned char depth; + VisualID visual; + CursorPtr pCursor; + PixmapPtr pBackgroundPixmap; + PixmapPtr pBorderPixmap; + Colormap colormap; + unsigned long mask; /* no pixmaps or cursors */ + unsigned long *values; +} ScreenSaverAttrRec, *ScreenSaverAttrPtr; + +static int ScreenSaverFreeAttr(pointer /* value */ , + XID /* id */ + ); + +static void FreeAttrs(ScreenSaverAttrPtr /* pAttr */ + ); + +static void FreeScreenAttr(ScreenSaverAttrPtr /* pAttr */ + ); + +static void + SendScreenSaverNotify(ScreenPtr /* pScreen */ , + int /* state */ , + Bool /* forced */ + ); + +typedef struct _ScreenSaverScreenPrivate { + ScreenSaverEventPtr events; + ScreenSaverAttrPtr attr; + Bool hasWindow; + Colormap installedMap; +} ScreenSaverScreenPrivateRec, *ScreenSaverScreenPrivatePtr; + +static ScreenSaverScreenPrivatePtr MakeScreenPrivate(ScreenPtr /* pScreen */ + ); + +static DevPrivateKeyRec ScreenPrivateKeyRec; + +#define ScreenPrivateKey (&ScreenPrivateKeyRec) + +#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ + dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) +#define SetScreenPrivate(s,v) \ + dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v); +#define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL) + +#define New(t) (malloc(sizeof (t))) + +static void +CheckScreenPrivate(ScreenPtr pScreen) +{ + SetupScreen(pScreen); + + if (!pPriv) + return; + if (!pPriv->attr && !pPriv->events && + !pPriv->hasWindow && pPriv->installedMap == None) { + free(pPriv); + SetScreenPrivate(pScreen, NULL); + pScreen->screensaver.ExternalScreenSaver = NULL; + } +} + +static ScreenSaverScreenPrivatePtr +MakeScreenPrivate(ScreenPtr pScreen) +{ + SetupScreen(pScreen); + + if (pPriv) + return pPriv; + pPriv = New(ScreenSaverScreenPrivateRec); + if (!pPriv) + return 0; + pPriv->events = 0; + pPriv->attr = 0; + pPriv->hasWindow = FALSE; + pPriv->installedMap = None; + SetScreenPrivate(pScreen, pPriv); + pScreen->screensaver.ExternalScreenSaver = ScreenSaverHandle; + return pPriv; +} + +static unsigned long +getEventMask(ScreenPtr pScreen, ClientPtr client) +{ + SetupScreen(pScreen); + ScreenSaverEventPtr pEv; + + if (!pPriv) + return 0; + for (pEv = pPriv->events; pEv; pEv = pEv->next) + if (pEv->client == client) + return pEv->mask; + return 0; +} + +static Bool +setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask) +{ + SetupScreen(pScreen); + ScreenSaverEventPtr pEv, *pPrev; + + if (getEventMask(pScreen, client) == mask) + return TRUE; + if (!pPriv) { + pPriv = MakeScreenPrivate(pScreen); + if (!pPriv) + return FALSE; + } + for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next) + if (pEv->client == client) + break; + if (mask == 0) { + FreeResource(pEv->resource, SaverEventType); + *pPrev = pEv->next; + free(pEv); + CheckScreenPrivate(pScreen); + } + else { + if (!pEv) { + pEv = New(ScreenSaverEventRec); + if (!pEv) { + CheckScreenPrivate(pScreen); + return FALSE; + } + *pPrev = pEv; + pEv->next = NULL; + pEv->client = client; + pEv->screen = pScreen; + pEv->resource = FakeClientID(client->index); + if (!AddResource(pEv->resource, SaverEventType, (pointer) pEv)) + return FALSE; + } + pEv->mask = mask; + } + return TRUE; +} + +static void +FreeAttrs(ScreenSaverAttrPtr pAttr) +{ + PixmapPtr pPixmap; + CursorPtr pCursor; + + if ((pPixmap = pAttr->pBackgroundPixmap) != 0) + (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); + if ((pPixmap = pAttr->pBorderPixmap) != 0) + (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); + if ((pCursor = pAttr->pCursor) != 0) + FreeCursor(pCursor, (Cursor) 0); +} + +static void +FreeScreenAttr(ScreenSaverAttrPtr pAttr) +{ + FreeAttrs(pAttr); + free(pAttr->values); + free(pAttr); +} + +static int +ScreenSaverFreeEvents(pointer value, XID id) +{ + ScreenSaverEventPtr pOld = (ScreenSaverEventPtr) value; + ScreenPtr pScreen = pOld->screen; + + SetupScreen(pScreen); + ScreenSaverEventPtr pEv, *pPrev; + + if (!pPriv) + return TRUE; + for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next) + if (pEv == pOld) + break; + if (!pEv) + return TRUE; + *pPrev = pEv->next; + free(pEv); + CheckScreenPrivate(pScreen); + return TRUE; +} + +static int +ScreenSaverFreeAttr(pointer value, XID id) +{ + ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr) value; + ScreenPtr pScreen = pOldAttr->screen; + + SetupScreen(pScreen); + + if (!pPriv) + return TRUE; + if (pPriv->attr != pOldAttr) + return TRUE; + FreeScreenAttr(pOldAttr); + pPriv->attr = NULL; + if (pPriv->hasWindow) { + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive); + } + CheckScreenPrivate(pScreen); + return TRUE; +} + +static int +ScreenSaverFreeSuspend(pointer value, XID id) +{ + ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value; + ScreenSaverSuspensionPtr *prev, this; + + /* Unlink and free the suspension record for the client */ + for (prev = &suspendingClients; (this = *prev); prev = &this->next) { + if (this == data) { + *prev = this->next; + free(this); + break; + } + } + + /* Reenable the screensaver if this was the last client suspending it. */ + if (screenSaverSuspended && suspendingClients == NULL) { + screenSaverSuspended = FALSE; + + /* The screensaver could be active, since suspending it (by design) + doesn't prevent it from being forceably activated */ +#ifdef DPMSExtension + if (screenIsSaved != SCREEN_SAVER_ON && DPMSPowerLevel == DPMSModeOn) +#else + if (screenIsSaved != SCREEN_SAVER_ON) +#endif + { + DeviceIntPtr dev; + UpdateCurrentTimeIf(); + nt_list_for_each_entry(dev, inputInfo.devices, next) + NoticeTime(dev, currentTime); + SetScreenSaverTimer(); + } + } + + return Success; +} + +static void +SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced) +{ + ScreenSaverScreenPrivatePtr pPriv; + ScreenSaverEventPtr pEv; + unsigned long mask; + int kind; + + UpdateCurrentTimeIf(); + mask = ScreenSaverNotifyMask; + if (state == ScreenSaverCycle) + mask = ScreenSaverCycleMask; + pScreen = screenInfo.screens[pScreen->myNum]; + pPriv = GetScreenPrivate(pScreen); + if (!pPriv) + return; + if (pPriv->attr) + kind = ScreenSaverExternal; + else if (ScreenSaverBlanking != DontPreferBlanking) + kind = ScreenSaverBlanked; + else + kind = ScreenSaverInternal; + for (pEv = pPriv->events; pEv; pEv = pEv->next) { + if (pEv->mask & mask) { + xScreenSaverNotifyEvent ev = { + .type = ScreenSaverNotify + ScreenSaverEventBase, + .state = state, + .timestamp = currentTime.milliseconds, + .root = pScreen->root->drawable.id, + .window = pScreen->screensaver.wid, + .kind = kind, + .forced = forced + }; + WriteEventsToClient(pEv->client, 1, (xEvent *) &ev); + } + } +} + +static void +SScreenSaverNotifyEvent(xScreenSaverNotifyEvent * from, + xScreenSaverNotifyEvent * to) +{ + to->type = from->type; + to->state = from->state; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->timestamp, to->timestamp); + cpswapl(from->root, to->root); + cpswapl(from->window, to->window); + to->kind = from->kind; + to->forced = from->forced; +} + +static void +UninstallSaverColormap(ScreenPtr pScreen) +{ + SetupScreen(pScreen); + ColormapPtr pCmap; + int rc; + + if (pPriv && pPriv->installedMap != None) { + rc = dixLookupResourceByType((pointer *) &pCmap, pPriv->installedMap, + RT_COLORMAP, serverClient, + DixUninstallAccess); + if (rc == Success) + (*pCmap->pScreen->UninstallColormap) (pCmap); + pPriv->installedMap = None; + CheckScreenPrivate(pScreen); + } +} + +static Bool +CreateSaverWindow(ScreenPtr pScreen) +{ + SetupScreen(pScreen); + ScreenSaverStuffPtr pSaver; + ScreenSaverAttrPtr pAttr; + WindowPtr pWin; + int result; + unsigned long mask; + Colormap *installedMaps; + int numInstalled; + int i; + Colormap wantMap; + ColormapPtr pCmap; + + pSaver = &pScreen->screensaver; + if (pSaver->pWindow) { + pSaver->pWindow = NullWindow; + FreeResource(pSaver->wid, RT_NONE); + if (pPriv) { + UninstallSaverColormap(pScreen); + pPriv->hasWindow = FALSE; + CheckScreenPrivate(pScreen); + } + } + + if (!pPriv || !(pAttr = pPriv->attr)) + return FALSE; + + pPriv->installedMap = None; + + if (GrabInProgress && GrabInProgress != pAttr->client->index) + return FALSE; + + pWin = CreateWindow(pSaver->wid, pScreen->root, + pAttr->x, pAttr->y, pAttr->width, pAttr->height, + pAttr->borderWidth, pAttr->class, + pAttr->mask, (XID *) pAttr->values, + pAttr->depth, serverClient, pAttr->visual, &result); + if (!pWin) + return FALSE; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, pWin)) + return FALSE; + + mask = 0; + if (pAttr->pBackgroundPixmap) { + pWin->backgroundState = BackgroundPixmap; + pWin->background.pixmap = pAttr->pBackgroundPixmap; + pAttr->pBackgroundPixmap->refcnt++; + mask |= CWBackPixmap; + } + if (pAttr->pBorderPixmap) { + pWin->borderIsPixel = FALSE; + pWin->border.pixmap = pAttr->pBorderPixmap; + pAttr->pBorderPixmap->refcnt++; + mask |= CWBorderPixmap; + } + if (pAttr->pCursor) { + CursorPtr cursor; + if (!pWin->optional) + if (!MakeWindowOptional(pWin)) { + FreeResource(pWin->drawable.id, RT_NONE); + return FALSE; + } + cursor = RefCursor(pAttr->pCursor); + if (pWin->optional->cursor) + FreeCursor(pWin->optional->cursor, (Cursor) 0); + pWin->optional->cursor = cursor; + pWin->cursorIsNone = FALSE; + CheckWindowOptionalNeed(pWin); + mask |= CWCursor; + } + if (mask) + (*pScreen->ChangeWindowAttributes) (pWin, mask); + + if (pAttr->colormap != None) + (void) ChangeWindowAttributes(pWin, CWColormap, &pAttr->colormap, + serverClient); + + MapWindow(pWin, serverClient); + + pPriv->hasWindow = TRUE; + pSaver->pWindow = pWin; + + /* check and install our own colormap if it isn't installed now */ + wantMap = wColormap(pWin); + if (wantMap == None) + return TRUE; + installedMaps = malloc(pScreen->maxInstalledCmaps * sizeof(Colormap)); + numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) + (pScreen, installedMaps); + for (i = 0; i < numInstalled; i++) + if (installedMaps[i] == wantMap) + break; + + free((char *) installedMaps); + + if (i < numInstalled) + return TRUE; + + result = dixLookupResourceByType((pointer *) &pCmap, wantMap, RT_COLORMAP, + serverClient, DixInstallAccess); + if (result != Success) + return TRUE; + + pPriv->installedMap = wantMap; + + (*pCmap->pScreen->InstallColormap) (pCmap); + + return TRUE; +} + +static Bool +DestroySaverWindow(ScreenPtr pScreen) +{ + SetupScreen(pScreen); + ScreenSaverStuffPtr pSaver; + + if (!pPriv || !pPriv->hasWindow) + return FALSE; + + pSaver = &pScreen->screensaver; + if (pSaver->pWindow) { + pSaver->pWindow = NullWindow; + FreeResource(pSaver->wid, RT_NONE); + } + pPriv->hasWindow = FALSE; + CheckScreenPrivate(pScreen); + UninstallSaverColormap(pScreen); + return TRUE; +} + +static Bool +ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force) +{ + int state = 0; + Bool ret = FALSE; + ScreenSaverScreenPrivatePtr pPriv; + + switch (xstate) { + case SCREEN_SAVER_ON: + state = ScreenSaverOn; + ret = CreateSaverWindow(pScreen); + break; + case SCREEN_SAVER_OFF: + state = ScreenSaverOff; + ret = DestroySaverWindow(pScreen); + break; + case SCREEN_SAVER_CYCLE: + state = ScreenSaverCycle; + pPriv = GetScreenPrivate(pScreen); + if (pPriv && pPriv->hasWindow) + ret = TRUE; + + } +#ifdef PANORAMIX + if (noPanoramiXExtension || !pScreen->myNum) +#endif + SendScreenSaverNotify(pScreen, state, force); + return ret; +} + +static int +ProcScreenSaverQueryVersion(ClientPtr client) +{ + xScreenSaverQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_SAVER_MAJOR_VERSION, + .minorVersion = SERVER_SAVER_MINOR_VERSION + }; + + REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), &rep); + return Success; +} + +static int +ProcScreenSaverQueryInfo(ClientPtr client) +{ + REQUEST(xScreenSaverQueryInfoReq); + xScreenSaverQueryInfoReply rep; + int rc; + ScreenSaverStuffPtr pSaver; + DrawablePtr pDraw; + CARD32 lastInput; + ScreenSaverScreenPrivatePtr pPriv; + + REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixGetAttrAccess); + if (rc != Success) + return rc; + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, pDraw->pScreen, + DixGetAttrAccess); + if (rc != Success) + return rc; + + pSaver = &pDraw->pScreen->screensaver; + pPriv = GetScreenPrivate(pDraw->pScreen); + + UpdateCurrentTime(); + lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds; + + rep = (xScreenSaverQueryInfoReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .window = pSaver->wid + }; + if (screenIsSaved != SCREEN_SAVER_OFF) { + rep.state = ScreenSaverOn; + if (ScreenSaverTime) + rep.tilOrSince = lastInput - ScreenSaverTime; + else + rep.tilOrSince = 0; + } + else { + if (ScreenSaverTime) { + rep.state = ScreenSaverOff; + if (ScreenSaverTime < lastInput) + rep.tilOrSince = 0; + else + rep.tilOrSince = ScreenSaverTime - lastInput; + } + else { + rep.state = ScreenSaverDisabled; + rep.tilOrSince = 0; + } + } + rep.idle = lastInput; + rep.eventMask = getEventMask(pDraw->pScreen, client); + if (pPriv && pPriv->attr) + rep.kind = ScreenSaverExternal; + else if (ScreenSaverBlanking != DontPreferBlanking) + rep.kind = ScreenSaverBlanked; + else + rep.kind = ScreenSaverInternal; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.window); + swapl(&rep.tilOrSince); + swapl(&rep.idle); + swapl(&rep.eventMask); + } + WriteToClient(client, sizeof(xScreenSaverQueryInfoReply), &rep); + return Success; +} + +static int +ProcScreenSaverSelectInput(ClientPtr client) +{ + REQUEST(xScreenSaverSelectInputReq); + DrawablePtr pDraw; + int rc; + + REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixGetAttrAccess); + if (rc != Success) + return rc; + + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, pDraw->pScreen, + DixSetAttrAccess); + if (rc != Success) + return rc; + + if (!setEventMask(pDraw->pScreen, client, stuff->eventMask)) + return BadAlloc; + return Success; +} + +static int +ScreenSaverSetAttributes(ClientPtr client) +{ + REQUEST(xScreenSaverSetAttributesReq); + DrawablePtr pDraw; + WindowPtr pParent; + ScreenPtr pScreen; + ScreenSaverScreenPrivatePtr pPriv = 0; + ScreenSaverAttrPtr pAttr = 0; + int ret, len, class, bw, depth; + unsigned long visual; + int idepth, ivisual; + Bool fOK; + DepthPtr pDepth; + WindowOptPtr ancwopt; + unsigned int *pVlist; + unsigned long *values = 0; + unsigned long tmask, imask; + unsigned long val; + Pixmap pixID; + PixmapPtr pPixmap; + Cursor cursorID; + CursorPtr pCursor; + Colormap cmap; + ColormapPtr pCmap; + + REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); + ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixGetAttrAccess); + if (ret != Success) + return ret; + pScreen = pDraw->pScreen; + pParent = pScreen->root; + + ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess); + if (ret != Success) + return ret; + + len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq)); + if (Ones(stuff->mask) != len) + return BadLength; + if (!stuff->width || !stuff->height) { + client->errorValue = 0; + return BadValue; + } + switch (class = stuff->c_class) { + case CopyFromParent: + case InputOnly: + case InputOutput: + break; + default: + client->errorValue = class; + return BadValue; + } + bw = stuff->borderWidth; + depth = stuff->depth; + visual = stuff->visualID; + + /* copied directly from CreateWindow */ + + if (class == CopyFromParent) + class = pParent->drawable.class; + + if ((class != InputOutput) && (class != InputOnly)) { + client->errorValue = class; + return BadValue; + } + + if ((class != InputOnly) && (pParent->drawable.class == InputOnly)) + return BadMatch; + + if ((class == InputOnly) && ((bw != 0) || (depth != 0))) + return BadMatch; + + if ((class == InputOutput) && (depth == 0)) + depth = pParent->drawable.depth; + ancwopt = pParent->optional; + if (!ancwopt) + ancwopt = FindWindowWithOptional(pParent)->optional; + if (visual == CopyFromParent) + visual = ancwopt->visual; + + /* Find out if the depth and visual are acceptable for this Screen */ + if ((visual != ancwopt->visual) || (depth != pParent->drawable.depth)) { + fOK = FALSE; + for (idepth = 0; idepth < pScreen->numDepths; idepth++) { + pDepth = (DepthPtr) &pScreen->allowedDepths[idepth]; + if ((depth == pDepth->depth) || (depth == 0)) { + for (ivisual = 0; ivisual < pDepth->numVids; ivisual++) { + if (visual == pDepth->vids[ivisual]) { + fOK = TRUE; + break; + } + } + } + } + if (fOK == FALSE) + return BadMatch; + } + + if (((stuff->mask & (CWBorderPixmap | CWBorderPixel)) == 0) && + (class != InputOnly) && (depth != pParent->drawable.depth)) { + return BadMatch; + } + + if (((stuff->mask & CWColormap) == 0) && + (class != InputOnly) && + ((visual != ancwopt->visual) || (ancwopt->colormap == None))) { + return BadMatch; + } + + /* end of errors from CreateWindow */ + + pPriv = GetScreenPrivate(pScreen); + if (pPriv && pPriv->attr) { + if (pPriv->attr->client != client) + return BadAccess; + } + if (!pPriv) { + pPriv = MakeScreenPrivate(pScreen); + if (!pPriv) + return FALSE; + } + pAttr = New(ScreenSaverAttrRec); + if (!pAttr) { + ret = BadAlloc; + goto bail; + } + /* over allocate for override redirect */ + pAttr->values = values = malloc((len + 1) * sizeof(unsigned long)); + if (!values) { + ret = BadAlloc; + goto bail; + } + pAttr->screen = pScreen; + pAttr->client = client; + pAttr->x = stuff->x; + pAttr->y = stuff->y; + pAttr->width = stuff->width; + pAttr->height = stuff->height; + pAttr->borderWidth = stuff->borderWidth; + pAttr->class = stuff->c_class; + pAttr->depth = depth; + pAttr->visual = visual; + pAttr->colormap = None; + pAttr->pCursor = NullCursor; + pAttr->pBackgroundPixmap = NullPixmap; + pAttr->pBorderPixmap = NullPixmap; + /* + * go through the mask, checking the values, + * looking up pixmaps and cursors and hold a reference + * to them. + */ + pAttr->mask = tmask = stuff->mask | CWOverrideRedirect; + pVlist = (unsigned int *) (stuff + 1); + while (tmask) { + imask = lowbit(tmask); + tmask &= ~imask; + switch (imask) { + case CWBackPixmap: + pixID = (Pixmap) * pVlist; + if (pixID == None) { + *values++ = None; + } + else if (pixID == ParentRelative) { + if (depth != pParent->drawable.depth) { + ret = BadMatch; + goto PatchUp; + } + *values++ = ParentRelative; + } + else { + ret = + dixLookupResourceByType((pointer *) &pPixmap, pixID, + RT_PIXMAP, client, DixReadAccess); + if (ret == Success) { + if ((pPixmap->drawable.depth != depth) || + (pPixmap->drawable.pScreen != pScreen)) { + ret = BadMatch; + goto PatchUp; + } + pAttr->pBackgroundPixmap = pPixmap; + pPixmap->refcnt++; + pAttr->mask &= ~CWBackPixmap; + } + else { + client->errorValue = pixID; + goto PatchUp; + } + } + break; + case CWBackPixel: + *values++ = (CARD32) *pVlist; + break; + case CWBorderPixmap: + pixID = (Pixmap) * pVlist; + if (pixID == CopyFromParent) { + if (depth != pParent->drawable.depth) { + ret = BadMatch; + goto PatchUp; + } + *values++ = CopyFromParent; + } + else { + ret = + dixLookupResourceByType((pointer *) &pPixmap, pixID, + RT_PIXMAP, client, DixReadAccess); + if (ret == Success) { + if ((pPixmap->drawable.depth != depth) || + (pPixmap->drawable.pScreen != pScreen)) { + ret = BadMatch; + goto PatchUp; + } + pAttr->pBorderPixmap = pPixmap; + pPixmap->refcnt++; + pAttr->mask &= ~CWBorderPixmap; + } + else { + client->errorValue = pixID; + goto PatchUp; + } + } + break; + case CWBorderPixel: + *values++ = (CARD32) *pVlist; + break; + case CWBitGravity: + val = (CARD8) *pVlist; + if (val > StaticGravity) { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWWinGravity: + val = (CARD8) *pVlist; + if (val > StaticGravity) { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWBackingStore: + val = (CARD8) *pVlist; + if ((val != NotUseful) && (val != WhenMapped) && (val != Always)) { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWBackingPlanes: + *values++ = (CARD32) *pVlist; + break; + case CWBackingPixel: + *values++ = (CARD32) *pVlist; + break; + case CWSaveUnder: + val = (BOOL) * pVlist; + if ((val != xTrue) && (val != xFalse)) { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + *values++ = val; + break; + case CWEventMask: + *values++ = (CARD32) *pVlist; + break; + case CWDontPropagate: + *values++ = (CARD32) *pVlist; + break; + case CWOverrideRedirect: + if (!(stuff->mask & CWOverrideRedirect)) + pVlist--; + else { + val = (BOOL) * pVlist; + if ((val != xTrue) && (val != xFalse)) { + ret = BadValue; + client->errorValue = val; + goto PatchUp; + } + } + *values++ = xTrue; + break; + case CWColormap: + cmap = (Colormap) * pVlist; + ret = dixLookupResourceByType((pointer *) &pCmap, cmap, RT_COLORMAP, + client, DixUseAccess); + if (ret != Success) { + client->errorValue = cmap; + goto PatchUp; + } + if (pCmap->pVisual->vid != visual || pCmap->pScreen != pScreen) { + ret = BadMatch; + goto PatchUp; + } + pAttr->colormap = cmap; + pAttr->mask &= ~CWColormap; + break; + case CWCursor: + cursorID = (Cursor) * pVlist; + if (cursorID == None) { + *values++ = None; + } + else { + ret = dixLookupResourceByType((pointer *) &pCursor, cursorID, + RT_CURSOR, client, DixUseAccess); + if (ret != Success) { + client->errorValue = cursorID; + goto PatchUp; + } + pAttr->pCursor = RefCursor(pCursor); + pAttr->mask &= ~CWCursor; + } + break; + default: + ret = BadValue; + client->errorValue = stuff->mask; + goto PatchUp; + } + pVlist++; + } + if (pPriv->attr) + FreeScreenAttr(pPriv->attr); + pPriv->attr = pAttr; + pAttr->resource = FakeClientID(client->index); + if (!AddResource(pAttr->resource, AttrType, (pointer) pAttr)) + return BadAlloc; + return Success; + PatchUp: + FreeAttrs(pAttr); + bail: + CheckScreenPrivate(pScreen); + if (pAttr) + free(pAttr->values); + free(pAttr); + return ret; +} + +static int +ScreenSaverUnsetAttributes(ClientPtr client) +{ + REQUEST(xScreenSaverSetAttributesReq); + DrawablePtr pDraw; + ScreenSaverScreenPrivatePtr pPriv; + int rc; + + REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixGetAttrAccess); + if (rc != Success) + return rc; + pPriv = GetScreenPrivate(pDraw->pScreen); + if (pPriv && pPriv->attr && pPriv->attr->client == client) { + FreeResource(pPriv->attr->resource, AttrType); + FreeScreenAttr(pPriv->attr); + pPriv->attr = NULL; + CheckScreenPrivate(pDraw->pScreen); + } + return Success; +} + +static int +ProcScreenSaverSetAttributes(ClientPtr client) +{ +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + REQUEST(xScreenSaverSetAttributesReq); + PanoramiXRes *draw; + PanoramiXRes *backPix = NULL; + PanoramiXRes *bordPix = NULL; + PanoramiXRes *cmap = NULL; + int i, status, len; + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + XID orig_visual, tmp; + + REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); + + status = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (status != Success) + return (status == BadValue) ? BadDrawable : status; + + len = + stuff->length - + bytes_to_int32(sizeof(xScreenSaverSetAttributesReq)); + if (Ones(stuff->mask) != len) + return BadLength; + + if ((Mask) stuff->mask & CWBackPixmap) { + pback_offset = Ones((Mask) stuff->mask & (CWBackPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pback_offset); + if ((tmp != None) && (tmp != ParentRelative)) { + status = dixLookupResourceByType((pointer *) &backPix, tmp, + XRT_PIXMAP, client, + DixReadAccess); + if (status != Success) + return status; + } + } + + if ((Mask) stuff->mask & CWBorderPixmap) { + pbord_offset = Ones((Mask) stuff->mask & (CWBorderPixmap - 1)); + tmp = *((CARD32 *) &stuff[1] + pbord_offset); + if (tmp != CopyFromParent) { + status = dixLookupResourceByType((pointer *) &bordPix, tmp, + XRT_PIXMAP, client, + DixReadAccess); + if (status != Success) + return status; + } + } + + if ((Mask) stuff->mask & CWColormap) { + cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1)); + tmp = *((CARD32 *) &stuff[1] + cmap_offset); + if ((tmp != CopyFromParent) && (tmp != None)) { + status = dixLookupResourceByType((pointer *) &cmap, tmp, + XRT_COLORMAP, client, + DixReadAccess); + if (status != Success) + return status; + } + } + + orig_visual = stuff->visualID; + + FOR_NSCREENS_BACKWARD(i) { + stuff->drawable = draw->info[i].id; + if (backPix) + *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[i].id; + if (bordPix) + *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[i].id; + if (cmap) + *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[i].id; + + if (orig_visual != CopyFromParent) + stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual); + + status = ScreenSaverSetAttributes(client); + } + + return status; + } +#endif + + return ScreenSaverSetAttributes(client); +} + +static int +ProcScreenSaverUnsetAttributes(ClientPtr client) +{ +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + REQUEST(xScreenSaverUnsetAttributesReq); + PanoramiXRes *draw; + int rc, i; + + rc = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; + + for (i = PanoramiXNumScreens - 1; i > 0; i--) { + stuff->drawable = draw->info[i].id; + ScreenSaverUnsetAttributes(client); + } + + stuff->drawable = draw->info[0].id; + } +#endif + + return ScreenSaverUnsetAttributes(client); +} + +static int +ProcScreenSaverSuspend(ClientPtr client) +{ + ScreenSaverSuspensionPtr *prev, this; + + REQUEST(xScreenSaverSuspendReq); + REQUEST_SIZE_MATCH(xScreenSaverSuspendReq); + + /* Check if this client is suspending the screensaver */ + for (prev = &suspendingClients; (this = *prev); prev = &this->next) + if (this->pClient == client) + break; + + if (this) { + if (stuff->suspend == TRUE) + this->count++; + else if (--this->count == 0) + FreeResource(this->clientResource, RT_NONE); + + return Success; + } + + /* If we get to this point, this client isn't suspending the screensaver */ + if (stuff->suspend == FALSE) + return Success; + + /* + * Allocate a suspension record for the client, and stop the screensaver + * if it isn't already suspended by another client. We attach a resource ID + * to the record, so the screensaver will be reenabled and the record freed + * if the client disconnects without reenabling it first. + */ + this = malloc(sizeof(ScreenSaverSuspensionRec)); + + if (!this) + return BadAlloc; + + this->next = NULL; + this->pClient = client; + this->count = 1; + this->clientResource = FakeClientID(client->index); + + if (!AddResource(this->clientResource, SuspendType, (pointer) this)) { + free(this); + return BadAlloc; + } + + *prev = this; + if (!screenSaverSuspended) { + screenSaverSuspended = TRUE; + FreeScreenSaverTimer(); + } + + return Success; +} + +static int (*NormalVector[]) (ClientPtr /* client */ ) = { +ProcScreenSaverQueryVersion, + ProcScreenSaverQueryInfo, + ProcScreenSaverSelectInput, + ProcScreenSaverSetAttributes, + ProcScreenSaverUnsetAttributes, ProcScreenSaverSuspend,}; + +#define NUM_REQUESTS ((sizeof NormalVector) / (sizeof NormalVector[0])) + +static int +ProcScreenSaverDispatch(ClientPtr client) +{ + REQUEST(xReq); + + if (stuff->data < NUM_REQUESTS) + return (*NormalVector[stuff->data]) (client); + return BadRequest; +} + +static int +SProcScreenSaverQueryVersion(ClientPtr client) +{ + REQUEST(xScreenSaverQueryVersionReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq); + return ProcScreenSaverQueryVersion(client); +} + +static int +SProcScreenSaverQueryInfo(ClientPtr client) +{ + REQUEST(xScreenSaverQueryInfoReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq); + swapl(&stuff->drawable); + return ProcScreenSaverQueryInfo(client); +} + +static int +SProcScreenSaverSelectInput(ClientPtr client) +{ + REQUEST(xScreenSaverSelectInputReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq); + swapl(&stuff->drawable); + swapl(&stuff->eventMask); + return ProcScreenSaverSelectInput(client); +} + +static int +SProcScreenSaverSetAttributes(ClientPtr client) +{ + REQUEST(xScreenSaverSetAttributesReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); + swapl(&stuff->drawable); + swaps(&stuff->x); + swaps(&stuff->y); + swaps(&stuff->width); + swaps(&stuff->height); + swaps(&stuff->borderWidth); + swapl(&stuff->visualID); + swapl(&stuff->mask); + SwapRestL(stuff); + return ProcScreenSaverSetAttributes(client); +} + +static int +SProcScreenSaverUnsetAttributes(ClientPtr client) +{ + REQUEST(xScreenSaverUnsetAttributesReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); + swapl(&stuff->drawable); + return ProcScreenSaverUnsetAttributes(client); +} + +static int +SProcScreenSaverSuspend(ClientPtr client) +{ + REQUEST(xScreenSaverSuspendReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xScreenSaverSuspendReq); + return ProcScreenSaverSuspend(client); +} + +static int (*SwappedVector[]) (ClientPtr /* client */ ) = { +SProcScreenSaverQueryVersion, + SProcScreenSaverQueryInfo, + SProcScreenSaverSelectInput, + SProcScreenSaverSetAttributes, + SProcScreenSaverUnsetAttributes, SProcScreenSaverSuspend,}; + +static int +SProcScreenSaverDispatch(ClientPtr client) +{ + REQUEST(xReq); + + if (stuff->data < NUM_REQUESTS) + return (*SwappedVector[stuff->data]) (client); + return BadRequest; +} + +void +ScreenSaverExtensionInit(void) +{ + ExtensionEntry *extEntry; + int i; + ScreenPtr pScreen; + + if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return; + + AttrType = CreateNewResourceType(ScreenSaverFreeAttr, "SaverAttr"); + SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents, "SaverEvent"); + SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend, "SaverSuspend"); + + for (i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + SetScreenPrivate(pScreen, NULL); + } + if (AttrType && SaverEventType && SuspendType && + (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0, + ProcScreenSaverDispatch, + SProcScreenSaverDispatch, NULL, + StandardMinorOpcode))) { + ScreenSaverEventBase = extEntry->eventBase; + EventSwapVector[ScreenSaverEventBase] = + (EventSwapPtr) SScreenSaverNotifyEvent; + } +} diff --git a/Xext/security.c b/Xext/security.c new file mode 100644 index 0000000..7bf6cc4 --- /dev/null +++ b/Xext/security.c @@ -0,0 +1,1091 @@ +/* + +Copyright 1996, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "scrnintstr.h" +#include "inputstr.h" +#include "windowstr.h" +#include "propertyst.h" +#include "colormapst.h" +#include "privates.h" +#include "registry.h" +#include "xacestr.h" +#include "securitysrv.h" +#include <X11/extensions/securproto.h> +#include "extinit.h" +#include "protocol-versions.h" + +/* Extension stuff */ +static int SecurityErrorBase; /* first Security error number */ +static int SecurityEventBase; /* first Security event number */ + +RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */ +static RESTYPE RTEventClient; + +static CallbackListPtr SecurityValidateGroupCallback = NULL; + +/* Private state record */ +static DevPrivateKeyRec stateKeyRec; + +#define stateKey (&stateKeyRec) + +/* This is what we store as client security state */ +typedef struct { + unsigned int haveState :1; + unsigned int live :1; + unsigned int trustLevel :2; + XID authId; +} SecurityStateRec; + +/* Extensions that untrusted clients shouldn't have access to */ +static const char *SecurityTrustedExtensions[] = { + "XC-MISC", + "BIG-REQUESTS", + "XpExtension", + NULL +}; + +/* + * Access modes that untrusted clients are allowed on trusted objects. + */ +static const Mask SecurityResourceMask = + DixGetAttrAccess | DixReceiveAccess | DixListPropAccess | + DixGetPropAccess | DixListAccess; +static const Mask SecurityWindowExtraMask = DixRemoveAccess; +static const Mask SecurityRootWindowExtraMask = + DixReceiveAccess | DixSendAccess | DixAddAccess | DixRemoveAccess; +static const Mask SecurityDeviceMask = + DixGetAttrAccess | DixReceiveAccess | DixGetFocusAccess | + DixGrabAccess | DixSetAttrAccess | DixUseAccess; +static const Mask SecurityServerMask = DixGetAttrAccess | DixGrabAccess; +static const Mask SecurityClientMask = DixGetAttrAccess; + +/* SecurityAudit + * + * Arguments: + * format is the formatting string to be used to interpret the + * remaining arguments. + * + * Returns: nothing. + * + * Side Effects: + * Writes the message to the log file if security logging is on. + */ + +static void +_X_ATTRIBUTE_PRINTF(1, 2) +SecurityAudit(const char *format, ...) +{ + va_list args; + + if (auditTrailLevel < SECURITY_AUDIT_LEVEL) + return; + va_start(args, format); + VAuditF(format, args); + va_end(args); +} /* SecurityAudit */ + +/* + * Performs a Security permission check. + */ +static int +SecurityDoCheck(SecurityStateRec * subj, SecurityStateRec * obj, + Mask requested, Mask allowed) +{ + if (!subj->haveState || !obj->haveState) + return Success; + if (subj->trustLevel == XSecurityClientTrusted) + return Success; + if (obj->trustLevel != XSecurityClientTrusted) + return Success; + if ((requested | allowed) == allowed) + return Success; + + return BadAccess; +} + +/* + * Labels initial server objects. + */ +static void +SecurityLabelInitial(void) +{ + SecurityStateRec *state; + + /* Do the serverClient */ + state = dixLookupPrivate(&serverClient->devPrivates, stateKey); + state->trustLevel = XSecurityClientTrusted; + state->haveState = TRUE; + state->live = FALSE; +} + +/* + * Looks up a request name + */ +static _X_INLINE const char * +SecurityLookupRequestName(ClientPtr client) +{ + return LookupRequestName(client->majorOp, client->minorOp); +} + +/* SecurityDeleteAuthorization + * + * Arguments: + * value is the authorization to delete. + * id is its resource ID. + * + * Returns: Success. + * + * Side Effects: + * Frees everything associated with the authorization. + */ + +static int +SecurityDeleteAuthorization(pointer value, XID id) +{ + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) value; + unsigned short name_len, data_len; + const char *name; + char *data; + int status; + int i; + OtherClientsPtr pEventClient; + + /* Remove the auth using the os layer auth manager */ + + status = AuthorizationFromID(pAuth->id, &name_len, &name, &data_len, &data); + assert(status); + status = RemoveAuthorization(name_len, name, data_len, data); + assert(status); + (void) status; + + /* free the auth timer if there is one */ + + if (pAuth->timer) + TimerFree(pAuth->timer); + + /* send revoke events */ + + while ((pEventClient = pAuth->eventClients)) { + /* send revocation event event */ + xSecurityAuthorizationRevokedEvent are = { + .type = SecurityEventBase + XSecurityAuthorizationRevoked, + .authId = pAuth->id + }; + WriteEventsToClient(rClient(pEventClient), 1, (xEvent *) &are); + FreeResource(pEventClient->resource, RT_NONE); + } + + /* kill all clients using this auth */ + + for (i = 1; i < currentMaxClients; i++) + if (clients[i]) { + SecurityStateRec *state; + + state = dixLookupPrivate(&clients[i]->devPrivates, stateKey); + if (state->haveState && state->authId == pAuth->id) + CloseDownClient(clients[i]); + } + + SecurityAudit("revoked authorization ID %d\n", pAuth->id); + free(pAuth); + return Success; + +} /* SecurityDeleteAuthorization */ + +/* resource delete function for RTEventClient */ +static int +SecurityDeleteAuthorizationEventClient(pointer value, XID id) +{ + OtherClientsPtr pEventClient, prev = NULL; + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) value; + + for (pEventClient = pAuth->eventClients; + pEventClient; pEventClient = pEventClient->next) { + if (pEventClient->resource == id) { + if (prev) + prev->next = pEventClient->next; + else + pAuth->eventClients = pEventClient->next; + free(pEventClient); + return Success; + } + prev = pEventClient; + } + /*NOTREACHED*/ return -1; /* make compiler happy */ +} /* SecurityDeleteAuthorizationEventClient */ + +/* SecurityComputeAuthorizationTimeout + * + * Arguments: + * pAuth is the authorization for which we are computing the timeout + * seconds is the number of seconds we want to wait + * + * Returns: + * the number of milliseconds that the auth timer should be set to + * + * Side Effects: + * Sets pAuth->secondsRemaining to any "overflow" amount of time + * that didn't fit in 32 bits worth of milliseconds + */ + +static CARD32 +SecurityComputeAuthorizationTimeout(SecurityAuthorizationPtr pAuth, + unsigned int seconds) +{ + /* maxSecs is the number of full seconds that can be expressed in + * 32 bits worth of milliseconds + */ + CARD32 maxSecs = (CARD32) (~0) / (CARD32) MILLI_PER_SECOND; + + if (seconds > maxSecs) { /* only come here if we want to wait more than 49 days */ + pAuth->secondsRemaining = seconds - maxSecs; + return maxSecs * MILLI_PER_SECOND; + } + else { /* by far the common case */ + pAuth->secondsRemaining = 0; + return seconds * MILLI_PER_SECOND; + } +} /* SecurityStartAuthorizationTimer */ + +/* SecurityAuthorizationExpired + * + * This function is passed as an argument to TimerSet and gets called from + * the timer manager in the os layer when its time is up. + * + * Arguments: + * timer is the timer for this authorization. + * time is the current time. + * pval is the authorization whose time is up. + * + * Returns: + * A new time delay in milliseconds if the timer should wait some + * more, else zero. + * + * Side Effects: + * Frees the authorization resource if the timeout period is really + * over, otherwise recomputes pAuth->secondsRemaining. + */ + +static CARD32 +SecurityAuthorizationExpired(OsTimerPtr timer, CARD32 time, pointer pval) +{ + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) pval; + + assert(pAuth->timer == timer); + + if (pAuth->secondsRemaining) { + return SecurityComputeAuthorizationTimeout(pAuth, + pAuth->secondsRemaining); + } + else { + FreeResource(pAuth->id, RT_NONE); + return 0; + } +} /* SecurityAuthorizationExpired */ + +/* SecurityStartAuthorizationTimer + * + * Arguments: + * pAuth is the authorization whose timer should be started. + * + * Returns: nothing. + * + * Side Effects: + * A timer is started, set to expire after the timeout period for + * this authorization. When it expires, the function + * SecurityAuthorizationExpired will be called. + */ + +static void +SecurityStartAuthorizationTimer(SecurityAuthorizationPtr pAuth) +{ + pAuth->timer = TimerSet(pAuth->timer, 0, + SecurityComputeAuthorizationTimeout(pAuth, + pAuth->timeout), + SecurityAuthorizationExpired, pAuth); +} /* SecurityStartAuthorizationTimer */ + +/* Proc functions all take a client argument, execute the request in + * client->requestBuffer, and return a protocol error status. + */ + +static int +ProcSecurityQueryVersion(ClientPtr client) +{ + /* REQUEST(xSecurityQueryVersionReq); */ + xSecurityQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_SECURITY_MAJOR_VERSION, + .minorVersion = SERVER_SECURITY_MINOR_VERSION + }; + + REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + } + WriteToClient(client, SIZEOF(xSecurityQueryVersionReply), &rep); + return Success; +} /* ProcSecurityQueryVersion */ + +static int +SecurityEventSelectForAuthorization(SecurityAuthorizationPtr pAuth, + ClientPtr client, Mask mask) +{ + OtherClients *pEventClient; + + for (pEventClient = pAuth->eventClients; + pEventClient; pEventClient = pEventClient->next) { + if (SameClient(pEventClient, client)) { + if (mask == 0) + FreeResource(pEventClient->resource, RT_NONE); + else + pEventClient->mask = mask; + return Success; + } + } + + pEventClient = malloc(sizeof(OtherClients)); + if (!pEventClient) + return BadAlloc; + pEventClient->mask = mask; + pEventClient->resource = FakeClientID(client->index); + pEventClient->next = pAuth->eventClients; + if (!AddResource(pEventClient->resource, RTEventClient, (pointer) pAuth)) { + free(pEventClient); + return BadAlloc; + } + pAuth->eventClients = pEventClient; + + return Success; +} /* SecurityEventSelectForAuthorization */ + +static int +ProcSecurityGenerateAuthorization(ClientPtr client) +{ + REQUEST(xSecurityGenerateAuthorizationReq); + int len; /* request length in CARD32s */ + Bool removeAuth = FALSE; /* if bailout, call RemoveAuthorization? */ + SecurityAuthorizationPtr pAuth = NULL; /* auth we are creating */ + int err; /* error to return from this function */ + XID authId; /* authorization ID assigned by os layer */ + xSecurityGenerateAuthorizationReply rep; /* reply struct */ + unsigned int trustLevel; /* trust level of new auth */ + XID group; /* group of new auth */ + CARD32 timeout; /* timeout of new auth */ + CARD32 *values; /* list of supplied attributes */ + char *protoname; /* auth proto name sent in request */ + char *protodata; /* auth proto data sent in request */ + unsigned int authdata_len; /* # bytes of generated auth data */ + char *pAuthdata; /* generated auth data */ + Mask eventMask; /* what events on this auth does client want */ + + /* check request length */ + + REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); + len = bytes_to_int32(SIZEOF(xSecurityGenerateAuthorizationReq)); + len += bytes_to_int32(stuff->nbytesAuthProto); + len += bytes_to_int32(stuff->nbytesAuthData); + values = ((CARD32 *) stuff) + len; + len += Ones(stuff->valueMask); + if (client->req_len != len) + return BadLength; + + /* check valuemask */ + if (stuff->valueMask & ~XSecurityAllAuthorizationAttributes) { + client->errorValue = stuff->valueMask; + return BadValue; + } + + /* check timeout */ + timeout = 60; + if (stuff->valueMask & XSecurityTimeout) { + timeout = *values++; + } + + /* check trustLevel */ + trustLevel = XSecurityClientUntrusted; + if (stuff->valueMask & XSecurityTrustLevel) { + trustLevel = *values++; + if (trustLevel != XSecurityClientTrusted && + trustLevel != XSecurityClientUntrusted) { + client->errorValue = trustLevel; + return BadValue; + } + } + + /* check group */ + group = None; + if (stuff->valueMask & XSecurityGroup) { + group = *values++; + if (SecurityValidateGroupCallback) { + SecurityValidateGroupInfoRec vgi; + + vgi.group = group; + vgi.valid = FALSE; + CallCallbacks(&SecurityValidateGroupCallback, (pointer) &vgi); + + /* if nobody said they recognized it, it's an error */ + + if (!vgi.valid) { + client->errorValue = group; + return BadValue; + } + } + } + + /* check event mask */ + eventMask = 0; + if (stuff->valueMask & XSecurityEventMask) { + eventMask = *values++; + if (eventMask & ~XSecurityAllEventMasks) { + client->errorValue = eventMask; + return BadValue; + } + } + + protoname = (char *) &stuff[1]; + protodata = protoname + bytes_to_int32(stuff->nbytesAuthProto); + + /* call os layer to generate the authorization */ + + authId = GenerateAuthorization(stuff->nbytesAuthProto, protoname, + stuff->nbytesAuthData, protodata, + &authdata_len, &pAuthdata); + if ((XID) ~0L == authId) { + err = SecurityErrorBase + XSecurityBadAuthorizationProtocol; + goto bailout; + } + + /* now that we've added the auth, remember to remove it if we have to + * abort the request for some reason (like allocation failure) + */ + removeAuth = TRUE; + + /* associate additional information with this auth ID */ + + pAuth = malloc(sizeof(SecurityAuthorizationRec)); + if (!pAuth) { + err = BadAlloc; + goto bailout; + } + + /* fill in the auth fields */ + + pAuth->id = authId; + pAuth->timeout = timeout; + pAuth->group = group; + pAuth->trustLevel = trustLevel; + pAuth->refcnt = 0; /* the auth was just created; nobody's using it yet */ + pAuth->secondsRemaining = 0; + pAuth->timer = NULL; + pAuth->eventClients = NULL; + + /* handle event selection */ + if (eventMask) { + err = SecurityEventSelectForAuthorization(pAuth, client, eventMask); + if (err != Success) + goto bailout; + } + + if (!AddResource(authId, SecurityAuthorizationResType, pAuth)) { + err = BadAlloc; + goto bailout; + } + + /* start the timer ticking */ + + if (pAuth->timeout != 0) + SecurityStartAuthorizationTimer(pAuth); + + /* tell client the auth id and data */ + + rep = (xSecurityGenerateAuthorizationReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(authdata_len), + .authId = authId, + .dataLength = authdata_len + }; + + if (client->swapped) { + swapl(&rep.length); + swaps(&rep.sequenceNumber); + swapl(&rep.authId); + swaps(&rep.dataLength); + } + + WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply), &rep); + WriteToClient(client, authdata_len, pAuthdata); + + SecurityAudit + ("client %d generated authorization %d trust %d timeout %d group %d events %d\n", + client->index, pAuth->id, pAuth->trustLevel, pAuth->timeout, + pAuth->group, eventMask); + + /* the request succeeded; don't call RemoveAuthorization or free pAuth */ + return Success; + + bailout: + if (removeAuth) + RemoveAuthorization(stuff->nbytesAuthProto, protoname, + authdata_len, pAuthdata); + free(pAuth); + return err; + +} /* ProcSecurityGenerateAuthorization */ + +static int +ProcSecurityRevokeAuthorization(ClientPtr client) +{ + REQUEST(xSecurityRevokeAuthorizationReq); + SecurityAuthorizationPtr pAuth; + int rc; + + REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); + + rc = dixLookupResourceByType((pointer *) &pAuth, stuff->authId, + SecurityAuthorizationResType, client, + DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->authId, RT_NONE); + return Success; +} /* ProcSecurityRevokeAuthorization */ + +static int +ProcSecurityDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_SecurityQueryVersion: + return ProcSecurityQueryVersion(client); + case X_SecurityGenerateAuthorization: + return ProcSecurityGenerateAuthorization(client); + case X_SecurityRevokeAuthorization: + return ProcSecurityRevokeAuthorization(client); + default: + return BadRequest; + } +} /* ProcSecurityDispatch */ + +static int +SProcSecurityQueryVersion(ClientPtr client) +{ + REQUEST(xSecurityQueryVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); + return ProcSecurityQueryVersion(client); +} /* SProcSecurityQueryVersion */ + +static int +SProcSecurityGenerateAuthorization(ClientPtr client) +{ + REQUEST(xSecurityGenerateAuthorizationReq); + CARD32 *values; + unsigned long nvalues; + int values_offset; + + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); + swaps(&stuff->nbytesAuthProto); + swaps(&stuff->nbytesAuthData); + swapl(&stuff->valueMask); + values_offset = bytes_to_int32(stuff->nbytesAuthProto) + + bytes_to_int32(stuff->nbytesAuthData); + if (values_offset > + stuff->length - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq)) + return BadLength; + values = (CARD32 *) (&stuff[1]) + values_offset; + nvalues = (((CARD32 *) stuff) + stuff->length) - values; + SwapLongs(values, nvalues); + return ProcSecurityGenerateAuthorization(client); +} /* SProcSecurityGenerateAuthorization */ + +static int +SProcSecurityRevokeAuthorization(ClientPtr client) +{ + REQUEST(xSecurityRevokeAuthorizationReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); + swapl(&stuff->authId); + return ProcSecurityRevokeAuthorization(client); +} /* SProcSecurityRevokeAuthorization */ + +static int +SProcSecurityDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_SecurityQueryVersion: + return SProcSecurityQueryVersion(client); + case X_SecurityGenerateAuthorization: + return SProcSecurityGenerateAuthorization(client); + case X_SecurityRevokeAuthorization: + return SProcSecurityRevokeAuthorization(client); + default: + return BadRequest; + } +} /* SProcSecurityDispatch */ + +static void +SwapSecurityAuthorizationRevokedEvent(xSecurityAuthorizationRevokedEvent * from, + xSecurityAuthorizationRevokedEvent * to) +{ + to->type = from->type; + to->detail = from->detail; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->authId, to->authId); +} + +/* SecurityCheckDeviceAccess + * + * Arguments: + * client is the client attempting to access a device. + * dev is the device being accessed. + * fromRequest is TRUE if the device access is a direct result of + * the client executing some request and FALSE if it is a + * result of the server trying to send an event (e.g. KeymapNotify) + * to the client. + * Returns: + * TRUE if the device access should be allowed, else FALSE. + * + * Side Effects: + * An audit message is generated if access is denied. + */ + +static void +SecurityDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceDeviceAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + Mask requested = rec->access_mode; + Mask allowed = SecurityDeviceMask; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + + if (rec->dev != inputInfo.keyboard) + /* this extension only supports the core keyboard */ + allowed = requested; + + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security denied client %d keyboard access on request " + "%s\n", rec->client->index, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + } +} + +/* SecurityResource + * + * This function gets plugged into client->CheckAccess and is called from + * SecurityLookupIDByType/Class to determine if the client can access the + * resource. + * + * Arguments: + * client is the client doing the resource access. + * id is the resource id. + * rtype is its type or class. + * access_mode represents the intended use of the resource; see + * resource.h. + * res is a pointer to the resource structure for this resource. + * + * Returns: + * If access is granted, the value of rval that was passed in, else FALSE. + * + * Side Effects: + * Disallowed resource accesses are audited. + */ + +static void +SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceResourceAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + int cid = CLIENT_ID(rec->id); + Mask requested = rec->access_mode; + Mask allowed = SecurityResourceMask; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + + /* disable background None for untrusted windows */ + if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW)) + if (subj->haveState && subj->trustLevel != XSecurityClientTrusted) + ((WindowPtr) rec->res)->forcedBG = TRUE; + + /* additional permissions for specific resource types */ + if (rec->rtype == RT_WINDOW) + allowed |= SecurityWindowExtraMask; + + /* special checks for server-owned resources */ + if (cid == 0) { + if (rec->rtype & RC_DRAWABLE) + /* additional operations allowed on root windows */ + allowed |= SecurityRootWindowExtraMask; + + else if (rec->rtype == RT_COLORMAP) + /* allow access to default colormaps */ + allowed = requested; + + else + /* allow read access to other server-owned resources */ + allowed |= DixReadAccess; + } + + if (clients[cid] != NULL) { + obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); + if (SecurityDoCheck(subj, obj, requested, allowed) == Success) + return; + } + + SecurityAudit("Security: denied client %d access %x to resource 0x%x " + "of client %d on request %s\n", rec->client->index, + requested, rec->id, cid, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; /* deny access */ +} + +static void +SecurityExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceExtAccessRec *rec = calldata; + SecurityStateRec *subj; + int i = 0; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + + if (subj->haveState && subj->trustLevel == XSecurityClientTrusted) + return; + + while (SecurityTrustedExtensions[i]) + if (!strcmp(SecurityTrustedExtensions[i++], rec->ext->name)) + return; + + SecurityAudit("Security: denied client %d access to extension " + "%s on request %s\n", + rec->client->index, rec->ext->name, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; +} + +static void +SecurityServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceServerAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + Mask requested = rec->access_mode; + Mask allowed = SecurityServerMask; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security: denied client %d access to server " + "configuration request %s\n", rec->client->index, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + } +} + +static void +SecurityClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceClientAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + Mask requested = rec->access_mode; + Mask allowed = SecurityClientMask; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security: denied client %d access to client %d on " + "request %s\n", rec->client->index, rec->target->index, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + } +} + +static void +SecurityProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XacePropertyAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + ATOM name = (*rec->ppProp)->propertyName; + Mask requested = rec->access_mode; + Mask allowed = SecurityResourceMask | DixReadAccess; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security: denied client %d access to property %s " + "(atom 0x%x) window 0x%x of client %d on request %s\n", + rec->client->index, NameForAtom(name), name, + rec->pWin->drawable.id, wClient(rec->pWin)->index, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + } +} + +static void +SecuritySend(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceSendAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + + if (rec->client) { + int i; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, DixSendAccess, 0) == Success) + return; + + for (i = 0; i < rec->count; i++) + if (rec->events[i].u.u.type != UnmapNotify && + rec->events[i].u.u.type != ConfigureRequest && + rec->events[i].u.u.type != ClientMessage) { + + SecurityAudit("Security: denied client %d from sending event " + "of type %s to window 0x%x of client %d\n", + rec->client->index, + LookupEventName(rec->events[i].u.u.type), + rec->pWin->drawable.id, + wClient(rec->pWin)->index); + rec->status = BadAccess; + return; + } + } +} + +static void +SecurityReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceReceiveAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, DixReceiveAccess, 0) == Success) + return; + + SecurityAudit("Security: denied client %d from receiving an event " + "sent to window 0x%x of client %d\n", + rec->client->index, rec->pWin->drawable.id, + wClient(rec->pWin)->index); + rec->status = BadAccess; +} + +/* SecurityClientStateCallback + * + * Arguments: + * pcbl is &ClientStateCallback. + * nullata is NULL. + * calldata is a pointer to a NewClientInfoRec (include/dixstruct.h) + * which contains information about client state changes. + * + * Returns: nothing. + * + * Side Effects: + * + * If a new client is connecting, its authorization ID is copied to + * client->authID. If this is a generated authorization, its reference + * count is bumped, its timer is cancelled if it was running, and its + * trustlevel is copied to TRUSTLEVEL(client). + * + * If a client is disconnecting and the client was using a generated + * authorization, the authorization's reference count is decremented, and + * if it is now zero, the timer for this authorization is started. + */ + +static void +SecurityClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + NewClientInfoRec *pci = calldata; + SecurityStateRec *state; + SecurityAuthorizationPtr pAuth; + int rc; + + state = dixLookupPrivate(&pci->client->devPrivates, stateKey); + + switch (pci->client->clientState) { + case ClientStateInitial: + state->trustLevel = XSecurityClientTrusted; + state->authId = None; + state->haveState = TRUE; + state->live = FALSE; + break; + + case ClientStateRunning: + state->authId = AuthorizationIDOfClient(pci->client); + rc = dixLookupResourceByType((pointer *) &pAuth, state->authId, + SecurityAuthorizationResType, serverClient, + DixGetAttrAccess); + if (rc == Success) { + /* it is a generated authorization */ + pAuth->refcnt++; + state->live = TRUE; + if (pAuth->refcnt == 1 && pAuth->timer) + TimerCancel(pAuth->timer); + + state->trustLevel = pAuth->trustLevel; + } + break; + + case ClientStateGone: + case ClientStateRetained: + rc = dixLookupResourceByType((pointer *) &pAuth, state->authId, + SecurityAuthorizationResType, serverClient, + DixGetAttrAccess); + if (rc == Success && state->live) { + /* it is a generated authorization */ + pAuth->refcnt--; + state->live = FALSE; + if (pAuth->refcnt == 0) + SecurityStartAuthorizationTimer(pAuth); + } + break; + + default: + break; + } +} + +/* SecurityResetProc + * + * Arguments: + * extEntry is the extension information for the security extension. + * + * Returns: nothing. + * + * Side Effects: + * Performs any cleanup needed by Security at server shutdown time. + */ + +static void +SecurityResetProc(ExtensionEntry * extEntry) +{ + /* Unregister callbacks */ + DeleteCallback(&ClientStateCallback, SecurityClientState, NULL); + + XaceDeleteCallback(XACE_EXT_DISPATCH, SecurityExtension, NULL); + XaceDeleteCallback(XACE_RESOURCE_ACCESS, SecurityResource, NULL); + XaceDeleteCallback(XACE_DEVICE_ACCESS, SecurityDevice, NULL); + XaceDeleteCallback(XACE_PROPERTY_ACCESS, SecurityProperty, NULL); + XaceDeleteCallback(XACE_SEND_ACCESS, SecuritySend, NULL); + XaceDeleteCallback(XACE_RECEIVE_ACCESS, SecurityReceive, NULL); + XaceDeleteCallback(XACE_CLIENT_ACCESS, SecurityClient, NULL); + XaceDeleteCallback(XACE_EXT_ACCESS, SecurityExtension, NULL); + XaceDeleteCallback(XACE_SERVER_ACCESS, SecurityServer, NULL); +} + +/* SecurityExtensionInit + * + * Arguments: none. + * + * Returns: nothing. + * + * Side Effects: + * Enables the Security extension if possible. + */ + +void +SecurityExtensionInit(void) +{ + ExtensionEntry *extEntry; + int ret = TRUE; + + SecurityAuthorizationResType = + CreateNewResourceType(SecurityDeleteAuthorization, + "SecurityAuthorization"); + + RTEventClient = + CreateNewResourceType(SecurityDeleteAuthorizationEventClient, + "SecurityEventClient"); + + if (!SecurityAuthorizationResType || !RTEventClient) + return; + + RTEventClient |= RC_NEVERRETAIN; + + /* Allocate the private storage */ + if (!dixRegisterPrivateKey + (stateKey, PRIVATE_CLIENT, sizeof(SecurityStateRec))) + FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); + + /* Register callbacks */ + ret &= AddCallback(&ClientStateCallback, SecurityClientState, NULL); + + ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SecurityExtension, NULL); + ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SecurityResource, NULL); + ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SecurityDevice, NULL); + ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SecurityProperty, NULL); + ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SecuritySend, NULL); + ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SecurityReceive, NULL); + ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SecurityClient, NULL); + ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SecurityExtension, NULL); + ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SecurityServer, NULL); + + if (!ret) + FatalError("SecurityExtensionSetup: Failed to register callbacks\n"); + + /* Add extension to server */ + extEntry = AddExtension(SECURITY_EXTENSION_NAME, + XSecurityNumberEvents, XSecurityNumberErrors, + ProcSecurityDispatch, SProcSecurityDispatch, + SecurityResetProc, StandardMinorOpcode); + + SecurityErrorBase = extEntry->errorBase; + SecurityEventBase = extEntry->eventBase; + + EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] = + (EventSwapPtr) SwapSecurityAuthorizationRevokedEvent; + + SetResourceTypeErrorValue(SecurityAuthorizationResType, + SecurityErrorBase + XSecurityBadAuthorization); + + /* Label objects that were created before we could register ourself */ + SecurityLabelInitial(); +} diff --git a/Xext/securitysrv.h b/Xext/securitysrv.h new file mode 100644 index 0000000..8904242 --- /dev/null +++ b/Xext/securitysrv.h @@ -0,0 +1,82 @@ +/* +Copyright 1996, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. +*/ + +/* Xserver internals for Security extension - moved here from + _SECURITY_SERVER section of <X11/extensions/security.h> */ + +#ifndef _SECURITY_SRV_H +#define _SECURITY_SRV_H + +/* Allow client side portions of <X11/extensions/security.h> to compile */ +#ifndef Status +#define Status int +#define NEED_UNDEF_Status +#endif +#ifndef Display +#define Display void +#define NEED_UNDEF_Display +#endif + +#include <X11/extensions/secur.h> + +#ifdef NEED_UNDEF_Status +#undef Status +#undef NEED_UNDEF_Status +#endif +#ifdef NEED_UNDEF_Display +#undef Display +#undef NEED_UNDEF_Display +#endif + +#include "input.h" /* for DeviceIntPtr */ +#include "property.h" /* for PropertyPtr */ +#include "pixmap.h" /* for DrawablePtr */ +#include "resource.h" /* for RESTYPE */ + +/* resource type to pass in LookupIDByType for authorizations */ +extern RESTYPE SecurityAuthorizationResType; + +/* this is what we store for an authorization */ +typedef struct { + XID id; /* resource ID */ + CARD32 timeout; /* how long to live in seconds after refcnt == 0 */ + unsigned int trustLevel; /* trusted/untrusted */ + XID group; /* see embedding extension */ + unsigned int refcnt; /* how many clients connected with this auth */ + unsigned int secondsRemaining; /* overflow time amount for >49 days */ + OsTimerPtr timer; /* timer for this auth */ + struct _OtherClients *eventClients; /* clients wanting events */ +} SecurityAuthorizationRec, *SecurityAuthorizationPtr; + +typedef struct { + XID group; /* the group that was sent in GenerateAuthorization */ + Bool valid; /* did anyone recognize it? if so, set to TRUE */ +} SecurityValidateGroupInfoRec; + +/* Give this value or higher to the -audit option to get security messages */ +#define SECURITY_AUDIT_LEVEL 4 + +#endif /* _SECURITY_SRV_H */ diff --git a/Xext/shape.c b/Xext/shape.c new file mode 100644 index 0000000..d36867c --- /dev/null +++ b/Xext/shape.c @@ -0,0 +1,1240 @@ +/************************************************************ + +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 <dix-config.h> +#endif + +#include <stdlib.h> + +#include <X11/X.h> +#include <X11/Xproto.h> +#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 <X11/extensions/shapeproto.h> +#include "regionstr.h" +#include "gcstruct.h" +#include "extinit.h" +#include "protocol-versions.h" + +typedef RegionPtr (*CreateDftPtr) (WindowPtr /* pWin */ + ); + +static int ShapeFreeClient(pointer /* data */ , + XID /* id */ + ); +static int ShapeFreeEvents(pointer /* data */ , + XID /* id */ + ); +static void SShapeNotifyEvent(xShapeNotifyEvent * /* from */ , + xShapeNotifyEvent * /* to */ + ); + +/* SendShapeNotify, CreateBoundingShape and CreateClipShape are used + * externally by the Xfixes extension and are now defined in window.h + */ + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +static int ShapeEventBase = 0; +static RESTYPE ClientType, ShapeEventType; /* resource types for event masks */ + +/* + * each window has a list of clients requesting + * ShapeNotify events. Each client has a resource + * for each window it selects ShapeNotify input for, + * this resource is used to delete the ShapeNotifyRec + * entry from the per-window queue. + */ + +typedef struct _ShapeEvent *ShapeEventPtr; + +typedef struct _ShapeEvent { + ShapeEventPtr next; + ClientPtr client; + WindowPtr window; + XID clientResource; +} ShapeEventRec; + +/**************** + * ShapeExtensionInit + * + * Called from InitExtensions in main() or from QueryExtension() if the + * extension is dynamically loaded. + * + ****************/ + +static int +RegionOperate(ClientPtr client, + WindowPtr pWin, + int kind, + RegionPtr *destRgnp, + RegionPtr srcRgn, int op, int xoff, int yoff, CreateDftPtr create) +{ + if (srcRgn && (xoff || yoff)) + RegionTranslate(srcRgn, xoff, yoff); + if (!pWin->parent) { + if (srcRgn) + RegionDestroy(srcRgn); + return Success; + } + + /* May/30/2001: + * The shape.PS specs say if src is None, existing shape is to be + * removed (and so the op-code has no meaning in such removal); + * see shape.PS, page 3, ShapeMask. + */ + if (srcRgn == NULL) { + if (*destRgnp != NULL) { + RegionDestroy(*destRgnp); + *destRgnp = 0; + /* go on to remove shape and generate ShapeNotify */ + } + else { + /* May/30/2001: + * The target currently has no shape in effect, so nothing to + * do here. The specs say that ShapeNotify is generated whenever + * the client region is "modified"; since no modification is done + * here, we do not generate that event. The specs does not say + * "it is an error to request removal when there is no shape in + * effect", so we return good status. + */ + return Success; + } + } + else + switch (op) { + case ShapeSet: + if (*destRgnp) + RegionDestroy(*destRgnp); + *destRgnp = srcRgn; + srcRgn = 0; + break; + case ShapeUnion: + if (*destRgnp) + RegionUnion(*destRgnp, *destRgnp, srcRgn); + break; + case ShapeIntersect: + if (*destRgnp) + RegionIntersect(*destRgnp, *destRgnp, srcRgn); + else { + *destRgnp = srcRgn; + srcRgn = 0; + } + break; + case ShapeSubtract: + if (!*destRgnp) + *destRgnp = (*create) (pWin); + RegionSubtract(*destRgnp, *destRgnp, srcRgn); + break; + case ShapeInvert: + if (!*destRgnp) + *destRgnp = RegionCreate((BoxPtr) 0, 0); + else + RegionSubtract(*destRgnp, srcRgn, *destRgnp); + break; + default: + client->errorValue = op; + return BadValue; + } + if (srcRgn) + RegionDestroy(srcRgn); + (*pWin->drawable.pScreen->SetShape) (pWin, kind); + SendShapeNotify(pWin, kind); + return Success; +} + +RegionPtr +CreateBoundingShape(WindowPtr pWin) +{ + BoxRec extents; + + extents.x1 = -wBorderWidth(pWin); + extents.y1 = -wBorderWidth(pWin); + extents.x2 = pWin->drawable.width + wBorderWidth(pWin); + extents.y2 = pWin->drawable.height + wBorderWidth(pWin); + return RegionCreate(&extents, 1); +} + +RegionPtr +CreateClipShape(WindowPtr pWin) +{ + BoxRec extents; + + extents.x1 = 0; + extents.y1 = 0; + extents.x2 = pWin->drawable.width; + extents.y2 = pWin->drawable.height; + return RegionCreate(&extents, 1); +} + +static int +ProcShapeQueryVersion(ClientPtr client) +{ + xShapeQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_SHAPE_MAJOR_VERSION, + .minorVersion = SERVER_SHAPE_MINOR_VERSION + }; + + REQUEST_SIZE_MATCH(xShapeQueryVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + } + WriteToClient(client, sizeof(xShapeQueryVersionReply), &rep); + return Success; +} + +/***************** + * ProcShapeRectangles + * + *****************/ + +static int +ProcShapeRectangles(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xShapeRectanglesReq); + xRectangle *prects; + int nrects, ctype, rc; + RegionPtr srcRgn; + RegionPtr *destRgn; + CreateDftPtr createDefault; + + REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); + if (rc != Success) + return rc; + switch (stuff->destKind) { + case ShapeBounding: + createDefault = CreateBoundingShape; + break; + case ShapeClip: + createDefault = CreateClipShape; + break; + case ShapeInput: + createDefault = CreateBoundingShape; + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) && + (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) { + client->errorValue = stuff->ordering; + return BadValue; + } + nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq)); + if (nrects & 4) + return BadLength; + nrects >>= 3; + prects = (xRectangle *) &stuff[1]; + ctype = VerifyRectOrder(nrects, prects, (int) stuff->ordering); + if (ctype < 0) + return BadMatch; + srcRgn = RegionFromRects(nrects, prects, ctype); + + if (!pWin->optional) + MakeWindowOptional(pWin); + switch (stuff->destKind) { + case ShapeBounding: + destRgn = &pWin->optional->boundingShape; + break; + case ShapeClip: + destRgn = &pWin->optional->clipShape; + break; + case ShapeInput: + destRgn = &pWin->optional->inputShape; + break; + default: + return BadValue; + } + + return RegionOperate(client, pWin, (int) stuff->destKind, + destRgn, srcRgn, (int) stuff->op, + stuff->xOff, stuff->yOff, createDefault); +} + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeRectangles(ClientPtr client) +{ + REQUEST(xShapeRectanglesReq); + PanoramiXRes *win; + int j, result; + + REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + result = ProcShapeRectangles(client); + if (result != Success) + break; + } + return result; +} +#endif + +/************** + * ProcShapeMask + **************/ + +static int +ProcShapeMask(ClientPtr client) +{ + WindowPtr pWin; + ScreenPtr pScreen; + + REQUEST(xShapeMaskReq); + RegionPtr srcRgn; + RegionPtr *destRgn; + PixmapPtr pPixmap; + CreateDftPtr createDefault; + int rc; + + REQUEST_SIZE_MATCH(xShapeMaskReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); + if (rc != Success) + return rc; + switch (stuff->destKind) { + case ShapeBounding: + createDefault = CreateBoundingShape; + break; + case ShapeClip: + createDefault = CreateClipShape; + break; + case ShapeInput: + createDefault = CreateBoundingShape; + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + pScreen = pWin->drawable.pScreen; + if (stuff->src == None) + srcRgn = 0; + else { + rc = dixLookupResourceByType((pointer *) &pPixmap, stuff->src, + RT_PIXMAP, client, DixReadAccess); + if (rc != Success) + return rc; + if (pPixmap->drawable.pScreen != pScreen || + pPixmap->drawable.depth != 1) + return BadMatch; + srcRgn = BitmapToRegion(pScreen, pPixmap); + if (!srcRgn) + return BadAlloc; + } + + if (!pWin->optional) + MakeWindowOptional(pWin); + switch (stuff->destKind) { + case ShapeBounding: + destRgn = &pWin->optional->boundingShape; + break; + case ShapeClip: + destRgn = &pWin->optional->clipShape; + break; + case ShapeInput: + destRgn = &pWin->optional->inputShape; + break; + default: + return BadValue; + } + + return RegionOperate(client, pWin, (int) stuff->destKind, + destRgn, srcRgn, (int) stuff->op, + stuff->xOff, stuff->yOff, createDefault); +} + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeMask(ClientPtr client) +{ + REQUEST(xShapeMaskReq); + PanoramiXRes *win, *pmap; + int j, result; + + REQUEST_SIZE_MATCH(xShapeMaskReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return result; + + if (stuff->src != None) { + result = dixLookupResourceByType((pointer *) &pmap, stuff->src, + XRT_PIXMAP, client, DixReadAccess); + if (result != Success) + return result; + } + else + pmap = NULL; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + if (pmap) + stuff->src = pmap->info[j].id; + result = ProcShapeMask(client); + if (result != Success) + break; + } + return result; +} +#endif + +/************ + * ProcShapeCombine + ************/ + +static int +ProcShapeCombine(ClientPtr client) +{ + WindowPtr pSrcWin, pDestWin; + + REQUEST(xShapeCombineReq); + RegionPtr srcRgn; + RegionPtr *destRgn; + CreateDftPtr createDefault; + CreateDftPtr createSrc; + RegionPtr tmp; + int rc; + + REQUEST_SIZE_MATCH(xShapeCombineReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (!pDestWin->optional) + MakeWindowOptional(pDestWin); + switch (stuff->destKind) { + case ShapeBounding: + createDefault = CreateBoundingShape; + break; + case ShapeClip: + createDefault = CreateClipShape; + break; + case ShapeInput: + createDefault = CreateBoundingShape; + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + + rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixGetAttrAccess); + if (rc != Success) + return rc; + switch (stuff->srcKind) { + case ShapeBounding: + srcRgn = wBoundingShape(pSrcWin); + createSrc = CreateBoundingShape; + break; + case ShapeClip: + srcRgn = wClipShape(pSrcWin); + createSrc = CreateClipShape; + break; + case ShapeInput: + srcRgn = wInputShape(pSrcWin); + createSrc = CreateBoundingShape; + break; + default: + client->errorValue = stuff->srcKind; + return BadValue; + } + if (pSrcWin->drawable.pScreen != pDestWin->drawable.pScreen) { + return BadMatch; + } + + if (srcRgn) { + tmp = RegionCreate((BoxPtr) 0, 0); + RegionCopy(tmp, srcRgn); + srcRgn = tmp; + } + else + srcRgn = (*createSrc) (pSrcWin); + + if (!pDestWin->optional) + MakeWindowOptional(pDestWin); + switch (stuff->destKind) { + case ShapeBounding: + destRgn = &pDestWin->optional->boundingShape; + break; + case ShapeClip: + destRgn = &pDestWin->optional->clipShape; + break; + case ShapeInput: + destRgn = &pDestWin->optional->inputShape; + break; + default: + return BadValue; + } + + return RegionOperate(client, pDestWin, (int) stuff->destKind, + destRgn, srcRgn, (int) stuff->op, + stuff->xOff, stuff->yOff, createDefault); +} + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeCombine(ClientPtr client) +{ + REQUEST(xShapeCombineReq); + PanoramiXRes *win, *win2; + int j, result; + + REQUEST_AT_LEAST_SIZE(xShapeCombineReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &win2, stuff->src, XRT_WINDOW, + client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + stuff->src = win2->info[j].id; + result = ProcShapeCombine(client); + if (result != Success) + break; + } + return result; +} +#endif + +/************* + * ProcShapeOffset + *************/ + +static int +ProcShapeOffset(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xShapeOffsetReq); + RegionPtr srcRgn; + int rc; + + REQUEST_SIZE_MATCH(xShapeOffsetReq); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); + if (rc != Success) + return rc; + switch (stuff->destKind) { + case ShapeBounding: + srcRgn = wBoundingShape(pWin); + break; + case ShapeClip: + srcRgn = wClipShape(pWin); + break; + case ShapeInput: + srcRgn = wInputShape(pWin); + break; + default: + client->errorValue = stuff->destKind; + return BadValue; + } + if (srcRgn) { + RegionTranslate(srcRgn, stuff->xOff, stuff->yOff); + (*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind); + } + SendShapeNotify(pWin, (int) stuff->destKind); + return Success; +} + +#ifdef PANORAMIX +static int +ProcPanoramiXShapeOffset(ClientPtr client) +{ + REQUEST(xShapeOffsetReq); + PanoramiXRes *win; + int j, result; + + REQUEST_AT_LEAST_SIZE(xShapeOffsetReq); + + result = dixLookupResourceByType((pointer *) &win, stuff->dest, XRT_WINDOW, + client, DixWriteAccess); + if (result != Success) + return result; + + FOR_NSCREENS(j) { + stuff->dest = win->info[j].id; + result = ProcShapeOffset(client); + if (result != Success) + break; + } + return result; +} +#endif + +static int +ProcShapeQueryExtents(ClientPtr client) +{ + REQUEST(xShapeQueryExtentsReq); + WindowPtr pWin; + xShapeQueryExtentsReply rep; + BoxRec extents, *pExtents; + int rc; + RegionPtr region; + + REQUEST_SIZE_MATCH(xShapeQueryExtentsReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + rep = (xShapeQueryExtentsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .boundingShaped = (wBoundingShape(pWin) != 0), + .clipShaped = (wClipShape(pWin) != 0) + }; + if ((region = wBoundingShape(pWin))) { + /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ + pExtents = RegionExtents(region); + extents = *pExtents; + } + else { + extents.x1 = -wBorderWidth(pWin); + extents.y1 = -wBorderWidth(pWin); + extents.x2 = pWin->drawable.width + wBorderWidth(pWin); + extents.y2 = pWin->drawable.height + wBorderWidth(pWin); + } + rep.xBoundingShape = extents.x1; + rep.yBoundingShape = extents.y1; + rep.widthBoundingShape = extents.x2 - extents.x1; + rep.heightBoundingShape = extents.y2 - extents.y1; + if ((region = wClipShape(pWin))) { + /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ + pExtents = RegionExtents(region); + extents = *pExtents; + } + else { + extents.x1 = 0; + extents.y1 = 0; + extents.x2 = pWin->drawable.width; + extents.y2 = pWin->drawable.height; + } + rep.xClipShape = extents.x1; + rep.yClipShape = extents.y1; + rep.widthClipShape = extents.x2 - extents.x1; + rep.heightClipShape = extents.y2 - extents.y1; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.xBoundingShape); + swaps(&rep.yBoundingShape); + swaps(&rep.widthBoundingShape); + swaps(&rep.heightBoundingShape); + swaps(&rep.xClipShape); + swaps(&rep.yClipShape); + swaps(&rep.widthClipShape); + swaps(&rep.heightClipShape); + } + WriteToClient(client, sizeof(xShapeQueryExtentsReply), &rep); + return Success; +} + + /*ARGSUSED*/ static int +ShapeFreeClient(pointer data, XID id) +{ + ShapeEventPtr pShapeEvent; + WindowPtr pWin; + ShapeEventPtr *pHead, pCur, pPrev; + int rc; + + pShapeEvent = (ShapeEventPtr) data; + pWin = pShapeEvent->window; + rc = dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id, + ShapeEventType, serverClient, DixReadAccess); + if (rc == Success) { + pPrev = 0; + for (pCur = *pHead; pCur && pCur != pShapeEvent; pCur = pCur->next) + pPrev = pCur; + if (pCur) { + if (pPrev) + pPrev->next = pShapeEvent->next; + else + *pHead = pShapeEvent->next; + } + } + free((pointer) pShapeEvent); + return 1; +} + + /*ARGSUSED*/ static int +ShapeFreeEvents(pointer data, XID id) +{ + ShapeEventPtr *pHead, pCur, pNext; + + pHead = (ShapeEventPtr *) data; + for (pCur = *pHead; pCur; pCur = pNext) { + pNext = pCur->next; + FreeResource(pCur->clientResource, ClientType); + free((pointer) pCur); + } + free((pointer) pHead); + return 1; +} + +static int +ProcShapeSelectInput(ClientPtr client) +{ + REQUEST(xShapeSelectInputReq); + WindowPtr pWin; + ShapeEventPtr pShapeEvent, pNewShapeEvent, *pHead; + XID clientResource; + int rc; + + REQUEST_SIZE_MATCH(xShapeSelectInputReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); + if (rc != Success) + return rc; + rc = dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id, + ShapeEventType, client, DixWriteAccess); + if (rc != Success && rc != BadValue) + return rc; + + switch (stuff->enable) { + case xTrue: + if (pHead) { + + /* check for existing entry. */ + for (pShapeEvent = *pHead; + pShapeEvent; pShapeEvent = pShapeEvent->next) { + if (pShapeEvent->client == client) + return Success; + } + } + + /* build the entry */ + pNewShapeEvent = malloc(sizeof(ShapeEventRec)); + if (!pNewShapeEvent) + return BadAlloc; + pNewShapeEvent->next = 0; + pNewShapeEvent->client = client; + pNewShapeEvent->window = pWin; + /* + * add a resource that will be deleted when + * the client goes away + */ + clientResource = FakeClientID(client->index); + pNewShapeEvent->clientResource = clientResource; + if (!AddResource(clientResource, ClientType, (pointer) pNewShapeEvent)) + return BadAlloc; + /* + * create a resource to contain a pointer to the list + * of clients selecting input. This must be indirect as + * the list may be arbitrarily rearranged which cannot be + * done through the resource database. + */ + if (!pHead) { + pHead = malloc(sizeof(ShapeEventPtr)); + if (!pHead || + !AddResource(pWin->drawable.id, ShapeEventType, + (pointer) pHead)) { + FreeResource(clientResource, RT_NONE); + return BadAlloc; + } + *pHead = 0; + } + pNewShapeEvent->next = *pHead; + *pHead = pNewShapeEvent; + break; + case xFalse: + /* delete the interest */ + if (pHead) { + pNewShapeEvent = 0; + for (pShapeEvent = *pHead; pShapeEvent; + pShapeEvent = pShapeEvent->next) { + if (pShapeEvent->client == client) + break; + pNewShapeEvent = pShapeEvent; + } + if (pShapeEvent) { + FreeResource(pShapeEvent->clientResource, ClientType); + if (pNewShapeEvent) + pNewShapeEvent->next = pShapeEvent->next; + else + *pHead = pShapeEvent->next; + free(pShapeEvent); + } + } + break; + default: + client->errorValue = stuff->enable; + return BadValue; + } + return Success; +} + +/* + * deliver the event + */ + +void +SendShapeNotify(WindowPtr pWin, int which) +{ + ShapeEventPtr *pHead, pShapeEvent; + BoxRec extents; + RegionPtr region; + BYTE shaped; + int rc; + + rc = dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id, + ShapeEventType, serverClient, DixReadAccess); + if (rc != Success) + return; + switch (which) { + case ShapeBounding: + region = wBoundingShape(pWin); + if (region) { + extents = *RegionExtents(region); + shaped = xTrue; + } + else { + extents.x1 = -wBorderWidth(pWin); + extents.y1 = -wBorderWidth(pWin); + extents.x2 = pWin->drawable.width + wBorderWidth(pWin); + extents.y2 = pWin->drawable.height + wBorderWidth(pWin); + shaped = xFalse; + } + break; + case ShapeClip: + region = wClipShape(pWin); + if (region) { + extents = *RegionExtents(region); + shaped = xTrue; + } + else { + extents.x1 = 0; + extents.y1 = 0; + extents.x2 = pWin->drawable.width; + extents.y2 = pWin->drawable.height; + shaped = xFalse; + } + break; + case ShapeInput: + region = wInputShape(pWin); + if (region) { + extents = *RegionExtents(region); + shaped = xTrue; + } + else { + extents.x1 = -wBorderWidth(pWin); + extents.y1 = -wBorderWidth(pWin); + extents.x2 = pWin->drawable.width + wBorderWidth(pWin); + extents.y2 = pWin->drawable.height + wBorderWidth(pWin); + shaped = xFalse; + } + break; + default: + return; + } + for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { + xShapeNotifyEvent se = { + .type = ShapeNotify + ShapeEventBase, + .kind = which, + .window = pWin->drawable.id, + .x = extents.x1, + .y = extents.y1, + .width = extents.x2 - extents.x1, + .height = extents.y2 - extents.y1, + .time = currentTime.milliseconds, + .shaped = shaped + }; + WriteEventsToClient(pShapeEvent->client, 1, (xEvent *) &se); + } +} + +static int +ProcShapeInputSelected(ClientPtr client) +{ + REQUEST(xShapeInputSelectedReq); + WindowPtr pWin; + ShapeEventPtr pShapeEvent, *pHead; + int enabled, rc; + xShapeInputSelectedReply rep; + + REQUEST_SIZE_MATCH(xShapeInputSelectedReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + rc = dixLookupResourceByType((pointer *) &pHead, pWin->drawable.id, + ShapeEventType, client, DixReadAccess); + if (rc != Success && rc != BadValue) + return rc; + enabled = xFalse; + if (pHead) { + for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { + if (pShapeEvent->client == client) { + enabled = xTrue; + break; + } + } + } + rep = (xShapeInputSelectedReply) { + .type = X_Reply, + .enabled = enabled, + .sequenceNumber = client->sequence, + .length = 0 + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + WriteToClient(client, sizeof(xShapeInputSelectedReply), &rep); + return Success; +} + +static int +ProcShapeGetRectangles(ClientPtr client) +{ + REQUEST(xShapeGetRectanglesReq); + WindowPtr pWin; + xShapeGetRectanglesReply rep; + xRectangle *rects; + int nrects, i, rc; + RegionPtr region; + + REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + switch (stuff->kind) { + case ShapeBounding: + region = wBoundingShape(pWin); + break; + case ShapeClip: + region = wClipShape(pWin); + break; + case ShapeInput: + region = wInputShape(pWin); + break; + default: + client->errorValue = stuff->kind; + return BadValue; + } + if (!region) { + nrects = 1; + rects = malloc(sizeof(xRectangle)); + if (!rects) + return BadAlloc; + switch (stuff->kind) { + case ShapeBounding: + rects->x = -(int) wBorderWidth(pWin); + rects->y = -(int) wBorderWidth(pWin); + rects->width = pWin->drawable.width + wBorderWidth(pWin); + rects->height = pWin->drawable.height + wBorderWidth(pWin); + break; + case ShapeClip: + rects->x = 0; + rects->y = 0; + rects->width = pWin->drawable.width; + rects->height = pWin->drawable.height; + break; + case ShapeInput: + rects->x = -(int) wBorderWidth(pWin); + rects->y = -(int) wBorderWidth(pWin); + rects->width = pWin->drawable.width + wBorderWidth(pWin); + rects->height = pWin->drawable.height + wBorderWidth(pWin); + break; + } + } + else { + BoxPtr box; + + nrects = RegionNumRects(region); + box = RegionRects(region); + rects = malloc(nrects * sizeof(xRectangle)); + if (!rects && nrects) + return BadAlloc; + for (i = 0; i < nrects; i++, box++) { + rects[i].x = box->x1; + rects[i].y = box->y1; + rects[i].width = box->x2 - box->x1; + rects[i].height = box->y2 - box->y1; + } + } + rep = (xShapeGetRectanglesReply) { + .type = X_Reply, + .ordering = YXBanded, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(nrects * sizeof(xRectangle)), + .nrects = nrects + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.nrects); + SwapShorts((short *) rects, (unsigned long) nrects * 4); + } + WriteToClient(client, sizeof(rep), &rep); + WriteToClient(client, nrects * sizeof(xRectangle), rects); + free(rects); + return Success; +} + +static int +ProcShapeDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_ShapeQueryVersion: + return ProcShapeQueryVersion(client); + case X_ShapeRectangles: +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return ProcPanoramiXShapeRectangles(client); + else +#endif + return ProcShapeRectangles(client); + case X_ShapeMask: +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return ProcPanoramiXShapeMask(client); + else +#endif + return ProcShapeMask(client); + case X_ShapeCombine: +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return ProcPanoramiXShapeCombine(client); + else +#endif + return ProcShapeCombine(client); + case X_ShapeOffset: +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return ProcPanoramiXShapeOffset(client); + else +#endif + return ProcShapeOffset(client); + case X_ShapeQueryExtents: + return ProcShapeQueryExtents(client); + case X_ShapeSelectInput: + return ProcShapeSelectInput(client); + case X_ShapeInputSelected: + return ProcShapeInputSelected(client); + case X_ShapeGetRectangles: + return ProcShapeGetRectangles(client); + default: + return BadRequest; + } +} + +static void +SShapeNotifyEvent(xShapeNotifyEvent * from, xShapeNotifyEvent * to) +{ + to->type = from->type; + to->kind = from->kind; + cpswapl(from->window, to->window); + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswaps(from->x, to->x); + cpswaps(from->y, to->y); + cpswaps(from->width, to->width); + cpswaps(from->height, to->height); + cpswapl(from->time, to->time); + to->shaped = from->shaped; +} + +static int +SProcShapeQueryVersion(ClientPtr client) +{ + REQUEST(xShapeQueryVersionReq); + + swaps(&stuff->length); + return ProcShapeQueryVersion(client); +} + +static int +SProcShapeRectangles(ClientPtr client) +{ + REQUEST(xShapeRectanglesReq); + + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); + SwapRestS(stuff); + return ProcShapeRectangles(client); +} + +static int +SProcShapeMask(ClientPtr client) +{ + REQUEST(xShapeMaskReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShapeMaskReq); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); + swapl(&stuff->src); + return ProcShapeMask(client); +} + +static int +SProcShapeCombine(ClientPtr client) +{ + REQUEST(xShapeCombineReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShapeCombineReq); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); + swapl(&stuff->src); + return ProcShapeCombine(client); +} + +static int +SProcShapeOffset(ClientPtr client) +{ + REQUEST(xShapeOffsetReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShapeOffsetReq); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); + return ProcShapeOffset(client); +} + +static int +SProcShapeQueryExtents(ClientPtr client) +{ + REQUEST(xShapeQueryExtentsReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShapeQueryExtentsReq); + swapl(&stuff->window); + return ProcShapeQueryExtents(client); +} + +static int +SProcShapeSelectInput(ClientPtr client) +{ + REQUEST(xShapeSelectInputReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShapeSelectInputReq); + swapl(&stuff->window); + return ProcShapeSelectInput(client); +} + +static int +SProcShapeInputSelected(ClientPtr client) +{ + REQUEST(xShapeInputSelectedReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShapeInputSelectedReq); + swapl(&stuff->window); + return ProcShapeInputSelected(client); +} + +static int +SProcShapeGetRectangles(ClientPtr client) +{ + REQUEST(xShapeGetRectanglesReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); + swapl(&stuff->window); + return ProcShapeGetRectangles(client); +} + +static int +SProcShapeDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_ShapeQueryVersion: + return SProcShapeQueryVersion(client); + case X_ShapeRectangles: + return SProcShapeRectangles(client); + case X_ShapeMask: + return SProcShapeMask(client); + case X_ShapeCombine: + return SProcShapeCombine(client); + case X_ShapeOffset: + return SProcShapeOffset(client); + case X_ShapeQueryExtents: + return SProcShapeQueryExtents(client); + case X_ShapeSelectInput: + return SProcShapeSelectInput(client); + case X_ShapeInputSelected: + return SProcShapeInputSelected(client); + case X_ShapeGetRectangles: + return SProcShapeGetRectangles(client); + default: + return BadRequest; + } +} + +void +ShapeExtensionInit(void) +{ + ExtensionEntry *extEntry; + + ClientType = CreateNewResourceType(ShapeFreeClient, "ShapeClient"); + ShapeEventType = CreateNewResourceType(ShapeFreeEvents, "ShapeEvent"); + if (ClientType && ShapeEventType && + (extEntry = AddExtension(SHAPENAME, ShapeNumberEvents, 0, + ProcShapeDispatch, SProcShapeDispatch, + NULL, StandardMinorOpcode))) { + ShapeEventBase = extEntry->eventBase; + EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent; + } +} diff --git a/Xext/shm.c b/Xext/shm.c new file mode 100644 index 0000000..1957a95 --- /dev/null +++ b/Xext/shm.c @@ -0,0 +1,1515 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +********************************************************/ + +/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ + +#define SHM + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <unistd.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "resource.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "extnsionst.h" +#include "servermd.h" +#include "shmint.h" +#include "xace.h" +#include <X11/extensions/shmproto.h> +#include <X11/Xfuncproto.h> +#include <sys/mman.h> +#include "protocol-versions.h" +#include "busfault.h" + +/* Needed for Solaris cross-zone shared memory extension */ +#ifdef HAVE_SHMCTL64 +#include <sys/ipc_impl.h> +#define SHMSTAT(id, buf) shmctl64(id, IPC_STAT64, buf) +#define SHMSTAT_TYPE struct shmid_ds64 +#define SHMPERM_TYPE struct ipc_perm64 +#define SHM_PERM(buf) buf.shmx_perm +#define SHM_SEGSZ(buf) buf.shmx_segsz +#define SHMPERM_UID(p) p->ipcx_uid +#define SHMPERM_CUID(p) p->ipcx_cuid +#define SHMPERM_GID(p) p->ipcx_gid +#define SHMPERM_CGID(p) p->ipcx_cgid +#define SHMPERM_MODE(p) p->ipcx_mode +#define SHMPERM_ZONEID(p) p->ipcx_zoneid +#else +#define SHMSTAT(id, buf) shmctl(id, IPC_STAT, buf) +#define SHMSTAT_TYPE struct shmid_ds +#define SHMPERM_TYPE struct ipc_perm +#define SHM_PERM(buf) buf.shm_perm +#define SHM_SEGSZ(buf) buf.shm_segsz +#define SHMPERM_UID(p) p->uid +#define SHMPERM_CUID(p) p->cuid +#define SHMPERM_GID(p) p->gid +#define SHMPERM_CGID(p) p->cgid +#define SHMPERM_MODE(p) p->mode +#endif + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +#include "extinit.h" + +typedef struct _ShmScrPrivateRec { + CloseScreenProcPtr CloseScreen; + ShmFuncsPtr shmFuncs; + DestroyPixmapProcPtr destroyPixmap; +} ShmScrPrivateRec; + +static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS); +static int ShmDetachSegment(pointer /* value */ , + XID /* shmseg */ + ); +static void ShmResetProc(ExtensionEntry * /* extEntry */ + ); +static void SShmCompletionEvent(xShmCompletionEvent * /* from */ , + xShmCompletionEvent * /* to */ + ); + +static Bool ShmDestroyPixmap(PixmapPtr pPixmap); + +static unsigned char ShmReqCode; +int ShmCompletionCode; +int BadShmSegCode; +RESTYPE ShmSegType; +static ShmDescPtr Shmsegs; +static Bool sharedPixmaps; +static DevPrivateKeyRec shmScrPrivateKeyRec; + +#define shmScrPrivateKey (&shmScrPrivateKeyRec) +static DevPrivateKeyRec shmPixmapPrivateKeyRec; + +#define shmPixmapPrivateKey (&shmPixmapPrivateKeyRec) +static ShmFuncs miFuncs = { NULL, NULL }; +static ShmFuncs fbFuncs = { fbShmCreatePixmap, NULL }; + +#define ShmGetScreenPriv(s) ((ShmScrPrivateRec *)dixLookupPrivate(&(s)->devPrivates, shmScrPrivateKey)) + +#define VERIFY_SHMSEG(shmseg,shmdesc,client) \ +{ \ + int tmprc; \ + tmprc = dixLookupResourceByType((pointer *)&(shmdesc), shmseg, ShmSegType, \ + client, DixReadAccess); \ + if (tmprc != Success) \ + return tmprc; \ +} + +#define VERIFY_SHMPTR(shmseg,offset,needwrite,shmdesc,client) \ +{ \ + VERIFY_SHMSEG(shmseg, shmdesc, client); \ + if ((offset & 3) || (offset > shmdesc->size)) \ + { \ + client->errorValue = offset; \ + return BadValue; \ + } \ + if (needwrite && !shmdesc->writable) \ + return BadAccess; \ +} + +#define VERIFY_SHMSIZE(shmdesc,offset,len,client) \ +{ \ + if ((offset + len) > shmdesc->size) \ + { \ + return BadAccess; \ + } \ +} + +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) +#include <sys/signal.h> + +static Bool badSysCall = FALSE; + +static void +SigSysHandler(int signo) +{ + badSysCall = TRUE; +} + +static Bool +CheckForShmSyscall(void) +{ + void (*oldHandler) (int); + int shmid = -1; + + /* If no SHM support in the kernel, the bad syscall will generate SIGSYS */ + oldHandler = signal(SIGSYS, SigSysHandler); + + badSysCall = FALSE; + shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT); + + if (shmid != -1) { + /* Successful allocation - clean up */ + shmctl(shmid, IPC_RMID, NULL); + } + else { + /* Allocation failed */ + badSysCall = TRUE; + } + signal(SIGSYS, oldHandler); + return !badSysCall; +} + +#define MUST_CHECK_FOR_SHM_SYSCALL + +#endif + +static Bool +ShmCloseScreen(ScreenPtr pScreen) +{ + ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); + + pScreen->CloseScreen = screen_priv->CloseScreen; + dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, NULL); + free(screen_priv); + return (*pScreen->CloseScreen) (pScreen); +} + +static ShmScrPrivateRec * +ShmInitScreenPriv(ScreenPtr pScreen) +{ + ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); + + if (!screen_priv) { + screen_priv = calloc(1, sizeof(ShmScrPrivateRec)); + screen_priv->CloseScreen = pScreen->CloseScreen; + dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv); + pScreen->CloseScreen = ShmCloseScreen; + } + return screen_priv; +} + +static Bool +ShmRegisterPrivates(void) +{ + if (!dixRegisterPrivateKey(&shmScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&shmPixmapPrivateKeyRec, PRIVATE_PIXMAP, 0)) + return FALSE; + return TRUE; +} + + /*ARGSUSED*/ static void +ShmResetProc(ExtensionEntry * extEntry) +{ + int i; + + for (i = 0; i < screenInfo.numScreens; i++) + ShmRegisterFuncs(screenInfo.screens[i], NULL); +} + +void +ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs) +{ + if (!ShmRegisterPrivates()) + return; + ShmInitScreenPriv(pScreen)->shmFuncs = funcs; +} + +static Bool +ShmDestroyPixmap(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); + Bool ret; + + if (pPixmap->refcnt == 1) { + ShmDescPtr shmdesc; + + shmdesc = (ShmDescPtr) dixLookupPrivate(&pPixmap->devPrivates, + shmPixmapPrivateKey); + if (shmdesc) + ShmDetachSegment((pointer) shmdesc, pPixmap->drawable.id); + } + + pScreen->DestroyPixmap = screen_priv->destroyPixmap; + ret = (*pScreen->DestroyPixmap) (pPixmap); + screen_priv->destroyPixmap = pScreen->DestroyPixmap; + pScreen->DestroyPixmap = ShmDestroyPixmap; + return ret; +} + +void +ShmRegisterFbFuncs(ScreenPtr pScreen) +{ + ShmRegisterFuncs(pScreen, &fbFuncs); +} + +static int +ProcShmQueryVersion(ClientPtr client) +{ + xShmQueryVersionReply rep = { + .type = X_Reply, + .sharedPixmaps = sharedPixmaps, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_SHM_MAJOR_VERSION, + .minorVersion = SERVER_SHM_MINOR_VERSION, + .uid = geteuid(), + .gid = getegid(), + .pixmapFormat = sharedPixmaps ? ZPixmap : 0 + }; + + REQUEST_SIZE_MATCH(xShmQueryVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + swaps(&rep.uid); + swaps(&rep.gid); + } + WriteToClient(client, sizeof(xShmQueryVersionReply), &rep); + return Success; +} + +/* + * Simulate the access() system call for a shared memory segement, + * using the credentials from the client if available + */ +static int +shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) +{ + int uid, gid; + mode_t mask; + int uidset = 0, gidset = 0; + LocalClientCredRec *lcc; + + if (GetLocalClientCreds(client, &lcc) != -1) { + + if (lcc->fieldsSet & LCC_UID_SET) { + uid = lcc->euid; + uidset = 1; + } + if (lcc->fieldsSet & LCC_GID_SET) { + gid = lcc->egid; + gidset = 1; + } + +#if defined(HAVE_GETZONEID) && defined(SHMPERM_ZONEID) + if (((lcc->fieldsSet & LCC_ZID_SET) == 0) || (lcc->zoneid == -1) + || (lcc->zoneid != SHMPERM_ZONEID(perm))) { + uidset = 0; + gidset = 0; + } +#endif + FreeLocalClientCreds(lcc); + + if (uidset) { + /* User id 0 always gets access */ + if (uid == 0) { + return 0; + } + /* Check the owner */ + if (SHMPERM_UID(perm) == uid || SHMPERM_CUID(perm) == uid) { + mask = S_IRUSR; + if (!readonly) { + mask |= S_IWUSR; + } + return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; + } + } + + if (gidset) { + /* Check the group */ + if (SHMPERM_GID(perm) == gid || SHMPERM_CGID(perm) == gid) { + mask = S_IRGRP; + if (!readonly) { + mask |= S_IWGRP; + } + return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; + } + } + } + /* Otherwise, check everyone else */ + mask = S_IROTH; + if (!readonly) { + mask |= S_IWOTH; + } + return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; +} + +static int +ProcShmAttach(ClientPtr client) +{ + SHMSTAT_TYPE buf; + ShmDescPtr shmdesc; + + REQUEST(xShmAttachReq); + + REQUEST_SIZE_MATCH(xShmAttachReq); + LEGAL_NEW_RESOURCE(stuff->shmseg, client); + if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { + client->errorValue = stuff->readOnly; + return BadValue; + } + for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next) { + if (!SHMDESC_IS_FD(shmdesc) && shmdesc->shmid == stuff->shmid) + break; + } + if (shmdesc) { + if (!stuff->readOnly && !shmdesc->writable) + return BadAccess; + shmdesc->refcnt++; + } + else { + shmdesc = malloc(sizeof(ShmDescRec)); + if (!shmdesc) + return BadAlloc; +#ifdef SHM_FD_PASSING + shmdesc->is_fd = FALSE; +#endif + shmdesc->addr = shmat(stuff->shmid, 0, + stuff->readOnly ? SHM_RDONLY : 0); + if ((shmdesc->addr == ((char *) -1)) || SHMSTAT(stuff->shmid, &buf)) { + free(shmdesc); + return BadAccess; + } + + /* The attach was performed with root privs. We must + * do manual checking of access rights for the credentials + * of the client */ + + if (shm_access(client, &(SHM_PERM(buf)), stuff->readOnly) == -1) { + shmdt(shmdesc->addr); + free(shmdesc); + return BadAccess; + } + + shmdesc->shmid = stuff->shmid; + shmdesc->refcnt = 1; + shmdesc->writable = !stuff->readOnly; + shmdesc->size = SHM_SEGSZ(buf); + shmdesc->next = Shmsegs; + Shmsegs = shmdesc; + } + if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc)) + return BadAlloc; + return Success; +} + + /*ARGSUSED*/ static int +ShmDetachSegment(pointer value, /* must conform to DeleteType */ + XID shmseg) +{ + ShmDescPtr shmdesc = (ShmDescPtr) value; + ShmDescPtr *prev; + + if (--shmdesc->refcnt) + return TRUE; +#if SHM_FD_PASSING + if (shmdesc->is_fd) { + if (shmdesc->busfault) + busfault_unregister(shmdesc->busfault); + munmap(shmdesc->addr, shmdesc->size); + } else +#endif + shmdt(shmdesc->addr); + for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next); + *prev = shmdesc->next; + free(shmdesc); + return Success; +} + +static int +ProcShmDetach(ClientPtr client) +{ + ShmDescPtr shmdesc; + + REQUEST(xShmDetachReq); + + REQUEST_SIZE_MATCH(xShmDetachReq); + VERIFY_SHMSEG(stuff->shmseg, shmdesc, client); + FreeResource(stuff->shmseg, RT_NONE); + return Success; +} + +/* + * If the given request doesn't exactly match PutImage's constraints, + * wrap the image in a scratch pixmap header and let CopyArea sort it out. + */ +static void +doShmPutImage(DrawablePtr dst, GCPtr pGC, + int depth, unsigned int format, + int w, int h, int sx, int sy, int sw, int sh, int dx, int dy, + char *data) +{ + PixmapPtr pPixmap; + + if (format == ZPixmap || (format == XYPixmap && depth == 1)) { + pPixmap = GetScratchPixmapHeader(dst->pScreen, w, h, depth, + BitsPerPixel(depth), + PixmapBytePad(w, depth), data); + if (!pPixmap) + return; + pGC->ops->CopyArea((DrawablePtr) pPixmap, dst, pGC, sx, sy, sw, sh, dx, + dy); + FreeScratchPixmapHeader(pPixmap); + } + else { + GCPtr putGC = GetScratchGC(depth, dst->pScreen); + + if (!putGC) + return; + + pPixmap = (*dst->pScreen->CreatePixmap) (dst->pScreen, sw, sh, depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pPixmap) { + FreeScratchGC(putGC); + return; + } + ValidateGC(&pPixmap->drawable, putGC); + (*putGC->ops->PutImage) (&pPixmap->drawable, putGC, depth, -sx, -sy, w, + h, 0, + (format == XYPixmap) ? XYPixmap : ZPixmap, + data); + FreeScratchGC(putGC); + if (format == XYBitmap) + (void) (*pGC->ops->CopyPlane) (&pPixmap->drawable, dst, pGC, 0, 0, + sw, sh, dx, dy, 1L); + else + (void) (*pGC->ops->CopyArea) (&pPixmap->drawable, dst, pGC, 0, 0, + sw, sh, dx, dy); + (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); + } +} + +static int +ProcShmPutImage(ClientPtr client) +{ + GCPtr pGC; + DrawablePtr pDraw; + long length; + ShmDescPtr shmdesc; + + REQUEST(xShmPutImageReq); + + REQUEST_SIZE_MATCH(xShmPutImageReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, FALSE, shmdesc, client); + if ((stuff->sendEvent != xTrue) && (stuff->sendEvent != xFalse)) + return BadValue; + if (stuff->format == XYBitmap) { + if (stuff->depth != 1) + return BadMatch; + length = PixmapBytePad(stuff->totalWidth, 1); + } + else if (stuff->format == XYPixmap) { + if (pDraw->depth != stuff->depth) + return BadMatch; + length = PixmapBytePad(stuff->totalWidth, 1); + length *= stuff->depth; + } + else if (stuff->format == ZPixmap) { + if (pDraw->depth != stuff->depth) + return BadMatch; + length = PixmapBytePad(stuff->totalWidth, stuff->depth); + } + else { + client->errorValue = stuff->format; + return BadValue; + } + + /* + * There's a potential integer overflow in this check: + * VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight, + * client); + * the version below ought to avoid it + */ + if (stuff->totalHeight != 0 && + length > (shmdesc->size - stuff->offset) / stuff->totalHeight) { + client->errorValue = stuff->totalWidth; + return BadValue; + } + if (stuff->srcX > stuff->totalWidth) { + client->errorValue = stuff->srcX; + return BadValue; + } + if (stuff->srcY > stuff->totalHeight) { + client->errorValue = stuff->srcY; + return BadValue; + } + if ((stuff->srcX + stuff->srcWidth) > stuff->totalWidth) { + client->errorValue = stuff->srcWidth; + return BadValue; + } + if ((stuff->srcY + stuff->srcHeight) > stuff->totalHeight) { + client->errorValue = stuff->srcHeight; + return BadValue; + } + + if ((((stuff->format == ZPixmap) && (stuff->srcX == 0)) || + ((stuff->format != ZPixmap) && + (stuff->srcX < screenInfo.bitmapScanlinePad) && + ((stuff->format == XYBitmap) || + ((stuff->srcY == 0) && + (stuff->srcHeight == stuff->totalHeight))))) && + ((stuff->srcX + stuff->srcWidth) == stuff->totalWidth)) + (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, + stuff->dstX, stuff->dstY, + stuff->totalWidth, stuff->srcHeight, + stuff->srcX, stuff->format, + shmdesc->addr + stuff->offset + + (stuff->srcY * length)); + else + doShmPutImage(pDraw, pGC, stuff->depth, stuff->format, + stuff->totalWidth, stuff->totalHeight, + stuff->srcX, stuff->srcY, + stuff->srcWidth, stuff->srcHeight, + stuff->dstX, stuff->dstY, shmdesc->addr + stuff->offset); + + if (stuff->sendEvent) { + xShmCompletionEvent ev = { + .type = ShmCompletionCode, + .drawable = stuff->drawable, + .minorEvent = X_ShmPutImage, + .majorEvent = ShmReqCode, + .shmseg = stuff->shmseg, + .offset = stuff->offset + }; + WriteEventsToClient(client, 1, (xEvent *) &ev); + } + + return Success; +} + +static int +ProcShmGetImage(ClientPtr client) +{ + DrawablePtr pDraw; + long lenPer = 0, length; + Mask plane = 0; + xShmGetImageReply xgi; + ShmDescPtr shmdesc; + VisualID visual = None; + int rc; + + REQUEST(xShmGetImageReq); + + REQUEST_SIZE_MATCH(xShmGetImageReq); + if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { + client->errorValue = stuff->format; + return BadValue; + } + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + if (pDraw->type == DRAWABLE_WINDOW) { + if ( /* check for being viewable */ + !((WindowPtr) pDraw)->realized || + /* check for being on screen */ + pDraw->x + stuff->x < 0 || + pDraw->x + stuff->x + (int) stuff->width > pDraw->pScreen->width + || pDraw->y + stuff->y < 0 || + pDraw->y + stuff->y + (int) stuff->height > + pDraw->pScreen->height || + /* check for being inside of border */ + stuff->x < -wBorderWidth((WindowPtr) pDraw) || + stuff->x + (int) stuff->width > + wBorderWidth((WindowPtr) pDraw) + (int) pDraw->width || + stuff->y < -wBorderWidth((WindowPtr) pDraw) || + stuff->y + (int) stuff->height > + wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height) + return BadMatch; + visual = wVisual(((WindowPtr) pDraw)); + } + else { + if (stuff->x < 0 || + stuff->x + (int) stuff->width > pDraw->width || + stuff->y < 0 || stuff->y + (int) stuff->height > pDraw->height) + return BadMatch; + visual = None; + } + xgi = (xShmGetImageReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .visual = visual, + .depth = pDraw->depth + }; + if (stuff->format == ZPixmap) { + length = PixmapBytePad(stuff->width, pDraw->depth) * stuff->height; + } + else { + lenPer = PixmapBytePad(stuff->width, 1) * stuff->height; + plane = ((Mask) 1) << (pDraw->depth - 1); + /* only planes asked for */ + length = lenPer * Ones(stuff->planeMask & (plane | (plane - 1))); + } + + VERIFY_SHMSIZE(shmdesc, stuff->offset, length, client); + xgi.size = length; + + if (length == 0) { + /* nothing to do */ + } + else if (stuff->format == ZPixmap) { + (*pDraw->pScreen->GetImage) (pDraw, stuff->x, stuff->y, + stuff->width, stuff->height, + stuff->format, stuff->planeMask, + shmdesc->addr + stuff->offset); + } + else { + + length = stuff->offset; + for (; plane; plane >>= 1) { + if (stuff->planeMask & plane) { + (*pDraw->pScreen->GetImage) (pDraw, + stuff->x, stuff->y, + stuff->width, stuff->height, + stuff->format, plane, + shmdesc->addr + length); + length += lenPer; + } + } + } + + if (client->swapped) { + swaps(&xgi.sequenceNumber); + swapl(&xgi.length); + swapl(&xgi.visual); + swapl(&xgi.size); + } + WriteToClient(client, sizeof(xShmGetImageReply), &xgi); + + return Success; +} + +#ifdef PANORAMIX +static int +ProcPanoramiXShmPutImage(ClientPtr client) +{ + int j, result, orig_x, orig_y; + PanoramiXRes *draw, *gc; + Bool sendEvent, isRoot; + + REQUEST(xShmPutImageReq); + REQUEST_SIZE_MATCH(xShmPutImageReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return result; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + orig_x = stuff->dstX; + orig_y = stuff->dstY; + sendEvent = stuff->sendEvent; + stuff->sendEvent = 0; + FOR_NSCREENS(j) { + if (!j) + stuff->sendEvent = sendEvent; + stuff->drawable = draw->info[j].id; + stuff->gc = gc->info[j].id; + if (isRoot) { + stuff->dstX = orig_x - screenInfo.screens[j]->x; + stuff->dstY = orig_y - screenInfo.screens[j]->y; + } + result = ProcShmPutImage(client); + if (result != Success) + break; + } + return result; +} + +static int +ProcPanoramiXShmGetImage(ClientPtr client) +{ + PanoramiXRes *draw; + DrawablePtr *drawables; + DrawablePtr pDraw; + xShmGetImageReply xgi; + ShmDescPtr shmdesc; + int i, x, y, w, h, format, rc; + Mask plane = 0, planemask; + long lenPer = 0, length, widthBytesLine; + Bool isRoot; + + REQUEST(xShmGetImageReq); + + REQUEST_SIZE_MATCH(xShmGetImageReq); + + if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { + client->errorValue = stuff->format; + return BadValue; + } + + rc = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (rc != Success) + return (rc == BadValue) ? BadDrawable : rc; + + if (draw->type == XRT_PIXMAP) + return ProcShmGetImage(client); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + + x = stuff->x; + y = stuff->y; + w = stuff->width; + h = stuff->height; + format = stuff->format; + planemask = stuff->planeMask; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + if (isRoot) { + if ( /* check for being onscreen */ + x < 0 || x + w > PanoramiXPixWidth || + y < 0 || y + h > PanoramiXPixHeight) + return BadMatch; + } + else { + if ( /* check for being onscreen */ + screenInfo.screens[0]->x + pDraw->x + x < 0 || + screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth + || screenInfo.screens[0]->y + pDraw->y + y < 0 || + screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight + || + /* check for being inside of border */ + x < -wBorderWidth((WindowPtr) pDraw) || + x + w > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->width || + y < -wBorderWidth((WindowPtr) pDraw) || + y + h > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height) + return BadMatch; + } + + drawables = calloc(PanoramiXNumScreens, sizeof(DrawablePtr)); + if (!drawables) + return BadAlloc; + + drawables[0] = pDraw; + FOR_NSCREENS_FORWARD_SKIP(i) { + rc = dixLookupDrawable(drawables + i, draw->info[i].id, client, 0, + DixReadAccess); + if (rc != Success) { + free(drawables); + return rc; + } + } + + xgi = (xShmGetImageReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .visual = wVisual(((WindowPtr) pDraw)), + .depth = pDraw->depth + }; + + if (format == ZPixmap) { + widthBytesLine = PixmapBytePad(w, pDraw->depth); + length = widthBytesLine * h; + } + else { + widthBytesLine = PixmapBytePad(w, 1); + lenPer = widthBytesLine * h; + plane = ((Mask) 1) << (pDraw->depth - 1); + length = lenPer * Ones(planemask & (plane | (plane - 1))); + } + + VERIFY_SHMSIZE(shmdesc, stuff->offset, length, client); + xgi.size = length; + + if (length == 0) { /* nothing to do */ + } + else if (format == ZPixmap) { + XineramaGetImageData(drawables, x, y, w, h, format, planemask, + shmdesc->addr + stuff->offset, + widthBytesLine, isRoot); + } + else { + + length = stuff->offset; + for (; plane; plane >>= 1) { + if (planemask & plane) { + XineramaGetImageData(drawables, x, y, w, h, + format, plane, shmdesc->addr + length, + widthBytesLine, isRoot); + length += lenPer; + } + } + } + free(drawables); + + if (client->swapped) { + swaps(&xgi.sequenceNumber); + swapl(&xgi.length); + swapl(&xgi.visual); + swapl(&xgi.size); + } + WriteToClient(client, sizeof(xShmGetImageReply), &xgi); + + return Success; +} + +static int +ProcPanoramiXShmCreatePixmap(ClientPtr client) +{ + ScreenPtr pScreen = NULL; + PixmapPtr pMap = NULL; + DrawablePtr pDraw; + DepthPtr pDepth; + int i, j, result, rc; + ShmDescPtr shmdesc; + + REQUEST(xShmCreatePixmapReq); + unsigned int width, height, depth; + unsigned long size; + PanoramiXRes *newPix; + + REQUEST_SIZE_MATCH(xShmCreatePixmapReq); + client->errorValue = stuff->pid; + if (!sharedPixmaps) + return BadImplementation; + LEGAL_NEW_RESOURCE(stuff->pid, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixGetAttrAccess); + if (rc != Success) + return rc; + + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + + width = stuff->width; + height = stuff->height; + depth = stuff->depth; + if (!width || !height || !depth) { + client->errorValue = 0; + return BadValue; + } + if (width > 32767 || height > 32767) + return BadAlloc; + + if (stuff->depth != 1) { + pDepth = pDraw->pScreen->allowedDepths; + for (i = 0; i < pDraw->pScreen->numDepths; i++, pDepth++) + if (pDepth->depth == stuff->depth) + goto CreatePmap; + client->errorValue = stuff->depth; + return BadValue; + } + + CreatePmap: + size = PixmapBytePad(width, depth) * height; + if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { + if (size < width * height) + return BadAlloc; + } + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; + + VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); + + if (!(newPix = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newPix->type = XRT_PIXMAP; + newPix->u.pix.shared = TRUE; + panoramix_setup_ids(newPix, client, stuff->pid); + + result = Success; + + FOR_NSCREENS(j) { + ShmScrPrivateRec *screen_priv; + + pScreen = screenInfo.screens[j]; + + screen_priv = ShmGetScreenPriv(pScreen); + pMap = (*screen_priv->shmFuncs->CreatePixmap) (pScreen, + stuff->width, + stuff->height, + stuff->depth, + shmdesc->addr + + stuff->offset); + + if (pMap) { + dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); + shmdesc->refcnt++; + pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pMap->drawable.id = newPix->info[j].id; + if (!AddResource(newPix->info[j].id, RT_PIXMAP, (pointer) pMap)) { + result = BadAlloc; + break; + } + } + else { + result = BadAlloc; + break; + } + } + + if (result == BadAlloc) { + while (j--) + FreeResource(newPix->info[j].id, RT_NONE); + free(newPix); + } + else + AddResource(stuff->pid, XRT_PIXMAP, newPix); + + return result; +} +#endif + +static PixmapPtr +fbShmCreatePixmap(ScreenPtr pScreen, + int width, int height, int depth, char *addr) +{ + PixmapPtr pPixmap; + + pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, pScreen->rootDepth, 0); + if (!pPixmap) + return NullPixmap; + + if (!(*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, + BitsPerPixel(depth), + PixmapBytePad(width, depth), + (pointer) addr)) { + (*pScreen->DestroyPixmap) (pPixmap); + return NullPixmap; + } + return pPixmap; +} + +static int +ProcShmCreatePixmap(ClientPtr client) +{ + PixmapPtr pMap; + DrawablePtr pDraw; + DepthPtr pDepth; + int i, rc; + ShmDescPtr shmdesc; + ShmScrPrivateRec *screen_priv; + + REQUEST(xShmCreatePixmapReq); + unsigned int width, height, depth; + unsigned long size; + + REQUEST_SIZE_MATCH(xShmCreatePixmapReq); + client->errorValue = stuff->pid; + if (!sharedPixmaps) + return BadImplementation; + LEGAL_NEW_RESOURCE(stuff->pid, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixGetAttrAccess); + if (rc != Success) + return rc; + + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); + + width = stuff->width; + height = stuff->height; + depth = stuff->depth; + if (!width || !height || !depth) { + client->errorValue = 0; + return BadValue; + } + if (width > 32767 || height > 32767) + return BadAlloc; + + if (stuff->depth != 1) { + pDepth = pDraw->pScreen->allowedDepths; + for (i = 0; i < pDraw->pScreen->numDepths; i++, pDepth++) + if (pDepth->depth == stuff->depth) + goto CreatePmap; + client->errorValue = stuff->depth; + return BadValue; + } + + CreatePmap: + size = PixmapBytePad(width, depth) * height; + if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { + if (size < width * height) + return BadAlloc; + } + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; + + VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); + screen_priv = ShmGetScreenPriv(pDraw->pScreen); + pMap = (*screen_priv->shmFuncs->CreatePixmap) (pDraw->pScreen, stuff->width, + stuff->height, stuff->depth, + shmdesc->addr + + stuff->offset); + if (pMap) { + rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, + pMap, RT_NONE, NULL, DixCreateAccess); + if (rc != Success) { + pDraw->pScreen->DestroyPixmap(pMap); + return rc; + } + dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); + shmdesc->refcnt++; + pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pMap->drawable.id = stuff->pid; + if (AddResource(stuff->pid, RT_PIXMAP, (pointer) pMap)) { + return Success; + } + } + return BadAlloc; +} + +#ifdef SHM_FD_PASSING + +static void +ShmBusfaultNotify(void *context) +{ + ShmDescPtr shmdesc = context; + + ErrorF("shared memory 0x%x truncated by client\n", + (unsigned int) shmdesc->resource); + busfault_unregister(shmdesc->busfault); + shmdesc->busfault = NULL; + FreeResource (shmdesc->resource, RT_NONE); +} + +static int +ProcShmAttachFd(ClientPtr client) +{ + int fd; + ShmDescPtr shmdesc; + REQUEST(xShmAttachFdReq); + struct stat statb; + + SetReqFds(client, 1); + REQUEST_SIZE_MATCH(xShmAttachFdReq); + LEGAL_NEW_RESOURCE(stuff->shmseg, client); + if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { + client->errorValue = stuff->readOnly; + return BadValue; + } + fd = ReadFdFromClient(client); + if (fd < 0) + return BadMatch; + + if (fstat(fd, &statb) < 0 || statb.st_size == 0) { + close(fd); + return BadMatch; + } + + shmdesc = malloc(sizeof(ShmDescRec)); + if (!shmdesc) { + close(fd); + return BadAlloc; + } + shmdesc->is_fd = TRUE; + shmdesc->addr = mmap(NULL, statb.st_size, + stuff->readOnly ? PROT_READ : PROT_READ|PROT_WRITE, + MAP_SHARED, + fd, 0); + + close(fd); + if ((shmdesc->addr == ((char *) -1))) { + free(shmdesc); + return BadAccess; + } + + shmdesc->refcnt = 1; + shmdesc->writable = !stuff->readOnly; + shmdesc->size = statb.st_size; + shmdesc->resource = stuff->shmseg; + + shmdesc->busfault = busfault_register_mmap(shmdesc->addr, shmdesc->size, ShmBusfaultNotify, shmdesc); + if (!shmdesc->busfault) { + munmap(shmdesc->addr, shmdesc->size); + free(shmdesc); + return BadAlloc; + } + + shmdesc->next = Shmsegs; + Shmsegs = shmdesc; + + if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc)) + return BadAlloc; + return Success; +} + +static int +shm_tmpfile(void) +{ +#ifdef SHMDIR + int fd; + int flags; + char template[] = SHMDIR "/shmfd-XXXXXX"; +#ifdef O_TMPFILE + fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); + if (fd >= 0) { + ErrorF ("Using O_TMPFILE\n"); + return fd; + } + ErrorF ("Not using O_TMPFILE\n"); +#endif + fd = mkstemp(template); + if (fd < 0) + return -1; + unlink(template); + if (fcntl(fd, F_GETFD, &flags) >= 0) { + flags |= FD_CLOEXEC; + (void) fcntl(fd, F_SETFD, &flags); + } + return fd; +#else + return -1; +#endif +} + +static int +ProcShmCreateSegment(ClientPtr client) +{ + int fd; + ShmDescPtr shmdesc; + REQUEST(xShmCreateSegmentReq); + xShmCreateSegmentReply rep = { + .type = X_Reply, + .nfd = 1, + .sequenceNumber = client->sequence, + .length = 0, + }; + + REQUEST_SIZE_MATCH(xShmCreateSegmentReq); + if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { + client->errorValue = stuff->readOnly; + return BadValue; + } + fd = shm_tmpfile(); + if (fd < 0) + return BadAlloc; + if (ftruncate(fd, stuff->size) < 0) { + close(fd); + return BadAlloc; + } + shmdesc = malloc(sizeof(ShmDescRec)); + if (!shmdesc) { + close(fd); + return BadAlloc; + } + shmdesc->is_fd = TRUE; + shmdesc->addr = mmap(NULL, stuff->size, + stuff->readOnly ? PROT_READ : PROT_READ|PROT_WRITE, + MAP_SHARED, + fd, 0); + + if ((shmdesc->addr == ((char *) -1))) { + close(fd); + free(shmdesc); + return BadAccess; + } + + shmdesc->refcnt = 1; + shmdesc->writable = !stuff->readOnly; + shmdesc->size = stuff->size; + + shmdesc->busfault = busfault_register_mmap(shmdesc->addr, shmdesc->size, ShmBusfaultNotify, shmdesc); + if (!shmdesc->busfault) { + close(fd); + munmap(shmdesc->addr, shmdesc->size); + free(shmdesc); + return BadAlloc; + } + + shmdesc->next = Shmsegs; + Shmsegs = shmdesc; + + if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc)) { + close(fd); + return BadAlloc; + } + + if (WriteFdToClient(client, fd, TRUE) < 0) { + FreeResource(stuff->shmseg, RT_NONE); + close(fd); + return BadAlloc; + } + WriteToClient(client, sizeof (xShmCreateSegmentReply), &rep); + return Success; +} +#endif /* SHM_FD_PASSING */ + +static int +ProcShmDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_ShmQueryVersion: + return ProcShmQueryVersion(client); + case X_ShmAttach: + return ProcShmAttach(client); + case X_ShmDetach: + return ProcShmDetach(client); + case X_ShmPutImage: +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return ProcPanoramiXShmPutImage(client); +#endif + return ProcShmPutImage(client); + case X_ShmGetImage: +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return ProcPanoramiXShmGetImage(client); +#endif + return ProcShmGetImage(client); + case X_ShmCreatePixmap: +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return ProcPanoramiXShmCreatePixmap(client); +#endif + return ProcShmCreatePixmap(client); +#ifdef SHM_FD_PASSING + case X_ShmAttachFd: + return ProcShmAttachFd(client); + case X_ShmCreateSegment: + return ProcShmCreateSegment(client); +#endif + default: + return BadRequest; + } +} + +static void +SShmCompletionEvent(xShmCompletionEvent * from, xShmCompletionEvent * to) +{ + to->type = from->type; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->drawable, to->drawable); + cpswaps(from->minorEvent, to->minorEvent); + to->majorEvent = from->majorEvent; + cpswapl(from->shmseg, to->shmseg); + cpswapl(from->offset, to->offset); +} + +static int +SProcShmQueryVersion(ClientPtr client) +{ + REQUEST(xShmQueryVersionReq); + + swaps(&stuff->length); + return ProcShmQueryVersion(client); +} + +static int +SProcShmAttach(ClientPtr client) +{ + REQUEST(xShmAttachReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShmAttachReq); + swapl(&stuff->shmseg); + swapl(&stuff->shmid); + return ProcShmAttach(client); +} + +static int +SProcShmDetach(ClientPtr client) +{ + REQUEST(xShmDetachReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShmDetachReq); + swapl(&stuff->shmseg); + return ProcShmDetach(client); +} + +static int +SProcShmPutImage(ClientPtr client) +{ + REQUEST(xShmPutImageReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShmPutImageReq); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->totalWidth); + swaps(&stuff->totalHeight); + swaps(&stuff->srcX); + swaps(&stuff->srcY); + swaps(&stuff->srcWidth); + swaps(&stuff->srcHeight); + swaps(&stuff->dstX); + swaps(&stuff->dstY); + swapl(&stuff->shmseg); + swapl(&stuff->offset); + return ProcShmPutImage(client); +} + +static int +SProcShmGetImage(ClientPtr client) +{ + REQUEST(xShmGetImageReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShmGetImageReq); + swapl(&stuff->drawable); + swaps(&stuff->x); + swaps(&stuff->y); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->planeMask); + swapl(&stuff->shmseg); + swapl(&stuff->offset); + return ProcShmGetImage(client); +} + +static int +SProcShmCreatePixmap(ClientPtr client) +{ + REQUEST(xShmCreatePixmapReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShmCreatePixmapReq); + swapl(&stuff->pid); + swapl(&stuff->drawable); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->shmseg); + swapl(&stuff->offset); + return ProcShmCreatePixmap(client); +} + +#ifdef SHM_FD_PASSING +static int +SProcShmAttachFd(ClientPtr client) +{ + REQUEST(xShmAttachFdReq); + SetReqFds(client, 1); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShmAttachFdReq); + swapl(&stuff->shmseg); + return ProcShmAttachFd(client); +} + +static int +SProcShmCreateSegment(ClientPtr client) +{ + REQUEST(xShmCreateSegmentReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xShmCreateSegmentReq); + swapl(&stuff->shmseg); + swapl(&stuff->size); + return ProcShmCreateSegment(client); +} +#endif /* SHM_FD_PASSING */ + +static int +SProcShmDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_ShmQueryVersion: + return SProcShmQueryVersion(client); + case X_ShmAttach: + return SProcShmAttach(client); + case X_ShmDetach: + return SProcShmDetach(client); + case X_ShmPutImage: + return SProcShmPutImage(client); + case X_ShmGetImage: + return SProcShmGetImage(client); + case X_ShmCreatePixmap: + return SProcShmCreatePixmap(client); +#ifdef SHM_FD_PASSING + case X_ShmAttachFd: + return SProcShmAttachFd(client); + case X_ShmCreateSegment: + return SProcShmCreateSegment(client); +#endif + default: + return BadRequest; + } +} + +void +ShmExtensionInit(void) +{ + ExtensionEntry *extEntry; + int i; + +#ifdef MUST_CHECK_FOR_SHM_SYSCALL + if (!CheckForShmSyscall()) { + ErrorF("MIT-SHM extension disabled due to lack of kernel support\n"); + return; + } +#endif + + if (!ShmRegisterPrivates()) + return; + + sharedPixmaps = xFalse; + { + sharedPixmaps = xTrue; + for (i = 0; i < screenInfo.numScreens; i++) { + ShmScrPrivateRec *screen_priv = + ShmInitScreenPriv(screenInfo.screens[i]); + if (!screen_priv->shmFuncs) + screen_priv->shmFuncs = &miFuncs; + if (!screen_priv->shmFuncs->CreatePixmap) + sharedPixmaps = xFalse; + } + if (sharedPixmaps) + for (i = 0; i < screenInfo.numScreens; i++) { + ShmScrPrivateRec *screen_priv = + ShmGetScreenPriv(screenInfo.screens[i]); + screen_priv->destroyPixmap = + screenInfo.screens[i]->DestroyPixmap; + screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap; + } + } + ShmSegType = CreateNewResourceType(ShmDetachSegment, "ShmSeg"); + if (ShmSegType && + (extEntry = AddExtension(SHMNAME, ShmNumberEvents, ShmNumberErrors, + ProcShmDispatch, SProcShmDispatch, + ShmResetProc, StandardMinorOpcode))) { + ShmReqCode = (unsigned char) extEntry->base; + ShmCompletionCode = extEntry->eventBase; + BadShmSegCode = extEntry->errorBase; + SetResourceTypeErrorValue(ShmSegType, BadShmSegCode); + EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent; + } +} diff --git a/Xext/shmint.h b/Xext/shmint.h new file mode 100644 index 0000000..9dadea7 --- /dev/null +++ b/Xext/shmint.h @@ -0,0 +1,93 @@ +/* + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _SHMINT_H_ +#define _SHMINT_H_ + +#include <X11/extensions/shmproto.h> + +#include "screenint.h" +#include "pixmap.h" +#include "gc.h" + +#define XSHM_PUT_IMAGE_ARGS \ + DrawablePtr /* dst */, \ + GCPtr /* pGC */, \ + int /* depth */, \ + unsigned int /* format */, \ + int /* w */, \ + int /* h */, \ + int /* sx */, \ + int /* sy */, \ + int /* sw */, \ + int /* sh */, \ + int /* dx */, \ + int /* dy */, \ + char * /* data */ + +#define XSHM_CREATE_PIXMAP_ARGS \ + ScreenPtr /* pScreen */, \ + int /* width */, \ + int /* height */, \ + int /* depth */, \ + char * /* addr */ + +typedef struct _ShmFuncs { + PixmapPtr (*CreatePixmap) (XSHM_CREATE_PIXMAP_ARGS); + void (*PutImage) (XSHM_PUT_IMAGE_ARGS); +} ShmFuncs, *ShmFuncsPtr; + +#if XTRANS_SEND_FDS +#define SHM_FD_PASSING 1 +#endif + +typedef struct _ShmDesc { + struct _ShmDesc *next; + int shmid; + int refcnt; + char *addr; + Bool writable; + unsigned long size; +#ifdef SHM_FD_PASSING + Bool is_fd; + struct busfault *busfault; + XID resource; +#endif +} ShmDescRec, *ShmDescPtr; + +#ifdef SHM_FD_PASSING +#define SHMDESC_IS_FD(shmdesc) ((shmdesc)->is_fd) +#else +#define SHMDESC_IS_FD(shmdesc) (0) +#endif + +extern _X_EXPORT void + ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); + +extern _X_EXPORT void + ShmRegisterFbFuncs(ScreenPtr pScreen); + +extern _X_EXPORT RESTYPE ShmSegType; +extern _X_EXPORT int ShmCompletionCode; +extern _X_EXPORT int BadShmSegCode; + +#endif /* _SHMINT_H_ */ diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c new file mode 100644 index 0000000..52e22b4 --- /dev/null +++ b/Xext/sleepuntil.c @@ -0,0 +1,209 @@ +/* + * +Copyright 1992, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + * + * Author: Keith Packard, MIT X Consortium + */ + +/* dixsleep.c - implement millisecond timeouts for X clients */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "sleepuntil.h" +#include <X11/X.h> +#include <X11/Xmd.h> +#include "misc.h" +#include "windowstr.h" +#include "dixstruct.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +typedef struct _Sertafied { + struct _Sertafied *next; + TimeStamp revive; + ClientPtr pClient; + XID id; + void (*notifyFunc) (ClientPtr /* client */ , + pointer /* closure */ + ); + + pointer closure; +} SertafiedRec, *SertafiedPtr; + +static SertafiedPtr pPending; +static RESTYPE SertafiedResType; +static Bool BlockHandlerRegistered; +static int SertafiedGeneration; + +static void ClientAwaken(ClientPtr /* client */ , + pointer /* closure */ + ); +static int SertafiedDelete(pointer /* value */ , + XID /* id */ + ); +static void SertafiedBlockHandler(pointer /* data */ , + OSTimePtr /* wt */ , + pointer /* LastSelectMask */ + ); +static void SertafiedWakeupHandler(pointer /* data */ , + int /* i */ , + pointer /* LastSelectMask */ + ); + +int +ClientSleepUntil(ClientPtr client, + TimeStamp *revive, + void (*notifyFunc) (ClientPtr, pointer), pointer closure) +{ + SertafiedPtr pRequest, pReq, pPrev; + + if (SertafiedGeneration != serverGeneration) { + SertafiedResType = CreateNewResourceType(SertafiedDelete, + "ClientSleep"); + if (!SertafiedResType) + return FALSE; + SertafiedGeneration = serverGeneration; + BlockHandlerRegistered = FALSE; + } + pRequest = malloc(sizeof(SertafiedRec)); + if (!pRequest) + return FALSE; + pRequest->pClient = client; + pRequest->revive = *revive; + pRequest->id = FakeClientID(client->index); + pRequest->closure = closure; + if (!BlockHandlerRegistered) { + if (!RegisterBlockAndWakeupHandlers(SertafiedBlockHandler, + SertafiedWakeupHandler, + (pointer) 0)) { + free(pRequest); + return FALSE; + } + BlockHandlerRegistered = TRUE; + } + pRequest->notifyFunc = 0; + if (!AddResource(pRequest->id, SertafiedResType, (pointer) pRequest)) + return FALSE; + if (!notifyFunc) + notifyFunc = ClientAwaken; + pRequest->notifyFunc = notifyFunc; + /* Insert into time-ordered queue, with earliest activation time coming first. */ + pPrev = 0; + for (pReq = pPending; pReq; pReq = pReq->next) { + if (CompareTimeStamps(pReq->revive, *revive) == LATER) + break; + pPrev = pReq; + } + if (pPrev) + pPrev->next = pRequest; + else + pPending = pRequest; + pRequest->next = pReq; + IgnoreClient(client); + return TRUE; +} + +static void +ClientAwaken(ClientPtr client, pointer closure) +{ + if (!client->clientGone) + AttendClient(client); +} + +static int +SertafiedDelete(pointer value, XID id) +{ + SertafiedPtr pRequest = (SertafiedPtr) value; + SertafiedPtr pReq, pPrev; + + pPrev = 0; + for (pReq = pPending; pReq; pPrev = pReq, pReq = pReq->next) + if (pReq == pRequest) { + if (pPrev) + pPrev->next = pReq->next; + else + pPending = pReq->next; + break; + } + if (pRequest->notifyFunc) + (*pRequest->notifyFunc) (pRequest->pClient, pRequest->closure); + free(pRequest); + return TRUE; +} + +static void +SertafiedBlockHandler(pointer data, OSTimePtr wt, pointer LastSelectMask) +{ + SertafiedPtr pReq, pNext; + unsigned long delay; + TimeStamp now; + + if (!pPending) + return; + now.milliseconds = GetTimeInMillis(); + now.months = currentTime.months; + if ((int) (now.milliseconds - currentTime.milliseconds) < 0) + now.months++; + for (pReq = pPending; pReq; pReq = pNext) { + pNext = pReq->next; + if (CompareTimeStamps(pReq->revive, now) == LATER) + break; + FreeResource(pReq->id, RT_NONE); + + /* AttendClient() may have been called via the resource delete + * function so a client may have input to be processed and so + * set delay to 0 to prevent blocking in WaitForSomething(). + */ + AdjustWaitForDelay(wt, 0); + } + pReq = pPending; + if (!pReq) + return; + delay = pReq->revive.milliseconds - now.milliseconds; + AdjustWaitForDelay(wt, delay); +} + +static void +SertafiedWakeupHandler(pointer data, int i, pointer LastSelectMask) +{ + SertafiedPtr pReq, pNext; + TimeStamp now; + + now.milliseconds = GetTimeInMillis(); + now.months = currentTime.months; + if ((int) (now.milliseconds - currentTime.milliseconds) < 0) + now.months++; + for (pReq = pPending; pReq; pReq = pNext) { + pNext = pReq->next; + if (CompareTimeStamps(pReq->revive, now) == LATER) + break; + FreeResource(pReq->id, RT_NONE); + } + if (!pPending) { + RemoveBlockAndWakeupHandlers(SertafiedBlockHandler, + SertafiedWakeupHandler, (pointer) 0); + BlockHandlerRegistered = FALSE; + } +} diff --git a/Xext/sleepuntil.h b/Xext/sleepuntil.h new file mode 100644 index 0000000..5c70848 --- /dev/null +++ b/Xext/sleepuntil.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the XFree86 Project shall + * not be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization from the + * XFree86 Project. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _SLEEPUNTIL_H_ +#define _SLEEPUNTIL_H_ 1 + +#include "dix.h" + +extern int ClientSleepUntil(ClientPtr client, + TimeStamp *revive, + void (*notifyFunc) (ClientPtr /* client */ , + pointer /* closure */ + ), pointer Closure); + +#endif diff --git a/Xext/sync.c b/Xext/sync.c new file mode 100644 index 0000000..c33b5b5 --- /dev/null +++ b/Xext/sync.c @@ -0,0 +1,2877 @@ +/* + +Copyright 1991, 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +Copyright 1991, 1993 by Digital Equipment Corporation, Maynard, Massachusetts, +and Olivetti Research Limited, Cambridge, England. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or Olivetti +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. Digital and Olivetti +make no representations about the suitability of this software +for any purpose. It is provided "as is" without express or implied warranty. + +DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <string.h> + +#include <X11/X.h> +#include <X11/Xproto.h> +#include <X11/Xmd.h> +#include "scrnintstr.h" +#include "os.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "pixmapstr.h" +#include "resource.h" +#include "opaque.h" +#include <X11/extensions/syncproto.h> +#include "syncsrv.h" +#include "syncsdk.h" +#include "protocol-versions.h" +#include "inputstr.h" + +#include <stdio.h> +#if !defined(WIN32) +#include <sys/time.h> +#endif + +#include "extinit.h" + +/* + * Local Global Variables + */ +static int SyncEventBase; +static int SyncErrorBase; +static RESTYPE RTCounter = 0; +static RESTYPE RTAwait; +static RESTYPE RTAlarm; +static RESTYPE RTAlarmClient; +static RESTYPE RTFence; +static struct xorg_list SysCounterList; +static int SyncNumInvalidCounterWarnings = 0; + +#define MAX_INVALID_COUNTER_WARNINGS 5 + +static const char *WARN_INVALID_COUNTER_COMPARE = + "Warning: Non-counter XSync object using Counter-only\n" + " comparison. Result will never be true.\n"; + +static const char *WARN_INVALID_COUNTER_ALARM = + "Warning: Non-counter XSync object used in alarm. This is\n" + " the result of a programming error in the X server.\n"; + +#define IsSystemCounter(pCounter) \ + (pCounter && (pCounter->sync.client == NULL)) + +/* these are all the alarm attributes that pertain to the alarm's trigger */ +#define XSyncCAAllTrigger \ + (XSyncCACounter | XSyncCAValueType | XSyncCAValue | XSyncCATestType) + +static void SyncComputeBracketValues(SyncCounter *); + +static void SyncInitServerTime(void); + +static void SyncInitIdleTime(void); + +static inline void* +SysCounterGetPrivate(SyncCounter *counter) +{ + BUG_WARN(!IsSystemCounter(counter)); + + return counter->pSysCounterInfo ? counter->pSysCounterInfo->private : NULL; +} + +static Bool +SyncCheckWarnIsCounter(const SyncObject * pSync, const char *warning) +{ + if (pSync && (SYNC_COUNTER != pSync->type)) { + if (SyncNumInvalidCounterWarnings++ < MAX_INVALID_COUNTER_WARNINGS) { + ErrorF("%s", warning); + ErrorF(" Counter type: %d\n", pSync->type); + } + + return FALSE; + } + + return TRUE; +} + +/* Each counter maintains a simple linked list of triggers that are + * interested in the counter. The two functions below are used to + * delete and add triggers on this list. + */ +void +SyncDeleteTriggerFromSyncObject(SyncTrigger * pTrigger) +{ + SyncTriggerList *pCur; + SyncTriggerList *pPrev; + SyncCounter *pCounter; + + /* pSync needs to be stored in pTrigger before calling here. */ + + if (!pTrigger->pSync) + return; + + pPrev = NULL; + pCur = pTrigger->pSync->pTriglist; + + while (pCur) { + if (pCur->pTrigger == pTrigger) { + if (pPrev) + pPrev->next = pCur->next; + else + pTrigger->pSync->pTriglist = pCur->next; + + free(pCur); + break; + } + + pPrev = pCur; + pCur = pCur->next; + } + + if (SYNC_COUNTER == pTrigger->pSync->type) { + pCounter = (SyncCounter *) pTrigger->pSync; + + if (IsSystemCounter(pCounter)) + SyncComputeBracketValues(pCounter); + } + else if (SYNC_FENCE == pTrigger->pSync->type) { + SyncFence *pFence = (SyncFence *) pTrigger->pSync; + + pFence->funcs.DeleteTrigger(pTrigger); + } +} + +int +SyncAddTriggerToSyncObject(SyncTrigger * pTrigger) +{ + SyncTriggerList *pCur; + SyncCounter *pCounter; + + if (!pTrigger->pSync) + return Success; + + /* don't do anything if it's already there */ + for (pCur = pTrigger->pSync->pTriglist; pCur; pCur = pCur->next) { + if (pCur->pTrigger == pTrigger) + return Success; + } + + if (!(pCur = malloc(sizeof(SyncTriggerList)))) + return BadAlloc; + + pCur->pTrigger = pTrigger; + pCur->next = pTrigger->pSync->pTriglist; + pTrigger->pSync->pTriglist = pCur; + + if (SYNC_COUNTER == pTrigger->pSync->type) { + pCounter = (SyncCounter *) pTrigger->pSync; + + if (IsSystemCounter(pCounter)) + SyncComputeBracketValues(pCounter); + } + else if (SYNC_FENCE == pTrigger->pSync->type) { + SyncFence *pFence = (SyncFence *) pTrigger->pSync; + + pFence->funcs.AddTrigger(pTrigger); + } + + return Success; +} + +/* Below are five possible functions that can be plugged into + * pTrigger->CheckTrigger for counter sync objects, corresponding to + * the four possible test-types, and the one possible function that + * can be plugged into pTrigger->CheckTrigger for fence sync objects. + * These functions are called after the sync object's state changes + * but are also passed the old state so they can inspect both the old + * and new values. (PositiveTransition and NegativeTransition need to + * see both pieces of information.) These functions return the truth + * value of the trigger. + * + * All of them include the condition pTrigger->pSync == NULL. + * This is because the spec says that a trigger with a sync value + * of None is always TRUE. + */ + +static Bool +SyncCheckTriggerPositiveComparison(SyncTrigger * pTrigger, CARD64 oldval) +{ + SyncCounter *pCounter; + + /* Non-counter sync objects should never get here because they + * never trigger this comparison. */ + if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) + return FALSE; + + pCounter = (SyncCounter *) pTrigger->pSync; + + return (pCounter == NULL || + XSyncValueGreaterOrEqual(pCounter->value, pTrigger->test_value)); +} + +static Bool +SyncCheckTriggerNegativeComparison(SyncTrigger * pTrigger, CARD64 oldval) +{ + SyncCounter *pCounter; + + /* Non-counter sync objects should never get here because they + * never trigger this comparison. */ + if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) + return FALSE; + + pCounter = (SyncCounter *) pTrigger->pSync; + + return (pCounter == NULL || + XSyncValueLessOrEqual(pCounter->value, pTrigger->test_value)); +} + +static Bool +SyncCheckTriggerPositiveTransition(SyncTrigger * pTrigger, CARD64 oldval) +{ + SyncCounter *pCounter; + + /* Non-counter sync objects should never get here because they + * never trigger this comparison. */ + if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) + return FALSE; + + pCounter = (SyncCounter *) pTrigger->pSync; + + return (pCounter == NULL || + (XSyncValueLessThan(oldval, pTrigger->test_value) && + XSyncValueGreaterOrEqual(pCounter->value, pTrigger->test_value))); +} + +static Bool +SyncCheckTriggerNegativeTransition(SyncTrigger * pTrigger, CARD64 oldval) +{ + SyncCounter *pCounter; + + /* Non-counter sync objects should never get here because they + * never trigger this comparison. */ + if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) + return FALSE; + + pCounter = (SyncCounter *) pTrigger->pSync; + + return (pCounter == NULL || + (XSyncValueGreaterThan(oldval, pTrigger->test_value) && + XSyncValueLessOrEqual(pCounter->value, pTrigger->test_value))); +} + +static Bool +SyncCheckTriggerFence(SyncTrigger * pTrigger, CARD64 unused) +{ + SyncFence *pFence = (SyncFence *) pTrigger->pSync; + + (void) unused; + + return (pFence == NULL || pFence->funcs.CheckTriggered(pFence)); +} + +static int +SyncInitTrigger(ClientPtr client, SyncTrigger * pTrigger, XID syncObject, + RESTYPE resType, Mask changes) +{ + SyncObject *pSync = pTrigger->pSync; + SyncCounter *pCounter = NULL; + int rc; + Bool newSyncObject = FALSE; + + if (changes & XSyncCACounter) { + if (syncObject == None) + pSync = NULL; + else if (Success != (rc = dixLookupResourceByType((pointer *) &pSync, + syncObject, resType, + client, + DixReadAccess))) { + client->errorValue = syncObject; + return rc; + } + if (pSync != pTrigger->pSync) { /* new counter for trigger */ + SyncDeleteTriggerFromSyncObject(pTrigger); + pTrigger->pSync = pSync; + newSyncObject = TRUE; + } + } + + /* if system counter, ask it what the current value is */ + + if (pSync && SYNC_COUNTER == pSync->type) { + pCounter = (SyncCounter *) pSync; + + if (IsSystemCounter(pCounter)) { + (*pCounter->pSysCounterInfo->QueryValue) ((pointer) pCounter, + &pCounter->value); + } + } + + if (changes & XSyncCAValueType) { + if (pTrigger->value_type != XSyncRelative && + pTrigger->value_type != XSyncAbsolute) { + client->errorValue = pTrigger->value_type; + return BadValue; + } + } + + if (changes & XSyncCATestType) { + + if (pSync && SYNC_FENCE == pSync->type) { + pTrigger->CheckTrigger = SyncCheckTriggerFence; + } + else { + /* select appropriate CheckTrigger function */ + + switch (pTrigger->test_type) { + case XSyncPositiveTransition: + pTrigger->CheckTrigger = SyncCheckTriggerPositiveTransition; + break; + case XSyncNegativeTransition: + pTrigger->CheckTrigger = SyncCheckTriggerNegativeTransition; + break; + case XSyncPositiveComparison: + pTrigger->CheckTrigger = SyncCheckTriggerPositiveComparison; + break; + case XSyncNegativeComparison: + pTrigger->CheckTrigger = SyncCheckTriggerNegativeComparison; + break; + default: + client->errorValue = pTrigger->test_type; + return BadValue; + } + } + } + + if (changes & (XSyncCAValueType | XSyncCAValue)) { + if (pTrigger->value_type == XSyncAbsolute) + pTrigger->test_value = pTrigger->wait_value; + else { /* relative */ + + Bool overflow; + + if (pCounter == NULL) + return BadMatch; + + XSyncValueAdd(&pTrigger->test_value, pCounter->value, + pTrigger->wait_value, &overflow); + if (overflow) { + client->errorValue = XSyncValueHigh32(pTrigger->wait_value); + return BadValue; + } + } + } + + /* we wait until we're sure there are no errors before registering + * a new counter on a trigger + */ + if (newSyncObject) { + if ((rc = SyncAddTriggerToSyncObject(pTrigger)) != Success) + return rc; + } + else if (pCounter && IsSystemCounter(pCounter)) { + SyncComputeBracketValues(pCounter); + } + + return Success; +} + +/* AlarmNotify events happen in response to actions taken on an Alarm or + * the counter used by the alarm. AlarmNotify may be sent to multiple + * clients. The alarm maintains a list of clients interested in events. + */ +static void +SyncSendAlarmNotifyEvents(SyncAlarm * pAlarm) +{ + SyncAlarmClientList *pcl; + xSyncAlarmNotifyEvent ane; + SyncTrigger *pTrigger = &pAlarm->trigger; + SyncCounter *pCounter; + + if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_ALARM)) + return; + + pCounter = (SyncCounter *) pTrigger->pSync; + + UpdateCurrentTime(); + + ane = (xSyncAlarmNotifyEvent) { + .type = SyncEventBase + XSyncAlarmNotify, + .kind = XSyncAlarmNotify, + .alarm = pAlarm->alarm_id, + .alarm_value_hi = XSyncValueHigh32(pTrigger->test_value), + .alarm_value_lo = XSyncValueLow32(pTrigger->test_value), + .time = currentTime.milliseconds, + .state = pAlarm->state + }; + + if (pTrigger->pSync && SYNC_COUNTER == pTrigger->pSync->type) { + ane.counter_value_hi = XSyncValueHigh32(pCounter->value); + ane.counter_value_lo = XSyncValueLow32(pCounter->value); + } + else { + /* XXX what else can we do if there's no counter? */ + ane.counter_value_hi = ane.counter_value_lo = 0; + } + + /* send to owner */ + if (pAlarm->events) + WriteEventsToClient(pAlarm->client, 1, (xEvent *) &ane); + + /* send to other interested clients */ + for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next) + WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); +} + +/* CounterNotify events only occur in response to an Await. The events + * go only to the Awaiting client. + */ +static void +SyncSendCounterNotifyEvents(ClientPtr client, SyncAwait ** ppAwait, + int num_events) +{ + xSyncCounterNotifyEvent *pEvents, *pev; + int i; + + if (client->clientGone) + return; + pev = pEvents = calloc(num_events, sizeof(xSyncCounterNotifyEvent)); + if (!pEvents) + return; + UpdateCurrentTime(); + for (i = 0; i < num_events; i++, ppAwait++, pev++) { + SyncTrigger *pTrigger = &(*ppAwait)->trigger; + + pev->type = SyncEventBase + XSyncCounterNotify; + pev->kind = XSyncCounterNotify; + pev->counter = pTrigger->pSync->id; + pev->wait_value_lo = XSyncValueLow32(pTrigger->test_value); + pev->wait_value_hi = XSyncValueHigh32(pTrigger->test_value); + if (SYNC_COUNTER == pTrigger->pSync->type) { + SyncCounter *pCounter = (SyncCounter *) pTrigger->pSync; + + pev->counter_value_lo = XSyncValueLow32(pCounter->value); + pev->counter_value_hi = XSyncValueHigh32(pCounter->value); + } + else { + pev->counter_value_lo = 0; + pev->counter_value_hi = 0; + } + + pev->time = currentTime.milliseconds; + pev->count = num_events - i - 1; /* events remaining */ + pev->destroyed = pTrigger->pSync->beingDestroyed; + } + /* swapping will be taken care of by this */ + WriteEventsToClient(client, num_events, (xEvent *) pEvents); + free(pEvents); +} + +/* This function is called when an alarm's counter is destroyed. + * It is plugged into pTrigger->CounterDestroyed (for alarm triggers). + */ +static void +SyncAlarmCounterDestroyed(SyncTrigger * pTrigger) +{ + SyncAlarm *pAlarm = (SyncAlarm *) pTrigger; + + pAlarm->state = XSyncAlarmInactive; + SyncSendAlarmNotifyEvents(pAlarm); + pTrigger->pSync = NULL; +} + +/* This function is called when an alarm "goes off." + * It is plugged into pTrigger->TriggerFired (for alarm triggers). + */ +static void +SyncAlarmTriggerFired(SyncTrigger * pTrigger) +{ + SyncAlarm *pAlarm = (SyncAlarm *) pTrigger; + SyncCounter *pCounter; + CARD64 new_test_value; + + if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_ALARM)) + return; + + pCounter = (SyncCounter *) pTrigger->pSync; + + /* no need to check alarm unless it's active */ + if (pAlarm->state != XSyncAlarmActive) + return; + + /* " if the counter value is None, or if the delta is 0 and + * the test-type is PositiveComparison or NegativeComparison, + * no change is made to value (test-value) and the alarm + * state is changed to Inactive before the event is generated." + */ + if (pCounter == NULL || (XSyncValueIsZero(pAlarm->delta) + && (pAlarm->trigger.test_type == + XSyncPositiveComparison || + pAlarm->trigger.test_type == + XSyncNegativeComparison))) + pAlarm->state = XSyncAlarmInactive; + + new_test_value = pAlarm->trigger.test_value; + + if (pAlarm->state == XSyncAlarmActive) { + Bool overflow; + CARD64 oldvalue; + SyncTrigger *paTrigger = &pAlarm->trigger; + SyncCounter *paCounter; + + if (!SyncCheckWarnIsCounter(paTrigger->pSync, + WARN_INVALID_COUNTER_ALARM)) + return; + + paCounter = (SyncCounter *) pTrigger->pSync; + + /* "The alarm is updated by repeatedly adding delta to the + * value of the trigger and re-initializing it until it + * becomes FALSE." + */ + oldvalue = paTrigger->test_value; + + /* XXX really should do something smarter here */ + + do { + XSyncValueAdd(&paTrigger->test_value, paTrigger->test_value, + pAlarm->delta, &overflow); + } while (!overflow && + (*paTrigger->CheckTrigger) (paTrigger, paCounter->value)); + + new_test_value = paTrigger->test_value; + paTrigger->test_value = oldvalue; + + /* "If this update would cause value to fall outside the range + * for an INT64...no change is made to value (test-value) and + * the alarm state is changed to Inactive before the event is + * generated." + */ + if (overflow) { + new_test_value = oldvalue; + pAlarm->state = XSyncAlarmInactive; + } + } + /* The AlarmNotify event has to have the "new state of the alarm" + * which we can't be sure of until this point. However, it has + * to have the "old" trigger test value. That's the reason for + * all the newvalue/oldvalue shuffling above. After we send the + * events, give the trigger its new test value. + */ + SyncSendAlarmNotifyEvents(pAlarm); + pTrigger->test_value = new_test_value; +} + +/* This function is called when an Await unblocks, either as a result + * of the trigger firing OR the counter being destroyed. + * It goes into pTrigger->TriggerFired AND pTrigger->CounterDestroyed + * (for Await triggers). + */ +static void +SyncAwaitTriggerFired(SyncTrigger * pTrigger) +{ + SyncAwait *pAwait = (SyncAwait *) pTrigger; + int numwaits; + SyncAwaitUnion *pAwaitUnion; + SyncAwait **ppAwait; + int num_events = 0; + + pAwaitUnion = (SyncAwaitUnion *) pAwait->pHeader; + numwaits = pAwaitUnion->header.num_waitconditions; + ppAwait = malloc(numwaits * sizeof(SyncAwait *)); + if (!ppAwait) + goto bail; + + pAwait = &(pAwaitUnion + 1)->await; + + /* "When a client is unblocked, all the CounterNotify events for + * the Await request are generated contiguously. If count is 0 + * there are no more events to follow for this request. If + * count is n, there are at least n more events to follow." + * + * Thus, it is best to find all the counters for which events + * need to be sent first, so that an accurate count field can + * be stored in the events. + */ + for (; numwaits; numwaits--, pAwait++) { + CARD64 diff; + Bool overflow, diffgreater, diffequal; + + /* "A CounterNotify event with the destroyed flag set to TRUE is + * always generated if the counter for one of the triggers is + * destroyed." + */ + if (pAwait->trigger.pSync->beingDestroyed) { + ppAwait[num_events++] = pAwait; + continue; + } + + if (SYNC_COUNTER == pAwait->trigger.pSync->type) { + SyncCounter *pCounter = (SyncCounter *) pAwait->trigger.pSync; + + /* "The difference between the counter and the test value is + * calculated by subtracting the test value from the value of + * the counter." + */ + XSyncValueSubtract(&diff, pCounter->value, + pAwait->trigger.test_value, &overflow); + + /* "If the difference lies outside the range for an INT64, an + * event is not generated." + */ + if (overflow) + continue; + diffgreater = XSyncValueGreaterThan(diff, pAwait->event_threshold); + diffequal = XSyncValueEqual(diff, pAwait->event_threshold); + + /* "If the test-type is PositiveTransition or + * PositiveComparison, a CounterNotify event is generated if + * the difference is at least event-threshold. If the test-type + * is NegativeTransition or NegativeComparison, a CounterNotify + * event is generated if the difference is at most + * event-threshold." + */ + + if (((pAwait->trigger.test_type == XSyncPositiveComparison || + pAwait->trigger.test_type == XSyncPositiveTransition) + && (diffgreater || diffequal)) + || + ((pAwait->trigger.test_type == XSyncNegativeComparison || + pAwait->trigger.test_type == XSyncNegativeTransition) + && (!diffgreater) /* less or equal */ + ) + ) { + ppAwait[num_events++] = pAwait; + } + } + } + if (num_events) + SyncSendCounterNotifyEvents(pAwaitUnion->header.client, ppAwait, + num_events); + free(ppAwait); + + bail: + /* unblock the client */ + AttendClient(pAwaitUnion->header.client); + /* delete the await */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); +} + +static CARD64 +SyncUpdateCounter(SyncCounter *pCounter, CARD64 newval) +{ + CARD64 oldval = pCounter->value; + pCounter->value = newval; + return oldval; +} + +/* This function should always be used to change a counter's value so that + * any triggers depending on the counter will be checked. + */ +void +SyncChangeCounter(SyncCounter * pCounter, CARD64 newval) +{ + SyncTriggerList *ptl, *pnext; + CARD64 oldval; + + oldval = SyncUpdateCounter(pCounter, newval); + + /* run through triggers to see if any become true */ + for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) { + pnext = ptl->next; + if ((*ptl->pTrigger->CheckTrigger) (ptl->pTrigger, oldval)) + (*ptl->pTrigger->TriggerFired) (ptl->pTrigger); + } + + if (IsSystemCounter(pCounter)) { + SyncComputeBracketValues(pCounter); + } +} + +/* loosely based on dix/events.c/EventSelectForWindow */ +static Bool +SyncEventSelectForAlarm(SyncAlarm * pAlarm, ClientPtr client, Bool wantevents) +{ + SyncAlarmClientList *pClients; + + if (client == pAlarm->client) { /* alarm owner */ + pAlarm->events = wantevents; + return Success; + } + + /* see if the client is already on the list (has events selected) */ + + for (pClients = pAlarm->pEventClients; pClients; pClients = pClients->next) { + if (pClients->client == client) { + /* client's presence on the list indicates desire for + * events. If the client doesn't want events, remove it + * from the list. If the client does want events, do + * nothing, since it's already got them. + */ + if (!wantevents) { + FreeResource(pClients->delete_id, RT_NONE); + } + return Success; + } + } + + /* if we get here, this client does not currently have + * events selected on the alarm + */ + + if (!wantevents) + /* client doesn't want events, and we just discovered that it + * doesn't have them, so there's nothing to do. + */ + return Success; + + /* add new client to pAlarm->pEventClients */ + + pClients = malloc(sizeof(SyncAlarmClientList)); + if (!pClients) + return BadAlloc; + + /* register it as a resource so it will be cleaned up + * if the client dies + */ + + pClients->delete_id = FakeClientID(client->index); + + /* link it into list after we know all the allocations succeed */ + pClients->next = pAlarm->pEventClients; + pAlarm->pEventClients = pClients; + pClients->client = client; + + if (!AddResource(pClients->delete_id, RTAlarmClient, pAlarm)) + return BadAlloc; + + return Success; +} + +/* + * ** SyncChangeAlarmAttributes ** This is used by CreateAlarm and ChangeAlarm + */ +static int +SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm * pAlarm, Mask mask, + CARD32 *values) +{ + int status; + XSyncCounter counter; + Mask origmask = mask; + + counter = pAlarm->trigger.pSync ? pAlarm->trigger.pSync->id : None; + + while (mask) { + int index2 = lowbit(mask); + + mask &= ~index2; + switch (index2) { + case XSyncCACounter: + mask &= ~XSyncCACounter; + /* sanity check in SyncInitTrigger */ + counter = *values++; + break; + + case XSyncCAValueType: + mask &= ~XSyncCAValueType; + /* sanity check in SyncInitTrigger */ + pAlarm->trigger.value_type = *values++; + break; + + case XSyncCAValue: + mask &= ~XSyncCAValue; + XSyncIntsToValue(&pAlarm->trigger.wait_value, values[1], values[0]); + values += 2; + break; + + case XSyncCATestType: + mask &= ~XSyncCATestType; + /* sanity check in SyncInitTrigger */ + pAlarm->trigger.test_type = *values++; + break; + + case XSyncCADelta: + mask &= ~XSyncCADelta; + XSyncIntsToValue(&pAlarm->delta, values[1], values[0]); + values += 2; + break; + + case XSyncCAEvents: + mask &= ~XSyncCAEvents; + if ((*values != xTrue) && (*values != xFalse)) { + client->errorValue = *values; + return BadValue; + } + status = SyncEventSelectForAlarm(pAlarm, client, + (Bool) (*values++)); + if (status != Success) + return status; + break; + + default: + client->errorValue = mask; + return BadValue; + } + } + + /* "If the test-type is PositiveComparison or PositiveTransition + * and delta is less than zero, or if the test-type is + * NegativeComparison or NegativeTransition and delta is + * greater than zero, a Match error is generated." + */ + if (origmask & (XSyncCADelta | XSyncCATestType)) { + CARD64 zero; + + XSyncIntToValue(&zero, 0); + if ((((pAlarm->trigger.test_type == XSyncPositiveComparison) || + (pAlarm->trigger.test_type == XSyncPositiveTransition)) + && XSyncValueLessThan(pAlarm->delta, zero)) + || + (((pAlarm->trigger.test_type == XSyncNegativeComparison) || + (pAlarm->trigger.test_type == XSyncNegativeTransition)) + && XSyncValueGreaterThan(pAlarm->delta, zero)) + ) { + return BadMatch; + } + } + + /* postpone this until now, when we're sure nothing else can go wrong */ + if ((status = SyncInitTrigger(client, &pAlarm->trigger, counter, RTCounter, + origmask & XSyncCAAllTrigger)) != Success) + return status; + + /* XXX spec does not really say to do this - needs clarification */ + pAlarm->state = XSyncAlarmActive; + return Success; +} + +static SyncObject * +SyncCreate(ClientPtr client, XID id, unsigned char type) +{ + SyncObject *pSync; + + switch (type) { + case SYNC_COUNTER: + pSync = malloc(sizeof(SyncCounter)); + break; + case SYNC_FENCE: + pSync = (SyncObject *) dixAllocateObjectWithPrivates(SyncFence, + PRIVATE_SYNC_FENCE); + break; + default: + return NULL; + } + + if (!pSync) + return NULL; + + pSync->client = client; + pSync->id = id; + pSync->pTriglist = NULL; + pSync->beingDestroyed = FALSE; + pSync->type = type; + + return pSync; +} + +int +SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered) +{ +#if HAVE_XSHMFENCE + SyncFence *pFence; + int status; + + pFence = (SyncFence *) SyncCreate(client, id, SYNC_FENCE); + if (!pFence) + return BadAlloc; + + status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered); + if (status != Success) { + dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE); + return status; + } + + if (!AddResource(id, RTFence, (pointer) pFence)) + return BadAlloc; + + return Success; +#else + return BadImplementation; +#endif +} + +int +SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *pFence) +{ +#if HAVE_XSHMFENCE + return miSyncFDFromFence(pDraw, pFence); +#else + return BadImplementation; +#endif +} + +static SyncCounter * +SyncCreateCounter(ClientPtr client, XSyncCounter id, CARD64 initialvalue) +{ + SyncCounter *pCounter; + + if (!(pCounter = (SyncCounter *) SyncCreate(client, id, SYNC_COUNTER))) + return NULL; + + pCounter->value = initialvalue; + pCounter->pSysCounterInfo = NULL; + + if (!AddResource(id, RTCounter, (pointer) pCounter)) + return NULL; + + return pCounter; +} + +static int FreeCounter(void *, XID); + +/* + * ***** System Counter utilities + */ + +SyncCounter* +SyncCreateSystemCounter(const char *name, + CARD64 initial, + CARD64 resolution, + SyncCounterType counterType, + SyncSystemCounterQueryValue QueryValue, + SyncSystemCounterBracketValues BracketValues + ) +{ + SyncCounter *pCounter; + + /* this function may be called before SYNC has been initialized, so we + * have to make sure RTCounter is created. + */ + if (RTCounter == 0) { + RTCounter = CreateNewResourceType(FreeCounter, "SyncCounter"); + if (RTCounter == 0) { + return NULL; + } + xorg_list_init(&SysCounterList); + } + + pCounter = SyncCreateCounter(NULL, FakeClientID(0), initial); + + if (pCounter) { + SysCounterInfo *psci; + + psci = malloc(sizeof(SysCounterInfo)); + if (!psci) { + FreeResource(pCounter->sync.id, RT_NONE); + return pCounter; + } + pCounter->pSysCounterInfo = psci; + psci->pCounter = pCounter; + psci->name = strdup(name); + psci->resolution = resolution; + psci->counterType = counterType; + psci->QueryValue = QueryValue; + psci->BracketValues = BracketValues; + psci->private = NULL; + XSyncMaxValue(&psci->bracket_greater); + XSyncMinValue(&psci->bracket_less); + xorg_list_add(&psci->entry, &SysCounterList); + } + return pCounter; +} + +void +SyncDestroySystemCounter(pointer pSysCounter) +{ + SyncCounter *pCounter = (SyncCounter *) pSysCounter; + + FreeResource(pCounter->sync.id, RT_NONE); +} + +static void +SyncComputeBracketValues(SyncCounter * pCounter) +{ + SyncTriggerList *pCur; + SyncTrigger *pTrigger; + SysCounterInfo *psci; + CARD64 *pnewgtval = NULL; + CARD64 *pnewltval = NULL; + SyncCounterType ct; + + if (!pCounter) + return; + + psci = pCounter->pSysCounterInfo; + ct = pCounter->pSysCounterInfo->counterType; + if (ct == XSyncCounterNeverChanges) + return; + + XSyncMaxValue(&psci->bracket_greater); + XSyncMinValue(&psci->bracket_less); + + for (pCur = pCounter->sync.pTriglist; pCur; pCur = pCur->next) { + pTrigger = pCur->pTrigger; + + if (pTrigger->test_type == XSyncPositiveComparison && + ct != XSyncCounterNeverIncreases) { + if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, + psci->bracket_greater)) { + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; + } + else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) { + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; + } + } + else if (pTrigger->test_type == XSyncNegativeComparison && + ct != XSyncCounterNeverDecreases) { + if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, + psci->bracket_less)) { + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; + } + else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) { + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; + } + } + else if (pTrigger->test_type == XSyncNegativeTransition && + ct != XSyncCounterNeverIncreases) { + if (XSyncValueGreaterOrEqual(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) { + /* + * If the value is exactly equal to our threshold, we want one + * more event in the negative direction to ensure we pick up + * when the value is less than this threshold. + */ + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; + } + else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) { + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; + } + } + else if (pTrigger->test_type == XSyncPositiveTransition && + ct != XSyncCounterNeverDecreases) { + if (XSyncValueLessOrEqual(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) { + /* + * If the value is exactly equal to our threshold, we + * want one more event in the positive direction to + * ensure we pick up when the value *exceeds* this + * threshold. + */ + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; + } + else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) { + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; + } + } + } /* end for each trigger */ + + (*psci->BracketValues) ((pointer) pCounter, pnewltval, pnewgtval); + +} + +/* + * ***** Resource delete functions + */ + +/* ARGSUSED */ +static int +FreeAlarm(void *addr, XID id) +{ + SyncAlarm *pAlarm = (SyncAlarm *) addr; + + pAlarm->state = XSyncAlarmDestroyed; + + SyncSendAlarmNotifyEvents(pAlarm); + + /* delete event selections */ + + while (pAlarm->pEventClients) + FreeResource(pAlarm->pEventClients->delete_id, RT_NONE); + + SyncDeleteTriggerFromSyncObject(&pAlarm->trigger); + + free(pAlarm); + return Success; +} + +/* + * ** Cleanup after the destruction of a Counter + */ +/* ARGSUSED */ +static int +FreeCounter(void *env, XID id) +{ + SyncCounter *pCounter = (SyncCounter *) env; + SyncTriggerList *ptl, *pnext; + + pCounter->sync.beingDestroyed = TRUE; + /* tell all the counter's triggers that the counter has been destroyed */ + for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) { + (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger); + pnext = ptl->next; + free(ptl); /* destroy the trigger list as we go */ + } + if (IsSystemCounter(pCounter)) { + xorg_list_del(&pCounter->pSysCounterInfo->entry); + free(pCounter->pSysCounterInfo->name); + free(pCounter->pSysCounterInfo->private); + free(pCounter->pSysCounterInfo); + } + free(pCounter); + return Success; +} + +/* + * ** Cleanup after Await + */ +/* ARGSUSED */ +static int +FreeAwait(void *addr, XID id) +{ + SyncAwaitUnion *pAwaitUnion = (SyncAwaitUnion *) addr; + SyncAwait *pAwait; + int numwaits; + + pAwait = &(pAwaitUnion + 1)->await; /* first await on list */ + + /* remove triggers from counters */ + + for (numwaits = pAwaitUnion->header.num_waitconditions; numwaits; + numwaits--, pAwait++) { + /* If the counter is being destroyed, FreeCounter will delete + * the trigger list itself, so don't do it here. + */ + SyncObject *pSync = pAwait->trigger.pSync; + + if (pSync && !pSync->beingDestroyed) + SyncDeleteTriggerFromSyncObject(&pAwait->trigger); + } + free(pAwaitUnion); + return Success; +} + +/* loosely based on dix/events.c/OtherClientGone */ +static int +FreeAlarmClient(void *value, XID id) +{ + SyncAlarm *pAlarm = (SyncAlarm *) value; + SyncAlarmClientList *pCur, *pPrev; + + for (pPrev = NULL, pCur = pAlarm->pEventClients; + pCur; pPrev = pCur, pCur = pCur->next) { + if (pCur->delete_id == id) { + if (pPrev) + pPrev->next = pCur->next; + else + pAlarm->pEventClients = pCur->next; + free(pCur); + return Success; + } + } + FatalError("alarm client not on event list"); + /*NOTREACHED*/} + +/* + * ***** Proc functions + */ + +/* + * ** Initialize the extension + */ +static int +ProcSyncInitialize(ClientPtr client) +{ + xSyncInitializeReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_SYNC_MAJOR_VERSION, + .minorVersion = SERVER_SYNC_MINOR_VERSION, + }; + + REQUEST_SIZE_MATCH(xSyncInitializeReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + } + WriteToClient(client, sizeof(rep), &rep); + return Success; +} + +/* + * ** Get list of system counters available through the extension + */ +static int +ProcSyncListSystemCounters(ClientPtr client) +{ + xSyncListSystemCountersReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .nCounters = 0, + }; + SysCounterInfo *psci; + int len = 0; + xSyncSystemCounter *list = NULL, *walklist = NULL; + + REQUEST_SIZE_MATCH(xSyncListSystemCountersReq); + + xorg_list_for_each_entry(psci, &SysCounterList, entry) { + /* pad to 4 byte boundary */ + len += pad_to_int32(sz_xSyncSystemCounter + strlen(psci->name)); + ++rep.nCounters; + } + + if (len) { + walklist = list = malloc(len); + if (!list) + return BadAlloc; + } + + rep.length = bytes_to_int32(len); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.nCounters); + } + + xorg_list_for_each_entry(psci, &SysCounterList, entry) { + int namelen; + char *pname_in_reply; + + walklist->counter = psci->pCounter->sync.id; + walklist->resolution_hi = XSyncValueHigh32(psci->resolution); + walklist->resolution_lo = XSyncValueLow32(psci->resolution); + namelen = strlen(psci->name); + walklist->name_length = namelen; + + if (client->swapped) { + swapl(&walklist->counter); + swapl(&walklist->resolution_hi); + swapl(&walklist->resolution_lo); + swaps(&walklist->name_length); + } + + pname_in_reply = ((char *) walklist) + sz_xSyncSystemCounter; + strncpy(pname_in_reply, psci->name, namelen); + walklist = (xSyncSystemCounter *) (((char *) walklist) + + pad_to_int32(sz_xSyncSystemCounter + + namelen)); + } + + WriteToClient(client, sizeof(rep), &rep); + if (len) { + WriteToClient(client, len, list); + free(list); + } + + return Success; +} + +/* + * ** Set client Priority + */ +static int +ProcSyncSetPriority(ClientPtr client) +{ + REQUEST(xSyncSetPriorityReq); + ClientPtr priorityclient; + int rc; + + REQUEST_SIZE_MATCH(xSyncSetPriorityReq); + + if (stuff->id == None) + priorityclient = client; + else { + rc = dixLookupClient(&priorityclient, stuff->id, client, + DixSetAttrAccess); + if (rc != Success) + return rc; + } + + if (priorityclient->priority != stuff->priority) { + priorityclient->priority = stuff->priority; + + /* The following will force the server back into WaitForSomething + * so that the change in this client's priority is immediately + * reflected. + */ + isItTimeToYield = TRUE; + dispatchException |= DE_PRIORITYCHANGE; + } + return Success; +} + +/* + * ** Get client Priority + */ +static int +ProcSyncGetPriority(ClientPtr client) +{ + REQUEST(xSyncGetPriorityReq); + xSyncGetPriorityReply rep; + ClientPtr priorityclient; + int rc; + + REQUEST_SIZE_MATCH(xSyncGetPriorityReq); + + if (stuff->id == None) + priorityclient = client; + else { + rc = dixLookupClient(&priorityclient, stuff->id, client, + DixGetAttrAccess); + if (rc != Success) + return rc; + } + + rep = (xSyncGetPriorityReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .priority = priorityclient->priority + }; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.priority); + } + + WriteToClient(client, sizeof(xSyncGetPriorityReply), &rep); + + return Success; +} + +/* + * ** Create a new counter + */ +static int +ProcSyncCreateCounter(ClientPtr client) +{ + REQUEST(xSyncCreateCounterReq); + CARD64 initial; + + REQUEST_SIZE_MATCH(xSyncCreateCounterReq); + + LEGAL_NEW_RESOURCE(stuff->cid, client); + + XSyncIntsToValue(&initial, stuff->initial_value_lo, + stuff->initial_value_hi); + if (!SyncCreateCounter(client, stuff->cid, initial)) + return BadAlloc; + + return Success; +} + +/* + * ** Set Counter value + */ +static int +ProcSyncSetCounter(ClientPtr client) +{ + REQUEST(xSyncSetCounterReq); + SyncCounter *pCounter; + CARD64 newvalue; + int rc; + + REQUEST_SIZE_MATCH(xSyncSetCounterReq); + + rc = dixLookupResourceByType((pointer *) &pCounter, stuff->cid, RTCounter, + client, DixWriteAccess); + if (rc != Success) + return rc; + + if (IsSystemCounter(pCounter)) { + client->errorValue = stuff->cid; + return BadAccess; + } + + XSyncIntsToValue(&newvalue, stuff->value_lo, stuff->value_hi); + SyncChangeCounter(pCounter, newvalue); + return Success; +} + +/* + * ** Change Counter value + */ +static int +ProcSyncChangeCounter(ClientPtr client) +{ + REQUEST(xSyncChangeCounterReq); + SyncCounter *pCounter; + CARD64 newvalue; + Bool overflow; + int rc; + + REQUEST_SIZE_MATCH(xSyncChangeCounterReq); + + rc = dixLookupResourceByType((pointer *) &pCounter, stuff->cid, RTCounter, + client, DixWriteAccess); + if (rc != Success) + return rc; + + if (IsSystemCounter(pCounter)) { + client->errorValue = stuff->cid; + return BadAccess; + } + + XSyncIntsToValue(&newvalue, stuff->value_lo, stuff->value_hi); + XSyncValueAdd(&newvalue, pCounter->value, newvalue, &overflow); + if (overflow) { + /* XXX 64 bit value can't fit in 32 bits; do the best we can */ + client->errorValue = stuff->value_hi; + return BadValue; + } + SyncChangeCounter(pCounter, newvalue); + return Success; +} + +/* + * ** Destroy a counter + */ +static int +ProcSyncDestroyCounter(ClientPtr client) +{ + REQUEST(xSyncDestroyCounterReq); + SyncCounter *pCounter; + int rc; + + REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); + + rc = dixLookupResourceByType((pointer *) &pCounter, stuff->counter, + RTCounter, client, DixDestroyAccess); + if (rc != Success) + return rc; + + if (IsSystemCounter(pCounter)) { + client->errorValue = stuff->counter; + return BadAccess; + } + FreeResource(pCounter->sync.id, RT_NONE); + return Success; +} + +static SyncAwaitUnion * +SyncAwaitPrologue(ClientPtr client, int items) +{ + SyncAwaitUnion *pAwaitUnion; + + /* all the memory for the entire await list is allocated + * here in one chunk + */ + pAwaitUnion = malloc((items + 1) * sizeof(SyncAwaitUnion)); + if (!pAwaitUnion) + return NULL; + + /* first item is the header, remainder are real wait conditions */ + + pAwaitUnion->header.delete_id = FakeClientID(client->index); + pAwaitUnion->header.client = client; + pAwaitUnion->header.num_waitconditions = 0; + + if (!AddResource(pAwaitUnion->header.delete_id, RTAwait, pAwaitUnion)) + return NULL; + + return pAwaitUnion; +} + +static void +SyncAwaitEpilogue(ClientPtr client, int items, SyncAwaitUnion * pAwaitUnion) +{ + SyncAwait *pAwait; + int i; + + IgnoreClient(client); + + /* see if any of the triggers are already true */ + + pAwait = &(pAwaitUnion + 1)->await; /* skip over header */ + for (i = 0; i < items; i++, pAwait++) { + CARD64 value; + + /* don't have to worry about NULL counters because the request + * errors before we get here out if they occur + */ + switch (pAwait->trigger.pSync->type) { + case SYNC_COUNTER: + value = ((SyncCounter *) pAwait->trigger.pSync)->value; + break; + default: + XSyncIntToValue(&value, 0); + } + + if ((*pAwait->trigger.CheckTrigger) (&pAwait->trigger, value)) { + (*pAwait->trigger.TriggerFired) (&pAwait->trigger); + break; /* once is enough */ + } + } +} + +/* + * ** Await + */ +static int +ProcSyncAwait(ClientPtr client) +{ + REQUEST(xSyncAwaitReq); + int len, items; + int i; + xSyncWaitCondition *pProtocolWaitConds; + SyncAwaitUnion *pAwaitUnion; + SyncAwait *pAwait; + int status; + + REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); + + len = client->req_len << 2; + len -= sz_xSyncAwaitReq; + items = len / sz_xSyncWaitCondition; + + if (items * sz_xSyncWaitCondition != len) { + return BadLength; + } + if (items == 0) { + client->errorValue = items; /* XXX protocol change */ + return BadValue; + } + + if (!(pAwaitUnion = SyncAwaitPrologue(client, items))) + return BadAlloc; + + /* don't need to do any more memory allocation for this request! */ + + pProtocolWaitConds = (xSyncWaitCondition *) &stuff[1]; + + pAwait = &(pAwaitUnion + 1)->await; /* skip over header */ + for (i = 0; i < items; i++, pProtocolWaitConds++, pAwait++) { + if (pProtocolWaitConds->counter == None) { /* XXX protocol change */ + /* this should take care of removing any triggers created by + * this request that have already been registered on sync objects + */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); + client->errorValue = pProtocolWaitConds->counter; + return SyncErrorBase + XSyncBadCounter; + } + + /* sanity checks are in SyncInitTrigger */ + pAwait->trigger.pSync = NULL; + pAwait->trigger.value_type = pProtocolWaitConds->value_type; + XSyncIntsToValue(&pAwait->trigger.wait_value, + pProtocolWaitConds->wait_value_lo, + pProtocolWaitConds->wait_value_hi); + pAwait->trigger.test_type = pProtocolWaitConds->test_type; + + status = SyncInitTrigger(client, &pAwait->trigger, + pProtocolWaitConds->counter, RTCounter, + XSyncCAAllTrigger); + if (status != Success) { + /* this should take care of removing any triggers created by + * this request that have already been registered on sync objects + */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); + return status; + } + /* this is not a mistake -- same function works for both cases */ + pAwait->trigger.TriggerFired = SyncAwaitTriggerFired; + pAwait->trigger.CounterDestroyed = SyncAwaitTriggerFired; + XSyncIntsToValue(&pAwait->event_threshold, + pProtocolWaitConds->event_threshold_lo, + pProtocolWaitConds->event_threshold_hi); + pAwait->pHeader = &pAwaitUnion->header; + pAwaitUnion->header.num_waitconditions++; + } + + SyncAwaitEpilogue(client, items, pAwaitUnion); + + return Success; +} + +/* + * ** Query a counter + */ +static int +ProcSyncQueryCounter(ClientPtr client) +{ + REQUEST(xSyncQueryCounterReq); + xSyncQueryCounterReply rep; + SyncCounter *pCounter; + int rc; + + REQUEST_SIZE_MATCH(xSyncQueryCounterReq); + + rc = dixLookupResourceByType((pointer *) &pCounter, stuff->counter, + RTCounter, client, DixReadAccess); + if (rc != Success) + return rc; + + /* if system counter, ask it what the current value is */ + if (IsSystemCounter(pCounter)) { + (*pCounter->pSysCounterInfo->QueryValue) ((pointer) pCounter, + &pCounter->value); + } + + rep = (xSyncQueryCounterReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .value_hi = XSyncValueHigh32(pCounter->value), + .value_lo = XSyncValueLow32(pCounter->value) + }; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.value_hi); + swapl(&rep.value_lo); + } + WriteToClient(client, sizeof(xSyncQueryCounterReply), &rep); + return Success; +} + +/* + * ** Create Alarm + */ +static int +ProcSyncCreateAlarm(ClientPtr client) +{ + REQUEST(xSyncCreateAlarmReq); + SyncAlarm *pAlarm; + int status; + unsigned long len, vmask; + SyncTrigger *pTrigger; + + REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); + + LEGAL_NEW_RESOURCE(stuff->id, client); + + vmask = stuff->valueMask; + len = client->req_len - bytes_to_int32(sizeof(xSyncCreateAlarmReq)); + /* the "extra" call to Ones accounts for the presence of 64 bit values */ + if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue | XSyncCADelta)))) + return BadLength; + + if (!(pAlarm = malloc(sizeof(SyncAlarm)))) { + return BadAlloc; + } + + /* set up defaults */ + + pTrigger = &pAlarm->trigger; + pTrigger->pSync = NULL; + pTrigger->value_type = XSyncAbsolute; + XSyncIntToValue(&pTrigger->wait_value, 0L); + pTrigger->test_type = XSyncPositiveComparison; + pTrigger->TriggerFired = SyncAlarmTriggerFired; + pTrigger->CounterDestroyed = SyncAlarmCounterDestroyed; + status = SyncInitTrigger(client, pTrigger, None, RTCounter, + XSyncCAAllTrigger); + if (status != Success) { + free(pAlarm); + return status; + } + + pAlarm->client = client; + pAlarm->alarm_id = stuff->id; + XSyncIntToValue(&pAlarm->delta, 1L); + pAlarm->events = TRUE; + pAlarm->state = XSyncAlarmInactive; + pAlarm->pEventClients = NULL; + status = SyncChangeAlarmAttributes(client, pAlarm, vmask, + (CARD32 *) &stuff[1]); + if (status != Success) { + free(pAlarm); + return status; + } + + if (!AddResource(stuff->id, RTAlarm, pAlarm)) + return BadAlloc; + + /* see if alarm already triggered. NULL counter will not trigger + * in CreateAlarm and sets alarm state to Inactive. + */ + + if (!pTrigger->pSync) { + pAlarm->state = XSyncAlarmInactive; /* XXX protocol change */ + } + else { + SyncCounter *pCounter; + + if (!SyncCheckWarnIsCounter(pTrigger->pSync, + WARN_INVALID_COUNTER_ALARM)) { + FreeResource(stuff->id, RT_NONE); + return BadAlloc; + } + + pCounter = (SyncCounter *) pTrigger->pSync; + + if ((*pTrigger->CheckTrigger) (pTrigger, pCounter->value)) + (*pTrigger->TriggerFired) (pTrigger); + } + + return Success; +} + +/* + * ** Change Alarm + */ +static int +ProcSyncChangeAlarm(ClientPtr client) +{ + REQUEST(xSyncChangeAlarmReq); + SyncAlarm *pAlarm; + SyncCounter *pCounter = NULL; + long vmask; + int len, status; + + REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); + + status = dixLookupResourceByType((pointer *) &pAlarm, stuff->alarm, RTAlarm, + client, DixWriteAccess); + if (status != Success) + return status; + + vmask = stuff->valueMask; + len = client->req_len - bytes_to_int32(sizeof(xSyncChangeAlarmReq)); + /* the "extra" call to Ones accounts for the presence of 64 bit values */ + if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue | XSyncCADelta)))) + return BadLength; + + if ((status = SyncChangeAlarmAttributes(client, pAlarm, vmask, + (CARD32 *) &stuff[1])) != Success) + return status; + + if (SyncCheckWarnIsCounter(pAlarm->trigger.pSync, + WARN_INVALID_COUNTER_ALARM)) + pCounter = (SyncCounter *) pAlarm->trigger.pSync; + + /* see if alarm already triggered. NULL counter WILL trigger + * in ChangeAlarm. + */ + + if (!pCounter || + (*pAlarm->trigger.CheckTrigger) (&pAlarm->trigger, pCounter->value)) { + (*pAlarm->trigger.TriggerFired) (&pAlarm->trigger); + } + return Success; +} + +static int +ProcSyncQueryAlarm(ClientPtr client) +{ + REQUEST(xSyncQueryAlarmReq); + SyncAlarm *pAlarm; + xSyncQueryAlarmReply rep; + SyncTrigger *pTrigger; + int rc; + + REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); + + rc = dixLookupResourceByType((pointer *) &pAlarm, stuff->alarm, RTAlarm, + client, DixReadAccess); + if (rc != Success) + return rc; + + pTrigger = &pAlarm->trigger; + rep = (xSyncQueryAlarmReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = + bytes_to_int32(sizeof(xSyncQueryAlarmReply) - sizeof(xGenericReply)), + .counter = (pTrigger->pSync) ? pTrigger->pSync->id : None, + +#if 0 /* XXX unclear what to do, depends on whether relative value-types + * are "consumed" immediately and are considered absolute from then + * on. + */ + .value_type = pTrigger->value_type, + .wait_value_hi = XSyncValueHigh32(pTrigger->wait_value), + .wait_value_lo = XSyncValueLow32(pTrigger->wait_value), +#else + .value_type = XSyncAbsolute, + .wait_value_hi = XSyncValueHigh32(pTrigger->test_value), + .wait_value_lo = XSyncValueLow32(pTrigger->test_value), +#endif + + .test_type = pTrigger->test_type, + .delta_hi = XSyncValueHigh32(pAlarm->delta), + .delta_lo = XSyncValueLow32(pAlarm->delta), + .events = pAlarm->events, + .state = pAlarm->state + }; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.counter); + swapl(&rep.wait_value_hi); + swapl(&rep.wait_value_lo); + swapl(&rep.test_type); + swapl(&rep.delta_hi); + swapl(&rep.delta_lo); + } + + WriteToClient(client, sizeof(xSyncQueryAlarmReply), &rep); + return Success; +} + +static int +ProcSyncDestroyAlarm(ClientPtr client) +{ + SyncAlarm *pAlarm; + int rc; + + REQUEST(xSyncDestroyAlarmReq); + + REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); + + rc = dixLookupResourceByType((pointer *) &pAlarm, stuff->alarm, RTAlarm, + client, DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->alarm, RT_NONE); + return Success; +} + +static int +ProcSyncCreateFence(ClientPtr client) +{ + REQUEST(xSyncCreateFenceReq); + DrawablePtr pDraw; + SyncFence *pFence; + int rc; + + REQUEST_SIZE_MATCH(xSyncCreateFenceReq); + + rc = dixLookupDrawable(&pDraw, stuff->d, client, M_ANY, DixGetAttrAccess); + if (rc != Success) + return rc; + + LEGAL_NEW_RESOURCE(stuff->fid, client); + + if (!(pFence = (SyncFence *) SyncCreate(client, stuff->fid, SYNC_FENCE))) + return BadAlloc; + + miSyncInitFence(pDraw->pScreen, pFence, stuff->initially_triggered); + + if (!AddResource(stuff->fid, RTFence, (pointer) pFence)) + return BadAlloc; + + return client->noClientException; +} + +static int +FreeFence(void *obj, XID id) +{ + SyncFence *pFence = (SyncFence *) obj; + + miSyncDestroyFence(pFence); + + return Success; +} + +int +SyncVerifyFence(SyncFence ** ppSyncFence, XID fid, ClientPtr client, Mask mode) +{ + int rc = dixLookupResourceByType((pointer *) ppSyncFence, fid, RTFence, + client, mode); + + if (rc != Success) + client->errorValue = fid; + + return rc; +} + +static int +ProcSyncTriggerFence(ClientPtr client) +{ + REQUEST(xSyncTriggerFenceReq); + SyncFence *pFence; + int rc; + + REQUEST_SIZE_MATCH(xSyncTriggerFenceReq); + + rc = dixLookupResourceByType((pointer *) &pFence, stuff->fid, RTFence, + client, DixWriteAccess); + if (rc != Success) + return rc; + + miSyncTriggerFence(pFence); + + return client->noClientException; +} + +static int +ProcSyncResetFence(ClientPtr client) +{ + REQUEST(xSyncResetFenceReq); + SyncFence *pFence; + int rc; + + REQUEST_SIZE_MATCH(xSyncResetFenceReq); + + rc = dixLookupResourceByType((pointer *) &pFence, stuff->fid, RTFence, + client, DixWriteAccess); + if (rc != Success) + return rc; + + if (pFence->funcs.CheckTriggered(pFence) != TRUE) + return BadMatch; + + pFence->funcs.Reset(pFence); + + return client->noClientException; +} + +static int +ProcSyncDestroyFence(ClientPtr client) +{ + REQUEST(xSyncDestroyFenceReq); + SyncFence *pFence; + int rc; + + REQUEST_SIZE_MATCH(xSyncDestroyFenceReq); + + rc = dixLookupResourceByType((pointer *) &pFence, stuff->fid, RTFence, + client, DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->fid, RT_NONE); + return client->noClientException; +} + +static int +ProcSyncQueryFence(ClientPtr client) +{ + REQUEST(xSyncQueryFenceReq); + xSyncQueryFenceReply rep; + SyncFence *pFence; + int rc; + + REQUEST_SIZE_MATCH(xSyncQueryFenceReq); + + rc = dixLookupResourceByType((pointer *) &pFence, stuff->fid, + RTFence, client, DixReadAccess); + if (rc != Success) + return rc; + + rep = (xSyncQueryFenceReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + + .triggered = pFence->funcs.CheckTriggered(pFence) + }; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + + WriteToClient(client, sizeof(xSyncQueryFenceReply), &rep); + return client->noClientException; +} + +static int +ProcSyncAwaitFence(ClientPtr client) +{ + REQUEST(xSyncAwaitFenceReq); + SyncAwaitUnion *pAwaitUnion; + SyncAwait *pAwait; + + /* Use CARD32 rather than XSyncFence because XIDs are hard-coded to + * CARD32 in protocol definitions */ + CARD32 *pProtocolFences; + int status; + int len; + int items; + int i; + + REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq); + + len = client->req_len << 2; + len -= sz_xSyncAwaitFenceReq; + items = len / sizeof(CARD32); + + if (items * sizeof(CARD32) != len) { + return BadLength; + } + if (items == 0) { + client->errorValue = items; + return BadValue; + } + + if (!(pAwaitUnion = SyncAwaitPrologue(client, items))) + return BadAlloc; + + /* don't need to do any more memory allocation for this request! */ + + pProtocolFences = (CARD32 *) &stuff[1]; + + pAwait = &(pAwaitUnion + 1)->await; /* skip over header */ + for (i = 0; i < items; i++, pProtocolFences++, pAwait++) { + if (*pProtocolFences == None) { + /* this should take care of removing any triggers created by + * this request that have already been registered on sync objects + */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); + client->errorValue = *pProtocolFences; + return SyncErrorBase + XSyncBadFence; + } + + pAwait->trigger.pSync = NULL; + /* Provide acceptable values for these unused fields to + * satisfy SyncInitTrigger's validation logic + */ + pAwait->trigger.value_type = XSyncAbsolute; + XSyncIntToValue(&pAwait->trigger.wait_value, 0); + pAwait->trigger.test_type = 0; + + status = SyncInitTrigger(client, &pAwait->trigger, + *pProtocolFences, RTFence, XSyncCAAllTrigger); + if (status != Success) { + /* this should take care of removing any triggers created by + * this request that have already been registered on sync objects + */ + FreeResource(pAwaitUnion->header.delete_id, RT_NONE); + return status; + } + /* this is not a mistake -- same function works for both cases */ + pAwait->trigger.TriggerFired = SyncAwaitTriggerFired; + pAwait->trigger.CounterDestroyed = SyncAwaitTriggerFired; + /* event_threshold is unused for fence syncs */ + XSyncIntToValue(&pAwait->event_threshold, 0); + pAwait->pHeader = &pAwaitUnion->header; + pAwaitUnion->header.num_waitconditions++; + } + + SyncAwaitEpilogue(client, items, pAwaitUnion); + + return client->noClientException; +} + +/* + * ** Given an extension request, call the appropriate request procedure + */ +static int +ProcSyncDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_SyncInitialize: + return ProcSyncInitialize(client); + case X_SyncListSystemCounters: + return ProcSyncListSystemCounters(client); + case X_SyncCreateCounter: + return ProcSyncCreateCounter(client); + case X_SyncSetCounter: + return ProcSyncSetCounter(client); + case X_SyncChangeCounter: + return ProcSyncChangeCounter(client); + case X_SyncQueryCounter: + return ProcSyncQueryCounter(client); + case X_SyncDestroyCounter: + return ProcSyncDestroyCounter(client); + case X_SyncAwait: + return ProcSyncAwait(client); + case X_SyncCreateAlarm: + return ProcSyncCreateAlarm(client); + case X_SyncChangeAlarm: + return ProcSyncChangeAlarm(client); + case X_SyncQueryAlarm: + return ProcSyncQueryAlarm(client); + case X_SyncDestroyAlarm: + return ProcSyncDestroyAlarm(client); + case X_SyncSetPriority: + return ProcSyncSetPriority(client); + case X_SyncGetPriority: + return ProcSyncGetPriority(client); + case X_SyncCreateFence: + return ProcSyncCreateFence(client); + case X_SyncTriggerFence: + return ProcSyncTriggerFence(client); + case X_SyncResetFence: + return ProcSyncResetFence(client); + case X_SyncDestroyFence: + return ProcSyncDestroyFence(client); + case X_SyncQueryFence: + return ProcSyncQueryFence(client); + case X_SyncAwaitFence: + return ProcSyncAwaitFence(client); + default: + return BadRequest; + } +} + +/* + * Boring Swapping stuff ... + */ + +static int +SProcSyncInitialize(ClientPtr client) +{ + REQUEST(xSyncInitializeReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncInitializeReq); + + return ProcSyncInitialize(client); +} + +static int +SProcSyncListSystemCounters(ClientPtr client) +{ + REQUEST(xSyncListSystemCountersReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncListSystemCountersReq); + + return ProcSyncListSystemCounters(client); +} + +static int +SProcSyncCreateCounter(ClientPtr client) +{ + REQUEST(xSyncCreateCounterReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncCreateCounterReq); + swapl(&stuff->cid); + swapl(&stuff->initial_value_lo); + swapl(&stuff->initial_value_hi); + + return ProcSyncCreateCounter(client); +} + +static int +SProcSyncSetCounter(ClientPtr client) +{ + REQUEST(xSyncSetCounterReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncSetCounterReq); + swapl(&stuff->cid); + swapl(&stuff->value_lo); + swapl(&stuff->value_hi); + + return ProcSyncSetCounter(client); +} + +static int +SProcSyncChangeCounter(ClientPtr client) +{ + REQUEST(xSyncChangeCounterReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncChangeCounterReq); + swapl(&stuff->cid); + swapl(&stuff->value_lo); + swapl(&stuff->value_hi); + + return ProcSyncChangeCounter(client); +} + +static int +SProcSyncQueryCounter(ClientPtr client) +{ + REQUEST(xSyncQueryCounterReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncQueryCounterReq); + swapl(&stuff->counter); + + return ProcSyncQueryCounter(client); +} + +static int +SProcSyncDestroyCounter(ClientPtr client) +{ + REQUEST(xSyncDestroyCounterReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); + swapl(&stuff->counter); + + return ProcSyncDestroyCounter(client); +} + +static int +SProcSyncAwait(ClientPtr client) +{ + REQUEST(xSyncAwaitReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); + SwapRestL(stuff); + + return ProcSyncAwait(client); +} + +static int +SProcSyncCreateAlarm(ClientPtr client) +{ + REQUEST(xSyncCreateAlarmReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); + swapl(&stuff->id); + swapl(&stuff->valueMask); + SwapRestL(stuff); + + return ProcSyncCreateAlarm(client); +} + +static int +SProcSyncChangeAlarm(ClientPtr client) +{ + REQUEST(xSyncChangeAlarmReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); + swapl(&stuff->alarm); + swapl(&stuff->valueMask); + SwapRestL(stuff); + return ProcSyncChangeAlarm(client); +} + +static int +SProcSyncQueryAlarm(ClientPtr client) +{ + REQUEST(xSyncQueryAlarmReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); + swapl(&stuff->alarm); + + return ProcSyncQueryAlarm(client); +} + +static int +SProcSyncDestroyAlarm(ClientPtr client) +{ + REQUEST(xSyncDestroyAlarmReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); + swapl(&stuff->alarm); + + return ProcSyncDestroyAlarm(client); +} + +static int +SProcSyncSetPriority(ClientPtr client) +{ + REQUEST(xSyncSetPriorityReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncSetPriorityReq); + swapl(&stuff->id); + swapl(&stuff->priority); + + return ProcSyncSetPriority(client); +} + +static int +SProcSyncGetPriority(ClientPtr client) +{ + REQUEST(xSyncGetPriorityReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncGetPriorityReq); + swapl(&stuff->id); + + return ProcSyncGetPriority(client); +} + +static int +SProcSyncCreateFence(ClientPtr client) +{ + REQUEST(xSyncCreateFenceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncCreateFenceReq); + swapl(&stuff->fid); + + return ProcSyncCreateFence(client); +} + +static int +SProcSyncTriggerFence(ClientPtr client) +{ + REQUEST(xSyncTriggerFenceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncTriggerFenceReq); + swapl(&stuff->fid); + + return ProcSyncTriggerFence(client); +} + +static int +SProcSyncResetFence(ClientPtr client) +{ + REQUEST(xSyncResetFenceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncResetFenceReq); + swapl(&stuff->fid); + + return ProcSyncResetFence(client); +} + +static int +SProcSyncDestroyFence(ClientPtr client) +{ + REQUEST(xSyncDestroyFenceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncDestroyFenceReq); + swapl(&stuff->fid); + + return ProcSyncDestroyFence(client); +} + +static int +SProcSyncQueryFence(ClientPtr client) +{ + REQUEST(xSyncQueryFenceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSyncQueryFenceReq); + swapl(&stuff->fid); + + return ProcSyncQueryFence(client); +} + +static int +SProcSyncAwaitFence(ClientPtr client) +{ + REQUEST(xSyncAwaitFenceReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq); + SwapRestL(stuff); + + return ProcSyncAwaitFence(client); +} + +static int +SProcSyncDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_SyncInitialize: + return SProcSyncInitialize(client); + case X_SyncListSystemCounters: + return SProcSyncListSystemCounters(client); + case X_SyncCreateCounter: + return SProcSyncCreateCounter(client); + case X_SyncSetCounter: + return SProcSyncSetCounter(client); + case X_SyncChangeCounter: + return SProcSyncChangeCounter(client); + case X_SyncQueryCounter: + return SProcSyncQueryCounter(client); + case X_SyncDestroyCounter: + return SProcSyncDestroyCounter(client); + case X_SyncAwait: + return SProcSyncAwait(client); + case X_SyncCreateAlarm: + return SProcSyncCreateAlarm(client); + case X_SyncChangeAlarm: + return SProcSyncChangeAlarm(client); + case X_SyncQueryAlarm: + return SProcSyncQueryAlarm(client); + case X_SyncDestroyAlarm: + return SProcSyncDestroyAlarm(client); + case X_SyncSetPriority: + return SProcSyncSetPriority(client); + case X_SyncGetPriority: + return SProcSyncGetPriority(client); + case X_SyncCreateFence: + return SProcSyncCreateFence(client); + case X_SyncTriggerFence: + return SProcSyncTriggerFence(client); + case X_SyncResetFence: + return SProcSyncResetFence(client); + case X_SyncDestroyFence: + return SProcSyncDestroyFence(client); + case X_SyncQueryFence: + return SProcSyncQueryFence(client); + case X_SyncAwaitFence: + return SProcSyncAwaitFence(client); + default: + return BadRequest; + } +} + +/* + * Event Swapping + */ + +static void +SCounterNotifyEvent(xSyncCounterNotifyEvent * from, + xSyncCounterNotifyEvent * to) +{ + to->type = from->type; + to->kind = from->kind; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->counter, to->counter); + cpswapl(from->wait_value_lo, to->wait_value_lo); + cpswapl(from->wait_value_hi, to->wait_value_hi); + cpswapl(from->counter_value_lo, to->counter_value_lo); + cpswapl(from->counter_value_hi, to->counter_value_hi); + cpswapl(from->time, to->time); + cpswaps(from->count, to->count); + to->destroyed = from->destroyed; +} + +static void +SAlarmNotifyEvent(xSyncAlarmNotifyEvent * from, xSyncAlarmNotifyEvent * to) +{ + to->type = from->type; + to->kind = from->kind; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->alarm, to->alarm); + cpswapl(from->counter_value_lo, to->counter_value_lo); + cpswapl(from->counter_value_hi, to->counter_value_hi); + cpswapl(from->alarm_value_lo, to->alarm_value_lo); + cpswapl(from->alarm_value_hi, to->alarm_value_hi); + cpswapl(from->time, to->time); + to->state = from->state; +} + +/* + * ** Close everything down. ** This is fairly simple for now. + */ +/* ARGSUSED */ +static void +SyncResetProc(ExtensionEntry * extEntry) +{ + RTCounter = 0; +} + +/* + * ** Initialise the extension. + */ +void +SyncExtensionInit(void) +{ + ExtensionEntry *extEntry; + int s; + + for (s = 0; s < screenInfo.numScreens; s++) + miSyncSetup(screenInfo.screens[s]); + + if (RTCounter == 0) { + RTCounter = CreateNewResourceType(FreeCounter, "SyncCounter"); + xorg_list_init(&SysCounterList); + } + RTAlarm = CreateNewResourceType(FreeAlarm, "SyncAlarm"); + RTAwait = CreateNewResourceType(FreeAwait, "SyncAwait"); + RTFence = CreateNewResourceType(FreeFence, "SyncFence"); + if (RTAwait) + RTAwait |= RC_NEVERRETAIN; + RTAlarmClient = CreateNewResourceType(FreeAlarmClient, "SyncAlarmClient"); + if (RTAlarmClient) + RTAlarmClient |= RC_NEVERRETAIN; + + if (RTCounter == 0 || RTAwait == 0 || RTAlarm == 0 || + RTAlarmClient == 0 || + (extEntry = AddExtension(SYNC_NAME, + XSyncNumberEvents, XSyncNumberErrors, + ProcSyncDispatch, SProcSyncDispatch, + SyncResetProc, StandardMinorOpcode)) == NULL) { + ErrorF("Sync Extension %d.%d failed to Initialise\n", + SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); + return; + } + + SyncEventBase = extEntry->eventBase; + SyncErrorBase = extEntry->errorBase; + EventSwapVector[SyncEventBase + XSyncCounterNotify] = + (EventSwapPtr) SCounterNotifyEvent; + EventSwapVector[SyncEventBase + XSyncAlarmNotify] = + (EventSwapPtr) SAlarmNotifyEvent; + + SetResourceTypeErrorValue(RTCounter, SyncErrorBase + XSyncBadCounter); + SetResourceTypeErrorValue(RTAlarm, SyncErrorBase + XSyncBadAlarm); + SetResourceTypeErrorValue(RTFence, SyncErrorBase + XSyncBadFence); + + /* + * Although SERVERTIME is implemented by the OS layer, we initialise it + * here because doing it in OsInit() is too early. The resource database + * is not initialised when OsInit() is called. This is just about OK + * because there is always a servertime counter. + */ + SyncInitServerTime(); + SyncInitIdleTime(); + +#ifdef DEBUG + fprintf(stderr, "Sync Extension %d.%d\n", + SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); +#endif +} + +/* + * ***** SERVERTIME implementation - should go in its own file in OS directory? + */ + +static pointer ServertimeCounter; +static XSyncValue Now; +static XSyncValue *pnext_time; + +#define GetTime()\ +{\ + unsigned long millis = GetTimeInMillis();\ + unsigned long maxis = XSyncValueHigh32(Now);\ + if (millis < XSyncValueLow32(Now)) maxis++;\ + XSyncIntsToValue(&Now, millis, maxis);\ +} + +/* +*** Server Block Handler +*** code inspired by multibuffer extension (now deprecated) + */ + /*ARGSUSED*/ static void +ServertimeBlockHandler(void *env, struct timeval **wt, void *LastSelectMask) +{ + XSyncValue delay; + unsigned long timeout; + + if (pnext_time) { + GetTime(); + + if (XSyncValueGreaterOrEqual(Now, *pnext_time)) { + timeout = 0; + } + else { + Bool overflow; + + XSyncValueSubtract(&delay, *pnext_time, Now, &overflow); + (void) overflow; + timeout = XSyncValueLow32(delay); + } + AdjustWaitForDelay(wt, timeout); /* os/utils.c */ + } +} + +/* +*** Wakeup Handler + */ + /*ARGSUSED*/ static void +ServertimeWakeupHandler(void *env, int rc, void *LastSelectMask) +{ + if (pnext_time) { + GetTime(); + + if (XSyncValueGreaterOrEqual(Now, *pnext_time)) { + SyncChangeCounter(ServertimeCounter, Now); + } + } +} + +static void +ServertimeQueryValue(void *pCounter, CARD64 * pValue_return) +{ + GetTime(); + *pValue_return = Now; +} + +static void +ServertimeBracketValues(void *pCounter, CARD64 * pbracket_less, + CARD64 * pbracket_greater) +{ + if (!pnext_time && pbracket_greater) { + RegisterBlockAndWakeupHandlers(ServertimeBlockHandler, + ServertimeWakeupHandler, NULL); + } + else if (pnext_time && !pbracket_greater) { + RemoveBlockAndWakeupHandlers(ServertimeBlockHandler, + ServertimeWakeupHandler, NULL); + } + pnext_time = pbracket_greater; +} + +static void +SyncInitServerTime(void) +{ + CARD64 resolution; + + XSyncIntsToValue(&Now, GetTimeInMillis(), 0); + XSyncIntToValue(&resolution, 4); + ServertimeCounter = SyncCreateSystemCounter("SERVERTIME", Now, resolution, + XSyncCounterNeverDecreases, + ServertimeQueryValue, + ServertimeBracketValues); + pnext_time = NULL; +} + +/* + * IDLETIME implementation + */ + +typedef struct { + XSyncValue *value_less; + XSyncValue *value_greater; + int deviceid; +} IdleCounterPriv; + +static void +IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return) +{ + int deviceid; + CARD32 idle; + + if (pCounter) { + SyncCounter *counter = pCounter; + IdleCounterPriv *priv = SysCounterGetPrivate(counter); + deviceid = priv->deviceid; + } + else + deviceid = XIAllDevices; + idle = GetTimeInMillis() - LastEventTime(deviceid).milliseconds; + XSyncIntsToValue(pValue_return, idle, 0); +} + +static void +IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMask) +{ + SyncCounter *counter = pCounter; + IdleCounterPriv *priv = SysCounterGetPrivate(counter); + XSyncValue *less = priv->value_less, + *greater = priv->value_greater; + XSyncValue idle, old_idle; + SyncTriggerList *list = counter->sync.pTriglist; + SyncTrigger *trig; + + if (!less && !greater) + return; + + old_idle = counter->value; + IdleTimeQueryValue(counter, &idle); + counter->value = idle; /* push, so CheckTrigger works */ + + /** + * There's an indefinite amount of time between ProcessInputEvents() + * where the idle time is reset and the time we actually get here. idle + * may be past the lower bracket if we dawdled with the events, so + * check for whether we did reset and bomb out of select immediately. + */ + if (less && XSyncValueGreaterThan(idle, *less) && + LastEventTimeWasReset(priv->deviceid)) { + AdjustWaitForDelay(wt, 0); + } else if (less && XSyncValueLessOrEqual(idle, *less)) { + /* + * We've been idle for less than the threshold value, and someone + * wants to know about that, but now we need to know whether they + * want level or edge trigger. Check the trigger list against the + * current idle time, and if any succeed, bomb out of select() + * immediately so we can reschedule. + */ + + for (list = counter->sync.pTriglist; list; list = list->next) { + trig = list->pTrigger; + if (trig->CheckTrigger(trig, old_idle)) { + AdjustWaitForDelay(wt, 0); + break; + } + } + /* + * We've been called exactly on the idle time, but we have a + * NegativeTransition trigger which requires a transition from an + * idle time greater than this. Schedule a wakeup for the next + * millisecond so we won't miss a transition. + */ + if (XSyncValueEqual(idle, *less)) + AdjustWaitForDelay(wt, 1); + } + else if (greater) { + /* + * There's a threshold in the positive direction. If we've been + * idle less than it, schedule a wakeup for sometime in the future. + * If we've been idle more than it, and someone wants to know about + * that level-triggered, schedule an immediate wakeup. + */ + + if (XSyncValueLessThan(idle, *greater)) { + XSyncValue value; + Bool overflow; + + XSyncValueSubtract(&value, *greater, idle, &overflow); + AdjustWaitForDelay(wt, XSyncValueLow32(value)); + } + else { + for (list = counter->sync.pTriglist; list; + list = list->next) { + trig = list->pTrigger; + if (trig->CheckTrigger(trig, old_idle)) { + AdjustWaitForDelay(wt, 0); + break; + } + } + } + } + + counter->value = old_idle; /* pop */ +} + +static void +IdleTimeCheckBrackets(SyncCounter *counter, XSyncValue idle, XSyncValue *less, XSyncValue *greater) +{ + if ((greater && XSyncValueGreaterOrEqual(idle, *greater)) || + (less && XSyncValueLessOrEqual(idle, *less))) { + SyncChangeCounter(counter, idle); + } + else + SyncUpdateCounter(counter, idle); +} + +static void +IdleTimeWakeupHandler(pointer pCounter, int rc, pointer LastSelectMask) +{ + SyncCounter *counter = pCounter; + IdleCounterPriv *priv = SysCounterGetPrivate(counter); + XSyncValue *less = priv->value_less, + *greater = priv->value_greater; + XSyncValue idle; + + if (!less && !greater) + return; + + IdleTimeQueryValue(pCounter, &idle); + + /* + There is no guarantee for the WakeupHandler to be called within a specific + timeframe. Idletime may go to 0, but by the time we get here, it may be + non-zero and alarms for a pos. transition on 0 won't get triggered. + https://bugs.freedesktop.org/show_bug.cgi?id=70476 + */ + if (LastEventTimeWasReset(priv->deviceid)) { + LastEventTimeToggleResetFlag(priv->deviceid, FALSE); + if (!XSyncValueIsZero(idle)) { + XSyncValue zero; + XSyncIntsToValue(&zero, 0, 0); + IdleTimeCheckBrackets(counter, zero, less, greater); + less = priv->value_less; + greater = priv->value_greater; + } + } + + IdleTimeCheckBrackets(counter, idle, less, greater); +} + +static void +IdleTimeBracketValues(pointer pCounter, CARD64 * pbracket_less, + CARD64 * pbracket_greater) +{ + SyncCounter *counter = pCounter; + IdleCounterPriv *priv = SysCounterGetPrivate(counter); + XSyncValue *less = priv->value_less, + *greater = priv->value_greater; + Bool registered = (less || greater); + + if (registered && !pbracket_less && !pbracket_greater) { + RemoveBlockAndWakeupHandlers(IdleTimeBlockHandler, + IdleTimeWakeupHandler, pCounter); + } + else if (!registered && (pbracket_less || pbracket_greater)) { + /* Reset flag must be zero so we don't force a idle timer reset on + the first wakeup */ + LastEventTimeToggleResetAll(FALSE); + RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler, + IdleTimeWakeupHandler, pCounter); + } + + priv->value_greater = pbracket_greater; + priv->value_less = pbracket_less; +} + +static SyncCounter* +init_system_idle_counter(const char *name, int deviceid) +{ + CARD64 resolution; + XSyncValue idle; + SyncCounter *idle_time_counter; + + IdleTimeQueryValue(NULL, &idle); + XSyncIntToValue(&resolution, 4); + + idle_time_counter = SyncCreateSystemCounter(name, idle, resolution, + XSyncCounterUnrestricted, + IdleTimeQueryValue, + IdleTimeBracketValues); + + if (idle_time_counter != NULL) { + IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv)); + + priv->value_less = priv->value_greater = NULL; + priv->deviceid = deviceid; + + idle_time_counter->pSysCounterInfo->private = priv; + } + + return idle_time_counter; +} + +static void +SyncInitIdleTime(void) +{ + init_system_idle_counter("IDLETIME", XIAllDevices); +} + +SyncCounter* +SyncInitDeviceIdleTime(DeviceIntPtr dev) +{ + char timer_name[64]; + sprintf(timer_name, "DEVICEIDLETIME %d", dev->id); + + return init_system_idle_counter(timer_name, dev->id); +} + +void SyncRemoveDeviceIdleTime(SyncCounter *counter) +{ + /* FreeAllResources() frees all system counters before the devices are + shut down, check if there are any left before freeing the device's + counter */ + if (counter && !xorg_list_is_empty(&SysCounterList)) + xorg_list_del(&counter->pSysCounterInfo->entry); +} diff --git a/Xext/syncsdk.h b/Xext/syncsdk.h new file mode 100644 index 0000000..f1b99d0 --- /dev/null +++ b/Xext/syncsdk.h @@ -0,0 +1,46 @@ +/* + * Copyright © 2010 NVIDIA Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef _SYNCSDK_H_ +#define _SYNCSDK_H_ + +#include "misync.h" + +extern _X_EXPORT int + SyncVerifyFence(SyncFence ** ppFence, XID fid, ClientPtr client, Mask mode); + +#define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \ + do { \ + int rc; \ + rc = SyncVerifyFence(&(pFence), (fid), (client), (mode)); \ + if (Success != rc) return rc; \ + } while (0) + +#define VERIFY_SYNC_FENCE_OR_NONE(pFence, fid, client, mode) \ + do { \ + pFence = 0; \ + if (None != fid) \ + VERIFY_SYNC_FENCE((pFence), (fid), (client), (mode)); \ + } while (0) + +#endif /* _SYNCSDK_H_ */ diff --git a/Xext/syncsrv.h b/Xext/syncsrv.h new file mode 100644 index 0000000..45fca04 --- /dev/null +++ b/Xext/syncsrv.h @@ -0,0 +1,152 @@ +/* + +Copyright 1991, 1993, 1994, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/*********************************************************** +Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, +and Olivetti Research Limited, Cambridge, England. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or Olivetti +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +******************************************************************/ + +#ifndef _SYNCSRV_H_ +#define _SYNCSRV_H_ + +#include "list.h" +#include "misync.h" +#include "misyncstr.h" + +/* + * The System Counter interface + */ + +typedef enum { + XSyncCounterNeverChanges, + XSyncCounterNeverIncreases, + XSyncCounterNeverDecreases, + XSyncCounterUnrestricted +} SyncCounterType; + +typedef void (*SyncSystemCounterQueryValue)(pointer counter, + CARD64 *value_return + ); +typedef void (*SyncSystemCounterBracketValues)(pointer counter, + CARD64 *pbracket_less, + CARD64 *pbracket_greater + ); + +typedef struct _SysCounterInfo { + SyncCounter *pCounter; + char *name; + CARD64 resolution; + CARD64 bracket_greater; + CARD64 bracket_less; + SyncCounterType counterType; /* how can this counter change */ + SyncSystemCounterQueryValue QueryValue; + SyncSystemCounterBracketValues BracketValues; + void *private; + struct xorg_list entry; +} SysCounterInfo; + +typedef struct _SyncAlarmClientList { + ClientPtr client; + XID delete_id; + struct _SyncAlarmClientList *next; +} SyncAlarmClientList; + +typedef struct _SyncAlarm { + SyncTrigger trigger; + ClientPtr client; + XSyncAlarm alarm_id; + CARD64 delta; + int events; + int state; + SyncAlarmClientList *pEventClients; +} SyncAlarm; + +typedef struct { + ClientPtr client; + CARD32 delete_id; + int num_waitconditions; +} SyncAwaitHeader; + +typedef struct { + SyncTrigger trigger; + CARD64 event_threshold; + SyncAwaitHeader *pHeader; +} SyncAwait; + +typedef union { + SyncAwaitHeader header; + SyncAwait await; +} SyncAwaitUnion; + +extern SyncCounter* SyncCreateSystemCounter(const char *name, + CARD64 initial_value, + CARD64 resolution, + SyncCounterType counterType, + SyncSystemCounterQueryValue QueryValue, + SyncSystemCounterBracketValues BracketValues + ); + +extern void SyncChangeCounter(SyncCounter *pCounter, + CARD64 new_value + ); + +extern void SyncDestroySystemCounter(pointer pCounter); + +extern SyncCounter *SyncInitDeviceIdleTime(DeviceIntPtr dev); +extern void SyncRemoveDeviceIdleTime(SyncCounter *counter); + +int +SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered); + +int +SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *fence); + +void +SyncDeleteTriggerFromSyncObject(SyncTrigger * pTrigger); + +int +SyncAddTriggerToSyncObject(SyncTrigger * pTrigger); + +#endif /* _SYNCSRV_H_ */ diff --git a/Xext/xace.c b/Xext/xace.c new file mode 100644 index 0000000..026d3c5 --- /dev/null +++ b/Xext/xace.c @@ -0,0 +1,341 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdarg.h> +#include "scrnintstr.h" +#include "extnsionst.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "gcstruct.h" +#include "xacestr.h" + +#define XSERV_t +#define TRANS_SERVER +#include <X11/Xtrans/Xtrans.h> +#include "../os/osdep.h" + +_X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = { 0 }; + +/* Special-cased hook functions. Called by Xserver. + */ +int +XaceHookDispatch(ClientPtr client, int major) +{ + /* Call the audit begin callback, there is no return value. */ + XaceAuditRec rec = { client, 0 }; + CallCallbacks(&XaceHooks[XACE_AUDIT_BEGIN], &rec); + + if (major < 128) { + /* Call the core dispatch hook */ + XaceCoreDispatchRec drec = { client, Success /* default allow */ }; + CallCallbacks(&XaceHooks[XACE_CORE_DISPATCH], &drec); + return drec.status; + } + else { + /* Call the extension dispatch hook */ + ExtensionEntry *ext = GetExtensionEntry(major); + XaceExtAccessRec erec = { client, ext, DixUseAccess, Success }; + if (ext) + CallCallbacks(&XaceHooks[XACE_EXT_DISPATCH], &erec); + /* On error, pretend extension doesn't exist */ + return (erec.status == Success) ? Success : BadRequest; + } +} + +int +XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, + PropertyPtr *ppProp, Mask access_mode) +{ + XacePropertyAccessRec rec = { client, pWin, ppProp, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_PROPERTY_ACCESS], &rec); + return rec.status; +} + +int +XaceHookSelectionAccess(ClientPtr client, Selection ** ppSel, Mask access_mode) +{ + XaceSelectionAccessRec rec = { client, ppSel, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_SELECTION_ACCESS], &rec); + return rec.status; +} + +void +XaceHookAuditEnd(ClientPtr ptr, int result) +{ + XaceAuditRec rec = { ptr, result }; + /* call callbacks, there is no return value. */ + CallCallbacks(&XaceHooks[XACE_AUDIT_END], &rec); +} + +/* Entry point for hook functions. Called by Xserver. + */ +int +XaceHook(int hook, ...) +{ + union { + XaceResourceAccessRec res; + XaceDeviceAccessRec dev; + XaceSendAccessRec send; + XaceReceiveAccessRec recv; + XaceClientAccessRec client; + XaceExtAccessRec ext; + XaceServerAccessRec server; + XaceScreenAccessRec screen; + XaceAuthAvailRec auth; + XaceKeyAvailRec key; + } u; + int *prv = NULL; /* points to return value from callback */ + va_list ap; /* argument list */ + + if (!XaceHooks[hook]) + return Success; + + va_start(ap, hook); + + /* Marshal arguments for passing to callback. + * Each callback has its own case, which sets up a structure to hold + * the arguments and integer return parameter, or in some cases just + * sets calldata directly to a single argument (with no return result) + */ + switch (hook) { + case XACE_RESOURCE_ACCESS: + u.res.client = va_arg(ap, ClientPtr); + u.res.id = va_arg(ap, XID); + u.res.rtype = va_arg(ap, RESTYPE); + u.res.res = va_arg(ap, 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: + u.dev.client = va_arg(ap, ClientPtr); + u.dev.dev = va_arg(ap, DeviceIntPtr); + u.dev.access_mode = va_arg(ap, Mask); + + u.dev.status = Success; /* default allow */ + prv = &u.dev.status; + break; + case XACE_SEND_ACCESS: + u.send.client = va_arg(ap, ClientPtr); + u.send.dev = va_arg(ap, DeviceIntPtr); + u.send.pWin = va_arg(ap, WindowPtr); + + u.send.events = va_arg(ap, xEventPtr); + u.send.count = va_arg(ap, int); + + u.send.status = Success; /* default allow */ + prv = &u.send.status; + break; + case XACE_RECEIVE_ACCESS: + u.recv.client = va_arg(ap, ClientPtr); + u.recv.pWin = va_arg(ap, WindowPtr); + + u.recv.events = va_arg(ap, xEventPtr); + u.recv.count = va_arg(ap, int); + + u.recv.status = Success; /* default allow */ + prv = &u.recv.status; + break; + case XACE_CLIENT_ACCESS: + u.client.client = va_arg(ap, ClientPtr); + u.client.target = va_arg(ap, ClientPtr); + u.client.access_mode = va_arg(ap, Mask); + + u.client.status = Success; /* default allow */ + prv = &u.client.status; + break; + case XACE_EXT_ACCESS: + u.ext.client = va_arg(ap, ClientPtr); + + u.ext.ext = va_arg(ap, ExtensionEntry *); + u.ext.access_mode = DixGetAttrAccess; + u.ext.status = Success; /* default allow */ + prv = &u.ext.status; + break; + case XACE_SERVER_ACCESS: + u.server.client = va_arg(ap, ClientPtr); + u.server.access_mode = va_arg(ap, Mask); + + u.server.status = Success; /* default allow */ + prv = &u.server.status; + break; + case XACE_SCREEN_ACCESS: + case XACE_SCREENSAVER_ACCESS: + u.screen.client = va_arg(ap, ClientPtr); + u.screen.screen = va_arg(ap, ScreenPtr); + u.screen.access_mode = va_arg(ap, Mask); + + u.screen.status = Success; /* default allow */ + prv = &u.screen.status; + break; + case XACE_AUTH_AVAIL: + u.auth.client = va_arg(ap, ClientPtr); + u.auth.authId = va_arg(ap, XID); + + break; + case XACE_KEY_AVAIL: + u.key.event = va_arg(ap, xEventPtr); + u.key.keybd = va_arg(ap, DeviceIntPtr); + u.key.count = va_arg(ap, int); + + break; + default: + va_end(ap); + return 0; /* unimplemented hook number */ + } + va_end(ap); + + /* call callbacks and return result, if any. */ + CallCallbacks(&XaceHooks[hook], &u); + return prv ? *prv : Success; +} + +/* XaceCensorImage + * + * Called after pScreen->GetImage to prevent pieces or trusted windows from + * being returned in image data from an untrusted window. + * + * Arguments: + * client is the client doing the GetImage. + * pVisibleRegion is the visible region of the window. + * widthBytesLine is the width in bytes of one horizontal line in pBuf. + * pDraw is the source window. + * x, y, w, h is the rectangle of image data from pDraw in pBuf. + * format is the format of the image data in pBuf: ZPixmap or XYPixmap. + * pBuf is the image data. + * + * Returns: nothing. + * + * Side Effects: + * Any part of the rectangle (x, y, w, h) that is outside the visible + * region of the window will be destroyed (overwritten) in pBuf. + */ +void +XaceCensorImage(ClientPtr client, + RegionPtr pVisibleRegion, + long widthBytesLine, + DrawablePtr pDraw, + int x, int y, int w, int h, unsigned int format, char *pBuf) +{ + RegionRec imageRegion; /* region representing x,y,w,h */ + RegionRec censorRegion; /* region to obliterate */ + BoxRec imageBox; + int nRects; + + imageBox.x1 = x; + imageBox.y1 = y; + imageBox.x2 = x + w; + imageBox.y2 = y + h; + RegionInit(&imageRegion, &imageBox, 1); + RegionNull(&censorRegion); + + /* censorRegion = imageRegion - visibleRegion */ + RegionSubtract(&censorRegion, &imageRegion, pVisibleRegion); + nRects = RegionNumRects(&censorRegion); + if (nRects > 0) { /* we have something to censor */ + GCPtr pScratchGC = NULL; + PixmapPtr pPix = NULL; + xRectangle *pRects = NULL; + Bool failed = FALSE; + int depth = 1; + int bitsPerPixel = 1; + int i; + BoxPtr pBox; + + /* convert region to list-of-rectangles for PolyFillRect */ + + pRects = malloc(nRects * sizeof(xRectangle)); + if (!pRects) { + failed = TRUE; + goto failSafe; + } + for (pBox = RegionRects(&censorRegion), i = 0; i < nRects; i++, pBox++) { + pRects[i].x = pBox->x1; + pRects[i].y = pBox->y1 - imageBox.y1; + pRects[i].width = pBox->x2 - pBox->x1; + pRects[i].height = pBox->y2 - pBox->y1; + } + + /* use pBuf as a fake pixmap */ + + if (format == ZPixmap) { + depth = pDraw->depth; + bitsPerPixel = pDraw->bitsPerPixel; + } + + pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h, + depth, bitsPerPixel, + widthBytesLine, (pointer) pBuf); + if (!pPix) { + failed = TRUE; + goto failSafe; + } + + pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen); + if (!pScratchGC) { + failed = TRUE; + goto failSafe; + } + + ValidateGC(&pPix->drawable, pScratchGC); + (*pScratchGC->ops->PolyFillRect) (&pPix->drawable, + pScratchGC, nRects, pRects); + + failSafe: + if (failed) { + /* Censoring was not completed above. To be safe, wipe out + * all the image data so that nothing trusted gets out. + */ + memset(pBuf, 0, (int) (widthBytesLine * h)); + } + free(pRects); + if (pScratchGC) + FreeScratchGC(pScratchGC); + if (pPix) + FreeScratchPixmapHeader(pPix); + } + RegionUninit(&imageRegion); + RegionUninit(&censorRegion); +} /* XaceCensorImage */ + +/* + * Xtrans wrappers for use by modules + */ +int +XaceGetConnectionNumber(ClientPtr client) +{ + XtransConnInfo ci = ((OsCommPtr) client->osPrivate)->trans_conn; + + return _XSERVTransGetConnectionNumber(ci); +} + +int +XaceIsLocal(ClientPtr client) +{ + XtransConnInfo ci = ((OsCommPtr) client->osPrivate)->trans_conn; + + return _XSERVTransIsLocal(ci); +} diff --git a/Xext/xace.h b/Xext/xace.h new file mode 100644 index 0000000..5e6cb04 --- /dev/null +++ b/Xext/xace.h @@ -0,0 +1,128 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifndef _XACE_H +#define _XACE_H + +#ifdef XACE + +#define XACE_MAJOR_VERSION 2 +#define XACE_MINOR_VERSION 0 + +#include "pixmap.h" +#include "region.h" +#include "window.h" +#include "property.h" +#include "selection.h" + +/* Default window background */ +#define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None) + +/* security hooks */ +/* Constants used to identify the available security hooks + */ +#define XACE_CORE_DISPATCH 0 +#define XACE_EXT_DISPATCH 1 +#define XACE_RESOURCE_ACCESS 2 +#define XACE_DEVICE_ACCESS 3 +#define XACE_PROPERTY_ACCESS 4 +#define XACE_SEND_ACCESS 5 +#define XACE_RECEIVE_ACCESS 6 +#define XACE_CLIENT_ACCESS 7 +#define XACE_EXT_ACCESS 8 +#define XACE_SERVER_ACCESS 9 +#define XACE_SELECTION_ACCESS 10 +#define XACE_SCREEN_ACCESS 11 +#define XACE_SCREENSAVER_ACCESS 12 +#define XACE_AUTH_AVAIL 13 +#define XACE_KEY_AVAIL 14 +#define XACE_AUDIT_BEGIN 15 +#define XACE_AUDIT_END 16 +#define XACE_NUM_HOOKS 17 + +extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; + +/* Entry point for hook functions. Called by Xserver. + * Required by libdbe and libextmod + */ +extern _X_EXPORT int XaceHook(int /*hook */ , + ... /*appropriate args for hook */ + ); + +/* Special-cased hook functions + */ +extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major); +extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, + PropertyPtr *ppProp, + Mask access_mode); +extern _X_EXPORT int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel, + Mask access_mode); +extern _X_EXPORT void XaceHookAuditEnd(ClientPtr ptr, int result); + +/* Register a callback for a given hook. + */ +#define XaceRegisterCallback(hook,callback,data) \ + AddCallback(XaceHooks+(hook), callback, data) + +/* Unregister an existing callback for a given hook. + */ +#define XaceDeleteCallback(hook,callback,data) \ + DeleteCallback(XaceHooks+(hook), callback, data) + +/* XTrans wrappers for use by security modules + */ +extern _X_EXPORT int XaceGetConnectionNumber(ClientPtr ptr); +extern _X_EXPORT int XaceIsLocal(ClientPtr ptr); + +/* From the original Security extension... + */ + +extern _X_EXPORT void XaceCensorImage(ClientPtr client, + RegionPtr pVisibleRegion, + long widthBytesLine, + DrawablePtr pDraw, + int x, int y, int w, int h, + unsigned int format, char *pBuf); + +#else /* XACE */ + +/* Default window background */ +#define XaceBackgroundNoneState(w) None + +/* Define calls away when XACE is not being built. */ + +#ifdef __GNUC__ +#define XaceHook(args...) Success +#define XaceHookDispatch(args...) Success +#define XaceHookPropertyAccess(args...) Success +#define XaceHookSelectionAccess(args...) Success +#define XaceHookAuditEnd(args...) { ; } +#define XaceCensorImage(args...) { ; } +#else +#define XaceHook(...) Success +#define XaceHookDispatch(...) Success +#define XaceHookPropertyAccess(...) Success +#define XaceHookSelectionAccess(...) Success +#define XaceHookAuditEnd(...) { ; } +#define XaceCensorImage(...) { ; } +#endif + +#endif /* XACE */ + +#endif /* _XACE_H */ diff --git a/Xext/xacestr.h b/Xext/xacestr.h new file mode 100644 index 0000000..989b033 --- /dev/null +++ b/Xext/xacestr.h @@ -0,0 +1,147 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifndef _XACESTR_H +#define _XACESTR_H + +#include "dix.h" +#include "resource.h" +#include "extnsionst.h" +#include "window.h" +#include "input.h" +#include "property.h" +#include "selection.h" +#include "xace.h" + +/* XACE_CORE_DISPATCH */ +typedef struct { + ClientPtr client; + int status; +} XaceCoreDispatchRec; + +/* XACE_RESOURCE_ACCESS */ +typedef struct { + ClientPtr client; + XID id; + RESTYPE rtype; + pointer res; + RESTYPE ptype; + pointer parent; + Mask access_mode; + int status; +} XaceResourceAccessRec; + +/* XACE_DEVICE_ACCESS */ +typedef struct { + ClientPtr client; + DeviceIntPtr dev; + Mask access_mode; + int status; +} XaceDeviceAccessRec; + +/* XACE_PROPERTY_ACCESS */ +typedef struct { + ClientPtr client; + WindowPtr pWin; + PropertyPtr *ppProp; + Mask access_mode; + int status; +} XacePropertyAccessRec; + +/* XACE_SEND_ACCESS */ +typedef struct { + ClientPtr client; + DeviceIntPtr dev; + WindowPtr pWin; + xEventPtr events; + int count; + int status; +} XaceSendAccessRec; + +/* XACE_RECEIVE_ACCESS */ +typedef struct { + ClientPtr client; + WindowPtr pWin; + xEventPtr events; + int count; + int status; +} XaceReceiveAccessRec; + +/* XACE_CLIENT_ACCESS */ +typedef struct { + ClientPtr client; + ClientPtr target; + Mask access_mode; + int status; +} XaceClientAccessRec; + +/* XACE_EXT_DISPATCH */ +/* XACE_EXT_ACCESS */ +typedef struct { + ClientPtr client; + ExtensionEntry *ext; + Mask access_mode; + int status; +} XaceExtAccessRec; + +/* XACE_SERVER_ACCESS */ +typedef struct { + ClientPtr client; + Mask access_mode; + int status; +} XaceServerAccessRec; + +/* XACE_SELECTION_ACCESS */ +typedef struct { + ClientPtr client; + Selection **ppSel; + Mask access_mode; + int status; +} XaceSelectionAccessRec; + +/* XACE_SCREEN_ACCESS */ +/* XACE_SCREENSAVER_ACCESS */ +typedef struct { + ClientPtr client; + ScreenPtr screen; + Mask access_mode; + int status; +} XaceScreenAccessRec; + +/* XACE_AUTH_AVAIL */ +typedef struct { + ClientPtr client; + XID authId; +} XaceAuthAvailRec; + +/* XACE_KEY_AVAIL */ +typedef struct { + xEventPtr event; + DeviceIntPtr keybd; + int count; +} XaceKeyAvailRec; + +/* XACE_AUDIT_BEGIN */ +/* XACE_AUDIT_END */ +typedef struct { + ClientPtr client; + int requestResult; +} XaceAuditRec; + +#endif /* _XACESTR_H */ diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c new file mode 100644 index 0000000..034bfb6 --- /dev/null +++ b/Xext/xcmisc.c @@ -0,0 +1,198 @@ +/* + +Copyright 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" +#include <X11/extensions/xcmiscproto.h> +#include "extinit.h" + +#include <stdint.h> + +static int +ProcXCMiscGetVersion(ClientPtr client) +{ + xXCMiscGetVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = XCMiscMajorVersion, + .minorVersion = XCMiscMinorVersion + }; + + REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + } + WriteToClient(client, sizeof(xXCMiscGetVersionReply), &rep); + return Success; +} + +static int +ProcXCMiscGetXIDRange(ClientPtr client) +{ + xXCMiscGetXIDRangeReply rep; + XID min_id, max_id; + + REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq); + GetXIDRange(client->index, FALSE, &min_id, &max_id); + rep = (xXCMiscGetXIDRangeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .start_id = min_id, + .count = max_id - min_id + 1 + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.start_id); + swapl(&rep.count); + } + WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), &rep); + return Success; +} + +static int +ProcXCMiscGetXIDList(ClientPtr client) +{ + REQUEST(xXCMiscGetXIDListReq); + xXCMiscGetXIDListReply rep; + XID *pids; + unsigned int count; + + REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); + + if (stuff->count > UINT32_MAX / sizeof(XID)) + return BadAlloc; + + pids = (XID *) malloc(stuff->count * sizeof(XID)); + if (!pids) { + return BadAlloc; + } + count = GetXIDList(client, stuff->count, pids); + rep = (xXCMiscGetXIDListReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = count, + .count = count + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.count); + } + WriteToClient(client, sizeof(xXCMiscGetXIDListReply), &rep); + if (count) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, count * sizeof(XID), pids); + } + free(pids); + return Success; +} + +static int +ProcXCMiscDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XCMiscGetVersion: + return ProcXCMiscGetVersion(client); + case X_XCMiscGetXIDRange: + return ProcXCMiscGetXIDRange(client); + case X_XCMiscGetXIDList: + return ProcXCMiscGetXIDList(client); + default: + return BadRequest; + } +} + +static int +SProcXCMiscGetVersion(ClientPtr client) +{ + REQUEST(xXCMiscGetVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); + return ProcXCMiscGetVersion(client); +} + +static int +SProcXCMiscGetXIDRange(ClientPtr client) +{ + REQUEST(xReq); + + swaps(&stuff->length); + return ProcXCMiscGetXIDRange(client); +} + +static int +SProcXCMiscGetXIDList(ClientPtr client) +{ + REQUEST(xXCMiscGetXIDListReq); + + swaps(&stuff->length); + swapl(&stuff->count); + return ProcXCMiscGetXIDList(client); +} + +static int +SProcXCMiscDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XCMiscGetVersion: + return SProcXCMiscGetVersion(client); + case X_XCMiscGetXIDRange: + return SProcXCMiscGetXIDRange(client); + case X_XCMiscGetXIDList: + return SProcXCMiscGetXIDList(client); + default: + return BadRequest; + } +} + +void +XCMiscExtensionInit(void) +{ + AddExtension(XCMiscExtensionName, 0, 0, + ProcXCMiscDispatch, SProcXCMiscDispatch, + NULL, StandardMinorOpcode); +} diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c new file mode 100644 index 0000000..46b3242 --- /dev/null +++ b/Xext/xf86bigfont.c @@ -0,0 +1,739 @@ +/* + * BIGFONT extension for sharing font metrics between clients (if possible) + * and for transmitting font metrics to clients in a compressed form. + * + * Copyright (c) 1999-2000 Bruno Haible + * Copyright (c) 1999-2000 The XFree86 Project, Inc. + */ + +/* THIS IS NOT AN X CONSORTIUM STANDARD */ + +/* + * Big fonts suffer from the following: All clients that have opened a + * font can access the complete glyph metrics array (the XFontStruct member + * `per_char') directly, without going through a macro. Moreover these + * glyph metrics are ink metrics, i.e. are not redundant even for a + * fixed-width font. For a Unicode font, the size of this array is 768 KB. + * + * Problems: 1. It eats a lot of memory in each client. 2. All this glyph + * metrics data is piped through the socket when the font is opened. + * + * This extension addresses these two problems for local clients, by using + * shared memory. It also addresses the second problem for non-local clients, + * by compressing the data before transmit by a factor of nearly 6. + * + * If you use this extension, your OS ought to nicely support shared memory. + * This means: Shared memory should be swappable to the swap, and the limits + * should be high enough (SHMMNI at least 64, SHMMAX at least 768 KB, + * SHMALL at least 48 MB). It is a plus if your OS allows shmat() calls + * on segments that have already been marked "removed", because it permits + * these segments to be cleaned up by the OS if the X server is killed with + * signal SIGKILL. + * + * This extension is transparently exploited by Xlib (functions XQueryFont, + * XLoadQueryFont). + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <sys/types.h> +#ifdef HAS_SHM +#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2) +/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */ +/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers): + Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define + PAGE_SIZE. It is defined in <asm/page.h>. */ +#include <asm/page.h> +#endif +#ifdef SVR4 +#include <sys/sysmacros.h> +#endif +#if defined(__CYGWIN__) +#include <sys/param.h> +#include <sys/sysmacros.h> +#endif +#include <sys/ipc.h> +#include <sys/shm.h> +#include <sys/stat.h> +#include <stdlib.h> +#include <unistd.h> +#include <time.h> +#include <errno.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "dixfontstr.h" +#include "extnsionst.h" +#include "extinit.h" +#include "protocol-versions.h" + +#include <X11/extensions/xf86bigfproto.h> +#include "xf86bigfontsrv.h" + +static void XF86BigfontResetProc(ExtensionEntry * /* extEntry */ + ); + +#ifdef HAS_SHM + +/* A random signature, transmitted to the clients so they can verify that the + shared memory segment they are attaching to was really established by the + X server they are talking to. */ +static CARD32 signature; + +/* Index for additional information stored in a FontRec's devPrivates array. */ +static int FontShmdescIndex; + +static unsigned int pagesize; + +static Bool badSysCall = FALSE; + +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) + +#include <sys/signal.h> + +static void +SigSysHandler(int signo) +{ + badSysCall = TRUE; +} + +static Bool +CheckForShmSyscall(void) +{ + void (*oldHandler) (int); + int shmid = -1; + + /* If no SHM support in the kernel, the bad syscall will generate SIGSYS */ + oldHandler = signal(SIGSYS, SigSysHandler); + + badSysCall = FALSE; + shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT); + if (shmid != -1) { + /* Successful allocation - clean up */ + shmctl(shmid, IPC_RMID, NULL); + } + else { + /* Allocation failed */ + badSysCall = TRUE; + } + signal(SIGSYS, oldHandler); + return !badSysCall; +} + +#define MUST_CHECK_FOR_SHM_SYSCALL + +#endif + +#endif + +/* ========== Management of shared memory segments ========== */ + +#ifdef HAS_SHM + +#ifdef __linux__ +/* On Linux, shared memory marked as "removed" can still be attached. + Nice feature, because the kernel will automatically free the associated + storage when the server and all clients are gone. */ +#define EARLY_REMOVE +#endif + +typedef struct _ShmDesc { + struct _ShmDesc *next; + struct _ShmDesc **prev; + int shmid; + char *attach_addr; +} ShmDescRec, *ShmDescPtr; + +static ShmDescPtr ShmList = (ShmDescPtr) NULL; + +static ShmDescPtr +shmalloc(unsigned int size) +{ + ShmDescPtr pDesc; + int shmid; + char *addr; + +#ifdef MUST_CHECK_FOR_SHM_SYSCALL + if (pagesize == 0) + return (ShmDescPtr) NULL; +#endif + + /* On some older Linux systems, the number of shared memory segments + system-wide is 127. In Linux 2.4, it is 4095. + Therefore there is a tradeoff to be made between allocating a + shared memory segment on one hand, and allocating memory and piping + the glyph metrics on the other hand. If the glyph metrics size is + small, we prefer the traditional way. */ + if (size < 3500) + return (ShmDescPtr) NULL; + + pDesc = malloc(sizeof(ShmDescRec)); + if (!pDesc) + return (ShmDescPtr) NULL; + + size = (size + pagesize - 1) & -pagesize; + shmid = shmget(IPC_PRIVATE, size, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); + if (shmid == -1) { + ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, %s\n", + size, strerror(errno)); + free(pDesc); + return (ShmDescPtr) NULL; + } + + if ((addr = shmat(shmid, 0, 0)) == (char *) -1) { + ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, %s\n", + size, strerror(errno)); + shmctl(shmid, IPC_RMID, (void *) 0); + free(pDesc); + return (ShmDescPtr) NULL; + } + +#ifdef EARLY_REMOVE + shmctl(shmid, IPC_RMID, (void *) 0); +#endif + + pDesc->shmid = shmid; + pDesc->attach_addr = addr; + if (ShmList) + ShmList->prev = &pDesc->next; + pDesc->next = ShmList; + pDesc->prev = &ShmList; + ShmList = pDesc; + + return pDesc; +} + +static void +shmdealloc(ShmDescPtr pDesc) +{ +#ifndef EARLY_REMOVE + shmctl(pDesc->shmid, IPC_RMID, (void *) 0); +#endif + shmdt(pDesc->attach_addr); + + if (pDesc->next) + pDesc->next->prev = pDesc->prev; + *pDesc->prev = pDesc->next; + free(pDesc); +} + +#endif + +/* Called when a font is closed. */ +void +XF86BigfontFreeFontShm(FontPtr pFont) +{ +#ifdef HAS_SHM + ShmDescPtr pDesc; + + /* If during shutdown of the server, XF86BigfontCleanup() has already + * called shmdealloc() for all segments, we don't need to do it here. + */ + if (!ShmList) + return; + + pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex); + if (pDesc) + shmdealloc(pDesc); +#endif +} + +/* Called upon fatal signal. */ +void +XF86BigfontCleanup(void) +{ +#ifdef HAS_SHM + while (ShmList) + shmdealloc(ShmList); +#endif +} + +/* Called when a server generation dies. */ +static void +XF86BigfontResetProc(ExtensionEntry * extEntry) +{ + /* This function is normally called from CloseDownExtensions(), called + * from main(). It will be followed by a call to FreeAllResources(), + * which will call XF86BigfontFreeFontShm() for each font. Thus it + * appears that we do not need to do anything in this function. -- + * But I prefer to write robust code, and not keep shared memory lying + * around when it's not needed any more. (Someone might close down the + * extension without calling FreeAllResources()...) + */ + XF86BigfontCleanup(); +} + +/* ========== Handling of extension specific requests ========== */ + +static int +ProcXF86BigfontQueryVersion(ClientPtr client) +{ + xXF86BigfontQueryVersionReply reply; + + REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq); + reply = (xXF86BigfontQueryVersionReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION, + .minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION, + .uid = geteuid(), + .gid = getegid(), +#ifdef HAS_SHM + .signature = signature, + .capabilities = (client->local && !client->swapped) + ? XF86Bigfont_CAP_LocalShm : 0 +#else + .signature = 0, + .capabilities = 0 +#endif + }; + if (client->swapped) { + swaps(&reply.sequenceNumber); + swapl(&reply.length); + swaps(&reply.majorVersion); + swaps(&reply.minorVersion); + swapl(&reply.uid); + swapl(&reply.gid); + swapl(&reply.signature); + } + WriteToClient(client, sizeof(xXF86BigfontQueryVersionReply), &reply); + return Success; +} + +static void +swapCharInfo(xCharInfo * pCI) +{ + swaps(&pCI->leftSideBearing); + swaps(&pCI->rightSideBearing); + swaps(&pCI->characterWidth); + swaps(&pCI->ascent); + swaps(&pCI->descent); + swaps(&pCI->attributes); +} + +/* static CARD32 hashCI (xCharInfo *p); */ +#define hashCI(p) \ + (CARD32)(((p->leftSideBearing << 27) + (p->leftSideBearing >> 5) + \ + (p->rightSideBearing << 23) + (p->rightSideBearing >> 9) + \ + (p->characterWidth << 16) + \ + (p->ascent << 11) + (p->descent << 6)) ^ p->attributes) + +static int +ProcXF86BigfontQueryFont(ClientPtr client) +{ + FontPtr pFont; + + REQUEST(xXF86BigfontQueryFontReq); + CARD32 stuff_flags; + xCharInfo *pmax; + xCharInfo *pmin; + int nCharInfos; + int shmid; + +#ifdef HAS_SHM + ShmDescPtr pDesc = NULL; +#else +#define pDesc 0 +#endif + xCharInfo *pCI; + CARD16 *pIndex2UniqIndex; + CARD16 *pUniqIndex2Index; + CARD32 nUniqCharInfos; + +#if 0 + REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); +#else + switch (client->req_len) { + case 2: /* client with version 1.0 libX11 */ + stuff_flags = (client->local && + !client->swapped ? XF86Bigfont_FLAGS_Shm : 0); + break; + case 3: /* client with version 1.1 libX11 */ + stuff_flags = stuff->flags; + break; + default: + return BadLength; + } +#endif + if (dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess) != + Success) + return BadFont; /* procotol spec says only error is BadFont */ + + pmax = FONTINKMAX(pFont); + pmin = FONTINKMIN(pFont); + nCharInfos = + (pmax->rightSideBearing == pmin->rightSideBearing + && pmax->leftSideBearing == pmin->leftSideBearing + && pmax->descent == pmin->descent + && pmax->ascent == pmin->ascent + && pmax->characterWidth == pmin->characterWidth) + ? 0 : N2dChars(pFont); + shmid = -1; + pCI = NULL; + pIndex2UniqIndex = NULL; + pUniqIndex2Index = NULL; + nUniqCharInfos = 0; + + if (nCharInfos > 0) { +#ifdef HAS_SHM + if (!badSysCall) + pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex); + if (pDesc) { + pCI = (xCharInfo *) pDesc->attach_addr; + if (stuff_flags & XF86Bigfont_FLAGS_Shm) + shmid = pDesc->shmid; + } + else { + if (stuff_flags & XF86Bigfont_FLAGS_Shm && !badSysCall) + pDesc = shmalloc(nCharInfos * sizeof(xCharInfo) + + sizeof(CARD32)); + if (pDesc) { + pCI = (xCharInfo *) pDesc->attach_addr; + shmid = pDesc->shmid; + } + else { +#endif + pCI = malloc(nCharInfos * sizeof(xCharInfo)); + if (!pCI) + return BadAlloc; +#ifdef HAS_SHM + } +#endif + /* Fill nCharInfos starting at pCI. */ + { + xCharInfo *prCI = pCI; + int ninfos = 0; + int ncols = pFont->info.lastCol - pFont->info.firstCol + 1; + int row; + + for (row = pFont->info.firstRow; + row <= pFont->info.lastRow && ninfos < nCharInfos; row++) { + unsigned char chars[512]; + xCharInfo *tmpCharInfos[256]; + unsigned long count; + int col; + unsigned long i; + + i = 0; + for (col = pFont->info.firstCol; + col <= pFont->info.lastCol; col++) { + chars[i++] = row; + chars[i++] = col; + } + (*pFont->get_metrics) (pFont, ncols, chars, TwoD16Bit, + &count, tmpCharInfos); + for (i = 0; i < count && ninfos < nCharInfos; i++) { + *prCI++ = *tmpCharInfos[i]; + ninfos++; + } + } + } +#ifdef HAS_SHM + if (pDesc && !badSysCall) { + *(CARD32 *) (pCI + nCharInfos) = signature; + if (!FontSetPrivate(pFont, FontShmdescIndex, pDesc)) { + shmdealloc(pDesc); + return BadAlloc; + } + } + } +#endif + if (shmid == -1) { + /* Cannot use shared memory, so remove-duplicates the xCharInfos + using a temporary hash table. */ + /* Note that CARD16 is suitable as index type, because + nCharInfos <= 0x10000. */ + CARD32 hashModulus; + CARD16 *pHash2UniqIndex; + CARD16 *pUniqIndex2NextUniqIndex; + CARD32 NextIndex; + CARD32 NextUniqIndex; + CARD16 *tmp; + CARD32 i, j; + + hashModulus = 67; + if (hashModulus > nCharInfos + 1) + hashModulus = nCharInfos + 1; + + tmp = malloc((4 * nCharInfos + 1) * sizeof(CARD16)); + if (!tmp) { + if (!pDesc) + free(pCI); + return BadAlloc; + } + pIndex2UniqIndex = tmp; + /* nCharInfos elements */ + pUniqIndex2Index = tmp + nCharInfos; + /* max. nCharInfos elements */ + pUniqIndex2NextUniqIndex = tmp + 2 * nCharInfos; + /* max. nCharInfos elements */ + pHash2UniqIndex = tmp + 3 * nCharInfos; + /* hashModulus (<= nCharInfos+1) elements */ + + /* Note that we can use 0xffff as end-of-list indicator, because + even if nCharInfos = 0x10000, 0xffff can not occur as valid + entry before the last element has been inserted. And once the + last element has been inserted, we don't need the hash table + any more. */ + for (j = 0; j < hashModulus; j++) + pHash2UniqIndex[j] = (CARD16) (-1); + + NextUniqIndex = 0; + for (NextIndex = 0; NextIndex < nCharInfos; NextIndex++) { + xCharInfo *p = &pCI[NextIndex]; + CARD32 hashCode = hashCI(p) % hashModulus; + + for (i = pHash2UniqIndex[hashCode]; + i != (CARD16) (-1); i = pUniqIndex2NextUniqIndex[i]) { + j = pUniqIndex2Index[i]; + if (pCI[j].leftSideBearing == p->leftSideBearing + && pCI[j].rightSideBearing == p->rightSideBearing + && pCI[j].characterWidth == p->characterWidth + && pCI[j].ascent == p->ascent + && pCI[j].descent == p->descent + && pCI[j].attributes == p->attributes) + break; + } + if (i != (CARD16) (-1)) { + /* Found *p at Index j, UniqIndex i */ + pIndex2UniqIndex[NextIndex] = i; + } + else { + /* Allocate a new entry in the Uniq table */ + if (hashModulus <= 2 * NextUniqIndex + && hashModulus < nCharInfos + 1) { + /* Time to increate hash table size */ + hashModulus = 2 * hashModulus + 1; + if (hashModulus > nCharInfos + 1) + hashModulus = nCharInfos + 1; + for (j = 0; j < hashModulus; j++) + pHash2UniqIndex[j] = (CARD16) (-1); + for (i = 0; i < NextUniqIndex; i++) + pUniqIndex2NextUniqIndex[i] = (CARD16) (-1); + for (i = 0; i < NextUniqIndex; i++) { + j = pUniqIndex2Index[i]; + p = &pCI[j]; + hashCode = hashCI(p) % hashModulus; + pUniqIndex2NextUniqIndex[i] = + pHash2UniqIndex[hashCode]; + pHash2UniqIndex[hashCode] = i; + } + p = &pCI[NextIndex]; + hashCode = hashCI(p) % hashModulus; + } + i = NextUniqIndex++; + pUniqIndex2NextUniqIndex[i] = pHash2UniqIndex[hashCode]; + pHash2UniqIndex[hashCode] = i; + pUniqIndex2Index[i] = NextIndex; + pIndex2UniqIndex[NextIndex] = i; + } + } + nUniqCharInfos = NextUniqIndex; + /* fprintf(stderr, "font metrics: nCharInfos = %d, nUniqCharInfos = %d, hashModulus = %d\n", nCharInfos, nUniqCharInfos, hashModulus); */ + } + } + + { + int nfontprops = pFont->info.nprops; + int rlength = sizeof(xXF86BigfontQueryFontReply) + + nfontprops * sizeof(xFontProp) + + (nCharInfos > 0 && shmid == -1 + ? nUniqCharInfos * sizeof(xCharInfo) + + (nCharInfos + 1) / 2 * 2 * sizeof(CARD16) + : 0); + xXF86BigfontQueryFontReply *reply = calloc(1, rlength); + char *p; + + if (!reply) { + if (nCharInfos > 0) { + if (shmid == -1) + free(pIndex2UniqIndex); + if (!pDesc) + free(pCI); + } + return BadAlloc; + } + reply->type = X_Reply; + reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); + reply->sequenceNumber = client->sequence; + reply->minBounds = pFont->info.ink_minbounds; + reply->maxBounds = pFont->info.ink_maxbounds; + reply->minCharOrByte2 = pFont->info.firstCol; + reply->maxCharOrByte2 = pFont->info.lastCol; + reply->defaultChar = pFont->info.defaultCh; + reply->nFontProps = pFont->info.nprops; + reply->drawDirection = pFont->info.drawDirection; + reply->minByte1 = pFont->info.firstRow; + reply->maxByte1 = pFont->info.lastRow; + reply->allCharsExist = pFont->info.allExist; + reply->fontAscent = pFont->info.fontAscent; + reply->fontDescent = pFont->info.fontDescent; + reply->nCharInfos = nCharInfos; + reply->nUniqCharInfos = nUniqCharInfos; + reply->shmid = shmid; + reply->shmsegoffset = 0; + if (client->swapped) { + swaps(&reply->sequenceNumber); + swapl(&reply->length); + swapCharInfo(&reply->minBounds); + swapCharInfo(&reply->maxBounds); + swaps(&reply->minCharOrByte2); + swaps(&reply->maxCharOrByte2); + swaps(&reply->defaultChar); + swaps(&reply->nFontProps); + swaps(&reply->fontAscent); + swaps(&reply->fontDescent); + swapl(&reply->nCharInfos); + swapl(&reply->nUniqCharInfos); + swapl(&reply->shmid); + swapl(&reply->shmsegoffset); + } + p = (char *) &reply[1]; + { + FontPropPtr pFP; + xFontProp *prFP; + int i; + + for (i = 0, pFP = pFont->info.props, prFP = (xFontProp *) p; + i < nfontprops; i++, pFP++, prFP++) { + prFP->name = pFP->name; + prFP->value = pFP->value; + if (client->swapped) { + swapl(&prFP->name); + swapl(&prFP->value); + } + } + p = (char *) prFP; + } + if (nCharInfos > 0 && shmid == -1) { + xCharInfo *pci; + CARD16 *ps; + int i, j; + + pci = (xCharInfo *) p; + for (i = 0; i < nUniqCharInfos; i++, pci++) { + *pci = pCI[pUniqIndex2Index[i]]; + if (client->swapped) + swapCharInfo(pci); + } + ps = (CARD16 *) pci; + for (j = 0; j < nCharInfos; j++, ps++) { + *ps = pIndex2UniqIndex[j]; + if (client->swapped) { + swaps(ps); + } + } + } + WriteToClient(client, rlength, reply); + free(reply); + if (nCharInfos > 0) { + if (shmid == -1) + free(pIndex2UniqIndex); + if (!pDesc) + free(pCI); + } + return Success; + } +} + +static int +ProcXF86BigfontDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_XF86BigfontQueryVersion: + return ProcXF86BigfontQueryVersion(client); + case X_XF86BigfontQueryFont: + return ProcXF86BigfontQueryFont(client); + default: + return BadRequest; + } +} + +static int +SProcXF86BigfontQueryVersion(ClientPtr client) +{ + REQUEST(xXF86BigfontQueryVersionReq); + + swaps(&stuff->length); + return ProcXF86BigfontQueryVersion(client); +} + +static int +SProcXF86BigfontQueryFont(ClientPtr client) +{ + REQUEST(xXF86BigfontQueryFontReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); + swapl(&stuff->id); + return ProcXF86BigfontQueryFont(client); +} + +static int +SProcXF86BigfontDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_XF86BigfontQueryVersion: + return SProcXF86BigfontQueryVersion(client); + case X_XF86BigfontQueryFont: + return SProcXF86BigfontQueryFont(client); + default: + return BadRequest; + } +} + +void +XFree86BigfontExtensionInit(void) +{ + if (AddExtension(XF86BIGFONTNAME, + XF86BigfontNumberEvents, + XF86BigfontNumberErrors, + ProcXF86BigfontDispatch, + SProcXF86BigfontDispatch, + XF86BigfontResetProc, StandardMinorOpcode)) { +#ifdef HAS_SHM +#ifdef MUST_CHECK_FOR_SHM_SYSCALL + /* + * Note: Local-clients will not be optimized without shared memory + * support. Remote-client optimization does not depend on shared + * memory support. Thus, the extension is still registered even + * when shared memory support is not functional. + */ + if (!CheckForShmSyscall()) { + ErrorF(XF86BIGFONTNAME + " extension local-client optimization disabled due to lack of shared memory support in the kernel\n"); + return; + } +#endif + + srand((unsigned int) time(NULL)); + signature = ((unsigned int) (65536.0 / (RAND_MAX + 1.0) * rand()) << 16) + + (unsigned int) (65536.0 / (RAND_MAX + 1.0) * rand()); + /* fprintf(stderr, "signature = 0x%08X\n", signature); */ + + FontShmdescIndex = AllocateFontPrivateIndex(); + +#if !defined(CSRG_BASED) && !defined(__CYGWIN__) + pagesize = SHMLBA; +#else +#ifdef _SC_PAGESIZE + pagesize = sysconf(_SC_PAGESIZE); +#else + pagesize = getpagesize(); +#endif +#endif +#endif + } +} diff --git a/Xext/xf86bigfontsrv.h b/Xext/xf86bigfontsrv.h new file mode 100644 index 0000000..eab5287 --- /dev/null +++ b/Xext/xf86bigfontsrv.h @@ -0,0 +1,33 @@ +/* + * Copyright © 2010 Yaakov Selkowitz + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef _XF86BIGFONTSRV_H_ +#define _XF86BIGFONTSRV_H_ + +#include <X11/fonts/font.h> + +extern void XF86BigfontFreeFontShm(FontPtr); +extern void XF86BigfontCleanup(void); + +#endif diff --git a/Xext/xres.c b/Xext/xres.c new file mode 100644 index 0000000..445abca --- /dev/null +++ b/Xext/xres.c @@ -0,0 +1,1192 @@ +/* + Copyright (c) 2002 XFree86 Inc +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdio.h> +#include <string.h> +#include <X11/X.h> +#include <X11/Xproto.h> +#include <assert.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" +#include "registry.h" +#include <X11/extensions/XResproto.h> +#include "pixmapstr.h" +#include "windowstr.h" +#include "gcstruct.h" +#include "extinit.h" +#include "protocol-versions.h" +#include "client.h" +#include "list.h" +#include "misc.h" +#include <string.h> +#include "hashtable.h" +#include "picturestr.h" + +#ifdef COMPOSITE +#include "compint.h" +#endif + +/** @brief Holds fragments of responses for ConstructClientIds. + * + * note: there is no consideration for data alignment */ +typedef struct { + struct xorg_list l; + int bytes; + /* data follows */ +} FragmentList; + +#define FRAGMENT_DATA(ptr) ((void*) ((char*) (ptr) + sizeof(FragmentList))) + +/** @brief Holds structure for the generated response to + ProcXResQueryClientIds; used by ConstructClientId* -functions */ +typedef struct { + int numIds; + int resultBytes; + struct xorg_list response; + int sentClientMasks[MAXCLIENTS]; +} ConstructClientIdCtx; + +/** @brief Holds the structure for information required to + generate the response to XResQueryResourceBytes. In addition + to response it contains information on the query as well, + as well as some volatile information required by a few + functions that cannot take that information directly + via a parameter, as they are called via already-existing + higher order functions. */ +typedef struct { + ClientPtr sendClient; + int numSizes; + int resultBytes; + struct xorg_list response; + int status; + long numSpecs; + xXResResourceIdSpec *specs; + HashTable visitedResources; + + /* Used by AddSubResourceSizeSpec when AddResourceSizeValue is + handling crossreferences */ + HashTable visitedSubResources; + + /* used when ConstructResourceBytesCtx is passed to + AddResourceSizeValue2 via FindClientResourcesByType */ + RESTYPE resType; + + /* used when ConstructResourceBytesCtx is passed to + AddResourceSizeValueByResource from ConstructResourceBytesByResource */ + xXResResourceIdSpec *curSpec; + + /** Used when iterating through a single resource's subresources + + @see AddSubResourceSizeSpec */ + xXResResourceSizeValue *sizeValue; +} ConstructResourceBytesCtx; + +/** @brief Allocate and add a sequence of bytes at the end of a fragment list. + Call DestroyFragments to release the list. + + @param frags A pointer to head of an initialized linked list + @param bytes Number of bytes to allocate + @return Returns a pointer to the allocated non-zeroed region + that is to be filled by the caller. On error (out of memory) + returns NULL and makes no changes to the list. +*/ +static void * +AddFragment(struct xorg_list *frags, int bytes) +{ + FragmentList *f = malloc(sizeof(FragmentList) + bytes); + if (!f) { + return NULL; + } else { + f->bytes = bytes; + xorg_list_add(&f->l, frags->prev); + return (char*) f + sizeof(*f); + } +} + +/** @brief Sends all fragments in the list to the client. Does not + free anything. + + @param client The client to send the fragments to + @param frags The head of the list of fragments +*/ +static void +WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags) +{ + FragmentList *it; + xorg_list_for_each_entry(it, frags, l) { + WriteToClient(client, it->bytes, (char*) it + sizeof(*it)); + } +} + +/** @brief Frees a list of fragments. Does not free() root node. + + @param frags The head of the list of fragments +*/ +static void +DestroyFragments(struct xorg_list *frags) +{ + FragmentList *it, *tmp; + xorg_list_for_each_entry_safe(it, tmp, frags, l) { + xorg_list_del(&it->l); + free(it); + } +} + +/** @brief Constructs a context record for ConstructClientId* functions + to use */ +static void +InitConstructClientIdCtx(ConstructClientIdCtx *ctx) +{ + ctx->numIds = 0; + ctx->resultBytes = 0; + xorg_list_init(&ctx->response); + memset(ctx->sentClientMasks, 0, sizeof(ctx->sentClientMasks)); +} + +/** @brief Destroys a context record, releases all memory (except the storage + for *ctx itself) */ +static void +DestroyConstructClientIdCtx(ConstructClientIdCtx *ctx) +{ + DestroyFragments(&ctx->response); +} + +static Bool +InitConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx, + ClientPtr sendClient, + long numSpecs, + xXResResourceIdSpec *specs) +{ + ctx->sendClient = sendClient; + ctx->numSizes = 0; + ctx->resultBytes = 0; + xorg_list_init(&ctx->response); + ctx->status = Success; + ctx->numSpecs = numSpecs; + ctx->specs = specs; + ctx->visitedResources = ht_create(sizeof(XID), 0, + ht_resourceid_hash, ht_resourceid_compare, + NULL); + + if (!ctx->visitedResources) { + return FALSE; + } else { + return TRUE; + } +} + +static void +DestroyConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx) +{ + DestroyFragments(&ctx->response); + ht_destroy(ctx->visitedResources); +} + +static int +ProcXResQueryVersion(ClientPtr client) +{ + REQUEST(xXResQueryVersionReq); + xXResQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .server_major = SERVER_XRES_MAJOR_VERSION, + .server_minor = SERVER_XRES_MINOR_VERSION + }; + + REQUEST_SIZE_MATCH(xXResQueryVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.server_major); + swaps(&rep.server_minor); + } + WriteToClient(client, sizeof(xXResQueryVersionReply), &rep); + return Success; +} + +static int +ProcXResQueryClients(ClientPtr client) +{ + /* REQUEST(xXResQueryClientsReq); */ + xXResQueryClientsReply rep; + int *current_clients; + int i, num_clients; + + REQUEST_SIZE_MATCH(xXResQueryClientsReq); + + current_clients = malloc(currentMaxClients * sizeof(int)); + + num_clients = 0; + for (i = 0; i < currentMaxClients; i++) { + if (clients[i]) { + current_clients[num_clients] = i; + num_clients++; + } + } + + rep = (xXResQueryClientsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(num_clients * sz_xXResClient), + .num_clients = num_clients + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.num_clients); + } + WriteToClient(client, sizeof(xXResQueryClientsReply), &rep); + + if (num_clients) { + xXResClient scratch; + + for (i = 0; i < num_clients; i++) { + scratch.resource_base = clients[current_clients[i]]->clientAsMask; + scratch.resource_mask = RESOURCE_ID_MASK; + + if (client->swapped) { + swapl(&scratch.resource_base); + swapl(&scratch.resource_mask); + } + WriteToClient(client, sz_xXResClient, &scratch); + } + } + + free(current_clients); + + return Success; +} + +static void +ResFindAllRes(pointer value, XID id, RESTYPE type, pointer cdata) +{ + int *counts = (int *) cdata; + + counts[(type & TypeMask) - 1]++; +} + +static int +ProcXResQueryClientResources(ClientPtr client) +{ + REQUEST(xXResQueryClientResourcesReq); + xXResQueryClientResourcesReply rep; + int i, clientID, num_types; + int *counts; + + REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq); + + clientID = CLIENT_ID(stuff->xid); + + if ((clientID >= currentMaxClients) || !clients[clientID]) { + client->errorValue = stuff->xid; + return BadValue; + } + + counts = calloc(lastResourceType + 1, sizeof(int)); + + FindAllClientResources(clients[clientID], ResFindAllRes, counts); + + num_types = 0; + + for (i = 0; i <= lastResourceType; i++) { + if (counts[i]) + num_types++; + } + + rep = (xXResQueryClientResourcesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(num_types * sz_xXResType), + .num_types = num_types + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.num_types); + } + + WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep); + + if (num_types) { + xXResType scratch; + const char *name; + + for (i = 0; i < lastResourceType; i++) { + if (!counts[i]) + continue; + + name = LookupResourceName(i + 1); + if (strcmp(name, XREGISTRY_UNKNOWN)) + scratch.resource_type = MakeAtom(name, strlen(name), TRUE); + else { + char buf[40]; + + snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1); + scratch.resource_type = MakeAtom(buf, strlen(buf), TRUE); + } + + scratch.count = counts[i]; + + if (client->swapped) { + swapl(&scratch.resource_type); + swapl(&scratch.count); + } + WriteToClient(client, sz_xXResType, &scratch); + } + } + + free(counts); + + return Success; +} + +static unsigned long +ResGetApproxPixmapBytes(PixmapPtr pix) +{ + unsigned long nPixels; + int bytesPerPixel; + + bytesPerPixel = pix->drawable.bitsPerPixel >> 3; + nPixels = pix->drawable.width * pix->drawable.height; + + /* Divide by refcnt as pixmap could be shared between clients, + * so total pixmap mem is shared between these. + */ + return (nPixels * bytesPerPixel) / pix->refcnt; +} + +static void +ResFindResourcePixmaps(pointer value, XID id, RESTYPE type, pointer cdata) +{ + SizeType sizeFunc = GetResourceTypeSizeFunc(type); + ResourceSizeRec size = { 0, 0, 0 }; + unsigned long *bytes = cdata; + + sizeFunc(value, id, &size); + *bytes += size.pixmapRefSize; +} + +static void +ResFindPixmaps(pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *) cdata; + PixmapPtr pix = (PixmapPtr) value; + + *bytes += ResGetApproxPixmapBytes(pix); +} + +static void +ResFindWindowPixmaps(pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *) cdata; + WindowPtr pWin = (WindowPtr) value; + + if (pWin->backgroundState == BackgroundPixmap) + *bytes += ResGetApproxPixmapBytes(pWin->background.pixmap); + + if (pWin->border.pixmap != NULL && !pWin->borderIsPixel) + *bytes += ResGetApproxPixmapBytes(pWin->border.pixmap); +} + +static void +ResFindGCPixmaps(pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *) cdata; + GCPtr pGC = (GCPtr) value; + + if (pGC->stipple != NULL) + *bytes += ResGetApproxPixmapBytes(pGC->stipple); + + if (pGC->tile.pixmap != NULL && !pGC->tileIsPixel) + *bytes += ResGetApproxPixmapBytes(pGC->tile.pixmap); +} + +static void +ResFindPicturePixmaps(pointer value, XID id, pointer cdata) +{ +#ifdef RENDER + ResFindResourcePixmaps(value, id, PictureType, cdata); +#endif +} + +static void +ResFindCompositeClientWindowPixmaps (pointer value, XID id, pointer cdata) +{ +#ifdef COMPOSITE + ResFindResourcePixmaps(value, id, CompositeClientWindowType, cdata); +#endif +} + +static int +ProcXResQueryClientPixmapBytes(ClientPtr client) +{ + REQUEST(xXResQueryClientPixmapBytesReq); + xXResQueryClientPixmapBytesReply rep; + int clientID; + unsigned long bytes; + + REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq); + + clientID = CLIENT_ID(stuff->xid); + + if ((clientID >= currentMaxClients) || !clients[clientID]) { + client->errorValue = stuff->xid; + return BadValue; + } + + bytes = 0; + + FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps, + (pointer) (&bytes)); + + /* + * Make sure win background pixmaps also held to account. + */ + FindClientResourcesByType(clients[clientID], RT_WINDOW, + ResFindWindowPixmaps, (pointer) (&bytes)); + + /* + * GC Tile & Stipple pixmaps too. + */ + FindClientResourcesByType(clients[clientID], RT_GC, + ResFindGCPixmaps, (pointer) (&bytes)); + +#ifdef RENDER + /* Render extension picture pixmaps. */ + FindClientResourcesByType(clients[clientID], PictureType, + ResFindPicturePixmaps, + (pointer)(&bytes)); +#endif + +#ifdef COMPOSITE + /* Composite extension client window pixmaps. */ + FindClientResourcesByType(clients[clientID], CompositeClientWindowType, + ResFindCompositeClientWindowPixmaps, + (pointer)(&bytes)); +#endif + + rep = (xXResQueryClientPixmapBytesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .bytes = bytes, +#ifdef _XSERVER64 + .bytes_overflow = bytes >> 32 +#else + .bytes_overflow = 0 +#endif + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.bytes); + swapl(&rep.bytes_overflow); + } + WriteToClient(client, sizeof(xXResQueryClientPixmapBytesReply), &rep); + + return Success; +} + +/** @brief Finds out if a client's information need to be put into the + response; marks client having been handled, if that is the case. + + @param client The client to send information about + @param mask The request mask (0 to send everything, otherwise a + bitmask of X_XRes*Mask) + @param ctx The context record that tells which clients and id types + have been already handled + @param sendMask Which id type are we now considering. One of X_XRes*Mask. + + @return Returns TRUE if the client information needs to be on the + response, otherwise FALSE. +*/ +static Bool +WillConstructMask(ClientPtr client, CARD32 mask, + ConstructClientIdCtx *ctx, int sendMask) +{ + if ((!mask || (mask & sendMask)) + && !(ctx->sentClientMasks[client->index] & sendMask)) { + ctx->sentClientMasks[client->index] |= sendMask; + return TRUE; + } else { + return FALSE; + } +} + +/** @brief Constructs a response about a single client, based on a certain + client id spec + + @param sendClient Which client wishes to receive this answer. Used for + byte endianess. + @param client Which client are we considering. + @param mask The client id spec mask indicating which information + we want about this client. + @param ctx The context record containing the constructed response + and information on which clients and masks have been + already handled. + + @return Return TRUE if everything went OK, otherwise FALSE which indicates + a memory allocation problem. +*/ +static Bool +ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask, + ConstructClientIdCtx *ctx) +{ + xXResClientIdValue rep; + + rep.spec.client = client->clientAsMask; + if (client->swapped) { + swapl (&rep.spec.client); + } + + if (WillConstructMask(client, mask, ctx, X_XResClientXIDMask)) { + void *ptr = AddFragment(&ctx->response, sizeof(rep)); + if (!ptr) { + return FALSE; + } + + rep.spec.mask = X_XResClientXIDMask; + rep.length = 0; + if (sendClient->swapped) { + swapl (&rep.spec.mask); + /* swapl (&rep.length, n); - not required for rep.length = 0 */ + } + + memcpy(ptr, &rep, sizeof(rep)); + + ctx->resultBytes += sizeof(rep); + ++ctx->numIds; + } + if (WillConstructMask(client, mask, ctx, X_XResLocalClientPIDMask)) { + pid_t pid = GetClientPid(client); + + if (pid != -1) { + void *ptr = AddFragment(&ctx->response, + sizeof(rep) + sizeof(CARD32)); + CARD32 *value = (void*) ((char*) ptr + sizeof(rep)); + + if (!ptr) { + return FALSE; + } + + rep.spec.mask = X_XResLocalClientPIDMask; + rep.length = 4; + + if (sendClient->swapped) { + swapl (&rep.spec.mask); + swapl (&rep.length); + } + + if (sendClient->swapped) { + swapl (value); + } + memcpy(ptr, &rep, sizeof(rep)); + *value = pid; + + ctx->resultBytes += sizeof(rep) + sizeof(CARD32); + ++ctx->numIds; + } + } + + /* memory allocation errors earlier may return with FALSE */ + return TRUE; +} + +/** @brief Constructs a response about all clients, based on a client id specs + + @param client Which client which we are constructing the response for. + @param numSpecs Number of client id specs in specs + @param specs Client id specs + + @return Return Success if everything went OK, otherwise a Bad* (currently + BadAlloc or BadValue) +*/ +static int +ConstructClientIds(ClientPtr client, + int numSpecs, xXResClientIdSpec* specs, + ConstructClientIdCtx *ctx) +{ + int specIdx; + + for (specIdx = 0; specIdx < numSpecs; ++specIdx) { + if (specs[specIdx].client == 0) { + int c; + for (c = 0; c < currentMaxClients; ++c) { + if (clients[c]) { + if (!ConstructClientIdValue(client, clients[c], + specs[specIdx].mask, ctx)) { + return BadAlloc; + } + } + } + } else { + int clientID = CLIENT_ID(specs[specIdx].client); + + if ((clientID < currentMaxClients) && clients[clientID]) { + if (!ConstructClientIdValue(client, clients[clientID], + specs[specIdx].mask, ctx)) { + return BadAlloc; + } + } + } + } + + /* memory allocation errors earlier may return with BadAlloc */ + return Success; +} + +/** @brief Response to XResQueryClientIds request introduced in XResProto v1.2 + + @param client Which client which we are constructing the response for. + + @return Returns the value returned from ConstructClientIds with the same + semantics +*/ +static int +ProcXResQueryClientIds (ClientPtr client) +{ + REQUEST(xXResQueryClientIdsReq); + + xXResClientIdSpec *specs = (void*) ((char*) stuff + sizeof(*stuff)); + int rc; + ConstructClientIdCtx ctx; + + InitConstructClientIdCtx(&ctx); + + REQUEST_AT_LEAST_SIZE(xXResQueryClientIdsReq); + REQUEST_FIXED_SIZE(xXResQueryClientIdsReq, + stuff->numSpecs * sizeof(specs[0])); + + rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx); + + if (rc == Success) { + xXResQueryClientIdsReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(ctx.resultBytes), + .numIds = ctx.numIds + }; + + assert((ctx.resultBytes & 3) == 0); + + if (client->swapped) { + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.numIds); + } + + WriteToClient(client, sizeof(rep), &rep); + WriteFragmentsToClient(client, &ctx.response); + } + + DestroyConstructClientIdCtx(&ctx); + + return rc; +} + +/** @brief Swaps xXResResourceIdSpec endianess */ +static void +SwapXResResourceIdSpec(xXResResourceIdSpec *spec) +{ + swapl(&spec->resource); + swapl(&spec->type); +} + +/** @brief Swaps xXResResourceSizeSpec endianess */ +static void +SwapXResResourceSizeSpec(xXResResourceSizeSpec *size) +{ + SwapXResResourceIdSpec(&size->spec); + swapl(&size->bytes); + swapl(&size->refCount); + swapl(&size->useCount); +} + +/** @brief Swaps xXResResourceSizeValue endianess */ +static void +SwapXResResourceSizeValue(xXResResourceSizeValue *rep) +{ + SwapXResResourceSizeSpec(&rep->size); + swapl(&rep->numCrossReferences); +} + +/** @brief Swaps the response bytes */ +static void +SwapXResQueryResourceBytes(struct xorg_list *response) +{ + struct xorg_list *it = response->next; + int c; + + while (it != response) { + xXResResourceSizeValue *value = FRAGMENT_DATA(it); + it = it->next; + for (c = 0; c < value->numCrossReferences; ++c) { + xXResResourceSizeSpec *spec = FRAGMENT_DATA(it); + SwapXResResourceSizeSpec(spec); + it = it->next; + } + SwapXResResourceSizeValue(value); + } +} + +/** @brief Adds xXResResourceSizeSpec describing a resource's size into + the buffer contained in the context. The resource is considered + to be a subresource. + + @see AddResourceSizeValue + + @param[in] value The X resource object on which to add information + about to the buffer + @param[in] id The ID of the X resource + @param[in] type The type of the X resource + @param[in/out] cdata The context object of type ConstructResourceBytesCtx. + Void pointer type is used here to satisfy the type + FindRes +*/ +static void +AddSubResourceSizeSpec(pointer value, + XID id, + RESTYPE type, + pointer cdata) +{ + ConstructResourceBytesCtx *ctx = cdata; + + if (ctx->status == Success) { + xXResResourceSizeSpec **prevCrossRef = + ht_find(ctx->visitedSubResources, &value); + if (!prevCrossRef) { + Bool ok = TRUE; + xXResResourceSizeSpec *crossRef = + AddFragment(&ctx->response, sizeof(xXResResourceSizeSpec)); + ok = ok && crossRef != NULL; + if (ok) { + xXResResourceSizeSpec **p; + p = ht_add(ctx->visitedSubResources, &value); + if (!p) { + ok = FALSE; + } else { + *p = crossRef; + } + } + if (!ok) { + ctx->status = BadAlloc; + } else { + SizeType sizeFunc = GetResourceTypeSizeFunc(type); + ResourceSizeRec size = { 0, 0, 0 }; + sizeFunc(value, id, &size); + + crossRef->spec.resource = id; + crossRef->spec.type = type; + crossRef->bytes = size.resourceSize; + crossRef->refCount = size.refCnt; + crossRef->useCount = 1; + + ++ctx->sizeValue->numCrossReferences; + + ctx->resultBytes += sizeof(*crossRef); + } + } else { + /* if we have visited the subresource earlier (from current parent + resource), just increase its use count by one */ + ++(*prevCrossRef)->useCount; + } + } +} + +/** @brief Adds xXResResourceSizeValue describing a resource's size into + the buffer contained in the context. In addition, the + subresources are iterated and added as xXResResourceSizeSpec's + by using AddSubResourceSizeSpec + + @see AddSubResourceSizeSpec + + @param[in] value The X resource object on which to add information + about to the buffer + @param[in] id The ID of the X resource + @param[in] type The type of the X resource + @param[in/out] cdata The context object of type ConstructResourceBytesCtx. + Void pointer type is used here to satisfy the type + FindRes +*/ +static void +AddResourceSizeValue(pointer ptr, XID id, RESTYPE type, pointer cdata) +{ + ConstructResourceBytesCtx *ctx = cdata; + if (ctx->status == Success && + !ht_find(ctx->visitedResources, &id)) { + Bool ok = TRUE; + HashTable ht; + HtGenericHashSetupRec htSetup = { + .keySize = sizeof(void*) + }; + + /* it doesn't matter that we don't undo the work done here + * immediately. All but ht_init will be undone at the end + * of the request and there can happen no failure after + * ht_init, so we don't need to clean it up here in any + * special way */ + + xXResResourceSizeValue *value = + AddFragment(&ctx->response, sizeof(xXResResourceSizeValue)); + if (!value) { + ok = FALSE; + } + ok = ok && ht_add(ctx->visitedResources, &id); + if (ok) { + ht = ht_create(htSetup.keySize, + sizeof(xXResResourceSizeSpec*), + ht_generic_hash, ht_generic_compare, + &htSetup); + ok = ok && ht; + } + + if (!ok) { + ctx->status = BadAlloc; + } else { + SizeType sizeFunc = GetResourceTypeSizeFunc(type); + ResourceSizeRec size = { 0, 0, 0 }; + + sizeFunc(ptr, id, &size); + + value->size.spec.resource = id; + value->size.spec.type = type; + value->size.bytes = size.resourceSize; + value->size.refCount = size.refCnt; + value->size.useCount = 1; + value->numCrossReferences = 0; + + ctx->sizeValue = value; + ctx->visitedSubResources = ht; + FindSubResources(ptr, type, AddSubResourceSizeSpec, ctx); + ctx->visitedSubResources = NULL; + ctx->sizeValue = NULL; + + ctx->resultBytes += sizeof(*value); + ++ctx->numSizes; + + ht_destroy(ht); + } + } +} + +/** @brief A variant of AddResourceSizeValue that passes the resource type + through the context object to satisfy the type FindResType + + @see AddResourceSizeValue + + @param[in] ptr The resource + @param[in] id The resource ID + @param[in/out] cdata The context object that contains the resource type +*/ +static void +AddResourceSizeValueWithResType(pointer ptr, XID id, pointer cdata) +{ + ConstructResourceBytesCtx *ctx = cdata; + AddResourceSizeValue(ptr, id, ctx->resType, cdata); +} + +/** @brief Adds the information of a resource into the buffer if it matches + the match condition. + + @see AddResourceSizeValue + + @param[in] ptr The resource + @param[in] id The resource ID + @param[in] type The resource type + @param[in/out] cdata The context object as a void pointer to satisfy the + type FindAllRes +*/ +static void +AddResourceSizeValueByResource(pointer ptr, XID id, RESTYPE type, pointer cdata) +{ + ConstructResourceBytesCtx *ctx = cdata; + xXResResourceIdSpec *spec = ctx->curSpec; + + if ((!spec->type || spec->type == type) && + (!spec->resource || spec->resource == id)) { + AddResourceSizeValue(ptr, id, type, ctx); + } +} + +/** @brief Add all resources of the client into the result buffer + disregarding all those specifications that specify the + resource by its ID. Those are handled by + ConstructResourceBytesByResource + + @see ConstructResourceBytesByResource + + @param[in] aboutClient Which client is being considered + @param[in/out] ctx The context that contains the resource id + specifications as well as the result buffer +*/ +static void +ConstructClientResourceBytes(ClientPtr aboutClient, + ConstructResourceBytesCtx *ctx) +{ + int specIdx; + for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) { + xXResResourceIdSpec* spec = ctx->specs + specIdx; + if (spec->resource) { + /* these specs are handled elsewhere */ + } else if (spec->type) { + ctx->resType = spec->type; + FindClientResourcesByType(aboutClient, spec->type, + AddResourceSizeValueWithResType, ctx); + } else { + FindAllClientResources(aboutClient, AddResourceSizeValue, ctx); + } + } +} + +/** @brief Add the sizes of all such resources that can are specified by + their ID in the resource id specification. The scan can + by limited to a client with the aboutClient parameter + + @see ConstructResourceBytesByResource + + @param[in] aboutClient Which client is being considered. This may be None + to mean all clients. + @param[in/out] ctx The context that contains the resource id + specifications as well as the result buffer. In + addition this function uses the curSpec field to + keep a pointer to the current resource id + specification in it, which can be used by + AddResourceSizeValueByResource . +*/ +static void +ConstructResourceBytesByResource(XID aboutClient, ConstructResourceBytesCtx *ctx) +{ + int specIdx; + for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) { + xXResResourceIdSpec *spec = ctx->specs + specIdx; + if (spec->resource) { + int cid = CLIENT_ID(spec->resource); + if (cid < currentMaxClients && + (aboutClient == None || cid == aboutClient)) { + ClientPtr client = clients[cid]; + if (client) { + ctx->curSpec = spec; + FindAllClientResources(client, + AddResourceSizeValueByResource, + ctx); + } + } + } + } +} + +/** @brief Build the resource size response for the given client + (or all if not specified) per the parameters set up + in the context object. + + @param[in] aboutClient Which client to consider or None for all clients + @param[in/out] ctx The context object that contains the request as well + as the response buffer. +*/ +static int +ConstructResourceBytes(XID aboutClient, + ConstructResourceBytesCtx *ctx) +{ + if (aboutClient) { + int clientIdx = CLIENT_ID(aboutClient); + ClientPtr client = NullClient; + + if ((clientIdx >= currentMaxClients) || !clients[clientIdx]) { + ctx->sendClient->errorValue = aboutClient; + return BadValue; + } + + client = clients[clientIdx]; + + ConstructClientResourceBytes(client, ctx); + ConstructResourceBytesByResource(aboutClient, ctx); + } else { + int clientIdx; + + ConstructClientResourceBytes(NULL, ctx); + + for (clientIdx = 0; clientIdx < currentMaxClients; ++clientIdx) { + ClientPtr client = clients[clientIdx]; + + if (client) { + ConstructClientResourceBytes(client, ctx); + } + } + + ConstructResourceBytesByResource(None, ctx); + } + + + return ctx->status; +} + +/** @brief Implements the XResQueryResourceBytes of XResProto v1.2 */ +static int +ProcXResQueryResourceBytes (ClientPtr client) +{ + REQUEST(xXResQueryResourceBytesReq); + + int rc; + ConstructResourceBytesCtx ctx; + + REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq); + REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq, + stuff->numSpecs * sizeof(ctx.specs[0])); + + if (!InitConstructResourceBytesCtx(&ctx, client, + stuff->numSpecs, + (void*) ((char*) stuff + + sz_xXResQueryResourceBytesReq))) { + return BadAlloc; + } + + rc = ConstructResourceBytes(stuff->client, &ctx); + + if (rc == Success) { + xXResQueryResourceBytesReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(ctx.resultBytes), + .numSizes = ctx.numSizes + }; + + if (client->swapped) { + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.numSizes); + + SwapXResQueryResourceBytes(&ctx.response); + } + + WriteToClient(client, sizeof(rep), &rep); + WriteFragmentsToClient(client, &ctx.response); + } + + DestroyConstructResourceBytesCtx(&ctx); + + return rc; +} + +static int +ProcResDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XResQueryVersion: + return ProcXResQueryVersion(client); + case X_XResQueryClients: + return ProcXResQueryClients(client); + case X_XResQueryClientResources: + return ProcXResQueryClientResources(client); + case X_XResQueryClientPixmapBytes: + return ProcXResQueryClientPixmapBytes(client); + case X_XResQueryClientIds: + return ProcXResQueryClientIds(client); + case X_XResQueryResourceBytes: + return ProcXResQueryResourceBytes(client); + default: break; + } + + return BadRequest; +} + +static int +SProcXResQueryVersion(ClientPtr client) +{ + REQUEST(xXResQueryVersionReq); + REQUEST_SIZE_MATCH(xXResQueryVersionReq); + return ProcXResQueryVersion(client); +} + +static int +SProcXResQueryClientResources(ClientPtr client) +{ + REQUEST(xXResQueryClientResourcesReq); + REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq); + swapl(&stuff->xid); + return ProcXResQueryClientResources(client); +} + +static int +SProcXResQueryClientPixmapBytes(ClientPtr client) +{ + REQUEST(xXResQueryClientPixmapBytesReq); + REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq); + swapl(&stuff->xid); + return ProcXResQueryClientPixmapBytes(client); +} + +static int +SProcXResQueryClientIds (ClientPtr client) +{ + REQUEST(xXResQueryClientIdsReq); + + REQUEST_AT_LEAST_SIZE (xXResQueryClientIdsReq); + swapl(&stuff->numSpecs); + return ProcXResQueryClientIds(client); +} + +/** @brief Implements the XResQueryResourceBytes of XResProto v1.2. + This variant byteswaps request contents before issuing the + rest of the work to ProcXResQueryResourceBytes */ +static int +SProcXResQueryResourceBytes (ClientPtr client) +{ + REQUEST(xXResQueryResourceBytesReq); + int c; + xXResResourceIdSpec *specs = (void*) ((char*) stuff + sizeof(*stuff)); + + swapl(&stuff->numSpecs); + REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq); + REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq, + stuff->numSpecs * sizeof(specs[0])); + + for (c = 0; c < stuff->numSpecs; ++c) { + SwapXResResourceIdSpec(specs + c); + } + + return ProcXResQueryResourceBytes(client); +} + +static int +SProcResDispatch (ClientPtr client) +{ + REQUEST(xReq); + swaps(&stuff->length); + + switch (stuff->data) { + case X_XResQueryVersion: + return SProcXResQueryVersion(client); + case X_XResQueryClients: /* nothing to swap */ + return ProcXResQueryClients(client); + case X_XResQueryClientResources: + return SProcXResQueryClientResources(client); + case X_XResQueryClientPixmapBytes: + return SProcXResQueryClientPixmapBytes(client); + case X_XResQueryClientIds: + return SProcXResQueryClientIds(client); + case X_XResQueryResourceBytes: + return SProcXResQueryResourceBytes(client); + default: break; + } + + return BadRequest; +} + +void +ResExtensionInit(void) +{ + (void) AddExtension(XRES_NAME, 0, 0, + ProcResDispatch, SProcResDispatch, + NULL, StandardMinorOpcode); +} diff --git a/Xext/xselinux.h b/Xext/xselinux.h new file mode 100644 index 0000000..5be7088 --- /dev/null +++ b/Xext/xselinux.h @@ -0,0 +1,139 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifndef _XSELINUX_H +#define _XSELINUX_H + +/* Extension info */ +#define SELINUX_EXTENSION_NAME "SELinux" +#define SELINUX_MAJOR_VERSION 1 +#define SELINUX_MINOR_VERSION 1 +#define SELinuxNumberEvents 0 +#define SELinuxNumberErrors 0 + +/* Extension protocol */ +#define X_SELinuxQueryVersion 0 +#define X_SELinuxSetDeviceCreateContext 1 +#define X_SELinuxGetDeviceCreateContext 2 +#define X_SELinuxSetDeviceContext 3 +#define X_SELinuxGetDeviceContext 4 +#define X_SELinuxSetDrawableCreateContext 5 +#define X_SELinuxGetDrawableCreateContext 6 +#define X_SELinuxGetDrawableContext 7 +#define X_SELinuxSetPropertyCreateContext 8 +#define X_SELinuxGetPropertyCreateContext 9 +#define X_SELinuxSetPropertyUseContext 10 +#define X_SELinuxGetPropertyUseContext 11 +#define X_SELinuxGetPropertyContext 12 +#define X_SELinuxGetPropertyDataContext 13 +#define X_SELinuxListProperties 14 +#define X_SELinuxSetSelectionCreateContext 15 +#define X_SELinuxGetSelectionCreateContext 16 +#define X_SELinuxSetSelectionUseContext 17 +#define X_SELinuxGetSelectionUseContext 18 +#define X_SELinuxGetSelectionContext 19 +#define X_SELinuxGetSelectionDataContext 20 +#define X_SELinuxListSelections 21 +#define X_SELinuxGetClientContext 22 + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD8 client_major; + CARD8 client_minor; +} SELinuxQueryVersionReq; + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD16 server_major; + CARD16 server_minor; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} SELinuxQueryVersionReply; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 context_len; +} SELinuxSetCreateContextReq; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; +} SELinuxGetCreateContextReq; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 id; + CARD32 context_len; +} SELinuxSetContextReq; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 id; +} SELinuxGetContextReq; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 window; + CARD32 property; +} SELinuxGetPropertyContextReq; + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 context_len; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} SELinuxGetContextReply; + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 count; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} SELinuxListItemsReply; + +#endif /* _XSELINUX_H */ diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c new file mode 100644 index 0000000..3115f03 --- /dev/null +++ b/Xext/xselinux_ext.c @@ -0,0 +1,719 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "selection.h" +#include "inputstr.h" +#include "windowstr.h" +#include "propertyst.h" +#include "extnsionst.h" +#include "extinit.h" +#include "xselinuxint.h" + +#define CTX_DEV offsetof(SELinuxSubjectRec, dev_create_sid) +#define CTX_WIN offsetof(SELinuxSubjectRec, win_create_sid) +#define CTX_PRP offsetof(SELinuxSubjectRec, prp_create_sid) +#define CTX_SEL offsetof(SELinuxSubjectRec, sel_create_sid) +#define USE_PRP offsetof(SELinuxSubjectRec, prp_use_sid) +#define USE_SEL offsetof(SELinuxSubjectRec, sel_use_sid) + +typedef struct { + security_context_t octx; + security_context_t dctx; + CARD32 octx_len; + CARD32 dctx_len; + CARD32 id; +} SELinuxListItemRec; + +/* + * Extension Dispatch + */ + +static security_context_t +SELinuxCopyContext(char *ptr, unsigned len) +{ + security_context_t copy = malloc(len + 1); + + if (!copy) + return NULL; + strncpy(copy, ptr, len); + copy[len] = '\0'; + return copy; +} + +static int +ProcSELinuxQueryVersion(ClientPtr client) +{ + SELinuxQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .server_major = SELINUX_MAJOR_VERSION, + .server_minor = SELINUX_MINOR_VERSION + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.server_major); + swaps(&rep.server_minor); + } + WriteToClient(client, sizeof(rep), &rep); + return Success; +} + +static int +SELinuxSendContextReply(ClientPtr client, security_id_t sid) +{ + SELinuxGetContextReply rep; + security_context_t ctx = NULL; + int len = 0; + + if (sid) { + if (avc_sid_to_context_raw(sid, &ctx) < 0) + return BadValue; + len = strlen(ctx) + 1; + } + + rep = (SELinuxGetContextReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(len), + .context_len = len + }; + + if (client->swapped) { + swapl(&rep.length); + swaps(&rep.sequenceNumber); + swapl(&rep.context_len); + } + + WriteToClient(client, sizeof(SELinuxGetContextReply), &rep); + WriteToClient(client, len, ctx); + freecon(ctx); + return Success; +} + +static int +ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) +{ + PrivateRec **privPtr = &client->devPrivates; + security_id_t *pSid; + security_context_t ctx = NULL; + char *ptr; + int rc; + + REQUEST(SELinuxSetCreateContextReq); + REQUEST_FIXED_SIZE(SELinuxSetCreateContextReq, stuff->context_len); + + if (stuff->context_len > 0) { + ctx = SELinuxCopyContext((char *) (stuff + 1), stuff->context_len); + if (!ctx) + return BadAlloc; + } + + ptr = dixLookupPrivate(privPtr, subjectKey); + pSid = (security_id_t *) (ptr + offset); + *pSid = NULL; + + rc = Success; + if (stuff->context_len > 0) { + if (security_check_context_raw(ctx) < 0 || + avc_context_to_sid_raw(ctx, pSid) < 0) + rc = BadValue; + } + + free(ctx); + return rc; +} + +static int +ProcSELinuxGetCreateContext(ClientPtr client, unsigned offset) +{ + security_id_t *pSid; + char *ptr; + + REQUEST_SIZE_MATCH(SELinuxGetCreateContextReq); + + if (offset == CTX_DEV) + ptr = dixLookupPrivate(&serverClient->devPrivates, subjectKey); + else + ptr = dixLookupPrivate(&client->devPrivates, subjectKey); + + pSid = (security_id_t *) (ptr + offset); + return SELinuxSendContextReply(client, *pSid); +} + +static int +ProcSELinuxSetDeviceContext(ClientPtr client) +{ + security_context_t ctx; + security_id_t sid; + DeviceIntPtr dev; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + int rc; + + REQUEST(SELinuxSetContextReq); + REQUEST_FIXED_SIZE(SELinuxSetContextReq, stuff->context_len); + + if (stuff->context_len < 1) + return BadLength; + ctx = SELinuxCopyContext((char *) (stuff + 1), stuff->context_len); + if (!ctx) + return BadAlloc; + + rc = dixLookupDevice(&dev, stuff->id, client, DixManageAccess); + if (rc != Success) + goto out; + + if (security_check_context_raw(ctx) < 0 || + avc_context_to_sid_raw(ctx, &sid) < 0) { + rc = BadValue; + goto out; + } + + subj = dixLookupPrivate(&dev->devPrivates, subjectKey); + subj->sid = sid; + obj = dixLookupPrivate(&dev->devPrivates, objectKey); + obj->sid = sid; + + rc = Success; + out: + free(ctx); + return rc; +} + +static int +ProcSELinuxGetDeviceContext(ClientPtr client) +{ + DeviceIntPtr dev; + SELinuxSubjectRec *subj; + int rc; + + REQUEST(SELinuxGetContextReq); + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + + rc = dixLookupDevice(&dev, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + subj = dixLookupPrivate(&dev->devPrivates, subjectKey); + return SELinuxSendContextReply(client, subj->sid); +} + +static int +ProcSELinuxGetDrawableContext(ClientPtr client) +{ + DrawablePtr pDraw; + PrivateRec **privatePtr; + SELinuxObjectRec *obj; + int rc; + + REQUEST(SELinuxGetContextReq); + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + + rc = dixLookupDrawable(&pDraw, stuff->id, client, 0, DixGetAttrAccess); + if (rc != Success) + return rc; + + if (pDraw->type == DRAWABLE_PIXMAP) + privatePtr = &((PixmapPtr) pDraw)->devPrivates; + else + privatePtr = &((WindowPtr) pDraw)->devPrivates; + + obj = dixLookupPrivate(privatePtr, objectKey); + return SELinuxSendContextReply(client, obj->sid); +} + +static int +ProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey) +{ + WindowPtr pWin; + PropertyPtr pProp; + SELinuxObjectRec *obj; + int rc; + + REQUEST(SELinuxGetPropertyContextReq); + REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); + + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetPropAccess); + if (rc != Success) + return rc; + + rc = dixLookupProperty(&pProp, pWin, stuff->property, client, + DixGetAttrAccess); + if (rc != Success) + return rc; + + obj = dixLookupPrivate(&pProp->devPrivates, privKey); + return SELinuxSendContextReply(client, obj->sid); +} + +static int +ProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey) +{ + Selection *pSel; + SELinuxObjectRec *obj; + int rc; + + REQUEST(SELinuxGetContextReq); + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + + rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + obj = dixLookupPrivate(&pSel->devPrivates, privKey); + return SELinuxSendContextReply(client, obj->sid); +} + +static int +ProcSELinuxGetClientContext(ClientPtr client) +{ + ClientPtr target; + SELinuxSubjectRec *subj; + int rc; + + REQUEST(SELinuxGetContextReq); + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + + rc = dixLookupClient(&target, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + subj = dixLookupPrivate(&target->devPrivates, subjectKey); + return SELinuxSendContextReply(client, subj->sid); +} + +static int +SELinuxPopulateItem(SELinuxListItemRec * i, PrivateRec ** privPtr, CARD32 id, + int *size) +{ + SELinuxObjectRec *obj = dixLookupPrivate(privPtr, objectKey); + SELinuxObjectRec *data = dixLookupPrivate(privPtr, dataKey); + + if (avc_sid_to_context_raw(obj->sid, &i->octx) < 0) + return BadValue; + if (avc_sid_to_context_raw(data->sid, &i->dctx) < 0) + return BadValue; + + i->id = id; + i->octx_len = bytes_to_int32(strlen(i->octx) + 1); + i->dctx_len = bytes_to_int32(strlen(i->dctx) + 1); + + *size += i->octx_len + i->dctx_len + 3; + return Success; +} + +static void +SELinuxFreeItems(SELinuxListItemRec * items, int count) +{ + int k; + + for (k = 0; k < count; k++) { + freecon(items[k].octx); + freecon(items[k].dctx); + } + free(items); +} + +static int +SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec * items, + int size, int count) +{ + int rc, k, pos = 0; + SELinuxListItemsReply rep; + CARD32 *buf; + + buf = calloc(size, sizeof(CARD32)); + if (size && !buf) { + rc = BadAlloc; + goto out; + } + + /* Fill in the buffer */ + for (k = 0; k < count; k++) { + buf[pos] = items[k].id; + if (client->swapped) + swapl(buf + pos); + pos++; + + buf[pos] = items[k].octx_len * 4; + if (client->swapped) + swapl(buf + pos); + pos++; + + buf[pos] = items[k].dctx_len * 4; + if (client->swapped) + swapl(buf + pos); + pos++; + + memcpy((char *) (buf + pos), items[k].octx, strlen(items[k].octx) + 1); + pos += items[k].octx_len; + memcpy((char *) (buf + pos), items[k].dctx, strlen(items[k].dctx) + 1); + pos += items[k].dctx_len; + } + + /* Send reply to client */ + rep = (SELinuxListItemsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = size, + .count = count + }; + + if (client->swapped) { + swapl(&rep.length); + swaps(&rep.sequenceNumber); + swapl(&rep.count); + } + + WriteToClient(client, sizeof(SELinuxListItemsReply), &rep); + WriteToClient(client, size * 4, buf); + + /* Free stuff and return */ + rc = Success; + free(buf); + out: + SELinuxFreeItems(items, count); + return rc; +} + +static int +ProcSELinuxListProperties(ClientPtr client) +{ + WindowPtr pWin; + PropertyPtr pProp; + SELinuxListItemRec *items; + int rc, count, size, i; + CARD32 id; + + REQUEST(SELinuxGetContextReq); + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + + rc = dixLookupWindow(&pWin, stuff->id, client, DixListPropAccess); + if (rc != Success) + return rc; + + /* Count the number of properties and allocate items */ + count = 0; + for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) + count++; + items = calloc(count, sizeof(SELinuxListItemRec)); + if (count && !items) + return BadAlloc; + + /* Fill in the items and calculate size */ + i = 0; + size = 0; + for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) { + id = pProp->propertyName; + rc = SELinuxPopulateItem(items + i, &pProp->devPrivates, id, &size); + if (rc != Success) { + SELinuxFreeItems(items, count); + return rc; + } + i++; + } + + return SELinuxSendItemsToClient(client, items, size, count); +} + +static int +ProcSELinuxListSelections(ClientPtr client) +{ + Selection *pSel; + SELinuxListItemRec *items; + int rc, count, size, i; + CARD32 id; + + REQUEST_SIZE_MATCH(SELinuxGetCreateContextReq); + + /* Count the number of selections and allocate items */ + count = 0; + for (pSel = CurrentSelections; pSel; pSel = pSel->next) + count++; + items = calloc(count, sizeof(SELinuxListItemRec)); + if (count && !items) + return BadAlloc; + + /* Fill in the items and calculate size */ + i = 0; + size = 0; + for (pSel = CurrentSelections; pSel; pSel = pSel->next) { + id = pSel->selection; + rc = SELinuxPopulateItem(items + i, &pSel->devPrivates, id, &size); + if (rc != Success) { + SELinuxFreeItems(items, count); + return rc; + } + i++; + } + + return SELinuxSendItemsToClient(client, items, size, count); +} + +static int +ProcSELinuxDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_SELinuxQueryVersion: + return ProcSELinuxQueryVersion(client); + case X_SELinuxSetDeviceCreateContext: + return ProcSELinuxSetCreateContext(client, CTX_DEV); + case X_SELinuxGetDeviceCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_DEV); + case X_SELinuxSetDeviceContext: + return ProcSELinuxSetDeviceContext(client); + case X_SELinuxGetDeviceContext: + return ProcSELinuxGetDeviceContext(client); + case X_SELinuxSetDrawableCreateContext: + return ProcSELinuxSetCreateContext(client, CTX_WIN); + case X_SELinuxGetDrawableCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_WIN); + case X_SELinuxGetDrawableContext: + return ProcSELinuxGetDrawableContext(client); + case X_SELinuxSetPropertyCreateContext: + return ProcSELinuxSetCreateContext(client, CTX_PRP); + case X_SELinuxGetPropertyCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_PRP); + case X_SELinuxSetPropertyUseContext: + return ProcSELinuxSetCreateContext(client, USE_PRP); + case X_SELinuxGetPropertyUseContext: + return ProcSELinuxGetCreateContext(client, USE_PRP); + case X_SELinuxGetPropertyContext: + return ProcSELinuxGetPropertyContext(client, objectKey); + case X_SELinuxGetPropertyDataContext: + return ProcSELinuxGetPropertyContext(client, dataKey); + case X_SELinuxListProperties: + return ProcSELinuxListProperties(client); + case X_SELinuxSetSelectionCreateContext: + return ProcSELinuxSetCreateContext(client, CTX_SEL); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_SEL); + case X_SELinuxSetSelectionUseContext: + return ProcSELinuxSetCreateContext(client, USE_SEL); + case X_SELinuxGetSelectionUseContext: + return ProcSELinuxGetCreateContext(client, USE_SEL); + case X_SELinuxGetSelectionContext: + return ProcSELinuxGetSelectionContext(client, objectKey); + case X_SELinuxGetSelectionDataContext: + return ProcSELinuxGetSelectionContext(client, dataKey); + case X_SELinuxListSelections: + return ProcSELinuxListSelections(client); + case X_SELinuxGetClientContext: + return ProcSELinuxGetClientContext(client); + default: + return BadRequest; + } +} + +static int +SProcSELinuxQueryVersion(ClientPtr client) +{ + return ProcSELinuxQueryVersion(client); +} + +static int +SProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) +{ + REQUEST(SELinuxSetCreateContextReq); + + REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); + swapl(&stuff->context_len); + return ProcSELinuxSetCreateContext(client, offset); +} + +static int +SProcSELinuxSetDeviceContext(ClientPtr client) +{ + REQUEST(SELinuxSetContextReq); + + REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq); + swapl(&stuff->id); + swapl(&stuff->context_len); + return ProcSELinuxSetDeviceContext(client); +} + +static int +SProcSELinuxGetDeviceContext(ClientPtr client) +{ + REQUEST(SELinuxGetContextReq); + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id); + return ProcSELinuxGetDeviceContext(client); +} + +static int +SProcSELinuxGetDrawableContext(ClientPtr client) +{ + REQUEST(SELinuxGetContextReq); + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id); + return ProcSELinuxGetDrawableContext(client); +} + +static int +SProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey) +{ + REQUEST(SELinuxGetPropertyContextReq); + + REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); + swapl(&stuff->window); + swapl(&stuff->property); + return ProcSELinuxGetPropertyContext(client, privKey); +} + +static int +SProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey) +{ + REQUEST(SELinuxGetContextReq); + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id); + return ProcSELinuxGetSelectionContext(client, privKey); +} + +static int +SProcSELinuxListProperties(ClientPtr client) +{ + REQUEST(SELinuxGetContextReq); + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id); + return ProcSELinuxListProperties(client); +} + +static int +SProcSELinuxGetClientContext(ClientPtr client) +{ + REQUEST(SELinuxGetContextReq); + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id); + return ProcSELinuxGetClientContext(client); +} + +static int +SProcSELinuxDispatch(ClientPtr client) +{ + REQUEST(xReq); + + swaps(&stuff->length); + + switch (stuff->data) { + case X_SELinuxQueryVersion: + return SProcSELinuxQueryVersion(client); + case X_SELinuxSetDeviceCreateContext: + return SProcSELinuxSetCreateContext(client, CTX_DEV); + case X_SELinuxGetDeviceCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_DEV); + case X_SELinuxSetDeviceContext: + return SProcSELinuxSetDeviceContext(client); + case X_SELinuxGetDeviceContext: + return SProcSELinuxGetDeviceContext(client); + case X_SELinuxSetDrawableCreateContext: + return SProcSELinuxSetCreateContext(client, CTX_WIN); + case X_SELinuxGetDrawableCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_WIN); + case X_SELinuxGetDrawableContext: + return SProcSELinuxGetDrawableContext(client); + case X_SELinuxSetPropertyCreateContext: + return SProcSELinuxSetCreateContext(client, CTX_PRP); + case X_SELinuxGetPropertyCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_PRP); + case X_SELinuxSetPropertyUseContext: + return SProcSELinuxSetCreateContext(client, USE_PRP); + case X_SELinuxGetPropertyUseContext: + return ProcSELinuxGetCreateContext(client, USE_PRP); + case X_SELinuxGetPropertyContext: + return SProcSELinuxGetPropertyContext(client, objectKey); + case X_SELinuxGetPropertyDataContext: + return SProcSELinuxGetPropertyContext(client, dataKey); + case X_SELinuxListProperties: + return SProcSELinuxListProperties(client); + case X_SELinuxSetSelectionCreateContext: + return SProcSELinuxSetCreateContext(client, CTX_SEL); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetCreateContext(client, CTX_SEL); + case X_SELinuxSetSelectionUseContext: + return SProcSELinuxSetCreateContext(client, USE_SEL); + case X_SELinuxGetSelectionUseContext: + return ProcSELinuxGetCreateContext(client, USE_SEL); + case X_SELinuxGetSelectionContext: + return SProcSELinuxGetSelectionContext(client, objectKey); + case X_SELinuxGetSelectionDataContext: + return SProcSELinuxGetSelectionContext(client, dataKey); + case X_SELinuxListSelections: + return ProcSELinuxListSelections(client); + case X_SELinuxGetClientContext: + return SProcSELinuxGetClientContext(client); + default: + return BadRequest; + } +} + +/* + * Extension Setup / Teardown + */ + +static void +SELinuxResetProc(ExtensionEntry * extEntry) +{ + SELinuxFlaskReset(); + SELinuxLabelReset(); +} + +void +SELinuxExtensionInit(void) +{ + ExtensionEntry *extEntry; + + /* Check SELinux mode on system, configuration file, and boolean */ + if (!is_selinux_enabled()) { + LogMessage(X_INFO, "SELinux: Disabled on system\n"); + return; + } + if (selinuxEnforcingState == SELINUX_MODE_DISABLED) { + LogMessage(X_INFO, "SELinux: Disabled in configuration file\n"); + return; + } + if (!security_get_boolean_active("xserver_object_manager")) { + LogMessage(X_INFO, "SELinux: Disabled by boolean\n"); + return; + } + + /* Set up XACE hooks */ + SELinuxLabelInit(); + SELinuxFlaskInit(); + + /* Add extension to server */ + extEntry = AddExtension(SELINUX_EXTENSION_NAME, + SELinuxNumberEvents, SELinuxNumberErrors, + ProcSELinuxDispatch, SProcSELinuxDispatch, + SELinuxResetProc, StandardMinorOpcode); + + AddExtensionAlias("Flask", extEntry); +} diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c new file mode 100644 index 0000000..e9c7e93 --- /dev/null +++ b/Xext/xselinux_hooks.c @@ -0,0 +1,943 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +/* + * Portions of this code copyright (c) 2005 by Trusted Computer Solutions, Inc. + * All rights reserved. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <sys/socket.h> +#include <stdio.h> +#include <stdarg.h> + +#include <libaudit.h> + +#include <X11/Xatom.h> +#include "selection.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "propertyst.h" +#include "extnsionst.h" +#include "xacestr.h" +#include "client.h" +#include "../os/osdep.h" +#define _XSELINUX_NEED_FLASK_MAP +#include "xselinuxint.h" + +/* structure passed to auditing callback */ +typedef struct { + ClientPtr client; /* client */ + DeviceIntPtr dev; /* device */ + char *command; /* client's executable path */ + unsigned id; /* resource id, if any */ + int restype; /* resource type, if any */ + int event; /* event type, if any */ + Atom property; /* property name, if any */ + Atom selection; /* selection name, if any */ + char *extension; /* extension name, if any */ +} SELinuxAuditRec; + +/* private state keys */ +DevPrivateKeyRec subjectKeyRec; +DevPrivateKeyRec objectKeyRec; +DevPrivateKeyRec dataKeyRec; + +/* audit file descriptor */ +static int audit_fd; + +/* atoms for window label properties */ +static Atom atom_ctx; +static Atom atom_client_ctx; + +/* The unlabeled SID */ +static security_id_t unlabeled_sid; + +/* forward declarations */ +static void SELinuxScreen(CallbackListPtr *, pointer, pointer); + +/* "true" pointer value for use as callback data */ +static pointer truep = (pointer) 1; + +/* + * Performs an SELinux permission check. + */ +static int +SELinuxDoCheck(SELinuxSubjectRec * subj, SELinuxObjectRec * obj, + security_class_t class, Mask mode, SELinuxAuditRec * auditdata) +{ + /* serverClient requests OK */ + if (subj->privileged) + return Success; + + auditdata->command = subj->command; + errno = 0; + + if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref, + auditdata) < 0) { + if (mode == DixUnknownAccess) + return Success; /* DixUnknownAccess requests OK ... for now */ + if (errno == EACCES) + return BadAccess; + ErrorF("SELinux: avc_has_perm: unexpected error %d\n", errno); + return BadValue; + } + + return Success; +} + +/* + * Labels a newly connected client. + */ +static void +SELinuxLabelClient(ClientPtr client) +{ + int fd = XaceGetConnectionNumber(client); + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + security_context_t ctx; + + subj = dixLookupPrivate(&client->devPrivates, subjectKey); + obj = dixLookupPrivate(&client->devPrivates, objectKey); + + /* Try to get a context from the socket */ + if (fd < 0 || getpeercon_raw(fd, &ctx) < 0) { + /* Otherwise, fall back to a default context */ + ctx = SELinuxDefaultClientLabel(); + } + + /* For local clients, try and determine the executable name */ + if (XaceIsLocal(client)) { + /* Get cached command name if CLIENTIDS is enabled. */ + const char *cmdname = GetClientCmdName(client); + Bool cached = (cmdname != NULL); + + /* If CLIENTIDS is disabled, figure out the command name from + * scratch. */ + if (!cmdname) { + pid_t pid = DetermineClientPid(client); + + if (pid != -1) + DetermineClientCmd(pid, &cmdname, NULL); + } + + if (!cmdname) + goto finish; + + strncpy(subj->command, cmdname, COMMAND_LEN - 1); + + if (!cached) + free((void *) cmdname); /* const char * */ + } + + finish: + /* Get a SID from the context */ + if (avc_context_to_sid_raw(ctx, &subj->sid) < 0) + FatalError("SELinux: client %d: context_to_sid_raw(%s) failed\n", + client->index, ctx); + + obj->sid = subj->sid; + freecon(ctx); +} + +/* + * Labels initial server objects. + */ +static void +SELinuxLabelInitial(void) +{ + int i; + XaceScreenAccessRec srec; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + security_context_t ctx; + pointer unused; + + /* Do the serverClient */ + subj = dixLookupPrivate(&serverClient->devPrivates, subjectKey); + obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); + subj->privileged = 1; + + /* Use the context of the X server process for the serverClient */ + if (getcon_raw(&ctx) < 0) + FatalError("SELinux: couldn't get context of X server process\n"); + + /* Get a SID from the context */ + if (avc_context_to_sid_raw(ctx, &subj->sid) < 0) + FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx); + + obj->sid = subj->sid; + freecon(ctx); + + srec.client = serverClient; + srec.access_mode = DixCreateAccess; + srec.status = Success; + + for (i = 0; i < screenInfo.numScreens; i++) { + /* Do the screen object */ + srec.screen = screenInfo.screens[i]; + SELinuxScreen(NULL, NULL, &srec); + + /* Do the default colormap */ + dixLookupResourceByType(&unused, screenInfo.screens[i]->defColormap, + RT_COLORMAP, serverClient, DixCreateAccess); + } +} + +/* + * Labels new resource objects. + */ +static int +SELinuxLabelResource(XaceResourceAccessRec * rec, SELinuxSubjectRec * subj, + SELinuxObjectRec * obj, security_class_t class) +{ + int offset; + security_id_t tsid; + + /* Check for a create context */ + if (rec->rtype & RC_DRAWABLE && subj->win_create_sid) { + obj->sid = subj->win_create_sid; + return Success; + } + + if (rec->parent) + offset = dixLookupPrivateOffset(rec->ptype); + + if (rec->parent && offset >= 0) { + /* Use the SID of the parent object in the labeling operation */ + PrivateRec **privatePtr = DEVPRIV_AT(rec->parent, offset); + SELinuxObjectRec *pobj = dixLookupPrivate(privatePtr, objectKey); + + tsid = pobj->sid; + } + else { + /* Use the SID of the subject */ + tsid = subj->sid; + } + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(subj->sid, tsid, class, &obj->sid) < 0) { + ErrorF("SELinux: a compute_create call failed!\n"); + return BadValue; + } + + return Success; +} + +/* + * Libselinux Callbacks + */ + +static int +SELinuxAudit(void *auditdata, + security_class_t class, char *msgbuf, size_t msgbufsize) +{ + SELinuxAuditRec *audit = auditdata; + ClientPtr client = audit->client; + char idNum[16]; + const char *propertyName, *selectionName; + int major = -1, minor = -1; + + if (client) { + REQUEST(xReq); + if (stuff) { + major = client->majorOp; + minor = client->minorOp; + } + } + if (audit->id) + snprintf(idNum, 16, "%x", audit->id); + + propertyName = audit->property ? NameForAtom(audit->property) : NULL; + selectionName = audit->selection ? NameForAtom(audit->selection) : NULL; + + return snprintf(msgbuf, msgbufsize, + "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + (major >= 0) ? "request=" : "", + (major >= 0) ? LookupRequestName(major, minor) : "", + audit->command ? " comm=" : "", + audit->command ? audit->command : "", + audit->dev ? " xdevice=\"" : "", + audit->dev ? audit->dev->name : "", + audit->dev ? "\"" : "", + audit->id ? " resid=" : "", + audit->id ? idNum : "", + audit->restype ? " restype=" : "", + audit->restype ? LookupResourceName(audit->restype) : "", + audit->event ? " event=" : "", + audit->event ? LookupEventName(audit->event & 127) : "", + audit->property ? " property=" : "", + audit->property ? propertyName : "", + audit->selection ? " selection=" : "", + audit->selection ? selectionName : "", + audit->extension ? " extension=" : "", + audit->extension ? audit->extension : ""); +} + +static int +SELinuxLog(int type, const char *fmt, ...) +{ + va_list ap; + char buf[MAX_AUDIT_MESSAGE_LENGTH]; + int rc, aut; + + switch (type) { + case SELINUX_INFO: + aut = AUDIT_USER_MAC_POLICY_LOAD; + break; + case SELINUX_AVC: + aut = AUDIT_USER_AVC; + break; + default: + aut = AUDIT_USER_SELINUX_ERR; + break; + } + + va_start(ap, fmt); + vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap); + rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0); + va_end(ap); + LogMessageVerb(X_WARNING, 0, "%s", buf); + return 0; +} + +/* + * XACE Callbacks + */ + +static void +SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceDeviceAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + SELinuxAuditRec auditdata = {.client = rec->client,.dev = rec->dev }; + security_class_t cls; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey); + + /* If this is a new object that needs labeling, do it now */ + if (rec->access_mode & DixCreateAccess) { + SELinuxSubjectRec *dsubj; + + dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); + + if (subj->dev_create_sid) { + /* Label the device with the create context */ + obj->sid = subj->dev_create_sid; + dsubj->sid = subj->dev_create_sid; + } + else { + /* Label the device directly with the process SID */ + obj->sid = subj->sid; + dsubj->sid = subj->sid; + } + } + + cls = IsPointerDevice(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD; + rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} + +static void +SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceSendAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, ev_sid; + SELinuxAuditRec auditdata = {.client = rec->client,.dev = rec->dev }; + security_class_t class; + int rc, i, type; + + if (rec->dev) + subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); + else + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + + obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); + + /* Check send permission on window */ + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess, + &auditdata); + if (rc != Success) + goto err; + + /* Check send permission on specific event types */ + for (i = 0; i < rec->count; i++) { + type = rec->events[i].u.u.type; + class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT; + + rc = SELinuxEventToSID(type, obj->sid, &ev_sid); + if (rc != Success) + goto err; + + auditdata.event = type; + rc = SELinuxDoCheck(subj, &ev_sid, class, DixSendAccess, &auditdata); + if (rc != Success) + goto err; + } + return; + err: + rec->status = rc; +} + +static void +SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceReceiveAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, ev_sid; + SELinuxAuditRec auditdata = {.client = NULL }; + security_class_t class; + int rc, i, type; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); + + /* Check receive permission on window */ + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess, + &auditdata); + if (rc != Success) + goto err; + + /* Check receive permission on specific event types */ + for (i = 0; i < rec->count; i++) { + type = rec->events[i].u.u.type; + class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT; + + rc = SELinuxEventToSID(type, obj->sid, &ev_sid); + if (rc != Success) + goto err; + + auditdata.event = type; + rc = SELinuxDoCheck(subj, &ev_sid, class, DixReceiveAccess, &auditdata); + if (rc != Success) + goto err; + } + return; + err: + rec->status = rc; +} + +static void +SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceExtAccessRec *rec = calldata; + SELinuxSubjectRec *subj, *serv; + SELinuxObjectRec *obj; + SELinuxAuditRec auditdata = {.client = rec->client }; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey); + + /* If this is a new object that needs labeling, do it now */ + /* XXX there should be a separate callback for this */ + if (obj->sid == NULL) { + security_id_t sid; + + serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey); + rc = SELinuxExtensionToSID(rec->ext->name, &sid); + if (rc != Success) { + rec->status = rc; + return; + } + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(serv->sid, sid, SECCLASS_X_EXTENSION, + &obj->sid) < 0) { + ErrorF("SELinux: a SID transition call failed!\n"); + rec->status = BadValue; + return; + } + } + + /* Perform the security check */ + auditdata.extension = rec->ext->name; + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode, + &auditdata); + if (rc != Success) + rec->status = rc; +} + +static void +SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceSelectionAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, *data; + Selection *pSel = *rec->ppSel; + Atom name = pSel->selection; + Mask access_mode = rec->access_mode; + SELinuxAuditRec auditdata = {.client = rec->client,.selection = name }; + security_id_t tsid; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&pSel->devPrivates, objectKey); + + /* If this is a new object that needs labeling, do it now */ + if (access_mode & DixCreateAccess) { + rc = SELinuxSelectionToSID(name, subj, &obj->sid, &obj->poly); + if (rc != Success) + obj->sid = unlabeled_sid; + access_mode = DixSetAttrAccess; + } + /* If this is a polyinstantiated object, find the right instance */ + else if (obj->poly) { + rc = SELinuxSelectionToSID(name, subj, &tsid, NULL); + if (rc != Success) { + rec->status = rc; + return; + } + while (pSel->selection != name || obj->sid != tsid) { + if ((pSel = pSel->next) == NULL) + break; + obj = dixLookupPrivate(&pSel->devPrivates, objectKey); + } + + if (pSel) + *rec->ppSel = pSel; + else { + rec->status = BadMatch; + return; + } + } + + /* Perform the security check */ + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, access_mode, + &auditdata); + if (rc != Success) + rec->status = rc; + + /* Label the content (advisory only) */ + if (access_mode & DixSetAttrAccess) { + data = dixLookupPrivate(&pSel->devPrivates, dataKey); + if (subj->sel_create_sid) + data->sid = subj->sel_create_sid; + else + data->sid = obj->sid; + } +} + +static void +SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XacePropertyAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, *data; + PropertyPtr pProp = *rec->ppProp; + Atom name = pProp->propertyName; + SELinuxAuditRec auditdata = {.client = rec->client,.property = name }; + security_id_t tsid; + int rc; + + /* Don't care about the new content check */ + if (rec->access_mode & DixPostAccess) + return; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&pProp->devPrivates, objectKey); + + /* If this is a new object that needs labeling, do it now */ + if (rec->access_mode & DixCreateAccess) { + rc = SELinuxPropertyToSID(name, subj, &obj->sid, &obj->poly); + if (rc != Success) { + rec->status = rc; + return; + } + } + /* If this is a polyinstantiated object, find the right instance */ + else if (obj->poly) { + rc = SELinuxPropertyToSID(name, subj, &tsid, NULL); + if (rc != Success) { + rec->status = rc; + return; + } + while (pProp->propertyName != name || obj->sid != tsid) { + if ((pProp = pProp->next) == NULL) + break; + obj = dixLookupPrivate(&pProp->devPrivates, objectKey); + } + + if (pProp) + *rec->ppProp = pProp; + else { + rec->status = BadMatch; + return; + } + } + + /* Perform the security check */ + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode, + &auditdata); + if (rc != Success) + rec->status = rc; + + /* Label the content (advisory only) */ + if (rec->access_mode & DixWriteAccess) { + data = dixLookupPrivate(&pProp->devPrivates, dataKey); + if (subj->prp_create_sid) + data->sid = subj->prp_create_sid; + else + data->sid = obj->sid; + } +} + +static void +SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceResourceAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + SELinuxAuditRec auditdata = {.client = rec->client }; + Mask access_mode = rec->access_mode; + PrivateRec **privatePtr; + security_class_t class; + int rc, offset; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + + /* Determine if the resource object has a devPrivates field */ + offset = dixLookupPrivateOffset(rec->rtype); + if (offset < 0) { + /* No: use the SID of the owning client */ + class = SECCLASS_X_RESOURCE; + privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates; + obj = dixLookupPrivate(privatePtr, objectKey); + } + else { + /* Yes: use the SID from the resource object itself */ + class = SELinuxTypeToClass(rec->rtype); + privatePtr = DEVPRIV_AT(rec->res, offset); + obj = dixLookupPrivate(privatePtr, objectKey); + } + + /* If this is a new object that needs labeling, do it now */ + if (access_mode & DixCreateAccess && offset >= 0) { + rc = SELinuxLabelResource(rec, subj, obj, class); + if (rc != Success) { + rec->status = rc; + return; + } + } + + /* Collapse generic resource permissions down to read/write */ + if (class == SECCLASS_X_RESOURCE) { + access_mode = ! !(rec->access_mode & SELinuxReadMask); /* rd */ + access_mode |= ! !(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */ + } + + /* Perform the security check */ + auditdata.restype = rec->rtype; + auditdata.id = rec->id; + rc = SELinuxDoCheck(subj, obj, class, access_mode, &auditdata); + if (rc != Success) + rec->status = rc; + + /* Perform the background none check on windows */ + if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) { + rc = SELinuxDoCheck(subj, obj, class, DixBlendAccess, &auditdata); + if (rc != Success) + ((WindowPtr) rec->res)->forcedBG = TRUE; + } +} + +static void +SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) +{ + XaceScreenAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + SELinuxAuditRec auditdata = {.client = rec->client }; + Mask access_mode = rec->access_mode; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey); + + /* If this is a new object that needs labeling, do it now */ + if (access_mode & DixCreateAccess) { + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SCREEN, + &obj->sid) < 0) { + ErrorF("SELinux: a compute_create call failed!\n"); + rec->status = BadValue; + return; + } + } + + if (is_saver) + access_mode <<= 2; + + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SCREEN, access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} + +static void +SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceClientAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + SELinuxAuditRec auditdata = {.client = rec->client }; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->target->devPrivates, objectKey); + + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode, + &auditdata); + if (rc != Success) + rec->status = rc; +} + +static void +SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceServerAccessRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + SELinuxAuditRec auditdata = {.client = rec->client }; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); + + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode, + &auditdata); + if (rc != Success) + rec->status = rc; +} + +/* + * DIX Callbacks + */ + +static void +SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + NewClientInfoRec *pci = calldata; + + switch (pci->client->clientState) { + case ClientStateInitial: + SELinuxLabelClient(pci->client); + break; + + default: + break; + } +} + +static void +SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + ResourceStateInfoRec *rec = calldata; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; + WindowPtr pWin; + + if (rec->type != RT_WINDOW) + return; + if (rec->state != ResourceStateAdding) + return; + + pWin = (WindowPtr) rec->value; + subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey); + + if (subj->sid) { + security_context_t ctx; + int rc = avc_sid_to_context_raw(subj->sid, &ctx); + + if (rc < 0) + FatalError("SELinux: Failed to get security context!\n"); + rc = dixChangeWindowProperty(serverClient, + pWin, atom_client_ctx, XA_STRING, 8, + PropModeReplace, strlen(ctx), ctx, FALSE); + if (rc != Success) + FatalError("SELinux: Failed to set label property on window!\n"); + freecon(ctx); + } + else + FatalError("SELinux: Unexpected unlabeled client found\n"); + + obj = dixLookupPrivate(&pWin->devPrivates, objectKey); + + if (obj->sid) { + security_context_t ctx; + int rc = avc_sid_to_context_raw(obj->sid, &ctx); + + if (rc < 0) + FatalError("SELinux: Failed to get security context!\n"); + rc = dixChangeWindowProperty(serverClient, + pWin, atom_ctx, XA_STRING, 8, + PropModeReplace, strlen(ctx), ctx, FALSE); + if (rc != Success) + FatalError("SELinux: Failed to set label property on window!\n"); + freecon(ctx); + } + else + FatalError("SELinux: Unexpected unlabeled window found\n"); +} + +static int netlink_fd; + +static void +SELinuxBlockHandler(void *data, struct timeval **tv, void *read_mask) +{ +} + +static void +SELinuxWakeupHandler(void *data, int err, void *read_mask) +{ + if (FD_ISSET(netlink_fd, (fd_set *) read_mask)) + avc_netlink_check_nb(); +} + +void +SELinuxFlaskReset(void) +{ + /* Unregister callbacks */ + DeleteCallback(&ClientStateCallback, SELinuxClientState, NULL); + DeleteCallback(&ResourceStateCallback, SELinuxResourceState, NULL); + + XaceDeleteCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); + XaceDeleteCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); + XaceDeleteCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL); + XaceDeleteCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL); + XaceDeleteCallback(XACE_SEND_ACCESS, SELinuxSend, NULL); + XaceDeleteCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL); + XaceDeleteCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); + XaceDeleteCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); + XaceDeleteCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); + XaceDeleteCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); + XaceDeleteCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); + XaceDeleteCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); + + /* Tear down SELinux stuff */ + audit_close(audit_fd); + avc_netlink_release_fd(); + RemoveBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler, + NULL); + RemoveGeneralSocket(netlink_fd); + + avc_destroy(); +} + +void +SELinuxFlaskInit(void) +{ + struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 }; + security_context_t ctx; + int ret = TRUE; + + switch (selinuxEnforcingState) { + case SELINUX_MODE_ENFORCING: + LogMessage(X_INFO, "SELinux: Configured in enforcing mode\n"); + avc_option.value = (char *) 1; + break; + case SELINUX_MODE_PERMISSIVE: + LogMessage(X_INFO, "SELinux: Configured in permissive mode\n"); + avc_option.value = (char *) 0; + break; + default: + avc_option.type = AVC_OPT_UNUSED; + break; + } + + /* Set up SELinux stuff */ + selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback) SELinuxLog); + selinux_set_callback(SELINUX_CB_AUDIT, + (union selinux_callback) SELinuxAudit); + + if (selinux_set_mapping(map) < 0) { + if (errno == EINVAL) { + ErrorF + ("SELinux: Invalid object class mapping, disabling SELinux support.\n"); + return; + } + FatalError("SELinux: Failed to set up security class mapping\n"); + } + + if (avc_open(&avc_option, 1) < 0) + FatalError("SELinux: Couldn't initialize SELinux userspace AVC\n"); + + if (security_get_initial_context_raw("unlabeled", &ctx) < 0) + FatalError("SELinux: Failed to look up unlabeled context\n"); + if (avc_context_to_sid_raw(ctx, &unlabeled_sid) < 0) + FatalError("SELinux: a context_to_SID call failed!\n"); + freecon(ctx); + + /* Prepare for auditing */ + audit_fd = audit_open(); + if (audit_fd < 0) + FatalError("SELinux: Failed to open the system audit log\n"); + + /* Allocate private storage */ + if (!dixRegisterPrivateKey + (subjectKey, PRIVATE_XSELINUX, sizeof(SELinuxSubjectRec)) || + !dixRegisterPrivateKey(objectKey, PRIVATE_XSELINUX, + sizeof(SELinuxObjectRec)) || + !dixRegisterPrivateKey(dataKey, PRIVATE_XSELINUX, + sizeof(SELinuxObjectRec))) + FatalError("SELinux: Failed to allocate private storage.\n"); + + /* Create atoms for doing window labeling */ + atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, TRUE); + if (atom_ctx == BAD_RESOURCE) + FatalError("SELinux: Failed to create atom\n"); + atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, TRUE); + if (atom_client_ctx == BAD_RESOURCE) + FatalError("SELinux: Failed to create atom\n"); + + netlink_fd = avc_netlink_acquire_fd(); + AddGeneralSocket(netlink_fd); + RegisterBlockAndWakeupHandlers(SELinuxBlockHandler, SELinuxWakeupHandler, + NULL); + + /* Register callbacks */ + ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL); + ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL); + + ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); + ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); + ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL); + ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL); + ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, NULL); + ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL); + ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); + ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); + ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); + ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); + ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); + ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); + if (!ret) + FatalError("SELinux: Failed to register one or more callbacks\n"); + + /* Label objects that were created before we could register ourself */ + SELinuxLabelInitial(); +} diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c new file mode 100644 index 0000000..2c33d1c --- /dev/null +++ b/Xext/xselinux_label.c @@ -0,0 +1,381 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <selinux/label.h> + +#include "registry.h" +#include "xselinuxint.h" + +/* selection and property atom cache */ +typedef struct { + SELinuxObjectRec prp; + SELinuxObjectRec sel; +} SELinuxAtomRec; + +/* dynamic array */ +typedef struct { + unsigned size; + void **array; +} SELinuxArrayRec; + +/* labeling handle */ +static struct selabel_handle *label_hnd; + +/* Array of object classes indexed by resource type */ +SELinuxArrayRec arr_types; + +/* Array of event SIDs indexed by event type */ +SELinuxArrayRec arr_events; + +/* Array of property and selection SID structures */ +SELinuxArrayRec arr_atoms; + +/* + * Dynamic array helpers + */ +static void * +SELinuxArrayGet(SELinuxArrayRec * rec, unsigned key) +{ + return (rec->size > key) ? rec->array[key] : 0; +} + +static int +SELinuxArraySet(SELinuxArrayRec * rec, unsigned key, void *val) +{ + if (key >= rec->size) { + /* Need to increase size of array */ + rec->array = realloc(rec->array, (key + 1) * sizeof(val)); + if (!rec->array) + return FALSE; + memset(rec->array + rec->size, 0, (key - rec->size + 1) * sizeof(val)); + rec->size = key + 1; + } + + rec->array[key] = val; + return TRUE; +} + +static void +SELinuxArrayFree(SELinuxArrayRec * rec, int free_elements) +{ + if (free_elements) { + unsigned i = rec->size; + + while (i) + free(rec->array[--i]); + } + + free(rec->array); + rec->size = 0; + rec->array = NULL; +} + +/* + * Looks up a name in the selection or property mappings + */ +static int +SELinuxAtomToSIDLookup(Atom atom, SELinuxObjectRec * obj, int map, int polymap) +{ + const char *name = NameForAtom(atom); + security_context_t ctx; + int rc = Success; + + obj->poly = 1; + + /* Look in the mappings of names to contexts */ + if (selabel_lookup_raw(label_hnd, &ctx, name, map) == 0) { + obj->poly = 0; + } + else if (errno != ENOENT) { + ErrorF("SELinux: a property label lookup failed!\n"); + return BadValue; + } + else if (selabel_lookup_raw(label_hnd, &ctx, name, polymap) < 0) { + ErrorF("SELinux: a property label lookup failed!\n"); + return BadValue; + } + + /* Get a SID for context */ + if (avc_context_to_sid_raw(ctx, &obj->sid) < 0) { + ErrorF("SELinux: a context_to_SID_raw call failed!\n"); + rc = BadAlloc; + } + + freecon(ctx); + return rc; +} + +/* + * Looks up the SID corresponding to the given property or selection atom + */ +int +SELinuxAtomToSID(Atom atom, int prop, SELinuxObjectRec ** obj_rtn) +{ + SELinuxAtomRec *rec; + SELinuxObjectRec *obj; + int rc, map, polymap; + + rec = SELinuxArrayGet(&arr_atoms, atom); + if (!rec) { + rec = calloc(1, sizeof(SELinuxAtomRec)); + if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec)) + return BadAlloc; + } + + if (prop) { + obj = &rec->prp; + map = SELABEL_X_PROP; + polymap = SELABEL_X_POLYPROP; + } + else { + obj = &rec->sel; + map = SELABEL_X_SELN; + polymap = SELABEL_X_POLYSELN; + } + + if (!obj->sid) { + rc = SELinuxAtomToSIDLookup(atom, obj, map, polymap); + if (rc != Success) + goto out; + } + + *obj_rtn = obj; + rc = Success; + out: + return rc; +} + +/* + * Looks up a SID for a selection/subject pair + */ +int +SELinuxSelectionToSID(Atom selection, SELinuxSubjectRec * subj, + security_id_t * sid_rtn, int *poly_rtn) +{ + int rc; + SELinuxObjectRec *obj; + security_id_t tsid; + + /* Get the default context and polyinstantiation bit */ + rc = SELinuxAtomToSID(selection, 0, &obj); + if (rc != Success) + return rc; + + /* Check for an override context next */ + if (subj->sel_use_sid) { + tsid = subj->sel_use_sid; + goto out; + } + + tsid = obj->sid; + + /* Polyinstantiate if necessary to obtain the final SID */ + if (obj->poly && avc_compute_member(subj->sid, obj->sid, + SECCLASS_X_SELECTION, &tsid) < 0) { + ErrorF("SELinux: a compute_member call failed!\n"); + return BadValue; + } + out: + *sid_rtn = tsid; + if (poly_rtn) + *poly_rtn = obj->poly; + return Success; +} + +/* + * Looks up a SID for a property/subject pair + */ +int +SELinuxPropertyToSID(Atom property, SELinuxSubjectRec * subj, + security_id_t * sid_rtn, int *poly_rtn) +{ + int rc; + SELinuxObjectRec *obj; + security_id_t tsid, tsid2; + + /* Get the default context and polyinstantiation bit */ + rc = SELinuxAtomToSID(property, 1, &obj); + if (rc != Success) + return rc; + + /* Check for an override context next */ + if (subj->prp_use_sid) { + tsid = subj->prp_use_sid; + goto out; + } + + /* Perform a transition */ + if (avc_compute_create(subj->sid, obj->sid, SECCLASS_X_PROPERTY, &tsid) < 0) { + ErrorF("SELinux: a compute_create call failed!\n"); + return BadValue; + } + + /* Polyinstantiate if necessary to obtain the final SID */ + if (obj->poly) { + tsid2 = tsid; + if (avc_compute_member(subj->sid, tsid2, + SECCLASS_X_PROPERTY, &tsid) < 0) { + ErrorF("SELinux: a compute_member call failed!\n"); + return BadValue; + } + } + out: + *sid_rtn = tsid; + if (poly_rtn) + *poly_rtn = obj->poly; + return Success; +} + +/* + * Looks up the SID corresponding to the given event type + */ +int +SELinuxEventToSID(unsigned type, security_id_t sid_of_window, + SELinuxObjectRec * sid_return) +{ + const char *name = LookupEventName(type); + security_id_t sid; + security_context_t ctx; + + type &= 127; + + sid = SELinuxArrayGet(&arr_events, type); + if (!sid) { + /* Look in the mappings of event names to contexts */ + if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EVENT) < 0) { + ErrorF("SELinux: an event label lookup failed!\n"); + return BadValue; + } + /* Get a SID for context */ + if (avc_context_to_sid_raw(ctx, &sid) < 0) { + ErrorF("SELinux: a context_to_SID_raw call failed!\n"); + freecon(ctx); + return BadAlloc; + } + freecon(ctx); + /* Cache the SID value */ + if (!SELinuxArraySet(&arr_events, type, sid)) + return BadAlloc; + } + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(sid_of_window, sid, SECCLASS_X_EVENT, + &sid_return->sid) < 0) { + ErrorF("SELinux: a compute_create call failed!\n"); + return BadValue; + } + + return Success; +} + +int +SELinuxExtensionToSID(const char *name, security_id_t * sid_rtn) +{ + security_context_t ctx; + + /* Look in the mappings of extension names to contexts */ + if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EXT) < 0) { + ErrorF("SELinux: a property label lookup failed!\n"); + return BadValue; + } + /* Get a SID for context */ + if (avc_context_to_sid_raw(ctx, sid_rtn) < 0) { + ErrorF("SELinux: a context_to_SID_raw call failed!\n"); + freecon(ctx); + return BadAlloc; + } + freecon(ctx); + return Success; +} + +/* + * Returns the object class corresponding to the given resource type. + */ +security_class_t +SELinuxTypeToClass(RESTYPE type) +{ + void *tmp; + + tmp = SELinuxArrayGet(&arr_types, type & TypeMask); + if (!tmp) { + unsigned long class = SECCLASS_X_RESOURCE; + + if (type & RC_DRAWABLE) + class = SECCLASS_X_DRAWABLE; + else if (type == RT_GC) + class = SECCLASS_X_GC; + else if (type == RT_FONT) + class = SECCLASS_X_FONT; + else if (type == RT_CURSOR) + class = SECCLASS_X_CURSOR; + else if (type == RT_COLORMAP) + class = SECCLASS_X_COLORMAP; + else { + /* Need to do a string lookup */ + const char *str = LookupResourceName(type); + + if (!strcmp(str, "PICTURE")) + class = SECCLASS_X_DRAWABLE; + else if (!strcmp(str, "GLYPHSET")) + class = SECCLASS_X_FONT; + } + + tmp = (void *) class; + SELinuxArraySet(&arr_types, type & TypeMask, tmp); + } + + return (security_class_t) (unsigned long) tmp; +} + +security_context_t +SELinuxDefaultClientLabel(void) +{ + security_context_t ctx; + + if (selabel_lookup_raw(label_hnd, &ctx, "remote", SELABEL_X_CLIENT) < 0) + FatalError("SELinux: failed to look up remote-client context\n"); + + return ctx; +} + +void +SELinuxLabelInit(void) +{ + struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *) 1 }; + + label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1); + if (!label_hnd) + FatalError("SELinux: Failed to open x_contexts mapping in policy\n"); +} + +void +SELinuxLabelReset(void) +{ + selabel_close(label_hnd); + label_hnd = NULL; + + /* Free local state */ + SELinuxArrayFree(&arr_types, 0); + SELinuxArrayFree(&arr_events, 0); + SELinuxArrayFree(&arr_atoms, 1); +} diff --git a/Xext/xselinuxint.h b/Xext/xselinuxint.h new file mode 100644 index 0000000..57f8b73 --- /dev/null +++ b/Xext/xselinuxint.h @@ -0,0 +1,564 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifndef _XSELINUXINT_H +#define _XSELINUXINT_H + +#include <selinux/selinux.h> +#include <selinux/avc.h> + +#include "globals.h" +#include "dixaccess.h" +#include "dixstruct.h" +#include "privates.h" +#include "resource.h" +#include "registry.h" +#include "inputstr.h" +#include "xselinux.h" + +/* + * Types + */ + +#define COMMAND_LEN 64 + +/* subject state (clients and devices only) */ +typedef struct { + security_id_t sid; + security_id_t dev_create_sid; + security_id_t win_create_sid; + security_id_t sel_create_sid; + security_id_t prp_create_sid; + security_id_t sel_use_sid; + security_id_t prp_use_sid; + struct avc_entry_ref aeref; + char command[COMMAND_LEN]; + int privileged; +} SELinuxSubjectRec; + +/* object state */ +typedef struct { + security_id_t sid; + int poly; +} SELinuxObjectRec; + +/* + * Globals + */ + +extern DevPrivateKeyRec subjectKeyRec; + +#define subjectKey (&subjectKeyRec) +extern DevPrivateKeyRec objectKeyRec; + +#define objectKey (&objectKeyRec) +extern DevPrivateKeyRec dataKeyRec; + +#define dataKey (&dataKeyRec) + +/* + * Label functions + */ + +int + SELinuxAtomToSID(Atom atom, int prop, SELinuxObjectRec ** obj_rtn); + +int + +SELinuxSelectionToSID(Atom selection, SELinuxSubjectRec * subj, + security_id_t * sid_rtn, int *poly_rtn); + +int + +SELinuxPropertyToSID(Atom property, SELinuxSubjectRec * subj, + security_id_t * sid_rtn, int *poly_rtn); + +int + +SELinuxEventToSID(unsigned type, security_id_t sid_of_window, + SELinuxObjectRec * sid_return); + +int + SELinuxExtensionToSID(const char *name, security_id_t * sid_rtn); + +security_class_t SELinuxTypeToClass(RESTYPE type); + +security_context_t SELinuxDefaultClientLabel(void); + +void + SELinuxLabelInit(void); + +void + SELinuxLabelReset(void); + +/* + * Security module functions + */ + +void + SELinuxFlaskInit(void); + +void + SELinuxFlaskReset(void); + +/* + * Private Flask definitions + */ + +/* Security class constants */ +#define SECCLASS_X_DRAWABLE 1 +#define SECCLASS_X_SCREEN 2 +#define SECCLASS_X_GC 3 +#define SECCLASS_X_FONT 4 +#define SECCLASS_X_COLORMAP 5 +#define SECCLASS_X_PROPERTY 6 +#define SECCLASS_X_SELECTION 7 +#define SECCLASS_X_CURSOR 8 +#define SECCLASS_X_CLIENT 9 +#define SECCLASS_X_POINTER 10 +#define SECCLASS_X_KEYBOARD 11 +#define SECCLASS_X_SERVER 12 +#define SECCLASS_X_EXTENSION 13 +#define SECCLASS_X_EVENT 14 +#define SECCLASS_X_FAKEEVENT 15 +#define SECCLASS_X_RESOURCE 16 + +#ifdef _XSELINUX_NEED_FLASK_MAP +/* Mapping from DixAccess bits to Flask permissions */ +static struct security_class_mapping map[] = { + {"x_drawable", + {"read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "list_property", /* DixListPropAccess */ + "get_property", /* DixGetPropAccess */ + "set_property", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "list_child", /* DixListAccess */ + "add_child", /* DixAddAccess */ + "remove_child", /* DixRemoveAccess */ + "hide", /* DixHideAccess */ + "show", /* DixShowAccess */ + "blend", /* DixBlendAccess */ + "override", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "send", /* DixSendAccess */ + "receive", /* DixReceiveAccess */ + "", /* DixUseAccess */ + "manage", /* DixManageAccess */ + NULL}}, + {"x_screen", + {"", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "saver_getattr", /* DixListPropAccess */ + "saver_setattr", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "hide_cursor", /* DixHideAccess */ + "show_cursor", /* DixShowAccess */ + "saver_hide", /* DixBlendAccess */ + "saver_show", /* DixGrabAccess */ + NULL}}, + {"x_gc", + {"", /* DixReadAccess */ + "", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL}}, + {"x_font", + {"", /* DixReadAccess */ + "", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "add_glyph", /* DixAddAccess */ + "remove_glyph", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL}}, + {"x_colormap", + {"read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "add_color", /* DixAddAccess */ + "remove_color", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "install", /* DixInstallAccess */ + "uninstall", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL}}, + {"x_property", + {"read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "write", /* DixBlendAccess */ + NULL}}, + {"x_selection", + {"read", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "setattr", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + NULL}}, + {"x_cursor", + {"read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL}}, + {"x_client", + {"", /* DixReadAccess */ + "", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "", /* DixUseAccess */ + "manage", /* DixManageAccess */ + NULL}}, + {"x_pointer", + {"read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "list_property", /* DixListPropAccess */ + "get_property", /* DixGetPropAccess */ + "set_property", /* DixSetPropAccess */ + "getfocus", /* DixGetFocusAccess */ + "setfocus", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "add", /* DixAddAccess */ + "remove", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "grab", /* DixGrabAccess */ + "freeze", /* DixFreezeAccess */ + "force_cursor", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + "manage", /* DixManageAccess */ + "", /* DixDebugAccess */ + "bell", /* DixBellAccess */ + NULL}}, + {"x_keyboard", + {"read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "destroy", /* DixDestroyAccess */ + "create", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "list_property", /* DixListPropAccess */ + "get_property", /* DixGetPropAccess */ + "set_property", /* DixSetPropAccess */ + "getfocus", /* DixGetFocusAccess */ + "setfocus", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "add", /* DixAddAccess */ + "remove", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "grab", /* DixGrabAccess */ + "freeze", /* DixFreezeAccess */ + "force_cursor", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + "manage", /* DixManageAccess */ + "", /* DixDebugAccess */ + "bell", /* DixBellAccess */ + NULL}}, + {"x_server", + {"record", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "getattr", /* DixGetAttrAccess */ + "setattr", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "grab", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "", /* DixUseAccess */ + "manage", /* DixManageAccess */ + "debug", /* DixDebugAccess */ + NULL}}, + {"x_extension", + {"", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "query", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "", /* DixSendAccess */ + "", /* DixReceiveAccess */ + "use", /* DixUseAccess */ + NULL}}, + {"x_event", + {"", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "send", /* DixSendAccess */ + "receive", /* DixReceiveAccess */ + NULL}}, + {"x_synthetic_event", + {"", /* DixReadAccess */ + "", /* DixWriteAccess */ + "", /* DixDestroyAccess */ + "", /* DixCreateAccess */ + "", /* DixGetAttrAccess */ + "", /* DixSetAttrAccess */ + "", /* DixListPropAccess */ + "", /* DixGetPropAccess */ + "", /* DixSetPropAccess */ + "", /* DixGetFocusAccess */ + "", /* DixSetFocusAccess */ + "", /* DixListAccess */ + "", /* DixAddAccess */ + "", /* DixRemoveAccess */ + "", /* DixHideAccess */ + "", /* DixShowAccess */ + "", /* DixBlendAccess */ + "", /* DixGrabAccess */ + "", /* DixFreezeAccess */ + "", /* DixForceAccess */ + "", /* DixInstallAccess */ + "", /* DixUninstallAccess */ + "send", /* DixSendAccess */ + "receive", /* DixReceiveAccess */ + NULL}}, + {"x_resource", + {"read", /* DixReadAccess */ + "write", /* DixWriteAccess */ + "write", /* DixDestroyAccess */ + "write", /* DixCreateAccess */ + "read", /* DixGetAttrAccess */ + "write", /* DixSetAttrAccess */ + "read", /* DixListPropAccess */ + "read", /* DixGetPropAccess */ + "write", /* DixSetPropAccess */ + "read", /* DixGetFocusAccess */ + "write", /* DixSetFocusAccess */ + "read", /* DixListAccess */ + "write", /* DixAddAccess */ + "write", /* DixRemoveAccess */ + "write", /* DixHideAccess */ + "read", /* DixShowAccess */ + "read", /* DixBlendAccess */ + "write", /* DixGrabAccess */ + "write", /* DixFreezeAccess */ + "write", /* DixForceAccess */ + "write", /* DixInstallAccess */ + "write", /* DixUninstallAccess */ + "write", /* DixSendAccess */ + "read", /* DixReceiveAccess */ + "read", /* DixUseAccess */ + "write", /* DixManageAccess */ + "read", /* DixDebugAccess */ + "write", /* DixBellAccess */ + NULL}}, + {NULL} +}; + +/* x_resource "read" bits from the list above */ +#define SELinuxReadMask (DixReadAccess|DixGetAttrAccess|DixListPropAccess| \ + DixGetPropAccess|DixGetFocusAccess|DixListAccess| \ + DixShowAccess|DixBlendAccess|DixReceiveAccess| \ + DixUseAccess|DixDebugAccess) + +#endif /* _XSELINUX_NEED_FLASK_MAP */ +#endif /* _XSELINUXINT_H */ diff --git a/Xext/xtest.c b/Xext/xtest.c new file mode 100644 index 0000000..0a854f3 --- /dev/null +++ b/Xext/xtest.c @@ -0,0 +1,694 @@ +/* + + Copyright 1992, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. + + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include <X11/Xatom.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "windowstr.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "dixevents.h" +#include "sleepuntil.h" +#include "mi.h" +#include "xkbsrv.h" +#include "xkbstr.h" +#include <X11/extensions/xtestproto.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" +#include "mipointer.h" +#include "xserver-properties.h" +#include "exevents.h" +#include "eventstr.h" +#include "inpututils.h" + +#include "extinit.h" + +/* XTest events are sent during request processing and may be interruped by + * a SIGIO. We need a separate event list to avoid events overwriting each + * other's memory */ +static InternalEvent *xtest_evlist; + +/** + * xtestpointer + * is the virtual pointer for XTest. It is the first slave + * device of the VCP. + * xtestkeyboard + * is the virtual keyboard for XTest. It is the first slave + * device of the VCK + * + * Neither of these devices can be deleted. + */ +DeviceIntPtr xtestpointer, xtestkeyboard; + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +static int XTestSwapFakeInput(ClientPtr /* client */ , + xReq * /* req */ + ); + +static int +ProcXTestGetVersion(ClientPtr client) +{ + xXTestGetVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = XTestMajorVersion, + .minorVersion = XTestMinorVersion + }; + + REQUEST_SIZE_MATCH(xXTestGetVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swaps(&rep.minorVersion); + } + WriteToClient(client, sizeof(xXTestGetVersionReply), &rep); + return Success; +} + +static int +ProcXTestCompareCursor(ClientPtr client) +{ + REQUEST(xXTestCompareCursorReq); + xXTestCompareCursorReply rep; + WindowPtr pWin; + CursorPtr pCursor; + int rc; + DeviceIntPtr ptr = PickPointer(client); + + REQUEST_SIZE_MATCH(xXTestCompareCursorReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + if (!ptr) + return BadAccess; + + if (stuff->cursor == None) + pCursor = NullCursor; + else if (stuff->cursor == XTestCurrentCursor) + pCursor = GetSpriteCursor(ptr); + else { + rc = dixLookupResourceByType((pointer *) &pCursor, stuff->cursor, + RT_CURSOR, client, DixReadAccess); + if (rc != Success) { + client->errorValue = stuff->cursor; + return rc; + } + } + rep = (xXTestCompareCursorReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .same = (wCursor(pWin) == pCursor) + }; + if (client->swapped) { + swaps(&rep.sequenceNumber); + } + WriteToClient(client, sizeof(xXTestCompareCursorReply), &rep); + return Success; +} + +static int +ProcXTestFakeInput(ClientPtr client) +{ + REQUEST(xXTestFakeInputReq); + int nev, n, type, rc; + xEvent *ev; + DeviceIntPtr dev = NULL; + WindowPtr root; + Bool extension = FALSE; + ValuatorMask mask; + int valuators[MAX_VALUATORS] = { 0 }; + int numValuators = 0; + int firstValuator = 0; + int nevents = 0; + int i; + int base = 0; + int flags = 0; + int need_ptr_update = 1; + + nev = (stuff->length << 2) - sizeof(xReq); + if ((nev % sizeof(xEvent)) || !nev) + return BadLength; + nev /= sizeof(xEvent); + UpdateCurrentTime(); + ev = (xEvent *) &((xReq *) stuff)[1]; + type = ev->u.u.type & 0177; + + if (type >= EXTENSION_EVENT_BASE) { + extension = TRUE; + + /* check device */ + rc = dixLookupDevice(&dev, stuff->deviceid & 0177, client, + DixWriteAccess); + if (rc != Success) { + client->errorValue = stuff->deviceid & 0177; + return rc; + } + + /* check type */ + type -= DeviceValuator; + switch (type) { + case XI_DeviceKeyPress: + case XI_DeviceKeyRelease: + if (!dev->key) { + client->errorValue = ev->u.u.type; + return BadValue; + } + break; + case XI_DeviceButtonPress: + case XI_DeviceButtonRelease: + if (!dev->button) { + client->errorValue = ev->u.u.type; + return BadValue; + } + break; + case XI_DeviceMotionNotify: + if (!dev->valuator) { + client->errorValue = ev->u.u.type; + return BadValue; + } + break; + case XI_ProximityIn: + case XI_ProximityOut: + if (!dev->proximity) { + client->errorValue = ev->u.u.type; + return BadValue; + } + break; + default: + client->errorValue = ev->u.u.type; + return BadValue; + } + + /* check validity */ + if (nev == 1 && type == XI_DeviceMotionNotify) + return BadLength; /* DevMotion must be followed by DevValuator */ + + if (type == XI_DeviceMotionNotify) { + firstValuator = ((deviceValuator *) (ev + 1))->first_valuator; + if (firstValuator > dev->valuator->numAxes) { + client->errorValue = ev->u.u.type; + return BadValue; + } + + if (ev->u.u.detail == xFalse) + flags |= POINTER_ABSOLUTE; + } + else { + firstValuator = 0; + flags |= POINTER_ABSOLUTE; + } + + if (nev > 1 && !dev->valuator) { + client->errorValue = firstValuator; + return BadValue; + } + + /* check validity of valuator events */ + base = firstValuator; + for (n = 1; n < nev; n++) { + deviceValuator *dv = (deviceValuator *) (ev + n); + if (dv->type != DeviceValuator) { + client->errorValue = dv->type; + return BadValue; + } + if (dv->first_valuator != base) { + client->errorValue = dv->first_valuator; + return BadValue; + } + switch (dv->num_valuators) { + case 6: + valuators[base + 5] = dv->valuator5; + case 5: + valuators[base + 4] = dv->valuator4; + case 4: + valuators[base + 3] = dv->valuator3; + case 3: + valuators[base + 2] = dv->valuator2; + case 2: + valuators[base + 1] = dv->valuator1; + case 1: + valuators[base] = dv->valuator0; + break; + default: + client->errorValue = dv->num_valuators; + return BadValue; + } + + base += dv->num_valuators; + numValuators += dv->num_valuators; + + if (firstValuator + numValuators > dev->valuator->numAxes) { + client->errorValue = dv->num_valuators; + return BadValue; + } + } + type = type - XI_DeviceKeyPress + KeyPress; + + } + else { + if (nev != 1) + return BadLength; + switch (type) { + case KeyPress: + case KeyRelease: + dev = PickKeyboard(client); + break; + case ButtonPress: + case ButtonRelease: + dev = PickPointer(client); + break; + case MotionNotify: + dev = PickPointer(client); + valuators[0] = ev->u.keyButtonPointer.rootX; + valuators[1] = ev->u.keyButtonPointer.rootY; + numValuators = 2; + firstValuator = 0; + if (ev->u.u.detail == xFalse) + flags = POINTER_ABSOLUTE | POINTER_DESKTOP; + break; + default: + client->errorValue = ev->u.u.type; + return BadValue; + } + + /* Technically the protocol doesn't allow for BadAccess here but + * this can only happen when all MDs are disabled. */ + if (!dev) + return BadAccess; + + dev = GetXTestDevice(dev); + } + + + /* If the event has a time set, wait for it to pass */ + if (ev->u.keyButtonPointer.time) { + TimeStamp activateTime; + CARD32 ms; + + activateTime = currentTime; + ms = activateTime.milliseconds + ev->u.keyButtonPointer.time; + if (ms < activateTime.milliseconds) + activateTime.months++; + activateTime.milliseconds = ms; + ev->u.keyButtonPointer.time = 0; + + /* see mbuf.c:QueueDisplayRequest (from the deprecated Multibuffer + * extension) for code similar to this */ + + if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) { + return BadAlloc; + } + /* swap the request back so we can simply re-execute it */ + if (client->swapped) { + (void) XTestSwapFakeInput(client, (xReq *) stuff); + swaps(&stuff->length); + } + ResetCurrentRequest(client); + client->sequence--; + return Success; + } + + switch (type) { + case KeyPress: + case KeyRelease: + if (!dev->key) + return BadDevice; + + if (ev->u.u.detail < dev->key->xkbInfo->desc->min_key_code || + ev->u.u.detail > dev->key->xkbInfo->desc->max_key_code) { + client->errorValue = ev->u.u.detail; + return BadValue; + } + + need_ptr_update = 0; + break; + case MotionNotify: + if (!dev->valuator) + return BadDevice; + + if (!(extension || ev->u.keyButtonPointer.root == None)) { + rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, + client, DixGetAttrAccess); + if (rc != Success) + return rc; + if (root->parent) { + client->errorValue = ev->u.keyButtonPointer.root; + return BadValue; + } + + /* Add the root window's offset to the valuators */ + if ((flags & POINTER_ABSOLUTE) && firstValuator <= 1 && numValuators > 0) { + if (firstValuator == 0) + valuators[0] += root->drawable.pScreen->x; + if (firstValuator < 2 && firstValuator + numValuators > 1) + valuators[1 - firstValuator] += root->drawable.pScreen->y; + } + } + if (ev->u.u.detail != xTrue && ev->u.u.detail != xFalse) { + client->errorValue = ev->u.u.detail; + return BadValue; + } + + /* FIXME: Xinerama! */ + + break; + case ButtonPress: + case ButtonRelease: + if (!dev->button) + return BadDevice; + + if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { + client->errorValue = ev->u.u.detail; + return BadValue; + } + break; + } + if (screenIsSaved == SCREEN_SAVER_ON) + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + + switch (type) { + case MotionNotify: + valuator_mask_set_range(&mask, firstValuator, numValuators, valuators); + nevents = GetPointerEvents(xtest_evlist, dev, type, 0, flags, &mask); + break; + case ButtonPress: + case ButtonRelease: + valuator_mask_set_range(&mask, firstValuator, numValuators, valuators); + nevents = GetPointerEvents(xtest_evlist, dev, type, ev->u.u.detail, + flags, &mask); + break; + case KeyPress: + case KeyRelease: + nevents = + GetKeyboardEvents(xtest_evlist, dev, type, ev->u.u.detail, NULL); + break; + } + + for (i = 0; i < nevents; i++) + mieqProcessDeviceEvent(dev, &xtest_evlist[i], miPointerGetScreen(inputInfo.pointer)); + + if (need_ptr_update) + miPointerUpdateSprite(dev); + return Success; +} + +static int +ProcXTestGrabControl(ClientPtr client) +{ + REQUEST(xXTestGrabControlReq); + + REQUEST_SIZE_MATCH(xXTestGrabControlReq); + if ((stuff->impervious != xTrue) && (stuff->impervious != xFalse)) { + client->errorValue = stuff->impervious; + return BadValue; + } + if (stuff->impervious) + MakeClientGrabImpervious(client); + else + MakeClientGrabPervious(client); + return Success; +} + +static int +ProcXTestDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XTestGetVersion: + return ProcXTestGetVersion(client); + case X_XTestCompareCursor: + return ProcXTestCompareCursor(client); + case X_XTestFakeInput: + return ProcXTestFakeInput(client); + case X_XTestGrabControl: + return ProcXTestGrabControl(client); + default: + return BadRequest; + } +} + +static int +SProcXTestGetVersion(ClientPtr client) +{ + REQUEST(xXTestGetVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXTestGetVersionReq); + swaps(&stuff->minorVersion); + return ProcXTestGetVersion(client); +} + +static int +SProcXTestCompareCursor(ClientPtr client) +{ + REQUEST(xXTestCompareCursorReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXTestCompareCursorReq); + swapl(&stuff->window); + swapl(&stuff->cursor); + return ProcXTestCompareCursor(client); +} + +static int +XTestSwapFakeInput(ClientPtr client, xReq * req) +{ + int nev; + xEvent *ev; + xEvent sev; + EventSwapPtr proc; + + nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent); + for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) { + /* Swap event */ + proc = EventSwapVector[ev->u.u.type & 0177]; + /* no swapping proc; invalid event type? */ + if (!proc || proc == NotImplemented) { + client->errorValue = ev->u.u.type; + return BadValue; + } + (*proc) (ev, &sev); + *ev = sev; + } + return Success; +} + +static int +SProcXTestFakeInput(ClientPtr client) +{ + int n; + + REQUEST(xReq); + + swaps(&stuff->length); + n = XTestSwapFakeInput(client, stuff); + if (n != Success) + return n; + return ProcXTestFakeInput(client); +} + +static int +SProcXTestGrabControl(ClientPtr client) +{ + REQUEST(xXTestGrabControlReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXTestGrabControlReq); + return ProcXTestGrabControl(client); +} + +static int +SProcXTestDispatch(ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XTestGetVersion: + return SProcXTestGetVersion(client); + case X_XTestCompareCursor: + return SProcXTestCompareCursor(client); + case X_XTestFakeInput: + return SProcXTestFakeInput(client); + case X_XTestGrabControl: + return SProcXTestGrabControl(client); + default: + return BadRequest; + } +} + +/** + * Allocate an virtual slave device for xtest events, this + * is a slave device to inputInfo master devices + */ +void +InitXTestDevices(void) +{ + if (AllocXTestDevice(serverClient, "Virtual core", + &xtestpointer, &xtestkeyboard, + inputInfo.pointer, inputInfo.keyboard) != Success) + FatalError("Failed to allocate XTest devices"); + + if (ActivateDevice(xtestpointer, TRUE) != Success || + ActivateDevice(xtestkeyboard, TRUE) != Success) + FatalError("Failed to activate XTest core devices."); + if (!EnableDevice(xtestpointer, TRUE) || !EnableDevice(xtestkeyboard, TRUE)) + FatalError("Failed to enable XTest core devices."); + + AttachDevice(NULL, xtestpointer, inputInfo.pointer); + + AttachDevice(NULL, xtestkeyboard, inputInfo.keyboard); +} + +/** + * Don't allow changing the XTest property. + */ +static int +DeviceSetXTestProperty(DeviceIntPtr dev, Atom property, + XIPropertyValuePtr prop, BOOL checkonly) +{ + if (property == XIGetKnownProperty(XI_PROP_XTEST_DEVICE)) + return BadAccess; + + return Success; +} + +/** + * Allocate a device pair that is initialised as a slave + * device with properties that identify the devices as belonging + * to XTest subsystem. + * This only creates the pair, Activate/Enable Device + * still need to be called. + */ +int +AllocXTestDevice(ClientPtr client, const char *name, + DeviceIntPtr *ptr, DeviceIntPtr *keybd, + DeviceIntPtr master_ptr, DeviceIntPtr master_keybd) +{ + int retval; + char *xtestname; + char dummy = 1; + + if (asprintf(&xtestname, "%s XTEST", name) == -1) + return BadAlloc; + + retval = + AllocDevicePair(client, xtestname, ptr, keybd, CorePointerProc, + CoreKeyboardProc, FALSE); + if (retval == Success) { + (*ptr)->xtest_master_id = master_ptr->id; + (*keybd)->xtest_master_id = master_keybd->id; + + XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), + XA_INTEGER, 8, PropModeReplace, 1, &dummy, + FALSE); + XISetDevicePropertyDeletable(*ptr, + XIGetKnownProperty(XI_PROP_XTEST_DEVICE), + FALSE); + XIRegisterPropertyHandler(*ptr, DeviceSetXTestProperty, NULL, NULL); + XIChangeDeviceProperty(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), + XA_INTEGER, 8, PropModeReplace, 1, &dummy, + FALSE); + XISetDevicePropertyDeletable(*keybd, + XIGetKnownProperty(XI_PROP_XTEST_DEVICE), + FALSE); + XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL); + } + + free(xtestname); + + return retval; +} + +/** + * If master is NULL, return TRUE if the given device is an xtest device or + * FALSE otherwise. + * If master is not NULL, return TRUE if the given device is this master's + * xtest device. + */ +BOOL +IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master) +{ + if (IsMaster(dev)) + return FALSE; + + /* deviceid 0 is reserved for XIAllDevices, non-zero mid means XTest + * device */ + if (master) + return dev->xtest_master_id == master->id; + + return dev->xtest_master_id != 0; +} + +/** + * @return The X Test virtual device for the given master. + */ +DeviceIntPtr +GetXTestDevice(DeviceIntPtr master) +{ + DeviceIntPtr it; + + for (it = inputInfo.devices; it; it = it->next) { + if (IsXTestDevice(it, master)) + return it; + } + + /* This only happens if master is a slave device. don't do that */ + return NULL; +} + +static void +XTestExtensionTearDown(ExtensionEntry * e) +{ + FreeEventList(xtest_evlist, GetMaximumEventsNum()); + xtest_evlist = NULL; +} + +void +XTestExtensionInit(void) +{ + AddExtension(XTestExtensionName, 0, 0, + ProcXTestDispatch, SProcXTestDispatch, + XTestExtensionTearDown, StandardMinorOpcode); + + xtest_evlist = InitEventList(GetMaximumEventsNum()); +} diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c new file mode 100644 index 0000000..613867a --- /dev/null +++ b/Xext/xvdisp.c @@ -0,0 +1,1879 @@ +/*********************************************************** +Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <string.h> + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "dixstruct.h" +#include "resource.h" +#include "opaque.h" + +#include <X11/extensions/Xv.h> +#include <X11/extensions/Xvproto.h> +#include "xvdix.h" +#ifdef MITSHM +#include <X11/extensions/shmproto.h> +#include "shmint.h" +#endif + +#include "xvdisp.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" + +unsigned long XvXRTPort; +#endif + +static int +SWriteQueryExtensionReply(ClientPtr client, xvQueryExtensionReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->version); + swaps(&rep->revision); + + WriteToClient(client, sz_xvQueryExtensionReply, rep); + + return Success; +} + +static int +SWriteQueryAdaptorsReply(ClientPtr client, xvQueryAdaptorsReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_adaptors); + + WriteToClient(client, sz_xvQueryAdaptorsReply, rep); + + return Success; +} + +static int +SWriteQueryEncodingsReply(ClientPtr client, xvQueryEncodingsReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_encodings); + + WriteToClient(client, sz_xvQueryEncodingsReply, rep); + + return Success; +} + +static int +SWriteAdaptorInfo(ClientPtr client, xvAdaptorInfo * pAdaptor) +{ + swapl(&pAdaptor->base_id); + swaps(&pAdaptor->name_size); + swaps(&pAdaptor->num_ports); + swaps(&pAdaptor->num_formats); + + WriteToClient(client, sz_xvAdaptorInfo, pAdaptor); + + return Success; +} + +static int +SWriteEncodingInfo(ClientPtr client, xvEncodingInfo * pEncoding) +{ + + swapl(&pEncoding->encoding); + swaps(&pEncoding->name_size); + swaps(&pEncoding->width); + swaps(&pEncoding->height); + swapl(&pEncoding->rate.numerator); + swapl(&pEncoding->rate.denominator); + WriteToClient(client, sz_xvEncodingInfo, pEncoding); + + return Success; +} + +static int +SWriteFormat(ClientPtr client, xvFormat * pFormat) +{ + swapl(&pFormat->visual); + WriteToClient(client, sz_xvFormat, pFormat); + + return Success; +} + +static int +SWriteAttributeInfo(ClientPtr client, xvAttributeInfo * pAtt) +{ + swapl(&pAtt->flags); + swapl(&pAtt->size); + swapl(&pAtt->min); + swapl(&pAtt->max); + WriteToClient(client, sz_xvAttributeInfo, pAtt); + + return Success; +} + +static int +SWriteImageFormatInfo(ClientPtr client, xvImageFormatInfo * pImage) +{ + swapl(&pImage->id); + swapl(&pImage->red_mask); + swapl(&pImage->green_mask); + swapl(&pImage->blue_mask); + swapl(&pImage->y_sample_bits); + swapl(&pImage->u_sample_bits); + swapl(&pImage->v_sample_bits); + swapl(&pImage->horz_y_period); + swapl(&pImage->horz_u_period); + swapl(&pImage->horz_v_period); + swapl(&pImage->vert_y_period); + swapl(&pImage->vert_u_period); + swapl(&pImage->vert_v_period); + + WriteToClient(client, sz_xvImageFormatInfo, pImage); + + return Success; +} + +static int +SWriteGrabPortReply(ClientPtr client, xvGrabPortReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + + WriteToClient(client, sz_xvGrabPortReply, rep); + + return Success; +} + +static int +SWriteGetPortAttributeReply(ClientPtr client, xvGetPortAttributeReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->value); + + WriteToClient(client, sz_xvGetPortAttributeReply, rep); + + return Success; +} + +static int +SWriteQueryBestSizeReply(ClientPtr client, xvQueryBestSizeReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->actual_width); + swaps(&rep->actual_height); + + WriteToClient(client, sz_xvQueryBestSizeReply, rep); + + return Success; +} + +static int +SWriteQueryPortAttributesReply(ClientPtr client, + xvQueryPortAttributesReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_attributes); + swapl(&rep->text_size); + + WriteToClient(client, sz_xvQueryPortAttributesReply, rep); + + return Success; +} + +static int +SWriteQueryImageAttributesReply(ClientPtr client, + xvQueryImageAttributesReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_planes); + swapl(&rep->data_size); + swaps(&rep->width); + swaps(&rep->height); + + WriteToClient(client, sz_xvQueryImageAttributesReply, rep); + + return Success; +} + +static int +SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_formats); + + WriteToClient(client, sz_xvListImageFormatsReply, rep); + + return Success; +} + +#define _WriteQueryAdaptorsReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryAdaptorsReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryAdaptorsReply, _d) + +#define _WriteQueryExtensionReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryExtensionReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryExtensionReply, _d) + +#define _WriteQueryEncodingsReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryEncodingsReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryEncodingsReply, _d) + +#define _WriteAdaptorInfo(_c,_d) \ + if ((_c)->swapped) SWriteAdaptorInfo(_c, _d); \ + else WriteToClient(_c, sz_xvAdaptorInfo, _d) + +#define _WriteAttributeInfo(_c,_d) \ + if ((_c)->swapped) SWriteAttributeInfo(_c, _d); \ + else WriteToClient(_c, sz_xvAttributeInfo, _d) + +#define _WriteEncodingInfo(_c,_d) \ + if ((_c)->swapped) SWriteEncodingInfo(_c, _d); \ + else WriteToClient(_c, sz_xvEncodingInfo, _d) + +#define _WriteFormat(_c,_d) \ + if ((_c)->swapped) SWriteFormat(_c, _d); \ + else WriteToClient(_c, sz_xvFormat, _d) + +#define _WriteGrabPortReply(_c,_d) \ + if ((_c)->swapped) SWriteGrabPortReply(_c, _d); \ + else WriteToClient(_c, sz_xvGrabPortReply, _d) + +#define _WriteGetPortAttributeReply(_c,_d) \ + if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \ + else WriteToClient(_c, sz_xvGetPortAttributeReply, _d) + +#define _WriteQueryBestSizeReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryBestSizeReply, _d) + +#define _WriteQueryPortAttributesReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryPortAttributesReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryPortAttributesReply, _d) + +#define _WriteQueryImageAttributesReply(_c,_d) \ + if ((_c)->swapped) SWriteQueryImageAttributesReply(_c, _d); \ + else WriteToClient(_c, sz_xvQueryImageAttributesReply, _d) + +#define _WriteListImageFormatsReply(_c,_d) \ + if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \ + else WriteToClient(_c, sz_xvListImageFormatsReply, _d) + +#define _WriteImageFormatInfo(_c,_d) \ + if ((_c)->swapped) SWriteImageFormatInfo(_c, _d); \ + else WriteToClient(_c, sz_xvImageFormatInfo, _d) + +#define _AllocatePort(_i,_p) \ + ((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success + +static int +ProcXvQueryExtension(ClientPtr client) +{ + xvQueryExtensionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .version = XvVersion, + .revision = XvRevision + }; + + /* REQUEST(xvQueryExtensionReq); */ + REQUEST_SIZE_MATCH(xvQueryExtensionReq); + + _WriteQueryExtensionReply(client, &rep); + + return Success; +} + +static int +ProcXvQueryAdaptors(ClientPtr client) +{ + xvFormat format; + xvAdaptorInfo ainfo; + xvQueryAdaptorsReply rep; + int totalSize, na, nf, rc; + int nameSize; + XvAdaptorPtr pa; + XvFormatPtr pf; + WindowPtr pWin; + ScreenPtr pScreen; + XvScreenPtr pxvs; + + REQUEST(xvQueryAdaptorsReq); + REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); + + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + pScreen = pWin->drawable.pScreen; + pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, + XvGetScreenKey()); + if (!pxvs) { + rep = (xvQueryAdaptorsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .num_adaptors = 0 + }; + + _WriteQueryAdaptorsReply(client, &rep); + + return Success; + } + + (*pxvs->ddQueryAdaptors) (pScreen, &pxvs->pAdaptors, &pxvs->nAdaptors); + + rep = (xvQueryAdaptorsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .num_adaptors = pxvs->nAdaptors + }; + + /* CALCULATE THE TOTAL SIZE OF THE REPLY IN BYTES */ + + totalSize = pxvs->nAdaptors * sz_xvAdaptorInfo; + + /* FOR EACH ADPATOR ADD UP THE BYTES FOR ENCODINGS AND FORMATS */ + + na = pxvs->nAdaptors; + pa = pxvs->pAdaptors; + while (na--) { + totalSize += pad_to_int32(strlen(pa->name)); + totalSize += pa->nFormats * sz_xvFormat; + pa++; + } + + rep.length = bytes_to_int32(totalSize); + + _WriteQueryAdaptorsReply(client, &rep); + + na = pxvs->nAdaptors; + pa = pxvs->pAdaptors; + while (na--) { + + ainfo.base_id = pa->base_id; + ainfo.num_ports = pa->nPorts; + ainfo.type = pa->type; + ainfo.name_size = nameSize = strlen(pa->name); + ainfo.num_formats = pa->nFormats; + + _WriteAdaptorInfo(client, &ainfo); + + WriteToClient(client, nameSize, pa->name); + + nf = pa->nFormats; + pf = pa->pFormats; + while (nf--) { + format.depth = pf->depth; + format.visual = pf->visual; + _WriteFormat(client, &format); + pf++; + } + + pa++; + + } + + return Success; +} + +static int +ProcXvQueryEncodings(ClientPtr client) +{ + xvEncodingInfo einfo; + xvQueryEncodingsReply rep; + int totalSize; + int nameSize; + XvPortPtr pPort; + int ne; + XvEncodingPtr pe; + int status; + + REQUEST(xvQueryEncodingsReq); + REQUEST_SIZE_MATCH(xvQueryEncodingsReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + rep = (xvQueryEncodingsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .num_encodings = pPort->pAdaptor->nEncodings + }; + + /* FOR EACH ENCODING ADD UP THE BYTES FOR ENCODING NAMES */ + + ne = pPort->pAdaptor->nEncodings; + pe = pPort->pAdaptor->pEncodings; + totalSize = ne * sz_xvEncodingInfo; + while (ne--) { + totalSize += pad_to_int32(strlen(pe->name)); + pe++; + } + + rep.length = bytes_to_int32(totalSize); + + _WriteQueryEncodingsReply(client, &rep); + + ne = pPort->pAdaptor->nEncodings; + pe = pPort->pAdaptor->pEncodings; + while (ne--) { + einfo.encoding = pe->id; + einfo.name_size = nameSize = strlen(pe->name); + einfo.width = pe->width; + einfo.height = pe->height; + einfo.rate.numerator = pe->rate.numerator; + einfo.rate.denominator = pe->rate.denominator; + _WriteEncodingInfo(client, &einfo); + WriteToClient(client, nameSize, pe->name); + pe++; + } + + return Success; +} + +static int +ProcXvPutVideo(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvPutVideoReq); + REQUEST_SIZE_MATCH(xvPutVideoReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!(pPort->pAdaptor->type & XvInputMask) || + !(pPort->pAdaptor->type & XvVideoMask)) { + client->errorValue = stuff->port; + return BadMatch; + } + + status = XvdiMatchPort(pPort, pDraw); + if (status != Success) { + return status; + } + + return XvdiPutVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); +} + +static int +ProcXvPutStill(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvPutStillReq); + REQUEST_SIZE_MATCH(xvPutStillReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!(pPort->pAdaptor->type & XvInputMask) || + !(pPort->pAdaptor->type & XvStillMask)) { + client->errorValue = stuff->port; + return BadMatch; + } + + status = XvdiMatchPort(pPort, pDraw); + if (status != Success) { + return status; + } + + return XvdiPutStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); +} + +static int +ProcXvGetVideo(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvGetVideoReq); + REQUEST_SIZE_MATCH(xvGetVideoReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!(pPort->pAdaptor->type & XvOutputMask) || + !(pPort->pAdaptor->type & XvVideoMask)) { + client->errorValue = stuff->port; + return BadMatch; + } + + status = XvdiMatchPort(pPort, pDraw); + if (status != Success) { + return status; + } + + return XvdiGetVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); +} + +static int +ProcXvGetStill(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + GCPtr pGC; + int status; + + REQUEST(xvGetStillReq); + REQUEST_SIZE_MATCH(xvGetStillReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!(pPort->pAdaptor->type & XvOutputMask) || + !(pPort->pAdaptor->type & XvStillMask)) { + client->errorValue = stuff->port; + return BadMatch; + } + + status = XvdiMatchPort(pPort, pDraw); + if (status != Success) { + return status; + } + + return XvdiGetStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, + stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h); +} + +static int +ProcXvSelectVideoNotify(ClientPtr client) +{ + DrawablePtr pDraw; + int rc; + + REQUEST(xvSelectVideoNotifyReq); + REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixReceiveAccess); + if (rc != Success) + return rc; + + return XvdiSelectVideoNotify(client, pDraw, stuff->onoff); +} + +static int +ProcXvSelectPortNotify(ClientPtr client) +{ + int status; + XvPortPtr pPort; + + REQUEST(xvSelectPortNotifyReq); + REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + return XvdiSelectPortNotify(client, pPort, stuff->onoff); +} + +static int +ProcXvGrabPort(ClientPtr client) +{ + int result, status; + XvPortPtr pPort; + xvGrabPortReply rep; + + REQUEST(xvGrabPortReq); + REQUEST_SIZE_MATCH(xvGrabPortReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + status = XvdiGrabPort(client, pPort, stuff->time, &result); + + if (status != Success) { + return status; + } + rep = (xvGrabPortReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .result = result + }; + + _WriteGrabPortReply(client, &rep); + + return Success; +} + +static int +ProcXvUngrabPort(ClientPtr client) +{ + int status; + XvPortPtr pPort; + + REQUEST(xvGrabPortReq); + REQUEST_SIZE_MATCH(xvGrabPortReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + return XvdiUngrabPort(client, pPort, stuff->time); +} + +static int +ProcXvStopVideo(ClientPtr client) +{ + int status, ret; + DrawablePtr pDraw; + XvPortPtr pPort; + + REQUEST(xvStopVideoReq); + REQUEST_SIZE_MATCH(xvStopVideoReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); + if (ret != Success) + return ret; + + return XvdiStopVideo(client, pPort, pDraw); +} + +static int +ProcXvSetPortAttribute(ClientPtr client) +{ + int status; + XvPortPtr pPort; + + REQUEST(xvSetPortAttributeReq); + REQUEST_SIZE_MATCH(xvSetPortAttributeReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixSetAttrAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!ValidAtom(stuff->attribute)) { + client->errorValue = stuff->attribute; + return BadAtom; + } + + status = + XvdiSetPortAttribute(client, pPort, stuff->attribute, stuff->value); + + if (status == BadMatch) + client->errorValue = stuff->attribute; + else + client->errorValue = stuff->value; + + return status; +} + +static int +ProcXvGetPortAttribute(ClientPtr client) +{ + INT32 value; + int status; + XvPortPtr pPort; + xvGetPortAttributeReply rep; + + REQUEST(xvGetPortAttributeReq); + REQUEST_SIZE_MATCH(xvGetPortAttributeReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!ValidAtom(stuff->attribute)) { + client->errorValue = stuff->attribute; + return BadAtom; + } + + status = XvdiGetPortAttribute(client, pPort, stuff->attribute, &value); + if (status != Success) { + client->errorValue = stuff->attribute; + return status; + } + + rep = (xvGetPortAttributeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .value = value + }; + + _WriteGetPortAttributeReply(client, &rep); + + return Success; +} + +static int +ProcXvQueryBestSize(ClientPtr client) +{ + int status; + unsigned int actual_width, actual_height; + XvPortPtr pPort; + xvQueryBestSizeReply rep; + + REQUEST(xvQueryBestSizeReq); + REQUEST_SIZE_MATCH(xvQueryBestSizeReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + (*pPort->pAdaptor->ddQueryBestSize) (client, pPort, stuff->motion, + stuff->vid_w, stuff->vid_h, + stuff->drw_w, stuff->drw_h, + &actual_width, &actual_height); + + rep = (xvQueryBestSizeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .actual_width = actual_width, + .actual_height = actual_height + }; + + _WriteQueryBestSizeReply(client, &rep); + + return Success; +} + +static int +ProcXvQueryPortAttributes(ClientPtr client) +{ + int status, size, i; + XvPortPtr pPort; + XvAttributePtr pAtt; + xvQueryPortAttributesReply rep; + xvAttributeInfo Info; + + REQUEST(xvQueryPortAttributesReq); + REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + rep = (xvQueryPortAttributesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .num_attributes = pPort->pAdaptor->nAttributes, + .text_size = 0 + }; + + for (i = 0, pAtt = pPort->pAdaptor->pAttributes; + i < pPort->pAdaptor->nAttributes; i++, pAtt++) { + rep.text_size += pad_to_int32(strlen(pAtt->name) + 1); + } + + rep.length = (pPort->pAdaptor->nAttributes * sz_xvAttributeInfo) + + rep.text_size; + rep.length >>= 2; + + _WriteQueryPortAttributesReply(client, &rep); + + for (i = 0, pAtt = pPort->pAdaptor->pAttributes; + i < pPort->pAdaptor->nAttributes; i++, pAtt++) { + size = strlen(pAtt->name) + 1; /* pass the NULL */ + Info.flags = pAtt->flags; + Info.min = pAtt->min_value; + Info.max = pAtt->max_value; + Info.size = pad_to_int32(size); + + _WriteAttributeInfo(client, &Info); + + WriteToClient(client, size, pAtt->name); + } + + return Success; +} + +static int +ProcXvPutImage(ClientPtr client) +{ + DrawablePtr pDraw; + XvPortPtr pPort; + XvImagePtr pImage = NULL; + GCPtr pGC; + int status, i, size; + CARD16 width, height; + + REQUEST(xvPutImageReq); + REQUEST_AT_LEAST_SIZE(xvPutImageReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!(pPort->pAdaptor->type & XvImageMask) || + !(pPort->pAdaptor->type & XvInputMask)) { + client->errorValue = stuff->port; + return BadMatch; + } + + status = XvdiMatchPort(pPort, pDraw); + if (status != Success) { + return status; + } + + for (i = 0; i < pPort->pAdaptor->nImages; i++) { + if (pPort->pAdaptor->pImages[i].id == stuff->id) { + pImage = &(pPort->pAdaptor->pImages[i]); + break; + } + } + + if (!pImage) + return BadMatch; + + width = stuff->width; + height = stuff->height; + size = (*pPort->pAdaptor->ddQueryImageAttributes) (client, + pPort, pImage, &width, + &height, NULL, NULL); + size += sizeof(xvPutImageReq); + size = bytes_to_int32(size); + + if ((width < stuff->width) || (height < stuff->height)) + return BadValue; + + if (client->req_len < size) + return BadLength; + + return XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, + stuff->src_w, stuff->src_h, stuff->drw_x, stuff->drw_y, + stuff->drw_w, stuff->drw_h, pImage, + (unsigned char *) (&stuff[1]), FALSE, + stuff->width, stuff->height); +} + +#ifdef MITSHM + +static int +ProcXvShmPutImage(ClientPtr client) +{ + ShmDescPtr shmdesc; + DrawablePtr pDraw; + XvPortPtr pPort; + XvImagePtr pImage = NULL; + GCPtr pGC; + int status, size_needed, i; + CARD16 width, height; + + REQUEST(xvShmPutImageReq); + REQUEST_SIZE_MATCH(xvShmPutImageReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if ((status = _AllocatePort(stuff->port, pPort)) != Success) { + client->errorValue = stuff->port; + return status; + } + + if (!(pPort->pAdaptor->type & XvImageMask) || + !(pPort->pAdaptor->type & XvInputMask)) { + client->errorValue = stuff->port; + return BadMatch; + } + + status = XvdiMatchPort(pPort, pDraw); + if (status != Success) { + return status; + } + + for (i = 0; i < pPort->pAdaptor->nImages; i++) { + if (pPort->pAdaptor->pImages[i].id == stuff->id) { + pImage = &(pPort->pAdaptor->pImages[i]); + break; + } + } + + if (!pImage) + return BadMatch; + + status = dixLookupResourceByType((pointer *) &shmdesc, stuff->shmseg, + ShmSegType, serverClient, DixReadAccess); + if (status != Success) + return status; + + width = stuff->width; + height = stuff->height; + size_needed = (*pPort->pAdaptor->ddQueryImageAttributes) (client, + pPort, pImage, + &width, &height, + NULL, NULL); + if ((size_needed + stuff->offset) > shmdesc->size) + return BadAccess; + + if ((width < stuff->width) || (height < stuff->height)) + return BadValue; + + status = XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, + stuff->src_w, stuff->src_h, stuff->drw_x, + stuff->drw_y, stuff->drw_w, stuff->drw_h, pImage, + (unsigned char *) shmdesc->addr + stuff->offset, + stuff->send_event, stuff->width, stuff->height); + + if ((status == Success) && stuff->send_event) { + xShmCompletionEvent ev = { + .type = ShmCompletionCode, + .drawable = stuff->drawable, + .minorEvent = xv_ShmPutImage, + .majorEvent = XvReqCode, + .shmseg = stuff->shmseg, + .offset = stuff->offset + }; + WriteEventsToClient(client, 1, (xEvent *) &ev); + } + + return status; +} +#else /* !MITSHM */ +static int +ProcXvShmPutImage(ClientPtr client) +{ + SendErrorToClient(client, XvReqCode, xv_ShmPutImage, 0, BadImplementation); + return BadImplementation; +} +#endif + +#ifdef XvMCExtension +#include "xvmcext.h" +#endif + +static int +ProcXvQueryImageAttributes(ClientPtr client) +{ + xvQueryImageAttributesReply rep; + int size, num_planes, i; + CARD16 width, height; + XvImagePtr pImage = NULL; + XvPortPtr pPort; + int *offsets; + int *pitches; + int planeLength; + + REQUEST(xvQueryImageAttributesReq); + + REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + for (i = 0; i < pPort->pAdaptor->nImages; i++) { + if (pPort->pAdaptor->pImages[i].id == stuff->id) { + pImage = &(pPort->pAdaptor->pImages[i]); + break; + } + } + +#ifdef XvMCExtension + if (!pImage) + pImage = XvMCFindXvImage(pPort, stuff->id); +#endif + + if (!pImage) + return BadMatch; + + num_planes = pImage->num_planes; + + if (!(offsets = malloc(num_planes << 3))) + return BadAlloc; + pitches = offsets + num_planes; + + width = stuff->width; + height = stuff->height; + + size = (*pPort->pAdaptor->ddQueryImageAttributes) (client, pPort, pImage, + &width, &height, offsets, + pitches); + + rep = (xvQueryImageAttributesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = planeLength = num_planes << 1, + .num_planes = num_planes, + .width = width, + .height = height, + .data_size = size + }; + + _WriteQueryImageAttributesReply(client, &rep); + if (client->swapped) + SwapLongs((CARD32 *) offsets, planeLength); + WriteToClient(client, planeLength << 2, offsets); + + free(offsets); + + return Success; +} + +static int +ProcXvListImageFormats(ClientPtr client) +{ + XvPortPtr pPort; + XvImagePtr pImage; + int i; + xvListImageFormatsReply rep; + xvImageFormatInfo info; + + REQUEST(xvListImageFormatsReq); + + REQUEST_SIZE_MATCH(xvListImageFormatsReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + rep = (xvListImageFormatsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .num_formats = pPort->pAdaptor->nImages, + .length = + bytes_to_int32(pPort->pAdaptor->nImages * sz_xvImageFormatInfo) + }; + + _WriteListImageFormatsReply(client, &rep); + + pImage = pPort->pAdaptor->pImages; + + for (i = 0; i < pPort->pAdaptor->nImages; i++, pImage++) { + info.id = pImage->id; + info.type = pImage->type; + info.byte_order = pImage->byte_order; + memcpy(&info.guid, pImage->guid, 16); + info.bpp = pImage->bits_per_pixel; + info.num_planes = pImage->num_planes; + info.depth = pImage->depth; + info.red_mask = pImage->red_mask; + info.green_mask = pImage->green_mask; + info.blue_mask = pImage->blue_mask; + info.format = pImage->format; + info.y_sample_bits = pImage->y_sample_bits; + info.u_sample_bits = pImage->u_sample_bits; + info.v_sample_bits = pImage->v_sample_bits; + info.horz_y_period = pImage->horz_y_period; + info.horz_u_period = pImage->horz_u_period; + info.horz_v_period = pImage->horz_v_period; + info.vert_y_period = pImage->vert_y_period; + info.vert_u_period = pImage->vert_u_period; + info.vert_v_period = pImage->vert_v_period; + memcpy(&info.comp_order, pImage->component_order, 32); + info.scanline_order = pImage->scanline_order; + _WriteImageFormatInfo(client, &info); + } + + return Success; +} + +static int (*XvProcVector[xvNumRequests]) (ClientPtr) = { +ProcXvQueryExtension, + ProcXvQueryAdaptors, + ProcXvQueryEncodings, + ProcXvGrabPort, + ProcXvUngrabPort, + ProcXvPutVideo, + ProcXvPutStill, + ProcXvGetVideo, + ProcXvGetStill, + ProcXvStopVideo, + ProcXvSelectVideoNotify, + ProcXvSelectPortNotify, + ProcXvQueryBestSize, + ProcXvSetPortAttribute, + ProcXvGetPortAttribute, + ProcXvQueryPortAttributes, + ProcXvListImageFormats, + ProcXvQueryImageAttributes, ProcXvPutImage, ProcXvShmPutImage,}; + +int +ProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); + + UpdateCurrentTime(); + + if (stuff->data >= xvNumRequests) { + SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); + return BadRequest; + } + + return XvProcVector[stuff->data] (client); +} + +/* Swapped Procs */ + +static int +SProcXvQueryExtension(ClientPtr client) +{ + REQUEST(xvQueryExtensionReq); + swaps(&stuff->length); + return XvProcVector[xv_QueryExtension] (client); +} + +static int +SProcXvQueryAdaptors(ClientPtr client) +{ + REQUEST(xvQueryAdaptorsReq); + swaps(&stuff->length); + swapl(&stuff->window); + return XvProcVector[xv_QueryAdaptors] (client); +} + +static int +SProcXvQueryEncodings(ClientPtr client) +{ + REQUEST(xvQueryEncodingsReq); + swaps(&stuff->length); + swapl(&stuff->port); + return XvProcVector[xv_QueryEncodings] (client); +} + +static int +SProcXvGrabPort(ClientPtr client) +{ + REQUEST(xvGrabPortReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); + return XvProcVector[xv_GrabPort] (client); +} + +static int +SProcXvUngrabPort(ClientPtr client) +{ + REQUEST(xvUngrabPortReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); + return XvProcVector[xv_UngrabPort] (client); +} + +static int +SProcXvPutVideo(ClientPtr client) +{ + REQUEST(xvPutVideoReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + return XvProcVector[xv_PutVideo] (client); +} + +static int +SProcXvPutStill(ClientPtr client) +{ + REQUEST(xvPutStillReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + return XvProcVector[xv_PutStill] (client); +} + +static int +SProcXvGetVideo(ClientPtr client) +{ + REQUEST(xvGetVideoReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + return XvProcVector[xv_GetVideo] (client); +} + +static int +SProcXvGetStill(ClientPtr client) +{ + REQUEST(xvGetStillReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + return XvProcVector[xv_GetStill] (client); +} + +static int +SProcXvPutImage(ClientPtr client) +{ + REQUEST(xvPutImageReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->id); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); + return XvProcVector[xv_PutImage] (client); +} + +#ifdef MITSHM +static int +SProcXvShmPutImage(ClientPtr client) +{ + REQUEST(xvShmPutImageReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->shmseg); + swapl(&stuff->id); + swapl(&stuff->offset); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); + return XvProcVector[xv_ShmPutImage] (client); +} +#else /* MITSHM */ +#define SProcXvShmPutImage ProcXvShmPutImage +#endif + +static int +SProcXvSelectVideoNotify(ClientPtr client) +{ + REQUEST(xvSelectVideoNotifyReq); + swaps(&stuff->length); + swapl(&stuff->drawable); + return XvProcVector[xv_SelectVideoNotify] (client); +} + +static int +SProcXvSelectPortNotify(ClientPtr client) +{ + REQUEST(xvSelectPortNotifyReq); + swaps(&stuff->length); + swapl(&stuff->port); + return XvProcVector[xv_SelectPortNotify] (client); +} + +static int +SProcXvStopVideo(ClientPtr client) +{ + REQUEST(xvStopVideoReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + return XvProcVector[xv_StopVideo] (client); +} + +static int +SProcXvSetPortAttribute(ClientPtr client) +{ + REQUEST(xvSetPortAttributeReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); + swapl(&stuff->value); + return XvProcVector[xv_SetPortAttribute] (client); +} + +static int +SProcXvGetPortAttribute(ClientPtr client) +{ + REQUEST(xvGetPortAttributeReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); + return XvProcVector[xv_GetPortAttribute] (client); +} + +static int +SProcXvQueryBestSize(ClientPtr client) +{ + REQUEST(xvQueryBestSizeReq); + swaps(&stuff->length); + swapl(&stuff->port); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + return XvProcVector[xv_QueryBestSize] (client); +} + +static int +SProcXvQueryPortAttributes(ClientPtr client) +{ + REQUEST(xvQueryPortAttributesReq); + swaps(&stuff->length); + swapl(&stuff->port); + return XvProcVector[xv_QueryPortAttributes] (client); +} + +static int +SProcXvQueryImageAttributes(ClientPtr client) +{ + REQUEST(xvQueryImageAttributesReq); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->id); + swaps(&stuff->width); + swaps(&stuff->height); + return XvProcVector[xv_QueryImageAttributes] (client); +} + +static int +SProcXvListImageFormats(ClientPtr client) +{ + REQUEST(xvListImageFormatsReq); + swaps(&stuff->length); + swapl(&stuff->port); + return XvProcVector[xv_ListImageFormats] (client); +} + +static int (*SXvProcVector[xvNumRequests]) (ClientPtr) = { +SProcXvQueryExtension, + SProcXvQueryAdaptors, + SProcXvQueryEncodings, + SProcXvGrabPort, + SProcXvUngrabPort, + SProcXvPutVideo, + SProcXvPutStill, + SProcXvGetVideo, + SProcXvGetStill, + SProcXvStopVideo, + SProcXvSelectVideoNotify, + SProcXvSelectPortNotify, + SProcXvQueryBestSize, + SProcXvSetPortAttribute, + SProcXvGetPortAttribute, + SProcXvQueryPortAttributes, + SProcXvListImageFormats, + SProcXvQueryImageAttributes, SProcXvPutImage, SProcXvShmPutImage,}; + +int +SProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); + + UpdateCurrentTime(); + + if (stuff->data >= xvNumRequests) { + SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); + return BadRequest; + } + + return SXvProcVector[stuff->data] (client); +} + +#ifdef PANORAMIX +static int +XineramaXvStopVideo(ClientPtr client) +{ + int result, i; + PanoramiXRes *draw, *port; + + REQUEST(xvStopVideoReq); + REQUEST_SIZE_MATCH(xvStopVideoReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + result = dixLookupResourceByType((pointer *) &port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(i) { + if (port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + result = ProcXvStopVideo(client); + } + } + + return result; +} + +static int +XineramaXvSetPortAttribute(ClientPtr client) +{ + REQUEST(xvSetPortAttributeReq); + PanoramiXRes *port; + int result, i; + + REQUEST_SIZE_MATCH(xvSetPortAttributeReq); + + result = dixLookupResourceByType((pointer *) &port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return result; + + FOR_NSCREENS_BACKWARD(i) { + if (port->info[i].id) { + stuff->port = port->info[i].id; + result = ProcXvSetPortAttribute(client); + } + } + return result; +} + +#ifdef MITSHM +static int +XineramaXvShmPutImage(ClientPtr client) +{ + REQUEST(xvShmPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool send_event = stuff->send_event; + Bool isRoot; + int result, i, x, y; + + REQUEST_SIZE_MATCH(xvShmPutImageReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return result; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if (port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if (isRoot) { + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; + } + stuff->send_event = (send_event && !i) ? 1 : 0; + + result = ProcXvShmPutImage(client); + } + } + return result; +} +#else +#define XineramaXvShmPutImage ProcXvShmPutImage +#endif + +static int +XineramaXvPutImage(ClientPtr client) +{ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result, i, x, y; + + REQUEST_AT_LEAST_SIZE(xvPutImageReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return result; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if (port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if (isRoot) { + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; + } + + result = ProcXvPutImage(client); + } + } + return result; +} + +static int +XineramaXvPutVideo(ClientPtr client) +{ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result, i, x, y; + + REQUEST_AT_LEAST_SIZE(xvPutVideoReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return result; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if (port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if (isRoot) { + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; + } + + result = ProcXvPutVideo(client); + } + } + return result; +} + +static int +XineramaXvPutStill(ClientPtr client) +{ + REQUEST(xvPutImageReq); + PanoramiXRes *draw, *gc, *port; + Bool isRoot; + int result, i, x, y; + + REQUEST_AT_LEAST_SIZE(xvPutImageReq); + + result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable, + XRC_DRAWABLE, client, DixWriteAccess); + if (result != Success) + return (result == BadValue) ? BadDrawable : result; + + result = dixLookupResourceByType((pointer *) &gc, stuff->gc, + XRT_GC, client, DixReadAccess); + if (result != Success) + return result; + + result = dixLookupResourceByType((pointer *) &port, stuff->port, + XvXRTPort, client, DixReadAccess); + if (result != Success) + return result; + + isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; + + x = stuff->drw_x; + y = stuff->drw_y; + + FOR_NSCREENS_BACKWARD(i) { + if (port->info[i].id) { + stuff->drawable = draw->info[i].id; + stuff->port = port->info[i].id; + stuff->gc = gc->info[i].id; + stuff->drw_x = x; + stuff->drw_y = y; + if (isRoot) { + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; + } + + result = ProcXvPutStill(client); + } + } + return result; +} + +static Bool +isImageAdaptor(XvAdaptorPtr pAdapt) +{ + return (pAdapt->type & XvImageMask) && (pAdapt->nImages > 0); +} + +static Bool +hasOverlay(XvAdaptorPtr pAdapt) +{ + int i; + + for (i = 0; i < pAdapt->nAttributes; i++) + if (!strcmp(pAdapt->pAttributes[i].name, "XV_COLORKEY")) + return TRUE; + return FALSE; +} + +static XvAdaptorPtr +matchAdaptor(ScreenPtr pScreen, XvAdaptorPtr refAdapt, Bool isOverlay) +{ + int i; + XvScreenPtr xvsp = + dixLookupPrivate(&pScreen->devPrivates, XvGetScreenKey()); + /* Do not try to go on if xv is not supported on this screen */ + if (xvsp == NULL) + return NULL; + + /* if the adaptor has the same name it's a perfect match */ + for (i = 0; i < xvsp->nAdaptors; i++) { + XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; + + if (!strcmp(refAdapt->name, pAdapt->name)) + return pAdapt; + } + + /* otherwise we only look for XvImage adaptors */ + if (!isImageAdaptor(refAdapt)) + return NULL; + + /* prefer overlay/overlay non-overlay/non-overlay pairing */ + for (i = 0; i < xvsp->nAdaptors; i++) { + XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; + + if (isImageAdaptor(pAdapt) && isOverlay == hasOverlay(pAdapt)) + return pAdapt; + } + + /* but we'll take any XvImage pairing if we can get it */ + for (i = 0; i < xvsp->nAdaptors; i++) { + XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; + + if (isImageAdaptor(pAdapt)) + return pAdapt; + } + return NULL; +} + +void +XineramifyXv(void) +{ + XvScreenPtr xvsp0 = + dixLookupPrivate(&screenInfo.screens[0]->devPrivates, XvGetScreenKey()); + XvAdaptorPtr MatchingAdaptors[MAXSCREENS]; + int i, j, k; + + XvXRTPort = CreateNewResourceType(XineramaDeleteResource, "XvXRTPort"); + + if (!xvsp0 || !XvXRTPort) + return; + SetResourceTypeErrorValue(XvXRTPort, _XvBadPort); + + for (i = 0; i < xvsp0->nAdaptors; i++) { + Bool isOverlay; + XvAdaptorPtr refAdapt = xvsp0->pAdaptors + i; + + if (!(refAdapt->type & XvInputMask)) + continue; + + MatchingAdaptors[0] = refAdapt; + isOverlay = hasOverlay(refAdapt); + FOR_NSCREENS_FORWARD_SKIP(j) + MatchingAdaptors[j] = + matchAdaptor(screenInfo.screens[j], refAdapt, isOverlay); + + /* now create a resource for each port */ + for (j = 0; j < refAdapt->nPorts; j++) { + PanoramiXRes *port = malloc(sizeof(PanoramiXRes)); + + if (!port) + break; + + FOR_NSCREENS(k) { + if (MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) + port->info[k].id = MatchingAdaptors[k]->base_id + j; + else + port->info[k].id = 0; + } + AddResource(port->info[0].id, XvXRTPort, port); + } + } + + /* munge the dispatch vector */ + XvProcVector[xv_PutVideo] = XineramaXvPutVideo; + XvProcVector[xv_PutStill] = XineramaXvPutStill; + XvProcVector[xv_StopVideo] = XineramaXvStopVideo; + XvProcVector[xv_SetPortAttribute] = XineramaXvSetPortAttribute; + XvProcVector[xv_PutImage] = XineramaXvPutImage; + XvProcVector[xv_ShmPutImage] = XineramaXvShmPutImage; +} +#endif /* PANORAMIX */ + +void +XvResetProcVector(void) +{ +#ifdef PANORAMIX + XvProcVector[xv_PutVideo] = ProcXvPutVideo; + XvProcVector[xv_PutStill] = ProcXvPutStill; + XvProcVector[xv_StopVideo] = ProcXvStopVideo; + XvProcVector[xv_SetPortAttribute] = ProcXvSetPortAttribute; + XvProcVector[xv_PutImage] = ProcXvPutImage; + XvProcVector[xv_ShmPutImage] = ProcXvShmPutImage; +#endif +} diff --git a/Xext/xvdisp.h b/Xext/xvdisp.h new file mode 100644 index 0000000..298d395 --- /dev/null +++ b/Xext/xvdisp.h @@ -0,0 +1,2 @@ +extern void XineramifyXv(void); +extern void XvResetProcVector(void); diff --git a/Xext/xvdix.h b/Xext/xvdix.h new file mode 100644 index 0000000..9c6160c --- /dev/null +++ b/Xext/xvdix.h @@ -0,0 +1,267 @@ +/*********************************************************** +Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifndef XVDIX_H +#define XVDIX_H +/* +** File: +** +** xvdix.h --- Xv device independent header file +** +** Author: +** +** David Carver (Digital Workstation Engineering/Project Athena) +** +** Revisions: +** +** 29.08.91 Carver +** - removed UnrealizeWindow wrapper unrealizing windows no longer +** preempts video +** +** 11.06.91 Carver +** - changed SetPortControl to SetPortAttribute +** - changed GetPortControl to GetPortAttribute +** - changed QueryBestSize +** +** 15.05.91 Carver +** - version 2.0 upgrade +** +** 24.01.91 Carver +** - version 1.4 upgrade +** +*/ + +#include "scrnintstr.h" +#include <X11/extensions/Xvproto.h> + +extern _X_EXPORT unsigned long XvExtensionGeneration; +extern _X_EXPORT unsigned long XvScreenGeneration; +extern _X_EXPORT unsigned long XvResourceGeneration; + +extern _X_EXPORT int XvReqCode; +extern _X_EXPORT int XvEventBase; +extern _X_EXPORT int XvErrorBase; + +extern _X_EXPORT RESTYPE XvRTPort; +extern _X_EXPORT RESTYPE XvRTEncoding; +extern _X_EXPORT RESTYPE XvRTGrab; +extern _X_EXPORT RESTYPE XvRTVideoNotify; +extern _X_EXPORT RESTYPE XvRTVideoNotifyList; +extern _X_EXPORT RESTYPE XvRTPortNotify; + +typedef struct { + int numerator; + int denominator; +} XvRationalRec, *XvRationalPtr; + +typedef struct { + char depth; + unsigned long visual; +} XvFormatRec, *XvFormatPtr; + +typedef struct { + unsigned long id; + ClientPtr client; +} XvGrabRec, *XvGrabPtr; + +typedef struct _XvVideoNotifyRec { + struct _XvVideoNotifyRec *next; + ClientPtr client; + unsigned long id; + unsigned long mask; +} XvVideoNotifyRec, *XvVideoNotifyPtr; + +typedef struct _XvPortNotifyRec { + struct _XvPortNotifyRec *next; + ClientPtr client; + unsigned long id; +} XvPortNotifyRec, *XvPortNotifyPtr; + +typedef struct { + int id; + ScreenPtr pScreen; + char *name; + unsigned short width, height; + XvRationalRec rate; +} XvEncodingRec, *XvEncodingPtr; + +typedef struct _XvAttributeRec { + int flags; + int min_value; + int max_value; + char *name; +} XvAttributeRec, *XvAttributePtr; + +typedef struct { + int id; + int type; + int byte_order; + char guid[16]; + int bits_per_pixel; + int format; + int num_planes; + + /* for RGB formats only */ + int depth; + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; + + /* for YUV formats only */ + unsigned int y_sample_bits; + unsigned int u_sample_bits; + unsigned int v_sample_bits; + unsigned int horz_y_period; + unsigned int horz_u_period; + unsigned int horz_v_period; + unsigned int vert_y_period; + unsigned int vert_u_period; + unsigned int vert_v_period; + char component_order[32]; + int scanline_order; +} XvImageRec, *XvImagePtr; + +typedef struct { + unsigned long base_id; + unsigned char type; + char *name; + int nEncodings; + XvEncodingPtr pEncodings; + int nFormats; + XvFormatPtr pFormats; + int nAttributes; + XvAttributePtr pAttributes; + int nImages; + XvImagePtr pImages; + int nPorts; + struct _XvPortRec *pPorts; + ScreenPtr pScreen; + int (*ddAllocatePort) (unsigned long, struct _XvPortRec *, + struct _XvPortRec **); + int (*ddFreePort) (struct _XvPortRec *); + int (*ddPutVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (*ddPutStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (*ddGetVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (*ddGetStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); + int (*ddStopVideo) (ClientPtr, struct _XvPortRec *, DrawablePtr); + int (*ddSetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32); + int (*ddGetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32 *); + int (*ddQueryBestSize) (ClientPtr, struct _XvPortRec *, CARD8, + CARD16, CARD16, CARD16, CARD16, + unsigned int *, unsigned int *); + int (*ddPutImage) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16, + XvImagePtr, unsigned char *, Bool, CARD16, CARD16); + int (*ddQueryImageAttributes) (ClientPtr, struct _XvPortRec *, XvImagePtr, + CARD16 *, CARD16 *, int *, int *); + DevUnion devPriv; +} XvAdaptorRec, *XvAdaptorPtr; + +typedef struct _XvPortRec { + unsigned long id; + XvAdaptorPtr pAdaptor; + XvPortNotifyPtr pNotify; + DrawablePtr pDraw; + ClientPtr client; + XvGrabRec grab; + TimeStamp time; + DevUnion devPriv; +} XvPortRec, *XvPortPtr; + +#define VALIDATE_XV_PORT(portID, pPort, mode)\ + {\ + int rc = dixLookupResourceByType((pointer *)&(pPort), portID,\ + XvRTPort, client, mode);\ + if (rc != Success)\ + return rc;\ + } + +typedef struct { + int version, revision; + int nAdaptors; + XvAdaptorPtr pAdaptors; + DestroyWindowProcPtr DestroyWindow; + DestroyPixmapProcPtr DestroyPixmap; + CloseScreenProcPtr CloseScreen; + Bool (*ddCloseScreen) (ScreenPtr); + int (*ddQueryAdaptors) (ScreenPtr, XvAdaptorPtr *, int *); + DevUnion devPriv; +} XvScreenRec, *XvScreenPtr; + +#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field) + +#define SCREEN_EPILOGUE(pScreen, field, wrapper)\ + ((pScreen)->field = wrapper) + +/* Errors */ + +#define _XvBadPort (XvBadPort+XvErrorBase) +#define _XvBadEncoding (XvBadEncoding+XvErrorBase) + +extern _X_EXPORT int ProcXvDispatch(ClientPtr); +extern _X_EXPORT int SProcXvDispatch(ClientPtr); + +extern _X_EXPORT int XvScreenInit(ScreenPtr); +extern _X_EXPORT DevPrivateKey XvGetScreenKey(void); +extern _X_EXPORT unsigned long XvGetRTPort(void); +extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32); +extern _X_EXPORT int XvdiVideoStopped(XvPortPtr, int); + +extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern _X_EXPORT int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern _X_EXPORT int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern _X_EXPORT int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16); +extern _X_EXPORT int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, + INT16, INT16, CARD16, CARD16, + INT16, INT16, CARD16, CARD16, + XvImagePtr, unsigned char *, Bool, + CARD16, CARD16); +extern _X_EXPORT int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL); +extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL); +extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); +extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *); +extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr); +extern _X_EXPORT int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr); +extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr); +extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *); +extern _X_EXPORT int XvdiUngrabPort(ClientPtr, XvPortPtr, Time); +#endif /* XVDIX_H */ diff --git a/Xext/xvmain.c b/Xext/xvmain.c new file mode 100644 index 0000000..0c5dc9b --- /dev/null +++ b/Xext/xvmain.c @@ -0,0 +1,1093 @@ +/*********************************************************** +Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* +** File: +** +** xvmain.c --- Xv server extension main device independent module. +** +** Author: +** +** David Carver (Digital Workstation Engineering/Project Athena) +** +** Revisions: +** +** 04.09.91 Carver +** - change: stop video always generates an event even when video +** wasn't active +** +** 29.08.91 Carver +** - change: unrealizing windows no longer preempts video +** +** 11.06.91 Carver +** - changed SetPortControl to SetPortAttribute +** - changed GetPortControl to GetPortAttribute +** - changed QueryBestSize +** +** 28.05.91 Carver +** - fixed Put and Get requests to not preempt operations to same drawable +** +** 15.05.91 Carver +** - version 2.0 upgrade +** +** 19.03.91 Carver +** - fixed Put and Get requests to honor grabbed ports. +** - fixed Video requests to update di structure with new drawable, and +** client after calling ddx. +** +** 24.01.91 Carver +** - version 1.4 upgrade +** +** Notes: +** +** Port structures reference client structures in a two different +** ways: when grabs, or video is active. Each reference is encoded +** as fake client resources and thus when the client is goes away so +** does the reference (it is zeroed). No other action is taken, so +** video doesn't necessarily stop. It probably will as a result of +** other resources going away, but if a client starts video using +** none of its own resources, then the video will continue to play +** after the client disappears. +** +** +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <string.h> + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "gc.h" +#include "extnsionst.h" +#include "extinit.h" +#include "dixstruct.h" +#include "resource.h" +#include "opaque.h" +#include "input.h" + +#define GLOBAL + +#include <X11/extensions/Xv.h> +#include <X11/extensions/Xvproto.h> +#include "xvdix.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "xvdisp.h" + +static DevPrivateKeyRec XvScreenKeyRec; + +#define XvScreenKey (&XvScreenKeyRec) +unsigned long XvExtensionGeneration = 0; +unsigned long XvScreenGeneration = 0; +unsigned long XvResourceGeneration = 0; + +int XvReqCode; +int XvEventBase; +int XvErrorBase; + +RESTYPE XvRTPort; +RESTYPE XvRTEncoding; +RESTYPE XvRTGrab; +RESTYPE XvRTVideoNotify; +RESTYPE XvRTVideoNotifyList; +RESTYPE XvRTPortNotify; + +/* EXTERNAL */ + +static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *); +static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *); +static Bool CreateResourceTypes(void); + +static Bool XvCloseScreen(ScreenPtr); +static Bool XvDestroyPixmap(PixmapPtr); +static Bool XvDestroyWindow(WindowPtr); +static void XvResetProc(ExtensionEntry *); +static int XvdiDestroyGrab(pointer, XID); +static int XvdiDestroyEncoding(pointer, XID); +static int XvdiDestroyVideoNotify(pointer, XID); +static int XvdiDestroyPortNotify(pointer, XID); +static int XvdiDestroyVideoNotifyList(pointer, XID); +static int XvdiDestroyPort(pointer, XID); +static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int); + +/* +** XvExtensionInit +** +** +*/ + +void +XvExtensionInit(void) +{ + ExtensionEntry *extEntry; + + if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0)) + return; + + /* Look to see if any screens were initialized; if not then + init global variables so the extension can function */ + if (XvScreenGeneration != serverGeneration) { + if (!CreateResourceTypes()) { + ErrorF("XvExtensionInit: Unable to allocate resource types\n"); + return; + } +#ifdef PANORAMIX + XineramaRegisterConnectionBlockCallback(XineramifyXv); +#endif + XvScreenGeneration = serverGeneration; + } + + if (XvExtensionGeneration != serverGeneration) { + XvExtensionGeneration = serverGeneration; + + extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors, + ProcXvDispatch, SProcXvDispatch, + XvResetProc, StandardMinorOpcode); + if (!extEntry) { + FatalError("XvExtensionInit: AddExtensions failed\n"); + } + + XvReqCode = extEntry->base; + XvEventBase = extEntry->eventBase; + XvErrorBase = extEntry->errorBase; + + EventSwapVector[XvEventBase + XvVideoNotify] = + (EventSwapPtr) WriteSwappedVideoNotifyEvent; + EventSwapVector[XvEventBase + XvPortNotify] = + (EventSwapPtr) WriteSwappedPortNotifyEvent; + + SetResourceTypeErrorValue(XvRTPort, _XvBadPort); + (void) MakeAtom(XvName, strlen(XvName), xTrue); + + } +} + +static Bool +CreateResourceTypes(void) +{ + + if (XvResourceGeneration == serverGeneration) + return TRUE; + + XvResourceGeneration = serverGeneration; + + if (!(XvRTPort = CreateNewResourceType(XvdiDestroyPort, "XvRTPort"))) { + ErrorF("CreateResourceTypes: failed to allocate port resource.\n"); + return FALSE; + } + + if (!(XvRTGrab = CreateNewResourceType(XvdiDestroyGrab, "XvRTGrab"))) { + ErrorF("CreateResourceTypes: failed to allocate grab resource.\n"); + return FALSE; + } + + if (!(XvRTEncoding = CreateNewResourceType(XvdiDestroyEncoding, + "XvRTEncoding"))) { + ErrorF("CreateResourceTypes: failed to allocate encoding resource.\n"); + return FALSE; + } + + if (!(XvRTVideoNotify = CreateNewResourceType(XvdiDestroyVideoNotify, + "XvRTVideoNotify"))) { + ErrorF + ("CreateResourceTypes: failed to allocate video notify resource.\n"); + return FALSE; + } + + if (! + (XvRTVideoNotifyList = + CreateNewResourceType(XvdiDestroyVideoNotifyList, + "XvRTVideoNotifyList"))) { + ErrorF + ("CreateResourceTypes: failed to allocate video notify list resource.\n"); + return FALSE; + } + + if (!(XvRTPortNotify = CreateNewResourceType(XvdiDestroyPortNotify, + "XvRTPortNotify"))) { + ErrorF + ("CreateResourceTypes: failed to allocate port notify resource.\n"); + return FALSE; + } + + return TRUE; + +} + +int +XvScreenInit(ScreenPtr pScreen) +{ + XvScreenPtr pxvs; + + if (XvScreenGeneration != serverGeneration) { + if (!CreateResourceTypes()) { + ErrorF("XvScreenInit: Unable to allocate resource types\n"); + return BadAlloc; + } +#ifdef PANORAMIX + XineramaRegisterConnectionBlockCallback(XineramifyXv); +#endif + XvScreenGeneration = serverGeneration; + } + + if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0)) + return BadAlloc; + + if (dixLookupPrivate(&pScreen->devPrivates, XvScreenKey)) { + ErrorF("XvScreenInit: screen devPrivates ptr non-NULL before init\n"); + } + + /* ALLOCATE SCREEN PRIVATE RECORD */ + + pxvs = malloc(sizeof(XvScreenRec)); + if (!pxvs) { + ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); + return BadAlloc; + } + + dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs); + + pxvs->DestroyPixmap = pScreen->DestroyPixmap; + pxvs->DestroyWindow = pScreen->DestroyWindow; + pxvs->CloseScreen = pScreen->CloseScreen; + + pScreen->DestroyPixmap = XvDestroyPixmap; + pScreen->DestroyWindow = XvDestroyWindow; + pScreen->CloseScreen = XvCloseScreen; + + return Success; +} + +static Bool +XvCloseScreen(ScreenPtr pScreen) +{ + + XvScreenPtr pxvs; + + pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); + + pScreen->DestroyPixmap = pxvs->DestroyPixmap; + pScreen->DestroyWindow = pxvs->DestroyWindow; + pScreen->CloseScreen = pxvs->CloseScreen; + + (*pxvs->ddCloseScreen) (pScreen); + + free(pxvs); + + dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL); + + return (*pScreen->CloseScreen) (pScreen); +} + +static void +XvResetProc(ExtensionEntry * extEntry) +{ + XvResetProcVector(); +} + +DevPrivateKey +XvGetScreenKey(void) +{ + return XvScreenKey; +} + +unsigned long +XvGetRTPort(void) +{ + return XvRTPort; +} + +static Bool +XvDestroyPixmap(PixmapPtr pPix) +{ + Bool status; + ScreenPtr pScreen; + XvScreenPtr pxvs; + XvAdaptorPtr pa; + int na; + XvPortPtr pp; + int np; + + pScreen = pPix->drawable.pScreen; + + SCREEN_PROLOGUE(pScreen, DestroyPixmap); + + pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); + + /* CHECK TO SEE IF THIS PORT IS IN USE */ + + pa = pxvs->pAdaptors; + na = pxvs->nAdaptors; + while (na--) { + np = pa->nPorts; + pp = pa->pPorts; + + while (np--) { + if (pp->pDraw == (DrawablePtr) pPix) { + XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); + + (void) (*pp->pAdaptor->ddStopVideo) (NULL, pp, pp->pDraw); + + pp->pDraw = NULL; + pp->client = NULL; + pp->time = currentTime; + } + pp++; + } + pa++; + } + + status = (*pScreen->DestroyPixmap) (pPix); + + SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap); + + return status; + +} + +static Bool +XvDestroyWindow(WindowPtr pWin) +{ + Bool status; + ScreenPtr pScreen; + XvScreenPtr pxvs; + XvAdaptorPtr pa; + int na; + XvPortPtr pp; + int np; + + pScreen = pWin->drawable.pScreen; + + SCREEN_PROLOGUE(pScreen, DestroyWindow); + + pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); + + /* CHECK TO SEE IF THIS PORT IS IN USE */ + + pa = pxvs->pAdaptors; + na = pxvs->nAdaptors; + while (na--) { + np = pa->nPorts; + pp = pa->pPorts; + + while (np--) { + if (pp->pDraw == (DrawablePtr) pWin) { + XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted); + + (void) (*pp->pAdaptor->ddStopVideo) (NULL, pp, pp->pDraw); + + pp->pDraw = NULL; + pp->client = NULL; + pp->time = currentTime; + } + pp++; + } + pa++; + } + + status = (*pScreen->DestroyWindow) (pWin); + + SCREEN_EPILOGUE(pScreen, DestroyWindow, XvDestroyWindow); + + return status; + +} + +/* The XvdiVideoStopped procedure is a hook for the device dependent layer. + It provides a way for the dd layer to inform the di layer that video has + stopped in a port for reasons that the di layer had no control over; note + that it doesn't call back into the dd layer */ + +int +XvdiVideoStopped(XvPortPtr pPort, int reason) +{ + + /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ + + if (!pPort->pDraw) + return Success; + + XvdiSendVideoNotify(pPort, pPort->pDraw, reason); + + pPort->pDraw = NULL; + pPort->client = NULL; + pPort->time = currentTime; + + return Success; + +} + +static int +XvdiDestroyPort(pointer pPort, XID id) +{ + return (*((XvPortPtr) pPort)->pAdaptor->ddFreePort) (pPort); +} + +static int +XvdiDestroyGrab(pointer pGrab, XID id) +{ + ((XvGrabPtr) pGrab)->client = NULL; + return Success; +} + +static int +XvdiDestroyVideoNotify(pointer pn, XID id) +{ + /* JUST CLEAR OUT THE client POINTER FIELD */ + + ((XvVideoNotifyPtr) pn)->client = NULL; + return Success; +} + +static int +XvdiDestroyPortNotify(pointer pn, XID id) +{ + /* JUST CLEAR OUT THE client POINTER FIELD */ + + ((XvPortNotifyPtr) pn)->client = NULL; + return Success; +} + +static int +XvdiDestroyVideoNotifyList(pointer pn, XID id) +{ + XvVideoNotifyPtr npn, cpn; + + /* ACTUALLY DESTROY THE NOTITY LIST */ + + cpn = (XvVideoNotifyPtr) pn; + + while (cpn) { + npn = cpn->next; + if (cpn->client) + FreeResource(cpn->id, XvRTVideoNotify); + free(cpn); + cpn = npn; + } + return Success; +} + +static int +XvdiDestroyEncoding(pointer value, XID id) +{ + return Success; +} + +static int +XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason) +{ + XvVideoNotifyPtr pn; + + dixLookupResourceByType((pointer *) &pn, pDraw->id, XvRTVideoNotifyList, + serverClient, DixReadAccess); + + while (pn) { + xvEvent event = { + .u.videoNotify.reason = reason, + .u.videoNotify.time = currentTime.milliseconds, + .u.videoNotify.drawable = pDraw->id, + .u.videoNotify.port = pPort->id + }; + event.u.u.type = XvEventBase + XvVideoNotify; + WriteEventsToClient(pn->client, 1, (xEventPtr) &event); + pn = pn->next; + } + + return Success; + +} + +int +XvdiSendPortNotify(XvPortPtr pPort, Atom attribute, INT32 value) +{ + XvPortNotifyPtr pn; + + pn = pPort->pNotify; + + while (pn) { + xvEvent event = { + .u.portNotify.time = currentTime.milliseconds, + .u.portNotify.port = pPort->id, + .u.portNotify.attribute = attribute, + .u.portNotify.value = value + }; + event.u.u.type = XvEventBase + XvPortNotify; + WriteEventsToClient(pn->client, 1, (xEventPtr) &event); + pn = pn->next; + } + + return Success; + +} + +#define CHECK_SIZE(dw, dh, sw, sh) { \ + if(!dw || !dh || !sw || !sh) return Success; \ + /* The region code will break these if they are too large */ \ + if((dw > 32767) || (dh > 32767) || (sw > 32767) || (sh > 32767)) \ + return BadValue; \ +} + +int +XvdiPutVideo(ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) +{ + DrawablePtr pOldDraw; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED + EVENTS TO ANY CLIENTS WHO WANT THEM */ + + pOldDraw = pPort->pDraw; + if ((pOldDraw) && (pOldDraw != pDraw)) { + XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); + } + + (void) (*pPort->pAdaptor->ddPutVideo) (client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + if ((pPort->pDraw) && (pOldDraw != pDraw)) { + pPort->client = client; + XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted); + } + + pPort->time = currentTime; + + return Success; + +} + +int +XvdiPutStill(ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) +{ + int status; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + pPort->time = currentTime; + + status = (*pPort->pAdaptor->ddPutStill) (client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + return status; + +} + +int +XvdiPutImage(ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 src_x, INT16 src_y, + CARD16 src_w, CARD16 src_h, + INT16 drw_x, INT16 drw_y, + CARD16 drw_w, CARD16 drw_h, + XvImagePtr image, + unsigned char *data, Bool sync, CARD16 width, CARD16 height) +{ + CHECK_SIZE(drw_w, drw_h, src_w, src_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + pPort->time = currentTime; + + return (*pPort->pAdaptor->ddPutImage) (client, pDraw, pPort, pGC, + src_x, src_y, src_w, src_h, + drw_x, drw_y, drw_w, drw_h, + image, data, sync, width, height); +} + +int +XvdiGetVideo(ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) +{ + DrawablePtr pOldDraw; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED + EVENTS TO ANY CLIENTS WHO WANT THEM */ + + pOldDraw = pPort->pDraw; + if ((pOldDraw) && (pOldDraw != pDraw)) { + XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); + } + + (void) (*pPort->pAdaptor->ddGetVideo) (client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + if ((pPort->pDraw) && (pOldDraw != pDraw)) { + pPort->client = client; + XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted); + } + + pPort->time = currentTime; + + return Success; + +} + +int +XvdiGetStill(ClientPtr client, + DrawablePtr pDraw, + XvPortPtr pPort, + GCPtr pGC, + INT16 vid_x, INT16 vid_y, + CARD16 vid_w, CARD16 vid_h, + INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) +{ + int status; + + CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); + + /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ + + UpdateCurrentTime(); + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if (pPort->grab.client && (pPort->grab.client != client)) { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + status = (*pPort->pAdaptor->ddGetStill) (client, pDraw, pPort, pGC, + vid_x, vid_y, vid_w, vid_h, + drw_x, drw_y, drw_w, drw_h); + + pPort->time = currentTime; + + return status; + +} + +int +XvdiGrabPort(ClientPtr client, XvPortPtr pPort, Time ctime, int *p_result) +{ + unsigned long id; + TimeStamp time; + + UpdateCurrentTime(); + time = ClientTimeToServerTime(ctime); + + if (pPort->grab.client && (client != pPort->grab.client)) { + *p_result = XvAlreadyGrabbed; + return Success; + } + + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, pPort->time) == EARLIER)) { + *p_result = XvInvalidTime; + return Success; + } + + if (client == pPort->grab.client) { + *p_result = Success; + return Success; + } + + id = FakeClientID(client->index); + + if (!AddResource(id, XvRTGrab, &pPort->grab)) { + return BadAlloc; + } + + /* IF THERE IS ACTIVE VIDEO THEN STOP IT */ + + if ((pPort->pDraw) && (client != pPort->client)) { + XvdiStopVideo(NULL, pPort, pPort->pDraw); + } + + pPort->grab.client = client; + pPort->grab.id = id; + + pPort->time = currentTime; + + *p_result = Success; + + return Success; + +} + +int +XvdiUngrabPort(ClientPtr client, XvPortPtr pPort, Time ctime) +{ + TimeStamp time; + + UpdateCurrentTime(); + time = ClientTimeToServerTime(ctime); + + if ((!pPort->grab.client) || (client != pPort->grab.client)) { + return Success; + } + + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, pPort->time) == EARLIER)) { + return Success; + } + + /* FREE THE GRAB RESOURCE; AND SET THE GRAB CLIENT TO NULL */ + + FreeResource(pPort->grab.id, XvRTGrab); + pPort->grab.client = NULL; + + pPort->time = currentTime; + + return Success; + +} + +int +XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff) +{ + XvVideoNotifyPtr pn, tpn, fpn; + int rc; + + /* FIND VideoNotify LIST */ + + rc = dixLookupResourceByType((pointer *) &pn, pDraw->id, + XvRTVideoNotifyList, client, DixWriteAccess); + if (rc != Success && rc != BadValue) + return rc; + + /* IF ONE DONES'T EXIST AND NO MASK, THEN JUST RETURN */ + + if (!onoff && !pn) + return Success; + + /* IF ONE DOESN'T EXIST CREATE IT AND ADD A RESOURCE SO THAT THE LIST + WILL BE DELETED WHEN THE DRAWABLE IS DESTROYED */ + + if (!pn) { + if (!(tpn = malloc(sizeof(XvVideoNotifyRec)))) + return BadAlloc; + tpn->next = NULL; + if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) { + free(tpn); + return BadAlloc; + } + } + else { + /* LOOK TO SEE IF ENTRY ALREADY EXISTS */ + + fpn = NULL; + tpn = pn; + while (tpn) { + if (tpn->client == client) { + if (!onoff) + tpn->client = NULL; + return Success; + } + if (!tpn->client) + fpn = tpn; /* TAKE NOTE OF FREE ENTRY */ + tpn = tpn->next; + } + + /* IF TUNNING OFF, THEN JUST RETURN */ + + if (!onoff) + return Success; + + /* IF ONE ISN'T FOUND THEN ALLOCATE ONE AND LINK IT INTO THE LIST */ + + if (fpn) { + tpn = fpn; + } + else { + if (!(tpn = malloc(sizeof(XvVideoNotifyRec)))) + return BadAlloc; + tpn->next = pn->next; + pn->next = tpn; + } + } + + /* INIT CLIENT PTR IN CASE WE CAN'T ADD RESOURCE */ + /* ADD RESOURCE SO THAT IF CLIENT EXITS THE CLIENT PTR WILL BE CLEARED */ + + tpn->client = NULL; + tpn->id = FakeClientID(client->index); + AddResource(tpn->id, XvRTVideoNotify, tpn); + + tpn->client = client; + return Success; + +} + +int +XvdiSelectPortNotify(ClientPtr client, XvPortPtr pPort, BOOL onoff) +{ + XvPortNotifyPtr pn, tpn; + + /* SEE IF CLIENT IS ALREADY IN LIST */ + + tpn = NULL; + pn = pPort->pNotify; + while (pn) { + if (!pn->client) + tpn = pn; /* TAKE NOTE OF FREE ENTRY */ + if (pn->client == client) + break; + pn = pn->next; + } + + /* IS THE CLIENT ALREADY ON THE LIST? */ + + if (pn) { + /* REMOVE IT? */ + + if (!onoff) { + pn->client = NULL; + FreeResource(pn->id, XvRTPortNotify); + } + + return Success; + } + + /* DIDN'T FIND IT; SO REUSE LIST ELEMENT IF ONE IS FREE OTHERWISE + CREATE A NEW ONE AND ADD IT TO THE BEGINNING OF THE LIST */ + + if (!tpn) { + if (!(tpn = malloc(sizeof(XvPortNotifyRec)))) + return BadAlloc; + tpn->next = pPort->pNotify; + pPort->pNotify = tpn; + } + + tpn->client = client; + tpn->id = FakeClientID(client->index); + AddResource(tpn->id, XvRTPortNotify, tpn); + + return Success; + +} + +int +XvdiStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) +{ + int status; + + /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ + + if (!pPort->pDraw || (pPort->pDraw != pDraw)) { + XvdiSendVideoNotify(pPort, pDraw, XvStopped); + return Success; + } + + /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN + INFORM CLIENT OF ITS FAILURE */ + + if ((client) && (pPort->grab.client) && (pPort->grab.client != client)) { + XvdiSendVideoNotify(pPort, pDraw, XvBusy); + return Success; + } + + XvdiSendVideoNotify(pPort, pDraw, XvStopped); + + status = (*pPort->pAdaptor->ddStopVideo) (client, pPort, pDraw); + + pPort->pDraw = NULL; + pPort->client = (ClientPtr) client; + pPort->time = currentTime; + + return status; + +} + +int +XvdiPreemptVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) +{ + int status; + + /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ + + if (!pPort->pDraw || (pPort->pDraw != pDraw)) + return Success; + + XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); + + status = (*pPort->pAdaptor->ddStopVideo) (client, pPort, pPort->pDraw); + + pPort->pDraw = NULL; + pPort->client = (ClientPtr) client; + pPort->time = currentTime; + + return status; + +} + +int +XvdiMatchPort(XvPortPtr pPort, DrawablePtr pDraw) +{ + + XvAdaptorPtr pa; + XvFormatPtr pf; + int nf; + + pa = pPort->pAdaptor; + + if (pa->pScreen != pDraw->pScreen) + return BadMatch; + + nf = pa->nFormats; + pf = pa->pFormats; + + while (nf--) { + if (pf->depth == pDraw->depth) + return Success; + pf++; + } + + return BadMatch; + +} + +int +XvdiSetPortAttribute(ClientPtr client, + XvPortPtr pPort, Atom attribute, INT32 value) +{ + int status; + + status = + (*pPort->pAdaptor->ddSetPortAttribute) (client, pPort, attribute, + value); + if (status == Success) + XvdiSendPortNotify(pPort, attribute, value); + + return status; +} + +int +XvdiGetPortAttribute(ClientPtr client, + XvPortPtr pPort, Atom attribute, INT32 *p_value) +{ + + return + (*pPort->pAdaptor->ddGetPortAttribute) (client, pPort, attribute, + p_value); + +} + +static void +WriteSwappedVideoNotifyEvent(xvEvent * from, xvEvent * to) +{ + + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.videoNotify.sequenceNumber, + to->u.videoNotify.sequenceNumber); + cpswapl(from->u.videoNotify.time, to->u.videoNotify.time); + cpswapl(from->u.videoNotify.drawable, to->u.videoNotify.drawable); + cpswapl(from->u.videoNotify.port, to->u.videoNotify.port); + +} + +static void +WriteSwappedPortNotifyEvent(xvEvent * from, xvEvent * to) +{ + + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.portNotify.sequenceNumber, to->u.portNotify.sequenceNumber); + cpswapl(from->u.portNotify.time, to->u.portNotify.time); + cpswapl(from->u.portNotify.port, to->u.portNotify.port); + cpswapl(from->u.portNotify.value, to->u.portNotify.value); + +} diff --git a/Xext/xvmc.c b/Xext/xvmc.c new file mode 100644 index 0000000..5f0123b --- /dev/null +++ b/Xext/xvmc.c @@ -0,0 +1,814 @@ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <string.h> + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "resource.h" +#include "scrnintstr.h" +#include "extnsionst.h" +#include "extinit.h" +#include "servermd.h" +#include <X11/Xfuncproto.h> +#include "xvdix.h" +#include <X11/extensions/XvMC.h> +#include <X11/extensions/Xvproto.h> +#include <X11/extensions/XvMCproto.h> +#include "xvmcext.h" +#include "protocol-versions.h" + +#ifdef HAS_XVMCSHM +#include <sys/ipc.h> +#include <sys/types.h> +#include <sys/shm.h> +#endif /* HAS_XVMCSHM */ + +#define DR_CLIENT_DRIVER_NAME_SIZE 48 +#define DR_BUSID_SIZE 48 + +static DevPrivateKeyRec XvMCScreenKeyRec; + +#define XvMCScreenKey (&XvMCScreenKeyRec) +static Bool XvMCInUse; + +int XvMCReqCode; +int XvMCEventBase; + +static RESTYPE XvMCRTContext; +static RESTYPE XvMCRTSurface; +static RESTYPE XvMCRTSubpicture; + +int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr) = NULL; + +typedef struct { + int num_adaptors; + XvMCAdaptorPtr adaptors; + CloseScreenProcPtr CloseScreen; + char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE]; + char busID[DR_BUSID_SIZE]; + int major; + int minor; + int patchLevel; +} XvMCScreenRec, *XvMCScreenPtr; + +#define XVMC_GET_PRIVATE(pScreen) \ + (XvMCScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, XvMCScreenKey)) + +static int +XvMCDestroyContextRes(pointer data, XID id) +{ + XvMCContextPtr pContext = (XvMCContextPtr) data; + + pContext->refcnt--; + + if (!pContext->refcnt) { + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + (*pScreenPriv->adaptors[pContext->adapt_num].DestroyContext) (pContext); + free(pContext); + } + + return Success; +} + +static int +XvMCDestroySurfaceRes(pointer data, XID id) +{ + XvMCSurfacePtr pSurface = (XvMCSurfacePtr) data; + XvMCContextPtr pContext = pSurface->context; + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + (*pScreenPriv->adaptors[pContext->adapt_num].DestroySurface) (pSurface); + free(pSurface); + + XvMCDestroyContextRes((pointer) pContext, pContext->context_id); + + return Success; +} + +static int +XvMCDestroySubpictureRes(pointer data, XID id) +{ + XvMCSubpicturePtr pSubpict = (XvMCSubpicturePtr) data; + XvMCContextPtr pContext = pSubpict->context; + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + (*pScreenPriv->adaptors[pContext->adapt_num].DestroySubpicture) (pSubpict); + free(pSubpict); + + XvMCDestroyContextRes((pointer) pContext, pContext->context_id); + + return Success; +} + +static int +ProcXvMCQueryVersion(ClientPtr client) +{ + xvmcQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .major = SERVER_XVMC_MAJOR_VERSION, + .minor = SERVER_XVMC_MINOR_VERSION + }; + + /* REQUEST(xvmcQueryVersionReq); */ + REQUEST_SIZE_MATCH(xvmcQueryVersionReq); + + WriteToClient(client, sizeof(xvmcQueryVersionReply), &rep); + return Success; +} + +static int +ProcXvMCListSurfaceTypes(ClientPtr client) +{ + XvPortPtr pPort; + int i; + XvMCScreenPtr pScreenPriv; + xvmcListSurfaceTypesReply rep; + xvmcSurfaceInfo info; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface; + int num_surfaces; + + REQUEST(xvmcListSurfaceTypesReq); + REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + if (XvMCInUse) { /* any adaptors at all */ + ScreenPtr pScreen = pPort->pAdaptor->pScreen; + + if ((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */ + for (i = 0; i < pScreenPriv->num_adaptors; i++) { + if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + } + } + + num_surfaces = (adaptor) ? adaptor->num_surfaces : 0; + rep = (xvmcListSurfaceTypesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .num = num_surfaces, + .length = bytes_to_int32(num_surfaces * sizeof(xvmcSurfaceInfo)), + }; + + WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), &rep); + + for (i = 0; i < num_surfaces; i++) { + surface = adaptor->surfaces[i]; + info.surface_type_id = surface->surface_type_id; + info.chroma_format = surface->chroma_format; + info.max_width = surface->max_width; + info.max_height = surface->max_height; + info.subpicture_max_width = surface->subpicture_max_width; + info.subpicture_max_height = surface->subpicture_max_height; + info.mc_type = surface->mc_type; + info.flags = surface->flags; + WriteToClient(client, sizeof(xvmcSurfaceInfo), &info); + } + + return Success; +} + +static int +ProcXvMCCreateContext(ClientPtr client) +{ + XvPortPtr pPort; + CARD32 *data = NULL; + int dwords = 0; + int i, result, adapt_num = -1; + ScreenPtr pScreen; + XvMCContextPtr pContext; + XvMCScreenPtr pScreenPriv; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface = NULL; + xvmcCreateContextReply rep; + + REQUEST(xvmcCreateContextReq); + REQUEST_SIZE_MATCH(xvmcCreateContextReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + pScreen = pPort->pAdaptor->pScreen; + + if (!XvMCInUse) /* no XvMC adaptors */ + return BadMatch; + + if (!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */ + return BadMatch; + + for (i = 0; i < pScreenPriv->num_adaptors; i++) { + if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + adapt_num = i; + break; + } + } + + if (adapt_num < 0) /* none this port */ + return BadMatch; + + for (i = 0; i < adaptor->num_surfaces; i++) { + if (adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { + surface = adaptor->surfaces[i]; + break; + } + } + + /* adaptor doesn't support this suface_type_id */ + if (!surface) + return BadMatch; + + if ((stuff->width > surface->max_width) || + (stuff->height > surface->max_height)) + return BadValue; + + if (!(pContext = malloc(sizeof(XvMCContextRec)))) { + return BadAlloc; + } + + pContext->pScreen = pScreen; + pContext->adapt_num = adapt_num; + pContext->context_id = stuff->context_id; + pContext->surface_type_id = stuff->surface_type_id; + pContext->width = stuff->width; + pContext->height = stuff->height; + pContext->flags = stuff->flags; + pContext->refcnt = 1; + + result = (*adaptor->CreateContext) (pPort, pContext, &dwords, &data); + + if (result != Success) { + free(pContext); + return result; + } + + rep = (xvmcCreateContextReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = dwords, + .width_actual = pContext->width, + .height_actual = pContext->height, + .flags_return = pContext->flags + }; + + WriteToClient(client, sizeof(xvmcCreateContextReply), &rep); + if (dwords) + WriteToClient(client, dwords << 2, data); + AddResource(pContext->context_id, XvMCRTContext, pContext); + + free(data); + + return Success; +} + +static int +ProcXvMCDestroyContext(ClientPtr client) +{ + pointer val; + int rc; + + REQUEST(xvmcDestroyContextReq); + REQUEST_SIZE_MATCH(xvmcDestroyContextReq); + + rc = dixLookupResourceByType(&val, stuff->context_id, XvMCRTContext, + client, DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->context_id, RT_NONE); + + return Success; +} + +static int +ProcXvMCCreateSurface(ClientPtr client) +{ + CARD32 *data = NULL; + int dwords = 0; + int result; + XvMCContextPtr pContext; + XvMCSurfacePtr pSurface; + XvMCScreenPtr pScreenPriv; + xvmcCreateSurfaceReply rep; + + REQUEST(xvmcCreateSurfaceReq); + REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq); + + result = dixLookupResourceByType((pointer *) &pContext, stuff->context_id, + XvMCRTContext, client, DixUseAccess); + if (result != Success) + return result; + + pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + if (!(pSurface = malloc(sizeof(XvMCSurfaceRec)))) + return BadAlloc; + + pSurface->surface_id = stuff->surface_id; + pSurface->surface_type_id = pContext->surface_type_id; + pSurface->context = pContext; + + result = + (*pScreenPriv->adaptors[pContext->adapt_num].CreateSurface) (pSurface, + &dwords, + &data); + + if (result != Success) { + free(pSurface); + return result; + } + rep = (xvmcCreateSurfaceReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = dwords + }; + + WriteToClient(client, sizeof(xvmcCreateSurfaceReply), &rep); + if (dwords) + WriteToClient(client, dwords << 2, data); + AddResource(pSurface->surface_id, XvMCRTSurface, pSurface); + + free(data); + + pContext->refcnt++; + + return Success; +} + +static int +ProcXvMCDestroySurface(ClientPtr client) +{ + pointer val; + int rc; + + REQUEST(xvmcDestroySurfaceReq); + REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq); + + rc = dixLookupResourceByType(&val, stuff->surface_id, XvMCRTSurface, + client, DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->surface_id, RT_NONE); + + return Success; +} + +static int +ProcXvMCCreateSubpicture(ClientPtr client) +{ + Bool image_supported = FALSE; + CARD32 *data = NULL; + int i, result, dwords = 0; + XvMCContextPtr pContext; + XvMCSubpicturePtr pSubpicture; + XvMCScreenPtr pScreenPriv; + xvmcCreateSubpictureReply rep; + XvMCAdaptorPtr adaptor; + XvMCSurfaceInfoPtr surface = NULL; + + REQUEST(xvmcCreateSubpictureReq); + REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq); + + result = dixLookupResourceByType((pointer *) &pContext, stuff->context_id, + XvMCRTContext, client, DixUseAccess); + if (result != Success) + return result; + + pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); + + adaptor = &(pScreenPriv->adaptors[pContext->adapt_num]); + + /* find which surface this context supports */ + for (i = 0; i < adaptor->num_surfaces; i++) { + if (adaptor->surfaces[i]->surface_type_id == pContext->surface_type_id) { + surface = adaptor->surfaces[i]; + break; + } + } + + if (!surface) + return BadMatch; + + /* make sure this surface supports that xvimage format */ + if (!surface->compatible_subpictures) + return BadMatch; + + for (i = 0; i < surface->compatible_subpictures->num_xvimages; i++) { + if (surface->compatible_subpictures->xvimage_ids[i] == + stuff->xvimage_id) { + image_supported = TRUE; + break; + } + } + + if (!image_supported) + return BadMatch; + + /* make sure the size is OK */ + if ((stuff->width > surface->subpicture_max_width) || + (stuff->height > surface->subpicture_max_height)) + return BadValue; + + if (!(pSubpicture = malloc(sizeof(XvMCSubpictureRec)))) + return BadAlloc; + + pSubpicture->subpicture_id = stuff->subpicture_id; + pSubpicture->xvimage_id = stuff->xvimage_id; + pSubpicture->width = stuff->width; + pSubpicture->height = stuff->height; + pSubpicture->num_palette_entries = 0; /* overwritten by DDX */ + pSubpicture->entry_bytes = 0; /* overwritten by DDX */ + pSubpicture->component_order[0] = 0; /* overwritten by DDX */ + pSubpicture->component_order[1] = 0; + pSubpicture->component_order[2] = 0; + pSubpicture->component_order[3] = 0; + pSubpicture->context = pContext; + + result = + (*pScreenPriv->adaptors[pContext->adapt_num]. + CreateSubpicture) (pSubpicture, &dwords, &data); + + if (result != Success) { + free(pSubpicture); + return result; + } + rep = (xvmcCreateSubpictureReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = dwords, + .width_actual = pSubpicture->width, + .height_actual = pSubpicture->height, + .num_palette_entries = pSubpicture->num_palette_entries, + .entry_bytes = pSubpicture->entry_bytes, + .component_order[0] = pSubpicture->component_order[0], + .component_order[1] = pSubpicture->component_order[1], + .component_order[2] = pSubpicture->component_order[2], + .component_order[3] = pSubpicture->component_order[3] + }; + + WriteToClient(client, sizeof(xvmcCreateSubpictureReply), &rep); + if (dwords) + WriteToClient(client, dwords << 2, data); + AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture); + + free(data); + + pContext->refcnt++; + + return Success; +} + +static int +ProcXvMCDestroySubpicture(ClientPtr client) +{ + pointer val; + int rc; + + REQUEST(xvmcDestroySubpictureReq); + REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq); + + rc = dixLookupResourceByType(&val, stuff->subpicture_id, XvMCRTSubpicture, + client, DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->subpicture_id, RT_NONE); + + return Success; +} + +static int +ProcXvMCListSubpictureTypes(ClientPtr client) +{ + XvPortPtr pPort; + xvmcListSubpictureTypesReply rep; + XvMCScreenPtr pScreenPriv; + ScreenPtr pScreen; + XvMCAdaptorPtr adaptor = NULL; + XvMCSurfaceInfoPtr surface = NULL; + xvImageFormatInfo info; + XvImagePtr pImage; + int i, j; + + REQUEST(xvmcListSubpictureTypesReq); + REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + pScreen = pPort->pAdaptor->pScreen; + + if (!dixPrivateKeyRegistered(XvMCScreenKey)) + return BadMatch; /* No XvMC adaptors */ + + if (!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) + return BadMatch; /* None this screen */ + + for (i = 0; i < pScreenPriv->num_adaptors; i++) { + if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + + if (!adaptor) + return BadMatch; + + for (i = 0; i < adaptor->num_surfaces; i++) { + if (adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { + surface = adaptor->surfaces[i]; + break; + } + } + + if (!surface) + return BadMatch; + + rep = (xvmcListSubpictureTypesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .num = 0 + }; + if (surface->compatible_subpictures) + rep.num = surface->compatible_subpictures->num_xvimages; + + rep.length = bytes_to_int32(rep.num * sizeof(xvImageFormatInfo)); + + WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), &rep); + + for (i = 0; i < rep.num; i++) { + pImage = NULL; + for (j = 0; j < adaptor->num_subpictures; j++) { + if (surface->compatible_subpictures->xvimage_ids[i] == + adaptor->subpictures[j]->id) { + pImage = adaptor->subpictures[j]; + break; + } + } + if (!pImage) + return BadImplementation; + + info.id = pImage->id; + info.type = pImage->type; + info.byte_order = pImage->byte_order; + memcpy(&info.guid, pImage->guid, 16); + info.bpp = pImage->bits_per_pixel; + info.num_planes = pImage->num_planes; + info.depth = pImage->depth; + info.red_mask = pImage->red_mask; + info.green_mask = pImage->green_mask; + info.blue_mask = pImage->blue_mask; + info.format = pImage->format; + info.y_sample_bits = pImage->y_sample_bits; + info.u_sample_bits = pImage->u_sample_bits; + info.v_sample_bits = pImage->v_sample_bits; + info.horz_y_period = pImage->horz_y_period; + info.horz_u_period = pImage->horz_u_period; + info.horz_v_period = pImage->horz_v_period; + info.vert_y_period = pImage->vert_y_period; + info.vert_u_period = pImage->vert_u_period; + info.vert_v_period = pImage->vert_v_period; + memcpy(&info.comp_order, pImage->component_order, 32); + info.scanline_order = pImage->scanline_order; + WriteToClient(client, sizeof(xvImageFormatInfo), &info); + } + + return Success; +} + +static int +ProcXvMCGetDRInfo(ClientPtr client) +{ + xvmcGetDRInfoReply rep; + XvPortPtr pPort; + ScreenPtr pScreen; + XvMCScreenPtr pScreenPriv; + +#ifdef HAS_XVMCSHM + volatile CARD32 *patternP; +#endif + + REQUEST(xvmcGetDRInfoReq); + REQUEST_SIZE_MATCH(xvmcGetDRInfoReq); + + VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); + + pScreen = pPort->pAdaptor->pScreen; + pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + rep = (xvmcGetDRInfoReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .major = pScreenPriv->major, + .minor = pScreenPriv->minor, + .patchLevel = pScreenPriv->patchLevel, + .nameLen = bytes_to_int32(strlen(pScreenPriv->clientDriverName) + 1), + .busIDLen = bytes_to_int32(strlen(pScreenPriv->busID) + 1), + .isLocal = 1 + }; + + rep.length = rep.nameLen + rep.busIDLen; + rep.nameLen <<= 2; + rep.busIDLen <<= 2; + + /* + * Read back to the client what she has put in the shared memory + * segment she prepared for us. + */ + +#ifdef HAS_XVMCSHM + patternP = (CARD32 *) shmat(stuff->shmKey, NULL, SHM_RDONLY); + if (-1 != (long) patternP) { + volatile CARD32 *patternC = patternP; + int i; + CARD32 magic = stuff->magic; + + rep.isLocal = 1; + i = 1024 / sizeof(CARD32); + + while (i--) { + if (*patternC++ != magic) { + rep.isLocal = 0; + break; + } + magic = ~magic; + } + shmdt((char *) patternP); + } +#endif /* HAS_XVMCSHM */ + + WriteToClient(client, sizeof(xvmcGetDRInfoReply), &rep); + if (rep.length) { + WriteToClient(client, rep.nameLen, pScreenPriv->clientDriverName); + WriteToClient(client, rep.busIDLen, pScreenPriv->busID); + } + return Success; +} + +int (*ProcXvMCVector[xvmcNumRequest]) (ClientPtr) = { +ProcXvMCQueryVersion, + ProcXvMCListSurfaceTypes, + ProcXvMCCreateContext, + ProcXvMCDestroyContext, + ProcXvMCCreateSurface, + ProcXvMCDestroySurface, + ProcXvMCCreateSubpicture, + ProcXvMCDestroySubpicture, + ProcXvMCListSubpictureTypes, ProcXvMCGetDRInfo}; + +static int +ProcXvMCDispatch(ClientPtr client) +{ + REQUEST(xReq); + + if (stuff->data < xvmcNumRequest) + return (*ProcXvMCVector[stuff->data]) (client); + else + return BadRequest; +} + +static int +SProcXvMCDispatch(ClientPtr client) +{ + /* We only support local */ + return BadImplementation; +} + +void +XvMCExtensionInit(void) +{ + ExtensionEntry *extEntry; + + if (!dixPrivateKeyRegistered(XvMCScreenKey)) + return; + + if (!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes, + "XvMCRTContext"))) + return; + + if (!(XvMCRTSurface = CreateNewResourceType(XvMCDestroySurfaceRes, + "XvMCRTSurface"))) + return; + + if (!(XvMCRTSubpicture = CreateNewResourceType(XvMCDestroySubpictureRes, + "XvMCRTSubpicture"))) + return; + + extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors, + ProcXvMCDispatch, SProcXvMCDispatch, + NULL, StandardMinorOpcode); + + if (!extEntry) + return; + + XvMCReqCode = extEntry->base; + XvMCEventBase = extEntry->eventBase; + SetResourceTypeErrorValue(XvMCRTContext, + extEntry->errorBase + XvMCBadContext); + SetResourceTypeErrorValue(XvMCRTSurface, + extEntry->errorBase + XvMCBadSurface); + SetResourceTypeErrorValue(XvMCRTSubpicture, + extEntry->errorBase + XvMCBadSubpicture); +} + +static Bool +XvMCCloseScreen(ScreenPtr pScreen) +{ + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + pScreen->CloseScreen = pScreenPriv->CloseScreen; + + free(pScreenPriv); + + return (*pScreen->CloseScreen) (pScreen); +} + +int +XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) +{ + XvMCScreenPtr pScreenPriv; + + if (!dixRegisterPrivateKey(&XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) + return BadAlloc; + + if (!(pScreenPriv = malloc(sizeof(XvMCScreenRec)))) + return BadAlloc; + + dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv); + + pScreenPriv->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = XvMCCloseScreen; + + pScreenPriv->num_adaptors = num; + pScreenPriv->adaptors = pAdapt; + pScreenPriv->clientDriverName[0] = 0; + pScreenPriv->busID[0] = 0; + pScreenPriv->major = 0; + pScreenPriv->minor = 0; + pScreenPriv->patchLevel = 0; + + XvMCInUse = TRUE; + + return Success; +} + +XvImagePtr +XvMCFindXvImage(XvPortPtr pPort, CARD32 id) +{ + XvImagePtr pImage = NULL; + ScreenPtr pScreen = pPort->pAdaptor->pScreen; + XvMCScreenPtr pScreenPriv; + XvMCAdaptorPtr adaptor = NULL; + int i; + + if (!dixPrivateKeyRegistered(XvMCScreenKey)) + return NULL; + + if (!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) + return NULL; + + for (i = 0; i < pScreenPriv->num_adaptors; i++) { + if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + + if (!adaptor) + return NULL; + + for (i = 0; i < adaptor->num_subpictures; i++) { + if (adaptor->subpictures[i]->id == id) { + pImage = adaptor->subpictures[i]; + break; + } + } + + return pImage; +} + +int +xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name, + char *busID, int major, int minor, int patchLevel) +{ + XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + strlcpy(pScreenPriv->clientDriverName, name, DR_CLIENT_DRIVER_NAME_SIZE); + strlcpy(pScreenPriv->busID, busID, DR_BUSID_SIZE); + pScreenPriv->major = major; + pScreenPriv->minor = minor; + pScreenPriv->patchLevel = patchLevel; + return Success; +} diff --git a/Xext/xvmcext.h b/Xext/xvmcext.h new file mode 100644 index 0000000..2201d7b --- /dev/null +++ b/Xext/xvmcext.h @@ -0,0 +1,98 @@ + +#ifndef _XVMC_H +#define _XVMC_H +#include <X11/extensions/Xv.h> +#include "xvdix.h" + +typedef struct { + int num_xvimages; + int *xvimage_ids; +} XvMCImageIDList; + +typedef struct { + int surface_type_id; + int chroma_format; + int color_description; + unsigned short max_width; + unsigned short max_height; + unsigned short subpicture_max_width; + unsigned short subpicture_max_height; + int mc_type; + int flags; + XvMCImageIDList *compatible_subpictures; +} XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr; + +typedef struct { + XID context_id; + ScreenPtr pScreen; + int adapt_num; + int surface_type_id; + unsigned short width; + unsigned short height; + CARD32 flags; + int refcnt; + pointer port_priv; + pointer driver_priv; +} XvMCContextRec, *XvMCContextPtr; + +typedef struct { + XID surface_id; + int surface_type_id; + XvMCContextPtr context; + pointer driver_priv; +} XvMCSurfaceRec, *XvMCSurfacePtr; + +typedef struct { + XID subpicture_id; + int xvimage_id; + unsigned short width; + unsigned short height; + int num_palette_entries; + int entry_bytes; + char component_order[4]; + XvMCContextPtr context; + pointer driver_priv; +} XvMCSubpictureRec, *XvMCSubpicturePtr; + +typedef int (*XvMCCreateContextProcPtr) (XvPortPtr port, + XvMCContextPtr context, + int *num_priv, CARD32 **priv); + +typedef void (*XvMCDestroyContextProcPtr) (XvMCContextPtr context); + +typedef int (*XvMCCreateSurfaceProcPtr) (XvMCSurfacePtr surface, + int *num_priv, CARD32 **priv); + +typedef void (*XvMCDestroySurfaceProcPtr) (XvMCSurfacePtr surface); + +typedef int (*XvMCCreateSubpictureProcPtr) (XvMCSubpicturePtr subpicture, + int *num_priv, CARD32 **priv); + +typedef void (*XvMCDestroySubpictureProcPtr) (XvMCSubpicturePtr subpicture); + +typedef struct { + XvAdaptorPtr xv_adaptor; + int num_surfaces; + XvMCSurfaceInfoPtr *surfaces; + int num_subpictures; + XvImagePtr *subpictures; + XvMCCreateContextProcPtr CreateContext; + XvMCDestroyContextProcPtr DestroyContext; + XvMCCreateSurfaceProcPtr CreateSurface; + XvMCDestroySurfaceProcPtr DestroySurface; + XvMCCreateSubpictureProcPtr CreateSubpicture; + XvMCDestroySubpictureProcPtr DestroySubpicture; +} XvMCAdaptorRec, *XvMCAdaptorPtr; + +extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr); + +extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen, + int num, XvMCAdaptorPtr adapt); + +extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id); + +extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name, + char *busID, int major, int minor, + int patchLevel); + +#endif /* _XVMC_H */ diff --git a/Xi/Makefile.am b/Xi/Makefile.am new file mode 100644 index 0000000..af85bd0 --- /dev/null +++ b/Xi/Makefile.am @@ -0,0 +1,110 @@ +noinst_LTLIBRARIES = libXi.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libXi_la_SOURCES = \ + allowev.c \ + allowev.h \ + chgdctl.c \ + chgdctl.h \ + chgfctl.c \ + chgfctl.h \ + chgkbd.c \ + chgkbd.h \ + chgkmap.c \ + chgkmap.h \ + chgprop.c \ + chgprop.h \ + chgptr.c \ + chgptr.h \ + closedev.c \ + closedev.h \ + devbell.c \ + devbell.h \ + exevents.c \ + exglobals.h \ + extinit.c \ + getbmap.c \ + getbmap.h \ + getdctl.c \ + getdctl.h \ + getfctl.c \ + getfctl.h \ + getfocus.c \ + getfocus.h \ + getkmap.c \ + getkmap.h \ + getmmap.c \ + getmmap.h \ + getprop.c \ + getprop.h \ + getselev.c \ + getselev.h \ + getvers.c \ + getvers.h \ + grabdev.c \ + grabdev.h \ + grabdevb.c \ + grabdevb.h \ + grabdevk.c \ + grabdevk.h \ + gtmotion.c \ + gtmotion.h \ + listdev.c \ + listdev.h \ + opendev.c \ + opendev.h \ + queryst.c \ + queryst.h \ + selectev.c \ + selectev.h \ + sendexev.c \ + sendexev.h \ + setbmap.c \ + setbmap.h \ + setdval.c \ + setdval.h \ + setfocus.c \ + setfocus.h \ + setmmap.c \ + setmmap.h \ + setmode.c \ + setmode.h \ + ungrdev.c \ + ungrdev.h \ + ungrdevb.c \ + ungrdevb.h \ + ungrdevk.c \ + ungrdevk.h \ + xiallowev.c \ + xiallowev.h \ + xibarriers.c \ + xibarriers.h \ + xichangecursor.c \ + xichangecursor.h \ + xichangehierarchy.c \ + xichangehierarchy.h \ + xigetclientpointer.c \ + xigetclientpointer.h \ + xigrabdev.c \ + xigrabdev.h \ + xipassivegrab.h \ + xipassivegrab.c \ + xiproperty.c \ + xiproperty.h \ + xiquerydevice.c \ + xiquerydevice.h \ + xiquerypointer.c \ + xiquerypointer.h \ + xiqueryversion.c \ + xiqueryversion.h \ + xiselectev.c \ + xiselectev.h \ + xisetclientpointer.c \ + xisetclientpointer.h \ + xisetdevfocus.c \ + xisetdevfocus.h \ + xiwarppointer.c \ + xiwarppointer.h + +EXTRA_DIST = stubs.c diff --git a/Xi/Makefile.in b/Xi/Makefile.in new file mode 100644 index 0000000..fbdf167 --- /dev/null +++ b/Xi/Makefile.in @@ -0,0 +1,904 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = Xi +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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libXi_la_LIBADD = +am_libXi_la_OBJECTS = allowev.lo chgdctl.lo chgfctl.lo chgkbd.lo \ + chgkmap.lo chgprop.lo chgptr.lo closedev.lo devbell.lo \ + exevents.lo extinit.lo getbmap.lo getdctl.lo getfctl.lo \ + getfocus.lo getkmap.lo getmmap.lo getprop.lo getselev.lo \ + getvers.lo grabdev.lo grabdevb.lo grabdevk.lo gtmotion.lo \ + listdev.lo opendev.lo queryst.lo selectev.lo sendexev.lo \ + setbmap.lo setdval.lo setfocus.lo setmmap.lo setmode.lo \ + ungrdev.lo ungrdevb.lo ungrdevk.lo xiallowev.lo xibarriers.lo \ + xichangecursor.lo xichangehierarchy.lo xigetclientpointer.lo \ + xigrabdev.lo xipassivegrab.lo xiproperty.lo xiquerydevice.lo \ + xiquerypointer.lo xiqueryversion.lo xiselectev.lo \ + xisetclientpointer.lo xisetdevfocus.lo xiwarppointer.lo +libXi_la_OBJECTS = $(am_libXi_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libXi_la_SOURCES) +DIST_SOURCES = $(libXi_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libXi.la +AM_CFLAGS = $(DIX_CFLAGS) +libXi_la_SOURCES = \ + allowev.c \ + allowev.h \ + chgdctl.c \ + chgdctl.h \ + chgfctl.c \ + chgfctl.h \ + chgkbd.c \ + chgkbd.h \ + chgkmap.c \ + chgkmap.h \ + chgprop.c \ + chgprop.h \ + chgptr.c \ + chgptr.h \ + closedev.c \ + closedev.h \ + devbell.c \ + devbell.h \ + exevents.c \ + exglobals.h \ + extinit.c \ + getbmap.c \ + getbmap.h \ + getdctl.c \ + getdctl.h \ + getfctl.c \ + getfctl.h \ + getfocus.c \ + getfocus.h \ + getkmap.c \ + getkmap.h \ + getmmap.c \ + getmmap.h \ + getprop.c \ + getprop.h \ + getselev.c \ + getselev.h \ + getvers.c \ + getvers.h \ + grabdev.c \ + grabdev.h \ + grabdevb.c \ + grabdevb.h \ + grabdevk.c \ + grabdevk.h \ + gtmotion.c \ + gtmotion.h \ + listdev.c \ + listdev.h \ + opendev.c \ + opendev.h \ + queryst.c \ + queryst.h \ + selectev.c \ + selectev.h \ + sendexev.c \ + sendexev.h \ + setbmap.c \ + setbmap.h \ + setdval.c \ + setdval.h \ + setfocus.c \ + setfocus.h \ + setmmap.c \ + setmmap.h \ + setmode.c \ + setmode.h \ + ungrdev.c \ + ungrdev.h \ + ungrdevb.c \ + ungrdevb.h \ + ungrdevk.c \ + ungrdevk.h \ + xiallowev.c \ + xiallowev.h \ + xibarriers.c \ + xibarriers.h \ + xichangecursor.c \ + xichangecursor.h \ + xichangehierarchy.c \ + xichangehierarchy.h \ + xigetclientpointer.c \ + xigetclientpointer.h \ + xigrabdev.c \ + xigrabdev.h \ + xipassivegrab.h \ + xipassivegrab.c \ + xiproperty.c \ + xiproperty.h \ + xiquerydevice.c \ + xiquerydevice.h \ + xiquerypointer.c \ + xiquerypointer.h \ + xiqueryversion.c \ + xiqueryversion.h \ + xiselectev.c \ + xiselectev.h \ + xisetclientpointer.c \ + xisetclientpointer.h \ + xisetdevfocus.c \ + xisetdevfocus.h \ + xiwarppointer.c \ + xiwarppointer.h + +EXTRA_DIST = stubs.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Xi/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Xi/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libXi.la: $(libXi_la_OBJECTS) $(libXi_la_DEPENDENCIES) $(EXTRA_libXi_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libXi_la_OBJECTS) $(libXi_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allowev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgdctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgfctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgkbd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgkmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgprop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgptr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devbell.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exevents.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getbmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfctl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfocus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getkmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getmmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getselev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getvers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdevb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdevk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtmotion.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queryst.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selectev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendexev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setbmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfocus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiallowev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xibarriers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xichangecursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xichangehierarchy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xigetclientpointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xigrabdev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xipassivegrab.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiproperty.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiquerydevice.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiquerypointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiqueryversion.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiselectev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xisetclientpointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xisetdevfocus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiwarppointer.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# 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/Xi/allowev.c b/Xi/allowev.c new file mode 100644 index 0000000..770fe9f --- /dev/null +++ b/Xi/allowev.c @@ -0,0 +1,127 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Function to allow frozen events to be routed from extension input devices. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> + +#include "exglobals.h" + +#include "allowev.h" +#include "dixevents.h" + +/*********************************************************************** + * + * This procedure allows frozen events to be routed. + * + */ + +int +SProcXAllowDeviceEvents(ClientPtr client) +{ + REQUEST(xAllowDeviceEventsReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); + swapl(&stuff->time); + return (ProcXAllowDeviceEvents(client)); +} + +/*********************************************************************** + * + * This procedure allows frozen events to be routed. + * + */ + +int +ProcXAllowDeviceEvents(ClientPtr client) +{ + TimeStamp time; + DeviceIntPtr thisdev; + int rc; + + REQUEST(xAllowDeviceEventsReq); + REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); + + rc = dixLookupDevice(&thisdev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + time = ClientTimeToServerTime(stuff->time); + + switch (stuff->mode) { + case ReplayThisDevice: + AllowSome(client, time, thisdev, NOT_GRABBED); + break; + case SyncThisDevice: + AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT); + break; + case AsyncThisDevice: + AllowSome(client, time, thisdev, THAWED); + break; + case AsyncOtherDevices: + AllowSome(client, time, thisdev, THAW_OTHERS); + break; + case SyncAll: + AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT); + break; + case AsyncAll: + AllowSome(client, time, thisdev, THAWED_BOTH); + break; + default: + client->errorValue = stuff->mode; + return BadValue; + } + return Success; +} diff --git a/Xi/allowev.h b/Xi/allowev.h new file mode 100644 index 0000000..f081ab5 --- /dev/null +++ b/Xi/allowev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef ALLOWEV_H +#define ALLOWEV_H 1 + +int SProcXAllowDeviceEvents(ClientPtr /* client */ + ); + +int ProcXAllowDeviceEvents(ClientPtr /* client */ + ); + +#endif /* ALLOWEV_H */ diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c new file mode 100644 index 0000000..d078aa2 --- /dev/null +++ b/Xi/chgdctl.c @@ -0,0 +1,253 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Change Device control attributes for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> /* control constants */ +#include "XIstubs.h" + +#include "exglobals.h" +#include "exevents.h" + +#include "chgdctl.h" + +/*********************************************************************** + * + * This procedure changes the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXChangeDeviceControl(ClientPtr client) +{ + xDeviceCtl *ctl; + + REQUEST(xChangeDeviceControlReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); + swaps(&stuff->control); + ctl = (xDeviceCtl *) &stuff[1]; + swaps(&ctl->control); + swaps(&ctl->length); + switch (stuff->control) { + case DEVICE_ABS_CALIB: + case DEVICE_ABS_AREA: + case DEVICE_CORE: + case DEVICE_ENABLE: + case DEVICE_RESOLUTION: + /* hmm. beer. *drool* */ + break; + + } + return (ProcXChangeDeviceControl(client)); +} + +/*********************************************************************** + * + * Change the control attributes. + * + */ + +int +ProcXChangeDeviceControl(ClientPtr client) +{ + unsigned len; + int i, status, ret = BadValue; + DeviceIntPtr dev; + xDeviceResolutionCtl *r; + xChangeDeviceControlReply rep; + AxisInfoPtr a; + CARD32 *resolution; + xDeviceEnableCtl *e; + + REQUEST(xChangeDeviceControlReq); + REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); + + len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq)); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); + if (ret != Success) + goto out; + + /* XTest devices are special, none of the below apply to them anyway */ + if (IsXTestDevice(dev, NULL)) { + ret = BadMatch; + goto out; + } + + rep = (xChangeDeviceControlReply) { + .repType = X_Reply, + .RepType = X_ChangeDeviceControl, + .sequenceNumber = client->sequence, + .length = 0, + .status = Success, + }; + + switch (stuff->control) { + case DEVICE_RESOLUTION: + r = (xDeviceResolutionCtl *) &stuff[1]; + if ((len < bytes_to_int32(sizeof(xDeviceResolutionCtl))) || + (len != + bytes_to_int32(sizeof(xDeviceResolutionCtl)) + r->num_valuators)) { + ret = BadLength; + goto out; + } + if (!dev->valuator) { + ret = BadMatch; + goto out; + } + if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) { + rep.status = AlreadyGrabbed; + ret = Success; + goto out; + } + resolution = (CARD32 *) (r + 1); + if (r->first_valuator + r->num_valuators > dev->valuator->numAxes) { + ret = BadValue; + goto out; + } + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) r); + if (status == Success) { + a = &dev->valuator->axes[r->first_valuator]; + for (i = 0; i < r->num_valuators; i++) + if (*(resolution + i) < (a + i)->min_resolution || + *(resolution + i) > (a + i)->max_resolution) + return BadValue; + for (i = 0; i < r->num_valuators; i++) + (a++)->resolution = *resolution++; + + ret = Success; + } + else if (status == DeviceBusy) { + rep.status = DeviceBusy; + ret = Success; + } + else { + ret = BadMatch; + } + break; + case DEVICE_ABS_CALIB: + case DEVICE_ABS_AREA: + /* Calibration is now done through properties, and never had any effect + * on anything (in the open-source world). Thus, be honest. */ + ret = BadMatch; + break; + case DEVICE_CORE: + /* Sorry, no device core switching no more. If you want a device to + * send core events, attach it to a master device */ + ret = BadMatch; + break; + case DEVICE_ENABLE: + e = (xDeviceEnableCtl *) &stuff[1]; + + if (IsXTestDevice(dev, NULL)) + status = !Success; + else + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e); + + if (status == Success) { + if (e->enable) + EnableDevice(dev, TRUE); + else + DisableDevice(dev, TRUE); + ret = Success; + } + else if (status == DeviceBusy) { + rep.status = DeviceBusy; + ret = Success; + } + else { + ret = BadMatch; + } + + break; + default: + ret = BadValue; + } + + out: + if (ret == Success) { + devicePresenceNotify dpn = { + .type = DevicePresenceNotify, + .time = currentTime.milliseconds, + .devchange = DeviceControlChanged, + .deviceid = dev->id, + .control = stuff->control + }; + SendEventToAllWindows(dev, DevicePresenceNotifyMask, + (xEvent *) &dpn, 1); + + WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); + } + + return ret; +} + +/*********************************************************************** + * + * This procedure writes the reply for the xChangeDeviceControl function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXChangeDeviceControl(ClientPtr client, int size, + xChangeDeviceControlReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/chgdctl.h b/Xi/chgdctl.h new file mode 100644 index 0000000..f5ca5e7 --- /dev/null +++ b/Xi/chgdctl.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHGDCTL_H +#define CHGDCTL_H 1 + +int SProcXChangeDeviceControl(ClientPtr /* client */ + ); + +int ProcXChangeDeviceControl(ClientPtr /* client */ + ); + +void SRepXChangeDeviceControl(ClientPtr /* client */ , + int /* size */ , + xChangeDeviceControlReply * /* rep */ + ); + +#endif /* CHGDCTL_H */ diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c new file mode 100644 index 0000000..6dcf60c --- /dev/null +++ b/Xi/chgfctl.c @@ -0,0 +1,515 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Change feedback control attributes for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> /* control constants */ + +#include "exglobals.h" + +#include "chgfctl.h" + +#define DO_ALL (-1) + +/*********************************************************************** + * + * This procedure changes the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXChangeFeedbackControl(ClientPtr client) +{ + REQUEST(xChangeFeedbackControlReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); + swapl(&stuff->mask); + return (ProcXChangeFeedbackControl(client)); +} + +/****************************************************************************** + * + * This procedure changes KbdFeedbackClass data. + * + */ + +static int +ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, + KbdFeedbackPtr k, xKbdFeedbackCtl * f) +{ + KeybdCtrl kctrl; + int t; + int key = DO_ALL; + + if (client->swapped) { + swaps(&f->length); + swaps(&f->pitch); + swaps(&f->duration); + swapl(&f->led_mask); + swapl(&f->led_values); + } + + kctrl = k->ctrl; + if (mask & DvKeyClickPercent) { + t = f->click; + if (t == -1) + t = defaultKeyboardControl.click; + else if (t < 0 || t > 100) { + client->errorValue = t; + return BadValue; + } + kctrl.click = t; + } + + if (mask & DvPercent) { + t = f->percent; + if (t == -1) + t = defaultKeyboardControl.bell; + else if (t < 0 || t > 100) { + client->errorValue = t; + return BadValue; + } + kctrl.bell = t; + } + + if (mask & DvPitch) { + t = f->pitch; + if (t == -1) + t = defaultKeyboardControl.bell_pitch; + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + kctrl.bell_pitch = t; + } + + if (mask & DvDuration) { + t = f->duration; + if (t == -1) + t = defaultKeyboardControl.bell_duration; + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + kctrl.bell_duration = t; + } + + if (mask & DvLed) { + kctrl.leds &= ~(f->led_mask); + kctrl.leds |= (f->led_mask & f->led_values); + } + + if (mask & DvKey) { + key = (KeyCode) f->key; + if (key < 8 || key > 255) { + client->errorValue = key; + return BadValue; + } + if (!(mask & DvAutoRepeatMode)) + return BadMatch; + } + + if (mask & DvAutoRepeatMode) { + int inx = (key >> 3); + int kmask = (1 << (key & 7)); + + t = (CARD8) f->auto_repeat_mode; + if (t == AutoRepeatModeOff) { + if (key == DO_ALL) + kctrl.autoRepeat = FALSE; + else + kctrl.autoRepeats[inx] &= ~kmask; + } + else if (t == AutoRepeatModeOn) { + if (key == DO_ALL) + kctrl.autoRepeat = TRUE; + else + kctrl.autoRepeats[inx] |= kmask; + } + else if (t == AutoRepeatModeDefault) { + if (key == DO_ALL) + kctrl.autoRepeat = defaultKeyboardControl.autoRepeat; + else + kctrl.autoRepeats[inx] &= ~kmask; + kctrl.autoRepeats[inx] = + (kctrl.autoRepeats[inx] & ~kmask) | + (defaultKeyboardControl.autoRepeats[inx] & kmask); + } + else { + client->errorValue = t; + return BadValue; + } + } + + k->ctrl = kctrl; + (*k->CtrlProc) (dev, &k->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes PtrFeedbackClass data. + * + */ + +static int +ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, + PtrFeedbackPtr p, xPtrFeedbackCtl * f) +{ + PtrCtrl pctrl; /* might get BadValue part way through */ + + if (client->swapped) { + swaps(&f->length); + swaps(&f->num); + swaps(&f->denom); + swaps(&f->thresh); + } + + pctrl = p->ctrl; + if (mask & DvAccelNum) { + int accelNum; + + accelNum = f->num; + if (accelNum == -1) + pctrl.num = defaultPointerControl.num; + else if (accelNum < 0) { + client->errorValue = accelNum; + return BadValue; + } + else + pctrl.num = accelNum; + } + + if (mask & DvAccelDenom) { + int accelDenom; + + accelDenom = f->denom; + if (accelDenom == -1) + pctrl.den = defaultPointerControl.den; + else if (accelDenom <= 0) { + client->errorValue = accelDenom; + return BadValue; + } + else + pctrl.den = accelDenom; + } + + if (mask & DvThreshold) { + int threshold; + + threshold = f->thresh; + if (threshold == -1) + pctrl.threshold = defaultPointerControl.threshold; + else if (threshold < 0) { + client->errorValue = threshold; + return BadValue; + } + else + pctrl.threshold = threshold; + } + + p->ctrl = pctrl; + (*p->CtrlProc) (dev, &p->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes IntegerFeedbackClass data. + * + */ + +static int +ChangeIntegerFeedback(ClientPtr client, DeviceIntPtr dev, + long unsigned int mask, IntegerFeedbackPtr i, + xIntegerFeedbackCtl * f) +{ + if (client->swapped) { + swaps(&f->length); + swapl(&f->int_to_display); + } + + i->ctrl.integer_displayed = f->int_to_display; + (*i->CtrlProc) (dev, &i->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes StringFeedbackClass data. + * + */ + +static int +ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev, + long unsigned int mask, StringFeedbackPtr s, + xStringFeedbackCtl * f) +{ + int i, j; + KeySym *syms, *sup_syms; + + syms = (KeySym *) (f + 1); + if (client->swapped) { + swaps(&f->length); /* swapped num_keysyms in calling proc */ + SwapLongs((CARD32 *) syms, f->num_keysyms); + } + + if (f->num_keysyms > s->ctrl.max_symbols) + return BadValue; + + sup_syms = s->ctrl.symbols_supported; + for (i = 0; i < f->num_keysyms; i++) { + for (j = 0; j < s->ctrl.num_symbols_supported; j++) + if (*(syms + i) == *(sup_syms + j)) + break; + if (j == s->ctrl.num_symbols_supported) + return BadMatch; + } + + s->ctrl.num_symbols_displayed = f->num_keysyms; + for (i = 0; i < f->num_keysyms; i++) + *(s->ctrl.symbols_displayed + i) = *(syms + i); + (*s->CtrlProc) (dev, &s->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes BellFeedbackClass data. + * + */ + +static int +ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev, + long unsigned int mask, BellFeedbackPtr b, + xBellFeedbackCtl * f) +{ + int t; + BellCtrl bctrl; /* might get BadValue part way through */ + + if (client->swapped) { + swaps(&f->length); + swaps(&f->pitch); + swaps(&f->duration); + } + + bctrl = b->ctrl; + if (mask & DvPercent) { + t = f->percent; + if (t == -1) + t = defaultKeyboardControl.bell; + else if (t < 0 || t > 100) { + client->errorValue = t; + return BadValue; + } + bctrl.percent = t; + } + + if (mask & DvPitch) { + t = f->pitch; + if (t == -1) + t = defaultKeyboardControl.bell_pitch; + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + bctrl.pitch = t; + } + + if (mask & DvDuration) { + t = f->duration; + if (t == -1) + t = defaultKeyboardControl.bell_duration; + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + bctrl.duration = t; + } + b->ctrl = bctrl; + (*b->CtrlProc) (dev, &b->ctrl); + return Success; +} + +/****************************************************************************** + * + * This procedure changes LedFeedbackClass data. + * + */ + +static int +ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, + LedFeedbackPtr l, xLedFeedbackCtl * f) +{ + LedCtrl lctrl; /* might get BadValue part way through */ + + if (client->swapped) { + swaps(&f->length); + swapl(&f->led_values); + swapl(&f->led_mask); + } + + f->led_mask &= l->ctrl.led_mask; /* set only supported leds */ + f->led_values &= l->ctrl.led_mask; /* set only supported leds */ + if (mask & DvLed) { + lctrl.led_mask = f->led_mask; + lctrl.led_values = f->led_values; + (*l->CtrlProc) (dev, &lctrl); + l->ctrl.led_values &= ~(f->led_mask); /* zero changed leds */ + l->ctrl.led_values |= (f->led_mask & f->led_values); /* OR in set leds */ + } + + return Success; +} + +/*********************************************************************** + * + * Change the control attributes. + * + */ + +int +ProcXChangeFeedbackControl(ClientPtr client) +{ + unsigned len; + DeviceIntPtr dev; + KbdFeedbackPtr k; + PtrFeedbackPtr p; + IntegerFeedbackPtr i; + StringFeedbackPtr s; + BellFeedbackPtr b; + LedFeedbackPtr l; + int rc; + + REQUEST(xChangeFeedbackControlReq); + REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); + + len = stuff->length - bytes_to_int32(sizeof(xChangeFeedbackControlReq)); + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); + if (rc != Success) + return rc; + + switch (stuff->feedbackid) { + case KbdFeedbackClass: + if (len != bytes_to_int32(sizeof(xKbdFeedbackCtl))) + return BadLength; + + for (k = dev->kbdfeed; k; k = k->next) + if (k->ctrl.id == ((xKbdFeedbackCtl *) &stuff[1])->id) + return ChangeKbdFeedback(client, dev, stuff->mask, k, + (xKbdFeedbackCtl *) &stuff[1]); + break; + case PtrFeedbackClass: + if (len != bytes_to_int32(sizeof(xPtrFeedbackCtl))) + return BadLength; + + for (p = dev->ptrfeed; p; p = p->next) + if (p->ctrl.id == ((xPtrFeedbackCtl *) &stuff[1])->id) + return ChangePtrFeedback(client, dev, stuff->mask, p, + (xPtrFeedbackCtl *) &stuff[1]); + break; + case StringFeedbackClass: + { + xStringFeedbackCtl *f = ((xStringFeedbackCtl *) &stuff[1]); + + if (client->swapped) { + swaps(&f->num_keysyms); + } + if (len != + (bytes_to_int32(sizeof(xStringFeedbackCtl)) + f->num_keysyms)) + return BadLength; + + for (s = dev->stringfeed; s; s = s->next) + if (s->ctrl.id == ((xStringFeedbackCtl *) &stuff[1])->id) + return ChangeStringFeedback(client, dev, stuff->mask, s, + (xStringFeedbackCtl *) &stuff[1]); + break; + } + case IntegerFeedbackClass: + if (len != bytes_to_int32(sizeof(xIntegerFeedbackCtl))) + return BadLength; + + for (i = dev->intfeed; i; i = i->next) + if (i->ctrl.id == ((xIntegerFeedbackCtl *) &stuff[1])->id) + return ChangeIntegerFeedback(client, dev, stuff->mask, i, + (xIntegerFeedbackCtl *) & + stuff[1]); + break; + case LedFeedbackClass: + if (len != bytes_to_int32(sizeof(xLedFeedbackCtl))) + return BadLength; + + for (l = dev->leds; l; l = l->next) + if (l->ctrl.id == ((xLedFeedbackCtl *) &stuff[1])->id) + return ChangeLedFeedback(client, dev, stuff->mask, l, + (xLedFeedbackCtl *) &stuff[1]); + break; + case BellFeedbackClass: + if (len != bytes_to_int32(sizeof(xBellFeedbackCtl))) + return BadLength; + + for (b = dev->bell; b; b = b->next) + if (b->ctrl.id == ((xBellFeedbackCtl *) &stuff[1])->id) + return ChangeBellFeedback(client, dev, stuff->mask, b, + (xBellFeedbackCtl *) &stuff[1]); + break; + default: + break; + } + + return BadMatch; +} diff --git a/Xi/chgfctl.h b/Xi/chgfctl.h new file mode 100644 index 0000000..45a55a5 --- /dev/null +++ b/Xi/chgfctl.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHGFCTL_H +#define CHGFCTL_H 1 + +int SProcXChangeFeedbackControl(ClientPtr /* client */ + ); + +int ProcXChangeFeedbackControl(ClientPtr /* client */ + ); + +#endif /* CHGFCTL_H */ diff --git a/Xi/chgkbd.c b/Xi/chgkbd.c new file mode 100644 index 0000000..ea91eb3 --- /dev/null +++ b/Xi/chgkbd.c @@ -0,0 +1,98 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to change the keyboard device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "globals.h" + +#include "exevents.h" +#include "exglobals.h" + +#include "chgkbd.h" +#include "chgptr.h" + +/*********************************************************************** + * + * This procedure changes the keyboard device. + * + */ + +int +SProcXChangeKeyboardDevice(ClientPtr client) +{ + REQUEST(xChangeKeyboardDeviceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); + return (ProcXChangeKeyboardDevice(client)); +} + +/*********************************************************************** + * + * This procedure is invoked to swap the request bytes if the server and + * client have a different byte order. + * + */ + +int +ProcXChangeKeyboardDevice(ClientPtr client) +{ + /* REQUEST(xChangeKeyboardDeviceReq); */ + REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); + + return BadDevice; +} diff --git a/Xi/chgkbd.h b/Xi/chgkbd.h new file mode 100644 index 0000000..ec567fe --- /dev/null +++ b/Xi/chgkbd.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHGKBD_H +#define CHGKBD_H 1 + +int SProcXChangeKeyboardDevice(ClientPtr /* client */ + ); + +int ProcXChangeKeyboardDevice(ClientPtr /* client */ + ); + +#endif /* CHGKBD_H */ diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c new file mode 100644 index 0000000..49660f9 --- /dev/null +++ b/Xi/chgkmap.c @@ -0,0 +1,116 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Change key mapping for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" + +#include "chgkmap.h" + +/*********************************************************************** + * + * This procedure swaps the request when the client and + * server have different byte orderings. + * + */ + +int +SProcXChangeDeviceKeyMapping(ClientPtr client) +{ + unsigned int count; + + REQUEST(xChangeDeviceKeyMappingReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); + count = stuff->keyCodes * stuff->keySymsPerKeyCode; + REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), count); + return (ProcXChangeDeviceKeyMapping(client)); +} + +/*********************************************************************** + * + * Change the device key mapping. + * + */ + +int +ProcXChangeDeviceKeyMapping(ClientPtr client) +{ + int ret; + unsigned len; + DeviceIntPtr dev; + unsigned int count; + + REQUEST(xChangeDeviceKeyMappingReq); + REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); + + count = stuff->keyCodes * stuff->keySymsPerKeyCode; + REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); + if (ret != Success) + return ret; + len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq)); + + ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify, + stuff->firstKeyCode, stuff->keyCodes, + stuff->keySymsPerKeyCode, (KeySym *) &stuff[1]); + + return ret; +} diff --git a/Xi/chgkmap.h b/Xi/chgkmap.h new file mode 100644 index 0000000..633af7c --- /dev/null +++ b/Xi/chgkmap.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHGKMAP_H +#define CHGKMAP_H 1 + +int SProcXChangeDeviceKeyMapping(ClientPtr /* client */ + ); + +int ProcXChangeDeviceKeyMapping(ClientPtr /* client */ + ); + +#endif /* CHGKMAP_H */ diff --git a/Xi/chgprop.c b/Xi/chgprop.c new file mode 100644 index 0000000..84fb51d --- /dev/null +++ b/Xi/chgprop.c @@ -0,0 +1,142 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Function to modify the dont-propagate-list for an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> + +#include "exevents.h" +#include "exglobals.h" + +#include "chgprop.h" +#include "grabdev.h" + +/*********************************************************************** + * + * This procedure returns the extension version. + * + */ + +int +SProcXChangeDeviceDontPropagateList(ClientPtr client) +{ + REQUEST(xChangeDeviceDontPropagateListReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); + swapl(&stuff->window); + swaps(&stuff->count); + REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq, + stuff->count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->count); + return (ProcXChangeDeviceDontPropagateList(client)); +} + +/*********************************************************************** + * + * This procedure changes the dont-propagate list for the specified window. + * + */ + +int +ProcXChangeDeviceDontPropagateList(ClientPtr client) +{ + int i, rc; + WindowPtr pWin; + struct tmask tmp[EMASKSIZE]; + OtherInputMasks *others; + + REQUEST(xChangeDeviceDontPropagateListReq); + REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); + + if (stuff->length != + bytes_to_int32(sizeof(xChangeDeviceDontPropagateListReq)) + + stuff->count) + return BadLength; + + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if (stuff->mode != AddToList && stuff->mode != DeleteFromList) { + client->errorValue = stuff->window; + return BadMode; + } + + if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1], + stuff->count, tmp, NULL, + X_ChangeDeviceDontPropagateList)) != Success) + return rc; + + others = wOtherInputMasks(pWin); + if (!others && stuff->mode == DeleteFromList) + return Success; + for (i = 0; i < EMASKSIZE; i++) { + if (tmp[i].mask == 0) + continue; + + if (stuff->mode == DeleteFromList) + tmp[i].mask = (others->dontPropagateMask[i] & ~tmp[i].mask); + else if (others) + tmp[i].mask |= others->dontPropagateMask[i]; + + if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) != + Success) + return BadClass; + } + + return Success; +} diff --git a/Xi/chgprop.h b/Xi/chgprop.h new file mode 100644 index 0000000..89d6b56 --- /dev/null +++ b/Xi/chgprop.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHGPROP_H +#define CHGPROP_H 1 + +int SProcXChangeDeviceDontPropagateList(ClientPtr /* client */ + ); + +int ProcXChangeDeviceDontPropagateList(ClientPtr /* client */ + ); + +#endif /* CHGPROP_H */ diff --git a/Xi/chgptr.c b/Xi/chgptr.c new file mode 100644 index 0000000..f99d1aa --- /dev/null +++ b/Xi/chgptr.c @@ -0,0 +1,99 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to change the pointer device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ + +#include "dixevents.h" +#include "exevents.h" +#include "exglobals.h" + +#include "chgptr.h" + +/*********************************************************************** + * + * This procedure is invoked to swap the request bytes if the server and + * client have a different byte order. + * + */ + +int +SProcXChangePointerDevice(ClientPtr client) +{ + REQUEST(xChangePointerDeviceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xChangePointerDeviceReq); + return (ProcXChangePointerDevice(client)); +} + +/*********************************************************************** + * + * This procedure changes the device used as the X pointer. + * + */ + +int +ProcXChangePointerDevice(ClientPtr client) +{ + /* REQUEST(xChangePointerDeviceReq); */ + REQUEST_SIZE_MATCH(xChangePointerDeviceReq); + + return BadDevice; +} diff --git a/Xi/chgptr.h b/Xi/chgptr.h new file mode 100644 index 0000000..275511f --- /dev/null +++ b/Xi/chgptr.h @@ -0,0 +1,42 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHGPTR_H +#define CHGPTR_H 1 + +int SProcXChangePointerDevice(ClientPtr /* client */ + ); + +int ProcXChangePointerDevice(ClientPtr /* client */ + ); + +void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */ + ); + +#endif /* CHGPTR_H */ diff --git a/Xi/closedev.c b/Xi/closedev.c new file mode 100644 index 0000000..154e6ce --- /dev/null +++ b/Xi/closedev.c @@ -0,0 +1,164 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to close an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "exglobals.h" + +#include "closedev.h" + +/*********************************************************************** + * + * This procedure closes an input device. + * + */ + +int +SProcXCloseDevice(ClientPtr client) +{ + REQUEST(xCloseDeviceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCloseDeviceReq); + return (ProcXCloseDevice(client)); +} + +/*********************************************************************** + * + * Clear out event selections and passive grabs from a window for the + * specified device. + * + */ + +static void +DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) +{ + InputClientsPtr others; + OtherInputMasks *pOthers; + GrabPtr grab, next; + + if ((pOthers = wOtherInputMasks(pWin)) != 0) + for (others = pOthers->inputClients; others; others = others->next) + if (SameClient(others, client)) + others->mask[dev->id] = NoEventMask; + + for (grab = wPassiveGrabs(pWin); grab; grab = next) { + next = grab->next; + if ((grab->device == dev) && + (client->clientAsMask == CLIENT_BITS(grab->resource))) + FreeResource(grab->resource, RT_NONE); + } +} + +/*********************************************************************** + * + * Walk througth the window tree, deleting event selections for this client + * from this device from all windows. + * + */ + +static void +DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) +{ + WindowPtr p2; + + while (p1) { + p2 = p1->firstChild; + DeleteDeviceEvents(dev, p1, client); + DeleteEventsFromChildren(dev, p2, client); + p1 = p1->nextSib; + } +} + +/*********************************************************************** + * + * This procedure closes an input device. + * + */ + +int +ProcXCloseDevice(ClientPtr client) +{ + int rc, i; + WindowPtr pWin, p1; + DeviceIntPtr d; + + REQUEST(xCloseDeviceReq); + REQUEST_SIZE_MATCH(xCloseDeviceReq); + + rc = dixLookupDevice(&d, stuff->deviceid, client, DixUseAccess); + if (rc != Success) + return rc; + + if (d->deviceGrab.grab && SameClient(d->deviceGrab.grab, client)) + (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */ + + /* Remove event selections from all windows for events from this device + * and selected by this client. + * Delete passive grabs from all windows for this device. */ + + for (i = 0; i < screenInfo.numScreens; i++) { + pWin = screenInfo.screens[i]->root; + DeleteDeviceEvents(d, pWin, client); + p1 = pWin->firstChild; + DeleteEventsFromChildren(d, p1, client); + } + + return Success; +} diff --git a/Xi/closedev.h b/Xi/closedev.h new file mode 100644 index 0000000..798c023 --- /dev/null +++ b/Xi/closedev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CLOSEDEV_H +#define CLOSEDEV_H 1 + +int SProcXCloseDevice(ClientPtr /* client */ + ); + +int ProcXCloseDevice(ClientPtr /* client */ + ); + +#endif /* CLOSEDEV_H */ diff --git a/Xi/devbell.c b/Xi/devbell.c new file mode 100644 index 0000000..202c8de --- /dev/null +++ b/Xi/devbell.c @@ -0,0 +1,149 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to change the keyboard device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" + +#include "devbell.h" + +/*********************************************************************** + * + * This procedure is invoked to swap the request bytes if the server and + * client have a different byte order. + * + */ + +int +SProcXDeviceBell(ClientPtr client) +{ + REQUEST(xDeviceBellReq); + swaps(&stuff->length); + return (ProcXDeviceBell(client)); +} + +/*********************************************************************** + * + * This procedure rings a bell on an extension device. + * + */ + +int +ProcXDeviceBell(ClientPtr client) +{ + DeviceIntPtr dev; + KbdFeedbackPtr k; + BellFeedbackPtr b; + int rc, base; + int newpercent; + CARD8 class; + pointer ctrl; + BellProcPtr proc; + + REQUEST(xDeviceBellReq); + REQUEST_SIZE_MATCH(xDeviceBellReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixBellAccess); + if (rc != Success) { + client->errorValue = stuff->deviceid; + return rc; + } + + if (stuff->percent < -100 || stuff->percent > 100) { + client->errorValue = stuff->percent; + return BadValue; + } + if (stuff->feedbackclass == KbdFeedbackClass) { + for (k = dev->kbdfeed; k; k = k->next) + if (k->ctrl.id == stuff->feedbackid) + break; + if (!k) { + client->errorValue = stuff->feedbackid; + return BadValue; + } + base = k->ctrl.bell; + proc = k->BellProc; + ctrl = (pointer) &(k->ctrl); + class = KbdFeedbackClass; + } + else if (stuff->feedbackclass == BellFeedbackClass) { + for (b = dev->bell; b; b = b->next) + if (b->ctrl.id == stuff->feedbackid) + break; + if (!b) { + client->errorValue = stuff->feedbackid; + return BadValue; + } + base = b->ctrl.percent; + proc = b->BellProc; + ctrl = (pointer) &(b->ctrl); + class = BellFeedbackClass; + } + else { + client->errorValue = stuff->feedbackclass; + return BadValue; + } + newpercent = (base * stuff->percent) / 100; + if (stuff->percent < 0) + newpercent = base + newpercent; + else + newpercent = base - newpercent + stuff->percent; + if (proc == NULL) + return BadValue; + (*proc) (newpercent, dev, ctrl, class); + return Success; +} diff --git a/Xi/devbell.h b/Xi/devbell.h new file mode 100644 index 0000000..2d0b05a --- /dev/null +++ b/Xi/devbell.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef DEVBELL_H +#define DEVBELL_H 1 + +int SProcXDeviceBell(ClientPtr /* client */ + ); + +int ProcXDeviceBell(ClientPtr /* client */ + ); + +#endif /* DEVBELL_H */ diff --git a/Xi/exevents.c b/Xi/exevents.c new file mode 100644 index 0000000..ad02650 --- /dev/null +++ b/Xi/exevents.c @@ -0,0 +1,3066 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/* + * Copyright © 2010 Collabora Ltd. + * Copyright © 2011 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +/******************************************************************** + * + * Routines to register and initialize extension input devices. + * This also contains ProcessOtherEvent, the routine called from DDX + * to route extension events. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" +#include <X11/X.h> +#include <X11/Xproto.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XI2proto.h> +#include <X11/extensions/geproto.h> +#include "windowstr.h" +#include "miscstruct.h" +#include "region.h" +#include "exevents.h" +#include "extnsionst.h" +#include "exglobals.h" +#include "dixevents.h" /* DeliverFocusedEvent */ +#include "dixgrabs.h" /* CreateGrab() */ +#include "scrnintstr.h" +#include "listdev.h" /* for CopySwapXXXClass */ +#include "xace.h" +#include "xiquerydevice.h" /* For List*Info */ +#include "eventconvert.h" +#include "eventstr.h" +#include "inpututils.h" +#include "mi.h" + +#include <X11/extensions/XKBproto.h> +#include "xkbsrv.h" + +#define WID(w) ((w) ? ((w)->drawable.id) : 0) +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) +#define AllButtonsMask ( \ + Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) + +Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , + Bool /* ignoreSelectedEvents */ + ); +static Bool MakeInputMasks(WindowPtr /* pWin */ + ); + +/* + * Only let the given client know of core events which will affect its + * interpretation of input events, if the client's ClientPointer (or the + * paired keyboard) is the current device. + */ +int +XIShouldNotify(ClientPtr client, DeviceIntPtr dev) +{ + DeviceIntPtr current_ptr = PickPointer(client); + DeviceIntPtr current_kbd = GetMaster(current_ptr, KEYBOARD_OR_FLOAT); + + if (dev == current_kbd || dev == current_ptr) + return 1; + + return 0; +} + +Bool +IsPointerEvent(InternalEvent *event) +{ + switch (event->any.type) { + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_Motion: + /* XXX: enter/leave ?? */ + return TRUE; + default: + break; + } + return FALSE; +} + +Bool +IsTouchEvent(InternalEvent *event) +{ + switch (event->any.type) { + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + return TRUE; + default: + break; + } + return FALSE; +} + +/** + * @return the device matching the deviceid of the device set in the event, or + * NULL if the event is not an XInput event. + */ +DeviceIntPtr +XIGetDevice(xEvent *xE) +{ + DeviceIntPtr pDev = NULL; + + if (xE->u.u.type == DeviceButtonPress || + xE->u.u.type == DeviceButtonRelease || + xE->u.u.type == DeviceMotionNotify || + xE->u.u.type == ProximityIn || + xE->u.u.type == ProximityOut || xE->u.u.type == DevicePropertyNotify) { + int rc; + int id; + + id = ((deviceKeyButtonPointer *) xE)->deviceid & ~MORE_EVENTS; + + rc = dixLookupDevice(&pDev, id, serverClient, DixUnknownAccess); + if (rc != Success) + ErrorF("[dix] XIGetDevice failed on XACE restrictions (%d)\n", rc); + } + return pDev; +} + +/** + * Copy the device->key into master->key and send a mapping notify to the + * clients if appropriate. + * master->key needs to be allocated by the caller. + * + * Device is the slave device. If it is attached to a master device, we may + * need to send a mapping notify to the client because it causes the MD + * to change state. + * + * Mapping notify needs to be sent in the following cases: + * - different slave device on same master + * - different master + * + * XXX: They way how the code is we also send a map notify if the slave device + * stays the same, but the master changes. This isn't really necessary though. + * + * XXX: this gives you funny behaviour with the ClientPointer. When a + * MappingNotify is sent to the client, the client usually responds with a + * GetKeyboardMapping. This will retrieve the ClientPointer's keyboard + * mapping, regardless of which keyboard sent the last mapping notify request. + * So depending on the CP setting, your keyboard may change layout in each + * app... + * + * This code is basically the old SwitchCoreKeyboard. + */ + +void +CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) +{ + KeyClassPtr mk = master->key; + + if (device == master) + return; + + mk->sourceid = device->id; + + if (!XkbCopyDeviceKeymap(master, device)) + FatalError("Couldn't pivot keymap from device to core!\n"); +} + +/** + * Copies the feedback classes from device "from" into device "to". Classes + * are duplicated (not just flipping the pointers). All feedback classes are + * linked lists, the full list is duplicated. + */ +static void +DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) +{ + ClassesPtr classes; + + if (from->intfeed) { + IntegerFeedbackPtr *i, it; + + if (!to->intfeed) { + classes = to->unused_classes; + to->intfeed = classes->intfeed; + classes->intfeed = NULL; + } + + i = &to->intfeed; + for (it = from->intfeed; it; it = it->next) { + if (!(*i)) { + *i = calloc(1, sizeof(IntegerFeedbackClassRec)); + if (!(*i)) { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*i)->CtrlProc = it->CtrlProc; + (*i)->ctrl = it->ctrl; + + i = &(*i)->next; + } + } + else if (to->intfeed && !from->intfeed) { + classes = to->unused_classes; + classes->intfeed = to->intfeed; + to->intfeed = NULL; + } + + if (from->stringfeed) { + StringFeedbackPtr *s, it; + + if (!to->stringfeed) { + classes = to->unused_classes; + to->stringfeed = classes->stringfeed; + classes->stringfeed = NULL; + } + + s = &to->stringfeed; + for (it = from->stringfeed; it; it = it->next) { + if (!(*s)) { + *s = calloc(1, sizeof(StringFeedbackClassRec)); + if (!(*s)) { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*s)->CtrlProc = it->CtrlProc; + (*s)->ctrl = it->ctrl; + + s = &(*s)->next; + } + } + else if (to->stringfeed && !from->stringfeed) { + classes = to->unused_classes; + classes->stringfeed = to->stringfeed; + to->stringfeed = NULL; + } + + if (from->bell) { + BellFeedbackPtr *b, it; + + if (!to->bell) { + classes = to->unused_classes; + to->bell = classes->bell; + classes->bell = NULL; + } + + b = &to->bell; + for (it = from->bell; it; it = it->next) { + if (!(*b)) { + *b = calloc(1, sizeof(BellFeedbackClassRec)); + if (!(*b)) { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*b)->BellProc = it->BellProc; + (*b)->CtrlProc = it->CtrlProc; + (*b)->ctrl = it->ctrl; + + b = &(*b)->next; + } + } + else if (to->bell && !from->bell) { + classes = to->unused_classes; + classes->bell = to->bell; + to->bell = NULL; + } + + if (from->leds) { + LedFeedbackPtr *l, it; + + if (!to->leds) { + classes = to->unused_classes; + to->leds = classes->leds; + classes->leds = NULL; + } + + l = &to->leds; + for (it = from->leds; it; it = it->next) { + if (!(*l)) { + *l = calloc(1, sizeof(LedFeedbackClassRec)); + if (!(*l)) { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*l)->CtrlProc = it->CtrlProc; + (*l)->ctrl = it->ctrl; + if ((*l)->xkb_sli) + XkbFreeSrvLedInfo((*l)->xkb_sli); + (*l)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, NULL, *l); + + l = &(*l)->next; + } + } + else if (to->leds && !from->leds) { + classes = to->unused_classes; + classes->leds = to->leds; + to->leds = NULL; + } +} + +static void +DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) +{ + ClassesPtr classes; + + /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the + * kbdfeed to be set up properly, so let's do the feedback classes first. + */ + if (from->kbdfeed) { + KbdFeedbackPtr *k, it; + + if (!to->kbdfeed) { + classes = to->unused_classes; + + to->kbdfeed = classes->kbdfeed; + if (!to->kbdfeed) + InitKeyboardDeviceStruct(to, NULL, NULL, NULL); + classes->kbdfeed = NULL; + } + + k = &to->kbdfeed; + for (it = from->kbdfeed; it; it = it->next) { + if (!(*k)) { + *k = calloc(1, sizeof(KbdFeedbackClassRec)); + if (!*k) { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*k)->BellProc = it->BellProc; + (*k)->CtrlProc = it->CtrlProc; + (*k)->ctrl = it->ctrl; + if ((*k)->xkb_sli) + XkbFreeSrvLedInfo((*k)->xkb_sli); + (*k)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, *k, NULL); + + k = &(*k)->next; + } + } + else if (to->kbdfeed && !from->kbdfeed) { + classes = to->unused_classes; + classes->kbdfeed = to->kbdfeed; + to->kbdfeed = NULL; + } + + if (from->key) { + if (!to->key) { + classes = to->unused_classes; + to->key = classes->key; + if (!to->key) + InitKeyboardDeviceStruct(to, NULL, NULL, NULL); + else + classes->key = NULL; + } + + CopyKeyClass(from, to); + } + else if (to->key && !from->key) { + classes = to->unused_classes; + classes->key = to->key; + to->key = NULL; + } + + /* If a SrvLedInfoPtr's flags are XkbSLI_IsDefault, the names and maps + * pointer point into the xkbInfo->desc struct. XkbCopySrvLedInfo + * didn't update the pointers so we need to do it manually here. + */ + if (to->kbdfeed) { + KbdFeedbackPtr k; + + for (k = to->kbdfeed; k; k = k->next) { + if (!k->xkb_sli) + continue; + if (k->xkb_sli->flags & XkbSLI_IsDefault) { + k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators; + k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps; + } + } + } + + /* We can't just copy over the focus class. When an app sets the focus, + * it'll do so on the master device. Copying the SDs focus means losing + * the focus. + * So we only copy the focus class if the device didn't have one, + * otherwise we leave it as it is. + */ + if (from->focus) { + if (!to->focus) { + WindowPtr *oldTrace; + + classes = to->unused_classes; + to->focus = classes->focus; + if (!to->focus) { + to->focus = calloc(1, sizeof(FocusClassRec)); + if (!to->focus) + FatalError("[Xi] no memory for class shift.\n"); + } + else + classes->focus = NULL; + + oldTrace = to->focus->trace; + memcpy(to->focus, from->focus, sizeof(FocusClassRec)); + to->focus->trace = realloc(oldTrace, + to->focus->traceSize * + sizeof(WindowPtr)); + if (!to->focus->trace && to->focus->traceSize) + FatalError("[Xi] no memory for trace.\n"); + memcpy(to->focus->trace, from->focus->trace, + from->focus->traceSize * sizeof(WindowPtr)); + to->focus->sourceid = from->id; + } + } + else if (to->focus) { + classes = to->unused_classes; + classes->focus = to->focus; + to->focus = NULL; + } + +} + +/* FIXME: this should really be shared with the InitValuatorAxisClassRec and + * similar */ +static void +DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) +{ + ClassesPtr classes; + + /* Feedback classes must be copied first */ + if (from->ptrfeed) { + PtrFeedbackPtr *p, it; + + if (!to->ptrfeed) { + classes = to->unused_classes; + to->ptrfeed = classes->ptrfeed; + classes->ptrfeed = NULL; + } + + p = &to->ptrfeed; + for (it = from->ptrfeed; it; it = it->next) { + if (!(*p)) { + *p = calloc(1, sizeof(PtrFeedbackClassRec)); + if (!*p) { + ErrorF("[Xi] Cannot alloc memory for class copy."); + return; + } + } + (*p)->CtrlProc = it->CtrlProc; + (*p)->ctrl = it->ctrl; + + p = &(*p)->next; + } + } + else if (to->ptrfeed && !from->ptrfeed) { + classes = to->unused_classes; + classes->ptrfeed = to->ptrfeed; + to->ptrfeed = NULL; + } + + if (from->valuator) { + ValuatorClassPtr v; + + if (!to->valuator) { + classes = to->unused_classes; + to->valuator = classes->valuator; + if (to->valuator) + classes->valuator = NULL; + } + + v = AllocValuatorClass(to->valuator, from->valuator->numAxes); + + if (!v) + FatalError("[Xi] no memory for class shift.\n"); + + to->valuator = v; + memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); + + v->sourceid = from->id; + } + else if (to->valuator && !from->valuator) { + classes = to->unused_classes; + classes->valuator = to->valuator; + to->valuator = NULL; + } + + if (from->button) { + if (!to->button) { + classes = to->unused_classes; + to->button = classes->button; + if (!to->button) { + to->button = calloc(1, sizeof(ButtonClassRec)); + if (!to->button) + FatalError("[Xi] no memory for class shift.\n"); + } + else + classes->button = NULL; + } + + if (from->button->xkb_acts) { + if (!to->button->xkb_acts) { + 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 + free(to->button->xkb_acts); + + memcpy(to->button->labels, from->button->labels, + from->button->numButtons * sizeof(Atom)); + to->button->sourceid = from->id; + } + else if (to->button && !from->button) { + classes = to->unused_classes; + classes->button = to->button; + to->button = NULL; + } + + if (from->proximity) { + if (!to->proximity) { + classes = to->unused_classes; + to->proximity = classes->proximity; + if (!to->proximity) { + to->proximity = calloc(1, sizeof(ProximityClassRec)); + if (!to->proximity) + FatalError("[Xi] no memory for class shift.\n"); + } + else + classes->proximity = NULL; + } + memcpy(to->proximity, from->proximity, sizeof(ProximityClassRec)); + to->proximity->sourceid = from->id; + } + else if (to->proximity) { + classes = to->unused_classes; + classes->proximity = to->proximity; + to->proximity = NULL; + } + + if (from->touch) { + TouchClassPtr t, f; + + if (!to->touch) { + classes = to->unused_classes; + to->touch = classes->touch; + if (!to->touch) { + int i; + + to->touch = calloc(1, sizeof(TouchClassRec)); + if (!to->touch) + FatalError("[Xi] no memory for class shift.\n"); + to->touch->num_touches = from->touch->num_touches; + to->touch->touches = calloc(to->touch->num_touches, + sizeof(TouchPointInfoRec)); + for (i = 0; i < to->touch->num_touches; i++) + TouchInitTouchPoint(to->touch, to->valuator, i); + if (!to->touch) + FatalError("[Xi] no memory for class shift.\n"); + } + else + classes->touch = NULL; + } + + t = to->touch; + f = from->touch; + t->sourceid = f->sourceid; + t->max_touches = f->max_touches; + t->mode = f->mode; + t->buttonsDown = f->buttonsDown; + t->state = f->state; + t->motionMask = f->motionMask; + /* to->touches and to->num_touches are separate on the master, + * don't copy */ + } + /* Don't remove touch class if from->touch is non-existent. The to device + * may have an active touch grab, so we need to keep the touch class record + * around. */ +} + +/** + * Copies the CONTENT of the classes of device from into the classes in device + * to. From and to are identical after finishing. + * + * If to does not have classes from currenly has, the classes are stored in + * to's devPrivates system. Later, we recover it again from there if needed. + * Saves a few memory allocations. + */ +void +DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, + DeviceChangedEvent *dce) +{ + /* generic feedback classes, not tied to pointer and/or keyboard */ + DeepCopyFeedbackClasses(from, to); + + if ((dce->flags & DEVCHANGE_KEYBOARD_EVENT)) + DeepCopyKeyboardClasses(from, to); + if ((dce->flags & DEVCHANGE_POINTER_EVENT)) + DeepCopyPointerClasses(from, to); +} + +/** + * Send an XI2 DeviceChangedEvent to all interested clients. + */ +void +XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce) +{ + xXIDeviceChangedEvent *dcce; + int rc; + + rc = EventToXI2((InternalEvent *) dce, (xEvent **) &dcce); + if (rc != Success) { + ErrorF("[Xi] event conversion from DCE failed with code %d\n", rc); + return; + } + + /* we don't actually swap if there's a NullClient, swapping is done + * later when event is delivered. */ + SendEventToAllWindows(device, XI_DeviceChangedMask, (xEvent *) dcce, 1); + free(dcce); +} + +static void +ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce) +{ + DeviceIntPtr slave; + int rc; + + /* For now, we don't have devices that change physically. */ + if (!IsMaster(device)) + return; + + rc = dixLookupDevice(&slave, dce->sourceid, serverClient, DixReadAccess); + + if (rc != Success) + return; /* Device has disappeared */ + + if (IsMaster(slave)) + return; + + if (IsFloating(slave)) + return; /* set floating since the event */ + + if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid) + return; /* not our slave anymore, don't care */ + + /* FIXME: we probably need to send a DCE for the new slave now */ + + device->public.devicePrivate = slave->public.devicePrivate; + + /* FIXME: the classes may have changed since we generated the event. */ + DeepCopyDeviceClasses(slave, device, dce); + dce->deviceid = device->id; + XISendDeviceChangedEvent(device, dce); +} + +/** + * Add state and motionMask to the filter for this event. The protocol + * supports some extra masks for motion when a button is down: + * ButtonXMotionMask and the DeviceButtonMotionMask to trigger only when at + * least one button (or that specific button is down). These masks need to + * be added to the filters for core/XI motion events. + * + * @param device The device to update the mask for + * @param state The current button state mask + * @param motion_mask The motion mask (DeviceButtonMotionMask or 0) + */ +static void +UpdateDeviceMotionMask(DeviceIntPtr device, unsigned short state, + Mask motion_mask) +{ + Mask mask; + + mask = DevicePointerMotionMask | state | motion_mask; + SetMaskForEvent(device->id, mask, DeviceMotionNotify); + mask = PointerMotionMask | state | motion_mask; + SetMaskForEvent(device->id, mask, MotionNotify); +} + +static void +IncreaseButtonCount(DeviceIntPtr dev, int key, CARD8 *buttons_down, + Mask *motion_mask, unsigned short *state) +{ + if (dev->valuator) + dev->valuator->motionHintWindow = NullWindow; + + (*buttons_down)++; + *motion_mask = DeviceButtonMotionMask; + if (dev->button->map[key] <= 5) + *state |= (Button1Mask >> 1) << dev->button->map[key]; +} + +static void +DecreaseButtonCount(DeviceIntPtr dev, int key, CARD8 *buttons_down, + Mask *motion_mask, unsigned short *state) +{ + if (dev->valuator) + dev->valuator->motionHintWindow = NullWindow; + + if (*buttons_down >= 1 && !--(*buttons_down)) + *motion_mask = 0; + if (dev->button->map[key] <= 5) + *state &= ~((Button1Mask >> 1) << dev->button->map[key]); +} + +/** + * Update the device state according to the data in the event. + * + * return values are + * DEFAULT ... process as normal + * DONT_PROCESS ... return immediately from caller + */ +#define DEFAULT 0 +#define DONT_PROCESS 1 +int +UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event) +{ + int i; + int key = 0, last_valuator; + + KeyClassPtr k = NULL; + ButtonClassPtr b = NULL; + ValuatorClassPtr v = NULL; + TouchClassPtr t = NULL; + + /* This event is always the first we get, before the actual events with + * the data. However, the way how the DDX is set up, "device" will + * actually be the slave device that caused the event. + */ + switch (event->type) { + case ET_DeviceChanged: + ChangeMasterDeviceClasses(device, (DeviceChangedEvent *) event); + return DONT_PROCESS; /* event has been sent already */ + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + break; + default: + /* other events don't update the device */ + return DEFAULT; + } + + k = device->key; + v = device->valuator; + b = device->button; + t = device->touch; + + key = event->detail.key; + + /* Update device axis */ + /* Check valuators first */ + last_valuator = -1; + for (i = 0; i < MAX_VALUATORS; i++) { + if (BitIsOn(&event->valuators.mask, i)) { + if (!v) { + ErrorF("[Xi] Valuators reported for non-valuator device '%s'. " + "Ignoring event.\n", device->name); + return DONT_PROCESS; + } + else if (v->numAxes < i) { + ErrorF("[Xi] Too many valuators reported for device '%s'. " + "Ignoring event.\n", device->name); + return DONT_PROCESS; + } + last_valuator = i; + } + } + + for (i = 0; i <= last_valuator && i < v->numAxes; i++) { + /* XXX: Relative/Absolute mode */ + if (BitIsOn(&event->valuators.mask, i)) + v->axisVal[i] = event->valuators.data[i]; + } + + if (event->type == ET_KeyPress) { + if (!k) + return DONT_PROCESS; + + /* don't allow ddx to generate multiple downs, but repeats are okay */ + if (key_is_down(device, key, KEY_PROCESSED) && !event->key_repeat) + return DONT_PROCESS; + + if (device->valuator) + device->valuator->motionHintWindow = NullWindow; + set_key_down(device, key, KEY_PROCESSED); + } + else if (event->type == ET_KeyRelease) { + if (!k) + return DONT_PROCESS; + + if (!key_is_down(device, key, KEY_PROCESSED)) /* guard against duplicates */ + return DONT_PROCESS; + if (device->valuator) + device->valuator->motionHintWindow = NullWindow; + set_key_up(device, key, KEY_PROCESSED); + } + else if (event->type == ET_ButtonPress) { + if (!b) + return DONT_PROCESS; + + if (button_is_down(device, key, BUTTON_PROCESSED)) + return DONT_PROCESS; + + set_button_down(device, key, BUTTON_PROCESSED); + + if (!b->map[key]) + return DONT_PROCESS; + + IncreaseButtonCount(device, key, &b->buttonsDown, &b->motionMask, + &b->state); + UpdateDeviceMotionMask(device, b->state, b->motionMask); + } + else if (event->type == ET_ButtonRelease) { + if (!b) + return DONT_PROCESS; + + if (!button_is_down(device, key, BUTTON_PROCESSED)) + return DONT_PROCESS; + if (IsMaster(device)) { + DeviceIntPtr sd; + + /* + * Leave the button down if any slave has the + * button still down. Note that this depends on the + * event being delivered through the slave first + */ + for (sd = inputInfo.devices; sd; sd = sd->next) { + if (IsMaster(sd) || GetMaster(sd, MASTER_POINTER) != device) + continue; + if (!sd->button) + continue; + for (i = 1; i <= sd->button->numButtons; i++) + if (sd->button->map[i] == key && + button_is_down(sd, i, BUTTON_PROCESSED)) + return DONT_PROCESS; + } + } + set_button_up(device, key, BUTTON_PROCESSED); + if (!b->map[key]) + return DONT_PROCESS; + + DecreaseButtonCount(device, key, &b->buttonsDown, &b->motionMask, + &b->state); + UpdateDeviceMotionMask(device, b->state, b->motionMask); + } + else if (event->type == ET_ProximityIn) + device->proximity->in_proximity = TRUE; + else if (event->type == ET_ProximityOut) + device->proximity->in_proximity = FALSE; + else if (event->type == ET_TouchBegin) { + BUG_RETURN_VAL(!b || !v, DONT_PROCESS); + BUG_RETURN_VAL(!t, DONT_PROCESS); + + if (!b->map[key]) + return DONT_PROCESS; + + if (!(event->flags & TOUCH_POINTER_EMULATED) || + (event->flags & TOUCH_REPLAYING)) + return DONT_PROCESS; + + IncreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask, + &t->state); + UpdateDeviceMotionMask(device, t->state, DeviceButtonMotionMask); + } + else if (event->type == ET_TouchEnd) { + BUG_RETURN_VAL(!b || !v, DONT_PROCESS); + BUG_RETURN_VAL(!t, DONT_PROCESS); + + if (t->buttonsDown <= 0 || !b->map[key]) + return DONT_PROCESS; + + if (!(event->flags & TOUCH_POINTER_EMULATED)) + return DONT_PROCESS; + + DecreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask, + &t->state); + UpdateDeviceMotionMask(device, t->state, DeviceButtonMotionMask); + } + + return DEFAULT; +} + +/** + * A client that does not have the TouchOwnership mask set may not receive a + * TouchBegin event if there is at least one grab active. + * + * @return TRUE if the client selected for ownership events on the given + * window for this device, FALSE otherwise + */ +static inline Bool +TouchClientWantsOwnershipEvents(ClientPtr client, DeviceIntPtr dev, + WindowPtr win) +{ + InputClients *iclient; + + nt_list_for_each_entry(iclient, wOtherInputMasks(win)->inputClients, next) { + if (rClient(iclient) != client) + continue; + + return xi2mask_isset(iclient->xi2mask, dev, XI_TouchOwnership); + } + + return FALSE; +} + +static void +TouchSendOwnershipEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, int reason, + XID resource) +{ + int nev, i; + InternalEvent *tel = InitEventList(GetMaximumEventsNum()); + + nev = GetTouchOwnershipEvents(tel, dev, ti, reason, resource, 0); + for (i = 0; i < nev; i++) + mieqProcessDeviceEvent(dev, tel + i, NULL); + + FreeEventList(tel, GetMaximumEventsNum()); +} + +/** + * Attempts to deliver a touch event to the given client. + */ +static Bool +DeliverOneTouchEvent(ClientPtr client, DeviceIntPtr dev, TouchPointInfoPtr ti, + GrabPtr grab, WindowPtr win, InternalEvent *ev) +{ + int err; + xEvent *xi2; + Mask filter; + Window child = DeepestSpriteWin(&ti->sprite)->drawable.id; + + /* FIXME: owner event handling */ + + /* If the client does not have the ownership mask set and is not + * the current owner of the touch, only pretend we delivered */ + if (!grab && ti->num_grabs != 0 && + !TouchClientWantsOwnershipEvents(client, dev, win)) + return TRUE; + + /* If we fail here, we're going to leave a client hanging. */ + err = EventToXI2(ev, &xi2); + if (err != Success) + FatalError("[Xi] %s: XI2 conversion failed in %s" + " (%d)\n", dev->name, __func__, err); + + FixUpEventFromWindow(&ti->sprite, xi2, win, child, FALSE); + filter = GetEventFilter(dev, xi2); + if (XaceHook(XACE_RECEIVE_ACCESS, client, win, xi2, 1) != Success) + return FALSE; + err = TryClientEvents(client, dev, xi2, 1, filter, filter, NullGrab); + free(xi2); + + /* Returning the value from TryClientEvents isn't useful, since all our + * resource-gone cleanups will update the delivery list anyway. */ + return TRUE; +} + +static void +ActivateEarlyAccept(DeviceIntPtr dev, TouchPointInfoPtr ti) +{ + ClientPtr client; + XID error; + GrabPtr grab = ti->listeners[0].grab; + + BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB && + ti->listeners[0].type != LISTENER_POINTER_GRAB); + BUG_RETURN(!grab); + + client = rClient(grab); + + if (TouchAcceptReject(client, dev, XIAcceptTouch, ti->client_id, + ti->listeners[0].window->drawable.id, &error) != Success) + ErrorF("[Xi] Failed to accept touch grab after early acceptance.\n"); +} + +/** + * Find the oldest touch that still has a pointer emulation client. + * + * Pointer emulation can only be performed for the oldest touch. Otherwise, the + * order of events seen by the client will be wrong. This function helps us find + * the next touch to be emulated. + * + * @param dev The device to find touches for. + */ +static TouchPointInfoPtr +FindOldestPointerEmulatedTouch(DeviceIntPtr dev) +{ + TouchPointInfoPtr oldest = NULL; + int i; + + for (i = 0; i < dev->touch->num_touches; i++) { + TouchPointInfoPtr ti = dev->touch->touches + i; + int j; + + if (!ti->active || !ti->emulate_pointer) + continue; + + for (j = 0; j < ti->num_listeners; j++) { + if (ti->listeners[j].type == LISTENER_POINTER_GRAB || + ti->listeners[j].type == LISTENER_POINTER_REGULAR) + break; + } + if (j == ti->num_listeners) + continue; + + if (!oldest) { + oldest = ti; + continue; + } + + if (oldest->client_id - ti->client_id < UINT_MAX / 2) + oldest = ti; + } + + return oldest; +} + +/** + * If the current owner has rejected the event, deliver the + * TouchOwnership/TouchBegin to the next item in the sprite stack. + */ +static void +TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti, + TouchOwnershipEvent *ev) +{ + TouchListener *listener = &ti->listeners[0]; /* new owner */ + int accepted_early = listener->state == LISTENER_EARLY_ACCEPT; + + /* Deliver the ownership */ + if (listener->state == LISTENER_AWAITING_OWNER || accepted_early) + DeliverTouchEvents(dev, ti, (InternalEvent *) ev, + listener->listener); + else if (listener->state == LISTENER_AWAITING_BEGIN) { + /* We can't punt to a pointer listener unless all older pointer + * emulated touches have been seen already. */ + if ((listener->type == LISTENER_POINTER_GRAB || + listener->type == LISTENER_POINTER_REGULAR) && + ti != FindOldestPointerEmulatedTouch(dev)) + return; + + TouchEventHistoryReplay(ti, dev, listener->listener); + } + + /* New owner has Begin/Update but not end. If touch is pending_finish, + * emulate the TouchEnd now */ + if (ti->pending_finish) { + TouchEmitTouchEnd(dev, ti, 0, 0); + + /* If the last owner is not a touch grab, finalise the touch, we + won't get more correspondence on this. + */ + if (ti->num_listeners == 1 && + (ti->num_grabs == 0 || + listener->grab->grabtype != XI2 || + !xi2mask_isset(listener->grab->xi2mask, dev, XI_TouchBegin))) { + TouchEndTouch(dev, ti); + return; + } + } + + if (accepted_early) + ActivateEarlyAccept(dev, ti); +} + +/** + * Check the oldest touch to see if it needs to be replayed to its pointer + * owner. + * + * Touch event propagation is paused if it hits a pointer listener while an + * older touch with a pointer listener is waiting on accept or reject. This + * function will restart propagation of a paused touch if needed. + * + * @param dev The device to check touches for. + */ +static void +CheckOldestTouch(DeviceIntPtr dev) +{ + TouchPointInfoPtr oldest = FindOldestPointerEmulatedTouch(dev); + + if (oldest && oldest->listeners[0].state == LISTENER_AWAITING_BEGIN) + TouchPuntToNextOwner(dev, oldest, NULL); +} + +/** + * Process a touch rejection. + * + * @param sourcedev The source device of the touch sequence. + * @param ti The touchpoint info record. + * @param resource The resource of the client rejecting the touch. + * @param ev TouchOwnership event to send. Set to NULL if no event should be + * sent. + */ +void +TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource, + TouchOwnershipEvent *ev) +{ + Bool was_owner = (resource == ti->listeners[0].listener); + int i; + + /* Send a TouchEnd event to the resource being removed, but only if they + * haven't received one yet already */ + for (i = 0; i < ti->num_listeners; i++) { + if (ti->listeners[i].listener == resource) { + if (ti->listeners[i].state != LISTENER_HAS_END) + TouchEmitTouchEnd(sourcedev, ti, TOUCH_REJECT, resource); + break; + } + } + + /* Remove the resource from the listener list, updating + * ti->num_listeners, as well as ti->num_grabs if it was a grab. */ + TouchRemoveListener(ti, resource); + + /* If the current owner was removed and there are further listeners, deliver + * the TouchOwnership or TouchBegin event to the new owner. */ + if (ev && ti->num_listeners > 0 && was_owner) + TouchPuntToNextOwner(sourcedev, ti, ev); + else if (ti->num_listeners == 0) + TouchEndTouch(sourcedev, ti); + + CheckOldestTouch(sourcedev); +} + +/** + * Processes a TouchOwnership event, indicating a grab has accepted the touch + * it currently owns, or a grab or selection has been removed. Will generate + * and send TouchEnd events to all clients removed from the delivery list, as + * well as possibly sending the new TouchOwnership event. May end the + * touchpoint if it is pending finish. + */ +static void +ProcessTouchOwnershipEvent(TouchOwnershipEvent *ev, + DeviceIntPtr dev) +{ + TouchPointInfoPtr ti = TouchFindByClientID(dev, ev->touchid); + + if (!ti) { + DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n", + dev->name, ev->type, ev->touchid); + return; + } + + if (ev->reason == XIRejectTouch) + TouchRejected(dev, ti, ev->resource, ev); + else if (ev->reason == XIAcceptTouch) { + int i; + + + /* For pointer-emulated listeners that ungrabbed the active grab, + * the state was forced to LISTENER_HAS_END. Still go + * through the motions of ending the touch if the listener has + * already seen the end. This ensures that the touch record is ended in + * the server. + */ + if (ti->listeners[0].state == LISTENER_HAS_END) + TouchEmitTouchEnd(dev, ti, TOUCH_ACCEPT, ti->listeners[0].listener); + + /* The touch owner has accepted the touch. Send TouchEnd events to + * everyone else, and truncate the list of listeners. */ + for (i = 1; i < ti->num_listeners; i++) + TouchEmitTouchEnd(dev, ti, TOUCH_ACCEPT, ti->listeners[i].listener); + + while (ti->num_listeners > 1) + TouchRemoveListener(ti, ti->listeners[1].listener); + /* Owner accepted after receiving end */ + if (ti->listeners[0].state == LISTENER_HAS_END) + TouchEndTouch(dev, ti); + else + ti->listeners[0].state = LISTENER_HAS_ACCEPTED; + } + else { /* this is the very first ownership event for a grab */ + DeliverTouchEvents(dev, ti, (InternalEvent *) ev, ev->resource); + } +} + +/** + * Copy the event's valuator information into the touchpoint, we may need + * this for emulated TouchEnd events. + */ +static void +TouchCopyValuatorData(DeviceEvent *ev, TouchPointInfoPtr ti) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ev->valuators.data); i++) + if (BitIsOn(ev->valuators.mask, i)) + valuator_mask_set_double(ti->valuators, i, ev->valuators.data[i]); +} + +/** + * Given a touch event and a potential listener, retrieve info needed for + * processing the event. + * + * @param dev The device generating the touch event. + * @param ti The touch point info record for the touch event. + * @param ev The touch event to process. + * @param listener The touch event listener that may receive the touch event. + * @param[out] client The client that should receive the touch event. + * @param[out] win The window to deliver the event on. + * @param[out] grab The grab to deliver the event through, if any. + * @param[out] mask The XI 2.x event mask of the grab or selection, if any. + * @return TRUE if an event should be delivered to the listener, FALSE + * otherwise. + */ +static Bool +RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti, + InternalEvent *ev, TouchListener * listener, + ClientPtr *client, WindowPtr *win, GrabPtr *grab, + XI2Mask **mask) +{ + int rc; + InputClients *iclients = NULL; + *mask = NULL; + + if (listener->type == LISTENER_GRAB || + listener->type == LISTENER_POINTER_GRAB) { + + *grab = listener->grab; + + BUG_RETURN_VAL(!*grab, FALSE); + + *client = rClient(*grab); + *win = (*grab)->window; + *mask = (*grab)->xi2mask; + } + else { + rc = dixLookupResourceByType((pointer *) win, listener->listener, + listener->resource_type, + serverClient, DixSendAccess); + if (rc != Success) + return FALSE; + + if (listener->level == XI2) { + int evtype; + + if (ti->emulate_pointer && + listener->type == LISTENER_POINTER_REGULAR) + evtype = GetXI2Type(TouchGetPointerEventType(ev)); + else + evtype = GetXI2Type(ev->any.type); + + nt_list_for_each_entry(iclients, + wOtherInputMasks(*win)->inputClients, next) + if (xi2mask_isset(iclients->xi2mask, dev, evtype)) + break; + + BUG_RETURN_VAL(!iclients, FALSE); + + *mask = iclients->xi2mask; + *client = rClient(iclients); + } + else if (listener->level == XI) { + int xi_type = GetXIType(TouchGetPointerEventType(ev)); + Mask xi_filter = event_get_filter_from_type(dev, xi_type); + + nt_list_for_each_entry(iclients, + wOtherInputMasks(*win)->inputClients, next) + if (iclients->mask[dev->id] & xi_filter) + break; + BUG_RETURN_VAL(!iclients, FALSE); + + *client = rClient(iclients); + } + else { + int coretype = GetCoreType(TouchGetPointerEventType(ev)); + Mask core_filter = event_get_filter_from_type(dev, coretype); + OtherClients *oclients; + + /* all others */ + nt_list_for_each_entry(oclients, + (OtherClients *) wOtherClients(*win), next) + if (oclients->mask & core_filter) + break; + + /* if owner selected, oclients is NULL */ + *client = oclients ? rClient(oclients) : wClient(*win); + } + + *grab = NULL; + } + + return TRUE; +} + +static int +DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, + InternalEvent *ev, TouchListener * listener, + ClientPtr client, WindowPtr win, GrabPtr grab, + XI2Mask *xi2mask) +{ + InternalEvent motion, button; + InternalEvent *ptrev = &motion; + int nevents; + DeviceIntPtr kbd; + + /* We don't deliver pointer events to non-owners */ + if (!TouchResourceIsOwner(ti, listener->listener)) + return !Success; + + nevents = TouchConvertToPointerEvent(ev, &motion, &button); + BUG_RETURN_VAL(nevents == 0, BadValue); + + if (nevents > 1) + ptrev = &button; + + kbd = GetMaster(dev, KEYBOARD_OR_FLOAT); + event_set_state(dev, kbd, &ptrev->device_event); + ptrev->device_event.corestate = event_get_corestate(dev, kbd); + + if (grab) { + /* this side-steps the usual activation mechanisms, but... */ + if (ev->any.type == ET_TouchBegin && !dev->deviceGrab.grab) + ActivatePassiveGrab(dev, grab, ptrev, ev); /* also delivers the event */ + else { + int deliveries = 0; + + /* 'grab' is the passive grab, but if the grab isn't active, + * don't deliver */ + if (!dev->deviceGrab.grab) + return !Success; + + if (grab->ownerEvents) { + WindowPtr focus = NullWindow; + WindowPtr sprite_win = dev->spriteInfo->sprite->win; + + deliveries = DeliverDeviceEvents(sprite_win, ptrev, grab, focus, dev); + } + + if (!deliveries) + deliveries = DeliverOneGrabbedEvent(ptrev, dev, grab->grabtype); + + /* We must accept the touch sequence once a pointer listener has + * received one event past ButtonPress. */ + if (deliveries && ev->any.type != ET_TouchBegin && + !(ev->device_event.flags & TOUCH_CLIENT_ID)) + TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); + + if (ev->any.type == ET_TouchEnd && + ti->num_listeners == 1 && + !dev->button->buttonsDown && + dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) { + (*dev->deviceGrab.DeactivateGrab) (dev); + CheckOldestTouch(dev); + return Success; + } + } + } + else { + GrabPtr devgrab = dev->deviceGrab.grab; + + DeliverDeviceEvents(win, ptrev, grab, win, dev); + /* FIXME: bad hack + * Implicit passive grab activated in response to this event. Store + * the event. + */ + if (!devgrab && dev->deviceGrab.grab && dev->deviceGrab.implicitGrab) { + TouchListener *l; + GrabPtr g; + + devgrab = dev->deviceGrab.grab; + g = AllocGrab(devgrab); + BUG_WARN(!g); + + *dev->deviceGrab.sync.event = ev->device_event; + + /* The listener array has a sequence of grabs and then one event + * selection. Implicit grab activation occurs through delivering an + * event selection. Thus, we update the last listener in the array. + */ + l = &ti->listeners[ti->num_listeners - 1]; + l->listener = g->resource; + l->grab = g; + //l->resource_type = RT_NONE; + + if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin) + l->type = LISTENER_POINTER_GRAB; + else + l->type = LISTENER_GRAB; + } + + } + if (ev->any.type == ET_TouchBegin) + listener->state = LISTENER_IS_OWNER; + else if (ev->any.type == ET_TouchEnd) + listener->state = LISTENER_HAS_END; + + return Success; +} + +static void +DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, + InternalEvent *ev) +{ + InternalEvent motion; + + if (ti->num_listeners) { + ClientPtr client; + WindowPtr win; + GrabPtr grab; + XI2Mask *mask; + + if (ti->listeners[0].type != LISTENER_POINTER_REGULAR && + ti->listeners[0].type != LISTENER_POINTER_GRAB) + return; + + motion = *ev; + motion.any.type = ET_TouchUpdate; + motion.device_event.detail.button = 0; + + if (!RetrieveTouchDeliveryData(dev, ti, &motion, + &ti->listeners[0], &client, &win, &grab, + &mask)) + return; + + /* There may be a pointer grab on the device */ + if (!grab) { + grab = dev->deviceGrab.grab; + if (grab) { + win = grab->window; + mask = grab->xi2mask; + client = rClient(grab); + } + } + + DeliverTouchEmulatedEvent(dev, ti, &motion, &ti->listeners[0], client, + win, grab, mask); + } + else { + InternalEvent button; + int converted; + + converted = TouchConvertToPointerEvent(ev, &motion, &button); + + BUG_WARN(converted == 0); + if (converted) + ProcessOtherEvent(&motion, dev); + } +} + +/** + * Processes and delivers a TouchBegin, TouchUpdate, or a + * TouchEnd event. + * + * Due to having rather different delivery semantics (see the Xi 2.2 protocol + * spec for more information), this implements its own grab and event-selection + * delivery logic. + */ +static void +ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) +{ + TouchClassPtr t = dev->touch; + TouchPointInfoPtr ti; + uint32_t touchid; + int type = ev->any.type; + int emulate_pointer = ! !(ev->device_event.flags & TOUCH_POINTER_EMULATED); + DeviceIntPtr kbd; + + if (!t) + return; + + touchid = ev->device_event.touchid; + + if (type == ET_TouchBegin && !(ev->device_event.flags & TOUCH_REPLAYING)) { + ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, + emulate_pointer); + } + else + ti = TouchFindByClientID(dev, touchid); + + /* Active pointer grab */ + if (emulate_pointer && dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab && + (dev->deviceGrab.grab->grabtype == CORE || + dev->deviceGrab.grab->grabtype == XI || + !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))) + { + /* Active pointer grab on touch point and we get a TouchEnd - claim this + * touchpoint accepted, otherwise clients waiting for ownership will + * wait on this touchpoint until this client ungrabs, or the cows come + * home, whichever is earlier */ + if (ti && type == ET_TouchEnd) + TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); + else if (!ti && type != ET_TouchBegin) { + /* Under the following circumstances we create a new touch record for an + * existing touch: + * + * - The touch may be pointer emulated + * - An explicit grab is active on the device + * - The grab is a pointer grab + * + * This allows for an explicit grab to receive pointer events for an already + * active touch. + */ + ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, + emulate_pointer); + if (!ti) { + DebugF("[Xi] %s: Failed to create new dix record for explicitly " + "grabbed touchpoint %d\n", + dev->name, touchid); + return; + } + + TouchBuildSprite(dev, ti, ev); + TouchSetupListeners(dev, ti, ev); + } + } + + if (!ti) { + DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n", + dev->name, type, touchid); + return; + } + + /* if emulate_pointer is set, emulate the motion event right + * here, so we can ignore it for button event emulation. TouchUpdate + * events which _only_ emulate motion just work normally */ + if (emulate_pointer && ev->any.type != ET_TouchUpdate) + DeliverEmulatedMotionEvent(dev, ti, ev); + + if (emulate_pointer && IsMaster(dev)) + CheckMotion(&ev->device_event, dev); + + kbd = GetMaster(dev, KEYBOARD_OR_FLOAT); + event_set_state(NULL, kbd, &ev->device_event); + ev->device_event.corestate = event_get_corestate(NULL, kbd); + + /* Make sure we have a valid window trace for event delivery; must be + * called after event type mutation. Touch end events are always processed + * in order to end touch records. */ + /* FIXME: check this */ + if ((type == ET_TouchBegin && + !(ev->device_event.flags & TOUCH_REPLAYING) && + !TouchBuildSprite(dev, ti, ev)) || + (type != ET_TouchEnd && ti->sprite.spriteTraceGood == 0)) + return; + + TouchCopyValuatorData(&ev->device_event, ti); + /* WARNING: the event type may change to TouchUpdate in + * DeliverTouchEvents if a TouchEnd was delivered to a grabbing + * owner */ + DeliverTouchEvents(dev, ti, ev, ev->device_event.resource); + if (ev->any.type == ET_TouchEnd) + TouchEndTouch(dev, ti); + + if (emulate_pointer) + UpdateDeviceState(dev, &ev->device_event); +} + +static void +ProcessBarrierEvent(InternalEvent *e, DeviceIntPtr dev) +{ + Mask filter; + WindowPtr pWin; + BarrierEvent *be = &e->barrier_event; + xEvent *ev; + int rc; + GrabPtr grab = dev->deviceGrab.grab; + + if (!IsMaster(dev)) + return; + + if (dixLookupWindow(&pWin, be->window, serverClient, DixReadAccess) != Success) + return; + + if (grab) + be->flags |= XIBarrierDeviceIsGrabbed; + + rc = EventToXI2(e, &ev); + if (rc != Success) { + ErrorF("[Xi] event conversion from %s failed with code %d\n", __func__, rc); + return; + } + + /* A client has a grab, deliver to this client if the grab_window is the + barrier window. + + Otherwise, deliver normally to the client. + */ + if (grab && + CLIENT_ID(be->barrierid) == CLIENT_ID(grab->resource) && + grab->window->drawable.id == be->window) { + DeliverGrabbedEvent(e, dev, FALSE); + } else { + filter = GetEventFilter(dev, ev); + + DeliverEventsToWindow(dev, pWin, ev, 1, + filter, NullGrab); + } + free(ev); +} + +/** + * Process DeviceEvents and DeviceChangedEvents. + */ +static void +ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device) +{ + GrabPtr grab; + Bool deactivateDeviceGrab = FALSE; + int key = 0, rootX, rootY; + ButtonClassPtr b; + int ret = 0; + int corestate; + DeviceIntPtr mouse = NULL, kbd = NULL; + DeviceEvent *event = &ev->device_event; + + if (IsPointerDevice(device)) { + kbd = GetMaster(device, KEYBOARD_OR_FLOAT); + mouse = device; + if (!kbd->key) /* can happen with floating SDs */ + kbd = NULL; + } + else { + mouse = GetMaster(device, POINTER_OR_FLOAT); + kbd = device; + if (!mouse->valuator || !mouse->button) /* may be float. SDs */ + mouse = NULL; + } + + corestate = event_get_corestate(mouse, kbd); + event_set_state(mouse, kbd, event); + + ret = UpdateDeviceState(device, event); + if (ret == DONT_PROCESS) + return; + + b = device->button; + + if (IsMaster(device) || IsFloating(device)) + CheckMotion(event, device); + + switch (event->type) { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + GetSpritePosition(device, &rootX, &rootY); + event->root_x = rootX; + event->root_y = rootY; + NoticeEventTime((InternalEvent *) event, device); + event->corestate = corestate; + key = event->detail.key; + break; + default: + break; + } + + if (DeviceEventCallback && !syncEvents.playingEvents) { + DeviceEventInfoRec eventinfo; + SpritePtr pSprite = device->spriteInfo->sprite; + + /* see comment in EnqueueEvents regarding the next three lines */ + if (ev->any.type == ET_Motion) + ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id; + + eventinfo.device = device; + eventinfo.event = ev; + CallCallbacks(&DeviceEventCallback, (pointer) &eventinfo); + } + + grab = device->deviceGrab.grab; + + switch (event->type) { + case ET_KeyPress: + if (!grab && CheckDeviceGrabs(device, event, 0)) + return; + break; + case ET_KeyRelease: + if (grab && device->deviceGrab.fromPassiveGrab && + (key == device->deviceGrab.activatingKey) && + GrabIsKeyboardGrab(device->deviceGrab.grab)) + deactivateDeviceGrab = TRUE; + break; + case ET_ButtonPress: + if (b->map[key] == 0) /* there's no button 0 */ + return; + event->detail.button = b->map[key]; + if (!grab && CheckDeviceGrabs(device, event, 0)) { + /* if a passive grab was activated, the event has been sent + * already */ + return; + } + break; + case ET_ButtonRelease: + if (b->map[key] == 0) /* there's no button 0 */ + return; + event->detail.button = b->map[key]; + if (grab && !b->buttonsDown && + device->deviceGrab.fromPassiveGrab && + GrabIsPointerGrab(device->deviceGrab.grab)) + deactivateDeviceGrab = TRUE; + default: + break; + } + + if (grab) + DeliverGrabbedEvent((InternalEvent *) event, device, + deactivateDeviceGrab); + else if (device->focus && !IsPointerEvent(ev)) + DeliverFocusedEvent(device, (InternalEvent *) event, + GetSpriteWindow(device)); + else + DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent *) event, + NullGrab, NullWindow, device); + + if (deactivateDeviceGrab == TRUE) { + (*device->deviceGrab.DeactivateGrab) (device); + + if (!IsMaster (device) && !IsFloating (device)) { + int flags, num_events = 0; + InternalEvent dce; + + flags = (IsPointerDevice (device)) ? + DEVCHANGE_POINTER_EVENT : DEVCHANGE_KEYBOARD_EVENT; + UpdateFromMaster (&dce, device, flags, &num_events); + BUG_WARN(num_events > 1); + + if (num_events == 1) + ChangeMasterDeviceClasses(GetMaster (device, MASTER_ATTACHED), + &dce.changed_event); + } + + } + + event->detail.key = key; +} + +/** + * Main device event processing function. + * Called from when processing the events from the event queue. + * + */ +void +ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) +{ + verify_internal_event(ev); + + switch (ev->any.type) { + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + case ET_RawTouchBegin: + case ET_RawTouchUpdate: + case ET_RawTouchEnd: + DeliverRawEvent(&ev->raw_event, device); + break; + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + ProcessTouchEvent(ev, device); + break; + case ET_TouchOwnership: + /* TouchOwnership events are handled separately from the rest, as they + * have more complex semantics. */ + ProcessTouchOwnershipEvent(&ev->touch_ownership_event, device); + break; + case ET_BarrierHit: + case ET_BarrierLeave: + ProcessBarrierEvent(ev, device); + break; + default: + ProcessDeviceEvent(ev, device); + break; + } +} + +static int +DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, + InternalEvent *ev, TouchListener * listener, + ClientPtr client, WindowPtr win, GrabPtr grab, + XI2Mask *xi2mask) +{ + enum TouchListenerState state; + int rc = Success; + Bool has_ownershipmask; + + if (listener->type == LISTENER_POINTER_REGULAR || + listener->type == LISTENER_POINTER_GRAB) { + rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, + grab, xi2mask); + if (rc == Success) { + listener->state = LISTENER_IS_OWNER; + /* async grabs cannot replay, so automatically accept this touch */ + if (listener->type == LISTENER_POINTER_GRAB && + dev->deviceGrab.grab && + dev->deviceGrab.fromPassiveGrab && + dev->deviceGrab.grab->pointerMode == GrabModeAsync) + ActivateEarlyAccept(dev, ti); + } + goto out; + } + + has_ownershipmask = xi2mask_isset(xi2mask, dev, XI_TouchOwnership); + + if (TouchResourceIsOwner(ti, listener->listener) || has_ownershipmask) + rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); + if (!TouchResourceIsOwner(ti, listener->listener)) { + if (has_ownershipmask) + state = LISTENER_AWAITING_OWNER; + else + state = LISTENER_AWAITING_BEGIN; + } + else { + if (has_ownershipmask) + TouchSendOwnershipEvent(dev, ti, 0, listener->listener); + + if (listener->type == LISTENER_REGULAR) + state = LISTENER_HAS_ACCEPTED; + else + state = LISTENER_IS_OWNER; + } + listener->state = state; + + out: + return rc; +} + +static int +DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, + TouchListener * listener, ClientPtr client, + WindowPtr win, GrabPtr grab, XI2Mask *xi2mask) +{ + int rc = Success; + + if (listener->type == LISTENER_POINTER_REGULAR || + listener->type == LISTENER_POINTER_GRAB) { + /* Note: If the active grab was ungrabbed, we already changed the + * state to LISTENER_HAS_END but still get here. So we mustn't + * actually send the event. + * This is part two of the hack in DeactivatePointerGrab + */ + if (listener->state != LISTENER_HAS_END) { + rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, + grab, xi2mask); + + /* Once we send a TouchEnd to a legacy listener, we're already well + * past the accepting/rejecting stage (can only happen on + * GrabModeSync + replay. This listener now gets the end event, + * and we can continue. + */ + if (rc == Success) + listener->state = LISTENER_HAS_END; + } + goto out; + } + + /* A client is waiting for the begin, don't give it a TouchEnd */ + if (listener->state == LISTENER_AWAITING_BEGIN) { + listener->state = LISTENER_HAS_END; + goto out; + } + + /* Event in response to reject */ + if (ev->device_event.flags & TOUCH_REJECT || + (ev->device_event.flags & TOUCH_ACCEPT && !TouchResourceIsOwner(ti, listener->listener))) { + /* Touch has been rejected, or accepted by its owner which is not this listener */ + if (listener->state != LISTENER_HAS_END) + rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); + listener->state = LISTENER_HAS_END; + } + else if (TouchResourceIsOwner(ti, listener->listener)) { + Bool normal_end = !(ev->device_event.flags & TOUCH_ACCEPT); + + /* FIXME: what about early acceptance */ + if (normal_end && listener->state != LISTENER_HAS_END) + rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); + + if ((ti->num_listeners > 1 || + (ti->num_grabs > 0 && listener->state != LISTENER_HAS_ACCEPTED)) && + (ev->device_event.flags & (TOUCH_ACCEPT | TOUCH_REJECT)) == 0) { + ev->any.type = ET_TouchUpdate; + ev->device_event.flags |= TOUCH_PENDING_END; + ti->pending_finish = TRUE; + } + + if (normal_end) + listener->state = LISTENER_HAS_END; + } + + out: + return rc; +} + +static int +DeliverTouchEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, + TouchListener * listener, ClientPtr client, + WindowPtr win, GrabPtr grab, XI2Mask *xi2mask) +{ + Bool has_ownershipmask = FALSE; + int rc = Success; + + if (xi2mask) + has_ownershipmask = xi2mask_isset(xi2mask, dev, XI_TouchOwnership); + + if (ev->any.type == ET_TouchOwnership) { + ev->touch_ownership_event.deviceid = dev->id; + if (!TouchResourceIsOwner(ti, listener->listener)) + goto out; + rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); + listener->state = LISTENER_IS_OWNER; + } + else + ev->device_event.deviceid = dev->id; + + if (ev->any.type == ET_TouchBegin) { + rc = DeliverTouchBeginEvent(dev, ti, ev, listener, client, win, grab, + xi2mask); + } + else if (ev->any.type == ET_TouchUpdate) { + if (listener->type == LISTENER_POINTER_REGULAR || + listener->type == LISTENER_POINTER_GRAB) + DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, + xi2mask); + else if (TouchResourceIsOwner(ti, listener->listener) || + has_ownershipmask) + rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); + } + else if (ev->any.type == ET_TouchEnd) + rc = DeliverTouchEndEvent(dev, ti, ev, listener, client, win, grab, + xi2mask); + + out: + return rc; +} + +/** + * Delivers a touch events to all interested clients. For TouchBegin events, + * will update ti->listeners, ti->num_listeners, and ti->num_grabs. + * May also mutate ev (type and flags) upon successful delivery. If + * @resource is non-zero, will only attempt delivery to the owner of that + * resource. + * + * @return TRUE if the event was delivered at least once, FALSE otherwise + */ +void +DeliverTouchEvents(DeviceIntPtr dev, TouchPointInfoPtr ti, + InternalEvent *ev, XID resource) +{ + int i; + + if (ev->any.type == ET_TouchBegin && + !(ev->device_event.flags & (TOUCH_CLIENT_ID | TOUCH_REPLAYING))) + TouchSetupListeners(dev, ti, ev); + + TouchEventHistoryPush(ti, &ev->device_event); + + for (i = 0; i < ti->num_listeners; i++) { + GrabPtr grab = NULL; + ClientPtr client; + WindowPtr win; + XI2Mask *mask; + TouchListener *listener = &ti->listeners[i]; + + if (resource && listener->listener != resource) + continue; + + if (!RetrieveTouchDeliveryData(dev, ti, ev, listener, &client, &win, + &grab, &mask)) + continue; + + DeliverTouchEvent(dev, ti, ev, listener, client, win, grab, mask); + } +} + +int +InitProximityClassDeviceStruct(DeviceIntPtr dev) +{ + ProximityClassPtr proxc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->proximity != NULL, FALSE); + + proxc = (ProximityClassPtr) malloc(sizeof(ProximityClassRec)); + if (!proxc) + return FALSE; + proxc->sourceid = dev->id; + proxc->in_proximity = TRUE; + dev->proximity = proxc; + return TRUE; +} + +/** + * Initialise the device's valuators. The memory must already be allocated, + * this function merely inits the matching axis (specified through axnum) to + * sane values. + * + * It is a condition that (minval < maxval). + * + * @see InitValuatorClassDeviceStruct + */ +Bool +InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, + int maxval, int resolution, int min_res, int max_res, + int mode) +{ + AxisInfoPtr ax; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->valuator == NULL, FALSE); + BUG_RETURN_VAL(axnum >= dev->valuator->numAxes, FALSE); + BUG_RETURN_VAL(minval > maxval && mode == Absolute, FALSE); + + ax = dev->valuator->axes + axnum; + + ax->min_value = minval; + ax->max_value = maxval; + ax->resolution = resolution; + ax->min_resolution = min_res; + ax->max_resolution = max_res; + ax->label = label; + ax->mode = mode; + + if (mode & OutOfProximity) + dev->proximity->in_proximity = FALSE; + + return SetScrollValuator(dev, axnum, SCROLL_TYPE_NONE, 0, SCROLL_FLAG_NONE); +} + +/** + * Set the given axis number as a scrolling valuator. + */ +Bool +SetScrollValuator(DeviceIntPtr dev, int axnum, enum ScrollType type, + double increment, int flags) +{ + AxisInfoPtr ax; + int *current_ax; + InternalEvent dce; + DeviceIntPtr master; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->valuator == NULL, FALSE); + BUG_RETURN_VAL(axnum >= dev->valuator->numAxes, FALSE); + + switch (type) { + case SCROLL_TYPE_VERTICAL: + current_ax = &dev->valuator->v_scroll_axis; + break; + case SCROLL_TYPE_HORIZONTAL: + current_ax = &dev->valuator->h_scroll_axis; + break; + case SCROLL_TYPE_NONE: + ax = &dev->valuator->axes[axnum]; + ax->scroll.type = type; + return TRUE; + default: + return FALSE; + } + + if (increment == 0.0) + return FALSE; + + if (*current_ax != -1 && axnum != *current_ax) { + ax = &dev->valuator->axes[*current_ax]; + if (ax->scroll.type == type && + (flags & SCROLL_FLAG_PREFERRED) && + (ax->scroll.flags & SCROLL_FLAG_PREFERRED)) + return FALSE; + } + *current_ax = axnum; + + ax = &dev->valuator->axes[axnum]; + ax->scroll.type = type; + ax->scroll.increment = increment; + ax->scroll.flags = flags; + + master = GetMaster(dev, MASTER_ATTACHED); + CreateClassesChangedEvent(&dce, master, dev, + DEVCHANGE_POINTER_EVENT | + DEVCHANGE_DEVICE_CHANGE); + XISendDeviceChangedEvent(dev, &dce.changed_event); + + /* if the current slave is us, update the master. If not, we'll update + * whenever the next slave switch happens anyway. CMDC sends the event + * for us */ + if (master && master->lastSlave == dev) + ChangeMasterDeviceClasses(master, &dce.changed_event); + + return TRUE; +} + +int +CheckGrabValues(ClientPtr client, GrabParameters *param) +{ + if (param->grabtype != CORE && + param->grabtype != XI && param->grabtype != XI2) { + ErrorF("[Xi] grabtype is invalid. This is a bug.\n"); + return BadImplementation; + } + + if ((param->this_device_mode != GrabModeSync) && + (param->this_device_mode != GrabModeAsync) && + (param->this_device_mode != XIGrabModeTouch)) { + client->errorValue = param->this_device_mode; + return BadValue; + } + if ((param->other_devices_mode != GrabModeSync) && + (param->other_devices_mode != GrabModeAsync) && + (param->other_devices_mode != XIGrabModeTouch)) { + client->errorValue = param->other_devices_mode; + return BadValue; + } + + if (param->modifiers != AnyModifier && + param->modifiers != XIAnyModifier && + (param->modifiers & ~AllModifiersMask)) { + client->errorValue = param->modifiers; + return BadValue; + } + + if ((param->ownerEvents != xFalse) && (param->ownerEvents != xTrue)) { + client->errorValue = param->ownerEvents; + return BadValue; + } + return Success; +} + +int +GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, + int button, GrabParameters *param, enum InputLevel grabtype, + GrabMask *mask) +{ + WindowPtr pWin, confineTo; + CursorPtr cursor; + GrabPtr grab; + int rc, type = -1; + Mask access_mode = DixGrabAccess; + + rc = CheckGrabValues(client, param); + if (rc != Success) + return rc; + if (param->confineTo == None) + confineTo = NullWindow; + else { + rc = dixLookupWindow(&confineTo, param->confineTo, client, + DixSetAttrAccess); + if (rc != Success) + return rc; + } + if (param->cursor == None) + cursor = NullCursor; + else { + rc = dixLookupResourceByType((pointer *) &cursor, param->cursor, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) { + client->errorValue = param->cursor; + return rc; + } + access_mode |= DixForceAccess; + } + if (param->this_device_mode == GrabModeSync || + param->other_devices_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if (grabtype == XI) + type = DeviceButtonPress; + else if (grabtype == XI2) + type = XI_ButtonPress; + + grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, + mask, param, type, button, confineTo, cursor); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(client, grab); +} + +/** + * Grab the given key. + */ +int +GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, + int key, GrabParameters *param, enum InputLevel grabtype, + GrabMask *mask) +{ + WindowPtr pWin; + GrabPtr grab; + KeyClassPtr k = dev->key; + Mask access_mode = DixGrabAccess; + int rc, type = -1; + + rc = CheckGrabValues(client, param); + if (rc != Success) + return rc; + if ((dev->id != XIAllDevices && dev->id != XIAllMasterDevices) && k == NULL) + return BadMatch; + if (grabtype == XI) { + if ((key > k->xkbInfo->desc->max_key_code || + key < k->xkbInfo->desc->min_key_code) + && (key != AnyKey)) { + client->errorValue = key; + return BadValue; + } + type = DeviceKeyPress; + } + else if (grabtype == XI2) + type = XI_KeyPress; + + rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (param->this_device_mode == GrabModeSync || + param->other_devices_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; + + grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, + mask, param, type, key, NULL, NULL); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(client, grab); +} + +/* Enter/FocusIn grab */ +int +GrabWindow(ClientPtr client, DeviceIntPtr dev, int type, + GrabParameters *param, GrabMask *mask) +{ + WindowPtr pWin; + CursorPtr cursor; + GrabPtr grab; + Mask access_mode = DixGrabAccess; + int rc; + + rc = CheckGrabValues(client, param); + if (rc != Success) + return rc; + + rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (param->cursor == None) + cursor = NullCursor; + else { + rc = dixLookupResourceByType((pointer *) &cursor, param->cursor, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) { + client->errorValue = param->cursor; + return rc; + } + access_mode |= DixForceAccess; + } + if (param->this_device_mode == GrabModeSync || + param->other_devices_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; + + grab = CreateGrab(client->index, dev, dev, pWin, XI2, + mask, param, + (type == XIGrabtypeEnter) ? XI_Enter : XI_FocusIn, 0, + NULL, cursor); + + if (!grab) + return BadAlloc; + + return AddPassiveGrabToList(client, grab); +} + +/* Touch grab */ +int +GrabTouch(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr mod_dev, + GrabParameters *param, GrabMask *mask) +{ + WindowPtr pWin; + GrabPtr grab; + int rc; + + rc = CheckGrabValues(client, param); + if (rc != Success) + return rc; + + rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGrabAccess); + if (rc != Success) + return rc; + + grab = CreateGrab(client->index, dev, mod_dev, pWin, XI2, + mask, param, XI_TouchBegin, 0, NullWindow, NullCursor); + if (!grab) + return BadAlloc; + + return AddPassiveGrabToList(client, grab); +} + +int +SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, + Mask mask, Mask exclusivemasks) +{ + int mskidx = dev->id; + int i, ret; + Mask check; + InputClientsPtr others; + + check = (mask & exclusivemasks); + if (wOtherInputMasks(pWin)) { + if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) { + /* It is illegal for two different clients to select on any of + * the events for maskcheck. However, it is OK, for some client + * to continue selecting on one of those events. + */ + for (others = wOtherInputMasks(pWin)->inputClients; others; + others = others->next) { + if (!SameClient(others, client) && (check & + others->mask[mskidx])) + return BadAccess; + } + } + for (others = wOtherInputMasks(pWin)->inputClients; others; + others = others->next) { + if (SameClient(others, client)) { + check = others->mask[mskidx]; + others->mask[mskidx] = mask; + if (mask == 0) { + for (i = 0; i < EMASKSIZE; i++) + if (i != mskidx && others->mask[i] != 0) + break; + if (i == EMASKSIZE) { + RecalculateDeviceDeliverableEvents(pWin); + if (ShouldFreeInputMasks(pWin, FALSE)) + FreeResource(others->resource, RT_NONE); + return Success; + } + } + goto maskSet; + } + } + } + check = 0; + if ((ret = AddExtensionClient(pWin, client, mask, mskidx)) != Success) + return ret; + maskSet: + if (dev->valuator) + if ((dev->valuator->motionHintWindow == pWin) && + (mask & DevicePointerMotionHintMask) && + !(check & DevicePointerMotionHintMask) && !dev->deviceGrab.grab) + dev->valuator->motionHintWindow = NullWindow; + RecalculateDeviceDeliverableEvents(pWin); + return Success; +} + +static void +FreeInputClient(InputClientsPtr * other) +{ + xi2mask_free(&(*other)->xi2mask); + free(*other); + *other = NULL; +} + +static InputClientsPtr +AllocInputClient(void) +{ + return calloc(1, sizeof(InputClients)); +} + +int +AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx) +{ + InputClientsPtr others; + + if (!pWin->optional && !MakeWindowOptional(pWin)) + return BadAlloc; + others = AllocInputClient(); + if (!others) + return BadAlloc; + if (!pWin->optional->inputMasks && !MakeInputMasks(pWin)) + goto bail; + others->xi2mask = xi2mask_new(); + if (!others->xi2mask) + goto bail; + others->mask[mskidx] = mask; + others->resource = FakeClientID(client->index); + others->next = pWin->optional->inputMasks->inputClients; + pWin->optional->inputMasks->inputClients = others; + if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin)) + goto bail; + return Success; + + bail: + FreeInputClient(&others); + return BadAlloc; +} + +static Bool +MakeInputMasks(WindowPtr pWin) +{ + struct _OtherInputMasks *imasks; + + imasks = calloc(1, sizeof(struct _OtherInputMasks)); + if (!imasks) + return FALSE; + imasks->xi2mask = xi2mask_new(); + if (!imasks->xi2mask) { + free(imasks); + return FALSE; + } + pWin->optional->inputMasks = imasks; + return TRUE; +} + +static void +FreeInputMask(OtherInputMasks ** imask) +{ + xi2mask_free(&(*imask)->xi2mask); + free(*imask); + *imask = NULL; +} + +void +RecalculateDeviceDeliverableEvents(WindowPtr pWin) +{ + InputClientsPtr others; + struct _OtherInputMasks *inputMasks; /* default: NULL */ + WindowPtr pChild, tmp; + int i; + + pChild = pWin; + while (1) { + if ((inputMasks = wOtherInputMasks(pChild)) != 0) { + xi2mask_zero(inputMasks->xi2mask, -1); + for (others = inputMasks->inputClients; others; + others = others->next) { + for (i = 0; i < EMASKSIZE; i++) + inputMasks->inputEvents[i] |= others->mask[i]; + xi2mask_merge(inputMasks->xi2mask, others->xi2mask); + } + for (i = 0; i < EMASKSIZE; i++) + inputMasks->deliverableEvents[i] = inputMasks->inputEvents[i]; + for (tmp = pChild->parent; tmp; tmp = tmp->parent) + if (wOtherInputMasks(tmp)) + for (i = 0; i < EMASKSIZE; i++) + inputMasks->deliverableEvents[i] |= + (wOtherInputMasks(tmp)->deliverableEvents[i] + & ~inputMasks->dontPropagateMask[i] & + PropagateMask[i]); + } + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } +} + +int +InputClientGone(WindowPtr pWin, XID id) +{ + InputClientsPtr other, prev; + + if (!wOtherInputMasks(pWin)) + return Success; + prev = 0; + for (other = wOtherInputMasks(pWin)->inputClients; other; + other = other->next) { + if (other->resource == id) { + if (prev) { + prev->next = other->next; + FreeInputClient(&other); + } + else if (!(other->next)) { + if (ShouldFreeInputMasks(pWin, TRUE)) { + OtherInputMasks *mask = wOtherInputMasks(pWin); + + mask->inputClients = other->next; + FreeInputMask(&mask); + pWin->optional->inputMasks = (OtherInputMasks *) NULL; + CheckWindowOptionalNeed(pWin); + FreeInputClient(&other); + } + else { + other->resource = FakeClientID(0); + if (!AddResource(other->resource, RT_INPUTCLIENT, + (pointer) pWin)) + return BadAlloc; + } + } + else { + wOtherInputMasks(pWin)->inputClients = other->next; + FreeInputClient(&other); + } + RecalculateDeviceDeliverableEvents(pWin); + return Success; + } + prev = other; + } + FatalError("client not on device event list"); +} + +/** + * Search for window in each touch trace for each device. Remove the window + * and all its subwindows from the trace when found. The initial window + * order is preserved. + */ +void +WindowGone(WindowPtr win) +{ + DeviceIntPtr dev; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + TouchClassPtr t = dev->touch; + int i; + + if (!t) + continue; + + for (i = 0; i < t->num_touches; i++) { + SpritePtr sprite = &t->touches[i].sprite; + int j; + + for (j = 0; j < sprite->spriteTraceGood; j++) { + if (sprite->spriteTrace[j] == win) { + sprite->spriteTraceGood = j; + break; + } + } + } + } +} + +int +SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, + xEvent *ev, Mask mask, int count) +{ + WindowPtr pWin; + WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ + WindowPtr spriteWin = GetSpriteWindow(d); + + if (dest == PointerWindow) + pWin = spriteWin; + else if (dest == InputFocus) { + WindowPtr inputFocus; + + if (!d->focus) + inputFocus = spriteWin; + else + inputFocus = d->focus->win; + + if (inputFocus == FollowKeyboardWin) + inputFocus = inputInfo.keyboard->focus->win; + + if (inputFocus == NoneWin) + return Success; + + /* If the input focus is PointerRootWin, send the event to where + * the pointer is if possible, then perhaps propogate up to root. */ + if (inputFocus == PointerRootWin) + inputFocus = GetCurrentRootWindow(d); + + if (IsParent(inputFocus, spriteWin)) { + effectiveFocus = inputFocus; + pWin = spriteWin; + } + else + effectiveFocus = pWin = inputFocus; + } + else + dixLookupWindow(&pWin, dest, client, DixSendAccess); + if (!pWin) + return BadWindow; + if ((propagate != xFalse) && (propagate != xTrue)) { + client->errorValue = propagate; + return BadValue; + } + ev->u.u.type |= 0x80; + if (propagate) { + for (; pWin; pWin = pWin->parent) { + if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab)) + return Success; + if (pWin == effectiveFocus) + return Success; + if (wOtherInputMasks(pWin)) + mask &= ~wOtherInputMasks(pWin)->dontPropagateMask[d->id]; + if (!mask) + break; + } + } + else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, ev, count)) + DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab); + return Success; +} + +int +SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map) +{ + int i; + ButtonClassPtr b = dev->button; + + if (b == NULL) + return BadMatch; + + if (nElts != b->numButtons) { + client->errorValue = nElts; + return BadValue; + } + if (BadDeviceMap(&map[0], nElts, 1, 255, &client->errorValue)) + return BadValue; + for (i = 0; i < nElts; i++) + if ((b->map[i + 1] != map[i]) && BitIsOn(b->down, i + 1)) + return MappingBusy; + for (i = 0; i < nElts; i++) + b->map[i + 1] = map[i]; + return Success; +} + +int +ChangeKeyMapping(ClientPtr client, + DeviceIntPtr dev, + unsigned len, + int type, + KeyCode firstKeyCode, + CARD8 keyCodes, CARD8 keySymsPerKeyCode, KeySym * map) +{ + KeySymsRec keysyms; + KeyClassPtr k = dev->key; + + if (k == NULL) + return BadMatch; + + if (len != (keyCodes * keySymsPerKeyCode)) + return BadLength; + + if ((firstKeyCode < k->xkbInfo->desc->min_key_code) || + (firstKeyCode + keyCodes - 1 > k->xkbInfo->desc->max_key_code)) { + client->errorValue = firstKeyCode; + return BadValue; + } + if (keySymsPerKeyCode == 0) { + client->errorValue = 0; + return BadValue; + } + keysyms.minKeyCode = firstKeyCode; + keysyms.maxKeyCode = firstKeyCode + keyCodes - 1; + keysyms.mapWidth = keySymsPerKeyCode; + keysyms.map = map; + + XkbApplyMappingChange(dev, &keysyms, firstKeyCode, keyCodes, NULL, + serverClient); + + return Success; +} + +static void +DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) +{ + WindowPtr parent; + + /* Deactivate any grabs performed on this window, before making + * any input focus changes. + * Deactivating a device grab should cause focus events. */ + + if (dev->deviceGrab.grab && (dev->deviceGrab.grab->window == pWin)) + (*dev->deviceGrab.DeactivateGrab) (dev); + + /* If the focus window is a root window (ie. has no parent) + * then don't delete the focus from it. */ + + if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullWindow)) { + int focusEventMode = NotifyNormal; + + /* If a grab is in progress, then alter the mode of focus events. */ + + if (dev->deviceGrab.grab) + focusEventMode = NotifyWhileGrabbed; + + switch (dev->focus->revert) { + case RevertToNone: + if (!ActivateFocusInGrab(dev, pWin, NoneWin)) + DoFocusEvents(dev, pWin, NoneWin, focusEventMode); + dev->focus->win = NoneWin; + dev->focus->traceGood = 0; + break; + case RevertToParent: + parent = pWin; + do { + parent = parent->parent; + dev->focus->traceGood--; + } + while (!parent->realized); + if (!ActivateFocusInGrab(dev, pWin, parent)) + DoFocusEvents(dev, pWin, parent, focusEventMode); + dev->focus->win = parent; + dev->focus->revert = RevertToNone; + break; + case RevertToPointerRoot: + if (!ActivateFocusInGrab(dev, pWin, PointerRootWin)) + DoFocusEvents(dev, pWin, PointerRootWin, focusEventMode); + dev->focus->win = PointerRootWin; + dev->focus->traceGood = 0; + break; + case RevertToFollowKeyboard: + { + DeviceIntPtr kbd = GetMaster(dev, MASTER_KEYBOARD); + + if (!kbd || (kbd == dev && kbd != inputInfo.keyboard)) + kbd = inputInfo.keyboard; + if (kbd->focus->win) { + if (!ActivateFocusInGrab(dev, pWin, kbd->focus->win)) + DoFocusEvents(dev, pWin, kbd->focus->win, focusEventMode); + dev->focus->win = FollowKeyboardWin; + dev->focus->traceGood = 0; + } + else { + if (!ActivateFocusInGrab(dev, pWin, NoneWin)) + DoFocusEvents(dev, pWin, NoneWin, focusEventMode); + dev->focus->win = NoneWin; + dev->focus->traceGood = 0; + } + } + break; + } + } + + if (dev->valuator) + if (dev->valuator->motionHintWindow == pWin) + dev->valuator->motionHintWindow = NullWindow; +} + +void +DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources) +{ + int i; + DeviceIntPtr dev; + InputClientsPtr ic; + struct _OtherInputMasks *inputMasks; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + DeleteDeviceFromAnyExtEvents(pWin, dev); + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next) + DeleteDeviceFromAnyExtEvents(pWin, dev); + + if (freeResources) + while ((inputMasks = wOtherInputMasks(pWin)) != 0) { + ic = inputMasks->inputClients; + for (i = 0; i < EMASKSIZE; i++) + inputMasks->dontPropagateMask[i] = 0; + FreeResource(ic->resource, RT_NONE); + } +} + +int +MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer *pEvents, Mask mask) +{ + DeviceIntPtr dev; + + dixLookupDevice(&dev, pEvents->deviceid & DEVICE_BITS, serverClient, + DixReadAccess); + if (!dev) + return 0; + + if (pEvents->type == DeviceMotionNotify) { + if (mask & DevicePointerMotionHintMask) { + if (WID(dev->valuator->motionHintWindow) == pEvents->event) { + return 1; /* don't send, but pretend we did */ + } + pEvents->detail = NotifyHint; + } + else { + pEvents->detail = NotifyNormal; + } + } + return 0; +} + +void +CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, + deviceKeyButtonPointer *xE, GrabPtr grab, + ClientPtr client, Mask deliveryMask) +{ + DeviceIntPtr dev; + + dixLookupDevice(&dev, xE->deviceid & DEVICE_BITS, serverClient, + DixGrabAccess); + if (!dev) + return; + + if (type == DeviceMotionNotify) + dev->valuator->motionHintWindow = pWin; + else if ((type == DeviceButtonPress) && (!grab) && + (deliveryMask & DeviceButtonGrabMask)) { + GrabPtr tempGrab; + + tempGrab = AllocGrab(NULL); + if (!tempGrab) + return; + + tempGrab->device = dev; + tempGrab->resource = client->clientAsMask; + tempGrab->window = pWin; + tempGrab->ownerEvents = + (deliveryMask & DeviceOwnerGrabButtonMask) ? TRUE : FALSE; + tempGrab->eventMask = deliveryMask; + tempGrab->keyboardMode = GrabModeAsync; + tempGrab->pointerMode = GrabModeAsync; + tempGrab->confineTo = NullWindow; + tempGrab->cursor = NullCursor; + tempGrab->next = NULL; + (*dev->deviceGrab.ActivateGrab) (dev, tempGrab, currentTime, TRUE); + FreeGrab(tempGrab); + } +} + +static Mask +DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) +{ + InputClientsPtr other; + + if (!wOtherInputMasks(pWin)) + return 0; + for (other = wOtherInputMasks(pWin)->inputClients; other; + other = other->next) { + if (SameClient(other, client)) + return other->mask[dev->id]; + } + return 0; +} + +void +MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client) +{ + WindowPtr pWin; + GrabPtr grab = dev->deviceGrab.grab; + + pWin = dev->valuator->motionHintWindow; + + if ((grab && SameClient(grab, client) && + ((grab->eventMask & DevicePointerMotionHintMask) || + (grab->ownerEvents && + (DeviceEventMaskForClient(dev, pWin, client) & + DevicePointerMotionHintMask)))) || + (!grab && + (DeviceEventMaskForClient(dev, pWin, client) & + DevicePointerMotionHintMask))) + dev->valuator->motionHintWindow = NullWindow; +} + +int +DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, + int maskndx) +{ + struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); + + if (mask & ~PropagateMask[maskndx]) { + client->errorValue = mask; + return BadValue; + } + + if (mask == 0) { + if (inputMasks) + inputMasks->dontPropagateMask[maskndx] = mask; + } + else { + if (!inputMasks) + AddExtensionClient(pWin, client, 0, 0); + inputMasks = wOtherInputMasks(pWin); + inputMasks->dontPropagateMask[maskndx] = mask; + } + RecalculateDeviceDeliverableEvents(pWin); + if (ShouldFreeInputMasks(pWin, FALSE)) + FreeResource(inputMasks->inputClients->resource, RT_NONE); + return Success; +} + +Bool +ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents) +{ + int i; + Mask allInputEventMasks = 0; + struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); + + for (i = 0; i < EMASKSIZE; i++) + allInputEventMasks |= inputMasks->dontPropagateMask[i]; + if (!ignoreSelectedEvents) + for (i = 0; i < EMASKSIZE; i++) + allInputEventMasks |= inputMasks->inputEvents[i]; + if (allInputEventMasks == 0) + return TRUE; + else + return FALSE; +} + +/*********************************************************************** + * + * Walk through the window tree, finding all clients that want to know + * about the Event. + * + */ + +static void +FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, + xEvent *ev, int count) +{ + WindowPtr p2; + + while (p1) { + p2 = p1->firstChild; + DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab); + FindInterestedChildren(dev, p2, mask, ev, count); + p1 = p1->nextSib; + } +} + +/*********************************************************************** + * + * Send an event to interested clients in all windows on all screens. + * + */ + +void +SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent *ev, int count) +{ + int i; + WindowPtr pWin, p1; + + for (i = 0; i < screenInfo.numScreens; i++) { + pWin = screenInfo.screens[i]->root; + if (!pWin) + continue; + DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab); + p1 = pWin->firstChild; + FindInterestedChildren(dev, p1, mask, ev, count); + } +} + +/** + * Set the XI2 mask for the given client on the given window. + * @param dev The device to set the mask for. + * @param win The window to set the mask on. + * @param client The client setting the mask. + * @param len Number of bytes in mask. + * @param mask Event mask in the form of (1 << eventtype) + */ +int +XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, + unsigned int len, unsigned char *mask) +{ + OtherInputMasks *masks; + InputClientsPtr others = NULL; + + masks = wOtherInputMasks(win); + if (masks) { + for (others = wOtherInputMasks(win)->inputClients; others; + others = others->next) { + if (SameClient(others, client)) { + xi2mask_zero(others->xi2mask, dev->id); + break; + } + } + } + + if (len && !others) { + if (AddExtensionClient(win, client, 0, 0) != Success) + return BadAlloc; + others = wOtherInputMasks(win)->inputClients; + } + + if (others) { + xi2mask_zero(others->xi2mask, dev->id); + len = min(len, xi2mask_mask_size(others->xi2mask)); + } + + if (len) { + xi2mask_set_one_mask(others->xi2mask, dev->id, mask, len); + } + + RecalculateDeviceDeliverableEvents(win); + + return Success; +} diff --git a/Xi/exglobals.h b/Xi/exglobals.h new file mode 100644 index 0000000..9f235e0 --- /dev/null +++ b/Xi/exglobals.h @@ -0,0 +1,85 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +/***************************************************************** + * + * Globals referenced elsewhere in the server. + * + */ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif +#include "privates.h" + +#ifndef EXGLOBALS_H +#define EXGLOBALS_H 1 + +extern int IReqCode; +extern int IEventBase; +extern int BadDevice; +extern int BadMode; +extern int DeviceBusy; +extern int BadClass; + +/* Note: only the ones needed in files other than extinit.c are declared */ +extern const Mask DevicePointerMotionMask; +extern const Mask DevicePointerMotionHintMask; +extern const Mask DeviceFocusChangeMask; +extern const Mask DeviceStateNotifyMask; +extern const Mask DeviceMappingNotifyMask; +extern const Mask DeviceOwnerGrabButtonMask; +extern const Mask DeviceButtonGrabMask; +extern const Mask DeviceButtonMotionMask; +extern const Mask DevicePresenceNotifyMask; +extern const Mask DevicePropertyNotifyMask; +extern const Mask XIAllMasks; + +extern Mask PropagateMask[]; + +extern int DeviceValuator; +extern int DeviceKeyPress; +extern int DeviceKeyRelease; +extern int DeviceButtonPress; +extern int DeviceButtonRelease; +extern int DeviceMotionNotify; +extern int DeviceFocusIn; +extern int DeviceFocusOut; +extern int ProximityIn; +extern int ProximityOut; +extern int DeviceStateNotify; +extern int DeviceKeyStateNotify; +extern int DeviceButtonStateNotify; +extern int DeviceMappingNotify; +extern int ChangeDeviceNotify; +extern int DevicePresenceNotify; +extern int DevicePropertyNotify; + +extern RESTYPE RT_INPUTCLIENT; + +extern DevPrivateKeyRec XIClientPrivateKeyRec; + +#define XIClientPrivateKey (&XIClientPrivateKeyRec) + +#endif /* EXGLOBALS_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c new file mode 100644 index 0000000..a49a421 --- /dev/null +++ b/Xi/extinit.c @@ -0,0 +1,1352 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Dispatch routines and initialization routines for the X input extension. + * + */ +#define NUMTYPES 15 + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" +#include "gcstruct.h" /* pointer for extnsionst.h */ +#include "extnsionst.h" /* extension entry */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XI2proto.h> +#include <X11/extensions/geproto.h> +#include "geext.h" /* extension interfaces for ge */ + +#include "dixevents.h" +#include "exevents.h" +#include "extinit.h" +#include "exglobals.h" +#include "swaprep.h" +#include "privates.h" +#include "protocol-versions.h" + +/* modules local to Xi */ +#include "allowev.h" +#include "chgdctl.h" +#include "chgfctl.h" +#include "chgkbd.h" +#include "chgprop.h" +#include "chgptr.h" +#include "closedev.h" +#include "devbell.h" +#include "getbmap.h" +#include "getdctl.h" +#include "getfctl.h" +#include "getfocus.h" +#include "getkmap.h" +#include "getmmap.h" +#include "getprop.h" +#include "getselev.h" +#include "getvers.h" +#include "grabdev.h" +#include "grabdevb.h" +#include "grabdevk.h" +#include "gtmotion.h" +#include "listdev.h" +#include "opendev.h" +#include "queryst.h" +#include "selectev.h" +#include "sendexev.h" +#include "chgkmap.h" +#include "setbmap.h" +#include "setdval.h" +#include "setfocus.h" +#include "setmmap.h" +#include "setmode.h" +#include "ungrdev.h" +#include "ungrdevb.h" +#include "ungrdevk.h" +#include "xiallowev.h" +#include "xiselectev.h" +#include "xigrabdev.h" +#include "xipassivegrab.h" +#include "xisetdevfocus.h" +#include "xiproperty.h" +#include "xichangecursor.h" +#include "xichangehierarchy.h" +#include "xigetclientpointer.h" +#include "xiquerydevice.h" +#include "xiquerypointer.h" +#include "xiqueryversion.h" +#include "xisetclientpointer.h" +#include "xiwarppointer.h" +#include "xibarriers.h" + +/* Masks for XI events have to be aligned with core event (partially anyway). + * If DeviceButtonMotionMask is != ButtonMotionMask, event delivery + * breaks down. The device needs the dev->button->motionMask. If DBMM is + * the same as BMM, we can ensure that both core and device events can be + * delivered, without the need for extra structures in the DeviceIntRec. */ +const Mask DeviceKeyPressMask = KeyPressMask; +const Mask DeviceKeyReleaseMask = KeyReleaseMask; +const Mask DeviceButtonPressMask = ButtonPressMask; +const Mask DeviceButtonReleaseMask = ButtonReleaseMask; +const Mask DeviceProximityMask = (1L << 4); +const Mask DeviceStateNotifyMask = (1L << 5); +const Mask DevicePointerMotionMask = PointerMotionMask; +const Mask DevicePointerMotionHintMask = PointerMotionHintMask; +const Mask DeviceButton1MotionMask = Button1MotionMask; +const Mask DeviceButton2MotionMask = Button2MotionMask; +const Mask DeviceButton3MotionMask = Button3MotionMask; +const Mask DeviceButton4MotionMask = Button4MotionMask; +const Mask DeviceButton5MotionMask = Button5MotionMask; +const Mask DeviceButtonMotionMask = ButtonMotionMask; +const Mask DeviceFocusChangeMask = (1L << 14); +const Mask DeviceMappingNotifyMask = (1L << 15); +const Mask ChangeDeviceNotifyMask = (1L << 16); +const Mask DeviceButtonGrabMask = (1L << 17); +const Mask DeviceOwnerGrabButtonMask = (1L << 17); +const Mask DevicePresenceNotifyMask = (1L << 18); +const Mask DevicePropertyNotifyMask = (1L << 19); +const Mask XIAllMasks = (1L << 20) - 1; + +int ExtEventIndex; +Mask ExtExclusiveMasks[EMASKSIZE]; + +static struct dev_type { + Atom type; + const char *name; +} dev_type[] = { + {0, XI_KEYBOARD}, + {0, XI_MOUSE}, + {0, XI_TABLET}, + {0, XI_TOUCHSCREEN}, + {0, XI_TOUCHPAD}, + {0, XI_BARCODE}, + {0, XI_BUTTONBOX}, + {0, XI_KNOB_BOX}, + {0, XI_ONE_KNOB}, + {0, XI_NINE_KNOB}, + {0, XI_TRACKBALL}, + {0, XI_QUADRATURE}, + {0, XI_ID_MODULE}, + {0, XI_SPACEBALL}, + {0, XI_DATAGLOVE}, + {0, XI_EYETRACKER}, + {0, XI_CURSORKEYS}, + {0, XI_FOOTMOUSE} +}; + +CARD8 event_base[numInputClasses]; +XExtEventInfo EventInfo[32]; + +static DeviceIntRec xi_all_devices; +static DeviceIntRec xi_all_master_devices; + +/** + * Dispatch vector. Functions defined in here will be called when the matching + * request arrives. + */ +static int (*ProcIVector[]) (ClientPtr) = { + NULL, /* 0 */ + ProcXGetExtensionVersion, /* 1 */ + ProcXListInputDevices, /* 2 */ + ProcXOpenDevice, /* 3 */ + ProcXCloseDevice, /* 4 */ + ProcXSetDeviceMode, /* 5 */ + ProcXSelectExtensionEvent, /* 6 */ + ProcXGetSelectedExtensionEvents, /* 7 */ + ProcXChangeDeviceDontPropagateList, /* 8 */ + ProcXGetDeviceDontPropagateList, /* 9 */ + ProcXGetDeviceMotionEvents, /* 10 */ + ProcXChangeKeyboardDevice, /* 11 */ + ProcXChangePointerDevice, /* 12 */ + ProcXGrabDevice, /* 13 */ + ProcXUngrabDevice, /* 14 */ + ProcXGrabDeviceKey, /* 15 */ + ProcXUngrabDeviceKey, /* 16 */ + ProcXGrabDeviceButton, /* 17 */ + ProcXUngrabDeviceButton, /* 18 */ + ProcXAllowDeviceEvents, /* 19 */ + ProcXGetDeviceFocus, /* 20 */ + ProcXSetDeviceFocus, /* 21 */ + ProcXGetFeedbackControl, /* 22 */ + ProcXChangeFeedbackControl, /* 23 */ + ProcXGetDeviceKeyMapping, /* 24 */ + ProcXChangeDeviceKeyMapping, /* 25 */ + ProcXGetDeviceModifierMapping, /* 26 */ + ProcXSetDeviceModifierMapping, /* 27 */ + ProcXGetDeviceButtonMapping, /* 28 */ + ProcXSetDeviceButtonMapping, /* 29 */ + ProcXQueryDeviceState, /* 30 */ + ProcXSendExtensionEvent, /* 31 */ + ProcXDeviceBell, /* 32 */ + ProcXSetDeviceValuators, /* 33 */ + ProcXGetDeviceControl, /* 34 */ + ProcXChangeDeviceControl, /* 35 */ + /* XI 1.5 */ + ProcXListDeviceProperties, /* 36 */ + ProcXChangeDeviceProperty, /* 37 */ + ProcXDeleteDeviceProperty, /* 38 */ + ProcXGetDeviceProperty, /* 39 */ + /* XI 2 */ + ProcXIQueryPointer, /* 40 */ + ProcXIWarpPointer, /* 41 */ + ProcXIChangeCursor, /* 42 */ + ProcXIChangeHierarchy, /* 43 */ + ProcXISetClientPointer, /* 44 */ + ProcXIGetClientPointer, /* 45 */ + ProcXISelectEvents, /* 46 */ + ProcXIQueryVersion, /* 47 */ + ProcXIQueryDevice, /* 48 */ + ProcXISetFocus, /* 49 */ + ProcXIGetFocus, /* 50 */ + ProcXIGrabDevice, /* 51 */ + ProcXIUngrabDevice, /* 52 */ + ProcXIAllowEvents, /* 53 */ + ProcXIPassiveGrabDevice, /* 54 */ + ProcXIPassiveUngrabDevice, /* 55 */ + ProcXIListProperties, /* 56 */ + ProcXIChangeProperty, /* 57 */ + ProcXIDeleteProperty, /* 58 */ + ProcXIGetProperty, /* 59 */ + ProcXIGetSelectedEvents, /* 60 */ + ProcXIBarrierReleasePointer /* 61 */ +}; + +/* For swapped clients */ +static int (*SProcIVector[]) (ClientPtr) = { + NULL, /* 0 */ + SProcXGetExtensionVersion, /* 1 */ + SProcXListInputDevices, /* 2 */ + SProcXOpenDevice, /* 3 */ + SProcXCloseDevice, /* 4 */ + SProcXSetDeviceMode, /* 5 */ + SProcXSelectExtensionEvent, /* 6 */ + SProcXGetSelectedExtensionEvents, /* 7 */ + SProcXChangeDeviceDontPropagateList, /* 8 */ + SProcXGetDeviceDontPropagateList, /* 9 */ + SProcXGetDeviceMotionEvents, /* 10 */ + SProcXChangeKeyboardDevice, /* 11 */ + SProcXChangePointerDevice, /* 12 */ + SProcXGrabDevice, /* 13 */ + SProcXUngrabDevice, /* 14 */ + SProcXGrabDeviceKey, /* 15 */ + SProcXUngrabDeviceKey, /* 16 */ + SProcXGrabDeviceButton, /* 17 */ + SProcXUngrabDeviceButton, /* 18 */ + SProcXAllowDeviceEvents, /* 19 */ + SProcXGetDeviceFocus, /* 20 */ + SProcXSetDeviceFocus, /* 21 */ + SProcXGetFeedbackControl, /* 22 */ + SProcXChangeFeedbackControl, /* 23 */ + SProcXGetDeviceKeyMapping, /* 24 */ + SProcXChangeDeviceKeyMapping, /* 25 */ + SProcXGetDeviceModifierMapping, /* 26 */ + SProcXSetDeviceModifierMapping, /* 27 */ + SProcXGetDeviceButtonMapping, /* 28 */ + SProcXSetDeviceButtonMapping, /* 29 */ + SProcXQueryDeviceState, /* 30 */ + SProcXSendExtensionEvent, /* 31 */ + SProcXDeviceBell, /* 32 */ + SProcXSetDeviceValuators, /* 33 */ + SProcXGetDeviceControl, /* 34 */ + SProcXChangeDeviceControl, /* 35 */ + SProcXListDeviceProperties, /* 36 */ + SProcXChangeDeviceProperty, /* 37 */ + SProcXDeleteDeviceProperty, /* 38 */ + SProcXGetDeviceProperty, /* 39 */ + SProcXIQueryPointer, /* 40 */ + SProcXIWarpPointer, /* 41 */ + SProcXIChangeCursor, /* 42 */ + SProcXIChangeHierarchy, /* 43 */ + SProcXISetClientPointer, /* 44 */ + SProcXIGetClientPointer, /* 45 */ + SProcXISelectEvents, /* 46 */ + SProcXIQueryVersion, /* 47 */ + SProcXIQueryDevice, /* 48 */ + SProcXISetFocus, /* 49 */ + SProcXIGetFocus, /* 50 */ + SProcXIGrabDevice, /* 51 */ + SProcXIUngrabDevice, /* 52 */ + SProcXIAllowEvents, /* 53 */ + SProcXIPassiveGrabDevice, /* 54 */ + SProcXIPassiveUngrabDevice, /* 55 */ + SProcXIListProperties, /* 56 */ + SProcXIChangeProperty, /* 57 */ + SProcXIDeleteProperty, /* 58 */ + SProcXIGetProperty, /* 59 */ + SProcXIGetSelectedEvents, /* 60 */ + SProcXIBarrierReleasePointer /* 61 */ +}; + +/***************************************************************** + * + * Globals referenced elsewhere in the server. + * + */ + +int IReqCode = 0; +int IEventBase = 0; +int BadDevice = 0; +static int BadEvent = 1; +int BadMode = 2; +int DeviceBusy = 3; +int BadClass = 4; + +int DeviceValuator; +int DeviceKeyPress; +int DeviceKeyRelease; +int DeviceButtonPress; +int DeviceButtonRelease; +int DeviceMotionNotify; +int DeviceFocusIn; +int DeviceFocusOut; +int ProximityIn; +int ProximityOut; +int DeviceStateNotify; +int DeviceKeyStateNotify; +int DeviceButtonStateNotify; +int DeviceMappingNotify; +int ChangeDeviceNotify; +int DevicePresenceNotify; +int DevicePropertyNotify; + +RESTYPE RT_INPUTCLIENT; + +/***************************************************************** + * + * Externs defined elsewhere in the X server. + * + */ + +extern XExtensionVersion XIVersion; + +Mask PropagateMask[EMASKSIZE]; + +/***************************************************************** + * + * Versioning support + * + */ + +DevPrivateKeyRec XIClientPrivateKeyRec; + +/***************************************************************** + * + * Declarations of local routines. + * + */ + +static void +XIClientCallback(CallbackListPtr *list, pointer closure, pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + XIClientPtr pXIClient; + + pXIClient = dixLookupPrivate(&pClient->devPrivates, XIClientPrivateKey); + pXIClient->major_version = 0; + pXIClient->minor_version = 0; +} + +/************************************************************************* + * + * ProcIDispatch - main dispatch routine for requests to this extension. + * This routine is used if server and client have the same byte ordering. + * + */ + +static int +ProcIDispatch(ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data >= ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data]) + return BadRequest; + + return (*ProcIVector[stuff->data]) (client); +} + +/******************************************************************************* + * + * SProcXDispatch + * + * Main swapped dispatch routine for requests to this extension. + * This routine is used if server and client do not have the same byte ordering. + * + */ + +static int +SProcIDispatch(ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data >= ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data]) + return BadRequest; + + return (*SProcIVector[stuff->data]) (client); +} + +/********************************************************************** + * + * SReplyIDispatch + * Swap any replies defined in this extension. + * + */ + +static void +SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) +{ + /* All we look at is the type field */ + /* This is common to all replies */ + if (rep->RepType == X_GetExtensionVersion) + SRepXGetExtensionVersion(client, len, + (xGetExtensionVersionReply *) rep); + else if (rep->RepType == X_ListInputDevices) + SRepXListInputDevices(client, len, (xListInputDevicesReply *) rep); + else if (rep->RepType == X_OpenDevice) + SRepXOpenDevice(client, len, (xOpenDeviceReply *) rep); + else if (rep->RepType == X_SetDeviceMode) + SRepXSetDeviceMode(client, len, (xSetDeviceModeReply *) rep); + else if (rep->RepType == X_GetSelectedExtensionEvents) + SRepXGetSelectedExtensionEvents(client, len, + (xGetSelectedExtensionEventsReply *) + rep); + else if (rep->RepType == X_GetDeviceDontPropagateList) + SRepXGetDeviceDontPropagateList(client, len, + (xGetDeviceDontPropagateListReply *) + rep); + else if (rep->RepType == X_GetDeviceMotionEvents) + SRepXGetDeviceMotionEvents(client, len, + (xGetDeviceMotionEventsReply *) rep); + else if (rep->RepType == X_GrabDevice) + SRepXGrabDevice(client, len, (xGrabDeviceReply *) rep); + else if (rep->RepType == X_GetDeviceFocus) + SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep); + else if (rep->RepType == X_GetFeedbackControl) + SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep); + else if (rep->RepType == X_GetDeviceKeyMapping) + SRepXGetDeviceKeyMapping(client, len, + (xGetDeviceKeyMappingReply *) rep); + else if (rep->RepType == X_GetDeviceModifierMapping) + SRepXGetDeviceModifierMapping(client, len, + (xGetDeviceModifierMappingReply *) rep); + else if (rep->RepType == X_SetDeviceModifierMapping) + SRepXSetDeviceModifierMapping(client, len, + (xSetDeviceModifierMappingReply *) rep); + else if (rep->RepType == X_GetDeviceButtonMapping) + SRepXGetDeviceButtonMapping(client, len, + (xGetDeviceButtonMappingReply *) rep); + else if (rep->RepType == X_SetDeviceButtonMapping) + SRepXSetDeviceButtonMapping(client, len, + (xSetDeviceButtonMappingReply *) rep); + else if (rep->RepType == X_QueryDeviceState) + SRepXQueryDeviceState(client, len, (xQueryDeviceStateReply *) rep); + else if (rep->RepType == X_SetDeviceValuators) + SRepXSetDeviceValuators(client, len, (xSetDeviceValuatorsReply *) rep); + else if (rep->RepType == X_GetDeviceControl) + SRepXGetDeviceControl(client, len, (xGetDeviceControlReply *) rep); + else if (rep->RepType == X_ChangeDeviceControl) + SRepXChangeDeviceControl(client, len, + (xChangeDeviceControlReply *) rep); + else if (rep->RepType == X_ListDeviceProperties) + SRepXListDeviceProperties(client, len, + (xListDevicePropertiesReply *) rep); + else if (rep->RepType == X_GetDeviceProperty) + SRepXGetDeviceProperty(client, len, (xGetDevicePropertyReply *) rep); + else if (rep->RepType == X_XIQueryPointer) + SRepXIQueryPointer(client, len, (xXIQueryPointerReply *) rep); + else if (rep->RepType == X_XIGetClientPointer) + SRepXIGetClientPointer(client, len, (xXIGetClientPointerReply *) rep); + else if (rep->RepType == X_XIQueryVersion) + SRepXIQueryVersion(client, len, (xXIQueryVersionReply *) rep); + else if (rep->RepType == X_XIQueryDevice) + SRepXIQueryDevice(client, len, (xXIQueryDeviceReply *) rep); + else if (rep->RepType == X_XIGrabDevice) + SRepXIGrabDevice(client, len, (xXIGrabDeviceReply *) rep); + else if (rep->RepType == X_XIPassiveGrabDevice) + SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep); + else if (rep->RepType == X_XIListProperties) + SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep); + else if (rep->RepType == X_XIGetProperty) + SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep); + else if (rep->RepType == X_XIGetSelectedEvents) + SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep); + else if (rep->RepType == X_XIGetFocus) + SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep); + else { + FatalError("XINPUT confused sending swapped reply"); + } +} + +/************************************************************************ + * + * This function swaps the DeviceValuator event. + * + */ + +static void +SEventDeviceValuator(deviceValuator * from, deviceValuator * to) +{ + int i; + INT32 *ip B32; + + *to = *from; + swaps(&to->sequenceNumber); + swaps(&to->device_state); + ip = &to->valuator0; + for (i = 0; i < 6; i++) { + swapl(ip + i); + } +} + +static void +SEventFocus(deviceFocus * from, deviceFocus * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->time); + swapl(&to->window); +} + +static void +SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to) +{ + int i; + INT32 *ip B32; + + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->time); + ip = &to->valuator0; + for (i = 0; i < 3; i++) { + swapl(ip + i); + } +} + +static void +SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from, + deviceKeyStateNotify * to) +{ + *to = *from; + swaps(&to->sequenceNumber); +} + +static void +SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from, + deviceButtonStateNotify * to) +{ + *to = *from; + swaps(&to->sequenceNumber); +} + +static void +SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->time); +} + +static void +SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->time); +} + +static void +SDevicePresenceNotifyEvent(devicePresenceNotify * from, + devicePresenceNotify * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->time); + swaps(&to->control); +} + +static void +SDevicePropertyNotifyEvent(devicePropertyNotify * from, + devicePropertyNotify * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->time); + swapl(&to->atom); +} + +static void +SDeviceLeaveNotifyEvent(xXILeaveEvent * from, xXILeaveEvent * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swaps(&to->deviceid); + swapl(&to->time); + swapl(&to->root); + swapl(&to->event); + swapl(&to->child); + swapl(&to->root_x); + swapl(&to->root_y); + swapl(&to->event_x); + swapl(&to->event_y); + swaps(&to->sourceid); + swaps(&to->buttons_len); + swapl(&to->mods.base_mods); + swapl(&to->mods.latched_mods); + swapl(&to->mods.locked_mods); +} + +static void +SDeviceChangedEvent(xXIDeviceChangedEvent * from, xXIDeviceChangedEvent * to) +{ + int i, j; + xXIAnyInfo *any; + + *to = *from; + memcpy(&to[1], &from[1], from->length * 4); + + any = (xXIAnyInfo *) &to[1]; + for (i = 0; i < to->num_classes; i++) { + int length = any->length; + + switch (any->type) { + case KeyClass: + { + xXIKeyInfo *ki = (xXIKeyInfo *) any; + uint32_t *key = (uint32_t *) &ki[1]; + + for (j = 0; j < ki->num_keycodes; j++, key++) + swapl(key); + swaps(&ki->num_keycodes); + } + break; + case ButtonClass: + { + xXIButtonInfo *bi = (xXIButtonInfo *) any; + Atom *labels = (Atom *) ((char *) bi + sizeof(xXIButtonInfo) + + pad_to_int32(bits_to_bytes + (bi->num_buttons))); + for (j = 0; j < bi->num_buttons; j++) + swapl(&labels[j]); + swaps(&bi->num_buttons); + } + break; + case ValuatorClass: + { + xXIValuatorInfo *ai = (xXIValuatorInfo *) any; + + swapl(&ai->label); + swapl(&ai->min.integral); + swapl(&ai->min.frac); + swapl(&ai->max.integral); + swapl(&ai->max.frac); + swapl(&ai->resolution); + swaps(&ai->number); + } + break; + } + + swaps(&any->type); + swaps(&any->length); + swaps(&any->sourceid); + + any = (xXIAnyInfo *) ((char *) any + length * 4); + } + + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swaps(&to->deviceid); + swapl(&to->time); + swaps(&to->num_classes); + swaps(&to->sourceid); + +} + +static void +SDeviceEvent(xXIDeviceEvent * from, xXIDeviceEvent * to) +{ + int i; + char *ptr; + char *vmask; + + memcpy(to, from, sizeof(xEvent) + from->length * 4); + + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swaps(&to->deviceid); + swapl(&to->time); + swapl(&to->detail); + swapl(&to->root); + swapl(&to->event); + swapl(&to->child); + swapl(&to->root_x); + swapl(&to->root_y); + swapl(&to->event_x); + swapl(&to->event_y); + swaps(&to->buttons_len); + swaps(&to->valuators_len); + swaps(&to->sourceid); + swapl(&to->mods.base_mods); + swapl(&to->mods.latched_mods); + swapl(&to->mods.locked_mods); + swapl(&to->mods.effective_mods); + swapl(&to->flags); + + ptr = (char *) (&to[1]); + ptr += from->buttons_len * 4; + vmask = ptr; /* valuator mask */ + ptr += from->valuators_len * 4; + for (i = 0; i < from->valuators_len * 32; i++) { + if (BitIsOn(vmask, i)) { + swapl(((uint32_t *) ptr)); + ptr += 4; + swapl(((uint32_t *) ptr)); + ptr += 4; + } + } +} + +static void +SDeviceHierarchyEvent(xXIHierarchyEvent * from, xXIHierarchyEvent * to) +{ + int i; + xXIHierarchyInfo *info; + + *to = *from; + memcpy(&to[1], &from[1], from->length * 4); + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swaps(&to->deviceid); + swapl(&to->time); + swapl(&to->flags); + swaps(&to->num_info); + + info = (xXIHierarchyInfo *) &to[1]; + for (i = 0; i < from->num_info; i++) { + swaps(&info->deviceid); + swaps(&info->attachment); + info++; + } +} + +static void +SXIPropertyEvent(xXIPropertyEvent * from, xXIPropertyEvent * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swaps(&to->deviceid); + swapl(&to->property); +} + +static void +SRawEvent(xXIRawEvent * from, xXIRawEvent * to) +{ + int i; + FP3232 *values; + unsigned char *mask; + + memcpy(to, from, sizeof(xEvent) + from->length * 4); + + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swaps(&to->deviceid); + swapl(&to->time); + swapl(&to->detail); + + mask = (unsigned char *) &to[1]; + values = (FP3232 *) (mask + from->valuators_len * 4); + + for (i = 0; i < from->valuators_len * 4 * 8; i++) { + if (BitIsOn(mask, i)) { + /* for each bit set there are two FP3232 values on the wire, in + * the order abcABC for data and data_raw. Here we swap as if + * they were in aAbBcC order because it's easier and really + * doesn't matter. + */ + swapl(&values->integral); + swapl(&values->frac); + values++; + swapl(&values->integral); + swapl(&values->frac); + values++; + } + } + + swaps(&to->valuators_len); +} + +static void +STouchOwnershipEvent(xXITouchOwnershipEvent * from, xXITouchOwnershipEvent * to) +{ + *to = *from; + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swaps(&to->deviceid); + swapl(&to->time); + swaps(&to->sourceid); + swapl(&to->touchid); + swapl(&to->flags); + swapl(&to->root); + swapl(&to->event); + swapl(&to->child); +} + +static void +SBarrierEvent(xXIBarrierEvent * from, + xXIBarrierEvent * to) { + + *to = *from; + + swaps(&to->sequenceNumber); + swapl(&to->length); + swaps(&to->evtype); + swapl(&to->time); + swaps(&to->deviceid); + swaps(&to->sourceid); + swapl(&to->event); + swapl(&to->root); + swapl(&to->root_x); + swapl(&to->root_y); + + swapl(&to->dx.integral); + swapl(&to->dx.frac); + swapl(&to->dy.integral); + swapl(&to->dy.frac); + swapl(&to->dtime); + swapl(&to->barrier); + swapl(&to->eventid); +} + +/** Event swapping function for XI2 events. */ +void +XI2EventSwap(xGenericEvent *from, xGenericEvent *to) +{ + switch (from->evtype) { + case XI_Enter: + case XI_Leave: + case XI_FocusIn: + case XI_FocusOut: + SDeviceLeaveNotifyEvent((xXILeaveEvent *) from, (xXILeaveEvent *) to); + break; + case XI_DeviceChanged: + SDeviceChangedEvent((xXIDeviceChangedEvent *) from, + (xXIDeviceChangedEvent *) to); + break; + case XI_HierarchyChanged: + SDeviceHierarchyEvent((xXIHierarchyEvent *) from, + (xXIHierarchyEvent *) to); + break; + case XI_PropertyEvent: + SXIPropertyEvent((xXIPropertyEvent *) from, (xXIPropertyEvent *) to); + break; + case XI_Motion: + case XI_KeyPress: + case XI_KeyRelease: + case XI_ButtonPress: + case XI_ButtonRelease: + case XI_TouchBegin: + case XI_TouchUpdate: + case XI_TouchEnd: + SDeviceEvent((xXIDeviceEvent *) from, (xXIDeviceEvent *) to); + break; + case XI_TouchOwnership: + STouchOwnershipEvent((xXITouchOwnershipEvent *) from, + (xXITouchOwnershipEvent *) to); + break; + case XI_RawMotion: + case XI_RawKeyPress: + case XI_RawKeyRelease: + case XI_RawButtonPress: + case XI_RawButtonRelease: + case XI_RawTouchBegin: + case XI_RawTouchUpdate: + case XI_RawTouchEnd: + SRawEvent((xXIRawEvent *) from, (xXIRawEvent *) to); + break; + case XI_BarrierHit: + case XI_BarrierLeave: + SBarrierEvent((xXIBarrierEvent *) from, + (xXIBarrierEvent *) to); + break; + default: + ErrorF("[Xi] Unknown event type to swap. This is a bug.\n"); + break; + } +} + +/************************************************************************** + * + * Allow the specified event to have its propagation suppressed. + * The default is to not allow suppression of propagation. + * + */ + +static void +AllowPropagateSuppress(Mask mask) +{ + int i; + + for (i = 0; i < MAXDEVICES; i++) + PropagateMask[i] |= mask; +} + +/************************************************************************** + * + * Record an event mask where there is no unique corresponding event type. + * We can't call SetMaskForEvent, since that would clobber the existing + * mask for that event. MotionHint and ButtonMotion are examples. + * + * Since extension event types will never be less than 64, we can use + * 0-63 in the EventInfo array as the "type" to be used to look up this + * mask. This means that the corresponding macros such as + * DevicePointerMotionHint must have access to the same constants. + * + */ + +static void +SetEventInfo(Mask mask, int constant) +{ + EventInfo[ExtEventIndex].mask = mask; + EventInfo[ExtEventIndex++].type = constant; +} + +/************************************************************************** + * + * Allow the specified event to be restricted to being selected by one + * client at a time. + * The default is to allow more than one client to select the event. + * + */ + +static void +SetExclusiveAccess(Mask mask) +{ + int i; + + for (i = 0; i < MAXDEVICES; i++) + ExtExclusiveMasks[i] |= mask; +} + +/************************************************************************** + * + * Assign the specified mask to the specified event. + * + */ + +static void +SetMaskForExtEvent(Mask mask, int event) +{ + int i; + + EventInfo[ExtEventIndex].mask = mask; + EventInfo[ExtEventIndex++].type = event; + + if ((event < LASTEvent) || (event >= 128)) + FatalError("MaskForExtensionEvent: bogus event number"); + + for (i = 0; i < MAXDEVICES; i++) + SetMaskForEvent(i, mask, event); +} + +/************************************************************************ + * + * This function sets up extension event types and masks. + * + */ + +static void +FixExtensionEvents(ExtensionEntry * extEntry) +{ + DeviceValuator = extEntry->eventBase; + DeviceKeyPress = DeviceValuator + 1; + DeviceKeyRelease = DeviceKeyPress + 1; + DeviceButtonPress = DeviceKeyRelease + 1; + DeviceButtonRelease = DeviceButtonPress + 1; + DeviceMotionNotify = DeviceButtonRelease + 1; + DeviceFocusIn = DeviceMotionNotify + 1; + DeviceFocusOut = DeviceFocusIn + 1; + ProximityIn = DeviceFocusOut + 1; + ProximityOut = ProximityIn + 1; + DeviceStateNotify = ProximityOut + 1; + DeviceMappingNotify = DeviceStateNotify + 1; + ChangeDeviceNotify = DeviceMappingNotify + 1; + DeviceKeyStateNotify = ChangeDeviceNotify + 1; + DeviceButtonStateNotify = DeviceKeyStateNotify + 1; + DevicePresenceNotify = DeviceButtonStateNotify + 1; + DevicePropertyNotify = DevicePresenceNotify + 1; + + event_base[KeyClass] = DeviceKeyPress; + event_base[ButtonClass] = DeviceButtonPress; + event_base[ValuatorClass] = DeviceMotionNotify; + event_base[ProximityClass] = ProximityIn; + event_base[FocusClass] = DeviceFocusIn; + event_base[OtherClass] = DeviceStateNotify; + + BadDevice += extEntry->errorBase; + BadEvent += extEntry->errorBase; + BadMode += extEntry->errorBase; + DeviceBusy += extEntry->errorBase; + BadClass += extEntry->errorBase; + + SetMaskForExtEvent(DeviceKeyPressMask, DeviceKeyPress); + AllowPropagateSuppress(DeviceKeyPressMask); + SetCriticalEvent(DeviceKeyPress); + + SetMaskForExtEvent(DeviceKeyReleaseMask, DeviceKeyRelease); + AllowPropagateSuppress(DeviceKeyReleaseMask); + SetCriticalEvent(DeviceKeyRelease); + + SetMaskForExtEvent(DeviceButtonPressMask, DeviceButtonPress); + AllowPropagateSuppress(DeviceButtonPressMask); + SetCriticalEvent(DeviceButtonPress); + + SetMaskForExtEvent(DeviceButtonReleaseMask, DeviceButtonRelease); + AllowPropagateSuppress(DeviceButtonReleaseMask); + SetCriticalEvent(DeviceButtonRelease); + + SetMaskForExtEvent(DeviceProximityMask, ProximityIn); + SetMaskForExtEvent(DeviceProximityMask, ProximityOut); + + SetMaskForExtEvent(DeviceStateNotifyMask, DeviceStateNotify); + + SetMaskForExtEvent(DevicePointerMotionMask, DeviceMotionNotify); + AllowPropagateSuppress(DevicePointerMotionMask); + SetCriticalEvent(DeviceMotionNotify); + + SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint); + SetEventInfo(DeviceButton1MotionMask, _deviceButton1Motion); + SetEventInfo(DeviceButton2MotionMask, _deviceButton2Motion); + SetEventInfo(DeviceButton3MotionMask, _deviceButton3Motion); + SetEventInfo(DeviceButton4MotionMask, _deviceButton4Motion); + SetEventInfo(DeviceButton5MotionMask, _deviceButton5Motion); + SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion); + + SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn); + SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusOut); + + SetMaskForExtEvent(DeviceMappingNotifyMask, DeviceMappingNotify); + SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify); + + SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab); + SetExclusiveAccess(DeviceButtonGrabMask); + + SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton); + SetEventInfo(DevicePresenceNotifyMask, _devicePresence); + SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify); + + SetEventInfo(0, _noExtensionEvent); +} + +/************************************************************************ + * + * This function restores extension event types and masks to their + * initial state. + * + */ + +static void +RestoreExtensionEvents(void) +{ + int i, j; + + IReqCode = 0; + IEventBase = 0; + + for (i = 0; i < ExtEventIndex - 1; i++) { + if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) { + for (j = 0; j < MAXDEVICES; j++) + SetMaskForEvent(j, 0, EventInfo[i].type); + } + EventInfo[i].mask = 0; + EventInfo[i].type = 0; + } + ExtEventIndex = 0; + DeviceValuator = 0; + DeviceKeyPress = 1; + DeviceKeyRelease = 2; + DeviceButtonPress = 3; + DeviceButtonRelease = 4; + DeviceMotionNotify = 5; + DeviceFocusIn = 6; + DeviceFocusOut = 7; + ProximityIn = 8; + ProximityOut = 9; + DeviceStateNotify = 10; + DeviceMappingNotify = 11; + ChangeDeviceNotify = 12; + DeviceKeyStateNotify = 13; + DeviceButtonStateNotify = 13; + DevicePresenceNotify = 14; + DevicePropertyNotify = 15; + + BadDevice = 0; + BadEvent = 1; + BadMode = 2; + DeviceBusy = 3; + BadClass = 4; + +} + +/*********************************************************************** + * + * IResetProc. + * Remove reply-swapping routine. + * Remove event-swapping routine. + * + */ + +static void +IResetProc(ExtensionEntry * unused) +{ + ReplySwapVector[IReqCode] = ReplyNotSwappd; + EventSwapVector[DeviceValuator] = NotImplemented; + EventSwapVector[DeviceKeyPress] = NotImplemented; + EventSwapVector[DeviceKeyRelease] = NotImplemented; + EventSwapVector[DeviceButtonPress] = NotImplemented; + EventSwapVector[DeviceButtonRelease] = NotImplemented; + EventSwapVector[DeviceMotionNotify] = NotImplemented; + EventSwapVector[DeviceFocusIn] = NotImplemented; + EventSwapVector[DeviceFocusOut] = NotImplemented; + EventSwapVector[ProximityIn] = NotImplemented; + EventSwapVector[ProximityOut] = NotImplemented; + EventSwapVector[DeviceStateNotify] = NotImplemented; + EventSwapVector[DeviceKeyStateNotify] = NotImplemented; + EventSwapVector[DeviceButtonStateNotify] = NotImplemented; + EventSwapVector[DeviceMappingNotify] = NotImplemented; + EventSwapVector[ChangeDeviceNotify] = NotImplemented; + EventSwapVector[DevicePresenceNotify] = NotImplemented; + EventSwapVector[DevicePropertyNotify] = NotImplemented; + RestoreExtensionEvents(); + + free(xi_all_devices.name); + free(xi_all_master_devices.name); + + XIBarrierReset(); +} + +/*********************************************************************** + * + * Assign an id and type to an input device. + * + */ + +void +AssignTypeAndName(DeviceIntPtr dev, Atom type, const char *name) +{ + dev->xinput_type = type; + dev->name = strdup(name); +} + +/*********************************************************************** + * + * Make device type atoms. + * + */ + +static void +MakeDeviceTypeAtoms(void) +{ + int i; + + for (i = 0; i < NUMTYPES; i++) + dev_type[i].type = + MakeAtom(dev_type[i].name, strlen(dev_type[i].name), 1); +} + +/***************************************************************************** + * + * SEventIDispatch + * + * Swap any events defined in this extension. + */ +#define DO_SWAP(func,type) func ((type *)from, (type *)to) + +static void +SEventIDispatch(xEvent *from, xEvent *to) +{ + int type = from->u.u.type & 0177; + + if (type == DeviceValuator) + DO_SWAP(SEventDeviceValuator, deviceValuator); + else if (type == DeviceKeyPress) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } + else if (type == DeviceKeyRelease) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } + else if (type == DeviceButtonPress) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } + else if (type == DeviceButtonRelease) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } + else if (type == DeviceMotionNotify) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } + else if (type == DeviceFocusIn) + DO_SWAP(SEventFocus, deviceFocus); + else if (type == DeviceFocusOut) + DO_SWAP(SEventFocus, deviceFocus); + else if (type == ProximityIn) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } + else if (type == ProximityOut) { + SKeyButtonPtrEvent(from, to); + to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; + } + else if (type == DeviceStateNotify) + DO_SWAP(SDeviceStateNotifyEvent, deviceStateNotify); + else if (type == DeviceKeyStateNotify) + DO_SWAP(SDeviceKeyStateNotifyEvent, deviceKeyStateNotify); + else if (type == DeviceButtonStateNotify) + DO_SWAP(SDeviceButtonStateNotifyEvent, deviceButtonStateNotify); + else if (type == DeviceMappingNotify) + DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify); + else if (type == ChangeDeviceNotify) + DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify); + else if (type == DevicePresenceNotify) + DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify); + else if (type == DevicePropertyNotify) + DO_SWAP(SDevicePropertyNotifyEvent, devicePropertyNotify); + else { + FatalError("XInputExtension: Impossible event!\n"); + } +} + +/********************************************************************** + * + * IExtensionInit - initialize the input extension. + * + * Called from InitExtensions in main() or from QueryExtension() if the + * extension is dynamically loaded. + * + * This extension has several events and errors. + * + * XI is mandatory nowadays, so if we fail to init XI, we die. + */ + +void +XInputExtensionInit(void) +{ + ExtensionEntry *extEntry; + + XExtensionVersion thisversion = { XI_Present, + SERVER_XI_MAJOR_VERSION, + SERVER_XI_MINOR_VERSION, + }; + + if (!dixRegisterPrivateKey + (&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec))) + FatalError("Cannot request private for XI.\n"); + + if (!AddCallback(&ClientStateCallback, XIClientCallback, 0)) + FatalError("Failed to add callback to XI.\n"); + + if (!XIBarrierInit()) + FatalError("Could not initialize barriers.\n"); + + extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch, + SProcIDispatch, IResetProc, StandardMinorOpcode); + if (extEntry) { + IReqCode = extEntry->base; + IEventBase = extEntry->eventBase; + XIVersion = thisversion; + MakeDeviceTypeAtoms(); + RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone, + "INPUTCLIENT"); + if (!RT_INPUTCLIENT) + FatalError("Failed to add resource type for XI.\n"); + FixExtensionEvents(extEntry); + ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch; + EventSwapVector[DeviceValuator] = SEventIDispatch; + EventSwapVector[DeviceKeyPress] = SEventIDispatch; + EventSwapVector[DeviceKeyRelease] = SEventIDispatch; + EventSwapVector[DeviceButtonPress] = SEventIDispatch; + EventSwapVector[DeviceButtonRelease] = SEventIDispatch; + EventSwapVector[DeviceMotionNotify] = SEventIDispatch; + EventSwapVector[DeviceFocusIn] = SEventIDispatch; + EventSwapVector[DeviceFocusOut] = SEventIDispatch; + EventSwapVector[ProximityIn] = SEventIDispatch; + EventSwapVector[ProximityOut] = SEventIDispatch; + EventSwapVector[DeviceStateNotify] = SEventIDispatch; + EventSwapVector[DeviceKeyStateNotify] = SEventIDispatch; + EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch; + EventSwapVector[DeviceMappingNotify] = SEventIDispatch; + EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; + EventSwapVector[DevicePresenceNotify] = SEventIDispatch; + + GERegisterExtension(IReqCode, XI2EventSwap); + + memset(&xi_all_devices, 0, sizeof(xi_all_devices)); + memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices)); + xi_all_devices.id = XIAllDevices; + xi_all_devices.name = strdup("XIAllDevices"); + xi_all_master_devices.id = XIAllMasterDevices; + xi_all_master_devices.name = strdup("XIAllMasterDevices"); + + inputInfo.all_devices = &xi_all_devices; + inputInfo.all_master_devices = &xi_all_master_devices; + + XIResetProperties(); + } + else { + FatalError("IExtensionInit: AddExtensions failed\n"); + } +} diff --git a/Xi/getbmap.c b/Xi/getbmap.c new file mode 100644 index 0000000..49b8688 --- /dev/null +++ b/Xi/getbmap.c @@ -0,0 +1,132 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to return the version of the extension. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" + +#include "getbmap.h" + +/*********************************************************************** + * + * This procedure gets the button mapping for the specified device. + * + */ + +int +SProcXGetDeviceButtonMapping(ClientPtr client) +{ + REQUEST(xGetDeviceButtonMappingReq); + swaps(&stuff->length); + return (ProcXGetDeviceButtonMapping(client)); +} + +/*********************************************************************** + * + * This procedure gets the button mapping for the specified device. + * + */ + +int +ProcXGetDeviceButtonMapping(ClientPtr client) +{ + DeviceIntPtr dev; + xGetDeviceButtonMappingReply rep; + ButtonClassPtr b; + int rc; + + REQUEST(xGetDeviceButtonMappingReq); + REQUEST_SIZE_MATCH(xGetDeviceButtonMappingReq); + + rep = (xGetDeviceButtonMappingReply) { + .repType = X_Reply, + .RepType = X_GetDeviceButtonMapping, + .sequenceNumber = client->sequence, + .nElts = 0, + .length = 0 + }; + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + b = dev->button; + if (b == NULL) + return BadMatch; + + rep.nElts = b->numButtons; + rep.length = bytes_to_int32(rep.nElts); + WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep); + WriteToClient(client, rep.nElts, &b->map[1]); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceButtonMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceButtonMapping(ClientPtr client, int size, + xGetDeviceButtonMappingReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/getbmap.h b/Xi/getbmap.h new file mode 100644 index 0000000..8b107d0 --- /dev/null +++ b/Xi/getbmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETBMAP_H +#define GETBMAP_H 1 + +int SProcXGetDeviceButtonMapping(ClientPtr /* client */ + ); + +int ProcXGetDeviceButtonMapping(ClientPtr /* client */ + ); + +void SRepXGetDeviceButtonMapping(ClientPtr /* client */ , + int /* size */ , + xGetDeviceButtonMappingReply * /* rep */ + ); + +#endif /* GETBMAP_H */ diff --git a/Xi/getdctl.c b/Xi/getdctl.c new file mode 100644 index 0000000..6f73e09 --- /dev/null +++ b/Xi/getdctl.c @@ -0,0 +1,236 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Get Device control attributes for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" + +#include "getdctl.h" + +/*********************************************************************** + * + * This procedure gets the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetDeviceControl(ClientPtr client) +{ + REQUEST(xGetDeviceControlReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGetDeviceControlReq); + swaps(&stuff->control); + return (ProcXGetDeviceControl(client)); +} + +/*********************************************************************** + * + * This procedure copies DeviceResolution data, swapping if necessary. + * + */ + +static void +CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf, + int length) +{ + AxisInfoPtr a; + xDeviceResolutionState *r; + int i, *iptr; + + r = (xDeviceResolutionState *) buf; + r->control = DEVICE_RESOLUTION; + r->length = length; + r->num_valuators = v->numAxes; + buf += sizeof(xDeviceResolutionState); + iptr = (int *) buf; + for (i = 0, a = v->axes; i < v->numAxes; i++, a++) + *iptr++ = a->resolution; + for (i = 0, a = v->axes; i < v->numAxes; i++, a++) + *iptr++ = a->min_resolution; + for (i = 0, a = v->axes; i < v->numAxes; i++, a++) + *iptr++ = a->max_resolution; + if (client->swapped) { + swaps(&r->control); + swaps(&r->length); + swapl(&r->num_valuators); + iptr = (int *) buf; + for (i = 0; i < (3 * v->numAxes); i++, iptr++) { + swapl(iptr); + } + } +} + +static void +CopySwapDeviceCore(ClientPtr client, DeviceIntPtr dev, char *buf) +{ + xDeviceCoreState *c = (xDeviceCoreState *) buf; + + c->control = DEVICE_CORE; + c->length = sizeof(xDeviceCoreState); + c->status = dev->coreEvents; + c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer); + + if (client->swapped) { + swaps(&c->control); + swaps(&c->length); + } +} + +static void +CopySwapDeviceEnable(ClientPtr client, DeviceIntPtr dev, char *buf) +{ + xDeviceEnableState *e = (xDeviceEnableState *) buf; + + e->control = DEVICE_ENABLE; + e->length = sizeof(xDeviceEnableState); + e->enable = dev->enabled; + + if (client->swapped) { + swaps(&e->control); + swaps(&e->length); + } +} + +/*********************************************************************** + * + * This procedure writes the reply for the xGetDeviceControl function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} + +/*********************************************************************** + * + * Get the state of the specified device control. + * + */ + +int +ProcXGetDeviceControl(ClientPtr client) +{ + int rc, total_length = 0; + char *buf, *savbuf; + DeviceIntPtr dev; + xGetDeviceControlReply rep; + + REQUEST(xGetDeviceControlReq); + REQUEST_SIZE_MATCH(xGetDeviceControlReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xGetDeviceControlReply) { + .repType = X_Reply, + .RepType = X_GetDeviceControl, + .sequenceNumber = client->sequence, + .length = 0 + }; + + switch (stuff->control) { + case DEVICE_RESOLUTION: + if (!dev->valuator) + return BadMatch; + total_length = sizeof(xDeviceResolutionState) + + (3 * sizeof(int) * dev->valuator->numAxes); + break; + case DEVICE_ABS_CALIB: + case DEVICE_ABS_AREA: + return BadMatch; + case DEVICE_CORE: + total_length = sizeof(xDeviceCoreState); + break; + case DEVICE_ENABLE: + total_length = sizeof(xDeviceEnableState); + break; + default: + return BadValue; + } + + buf = (char *) malloc(total_length); + if (!buf) + return BadAlloc; + savbuf = buf; + + switch (stuff->control) { + case DEVICE_RESOLUTION: + CopySwapDeviceResolution(client, dev->valuator, buf, total_length); + break; + case DEVICE_CORE: + CopySwapDeviceCore(client, dev, buf); + break; + case DEVICE_ENABLE: + CopySwapDeviceEnable(client, dev, buf); + break; + default: + break; + } + + rep.length = bytes_to_int32(total_length); + WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep); + WriteToClient(client, total_length, savbuf); + free(savbuf); + return Success; +} diff --git a/Xi/getdctl.h b/Xi/getdctl.h new file mode 100644 index 0000000..7ca7392 --- /dev/null +++ b/Xi/getdctl.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETDCTL_H +#define GETDCTL_H 1 + +int SProcXGetDeviceControl(ClientPtr /* client */ + ); + +int ProcXGetDeviceControl(ClientPtr /* client */ + ); + +void SRepXGetDeviceControl(ClientPtr /* client */ , + int /* size */ , + xGetDeviceControlReply * /* rep */ + ); + +#endif /* GETDCTL_H */ diff --git a/Xi/getfctl.c b/Xi/getfctl.c new file mode 100644 index 0000000..599b2ef --- /dev/null +++ b/Xi/getfctl.c @@ -0,0 +1,358 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Get feedback control attributes for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" + +#include "getfctl.h" + +/*********************************************************************** + * + * This procedure gets the control attributes for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetFeedbackControl(ClientPtr client) +{ + REQUEST(xGetFeedbackControlReq); + swaps(&stuff->length); + return (ProcXGetFeedbackControl(client)); +} + +/*********************************************************************** + * + * This procedure copies KbdFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf) +{ + int i; + xKbdFeedbackState *k2; + + k2 = (xKbdFeedbackState *) * buf; + k2->class = KbdFeedbackClass; + k2->length = sizeof(xKbdFeedbackState); + k2->id = k->ctrl.id; + k2->click = k->ctrl.click; + k2->percent = k->ctrl.bell; + k2->pitch = k->ctrl.bell_pitch; + k2->duration = k->ctrl.bell_duration; + k2->led_mask = k->ctrl.leds; + k2->global_auto_repeat = k->ctrl.autoRepeat; + for (i = 0; i < 32; i++) + k2->auto_repeats[i] = k->ctrl.autoRepeats[i]; + if (client->swapped) { + swaps(&k2->length); + swaps(&k2->pitch); + swaps(&k2->duration); + swapl(&k2->led_mask); + swapl(&k2->led_values); + } + *buf += sizeof(xKbdFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies PtrFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf) +{ + xPtrFeedbackState *p2; + + p2 = (xPtrFeedbackState *) * buf; + p2->class = PtrFeedbackClass; + p2->length = sizeof(xPtrFeedbackState); + p2->id = p->ctrl.id; + p2->accelNum = p->ctrl.num; + p2->accelDenom = p->ctrl.den; + p2->threshold = p->ctrl.threshold; + if (client->swapped) { + swaps(&p2->length); + swaps(&p2->accelNum); + swaps(&p2->accelDenom); + swaps(&p2->threshold); + } + *buf += sizeof(xPtrFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies IntegerFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf) +{ + xIntegerFeedbackState *i2; + + i2 = (xIntegerFeedbackState *) * buf; + i2->class = IntegerFeedbackClass; + i2->length = sizeof(xIntegerFeedbackState); + i2->id = i->ctrl.id; + i2->resolution = i->ctrl.resolution; + i2->min_value = i->ctrl.min_value; + i2->max_value = i->ctrl.max_value; + if (client->swapped) { + swaps(&i2->length); + swapl(&i2->resolution); + swapl(&i2->min_value); + swapl(&i2->max_value); + } + *buf += sizeof(xIntegerFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies StringFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf) +{ + int i; + xStringFeedbackState *s2; + KeySym *kptr; + + s2 = (xStringFeedbackState *) * buf; + s2->class = StringFeedbackClass; + s2->length = sizeof(xStringFeedbackState) + + s->ctrl.num_symbols_supported * sizeof(KeySym); + s2->id = s->ctrl.id; + s2->max_symbols = s->ctrl.max_symbols; + s2->num_syms_supported = s->ctrl.num_symbols_supported; + *buf += sizeof(xStringFeedbackState); + kptr = (KeySym *) (*buf); + for (i = 0; i < s->ctrl.num_symbols_supported; i++) + *kptr++ = *(s->ctrl.symbols_supported + i); + if (client->swapped) { + swaps(&s2->length); + swaps(&s2->max_symbols); + swaps(&s2->num_syms_supported); + kptr = (KeySym *) (*buf); + for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) { + swapl(kptr); + } + } + *buf += (s->ctrl.num_symbols_supported * sizeof(KeySym)); +} + +/*********************************************************************** + * + * This procedure copies LedFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf) +{ + xLedFeedbackState *l2; + + l2 = (xLedFeedbackState *) * buf; + l2->class = LedFeedbackClass; + l2->length = sizeof(xLedFeedbackState); + l2->id = l->ctrl.id; + l2->led_values = l->ctrl.led_values; + l2->led_mask = l->ctrl.led_mask; + if (client->swapped) { + swaps(&l2->length); + swapl(&l2->led_values); + swapl(&l2->led_mask); + } + *buf += sizeof(xLedFeedbackState); +} + +/*********************************************************************** + * + * This procedure copies BellFeedbackClass data, swapping if necessary. + * + */ + +static void +CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf) +{ + xBellFeedbackState *b2; + + b2 = (xBellFeedbackState *) * buf; + b2->class = BellFeedbackClass; + b2->length = sizeof(xBellFeedbackState); + b2->id = b->ctrl.id; + b2->percent = b->ctrl.percent; + b2->pitch = b->ctrl.pitch; + b2->duration = b->ctrl.duration; + if (client->swapped) { + swaps(&b2->length); + swaps(&b2->pitch); + swaps(&b2->duration); + } + *buf += sizeof(xBellFeedbackState); +} + +/*********************************************************************** + * + * This procedure writes the reply for the xGetFeedbackControl function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetFeedbackControl(ClientPtr client, int size, + xGetFeedbackControlReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_feedbacks); + WriteToClient(client, size, rep); +} + +/*********************************************************************** + * + * Get the feedback control state. + * + */ + +int +ProcXGetFeedbackControl(ClientPtr client) +{ + int rc, total_length = 0; + char *buf, *savbuf; + DeviceIntPtr dev; + KbdFeedbackPtr k; + PtrFeedbackPtr p; + IntegerFeedbackPtr i; + StringFeedbackPtr s; + BellFeedbackPtr b; + LedFeedbackPtr l; + xGetFeedbackControlReply rep; + + REQUEST(xGetFeedbackControlReq); + REQUEST_SIZE_MATCH(xGetFeedbackControlReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xGetFeedbackControlReply) { + .repType = X_Reply, + .RepType = X_GetFeedbackControl, + .sequenceNumber = client->sequence, + .length = 0, + .num_feedbacks = 0 + }; + + for (k = dev->kbdfeed; k; k = k->next) { + rep.num_feedbacks++; + total_length += sizeof(xKbdFeedbackState); + } + for (p = dev->ptrfeed; p; p = p->next) { + rep.num_feedbacks++; + total_length += sizeof(xPtrFeedbackState); + } + for (s = dev->stringfeed; s; s = s->next) { + rep.num_feedbacks++; + total_length += sizeof(xStringFeedbackState) + + (s->ctrl.num_symbols_supported * sizeof(KeySym)); + } + for (i = dev->intfeed; i; i = i->next) { + rep.num_feedbacks++; + total_length += sizeof(xIntegerFeedbackState); + } + for (l = dev->leds; l; l = l->next) { + rep.num_feedbacks++; + total_length += sizeof(xLedFeedbackState); + } + for (b = dev->bell; b; b = b->next) { + rep.num_feedbacks++; + total_length += sizeof(xBellFeedbackState); + } + + if (total_length == 0) + return BadMatch; + + buf = (char *) malloc(total_length); + if (!buf) + return BadAlloc; + savbuf = buf; + + for (k = dev->kbdfeed; k; k = k->next) + CopySwapKbdFeedback(client, k, &buf); + for (p = dev->ptrfeed; p; p = p->next) + CopySwapPtrFeedback(client, p, &buf); + for (s = dev->stringfeed; s; s = s->next) + CopySwapStringFeedback(client, s, &buf); + for (i = dev->intfeed; i; i = i->next) + CopySwapIntegerFeedback(client, i, &buf); + for (l = dev->leds; l; l = l->next) + CopySwapLedFeedback(client, l, &buf); + for (b = dev->bell; b; b = b->next) + CopySwapBellFeedback(client, b, &buf); + + rep.length = bytes_to_int32(total_length); + WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep); + WriteToClient(client, total_length, savbuf); + free(savbuf); + return Success; +} diff --git a/Xi/getfctl.h b/Xi/getfctl.h new file mode 100644 index 0000000..f0b240d --- /dev/null +++ b/Xi/getfctl.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETFCTL_H +#define GETFCTL_H 1 + +int SProcXGetFeedbackControl(ClientPtr /* client */ + ); + +int ProcXGetFeedbackControl(ClientPtr /* client */ + ); + +void SRepXGetFeedbackControl(ClientPtr /* client */ , + int /* size */ , + xGetFeedbackControlReply * /* rep */ + ); + +#endif /* GETFCTL_H */ diff --git a/Xi/getfocus.c b/Xi/getfocus.c new file mode 100644 index 0000000..40546cb --- /dev/null +++ b/Xi/getfocus.c @@ -0,0 +1,141 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to get the focus for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "windowstr.h" /* focus struct */ +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" + +#include "getfocus.h" + +/*********************************************************************** + * + * This procedure gets the focus for a device. + * + */ + +int +SProcXGetDeviceFocus(ClientPtr client) +{ + REQUEST(xGetDeviceFocusReq); + swaps(&stuff->length); + return (ProcXGetDeviceFocus(client)); +} + +/*********************************************************************** + * + * This procedure gets the focus for a device. + * + */ + +int +ProcXGetDeviceFocus(ClientPtr client) +{ + DeviceIntPtr dev; + FocusClassPtr focus; + xGetDeviceFocusReply rep; + int rc; + + REQUEST(xGetDeviceFocusReq); + REQUEST_SIZE_MATCH(xGetDeviceFocusReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); + if (rc != Success) + return rc; + if (!dev->focus) + return BadDevice; + + rep = (xGetDeviceFocusReply) { + .repType = X_Reply, + .RepType = X_GetDeviceFocus, + .sequenceNumber = client->sequence, + .length = 0 + }; + + focus = dev->focus; + + if (focus->win == NoneWin) + rep.focus = None; + else if (focus->win == PointerRootWin) + rep.focus = PointerRoot; + else if (focus->win == FollowKeyboardWin) + rep.focus = FollowKeyboard; + else + rep.focus = focus->win->drawable.id; + + rep.time = focus->time.milliseconds; + rep.revertTo = focus->revert; + WriteReplyToClient(client, sizeof(xGetDeviceFocusReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the GetDeviceFocus function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->focus); + swapl(&rep->time); + WriteToClient(client, size, rep); +} diff --git a/Xi/getfocus.h b/Xi/getfocus.h new file mode 100644 index 0000000..6e90ae7 --- /dev/null +++ b/Xi/getfocus.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETFOCUS_H +#define GETFOCUS_H 1 + +int SProcXGetDeviceFocus(ClientPtr /* client */ + ); + +int ProcXGetDeviceFocus(ClientPtr /* client */ + ); + +void SRepXGetDeviceFocus(ClientPtr /* client */ , + int /* size */ , + xGetDeviceFocusReply * /* rep */ + ); + +#endif /* GETFOCUS_H */ diff --git a/Xi/getkmap.c b/Xi/getkmap.c new file mode 100644 index 0000000..87c1977 --- /dev/null +++ b/Xi/getkmap.c @@ -0,0 +1,156 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Get the key mapping for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" +#include "swaprep.h" +#include "xkbsrv.h" +#include "xkbstr.h" + +#include "getkmap.h" + +/*********************************************************************** + * + * This procedure gets the key mapping for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetDeviceKeyMapping(ClientPtr client) +{ + REQUEST(xGetDeviceKeyMappingReq); + swaps(&stuff->length); + return (ProcXGetDeviceKeyMapping(client)); +} + +/*********************************************************************** + * + * Get the device key mapping. + * + */ + +int +ProcXGetDeviceKeyMapping(ClientPtr client) +{ + xGetDeviceKeyMappingReply rep; + DeviceIntPtr dev; + XkbDescPtr xkb; + KeySymsPtr syms; + int rc; + + REQUEST(xGetDeviceKeyMappingReq); + REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + if (dev->key == NULL) + return BadMatch; + xkb = dev->key->xkbInfo->desc; + + if (stuff->firstKeyCode < xkb->min_key_code || + stuff->firstKeyCode > xkb->max_key_code) { + client->errorValue = stuff->firstKeyCode; + return BadValue; + } + + if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) { + client->errorValue = stuff->count; + return BadValue; + } + + syms = XkbGetCoreMap(dev); + if (!syms) + return BadAlloc; + + rep = (xGetDeviceKeyMappingReply) { + .repType = X_Reply, + .RepType = X_GetDeviceKeyMapping, + .sequenceNumber = client->sequence, + .keySymsPerKeyCode = syms->mapWidth, + .length = (syms->mapWidth * stuff->count) /* KeySyms are 4 bytes */ + }; + WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); + + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; + WriteSwappedDataToClient(client, + syms->mapWidth * stuff->count * sizeof(KeySym), + &syms->map[syms->mapWidth * (stuff->firstKeyCode - + syms->minKeyCode)]); + free(syms->map); + free(syms); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceKeyMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceKeyMapping(ClientPtr client, int size, + xGetDeviceKeyMappingReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/getkmap.h b/Xi/getkmap.h new file mode 100644 index 0000000..8f0ff8e --- /dev/null +++ b/Xi/getkmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETKMAP_H +#define GETKMAP_H 1 + +int SProcXGetDeviceKeyMapping(ClientPtr /* client */ + ); + +int ProcXGetDeviceKeyMapping(ClientPtr /* client */ + ); + +void SRepXGetDeviceKeyMapping(ClientPtr /* client */ , + int /* size */ , + xGetDeviceKeyMappingReply * /* rep */ + ); + +#endif /* GETKMAP_H */ diff --git a/Xi/getmmap.c b/Xi/getmmap.c new file mode 100644 index 0000000..f07f2bb --- /dev/null +++ b/Xi/getmmap.c @@ -0,0 +1,135 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Get the modifier mapping for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> /* Request macro */ +#include "exglobals.h" + +#include "getmmap.h" + +/*********************************************************************** + * + * This procedure gets the modifier mapping for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXGetDeviceModifierMapping(ClientPtr client) +{ + REQUEST(xGetDeviceModifierMappingReq); + swaps(&stuff->length); + return (ProcXGetDeviceModifierMapping(client)); +} + +/*********************************************************************** + * + * Get the device Modifier mapping. + * + */ + +int +ProcXGetDeviceModifierMapping(ClientPtr client) +{ + DeviceIntPtr dev; + xGetDeviceModifierMappingReply rep; + KeyCode *modkeymap = NULL; + int ret, max_keys_per_mod; + + REQUEST(xGetDeviceModifierMappingReq); + REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (ret != Success) + return ret; + + ret = generate_modkeymap(client, dev, &modkeymap, &max_keys_per_mod); + if (ret != Success) + return ret; + + rep = (xGetDeviceModifierMappingReply) { + .repType = X_Reply, + .RepType = X_GetDeviceModifierMapping, + .sequenceNumber = client->sequence, + .numKeyPerModifier = max_keys_per_mod, + /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ + .length = max_keys_per_mod << 1 + }; + + WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); + WriteToClient(client, max_keys_per_mod * 8, modkeymap); + + free(modkeymap); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceModifierMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceModifierMapping(ClientPtr client, int size, + xGetDeviceModifierMappingReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/getmmap.h b/Xi/getmmap.h new file mode 100644 index 0000000..d0a76df --- /dev/null +++ b/Xi/getmmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETMMAP_H +#define GETMMAP_H 1 + +int SProcXGetDeviceModifierMapping(ClientPtr /* client */ + ); + +int ProcXGetDeviceModifierMapping(ClientPtr /* client */ + ); + +void SRepXGetDeviceModifierMapping(ClientPtr /* client */ , + int /* size */ , + xGetDeviceModifierMappingReply * /* rep */ + ); + +#endif /* GETMMAP_H */ diff --git a/Xi/getprop.c b/Xi/getprop.c new file mode 100644 index 0000000..4d6ce63 --- /dev/null +++ b/Xi/getprop.c @@ -0,0 +1,184 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Function to return the dont-propagate-list for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structs */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" +#include "swaprep.h" + +#include "getprop.h" + +extern XExtEventInfo EventInfo[]; +extern int ExtEventIndex; + +/*********************************************************************** + * + * Handle a request from a client with a different byte order. + * + */ + +int +SProcXGetDeviceDontPropagateList(ClientPtr client) +{ + REQUEST(xGetDeviceDontPropagateListReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); + swapl(&stuff->window); + return (ProcXGetDeviceDontPropagateList(client)); +} + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +ProcXGetDeviceDontPropagateList(ClientPtr client) +{ + CARD16 count = 0; + int i, rc; + XEventClass *buf = NULL, *tbuf; + WindowPtr pWin; + xGetDeviceDontPropagateListReply rep; + OtherInputMasks *others; + + REQUEST(xGetDeviceDontPropagateListReq); + REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); + + rep = (xGetDeviceDontPropagateListReply) { + .repType = X_Reply, + .RepType = X_GetDeviceDontPropagateList, + .sequenceNumber = client->sequence, + .length = 0, + .count = 0 + }; + + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + if ((others = wOtherInputMasks(pWin)) != 0) { + for (i = 0; i < EMASKSIZE; i++) + ClassFromMask(NULL, others->dontPropagateMask[i], i, &count, COUNT); + if (count) { + rep.count = count; + buf = (XEventClass *) malloc(rep.count * sizeof(XEventClass)); + rep.length = bytes_to_int32(rep.count * sizeof(XEventClass)); + + tbuf = buf; + for (i = 0; i < EMASKSIZE; i++) + tbuf = ClassFromMask(tbuf, others->dontPropagateMask[i], i, + NULL, CREATE); + } + } + + WriteReplyToClient(client, sizeof(xGetDeviceDontPropagateListReply), &rep); + + if (count) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, count * sizeof(XEventClass), buf); + free(buf); + } + return Success; +} + +/*********************************************************************** + * + * This procedure gets a list of event classes from a mask word. + * A single mask may translate to more than one event class. + * + */ + +XEventClass + * ClassFromMask(XEventClass * buf, Mask mask, int maskndx, CARD16 *count, + int mode) +{ + int i, j; + int id = maskndx; + Mask tmask = 0x80000000; + + for (i = 0; i < 32; i++, tmask >>= 1) + if (tmask & mask) { + for (j = 0; j < ExtEventIndex; j++) + if (EventInfo[j].mask == tmask) { + if (mode == COUNT) + (*count)++; + else + *buf++ = (id << 8) | EventInfo[j].type; + } + } + return buf; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceDontPropagateList function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceDontPropagateList(ClientPtr client, int size, + xGetDeviceDontPropagateListReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->count); + WriteToClient(client, size, rep); +} diff --git a/Xi/getprop.h b/Xi/getprop.h new file mode 100644 index 0000000..25fa0d9 --- /dev/null +++ b/Xi/getprop.h @@ -0,0 +1,51 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETPROP_H +#define GETPROP_H 1 + +int SProcXGetDeviceDontPropagateList(ClientPtr /* client */ + ); + +int ProcXGetDeviceDontPropagateList(ClientPtr /* client */ + ); + +XEventClass *ClassFromMask(XEventClass * /* buf */ , + Mask /* mask */ , + int /* maskndx */ , + CARD16 * /* count */ , + int /* mode */ + ); + +void SRepXGetDeviceDontPropagateList(ClientPtr /* client */ , + int /* size */ , + xGetDeviceDontPropagateListReply * /* rep */ + ); + +#endif /* GETPROP_H */ diff --git a/Xi/getselev.c b/Xi/getselev.c new file mode 100644 index 0000000..60a46c2 --- /dev/null +++ b/Xi/getselev.c @@ -0,0 +1,176 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to get the current selected events for a given window. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window struct */ +#include "exglobals.h" +#include "swaprep.h" + +#include "getprop.h" +#include "getselev.h" + +/*********************************************************************** + * + * This procedure gets the current selected extension events. + * + */ + +int +SProcXGetSelectedExtensionEvents(ClientPtr client) +{ + REQUEST(xGetSelectedExtensionEventsReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); + swapl(&stuff->window); + return (ProcXGetSelectedExtensionEvents(client)); +} + +/*********************************************************************** + * + * This procedure gets the current device select mask, + * if the client and server have a different byte ordering. + * + */ + +int +ProcXGetSelectedExtensionEvents(ClientPtr client) +{ + int i, rc, total_length = 0; + xGetSelectedExtensionEventsReply rep; + WindowPtr pWin; + XEventClass *buf = NULL; + XEventClass *tclient; + XEventClass *aclient; + OtherInputMasks *pOthers; + InputClientsPtr others; + + REQUEST(xGetSelectedExtensionEventsReq); + REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); + + rep = (xGetSelectedExtensionEventsReply) { + .repType = X_Reply, + .RepType = X_GetSelectedExtensionEvents, + .sequenceNumber = client->sequence, + .length = 0, + .this_client_count = 0, + .all_clients_count = 0 + }; + + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + if ((pOthers = wOtherInputMasks(pWin)) != 0) { + for (others = pOthers->inputClients; others; others = others->next) + for (i = 0; i < EMASKSIZE; i++) + ClassFromMask(NULL, others->mask[i], i, + &rep.all_clients_count, COUNT); + + for (others = pOthers->inputClients; others; others = others->next) + if (SameClient(others, client)) { + for (i = 0; i < EMASKSIZE; i++) + ClassFromMask(NULL, others->mask[i], i, + &rep.this_client_count, COUNT); + break; + } + + total_length = (rep.all_clients_count + rep.this_client_count) * + sizeof(XEventClass); + rep.length = bytes_to_int32(total_length); + buf = (XEventClass *) malloc(total_length); + + tclient = buf; + aclient = buf + rep.this_client_count; + if (others) + for (i = 0; i < EMASKSIZE; i++) + tclient = + ClassFromMask(tclient, others->mask[i], i, NULL, CREATE); + + for (others = pOthers->inputClients; others; others = others->next) + for (i = 0; i < EMASKSIZE; i++) + aclient = + ClassFromMask(aclient, others->mask[i], i, NULL, CREATE); + } + + WriteReplyToClient(client, sizeof(xGetSelectedExtensionEventsReply), &rep); + + if (total_length) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, total_length, buf); + } + free(buf); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetSelectedExtensionEvents function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetSelectedExtensionEvents(ClientPtr client, int size, + xGetSelectedExtensionEventsReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->this_client_count); + swaps(&rep->all_clients_count); + WriteToClient(client, size, rep); +} diff --git a/Xi/getselev.h b/Xi/getselev.h new file mode 100644 index 0000000..371be1a --- /dev/null +++ b/Xi/getselev.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETSELEV_H +#define GETSELEV_H 1 + +int SProcXGetSelectedExtensionEvents(ClientPtr /* client */ + ); + +int ProcXGetSelectedExtensionEvents(ClientPtr /* client */ + ); + +void SRepXGetSelectedExtensionEvents(ClientPtr /* client */ , + int /* size */ , + xGetSelectedExtensionEventsReply * /* rep */ + ); + +#endif /* GETSELEV_H */ diff --git a/Xi/getvers.c b/Xi/getvers.c new file mode 100644 index 0000000..829e695 --- /dev/null +++ b/Xi/getvers.c @@ -0,0 +1,132 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to return the version of the extension. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" + +#include "getvers.h" + +XExtensionVersion XIVersion; + +/*********************************************************************** + * + * Handle a request from a client with a different byte order than us. + * + */ + +int +SProcXGetExtensionVersion(ClientPtr client) +{ + REQUEST(xGetExtensionVersionReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); + swaps(&stuff->nbytes); + return (ProcXGetExtensionVersion(client)); +} + +/*********************************************************************** + * + * This procedure returns the major/minor version of the X Input extension. + * + */ + +int +ProcXGetExtensionVersion(ClientPtr client) +{ + xGetExtensionVersionReply rep; + + REQUEST(xGetExtensionVersionReq); + REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); + + if (stuff->length != bytes_to_int32(sizeof(xGetExtensionVersionReq) + + stuff->nbytes)) + return BadLength; + + rep = (xGetExtensionVersionReply) { + .repType = X_Reply, + .RepType = X_GetExtensionVersion, + .sequenceNumber = client->sequence, + .length = 0, + .major_version = XIVersion.major_version, + .minor_version = XIVersion.minor_version, + .present = TRUE + }; + + WriteReplyToClient(client, sizeof(xGetExtensionVersionReply), &rep); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetExtensionVersion function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetExtensionVersion(ClientPtr client, int size, + xGetExtensionVersionReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->major_version); + swaps(&rep->minor_version); + WriteToClient(client, size, rep); +} diff --git a/Xi/getvers.h b/Xi/getvers.h new file mode 100644 index 0000000..11fec4b --- /dev/null +++ b/Xi/getvers.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETVERS_H +#define GETVERS_H 1 + +int SProcXGetExtensionVersion(ClientPtr /* client */ + ); + +int ProcXGetExtensionVersion(ClientPtr /* client */ + ); + +void SRepXGetExtensionVersion(ClientPtr /* client */ , + int /* size */ , + xGetExtensionVersionReply * /* rep */ + ); + +#endif /* GETVERS_H */ diff --git a/Xi/grabdev.c b/Xi/grabdev.c new file mode 100644 index 0000000..9c6c429 --- /dev/null +++ b/Xi/grabdev.c @@ -0,0 +1,214 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to grab an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" +#include "dixevents.h" /* GrabDevice */ + +#include "grabdev.h" + +extern XExtEventInfo EventInfo[]; +extern int ExtEventIndex; + +/*********************************************************************** + * + * Swap the request if the requestor has a different byte order than us. + * + */ + +int +SProcXGrabDevice(ClientPtr client) +{ + REQUEST(xGrabDeviceReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); + swapl(&stuff->grabWindow); + swapl(&stuff->time); + swaps(&stuff->event_count); + + if (stuff->length != + bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count) + return BadLength; + + SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); + + return (ProcXGrabDevice(client)); +} + +/*********************************************************************** + * + * Grab an extension device. + * + */ + +int +ProcXGrabDevice(ClientPtr client) +{ + int rc; + xGrabDeviceReply rep; + DeviceIntPtr dev; + GrabMask mask; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xGrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); + + if (stuff->length != + bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count) + return BadLength; + + rep = (xGrabDeviceReply) { + .repType = X_Reply, + .RepType = X_GrabDevice, + .sequenceNumber = client->sequence, + .length = 0, + }; + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (rc != Success) + return rc; + + if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1], + stuff->event_count, tmp, dev, + X_GrabDevice)) != Success) + return rc; + + mask.xi = tmp[stuff->deviceid].mask; + + rc = GrabDevice(client, dev, stuff->other_devices_mode, + stuff->this_device_mode, stuff->grabWindow, + stuff->ownerEvents, stuff->time, + &mask, XI, None, None, &rep.status); + + if (rc != Success) + return rc; + + WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure creates an event mask from a list of XEventClasses. + * + * Procedure is as follows: + * An XEventClass is (deviceid << 8 | eventtype). For each entry in the list, + * get the device. Then run through all available event indices (those are + * set when XI starts up) and binary OR's the device's mask to whatever the + * event mask for the given event type was. + * If an error occurs, it is sent to the client. Errors are generated if + * - if the device given in the event classs is invalid + * - if the device in the class list is not the device given as parameter (no + * error if parameter is NULL) + * + * mask has to be size EMASKSIZE and pre-allocated. + * + * @param client The client to send the error to (if one occurs) + * @param list List of event classes as sent from the client. + * @param count Number of elements in list. + * @param mask Preallocated mask (size EMASKSIZE). + * @param dev The device we're creating masks for. + * @param req The request we're processing. Used to fill in error fields. + */ + +int +CreateMaskFromList(ClientPtr client, XEventClass * list, int count, + struct tmask *mask, DeviceIntPtr dev, int req) +{ + int rc, i, j; + int device; + DeviceIntPtr tdev; + + memset(mask, 0, EMASKSIZE * sizeof(struct tmask)); + + for (i = 0; i < count; i++, list++) { + device = *list >> 8; + if (device > 255) + return BadClass; + + rc = dixLookupDevice(&tdev, device, client, DixUseAccess); + if (rc != BadDevice && rc != Success) + return rc; + if (rc == BadDevice || (dev != NULL && tdev != dev)) + return BadClass; + + for (j = 0; j < ExtEventIndex; j++) + if (EventInfo[j].type == (*list & 0xff)) { + mask[device].mask |= EventInfo[j].mask; + mask[device].dev = (Pointer) tdev; + break; + } + } + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGrabDevice function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/grabdev.h b/Xi/grabdev.h new file mode 100644 index 0000000..72e0fd6 --- /dev/null +++ b/Xi/grabdev.h @@ -0,0 +1,52 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GRABDEV_H +#define GRABDEV_H 1 + +int SProcXGrabDevice(ClientPtr /* client */ + ); + +int ProcXGrabDevice(ClientPtr /* client */ + ); + +int CreateMaskFromList(ClientPtr /* client */ , + XEventClass * /* list */ , + int /* count */ , + struct tmask /* mask */ [], + DeviceIntPtr /* dev */ , + int /* req */ + ); + +void SRepXGrabDevice(ClientPtr /* client */ , + int /* size */ , + xGrabDeviceReply * /* rep */ + ); + +#endif /* GRABDEV_H */ diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c new file mode 100644 index 0000000..8b4ae69 --- /dev/null +++ b/Xi/grabdevb.c @@ -0,0 +1,153 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to grab a button on an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" +#include "xace.h" + +#include "grabdev.h" +#include "grabdevb.h" + +/*********************************************************************** + * + * Handle requests from clients with a different byte order. + * + */ + +int +SProcXGrabDeviceButton(ClientPtr client) +{ + REQUEST(xGrabDeviceButtonReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); + swapl(&stuff->grabWindow); + swaps(&stuff->modifiers); + swaps(&stuff->event_count); + REQUEST_FIXED_SIZE(xGrabDeviceButtonReq, + stuff->event_count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); + + return (ProcXGrabDeviceButton(client)); +} + +/*********************************************************************** + * + * Grab a button on an extension device. + * + */ + +int +ProcXGrabDeviceButton(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + DeviceIntPtr mdev; + XEventClass *class; + struct tmask tmp[EMASKSIZE]; + GrabParameters param; + GrabMask mask; + + REQUEST(xGrabDeviceButtonReq); + REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); + + if (stuff->length != + bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count) + return BadLength; + + ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (ret != Success) + return ret; + + if (stuff->modifier_device != UseXKeyboard) { + ret = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixUseAccess); + if (ret != Success) + return ret; + if (mdev->key == NULL) + return BadMatch; + } + else { + mdev = PickKeyboard(client); + ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess); + if (ret != Success) + return ret; + } + + class = (XEventClass *) (&stuff[1]); /* first word of values */ + + if ((ret = CreateMaskFromList(client, class, + stuff->event_count, tmp, dev, + X_GrabDeviceButton)) != Success) + return ret; + + param = (GrabParameters) { + .grabtype = XI, + .ownerEvents = stuff->ownerEvents, + .this_device_mode = stuff->this_device_mode, + .other_devices_mode = stuff->other_devices_mode, + .grabWindow = stuff->grabWindow, + .modifiers = stuff->modifiers + }; + mask.xi = tmp[stuff->grabbed_device].mask; + + ret = GrabButton(client, dev, mdev, stuff->button, ¶m, XI, &mask); + + return ret; +} diff --git a/Xi/grabdevb.h b/Xi/grabdevb.h new file mode 100644 index 0000000..b2a9796 --- /dev/null +++ b/Xi/grabdevb.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GRABDEVB_H +#define GRABDEVB_H 1 + +int SProcXGrabDeviceButton(ClientPtr /* client */ + ); + +int ProcXGrabDeviceButton(ClientPtr /* client */ + ); + +#endif /* GRABDEVB_H */ diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c new file mode 100644 index 0000000..8694f9e --- /dev/null +++ b/Xi/grabdevk.c @@ -0,0 +1,151 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to grab a key on an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" +#include "xace.h" + +#include "grabdev.h" +#include "grabdevk.h" + +/*********************************************************************** + * + * Handle requests from clients with a different byte order. + * + */ + +int +SProcXGrabDeviceKey(ClientPtr client) +{ + REQUEST(xGrabDeviceKeyReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); + swapl(&stuff->grabWindow); + swaps(&stuff->modifiers); + swaps(&stuff->event_count); + REQUEST_FIXED_SIZE(xGrabDeviceKeyReq, stuff->event_count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); + return (ProcXGrabDeviceKey(client)); +} + +/*********************************************************************** + * + * Grab a key on an extension device. + * + */ + +int +ProcXGrabDeviceKey(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + DeviceIntPtr mdev; + XEventClass *class; + struct tmask tmp[EMASKSIZE]; + GrabParameters param; + GrabMask mask; + + REQUEST(xGrabDeviceKeyReq); + REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); + + if (stuff->length != + bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count) + return BadLength; + + ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (ret != Success) + return ret; + + if (stuff->modifier_device != UseXKeyboard) { + ret = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixUseAccess); + if (ret != Success) + return ret; + if (mdev->key == NULL) + return BadMatch; + } + else { + mdev = PickKeyboard(client); + ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess); + if (ret != Success) + return ret; + } + + class = (XEventClass *) (&stuff[1]); /* first word of values */ + + if ((ret = CreateMaskFromList(client, class, + stuff->event_count, tmp, dev, + X_GrabDeviceKey)) != Success) + return ret; + + param = (GrabParameters) { + .grabtype = XI, + .ownerEvents = stuff->ownerEvents, + .this_device_mode = stuff->this_device_mode, + .other_devices_mode = stuff->other_devices_mode, + .grabWindow = stuff->grabWindow, + .modifiers = stuff->modifiers + }; + mask.xi = tmp[stuff->grabbed_device].mask; + + ret = GrabKey(client, dev, mdev, stuff->key, ¶m, XI, &mask); + + return ret; +} diff --git a/Xi/grabdevk.h b/Xi/grabdevk.h new file mode 100644 index 0000000..85738af --- /dev/null +++ b/Xi/grabdevk.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GRABDEVK_H +#define GRABDEVK_H 1 + +int SProcXGrabDeviceKey(ClientPtr /* client */ + ); + +int ProcXGrabDeviceKey(ClientPtr /* client */ + ); + +#endif /* GRABDEVK_H */ diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c new file mode 100644 index 0000000..cde5351 --- /dev/null +++ b/Xi/gtmotion.c @@ -0,0 +1,173 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to get the motion history from an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" + +#include "gtmotion.h" + +/*********************************************************************** + * + * Swap the request if server and client have different byte ordering. + * + */ + +int +SProcXGetDeviceMotionEvents(ClientPtr client) +{ + REQUEST(xGetDeviceMotionEventsReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); + swapl(&stuff->start); + swapl(&stuff->stop); + return (ProcXGetDeviceMotionEvents(client)); +} + +/**************************************************************************** + * + * Get the motion history for an extension pointer devices. + * + */ + +int +ProcXGetDeviceMotionEvents(ClientPtr client) +{ + INT32 *coords = NULL, *bufptr; + xGetDeviceMotionEventsReply rep; + unsigned long i; + int rc, num_events, axes, size = 0; + unsigned long nEvents; + DeviceIntPtr dev; + TimeStamp start, stop; + int length = 0; + ValuatorClassPtr v; + + REQUEST(xGetDeviceMotionEventsReq); + + REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); + if (rc != Success) + return rc; + v = dev->valuator; + if (v == NULL || v->numAxes == 0) + return BadMatch; + if (dev->valuator->motionHintWindow) + MaybeStopDeviceHint(dev, client); + axes = v->numAxes; + rep = (xGetDeviceMotionEventsReply) { + .repType = X_Reply, + .RepType = X_GetDeviceMotionEvents, + .sequenceNumber = client->sequence, + .length = 0, + .nEvents = 0, + .axes = axes, + .mode = Absolute /* XXX we don't do relative at the moment */ + }; + start = ClientTimeToServerTime(stuff->start); + stop = ClientTimeToServerTime(stuff->stop); + if (CompareTimeStamps(start, stop) == LATER || + CompareTimeStamps(start, currentTime) == LATER) { + WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); + return Success; + } + if (CompareTimeStamps(stop, currentTime) == LATER) + stop = currentTime; + num_events = v->numMotionEvents; + if (num_events) { + size = sizeof(Time) + (axes * sizeof(INT32)); + rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords, /* XXX */ + start.milliseconds, stop.milliseconds, + (ScreenPtr) NULL, FALSE); + } + if (rep.nEvents > 0) { + length = bytes_to_int32(rep.nEvents * size); + rep.length = length; + } + nEvents = rep.nEvents; + WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); + if (nEvents) { + if (client->swapped) { + bufptr = coords; + for (i = 0; i < nEvents * (axes + 1); i++) { + swapl(bufptr); + bufptr++; + } + } + WriteToClient(client, length * 4, coords); + } + free(coords); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetDeviceMotionEvents function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXGetDeviceMotionEvents(ClientPtr client, int size, + xGetDeviceMotionEventsReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->nEvents); + WriteToClient(client, size, rep); +} diff --git a/Xi/gtmotion.h b/Xi/gtmotion.h new file mode 100644 index 0000000..f62bf57 --- /dev/null +++ b/Xi/gtmotion.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GTMOTION_H +#define GTMOTION_H 1 + +int SProcXGetDeviceMotionEvents(ClientPtr /* client */ + ); + +int ProcXGetDeviceMotionEvents(ClientPtr /* client */ + ); + +void SRepXGetDeviceMotionEvents(ClientPtr /* client */ , + int /* size */ , + xGetDeviceMotionEventsReply * /* rep */ + ); + +#endif /* GTMOTION_H */ diff --git a/Xi/listdev.c b/Xi/listdev.c new file mode 100644 index 0000000..014c61d --- /dev/null +++ b/Xi/listdev.c @@ -0,0 +1,422 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Extension function to list the available input devices. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "extnsionst.h" +#include "exevents.h" +#include "xace.h" +#include "xkbsrv.h" +#include "xkbstr.h" + +#include "listdev.h" + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +SProcXListInputDevices(ClientPtr client) +{ + REQUEST(xListInputDevicesReq); + swaps(&stuff->length); + return (ProcXListInputDevices(client)); +} + +/*********************************************************************** + * + * This procedure calculates the size of the information to be returned + * for an input device. + * + */ + +static void +SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size) +{ + int chunks; + + *namesize += 1; + if (d->name) + *namesize += strlen(d->name); + if (d->key != NULL) + *size += sizeof(xKeyInfo); + if (d->button != NULL) + *size += sizeof(xButtonInfo); + if (d->valuator != NULL) { + chunks = ((int) d->valuator->numAxes + 19) / VPC; + *size += (chunks * sizeof(xValuatorInfo) + + d->valuator->numAxes * sizeof(xAxisInfo)); + } +} + +/*********************************************************************** + * + * This procedure copies data to the DeviceInfo struct, swapping if necessary. + * + * We need the extra byte in the allocated buffer, because the trailing null + * hammers one extra byte, which is overwritten by the next name except for + * the last name copied. + * + */ + +static void +CopyDeviceName(char **namebuf, char *name) +{ + char *nameptr = (char *) *namebuf; + + if (name) { + *nameptr++ = strlen(name); + strcpy(nameptr, name); + *namebuf += (strlen(name) + 1); + } + else { + *nameptr++ = 0; + *namebuf += 1; + } +} + +/*********************************************************************** + * + * This procedure copies ButtonClass information, swapping if necessary. + * + */ + +static void +CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf) +{ + xButtonInfoPtr b2; + + b2 = (xButtonInfoPtr) * buf; + b2->class = ButtonClass; + b2->length = sizeof(xButtonInfo); + b2->num_buttons = b->numButtons; + if (client && client->swapped) { + swaps(&b2->num_buttons); + } + *buf += sizeof(xButtonInfo); +} + +/*********************************************************************** + * + * This procedure copies data to the DeviceInfo struct, swapping if necessary. + * + */ + +static void +CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, char **buf) +{ + xDeviceInfoPtr dev; + + dev = (xDeviceInfoPtr) * buf; + + dev->id = d->id; + dev->type = d->xinput_type; + dev->num_classes = num_classes; + if (IsMaster(d) && IsKeyboardDevice(d)) + dev->use = IsXKeyboard; + else if (IsMaster(d) && IsPointerDevice(d)) + dev->use = IsXPointer; + else if (d->valuator && d->button) + dev->use = IsXExtensionPointer; + else if (d->key && d->kbdfeed) + dev->use = IsXExtensionKeyboard; + else + dev->use = IsXExtensionDevice; + + if (client->swapped) { + swapl(&dev->type); + } + *buf += sizeof(xDeviceInfo); +} + +/*********************************************************************** + * + * This procedure copies KeyClass information, swapping if necessary. + * + */ + +static void +CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) +{ + xKeyInfoPtr k2; + + k2 = (xKeyInfoPtr) * buf; + k2->class = KeyClass; + k2->length = sizeof(xKeyInfo); + k2->min_keycode = k->xkbInfo->desc->min_key_code; + k2->max_keycode = k->xkbInfo->desc->max_key_code; + k2->num_keys = k2->max_keycode - k2->min_keycode + 1; + if (client && client->swapped) { + swaps(&k2->num_keys); + } + *buf += sizeof(xKeyInfo); +} + +/*********************************************************************** + * + * This procedure copies ValuatorClass information, swapping if necessary. + * + * Devices may have up to 255 valuators. The length of a ValuatorClass is + * defined to be sizeof(ValuatorClassInfo) + num_axes * sizeof (xAxisInfo). + * The maximum length is therefore (8 + 255 * 12) = 3068. However, the + * length field is one byte. If a device has more than 20 valuators, we + * must therefore return multiple valuator classes to the client. + * + */ + +static int +CopySwapValuatorClass(ClientPtr client, DeviceIntPtr dev, char **buf) +{ + int i, j, axes, t_axes; + ValuatorClassPtr v = dev->valuator; + xValuatorInfoPtr v2; + AxisInfo *a; + xAxisInfoPtr a2; + + for (i = 0, axes = v->numAxes; i < ((v->numAxes + 19) / VPC); + i++, axes -= VPC) { + t_axes = axes < VPC ? axes : VPC; + if (t_axes < 0) + t_axes = v->numAxes % VPC; + v2 = (xValuatorInfoPtr) * buf; + v2->class = ValuatorClass; + v2->length = sizeof(xValuatorInfo) + t_axes * sizeof(xAxisInfo); + v2->num_axes = t_axes; + v2->mode = valuator_get_mode(dev, 0); + v2->motion_buffer_size = v->numMotionEvents; + if (client && client->swapped) { + swapl(&v2->motion_buffer_size); + } + *buf += sizeof(xValuatorInfo); + a = v->axes + (VPC * i); + a2 = (xAxisInfoPtr) * buf; + for (j = 0; j < t_axes; j++) { + a2->min_value = a->min_value; + a2->max_value = a->max_value; + a2->resolution = a->resolution; + if (client && client->swapped) { + swapl(&a2->min_value); + swapl(&a2->max_value); + swapl(&a2->resolution); + } + a2++; + a++; + *buf += sizeof(xAxisInfo); + } + } + return i; +} + +static void +CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes, + char **classbuf) +{ + if (dev->key != NULL) { + CopySwapKeyClass(client, dev->key, classbuf); + (*num_classes)++; + } + if (dev->button != NULL) { + CopySwapButtonClass(client, dev->button, classbuf); + (*num_classes)++; + } + if (dev->valuator != NULL) { + (*num_classes) += CopySwapValuatorClass(client, dev, classbuf); + } +} + +/*********************************************************************** + * + * This procedure lists information to be returned for an input device. + * + */ + +static void +ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev, + char **devbuf, char **classbuf, char **namebuf) +{ + CopyDeviceName(namebuf, d->name); + CopySwapDevice(client, d, 0, devbuf); + CopySwapClasses(client, d, &dev->num_classes, classbuf); +} + +/*********************************************************************** + * + * This procedure checks if a device should be left off the list. + * + */ + +static Bool +ShouldSkipDevice(ClientPtr client, DeviceIntPtr d) +{ + /* don't send master devices other than VCP/VCK */ + if (!IsMaster(d) || d == inputInfo.pointer ||d == inputInfo.keyboard) { + int rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + + if (rc == Success) + return FALSE; + } + return TRUE; +} + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + * If this request is called by a client that has not issued a + * GetExtensionVersion request with major/minor version set, we don't send the + * complete device list. Instead, we only send the VCP, the VCK and floating + * SDs. This resembles the setup found on XI 1.x machines. + */ + +int +ProcXListInputDevices(ClientPtr client) +{ + xListInputDevicesReply rep; + int numdevs = 0; + int namesize = 1; /* need 1 extra byte for strcpy */ + int i = 0, size = 0; + int total_length; + char *devbuf, *classbuf, *namebuf, *savbuf; + Bool *skip; + xDeviceInfo *dev; + DeviceIntPtr d; + + REQUEST_SIZE_MATCH(xListInputDevicesReq); + + rep = (xListInputDevicesReply) { + .repType = X_Reply, + .RepType = X_ListInputDevices, + .sequenceNumber = client->sequence, + .length = 0 + }; + + /* allocate space for saving skip value */ + skip = calloc(sizeof(Bool), inputInfo.numDevices); + if (!skip) + return BadAlloc; + + /* figure out which devices to skip */ + numdevs = 0; + for (d = inputInfo.devices; d; d = d->next, i++) { + skip[i] = ShouldSkipDevice(client, d); + if (skip[i]) + continue; + + SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } + + for (d = inputInfo.off_devices; d; d = d->next, i++) { + skip[i] = ShouldSkipDevice(client, d); + if (skip[i]) + continue; + + SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } + + /* allocate space for reply */ + total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; + devbuf = (char *) calloc(1, total_length); + classbuf = devbuf + (numdevs * sizeof(xDeviceInfo)); + namebuf = classbuf + size; + savbuf = devbuf; + + /* fill in and send reply */ + i = 0; + dev = (xDeviceInfoPtr) devbuf; + for (d = inputInfo.devices; d; d = d->next, i++) { + if (skip[i]) + continue; + + ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); + } + + for (d = inputInfo.off_devices; d; d = d->next, i++) { + if (skip[i]) + continue; + + ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); + } + rep.ndevices = numdevs; + rep.length = bytes_to_int32(total_length); + WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep); + WriteToClient(client, total_length, savbuf); + free(savbuf); + free(skip); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XListInputDevices function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/listdev.h b/Xi/listdev.h new file mode 100644 index 0000000..39ea238 --- /dev/null +++ b/Xi/listdev.h @@ -0,0 +1,46 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef LISTDEV_H +#define LISTDEV_H 1 + +#define VPC 20 /* Max # valuators per chunk */ + +int SProcXListInputDevices(ClientPtr /* client */ + ); + +int ProcXListInputDevices(ClientPtr /* client */ + ); + +void SRepXListInputDevices(ClientPtr /* client */ , + int /* size */ , + xListInputDevicesReply * /* rep */ + ); + +#endif /* LISTDEV_H */ diff --git a/Xi/opendev.c b/Xi/opendev.c new file mode 100644 index 0000000..6708bad --- /dev/null +++ b/Xi/opendev.c @@ -0,0 +1,172 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to open an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "windowstr.h" /* window structure */ +#include "exglobals.h" +#include "exevents.h" + +#include "opendev.h" + +extern CARD8 event_base[]; + +/*********************************************************************** + * + * This procedure swaps the request if the server and client have different + * byte orderings. + * + */ + +int +SProcXOpenDevice(ClientPtr client) +{ + REQUEST(xOpenDeviceReq); + swaps(&stuff->length); + return (ProcXOpenDevice(client)); +} + +/*********************************************************************** + * + * This procedure causes the server to open an input device. + * + */ + +int +ProcXOpenDevice(ClientPtr client) +{ + xInputClassInfo evbase[numInputClasses]; + int j = 0; + int status = Success; + xOpenDeviceReply rep; + DeviceIntPtr dev; + + REQUEST(xOpenDeviceReq); + REQUEST_SIZE_MATCH(xOpenDeviceReq); + + status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess); + + if (status == BadDevice) { /* not open */ + for (dev = inputInfo.off_devices; dev; dev = dev->next) + if (dev->id == stuff->deviceid) + break; + if (dev == NULL) + return BadDevice; + } + else if (status != Success) + return status; + + if (IsMaster(dev)) + return BadDevice; + + if (status != Success) + return status; + + if (dev->key != NULL) { + evbase[j].class = KeyClass; + evbase[j++].event_type_base = event_base[KeyClass]; + } + if (dev->button != NULL) { + evbase[j].class = ButtonClass; + evbase[j++].event_type_base = event_base[ButtonClass]; + } + if (dev->valuator != NULL) { + evbase[j].class = ValuatorClass; + evbase[j++].event_type_base = event_base[ValuatorClass]; + } + if (dev->kbdfeed != NULL || dev->ptrfeed != NULL || dev->leds != NULL || + dev->intfeed != NULL || dev->bell != NULL || dev->stringfeed != NULL) { + evbase[j].class = FeedbackClass; + evbase[j++].event_type_base = event_base[FeedbackClass]; + } + if (dev->focus != NULL) { + evbase[j].class = FocusClass; + evbase[j++].event_type_base = event_base[FocusClass]; + } + if (dev->proximity != NULL) { + evbase[j].class = ProximityClass; + evbase[j++].event_type_base = event_base[ProximityClass]; + } + evbase[j].class = OtherClass; + evbase[j++].event_type_base = event_base[OtherClass]; + rep = (xOpenDeviceReply) { + .repType = X_Reply, + .RepType = X_OpenDevice, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(j * sizeof(xInputClassInfo)), + .num_classes = j + }; + WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); + WriteToClient(client, j * sizeof(xInputClassInfo), evbase); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XOpenDevice function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/opendev.h b/Xi/opendev.h new file mode 100644 index 0000000..e2d8061 --- /dev/null +++ b/Xi/opendev.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef OPENDEV_H +#define OPENDEV_H 1 + +int SProcXOpenDevice(ClientPtr /* client */ + ); + +int ProcXOpenDevice(ClientPtr /* client */ + ); + +void SRepXOpenDevice(ClientPtr /* client */ , + int /* size */ , + xOpenDeviceReply * /* rep */ + ); + +#endif /* OPENDEV_H */ diff --git a/Xi/queryst.c b/Xi/queryst.c new file mode 100644 index 0000000..04a652b --- /dev/null +++ b/Xi/queryst.c @@ -0,0 +1,188 @@ +/* + +Copyright 1998, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +/*********************************************************************** + * + * Request to query the state of an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" +#include "xkbsrv.h" +#include "xkbstr.h" + +#include "queryst.h" + +/*********************************************************************** + * + * This procedure allows a client to query the state of a device. + * + */ + +int +SProcXQueryDeviceState(ClientPtr client) +{ + REQUEST(xQueryDeviceStateReq); + swaps(&stuff->length); + return (ProcXQueryDeviceState(client)); +} + +/*********************************************************************** + * + * This procedure allows frozen events to be routed. + * + */ + +int +ProcXQueryDeviceState(ClientPtr client) +{ + int rc, i; + int num_classes = 0; + int total_length = 0; + char *buf, *savbuf; + KeyClassPtr k; + xKeyState *tk; + ButtonClassPtr b; + xButtonState *tb; + ValuatorClassPtr v; + xValuatorState *tv; + xQueryDeviceStateReply rep; + DeviceIntPtr dev; + double *values; + + REQUEST(xQueryDeviceStateReq); + REQUEST_SIZE_MATCH(xQueryDeviceStateReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); + if (rc != Success && rc != BadAccess) + return rc; + + v = dev->valuator; + if (v != NULL && v->motionHintWindow != NULL) + MaybeStopDeviceHint(dev, client); + + k = dev->key; + if (k != NULL) { + total_length += sizeof(xKeyState); + num_classes++; + } + + b = dev->button; + if (b != NULL) { + total_length += sizeof(xButtonState); + num_classes++; + } + + if (v != NULL) { + total_length += (sizeof(xValuatorState) + (v->numAxes * sizeof(int))); + num_classes++; + } + buf = (char *) calloc(total_length, 1); + if (!buf) + return BadAlloc; + savbuf = buf; + + if (k != NULL) { + tk = (xKeyState *) buf; + tk->class = KeyClass; + tk->length = sizeof(xKeyState); + tk->num_keys = k->xkbInfo->desc->max_key_code - + k->xkbInfo->desc->min_key_code + 1; + if (rc != BadAccess) + for (i = 0; i < 32; i++) + tk->keys[i] = k->down[i]; + buf += sizeof(xKeyState); + } + + if (b != NULL) { + tb = (xButtonState *) buf; + tb->class = ButtonClass; + tb->length = sizeof(xButtonState); + tb->num_buttons = b->numButtons; + if (rc != BadAccess) + memcpy(tb->buttons, b->down, sizeof(b->down)); + buf += sizeof(xButtonState); + } + + if (v != NULL) { + tv = (xValuatorState *) buf; + tv->class = ValuatorClass; + tv->length = sizeof(xValuatorState) + v->numAxes * 4; + tv->num_valuators = v->numAxes; + tv->mode = valuator_get_mode(dev, 0); + tv->mode |= (dev->proximity && + !dev->proximity->in_proximity) ? OutOfProximity : 0; + buf += sizeof(xValuatorState); + for (i = 0, values = v->axisVal; i < v->numAxes; i++) { + if (rc != BadAccess) + *((int *) buf) = *values; + values++; + if (client->swapped) { + swapl((int *) buf); + } + buf += sizeof(int); + } + } + + rep = (xQueryDeviceStateReply) { + .repType = X_Reply, + .RepType = X_QueryDeviceState, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(total_length), + .num_classes = num_classes + }; + WriteReplyToClient(client, sizeof(xQueryDeviceStateReply), &rep); + if (total_length > 0) + WriteToClient(client, total_length, savbuf); + free(savbuf); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XQueryDeviceState function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/queryst.h b/Xi/queryst.h new file mode 100644 index 0000000..5619ca5 --- /dev/null +++ b/Xi/queryst.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef QUERYST_H +#define QUERYST_H 1 + +int SProcXQueryDeviceState(ClientPtr /* client */ + ); + +int ProcXQueryDeviceState(ClientPtr /* client */ + ); + +void SRepXQueryDeviceState(ClientPtr /* client */ , + int /* size */ , + xQueryDeviceStateReply * /* rep */ + ); + +#endif /* QUERYST_H */ diff --git a/Xi/selectev.c b/Xi/selectev.c new file mode 100644 index 0000000..284bd29 --- /dev/null +++ b/Xi/selectev.c @@ -0,0 +1,183 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to select input from an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" + +#include "grabdev.h" +#include "selectev.h" + +extern Mask ExtExclusiveMasks[]; + +static int +HandleDevicePresenceMask(ClientPtr client, WindowPtr win, + XEventClass * cls, CARD16 *count) +{ + int i, j; + Mask mask; + + /* We use the device ID 256 to select events that aren't bound to + * any device. For now we only handle the device presence event, + * but this could be extended to other events that aren't bound to + * a device. + * + * In order not to break in CreateMaskFromList() we remove the + * entries with device ID 256 from the XEventClass array. + */ + + mask = 0; + for (i = 0, j = 0; i < *count; i++) { + if (cls[i] >> 8 != 256) { + cls[j] = cls[i]; + j++; + continue; + } + + switch (cls[i] & 0xff) { + case _devicePresence: + mask |= DevicePresenceNotifyMask; + break; + } + } + + *count = j; + + if (mask == 0) + return Success; + + /* We always only use mksidx = AllDevices for events not bound to + * devices */ + if (AddExtensionClient(win, client, mask, XIAllDevices) != Success) + return BadAlloc; + + RecalculateDeviceDeliverableEvents(win); + + return Success; +} + +/*********************************************************************** + * + * Handle requests from clients with a different byte order. + * + */ + +int +SProcXSelectExtensionEvent(ClientPtr client) +{ + REQUEST(xSelectExtensionEventReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); + swapl(&stuff->window); + swaps(&stuff->count); + REQUEST_FIXED_SIZE(xSelectExtensionEventReq, stuff->count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->count); + + return (ProcXSelectExtensionEvent(client)); +} + +/*********************************************************************** + * + * This procedure selects input from an extension device. + * + */ + +int +ProcXSelectExtensionEvent(ClientPtr client) +{ + int ret; + int i; + WindowPtr pWin; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xSelectExtensionEventReq); + REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); + + if (stuff->length != + bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count) + return BadLength; + + ret = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); + if (ret != Success) + return ret; + + if (HandleDevicePresenceMask(client, pWin, (XEventClass *) &stuff[1], + &stuff->count) != Success) + return BadAlloc; + + if ((ret = CreateMaskFromList(client, (XEventClass *) &stuff[1], + stuff->count, tmp, NULL, + X_SelectExtensionEvent)) != Success) + return ret; + + for (i = 0; i < EMASKSIZE; i++) + if (tmp[i].dev != NULL) { + if (tmp[i].mask & ~XIAllMasks) { + client->errorValue = tmp[i].mask; + return BadValue; + } + if ((ret = + SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client, + tmp[i].mask, ExtExclusiveMasks[i])) != Success) + return ret; + } + + return Success; +} diff --git a/Xi/selectev.h b/Xi/selectev.h new file mode 100644 index 0000000..e80fe4a --- /dev/null +++ b/Xi/selectev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SELECTEV_H +#define SELECTEV_H 1 + +int SProcXSelectExtensionEvent(ClientPtr /* client */ + ); + +int ProcXSelectExtensionEvent(ClientPtr /* client */ + ); + +#endif /* SELECTEV_H */ diff --git a/Xi/sendexev.c b/Xi/sendexev.c new file mode 100644 index 0000000..3c21386 --- /dev/null +++ b/Xi/sendexev.c @@ -0,0 +1,157 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to send an extension event. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* Window */ +#include "extnsionst.h" /* EventSwapPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" + +#include "grabdev.h" +#include "sendexev.h" + +extern int lastEvent; /* Defined in extension.c */ + +/*********************************************************************** + * + * Handle requests from clients with a different byte order than us. + * + */ + +int +SProcXSendExtensionEvent(ClientPtr client) +{ + CARD32 *p; + int i; + xEvent eventT; + xEvent *eventP; + EventSwapPtr proc; + + REQUEST(xSendExtensionEventReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); + swapl(&stuff->destination); + swaps(&stuff->count); + + if (stuff->length != + bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + + bytes_to_int32(stuff->num_events * sizeof(xEvent))) + return BadLength; + + eventP = (xEvent *) &stuff[1]; + for (i = 0; i < stuff->num_events; i++, eventP++) { + proc = EventSwapVector[eventP->u.u.type & 0177]; + if (proc == NotImplemented) /* no swapping proc; invalid event type? */ + return BadValue; + (*proc) (eventP, &eventT); + *eventP = eventT; + } + + p = (CARD32 *) (((xEvent *) &stuff[1]) + stuff->num_events); + SwapLongs(p, stuff->count); + return (ProcXSendExtensionEvent(client)); +} + +/*********************************************************************** + * + * Send an event to some client, as if it had come from an extension input + * device. + * + */ + +int +ProcXSendExtensionEvent(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + xEvent *first; + XEventClass *list; + struct tmask tmp[EMASKSIZE]; + + REQUEST(xSendExtensionEventReq); + REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); + + if (stuff->length != + bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + + (stuff->num_events * bytes_to_int32(sizeof(xEvent)))) + return BadLength; + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixWriteAccess); + if (ret != Success) + return ret; + + /* The client's event type must be one defined by an extension. */ + + first = ((xEvent *) &stuff[1]); + if (!((EXTENSION_EVENT_BASE <= first->u.u.type) && + (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, + X_SendExtensionEvent)) != Success) + return ret; + + ret = (SendEvent(client, dev, stuff->destination, + stuff->propagate, (xEvent *) &stuff[1], + tmp[stuff->deviceid].mask, stuff->num_events)); + + return ret; +} diff --git a/Xi/sendexev.h b/Xi/sendexev.h new file mode 100644 index 0000000..38c6643 --- /dev/null +++ b/Xi/sendexev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SENDEXEV_H +#define SENDEXEV_H 1 + +int SProcXSendExtensionEvent(ClientPtr /* client */ + ); + +int ProcXSendExtensionEvent(ClientPtr /* client */ + ); + +#endif /* SENDEXEV_H */ diff --git a/Xi/setbmap.c b/Xi/setbmap.c new file mode 100644 index 0000000..9479655 --- /dev/null +++ b/Xi/setbmap.c @@ -0,0 +1,140 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to change the button mapping of an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" + +#include "setbmap.h" + +/*********************************************************************** + * + * This procedure changes the button mapping. + * + */ + +int +SProcXSetDeviceButtonMapping(ClientPtr client) +{ + REQUEST(xSetDeviceButtonMappingReq); + swaps(&stuff->length); + return (ProcXSetDeviceButtonMapping(client)); +} + +/*********************************************************************** + * + * This procedure lists the input devices available to the server. + * + */ + +int +ProcXSetDeviceButtonMapping(ClientPtr client) +{ + int ret; + xSetDeviceButtonMappingReply rep; + DeviceIntPtr dev; + + REQUEST(xSetDeviceButtonMappingReq); + REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq); + + if (stuff->length != + bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length)) + return BadLength; + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); + if (ret != Success) + return ret; + + rep = (xSetDeviceButtonMappingReply) { + .repType = X_Reply, + .RepType = X_SetDeviceButtonMapping, + .sequenceNumber = client->sequence, + .length = 0, + .status = MappingSuccess + }; + + ret = + ApplyPointerMapping(dev, (CARD8 *) &stuff[1], stuff->map_length, + client); + if (ret == -1) + return BadValue; + else if (ret == MappingBusy) + rep.status = ret; + else if (ret != Success) + return ret; + + WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceButtonMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceButtonMapping(ClientPtr client, int size, + xSetDeviceButtonMappingReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/setbmap.h b/Xi/setbmap.h new file mode 100644 index 0000000..8d73f23 --- /dev/null +++ b/Xi/setbmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SETBMAP_H +#define SETBMAP_H 1 + +int SProcXSetDeviceButtonMapping(ClientPtr /* client */ + ); + +int ProcXSetDeviceButtonMapping(ClientPtr /* client */ + ); + +void SRepXSetDeviceButtonMapping(ClientPtr /* client */ , + int /* size */ , + xSetDeviceButtonMappingReply * /* rep */ + ); + +#endif /* SETBMAP_H */ diff --git a/Xi/setdval.c b/Xi/setdval.c new file mode 100644 index 0000000..463e4f3 --- /dev/null +++ b/Xi/setdval.c @@ -0,0 +1,147 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to change the mode of an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "exglobals.h" + +#include "setdval.h" + +/*********************************************************************** + * + * Handle a request from a client with a different byte order. + * + */ + +int +SProcXSetDeviceValuators(ClientPtr client) +{ + REQUEST(xSetDeviceValuatorsReq); + swaps(&stuff->length); + return (ProcXSetDeviceValuators(client)); +} + +/*********************************************************************** + * + * This procedure sets the value of valuators on an extension input device. + * + */ + +int +ProcXSetDeviceValuators(ClientPtr client) +{ + DeviceIntPtr dev; + xSetDeviceValuatorsReply rep; + int rc; + + REQUEST(xSetDeviceValuatorsReq); + REQUEST_AT_LEAST_SIZE(xSetDeviceValuatorsReq); + + rep = (xSetDeviceValuatorsReply) { + .repType = X_Reply, + .RepType = X_SetDeviceValuators, + .sequenceNumber = client->sequence, + .length = 0, + .status = Success + }; + + if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) + + stuff->num_valuators) + return BadLength; + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (dev->valuator == NULL) + return BadMatch; + + if (IsXTestDevice(dev, NULL)) + return BadMatch; + + if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes) + return BadValue; + + if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) + rep.status = AlreadyGrabbed; + else + rep.status = SetDeviceValuators(client, dev, (int *) &stuff[1], + stuff->first_valuator, + stuff->num_valuators); + + if (rep.status != Success && rep.status != AlreadyGrabbed) + return rep.status; + + WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceValuators function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceValuators(ClientPtr client, int size, + xSetDeviceValuatorsReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/setdval.h b/Xi/setdval.h new file mode 100644 index 0000000..0564274 --- /dev/null +++ b/Xi/setdval.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SETDVAL_H +#define SETDVAL_H 1 + +int SProcXSetDeviceValuators(ClientPtr /* client */ + ); + +int ProcXSetDeviceValuators(ClientPtr /* client */ + ); + +void SRepXSetDeviceValuators(ClientPtr /* client */ , + int /* size */ , + xSetDeviceValuatorsReply * /* rep */ + ); + +#endif /* SETDVAL_H */ diff --git a/Xi/setfocus.c b/Xi/setfocus.c new file mode 100644 index 0000000..8091841 --- /dev/null +++ b/Xi/setfocus.c @@ -0,0 +1,110 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to set the focus for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "windowstr.h" /* focus struct */ +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> + +#include "dixevents.h" + +#include "exglobals.h" + +#include "setfocus.h" + +/*********************************************************************** + * + * This procedure sets the focus for a device. + * + */ + +int +SProcXSetDeviceFocus(ClientPtr client) +{ + REQUEST(xSetDeviceFocusReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSetDeviceFocusReq); + swapl(&stuff->focus); + swapl(&stuff->time); + return (ProcXSetDeviceFocus(client)); +} + +/*********************************************************************** + * + * This procedure sets the focus for a device. + * + */ + +int +ProcXSetDeviceFocus(ClientPtr client) +{ + int ret; + DeviceIntPtr dev; + + REQUEST(xSetDeviceFocusReq); + REQUEST_SIZE_MATCH(xSetDeviceFocusReq); + + ret = dixLookupDevice(&dev, stuff->device, client, DixSetFocusAccess); + if (ret != Success) + return ret; + if (!dev->focus) + return BadDevice; + + ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo, + stuff->time, TRUE); + + return ret; +} diff --git a/Xi/setfocus.h b/Xi/setfocus.h new file mode 100644 index 0000000..0adf451 --- /dev/null +++ b/Xi/setfocus.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SETFOCUS_H +#define SETFOCUS_H 1 + +int SProcXSetDeviceFocus(ClientPtr /* client */ + ); + +int ProcXSetDeviceFocus(ClientPtr /* client */ + ); + +#endif /* SETFOCUS_H */ diff --git a/Xi/setmmap.c b/Xi/setmmap.c new file mode 100644 index 0000000..1320cfe --- /dev/null +++ b/Xi/setmmap.c @@ -0,0 +1,146 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/******************************************************************** + * + * Set modifier mapping for an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2.h> +#include <X11/extensions/XIproto.h> +#include "exevents.h" +#include "exglobals.h" + +#include "setmmap.h" + +/*********************************************************************** + * + * This procedure sets the modifier mapping for an extension device, + * for clients on machines with a different byte ordering than the server. + * + */ + +int +SProcXSetDeviceModifierMapping(ClientPtr client) +{ + REQUEST(xSetDeviceModifierMappingReq); + swaps(&stuff->length); + return (ProcXSetDeviceModifierMapping(client)); +} + +/*********************************************************************** + * + * Set the device Modifier mapping. + * + */ + +int +ProcXSetDeviceModifierMapping(ClientPtr client) +{ + int ret; + xSetDeviceModifierMappingReply rep; + DeviceIntPtr dev; + + REQUEST(xSetDeviceModifierMappingReq); + REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq); + + if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) + + (stuff->numKeyPerModifier << 1)) + return BadLength; + + rep = (xSetDeviceModifierMappingReply) { + .repType = X_Reply, + .RepType = X_SetDeviceModifierMapping, + .sequenceNumber = client->sequence, + .length = 0 + }; + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); + if (ret != Success) + return ret; + + ret = change_modmap(client, dev, (KeyCode *) &stuff[1], + stuff->numKeyPerModifier); + if (ret == Success) + ret = MappingSuccess; + + if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) { + rep.success = ret; + WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply), + &rep); + } + else if (ret == -1) { + return BadValue; + } + else { + return ret; + } + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceModifierMapping function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceModifierMapping(ClientPtr client, int size, + xSetDeviceModifierMappingReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/setmmap.h b/Xi/setmmap.h new file mode 100644 index 0000000..9347b96 --- /dev/null +++ b/Xi/setmmap.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SETMMAP_H +#define SETMMAP_H 1 + +int SProcXSetDeviceModifierMapping(ClientPtr /* client */ + ); + +int ProcXSetDeviceModifierMapping(ClientPtr /* client */ + ); + +void SRepXSetDeviceModifierMapping(ClientPtr /* client */ , + int /* size */ , + xSetDeviceModifierMappingReply * /* rep */ + ); + +#endif /* SETMMAP_H */ diff --git a/Xi/setmode.c b/Xi/setmode.c new file mode 100644 index 0000000..5ed0913 --- /dev/null +++ b/Xi/setmode.c @@ -0,0 +1,147 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to change the mode of an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "exglobals.h" + +#include "setmode.h" + +/*********************************************************************** + * + * Handle a request from a client with a different byte order. + * + */ + +int +SProcXSetDeviceMode(ClientPtr client) +{ + REQUEST(xSetDeviceModeReq); + swaps(&stuff->length); + return (ProcXSetDeviceMode(client)); +} + +/*********************************************************************** + * + * This procedure sets the mode of a device. + * + */ + +int +ProcXSetDeviceMode(ClientPtr client) +{ + DeviceIntPtr dev; + xSetDeviceModeReply rep; + int rc; + + REQUEST(xSetDeviceModeReq); + REQUEST_SIZE_MATCH(xSetDeviceModeReq); + + rep = (xSetDeviceModeReply) { + .repType = X_Reply, + .RepType = X_SetDeviceMode, + .sequenceNumber = client->sequence, + .length = 0 + }; + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (dev->valuator == NULL) + return BadMatch; + + if (IsXTestDevice(dev, NULL)) + return BadMatch; + + if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) + rep.status = AlreadyGrabbed; + else + rep.status = SetDeviceMode(client, dev, stuff->mode); + + if (rep.status == Success) + valuator_set_mode(dev, VALUATOR_MODE_ALL_AXES, stuff->mode); + else if (rep.status != AlreadyGrabbed) { + switch (rep.status) { + case BadMatch: + case BadImplementation: + case BadAlloc: + break; + default: + rep.status = BadMode; + } + return rep.status; + } + + WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XSetDeviceMode function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/setmode.h b/Xi/setmode.h new file mode 100644 index 0000000..d01bfff --- /dev/null +++ b/Xi/setmode.h @@ -0,0 +1,44 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SETMODE_H +#define SETMODE_H 1 + +int SProcXSetDeviceMode(ClientPtr /* client */ + ); + +int ProcXSetDeviceMode(ClientPtr /* client */ + ); + +void SRepXSetDeviceMode(ClientPtr /* client */ , + int /* size */ , + xSetDeviceModeReply * /* rep */ + ); + +#endif /* SETMODE_H */ diff --git a/Xi/stubs.c b/Xi/stubs.c new file mode 100644 index 0000000..39bee7c --- /dev/null +++ b/Xi/stubs.c @@ -0,0 +1,145 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/* + * stubs.c -- stub routines for the X server side of the XINPUT + * extension. This file is mainly to be used only as documentation. + * There is not much code here, and you can't get a working XINPUT + * server just using this. + * The Xvfb server uses this file so it will compile with the same + * object files as the real X server for a platform that has XINPUT. + * Xnest could do the same thing. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "inputstr.h" +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "XIstubs.h" +#include "xace.h" + +/**************************************************************************** + * + * Caller: ProcXSetDeviceMode + * + * Change the mode of an extension device. + * This function is used to change the mode of a device from reporting + * relative motion to reporting absolute positional information, and + * vice versa. + * The default implementation below is that no such devices are supported. + * + */ + +int +SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode) +{ + return BadMatch; +} + +/**************************************************************************** + * + * Caller: ProcXSetDeviceValuators + * + * Set the value of valuators on an extension input device. + * This function is used to set the initial value of valuators on + * those input devices that are capable of reporting either relative + * motion or an absolute position, and allow an initial position to be set. + * The default implementation below is that no such devices are supported. + * + */ + +int +SetDeviceValuators(ClientPtr client, DeviceIntPtr dev, + int *valuators, int first_valuator, int num_valuators) +{ + return BadMatch; +} + +/**************************************************************************** + * + * Caller: ProcXChangeDeviceControl + * + * Change the specified device controls on an extension input device. + * + */ + +int +ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, xDeviceCtl * control) +{ + return BadMatch; +} + +/**************************************************************************** + * + * Caller: configAddDevice (and others) + * + * Add a new device with the specified options. + * + */ +int +NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, + DeviceIntPtr *pdev) +{ + return BadValue; +} + +/**************************************************************************** + * + * Caller: configRemoveDevice (and others) + * + * Remove the specified device previously added. + * + */ +void +DeleteInputDeviceRequest(DeviceIntPtr dev) +{ + RemoveDevice(dev, TRUE); +} diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c new file mode 100644 index 0000000..162a00a --- /dev/null +++ b/Xi/ungrdev.c @@ -0,0 +1,108 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to release a grab of an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XIproto.h> +#include "exglobals.h" + +#include "ungrdev.h" + +/*********************************************************************** + * + * Handle requests from a client with a different byte order. + * + */ + +int +SProcXUngrabDevice(ClientPtr client) +{ + REQUEST(xUngrabDeviceReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xUngrabDeviceReq); + swapl(&stuff->time); + return (ProcXUngrabDevice(client)); +} + +/*********************************************************************** + * + * Release a grab of an extension device. + * + */ + +int +ProcXUngrabDevice(ClientPtr client) +{ + DeviceIntPtr dev; + GrabPtr grab; + TimeStamp time; + int rc; + + REQUEST(xUngrabDeviceReq); + REQUEST_SIZE_MATCH(xUngrabDeviceReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + grab = dev->deviceGrab.grab; + + time = ClientTimeToServerTime(stuff->time); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && + (grab) && SameClient(grab, client) && grab->grabtype == XI) + (*dev->deviceGrab.DeactivateGrab) (dev); + return Success; +} diff --git a/Xi/ungrdev.h b/Xi/ungrdev.h new file mode 100644 index 0000000..8a85c27 --- /dev/null +++ b/Xi/ungrdev.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef UNGRDEV_H +#define UNGRDEV_H 1 + +int SProcXUngrabDevice(ClientPtr /* client */ + ); + +int ProcXUngrabDevice(ClientPtr /* client */ + ); + +#endif /* UNGRDEV_H */ diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c new file mode 100644 index 0000000..b02510e --- /dev/null +++ b/Xi/ungrdevb.c @@ -0,0 +1,149 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to release a grab of a button on an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" +#include "dixgrabs.h" + +#include "ungrdevb.h" + +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) + +/*********************************************************************** + * + * Handle requests from a client with a different byte order. + * + */ + +int +SProcXUngrabDeviceButton(ClientPtr client) +{ + REQUEST(xUngrabDeviceButtonReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); + swapl(&stuff->grabWindow); + swaps(&stuff->modifiers); + return (ProcXUngrabDeviceButton(client)); +} + +/*********************************************************************** + * + * Release a grab of a button on an extension device. + * + */ + +int +ProcXUngrabDeviceButton(ClientPtr client) +{ + DeviceIntPtr dev; + DeviceIntPtr mdev; + WindowPtr pWin; + GrabPtr temporaryGrab; + int rc; + + REQUEST(xUngrabDeviceButtonReq); + REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); + + rc = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (rc != Success) + return rc; + if (dev->button == NULL) + return BadMatch; + + if (stuff->modifier_device != UseXKeyboard) { + rc = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixReadAccess); + if (rc != Success) + return BadDevice; + if (mdev->key == NULL) + return BadMatch; + } + else + mdev = PickKeyboard(client); + + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) + return BadValue; + + temporaryGrab = AllocGrab(NULL); + if (!temporaryGrab) + return BadAlloc; + + temporaryGrab->resource = client->clientAsMask; + temporaryGrab->device = dev; + temporaryGrab->window = pWin; + temporaryGrab->type = DeviceButtonPress; + temporaryGrab->grabtype = XI; + temporaryGrab->modifierDevice = mdev; + temporaryGrab->modifiersDetail.exact = stuff->modifiers; + temporaryGrab->modifiersDetail.pMask = NULL; + temporaryGrab->detail.exact = stuff->button; + temporaryGrab->detail.pMask = NULL; + + DeletePassiveGrabFromList(temporaryGrab); + + FreeGrab(temporaryGrab); + return Success; +} diff --git a/Xi/ungrdevb.h b/Xi/ungrdevb.h new file mode 100644 index 0000000..97d8aed --- /dev/null +++ b/Xi/ungrdevb.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef UNGRDEVB_H +#define UNGRDEVB_H 1 + +int SProcXUngrabDeviceButton(ClientPtr /* client */ + ); + +int ProcXUngrabDeviceButton(ClientPtr /* client */ + ); + +#endif /* UNGRDEVB_H */ diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c new file mode 100644 index 0000000..f981171 --- /dev/null +++ b/Xi/ungrdevk.c @@ -0,0 +1,155 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/*********************************************************************** + * + * Request to release a grab of a key on an extension device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XIproto.h> +#include "exglobals.h" +#include "dixgrabs.h" +#include "xkbsrv.h" +#include "xkbstr.h" + +#include "ungrdevk.h" + +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) + +/*********************************************************************** + * + * Handle requests from a client with a different byte order. + * + */ + +int +SProcXUngrabDeviceKey(ClientPtr client) +{ + REQUEST(xUngrabDeviceKeyReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); + swapl(&stuff->grabWindow); + swaps(&stuff->modifiers); + return (ProcXUngrabDeviceKey(client)); +} + +/*********************************************************************** + * + * Release a grab of a key on an extension device. + * + */ + +int +ProcXUngrabDeviceKey(ClientPtr client) +{ + DeviceIntPtr dev; + DeviceIntPtr mdev; + WindowPtr pWin; + GrabPtr temporaryGrab; + int rc; + + REQUEST(xUngrabDeviceKeyReq); + REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); + + rc = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (rc != Success) + return rc; + if (dev->key == NULL) + return BadMatch; + + if (stuff->modifier_device != UseXKeyboard) { + rc = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixReadAccess); + if (rc != Success) + return BadDevice; + if (mdev->key == NULL) + return BadMatch; + } + else + mdev = PickKeyboard(client); + + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if (((stuff->key > dev->key->xkbInfo->desc->max_key_code) || + (stuff->key < dev->key->xkbInfo->desc->min_key_code)) + && (stuff->key != AnyKey)) + return BadValue; + + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) + return BadValue; + + temporaryGrab = AllocGrab(NULL); + if (!temporaryGrab) + return BadAlloc; + + temporaryGrab->resource = client->clientAsMask; + temporaryGrab->device = dev; + temporaryGrab->window = pWin; + temporaryGrab->type = DeviceKeyPress; + temporaryGrab->grabtype = XI; + temporaryGrab->modifierDevice = mdev; + temporaryGrab->modifiersDetail.exact = stuff->modifiers; + temporaryGrab->modifiersDetail.pMask = NULL; + temporaryGrab->detail.exact = stuff->key; + temporaryGrab->detail.pMask = NULL; + + DeletePassiveGrabFromList(temporaryGrab); + FreeGrab(temporaryGrab); + return Success; +} diff --git a/Xi/ungrdevk.h b/Xi/ungrdevk.h new file mode 100644 index 0000000..1c4bab6 --- /dev/null +++ b/Xi/ungrdevk.h @@ -0,0 +1,39 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef UNGRDEVK_H +#define UNGRDEVK_H 1 + +int SProcXUngrabDeviceKey(ClientPtr /* client */ + ); + +int ProcXUngrabDeviceKey(ClientPtr /* client */ + ); + +#endif /* UNGRDEVK_H */ diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c new file mode 100644 index 0000000..ebef233 --- /dev/null +++ b/Xi/xiallowev.c @@ -0,0 +1,138 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +/*********************************************************************** + * + * Request to allow some device events. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "mi.h" +#include "eventstr.h" +#include <X11/extensions/XI2.h> +#include <X11/extensions/XI2proto.h> + +#include "exglobals.h" /* BadDevice */ +#include "exevents.h" +#include "xiallowev.h" + +int +SProcXIAllowEvents(ClientPtr client) +{ + REQUEST(xXIAllowEventsReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->time); + if (stuff->length > 3) { + xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff; + + swapl(&req_xi22->touchid); + swapl(&req_xi22->grab_window); + } + + return ProcXIAllowEvents(client); +} + +int +ProcXIAllowEvents(ClientPtr client) +{ + TimeStamp time; + DeviceIntPtr dev; + int ret = Success; + XIClientPtr xi_client; + Bool have_xi22 = FALSE; + + REQUEST(xXI2_2AllowEventsReq); + + xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + + if (version_compare(xi_client->major_version, + xi_client->minor_version, 2, 2) >= 0) { + REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq); + have_xi22 = TRUE; + } + else { + REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq); + } + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (ret != Success) + return ret; + + time = ClientTimeToServerTime(stuff->time); + + switch (stuff->mode) { + case XIReplayDevice: + AllowSome(client, time, dev, NOT_GRABBED); + break; + case XISyncDevice: + AllowSome(client, time, dev, FREEZE_NEXT_EVENT); + break; + case XIAsyncDevice: + AllowSome(client, time, dev, THAWED); + break; + case XIAsyncPairedDevice: + if (IsMaster(dev)) + AllowSome(client, time, dev, THAW_OTHERS); + break; + case XISyncPair: + if (IsMaster(dev)) + AllowSome(client, time, dev, FREEZE_BOTH_NEXT_EVENT); + break; + case XIAsyncPair: + if (IsMaster(dev)) + AllowSome(client, time, dev, THAWED_BOTH); + break; + case XIRejectTouch: + case XIAcceptTouch: + { + int rc; + WindowPtr win; + + if (!have_xi22) + return BadValue; + + rc = dixLookupWindow(&win, stuff->grab_window, client, DixReadAccess); + if (rc != Success) + return rc; + + ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid, + stuff->grab_window, &client->errorValue); + } + break; + default: + client->errorValue = stuff->mode; + ret = BadValue; + } + + return ret; +} diff --git a/Xi/xiallowev.h b/Xi/xiallowev.h new file mode 100644 index 0000000..c24ac3d --- /dev/null +++ b/Xi/xiallowev.h @@ -0,0 +1,36 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef XIALLOWEV_H +#define XIALLOWEV_H 1 + +int ProcXIAllowEvents(ClientPtr client); +int SProcXIAllowEvents(ClientPtr client); + +#endif /* XIALLOWEV_H */ diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c new file mode 100644 index 0000000..6732ce9 --- /dev/null +++ b/Xi/xibarriers.c @@ -0,0 +1,931 @@ +/* + * Copyright 2012 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright © 2002 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "xibarriers.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "dixevents.h" +#include "servermd.h" +#include "mipointer.h" +#include "inputstr.h" +#include "windowstr.h" +#include "xace.h" +#include "list.h" +#include "exglobals.h" +#include "eventstr.h" +#include "mi.h" + +RESTYPE PointerBarrierType; + +static DevPrivateKeyRec BarrierScreenPrivateKeyRec; + +#define BarrierScreenPrivateKey (&BarrierScreenPrivateKeyRec) + +typedef struct PointerBarrierClient *PointerBarrierClientPtr; + +struct PointerBarrierDevice { + struct xorg_list entry; + int deviceid; + Time last_timestamp; + int barrier_event_id; + int release_event_id; + Bool hit; + Bool seen; +}; + +struct PointerBarrierClient { + XID id; + ScreenPtr screen; + Window window; + struct PointerBarrier barrier; + struct xorg_list entry; + /* num_devices/device_ids are devices the barrier applies to */ + int num_devices; + int *device_ids; /* num_devices */ + + /* per_device keeps track of devices actually blocked by barriers */ + struct xorg_list per_device; +}; + +typedef struct _BarrierScreen { + struct xorg_list barriers; +} BarrierScreenRec, *BarrierScreenPtr; + +#define GetBarrierScreen(s) ((BarrierScreenPtr)dixLookupPrivate(&(s)->devPrivates, BarrierScreenPrivateKey)) +#define GetBarrierScreenIfSet(s) GetBarrierScreen(s) +#define SetBarrierScreen(s,p) dixSetPrivate(&(s)->devPrivates, BarrierScreenPrivateKey, p) + +static struct PointerBarrierDevice *AllocBarrierDevice(void) +{ + struct PointerBarrierDevice *pbd = NULL; + + pbd = malloc(sizeof(struct PointerBarrierDevice)); + if (!pbd) + return NULL; + + pbd->deviceid = -1; /* must be set by caller */ + pbd->barrier_event_id = 1; + pbd->release_event_id = 0; + pbd->hit = FALSE; + pbd->seen = FALSE; + xorg_list_init(&pbd->entry); + + return pbd; +} + +static void FreePointerBarrierClient(struct PointerBarrierClient *c) +{ + struct PointerBarrierDevice *pbd = NULL, *tmp = NULL; + + xorg_list_for_each_entry_safe(pbd, tmp, &c->per_device, entry) { + free(pbd); + } + free(c); +} + +static struct PointerBarrierDevice *GetBarrierDevice(struct PointerBarrierClient *c, int deviceid) +{ + struct PointerBarrierDevice *pbd = NULL; + + xorg_list_for_each_entry(pbd, &c->per_device, entry) { + if (pbd->deviceid == deviceid) + break; + } + + BUG_WARN(!pbd); + return pbd; +} + +static BOOL +barrier_is_horizontal(const struct PointerBarrier *barrier) +{ + return barrier->y1 == barrier->y2; +} + +static BOOL +barrier_is_vertical(const struct PointerBarrier *barrier) +{ + return barrier->x1 == barrier->x2; +} + +/** + * @return The set of barrier movement directions the movement vector + * x1/y1 → x2/y2 represents. + */ +int +barrier_get_direction(int x1, int y1, int x2, int y2) +{ + int direction = 0; + + /* which way are we trying to go */ + if (x2 > x1) + direction |= BarrierPositiveX; + if (x2 < x1) + direction |= BarrierNegativeX; + if (y2 > y1) + direction |= BarrierPositiveY; + if (y2 < y1) + direction |= BarrierNegativeY; + + return direction; +} + +/** + * Test if the barrier may block movement in the direction defined by + * x1/y1 → x2/y2. This function only tests whether the directions could be + * blocked, it does not test if the barrier actually blocks the movement. + * + * @return TRUE if the barrier blocks the direction of movement or FALSE + * otherwise. + */ +BOOL +barrier_is_blocking_direction(const struct PointerBarrier * barrier, + int direction) +{ + /* Barriers define which way is ok, not which way is blocking */ + return (barrier->directions & direction) != direction; +} + +static BOOL +inside_segment(int v, int v1, int v2) +{ + if (v1 < 0 && v2 < 0) /* line */ + return TRUE; + else if (v1 < 0) /* ray */ + return v <= v2; + else if (v2 < 0) /* ray */ + return v >= v1; + else /* line segment */ + return v >= v1 && v <= v2; +} + +#define T(v, a, b) (((float)v) - (a)) / ((b) - (a)) +#define F(t, a, b) ((t) * ((a) - (b)) + (a)) + +/** + * Test if the movement vector x1/y1 → x2/y2 is intersecting with the + * barrier. A movement vector with the startpoint or endpoint adjacent to + * the barrier itself counts as intersecting. + * + * @param x1 X start coordinate of movement vector + * @param y1 Y start coordinate of movement vector + * @param x2 X end coordinate of movement vector + * @param y2 Y end coordinate of movement vector + * @param[out] distance The distance between the start point and the + * intersection with the barrier (if applicable). + * @return TRUE if the barrier intersects with the given vector + */ +BOOL +barrier_is_blocking(const struct PointerBarrier * barrier, + int x1, int y1, int x2, int y2, double *distance) +{ + if (barrier_is_vertical(barrier)) { + float t, y; + t = T(barrier->x1, x1, x2); + if (t < 0 || t > 1) + return FALSE; + + /* Edge case: moving away from barrier. */ + if (x2 > x1 && t == 0) + return FALSE; + + y = F(t, y1, y2); + if (!inside_segment(y, barrier->y1, barrier->y2)) + return FALSE; + + *distance = sqrt((pow(y - y1, 2) + pow(barrier->x1 - x1, 2))); + return TRUE; + } + else { + float t, x; + t = T(barrier->y1, y1, y2); + if (t < 0 || t > 1) + return FALSE; + + /* Edge case: moving away from barrier. */ + if (y2 > y1 && t == 0) + return FALSE; + + x = F(t, x1, x2); + if (!inside_segment(x, barrier->x1, barrier->x2)) + return FALSE; + + *distance = sqrt((pow(x - x1, 2) + pow(barrier->y1 - y1, 2))); + return TRUE; + } +} + +#define HIT_EDGE_EXTENTS 2 +static BOOL +barrier_inside_hit_box(struct PointerBarrier *barrier, int x, int y) +{ + int x1, x2, y1, y2; + int dir; + + x1 = barrier->x1; + x2 = barrier->x2; + y1 = barrier->y1; + y2 = barrier->y2; + dir = ~(barrier->directions); + + if (barrier_is_vertical(barrier)) { + if (dir & BarrierPositiveX) + x1 -= HIT_EDGE_EXTENTS; + if (dir & BarrierNegativeX) + x2 += HIT_EDGE_EXTENTS; + } + if (barrier_is_horizontal(barrier)) { + if (dir & BarrierPositiveY) + y1 -= HIT_EDGE_EXTENTS; + if (dir & BarrierNegativeY) + y2 += HIT_EDGE_EXTENTS; + } + + return x >= x1 && x <= x2 && y >= y1 && y <= y2; +} + +static BOOL +barrier_blocks_device(struct PointerBarrierClient *client, + DeviceIntPtr dev) +{ + int i; + int master_id; + + /* Clients with no devices are treated as + * if they specified XIAllDevices. */ + if (client->num_devices == 0) + return TRUE; + + master_id = GetMaster(dev, POINTER_OR_FLOAT)->id; + + for (i = 0; i < client->num_devices; i++) { + int device_id = client->device_ids[i]; + if (device_id == XIAllDevices || + device_id == XIAllMasterDevices || + device_id == master_id) + return TRUE; + } + + return FALSE; +} + +/** + * Find the nearest barrier client that is blocking movement from x1/y1 to x2/y2. + * + * @param dir Only barriers blocking movement in direction dir are checked + * @param x1 X start coordinate of movement vector + * @param y1 Y start coordinate of movement vector + * @param x2 X end coordinate of movement vector + * @param y2 Y end coordinate of movement vector + * @return The barrier nearest to the movement origin that blocks this movement. + */ +static struct PointerBarrierClient * +barrier_find_nearest(BarrierScreenPtr cs, DeviceIntPtr dev, + int dir, + int x1, int y1, int x2, int y2) +{ + struct PointerBarrierClient *c, *nearest = NULL; + double min_distance = INT_MAX; /* can't get higher than that in X anyway */ + + xorg_list_for_each_entry(c, &cs->barriers, entry) { + struct PointerBarrier *b = &c->barrier; + struct PointerBarrierDevice *pbd; + double distance; + + pbd = GetBarrierDevice(c, dev->id); + if (pbd->seen) + continue; + + if (!barrier_is_blocking_direction(b, dir)) + continue; + + if (!barrier_blocks_device(c, dev)) + continue; + + if (barrier_is_blocking(b, x1, y1, x2, y2, &distance)) { + if (min_distance > distance) { + min_distance = distance; + nearest = c; + } + } + } + + return nearest; +} + +/** + * Clamp to the given barrier given the movement direction specified in dir. + * + * @param barrier The barrier to clamp to + * @param dir The movement direction + * @param[out] x The clamped x coordinate. + * @param[out] y The clamped x coordinate. + */ +void +barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, + int *y) +{ + if (barrier_is_vertical(barrier)) { + if ((dir & BarrierNegativeX) & ~barrier->directions) + *x = barrier->x1; + if ((dir & BarrierPositiveX) & ~barrier->directions) + *x = barrier->x1 - 1; + } + if (barrier_is_horizontal(barrier)) { + if ((dir & BarrierNegativeY) & ~barrier->directions) + *y = barrier->y1; + if ((dir & BarrierPositiveY) & ~barrier->directions) + *y = barrier->y1 - 1; + } +} + +void +input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, + int current_x, int current_y, + int dest_x, int dest_y, + int *out_x, int *out_y, + int *nevents, InternalEvent* events) +{ + /* Clamped coordinates here refer to screen edge clamping. */ + BarrierScreenPtr cs = GetBarrierScreen(screen); + int x = dest_x, + y = dest_y; + int dir; + struct PointerBarrier *nearest = NULL; + PointerBarrierClientPtr c; + Time ms = GetTimeInMillis(); + BarrierEvent ev = { + .header = ET_Internal, + .type = 0, + .length = sizeof (BarrierEvent), + .time = ms, + .deviceid = dev->id, + .sourceid = dev->id, + .dx = dest_x - current_x, + .dy = dest_y - current_y, + .root = screen->root->drawable.id, + }; + InternalEvent *barrier_events = events; + DeviceIntPtr master; + + if (nevents) + *nevents = 0; + + if (xorg_list_is_empty(&cs->barriers) || IsFloating(dev)) + goto out; + + /** + * This function is only called for slave devices, but pointer-barriers + * are for master-devices only. Flip the device to the master here, + * continue with that. + */ + master = GetMaster(dev, MASTER_POINTER); + + /* How this works: + * Given the origin and the movement vector, get the nearest barrier + * to the origin that is blocking the movement. + * Clamp to that barrier. + * Then, check from the clamped intersection to the original + * destination, again finding the nearest barrier and clamping. + */ + dir = barrier_get_direction(current_x, current_y, x, y); + + while (dir != 0) { + int new_sequence; + struct PointerBarrierDevice *pbd; + + c = barrier_find_nearest(cs, master, dir, current_x, current_y, x, y); + if (!c) + break; + + nearest = &c->barrier; + + pbd = GetBarrierDevice(c, master->id); + new_sequence = !pbd->hit; + + pbd->seen = TRUE; + pbd->hit = TRUE; + + if (pbd->barrier_event_id == pbd->release_event_id) + continue; + + ev.type = ET_BarrierHit; + barrier_clamp_to_barrier(nearest, dir, &x, &y); + + if (barrier_is_vertical(nearest)) { + dir &= ~(BarrierNegativeX | BarrierPositiveX); + current_x = x; + } + else if (barrier_is_horizontal(nearest)) { + dir &= ~(BarrierNegativeY | BarrierPositiveY); + current_y = y; + } + + ev.flags = 0; + ev.event_id = pbd->barrier_event_id; + ev.barrierid = c->id; + + ev.dt = new_sequence ? 0 : ms - pbd->last_timestamp; + ev.window = c->window; + pbd->last_timestamp = ms; + + /* root x/y is filled in later */ + + barrier_events->barrier_event = ev; + barrier_events++; + *nevents += 1; + } + + xorg_list_for_each_entry(c, &cs->barriers, entry) { + struct PointerBarrierDevice *pbd; + int flags = 0; + + pbd = GetBarrierDevice(c, master->id); + pbd->seen = FALSE; + if (!pbd->hit) + continue; + + if (barrier_inside_hit_box(&c->barrier, x, y)) + continue; + + pbd->hit = FALSE; + + ev.type = ET_BarrierLeave; + + if (pbd->barrier_event_id == pbd->release_event_id) + flags |= XIBarrierPointerReleased; + + ev.flags = flags; + ev.event_id = pbd->barrier_event_id; + ev.barrierid = c->id; + + ev.dt = ms - pbd->last_timestamp; + ev.window = c->window; + pbd->last_timestamp = ms; + + /* root x/y is filled in later */ + + barrier_events->barrier_event = ev; + barrier_events++; + *nevents += 1; + + /* If we've left the hit box, this is the + * start of a new event ID. */ + pbd->barrier_event_id++; + } + + out: + *out_x = x; + *out_y = y; +} + +static void +sort_min_max(INT16 *a, INT16 *b) +{ + INT16 A, B; + if (*a < 0 || *b < 0) + return; + A = *a; + B = *b; + *a = min(A, B); + *b = max(A, B); +} + +static int +CreatePointerBarrierClient(ClientPtr client, + xXFixesCreatePointerBarrierReq * stuff, + PointerBarrierClientPtr *client_out) +{ + WindowPtr pWin; + ScreenPtr screen; + BarrierScreenPtr cs; + int err; + int size; + int i; + struct PointerBarrierClient *ret; + CARD16 *in_devices; + DeviceIntPtr dev; + + size = sizeof(*ret) + sizeof(DeviceIntPtr) * stuff->num_devices; + ret = malloc(size); + + if (!ret) { + return BadAlloc; + } + + xorg_list_init(&ret->per_device); + + err = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (err != Success) { + client->errorValue = stuff->window; + goto error; + } + + screen = pWin->drawable.pScreen; + cs = GetBarrierScreen(screen); + + ret->screen = screen; + ret->window = stuff->window; + ret->num_devices = stuff->num_devices; + if (ret->num_devices > 0) + ret->device_ids = (int*)&ret[1]; + else + ret->device_ids = NULL; + + in_devices = (CARD16 *) &stuff[1]; + for (i = 0; i < stuff->num_devices; i++) { + int device_id = in_devices[i]; + DeviceIntPtr device; + + if ((err = dixLookupDevice (&device, device_id, + client, DixReadAccess))) { + client->errorValue = device_id; + goto error; + } + + if (!IsMaster (device)) { + client->errorValue = device_id; + err = BadDevice; + goto error; + } + + ret->device_ids[i] = device_id; + } + + /* Alloc one per master pointer, they're the ones that can be blocked */ + xorg_list_init(&ret->per_device); + nt_list_for_each_entry(dev, inputInfo.devices, next) { + struct PointerBarrierDevice *pbd; + + if (dev->type != MASTER_POINTER) + continue; + + pbd = AllocBarrierDevice(); + if (!pbd) { + err = BadAlloc; + goto error; + } + pbd->deviceid = dev->id; + + xorg_list_add(&pbd->entry, &ret->per_device); + } + + ret->id = stuff->barrier; + ret->barrier.x1 = stuff->x1; + ret->barrier.x2 = stuff->x2; + ret->barrier.y1 = stuff->y1; + ret->barrier.y2 = stuff->y2; + sort_min_max(&ret->barrier.x1, &ret->barrier.x2); + sort_min_max(&ret->barrier.y1, &ret->barrier.y2); + ret->barrier.directions = stuff->directions & 0x0f; + if (barrier_is_horizontal(&ret->barrier)) + ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX); + if (barrier_is_vertical(&ret->barrier)) + ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY); + xorg_list_add(&ret->entry, &cs->barriers); + + *client_out = ret; + return Success; + + error: + *client_out = NULL; + FreePointerBarrierClient(ret); + return err; +} + +static int +BarrierFreeBarrier(void *data, XID id) +{ + struct PointerBarrierClient *c; + Time ms = GetTimeInMillis(); + DeviceIntPtr dev = NULL; + ScreenPtr screen; + + c = container_of(data, struct PointerBarrierClient, barrier); + screen = c->screen; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + struct PointerBarrierDevice *pbd; + int root_x, root_y; + BarrierEvent ev = { + .header = ET_Internal, + .type = ET_BarrierLeave, + .length = sizeof (BarrierEvent), + .time = ms, + /* .deviceid */ + .sourceid = 0, + .barrierid = c->id, + .window = c->window, + .root = screen->root->drawable.id, + .dx = 0, + .dy = 0, + /* .root_x */ + /* .root_y */ + /* .dt */ + /* .event_id */ + .flags = XIBarrierPointerReleased, + }; + + + if (dev->type != MASTER_POINTER) + continue; + + pbd = GetBarrierDevice(c, dev->id); + if (!pbd->hit) + continue; + + ev.deviceid = dev->id; + ev.event_id = pbd->barrier_event_id; + ev.dt = ms - pbd->last_timestamp; + + GetSpritePosition(dev, &root_x, &root_y); + ev.root_x = root_x; + ev.root_y = root_y; + + mieqEnqueue(dev, (InternalEvent *) &ev); + } + + xorg_list_del(&c->entry); + + FreePointerBarrierClient(c); + return Success; +} + +static void add_master_func(pointer res, XID id, pointer devid) +{ + struct PointerBarrier *b; + struct PointerBarrierClient *barrier; + struct PointerBarrierDevice *pbd; + int *deviceid = devid; + + b = res; + barrier = container_of(b, struct PointerBarrierClient, barrier); + + + pbd = AllocBarrierDevice(); + pbd->deviceid = *deviceid; + + xorg_list_add(&pbd->entry, &barrier->per_device); +} + +static void remove_master_func(pointer res, XID id, pointer devid) +{ + struct PointerBarrierDevice *pbd; + struct PointerBarrierClient *barrier; + struct PointerBarrier *b; + DeviceIntPtr dev; + int *deviceid = devid; + int rc; + Time ms = GetTimeInMillis(); + + rc = dixLookupDevice(&dev, *deviceid, serverClient, DixSendAccess); + if (rc != Success) + return; + + b = res; + barrier = container_of(b, struct PointerBarrierClient, barrier); + + pbd = GetBarrierDevice(barrier, *deviceid); + + if (pbd->hit) { + BarrierEvent ev = { + .header = ET_Internal, + .type =ET_BarrierLeave, + .length = sizeof (BarrierEvent), + .time = ms, + .deviceid = *deviceid, + .sourceid = 0, + .dx = 0, + .dy = 0, + .root = barrier->screen->root->drawable.id, + .window = barrier->window, + .dt = ms - pbd->last_timestamp, + .flags = XIBarrierPointerReleased, + .event_id = pbd->barrier_event_id, + .barrierid = barrier->id, + }; + + mieqEnqueue(dev, (InternalEvent *) &ev); + } + + xorg_list_del(&pbd->entry); + free(pbd); +} + +void XIBarrierNewMasterDevice(ClientPtr client, int deviceid) +{ + FindClientResourcesByType(client, PointerBarrierType, add_master_func, &deviceid); +} + +void XIBarrierRemoveMasterDevice(ClientPtr client, int deviceid) +{ + FindClientResourcesByType(client, PointerBarrierType, remove_master_func, &deviceid); +} + +int +XICreatePointerBarrier(ClientPtr client, + xXFixesCreatePointerBarrierReq * stuff) +{ + int err; + struct PointerBarrierClient *barrier; + struct PointerBarrier b; + + b.x1 = stuff->x1; + b.x2 = stuff->x2; + b.y1 = stuff->y1; + b.y2 = stuff->y2; + + if (!barrier_is_horizontal(&b) && !barrier_is_vertical(&b)) + return BadValue; + + /* no 0-sized barriers */ + if (barrier_is_horizontal(&b) && barrier_is_vertical(&b)) + return BadValue; + + /* no infinite barriers on the wrong axis */ + if (barrier_is_horizontal(&b) && (b.y1 < 0 || b.y2 < 0)) + return BadValue; + + if (barrier_is_vertical(&b) && (b.x1 < 0 || b.x2 < 0)) + return BadValue; + + if ((err = CreatePointerBarrierClient(client, stuff, &barrier))) + return err; + + if (!AddResource(stuff->barrier, PointerBarrierType, &barrier->barrier)) + return BadAlloc; + + return Success; +} + +int +XIDestroyPointerBarrier(ClientPtr client, + xXFixesDestroyPointerBarrierReq * stuff) +{ + int err; + void *barrier; + + err = dixLookupResourceByType((void **) &barrier, stuff->barrier, + PointerBarrierType, client, DixDestroyAccess); + if (err != Success) { + client->errorValue = stuff->barrier; + return err; + } + + if (CLIENT_ID(stuff->barrier) != client->index) + return BadAccess; + + FreeResource(stuff->barrier, RT_NONE); + return Success; +} + +int +SProcXIBarrierReleasePointer(ClientPtr client) +{ + xXIBarrierReleasePointerInfo *info; + REQUEST(xXIBarrierReleasePointerReq); + int i; + + info = (xXIBarrierReleasePointerInfo*) &stuff[1]; + + swaps(&stuff->length); + swapl(&stuff->num_barriers); + for (i = 0; i < stuff->num_barriers; i++, info++) { + swaps(&info->deviceid); + swapl(&info->barrier); + swapl(&info->eventid); + } + + return (ProcXIBarrierReleasePointer(client)); +} + +int +ProcXIBarrierReleasePointer(ClientPtr client) +{ + int i; + int err; + struct PointerBarrierClient *barrier; + struct PointerBarrier *b; + xXIBarrierReleasePointerInfo *info; + + REQUEST(xXIBarrierReleasePointerReq); + REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq); + + info = (xXIBarrierReleasePointerInfo*) &stuff[1]; + for (i = 0; i < stuff->num_barriers; i++, info++) { + struct PointerBarrierDevice *pbd; + DeviceIntPtr dev; + CARD32 barrier_id, event_id; + _X_UNUSED CARD32 device_id; + + barrier_id = info->barrier; + event_id = info->eventid; + + err = dixLookupDevice(&dev, info->deviceid, client, DixReadAccess); + if (err != Success) { + client->errorValue = BadDevice; + return err; + } + + err = dixLookupResourceByType((void **) &b, barrier_id, + PointerBarrierType, client, DixReadAccess); + if (err != Success) { + client->errorValue = barrier_id; + return err; + } + + if (CLIENT_ID(barrier_id) != client->index) + return BadAccess; + + + barrier = container_of(b, struct PointerBarrierClient, barrier); + + pbd = GetBarrierDevice(barrier, dev->id); + + if (pbd->barrier_event_id == event_id) + pbd->release_event_id = event_id; + } + + return Success; +} + +Bool +XIBarrierInit(void) +{ + int i; + + if (!dixRegisterPrivateKey(&BarrierScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + BarrierScreenPtr cs; + + cs = (BarrierScreenPtr) calloc(1, sizeof(BarrierScreenRec)); + if (!cs) + return FALSE; + xorg_list_init(&cs->barriers); + SetBarrierScreen(pScreen, cs); + } + + PointerBarrierType = CreateNewResourceType(BarrierFreeBarrier, + "XIPointerBarrier"); + + return PointerBarrierType; +} + +void +XIBarrierReset(void) +{ + int i; + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + BarrierScreenPtr cs = GetBarrierScreen(pScreen); + free(cs); + SetBarrierScreen(pScreen, NULL); + } +} diff --git a/Xi/xibarriers.h b/Xi/xibarriers.h new file mode 100644 index 0000000..f61b482 --- /dev/null +++ b/Xi/xibarriers.h @@ -0,0 +1,48 @@ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _XIBARRIERS_H_ +#define _XIBARRIERS_H_ + +#include "resource.h" + +extern _X_EXPORT RESTYPE PointerBarrierType; + +struct PointerBarrier { + INT16 x1, x2, y1, y2; + CARD32 directions; +}; + +int +barrier_get_direction(int, int, int, int); +BOOL +barrier_is_blocking(const struct PointerBarrier *, int, int, int, int, + double *); +BOOL +barrier_is_blocking_direction(const struct PointerBarrier *, int); +void +barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, + int *y); + +#include <xfixesint.h> + +int +XICreatePointerBarrier(ClientPtr client, + xXFixesCreatePointerBarrierReq * stuff); + +int +XIDestroyPointerBarrier(ClientPtr client, + xXFixesDestroyPointerBarrierReq * stuff); + +Bool XIBarrierInit(void); +void XIBarrierReset(void); + +int SProcXIBarrierReleasePointer(ClientPtr client); +int ProcXIBarrierReleasePointer(ClientPtr client); + +void XIBarrierNewMasterDevice(ClientPtr client, int deviceid); +void XIBarrierRemoveMasterDevice(ClientPtr client, int deviceid); + +#endif /* _XIBARRIERS_H_ */ diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c new file mode 100644 index 0000000..0be6bc0 --- /dev/null +++ b/Xi/xichangecursor.c @@ -0,0 +1,108 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to change a given device pointer's cursor. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2proto.h> +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "input.h" + +#include "xichangecursor.h" + +/*********************************************************************** + * + * This procedure allows a client to set one pointer's cursor. + * + */ + +int +SProcXIChangeCursor(ClientPtr client) +{ + REQUEST(xXIChangeCursorReq); + swaps(&stuff->length); + swapl(&stuff->win); + swapl(&stuff->cursor); + swaps(&stuff->deviceid); + REQUEST_SIZE_MATCH(xXIChangeCursorReq); + return (ProcXIChangeCursor(client)); +} + +int +ProcXIChangeCursor(ClientPtr client) +{ + int rc; + WindowPtr pWin = NULL; + DeviceIntPtr pDev = NULL; + CursorPtr pCursor = NULL; + + REQUEST(xXIChangeCursorReq); + REQUEST_SIZE_MATCH(xXIChangeCursorReq); + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if (!IsMaster(pDev) || !IsPointerDevice(pDev)) + return BadDevice; + + if (stuff->win != None) { + rc = dixLookupWindow(&pWin, stuff->win, client, DixSetAttrAccess); + if (rc != Success) + return rc; + } + + if (stuff->cursor == None) { + if (pWin == pWin->drawable.pScreen->root) + pCursor = rootCursor; + else + pCursor = (CursorPtr) None; + } + else { + rc = dixLookupResourceByType((pointer *) &pCursor, stuff->cursor, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) + return rc; + } + + ChangeWindowDeviceCursor(pWin, pDev, pCursor); + + return Success; +} diff --git a/Xi/xichangecursor.h b/Xi/xichangecursor.h new file mode 100644 index 0000000..1447777 --- /dev/null +++ b/Xi/xichangecursor.h @@ -0,0 +1,36 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHDEVCUR_H +#define CHDEVCUR_H 1 + +int SProcXIChangeCursor(ClientPtr /* client */ ); +int ProcXIChangeCursor(ClientPtr /* client */ ); + +#endif /* CHDEVCUR_H */ diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c new file mode 100644 index 0000000..9e36354 --- /dev/null +++ b/Xi/xichangehierarchy.c @@ -0,0 +1,481 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * Copyright 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request change in the device hierarchy. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2proto.h> +#include <X11/extensions/geproto.h> +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "geext.h" +#include "xace.h" +#include "xiquerydevice.h" /* for GetDeviceUse */ + +#include "xkbsrv.h" + +#include "xichangehierarchy.h" +#include "xibarriers.h" + +/** + * Send the current state of the device hierarchy to all clients. + */ +void +XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) +{ + xXIHierarchyEvent *ev; + xXIHierarchyInfo *info; + DeviceIntRec dummyDev; + DeviceIntPtr dev; + int i; + + if (!flags) + return; + + ev = calloc(1, sizeof(xXIHierarchyEvent) + + MAXDEVICES * sizeof(xXIHierarchyInfo)); + if (!ev) + return; + ev->type = GenericEvent; + ev->extension = IReqCode; + ev->evtype = XI_HierarchyChanged; + ev->time = GetTimeInMillis(); + ev->flags = 0; + ev->num_info = inputInfo.numDevices; + + info = (xXIHierarchyInfo *) &ev[1]; + for (dev = inputInfo.devices; dev; dev = dev->next) { + info->deviceid = dev->id; + info->enabled = dev->enabled; + info->use = GetDeviceUse(dev, &info->attachment); + info->flags = flags[dev->id]; + ev->flags |= info->flags; + info++; + } + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + info->deviceid = dev->id; + info->enabled = dev->enabled; + info->use = GetDeviceUse(dev, &info->attachment); + info->flags = flags[dev->id]; + ev->flags |= info->flags; + info++; + } + + for (i = 0; i < MAXDEVICES; i++) { + if (flags[i] & (XIMasterRemoved | XISlaveRemoved)) { + info->deviceid = i; + info->enabled = FALSE; + info->flags = flags[i]; + info->use = 0; + ev->flags |= info->flags; + ev->num_info++; + info++; + } + } + + ev->length = bytes_to_int32(ev->num_info * sizeof(xXIHierarchyInfo)); + + memset(&dummyDev, 0, sizeof(dummyDev)); + dummyDev.id = XIAllDevices; + dummyDev.type = SLAVE; + SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), + (xEvent *) ev, 1); + free(ev); +} + +/*********************************************************************** + * + * This procedure allows a client to change the device hierarchy through + * adding new master devices, removing them, etc. + * + */ + +int +SProcXIChangeHierarchy(ClientPtr client) +{ + REQUEST(xXIChangeHierarchyReq); + swaps(&stuff->length); + return (ProcXIChangeHierarchy(client)); +} + +static int +add_master(ClientPtr client, xXIAddMasterInfo * c, int flags[MAXDEVICES]) +{ + DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd; + char *name; + int rc; + + name = calloc(c->name_len + 1, sizeof(char)); + if (name == NULL) { + rc = BadAlloc; + goto unwind; + } + strncpy(name, (char *) &c[1], c->name_len); + + rc = AllocDevicePair(client, name, &ptr, &keybd, + CorePointerProc, CoreKeyboardProc, TRUE); + if (rc != Success) + goto unwind; + + if (!c->send_core) + ptr->coreEvents = keybd->coreEvents = FALSE; + + /* Allocate virtual slave devices for xtest events */ + rc = AllocXTestDevice(client, name, &XTestptr, &XTestkeybd, ptr, keybd); + if (rc != Success) { + DeleteInputDeviceRequest(ptr); + DeleteInputDeviceRequest(keybd); + goto unwind; + } + + ActivateDevice(ptr, FALSE); + ActivateDevice(keybd, FALSE); + flags[ptr->id] |= XIMasterAdded; + flags[keybd->id] |= XIMasterAdded; + + ActivateDevice(XTestptr, FALSE); + ActivateDevice(XTestkeybd, FALSE); + flags[XTestptr->id] |= XISlaveAdded; + flags[XTestkeybd->id] |= XISlaveAdded; + + if (c->enable) { + EnableDevice(ptr, FALSE); + EnableDevice(keybd, FALSE); + flags[ptr->id] |= XIDeviceEnabled; + flags[keybd->id] |= XIDeviceEnabled; + + EnableDevice(XTestptr, FALSE); + EnableDevice(XTestkeybd, FALSE); + flags[XTestptr->id] |= XIDeviceEnabled; + flags[XTestkeybd->id] |= XIDeviceEnabled; + } + + /* Attach the XTest virtual devices to the newly + created master device */ + AttachDevice(NULL, XTestptr, ptr); + AttachDevice(NULL, XTestkeybd, keybd); + flags[XTestptr->id] |= XISlaveAttached; + flags[XTestkeybd->id] |= XISlaveAttached; + + XIBarrierNewMasterDevice(client, ptr->id); + + unwind: + free(name); + return rc; +} + +static void +disable_clientpointer(DeviceIntPtr dev) +{ + int i; + + for (i = 0; i < currentMaxClients; i++) { + ClientPtr client = clients[i]; + + if (client && client->clientPtr == dev) + client->clientPtr = NULL; + } +} + +static int +remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES]) +{ + DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd; + int rc = Success; + + if (r->return_mode != XIAttachToMaster && r->return_mode != XIFloating) + return BadValue; + + rc = dixLookupDevice(&ptr, r->deviceid, client, DixDestroyAccess); + if (rc != Success) + goto unwind; + + if (!IsMaster(ptr)) { + client->errorValue = r->deviceid; + rc = BadDevice; + goto unwind; + } + + /* XXX: For now, don't allow removal of VCP, VCK */ + if (ptr == inputInfo.pointer ||ptr == inputInfo.keyboard) { + rc = BadDevice; + goto unwind; + } + + ptr = GetMaster(ptr, MASTER_POINTER); + rc = dixLookupDevice(&ptr, ptr->id, client, DixDestroyAccess); + if (rc != Success) + goto unwind; + keybd = GetMaster(ptr, MASTER_KEYBOARD); + rc = dixLookupDevice(&keybd, keybd->id, client, DixDestroyAccess); + if (rc != Success) + goto unwind; + + XTestptr = GetXTestDevice(ptr); + rc = dixLookupDevice(&XTestptr, XTestptr->id, client, DixDestroyAccess); + if (rc != Success) + goto unwind; + + XTestkeybd = GetXTestDevice(keybd); + rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client, DixDestroyAccess); + if (rc != Success) + goto unwind; + + disable_clientpointer(ptr); + + /* Disabling sends the devices floating, reattach them if + * desired. */ + if (r->return_mode == XIAttachToMaster) { + DeviceIntPtr attached, newptr, newkeybd; + + rc = dixLookupDevice(&newptr, r->return_pointer, client, DixAddAccess); + if (rc != Success) + goto unwind; + + if (!IsMaster(newptr)) { + client->errorValue = r->return_pointer; + rc = BadDevice; + goto unwind; + } + + rc = dixLookupDevice(&newkeybd, r->return_keyboard, + client, DixAddAccess); + if (rc != Success) + goto unwind; + + if (!IsMaster(newkeybd)) { + client->errorValue = r->return_keyboard; + rc = BadDevice; + goto unwind; + } + + for (attached = inputInfo.devices; attached; attached = attached->next) { + if (!IsMaster(attached)) { + if (GetMaster(attached, MASTER_ATTACHED) == ptr) { + AttachDevice(client, attached, newptr); + flags[attached->id] |= XISlaveAttached; + } + if (GetMaster(attached, MASTER_ATTACHED) == keybd) { + AttachDevice(client, attached, newkeybd); + flags[attached->id] |= XISlaveAttached; + } + } + } + } + + XIBarrierRemoveMasterDevice(client, ptr->id); + + /* disable the remove the devices, XTest devices must be done first + else the sprites they rely on will be destroyed */ + DisableDevice(XTestptr, FALSE); + DisableDevice(XTestkeybd, FALSE); + DisableDevice(keybd, FALSE); + DisableDevice(ptr, FALSE); + flags[XTestptr->id] |= XIDeviceDisabled | XISlaveDetached; + flags[XTestkeybd->id] |= XIDeviceDisabled | XISlaveDetached; + flags[keybd->id] |= XIDeviceDisabled; + flags[ptr->id] |= XIDeviceDisabled; + + flags[XTestptr->id] |= XISlaveRemoved; + flags[XTestkeybd->id] |= XISlaveRemoved; + flags[keybd->id] |= XIMasterRemoved; + flags[ptr->id] |= XIMasterRemoved; + + RemoveDevice(XTestptr, FALSE); + RemoveDevice(XTestkeybd, FALSE); + RemoveDevice(keybd, FALSE); + RemoveDevice(ptr, FALSE); + + unwind: + return rc; +} + +static int +detach_slave(ClientPtr client, xXIDetachSlaveInfo * c, int flags[MAXDEVICES]) +{ + DeviceIntPtr dev; + int rc; + + rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess); + if (rc != Success) + goto unwind; + + if (IsMaster(dev)) { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + /* Don't allow changes to XTest Devices, these are fixed */ + if (IsXTestDevice(dev, NULL)) { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + ReleaseButtonsAndKeys(dev); + AttachDevice(client, dev, NULL); + flags[dev->id] |= XISlaveDetached; + + unwind: + return rc; +} + +static int +attach_slave(ClientPtr client, xXIAttachSlaveInfo * c, int flags[MAXDEVICES]) +{ + DeviceIntPtr dev; + DeviceIntPtr newmaster; + int rc; + + rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess); + if (rc != Success) + goto unwind; + + if (IsMaster(dev)) { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + /* Don't allow changes to XTest Devices, these are fixed */ + if (IsXTestDevice(dev, NULL)) { + client->errorValue = c->deviceid; + rc = BadDevice; + goto unwind; + } + + rc = dixLookupDevice(&newmaster, c->new_master, client, DixAddAccess); + if (rc != Success) + goto unwind; + if (!IsMaster(newmaster)) { + client->errorValue = c->new_master; + rc = BadDevice; + goto unwind; + } + + if (!((IsPointerDevice(newmaster) && IsPointerDevice(dev)) || + (IsKeyboardDevice(newmaster) && IsKeyboardDevice(dev)))) { + rc = BadDevice; + goto unwind; + } + + ReleaseButtonsAndKeys(dev); + AttachDevice(client, dev, newmaster); + flags[dev->id] |= XISlaveAttached; + + unwind: + return rc; +} + +#define SWAPIF(cmd) if (client->swapped) { cmd; } + +int +ProcXIChangeHierarchy(ClientPtr client) +{ + xXIAnyHierarchyChangeInfo *any; + int required_len = sizeof(xXIChangeHierarchyReq); + int rc = Success; + int flags[MAXDEVICES] = { 0 }; + + REQUEST(xXIChangeHierarchyReq); + REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq); + + if (!stuff->num_changes) + return rc; + + any = (xXIAnyHierarchyChangeInfo *) &stuff[1]; + while (stuff->num_changes--) { + SWAPIF(swaps(&any->type)); + SWAPIF(swaps(&any->length)); + + required_len += any->length; + if ((stuff->length * 4) < required_len) + return BadLength; + + switch (any->type) { + case XIAddMaster: + { + xXIAddMasterInfo *c = (xXIAddMasterInfo *) any; + + SWAPIF(swaps(&c->name_len)); + + rc = add_master(client, c, flags); + if (rc != Success) + goto unwind; + } + break; + case XIRemoveMaster: + { + xXIRemoveMasterInfo *r = (xXIRemoveMasterInfo *) any; + + rc = remove_master(client, r, flags); + if (rc != Success) + goto unwind; + } + break; + case XIDetachSlave: + { + xXIDetachSlaveInfo *c = (xXIDetachSlaveInfo *) any; + + rc = detach_slave(client, c, flags); + if (rc != Success) + goto unwind; + } + break; + case XIAttachSlave: + { + xXIAttachSlaveInfo *c = (xXIAttachSlaveInfo *) any; + + rc = attach_slave(client, c, flags); + if (rc != Success) + goto unwind; + } + break; + } + + any = (xXIAnyHierarchyChangeInfo *) ((char *) any + any->length * 4); + } + + unwind: + + XISendDeviceHierarchyEvent(flags); + return rc; +} diff --git a/Xi/xichangehierarchy.h b/Xi/xichangehierarchy.h new file mode 100644 index 0000000..8ec1915 --- /dev/null +++ b/Xi/xichangehierarchy.h @@ -0,0 +1,44 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request change in the device hierarchy. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef CHDEVHIER_H +#define CHDEVHIER_H 1 + +int SProcXIChangeHierarchy(ClientPtr /* client */ ); +int ProcXIChangeHierarchy(ClientPtr /* client */ ); + +void XISendDeviceHierarchyEvent(int flags[]); + +#endif /* CHDEVHIER_H */ diff --git a/Xi/xigetclientpointer.c b/Xi/xigetclientpointer.c new file mode 100644 index 0000000..3c90d58 --- /dev/null +++ b/Xi/xigetclientpointer.c @@ -0,0 +1,106 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2proto.h> +#include "extnsionst.h" +#include "extinit.h" /* LookupDeviceIntRec */ +#include "exevents.h" +#include "exglobals.h" + +#include "xigetclientpointer.h" + +/*********************************************************************** + * This procedure allows a client to query another client's client pointer + * setting. + */ + +int +SProcXIGetClientPointer(ClientPtr client) +{ + REQUEST(xXIGetClientPointerReq); + + swaps(&stuff->length); + swapl(&stuff->win); + return ProcXIGetClientPointer(client); +} + +int +ProcXIGetClientPointer(ClientPtr client) +{ + int rc; + ClientPtr winclient; + xXIGetClientPointerReply rep; + + REQUEST(xXIGetClientPointerReq); + REQUEST_SIZE_MATCH(xXIGetClientPointerReq); + + if (stuff->win != None) { + rc = dixLookupClient(&winclient, stuff->win, client, DixGetAttrAccess); + + if (rc != Success) + return BadWindow; + } + else + winclient = client; + + rep = (xXIGetClientPointerReply) { + .repType = X_Reply, + .RepType = X_XIGetClientPointer, + .sequenceNumber = client->sequence, + .length = 0, + .set = (winclient->clientPtr != NULL), + .deviceid = (winclient->clientPtr) ? winclient->clientPtr->id : 0 + }; + + WriteReplyToClient(client, sizeof(xXIGetClientPointerReply), &rep); + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XGetClientPointer function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXIGetClientPointer(ClientPtr client, int size, + xXIGetClientPointerReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->deviceid); + WriteToClient(client, size, rep); +} diff --git a/Xi/xigetclientpointer.h b/Xi/xigetclientpointer.h new file mode 100644 index 0000000..4ecf42c --- /dev/null +++ b/Xi/xigetclientpointer.h @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef GETCPTR_H +#define GETCPTR_H 1 +int SProcXIGetClientPointer(ClientPtr /* client */ ); +int ProcXIGetClientPointer(ClientPtr /* client */ ); +void SRepXIGetClientPointer(ClientPtr /* client */ , + int /* size */ , + xXIGetClientPointerReply * /* rep */ ); + +#endif /* GETCPTR_H */ diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c new file mode 100644 index 0000000..63d95bc --- /dev/null +++ b/Xi/xigrabdev.c @@ -0,0 +1,173 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +/*********************************************************************** + * + * Request to grab or ungrab input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI2.h> +#include <X11/extensions/XI2proto.h> + +#include "exglobals.h" /* BadDevice */ +#include "exevents.h" +#include "xigrabdev.h" +#include "inpututils.h" + +int +SProcXIGrabDevice(ClientPtr client) +{ + REQUEST(xXIGrabDeviceReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->grab_window); + swapl(&stuff->cursor); + swapl(&stuff->time); + swaps(&stuff->mask_len); + + return ProcXIGrabDevice(client); +} + +int +ProcXIGrabDevice(ClientPtr client) +{ + DeviceIntPtr dev; + xXIGrabDeviceReply rep; + int ret = Success; + uint8_t status; + GrabMask mask = { 0 }; + int mask_len; + unsigned int keyboard_mode; + unsigned int pointer_mode; + + REQUEST(xXIGrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (ret != Success) + return ret; + + if (!IsMaster(dev)) + stuff->paired_device_mode = GrabModeAsync; + + if (IsKeyboardDevice(dev)) { + keyboard_mode = stuff->grab_mode; + pointer_mode = stuff->paired_device_mode; + } + else { + keyboard_mode = stuff->paired_device_mode; + pointer_mode = stuff->grab_mode; + } + + if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1], + stuff->mask_len * 4) != Success) + return BadValue; + + mask.xi2mask = xi2mask_new(); + if (!mask.xi2mask) + return BadAlloc; + + mask_len = min(xi2mask_mask_size(mask.xi2mask), stuff->mask_len * 4); + /* FIXME: I think the old code was broken here */ + xi2mask_set_one_mask(mask.xi2mask, dev->id, (unsigned char *) &stuff[1], + mask_len); + + ret = GrabDevice(client, dev, pointer_mode, + keyboard_mode, + stuff->grab_window, + stuff->owner_events, + stuff->time, + &mask, XI2, stuff->cursor, None /* confineTo */ , + &status); + + xi2mask_free(&mask.xi2mask); + + if (ret != Success) + return ret; + + rep = (xXIGrabDeviceReply) { + .repType = X_Reply, + .RepType = X_XIGrabDevice, + .sequenceNumber = client->sequence, + .length = 0, + .status = status + }; + + WriteReplyToClient(client, sizeof(rep), &rep); + return ret; +} + +int +SProcXIUngrabDevice(ClientPtr client) +{ + REQUEST(xXIUngrabDeviceReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->time); + + return ProcXIUngrabDevice(client); +} + +int +ProcXIUngrabDevice(ClientPtr client) +{ + DeviceIntPtr dev; + GrabPtr grab; + int ret = Success; + TimeStamp time; + + REQUEST(xXIUngrabDeviceReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (ret != Success) + return ret; + + grab = dev->deviceGrab.grab; + + time = ClientTimeToServerTime(stuff->time); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && + (grab) && SameClient(grab, client) && grab->grabtype == XI2) + (*dev->deviceGrab.DeactivateGrab) (dev); + + return Success; +} + +void +SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + WriteToClient(client, size, rep); +} diff --git a/Xi/xigrabdev.h b/Xi/xigrabdev.h new file mode 100644 index 0000000..e5aa702 --- /dev/null +++ b/Xi/xigrabdev.h @@ -0,0 +1,41 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef XIGRABDEV_H +#define XIGRABDEV_H 1 + +int ProcXIGrabDevice(ClientPtr client); +int SProcXIGrabDevice(ClientPtr client); + +int ProcXIUngrabDevice(ClientPtr client); +int SProcXIUngrabDevice(ClientPtr client); + +void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep); + +#endif /* XIGRABDEV_H */ diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c new file mode 100644 index 0000000..700622d --- /dev/null +++ b/Xi/xipassivegrab.c @@ -0,0 +1,354 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +/*********************************************************************** + * + * Request to grab or ungrab input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI2.h> +#include <X11/extensions/XI2proto.h> +#include "swaprep.h" + +#include "exglobals.h" /* BadDevice */ +#include "exevents.h" +#include "xipassivegrab.h" +#include "dixgrabs.h" +#include "misc.h" +#include "inpututils.h" + +int +SProcXIPassiveGrabDevice(ClientPtr client) +{ + int i; + uint32_t *mods; + + REQUEST(xXIPassiveGrabDeviceReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->grab_window); + swapl(&stuff->cursor); + swapl(&stuff->time); + swapl(&stuff->detail); + swaps(&stuff->mask_len); + swaps(&stuff->num_modifiers); + + mods = (uint32_t *) &stuff[1] + stuff->mask_len; + + for (i = 0; i < stuff->num_modifiers; i++, mods++) { + swapl(mods); + } + + return ProcXIPassiveGrabDevice(client); +} + +int +ProcXIPassiveGrabDevice(ClientPtr client) +{ + DeviceIntPtr dev, mod_dev; + xXIPassiveGrabDeviceReply rep = { + .repType = X_Reply, + .RepType = X_XIPassiveGrabDevice, + .sequenceNumber = client->sequence, + .length = 0, + .num_modifiers = 0 + }; + int i, ret = Success; + uint32_t *modifiers; + xXIGrabModifierInfo *modifiers_failed; + GrabMask mask = { 0 }; + GrabParameters param; + void *tmp; + int mask_len; + + REQUEST(xXIPassiveGrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq); + + if (stuff->deviceid == XIAllDevices) + dev = inputInfo.all_devices; + else if (stuff->deviceid == XIAllMasterDevices) + dev = inputInfo.all_master_devices; + else { + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (ret != Success) { + client->errorValue = stuff->deviceid; + return ret; + } + } + + if (stuff->grab_type != XIGrabtypeButton && + stuff->grab_type != XIGrabtypeKeycode && + stuff->grab_type != XIGrabtypeEnter && + stuff->grab_type != XIGrabtypeFocusIn && + stuff->grab_type != XIGrabtypeTouchBegin) { + client->errorValue = stuff->grab_type; + return BadValue; + } + + if ((stuff->grab_type == XIGrabtypeEnter || + stuff->grab_type == XIGrabtypeFocusIn || + stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0) { + client->errorValue = stuff->detail; + return BadValue; + } + + if (stuff->grab_type == XIGrabtypeTouchBegin && + (stuff->grab_mode != XIGrabModeTouch || + stuff->paired_device_mode != GrabModeAsync)) { + client->errorValue = stuff->grab_mode; + return BadValue; + } + + if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1], + stuff->mask_len * 4) != Success) + return BadValue; + + mask.xi2mask = xi2mask_new(); + if (!mask.xi2mask) + return BadAlloc; + + mask_len = min(xi2mask_mask_size(mask.xi2mask), stuff->mask_len * 4); + xi2mask_set_one_mask(mask.xi2mask, stuff->deviceid, + (unsigned char *) &stuff[1], mask_len * 4); + + memset(¶m, 0, sizeof(param)); + param.grabtype = XI2; + param.ownerEvents = stuff->owner_events; + param.grabWindow = stuff->grab_window; + param.cursor = stuff->cursor; + + if (IsKeyboardDevice(dev)) { + param.this_device_mode = stuff->grab_mode; + param.other_devices_mode = stuff->paired_device_mode; + } + else { + param.this_device_mode = stuff->paired_device_mode; + param.other_devices_mode = stuff->grab_mode; + } + + if (stuff->cursor != None) { + ret = dixLookupResourceByType(&tmp, stuff->cursor, + RT_CURSOR, client, DixUseAccess); + if (ret != Success) { + client->errorValue = stuff->cursor; + goto out; + } + } + + ret = + dixLookupWindow((WindowPtr *) &tmp, stuff->grab_window, client, + DixSetAttrAccess); + if (ret != Success) + goto out; + + ret = CheckGrabValues(client, ¶m); + if (ret != Success) + goto out; + + modifiers = (uint32_t *) &stuff[1] + stuff->mask_len; + modifiers_failed = + calloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo)); + if (!modifiers_failed) { + ret = BadAlloc; + goto out; + } + + mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); + + for (i = 0; i < stuff->num_modifiers; i++, modifiers++) { + uint8_t status = Success; + + param.modifiers = *modifiers; + ret = CheckGrabValues(client, ¶m); + if (ret != Success) + goto out; + + switch (stuff->grab_type) { + case XIGrabtypeButton: + status = GrabButton(client, dev, mod_dev, stuff->detail, + ¶m, XI2, &mask); + break; + case XIGrabtypeKeycode: + status = GrabKey(client, dev, mod_dev, stuff->detail, + ¶m, XI2, &mask); + break; + case XIGrabtypeEnter: + case XIGrabtypeFocusIn: + status = GrabWindow(client, dev, stuff->grab_type, ¶m, &mask); + break; + case XIGrabtypeTouchBegin: + status = GrabTouch(client, dev, mod_dev, ¶m, &mask); + break; + } + + if (status != GrabSuccess) { + xXIGrabModifierInfo *info = modifiers_failed + rep.num_modifiers; + + info->status = status; + info->modifiers = *modifiers; + if (client->swapped) + swapl(&info->modifiers); + + rep.num_modifiers++; + rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo)); + } + } + + WriteReplyToClient(client, sizeof(rep), &rep); + if (rep.num_modifiers) + WriteToClient(client, rep.length * 4, modifiers_failed); + + free(modifiers_failed); + out: + xi2mask_free(&mask.xi2mask); + return ret; +} + +void +SRepXIPassiveGrabDevice(ClientPtr client, int size, + xXIPassiveGrabDeviceReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_modifiers); + + WriteToClient(client, size, rep); +} + +int +SProcXIPassiveUngrabDevice(ClientPtr client) +{ + int i; + uint32_t *modifiers; + + REQUEST(xXIPassiveUngrabDeviceReq); + + swaps(&stuff->length); + swapl(&stuff->grab_window); + swaps(&stuff->deviceid); + swapl(&stuff->detail); + swaps(&stuff->num_modifiers); + + modifiers = (uint32_t *) &stuff[1]; + + for (i = 0; i < stuff->num_modifiers; i++, modifiers++) + swapl(modifiers); + + return ProcXIPassiveUngrabDevice(client); +} + +int +ProcXIPassiveUngrabDevice(ClientPtr client) +{ + DeviceIntPtr dev, mod_dev; + WindowPtr win; + GrabPtr tempGrab; + uint32_t *modifiers; + int i, rc; + + REQUEST(xXIPassiveUngrabDeviceReq); + REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq); + + if (stuff->deviceid == XIAllDevices) + dev = inputInfo.all_devices; + else if (stuff->deviceid == XIAllMasterDevices) + dev = inputInfo.all_master_devices; + else { + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (rc != Success) + return rc; + } + + if (stuff->grab_type != XIGrabtypeButton && + stuff->grab_type != XIGrabtypeKeycode && + stuff->grab_type != XIGrabtypeEnter && + stuff->grab_type != XIGrabtypeFocusIn && + stuff->grab_type != XIGrabtypeTouchBegin) { + client->errorValue = stuff->grab_type; + return BadValue; + } + + if ((stuff->grab_type == XIGrabtypeEnter || + stuff->grab_type == XIGrabtypeFocusIn || + stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0) { + client->errorValue = stuff->detail; + return BadValue; + } + + rc = dixLookupWindow(&win, stuff->grab_window, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); + + tempGrab = AllocGrab(NULL); + if (!tempGrab) + return BadAlloc; + + tempGrab->resource = client->clientAsMask; + tempGrab->device = dev; + tempGrab->window = win; + switch (stuff->grab_type) { + case XIGrabtypeButton: + tempGrab->type = XI_ButtonPress; + break; + case XIGrabtypeKeycode: + tempGrab->type = XI_KeyPress; + break; + case XIGrabtypeEnter: + tempGrab->type = XI_Enter; + break; + case XIGrabtypeFocusIn: + tempGrab->type = XI_FocusIn; + break; + case XIGrabtypeTouchBegin: + tempGrab->type = XI_TouchBegin; + break; + } + tempGrab->grabtype = XI2; + tempGrab->modifierDevice = mod_dev; + tempGrab->modifiersDetail.pMask = NULL; + tempGrab->detail.exact = stuff->detail; + tempGrab->detail.pMask = NULL; + + modifiers = (uint32_t *) &stuff[1]; + + for (i = 0; i < stuff->num_modifiers; i++, modifiers++) { + tempGrab->modifiersDetail.exact = *modifiers; + DeletePassiveGrabFromList(tempGrab); + } + + FreeGrab(tempGrab); + + return Success; +} diff --git a/Xi/xipassivegrab.h b/Xi/xipassivegrab.h new file mode 100644 index 0000000..c790bb7 --- /dev/null +++ b/Xi/xipassivegrab.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef XIPASSIVEGRAB_H +#define XIPASSIVEGRAB_H 1 + +int SProcXIPassiveUngrabDevice(ClientPtr client); +int ProcXIPassiveUngrabDevice(ClientPtr client); +void SRepXIPassiveGrabDevice(ClientPtr client, int size, + xXIPassiveGrabDeviceReply * rep); +int ProcXIPassiveGrabDevice(ClientPtr client); +int SProcXIPassiveGrabDevice(ClientPtr client); + +#endif /* XIPASSIVEGRAB_H */ diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c new file mode 100644 index 0000000..796ba09 --- /dev/null +++ b/Xi/xiproperty.c @@ -0,0 +1,1325 @@ +/* + * Copyright © 2006 Keith Packard + * Copyright © 2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WAXIANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WAXIANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +/* This code is a modified version of randr/rrproperty.c */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "dix.h" +#include "inputstr.h" +#include <X11/extensions/XI.h> +#include <X11/Xatom.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XI2proto.h> +#include "exglobals.h" +#include "exevents.h" +#include "swaprep.h" + +#include "xiproperty.h" +#include "xserver-properties.h" + +/** + * Properties used or alloced from inside the server. + */ +static struct dev_properties { + Atom type; + const char *name; +} dev_properties[] = { + {0, XI_PROP_ENABLED}, + {0, XI_PROP_XTEST_DEVICE}, + {0, XATOM_FLOAT}, + {0, ACCEL_PROP_PROFILE_NUMBER}, + {0, ACCEL_PROP_CONSTANT_DECELERATION}, + {0, ACCEL_PROP_ADAPTIVE_DECELERATION}, + {0, ACCEL_PROP_VELOCITY_SCALING}, + {0, AXIS_LABEL_PROP}, + {0, AXIS_LABEL_PROP_REL_X}, + {0, AXIS_LABEL_PROP_REL_Y}, + {0, AXIS_LABEL_PROP_REL_Z}, + {0, AXIS_LABEL_PROP_REL_RX}, + {0, AXIS_LABEL_PROP_REL_RY}, + {0, AXIS_LABEL_PROP_REL_RZ}, + {0, AXIS_LABEL_PROP_REL_HWHEEL}, + {0, AXIS_LABEL_PROP_REL_DIAL}, + {0, AXIS_LABEL_PROP_REL_WHEEL}, + {0, AXIS_LABEL_PROP_REL_MISC}, + {0, AXIS_LABEL_PROP_REL_VSCROLL}, + {0, AXIS_LABEL_PROP_REL_HSCROLL}, + {0, AXIS_LABEL_PROP_ABS_X}, + {0, AXIS_LABEL_PROP_ABS_Y}, + {0, AXIS_LABEL_PROP_ABS_Z}, + {0, AXIS_LABEL_PROP_ABS_RX}, + {0, AXIS_LABEL_PROP_ABS_RY}, + {0, AXIS_LABEL_PROP_ABS_RZ}, + {0, AXIS_LABEL_PROP_ABS_THROTTLE}, + {0, AXIS_LABEL_PROP_ABS_RUDDER}, + {0, AXIS_LABEL_PROP_ABS_WHEEL}, + {0, AXIS_LABEL_PROP_ABS_GAS}, + {0, AXIS_LABEL_PROP_ABS_BRAKE}, + {0, AXIS_LABEL_PROP_ABS_HAT0X}, + {0, AXIS_LABEL_PROP_ABS_HAT0Y}, + {0, AXIS_LABEL_PROP_ABS_HAT1X}, + {0, AXIS_LABEL_PROP_ABS_HAT1Y}, + {0, AXIS_LABEL_PROP_ABS_HAT2X}, + {0, AXIS_LABEL_PROP_ABS_HAT2Y}, + {0, AXIS_LABEL_PROP_ABS_HAT3X}, + {0, AXIS_LABEL_PROP_ABS_HAT3Y}, + {0, AXIS_LABEL_PROP_ABS_PRESSURE}, + {0, AXIS_LABEL_PROP_ABS_DISTANCE}, + {0, AXIS_LABEL_PROP_ABS_TILT_X}, + {0, AXIS_LABEL_PROP_ABS_TILT_Y}, + {0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH}, + {0, AXIS_LABEL_PROP_ABS_VOLUME}, + {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR}, + {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR}, + {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR}, + {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR}, + {0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION}, + {0, AXIS_LABEL_PROP_ABS_MT_POSITION_X}, + {0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y}, + {0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE}, + {0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID}, + {0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID}, + {0, AXIS_LABEL_PROP_ABS_MT_PRESSURE}, + {0, AXIS_LABEL_PROP_ABS_MT_DISTANCE}, + {0, AXIS_LABEL_PROP_ABS_MT_TOOL_X}, + {0, AXIS_LABEL_PROP_ABS_MT_TOOL_Y}, + {0, AXIS_LABEL_PROP_ABS_MISC}, + {0, BTN_LABEL_PROP}, + {0, BTN_LABEL_PROP_BTN_UNKNOWN}, + {0, BTN_LABEL_PROP_BTN_WHEEL_UP}, + {0, BTN_LABEL_PROP_BTN_WHEEL_DOWN}, + {0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT}, + {0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT}, + {0, BTN_LABEL_PROP_BTN_0}, + {0, BTN_LABEL_PROP_BTN_1}, + {0, BTN_LABEL_PROP_BTN_2}, + {0, BTN_LABEL_PROP_BTN_3}, + {0, BTN_LABEL_PROP_BTN_4}, + {0, BTN_LABEL_PROP_BTN_5}, + {0, BTN_LABEL_PROP_BTN_6}, + {0, BTN_LABEL_PROP_BTN_7}, + {0, BTN_LABEL_PROP_BTN_8}, + {0, BTN_LABEL_PROP_BTN_9}, + {0, BTN_LABEL_PROP_BTN_LEFT}, + {0, BTN_LABEL_PROP_BTN_RIGHT}, + {0, BTN_LABEL_PROP_BTN_MIDDLE}, + {0, BTN_LABEL_PROP_BTN_SIDE}, + {0, BTN_LABEL_PROP_BTN_EXTRA}, + {0, BTN_LABEL_PROP_BTN_FORWARD}, + {0, BTN_LABEL_PROP_BTN_BACK}, + {0, BTN_LABEL_PROP_BTN_TASK}, + {0, BTN_LABEL_PROP_BTN_TRIGGER}, + {0, BTN_LABEL_PROP_BTN_THUMB}, + {0, BTN_LABEL_PROP_BTN_THUMB2}, + {0, BTN_LABEL_PROP_BTN_TOP}, + {0, BTN_LABEL_PROP_BTN_TOP2}, + {0, BTN_LABEL_PROP_BTN_PINKIE}, + {0, BTN_LABEL_PROP_BTN_BASE}, + {0, BTN_LABEL_PROP_BTN_BASE2}, + {0, BTN_LABEL_PROP_BTN_BASE3}, + {0, BTN_LABEL_PROP_BTN_BASE4}, + {0, BTN_LABEL_PROP_BTN_BASE5}, + {0, BTN_LABEL_PROP_BTN_BASE6}, + {0, BTN_LABEL_PROP_BTN_DEAD}, + {0, BTN_LABEL_PROP_BTN_A}, + {0, BTN_LABEL_PROP_BTN_B}, + {0, BTN_LABEL_PROP_BTN_C}, + {0, BTN_LABEL_PROP_BTN_X}, + {0, BTN_LABEL_PROP_BTN_Y}, + {0, BTN_LABEL_PROP_BTN_Z}, + {0, BTN_LABEL_PROP_BTN_TL}, + {0, BTN_LABEL_PROP_BTN_TR}, + {0, BTN_LABEL_PROP_BTN_TL2}, + {0, BTN_LABEL_PROP_BTN_TR2}, + {0, BTN_LABEL_PROP_BTN_SELECT}, + {0, BTN_LABEL_PROP_BTN_START}, + {0, BTN_LABEL_PROP_BTN_MODE}, + {0, BTN_LABEL_PROP_BTN_THUMBL}, + {0, BTN_LABEL_PROP_BTN_THUMBR}, + {0, BTN_LABEL_PROP_BTN_TOOL_PEN}, + {0, BTN_LABEL_PROP_BTN_TOOL_RUBBER}, + {0, BTN_LABEL_PROP_BTN_TOOL_BRUSH}, + {0, BTN_LABEL_PROP_BTN_TOOL_PENCIL}, + {0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH}, + {0, BTN_LABEL_PROP_BTN_TOOL_FINGER}, + {0, BTN_LABEL_PROP_BTN_TOOL_MOUSE}, + {0, BTN_LABEL_PROP_BTN_TOOL_LENS}, + {0, BTN_LABEL_PROP_BTN_TOUCH}, + {0, BTN_LABEL_PROP_BTN_STYLUS}, + {0, BTN_LABEL_PROP_BTN_STYLUS2}, + {0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP}, + {0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP}, + {0, BTN_LABEL_PROP_BTN_GEAR_DOWN}, + {0, BTN_LABEL_PROP_BTN_GEAR_UP}, + {0, XI_PROP_TRANSFORM} +}; + +static long XIPropHandlerID = 1; + +static void +send_property_event(DeviceIntPtr dev, Atom property, int what) +{ + int state = (what == XIPropertyDeleted) ? PropertyDelete : PropertyNewValue; + devicePropertyNotify event = { + .type = DevicePropertyNotify, + .deviceid = dev->id, + .state = state, + .atom = property, + .time = currentTime.milliseconds + }; + xXIPropertyEvent xi2 = { + .type = GenericEvent, + .extension = IReqCode, + .length = 0, + .evtype = XI_PropertyEvent, + .deviceid = dev->id, + .time = currentTime.milliseconds, + .property = property, + .what = what + }; + + SendEventToAllWindows(dev, DevicePropertyNotifyMask, (xEvent *) &event, 1); + + SendEventToAllWindows(dev, GetEventFilter(dev, (xEvent *) &xi2), + (xEvent *) &xi2, 1); +} + +static int +list_atoms(DeviceIntPtr dev, int *natoms, Atom **atoms_return) +{ + XIPropertyPtr prop; + Atom *atoms = NULL; + int nprops = 0; + + for (prop = dev->properties.properties; prop; prop = prop->next) + nprops++; + if (nprops) { + Atom *a; + + atoms = malloc(nprops * sizeof(Atom)); + if (!atoms) + return BadAlloc; + a = atoms; + for (prop = dev->properties.properties; prop; prop = prop->next, a++) + *a = prop->propertyName; + } + + *natoms = nprops; + *atoms_return = atoms; + return Success; +} + +static int +get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type, + BOOL delete, int offset, int length, + int *bytes_after, Atom *type_return, int *format, int *nitems, + int *length_return, char **data) +{ + unsigned long n, len, ind; + int rc; + XIPropertyPtr prop; + XIPropertyValuePtr prop_value; + + if (!ValidAtom(property)) { + client->errorValue = property; + return BadAtom; + } + if ((delete != xTrue) && (delete != xFalse)) { + client->errorValue = delete; + return BadValue; + } + + if ((type != AnyPropertyType) && !ValidAtom(type)) { + client->errorValue = type; + return BadAtom; + } + + for (prop = dev->properties.properties; prop; prop = prop->next) + if (prop->propertyName == property) + break; + + if (!prop) { + *bytes_after = 0; + *type_return = None; + *format = 0; + *nitems = 0; + *length_return = 0; + return Success; + } + + rc = XIGetDeviceProperty(dev, property, &prop_value); + if (rc != Success) { + client->errorValue = property; + return rc; + } + + /* If the request type and actual type don't match. Return the + property information, but not the data. */ + + if (((type != prop_value->type) && (type != AnyPropertyType))) { + *bytes_after = prop_value->size; + *format = prop_value->format; + *length_return = 0; + *nitems = 0; + *type_return = prop_value->type; + return Success; + } + + /* Return type, format, value to client */ + n = (prop_value->format / 8) * prop_value->size; /* size (bytes) of prop */ + ind = offset << 2; + + /* If offset is invalid such that it causes "len" to + be negative, it's a value error. */ + + if (n < ind) { + client->errorValue = offset; + return BadValue; + } + + len = min(n - ind, 4 * length); + + *bytes_after = n - (ind + len); + *format = prop_value->format; + *length_return = len; + if (prop_value->format) + *nitems = len / (prop_value->format / 8); + else + *nitems = 0; + *type_return = prop_value->type; + + *data = (char *) prop_value->data + ind; + + return Success; +} + +static int +check_change_property(ClientPtr client, Atom property, Atom type, int format, + int mode, int nitems) +{ + if ((mode != PropModeReplace) && (mode != PropModeAppend) && + (mode != PropModePrepend)) { + client->errorValue = mode; + return BadValue; + } + if ((format != 8) && (format != 16) && (format != 32)) { + client->errorValue = format; + return BadValue; + } + + if (!ValidAtom(property)) { + client->errorValue = property; + return BadAtom; + } + if (!ValidAtom(type)) { + client->errorValue = type; + return BadAtom; + } + + return Success; +} + +static int +change_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type, + int format, int mode, int len, void *data) +{ + int rc = Success; + + rc = XIChangeDeviceProperty(dev, property, type, format, mode, len, data, + TRUE); + if (rc != Success) + client->errorValue = property; + + return rc; +} + +/** + * Return the atom assigned to the specified string or 0 if the atom isn't known + * to the DIX. + * + * If name is NULL, None is returned. + */ +Atom +XIGetKnownProperty(const char *name) +{ + int i; + + if (!name) + return None; + + for (i = 0; i < (sizeof(dev_properties) / sizeof(struct dev_properties)); + i++) { + if (strcmp(name, dev_properties[i].name) == 0) { + if (dev_properties[i].type == None) { + dev_properties[i].type = + MakeAtom(dev_properties[i].name, + strlen(dev_properties[i].name), TRUE); + } + + return dev_properties[i].type; + } + } + + return 0; +} + +void +XIResetProperties(void) +{ + int i; + + for (i = 0; i < (sizeof(dev_properties) / sizeof(struct dev_properties)); + i++) + dev_properties[i].type = None; +} + +/** + * Convert the given property's value(s) into @nelem_return integer values and + * store them in @buf_return. If @nelem_return is larger than the number of + * values in the property, @nelem_return is set to the number of values in the + * property. + * + * If *@buf_return is NULL and @nelem_return is 0, memory is allocated + * automatically and must be freed by the caller. + * + * Possible return codes. + * Success ... No error. + * BadMatch ... Wrong atom type, atom is not XA_INTEGER + * BadAlloc ... NULL passed as buffer and allocation failed. + * BadLength ... @buff is NULL but @nelem_return is non-zero. + * + * @param val The property value + * @param nelem_return The maximum number of elements to return. + * @param buf_return Pointer to an array of at least @nelem_return values. + * @return Success or the error code if an error occured. + */ +_X_EXPORT int +XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return) +{ + int i; + int *buf; + + if (val->type != XA_INTEGER) + return BadMatch; + if (!*buf_return && *nelem_return) + return BadLength; + + switch (val->format) { + case 8: + case 16: + case 32: + break; + default: + return BadValue; + } + + buf = *buf_return; + + if (!buf && !(*nelem_return)) { + buf = calloc(val->size, sizeof(int)); + if (!buf) + return BadAlloc; + *buf_return = buf; + *nelem_return = val->size; + } + else if (val->size < *nelem_return) + *nelem_return = val->size; + + for (i = 0; i < val->size && i < *nelem_return; i++) { + switch (val->format) { + case 8: + buf[i] = ((CARD8 *) val->data)[i]; + break; + case 16: + buf[i] = ((CARD16 *) val->data)[i]; + break; + case 32: + buf[i] = ((CARD32 *) val->data)[i]; + break; + } + } + + return Success; +} + +/** + * Convert the given property's value(s) into @nelem_return float values and + * store them in @buf_return. If @nelem_return is larger than the number of + * values in the property, @nelem_return is set to the number of values in the + * property. + * + * If *@buf_return is NULL and @nelem_return is 0, memory is allocated + * automatically and must be freed by the caller. + * + * Possible errors returned: + * Success + * BadMatch ... Wrong atom type, atom is not XA_FLOAT + * BadValue ... Wrong format, format is not 32 + * BadAlloc ... NULL passed as buffer and allocation failed. + * BadLength ... @buff is NULL but @nelem_return is non-zero. + * + * @param val The property value + * @param nelem_return The maximum number of elements to return. + * @param buf_return Pointer to an array of at least @nelem_return values. + * @return Success or the error code if an error occured. + */ +_X_EXPORT int +XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return) +{ + int i; + float *buf; + + if (!val->type || val->type != XIGetKnownProperty(XATOM_FLOAT)) + return BadMatch; + + if (val->format != 32) + return BadValue; + if (!*buf_return && *nelem_return) + return BadLength; + + buf = *buf_return; + + if (!buf && !(*nelem_return)) { + buf = calloc(val->size, sizeof(float)); + if (!buf) + return BadAlloc; + *buf_return = buf; + *nelem_return = val->size; + } + else if (val->size < *nelem_return) + *nelem_return = val->size; + + for (i = 0; i < val->size && i < *nelem_return; i++) + buf[i] = ((float *) val->data)[i]; + + return Success; +} + +/* Registers a new property handler on the given device and returns a unique + * identifier for this handler. This identifier is required to unregister the + * property handler again. + * @return The handler's identifier or 0 if an error occured. + */ +long +XIRegisterPropertyHandler(DeviceIntPtr dev, + int (*SetProperty) (DeviceIntPtr dev, + Atom property, + XIPropertyValuePtr prop, + BOOL checkonly), + int (*GetProperty) (DeviceIntPtr dev, + Atom property), + int (*DeleteProperty) (DeviceIntPtr dev, + Atom property)) +{ + XIPropertyHandlerPtr new_handler; + + new_handler = calloc(1, sizeof(XIPropertyHandler)); + if (!new_handler) + return 0; + + new_handler->id = XIPropHandlerID++; + new_handler->SetProperty = SetProperty; + new_handler->GetProperty = GetProperty; + new_handler->DeleteProperty = DeleteProperty; + new_handler->next = dev->properties.handlers; + dev->properties.handlers = new_handler; + + return new_handler->id; +} + +void +XIUnregisterPropertyHandler(DeviceIntPtr dev, long id) +{ + XIPropertyHandlerPtr curr, prev = NULL; + + curr = dev->properties.handlers; + while (curr && curr->id != id) { + prev = curr; + curr = curr->next; + } + + if (!curr) + return; + + if (!prev) /* first one */ + dev->properties.handlers = curr->next; + else + prev->next = curr->next; + + free(curr); +} + +static XIPropertyPtr +XICreateDeviceProperty(Atom property) +{ + XIPropertyPtr prop; + + prop = (XIPropertyPtr) malloc(sizeof(XIPropertyRec)); + if (!prop) + return NULL; + + prop->next = NULL; + prop->propertyName = property; + prop->value.type = None; + prop->value.format = 0; + prop->value.size = 0; + prop->value.data = NULL; + prop->deletable = TRUE; + + return prop; +} + +static XIPropertyPtr +XIFetchDeviceProperty(DeviceIntPtr dev, Atom property) +{ + XIPropertyPtr prop; + + for (prop = dev->properties.properties; prop; prop = prop->next) + if (prop->propertyName == property) + return prop; + return NULL; +} + +static void +XIDestroyDeviceProperty(XIPropertyPtr prop) +{ + free(prop->value.data); + free(prop); +} + +/* This function destroys all of the device's property-related stuff, + * including removing all device handlers. + * DO NOT CALL FROM THE DRIVER. + */ +void +XIDeleteAllDeviceProperties(DeviceIntPtr device) +{ + XIPropertyPtr prop, next; + XIPropertyHandlerPtr curr_handler, next_handler; + + for (prop = device->properties.properties; prop; prop = next) { + next = prop->next; + send_property_event(device, prop->propertyName, XIPropertyDeleted); + XIDestroyDeviceProperty(prop); + } + + device->properties.properties = NULL; + + /* Now free all handlers */ + curr_handler = device->properties.handlers; + while (curr_handler) { + next_handler = curr_handler->next; + free(curr_handler); + curr_handler = next_handler; + } + + device->properties.handlers = NULL; +} + +int +XIDeleteDeviceProperty(DeviceIntPtr device, Atom property, Bool fromClient) +{ + XIPropertyPtr prop, *prev; + int rc = Success; + + for (prev = &device->properties.properties; (prop = *prev); + prev = &(prop->next)) + if (prop->propertyName == property) + break; + + if (!prop) + return Success; + + if (fromClient && !prop->deletable) + return BadAccess; + + /* Ask handlers if we may delete the property */ + if (device->properties.handlers) { + XIPropertyHandlerPtr handler = device->properties.handlers; + + while (handler) { + if (handler->DeleteProperty) + rc = handler->DeleteProperty(device, prop->propertyName); + if (rc != Success) + return rc; + handler = handler->next; + } + } + + if (prop) { + *prev = prop->next; + send_property_event(device, prop->propertyName, XIPropertyDeleted); + XIDestroyDeviceProperty(prop); + } + + return Success; +} + +int +XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, + int format, int mode, unsigned long len, + const void *value, Bool sendevent) +{ + XIPropertyPtr prop; + int size_in_bytes; + int total_size; + unsigned long total_len; + XIPropertyValuePtr prop_value; + XIPropertyValueRec new_value; + Bool add = FALSE; + int rc; + + size_in_bytes = format >> 3; + + /* first see if property already exists */ + prop = XIFetchDeviceProperty(dev, property); + if (!prop) { /* just add to list */ + prop = XICreateDeviceProperty(property); + if (!prop) + return BadAlloc; + add = TRUE; + mode = PropModeReplace; + } + prop_value = &prop->value; + + /* To append or prepend to a property the request format and type + must match those of the already defined property. The + existing format and type are irrelevant when using the mode + "PropModeReplace" since they will be written over. */ + + if ((format != prop_value->format) && (mode != PropModeReplace)) + return BadMatch; + if ((prop_value->type != type) && (mode != PropModeReplace)) + return BadMatch; + new_value = *prop_value; + if (mode == PropModeReplace) + total_len = len; + else + total_len = prop_value->size + len; + + if (mode == PropModeReplace || len > 0) { + pointer new_data = NULL, old_data = NULL; + + total_size = total_len * size_in_bytes; + new_value.data = (pointer) malloc(total_size); + if (!new_value.data && total_size) { + if (add) + XIDestroyDeviceProperty(prop); + return BadAlloc; + } + new_value.size = len; + new_value.type = type; + new_value.format = format; + + switch (mode) { + case PropModeReplace: + new_data = new_value.data; + old_data = NULL; + break; + case PropModeAppend: + new_data = (pointer) (((char *) new_value.data) + + (prop_value->size * size_in_bytes)); + old_data = new_value.data; + break; + case PropModePrepend: + new_data = new_value.data; + old_data = (pointer) (((char *) new_value.data) + + (prop_value->size * size_in_bytes)); + break; + } + if (new_data) + memcpy((char *) new_data, value, len * size_in_bytes); + if (old_data) + memcpy((char *) old_data, (char *) prop_value->data, + prop_value->size * size_in_bytes); + + if (dev->properties.handlers) { + XIPropertyHandlerPtr handler; + BOOL checkonly = TRUE; + + /* run through all handlers with checkonly TRUE, then again with + * checkonly FALSE. Handlers MUST return error codes on the + * checkonly run, errors on the second run are ignored */ + do { + handler = dev->properties.handlers; + while (handler) { + if (handler->SetProperty) { + rc = handler->SetProperty(dev, prop->propertyName, + &new_value, checkonly); + if (checkonly && rc != Success) { + free(new_value.data); + if (add) + XIDestroyDeviceProperty(prop); + return rc; + } + } + handler = handler->next; + } + checkonly = !checkonly; + } while (!checkonly); + } + free(prop_value->data); + *prop_value = new_value; + } + else if (len == 0) { + /* do nothing */ + } + + if (add) { + prop->next = dev->properties.properties; + dev->properties.properties = prop; + } + + if (sendevent) + send_property_event(dev, prop->propertyName, + (add) ? XIPropertyCreated : XIPropertyModified); + + return Success; +} + +int +XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value) +{ + XIPropertyPtr prop = XIFetchDeviceProperty(dev, property); + int rc; + + if (!prop) { + *value = NULL; + return BadAtom; + } + + /* If we can, try to update the property value first */ + if (dev->properties.handlers) { + XIPropertyHandlerPtr handler = dev->properties.handlers; + + while (handler) { + if (handler->GetProperty) { + rc = handler->GetProperty(dev, prop->propertyName); + if (rc != Success) { + *value = NULL; + return rc; + } + } + handler = handler->next; + } + } + + *value = &prop->value; + return Success; +} + +int +XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable) +{ + XIPropertyPtr prop = XIFetchDeviceProperty(dev, property); + + if (!prop) + return BadAtom; + + prop->deletable = deletable; + return Success; +} + +int +ProcXListDeviceProperties(ClientPtr client) +{ + Atom *atoms; + xListDevicePropertiesReply rep; + int natoms; + DeviceIntPtr dev; + int rc = Success; + + REQUEST(xListDevicePropertiesReq); + REQUEST_SIZE_MATCH(xListDevicePropertiesReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixListPropAccess); + if (rc != Success) + return rc; + + rc = list_atoms(dev, &natoms, &atoms); + if (rc != Success) + return rc; + + rep = (xListDevicePropertiesReply) { + .repType = X_Reply, + .RepType = X_ListDeviceProperties, + .sequenceNumber = client->sequence, + .length = natoms, + .nAtoms = natoms + }; + + WriteReplyToClient(client, sizeof(xListDevicePropertiesReply), &rep); + if (natoms) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); + free(atoms); + } + return rc; +} + +int +ProcXChangeDeviceProperty(ClientPtr client) +{ + REQUEST(xChangeDevicePropertyReq); + DeviceIntPtr dev; + unsigned long len; + int totalSize; + int rc; + + REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq); + UpdateCurrentTime(); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); + if (rc != Success) + return rc; + + rc = check_change_property(client, stuff->property, stuff->type, + stuff->format, stuff->mode, stuff->nUnits); + + len = stuff->nUnits; + if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq)))) + return BadLength; + + totalSize = len * (stuff->format / 8); + REQUEST_FIXED_SIZE(xChangeDevicePropertyReq, totalSize); + + rc = change_property(client, dev, stuff->property, stuff->type, + stuff->format, stuff->mode, len, (void *) &stuff[1]); + return rc; +} + +int +ProcXDeleteDeviceProperty(ClientPtr client) +{ + REQUEST(xDeleteDevicePropertyReq); + DeviceIntPtr dev; + int rc; + + REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); + UpdateCurrentTime(); + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); + if (rc != Success) + return rc; + + if (!ValidAtom(stuff->property)) { + client->errorValue = stuff->property; + return BadAtom; + } + + rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE); + return rc; +} + +int +ProcXGetDeviceProperty(ClientPtr client) +{ + REQUEST(xGetDevicePropertyReq); + DeviceIntPtr dev; + int length; + int rc, format, nitems, bytes_after; + char *data; + Atom type; + xGetDevicePropertyReply reply; + + REQUEST_SIZE_MATCH(xGetDevicePropertyReq); + if (stuff->delete) + UpdateCurrentTime(); + rc = dixLookupDevice(&dev, stuff->deviceid, client, + stuff->delete ? DixSetPropAccess : DixGetPropAccess); + if (rc != Success) + return rc; + + rc = get_property(client, dev, stuff->property, stuff->type, + stuff->delete, stuff->longOffset, stuff->longLength, + &bytes_after, &type, &format, &nitems, &length, &data); + + if (rc != Success) + return rc; + + reply = (xGetDevicePropertyReply) { + .repType = X_Reply, + .RepType = X_GetDeviceProperty, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(length), + .propertyType = type, + .bytesAfter = bytes_after, + .nItems = nitems, + .format = format, + .deviceid = dev->id + }; + + if (stuff->delete && (reply.bytesAfter == 0)) + send_property_event(dev, stuff->property, XIPropertyDeleted); + + WriteReplyToClient(client, sizeof(xGenericReply), &reply); + + if (length) { + switch (reply.format) { + case 32: + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; + break; + case 16: + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; + break; + default: + client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; + break; + } + WriteSwappedDataToClient(client, length, data); + } + + /* delete the Property */ + if (stuff->delete && (reply.bytesAfter == 0)) { + XIPropertyPtr prop, *prev; + + for (prev = &dev->properties.properties; (prop = *prev); + prev = &prop->next) { + if (prop->propertyName == stuff->property) { + *prev = prop->next; + XIDestroyDeviceProperty(prop); + break; + } + } + } + return Success; +} + +int +SProcXListDeviceProperties(ClientPtr client) +{ + REQUEST(xListDevicePropertiesReq); + + swaps(&stuff->length); + + REQUEST_SIZE_MATCH(xListDevicePropertiesReq); + return (ProcXListDeviceProperties(client)); +} + +int +SProcXChangeDeviceProperty(ClientPtr client) +{ + REQUEST(xChangeDevicePropertyReq); + + REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq); + swaps(&stuff->length); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->nUnits); + return (ProcXChangeDeviceProperty(client)); +} + +int +SProcXDeleteDeviceProperty(ClientPtr client) +{ + REQUEST(xDeleteDevicePropertyReq); + + swaps(&stuff->length); + swapl(&stuff->property); + REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); + return (ProcXDeleteDeviceProperty(client)); +} + +int +SProcXGetDeviceProperty(ClientPtr client) +{ + REQUEST(xGetDevicePropertyReq); + + swaps(&stuff->length); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->longOffset); + swapl(&stuff->longLength); + REQUEST_SIZE_MATCH(xGetDevicePropertyReq); + return (ProcXGetDeviceProperty(client)); +} + +/* Reply swapping */ + +void +SRepXListDeviceProperties(ClientPtr client, int size, + xListDevicePropertiesReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->nAtoms); + /* properties will be swapped later, see ProcXListDeviceProperties */ + WriteToClient(client, size, rep); +} + +void +SRepXGetDeviceProperty(ClientPtr client, int size, + xGetDevicePropertyReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->propertyType); + swapl(&rep->bytesAfter); + swapl(&rep->nItems); + /* data will be swapped, see ProcXGetDeviceProperty */ + WriteToClient(client, size, rep); +} + +/* XI2 Request/reply handling */ +int +ProcXIListProperties(ClientPtr client) +{ + Atom *atoms; + xXIListPropertiesReply rep; + int natoms; + DeviceIntPtr dev; + int rc = Success; + + REQUEST(xXIListPropertiesReq); + REQUEST_SIZE_MATCH(xXIListPropertiesReq); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixListPropAccess); + if (rc != Success) + return rc; + + rc = list_atoms(dev, &natoms, &atoms); + if (rc != Success) + return rc; + + rep = (xXIListPropertiesReply) { + .repType = X_Reply, + .RepType = X_XIListProperties, + .sequenceNumber = client->sequence, + .length = natoms, + .num_properties = natoms + }; + + WriteReplyToClient(client, sizeof(xXIListPropertiesReply), &rep); + if (natoms) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); + free(atoms); + } + return rc; +} + +int +ProcXIChangeProperty(ClientPtr client) +{ + int rc; + DeviceIntPtr dev; + int totalSize; + unsigned long len; + + REQUEST(xXIChangePropertyReq); + REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); + UpdateCurrentTime(); + + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); + if (rc != Success) + return rc; + + rc = check_change_property(client, stuff->property, stuff->type, + stuff->format, stuff->mode, stuff->num_items); + len = stuff->num_items; + if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq))) + return BadLength; + + totalSize = len * (stuff->format / 8); + REQUEST_FIXED_SIZE(xXIChangePropertyReq, totalSize); + + rc = change_property(client, dev, stuff->property, stuff->type, + stuff->format, stuff->mode, len, (void *) &stuff[1]); + return rc; +} + +int +ProcXIDeleteProperty(ClientPtr client) +{ + DeviceIntPtr dev; + int rc; + + REQUEST(xXIDeletePropertyReq); + + REQUEST_SIZE_MATCH(xXIDeletePropertyReq); + UpdateCurrentTime(); + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); + if (rc != Success) + return rc; + + if (!ValidAtom(stuff->property)) { + client->errorValue = stuff->property; + return BadAtom; + } + + rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE); + return rc; +} + +int +ProcXIGetProperty(ClientPtr client) +{ + REQUEST(xXIGetPropertyReq); + DeviceIntPtr dev; + xXIGetPropertyReply reply; + int length; + int rc, format, nitems, bytes_after; + char *data; + Atom type; + + REQUEST_SIZE_MATCH(xXIGetPropertyReq); + if (stuff->delete) + UpdateCurrentTime(); + rc = dixLookupDevice(&dev, stuff->deviceid, client, + stuff->delete ? DixSetPropAccess : DixGetPropAccess); + if (rc != Success) + return rc; + + rc = get_property(client, dev, stuff->property, stuff->type, + stuff->delete, stuff->offset, stuff->len, + &bytes_after, &type, &format, &nitems, &length, &data); + + if (rc != Success) + return rc; + + reply = (xXIGetPropertyReply) { + .repType = X_Reply, + .RepType = X_XIGetProperty, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(length), + .type = type, + .bytes_after = bytes_after, + .num_items = nitems, + .format = format + }; + + if (length && stuff->delete && (reply.bytes_after == 0)) + send_property_event(dev, stuff->property, XIPropertyDeleted); + + WriteReplyToClient(client, sizeof(xXIGetPropertyReply), &reply); + + if (length) { + switch (reply.format) { + case 32: + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; + break; + case 16: + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; + break; + default: + client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; + break; + } + WriteSwappedDataToClient(client, length, data); + } + + /* delete the Property */ + if (stuff->delete && (reply.bytes_after == 0)) { + XIPropertyPtr prop, *prev; + + for (prev = &dev->properties.properties; (prop = *prev); + prev = &prop->next) { + if (prop->propertyName == stuff->property) { + *prev = prop->next; + XIDestroyDeviceProperty(prop); + break; + } + } + } + + return Success; +} + +int +SProcXIListProperties(ClientPtr client) +{ + REQUEST(xXIListPropertiesReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + + REQUEST_SIZE_MATCH(xXIListPropertiesReq); + return (ProcXIListProperties(client)); +} + +int +SProcXIChangeProperty(ClientPtr client) +{ + REQUEST(xXIChangePropertyReq); + + REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->num_items); + return (ProcXIChangeProperty(client)); +} + +int +SProcXIDeleteProperty(ClientPtr client) +{ + REQUEST(xXIDeletePropertyReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->property); + REQUEST_SIZE_MATCH(xXIDeletePropertyReq); + return (ProcXIDeleteProperty(client)); +} + +int +SProcXIGetProperty(ClientPtr client) +{ + REQUEST(xXIGetPropertyReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->offset); + swapl(&stuff->len); + REQUEST_SIZE_MATCH(xXIGetPropertyReq); + return (ProcXIGetProperty(client)); +} + +void +SRepXIListProperties(ClientPtr client, int size, xXIListPropertiesReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_properties); + /* properties will be swapped later, see ProcXIListProperties */ + WriteToClient(client, size, rep); +} + +void +SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->type); + swapl(&rep->bytes_after); + swapl(&rep->num_items); + /* data will be swapped, see ProcXIGetProperty */ + WriteToClient(client, size, rep); +} diff --git a/Xi/xiproperty.h b/Xi/xiproperty.h new file mode 100644 index 0000000..482c834 --- /dev/null +++ b/Xi/xiproperty.h @@ -0,0 +1,67 @@ +/* + * Copyright © 2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef XIPROPERTY_H +#define XIPROPERTY_H 1 + +int ProcXListDeviceProperties(ClientPtr client); +int ProcXChangeDeviceProperty(ClientPtr client); +int ProcXDeleteDeviceProperty(ClientPtr client); +int ProcXGetDeviceProperty(ClientPtr client); + +/* request swapping */ +int SProcXListDeviceProperties(ClientPtr client); +int SProcXChangeDeviceProperty(ClientPtr client); +int SProcXDeleteDeviceProperty(ClientPtr client); +int SProcXGetDeviceProperty(ClientPtr client); + +/* reply swapping */ +void SRepXListDeviceProperties(ClientPtr client, int size, + xListDevicePropertiesReply * rep); +void SRepXGetDeviceProperty(ClientPtr client, int size, + xGetDevicePropertyReply * rep); + +/* XI2 request/reply handling */ +int ProcXIListProperties(ClientPtr client); +int ProcXIChangeProperty(ClientPtr client); +int ProcXIDeleteProperty(ClientPtr client); +int ProcXIGetProperty(ClientPtr client); + +int SProcXIListProperties(ClientPtr client); +int SProcXIChangeProperty(ClientPtr client); +int SProcXIDeleteProperty(ClientPtr client); +int SProcXIGetProperty(ClientPtr client); + +void SRepXIListProperties(ClientPtr client, int size, + xXIListPropertiesReply * rep); +void SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep); + +void XIResetProperties(void); + +#endif /* XIPROPERTY_H */ diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c new file mode 100644 index 0000000..4e544f0 --- /dev/null +++ b/Xi/xiquerydevice.c @@ -0,0 +1,595 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer + * + */ + +/** + * @file Protocol handling for the XIQueryDevice request/reply. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" +#include <X11/X.h> +#include <X11/Xatom.h> +#include <X11/extensions/XI2proto.h> +#include "xkbstr.h" +#include "xkbsrv.h" +#include "xserver-properties.h" +#include "exevents.h" +#include "xace.h" +#include "inpututils.h" + +#include "xiquerydevice.h" + +static Bool ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr d); +static int + ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo * info); +static int SizeDeviceInfo(DeviceIntPtr dev); +static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo * info); +int +SProcXIQueryDevice(ClientPtr client) +{ + REQUEST(xXIQueryDeviceReq); + + swaps(&stuff->length); + swaps(&stuff->deviceid); + + return ProcXIQueryDevice(client); +} + +int +ProcXIQueryDevice(ClientPtr client) +{ + xXIQueryDeviceReply rep; + DeviceIntPtr dev = NULL; + int rc = Success; + int i = 0, len = 0; + char *info, *ptr; + Bool *skip = NULL; + + REQUEST(xXIQueryDeviceReq); + REQUEST_SIZE_MATCH(xXIQueryDeviceReq); + + if (stuff->deviceid != XIAllDevices && + stuff->deviceid != XIAllMasterDevices) { + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) { + client->errorValue = stuff->deviceid; + return rc; + } + len += SizeDeviceInfo(dev); + } + else { + skip = calloc(sizeof(Bool), inputInfo.numDevices); + if (!skip) + return BadAlloc; + + for (dev = inputInfo.devices; dev; dev = dev->next, i++) { + skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev); + if (!skip[i]) + len += SizeDeviceInfo(dev); + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next, i++) { + skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev); + if (!skip[i]) + len += SizeDeviceInfo(dev); + } + } + + info = calloc(1, len); + if (!info) { + free(skip); + return BadAlloc; + } + + rep = (xXIQueryDeviceReply) { + .repType = X_Reply, + .RepType = X_XIQueryDevice, + .sequenceNumber = client->sequence, + .length = len / 4, + .num_devices = 0 + }; + + ptr = info; + if (dev) { + len = ListDeviceInfo(client, dev, (xXIDeviceInfo *) info); + if (client->swapped) + SwapDeviceInfo(dev, (xXIDeviceInfo *) info); + info += len; + rep.num_devices = 1; + } + else { + i = 0; + for (dev = inputInfo.devices; dev; dev = dev->next, i++) { + if (!skip[i]) { + len = ListDeviceInfo(client, dev, (xXIDeviceInfo *) info); + if (client->swapped) + SwapDeviceInfo(dev, (xXIDeviceInfo *) info); + info += len; + rep.num_devices++; + } + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next, i++) { + if (!skip[i]) { + len = ListDeviceInfo(client, dev, (xXIDeviceInfo *) info); + if (client->swapped) + SwapDeviceInfo(dev, (xXIDeviceInfo *) info); + info += len; + rep.num_devices++; + } + } + } + + len = rep.length * 4; + WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep); + WriteToClient(client, len, ptr); + free(ptr); + free(skip); + return rc; +} + +void +SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_devices); + + /* Device info is already swapped, see ProcXIQueryDevice */ + + WriteToClient(client, size, rep); +} + +/** + * @return Whether the device should be included in the returned list. + */ +static Bool +ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr dev) +{ + /* if all devices are not being queried, only master devices are */ + if (deviceid == XIAllDevices || IsMaster(dev)) { + int rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess); + + if (rc == Success) + return FALSE; + } + return TRUE; +} + +/** + * @return The number of bytes needed to store this device's xXIDeviceInfo + * (and its classes). + */ +static int +SizeDeviceInfo(DeviceIntPtr dev) +{ + int len = sizeof(xXIDeviceInfo); + + /* 4-padded name */ + len += pad_to_int32(strlen(dev->name)); + + return len + SizeDeviceClasses(dev); + +} + +/* + * @return The number of bytes needed to store this device's classes. + */ +int +SizeDeviceClasses(DeviceIntPtr dev) +{ + int len = 0; + + if (dev->button) { + len += sizeof(xXIButtonInfo); + len += dev->button->numButtons * sizeof(Atom); + len += pad_to_int32(bits_to_bytes(dev->button->numButtons)); + } + + if (dev->key) { + XkbDescPtr xkb = dev->key->xkbInfo->desc; + + len += sizeof(xXIKeyInfo); + len += (xkb->max_key_code - xkb->min_key_code + 1) * sizeof(uint32_t); + } + + if (dev->valuator) { + int i; + + len += (sizeof(xXIValuatorInfo)) * dev->valuator->numAxes; + + for (i = 0; i < dev->valuator->numAxes; i++) { + if (dev->valuator->axes[i].scroll.type != SCROLL_TYPE_NONE) + len += sizeof(xXIScrollInfo); + } + } + + if (dev->touch) + len += sizeof(xXITouchInfo); + + return len; +} + +/** + * Write button information into info. + * @return Number of bytes written into info. + */ +int +ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState) +{ + unsigned char *bits; + 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; + info->num_buttons = dev->button->numButtons; + info->length = bytes_to_int32(sizeof(xXIButtonInfo)) + + info->num_buttons + mask_len; + info->sourceid = dev->button->sourceid; + + bits = (unsigned char *) &info[1]; + memset(bits, 0, mask_len * 4); + + if (reportState) + for (i = 0; i < dev->button->numButtons; i++) + if (BitIsOn(dev->button->down, i)) + SetBit(bits, i); + + bits += mask_len * 4; + memcpy(bits, dev->button->labels, dev->button->numButtons * sizeof(Atom)); + + return info->length * 4; +} + +static void +SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info) +{ + Atom *btn; + int i; + + swaps(&info->type); + swaps(&info->length); + swaps(&info->sourceid); + + for (i = 0, btn = (Atom *) &info[1]; i < info->num_buttons; i++, btn++) + swapl(btn); + + swaps(&info->num_buttons); +} + +/** + * Write key information into info. + * @return Number of bytes written into info. + */ +int +ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info) +{ + int i; + XkbDescPtr xkb = dev->key->xkbInfo->desc; + uint32_t *kc; + + info->type = KeyClass; + info->num_keycodes = xkb->max_key_code - xkb->min_key_code + 1; + info->length = sizeof(xXIKeyInfo) / 4 + info->num_keycodes; + info->sourceid = dev->key->sourceid; + + kc = (uint32_t *) &info[1]; + for (i = xkb->min_key_code; i <= xkb->max_key_code; i++, kc++) + *kc = i; + + return info->length * 4; +} + +static void +SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info) +{ + uint32_t *key; + int i; + + swaps(&info->type); + swaps(&info->length); + swaps(&info->sourceid); + + for (i = 0, key = (uint32_t *) &info[1]; i < info->num_keycodes; + i++, key++) + swapl(key); + + swaps(&info->num_keycodes); +} + +/** + * List axis information for the given axis. + * + * @return The number of bytes written into info. + */ +int +ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info, int axisnumber, + Bool reportState) +{ + ValuatorClassPtr v = dev->valuator; + + info->type = ValuatorClass; + info->length = sizeof(xXIValuatorInfo) / 4; + info->label = v->axes[axisnumber].label; + info->min.integral = v->axes[axisnumber].min_value; + info->min.frac = 0; + info->max.integral = v->axes[axisnumber].max_value; + info->max.frac = 0; + info->value = double_to_fp3232(v->axisVal[axisnumber]); + info->resolution = v->axes[axisnumber].resolution; + info->number = axisnumber; + info->mode = valuator_get_mode(dev, axisnumber); + info->sourceid = v->sourceid; + + if (!reportState) + info->value = info->min; + + return info->length * 4; +} + +static void +SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info) +{ + swaps(&info->type); + swaps(&info->length); + swapl(&info->label); + swapl(&info->min.integral); + swapl(&info->min.frac); + swapl(&info->max.integral); + swapl(&info->max.frac); + swaps(&info->number); + swaps(&info->sourceid); +} + +int +ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info, int axisnumber) +{ + ValuatorClassPtr v = dev->valuator; + AxisInfoPtr axis = &v->axes[axisnumber]; + + if (axis->scroll.type == SCROLL_TYPE_NONE) + return 0; + + info->type = XIScrollClass; + info->length = sizeof(xXIScrollInfo) / 4; + info->number = axisnumber; + switch (axis->scroll.type) { + case SCROLL_TYPE_VERTICAL: + info->scroll_type = XIScrollTypeVertical; + break; + case SCROLL_TYPE_HORIZONTAL: + info->scroll_type = XIScrollTypeHorizontal; + break; + default: + ErrorF("[Xi] Unknown scroll type %d. This is a bug.\n", + axis->scroll.type); + break; + } + info->increment = double_to_fp3232(axis->scroll.increment); + info->sourceid = v->sourceid; + + info->flags = 0; + + if (axis->scroll.flags & SCROLL_FLAG_DONT_EMULATE) + info->flags |= XIScrollFlagNoEmulation; + if (axis->scroll.flags & SCROLL_FLAG_PREFERRED) + info->flags |= XIScrollFlagPreferred; + + return info->length * 4; +} + +static void +SwapScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info) +{ + swaps(&info->type); + swaps(&info->length); + swaps(&info->number); + swaps(&info->sourceid); + swaps(&info->scroll_type); + swapl(&info->increment.integral); + swapl(&info->increment.frac); +} + +/** + * List multitouch information + * + * @return The number of bytes written into info. + */ +int +ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch) +{ + touch->type = XITouchClass; + touch->length = sizeof(xXITouchInfo) >> 2; + touch->sourceid = dev->touch->sourceid; + touch->mode = dev->touch->mode; + touch->num_touches = dev->touch->num_touches; + + return touch->length << 2; +} + +static void +SwapTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch) +{ + swaps(&touch->type); + swaps(&touch->length); + swaps(&touch->sourceid); +} + +int +GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment) +{ + DeviceIntPtr master = GetMaster(dev, MASTER_ATTACHED); + int use; + + if (IsMaster(dev)) { + DeviceIntPtr paired = GetPairedDevice(dev); + + use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard; + *attachment = (paired ? paired->id : 0); + } + else if (!IsFloating(dev)) { + use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard; + *attachment = master->id; + } + else + use = XIFloatingSlave; + + return use; +} + +/** + * Write the info for device dev into the buffer pointed to by info. + * + * @return The number of bytes used. + */ +static int +ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo * info) +{ + char *any = (char *) &info[1]; + int len = 0, total_len = 0; + + info->deviceid = dev->id; + info->use = GetDeviceUse(dev, &info->attachment); + info->num_classes = 0; + info->name_len = strlen(dev->name); + info->enabled = dev->enabled; + total_len = sizeof(xXIDeviceInfo); + + len = pad_to_int32(info->name_len); + memset(any, 0, len); + strncpy(any, dev->name, info->name_len); + any += len; + total_len += len; + + total_len += ListDeviceClasses(client, dev, any, &info->num_classes); + return total_len; +} + +/** + * Write the class info of the device into the memory pointed to by any, set + * nclasses to the number of classes in total and return the number of bytes + * written. + */ +int +ListDeviceClasses(ClientPtr client, DeviceIntPtr dev, + char *any, uint16_t * nclasses) +{ + int total_len = 0; + int len; + int i; + int rc; + + /* Check if the current device state should be suppressed */ + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess); + + if (dev->button) { + (*nclasses)++; + len = ListButtonInfo(dev, (xXIButtonInfo *) any, rc == Success); + any += len; + total_len += len; + } + + if (dev->key) { + (*nclasses)++; + len = ListKeyInfo(dev, (xXIKeyInfo *) any); + any += len; + total_len += len; + } + + for (i = 0; dev->valuator && i < dev->valuator->numAxes; i++) { + (*nclasses)++; + len = ListValuatorInfo(dev, (xXIValuatorInfo *) any, i, rc == Success); + any += len; + total_len += len; + } + + for (i = 0; dev->valuator && i < dev->valuator->numAxes; i++) { + len = ListScrollInfo(dev, (xXIScrollInfo *) any, i); + if (len) + (*nclasses)++; + any += len; + total_len += len; + } + + if (dev->touch) { + (*nclasses)++; + len = ListTouchInfo(dev, (xXITouchInfo *) any); + any += len; + total_len += len; + } + + return total_len; +} + +static void +SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo * info) +{ + char *any = (char *) &info[1]; + int i; + + /* Skip over name */ + any += pad_to_int32(info->name_len); + + for (i = 0; i < info->num_classes; i++) { + int len = ((xXIAnyInfo *) any)->length; + + switch (((xXIAnyInfo *) any)->type) { + case XIButtonClass: + SwapButtonInfo(dev, (xXIButtonInfo *) any); + break; + case XIKeyClass: + SwapKeyInfo(dev, (xXIKeyInfo *) any); + break; + case XIValuatorClass: + SwapValuatorInfo(dev, (xXIValuatorInfo *) any); + break; + case XIScrollClass: + SwapScrollInfo(dev, (xXIScrollInfo *) any); + break; + case XITouchClass: + SwapTouchInfo(dev, (xXITouchInfo *) any); + break; + + } + + any += len * 4; + } + + swaps(&info->deviceid); + swaps(&info->use); + swaps(&info->attachment); + swaps(&info->num_classes); + swaps(&info->name_len); + +} diff --git a/Xi/xiquerydevice.h b/Xi/xiquerydevice.h new file mode 100644 index 0000000..8a180bf --- /dev/null +++ b/Xi/xiquerydevice.h @@ -0,0 +1,49 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef QUERYDEV_H +#define QUERYDEV_H 1 + +#include <X11/extensions/XI2proto.h> + +int SProcXIQueryDevice(ClientPtr client); +int ProcXIQueryDevice(ClientPtr client); +void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply * rep); +int SizeDeviceClasses(DeviceIntPtr dev); +int ListDeviceClasses(ClientPtr client, DeviceIntPtr dev, + char *any, uint16_t * nclasses); +int GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment); +int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState); +int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info); +int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info, + int axisnumber, Bool reportState); +int ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info, int axisnumber); +int ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * info); +#endif /* QUERYDEV_H */ diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c new file mode 100644 index 0000000..e9bdd42 --- /dev/null +++ b/Xi/xiquerypointer.c @@ -0,0 +1,225 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to query the pointer location of an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2proto.h> +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "eventconvert.h" +#include "scrnintstr.h" +#include "xkbsrv.h" + +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#endif + +#include "inpututils.h" +#include "xiquerypointer.h" + +/*********************************************************************** + * + * This procedure allows a client to query the pointer of a device. + * + */ + +int +SProcXIQueryPointer(ClientPtr client) +{ + REQUEST(xXIQueryPointerReq); + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->win); + return (ProcXIQueryPointer(client)); +} + +int +ProcXIQueryPointer(ClientPtr client) +{ + int rc; + xXIQueryPointerReply rep; + DeviceIntPtr pDev, kbd; + WindowPtr pWin, t; + SpritePtr pSprite; + XkbStatePtr state; + char *buttons = NULL; + int buttons_size = 0; /* size of buttons array */ + XIClientPtr xi_client; + Bool have_xi22 = FALSE; + + REQUEST(xXIQueryPointerReq); + REQUEST_SIZE_MATCH(xXIQueryPointerReq); + + /* Check if client is compliant with XInput 2.2 or later. Earlier clients + * do not know about touches, so we must report emulated button presses. 2.2 + * and later clients are aware of touches, so we don't include emulated + * button presses in the reply. */ + xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + if (version_compare(xi_client->major_version, + xi_client->minor_version, 2, 2) >= 0) + have_xi22 = TRUE; + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess); + if (rc != Success) { + client->errorValue = stuff->deviceid; + return rc; + } + + if (pDev->valuator == NULL || IsKeyboardDevice(pDev) || (!IsMaster(pDev) && !IsFloating(pDev))) { /* no attached devices */ + client->errorValue = stuff->deviceid; + return BadDevice; + } + + rc = dixLookupWindow(&pWin, stuff->win, client, DixGetAttrAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_XIQueryPointer, stuff->win, rc); + return Success; + } + + if (pDev->valuator->motionHintWindow) + MaybeStopHint(pDev, client); + + if (IsMaster(pDev)) + kbd = GetMaster(pDev, MASTER_KEYBOARD); + else + kbd = (pDev->key) ? pDev : NULL; + + pSprite = pDev->spriteInfo->sprite; + + rep = (xXIQueryPointerReply) { + .repType = X_Reply, + .RepType = X_XIQueryPointer, + .sequenceNumber = client->sequence, + .length = 6, + .root = (GetCurrentRootWindow(pDev))->drawable.id, + .root_x = double_to_fp1616(pSprite->hot.x), + .root_y = double_to_fp1616(pSprite->hot.y), + .child = None + }; + + if (kbd) { + state = &kbd->key->xkbInfo->state; + rep.mods.base_mods = state->base_mods; + rep.mods.latched_mods = state->latched_mods; + rep.mods.locked_mods = state->locked_mods; + + rep.group.base_group = state->base_group; + rep.group.latched_group = state->latched_group; + rep.group.locked_group = state->locked_group; + } + + if (pDev->button) { + int i; + + rep.buttons_len = + bytes_to_int32(bits_to_bytes(pDev->button->numButtons)); + rep.length += rep.buttons_len; + buttons_size = rep.buttons_len * 4; + buttons = calloc(1, buttons_size); + if (!buttons) + return BadAlloc; + + for (i = 1; i < pDev->button->numButtons; i++) + if (BitIsOn(pDev->button->down, i)) + SetBit(buttons, pDev->button->map[i]); + + if (!have_xi22 && pDev->touch && pDev->touch->buttonsDown > 0) + SetBit(buttons, pDev->button->map[1]); + } + else + rep.buttons_len = 0; + + if (pSprite->hot.pScreen == pWin->drawable.pScreen) { + rep.same_screen = xTrue; + rep.win_x = double_to_fp1616(pSprite->hot.x - pWin->drawable.x); + rep.win_y = double_to_fp1616(pSprite->hot.y - pWin->drawable.y); + for (t = pSprite->win; t; t = t->parent) + if (t->parent == pWin) { + rep.child = t->drawable.id; + break; + } + } + else { + rep.same_screen = xFalse; + rep.win_x = 0; + rep.win_y = 0; + } + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + rep.root_x += double_to_fp1616(screenInfo.screens[0]->x); + rep.root_y += double_to_fp1616(screenInfo.screens[0]->y); + if (stuff->win == rep.root) { + rep.win_x += double_to_fp1616(screenInfo.screens[0]->x); + rep.win_y += double_to_fp1616(screenInfo.screens[0]->y); + } + } +#endif + + WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep); + if (buttons) + WriteToClient(client, buttons_size, buttons); + + free(buttons); + + return Success; +} + +/*********************************************************************** + * + * This procedure writes the reply for the XIQueryPointer function, + * if the client and server have a different byte ordering. + * + */ + +void +SRepXIQueryPointer(ClientPtr client, int size, xXIQueryPointerReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->root); + swapl(&rep->child); + swapl(&rep->root_x); + swapl(&rep->root_y); + swapl(&rep->win_x); + swapl(&rep->win_y); + swaps(&rep->buttons_len); + + WriteToClient(client, size, rep); +} diff --git a/Xi/xiquerypointer.h b/Xi/xiquerypointer.h new file mode 100644 index 0000000..a6bc4ce --- /dev/null +++ b/Xi/xiquerypointer.h @@ -0,0 +1,39 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef QUERYDP_H +#define QUERYDP_H 1 + +int SProcXIQueryPointer(ClientPtr /* client */ ); +int ProcXIQueryPointer(ClientPtr /* client */ ); +void SRepXIQueryPointer(ClientPtr /* client */ , + int /* size */ , + xXIQueryPointerReply * /* rep */ ); + +#endif /* QUERYDP_H */ diff --git a/Xi/xiqueryversion.c b/Xi/xiqueryversion.c new file mode 100644 index 0000000..c705f78 --- /dev/null +++ b/Xi/xiqueryversion.c @@ -0,0 +1,152 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer + * + */ + +/** + * @file xiqueryversion.c + * Protocol handling for the XIQueryVersion request/reply. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" + +#include <X11/Xmd.h> +#include <X11/X.h> +#include <X11/extensions/XI2proto.h> + +#include "exglobals.h" +#include "exevents.h" +#include "xiqueryversion.h" +#include "misc.h" + +extern XExtensionVersion XIVersion; /* defined in getvers.c */ + +/** + * Return the supported XI version. + * + * Saves the version the client claims to support as well, for future + * reference. + */ +int +ProcXIQueryVersion(ClientPtr client) +{ + xXIQueryVersionReply rep; + XIClientPtr pXIClient; + int major, minor; + + REQUEST(xXIQueryVersionReq); + REQUEST_SIZE_MATCH(xXIQueryVersionReq); + + /* This request only exists after XI2 */ + if (stuff->major_version < 2) { + client->errorValue = stuff->major_version; + return BadValue; + } + + pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + + if (version_compare(XIVersion.major_version, XIVersion.minor_version, + stuff->major_version, stuff->minor_version) > 0) { + major = stuff->major_version; + minor = stuff->minor_version; + } else { + major = XIVersion.major_version; + minor = XIVersion.minor_version; + } + + if (pXIClient->major_version) { + + /* Check to see if the client has only ever asked + * for version 2.2 or higher + */ + if (version_compare(major, minor, 2, 2) >= 0 && + version_compare(pXIClient->major_version, pXIClient->minor_version, 2, 2) >= 0) + { + + /* As of version 2.2, Peter promises to never again break + * backward compatibility, so we'll return the requested + * version to the client but leave the server internal + * version set to the highest requested value + */ + if (version_compare(major, minor, + pXIClient->major_version, pXIClient->minor_version) > 0) + { + pXIClient->major_version = major; + pXIClient->minor_version = minor; + } + } else { + if (version_compare(major, minor, + pXIClient->major_version, pXIClient->minor_version) < 0) { + + client->errorValue = stuff->major_version; + return BadValue; + } + major = pXIClient->major_version; + minor = pXIClient->minor_version; + } + } else { + pXIClient->major_version = major; + pXIClient->minor_version = minor; + } + + rep = (xXIQueryVersionReply) { + .repType = X_Reply, + .RepType = X_XIQueryVersion, + .sequenceNumber = client->sequence, + .length = 0, + .major_version = major, + .minor_version = minor + }; + + WriteReplyToClient(client, sizeof(xXIQueryVersionReply), &rep); + + return Success; +} + +/* Swapping routines */ + +int +SProcXIQueryVersion(ClientPtr client) +{ + REQUEST(xXIQueryVersionReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq); + swaps(&stuff->major_version); + swaps(&stuff->minor_version); + return (ProcXIQueryVersion(client)); +} + +void +SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->major_version); + swaps(&rep->minor_version); + WriteToClient(client, size, rep); +} diff --git a/Xi/xiqueryversion.h b/Xi/xiqueryversion.h new file mode 100644 index 0000000..6dcedac --- /dev/null +++ b/Xi/xiqueryversion.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/extensions/XI2proto.h> + +#ifndef QUERYVERSION_H +#define QUERYVERSION_H 1 + +int SProcXIQueryVersion(ClientPtr client); +int ProcXIQueryVersion(ClientPtr client); +void SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep); + +#endif /* QUERYVERSION_H */ diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c new file mode 100644 index 0000000..45a996e --- /dev/null +++ b/Xi/xiselectev.c @@ -0,0 +1,378 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "dixstruct.h" +#include "windowstr.h" +#include "exglobals.h" +#include "exevents.h" +#include <X11/extensions/XI2proto.h> +#include "inpututils.h" + +#include "xiselectev.h" + +/** + * Ruleset: + * - if A has XIAllDevices, B may select on device X + * - If A has XIAllDevices, B may select on XIAllMasterDevices + * - If A has XIAllMasterDevices, B may select on device X + * - If A has XIAllMasterDevices, B may select on XIAllDevices + * - if A has device X, B may select on XIAllDevices/XIAllMasterDevices + */ +static int check_for_touch_selection_conflicts(ClientPtr B, WindowPtr win, int deviceid) +{ + OtherInputMasks *inputMasks = wOtherInputMasks(win); + InputClients *A = NULL; + + if (inputMasks) + A = inputMasks->inputClients; + for (; A; A = A->next) { + DeviceIntPtr tmp; + + if (CLIENT_ID(A->resource) == B->index) + continue; + + if (deviceid == XIAllDevices) + tmp = inputInfo.all_devices; + else if (deviceid == XIAllMasterDevices) + tmp = inputInfo.all_master_devices; + else + dixLookupDevice(&tmp, deviceid, serverClient, DixReadAccess); + if (!tmp) + return BadImplementation; /* this shouldn't happen */ + + /* A has XIAllDevices */ + if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_devices, XI_TouchBegin)) { + if (deviceid == XIAllDevices) + return BadAccess; + } + + /* A has XIAllMasterDevices */ + if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_master_devices, XI_TouchBegin)) { + if (deviceid == XIAllMasterDevices) + return BadAccess; + } + + /* A has this device */ + if (xi2mask_isset_for_device(A->xi2mask, tmp, XI_TouchBegin)) + return BadAccess; + } + + return Success; +} + + +/** + * Check the given mask (in len bytes) for invalid mask bits. + * Invalid mask bits are any bits above XI2LastEvent. + * + * @return BadValue if at least one invalid bit is set or Success otherwise. + */ +int +XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len) +{ + if (len >= XIMaskLen(XI2LASTEVENT)) { + int i; + + for (i = XI2LASTEVENT + 1; i < len * 8; i++) { + if (BitIsOn(mask, i)) { + client->errorValue = i; + return BadValue; + } + } + } + + return Success; +} + +int +SProcXISelectEvents(ClientPtr client) +{ + int i; + xXIEventMask *evmask; + + REQUEST(xXISelectEventsReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); + swapl(&stuff->win); + swaps(&stuff->num_masks); + + evmask = (xXIEventMask *) &stuff[1]; + for (i = 0; i < stuff->num_masks; i++) { + swaps(&evmask->deviceid); + swaps(&evmask->mask_len); + evmask = + (xXIEventMask *) (((char *) &evmask[1]) + evmask->mask_len * 4); + } + + return (ProcXISelectEvents(client)); +} + +int +ProcXISelectEvents(ClientPtr client) +{ + int rc, num_masks; + WindowPtr win; + DeviceIntPtr dev; + DeviceIntRec dummy; + xXIEventMask *evmask; + int *types = NULL; + int len; + + REQUEST(xXISelectEventsReq); + REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); + + if (stuff->num_masks == 0) + return BadValue; + + rc = dixLookupWindow(&win, stuff->win, client, DixReceiveAccess); + if (rc != Success) + return rc; + + len = sz_xXISelectEventsReq; + + /* check request validity */ + evmask = (xXIEventMask *) &stuff[1]; + num_masks = stuff->num_masks; + while (num_masks--) { + len += sizeof(xXIEventMask) + evmask->mask_len * 4; + + if (bytes_to_int32(len) > stuff->length) + return BadLength; + + if (evmask->deviceid != XIAllDevices && + evmask->deviceid != XIAllMasterDevices) + rc = dixLookupDevice(&dev, evmask->deviceid, client, DixUseAccess); + else { + /* XXX: XACE here? */ + } + if (rc != Success) + return rc; + + /* hierarchy event mask is not allowed on devices */ + if (evmask->deviceid != XIAllDevices && evmask->mask_len >= 1) { + unsigned char *bits = (unsigned char *) &evmask[1]; + + if (BitIsOn(bits, XI_HierarchyChanged)) { + client->errorValue = XI_HierarchyChanged; + return BadValue; + } + } + + /* Raw events may only be selected on root windows */ + if (win->parent && evmask->mask_len >= 1) { + unsigned char *bits = (unsigned char *) &evmask[1]; + + if (BitIsOn(bits, XI_RawKeyPress) || + BitIsOn(bits, XI_RawKeyRelease) || + BitIsOn(bits, XI_RawButtonPress) || + BitIsOn(bits, XI_RawButtonRelease) || + BitIsOn(bits, XI_RawMotion) || + BitIsOn(bits, XI_RawTouchBegin) || + BitIsOn(bits, XI_RawTouchUpdate) || + BitIsOn(bits, XI_RawTouchEnd)) { + client->errorValue = XI_RawKeyPress; + return BadValue; + } + } + + if (evmask->mask_len >= 1) { + unsigned char *bits = (unsigned char *) &evmask[1]; + + /* All three touch events must be selected at once */ + if ((BitIsOn(bits, XI_TouchBegin) || + BitIsOn(bits, XI_TouchUpdate) || + BitIsOn(bits, XI_TouchOwnership) || + BitIsOn(bits, XI_TouchEnd)) && + (!BitIsOn(bits, XI_TouchBegin) || + !BitIsOn(bits, XI_TouchUpdate) || + !BitIsOn(bits, XI_TouchEnd))) { + client->errorValue = XI_TouchBegin; + return BadValue; + } + + /* Only one client per window may select for touch events on the + * same devices, including master devices. + * XXX: This breaks if a device goes from floating to attached. */ + if (BitIsOn(bits, XI_TouchBegin)) { + rc = check_for_touch_selection_conflicts(client, + win, + evmask->deviceid); + if (rc != Success) + return rc; + } + } + + if (XICheckInvalidMaskBits(client, (unsigned char *) &evmask[1], + evmask->mask_len * 4) != Success) + return BadValue; + + evmask = + (xXIEventMask *) (((unsigned char *) evmask) + + evmask->mask_len * 4); + evmask++; + } + + if (bytes_to_int32(len) != stuff->length) + return BadLength; + + /* Set masks on window */ + evmask = (xXIEventMask *) &stuff[1]; + num_masks = stuff->num_masks; + while (num_masks--) { + if (evmask->deviceid == XIAllDevices || + evmask->deviceid == XIAllMasterDevices) { + dummy.id = evmask->deviceid; + dev = &dummy; + } + else + dixLookupDevice(&dev, evmask->deviceid, client, DixUseAccess); + if (XISetEventMask(dev, win, client, evmask->mask_len * 4, + (unsigned char *) &evmask[1]) != Success) + return BadAlloc; + evmask = + (xXIEventMask *) (((unsigned char *) evmask) + + evmask->mask_len * 4); + evmask++; + } + + RecalculateDeliverableEvents(win); + + free(types); + return Success; +} + +int +SProcXIGetSelectedEvents(ClientPtr client) +{ + REQUEST(xXIGetSelectedEventsReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); + swapl(&stuff->win); + + return (ProcXIGetSelectedEvents(client)); +} + +int +ProcXIGetSelectedEvents(ClientPtr client) +{ + int rc, i; + WindowPtr win; + char *buffer = NULL; + xXIGetSelectedEventsReply reply; + OtherInputMasks *masks; + InputClientsPtr others = NULL; + xXIEventMask *evmask = NULL; + DeviceIntPtr dev; + + REQUEST(xXIGetSelectedEventsReq); + REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); + + rc = dixLookupWindow(&win, stuff->win, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + reply = (xXIGetSelectedEventsReply) { + .repType = X_Reply, + .RepType = X_XIGetSelectedEvents, + .sequenceNumber = client->sequence, + .length = 0, + .num_masks = 0 + }; + + masks = wOtherInputMasks(win); + if (masks) { + for (others = wOtherInputMasks(win)->inputClients; others; + others = others->next) { + if (SameClient(others, client)) { + break; + } + } + } + + if (!others) { + WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply); + return Success; + } + + buffer = + calloc(MAXDEVICES, sizeof(xXIEventMask) + pad_to_int32(XI2MASKSIZE)); + if (!buffer) + return BadAlloc; + + evmask = (xXIEventMask *) buffer; + for (i = 0; i < MAXDEVICES; i++) { + int j; + const unsigned char *devmask = xi2mask_get_one_mask(others->xi2mask, i); + + if (i > 2) { + rc = dixLookupDevice(&dev, i, client, DixGetAttrAccess); + if (rc != Success) + continue; + } + + for (j = xi2mask_mask_size(others->xi2mask) - 1; j >= 0; j--) { + if (devmask[j] != 0) { + int mask_len = (j + 4) / 4; /* j is an index, hence + 4, not + 3 */ + + evmask->deviceid = i; + evmask->mask_len = mask_len; + reply.num_masks++; + reply.length += sizeof(xXIEventMask) / 4 + evmask->mask_len; + + if (client->swapped) { + swaps(&evmask->deviceid); + swaps(&evmask->mask_len); + } + + memcpy(&evmask[1], devmask, j + 1); + evmask = (xXIEventMask *) ((char *) evmask + + sizeof(xXIEventMask) + mask_len * 4); + break; + } + } + } + + WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply); + + if (reply.num_masks) + WriteToClient(client, reply.length * 4, buffer); + + free(buffer); + return Success; +} + +void +SRepXIGetSelectedEvents(ClientPtr client, + int len, xXIGetSelectedEventsReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_masks); + WriteToClient(client, len, rep); +} diff --git a/Xi/xiselectev.h b/Xi/xiselectev.h new file mode 100644 index 0000000..56681d3 --- /dev/null +++ b/Xi/xiselectev.h @@ -0,0 +1,40 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef XISELECTEVENTS_H +#define XISELECTEVENTS_H 1 + +int SProcXISelectEvents(ClientPtr client); +int ProcXISelectEvents(ClientPtr client); +int SProcXIGetSelectedEvents(ClientPtr client); +int ProcXIGetSelectedEvents(ClientPtr client); +void SRepXIGetSelectedEvents(ClientPtr client, + int len, xXIGetSelectedEventsReply * rep); + +#endif /* _XISELECTEVENTS_H_ */ diff --git a/Xi/xisetclientpointer.c b/Xi/xisetclientpointer.c new file mode 100644 index 0000000..38ff51e --- /dev/null +++ b/Xi/xisetclientpointer.c @@ -0,0 +1,102 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to set the client pointer for the owner of the given window. + * All subsequent calls that are ambiguous will choose the client pointer as + * default value. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2proto.h> +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" + +#include "xisetclientpointer.h" + +int +SProcXISetClientPointer(ClientPtr client) +{ + REQUEST(xXISetClientPointerReq); + swaps(&stuff->length); + swapl(&stuff->win); + swaps(&stuff->deviceid); + REQUEST_SIZE_MATCH(xXISetClientPointerReq); + return (ProcXISetClientPointer(client)); +} + +int +ProcXISetClientPointer(ClientPtr client) +{ + DeviceIntPtr pDev; + ClientPtr targetClient; + int rc; + + REQUEST(xXISetClientPointerReq); + REQUEST_SIZE_MATCH(xXISetClientPointerReq); + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixManageAccess); + if (rc != Success) { + client->errorValue = stuff->deviceid; + return rc; + } + + if (!IsMaster(pDev)) { + client->errorValue = stuff->deviceid; + return BadDevice; + } + + pDev = GetMaster(pDev, MASTER_POINTER); + + if (stuff->win != None) { + rc = dixLookupClient(&targetClient, stuff->win, client, + DixManageAccess); + + if (rc != Success) + return BadWindow; + + } + else + targetClient = client; + + rc = SetClientPointer(targetClient, pDev); + if (rc != Success) { + client->errorValue = stuff->deviceid; + return rc; + } + + return Success; +} diff --git a/Xi/xisetclientpointer.h b/Xi/xisetclientpointer.h new file mode 100644 index 0000000..f5c15bf --- /dev/null +++ b/Xi/xisetclientpointer.h @@ -0,0 +1,36 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef SETCPTR_H +#define SETCPTR_H 1 + +int SProcXISetClientPointer(ClientPtr /* client */ ); +int ProcXISetClientPointer(ClientPtr /* client */ ); + +#endif /* SETCPTR_H */ diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c new file mode 100644 index 0000000..372ec24 --- /dev/null +++ b/Xi/xisetdevfocus.c @@ -0,0 +1,127 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ +/*********************************************************************** + * + * Request to set and get an input device's focus. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include <X11/extensions/XI2.h> +#include <X11/extensions/XI2proto.h> + +#include "exglobals.h" /* BadDevice */ +#include "xisetdevfocus.h" + +int +SProcXISetFocus(ClientPtr client) +{ + REQUEST(xXISetFocusReq); + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->focus); + swapl(&stuff->time); + + return ProcXISetFocus(client); +} + +int +SProcXIGetFocus(ClientPtr client) +{ + REQUEST(xXIGetFocusReq); + swaps(&stuff->length); + swaps(&stuff->deviceid); + + return ProcXIGetFocus(client); +} + +int +ProcXISetFocus(ClientPtr client) +{ + DeviceIntPtr dev; + int ret; + + REQUEST(xXISetFocusReq); + REQUEST_AT_LEAST_SIZE(xXISetFocusReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetFocusAccess); + if (ret != Success) + return ret; + if (!dev->focus) + return BadDevice; + + return SetInputFocus(client, dev, stuff->focus, RevertToParent, + stuff->time, TRUE); +} + +int +ProcXIGetFocus(ClientPtr client) +{ + xXIGetFocusReply rep; + DeviceIntPtr dev; + int ret; + + REQUEST(xXIGetFocusReq); + REQUEST_AT_LEAST_SIZE(xXIGetFocusReq); + + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); + if (ret != Success) + return ret; + if (!dev->focus) + return BadDevice; + + rep = (xXIGetFocusReply) { + .repType = X_Reply, + .RepType = X_XIGetFocus, + .sequenceNumber = client->sequence, + .length = 0 + }; + + if (dev->focus->win == NoneWin) + rep.focus = None; + else if (dev->focus->win == PointerRootWin) + rep.focus = PointerRoot; + else if (dev->focus->win == FollowKeyboardWin) + rep.focus = FollowKeyboard; + else + rep.focus = dev->focus->win->drawable.id; + + WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep); + return Success; +} + +void +SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep) +{ + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->focus); + WriteToClient(client, len, rep); +} diff --git a/Xi/xisetdevfocus.h b/Xi/xisetdevfocus.h new file mode 100644 index 0000000..0865a72 --- /dev/null +++ b/Xi/xisetdevfocus.h @@ -0,0 +1,40 @@ +/* + * Copyright 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef XISETDEVFOCUS_H +#define XISETDEVFOCUS_H 1 + +int SProcXISetFocus(ClientPtr client); +int ProcXISetFocus(ClientPtr client); + +int SProcXIGetFocus(ClientPtr client); +int ProcXIGetFocus(ClientPtr client); + +void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep); +#endif /* XISETDEVFOCUS_H */ diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c new file mode 100644 index 0000000..3f051f7 --- /dev/null +++ b/Xi/xiwarppointer.c @@ -0,0 +1,190 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +/*********************************************************************** + * + * Request to Warp the pointer location of an extension input device. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> /* for inputstr.h */ +#include <X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2proto.h> +#include "extnsionst.h" +#include "exevents.h" +#include "exglobals.h" +#include "mipointer.h" /* for miPointerUpdateSprite */ + +#include "xiwarppointer.h" +/*********************************************************************** + * + * This procedure allows a client to warp the pointer of a device. + * + */ + +int +SProcXIWarpPointer(ClientPtr client) +{ + REQUEST(xXIWarpPointerReq); + swaps(&stuff->length); + swapl(&stuff->src_win); + swapl(&stuff->dst_win); + swapl(&stuff->src_x); + swapl(&stuff->src_y); + swaps(&stuff->src_width); + swaps(&stuff->src_height); + swapl(&stuff->dst_x); + swapl(&stuff->dst_y); + swaps(&stuff->deviceid); + return (ProcXIWarpPointer(client)); +} + +int +ProcXIWarpPointer(ClientPtr client) +{ + int rc; + int x, y; + WindowPtr dest = NULL; + DeviceIntPtr pDev; + SpritePtr pSprite; + ScreenPtr newScreen; + int src_x, src_y; + int dst_x, dst_y; + + REQUEST(xXIWarpPointerReq); + REQUEST_SIZE_MATCH(xXIWarpPointerReq); + + /* FIXME: panoramix stuff is missing, look at ProcWarpPointer */ + + rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); + + if (rc != Success) { + client->errorValue = stuff->deviceid; + return rc; + } + + if ((!IsMaster(pDev) && !IsFloating(pDev)) || + (IsMaster(pDev) && !IsPointerDevice(pDev))) { + client->errorValue = stuff->deviceid; + return BadDevice; + } + + if (stuff->dst_win != None) { + rc = dixLookupWindow(&dest, stuff->dst_win, client, DixGetAttrAccess); + if (rc != Success) { + client->errorValue = stuff->dst_win; + return rc; + } + } + + pSprite = pDev->spriteInfo->sprite; + x = pSprite->hotPhys.x; + y = pSprite->hotPhys.y; + + src_x = stuff->src_x / (double) (1 << 16); + src_y = stuff->src_y / (double) (1 << 16); + dst_x = stuff->dst_x / (double) (1 << 16); + dst_y = stuff->dst_y / (double) (1 << 16); + + if (stuff->src_win != None) { + int winX, winY; + WindowPtr src; + + rc = dixLookupWindow(&src, stuff->src_win, client, DixGetAttrAccess); + if (rc != Success) { + client->errorValue = stuff->src_win; + return rc; + } + + winX = src->drawable.x; + winY = src->drawable.y; + if (src->drawable.pScreen != pSprite->hotPhys.pScreen || + x < winX + src_x || + y < winY + src_y || + (stuff->src_width != 0 && + winX + src_x + (int) stuff->src_width < 0) || + (stuff->src_height != 0 && + winY + src_y + (int) stuff->src_height < y) || + !PointInWindowIsVisible(src, x, y)) + return Success; + } + + if (dest) { + x = dest->drawable.x; + y = dest->drawable.y; + newScreen = dest->drawable.pScreen; + } + else + newScreen = pSprite->hotPhys.pScreen; + + x += dst_x; + y += dst_y; + + if (x < 0) + x = 0; + else if (x > newScreen->width) + x = newScreen->width - 1; + + if (y < 0) + y = 0; + else if (y > newScreen->height) + y = newScreen->height - 1; + + if (newScreen == pSprite->hotPhys.pScreen) { + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &x, &y); + (*newScreen->SetCursorPosition) (pDev, newScreen, x, y, TRUE); + } + else if (!PointerConfinedToScreen(pDev)) { + NewCurrentScreen(pDev, newScreen, x, y); + } + + /* if we don't update the device, we get a jump next time it moves */ + pDev->last.valuators[0] = x; + pDev->last.valuators[1] = y; + miPointerUpdateSprite(pDev); + + /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it + here though. */ + return Success; +} diff --git a/Xi/xiwarppointer.h b/Xi/xiwarppointer.h new file mode 100644 index 0000000..7637f42 --- /dev/null +++ b/Xi/xiwarppointer.h @@ -0,0 +1,36 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Peter Hutterer, University of South Australia, NICTA + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef WARPDEVP_H +#define WARPDEVP_H 1 + +int SProcXIWarpPointer(ClientPtr /* client */ ); +int ProcXIWarpPointer(ClientPtr /* client */ ); + +#endif /* WARPDEVP_H */ diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..3429ebd --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,3670 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT]) + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see <http://pkg-config.freedesktop.org/>.]) + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# (`yes' being less verbose, `no' or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], +[ --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0')]) +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using `$V' instead of `$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/ac_define_dir.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/xorg-tls.m4]) +dnl fontutil.m4. Generated from fontutil.m4.in by configure. +dnl +dnl This file comes from X.Org's font-util 1.3.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 +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. + +# XORG_FONT_MACROS_VERSION(required-version) +# ------------------------------------------ +# Minimum version: 1.1.0 +# +# If you're using a macro added in Version 1.1 or newer, include this in +# your configure.ac with the minimum required version, such as: +# XORG_FONT_MACROS_VERSION(1.1) +# +# To ensure that this macro is defined, also add: +# m4_ifndef([XORG_FONT_MACROS_VERSION], +# [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])]) +# +# +# See the "minimum version" comment for each macro you use to see what +# version you require. +m4_defun([XORG_FONT_MACROS_VERSION],[ +m4_define([vers_have], [1.3.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,, + [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])]) +m4_if(m4_version_compare(vers_have, [$1]), -1, + [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])]) +m4_undefine([vers_have]) +m4_undefine([maj_have]) +m4_undefine([maj_needed]) +]) # XORG_FONT_MACROS_VERSION + +# XORG_FONT_CHECK_{maps}() +# ------------------------ +# Minimum version: 1.0.0 +# These macros add --enable/disable-{maps} where {maps} are ISO8859-*, +# JISX0201 or KOI8_R. By default, they are all enabled. + +AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)]) +AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)]) +AC_DEFUN([XORG_FONT_CHECK_JISX0201], [XORG_FONT_CHECK_ENCODING(JISX0201)]) +AC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)]) + +# XORG_FONT_CHECK_ENCODING(encoding) +# ---------------------------------- +# Minimum version: 1.1.0 +# This macro adds --enable/disable-<encoding>, enabled by default. +# It replaced individual copies of this code in the above macros in 1.1. +# Currently assumes encoding names will be all upper-case - add m4_toupper +# calls if this is not true in the future. + +AC_DEFUN([XORG_FONT_CHECK_ENCODING],[ + AC_ARG_ENABLE(m4_tolower($1), + AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)), + [Build $1 fonts (default: yes)]), + [AS_TR_SH($1)=$enableval]) + AC_MSG_CHECKING([whether to build $1 fonts]) + AC_MSG_RESULT($[AS_TR_SH($1)]) + AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes]) +]) # XORG_FONT_CHECK_ENCODING + +# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....) +# ----------------------------------------------------- +# Minimum version: 1.1.0 +# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once. +# Add a shorthand --enable/disable-all-encodings option. + +AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ + AC_ARG_ENABLE([all-encodings], + AS_HELP_STRING([--disable-all-encodings], + [Disable building of all font encodings]), + [m4_foreach_w([enc], [$1], [ + AS_TR_SH(enc)=$enableval + ])], + [m4_foreach_w([enc], [$1], [ + AS_TR_SH(enc)=yes + ])]) + m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)]) +]) # XORG_FONT_CHECK_ENCODING_LIST + +# XORG_FONT_REQUIRED_PROG(VARNAME, progname) +# ------------------------------------------ +# Minimum version: 1.1.0 +# +# Simple wrapper around AC_PATH_PROG that errors if not found +# + +AC_DEFUN([XORG_FONT_REQUIRED_PROG],[ + AC_PATH_PROG($1, $2) + if test x"$$1" = x; then + AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.]) + fi +]) + + +# XORG_FONT_FCCACHE() +# ------------------- +# Minimum version: 1.1.0 +# +# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found +# Set RUN_FCCACHE to a rule suitable for substituting into a makefile +# to run fc-cache if found and not installing to $DESTDIR and not +# cross-compiling +# +# fc-cache is optional, not required, and should be skipped when making +# packages (installing to $DESTDIR) or cross-compiling +# +AC_DEFUN([XORG_FONT_FCCACHE],[ + AC_PATH_PROG(FCCACHE, fc-cache) + FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"' + if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then + RUN_FCCACHE="${FCCACHE_WARN}" + else + RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else' + RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)" + fi + AC_SUBST([RUN_FCCACHE]) +]) + +# XORG_FONT_MKFONTDIR() +# ------------------- +# Minimum version: 1.3.0 +# +# Set MKFONTDIR to path to mkfontdir. +# +# If cross-compiling, and if mkdir is not found, use a shell command +# which warns mkfontdir needs to be run on the target +# +# If not cross-compiling, mkfontdir must be found +# +AC_DEFUN([XORG_FONT_MKFONTDIR],[ + if test x"$cross_compiling" != x"no" ; then + AC_PATH_PROG(MKFONTDIR, mkfontdir, "") + MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"' + + if test x"$MKFONTDIR" = x; then + MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'" + fi + else + XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) + fi + + AC_SUBST([MKFONTDIR]) +]) + +# XORG_FONT_COMMON_UTILS() +# ------------------------ +# Minimum version: 1.1.0 +# +# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types + +AC_DEFUN([XORG_FONT_COMMON_UTILS],[ + XORG_FONT_FCCACHE + XORG_FONT_MKFONTDIR +]) + +# XORG_FONT_SCALED_UTILS() +# ------------------------ +# Minimum version: 1.1.0 +# +# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts +# (TrueType, OpenType, Type1) + +AC_DEFUN([XORG_FONT_SCALED_UTILS],[ + XORG_FONT_COMMON_UTILS + XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale) +]) + +# XORG_FONT_BDF_UTILS() +# --------------------- +# Minimum version: 1.1.0 +# +# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts +# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the +# PCF output files created by bdftopcf + +AC_DEFUN([XORG_FONT_BDF_UTILS],[ + XORG_FONT_COMMON_UTILS + XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf) + XORG_FONT_CHECK_COMPRESSION +]) + +# XORG_FONT_CHECK_COMPRESSION() +# ----------------------------- +# Minimum version: 1.1.0 +# +# Offer a --with-compression flag to control what compression method is +# used for pcf font files. Offers all the methods currently supported +# by libXfont, including no compression. + +AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[ + AC_MSG_CHECKING([font compression method]) + AC_ARG_WITH(compression, + [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>], + [compression method to use on pcf fonts])], + [compression="$withval"], [compression="yes"]) + if test x"$compression" = "xyes" ; then + compression="gzip" + fi + AC_MSG_RESULT([${compression}]) + case ${compression} in + *compress) COMPRESS_SUFFIX=".Z" ;; + *gzip) COMPRESS_SUFFIX=".gz" ;; + *bzip2) COMPRESS_SUFFIX=".bz2" ;; + no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;; + *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;; + esac + if test x"$COMPRESS_SUFFIX" != "x" ; then + XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression}) + fi + AC_SUBST([COMPRESS_SUFFIX]) +]) + +# XORG_FONT_UCS2ANY() +# ------------------- +# Minimum version: 1.1.0 +# +# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting +# Unicode-encoded BDF format bitmap fonts into subsets for older encodings. +# Also call pkg-config to find the directory with the encoding files needed +# by ucs2any, and export it as MAPFILES_PATH to the Makefiles + +AC_DEFUN([XORG_FONT_UCS2ANY],[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any) + PKG_CHECK_MODULES(MAPS, [fontutil]) + AC_MSG_CHECKING([for ucs2any encoding data files]) + MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil` + AC_SUBST(MAPFILES_PATH) + AC_MSG_RESULT([${MAPFILES_PATH}]) +]) + + + +# XORG_FONT_FC_CONFDIR() +# -------------------- +# Minimum version: 1.2.0 +# +# Sets FC_CONFDIR to the fontconfig config directory +# (which should be --with-confdir=... when building fontconfig) +# found from: +# --with-fc-confdir=... +# pkg-config --variable=confdir fontconfig +# ${sysconfdir}/fonts + +AC_DEFUN([XORG_FONT_FC_CONFDIR],[ + dnl Ensure $PKG_CONFIG is set first + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + + AC_MSG_CHECKING([for fontconfig's configuration directory]) + AC_ARG_WITH(fc-confdir, + AS_HELP_STRING([--with-fc-confdir=DIR], + [Path to fontconfig's configuration directory]), + [FC_CONFDIR="$withval"]) + # if --with-fc-confdir was not specified + if test "x${FC_CONFDIR}" = "x"; then + FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig` + fi + # ...and if pkg-config didn't find confdir in fontconfig.pc... + if test "x${FC_CONFDIR}" = "x"; then + FC_CONFDIR="${sysconfdir}/fonts" + fi + AC_SUBST(FC_CONFDIR) + AC_MSG_RESULT([${FC_CONFDIR}]) +]) + + + +# XORG_FONTROOTDIR() +# -------------------- +# Minimum version: 1.1.0 +# +# Sets FONTROOTDIR to the root directory for font files. Uses the first +# found from: +# --with-fontrootdir +# pkg-config --variable=fontrootdir fontutil +# ${datadir}/fonts/X11 + +AC_DEFUN([XORG_FONTROOTDIR],[ + dnl Ensure $PKG_CONFIG is set first + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + + AC_MSG_CHECKING([for root directory for font files]) + AC_ARG_WITH(fontrootdir, + AS_HELP_STRING([--with-fontrootdir=DIR], + [Path to root directory for font files]), + [FONTROOTDIR="$withval"]) + # if --with-fontrootdir not specified... + if test "x${FONTROOTDIR}" = "x"; then + FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` + fi + # ...and if pkg-config didn't find fontdir in fontutil.pc... + if test "x${FONTROOTDIR}" = "x"; then + FONTROOTDIR="${datadir}/fonts/X11" + fi + AC_SUBST(FONTROOTDIR) + AC_MSG_RESULT([${FONTROOTDIR}]) +]) + +# XORG_FONTSUBDIR(variable, flag, subdir) +# --------------------------------------- +# Minimum version: 1.1.0 +# +# Offer a --with-<flag> flag to control directory for font installation +# Default is the specified <subdir> of the font root directory. +# Sets <variable> to the selected directory + +AC_DEFUN([XORG_FONTSUBDIR],[ + AC_REQUIRE([XORG_FONTROOTDIR]) + + AC_MSG_CHECKING([for directory for $3 files]) + AC_ARG_WITH($2, + [AS_HELP_STRING([--with-$2=DIR], + [Path to $3 files [FONTROOTDIR/$3]])], + [$1="${withval}"], [$1='${FONTROOTDIR}/$3']) + AC_SUBST($1) + AC_MSG_RESULT([${$1}]) +]) # XORG_FONTSUBDIR + +# XORG_FONTDIR(subdir) +# -------------------- +# Minimum version: 1.1.0 +# +# Offer a --with-fontdir flag to control directory for font installation +# Default is the specified subdir of the font root directory. +# Sets FONTDIR to the selected directory + +AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])]) + +dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. +dnl +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"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. + +# XORG_MACROS_VERSION(required-version) +# ------------------------------------- +# Minimum version: 1.1.0 +# +# If you're using a macro added in Version 1.1 or newer, include this in +# your configure.ac with the minimum required version, such as: +# XORG_MACROS_VERSION(1.1) +# +# To ensure that this macro is defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], +# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# +# +# See the "minimum version" comment for each macro you use to see what +# version you require. +m4_defun([XORG_MACROS_VERSION],[ +m4_define([vers_have], [1.18.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,, + [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) +m4_if(m4_version_compare(vers_have, [$1]), -1, + [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) +m4_undefine([vers_have]) +m4_undefine([maj_have]) +m4_undefine([maj_needed]) +]) # XORG_MACROS_VERSION + +# XORG_PROG_RAWCPP() +# ------------------ +# Minimum version: 1.0.0 +# +# Find cpp program and necessary flags for use in pre-processing text files +# such as man pages and config files +AC_DEFUN([XORG_PROG_RAWCPP],[ +AC_REQUIRE([AC_PROG_CPP]) +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], + [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +AC_MSG_CHECKING([if $RAWCPP requires -undef]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + AC_MSG_RESULT([yes]) + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + AC_MSG_RESULT([yes, with -ansi]) + else + AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext + +AC_MSG_CHECKING([if $RAWCPP requires -traditional]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext +AC_SUBST(RAWCPPFLAGS) +]) # XORG_PROG_RAWCPP + +# XORG_MANPAGE_SECTIONS() +# ----------------------- +# Minimum version: 1.0.0 +# +# Determine which sections man pages go in for the different man page types +# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. +# Not sure if there's any better way than just hardcoding by OS name. +# Override default settings by setting environment variables +# Added MAN_SUBSTS in version 1.8 +# Added AC_PROG_SED in version 1.8 + +AC_DEFUN([XORG_MANPAGE_SECTIONS],[ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_SED]) + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + +AC_SUBST([APP_MAN_SUFFIX]) +AC_SUBST([LIB_MAN_SUFFIX]) +AC_SUBST([FILE_MAN_SUFFIX]) +AC_SUBST([MISC_MAN_SUFFIX]) +AC_SUBST([DRIVER_MAN_SUFFIX]) +AC_SUBST([ADMIN_MAN_SUFFIX]) +AC_SUBST([APP_MAN_DIR]) +AC_SUBST([LIB_MAN_DIR]) +AC_SUBST([FILE_MAN_DIR]) +AC_SUBST([MISC_MAN_DIR]) +AC_SUBST([DRIVER_MAN_DIR]) +AC_SUBST([ADMIN_MAN_DIR]) + +XORG_MAN_PAGE="X Version 11" +AC_SUBST([XORG_MAN_PAGE]) +MAN_SUBSTS="\ + -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|\$(prefix)|g' \ + -e 's|__apploaddir__|\$(appdefaultdir)|g' \ + -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" +AC_SUBST([MAN_SUBSTS]) + +]) # XORG_MANPAGE_SECTIONS + +# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) +# ------------------------ +# Minimum version: 1.7.0 +# +# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent +# provided by xorg-sgml-doctools, if installed. +AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ +AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) +XORG_SGML_PATH= +PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], + [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], + [m4_ifval([$1],[:], + [if test x"$cross_compiling" != x"yes" ; then + AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], + [XORG_SGML_PATH=$prefix/share/sgml]) + fi]) + ]) + +# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing +# the path and the name of the doc stylesheet +if test "x$XORG_SGML_PATH" != "x" ; then + AC_MSG_RESULT([$XORG_SGML_PATH]) + STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 + XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl +else + AC_MSG_RESULT([no]) +fi + +AC_SUBST(XORG_SGML_PATH) +AC_SUBST(STYLESHEET_SRCDIR) +AC_SUBST(XSL_STYLESHEET) +AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) +]) # XORG_CHECK_SGML_DOCTOOLS + +# XORG_CHECK_LINUXDOC +# ------------------- +# Minimum version: 1.0.0 +# +# Defines the variable MAKE_TEXT if the necessary tools and +# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. +# Whether or not the necessary tools and files are found can be checked +# with the AM_CONDITIONAL "BUILD_LINUXDOC" +AC_DEFUN([XORG_CHECK_LINUXDOC],[ +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) +AC_REQUIRE([XORG_WITH_PS2PDF]) + +AC_PATH_PROG(LINUXDOC, linuxdoc) + +AC_MSG_CHECKING([whether to build documentation]) + +if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then + BUILDDOC=yes +else + BUILDDOC=no +fi + +AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) + +AC_MSG_RESULT([$BUILDDOC]) + +AC_MSG_CHECKING([whether to build pdf documentation]) + +if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +else + BUILDPDFDOC=no +fi + +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) + +AC_MSG_RESULT([$BUILDPDFDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +MAKE_PDF="$PS2PDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_LINUXDOC + +# XORG_CHECK_DOCBOOK +# ------------------- +# Minimum version: 1.0.0 +# +# Checks for the ability to build output formats from SGML DocBook source. +# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" +# indicates whether the necessary tools and files are found and, if set, +# $(MAKE_XXX) blah.sgml will produce blah.xxx. +AC_DEFUN([XORG_CHECK_DOCBOOK],[ +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) + +BUILDTXTDOC=no +BUILDPDFDOC=no +BUILDPSDOC=no +BUILDHTMLDOC=no + +AC_PATH_PROG(DOCBOOKPS, docbook2ps) +AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) +AC_PATH_PROG(DOCBOOKHTML, docbook2html) +AC_PATH_PROG(DOCBOOKTXT, docbook2txt) + +AC_MSG_CHECKING([whether to build text documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && + test x$BUILD_TXTDOC != xno; then + BUILDTXTDOC=yes +fi +AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) +AC_MSG_RESULT([$BUILDTXTDOC]) + +AC_MSG_CHECKING([whether to build PDF documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && + test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +fi +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) +AC_MSG_RESULT([$BUILDPDFDOC]) + +AC_MSG_CHECKING([whether to build PostScript documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && + test x$BUILD_PSDOC != xno; then + BUILDPSDOC=yes +fi +AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) +AC_MSG_RESULT([$BUILDPSDOC]) + +AC_MSG_CHECKING([whether to build HTML documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && + test x$BUILD_HTMLDOC != xno; then + BUILDHTMLDOC=yes +fi +AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) +AC_MSG_RESULT([$BUILDHTMLDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" +MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_DOCBOOK + +# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) +# ---------------- +# Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-xmlto option, it allows maximum flexibilty in making decisions +# as whether or not to use the xmlto package. When DEFAULT is not specified, +# --with-xmlto assumes 'auto'. +# +# Interface to module: +# HAVE_XMLTO: used in makefiles to conditionally generate documentation +# XMLTO: returns the path of the xmlto program found +# returns the path set by the user in the environment +# --with-xmlto: 'yes' user instructs the module to use xmlto +# 'no' user instructs the module not to use xmlto +# +# Added in version 1.10.0 +# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation +# xmlto for text output requires either lynx, links, or w3m browsers +# +# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_XMLTO],[ +AC_ARG_VAR([XMLTO], [Path to xmlto command]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(xmlto, + AS_HELP_STRING([--with-xmlto], + [Use xmlto to regenerate documentation (default: ]_defopt[)]), + [use_xmlto=$withval], [use_xmlto=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_xmlto" = x"auto"; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) + have_xmlto=no + else + have_xmlto=yes + fi +elif test "x$use_xmlto" = x"yes" ; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) + fi + have_xmlto=yes +elif test "x$use_xmlto" = x"no" ; then + if test "x$XMLTO" != "x"; then + AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) + fi + have_xmlto=no +else + AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) +fi + +# Test for a minimum version of xmlto, if provided. +m4_ifval([$1], +[if test "$have_xmlto" = yes; then + # scrape the xmlto version + AC_MSG_CHECKING([the xmlto version]) + xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` + AC_MSG_RESULT([$xmlto_version]) + AS_VERSION_COMPARE([$xmlto_version], [$1], + [if test "x$use_xmlto" = xauto; then + AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) + have_xmlto=no + else + AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) + fi]) +fi]) + +# Test for the ability of xmlto to generate a text target +have_xmlto_text=no +cat > conftest.xml << "EOF" +EOF +AS_IF([test "$have_xmlto" = yes], + [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], + [have_xmlto_text=yes], + [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) +rm -f conftest.xml +AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) +AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) +]) # XORG_WITH_XMLTO + +# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) +# -------------------------------------------- +# Minimum version: 1.12.0 +# Minimum version for optional DEFAULT argument: 1.12.0 +# +# XSLT (Extensible Stylesheet Language Transformations) is a declarative, +# XML-based language used for the transformation of XML documents. +# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. +# It is used under the cover by xmlto to generate html files from DocBook/XML. +# The XSLT processor is often used as a standalone tool for transformations. +# It should not be assumed that this tool is used only to work with documnetation. +# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. +# +# Interface to module: +# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation +# XSLTPROC: returns the path of the xsltproc program found +# returns the path set by the user in the environment +# --with-xsltproc: 'yes' user instructs the module to use xsltproc +# 'no' user instructs the module not to use xsltproc +# have_xsltproc: returns yes if xsltproc found in PATH or no +# +# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_XSLTPROC],[ +AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(xsltproc, + AS_HELP_STRING([--with-xsltproc], + [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), + [use_xsltproc=$withval], [use_xsltproc=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_xsltproc" = x"auto"; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test "x$XSLTPROC" = "x"; then + AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) + have_xsltproc=no + else + have_xsltproc=yes + fi +elif test "x$use_xsltproc" = x"yes" ; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test "x$XSLTPROC" = "x"; then + AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) + fi + have_xsltproc=yes +elif test "x$use_xsltproc" = x"no" ; then + if test "x$XSLTPROC" != "x"; then + AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) + fi + have_xsltproc=no +else + AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) +fi + +AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) +]) # XORG_WITH_XSLTPROC + +# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.15.0 +# +# PERL (Practical Extraction and Report Language) is a language optimized for +# scanning arbitrary text files, extracting information from those text files, +# and printing reports based on that information. +# +# When DEFAULT is not specified, --with-perl assumes 'auto'. +# +# Interface to module: +# HAVE_PERL: used in makefiles to conditionally scan text files +# PERL: returns the path of the perl program found +# returns the path set by the user in the environment +# --with-perl: 'yes' user instructs the module to use perl +# 'no' user instructs the module not to use perl +# have_perl: returns yes if perl found in PATH or no +# +# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_PERL],[ +AC_ARG_VAR([PERL], [Path to perl command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(perl, + AS_HELP_STRING([--with-perl], + [Use perl for extracting information from files (default: ]_defopt[)]), + [use_perl=$withval], [use_perl=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_perl" = x"auto"; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_WARN([perl not found - cannot extract information and report]) + have_perl=no + else + have_perl=yes + fi +elif test "x$use_perl" = x"yes" ; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) + fi + have_perl=yes +elif test "x$use_perl" = x"no" ; then + if test "x$PERL" != "x"; then + AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) + fi + have_perl=no +else + AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) +fi + +AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) +]) # XORG_WITH_PERL + +# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) +# ---------------- +# Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-asciidoc option, it allows maximum flexibilty in making decisions +# as whether or not to use the asciidoc package. When DEFAULT is not specified, +# --with-asciidoc assumes 'auto'. +# +# Interface to module: +# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation +# ASCIIDOC: returns the path of the asciidoc program found +# returns the path set by the user in the environment +# --with-asciidoc: 'yes' user instructs the module to use asciidoc +# 'no' user instructs the module not to use asciidoc +# +# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_ASCIIDOC],[ +AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(asciidoc, + AS_HELP_STRING([--with-asciidoc], + [Use asciidoc to regenerate documentation (default: ]_defopt[)]), + [use_asciidoc=$withval], [use_asciidoc=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_asciidoc" = x"auto"; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test "x$ASCIIDOC" = "x"; then + AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) + have_asciidoc=no + else + have_asciidoc=yes + fi +elif test "x$use_asciidoc" = x"yes" ; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test "x$ASCIIDOC" = "x"; then + AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) + fi + have_asciidoc=yes +elif test "x$use_asciidoc" = x"no" ; then + if test "x$ASCIIDOC" != "x"; then + AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) + fi + have_asciidoc=no +else + AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) +fi +m4_ifval([$1], +[if test "$have_asciidoc" = yes; then + # scrape the asciidoc version + AC_MSG_CHECKING([the asciidoc version]) + asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` + AC_MSG_RESULT([$asciidoc_version]) + AS_VERSION_COMPARE([$asciidoc_version], [$1], + [if test "x$use_asciidoc" = xauto; then + AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) + have_asciidoc=no + else + AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) +]) # XORG_WITH_ASCIIDOC + +# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) +# ------------------------------------------- +# Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# Minimum version for optional DOT checking: 1.18.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-doxygen option, it allows maximum flexibilty in making decisions +# as whether or not to use the doxygen package. When DEFAULT is not specified, +# --with-doxygen assumes 'auto'. +# +# Interface to module: +# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation +# DOXYGEN: returns the path of the doxygen program found +# returns the path set by the user in the environment +# --with-doxygen: 'yes' user instructs the module to use doxygen +# 'no' user instructs the module not to use doxygen +# +# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_DOXYGEN],[ +AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) +AC_ARG_VAR([DOT], [Path to the dot graphics utility]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(doxygen, + AS_HELP_STRING([--with-doxygen], + [Use doxygen to regenerate documentation (default: ]_defopt[)]), + [use_doxygen=$withval], [use_doxygen=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_doxygen" = x"auto"; then + AC_PATH_PROG([DOXYGEN], [doxygen]) + if test "x$DOXYGEN" = "x"; then + AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) + have_doxygen=no + else + have_doxygen=yes + fi +elif test "x$use_doxygen" = x"yes" ; then + AC_PATH_PROG([DOXYGEN], [doxygen]) + if test "x$DOXYGEN" = "x"; then + AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) + fi + have_doxygen=yes +elif test "x$use_doxygen" = x"no" ; then + if test "x$DOXYGEN" != "x"; then + AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) + fi + have_doxygen=no +else + AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) +fi +m4_ifval([$1], +[if test "$have_doxygen" = yes; then + # scrape the doxygen version + AC_MSG_CHECKING([the doxygen version]) + doxygen_version=`$DOXYGEN --version 2>/dev/null` + AC_MSG_RESULT([$doxygen_version]) + AS_VERSION_COMPARE([$doxygen_version], [$1], + [if test "x$use_doxygen" = xauto; then + AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) + have_doxygen=no + else + AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) + fi]) +fi]) + +dnl Check for DOT if we have doxygen. The caller decides if it is mandatory +dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: +dnl HAVE_DOT = @HAVE_DOT@ +HAVE_DOT=no +if test "x$have_doxygen" = "xyes"; then + AC_PATH_PROG([DOT], [dot]) + if test "x$DOT" != "x"; then + HAVE_DOT=yes + fi +fi + +AC_SUBST([HAVE_DOT]) +AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) +AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) +]) # XORG_WITH_DOXYGEN + +# XORG_WITH_GROFF([DEFAULT]) +# ---------------- +# Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-groff option, it allows maximum flexibilty in making decisions +# as whether or not to use the groff package. When DEFAULT is not specified, +# --with-groff assumes 'auto'. +# +# Interface to module: +# HAVE_GROFF: used in makefiles to conditionally generate documentation +# HAVE_GROFF_MM: the memorandum macros (-mm) package +# HAVE_GROFF_MS: the -ms macros package +# GROFF: returns the path of the groff program found +# returns the path set by the user in the environment +# --with-groff: 'yes' user instructs the module to use groff +# 'no' user instructs the module not to use groff +# +# Added in version 1.9.0: +# HAVE_GROFF_HTML: groff has dependencies to output HTML format: +# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. +# psselect from the psutils package. +# the ghostcript package. Refer to the grohtml man pages +# +# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. +# +# OS and distros often splits groff in a basic and full package, the former +# having the groff program and the later having devices, fonts and macros +# Checking for the groff executable is not enough. +# +# If macros are missing, we cannot assume that groff is useless, so we don't +# unset HAVE_GROFF or GROFF env variables. +# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. +# +AC_DEFUN([XORG_WITH_GROFF],[ +AC_ARG_VAR([GROFF], [Path to groff command]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_WITH(groff, + AS_HELP_STRING([--with-groff], + [Use groff to regenerate documentation (default: ]_defopt[)]), + [use_groff=$withval], [use_groff=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_groff" = x"auto"; then + AC_PATH_PROG([GROFF], [groff]) + if test "x$GROFF" = "x"; then + AC_MSG_WARN([groff not found - documentation targets will be skipped]) + have_groff=no + else + have_groff=yes + fi +elif test "x$use_groff" = x"yes" ; then + AC_PATH_PROG([GROFF], [groff]) + if test "x$GROFF" = "x"; then + AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) + fi + have_groff=yes +elif test "x$use_groff" = x"no" ; then + if test "x$GROFF" != "x"; then + AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) + fi + have_groff=no +else + AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) +fi + +# We have groff, test for the presence of the macro packages +if test "x$have_groff" = x"yes"; then + AC_MSG_CHECKING([for ${GROFF} -ms macros]) + if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then + groff_ms_works=yes + else + groff_ms_works=no + fi + AC_MSG_RESULT([$groff_ms_works]) + AC_MSG_CHECKING([for ${GROFF} -mm macros]) + if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then + groff_mm_works=yes + else + groff_mm_works=no + fi + AC_MSG_RESULT([$groff_mm_works]) +fi + +# We have groff, test for HTML dependencies, one command per package +if test "x$have_groff" = x"yes"; then + AC_PATH_PROGS(GS_PATH, [gs gswin32c]) + AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) + AC_PATH_PROG(PSSELECT_PATH, [psselect]) + if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then + have_groff_html=yes + else + have_groff_html=no + AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) + fi +fi + +# Set Automake conditionals for Makefiles +AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) +AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) +AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) +AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) +]) # XORG_WITH_GROFF + +# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) +# --------------------------------------- +# Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# Minimum version for optional MIN-VERSION argument: 1.15.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-fop option, it allows maximum flexibilty in making decisions +# as whether or not to use the fop package. When DEFAULT is not specified, +# --with-fop assumes 'auto'. +# +# Interface to module: +# HAVE_FOP: used in makefiles to conditionally generate documentation +# FOP: returns the path of the fop program found +# returns the path set by the user in the environment +# --with-fop: 'yes' user instructs the module to use fop +# 'no' user instructs the module not to use fop +# +# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_FOP],[ +AC_ARG_VAR([FOP], [Path to fop command]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(fop, + AS_HELP_STRING([--with-fop], + [Use fop to regenerate documentation (default: ]_defopt[)]), + [use_fop=$withval], [use_fop=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_fop" = x"auto"; then + AC_PATH_PROG([FOP], [fop]) + if test "x$FOP" = "x"; then + AC_MSG_WARN([fop not found - documentation targets will be skipped]) + have_fop=no + else + have_fop=yes + fi +elif test "x$use_fop" = x"yes" ; then + AC_PATH_PROG([FOP], [fop]) + if test "x$FOP" = "x"; then + AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) + fi + have_fop=yes +elif test "x$use_fop" = x"no" ; then + if test "x$FOP" != "x"; then + AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) + fi + have_fop=no +else + AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) +fi + +# Test for a minimum version of fop, if provided. +m4_ifval([$1], +[if test "$have_fop" = yes; then + # scrape the fop version + AC_MSG_CHECKING([for fop minimum version]) + fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` + AC_MSG_RESULT([$fop_version]) + AS_VERSION_COMPARE([$fop_version], [$1], + [if test "x$use_fop" = xauto; then + AC_MSG_WARN([fop version $fop_version found, but $1 needed]) + have_fop=no + else + AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) +]) # XORG_WITH_FOP + +# XORG_WITH_M4([MIN-VERSION]) +# --------------------------- +# Minimum version: 1.19.0 +# +# This macro attempts to locate an m4 macro processor which supports +# -I option and is only useful for modules relying on M4 in order to +# expand macros in source code files. +# +# Interface to module: +# M4: returns the path of the m4 program found +# returns the path set by the user in the environment +# +AC_DEFUN([XORG_WITH_M4], [ +AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], + [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], + [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ + ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], + [AC_MSG_ERROR([could not find m4 that supports -I option])], + [$PATH:/usr/gnu/bin])]) + +AC_SUBST([M4], [$ac_cv_path_M4]) +]) # XORG_WITH_M4 + +# XORG_WITH_PS2PDF([DEFAULT]) +# ---------------- +# Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-ps2pdf option, it allows maximum flexibilty in making decisions +# as whether or not to use the ps2pdf package. When DEFAULT is not specified, +# --with-ps2pdf assumes 'auto'. +# +# Interface to module: +# HAVE_PS2PDF: used in makefiles to conditionally generate documentation +# PS2PDF: returns the path of the ps2pdf program found +# returns the path set by the user in the environment +# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf +# 'no' user instructs the module not to use ps2pdf +# +# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_PS2PDF],[ +AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_WITH(ps2pdf, + AS_HELP_STRING([--with-ps2pdf], + [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), + [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_ps2pdf" = x"auto"; then + AC_PATH_PROG([PS2PDF], [ps2pdf]) + if test "x$PS2PDF" = "x"; then + AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) + have_ps2pdf=no + else + have_ps2pdf=yes + fi +elif test "x$use_ps2pdf" = x"yes" ; then + AC_PATH_PROG([PS2PDF], [ps2pdf]) + if test "x$PS2PDF" = "x"; then + AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) + fi + have_ps2pdf=yes +elif test "x$use_ps2pdf" = x"no" ; then + if test "x$PS2PDF" != "x"; then + AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) + fi + have_ps2pdf=no +else + AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) +fi +AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) +]) # XORG_WITH_PS2PDF + +# XORG_ENABLE_DOCS (enable_docs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a builder to skip all +# documentation targets except traditional man pages. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_DOCS: used in makefiles to conditionally generate documentation +# --enable-docs: 'yes' user instructs the module to generate docs +# 'no' user instructs the module not to generate docs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_DOCS],[ +m4_define([docs_default], m4_default([$1], [yes])) +AC_ARG_ENABLE(docs, + AS_HELP_STRING([--enable-docs], + [Enable building the documentation (default: ]docs_default[)]), + [build_docs=$enableval], [build_docs=]docs_default) +m4_undefine([docs_default]) +AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) +AC_MSG_CHECKING([whether to build documentation]) +AC_MSG_RESULT([$build_docs]) +]) # XORG_ENABLE_DOCS + +# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# This macro enables a builder to skip all developer documentation. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs +# --enable-devel-docs: 'yes' user instructs the module to generate developer docs +# 'no' user instructs the module not to generate developer docs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ +m4_define([devel_default], m4_default([$1], [yes])) +AC_ARG_ENABLE(devel-docs, + AS_HELP_STRING([--enable-devel-docs], + [Enable building the developer documentation (default: ]devel_default[)]), + [build_devel_docs=$enableval], [build_devel_docs=]devel_default) +m4_undefine([devel_default]) +AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) +AC_MSG_CHECKING([whether to build developer documentation]) +AC_MSG_RESULT([$build_devel_docs]) +]) # XORG_ENABLE_DEVEL_DOCS + +# XORG_ENABLE_SPECS (enable_specs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# This macro enables a builder to skip all functional specification targets. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_SPECS: used in makefiles to conditionally generate specs +# --enable-specs: 'yes' user instructs the module to generate specs +# 'no' user instructs the module not to generate specs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_SPECS],[ +m4_define([spec_default], m4_default([$1], [yes])) +AC_ARG_ENABLE(specs, + AS_HELP_STRING([--enable-specs], + [Enable building the specs (default: ]spec_default[)]), + [build_specs=$enableval], [build_specs=]spec_default) +m4_undefine([spec_default]) +AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) +AC_MSG_CHECKING([whether to build functional specifications]) +AC_MSG_RESULT([$build_specs]) +]) # XORG_ENABLE_SPECS + +# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) +# ---------------------------------------------- +# Minimum version: 1.13.0 +# +# This macro enables a builder to enable/disable unit testing +# It makes no assumption about the test cases implementation +# Test cases may or may not use Automake "Support for test suites" +# They may or may not use the software utility library GLib +# +# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL +# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. +# The variable enable_unit_tests is used by other macros in this file. +# +# Interface to module: +# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests +# enable_unit_tests: used in configure.ac for additional configuration +# --enable-unit-tests: 'yes' user instructs the module to build tests +# 'no' user instructs the module not to build tests +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ +AC_BEFORE([$0], [XORG_WITH_GLIB]) +AC_BEFORE([$0], [XORG_LD_WRAP]) +AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], + [Enable building unit test cases (default: ]_defopt[)]), + [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) +m4_undefine([_defopt]) +AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) +AC_MSG_CHECKING([whether to build unit test cases]) +AC_MSG_RESULT([$enable_unit_tests]) +]) # XORG_ENABLE_UNIT_TESTS + +# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) +# ------------------------------------------------------ +# Minimum version: 1.17.0 +# +# This macro enables a builder to enable/disable integration testing +# It makes no assumption about the test cases' implementation +# Test cases may or may not use Automake "Support for test suites" +# +# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support +# usually requires less dependencies and may be built and run under less +# stringent environments than integration tests. +# +# Interface to module: +# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests +# enable_integration_tests: used in configure.ac for additional configuration +# --enable-integration-tests: 'yes' user instructs the module to build tests +# 'no' user instructs the module not to build tests +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ +AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], + [Enable building integration test cases (default: ]_defopt[)]), + [enable_integration_tests=$enableval], + [enable_integration_tests=]_defopt) +m4_undefine([_defopt]) +AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], + [test "x$enable_integration_tests" != xno]) +AC_MSG_CHECKING([whether to build unit test cases]) +AC_MSG_RESULT([$enable_integration_tests]) +]) # XORG_ENABLE_INTEGRATION_TESTS + +# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.13.0 +# +# GLib is a library which provides advanced data structures and functions. +# This macro enables a module to test for the presence of Glib. +# +# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit +# test support usually requires less dependencies and may be built and run under +# less stringent environments than integration tests. +# +# Interface to module: +# HAVE_GLIB: used in makefiles to conditionally build targets +# with_glib: used in configure.ac to know if GLib has been found +# --with-glib: 'yes' user instructs the module to use glib +# 'no' user instructs the module not to use glib +# +AC_DEFUN([XORG_WITH_GLIB],[ +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], + [Use GLib library for unit testing (default: ]_defopt[)]), + [with_glib=$withval], [with_glib=]_defopt) +m4_undefine([_defopt]) + +have_glib=no +# Do not probe GLib if user explicitly disabled unit testing +if test "x$enable_unit_tests" != x"no"; then + # Do not probe GLib if user explicitly disabled it + if test "x$with_glib" != x"no"; then + m4_ifval( + [$1], + [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], + [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] + ) + fi +fi + +# Not having GLib when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Having unit testing disabled when GLib has been explicitly requested is an error +if test "x$enable_unit_tests" = x"no"; then + if test "x$with_glib" = x"yes"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Not having GLib when it has been explicitly requested is an error +if test "x$with_glib" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) + fi +fi + +AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) +]) # XORG_WITH_GLIB + +# XORG_LD_WRAP([required|optional]) +# --------------------------------- +# Minimum version: 1.13.0 +# +# Check if linker supports -wrap, passed via compiler flags +# +# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +# Argument added in 1.16.0 - default is "required", to match existing behavior +# of returning an error if enable_unit_tests is yes, and ld -wrap is not +# available, an argument of "optional" allows use when some unit tests require +# ld -wrap and others do not. +# +AC_DEFUN([XORG_LD_WRAP],[ +XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], + [AC_LANG_PROGRAM([#include <stdlib.h> + void __wrap_exit(int status) { return; }], + [exit(0);])]) +# Not having ld wrap when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then + if test "x$have_ld_wrap" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) + fi +fi +AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) +# +]) # XORG_LD_WRAP + +# XORG_CHECK_LINKER_FLAGS +# ----------------------- +# SYNOPSIS +# +# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) +# +# DESCRIPTION +# +# Check whether the given linker FLAGS work with the current language's +# linker, or whether they give an error. +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# PROGRAM-SOURCE is the program source to link with, if needed +# +# NOTE: Based on AX_CHECK_COMPILER_FLAGS. +# +# LICENSE +# +# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> +# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> +# Copyright (c) 2009 Matteo Frigo +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well.# +AC_DEFUN([XORG_CHECK_LINKER_FLAGS], +[AC_MSG_CHECKING([whether the linker accepts $1]) +dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: +AS_LITERAL_IF([$1], + [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ + ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], + AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS])], + [ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS]) +eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) +AC_MSG_RESULT($xorg_check_linker_flags) +if test "x$xorg_check_linker_flags" = xyes; then + m4_default([$2], :) +else + m4_default([$3], :) +fi +]) # XORG_CHECK_LINKER_FLAGS + +# XORG_MEMORY_CHECK_FLAGS +# ----------------------- +# Minimum version: 1.16.0 +# +# This macro attempts to find appropriate memory checking functionality +# for various platforms which unit testing code may use to catch various +# forms of memory allocation and access errors in testing. +# +# Interface to module: +# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging +# Usually added to TESTS_ENVIRONMENT in Makefile.am +# +# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. +# +AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ + +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], + [Environment variables to enable memory checking in tests]) + +# Check for different types of support on different platforms +case $host_os in + solaris*) + AC_CHECK_LIB([umem], [umem_alloc], + [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) + ;; + *-gnu*) # GNU libc - Value is used as a single byte bit pattern, + # both directly and inverted, so should not be 0 or 255. + malloc_debug_env='MALLOC_PERTURB_=15' + ;; + darwin*) + malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' + ;; + *bsd*) + malloc_debug_env='MallocPreScribble=1 MallocScribble=1' + ;; +esac + +# User supplied flags override default flags +if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then + malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" +fi + +AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) +]) # XORG_WITH_LINT + +# XORG_CHECK_MALLOC_ZERO +# ---------------------- +# Minimum version: 1.0.0 +# +# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if +# malloc(0) returns NULL. Packages should add one of these cflags to +# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. +AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ +AC_ARG_ENABLE(malloc0returnsnull, + AS_HELP_STRING([--enable-malloc0returnsnull], + [malloc(0) returns NULL (default: auto)]), + [MALLOC_ZERO_RETURNS_NULL=$enableval], + [MALLOC_ZERO_RETURNS_NULL=auto]) + +AC_MSG_CHECKING([whether malloc(0) returns NULL]) +if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then +AC_CACHE_VAL([xorg_cv_malloc0_returns_null], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([ +#include <stdlib.h> +],[ + char *m0, *r0, *c0, *p; + m0 = malloc(0); + p = malloc(10); + r0 = realloc(p,0); + c0 = calloc(0,10); + exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); +])], + [xorg_cv_malloc0_returns_null=yes], + [xorg_cv_malloc0_returns_null=no])]) +MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null +fi +AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) + +if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then + MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" + XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS + XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" +else + MALLOC_ZERO_CFLAGS="" + XMALLOC_ZERO_CFLAGS="" + XTMALLOC_ZERO_CFLAGS="" +fi + +AC_SUBST([MALLOC_ZERO_CFLAGS]) +AC_SUBST([XMALLOC_ZERO_CFLAGS]) +AC_SUBST([XTMALLOC_ZERO_CFLAGS]) +]) # XORG_CHECK_MALLOC_ZERO + +# XORG_WITH_LINT() +# ---------------- +# Minimum version: 1.1.0 +# +# This macro enables the use of a tool that flags some suspicious and +# non-portable constructs (likely to be bugs) in C language source code. +# It will attempt to locate the tool and use appropriate options. +# There are various lint type tools on different platforms. +# +# Interface to module: +# LINT: returns the path to the tool found on the platform +# or the value set to LINT on the configure cmd line +# also an Automake conditional +# LINT_FLAGS: an Automake variable with appropriate flags +# +# --with-lint: 'yes' user instructs the module to use lint +# 'no' user instructs the module not to use lint (default) +# +# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. +# If the user sets the value of LINT_FLAGS, they are used verbatim. +# +AC_DEFUN([XORG_WITH_LINT],[ + +AC_ARG_VAR([LINT], [Path to a lint-style command]) +AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) +AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], + [Use a lint-style source code checker (default: disabled)])], + [use_lint=$withval], [use_lint=no]) + +# Obtain platform specific info like program name and options +# The lint program on FreeBSD and NetBSD is different from the one on Solaris +case $host_os in + *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) + lint_name=splint + lint_options="-badflag" + ;; + *freebsd* | *netbsd*) + lint_name=lint + lint_options="-u -b" + ;; + *solaris*) + lint_name=lint + lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" + ;; +esac + +# Test for the presence of the program (either guessed by the code or spelled out by the user) +if test "x$use_lint" = x"yes" ; then + AC_PATH_PROG([LINT], [$lint_name]) + if test "x$LINT" = "x"; then + AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) + fi +elif test "x$use_lint" = x"no" ; then + if test "x$LINT" != "x"; then + AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) + fi +else + AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) +fi + +# User supplied flags override default flags +if test "x$LINT_FLAGS" != "x"; then + lint_options=$LINT_FLAGS +fi + +AC_SUBST([LINT_FLAGS],[$lint_options]) +AM_CONDITIONAL(LINT, [test "x$LINT" != x]) + +]) # XORG_WITH_LINT + +# XORG_LINT_LIBRARY(LIBNAME) +# -------------------------- +# Minimum version: 1.1.0 +# +# Sets up flags for building lint libraries for checking programs that call +# functions in the library. +# +# Interface to module: +# LINTLIB - Automake variable with the name of lint library file to make +# MAKE_LINT_LIB - Automake conditional +# +# --enable-lint-library: - 'yes' user instructs the module to created a lint library +# - 'no' user instructs the module not to create a lint library (default) + +AC_DEFUN([XORG_LINT_LIBRARY],[ +AC_REQUIRE([XORG_WITH_LINT]) +AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], + [Create lint library (default: disabled)])], + [make_lint_lib=$enableval], [make_lint_lib=no]) + +if test "x$make_lint_lib" = x"yes" ; then + LINTLIB=llib-l$1.ln + if test "x$LINT" = "x"; then + AC_MSG_ERROR([Cannot make lint library without --with-lint]) + fi +elif test "x$make_lint_lib" != x"no" ; then + AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) +fi + +AC_SUBST(LINTLIB) +AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) + +]) # XORG_LINT_LIBRARY + +# XORG_COMPILER_BRAND +# ------------------- +# Minimum version: 1.14.0 +# +# Checks for various brands of compilers and sets flags as appropriate: +# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" +# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" +# clang compiler - sets CLANGCC to "yes" +# Intel compiler - sets INTELCC to "yes" +# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" +# +AC_DEFUN([XORG_COMPILER_BRAND], [ +AC_LANG_CASE( + [C], [ + AC_REQUIRE([AC_PROG_CC_C99]) + ], + [C++], [ + AC_REQUIRE([AC_PROG_CXX]) + ] +) +AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) +AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) +AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) +]) # XORG_COMPILER_BRAND + +# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) +# --------------- +# Minimum version: 1.16.0 +# +# Test if the compiler works when passed the given flag as a command line argument. +# If it succeeds, the flag is appeneded to the given variable. If not, it tries the +# next flag in the list until there are no more options. +# +# Note that this does not guarantee that the compiler supports the flag as some +# compilers will simply ignore arguments that they do not understand, but we do +# attempt to weed out false positives by using -Werror=unknown-warning-option and +# -Werror=unused-command-line-argument +# +AC_DEFUN([XORG_TESTSET_CFLAG], [ +m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) +m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) + +AC_LANG_COMPILER_REQUIRE + +AC_LANG_CASE( + [C], [ + AC_REQUIRE([AC_PROG_CC_C99]) + define([PREFIX], [C]) + define([CACHE_PREFIX], [cc]) + define([COMPILER], [$CC]) + ], + [C++], [ + define([PREFIX], [CXX]) + define([CACHE_PREFIX], [cxx]) + define([COMPILER], [$CXX]) + ] +) + +[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" + +if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" + AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) + [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" +fi + +if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then + if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" + fi + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" + AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) + [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" +fi + +found="no" +m4_foreach([flag], m4_cdr($@), [ + if test $found = "no" ; then + if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" + fi + + PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" + +dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname + AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) + cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) + AC_CACHE_VAL($cacheid, + [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], + [eval $cacheid=yes], + [eval $cacheid=no])]) + + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" + + eval supported=\$$cacheid + AC_MSG_RESULT([$supported]) + if test "$supported" = "yes" ; then + $1="$$1 ]flag[" + found="yes" + fi + fi +]) +]) # XORG_TESTSET_CFLAG + +# XORG_COMPILER_FLAGS +# --------------- +# Minimum version: 1.16.0 +# +# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line +# arguments supported by the selected compiler which do NOT alter the generated +# code. These arguments will cause the compiler to print various warnings +# during compilation AND turn a conservative set of warnings into errors. +# +# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in +# future versions of util-macros as options are added to new compilers. +# +AC_DEFUN([XORG_COMPILER_FLAGS], [ +AC_REQUIRE([XORG_COMPILER_BRAND]) + +AC_ARG_ENABLE(selective-werror, + AS_HELP_STRING([--disable-selective-werror], + [Turn off selective compiler errors. (default: enabled)]), + [SELECTIVE_WERROR=$enableval], + [SELECTIVE_WERROR=yes]) + +AC_LANG_CASE( + [C], [ + define([PREFIX], [C]) + ], + [C++], [ + define([PREFIX], [CXX]) + ] +) +# -v is too short to test reliably with XORG_TESTSET_CFLAG +if test "x$SUNCC" = "xyes"; then + [BASE_]PREFIX[FLAGS]="-v" +else + [BASE_]PREFIX[FLAGS]="" +fi + +# This chunk of warnings were those that existed in the legacy CWARNFLAGS +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) + +AC_LANG_CASE( + [C], [ + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) + ] +) + +# This chunk adds additional warnings that could catch undesired effects. +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) + +# These are currently disabled because they are noisy. They will be enabled +# in the future once the codebase is sufficiently modernized to silence +# them. For now, I don't want them to drown out the other warnings. +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) + +# Turn some warnings into errors, so we don't accidently get successful builds +# when there are problems that should be fixed. + +if test "x$SELECTIVE_WERROR" = "xyes" ; then +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION +else +AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) +fi + +AC_SUBST([BASE_]PREFIX[FLAGS]) +]) # XORG_COMPILER_FLAGS + +# XORG_CWARNFLAGS +# --------------- +# Minimum version: 1.2.0 +# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) +# +# Defines CWARNFLAGS to enable C compiler warnings. +# +# This function is deprecated because it defines -fno-strict-aliasing +# which alters the code generated by the compiler. If -fno-strict-aliasing +# is needed, then it should be added explicitly in the module when +# it is updated to use BASE_CFLAGS. +# +AC_DEFUN([XORG_CWARNFLAGS], [ +AC_REQUIRE([XORG_COMPILER_FLAGS]) +AC_REQUIRE([XORG_COMPILER_BRAND]) +AC_LANG_CASE( + [C], [ + CWARNFLAGS="$BASE_CFLAGS" + if test "x$GCC" = xyes ; then + CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" + fi + AC_SUBST(CWARNFLAGS) + ] +) +]) # XORG_CWARNFLAGS + +# XORG_STRICT_OPTION +# ----------------------- +# Minimum version: 1.3.0 +# +# Add configure option to enable strict compilation flags, such as treating +# warnings as fatal errors. +# If --enable-strict-compilation is passed to configure, adds strict flags to +# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. +# +# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or +# when strict compilation is unconditionally desired. +AC_DEFUN([XORG_STRICT_OPTION], [ +AC_REQUIRE([XORG_CWARNFLAGS]) +AC_REQUIRE([XORG_COMPILER_FLAGS]) + +AC_ARG_ENABLE(strict-compilation, + AS_HELP_STRING([--enable-strict-compilation], + [Enable all warnings from compiler and make them errors (default: disabled)]), + [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) + +AC_LANG_CASE( + [C], [ + define([PREFIX], [C]) + ], + [C++], [ + define([PREFIX], [CXX]) + ] +) + +[STRICT_]PREFIX[FLAGS]="" +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) + +# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not +# activate it with -Werror, so we add it here explicitly. +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) + +if test "x$STRICT_COMPILE" = "xyes"; then + [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" + AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) +fi +AC_SUBST([STRICT_]PREFIX[FLAGS]) +AC_SUBST([BASE_]PREFIX[FLAGS]) +AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) +]) # XORG_STRICT_OPTION + +# XORG_DEFAULT_OPTIONS +# -------------------- +# Minimum version: 1.3.0 +# +# Defines default options for X.Org modules. +# +AC_DEFUN([XORG_DEFAULT_OPTIONS], [ +AC_REQUIRE([AC_PROG_INSTALL]) +XORG_COMPILER_FLAGS +XORG_CWARNFLAGS +XORG_STRICT_OPTION +XORG_RELEASE_VERSION +XORG_CHANGELOG +XORG_INSTALL +XORG_MANPAGE_SECTIONS +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], + [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) +]) # XORG_DEFAULT_OPTIONS + +# XORG_INSTALL() +# ---------------- +# Minimum version: 1.4.0 +# +# Defines the variable INSTALL_CMD as the command to copy +# INSTALL from $prefix/share/util-macros. +# +AC_DEFUN([XORG_INSTALL], [ +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` +INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ +mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ +echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +AC_SUBST([INSTALL_CMD]) +]) # XORG_INSTALL +dnl Copyright 2005 Red Hat, Inc +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XORG_RELEASE_VERSION +# -------------------- +# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. + +AC_DEFUN([XORG_RELEASE_VERSION],[ + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], + [`echo $PACKAGE_VERSION | cut -d . -f 1`], + [Major version of this package]) + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], + [$PVM], + [Minor version of this package]) + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` + if test "x$PVP" = "x"; then + PVP="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], + [$PVP], + [Patch version of this package]) +]) + +# XORG_CHANGELOG() +# ---------------- +# Minimum version: 1.2.0 +# +# Defines the variable CHANGELOG_CMD as the command to generate +# ChangeLog from git. +# +# +AC_DEFUN([XORG_CHANGELOG], [ +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ +|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" +AC_SUBST([CHANGELOG_CMD]) +]) # XORG_CHANGELOG + +dnl +dnl Copyright (c) 2005, 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 + +# XTRANS_TCP_FLAGS() +# ------------------ +# Find needed libraries for TCP sockets, and check for IPv6 support +AC_DEFUN([XTRANS_TCP_FLAGS],[ + # SVR4 hides these in libraries other than libc + AC_SEARCH_LIBS(socket, [socket]) + AC_SEARCH_LIBS(gethostbyname, [nsl]) + if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then + AC_CHECK_LIB([ws2_32],[main]) + fi + + # Needs to come after above checks for libsocket & libnsl for SVR4 systems + AC_ARG_ENABLE(ipv6, + AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), + [IPV6CONN=$enableval], + [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) + AC_MSG_CHECKING([if IPv6 support should be built]) + if test "$IPV6CONN" = "yes"; then + AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) + fi + AC_MSG_RESULT($IPV6CONN) + + # 4.3BSD-Reno added a new member to struct sockaddr_in + AC_CHECK_MEMBER([struct sockaddr_in.sin_len], + AC_DEFINE([BSD44SOCKETS],1, + [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> + ]) + + # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. + AC_CHECK_TYPES([socklen_t], [], [], [ +AC_INCLUDES_DEFAULT +#include <sys/socket.h>]) + + # XPG4v2/UNIX95 added msg_control - check to see if we need to define + # _XOPEN_SOURCE to get it (such as on Solaris) + AC_CHECK_MEMBER([struct msghdr.msg_control], [], [], + [ +AC_INCLUDES_DEFAULT +#include <sys/socket.h> + ]) + # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 + if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then + unset ac_cv_member_struct_msghdr_msg_control + AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600]) + AC_CHECK_MEMBER([struct msghdr.msg_control], + [AC_DEFINE([_XOPEN_SOURCE], [600], + [Defined if needed to expose struct msghdr.msg_control]) + ], [], [ +#define _XOPEN_SOURCE 600 +AC_INCLUDES_DEFAULT +#include <sys/socket.h> + ]) + fi + # If that didn't work, fall back to XPG5/UNIX98 with C89 + if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then + unset ac_cv_member_struct_msghdr_msg_control + AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500]) + AC_CHECK_MEMBER([struct msghdr.msg_control], + [AC_DEFINE([_XOPEN_SOURCE], [500], + [Defined if needed to expose struct msghdr.msg_control]) + ], [], [ +#define _XOPEN_SOURCE 500 +AC_INCLUDES_DEFAULT +#include <sys/socket.h> + ]) + fi + + +]) # XTRANS_TCP_FLAGS + +# XTRANS_CONNECTION_FLAGS() +# ------------------------- +# Standard checks for which Xtrans transports to use by the Xorg packages +# that use Xtrans functions +AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + [case $host_os in + mingw*) unixdef="no" ;; + *) unixdef="yes" ;; + esac] + AC_ARG_ENABLE(unix-transport, + AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), + [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) + AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) + if test "$UNIXCONN" = "yes"; then + AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) + fi + AC_MSG_RESULT($UNIXCONN) + AC_ARG_ENABLE(tcp-transport, + AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), + [TCPCONN=$enableval], [TCPCONN=yes]) + AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) + AC_MSG_RESULT($TCPCONN) + if test "$TCPCONN" = "yes"; then + AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) + XTRANS_TCP_FLAGS + fi + [case $host_os in + solaris*|sco*|sysv4*) localdef="yes" ;; + *) localdef="no" ;; + esac] + AC_ARG_ENABLE(local-transport, + AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), + [LOCALCONN=$enableval], [LOCALCONN=$localdef]) + AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) + AC_MSG_RESULT($LOCALCONN) + if test "$LOCALCONN" = "yes"; then + AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) + fi + +]) # XTRANS_CONNECTION_FLAGS + + +# XTRANS_SECURE_RPC_FLAGS() +# ------------------------- +# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS +# so that any necessary networking libraries are already found +AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], +[AC_REQUIRE([XTRANS_TCP_FLAGS]) + AC_ARG_ENABLE(secure-rpc, + AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), + [SECURE_RPC=$enableval], [SECURE_RPC="try"]) + + if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then + FOUND_SECURE_RPC="no" + AC_CHECK_FUNCS([authdes_seccreate authdes_create], + [FOUND_SECURE_RPC="yes"]) + if test "x$FOUND_SECURE_RPC" = "xno" ; then + if test "x$SECURE_RPC" = "xyes" ; then + AC_MSG_ERROR([Secure RPC requested, but required functions not found]) + fi + SECURE_RPC="no" + else + dnl FreeBSD keeps getsecretkey in librpcsvc + AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) + SECURE_RPC="yes" + fi + fi + AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) + if test "x$SECURE_RPC" = "xyes" ; then + AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) + fi + AC_MSG_RESULT($SECURE_RPC) +]) # XTRANS_SECURE_RPC_FLAGS + + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..dd0731a --- /dev/null +++ b/autogen.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf --force -v --install || exit 1 +cd $ORIGDIR || exit $? + +if test -z "$NOCONFIGURE"; then + exec $srcdir/configure "$@" +fi diff --git a/composite/Makefile.am b/composite/Makefile.am new file mode 100644 index 0000000..c2f5123 --- /dev/null +++ b/composite/Makefile.am @@ -0,0 +1,15 @@ +noinst_LTLIBRARIES = libcomposite.la + +AM_CFLAGS = $(DIX_CFLAGS) + +if XORG +sdk_HEADERS = compositeext.h +endif + +libcomposite_la_SOURCES = \ + compalloc.c \ + compext.c \ + compint.h \ + compinit.c \ + compoverlay.c \ + compwindow.c diff --git a/composite/Makefile.in b/composite/Makefile.in new file mode 100644 index 0000000..e05e773 --- /dev/null +++ b/composite/Makefile.in @@ -0,0 +1,807 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = composite +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libcomposite_la_LIBADD = +am_libcomposite_la_OBJECTS = compalloc.lo compext.lo compinit.lo \ + compoverlay.lo compwindow.lo +libcomposite_la_OBJECTS = $(am_libcomposite_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libcomposite_la_SOURCES) +DIST_SOURCES = $(libcomposite_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__sdk_HEADERS_DIST = compositeext.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libcomposite.la +AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = compositeext.h +libcomposite_la_SOURCES = \ + compalloc.c \ + compext.c \ + compint.h \ + compinit.c \ + compoverlay.c \ + compwindow.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign composite/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign composite/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libcomposite.la: $(libcomposite_la_OBJECTS) $(libcomposite_la_DEPENDENCIES) $(EXTRA_libcomposite_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libcomposite_la_OBJECTS) $(libcomposite_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compalloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compoverlay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compwindow.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +# 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/composite/compalloc.c b/composite/compalloc.c new file mode 100644 index 0000000..b7d731e --- /dev/null +++ b/composite/compalloc.c @@ -0,0 +1,694 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "compint.h" + +static void +compScreenUpdate(ScreenPtr pScreen) +{ + compCheckTree(pScreen); + compPaintChildrenToWindow(pScreen->root); +} + +static void +compBlockHandler(ScreenPtr pScreen, pointer pTimeout, pointer pReadmask) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + + pScreen->BlockHandler = cs->BlockHandler; + compScreenUpdate(pScreen); + (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); + + /* Next damage will restore the block handler */ + cs->BlockHandler = NULL; +} + +static void +compReportDamage(DamagePtr pDamage, RegionPtr pRegion, void *closure) +{ + WindowPtr pWin = (WindowPtr) closure; + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + CompWindowPtr cw = GetCompWindow(pWin); + + if (!cs->BlockHandler) { + cs->BlockHandler = pScreen->BlockHandler; + pScreen->BlockHandler = compBlockHandler; + } + cw->damaged = TRUE; + + /* Mark the ancestors */ + pWin = pWin->parent; + while (pWin) { + if (pWin->damagedDescendants) + break; + pWin->damagedDescendants = TRUE; + pWin = pWin->parent; + } +} + +static void +compDestroyDamage(DamagePtr pDamage, void *closure) +{ + WindowPtr pWin = (WindowPtr) closure; + CompWindowPtr cw = GetCompWindow(pWin); + + cw->damage = 0; +} + +static Bool +compMarkWindows(WindowPtr pWin, WindowPtr *ppLayerWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pLayerWin = pWin; + + if (!pWin->viewable) + return FALSE; + + (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); + (*pScreen->MarkWindow) (pLayerWin->parent); + + *ppLayerWin = pLayerWin; + + return TRUE; +} + +static void +compHandleMarkedWindows(WindowPtr pWin, WindowPtr pLayerWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther); + (*pScreen->HandleExposures) (pLayerWin->parent); + if (pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin, VTOther); +} + +/* + * Redirect one window for one client + */ +int +compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update) +{ + CompWindowPtr cw = GetCompWindow(pWin); + CompClientWindowPtr ccw; + CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen); + WindowPtr pLayerWin; + Bool anyMarked = FALSE; + + if (pWin == cs->pOverlayWin) { + return Success; + } + + if (!pWin->parent) + return BadMatch; + + /* + * Only one Manual update is allowed + */ + if (cw && update == CompositeRedirectManual) + for (ccw = cw->clients; ccw; ccw = ccw->next) + if (ccw->update == CompositeRedirectManual) + return BadAccess; + + /* + * Allocate per-client per-window structure + * The client *could* allocate multiple, but while supported, + * it is not expected to be common + */ + ccw = malloc(sizeof(CompClientWindowRec)); + if (!ccw) + return BadAlloc; + ccw->id = FakeClientID(pClient->index); + ccw->update = update; + /* + * Now make sure there's a per-window structure to hang this from + */ + if (!cw) { + cw = malloc(sizeof(CompWindowRec)); + if (!cw) { + free(ccw); + return BadAlloc; + } + cw->damage = DamageCreate(compReportDamage, + compDestroyDamage, + DamageReportNonEmpty, + FALSE, pWin->drawable.pScreen, pWin); + if (!cw->damage) { + free(ccw); + free(cw); + return BadAlloc; + } + + anyMarked = compMarkWindows(pWin, &pLayerWin); + + RegionNull(&cw->borderClip); + cw->update = CompositeRedirectAutomatic; + cw->clients = 0; + cw->oldx = COMP_ORIGIN_INVALID; + cw->oldy = COMP_ORIGIN_INVALID; + cw->damageRegistered = FALSE; + cw->damaged = FALSE; + cw->pOldPixmap = NullPixmap; + dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, cw); + } + ccw->next = cw->clients; + cw->clients = ccw; + if (!AddResource(ccw->id, CompositeClientWindowType, pWin)) + return BadAlloc; + if (ccw->update == CompositeRedirectManual) { + if (!anyMarked) + anyMarked = compMarkWindows(pWin, &pLayerWin); + + if (cw->damageRegistered) { + DamageUnregister(cw->damage); + cw->damageRegistered = FALSE; + } + cw->update = CompositeRedirectManual; + } + else if (cw->update == CompositeRedirectAutomatic && !cw->damageRegistered) { + if (!anyMarked) + anyMarked = compMarkWindows(pWin, &pLayerWin); + } + + if (!compCheckRedirect(pWin)) { + FreeResource(ccw->id, RT_NONE); + return BadAlloc; + } + + if (anyMarked) + compHandleMarkedWindows(pWin, pLayerWin); + + return Success; +} + +void +compRestoreWindow(WindowPtr pWin, PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pParent = pWin->parent; + + if (pParent->drawable.depth == pWin->drawable.depth) { + GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen); + int bw = (int) pWin->borderWidth; + int x = bw; + int y = bw; + int w = pWin->drawable.width; + int h = pWin->drawable.height; + + if (pGC) { + ChangeGCVal val; + + val.val = IncludeInferiors; + ChangeGC(NullClient, pGC, GCSubwindowMode, &val); + ValidateGC(&pWin->drawable, pGC); + (*pGC->ops->CopyArea) (&pPixmap->drawable, + &pWin->drawable, pGC, x, y, w, h, 0, 0); + FreeScratchGC(pGC); + } + } +} + +/* + * Free one of the per-client per-window resources, clearing + * redirect and the per-window pointer as appropriate + */ +void +compFreeClientWindow(WindowPtr pWin, XID id) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompWindowPtr cw = GetCompWindow(pWin); + CompClientWindowPtr ccw, *prev; + Bool anyMarked = FALSE; + WindowPtr pLayerWin; + PixmapPtr pPixmap = NULL; + + if (!cw) + return; + for (prev = &cw->clients; (ccw = *prev); prev = &ccw->next) { + if (ccw->id == id) { + *prev = ccw->next; + if (ccw->update == CompositeRedirectManual) + cw->update = CompositeRedirectAutomatic; + free(ccw); + break; + } + } + if (!cw->clients) { + anyMarked = compMarkWindows(pWin, &pLayerWin); + + if (pWin->redirectDraw != RedirectDrawNone) { + pPixmap = (*pScreen->GetWindowPixmap) (pWin); + compSetParentPixmap(pWin); + } + + if (cw->damage) + DamageDestroy(cw->damage); + + RegionUninit(&cw->borderClip); + + dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, NULL); + free(cw); + } + else if (cw->update == CompositeRedirectAutomatic && + !cw->damageRegistered && pWin->redirectDraw != RedirectDrawNone) { + anyMarked = compMarkWindows(pWin, &pLayerWin); + + DamageRegister(&pWin->drawable, cw->damage); + cw->damageRegistered = TRUE; + pWin->redirectDraw = RedirectDrawAutomatic; + DamageDamageRegion(&pWin->drawable, &pWin->borderSize); + } + + if (anyMarked) + compHandleMarkedWindows(pWin, pLayerWin); + + if (pPixmap) { + compRestoreWindow(pWin, pPixmap); + (*pScreen->DestroyPixmap) (pPixmap); + } +} + +/* + * This is easy, just free the appropriate resource. + */ + +int +compUnredirectWindow(ClientPtr pClient, WindowPtr pWin, int update) +{ + CompWindowPtr cw = GetCompWindow(pWin); + CompClientWindowPtr ccw; + + if (!cw) + return BadValue; + + for (ccw = cw->clients; ccw; ccw = ccw->next) + if (ccw->update == update && CLIENT_ID(ccw->id) == pClient->index) { + FreeResource(ccw->id, RT_NONE); + return Success; + } + return BadValue; +} + +/* + * Redirect all subwindows for one client + */ + +int +compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update) +{ + CompSubwindowsPtr csw = GetCompSubwindows(pWin); + CompClientWindowPtr ccw; + WindowPtr pChild; + + /* + * Only one Manual update is allowed + */ + if (csw && update == CompositeRedirectManual) + for (ccw = csw->clients; ccw; ccw = ccw->next) + if (ccw->update == CompositeRedirectManual) + return BadAccess; + /* + * Allocate per-client per-window structure + * The client *could* allocate multiple, but while supported, + * it is not expected to be common + */ + ccw = malloc(sizeof(CompClientWindowRec)); + if (!ccw) + return BadAlloc; + ccw->id = FakeClientID(pClient->index); + ccw->update = update; + /* + * Now make sure there's a per-window structure to hang this from + */ + if (!csw) { + csw = malloc(sizeof(CompSubwindowsRec)); + if (!csw) { + free(ccw); + return BadAlloc; + } + csw->update = CompositeRedirectAutomatic; + csw->clients = 0; + dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, csw); + } + /* + * Redirect all existing windows + */ + for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) { + int ret = compRedirectWindow(pClient, pChild, update); + + if (ret != Success) { + for (pChild = pChild->nextSib; pChild; pChild = pChild->nextSib) + (void) compUnredirectWindow(pClient, pChild, update); + if (!csw->clients) { + free(csw); + dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, 0); + } + free(ccw); + return ret; + } + } + /* + * Hook into subwindows list + */ + ccw->next = csw->clients; + csw->clients = ccw; + if (!AddResource(ccw->id, CompositeClientSubwindowsType, pWin)) + return BadAlloc; + if (ccw->update == CompositeRedirectManual) { + csw->update = CompositeRedirectManual; + /* + * tell damage extension that damage events for this client are + * critical output + */ + DamageExtSetCritical(pClient, TRUE); + pWin->inhibitBGPaint = TRUE; + } + return Success; +} + +/* + * Free one of the per-client per-subwindows resources, + * which frees one redirect per subwindow + */ +void +compFreeClientSubwindows(WindowPtr pWin, XID id) +{ + CompSubwindowsPtr csw = GetCompSubwindows(pWin); + CompClientWindowPtr ccw, *prev; + WindowPtr pChild; + + if (!csw) + return; + for (prev = &csw->clients; (ccw = *prev); prev = &ccw->next) { + if (ccw->id == id) { + ClientPtr pClient = clients[CLIENT_ID(id)]; + + *prev = ccw->next; + if (ccw->update == CompositeRedirectManual) { + /* + * tell damage extension that damage events for this client are + * critical output + */ + DamageExtSetCritical(pClient, FALSE); + csw->update = CompositeRedirectAutomatic; + pWin->inhibitBGPaint = FALSE; + if (pWin->mapped) + (*pWin->drawable.pScreen->ClearToBackground) (pWin, 0, 0, 0, + 0, TRUE); + } + + /* + * Unredirect all existing subwindows + */ + for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) + (void) compUnredirectWindow(pClient, pChild, ccw->update); + + free(ccw); + break; + } + } + + /* + * Check if all of the per-client records are gone + */ + if (!csw->clients) { + dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, NULL); + free(csw); + } +} + +/* + * This is easy, just free the appropriate resource. + */ + +int +compUnredirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update) +{ + CompSubwindowsPtr csw = GetCompSubwindows(pWin); + CompClientWindowPtr ccw; + + if (!csw) + return BadValue; + for (ccw = csw->clients; ccw; ccw = ccw->next) + if (ccw->update == update && CLIENT_ID(ccw->id) == pClient->index) { + FreeResource(ccw->id, RT_NONE); + return Success; + } + return BadValue; +} + +/* + * Add redirection information for one subwindow (during reparent) + */ + +int +compRedirectOneSubwindow(WindowPtr pParent, WindowPtr pWin) +{ + CompSubwindowsPtr csw = GetCompSubwindows(pParent); + CompClientWindowPtr ccw; + + if (!csw) + return Success; + for (ccw = csw->clients; ccw; ccw = ccw->next) { + int ret = compRedirectWindow(clients[CLIENT_ID(ccw->id)], + pWin, ccw->update); + + if (ret != Success) + return ret; + } + return Success; +} + +/* + * Remove redirection information for one subwindow (during reparent) + */ + +int +compUnredirectOneSubwindow(WindowPtr pParent, WindowPtr pWin) +{ + CompSubwindowsPtr csw = GetCompSubwindows(pParent); + CompClientWindowPtr ccw; + + if (!csw) + return Success; + for (ccw = csw->clients; ccw; ccw = ccw->next) { + int ret = compUnredirectWindow(clients[CLIENT_ID(ccw->id)], + pWin, ccw->update); + + if (ret != Success) + return ret; + } + return Success; +} + +static PixmapPtr +compNewPixmap(WindowPtr pWin, int x, int y, int w, int h) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pParent = pWin->parent; + PixmapPtr pPixmap; + + pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth, + CREATE_PIXMAP_USAGE_BACKING_PIXMAP); + + if (!pPixmap) + return 0; + + pPixmap->screen_x = x; + pPixmap->screen_y = y; + + if (pParent->drawable.depth == pWin->drawable.depth) { + GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen); + + if (pGC) { + ChangeGCVal val; + + val.val = IncludeInferiors; + ChangeGC(NullClient, pGC, GCSubwindowMode, &val); + ValidateGC(&pPixmap->drawable, pGC); + (*pGC->ops->CopyArea) (&pParent->drawable, + &pPixmap->drawable, + pGC, + x - pParent->drawable.x, + y - pParent->drawable.y, w, h, 0, 0); + FreeScratchGC(pGC); + } + } + else { + PictFormatPtr pSrcFormat = PictureWindowFormat(pParent); + PictFormatPtr pDstFormat = PictureWindowFormat(pWin); + XID inferiors = IncludeInferiors; + int error; + + PicturePtr pSrcPicture = CreatePicture(None, + &pParent->drawable, + pSrcFormat, + CPSubwindowMode, + &inferiors, + serverClient, &error); + + PicturePtr pDstPicture = CreatePicture(None, + &pPixmap->drawable, + pDstFormat, + 0, 0, + serverClient, &error); + + if (pSrcPicture && pDstPicture) { + CompositePicture(PictOpSrc, + pSrcPicture, + NULL, + pDstPicture, + x - pParent->drawable.x, + y - pParent->drawable.y, 0, 0, 0, 0, w, h); + } + if (pSrcPicture) + FreePicture(pSrcPicture, 0); + if (pDstPicture) + FreePicture(pDstPicture, 0); + } + return pPixmap; +} + +Bool +compAllocPixmap(WindowPtr pWin) +{ + int bw = (int) pWin->borderWidth; + int x = pWin->drawable.x - bw; + int y = pWin->drawable.y - bw; + int w = pWin->drawable.width + (bw << 1); + int h = pWin->drawable.height + (bw << 1); + PixmapPtr pPixmap = compNewPixmap(pWin, x, y, w, h); + CompWindowPtr cw = GetCompWindow(pWin); + + if (!pPixmap) + return FALSE; + if (cw->update == CompositeRedirectAutomatic) + pWin->redirectDraw = RedirectDrawAutomatic; + else + pWin->redirectDraw = RedirectDrawManual; + + compSetPixmap(pWin, pPixmap); + cw->oldx = COMP_ORIGIN_INVALID; + cw->oldy = COMP_ORIGIN_INVALID; + cw->damageRegistered = FALSE; + if (cw->update == CompositeRedirectAutomatic) { + DamageRegister(&pWin->drawable, cw->damage); + cw->damageRegistered = TRUE; + } + + /* Make sure our borderClip is up to date */ + RegionUninit(&cw->borderClip); + RegionCopy(&cw->borderClip, &pWin->borderClip); + cw->borderClipX = pWin->drawable.x; + cw->borderClipY = pWin->drawable.y; + + return TRUE; +} + +void +compSetParentPixmap(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pParentPixmap; + CompWindowPtr cw = GetCompWindow(pWin); + + if (cw->damageRegistered) { + DamageUnregister(cw->damage); + cw->damageRegistered = FALSE; + DamageEmpty(cw->damage); + } + /* + * Move the parent-constrained border clip region back into + * the window so that ValidateTree will handle the unmap + * case correctly. Unmap adds the window borderClip to the + * parent exposed area; regions beyond the parent cause crashes + */ + RegionCopy(&pWin->borderClip, &cw->borderClip); + pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent); + pWin->redirectDraw = RedirectDrawNone; + compSetPixmap(pWin, pParentPixmap); +} + +/* + * Make sure the pixmap is the right size and offset. Allocate a new + * pixmap to change size, adjust origin to change offset, leaving the + * old pixmap in cw->pOldPixmap so bits can be recovered + */ +Bool +compReallocPixmap(WindowPtr pWin, int draw_x, int draw_y, + unsigned int w, unsigned int h, int bw) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pOld = (*pScreen->GetWindowPixmap) (pWin); + PixmapPtr pNew; + CompWindowPtr cw = GetCompWindow(pWin); + int pix_x, pix_y; + int pix_w, pix_h; + + assert(cw && pWin->redirectDraw != RedirectDrawNone); + cw->oldx = pOld->screen_x; + cw->oldy = pOld->screen_y; + pix_x = draw_x - bw; + pix_y = draw_y - bw; + pix_w = w + (bw << 1); + pix_h = h + (bw << 1); + if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height) { + pNew = compNewPixmap(pWin, pix_x, pix_y, pix_w, pix_h); + if (!pNew) + return FALSE; + cw->pOldPixmap = pOld; + compSetPixmap(pWin, pNew); + } + else { + pNew = pOld; + cw->pOldPixmap = 0; + } + pNew->screen_x = pix_x; + pNew->screen_y = pix_y; + return TRUE; +} diff --git a/composite/compext.c b/composite/compext.c new file mode 100644 index 0000000..e4821c5 --- /dev/null +++ b/composite/compext.c @@ -0,0 +1,948 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "compint.h" +#include "xace.h" +#include "protocol-versions.h" +#include "extinit.h" + +static CARD8 CompositeReqCode; +static DevPrivateKeyRec CompositeClientPrivateKeyRec; + +#define CompositeClientPrivateKey (&CompositeClientPrivateKeyRec) +RESTYPE CompositeClientWindowType; +RESTYPE CompositeClientSubwindowsType; +RESTYPE CompositeClientOverlayType; + +typedef struct _CompositeClient { + int major_version; + int minor_version; +} CompositeClientRec, *CompositeClientPtr; + +#define GetCompositeClient(pClient) ((CompositeClientPtr) \ + dixLookupPrivate(&(pClient)->devPrivates, CompositeClientPrivateKey)) + +static void +CompositeClientCallback(CallbackListPtr *list, pointer closure, pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + CompositeClientPtr pCompositeClient = GetCompositeClient(pClient); + + pCompositeClient->major_version = 0; + pCompositeClient->minor_version = 0; +} + +static int +FreeCompositeClientWindow(pointer value, XID ccwid) +{ + WindowPtr pWin = value; + + compFreeClientWindow(pWin, ccwid); + return Success; +} + +static int +FreeCompositeClientSubwindows(pointer value, XID ccwid) +{ + WindowPtr pWin = value; + + compFreeClientSubwindows(pWin, ccwid); + return Success; +} + +static int +FreeCompositeClientOverlay(pointer value, XID ccwid) +{ + CompOverlayClientPtr pOc = (CompOverlayClientPtr) value; + + compFreeOverlayClient(pOc); + return Success; +} + +static int +ProcCompositeQueryVersion(ClientPtr client) +{ + CompositeClientPtr pCompositeClient = GetCompositeClient(client); + xCompositeQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0 + }; + + REQUEST(xCompositeQueryVersionReq); + + REQUEST_SIZE_MATCH(xCompositeQueryVersionReq); + if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR_VERSION) { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } + else { + rep.majorVersion = SERVER_COMPOSITE_MAJOR_VERSION; + rep.minorVersion = SERVER_COMPOSITE_MINOR_VERSION; + } + pCompositeClient->major_version = rep.majorVersion; + pCompositeClient->minor_version = rep.minorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.majorVersion); + swapl(&rep.minorVersion); + } + WriteToClient(client, sizeof(xCompositeQueryVersionReply), &rep); + return Success; +} + +#define VERIFY_WINDOW(pWindow, wid, client, mode) \ + do { \ + int err; \ + err = dixLookupResourceByType((pointer *) &pWindow, wid, \ + RT_WINDOW, client, mode); \ + if (err != Success) { \ + client->errorValue = wid; \ + return err; \ + } \ + } while (0) + +static int +ProcCompositeRedirectWindow(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xCompositeRedirectWindowReq); + + REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess | DixManageAccess | DixBlendAccess); + + return compRedirectWindow(client, pWin, stuff->update); +} + +static int +ProcCompositeRedirectSubwindows(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xCompositeRedirectSubwindowsReq); + + REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess | DixManageAccess | DixBlendAccess); + + return compRedirectSubwindows(client, pWin, stuff->update); +} + +static int +ProcCompositeUnredirectWindow(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xCompositeUnredirectWindowReq); + + REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess | DixManageAccess | DixBlendAccess); + + return compUnredirectWindow(client, pWin, stuff->update); +} + +static int +ProcCompositeUnredirectSubwindows(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xCompositeUnredirectSubwindowsReq); + + REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); + VERIFY_WINDOW(pWin, stuff->window, client, + DixSetAttrAccess | DixManageAccess | DixBlendAccess); + + return compUnredirectSubwindows(client, pWin, stuff->update); +} + +static int +ProcCompositeCreateRegionFromBorderClip(ClientPtr client) +{ + WindowPtr pWin; + CompWindowPtr cw; + RegionPtr pBorderClip, pRegion; + + REQUEST(xCompositeCreateRegionFromBorderClipReq); + + REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); + LEGAL_NEW_RESOURCE(stuff->region, client); + + cw = GetCompWindow(pWin); + if (cw) + pBorderClip = &cw->borderClip; + else + pBorderClip = &pWin->borderClip; + pRegion = XFixesRegionCopy(pBorderClip); + if (!pRegion) + return BadAlloc; + RegionTranslate(pRegion, -pWin->drawable.x, -pWin->drawable.y); + + if (!AddResource(stuff->region, RegionResType, (pointer) pRegion)) + return BadAlloc; + + return Success; +} + +static int +ProcCompositeNameWindowPixmap(ClientPtr client) +{ + WindowPtr pWin; + CompWindowPtr cw; + PixmapPtr pPixmap; + int rc; + + REQUEST(xCompositeNameWindowPixmapReq); + + REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); + + if (!pWin->viewable) + return BadMatch; + + LEGAL_NEW_RESOURCE(stuff->pixmap, client); + + cw = GetCompWindow(pWin); + if (!cw) + return BadMatch; + + pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); + if (!pPixmap) + return BadMatch; + + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP, + pPixmap, RT_WINDOW, pWin, DixCreateAccess); + if (rc != Success) + return rc; + + ++pPixmap->refcnt; + + if (!AddResource(stuff->pixmap, RT_PIXMAP, (pointer) pPixmap)) + return BadAlloc; + + return Success; +} + +static int +ProcCompositeGetOverlayWindow(ClientPtr client) +{ + REQUEST(xCompositeGetOverlayWindowReq); + xCompositeGetOverlayWindowReply rep; + WindowPtr pWin; + ScreenPtr pScreen; + CompScreenPtr cs; + CompOverlayClientPtr pOc; + int rc; + + REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); + pScreen = pWin->drawable.pScreen; + + /* + * Create an OverlayClient structure to mark this client's + * interest in the overlay window + */ + pOc = compCreateOverlayClient(pScreen, client); + if (pOc == NULL) + return BadAlloc; + + /* + * Make sure the overlay window exists + */ + cs = GetCompScreen(pScreen); + if (cs->pOverlayWin == NULL) + if (!compCreateOverlayWindow(pScreen)) { + FreeResource(pOc->resource, RT_NONE); + return BadAlloc; + } + + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cs->pOverlayWin->drawable.id, + RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL, DixGetAttrAccess); + if (rc != Success) { + FreeResource(pOc->resource, RT_NONE); + return rc; + } + + rep = (xCompositeGetOverlayWindowReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .overlayWin = cs->pOverlayWin->drawable.id + }; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.overlayWin); + } + WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep); + + return Success; +} + +static int +ProcCompositeReleaseOverlayWindow(ClientPtr client) +{ + REQUEST(xCompositeReleaseOverlayWindowReq); + WindowPtr pWin; + ScreenPtr pScreen; + CompOverlayClientPtr pOc; + + REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); + VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); + pScreen = pWin->drawable.pScreen; + + /* + * Has client queried a reference to the overlay window + * on this screen? If not, generate an error. + */ + pOc = compFindOverlayClient(pWin->drawable.pScreen, client); + if (pOc == NULL) + return BadMatch; + + /* The delete function will free the client structure */ + FreeResource(pOc->resource, RT_NONE); + + return Success; +} + +static int (*ProcCompositeVector[CompositeNumberRequests]) (ClientPtr) = { +ProcCompositeQueryVersion, + ProcCompositeRedirectWindow, + ProcCompositeRedirectSubwindows, + ProcCompositeUnredirectWindow, + ProcCompositeUnredirectSubwindows, + ProcCompositeCreateRegionFromBorderClip, + ProcCompositeNameWindowPixmap, + ProcCompositeGetOverlayWindow, ProcCompositeReleaseOverlayWindow,}; + +static int +ProcCompositeDispatch(ClientPtr client) +{ + REQUEST(xReq); + + if (stuff->data < CompositeNumberRequests) + return (*ProcCompositeVector[stuff->data]) (client); + else + return BadRequest; +} + +static int +SProcCompositeQueryVersion(ClientPtr client) +{ + REQUEST(xCompositeQueryVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeQueryVersionReq); + swapl(&stuff->majorVersion); + swapl(&stuff->minorVersion); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeRedirectWindow(ClientPtr client) +{ + REQUEST(xCompositeRedirectWindowReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); + swapl(&stuff->window); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeRedirectSubwindows(ClientPtr client) +{ + REQUEST(xCompositeRedirectSubwindowsReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); + swapl(&stuff->window); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeUnredirectWindow(ClientPtr client) +{ + REQUEST(xCompositeUnredirectWindowReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); + swapl(&stuff->window); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeUnredirectSubwindows(ClientPtr client) +{ + REQUEST(xCompositeUnredirectSubwindowsReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); + swapl(&stuff->window); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeCreateRegionFromBorderClip(ClientPtr client) +{ + REQUEST(xCompositeCreateRegionFromBorderClipReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); + swapl(&stuff->region); + swapl(&stuff->window); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeNameWindowPixmap(ClientPtr client) +{ + REQUEST(xCompositeNameWindowPixmapReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); + swapl(&stuff->window); + swapl(&stuff->pixmap); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeGetOverlayWindow(ClientPtr client) +{ + REQUEST(xCompositeGetOverlayWindowReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); + swapl(&stuff->window); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int +SProcCompositeReleaseOverlayWindow(ClientPtr client) +{ + REQUEST(xCompositeReleaseOverlayWindowReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); + swapl(&stuff->window); + return (*ProcCompositeVector[stuff->compositeReqType]) (client); +} + +static int (*SProcCompositeVector[CompositeNumberRequests]) (ClientPtr) = { +SProcCompositeQueryVersion, + SProcCompositeRedirectWindow, + SProcCompositeRedirectSubwindows, + SProcCompositeUnredirectWindow, + SProcCompositeUnredirectSubwindows, + SProcCompositeCreateRegionFromBorderClip, + SProcCompositeNameWindowPixmap, + SProcCompositeGetOverlayWindow, SProcCompositeReleaseOverlayWindow,}; + +static int +SProcCompositeDispatch(ClientPtr client) +{ + REQUEST(xReq); + + if (stuff->data < CompositeNumberRequests) + return (*SProcCompositeVector[stuff->data]) (client); + else + return BadRequest; +} + +/** @see GetDefaultBytes */ +static void +GetCompositeClientWindowBytes(pointer value, XID id, ResourceSizePtr size) +{ + WindowPtr window = value; + + /* Currently only pixmap bytes are reported to clients. */ + size->resourceSize = 0; + + /* Calculate pixmap reference sizes. */ + size->pixmapRefSize = 0; + if (window->redirectDraw != RedirectDrawNone) + { + SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); + ResourceSizeRec pixmapSize = { 0, 0 }; + ScreenPtr screen = window->drawable.pScreen; + PixmapPtr pixmap = screen->GetWindowPixmap(window); + pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); + size->pixmapRefSize += pixmapSize.pixmapRefSize; + } +} + +void +CompositeExtensionInit(void) +{ + ExtensionEntry *extEntry; + int s; + + /* Assume initialization is going to fail */ + noCompositeExtension = TRUE; + + for (s = 0; s < screenInfo.numScreens; s++) { + ScreenPtr pScreen = screenInfo.screens[s]; + VisualPtr vis; + + /* Composite on 8bpp pseudocolor root windows appears to fail, so + * just disable it on anything pseudocolor for safety. + */ + for (vis = pScreen->visuals; vis->vid != pScreen->rootVisual; vis++); + if ((vis->class | DynamicClass) == PseudoColor) + return; + + /* Ensure that Render is initialized, which is required for automatic + * compositing. + */ + if (GetPictureScreenIfSet(pScreen) == NULL) + return; + } + + CompositeClientWindowType = CreateNewResourceType + (FreeCompositeClientWindow, "CompositeClientWindow"); + if (!CompositeClientWindowType) + return; + + SetResourceTypeSizeFunc(CompositeClientWindowType, + GetCompositeClientWindowBytes); + + CompositeClientSubwindowsType = CreateNewResourceType + (FreeCompositeClientSubwindows, "CompositeClientSubwindows"); + if (!CompositeClientSubwindowsType) + return; + + CompositeClientOverlayType = CreateNewResourceType + (FreeCompositeClientOverlay, "CompositeClientOverlay"); + if (!CompositeClientOverlayType) + return; + + if (!dixRegisterPrivateKey(&CompositeClientPrivateKeyRec, PRIVATE_CLIENT, + sizeof(CompositeClientRec))) + return; + + if (!AddCallback(&ClientStateCallback, CompositeClientCallback, 0)) + return; + + for (s = 0; s < screenInfo.numScreens; s++) + if (!compScreenInit(screenInfo.screens[s])) + return; + + extEntry = AddExtension(COMPOSITE_NAME, 0, 0, + ProcCompositeDispatch, SProcCompositeDispatch, + NULL, StandardMinorOpcode); + if (!extEntry) + return; + CompositeReqCode = (CARD8) extEntry->base; + + miRegisterRedirectBorderClipProc(compSetRedirectBorderClip, + compGetRedirectBorderClip); + + /* Initialization succeeded */ + noCompositeExtension = FALSE; +} + +#ifdef PANORAMIX +#include "panoramiXsrv.h" + +int (*PanoramiXSaveCompositeVector[CompositeNumberRequests]) (ClientPtr); + +static int +PanoramiXCompositeRedirectWindow(ClientPtr client) +{ + PanoramiXRes *win; + int rc = 0, j; + + REQUEST(xCompositeRedirectWindowReq); + + REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); + + if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, + client, DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); + if (rc != Success) + break; + } + + return rc; +} + +static int +PanoramiXCompositeRedirectSubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int rc = 0, j; + + REQUEST(xCompositeRedirectSubwindowsReq); + + REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); + + if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, + client, DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); + if (rc != Success) + break; + } + + return rc; +} + +static int +PanoramiXCompositeUnredirectWindow(ClientPtr client) +{ + PanoramiXRes *win; + int rc = 0, j; + + REQUEST(xCompositeUnredirectWindowReq); + + REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); + + if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, + client, DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); + if (rc != Success) + break; + } + + return rc; +} + +static int +PanoramiXCompositeUnredirectSubwindows(ClientPtr client) +{ + PanoramiXRes *win; + int rc = 0, j; + + REQUEST(xCompositeUnredirectSubwindowsReq); + + REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); + + if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, + client, DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + + FOR_NSCREENS_FORWARD(j) { + stuff->window = win->info[j].id; + rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); + if (rc != Success) + break; + } + + return rc; +} + +static int +PanoramiXCompositeNameWindowPixmap(ClientPtr client) +{ + WindowPtr pWin; + CompWindowPtr cw; + PixmapPtr pPixmap; + int rc; + PanoramiXRes *win, *newPix; + int i; + + REQUEST(xCompositeNameWindowPixmapReq); + + REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); + + if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, + client, DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + + LEGAL_NEW_RESOURCE(stuff->pixmap, client); + + if (!(newPix = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + newPix->type = XRT_PIXMAP; + newPix->u.pix.shared = FALSE; + panoramix_setup_ids(newPix, client, stuff->pixmap); + + FOR_NSCREENS(i) { + rc = dixLookupResourceByType((void **) &pWin, win->info[i].id, + RT_WINDOW, client, DixGetAttrAccess); + if (rc != Success) { + client->errorValue = stuff->window; + free(newPix); + return rc; + } + + if (!pWin->viewable) { + free(newPix); + return BadMatch; + } + + cw = GetCompWindow(pWin); + if (!cw) { + free(newPix); + return BadMatch; + } + + pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); + if (!pPixmap) { + free(newPix); + return BadMatch; + } + + if (!AddResource(newPix->info[i].id, RT_PIXMAP, (pointer) pPixmap)) + return BadAlloc; + + ++pPixmap->refcnt; + } + + if (!AddResource(stuff->pixmap, XRT_PIXMAP, (pointer) newPix)) + return BadAlloc; + + return Success; +} + +static int +PanoramiXCompositeGetOverlayWindow(ClientPtr client) +{ + REQUEST(xCompositeGetOverlayWindowReq); + xCompositeGetOverlayWindowReply rep; + WindowPtr pWin; + ScreenPtr pScreen; + CompScreenPtr cs; + CompOverlayClientPtr pOc; + int rc; + PanoramiXRes *win, *overlayWin = NULL; + int i; + + REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); + + if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, + client, DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + + cs = GetCompScreen(screenInfo.screens[0]); + if (!cs->pOverlayWin) { + if (!(overlayWin = malloc(sizeof(PanoramiXRes)))) + return BadAlloc; + + overlayWin->type = XRT_WINDOW; + overlayWin->u.win.root = FALSE; + } + + FOR_NSCREENS_BACKWARD(i) { + rc = dixLookupResourceByType((pointer *) &pWin, win->info[i].id, + RT_WINDOW, client, DixGetAttrAccess); + if (rc != Success) { + client->errorValue = stuff->window; + free(overlayWin); + return rc; + } + pScreen = pWin->drawable.pScreen; + + /* + * Create an OverlayClient structure to mark this client's + * interest in the overlay window + */ + pOc = compCreateOverlayClient(pScreen, client); + if (pOc == NULL) { + free(overlayWin); + return BadAlloc; + } + + /* + * Make sure the overlay window exists + */ + cs = GetCompScreen(pScreen); + if (cs->pOverlayWin == NULL) + if (!compCreateOverlayWindow(pScreen)) { + FreeResource(pOc->resource, RT_NONE); + free(overlayWin); + return BadAlloc; + } + + rc = XaceHook(XACE_RESOURCE_ACCESS, client, + cs->pOverlayWin->drawable.id, + RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL, + DixGetAttrAccess); + if (rc != Success) { + FreeResource(pOc->resource, RT_NONE); + free(overlayWin); + return rc; + } + } + + if (overlayWin) { + FOR_NSCREENS(i) { + cs = GetCompScreen(screenInfo.screens[i]); + overlayWin->info[i].id = cs->pOverlayWin->drawable.id; + } + + AddResource(overlayWin->info[0].id, XRT_WINDOW, overlayWin); + } + + cs = GetCompScreen(screenInfo.screens[0]); + + rep = (xCompositeGetOverlayWindowReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .overlayWin = cs->pOverlayWin->drawable.id + }; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.overlayWin); + } + WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep); + + return Success; +} + +static int +PanoramiXCompositeReleaseOverlayWindow(ClientPtr client) +{ + REQUEST(xCompositeReleaseOverlayWindowReq); + WindowPtr pWin; + ScreenPtr pScreen; + CompOverlayClientPtr pOc; + PanoramiXRes *win; + int i, rc; + + REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); + + if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, + client, DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + + FOR_NSCREENS_BACKWARD(i) { + if ((rc = dixLookupResourceByType((void **) &pWin, win->info[i].id, + XRT_WINDOW, client, + DixUnknownAccess))) { + client->errorValue = stuff->window; + return rc; + } + pScreen = pWin->drawable.pScreen; + + /* + * Has client queried a reference to the overlay window + * on this screen? If not, generate an error. + */ + pOc = compFindOverlayClient(pWin->drawable.pScreen, client); + if (pOc == NULL) + return BadMatch; + + /* The delete function will free the client structure */ + FreeResource(pOc->resource, RT_NONE); + } + + return Success; +} + +void +PanoramiXCompositeInit(void) +{ + int i; + + for (i = 0; i < CompositeNumberRequests; i++) + PanoramiXSaveCompositeVector[i] = ProcCompositeVector[i]; + /* + * Stuff in Xinerama aware request processing hooks + */ + ProcCompositeVector[X_CompositeRedirectWindow] = + PanoramiXCompositeRedirectWindow; + ProcCompositeVector[X_CompositeRedirectSubwindows] = + PanoramiXCompositeRedirectSubwindows; + ProcCompositeVector[X_CompositeUnredirectWindow] = + PanoramiXCompositeUnredirectWindow; + ProcCompositeVector[X_CompositeUnredirectSubwindows] = + PanoramiXCompositeUnredirectSubwindows; + ProcCompositeVector[X_CompositeNameWindowPixmap] = + PanoramiXCompositeNameWindowPixmap; + ProcCompositeVector[X_CompositeGetOverlayWindow] = + PanoramiXCompositeGetOverlayWindow; + ProcCompositeVector[X_CompositeReleaseOverlayWindow] = + PanoramiXCompositeReleaseOverlayWindow; +} + +void +PanoramiXCompositeReset(void) +{ + int i; + + for (i = 0; i < CompositeNumberRequests; i++) + ProcCompositeVector[i] = PanoramiXSaveCompositeVector[i]; +} + +#endif diff --git a/composite/compinit.c b/composite/compinit.c new file mode 100644 index 0000000..3c91091 --- /dev/null +++ b/composite/compinit.c @@ -0,0 +1,419 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "compint.h" +#include "compositeext.h" + +DevPrivateKeyRec CompScreenPrivateKeyRec; +DevPrivateKeyRec CompWindowPrivateKeyRec; +DevPrivateKeyRec CompSubwindowsPrivateKeyRec; + +static Bool +compCloseScreen(ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + Bool ret; + + free(cs->alternateVisuals); + + pScreen->CloseScreen = cs->CloseScreen; + pScreen->InstallColormap = cs->InstallColormap; + pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes; + pScreen->ReparentWindow = cs->ReparentWindow; + pScreen->ConfigNotify = cs->ConfigNotify; + pScreen->MoveWindow = cs->MoveWindow; + pScreen->ResizeWindow = cs->ResizeWindow; + pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; + + pScreen->ClipNotify = cs->ClipNotify; + pScreen->UnrealizeWindow = cs->UnrealizeWindow; + pScreen->RealizeWindow = cs->RealizeWindow; + pScreen->DestroyWindow = cs->DestroyWindow; + pScreen->CreateWindow = cs->CreateWindow; + pScreen->CopyWindow = cs->CopyWindow; + pScreen->PositionWindow = cs->PositionWindow; + + pScreen->GetImage = cs->GetImage; + pScreen->SourceValidate = cs->SourceValidate; + + free(cs); + dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL); + ret = (*pScreen->CloseScreen) (pScreen); + + return ret; +} + +static void +compInstallColormap(ColormapPtr pColormap) +{ + VisualPtr pVisual = pColormap->pVisual; + ScreenPtr pScreen = pColormap->pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + int a; + + for (a = 0; a < cs->numAlternateVisuals; a++) + if (pVisual->vid == cs->alternateVisuals[a]) + return; + pScreen->InstallColormap = cs->InstallColormap; + (*pScreen->InstallColormap) (pColormap); + cs->InstallColormap = pScreen->InstallColormap; + pScreen->InstallColormap = compInstallColormap; +} + +/* Fake backing store via automatic redirection */ +static Bool +compChangeWindowAttributes(WindowPtr pWin, unsigned long mask) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + Bool ret; + + pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes; + ret = pScreen->ChangeWindowAttributes(pWin, mask); + + if (ret && (mask & CWBackingStore) && + pScreen->backingStoreSupport != NotUseful) { + if (pWin->backingStore != NotUseful && !pWin->backStorage) { + compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); + pWin->backStorage = (pointer) (intptr_t) 1; + } + else if (pWin->backingStore == NotUseful && pWin->backStorage) { + compUnredirectWindow(serverClient, pWin, + CompositeRedirectAutomatic); + pWin->backStorage = NULL; + } + } + + pScreen->ChangeWindowAttributes = compChangeWindowAttributes; + + return ret; +} + +static void +compGetImage(DrawablePtr pDrawable, + int sx, int sy, + int w, int h, + unsigned int format, unsigned long planemask, char *pdstLine) +{ + ScreenPtr pScreen = pDrawable->pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + + pScreen->GetImage = cs->GetImage; + if (pDrawable->type == DRAWABLE_WINDOW) + compPaintChildrenToWindow((WindowPtr) pDrawable); + (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine); + cs->GetImage = pScreen->GetImage; + pScreen->GetImage = compGetImage; +} + +static void +compSourceValidate(DrawablePtr pDrawable, + int x, int y, + int width, int height, unsigned int subWindowMode) +{ + ScreenPtr pScreen = pDrawable->pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + + pScreen->SourceValidate = cs->SourceValidate; + if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == IncludeInferiors) + compPaintChildrenToWindow((WindowPtr) pDrawable); + if (pScreen->SourceValidate) + (*pScreen->SourceValidate) (pDrawable, x, y, width, height, + subWindowMode); + cs->SourceValidate = pScreen->SourceValidate; + pScreen->SourceValidate = compSourceValidate; +} + +/* + * Add alternate visuals -- always expose an ARGB32 and RGB24 visual + */ + +static DepthPtr +compFindVisuallessDepth(ScreenPtr pScreen, int d) +{ + int i; + + for (i = 0; i < pScreen->numDepths; i++) { + DepthPtr depth = &pScreen->allowedDepths[i]; + + if (depth->depth == d) { + /* + * Make sure it doesn't have visuals already + */ + if (depth->numVids) + return 0; + /* + * looks fine + */ + return depth; + } + } + /* + * If there isn't one, then it's gonna be hard to have + * an associated visual + */ + return 0; +} + +/* + * Add a list of visual IDs to the list of visuals to implicitly redirect. + */ +static Bool +compRegisterAlternateVisuals(CompScreenPtr cs, VisualID * vids, int nVisuals) +{ + VisualID *p; + + p = realloc(cs->alternateVisuals, + sizeof(VisualID) * (cs->numAlternateVisuals + nVisuals)); + if (p == NULL) + return FALSE; + + memcpy(&p[cs->numAlternateVisuals], vids, sizeof(VisualID) * nVisuals); + + cs->alternateVisuals = p; + cs->numAlternateVisuals += nVisuals; + + return TRUE; +} + +Bool +CompositeRegisterAlternateVisuals(ScreenPtr pScreen, VisualID * vids, + int nVisuals) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + + return compRegisterAlternateVisuals(cs, vids, nVisuals); +} + +typedef struct _alternateVisual { + int depth; + CARD32 format; +} CompAlternateVisual; + +static CompAlternateVisual altVisuals[] = { +#if COMP_INCLUDE_RGB24_VISUAL + {24, PICT_r8g8b8}, +#endif + {32, PICT_a8r8g8b8}, +}; + +static const int NUM_COMP_ALTERNATE_VISUALS = sizeof(altVisuals) / + sizeof(CompAlternateVisual); + +static Bool +compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, + CompAlternateVisual * alt) +{ + VisualPtr visual; + DepthPtr depth; + PictFormatPtr pPictFormat; + unsigned long alphaMask; + + /* + * The ARGB32 visual is always available. Other alternate depth visuals + * are only provided if their depth is less than the root window depth. + * There's no deep reason for this. + */ + if (alt->depth >= pScreen->rootDepth && alt->depth != 32) + return FALSE; + + depth = compFindVisuallessDepth(pScreen, alt->depth); + if (!depth) + /* alt->depth doesn't exist or already has alternate visuals. */ + return TRUE; + + pPictFormat = PictureMatchFormat(pScreen, alt->depth, alt->format); + if (!pPictFormat) + return FALSE; + + if (ResizeVisualArray(pScreen, 1, depth) == FALSE) { + return FALSE; + } + + visual = pScreen->visuals + (pScreen->numVisuals - 1); /* the new one */ + + /* Initialize the visual */ + visual->bitsPerRGBValue = 8; + if (PICT_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) { + visual->class = PseudoColor; + visual->nplanes = PICT_FORMAT_BPP(alt->format); + visual->ColormapEntries = 1 << visual->nplanes; + } + else { + DirectFormatRec *direct = &pPictFormat->direct; + + visual->class = TrueColor; + visual->redMask = ((unsigned long) direct->redMask) << direct->red; + visual->greenMask = + ((unsigned long) direct->greenMask) << direct->green; + visual->blueMask = ((unsigned long) direct->blueMask) << direct->blue; + alphaMask = ((unsigned long) direct->alphaMask) << direct->alpha; + visual->offsetRed = direct->red; + visual->offsetGreen = direct->green; + visual->offsetBlue = direct->blue; + /* + * Include A bits in this (unlike GLX which includes only RGB) + * This lets DIX compute suitable masks for colormap allocations + */ + visual->nplanes = Ones(visual->redMask | + visual->greenMask | + visual->blueMask | alphaMask); + /* find widest component */ + visual->ColormapEntries = (1 << max(Ones(visual->redMask), + max(Ones(visual->greenMask), + Ones(visual->blueMask)))); + } + + /* remember the visual ID to detect auto-update windows */ + compRegisterAlternateVisuals(cs, &visual->vid, 1); + + return TRUE; +} + +static Bool +compAddAlternateVisuals(ScreenPtr pScreen, CompScreenPtr cs) +{ + int alt, ret = 0; + + for (alt = 0; alt < NUM_COMP_ALTERNATE_VISUALS; alt++) + ret |= compAddAlternateVisual(pScreen, cs, altVisuals + alt); + + return ! !ret; +} + +Bool +compScreenInit(ScreenPtr pScreen) +{ + CompScreenPtr cs; + + if (!dixRegisterPrivateKey(&CompScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&CompWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&CompSubwindowsPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + + if (GetCompScreen(pScreen)) + return TRUE; + cs = (CompScreenPtr) malloc(sizeof(CompScreenRec)); + if (!cs) + return FALSE; + + cs->overlayWid = FakeClientID(0); + cs->pOverlayWin = NULL; + cs->pOverlayClients = NULL; + + cs->numAlternateVisuals = 0; + cs->alternateVisuals = NULL; + + if (!compAddAlternateVisuals(pScreen, cs)) { + free(cs); + return FALSE; + } + + if (!disableBackingStore) + pScreen->backingStoreSupport = WhenMapped; + + cs->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = compPositionWindow; + + cs->CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = compCopyWindow; + + cs->CreateWindow = pScreen->CreateWindow; + pScreen->CreateWindow = compCreateWindow; + + cs->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = compDestroyWindow; + + cs->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = compRealizeWindow; + + cs->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = compUnrealizeWindow; + + cs->ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = compClipNotify; + + cs->ConfigNotify = pScreen->ConfigNotify; + pScreen->ConfigNotify = compConfigNotify; + + cs->MoveWindow = pScreen->MoveWindow; + pScreen->MoveWindow = compMoveWindow; + + cs->ResizeWindow = pScreen->ResizeWindow; + pScreen->ResizeWindow = compResizeWindow; + + cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; + pScreen->ChangeBorderWidth = compChangeBorderWidth; + + cs->ReparentWindow = pScreen->ReparentWindow; + pScreen->ReparentWindow = compReparentWindow; + + cs->InstallColormap = pScreen->InstallColormap; + pScreen->InstallColormap = compInstallColormap; + + cs->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; + pScreen->ChangeWindowAttributes = compChangeWindowAttributes; + + cs->BlockHandler = NULL; + + cs->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = compCloseScreen; + + cs->GetImage = pScreen->GetImage; + pScreen->GetImage = compGetImage; + + cs->SourceValidate = pScreen->SourceValidate; + pScreen->SourceValidate = compSourceValidate; + + dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, cs); + + RegisterRealChildHeadProc(CompositeRealChildHead); + + return TRUE; +} diff --git a/composite/compint.h b/composite/compint.h new file mode 100644 index 0000000..45b5824 --- /dev/null +++ b/composite/compint.h @@ -0,0 +1,332 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _COMPINT_H_ +#define _COMPINT_H_ + +#include "misc.h" +#include "scrnintstr.h" +#include "os.h" +#include "regionstr.h" +#include "validate.h" +#include "windowstr.h" +#include "input.h" +#include "resource.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "servermd.h" +#include "dixevents.h" +#include "globals.h" +#include "picturestr.h" +#include "extnsionst.h" +#include "privates.h" +#include "mi.h" +#include "damage.h" +#include "damageextint.h" +#include "xfixes.h" +#include <X11/extensions/compositeproto.h> +#include "compositeext.h" +#include <assert.h> + +/* + * enable this for debugging + + #define COMPOSITE_DEBUG + */ + +typedef struct _CompClientWindow { + struct _CompClientWindow *next; + XID id; + int update; +} CompClientWindowRec, *CompClientWindowPtr; + +typedef struct _CompWindow { + RegionRec borderClip; + DamagePtr damage; /* for automatic update mode */ + Bool damageRegistered; + Bool damaged; + int update; + CompClientWindowPtr clients; + int oldx; + int oldy; + PixmapPtr pOldPixmap; + int borderClipX, borderClipY; +} CompWindowRec, *CompWindowPtr; + +#define COMP_ORIGIN_INVALID 0x80000000 + +typedef struct _CompSubwindows { + int update; + CompClientWindowPtr clients; +} CompSubwindowsRec, *CompSubwindowsPtr; + +#ifndef COMP_INCLUDE_RGB24_VISUAL +#define COMP_INCLUDE_RGB24_VISUAL 0 +#endif + +typedef struct _CompOverlayClientRec *CompOverlayClientPtr; + +typedef struct _CompOverlayClientRec { + CompOverlayClientPtr pNext; + ClientPtr pClient; + ScreenPtr pScreen; + XID resource; +} CompOverlayClientRec; + +typedef struct _CompScreen { + PositionWindowProcPtr PositionWindow; + CopyWindowProcPtr CopyWindow; + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + ClipNotifyProcPtr ClipNotify; + /* + * Called from ConfigureWindow, these + * three track changes to the offscreen storage + * geometry + */ + ConfigNotifyProcPtr ConfigNotify; + MoveWindowProcPtr MoveWindow; + ResizeWindowProcPtr ResizeWindow; + ChangeBorderWidthProcPtr ChangeBorderWidth; + /* + * Reparenting has an effect on Subwindows redirect + */ + ReparentWindowProcPtr ReparentWindow; + + /* + * Colormaps for new visuals better not get installed + */ + InstallColormapProcPtr InstallColormap; + + /* + * Fake backing store via automatic redirection + */ + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + + ScreenBlockHandlerProcPtr BlockHandler; + CloseScreenProcPtr CloseScreen; + int numAlternateVisuals; + VisualID *alternateVisuals; + + WindowPtr pOverlayWin; + Window overlayWid; + CompOverlayClientPtr pOverlayClients; + + GetImageProcPtr GetImage; + SourceValidateProcPtr SourceValidate; +} CompScreenRec, *CompScreenPtr; + +extern DevPrivateKeyRec CompScreenPrivateKeyRec; + +#define CompScreenPrivateKey (&CompScreenPrivateKeyRec) + +extern DevPrivateKeyRec CompWindowPrivateKeyRec; + +#define CompWindowPrivateKey (&CompWindowPrivateKeyRec) + +extern DevPrivateKeyRec CompSubwindowsPrivateKeyRec; + +#define CompSubwindowsPrivateKey (&CompSubwindowsPrivateKeyRec) + +#define GetCompScreen(s) ((CompScreenPtr) \ + dixLookupPrivate(&(s)->devPrivates, CompScreenPrivateKey)) +#define GetCompWindow(w) ((CompWindowPtr) \ + dixLookupPrivate(&(w)->devPrivates, CompWindowPrivateKey)) +#define GetCompSubwindows(w) ((CompSubwindowsPtr) \ + dixLookupPrivate(&(w)->devPrivates, CompSubwindowsPrivateKey)) + +extern RESTYPE CompositeClientSubwindowsType; +extern RESTYPE CompositeClientOverlayType; + +/* + * compalloc.c + */ + +Bool + compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update); + +void + compFreeClientWindow(WindowPtr pWin, XID id); + +int + compUnredirectWindow(ClientPtr pClient, WindowPtr pWin, int update); + +int + compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update); + +void + compFreeClientSubwindows(WindowPtr pWin, XID id); + +int + compUnredirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update); + +int + compRedirectOneSubwindow(WindowPtr pParent, WindowPtr pWin); + +int + compUnredirectOneSubwindow(WindowPtr pParent, WindowPtr pWin); + +Bool + compAllocPixmap(WindowPtr pWin); + +void + compSetParentPixmap(WindowPtr pWin); + +void + compRestoreWindow(WindowPtr pWin, PixmapPtr pPixmap); + +Bool + +compReallocPixmap(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, int bw); + +/* + * compinit.c + */ + +Bool + compScreenInit(ScreenPtr pScreen); + +/* + * compoverlay.c + */ + +void + compFreeOverlayClient(CompOverlayClientPtr pOcToDel); + +CompOverlayClientPtr +compFindOverlayClient(ScreenPtr pScreen, ClientPtr pClient); + +CompOverlayClientPtr +compCreateOverlayClient(ScreenPtr pScreen, ClientPtr pClient); + +Bool + compCreateOverlayWindow(ScreenPtr pScreen); + +void + compDestroyOverlayWindow(ScreenPtr pScreen); + +/* + * compwindow.c + */ + +#ifdef COMPOSITE_DEBUG +void + compCheckTree(ScreenPtr pScreen); +#else +#define compCheckTree(s) +#endif + +void + compSetPixmap(WindowPtr pWin, PixmapPtr pPixmap); + +Bool + compCheckRedirect(WindowPtr pWin); + +Bool + compPositionWindow(WindowPtr pWin, int x, int y); + +Bool + compRealizeWindow(WindowPtr pWin); + +Bool + compUnrealizeWindow(WindowPtr pWin); + +void + compClipNotify(WindowPtr pWin, int dx, int dy); + +void + compMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind); + +void + +compResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib); + +void + compChangeBorderWidth(WindowPtr pWin, unsigned int border_width); + +void + compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent); + +Bool + compCreateWindow(WindowPtr pWin); + +Bool + compDestroyWindow(WindowPtr pWin); + +void + compSetRedirectBorderClip(WindowPtr pWin, RegionPtr pRegion); + +RegionPtr + compGetRedirectBorderClip(WindowPtr pWin); + +void + compCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +void + compPaintChildrenToWindow(WindowPtr pWin); + +WindowPtr + CompositeRealChildHead(WindowPtr pWin); + +int + DeleteWindowNoInputDevices(pointer value, XID wid); + +int + +compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, + int bw, WindowPtr pSib); + +void PanoramiXCompositeInit(void); +void PanoramiXCompositeReset(void); + +#endif /* _COMPINT_H_ */ diff --git a/composite/compositeext.h b/composite/compositeext.h new file mode 100644 index 0000000..0b148f0 --- /dev/null +++ b/composite/compositeext.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2009 NVIDIA Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _COMPOSITEEXT_H_ +#define _COMPOSITEEXT_H_ + +#include "misc.h" +#include "scrnintstr.h" + +extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen, + VisualID * vids, + int nVisuals); + +extern _X_EXPORT RESTYPE CompositeClientWindowType; + +#endif /* _COMPOSITEEXT_H_ */ diff --git a/composite/compoverlay.c b/composite/compoverlay.c new file mode 100644 index 0000000..bf5434c --- /dev/null +++ b/composite/compoverlay.c @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "compint.h" +#include "xace.h" + +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#endif + +/* + * Delete the given overlay client list element from its screen list. + */ +void +compFreeOverlayClient(CompOverlayClientPtr pOcToDel) +{ + ScreenPtr pScreen = pOcToDel->pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr *pPrev, pOc; + + for (pPrev = &cs->pOverlayClients; (pOc = *pPrev); pPrev = &pOc->pNext) { + if (pOc == pOcToDel) { + *pPrev = pOc->pNext; + free(pOc); + break; + } + } + + /* Destroy overlay window when there are no more clients using it */ + if (cs->pOverlayClients == NULL) + compDestroyOverlayWindow(pScreen); +} + +/* + * Return the client's first overlay client rec from the given screen + */ +CompOverlayClientPtr +compFindOverlayClient(ScreenPtr pScreen, ClientPtr pClient) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc; + + for (pOc = cs->pOverlayClients; pOc != NULL; pOc = pOc->pNext) + if (pOc->pClient == pClient) + return pOc; + + return NULL; +} + +/* + * Create an overlay client object for the given client + */ +CompOverlayClientPtr +compCreateOverlayClient(ScreenPtr pScreen, ClientPtr pClient) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc; + + pOc = (CompOverlayClientPtr) malloc(sizeof(CompOverlayClientRec)); + if (pOc == NULL) + return NULL; + + pOc->pClient = pClient; + pOc->pScreen = pScreen; + pOc->resource = FakeClientID(pClient->index); + pOc->pNext = cs->pOverlayClients; + cs->pOverlayClients = pOc; + + /* + * Create a resource for this element so it can be deleted + * when the client goes away. + */ + if (!AddResource(pOc->resource, CompositeClientOverlayType, (pointer) pOc)) + return NULL; + + return pOc; +} + +/* + * Create the overlay window and map it + */ +Bool +compCreateOverlayWindow(ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + WindowPtr pRoot = pScreen->root; + WindowPtr pWin; + XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */ + int result; + int w = pScreen->width; + int h = pScreen->height; + int x = 0, y = 0; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + x = -pScreen->x; + y = -pScreen->y; + w = PanoramiXPixWidth; + h = PanoramiXPixHeight; + } +#endif + + pWin = cs->pOverlayWin = + CreateWindow(cs->overlayWid, pRoot, x, y, w, h, 0, + InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0], + pRoot->drawable.depth, + serverClient, pScreen->rootVisual, &result); + if (pWin == NULL) + return FALSE; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer) pWin)) + return FALSE; + + MapWindow(pWin, serverClient); + + return TRUE; +} + +/* + * Destroy the overlay window + */ +void +compDestroyOverlayWindow(ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + + cs->pOverlayWin = NullWindow; + FreeResource(cs->overlayWid, RT_NONE); +} diff --git a/composite/compwindow.c b/composite/compwindow.c new file mode 100644 index 0000000..0be7a1b --- /dev/null +++ b/composite/compwindow.c @@ -0,0 +1,792 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "compint.h" + +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#endif + +#ifdef COMPOSITE_DEBUG +static int +compCheckWindow(WindowPtr pWin, pointer data) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pWinPixmap = (*pScreen->GetWindowPixmap) (pWin); + PixmapPtr pParentPixmap = + pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0; + PixmapPtr pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen); + + if (!pWin->parent) { + assert(pWin->redirectDraw == RedirectDrawNone); + assert(pWinPixmap == pScreenPixmap); + } + else if (pWin->redirectDraw != RedirectDrawNone) { + assert(pWinPixmap != pParentPixmap); + assert(pWinPixmap != pScreenPixmap); + } + else { + assert(pWinPixmap == pParentPixmap); + } + assert(0 < pWinPixmap->refcnt && pWinPixmap->refcnt < 3); + assert(0 < pScreenPixmap->refcnt && pScreenPixmap->refcnt < 3); + if (pParentPixmap) + assert(0 <= pParentPixmap->refcnt && pParentPixmap->refcnt < 3); + return WT_WALKCHILDREN; +} + +void +compCheckTree(ScreenPtr pScreen) +{ + WalkTree(pScreen, compCheckWindow, 0); +} +#endif + +typedef struct _compPixmapVisit { + WindowPtr pWindow; + PixmapPtr pPixmap; +} CompPixmapVisitRec, *CompPixmapVisitPtr; + +static Bool +compRepaintBorder(ClientPtr pClient, pointer closure) +{ + WindowPtr pWindow; + int rc = + dixLookupWindow(&pWindow, (XID) (intptr_t) closure, pClient, + DixWriteAccess); + + if (rc == Success) { + RegionRec exposed; + + RegionNull(&exposed); + RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize); + miPaintWindow(pWindow, &exposed, PW_BORDER); + RegionUninit(&exposed); + } + return TRUE; +} + +static int +compSetPixmapVisitWindow(WindowPtr pWindow, pointer data) +{ + CompPixmapVisitPtr pVisit = (CompPixmapVisitPtr) data; + ScreenPtr pScreen = pWindow->drawable.pScreen; + + if (pWindow != pVisit->pWindow && pWindow->redirectDraw != RedirectDrawNone) + return WT_DONTWALKCHILDREN; + (*pScreen->SetWindowPixmap) (pWindow, pVisit->pPixmap); + /* + * Recompute winSize and borderSize. This is duplicate effort + * when resizing pixmaps, but necessary when changing redirection. + * Might be nice to fix this. + */ + SetWinSize(pWindow); + SetBorderSize(pWindow); + if (HasBorder(pWindow)) + QueueWorkProc(compRepaintBorder, serverClient, + (pointer) (intptr_t) pWindow->drawable.id); + return WT_WALKCHILDREN; +} + +void +compSetPixmap(WindowPtr pWindow, PixmapPtr pPixmap) +{ + CompPixmapVisitRec visitRec; + + visitRec.pWindow = pWindow; + visitRec.pPixmap = pPixmap; + TraverseTree(pWindow, compSetPixmapVisitWindow, (pointer) &visitRec); + compCheckTree(pWindow->drawable.pScreen); +} + +Bool +compCheckRedirect(WindowPtr pWin) +{ + CompWindowPtr cw = GetCompWindow(pWin); + CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen); + Bool should; + + should = pWin->realized && (pWin->drawable.class != InputOnly) && + (cw != NULL) && (pWin->parent != NULL); + + /* Never redirect the overlay window */ + if (cs->pOverlayWin != NULL) { + if (pWin == cs->pOverlayWin) { + should = FALSE; + } + } + + if (should != (pWin->redirectDraw != RedirectDrawNone)) { + if (should) + return compAllocPixmap(pWin); + else { + ScreenPtr pScreen = pWin->drawable.pScreen; + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + + compSetParentPixmap(pWin); + compRestoreWindow(pWin, pPixmap); + (*pScreen->DestroyPixmap) (pPixmap); + } + } + else if (should) { + if (cw->update == CompositeRedirectAutomatic) + pWin->redirectDraw = RedirectDrawAutomatic; + else + pWin->redirectDraw = RedirectDrawManual; + } + return TRUE; +} + +static int +updateOverlayWindow(ScreenPtr pScreen) +{ + CompScreenPtr cs; + WindowPtr pWin; /* overlay window */ + XID vlist[2]; + int w = pScreen->width; + int h = pScreen->height; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + w = PanoramiXPixWidth; + h = PanoramiXPixHeight; + } +#endif + + cs = GetCompScreen(pScreen); + if ((pWin = cs->pOverlayWin) != NULL) { + if ((pWin->drawable.width == w) && (pWin->drawable.height == h)) + return Success; + + /* Let's resize the overlay window. */ + vlist[0] = w; + vlist[1] = h; + return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin)); + } + + /* Let's be on the safe side and not assume an overlay window is + always allocated. */ + return Success; +} + +Bool +compPositionWindow(WindowPtr pWin, int x, int y) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + Bool ret = TRUE; + + pScreen->PositionWindow = cs->PositionWindow; + /* + * "Shouldn't need this as all possible places should be wrapped + * + compCheckRedirect (pWin); + */ +#ifdef COMPOSITE_DEBUG + if ((pWin->redirectDraw != RedirectDrawNone) != + (pWin->viewable && (GetCompWindow(pWin) != NULL))) + OsAbort(); +#endif + if (pWin->redirectDraw != RedirectDrawNone) { + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + int bw = wBorderWidth(pWin); + int nx = pWin->drawable.x - bw; + int ny = pWin->drawable.y - bw; + + if (pPixmap->screen_x != nx || pPixmap->screen_y != ny) { + pPixmap->screen_x = nx; + pPixmap->screen_y = ny; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + } + + if (!(*pScreen->PositionWindow) (pWin, x, y)) + ret = FALSE; + cs->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = compPositionWindow; + compCheckTree(pWin->drawable.pScreen); + if (updateOverlayWindow(pScreen) != Success) + ret = FALSE; + return ret; +} + +Bool +compRealizeWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + Bool ret = TRUE; + + pScreen->RealizeWindow = cs->RealizeWindow; + compCheckRedirect(pWin); + if (!(*pScreen->RealizeWindow) (pWin)) + ret = FALSE; + cs->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = compRealizeWindow; + compCheckTree(pWin->drawable.pScreen); + return ret; +} + +Bool +compUnrealizeWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + Bool ret = TRUE; + + pScreen->UnrealizeWindow = cs->UnrealizeWindow; + compCheckRedirect(pWin); + if (!(*pScreen->UnrealizeWindow) (pWin)) + ret = FALSE; + cs->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = compUnrealizeWindow; + compCheckTree(pWin->drawable.pScreen); + return ret; +} + +/* + * Called after the borderClip for the window has settled down + * We use this to make sure our extra borderClip has the right origin + */ + +void +compClipNotify(WindowPtr pWin, int dx, int dy) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + CompWindowPtr cw = GetCompWindow(pWin); + + if (cw) { + if (cw->borderClipX != pWin->drawable.x || + cw->borderClipY != pWin->drawable.y) { + RegionTranslate(&cw->borderClip, + pWin->drawable.x - cw->borderClipX, + pWin->drawable.y - cw->borderClipY); + cw->borderClipX = pWin->drawable.x; + cw->borderClipY = pWin->drawable.y; + } + } + if (cs->ClipNotify) { + pScreen->ClipNotify = cs->ClipNotify; + (*pScreen->ClipNotify) (pWin, dx, dy); + cs->ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = compClipNotify; + } +} + +/* + * Returns TRUE if the window needs server-provided automatic redirect, + * which is true if the child and parent aren't both regular or ARGB visuals + */ + +static Bool +compIsAlternateVisual(ScreenPtr pScreen, XID visual) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + int i; + + for (i = 0; i < cs->numAlternateVisuals; i++) + if (cs->alternateVisuals[i] == visual) + return TRUE; + return FALSE; +} + +static Bool +compImplicitRedirect(WindowPtr pWin, WindowPtr pParent) +{ + if (pParent) { + ScreenPtr pScreen = pWin->drawable.pScreen; + XID winVisual = wVisual(pWin); + XID parentVisual = wVisual(pParent); + + if (winVisual != parentVisual && + (compIsAlternateVisual(pScreen, winVisual) || + compIsAlternateVisual(pScreen, parentVisual))) + return TRUE; + } + return FALSE; +} + +static void +compFreeOldPixmap(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + if (pWin->redirectDraw != RedirectDrawNone) { + CompWindowPtr cw = GetCompWindow(pWin); + + if (cw->pOldPixmap) { + (*pScreen->DestroyPixmap) (cw->pOldPixmap); + cw->pOldPixmap = NullPixmap; + } + } +} + +void +compMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + + pScreen->MoveWindow = cs->MoveWindow; + (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); + cs->MoveWindow = pScreen->MoveWindow; + pScreen->MoveWindow = compMoveWindow; + + compFreeOldPixmap(pWin); + compCheckTree(pScreen); +} + +void +compResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + + pScreen->ResizeWindow = cs->ResizeWindow; + (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); + cs->ResizeWindow = pScreen->ResizeWindow; + pScreen->ResizeWindow = compResizeWindow; + + compFreeOldPixmap(pWin); + compCheckTree(pWin->drawable.pScreen); +} + +void +compChangeBorderWidth(WindowPtr pWin, unsigned int bw) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + + pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; + (*pScreen->ChangeBorderWidth) (pWin, bw); + cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; + pScreen->ChangeBorderWidth = compChangeBorderWidth; + + compFreeOldPixmap(pWin); + compCheckTree(pWin->drawable.pScreen); +} + +void +compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + + pScreen->ReparentWindow = cs->ReparentWindow; + /* + * Remove any implicit redirect due to synthesized visual + */ + if (compImplicitRedirect(pWin, pPriorParent)) + compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic); + /* + * Handle subwindows redirection + */ + compUnredirectOneSubwindow(pPriorParent, pWin); + compRedirectOneSubwindow(pWin->parent, pWin); + /* + * Add any implict redirect due to synthesized visual + */ + if (compImplicitRedirect(pWin, pWin->parent)) + compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); + + /* + * Allocate any necessary redirect pixmap + * (this actually should never be true; pWin is always unmapped) + */ + compCheckRedirect(pWin); + + /* + * Reset pixmap pointers as appropriate + */ + if (pWin->parent && pWin->redirectDraw == RedirectDrawNone) + compSetPixmap(pWin, (*pScreen->GetWindowPixmap) (pWin->parent)); + /* + * Call down to next function + */ + if (pScreen->ReparentWindow) + (*pScreen->ReparentWindow) (pWin, pPriorParent); + cs->ReparentWindow = pScreen->ReparentWindow; + pScreen->ReparentWindow = compReparentWindow; + compCheckTree(pWin->drawable.pScreen); +} + +void +compCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + int dx = 0, dy = 0; + + if (pWin->redirectDraw != RedirectDrawNone) { + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + CompWindowPtr cw = GetCompWindow(pWin); + + assert(cw->oldx != COMP_ORIGIN_INVALID); + assert(cw->oldy != COMP_ORIGIN_INVALID); + if (cw->pOldPixmap) { + /* + * Ok, the old bits are available in pOldPixmap and + * need to be copied to pNewPixmap. + */ + RegionRec rgnDst; + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + GCPtr pGC; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + RegionTranslate(prgnSrc, -dx, -dy); + + RegionNull(&rgnDst); + + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); + + RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); + + dx = dx + pPixmap->screen_x - cw->oldx; + dy = dy + pPixmap->screen_y - cw->oldy; + pGC = GetScratchGC(pPixmap->drawable.depth, pScreen); + if (pGC) { + BoxPtr pBox = RegionRects(&rgnDst); + int nBox = RegionNumRects(&rgnDst); + + ValidateGC(&pPixmap->drawable, pGC); + while (nBox--) { + (void) (*pGC->ops->CopyArea) (&cw->pOldPixmap->drawable, + &pPixmap->drawable, + pGC, + pBox->x1 + dx, pBox->y1 + dy, + pBox->x2 - pBox->x1, + pBox->y2 - pBox->y1, + pBox->x1, pBox->y1); + pBox++; + } + FreeScratchGC(pGC); + } + return; + } + dx = pPixmap->screen_x - cw->oldx; + dy = pPixmap->screen_y - cw->oldy; + ptOldOrg.x += dx; + ptOldOrg.y += dy; + } + + pScreen->CopyWindow = cs->CopyWindow; + if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y) { + if (dx || dy) + RegionTranslate(prgnSrc, dx, dy); + (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); + if (dx || dy) + RegionTranslate(prgnSrc, -dx, -dy); + } + else { + ptOldOrg.x -= dx; + ptOldOrg.y -= dy; + RegionTranslate(prgnSrc, + pWin->drawable.x - ptOldOrg.x, + pWin->drawable.y - ptOldOrg.y); + DamageDamageRegion(&pWin->drawable, prgnSrc); + } + cs->CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = compCopyWindow; + compCheckTree(pWin->drawable.pScreen); +} + +Bool +compCreateWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + Bool ret; + + pScreen->CreateWindow = cs->CreateWindow; + ret = (*pScreen->CreateWindow) (pWin); + if (pWin->parent && ret) { + CompSubwindowsPtr csw = GetCompSubwindows(pWin->parent); + CompClientWindowPtr ccw; + + (*pScreen->SetWindowPixmap) (pWin, + (*pScreen->GetWindowPixmap) (pWin-> + parent)); + if (csw) + for (ccw = csw->clients; ccw; ccw = ccw->next) + compRedirectWindow(clients[CLIENT_ID(ccw->id)], + pWin, ccw->update); + if (compImplicitRedirect(pWin, pWin->parent)) + compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); + } + cs->CreateWindow = pScreen->CreateWindow; + pScreen->CreateWindow = compCreateWindow; + compCheckTree(pWin->drawable.pScreen); + return ret; +} + +Bool +compDestroyWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + CompWindowPtr cw; + CompSubwindowsPtr csw; + Bool ret; + + pScreen->DestroyWindow = cs->DestroyWindow; + while ((cw = GetCompWindow(pWin))) + FreeResource(cw->clients->id, RT_NONE); + while ((csw = GetCompSubwindows(pWin))) + FreeResource(csw->clients->id, RT_NONE); + + if (pWin->redirectDraw != RedirectDrawNone) { + PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); + + compSetParentPixmap(pWin); + (*pScreen->DestroyPixmap) (pPixmap); + } + ret = (*pScreen->DestroyWindow) (pWin); + cs->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = compDestroyWindow; +/* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/ + return ret; +} + +void +compSetRedirectBorderClip(WindowPtr pWin, RegionPtr pRegion) +{ + CompWindowPtr cw = GetCompWindow(pWin); + RegionRec damage; + + RegionNull(&damage); + /* + * Align old border clip with new border clip + */ + RegionTranslate(&cw->borderClip, + pWin->drawable.x - cw->borderClipX, + pWin->drawable.y - cw->borderClipY); + /* + * Compute newly visible portion of window for repaint + */ + RegionSubtract(&damage, pRegion, &cw->borderClip); + /* + * Report that as damaged so it will be redrawn + */ + DamageDamageRegion(&pWin->drawable, &damage); + RegionUninit(&damage); + /* + * Save the new border clip region + */ + RegionCopy(&cw->borderClip, pRegion); + cw->borderClipX = pWin->drawable.x; + cw->borderClipY = pWin->drawable.y; +} + +RegionPtr +compGetRedirectBorderClip(WindowPtr pWin) +{ + CompWindowPtr cw = GetCompWindow(pWin); + + return &cw->borderClip; +} + +static void +compWindowUpdateAutomatic(WindowPtr pWin) +{ + CompWindowPtr cw = GetCompWindow(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pParent = pWin->parent; + PixmapPtr pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin); + PictFormatPtr pSrcFormat = PictureWindowFormat(pWin); + PictFormatPtr pDstFormat = PictureWindowFormat(pWin->parent); + int error; + RegionPtr pRegion = DamageRegion(cw->damage); + PicturePtr pSrcPicture = CreatePicture(0, &pSrcPixmap->drawable, + pSrcFormat, + 0, 0, + serverClient, + &error); + XID subwindowMode = IncludeInferiors; + PicturePtr pDstPicture = CreatePicture(0, &pParent->drawable, + pDstFormat, + CPSubwindowMode, + &subwindowMode, + serverClient, + &error); + + /* + * First move the region from window to screen coordinates + */ + RegionTranslate(pRegion, pWin->drawable.x, pWin->drawable.y); + + /* + * Clip against the "real" border clip + */ + RegionIntersect(pRegion, pRegion, &cw->borderClip); + + /* + * Now translate from screen to dest coordinates + */ + RegionTranslate(pRegion, -pParent->drawable.x, -pParent->drawable.y); + + /* + * Clip the picture + */ + SetPictureClipRegion(pDstPicture, 0, 0, pRegion); + + /* + * And paint + */ + CompositePicture(PictOpSrc, pSrcPicture, 0, pDstPicture, + 0, 0, /* src_x, src_y */ + 0, 0, /* msk_x, msk_y */ + pSrcPixmap->screen_x - pParent->drawable.x, + pSrcPixmap->screen_y - pParent->drawable.y, + pSrcPixmap->drawable.width, pSrcPixmap->drawable.height); + FreePicture(pSrcPicture, 0); + FreePicture(pDstPicture, 0); + /* + * Empty the damage region. This has the nice effect of + * rendering the translations above harmless + */ + DamageEmpty(cw->damage); +} + +static void +compPaintWindowToParent(WindowPtr pWin) +{ + compPaintChildrenToWindow(pWin); + + if (pWin->redirectDraw != RedirectDrawNone) { + CompWindowPtr cw = GetCompWindow(pWin); + + if (cw->damaged) { + compWindowUpdateAutomatic(pWin); + cw->damaged = FALSE; + } + } +} + +void +compPaintChildrenToWindow(WindowPtr pWin) +{ + WindowPtr pChild; + + if (!pWin->damagedDescendants) + return; + + for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) + compPaintWindowToParent(pChild); + + pWin->damagedDescendants = FALSE; +} + +WindowPtr +CompositeRealChildHead(WindowPtr pWin) +{ + WindowPtr pChild, pChildBefore; + CompScreenPtr cs; + + if (!pWin->parent && + (screenIsSaved == SCREEN_SAVER_ON) && + (HasSaverWindow(pWin->drawable.pScreen))) { + + /* First child is the screen saver; see if next child is the overlay */ + pChildBefore = pWin->firstChild; + pChild = pChildBefore->nextSib; + + } + else { + pChildBefore = NullWindow; + pChild = pWin->firstChild; + } + + if (!pChild) { + return NullWindow; + } + + cs = GetCompScreen(pWin->drawable.pScreen); + if (pChild == cs->pOverlayWin) { + return pChild; + } + else { + return pChildBefore; + } +} + +int +compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, + int bw, WindowPtr pSib) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen(pScreen); + Bool ret = 0; + WindowPtr pParent = pWin->parent; + int draw_x, draw_y; + Bool alloc_ret; + + if (cs->ConfigNotify) { + pScreen->ConfigNotify = cs->ConfigNotify; + ret = (*pScreen->ConfigNotify) (pWin, x, y, w, h, bw, pSib); + cs->ConfigNotify = pScreen->ConfigNotify; + pScreen->ConfigNotify = compConfigNotify; + + if (ret) + return ret; + } + + if (pWin->redirectDraw == RedirectDrawNone) + return Success; + + compCheckTree(pScreen); + + draw_x = pParent->drawable.x + x + bw; + draw_y = pParent->drawable.y + y + bw; + alloc_ret = compReallocPixmap(pWin, draw_x, draw_y, w, h, bw); + + if (alloc_ret == FALSE) + return BadAlloc; + return Success; +} diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..d622a44 --- /dev/null +++ b/config.guess @@ -0,0 +1,1530 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. + +timestamp='2012-02-10' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to <config-patches@gnu.org> and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include <sys/param.h> +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 <<EOF +$0: unable to guess system type + +This script, last modified $timestamp, has failed to recognize +the operating system you are using. It is advised that you +download the most up to date version of the config scripts from + + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +and + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +If the version you run ($0) is already up to date, please +send the following data and any information you think might be +pertinent to <config-patches@gnu.org> in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..c894da4 --- /dev/null +++ b/config.sub @@ -0,0 +1,1773 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. + +timestamp='2012-02-10' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 \ + | ns16k | ns32k \ + | open8 \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i386-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/10-evdev.conf b/config/10-evdev.conf new file mode 100644 index 0000000..cc83ab2 --- /dev/null +++ b/config/10-evdev.conf @@ -0,0 +1,40 @@ +# +# Catch-all evdev loader for udev-based systems +# We don't simply match on any device since that also adds accelerometers +# and other devices that we don't really want to use. The list below +# matches everything but joysticks. + +Section "InputClass" + Identifier "evdev pointer catchall" + MatchIsPointer "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "evdev keyboard catchall" + MatchIsKeyboard "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "evdev touchpad catchall" + MatchIsTouchpad "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "evdev tablet catchall" + MatchIsTablet "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "evdev touchscreen catchall" + MatchIsTouchscreen "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" +EndSection diff --git a/config/10-quirks.conf b/config/10-quirks.conf new file mode 100644 index 0000000..c9b823c --- /dev/null +++ b/config/10-quirks.conf @@ -0,0 +1,54 @@ +# Collection of quirks and blacklist/whitelists for specific devices. + + +# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable +# http://bugs.freedesktop.org/show_bug.cgi?id=22442 +Section "InputClass" + Identifier "ThinkPad HDAPS accelerometer blacklist" + MatchProduct "ThinkPad HDAPS accelerometer data" + Option "Ignore" "on" +EndSection + +# https://bugzilla.redhat.com/show_bug.cgi?id=523914 +# Mouse does not move in PV Xen guest +# Explicitly tell evdev to not ignore the absolute axes. +Section "InputClass" + Identifier "Xen Virtual Pointer axis blacklist" + MatchProduct "Xen Virtual Pointer" + Option "IgnoreAbsoluteAxes" "off" + Option "IgnoreRelativeAxes" "off" +EndSection + +# https://bugzilla.redhat.com/show_bug.cgi?id=612140 +# please make Evoluent VerticalMouse 3 work out of the box +# Button mapping on this mouse is quirky +Section "InputClass" + Identifier "Evoluent VerticalMouse 3" + MatchProduct "Evoluent VerticalMouse 3" + # Sets following configuration: + # top button: left + # middle button: middle + # bottom button: right + # wheel click: middle + # thumb button: 8 (back) + Option "ButtonMapping" "1 2 2 4 5 6 7 3 8" +EndSection + + +# https://bugs.freedesktop.org/show_bug.cgi?id=55867 +# Bug 55867 - Doesn't know how to tag XI_TRACKBALL +Section "InputClass" + Identifier "Tag trackballs as XI_TRACKBALL" + MatchProduct "trackball" + MatchDriver "evdev" + Option "TypeName" "TRACKBALL" +EndSection + +# https://bugs.freedesktop.org/show_bug.cgi?id=62831 +# Bug 62831 - Mionix Naos 5000 mouse detected incorrectly +Section "InputClass" + Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE" + MatchProduct "La-VIEW Technology Naos 5000 Mouse" + MatchDriver "evdev" + Option "TypeName" "MOUSE" +EndSection diff --git a/config/Makefile.am b/config/Makefile.am new file mode 100644 index 0000000..327d07e --- /dev/null +++ b/config/Makefile.am @@ -0,0 +1,47 @@ +AM_CFLAGS = $(DIX_CFLAGS) + +noinst_LTLIBRARIES = libconfig.la +libconfig_la_SOURCES = config.c config-backends.h + +if CONFIG_UDEV + +AM_CFLAGS += $(UDEV_CFLAGS) +libconfig_la_SOURCES += udev.c +libconfig_la_LIBADD = $(UDEV_LIBS) + +if XORG +xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR) +xorgconfd_DATA = 10-evdev.conf 10-quirks.conf +endif + +else + +if CONFIG_NEED_DBUS +AM_CFLAGS += $(DBUS_CFLAGS) +libconfig_la_SOURCES += dbus-core.c +libconfig_la_LIBADD = $(DBUS_LIBS) + +if CONFIG_DBUS_API +dbusconfigdir = $(sysconfdir)/dbus-1/system.d +dbusconfig_DATA = xorg-server.conf + +libconfig_la_SOURCES += dbus.c +endif + +if CONFIG_HAL +AM_CFLAGS += $(HAL_CFLAGS) +libconfig_la_SOURCES += hal.c +libconfig_la_LIBADD += $(HAL_LIBS) +endif + +else + +if CONFIG_WSCONS +libconfig_la_SOURCES += wscons.c +endif # CONFIG_WSCONS + +endif # CONFIG_NEED_DBUS + +endif # !CONFIG_UDEV + +EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf non-seat0.conf.multi-seat fdi2iclass.py 10-quirks.conf diff --git a/config/Makefile.in b/config/Makefile.in new file mode 100644 index 0000000..800aafe --- /dev/null +++ b/config/Makefile.in @@ -0,0 +1,855 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@CONFIG_UDEV_TRUE@am__append_1 = $(UDEV_CFLAGS) +@CONFIG_UDEV_TRUE@am__append_2 = udev.c +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__append_3 = $(DBUS_CFLAGS) +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__append_4 = dbus-core.c +@CONFIG_DBUS_API_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__append_5 = dbus.c +@CONFIG_HAL_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__append_6 = $(HAL_CFLAGS) +@CONFIG_HAL_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__append_7 = hal.c +@CONFIG_HAL_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__append_8 = $(HAL_LIBS) +@CONFIG_NEED_DBUS_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__append_9 = wscons.c +subdir = config +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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +@CONFIG_HAL_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@libconfig_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@ $(am__DEPENDENCIES_2) +@CONFIG_UDEV_TRUE@libconfig_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@CONFIG_UDEV_TRUE@ $(am__DEPENDENCIES_2) +am__libconfig_la_SOURCES_DIST = config.c config-backends.h udev.c \ + dbus-core.c dbus.c hal.c wscons.c +@CONFIG_UDEV_TRUE@am__objects_1 = udev.lo +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__objects_2 = \ +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@ dbus-core.lo +@CONFIG_DBUS_API_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__objects_3 = dbus.lo +@CONFIG_HAL_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@am__objects_4 = hal.lo +@CONFIG_NEED_DBUS_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__objects_5 = wscons.lo +am_libconfig_la_OBJECTS = config.lo $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) +libconfig_la_OBJECTS = $(am_libconfig_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libconfig_la_SOURCES) +DIST_SOURCES = $(am__libconfig_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(dbusconfigdir)" \ + "$(DESTDIR)$(xorgconfddir)" +DATA = $(dbusconfig_DATA) $(xorgconfd_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = $(DIX_CFLAGS) $(am__append_1) $(am__append_3) \ + $(am__append_6) +noinst_LTLIBRARIES = libconfig.la +libconfig_la_SOURCES = config.c config-backends.h $(am__append_2) \ + $(am__append_4) $(am__append_5) $(am__append_7) \ + $(am__append_9) +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@libconfig_la_LIBADD = \ +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@ $(DBUS_LIBS) \ +@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@ $(am__append_8) +@CONFIG_UDEV_TRUE@libconfig_la_LIBADD = $(UDEV_LIBS) $(am__append_8) +@CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR) +@CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfd_DATA = 10-evdev.conf 10-quirks.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 non-seat0.conf.multi-seat fdi2iclass.py 10-quirks.conf +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign config/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libconfig.la: $(libconfig_la_OBJECTS) $(libconfig_la_DEPENDENCIES) $(EXTRA_libconfig_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libconfig_la_OBJECTS) $(libconfig_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udev.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wscons.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dbusconfigDATA: $(dbusconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(dbusconfig_DATA)'; test -n "$(dbusconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dbusconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dbusconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbusconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dbusconfigdir)" || exit $$?; \ + done + +uninstall-dbusconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(dbusconfig_DATA)'; test -n "$(dbusconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(dbusconfigdir)'; $(am__uninstall_files_from_dir) +install-xorgconfdDATA: $(xorgconfd_DATA) + @$(NORMAL_INSTALL) + @list='$(xorgconfd_DATA)'; test -n "$(xorgconfddir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(xorgconfddir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(xorgconfddir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xorgconfddir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(xorgconfddir)" || exit $$?; \ + done + +uninstall-xorgconfdDATA: + @$(NORMAL_UNINSTALL) + @list='$(xorgconfd_DATA)'; test -n "$(xorgconfddir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(xorgconfddir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(dbusconfigdir)" "$(DESTDIR)$(xorgconfddir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dbusconfigDATA install-xorgconfdDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-dbusconfigDATA uninstall-xorgconfdDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES 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-dbusconfigDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip install-xorgconfdDATA \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-dbusconfigDATA \ + uninstall-xorgconfdDATA + + +# 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/config/config-backends.h b/config/config-backends.h new file mode 100644 index 0000000..6423701 --- /dev/null +++ b/config/config-backends.h @@ -0,0 +1,77 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif +#include "input.h" +#include "list.h" + +void remove_devices(const char *backend, const char *config_info); +BOOL device_is_duplicate(const char *config_info); + +#ifdef CONFIG_UDEV +int config_udev_pre_init(void); +int config_udev_init(void); +void config_udev_fini(void); +void config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback); +#else + +#ifdef CONFIG_NEED_DBUS +#include <dbus/dbus.h> + +typedef void (*config_dbus_core_connect_hook) (DBusConnection * connection, + void *data); +typedef void (*config_dbus_core_disconnect_hook) (void *data); + +struct config_dbus_core_hook { + config_dbus_core_connect_hook connect; + config_dbus_core_disconnect_hook disconnect; + void *data; + + struct config_dbus_core_hook *next; +}; + +int config_dbus_core_init(void); +void config_dbus_core_fini(void); +int config_dbus_core_add_hook(struct config_dbus_core_hook *hook); +void config_dbus_core_remove_hook(struct config_dbus_core_hook *hook); +#endif + +#ifdef CONFIG_DBUS_API +int config_dbus_init(void); +void config_dbus_fini(void); +#endif + +#ifdef CONFIG_HAL +int config_hal_init(void); +void config_hal_fini(void); +#endif +#endif + +#ifdef CONFIG_WSCONS +int config_wscons_init(void); +void config_wscons_fini(void); +#endif diff --git a/config/config.c b/config/config.c new file mode 100644 index 0000000..d0889a3 --- /dev/null +++ b/config/config.c @@ -0,0 +1,191 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "os.h" +#include "inputstr.h" +#include "hotplug.h" +#include "config-backends.h" + +void +config_pre_init(void) +{ +#ifdef CONFIG_UDEV + if (!config_udev_pre_init()) + ErrorF("[config] failed to pre-init udev\n"); +#endif +} + +void +config_init(void) +{ +#ifdef CONFIG_UDEV + if (!config_udev_init()) + ErrorF("[config] failed to initialise udev\n"); +#elif defined(CONFIG_NEED_DBUS) + if (config_dbus_core_init()) { +#ifdef CONFIG_DBUS_API + if (!config_dbus_init()) + ErrorF("[config] failed to initialise D-Bus API\n"); +#endif +#ifdef CONFIG_HAL + if (!config_hal_init()) + ErrorF("[config] failed to initialise HAL\n"); +#endif + } + else { + ErrorF("[config] failed to initialise D-Bus core\n"); + } +#elif defined(CONFIG_WSCONS) + if (!config_wscons_init()) + ErrorF("[config] failed to initialise wscons\n"); +#endif +} + +void +config_fini(void) +{ +#if defined(CONFIG_UDEV) + config_udev_fini(); +#elif defined(CONFIG_NEED_DBUS) +#ifdef CONFIG_HAL + config_hal_fini(); +#endif +#ifdef CONFIG_DBUS_API + config_dbus_fini(); +#endif + config_dbus_core_fini(); +#elif defined(CONFIG_WSCONS) + config_wscons_fini(); +#endif +} + +void +config_odev_probe(config_odev_probe_proc_ptr probe_callback) +{ +#if defined(CONFIG_UDEV_KMS) + config_udev_odev_probe(probe_callback); +#endif +} + +static void +remove_device(const char *backend, DeviceIntPtr dev) +{ + /* this only gets called for devices that have already been added */ + LogMessage(X_INFO, "config/%s: removing device %s\n", backend, dev->name); + + /* Call PIE here so we don't try to dereference a device that's + * already been removed. */ + OsBlockSignals(); + ProcessInputEvents(); + DeleteInputDeviceRequest(dev); + OsReleaseSignals(); +} + +void +remove_devices(const char *backend, const char *config_info) +{ + DeviceIntPtr dev, next; + + for (dev = inputInfo.devices; dev; dev = next) { + next = dev->next; + if (dev->config_info && strcmp(dev->config_info, config_info) == 0) + remove_device(backend, dev); + } + for (dev = inputInfo.off_devices; dev; dev = next) { + next = dev->next; + if (dev->config_info && strcmp(dev->config_info, config_info) == 0) + remove_device(backend, dev); + } +} + +BOOL +device_is_duplicate(const char *config_info) +{ + DeviceIntPtr dev; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->config_info && (strcmp(dev->config_info, config_info) == 0)) + return TRUE; + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + if (dev->config_info && (strcmp(dev->config_info, config_info) == 0)) + return TRUE; + } + + return FALSE; +} + +struct OdevAttributes * +config_odev_allocate_attribute_list(void) +{ + struct OdevAttributes *attriblist; + + attriblist = malloc(sizeof(struct OdevAttributes)); + if (!attriblist) + return NULL; + + xorg_list_init(&attriblist->list); + return attriblist; +} + +void +config_odev_free_attribute_list(struct OdevAttributes *attribs) +{ + config_odev_free_attributes(attribs); + free(attribs); +} + +Bool +config_odev_add_attribute(struct OdevAttributes *attribs, int attrib, + const char *attrib_name) +{ + struct OdevAttribute *oa; + + oa = malloc(sizeof(struct OdevAttribute)); + if (!oa) + return FALSE; + + oa->attrib_id = attrib; + oa->attrib_name = strdup(attrib_name); + xorg_list_append(&oa->member, &attribs->list); + return TRUE; +} + +void +config_odev_free_attributes(struct OdevAttributes *attribs) +{ + struct OdevAttribute *iter, *safe; + + xorg_list_for_each_entry_safe(iter, safe, &attribs->list, member) { + xorg_list_del(&iter->member); + free(iter->attrib_name); + free(iter); + } +} diff --git a/config/dbus-core.c b/config/dbus-core.c new file mode 100644 index 0000000..3242587 --- /dev/null +++ b/config/dbus-core.c @@ -0,0 +1,246 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <dbus/dbus.h> +#include <sys/select.h> + +#include "config-backends.h" +#include "dix.h" +#include "os.h" + +/* How often to attempt reconnecting when we get booted off the bus. */ +#define RECONNECT_DELAY (10 * 1000) /* in ms */ + +struct dbus_core_info { + int fd; + DBusConnection *connection; + OsTimerPtr timer; + struct config_dbus_core_hook *hooks; +}; +static struct dbus_core_info bus_info; + +static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg); + +static void +wakeup_handler(pointer data, int err, pointer read_mask) +{ + struct dbus_core_info *info = data; + + if (info->connection && FD_ISSET(info->fd, (fd_set *) read_mask)) { + do { + dbus_connection_read_write_dispatch(info->connection, 0); + } while (info->connection && + dbus_connection_get_is_connected(info->connection) && + dbus_connection_get_dispatch_status(info->connection) == + DBUS_DISPATCH_DATA_REMAINS); + } +} + +static void +block_handler(pointer data, struct timeval **tv, pointer read_mask) +{ +} + +/** + * Disconnect (if we haven't already been forcefully disconnected), clean up + * after ourselves, and call all registered disconnect hooks. + */ +static void +teardown(void) +{ + struct config_dbus_core_hook *hook; + + if (bus_info.timer) { + TimerFree(bus_info.timer); + bus_info.timer = NULL; + } + + /* We should really have pre-disconnect hooks and run them here, for + * completeness. But then it gets awkward, given that you can't + * guarantee that they'll be called ... */ + if (bus_info.connection) + dbus_connection_unref(bus_info.connection); + + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info); + if (bus_info.fd != -1) + RemoveGeneralSocket(bus_info.fd); + bus_info.fd = -1; + bus_info.connection = NULL; + + for (hook = bus_info.hooks; hook; hook = hook->next) { + if (hook->disconnect) + hook->disconnect(hook->data); + } +} + +/** + * This is a filter, which only handles the disconnected signal, which + * doesn't go to the normal message handling function. This takes + * precedence over the message handling function, so have have to be + * careful to ignore anything we don't want to deal with here. + */ +static DBusHandlerResult +message_filter(DBusConnection * connection, DBusMessage * message, void *data) +{ + /* If we get disconnected, then take everything down, and attempt to + * reconnect immediately (assuming it's just a restart). The + * connection isn't valid at this point, so throw it out immediately. */ + if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { + DebugF("[config/dbus-core] disconnected from bus\n"); + bus_info.connection = NULL; + teardown(); + + if (bus_info.timer) + TimerFree(bus_info.timer); + bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); + + return DBUS_HANDLER_RESULT_HANDLED; + } + + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +/** + * Attempt to connect to the system bus, and set a filter to deal with + * disconnection (see message_filter above). + * + * @return 1 on success, 0 on failure. + */ +static int +connect_to_bus(void) +{ + DBusError error; + struct config_dbus_core_hook *hook; + + dbus_error_init(&error); + bus_info.connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error); + if (!bus_info.connection || dbus_error_is_set(&error)) { + DebugF("[config/dbus-core] error connecting to system bus: %s (%s)\n", + error.name, error.message); + goto err_begin; + } + + /* Thankyou. Really, thankyou. */ + dbus_connection_set_exit_on_disconnect(bus_info.connection, FALSE); + + if (!dbus_connection_get_unix_fd(bus_info.connection, &bus_info.fd)) { + ErrorF("[config/dbus-core] couldn't get fd for system bus\n"); + goto err_unref; + } + + if (!dbus_connection_add_filter(bus_info.connection, message_filter, + &bus_info, NULL)) { + ErrorF("[config/dbus-core] couldn't add filter: %s (%s)\n", error.name, + error.message); + goto err_fd; + } + + dbus_error_free(&error); + AddGeneralSocket(bus_info.fd); + + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info); + + for (hook = bus_info.hooks; hook; hook = hook->next) { + if (hook->connect) + hook->connect(bus_info.connection, hook->data); + } + + return 1; + + err_fd: + bus_info.fd = -1; + err_unref: + dbus_connection_unref(bus_info.connection); + bus_info.connection = NULL; + err_begin: + dbus_error_free(&error); + + return 0; +} + +static CARD32 +reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg) +{ + if (connect_to_bus()) { + TimerFree(bus_info.timer); + bus_info.timer = NULL; + return 0; + } + else { + return RECONNECT_DELAY; + } +} + +int +config_dbus_core_add_hook(struct config_dbus_core_hook *hook) +{ + struct config_dbus_core_hook **prev; + + for (prev = &bus_info.hooks; *prev; prev = &(*prev)->next); + + hook->next = NULL; + *prev = hook; + + /* If we're already connected, call the connect hook. */ + if (bus_info.connection) + hook->connect(bus_info.connection, hook->data); + + return 1; +} + +void +config_dbus_core_remove_hook(struct config_dbus_core_hook *hook) +{ + struct config_dbus_core_hook **prev; + + for (prev = &bus_info.hooks; *prev; prev = &(*prev)->next) { + if (*prev == hook) { + *prev = hook->next; + break; + } + } +} + +int +config_dbus_core_init(void) +{ + memset(&bus_info, 0, sizeof(bus_info)); + bus_info.fd = -1; + bus_info.hooks = NULL; + bus_info.connection = NULL; + bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); + + return 1; +} + +void +config_dbus_core_fini(void) +{ + teardown(); +} diff --git a/config/dbus.c b/config/dbus.c new file mode 100644 index 0000000..99a1537 --- /dev/null +++ b/config/dbus.c @@ -0,0 +1,407 @@ +/* + * Copyright © 2006-2007 Daniel Stone + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <dbus/dbus.h> +#include <string.h> + +#include <X11/X.h> + +#include "config-backends.h" +#include "opaque.h" /* for 'display': there should be a better way. */ +#include "input.h" +#include "inputstr.h" + +#define API_VERSION 2 + +#define MATCH_RULE "type='method_call',interface='org.x.config.input'" + +#define MALFORMED_MSG "[config/dbus] malformed message, dropping" +#define MALFORMED_MESSAGE() { DebugF(MALFORMED_MSG "\n"); \ + ret = BadValue; \ + goto unwind; } +#define MALFORMED_MESSAGE_ERROR() { DebugF(MALFORMED_MSG ": %s, %s", \ + error->name, error->message); \ + ret = BadValue; \ + goto unwind; } + +struct connection_info { + char busobject[32]; + char busname[64]; + DBusConnection *connection; +}; + +static void +reset_info(struct connection_info *info) +{ + info->connection = NULL; + info->busname[0] = '\0'; + info->busobject[0] = '\0'; +} + +static int +add_device(DBusMessage * message, DBusMessage * reply, DBusError * error) +{ + DBusMessageIter iter, reply_iter, subiter; + InputOption *input_options = NULL; + int ret, err; + DeviceIntPtr dev = NULL; + + dbus_message_iter_init_append(reply, &reply_iter); + + if (!dbus_message_iter_init(message, &iter)) { + ErrorF("[config/dbus] couldn't initialise iterator\n"); + MALFORMED_MESSAGE(); + } + + input_options = input_option_new(input_options, "_source", "client/dbus"); + if (!input_options) { + ErrorF("[config/dbus] couldn't allocate first key/value pair\n"); + ret = BadAlloc; + goto unwind; + } + + /* signature should be [ss][ss]... */ + while (dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_ARRAY) { + char *key, *value; + + dbus_message_iter_recurse(&iter, &subiter); + + if (dbus_message_iter_get_arg_type(&subiter) != DBUS_TYPE_STRING) + MALFORMED_MESSAGE(); + + dbus_message_iter_get_basic(&subiter, &key); + if (!key) + MALFORMED_MESSAGE(); + /* The _ prefix refers to internal settings, and may not be given by + * the client. */ + if (key[0] == '_') { + ErrorF("[config/dbus] attempted subterfuge: option name %s given\n", + key); + MALFORMED_MESSAGE(); + } + + if (!dbus_message_iter_has_next(&subiter)) + MALFORMED_MESSAGE(); + dbus_message_iter_next(&subiter); + if (dbus_message_iter_get_arg_type(&subiter) != DBUS_TYPE_STRING) + MALFORMED_MESSAGE(); + + dbus_message_iter_get_basic(&subiter, &value); + if (!value) + MALFORMED_MESSAGE(); + + input_options = input_option_new(input_options, key, value); + + dbus_message_iter_next(&iter); + } + + ret = NewInputDeviceRequest(input_options, NULL, &dev); + if (ret != Success) { + DebugF("[config/dbus] NewInputDeviceRequest failed\n"); + goto unwind; + } + + if (!dev) { + DebugF("[config/dbus] NewInputDeviceRequest provided no device\n"); + ret = BadImplementation; + goto unwind; + } + + /* XXX: If we fail halfway through, we don't seem to have any way to + * empty the iterator, so you'll end up with some device IDs, + * plus an error. This seems to be a shortcoming in the D-Bus + * API. */ + for (; dev; dev = dev->next) { + if (!dbus_message_iter_append_basic(&reply_iter, DBUS_TYPE_INT32, + &dev->id)) { + ErrorF("[config/dbus] couldn't append to iterator\n"); + ret = BadAlloc; + goto unwind; + } + } + + unwind: + if (ret != Success) { + if (dev) + RemoveDevice(dev, TRUE); + + err = -ret; + dbus_message_iter_append_basic(&reply_iter, DBUS_TYPE_INT32, &err); + } + + input_option_free_list(&input_options); + + return ret; +} + +static int +remove_device(DBusMessage * message, DBusMessage * reply, DBusError * error) +{ + int deviceid, ret, err; + DeviceIntPtr dev; + DBusMessageIter iter, reply_iter; + + dbus_message_iter_init_append(reply, &reply_iter); + + if (!dbus_message_iter_init(message, &iter)) { + ErrorF("[config/dbus] failed to init iterator\n"); + MALFORMED_MESSAGE(); + } + + if (!dbus_message_get_args(message, error, DBUS_TYPE_UINT32, + &deviceid, DBUS_TYPE_INVALID)) { + MALFORMED_MESSAGE_ERROR(); + } + + dixLookupDevice(&dev, deviceid, serverClient, DixDestroyAccess); + if (!dev) { + DebugF("[config/dbus] bogus device id %d given\n", deviceid); + ret = BadMatch; + goto unwind; + } + + DebugF("[config/dbus] removing device %s (id %d)\n", dev->name, deviceid); + + /* Call PIE here so we don't try to dereference a device that's + * already been removed. */ + OsBlockSignals(); + ProcessInputEvents(); + DeleteInputDeviceRequest(dev); + OsReleaseSignals(); + + ret = Success; + + unwind: + err = (ret == Success) ? ret : -ret; + dbus_message_iter_append_basic(&reply_iter, DBUS_TYPE_INT32, &err); + + return ret; +} + +static int +list_devices(DBusMessage * message, DBusMessage * reply, DBusError * error) +{ + DeviceIntPtr dev; + DBusMessageIter iter, subiter; + + dbus_message_iter_init_append(reply, &iter); + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_STRUCT, NULL, + &subiter)) { + ErrorF("[config/dbus] couldn't init container\n"); + return BadAlloc; + } + if (!dbus_message_iter_append_basic(&subiter, DBUS_TYPE_UINT32, + &dev->id)) { + ErrorF("[config/dbus] couldn't append to iterator\n"); + return BadAlloc; + } + if (!dbus_message_iter_append_basic(&subiter, DBUS_TYPE_STRING, + &dev->name)) { + ErrorF("[config/dbus] couldn't append to iterator\n"); + return BadAlloc; + } + if (!dbus_message_iter_close_container(&iter, &subiter)) { + ErrorF("[config/dbus] couldn't close container\n"); + return BadAlloc; + } + } + + return Success; +} + +static int +get_version(DBusMessage * message, DBusMessage * reply, DBusError * error) +{ + DBusMessageIter iter; + unsigned int version = API_VERSION; + + dbus_message_iter_init_append(reply, &iter); + if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT32, &version)) { + ErrorF("[config/dbus] couldn't append version\n"); + return BadAlloc; + } + + return Success; +} + +static DBusHandlerResult +message_handler(DBusConnection * connection, DBusMessage * message, void *data) +{ + DBusError error; + DBusMessage *reply; + struct connection_info *info = data; + + /* ret is the overall D-Bus handler result, whereas err is the internal + * X error from our individual functions. */ + int ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + int err; + + DebugF("[config/dbus] received a message for %s\n", + dbus_message_get_interface(message)); + + dbus_error_init(&error); + + reply = dbus_message_new_method_return(message); + if (!reply) { + ErrorF("[config/dbus] failed to create reply\n"); + ret = DBUS_HANDLER_RESULT_NEED_MEMORY; + goto err_start; + } + + if (strcmp(dbus_message_get_member(message), "add") == 0) + err = add_device(message, reply, &error); + else if (strcmp(dbus_message_get_member(message), "remove") == 0) + err = remove_device(message, reply, &error); + else if (strcmp(dbus_message_get_member(message), "listDevices") == 0) + err = list_devices(message, reply, &error); + else if (strcmp(dbus_message_get_member(message), "version") == 0) + err = get_version(message, reply, &error); + else + goto err_reply; + + /* Failure to allocate is a special case. */ + if (err == BadAlloc) { + ret = DBUS_HANDLER_RESULT_NEED_MEMORY; + goto err_reply; + } + + /* While failure here is always an OOM, we don't return that, + * since that would result in devices being double-added/removed. */ + if (dbus_connection_send(info->connection, reply, NULL)) + dbus_connection_flush(info->connection); + else + ErrorF("[config/dbus] failed to send reply\n"); + + ret = DBUS_HANDLER_RESULT_HANDLED; + + err_reply: + dbus_message_unref(reply); + err_start: + dbus_error_free(&error); + + return ret; +} + +static void +connect_hook(DBusConnection * connection, void *data) +{ + DBusError error; + DBusObjectPathVTable vtable = {.message_function = message_handler, }; + struct connection_info *info = data; + + info->connection = connection; + + dbus_error_init(&error); + + dbus_bus_request_name(info->connection, info->busname, 0, &error); + if (dbus_error_is_set(&error)) { + ErrorF("[config/dbus] couldn't take over org.x.config: %s (%s)\n", + error.name, error.message); + goto err_start; + } + + /* blocks until we get a reply. */ + dbus_bus_add_match(info->connection, MATCH_RULE, &error); + if (dbus_error_is_set(&error)) { + ErrorF("[config/dbus] couldn't add match: %s (%s)\n", error.name, + error.message); + goto err_name; + } + + if (!dbus_connection_register_object_path(info->connection, + info->busobject, &vtable, info)) { + ErrorF("[config/dbus] couldn't register object path\n"); + goto err_match; + } + + DebugF("[dbus] registered %s, %s\n", info->busname, info->busobject); + + dbus_error_free(&error); + + return; + + err_match: + dbus_bus_remove_match(info->connection, MATCH_RULE, &error); + err_name: + dbus_bus_release_name(info->connection, info->busname, &error); + err_start: + dbus_error_free(&error); + + reset_info(info); +} + +static void +disconnect_hook(void *data) +{ +} + +#if 0 +void +pre_disconnect_hook(void) +{ + DBusError error; + + dbus_error_init(&error); + dbus_connection_unregister_object_path(connection_data->connection, + connection_data->busobject); + dbus_bus_remove_match(connection_data->connection, MATCH_RULE, &error); + dbus_bus_release_name(connection_data->connection, + connection_data->busname, &error); + dbus_error_free(&error); +} +#endif + +static struct connection_info connection_data; + +static struct config_dbus_core_hook core_hook = { + .connect = connect_hook, + .disconnect = disconnect_hook, + .data = &connection_data, +}; + +int +config_dbus_init(void) +{ + snprintf(connection_data.busname, sizeof(connection_data.busname), + "org.x.config.display%d", atoi(display)); + snprintf(connection_data.busobject, sizeof(connection_data.busobject), + "/org/x/config/%d", atoi(display)); + + return config_dbus_core_add_hook(&core_hook); +} + +void +config_dbus_fini(void) +{ + config_dbus_core_remove_hook(&core_hook); + connection_data.busname[0] = '\0'; + connection_data.busobject[0] = '\0'; +} diff --git a/config/fdi2iclass.py b/config/fdi2iclass.py new file mode 100755 index 0000000..8974440 --- /dev/null +++ b/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 <dbn.lists@gmail.com> +# Author: Martin Pitt <martin.pitt@ubuntu.com> +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# 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 <match> 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 <match> 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 <match> 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 <match> 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/config/hal.c b/config/hal.c new file mode 100644 index 0000000..d8e8db7 --- /dev/null +++ b/config/hal.c @@ -0,0 +1,672 @@ +/* + * Copyright © 2007 Daniel Stone + * Copyright © 2007 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <dbus/dbus.h> +#include <hal/libhal.h> +#include <string.h> +#include <sys/select.h> + +#include "input.h" +#include "inputstr.h" +#include "hotplug.h" +#include "config-backends.h" +#include "os.h" + +#define LIBHAL_PROP_KEY "input.x11_options." +#define LIBHAL_XKB_PROP_KEY "input.xkb." + +struct config_hal_info { + DBusConnection *system_bus; + LibHalContext *hal_ctx; +}; + +/* Used for special handling of xkb options. */ +struct xkb_options { + char *layout; + char *model; + char *rules; + char *variant; + char *options; +}; + +static void +device_removed(LibHalContext * ctx, const char *udi) +{ + char *value; + + if (asprintf(&value, "hal:%s", udi) == -1) + return; + + remove_devices("hal", value); + + free(value); +} + +static char * +get_prop_string(LibHalContext * hal_ctx, const char *udi, const char *name) +{ + char *prop, *ret; + + prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL); + LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", + name, udi, prop ? prop : "(null)"); + if (prop) { + ret = strdup(prop); + libhal_free_string(prop); + } + else { + return NULL; + } + + return ret; +} + +static char * +get_prop_string_array(LibHalContext * hal_ctx, const char *udi, + const char *prop) +{ + char **props, *ret, *str; + int i, len = 0; + + props = libhal_device_get_property_strlist(hal_ctx, udi, prop, NULL); + if (props) { + for (i = 0; props[i]; i++) + len += strlen(props[i]); + + ret = calloc(sizeof(char), len + i); /* i - 1 commas, 1 NULL */ + if (!ret) { + libhal_free_string_array(props); + return NULL; + } + + str = ret; + for (i = 0; props[i]; i++) { + strcpy(str, props[i]); + str += strlen(props[i]); + *str++ = ','; + } + *(str - 1) = '\0'; + + libhal_free_string_array(props); + } + else { + return NULL; + } + + return ret; +} + +static void +device_added(LibHalContext * hal_ctx, const char *udi) +{ + char *path = NULL, *driver = NULL, *name = NULL, *config_info = NULL; + char *hal_tags, *parent; + InputOption *input_options = NULL; + InputAttributes attrs = { 0 }; + DeviceIntPtr dev = NULL; + DBusError error; + struct xkb_options xkb_opts = { 0 }; + int rc; + + LibHalPropertySet *set = NULL; + LibHalPropertySetIterator set_iter; + char *psi_key = NULL, *tmp_val; + + dbus_error_init(&error); + + driver = get_prop_string(hal_ctx, udi, "input.x11_driver"); + if (!driver) { + /* verbose, don't tell the user unless they _want_ to see it */ + LogMessageVerb(X_INFO, 7, + "config/hal: no driver specified for device %s\n", udi); + goto unwind; + } + + path = get_prop_string(hal_ctx, udi, "input.device"); + if (!path) { + LogMessage(X_WARNING, + "config/hal: no driver or path specified for %s\n", udi); + goto unwind; + } + attrs.device = strdup(path); + + name = get_prop_string(hal_ctx, udi, "info.product"); + if (!name) + name = strdup("(unnamed)"); + else + attrs.product = strdup(name); + + attrs.vendor = get_prop_string(hal_ctx, udi, "info.vendor"); + hal_tags = get_prop_string(hal_ctx, udi, "input.tags"); + attrs.tags = xstrtokenize(hal_tags, ","); + free(hal_tags); + + if (libhal_device_query_capability(hal_ctx, udi, "input.keys", NULL)) + attrs.flags |= ATTR_KEYBOARD; + if (libhal_device_query_capability(hal_ctx, udi, "input.mouse", NULL)) + attrs.flags |= ATTR_POINTER; + if (libhal_device_query_capability(hal_ctx, udi, "input.joystick", NULL)) + attrs.flags |= ATTR_JOYSTICK; + if (libhal_device_query_capability(hal_ctx, udi, "input.tablet", NULL)) + attrs.flags |= ATTR_TABLET; + if (libhal_device_query_capability(hal_ctx, udi, "input.touchpad", NULL)) + attrs.flags |= ATTR_TOUCHPAD; + if (libhal_device_query_capability(hal_ctx, udi, "input.touchscreen", NULL)) + attrs.flags |= ATTR_TOUCHSCREEN; + + parent = get_prop_string(hal_ctx, udi, "info.parent"); + if (parent) { + int usb_vendor, usb_product; + char *old_parent; + + /* construct USB ID in lowercase - "0000:ffff" */ + usb_vendor = libhal_device_get_property_int(hal_ctx, parent, + "usb.vendor_id", NULL); + LogMessageVerb(X_INFO, 10, + "config/hal: getting usb.vendor_id on %s " + "returned %04x\n", parent, usb_vendor); + usb_product = libhal_device_get_property_int(hal_ctx, parent, + "usb.product_id", NULL); + LogMessageVerb(X_INFO, 10, + "config/hal: getting usb.product_id on %s " + "returned %04x\n", parent, usb_product); + if (usb_vendor && usb_product) + if (asprintf(&attrs.usb_id, "%04x:%04x", usb_vendor, usb_product) + == -1) + attrs.usb_id = NULL; + + attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id"); + old_parent = parent; + + while (!attrs.pnp_id && + (parent = get_prop_string(hal_ctx, parent, "info.parent"))) { + attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id"); + + free(old_parent); + old_parent = parent; + } + + free(old_parent); + } + + input_options = input_option_new(NULL, "_source", "server/hal"); + if (!input_options) { + LogMessage(X_ERROR, + "config/hal: couldn't allocate first key/value pair\n"); + goto unwind; + } + + /* most drivers use device.. not path. evdev uses both however, but the + * path version isn't documented apparently. support both for now. */ + input_options = input_option_new(input_options, "path", path); + input_options = input_option_new(input_options, "device", path); + + input_options = input_option_new(input_options, "driver", driver); + input_options = input_option_new(input_options, "name", name); + + if (asprintf(&config_info, "hal:%s", udi) == -1) { + config_info = NULL; + LogMessage(X_ERROR, "config/hal: couldn't allocate name\n"); + goto unwind; + } + + /* Check for duplicate devices */ + if (device_is_duplicate(config_info)) { + LogMessage(X_WARNING, + "config/hal: device %s already added. Ignoring.\n", name); + goto unwind; + } + + /* ok, grab options from hal.. iterate through all properties + * and lets see if any of them are options that we can add */ + set = libhal_device_get_all_properties(hal_ctx, udi, &error); + + if (!set) { + LogMessage(X_ERROR, + "config/hal: couldn't get property list for %s: %s (%s)\n", + udi, error.name, error.message); + goto unwind; + } + + libhal_psi_init(&set_iter, set); + while (libhal_psi_has_more(&set_iter)) { + /* we are looking for supported keys.. extract and add to options */ + psi_key = libhal_psi_get_key(&set_iter); + + if (psi_key) { + + /* normal options first (input.x11_options.<propname>) */ + if (!strncasecmp + (psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY) - 1)) { + char *tmp; + + /* only support strings for all values */ + tmp_val = get_prop_string(hal_ctx, udi, psi_key); + + if (tmp_val) { + + /* xkb needs special handling. HAL specs include + * input.xkb.xyz options, but the x11-input.fdi specifies + * input.x11_options.Xkbxyz options. By default, we use + * the former, unless the specific X11 ones are specified. + * Since we can't predict the order in which the keys + * arrive, we need to store them. + */ + if ((tmp = strcasestr(psi_key, "xkb")) && strlen(tmp) >= 4) { + if (!strcasecmp(&tmp[3], "layout")) { + free(xkb_opts.layout); + xkb_opts.layout = strdup(tmp_val); + } + else if (!strcasecmp(&tmp[3], "model")) { + free(xkb_opts.model); + xkb_opts.model = strdup(tmp_val); + } + else if (!strcasecmp(&tmp[3], "rules")) { + free(xkb_opts.rules); + xkb_opts.rules = strdup(tmp_val); + } + else if (!strcasecmp(&tmp[3], "variant")) { + free(xkb_opts.variant); + xkb_opts.variant = strdup(tmp_val); + } + else if (!strcasecmp(&tmp[3], "options")) { + free(xkb_opts.options); + xkb_opts.options = strdup(tmp_val); + } + } + else { + /* all others */ + input_options = + input_option_new(input_options, + psi_key + sizeof(LIBHAL_PROP_KEY) - + 1, tmp_val); + free(tmp_val); + } + } + else { + /* server 1.4 had xkb_options as strlist. */ + if ((tmp = strcasestr(psi_key, "xkb")) && + (strlen(tmp) >= 4) && + (!strcasecmp(&tmp[3], "options")) && + (tmp_val = + get_prop_string_array(hal_ctx, udi, psi_key))) { + free(xkb_opts.options); + xkb_opts.options = strdup(tmp_val); + } + } + } + else if (!strncasecmp + (psi_key, LIBHAL_XKB_PROP_KEY, + sizeof(LIBHAL_XKB_PROP_KEY) - 1)) { + char *tmp; + + /* only support strings for all values */ + tmp_val = get_prop_string(hal_ctx, udi, psi_key); + + if (tmp_val && strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY)) { + + tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1]; + + if (!strcasecmp(tmp, "layout")) { + if (!xkb_opts.layout) + xkb_opts.layout = strdup(tmp_val); + } + else if (!strcasecmp(tmp, "rules")) { + if (!xkb_opts.rules) + xkb_opts.rules = strdup(tmp_val); + } + else if (!strcasecmp(tmp, "variant")) { + if (!xkb_opts.variant) + xkb_opts.variant = strdup(tmp_val); + } + else if (!strcasecmp(tmp, "model")) { + if (!xkb_opts.model) + xkb_opts.model = strdup(tmp_val); + } + else if (!strcasecmp(tmp, "options")) { + if (!xkb_opts.options) + xkb_opts.options = strdup(tmp_val); + } + free(tmp_val); + } + else { + /* server 1.4 had xkb options as strlist */ + tmp_val = get_prop_string_array(hal_ctx, udi, psi_key); + if (tmp_val && + strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY)) { + tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1]; + if (!strcasecmp(tmp, ".options") && (!xkb_opts.options)) + xkb_opts.options = strdup(tmp_val); + } + free(tmp_val); + } + } + } + + /* psi_key doesn't need to be freed */ + libhal_psi_next(&set_iter); + } + + /* Now add xkb options */ + if (xkb_opts.layout) + input_options = + input_option_new(input_options, "xkb_layout", xkb_opts.layout); + if (xkb_opts.rules) + input_options = + input_option_new(input_options, "xkb_rules", xkb_opts.rules); + if (xkb_opts.variant) + input_options = + input_option_new(input_options, "xkb_variant", xkb_opts.variant); + if (xkb_opts.model) + input_options = + input_option_new(input_options, "xkb_model", xkb_opts.model); + if (xkb_opts.options) + input_options = + input_option_new(input_options, "xkb_options", xkb_opts.options); + input_options = input_option_new(input_options, "config_info", config_info); + + /* this isn't an error, but how else do you output something that the user can see? */ + LogMessage(X_INFO, "config/hal: Adding input device %s\n", name); + if ((rc = NewInputDeviceRequest(input_options, &attrs, &dev)) != Success) { + LogMessage(X_ERROR, "config/hal: NewInputDeviceRequest failed (%d)\n", + rc); + dev = NULL; + goto unwind; + } + + unwind: + if (set) + libhal_free_property_set(set); + free(path); + free(driver); + free(name); + free(config_info); + input_option_free_list(&input_options); + + free(attrs.product); + free(attrs.vendor); + free(attrs.device); + free(attrs.pnp_id); + free(attrs.usb_id); + if (attrs.tags) { + char **tag = attrs.tags; + + while (*tag) { + free(*tag); + tag++; + } + free(attrs.tags); + } + + free(xkb_opts.layout); + free(xkb_opts.rules); + free(xkb_opts.model); + free(xkb_opts.variant); + free(xkb_opts.options); + + dbus_error_free(&error); + + return; +} + +static void +disconnect_hook(void *data) +{ + DBusError error; + struct config_hal_info *info = data; + + if (info->hal_ctx) { + if (dbus_connection_get_is_connected(info->system_bus)) { + dbus_error_init(&error); + if (!libhal_ctx_shutdown(info->hal_ctx, &error)) + LogMessage(X_WARNING, + "config/hal: disconnect_hook couldn't shut down context: %s (%s)\n", + error.name, error.message); + dbus_error_free(&error); + } + libhal_ctx_free(info->hal_ctx); + } + + info->hal_ctx = NULL; + info->system_bus = NULL; +} + +static BOOL +connect_and_register(DBusConnection * connection, struct config_hal_info *info) +{ + DBusError error; + char **devices; + int num_devices, i; + + if (info->hal_ctx) + return TRUE; /* already registered, pretend we did something */ + + info->system_bus = connection; + + dbus_error_init(&error); + + info->hal_ctx = libhal_ctx_new(); + if (!info->hal_ctx) { + LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n"); + goto out_err; + } + + if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) { + LogMessage(X_ERROR, + "config/hal: couldn't associate HAL context with bus\n"); + goto out_err; + } + if (!libhal_ctx_init(info->hal_ctx, &error)) { + LogMessage(X_ERROR, + "config/hal: couldn't initialise context: %s (%s)\n", + error.name ? error.name : "unknown error", + error.message ? error.message : "null"); + goto out_err; + } + if (!libhal_device_property_watch_all(info->hal_ctx, &error)) { + LogMessage(X_ERROR, + "config/hal: couldn't watch all properties: %s (%s)\n", + error.name ? error.name : "unknown error", + error.message ? error.message : "null"); + goto out_ctx; + } + libhal_ctx_set_device_added(info->hal_ctx, device_added); + libhal_ctx_set_device_removed(info->hal_ctx, device_removed); + + devices = libhal_find_device_by_capability(info->hal_ctx, "input", + &num_devices, &error); + /* FIXME: Get default devices if error is set. */ + if (dbus_error_is_set(&error)) { + LogMessage(X_ERROR, "config/hal: couldn't find input device: %s (%s)\n", + error.name ? error.name : "unknown error", + error.message ? error.message : "null"); + goto out_ctx; + } + for (i = 0; i < num_devices; i++) + device_added(info->hal_ctx, devices[i]); + libhal_free_string_array(devices); + + dbus_error_free(&error); + + return TRUE; + + out_ctx: + dbus_error_free(&error); + + if (!libhal_ctx_shutdown(info->hal_ctx, &error)) { + LogMessage(X_WARNING, + "config/hal: couldn't shut down context: %s (%s)\n", + error.name ? error.name : "unknown error", + error.message ? error.message : "null"); + dbus_error_free(&error); + } + + out_err: + dbus_error_free(&error); + + if (info->hal_ctx) { + libhal_ctx_free(info->hal_ctx); + } + + info->hal_ctx = NULL; + info->system_bus = NULL; + + return FALSE; +} + +/** + * Handle NewOwnerChanged signals to deal with HAL startup at X server runtime. + * + * NewOwnerChanged is send once when HAL shuts down, and once again when it + * comes back up. Message has three arguments, first is the name + * (org.freedesktop.Hal), the second one is the old owner, third one is new + * owner. + */ +static DBusHandlerResult +ownerchanged_handler(DBusConnection * connection, DBusMessage * message, + void *data) +{ + int ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + + if (dbus_message_is_signal(message, + "org.freedesktop.DBus", "NameOwnerChanged")) { + DBusError error; + char *name, *old_owner, *new_owner; + + dbus_error_init(&error); + dbus_message_get_args(message, &error, + DBUS_TYPE_STRING, &name, + DBUS_TYPE_STRING, &old_owner, + DBUS_TYPE_STRING, &new_owner, DBUS_TYPE_INVALID); + + if (dbus_error_is_set(&error)) { + ErrorF + ("[config/hal] failed to get NameOwnerChanged args: %s (%s)\n", + error.name, error.message); + } + else if (name && strcmp(name, "org.freedesktop.Hal") == 0) { + + if (!old_owner || !strlen(old_owner)) { + DebugF("[config/hal] HAL startup detected.\n"); + if (connect_and_register + (connection, (struct config_hal_info *) data)) + dbus_connection_unregister_object_path(connection, + "/org/freedesktop/DBus"); + else + ErrorF("[config/hal] Failed to connect to HAL bus.\n"); + } + + ret = DBUS_HANDLER_RESULT_HANDLED; + } + dbus_error_free(&error); + } + + return ret; +} + +/** + * Register a handler for the NameOwnerChanged signal. + */ +static BOOL +listen_for_startup(DBusConnection * connection, void *data) +{ + DBusObjectPathVTable vtable = {.message_function = ownerchanged_handler, }; + DBusError error; + const char MATCH_RULE[] = "sender='org.freedesktop.DBus'," + "interface='org.freedesktop.DBus'," + "type='signal'," + "path='/org/freedesktop/DBus'," "member='NameOwnerChanged'"; + int rc = FALSE; + + dbus_error_init(&error); + dbus_bus_add_match(connection, MATCH_RULE, &error); + if (!dbus_error_is_set(&error)) { + if (dbus_connection_register_object_path(connection, + "/org/freedesktop/DBus", + &vtable, data)) + rc = TRUE; + else + ErrorF("[config/hal] cannot register object path.\n"); + } + else { + ErrorF("[config/hal] couldn't add match rule: %s (%s)\n", error.name, + error.message); + ErrorF("[config/hal] cannot detect a HAL startup.\n"); + } + + dbus_error_free(&error); + + return rc; +} + +static void +connect_hook(DBusConnection * connection, void *data) +{ + struct config_hal_info *info = data; + + if (listen_for_startup(connection, data) && + connect_and_register(connection, info)) + dbus_connection_unregister_object_path(connection, + "/org/freedesktop/DBus"); + + return; +} + +static struct config_hal_info hal_info; + +static struct config_dbus_core_hook hook = { + .connect = connect_hook, + .disconnect = disconnect_hook, + .data = &hal_info, +}; + +int +config_hal_init(void) +{ + memset(&hal_info, 0, sizeof(hal_info)); + hal_info.system_bus = NULL; + hal_info.hal_ctx = NULL; + + if (!config_dbus_core_add_hook(&hook)) { + LogMessage(X_ERROR, "config/hal: failed to add D-Bus hook\n"); + return 0; + } + + /* verbose message */ + LogMessageVerb(X_INFO, 7, "config/hal: initialized\n"); + + return 1; +} + +void +config_hal_fini(void) +{ + config_dbus_core_remove_hook(&hook); +} diff --git a/config/non-seat0.conf.multi-seat b/config/non-seat0.conf.multi-seat new file mode 100644 index 0000000..34008ce --- /dev/null +++ b/config/non-seat0.conf.multi-seat @@ -0,0 +1,18 @@ +# This is the default configuration for servers on seat-1 and above. +# +# Start the server with -config non-seat0.conf.multi-seat, or alternatively +# rename the file to end in .conf and put it in the standard config +# directory (though it will apply to _all_ seats!). +# +# * Disable VT switching with Ctrl-Alt-F1 +# * Force a grab on all input devices to detach them from the VT subsystem +# to avoid event leakage. + +Section "ServerFlags" + Option "DontVTSwitch" "on" +EndSection + +Section "InputClass" + Identifier "Force input devices to seat" + Option "GrabDevice" "on" +EndSection diff --git a/config/udev.c b/config/udev.c new file mode 100644 index 0000000..bcafbd9 --- /dev/null +++ b/config/udev.c @@ -0,0 +1,502 @@ +/* + * Copyright © 2009 Julien Cristau + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Julien Cristau <jcristau@debian.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <libudev.h> +#include <ctype.h> + +#include "input.h" +#include "inputstr.h" +#include "hotplug.h" +#include "config-backends.h" +#include "os.h" +#include "globals.h" + +#define UDEV_XKB_PROP_KEY "xkb" + +#define LOG_PROPERTY(path, prop, val) \ + LogMessageVerb(X_INFO, 10, \ + "config/udev: getting property %s on %s " \ + "returned \"%s\"\n", \ + (prop), (path), (val) ? (val) : "(null)") +#define LOG_SYSATTR(path, attr, val) \ + LogMessageVerb(X_INFO, 10, \ + "config/udev: getting attribute %s on %s " \ + "returned \"%s\"\n", \ + (attr), (path), (val) ? (val) : "(null)") + +static struct udev_monitor *udev_monitor; + +#ifdef CONFIG_UDEV_KMS +static Bool +config_udev_odev_setup_attribs(const char *path, const char *syspath, + config_odev_probe_proc_ptr probe_callback); +#endif + +static void +device_added(struct udev_device *udev_device) +{ + const char *path, *name = NULL; + char *config_info = NULL; + const char *syspath; + const char *tags_prop; + const char *key, *value, *tmp; + InputOption *input_options; + InputAttributes attrs = { }; + DeviceIntPtr dev = NULL; + struct udev_list_entry *set, *entry; + struct udev_device *parent; + int rc; + const char *dev_seat; + + path = udev_device_get_devnode(udev_device); + + syspath = udev_device_get_syspath(udev_device); + + if (!path || !syspath) + return; + + dev_seat = udev_device_get_property_value(udev_device, "ID_SEAT"); + if (!dev_seat) + dev_seat = "seat0"; + + if (SeatId && strcmp(dev_seat, SeatId)) + return; + + if (!SeatId && strcmp(dev_seat, "seat0")) + return; + +#ifdef CONFIG_UDEV_KMS + if (!strcmp(udev_device_get_subsystem(udev_device), "drm")) { + const char *sysname = udev_device_get_sysname(udev_device); + + if (strncmp(sysname, "card", 4) != 0) + return; + + LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path); + + config_udev_odev_setup_attribs(path, syspath, NewGPUDeviceRequest); + return; + } +#endif + + 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; + } + + input_options = input_option_new(NULL, "_source", "server/udev"); + if (!input_options) + return; + + parent = udev_device_get_parent(udev_device); + if (parent) { + const char *ppath = udev_device_get_devnode(parent); + const char *product = udev_device_get_property_value(parent, "PRODUCT"); + const char *pnp_id = udev_device_get_sysattr_value(parent, "id"); + unsigned int usb_vendor, usb_model; + + name = udev_device_get_sysattr_value(parent, "name"); + LOG_SYSATTR(ppath, "name", name); + if (!name) { + name = udev_device_get_property_value(parent, "NAME"); + LOG_PROPERTY(ppath, "NAME", name); + } + + /* construct USB ID in lowercase hex - "0000:ffff" */ + if (product && + sscanf(product, "%*x/%4x/%4x/%*x", &usb_vendor, &usb_model) == 2) { + if (asprintf(&attrs.usb_id, "%04x:%04x", usb_vendor, usb_model) + == -1) + attrs.usb_id = NULL; + else + LOG_PROPERTY(ppath, "PRODUCT", product); + } + + while (!pnp_id && (parent = udev_device_get_parent(parent))) { + pnp_id = udev_device_get_sysattr_value(parent, "id"); + if (!pnp_id) + continue; + + attrs.pnp_id = strdup(pnp_id); + ppath = udev_device_get_devnode(parent); + LOG_SYSATTR(ppath, "id", pnp_id); + } + + } + if (!name) + name = "(unnamed)"; + else + attrs.product = strdup(name); + input_options = input_option_new(input_options, "name", name); + input_options = input_option_new(input_options, "path", path); + input_options = input_option_new(input_options, "device", path); + if (path) + attrs.device = strdup(path); + + tags_prop = udev_device_get_property_value(udev_device, "ID_INPUT.tags"); + LOG_PROPERTY(path, "ID_INPUT.tags", tags_prop); + attrs.tags = xstrtokenize(tags_prop, ","); + + if (asprintf(&config_info, "udev:%s", syspath) == -1) { + config_info = NULL; + goto unwind; + } + + if (device_is_duplicate(config_info)) { + LogMessage(X_WARNING, "config/udev: device %s already added. " + "Ignoring.\n", name); + goto unwind; + } + + set = udev_device_get_properties_list_entry(udev_device); + udev_list_entry_foreach(entry, set) { + key = udev_list_entry_get_name(entry); + if (!key) + continue; + value = udev_list_entry_get_value(entry); + if (!strncasecmp(key, UDEV_XKB_PROP_KEY, sizeof(UDEV_XKB_PROP_KEY) - 1)) { + LOG_PROPERTY(path, key, value); + tmp = key + sizeof(UDEV_XKB_PROP_KEY) - 1; + if (!strcasecmp(tmp, "rules")) + input_options = + input_option_new(input_options, "xkb_rules", value); + else if (!strcasecmp(tmp, "layout")) + input_options = + input_option_new(input_options, "xkb_layout", value); + else if (!strcasecmp(tmp, "variant")) + input_options = + input_option_new(input_options, "xkb_variant", value); + else if (!strcasecmp(tmp, "model")) + input_options = + input_option_new(input_options, "xkb_model", value); + else if (!strcasecmp(tmp, "options")) + input_options = + input_option_new(input_options, "xkb_options", value); + } + else if (!strcmp(key, "ID_VENDOR")) { + LOG_PROPERTY(path, key, value); + attrs.vendor = strdup(value); + } + else if (!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; + } + } + + input_options = input_option_new(input_options, "config_info", config_info); + + /* Default setting needed for non-seat0 seats */ + if (ServerIsNotSeat0()) + input_options = input_option_new(input_options, "GrabDevice", "on"); + + LogMessage(X_INFO, "config/udev: Adding input device %s (%s)\n", + name, path); + rc = NewInputDeviceRequest(input_options, &attrs, &dev); + if (rc != Success) + goto unwind; + + unwind: + free(config_info); + input_option_free_list(&input_options); + + free(attrs.usb_id); + free(attrs.pnp_id); + free(attrs.product); + free(attrs.device); + free(attrs.vendor); + if (attrs.tags) { + char **tag = attrs.tags; + + while (*tag) { + free(*tag); + tag++; + } + free(attrs.tags); + } + + return; +} + +static void +device_removed(struct udev_device *device) +{ + char *value; + const char *syspath = udev_device_get_syspath(device); + +#ifdef CONFIG_UDEV_KMS + if (!strcmp(udev_device_get_subsystem(device), "drm")) { + const char *sysname = udev_device_get_sysname(device); + const char *path = udev_device_get_devnode(device); + + if (strncmp(sysname,"card", 4) != 0) + return; + ErrorF("removing GPU device %s %s\n", syspath, path); + if (!path) + return; + + config_udev_odev_setup_attribs(path, syspath, DeleteGPUDeviceRequest); + return; + } +#endif + + if (asprintf(&value, "udev:%s", syspath) == -1) + return; + + remove_devices("udev", value); + + free(value); +} + +static void +wakeup_handler(pointer data, int err, pointer read_mask) +{ + int udev_fd = udev_monitor_get_fd(udev_monitor); + struct udev_device *udev_device; + const char *action; + + if (err < 0) + return; + + if (FD_ISSET(udev_fd, (fd_set *) read_mask)) { + udev_device = udev_monitor_receive_device(udev_monitor); + if (!udev_device) + return; + action = udev_device_get_action(udev_device); + if (action) { + if (!strcmp(action, "add")) { + device_removed(udev_device); + device_added(udev_device); + } else if (!strcmp(action, "change")) { + /* ignore change for the drm devices */ + if (strcmp(udev_device_get_subsystem(udev_device), "drm")) { + device_removed(udev_device); + device_added(udev_device); + } + } + else if (!strcmp(action, "remove")) + device_removed(udev_device); + } + udev_device_unref(udev_device); + } +} + +static void +block_handler(pointer data, struct timeval **tv, pointer read_mask) +{ +} + +int +config_udev_pre_init(void) +{ + struct udev *udev; + + udev = udev_new(); + if (!udev) + return 0; + + udev_monitor = udev_monitor_new_from_netlink(udev, "udev"); + if (!udev_monitor) + return 0; + + udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "input", + NULL); + /* For Wacom serial devices */ + udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "tty", NULL); +#ifdef CONFIG_UDEV_KMS + /* For output GPU devices */ + udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "drm", NULL); +#endif + +#ifdef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG + if (ServerIsNotSeat0()) + udev_monitor_filter_add_match_tag(udev_monitor, SeatId); +#endif + if (udev_monitor_enable_receiving(udev_monitor)) { + ErrorF("config/udev: failed to bind the udev monitor\n"); + return 0; + } + return 1; +} + +int +config_udev_init(void) +{ + struct udev *udev; + struct udev_enumerate *enumerate; + struct udev_list_entry *devices, *device; + + udev = udev_monitor_get_udev(udev_monitor); + enumerate = udev_enumerate_new(udev); + if (!enumerate) + return 0; + + udev_enumerate_add_match_subsystem(enumerate, "input"); + udev_enumerate_add_match_subsystem(enumerate, "tty"); +#ifdef CONFIG_UDEV_KMS + udev_enumerate_add_match_subsystem(enumerate, "drm"); +#endif + +#ifdef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG + if (ServerIsNotSeat0()) + udev_enumerate_add_match_tag(enumerate, SeatId); +#endif + + udev_enumerate_scan_devices(enumerate); + devices = udev_enumerate_get_list_entry(enumerate); + udev_list_entry_foreach(device, devices) { + const char *syspath = udev_list_entry_get_name(device); + struct udev_device *udev_device = + udev_device_new_from_syspath(udev, syspath); + + /* Device might be gone by the time we try to open it */ + if (!udev_device) + continue; + + device_added(udev_device); + udev_device_unref(udev_device); + } + udev_enumerate_unref(enumerate); + + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL); + AddGeneralSocket(udev_monitor_get_fd(udev_monitor)); + + return 1; +} + +void +config_udev_fini(void) +{ + struct udev *udev; + + if (!udev_monitor) + return; + + udev = udev_monitor_get_udev(udev_monitor); + + RemoveGeneralSocket(udev_monitor_get_fd(udev_monitor)); + RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL); + udev_monitor_unref(udev_monitor); + udev_monitor = NULL; + udev_unref(udev); +} + +#ifdef CONFIG_UDEV_KMS + +static Bool +config_udev_odev_setup_attribs(const char *path, const char *syspath, + config_odev_probe_proc_ptr probe_callback) +{ + struct OdevAttributes *attribs = config_odev_allocate_attribute_list(); + int ret; + + if (!attribs) + return FALSE; + + ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_PATH, path); + if (ret == FALSE) + goto fail; + + ret = config_odev_add_attribute(attribs, ODEV_ATTRIB_SYSPATH, syspath); + if (ret == FALSE) + goto fail; + + /* ownership of attribs is passed to probe layer */ + probe_callback(attribs); + return TRUE; +fail: + config_odev_free_attributes(attribs); + free(attribs); + return FALSE; +} + +void +config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback) +{ + struct udev *udev; + struct udev_enumerate *enumerate; + struct udev_list_entry *devices, *device; + + udev = udev_monitor_get_udev(udev_monitor); + enumerate = udev_enumerate_new(udev); + if (!enumerate) + return; + + udev_enumerate_add_match_subsystem(enumerate, "drm"); + udev_enumerate_add_match_sysname(enumerate, "card[0-9]*"); +#ifdef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG + if (ServerIsNotSeat0()) + udev_enumerate_add_match_tag(enumerate, SeatId); +#endif + udev_enumerate_scan_devices(enumerate); + devices = udev_enumerate_get_list_entry(enumerate); + udev_list_entry_foreach(device, devices) { + const char *syspath = udev_list_entry_get_name(device); + struct udev_device *udev_device = udev_device_new_from_syspath(udev, syspath); + const char *path = udev_device_get_devnode(udev_device); + const char *sysname = udev_device_get_sysname(udev_device); + + if (!path || !syspath) + goto no_probe; + else if (strcmp(udev_device_get_subsystem(udev_device), "drm") != 0) + goto no_probe; + else if (strncmp(sysname, "card", 4) != 0) + goto no_probe; + + config_udev_odev_setup_attribs(path, syspath, probe_callback); + + no_probe: + udev_device_unref(udev_device); + } + udev_enumerate_unref(enumerate); + return; +} +#endif + diff --git a/config/wscons.c b/config/wscons.c new file mode 100644 index 0000000..fb114bd --- /dev/null +++ b/config/wscons.c @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2011 Matthieu Herrb + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <dev/wscons/wsconsio.h> +#include <dev/wscons/wsksymdef.h> + +#include <sys/ioctl.h> +#include <errno.h> +#include <string.h> +#include <unistd.h> + +#include "input.h" +#include "inputstr.h" +#include "os.h" +#include "config-backends.h" + +#define WSCONS_KBD_DEVICE "/dev/wskbd" +#define WSCONS_MOUSE_PREFIX "/dev/wsmouse" + +#define KB_OVRENC \ + { KB_UK, "gb" }, \ + { KB_SV, "se" }, \ + { KB_SG, "ch" }, \ + { KB_SF, "ch" }, \ + { KB_LA, "latam" }, \ + { KB_CF, "ca" } + +struct nameint { + int val; + char *name; +} kbdenc[] = { + KB_OVRENC, + KB_ENCTAB, + {0} +}; + +struct nameint kbdvar[] = { + {KB_NODEAD | KB_SG, "de_nodeadkeys"}, + {KB_NODEAD | KB_SF, "fr_nodeadkeys"}, + {KB_SF, "fr"}, + {KB_DVORAK | KB_CF, "fr-dvorak"}, + {KB_DVORAK | KB_FR, "bepo"}, + {KB_DVORAK, "dvorak"}, + {KB_CF, "fr-legacy"}, + {KB_NODEAD, "nodeadkeys"}, + {0} +}; + +struct nameint kbdopt[] = { + {KB_SWAPCTRLCAPS, "ctrl:swapcaps"}, + {0} +}; + +struct nameint kbdmodel[] = { + {WSKBD_TYPE_ZAURUS, "zaurus"}, + {0} +}; + +static void +wscons_add_keyboard(void) +{ + InputAttributes attrs = { }; + DeviceIntPtr dev = NULL; + InputOption *input_options = NULL; + char *config_info = NULL; + int fd, i, rc; + unsigned int type; + kbd_t wsenc = 0; + + /* Find keyboard configuration */ + fd = open(WSCONS_KBD_DEVICE, O_RDWR | O_NONBLOCK | O_EXCL); + if (fd == -1) { + LogMessage(X_ERROR, "wskbd: open %s: %s\n", + WSCONS_KBD_DEVICE, strerror(errno)); + return; + } + if (ioctl(fd, WSKBDIO_GETENCODING, &wsenc) == -1) { + LogMessage(X_WARNING, "wskbd: ioctl(WSKBDIO_GETENCODING) " + "failed: %s\n", strerror(errno)); + close(fd); + return; + } + if (ioctl(fd, WSKBDIO_GTYPE, &type) == -1) { + LogMessage(X_WARNING, "wskbd: ioctl(WSKBDIO_GTYPE) " + "failed: %s\n", strerror(errno)); + close(fd); + return; + } + close(fd); + + input_options = input_option_new(input_options, "_source", "server/wscons"); + if (input_options == NULL) + return; + + LogMessage(X_INFO, "config/wscons: checking input device %s\n", + WSCONS_KBD_DEVICE); + input_options = input_option_new(input_options, "name", WSCONS_KBD_DEVICE); + input_options = input_option_new(input_options, "driver", "kbd"); + + config_info = Xprintf("wscons:%s", WSCONS_KBD_DEVICE); + if (!config_info) + goto unwind; + if (KB_ENCODING(wsenc) == KB_USER) { + /* Ignore wscons "user" layout */ + LogMessageVerb(X_INFO, 3, "wskbd: ignoring \"user\" layout\n"); + goto kbd_config_done; + } + for (i = 0; kbdenc[i].val; i++) + if (KB_ENCODING(wsenc) == kbdenc[i].val) { + LogMessageVerb(X_INFO, 3, "wskbd: using layout %s\n", + kbdenc[i].name); + input_options = input_option_new(input_options, + "xkb_layout", kbdenc[i].name); + break; + } + for (i = 0; kbdvar[i].val; i++) + if (wsenc == kbdvar[i].val || KB_VARIANT(wsenc) == kbdvar[i].val) { + LogMessageVerb(X_INFO, 3, "wskbd: using variant %s\n", + kbdvar[i].name); + input_options = input_option_new(input_options, + "xkb_variant", kbdvar[i].name); + break; + } + for (i = 0; kbdopt[i].val; i++) + if (KB_VARIANT(wsenc) == kbdopt[i].val) { + LogMessageVerb(X_INFO, 3, "wskbd: using option %s\n", + kbdopt[i].name); + input_options = input_option_new(input_options, + "xkb_options", kbdopt[i].name); + break; + } + for (i = 0; kbdmodel[i].val; i++) + if (type == kbdmodel[i].val) { + LogMessageVerb(X_INFO, 3, "wskbd: using model %s\n", + kbdmodel[i].name); + input_options = input_option_new(input_options, + "xkb_model", kbdmodel[i].name); + break; + } + + kbd_config_done: + attrs.flags |= ATTR_KEYBOARD; + rc = NewInputDeviceRequest(input_options, &attrs, &dev); + if (rc != Success) + goto unwind; + + for (; dev; dev = dev->next) { + free(dev->config_info); + dev->config_info = strdup(config_info); + } + unwind: + input_option_free_list(&input_options); +} + +static void +wscons_add_pointer(const char *path, const char *driver, int flags) +{ + InputAttributes attrs = { }; + DeviceIntPtr dev = NULL; + InputOption *input_options = NULL; + char *config_info = NULL; + int rc; + + config_info = Xprintf("wscons:%s", path); + if (!config_info) + return; + + input_options = input_option_new(input_options, "_source", "server/wscons"); + if (input_options == NULL) + return; + + input_options = input_option_new(input_options, "name", strdup(path)); + input_options = input_option_new(input_options, "driver", strdup(driver)); + input_options = input_option_new(input_options, "device", strdup(path)); + LogMessage(X_INFO, "config/wscons: checking input device %s\n", path); + attrs.flags |= flags; + rc = NewInputDeviceRequest(input_options, &attrs, &dev); + if (rc != Success) + goto unwind; + + for (; dev; dev = dev->next) { + free(dev->config_info); + dev->config_info = strdup(config_info); + } + unwind: + input_option_free_list(&input_options); +} + +static void +wscons_add_pointers(void) +{ + char devname[256]; + int fd, i, wsmouse_type; + + /* Check pointing devices */ + for (i = 0; i < 4; i++) { + snprintf(devname, sizeof(devname), "%s%d", WSCONS_MOUSE_PREFIX, i); + LogMessageVerb(X_INFO, 10, "wsmouse: checking %s\n", devname); + fd = open_device(devnamem O_RDWR | O_NONBLOCK | O_EXCL); + if (fd == -1) { + LogMessageVerb(X_WARNING, 10, "%s: %s\n", devname, strerror(errno)); + continue; + } + if (ioctl(fd, WSMOUSEIO_GTYPE, &wsmouse_type) != 0) { + LogMessageVerb(X_WARNING, 10, + "%s: WSMOUSEIO_GTYPE failed\n", devname); + close(fd); + continue; + } + close(fd); + switch (wsmouse_type) { + case WSMOUSE_TYPE_SYNAPTICS: + wscons_add_pointer(devname, "synaptics", ATTR_TOUCHPAD); + break; + case WSMOUSE_TYPE_TPANEL: + wscons_add_pointer(devname, "ws", ATTR_TOUCHSCREEN); + break; + default: + break; + } + } + /* Add a default entry catching all other mux elements as "mouse" */ + wscons_add_pointer(WSCONS_MOUSE_PREFIX, "mouse", ATTR_POINTER); +} + +int +config_wscons_init(void) +{ + wscons_add_keyboard(); + wscons_add_pointers(); + return 1; +} + +void +config_wscons_fini(void) +{ + /* Not much to do ? */ +} diff --git a/config/x11-input.fdi b/config/x11-input.fdi new file mode 100644 index 0000000..b263f36 --- /dev/null +++ b/config/x11-input.fdi @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8"?> +<deviceinfo version="0.2"> + <device> + + <!-- The way this works: + + Match against some input device (see the HAL specification for more + information), and then merge in keys, which you can use to specify + the configuration similar to the way you would in xorg.conf. You will + need to restart HAL after making changes. If you are having issues, + starting X with the -logverbose 7 flag may yield useful information. + + Keys Supported: + + Key "input.x11_driver" (string) + This specifies the driver to use. You MUST specify this option, + or a driver will not be loaded and the rest will be ignored by + Xorg + + Key "input.x11_options.<option name>" (string) + This allows you to specify arbitrary options to pass to the driver. + Anything you would normally specify in xorg.conf goes here. So, for + option "Mode" in xorg.conf, you would specify the key name of + "input.x11_options.Mode". + + Do not specify "input.x11_options.Device" since "input.device" + will be used automatically. + + You MUST specify all options as strings, otherwise the server will + ignore them. + + Legacy Keys + "input.xkb.rules" + "input.xkb.model" + "input.xkb.layout" + "input.xkb.variant" + "input.xkb.options" + + These keys are deprecated. Use these instead: + "input.x11_options.XkbRules" + "input.x11_options.XkbModel" + "input.x11_options.XkbLayout" + "input.x11_options.XkbVariant" + "input.x11_options.XkbOptions" + + See the evdev documentation for more information. + + FIXME: Support tablets too. + TODO: I think its fixed, can't test + + --> + + <match key="info.capabilities" contains="input.mouse"> + <merge key="input.x11_driver" type="string">mouse</merge> + <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" + string="Linux"> + <merge key="input.x11_driver" type="string">evdev</merge> + </match> + <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" + string="SunOS"> + <match key="input.device" contains="usb"> + <merge key="input.x11_options.StreamsModule" type="string">usbms</merge> + <merge key="input.x11_options.Protocol" type="string">VUID</merge> + </match> + </match> + </match> + + <match key="info.capabilities" contains="input.keys"> + <merge key="input.x11_options.XkbRules" type="string">base</merge> + + <!-- If we're using Linux, we use evdev by default (falling back to + kbd otherwise). --> + <merge key="input.x11_driver" type="string">kbd</merge> + <merge key="input.x11_options.XkbModel" type="string">pc105</merge> + <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" + string="Linux"> + <merge key="input.x11_driver" type="string">evdev</merge> + <merge key="input.x11_options.XkbModel" type="string">evdev</merge> + </match> + <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" + string="SunOS"> + <match key="input.device" contains="usb"> + <merge key="input.x11_options.StreamsModule" type="string">usbkbm</merge> + <merge key="input.x11_options.Protocol" type="string">VUID</merge> + </match> + </match> + + <merge key="input.x11_options.XkbLayout" type="string">us</merge> + + <merge key="input.x11_options.XkbVariant" type="string" /> + </match> + </device> +</deviceinfo> diff --git a/config/xorg-server.conf b/config/xorg-server.conf new file mode 100644 index 0000000..47a9a78 --- /dev/null +++ b/config/xorg-server.conf @@ -0,0 +1,13 @@ +<!DOCTYPE busconfig PUBLIC + "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <policy context="default"> + <allow own="org.x.config.display0"/> + <allow send_destination="org.x.config.display0"/> + <allow send_interface="org.x.config.display0"/> + <allow own="org.x.config.display1"/> + <allow send_destination="org.x.config.display1"/> + <allow send_interface="org.x.config.display1"/> + </policy> +</busconfig> diff --git a/configure b/configure new file mode 100755 index 0000000..f20dd09 --- /dev/null +++ b/configure @@ -0,0 +1,33810 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for xorg-server 1.15.1. +# +# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='xorg-server' +PACKAGE_TARNAME='xorg-server' +PACKAGE_VERSION='1.15.1' +PACKAGE_STRING='xorg-server 1.15.1' +PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' +PACKAGE_URL='' + +ac_unique_file="Makefile.am" +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +DIX_CFLAGS +BUILD_TIME +BUILD_DATE +RELEASE_DATE +PROJECTROOT +XFAKESERVER_FALSE +XFAKESERVER_TRUE +BUILD_KDRIVEFBDEVLIB_FALSE +BUILD_KDRIVEFBDEVLIB_TRUE +XEPHYR_FALSE +XEPHYR_TRUE +KDRIVEFBDEV_FALSE +KDRIVEFBDEV_TRUE +TSLIB_FALSE +TSLIB_TRUE +KDRIVE_MOUSE_FALSE +KDRIVE_MOUSE_TRUE +KDRIVE_KBD_FALSE +KDRIVE_KBD_TRUE +KDRIVE_EVDEV_FALSE +KDRIVE_EVDEV_TRUE +KDRIVELINUX_FALSE +KDRIVELINUX_TRUE +KDRIVE_LIBS +KDRIVE_LOCAL_LIBS +KDRIVE_PURE_LIBS +KDRIVE_CFLAGS +KDRIVE_PURE_INCS +KDRIVE_INCS +XEPHYR_INCS +XEPHYR_LIBS +XEPHYR_CFLAGS +TSLIB_LIBS +TSLIB_CFLAGS +KDRIVE_FALSE +KDRIVE_TRUE +DMX_BUILD_USB_FALSE +DMX_BUILD_USB_TRUE +DMX_BUILD_LNX_FALSE +DMX_BUILD_LNX_TRUE +X11EXAMPLES_DEP_LIBS +X11EXAMPLES_DEP_CFLAGS +XRESEXAMPLES_DEP_LIBS +XRESEXAMPLES_DEP_CFLAGS +XTSTEXAMPLES_DEP_LIBS +XTSTEXAMPLES_DEP_CFLAGS +DMXXIEXAMPLES_DEP_LIBS +DMXXIEXAMPLES_DEP_CFLAGS +DMXXMUEXAMPLES_DEP_LIBS +DMXXMUEXAMPLES_DEP_CFLAGS +DMXEXAMPLES_DEP_LIBS +DMXEXAMPLES_DEP_CFLAGS +XDMX_SYS_LIBS +XDMX_LIBS +XDMX_CFLAGS +DMX_FALSE +DMX_TRUE +XDMXCONFIG_DEP_LIBS +XDMXCONFIG_DEP_CFLAGS +DMXMODULES_LIBS +DMXMODULES_CFLAGS +STANDALONE_XPBPROXY_FALSE +STANDALONE_XPBPROXY_TRUE +XQUARTZ_SPARKLE_FALSE +XQUARTZ_SPARKLE_TRUE +XQUARTZ_FALSE +XQUARTZ_TRUE +am__fastdepOBJC_FALSE +am__fastdepOBJC_TRUE +OBJCDEPMODE +OBJCFLAGS +OBJCLINK +OBJCCLD +OBJC +XPBPROXY_LIBS +XPBPROXY_CFLAGS +XQUARTZ_LIBS +XWIN_XV_FALSE +XWIN_XV_TRUE +XWIN_RANDR_FALSE +XWIN_RANDR_TRUE +XWIN_PRIMARYFB_FALSE +XWIN_PRIMARYFB_TRUE +XWIN_NATIVEGDI_FALSE +XWIN_NATIVEGDI_TRUE +XWIN_GLX_WINDOWS_FALSE +XWIN_GLX_WINDOWS_TRUE +XWIN_CLIPBOARD_FALSE +XWIN_CLIPBOARD_TRUE +XWIN_MULTIWINDOWEXTWM_FALSE +XWIN_MULTIWINDOWEXTWM_TRUE +XWIN_MULTIWINDOW_FALSE +XWIN_MULTIWINDOW_TRUE +XWIN_FALSE +XWIN_TRUE +KHRONOS_SPEC_DIR +KHRONOS_OPENGL_REGISTRY_LIBS +KHRONOS_OPENGL_REGISTRY_CFLAGS +PYTHON3 +XWIN_SYS_LIBS +XWIN_SERVER_NAME +XWIN_LIBS +WINDOWSWM_LIBS +WINDOWSWM_CFLAGS +XWINMODULES_LIBS +XWINMODULES_CFLAGS +WINDRES +DEFAULT_LOGDIR +SYSCONFDIR +XORG_BUS_PLATFORM_FALSE +XORG_BUS_PLATFORM_TRUE +XF86VIDMODE_FALSE +XF86VIDMODE_TRUE +DGA_FALSE +DGA_TRUE +SOLARIS_VT_FALSE +SOLARIS_VT_TRUE +LNXAPM_FALSE +LNXAPM_TRUE +LNXACPI_FALSE +LNXACPI_TRUE +LINUX_ALPHA_FALSE +LINUX_ALPHA_TRUE +XORG_BUS_SPARC_FALSE +XORG_BUS_SPARC_TRUE +XORG_BUS_BSDPCI_FALSE +XORG_BUS_BSDPCI_TRUE +XORG_BUS_PCI_FALSE +XORG_BUS_PCI_TRUE +XORG_FALSE +XORG_TRUE +abi_extension +abi_xinput +abi_videodrv +abi_ansic +logdir +sysconfigdir +extdir +sdkdir +driverdir +moduledir +DEFAULT_LOGPREFIX +DEFAULT_LIBRARY_PATH +DEFAULT_MODULE_PATH +__XCONFIGDIR__ +XF86CONFIGFILE +__XCONFIGFILE__ +XF86CONFIGDIR +XORG_CFLAGS +XORG_OS_SUBDIR +XORG_INCS +XORG_SYS_LIBS +XORG_LIBS +XORG_MODULES_LIBS +XORG_MODULES_CFLAGS +XF86VIDMODE_LIBS +XF86VIDMODE_CFLAGS +DGA_LIBS +DGA_CFLAGS +SOLARIS_INOUT_ARCH +PCI_TXT_IDS_PATH +PCIACCESS_LIBS +PCIACCESS_CFLAGS +symbol_visibility +XNEST_SYS_LIBS +XNEST_LIBS +XNEST_FALSE +XNEST_TRUE +XNESTMODULES_LIBS +XNESTMODULES_CFLAGS +XVFB_SYS_LIBS +XVFB_LIBS +XVFB_FALSE +XVFB_TRUE +NO_UNDEFINED_FALSE +NO_UNDEFINED_TRUE +CYGWIN_FALSE +CYGWIN_TRUE +XORG_DRIVER_LIBS +LD_NO_UNDEFINED_FLAG +LD_EXPORT_SYMBOLS_FLAG +UTILS_SYS_LIBS +XSERVER_SYS_LIBS +XSERVER_LIBS +HAVE_LIBUNWIND_FALSE +HAVE_LIBUNWIND_TRUE +LIBUNWIND_LIBS +LIBUNWIND_CFLAGS +XSERVERLIBS_LIBS +XSERVERLIBS_CFLAGS +XSERVERCFLAGS_LIBS +XSERVERCFLAGS_CFLAGS +SHA1_CFLAGS +SHA1_LIBS +OPENSSL_LIBS +OPENSSL_CFLAGS +LIBSHA1_LIBS +LIBSHA1_CFLAGS +MAIN_LIB +OS_LIB +DIX_LIB +DEBUG_FALSE +DEBUG_TRUE +VENDOR_NAME_SHORT +DRI_DRIVER_PATH +BASE_FONT_PATH +SERVER_MISC_CONFIG_PATH +COMPILEDDEFAULTFONTPATH +XDMAUTH_FALSE +XDMAUTH_TRUE +XDMCP_FALSE +XDMCP_TRUE +XDMCP_LIBS +XDMCP_CFLAGS +XKB_DFLT_OPTIONS +XKB_DFLT_VARIANT +XKB_DFLT_LAYOUT +XKB_DFLT_MODEL +XKB_DFLT_RULES +XKB_COMPILED_DIR +XKM_OUTPUT_DIR +XKB_BIN_DIRECTORY +XKB_BASE_DIRECTORY +INT10MODULE_FALSE +INT10MODULE_TRUE +VBE_FALSE +VBE_TRUE +VGAHW_FALSE +VGAHW_TRUE +XF86UTILS_FALSE +XF86UTILS_TRUE +DPMSExtension_FALSE +DPMSExtension_TRUE +XF86BIGFONT_FALSE +XF86BIGFONT_TRUE +DBE_FALSE +DBE_TRUE +XCSECURITY_FALSE +XCSECURITY_TRUE +SELINUX_LIBS +SELINUX_CFLAGS +XSELINUX_FALSE +XSELINUX_TRUE +XACE_FALSE +XACE_TRUE +XINERAMA_FALSE +XINERAMA_TRUE +PRESENT_FALSE +PRESENT_TRUE +GLX_SYS_LIBS +GLX_DEFINES +AIGLX_DRI_LOADER_FALSE +AIGLX_DRI_LOADER_TRUE +GLX_FALSE +GLX_TRUE +GL_LIBS +GL_CFLAGS +XLIB_LIBS +XLIB_CFLAGS +DRI2_AIGLX_FALSE +DRI2_AIGLX_TRUE +LIBDRM_LIBS +LIBDRM_CFLAGS +DRI3_FALSE +DRI3_TRUE +XSHMFENCE_FALSE +XSHMFENCE_TRUE +XSHMFENCE_LIBS +XSHMFENCE_CFLAGS +BUSFAULT_FALSE +BUSFAULT_TRUE +DRI3PROTO_LIBS +DRI3PROTO_CFLAGS +DRI2_FALSE +DRI2_TRUE +DRI2PROTO_LIBS +DRI2PROTO_CFLAGS +DRI_FALSE +DRI_TRUE +CLIENTIDS_FALSE +CLIENTIDS_TRUE +RES_FALSE +RES_TRUE +SCREENSAVER_FALSE +SCREENSAVER_TRUE +RECORD_FALSE +RECORD_TRUE +MITSHM_FALSE +MITSHM_TRUE +COMPOSITE_FALSE +COMPOSITE_TRUE +XREGISTRY_FALSE +XREGISTRY_TRUE +XVMC_FALSE +XVMC_TRUE +XV_FALSE +XV_TRUE +CONFIG_WSCONS_FALSE +CONFIG_WSCONS_TRUE +CONFIG_NEED_DBUS_FALSE +CONFIG_NEED_DBUS_TRUE +CONFIG_HAL_FALSE +CONFIG_HAL_TRUE +HAL_LIBS +HAL_CFLAGS +CONFIG_DBUS_API_FALSE +CONFIG_DBUS_API_TRUE +HAVE_DBUS_FALSE +HAVE_DBUS_TRUE +DBUS_LIBS +DBUS_CFLAGS +CONFIG_UDEV_KMS_FALSE +CONFIG_UDEV_KMS_TRUE +CONFIG_UDEV_FALSE +CONFIG_UDEV_TRUE +UDEV_LIBS +UDEV_CFLAGS +SDK_REQUIRED_MODULES +PIXMAN_LIBS +PIXMAN_CFLAGS +INSTALL_LIBXF86CONFIG_FALSE +INSTALL_LIBXF86CONFIG_TRUE +INT10_STUB_FALSE +INT10_STUB_TRUE +INT10_X86EMU_FALSE +INT10_X86EMU_TRUE +INT10_VM86_FALSE +INT10_VM86_TRUE +SECURE_RPC_FALSE +SECURE_RPC_TRUE +INSTALL_SETUID_FALSE +INSTALL_SETUID_TRUE +GLX_TLS +XQUARTZ_SPARKLE +BUNDLE_ID_PREFIX +APPLE_APPLICATION_NAME +APPLE_APPLICATIONS_DIR +FONT100DPIDIR +FONT75DPIDIR +FONTTYPE1DIR +FONTTTFDIR +FONTOTFDIR +FONTMISCDIR +FONTROOTDIR +SPARC64_VIDEO_FALSE +SPARC64_VIDEO_TRUE +PPC_VIDEO_FALSE +PPC_VIDEO_TRUE +I386_VIDEO_FALSE +I386_VIDEO_TRUE +ARM_VIDEO_FALSE +ARM_VIDEO_TRUE +ALPHA_VIDEO_FALSE +ALPHA_VIDEO_TRUE +GLX_ARCH_DEFINES +BSD_KQUEUE_APM_FALSE +BSD_KQUEUE_APM_TRUE +BSD_APM_FALSE +BSD_APM_TRUE +FREEBSD_KLDLOAD_FALSE +FREEBSD_KLDLOAD_TRUE +FBDEVHW_FALSE +FBDEVHW_TRUE +AGP_FALSE +AGP_TRUE +LIBOBJS +DLOPEN_LIBS +SPECIAL_DTRACE_OBJECTS_FALSE +SPECIAL_DTRACE_OBJECTS_TRUE +XSERVER_DTRACE_FALSE +XSERVER_DTRACE_TRUE +DTRACE +RAWCPPFLAGS +RAWCPP +YFLAGS +YACC +LEXLIB +LEX_OUTPUT_ROOT +LEX +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +LIBTOOL +OBJDUMP +DLLTOOL +AS +LN_S +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +CCASFLAGS +CCAS +HAVE_LD_WRAP_FALSE +HAVE_LD_WRAP_TRUE +ENABLE_UNIT_TESTS_FALSE +ENABLE_UNIT_TESTS_TRUE +XORG_MALLOC_DEBUG_ENV +HAVE_XSLTPROC_FALSE +HAVE_XSLTPROC_TRUE +XSLTPROC +HAVE_FOP_FALSE +HAVE_FOP_TRUE +FOP +HAVE_XMLTO_FALSE +HAVE_XMLTO_TRUE +HAVE_XMLTO_TEXT_FALSE +HAVE_XMLTO_TEXT_TRUE +XMLTO +ENABLE_DEVEL_DOCS_FALSE +ENABLE_DEVEL_DOCS_TRUE +ENABLE_DOCS_FALSE +ENABLE_DOCS_TRUE +HAVE_STYLESHEETS_FALSE +HAVE_STYLESHEETS_TRUE +XSL_STYLESHEET +STYLESHEET_SRCDIR +XORG_SGML_PATH +HAVE_DOXYGEN_FALSE +HAVE_DOXYGEN_TRUE +HAVE_DOT_FALSE +HAVE_DOT_TRUE +HAVE_DOT +DOT +DOXYGEN +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +MAN_SUBSTS +XORG_MAN_PAGE +ADMIN_MAN_DIR +DRIVER_MAN_DIR +MISC_MAN_DIR +FILE_MAN_DIR +LIB_MAN_DIR +APP_MAN_DIR +ADMIN_MAN_SUFFIX +DRIVER_MAN_SUFFIX +MISC_MAN_SUFFIX +FILE_MAN_SUFFIX +LIB_MAN_SUFFIX +APP_MAN_SUFFIX +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +INSTALL_CMD +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +CHANGELOG_CMD +STRICT_CFLAGS +CWARNFLAGS +BASE_CFLAGS +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_selective_werror +enable_strict_compilation +enable_silent_rules +with_doxygen +enable_docs +enable_devel_docs +with_xmlto +with_fop +with_xsltproc +enable_unit_tests +enable_static +enable_shared +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_largefile +with_dtrace +enable_werror +enable_debug +enable_use_sigio_by_default +with_int10 +with_vendor_name +with_vendor_name_short +with_vendor_web +with_module_dir +with_log_dir +with_builder_addr +with_os_name +with_os_vendor +with_builderstring +with_fontrootdir +with_fontmiscdir +with_fontotfdir +with_fontttfdir +with_fonttype1dir +with_font75dpidir +with_font100dpidir +with_default_font_path +with_xkb_path +with_xkb_output +with_default_xkb_rules +with_default_xkb_model +with_default_xkb_layout +with_default_xkb_variant +with_default_xkb_options +with_serverconfig_path +with_apple_applications_dir +with_apple_application_name +with_launchd_id_prefix +with_bundle_id_prefix +enable_sparkle +enable_install_libxf86config +enable_visibility +enable_aiglx +enable_glx_tls +with_khronos_spec_dir +enable_registry +enable_composite +enable_mitshm +enable_xres +enable_record +enable_xv +enable_xvmc +enable_dga +enable_screensaver +enable_xdmcp +enable_xdm_auth_1 +enable_glx +enable_dri +enable_dri2 +enable_dri3 +enable_present +enable_xinerama +enable_xf86vidmode +enable_xace +enable_xselinux +enable_xcsecurity +enable_tslib +enable_dbe +enable_xf86bigfont +enable_dpms +enable_config_udev +enable_config_udev_kms +enable_config_dbus +enable_config_hal +enable_config_wscons +enable_xfree86_utils +enable_vgahw +enable_vbe +enable_int10_module +enable_windowswm +enable_libdrm +enable_clientids +enable_pciaccess +enable_linux_acpi +enable_linux_apm +enable_xorg +enable_dmx +enable_xvfb +enable_xnest +enable_xquartz +enable_standalone_xpbproxy +enable_xwin +enable_kdrive +enable_xephyr +enable_xfake +enable_xfbdev +enable_kdrive_kbd +enable_kdrive_mouse +enable_kdrive_evdev +enable_libunwind +enable_install_setuid +enable_unix_transport +enable_tcp_transport +enable_ipv6 +enable_local_transport +enable_secure_rpc +with_shared_memory_dir +enable_xtrans_send_fds +with_xkb_bin_directory +with_sha1 +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +DOXYGEN +DOT +XMLTO +FOP +XSLTPROC +XORG_MALLOC_DEBUG_ENV +CCAS +CCASFLAGS +YACC +YFLAGS +PIXMAN_CFLAGS +PIXMAN_LIBS +UDEV_CFLAGS +UDEV_LIBS +DBUS_CFLAGS +DBUS_LIBS +HAL_CFLAGS +HAL_LIBS +DRI2PROTO_CFLAGS +DRI2PROTO_LIBS +DRI3PROTO_CFLAGS +DRI3PROTO_LIBS +XSHMFENCE_CFLAGS +XSHMFENCE_LIBS +LIBDRM_CFLAGS +LIBDRM_LIBS +XLIB_CFLAGS +XLIB_LIBS +GL_CFLAGS +GL_LIBS +SELINUX_CFLAGS +SELINUX_LIBS +XDMCP_CFLAGS +XDMCP_LIBS +LIBSHA1_CFLAGS +LIBSHA1_LIBS +OPENSSL_CFLAGS +OPENSSL_LIBS +XSERVERCFLAGS_CFLAGS +XSERVERCFLAGS_LIBS +XSERVERLIBS_CFLAGS +XSERVERLIBS_LIBS +LIBUNWIND_CFLAGS +LIBUNWIND_LIBS +XNESTMODULES_CFLAGS +XNESTMODULES_LIBS +PCIACCESS_CFLAGS +PCIACCESS_LIBS +DGA_CFLAGS +DGA_LIBS +XF86VIDMODE_CFLAGS +XF86VIDMODE_LIBS +XORG_MODULES_CFLAGS +XORG_MODULES_LIBS +XWINMODULES_CFLAGS +XWINMODULES_LIBS +WINDOWSWM_CFLAGS +WINDOWSWM_LIBS +KHRONOS_OPENGL_REGISTRY_CFLAGS +KHRONOS_OPENGL_REGISTRY_LIBS +XPBPROXY_CFLAGS +XPBPROXY_LIBS +DMXMODULES_CFLAGS +DMXMODULES_LIBS +XDMXCONFIG_DEP_CFLAGS +XDMXCONFIG_DEP_LIBS +DMXEXAMPLES_DEP_CFLAGS +DMXEXAMPLES_DEP_LIBS +DMXXMUEXAMPLES_DEP_CFLAGS +DMXXMUEXAMPLES_DEP_LIBS +DMXXIEXAMPLES_DEP_CFLAGS +DMXXIEXAMPLES_DEP_LIBS +XTSTEXAMPLES_DEP_CFLAGS +XTSTEXAMPLES_DEP_LIBS +XRESEXAMPLES_DEP_CFLAGS +XRESEXAMPLES_DEP_LIBS +X11EXAMPLES_DEP_CFLAGS +X11EXAMPLES_DEP_LIBS +TSLIB_CFLAGS +TSLIB_LIBS +XEPHYR_CFLAGS +XEPHYR_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures xorg-server 1.15.1 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/xorg-server] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of xorg-server 1.15.1:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-selective-werror + Turn off selective compiler errors. (default: + enabled) + --enable-strict-compilation + Enable all warnings from compiler and make them + errors (default: disabled) + --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0') + --enable-docs Enable building the documentation (default: yes) + --enable-devel-docs Enable building the developer documentation + (default: yes) + --enable-unit-tests Enable building unit test cases (default: auto) + --enable-static[=PKGS] build static libraries [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-largefile omit support for large files + --enable-werror Obsolete - use --enable-strict-compilation instead + --enable-debug Enable debugging (default: disabled) + --enable-use-sigio-by-default + Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT) + + --enable-sparkle Enable updating of X11.app using the Sparkle + Framework (default: disabled) + --enable-install-libxf86config + Install libxf86config (default: disabled) + --enable-visibility Enable symbol visibility (default: auto) + --enable-aiglx Build accelerated indirect GLX (default: enabled) + --enable-glx-tls Build GLX with TLS support (default: auto) + --disable-registry Build string registry module (default: enabled) + --disable-composite Build Composite extension (default: enabled) + --disable-mitshm Build SHM extension (default: auto) + --disable-xres Build XRes extension (default: enabled) + --disable-record Build Record extension (default: enabled) + --disable-xv Build Xv extension (default: enabled) + --disable-xvmc Build XvMC extension (default: enabled) + --disable-dga Build DGA extension (default: auto) + --disable-screensaver Build ScreenSaver extension (default: enabled) + --disable-xdmcp Build XDMCP extension (default: auto) + --disable-xdm-auth-1 Build XDM-Auth-1 extension (default: auto) + --disable-glx Build GLX extension (default: enabled) + --enable-dri Build DRI extension (default: auto) + --enable-dri2 Build DRI2 extension (default: auto) + --enable-dri3 Build DRI3 extension (default: auto) + --disable-present Build Present extension (default: enabled) + --disable-xinerama Build Xinerama extension (default: enabled) + --disable-xf86vidmode Build XF86VidMode extension (default: auto) + --disable-xace Build X-ACE extension (default: enabled) + --enable-xselinux Build SELinux extension (default: disabled) + --enable-xcsecurity Build Security extension (default: disabled) + --enable-tslib Build kdrive tslib touchscreen support (default: + disabled) + --disable-dbe Build DBE extension (default: enabled) + --enable-xf86bigfont Build XF86 Big Font extension (default: disabled) + --disable-dpms Build DPMS extension (default: enabled) + --enable-config-udev Build udev support (default: auto) + --enable-config-udev-kms + Build udev kms support (default: auto) + --enable-config-dbus Build D-BUS API support (default: no) + --disable-config-hal Build HAL support (default: auto) + --enable-config-wscons Build wscons config support (default: auto) + --enable-xfree86-utils Build xfree86 DDX utilities (default: enabled) + --enable-vgahw Build Xorg with vga access (default: enabled) + --enable-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) + --disable-clientids Build Xorg with client ID tracking (default: + enabled) + --enable-pciaccess Build Xorg with pciaccess library (default: enabled) + --disable-linux-acpi Disable building ACPI support on Linux (if + available). + --disable-linux-apm Disable building APM support on Linux (if + available). + --enable-xorg Build Xorg server (default: auto) + --enable-dmx Build DMX server (default: auto) + --enable-xvfb Build Xvfb server (default: yes) + --enable-xnest Build Xnest server (default: auto) + --enable-xquartz Build Xquartz server for OS-X (default: auto) + --enable-standalone-xpbproxy + Build a standalone xpbproxy (in addition to the one + integrated into Xquartz as a separate thread) + (default: no) + --enable-xwin Build XWin server (default: auto) + --enable-kdrive Build kdrive servers (default: no) + --enable-xephyr Build the kdrive Xephyr server (default: auto) + --enable-xfake Build the kdrive 'fake' server (default: auto) + --enable-xfbdev Build the kdrive framebuffer device server (default: + auto) + --enable-kdrive-kbd Build kbd driver for kdrive (default: auto) + --enable-kdrive-mouse Build mouse driver for kdrive (default: auto) + --enable-kdrive-evdev Build evdev driver for kdrive (default: auto) + --enable-libunwind Use libunwind for backtracing (default: auto) + --enable-install-setuid Install Xorg server as owned by root with setuid bit + (default: auto) + --enable-unix-transport Enable UNIX domain socket transport + --enable-tcp-transport Enable TCP socket transport + --enable-ipv6 Enable IPv6 support + --enable-local-transport + Enable os-specific local transport + --enable-secure-rpc Enable Secure RPC + --disable-xtrans-send-fds + Use Xtrans support for fd passing (default: auto) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-doxygen Use doxygen to regenerate documentation (default: + auto) + --with-xmlto Use xmlto to regenerate documentation (default: + auto) + --with-fop Use fop to regenerate documentation (default: auto) + --with-xsltproc Use xsltproc for the transformation of XML documents + (default: auto) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + --with-dtrace=PATH Enable dtrace probes (default: enabled if dtrace + found) + --with-int10=BACKEND int10 backend: vm86, x86emu or stub + --with-vendor-name=VENDOR + Vendor string reported by the server + --with-vendor-name-short=VENDOR + Short version of vendor string reported by the + server + --with-vendor-web=URL Vendor web address reported by the server + --with-module-dir=DIR Directory where modules are installed (default: + $libdir/xorg/modules) + --with-log-dir=DIR Directory where log files are kept (default: + $localstatedir/log) + --with-builder-addr=ADDRESS + Builder address (default: + xorg@lists.freedesktop.org) + --with-os-name=OSNAME Name of OS (default: output of "uname -srm") + --with-os-vendor=OSVENDOR + Name of OS vendor + --with-builderstring=BUILDERSTRING + Additional builder string + --with-fontrootdir=DIR Path to root directory for font files + --with-fontmiscdir=DIR Path to misc files [FONTROOTDIR/misc] + --with-fontotfdir=DIR Path to OTF files [FONTROOTDIR/OTF] + --with-fontttfdir=DIR Path to TTF files [FONTROOTDIR/TTF] + --with-fonttype1dir=DIR Path to Type1 files [FONTROOTDIR/Type1] + --with-font75dpidir=DIR Path to 75dpi files [FONTROOTDIR/75dpi] + --with-font100dpidir=DIR + Path to 100dpi files [FONTROOTDIR/100dpi] + --with-default-font-path=PATH + Comma separated list of font dirs + --with-xkb-path=PATH Path to XKB base dir (default: ${datadir}/X11/xkb) + --with-xkb-output=PATH Path to XKB output dir (default: + ${datadir}/X11/xkb/compiled) + --with-default-xkb-rules=RULES + Keyboard ruleset (default: base/evdev) + --with-default-xkb-model=MODEL + Keyboard model (default: pc105) + --with-default-xkb-layout=LAYOUT + Keyboard layout (default: us) + --with-default-xkb-variant=VARIANT + Keyboard variant (default: (none)) + --with-default-xkb-options=OPTIONS + Keyboard layout options (default: (none)) + --with-serverconfig-path=PATH + Directory where ancillary server config files are + installed (default: ${libdir}/xorg) + --with-apple-applications-dir=PATH + Path to the Applications directory (default: + /Applications/Utilities) + --with-apple-application-name=NAME + Name for the .app (default: X11) + --with-launchd-id-prefix=PATH + Deprecated: Use --with-bundle-id-prefix. + --with-bundle-id-prefix=PATH + Prefix to use for bundle identifiers (default: + org.x) + --with-khronos-spec-dir=PATH + Path to Khronos OpenGL registry database files + (default: auto) + --with-shared-memory-dir=PATH + Path to directory in a world-writable temporary + directory for anonymous shared memory (default: + auto) + --with-xkb-bin-directory=DIR + Directory containing xkbcomp program + --with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI + choose SHA1 implementation + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> + CPP C preprocessor + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + DOXYGEN Path to doxygen command + DOT Path to the dot graphics utility + XMLTO Path to xmlto command + FOP Path to fop command + XSLTPROC Path to xsltproc command + XORG_MALLOC_DEBUG_ENV + Environment variables to enable memory checking in tests + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + 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 + DBUS_LIBS linker flags for DBUS, overriding pkg-config + HAL_CFLAGS C compiler flags for HAL, overriding pkg-config + HAL_LIBS linker flags for HAL, overriding pkg-config + DRI2PROTO_CFLAGS + C compiler flags for DRI2PROTO, overriding pkg-config + DRI2PROTO_LIBS + linker flags for DRI2PROTO, overriding pkg-config + DRI3PROTO_CFLAGS + C compiler flags for DRI3PROTO, overriding pkg-config + DRI3PROTO_LIBS + linker flags for DRI3PROTO, overriding pkg-config + XSHMFENCE_CFLAGS + C compiler flags for XSHMFENCE, overriding pkg-config + XSHMFENCE_LIBS + linker flags for XSHMFENCE, overriding pkg-config + LIBDRM_CFLAGS + C compiler flags for LIBDRM, overriding pkg-config + LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config + XLIB_CFLAGS C compiler flags for XLIB, overriding pkg-config + XLIB_LIBS linker flags for XLIB, overriding pkg-config + GL_CFLAGS C compiler flags for GL, overriding pkg-config + GL_LIBS linker flags for GL, overriding pkg-config + SELINUX_CFLAGS + C compiler flags for SELINUX, overriding pkg-config + SELINUX_LIBS + linker flags for SELINUX, overriding pkg-config + XDMCP_CFLAGS + C compiler flags for XDMCP, overriding pkg-config + XDMCP_LIBS linker flags for XDMCP, overriding pkg-config + LIBSHA1_CFLAGS + C compiler flags for LIBSHA1, overriding pkg-config + LIBSHA1_LIBS + linker flags for LIBSHA1, overriding pkg-config + OPENSSL_CFLAGS + C compiler flags for OPENSSL, overriding pkg-config + OPENSSL_LIBS + linker flags for OPENSSL, overriding pkg-config + XSERVERCFLAGS_CFLAGS + C compiler flags for XSERVERCFLAGS, overriding pkg-config + XSERVERCFLAGS_LIBS + linker flags for XSERVERCFLAGS, overriding pkg-config + XSERVERLIBS_CFLAGS + C compiler flags for XSERVERLIBS, overriding pkg-config + XSERVERLIBS_LIBS + linker flags for XSERVERLIBS, overriding pkg-config + LIBUNWIND_CFLAGS + C compiler flags for LIBUNWIND, overriding pkg-config + LIBUNWIND_LIBS + linker flags for LIBUNWIND, overriding pkg-config + XNESTMODULES_CFLAGS + C compiler flags for XNESTMODULES, overriding pkg-config + XNESTMODULES_LIBS + linker flags for XNESTMODULES, overriding pkg-config + PCIACCESS_CFLAGS + C compiler flags for PCIACCESS, overriding pkg-config + PCIACCESS_LIBS + linker flags for PCIACCESS, overriding pkg-config + DGA_CFLAGS C compiler flags for DGA, overriding pkg-config + DGA_LIBS linker flags for DGA, overriding pkg-config + XF86VIDMODE_CFLAGS + C compiler flags for XF86VIDMODE, overriding pkg-config + XF86VIDMODE_LIBS + linker flags for XF86VIDMODE, overriding pkg-config + XORG_MODULES_CFLAGS + C compiler flags for XORG_MODULES, overriding pkg-config + XORG_MODULES_LIBS + linker flags for XORG_MODULES, overriding pkg-config + XWINMODULES_CFLAGS + C compiler flags for XWINMODULES, overriding pkg-config + XWINMODULES_LIBS + linker flags for XWINMODULES, overriding pkg-config + WINDOWSWM_CFLAGS + C compiler flags for WINDOWSWM, overriding pkg-config + WINDOWSWM_LIBS + linker flags for WINDOWSWM, overriding pkg-config + KHRONOS_OPENGL_REGISTRY_CFLAGS + C compiler flags for KHRONOS_OPENGL_REGISTRY, overriding + pkg-config + KHRONOS_OPENGL_REGISTRY_LIBS + linker flags for KHRONOS_OPENGL_REGISTRY, overriding pkg-config + XPBPROXY_CFLAGS + C compiler flags for XPBPROXY, overriding pkg-config + XPBPROXY_LIBS + linker flags for XPBPROXY, overriding pkg-config + DMXMODULES_CFLAGS + C compiler flags for DMXMODULES, overriding pkg-config + DMXMODULES_LIBS + linker flags for DMXMODULES, overriding pkg-config + XDMXCONFIG_DEP_CFLAGS + C compiler flags for XDMXCONFIG_DEP, overriding pkg-config + XDMXCONFIG_DEP_LIBS + linker flags for XDMXCONFIG_DEP, overriding pkg-config + DMXEXAMPLES_DEP_CFLAGS + C compiler flags for DMXEXAMPLES_DEP, overriding pkg-config + DMXEXAMPLES_DEP_LIBS + linker flags for DMXEXAMPLES_DEP, overriding pkg-config + DMXXMUEXAMPLES_DEP_CFLAGS + C compiler flags for DMXXMUEXAMPLES_DEP, overriding pkg-config + DMXXMUEXAMPLES_DEP_LIBS + linker flags for DMXXMUEXAMPLES_DEP, overriding pkg-config + DMXXIEXAMPLES_DEP_CFLAGS + C compiler flags for DMXXIEXAMPLES_DEP, overriding pkg-config + DMXXIEXAMPLES_DEP_LIBS + linker flags for DMXXIEXAMPLES_DEP, overriding pkg-config + XTSTEXAMPLES_DEP_CFLAGS + C compiler flags for XTSTEXAMPLES_DEP, overriding pkg-config + XTSTEXAMPLES_DEP_LIBS + linker flags for XTSTEXAMPLES_DEP, overriding pkg-config + XRESEXAMPLES_DEP_CFLAGS + C compiler flags for XRESEXAMPLES_DEP, overriding pkg-config + XRESEXAMPLES_DEP_LIBS + linker flags for XRESEXAMPLES_DEP, overriding pkg-config + X11EXAMPLES_DEP_CFLAGS + C compiler flags for X11EXAMPLES_DEP, overriding pkg-config + X11EXAMPLES_DEP_LIBS + linker flags for X11EXAMPLES_DEP, overriding pkg-config + TSLIB_CFLAGS + C compiler flags for TSLIB, overriding pkg-config + TSLIB_LIBS linker flags for TSLIB, overriding pkg-config + XEPHYR_CFLAGS + C compiler flags for XEPHYR, overriding pkg-config + XEPHYR_LIBS linker flags for XEPHYR, overriding pkg-config + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +xorg-server configure 1.15.1 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case <limits.h> declares $2. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 <conftest.val; ac_retval=0 +else + ac_retval=1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.val + + fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_compute_int + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member +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.15.1, which was +generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +RELEASE_DATE="2014-04-13" +RELEASE_NAME="Heart Candy" + +am__api_version='1.11' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='xorg-server' + VERSION='1.15.1' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + +# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdbool.h> +#include <stdlib.h> +#include <wchar.h> +#include <stdio.h> + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then : + +fi + + + + + + +ac_fn_c_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" +if test "x$ac_cv_have_decl___clang__" = xyes; then : + CLANGCC="yes" +else + CLANGCC="no" +fi + +ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" +if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then : + INTELCC="yes" +else + INTELCC="no" +fi + +ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" +if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then : + SUNCC="yes" +else + SUNCC="no" +fi + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + + + + +# Check whether --enable-selective-werror was given. +if test "${enable_selective_werror+set}" = set; then : + enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval +else + SELECTIVE_WERROR=yes +fi + + + + + +# -v is too short to test reliably with XORG_TESTSET_CFLAG +if test "x$SUNCC" = "xyes"; then + BASE_CFLAGS="-v" +else + BASE_CFLAGS="" +fi + +# This chunk of warnings were those that existed in the legacy CWARNFLAGS + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wall" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 +$as_echo_n "checking if $CC supports -Wall... " >&6; } + cacheid=xorg_cv_cc_flag__Wall + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wall" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wpointer-arith" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 +$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; } + cacheid=xorg_cv_cc_flag__Wpointer_arith + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wmissing-declarations" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5 +$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_declarations + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wformat=2" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5 +$as_echo_n "checking if $CC supports -Wformat=2... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Wformat=2" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wformat=2" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wformat" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5 +$as_echo_n "checking if $CC supports -Wformat... " >&6; } + cacheid=xorg_cv_cc_flag__Wformat + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wformat" + found="yes" + fi + fi + + + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wstrict-prototypes" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5 +$as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; } + cacheid=xorg_cv_cc_flag__Wstrict_prototypes + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wmissing-prototypes" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5 +$as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_prototypes + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wnested-externs" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5 +$as_echo_n "checking if $CC supports -Wnested-externs... " >&6; } + cacheid=xorg_cv_cc_flag__Wnested_externs + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wbad-function-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5 +$as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Wbad_function_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wold-style-definition" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5 +$as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; } + cacheid=xorg_cv_cc_flag__Wold_style_definition + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -fd" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5 +$as_echo_n "checking if $CC supports -fd... " >&6; } + cacheid=xorg_cv_cc_flag__fd + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -fd" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wdeclaration-after-statement" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 +$as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; } + cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement" + found="yes" + fi + fi + + + + + +# This chunk adds additional warnings that could catch undesired effects. + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wunused" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5 +$as_echo_n "checking if $CC supports -Wunused... " >&6; } + cacheid=xorg_cv_cc_flag__Wunused + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wunused" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wuninitialized" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 +$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; } + cacheid=xorg_cv_cc_flag__Wuninitialized + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wshadow" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5 +$as_echo_n "checking if $CC supports -Wshadow... " >&6; } + cacheid=xorg_cv_cc_flag__Wshadow + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wshadow" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wmissing-noreturn" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5 +$as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_noreturn + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wmissing-format-attribute" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5 +$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_format_attribute + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wredundant-decls" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5 +$as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; } + cacheid=xorg_cv_cc_flag__Wredundant_decls + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wlogical-op" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5 +$as_echo_n "checking if $CC supports -Wlogical-op... " >&6; } + cacheid=xorg_cv_cc_flag__Wlogical_op + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op" + found="yes" + fi + fi + + + +# These are currently disabled because they are noisy. They will be enabled +# in the future once the codebase is sufficiently modernized to silence +# them. For now, I don't want them to drown out the other warnings. +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) + +# Turn some warnings into errors, so we don't accidently get successful builds +# when there are problems that should be fixed. + +if test "x$SELECTIVE_WERROR" = "xyes" ; then + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=implicit" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5 +$as_echo_n "checking if $CC supports -Werror=implicit... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=implicit" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=nonnull" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5 +$as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=nonnull" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=init-self" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5 +$as_echo_n "checking if $CC supports -Werror=init-self... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=init-self" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=main" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5 +$as_echo_n "checking if $CC supports -Werror=main... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=main" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=main" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=missing-braces" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5 +$as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=missing-braces" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=sequence-point" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5 +$as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=sequence-point" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=return-type" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5 +$as_echo_n "checking if $CC supports -Werror=return-type... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=return-type" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-errwarn=E_FUNC_HAS_NO_RETURN_STMT" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=trigraphs" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5 +$as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=trigraphs" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=array-bounds" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5 +$as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=array-bounds" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=write-strings" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5 +$as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=write-strings" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=address" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5 +$as_echo_n "checking if $CC supports -Werror=address... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=address" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=address" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=int-to-pointer-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=int-to-pointer-cast" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-errwarn=E_BAD_PTR_INT_COMBINATION" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=pointer-to-int-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=pointer-to-int-cast" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast" + found="yes" + fi + fi + + # Also -errwarn=E_BAD_PTR_INT_COMBINATION +else +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5 +$as_echo "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;} + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wimplicit" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5 +$as_echo_n "checking if $CC supports -Wimplicit... " >&6; } + cacheid=xorg_cv_cc_flag__Wimplicit + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wimplicit" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wnonnull" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5 +$as_echo_n "checking if $CC supports -Wnonnull... " >&6; } + cacheid=xorg_cv_cc_flag__Wnonnull + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wnonnull" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Winit-self" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5 +$as_echo_n "checking if $CC supports -Winit-self... " >&6; } + cacheid=xorg_cv_cc_flag__Winit_self + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Winit-self" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wmain" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5 +$as_echo_n "checking if $CC supports -Wmain... " >&6; } + cacheid=xorg_cv_cc_flag__Wmain + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wmain" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wmissing-braces" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5 +$as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_braces + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wsequence-point" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5 +$as_echo_n "checking if $CC supports -Wsequence-point... " >&6; } + cacheid=xorg_cv_cc_flag__Wsequence_point + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wreturn-type" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5 +$as_echo_n "checking if $CC supports -Wreturn-type... " >&6; } + cacheid=xorg_cv_cc_flag__Wreturn_type + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wtrigraphs" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5 +$as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; } + cacheid=xorg_cv_cc_flag__Wtrigraphs + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Warray-bounds" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5 +$as_echo_n "checking if $CC supports -Warray-bounds... " >&6; } + cacheid=xorg_cv_cc_flag__Warray_bounds + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wwrite-strings" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5 +$as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; } + cacheid=xorg_cv_cc_flag__Wwrite_strings + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Waddress" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5 +$as_echo_n "checking if $CC supports -Waddress... " >&6; } + cacheid=xorg_cv_cc_flag__Waddress + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Waddress" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wint-to-pointer-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Wpointer-to-int-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast" + found="yes" + fi + fi + + +fi + + + + + + + + CWARNFLAGS="$BASE_CFLAGS" + if test "x$GCC" = xyes ; then + CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" + fi + + + + + + + + +# Check whether --enable-strict-compilation was given. +if test "${enable_strict_compilation+set}" = set; then : + enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval +else + STRICT_COMPILE=no +fi + + + + + + +STRICT_CFLAGS="" + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -pedantic" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5 +$as_echo_n "checking if $CC supports -pedantic... " >&6; } + cacheid=xorg_cv_cc_flag__pedantic + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CFLAGS="$STRICT_CFLAGS -pedantic" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 +$as_echo_n "checking if $CC supports -Werror... " >&6; } + cacheid=xorg_cv_cc_flag__Werror + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CFLAGS="$STRICT_CFLAGS -Werror" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -errwarn" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5 +$as_echo_n "checking if $CC supports -errwarn... " >&6; } + cacheid=xorg_cv_cc_flag__errwarn + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CFLAGS="$STRICT_CFLAGS -errwarn" + found="yes" + fi + fi + + + +# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not +# activate it with -Werror, so we add it here explicitly. + + + + + + + + + + + + + +xorg_testset_save_CFLAGS="$CFLAGS" + +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes +else + xorg_cv_cc_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes +else + xorg_cv_cc_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument + CFLAGS="$xorg_testset_save_CFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then + CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + fi + + CFLAGS="$CFLAGS -Werror=attributes" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5 +$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } + cacheid=`$as_echo "xorg_cv_cc_flag_-Werror=attributes" | $as_tr_sh` + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CFLAGS="$xorg_testset_save_CFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" + found="yes" + fi + fi + + + +if test "x$STRICT_COMPILE" = "xyes"; then + BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS" + CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +fi + + + + + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` +_ACEOF + + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MINOR $PVM +_ACEOF + + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` + if test "x$PVP" = "x"; then + PVP="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_PATCHLEVEL $PVP +_ACEOF + + + +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ +|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" + + + + +macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` +INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ +mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ +echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" + + + + + + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + + + + + + + + + + + + + + +XORG_MAN_PAGE="X Version 11" + +MAN_SUBSTS="\ + -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|\$(prefix)|g' \ + -e 's|__apploaddir__|\$(appdefaultdir)|g' \ + -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" + + + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in +yes) AM_DEFAULT_VERBOSITY=0;; +no) AM_DEFAULT_VERBOSITY=1;; +*) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + + + + + + +# Check whether --with-doxygen was given. +if test "${with_doxygen+set}" = set; then : + withval=$with_doxygen; use_doxygen=$withval +else + use_doxygen=auto +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DOXYGEN" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - documentation targets will be skipped" >&5 +$as_echo "$as_me: WARNING: doxygen not found - documentation targets will be skipped" >&2;} + have_doxygen=no + else + have_doxygen=yes + fi +elif test "x$use_doxygen" = x"yes" ; then + # Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DOXYGEN" = "x"; then + as_fn_error $? "--with-doxygen=yes specified but doxygen not found in PATH" "$LINENO" 5 + fi + have_doxygen=yes +elif test "x$use_doxygen" = x"no" ; then + if test "x$DOXYGEN" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&5 +$as_echo "$as_me: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&2;} + fi + have_doxygen=no +else + as_fn_error $? "--with-doxygen expects 'yes' or 'no'" "$LINENO" 5 +fi +if test "$have_doxygen" = yes; then + # scrape the doxygen version + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the doxygen version" >&5 +$as_echo_n "checking the doxygen version... " >&6; } + doxygen_version=`$DOXYGEN --version 2>/dev/null` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen_version" >&5 +$as_echo "$doxygen_version" >&6; } + as_arg_v1=$doxygen_version +as_arg_v2=1.6.1 +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + if test "x$use_doxygen" = xauto; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&5 +$as_echo "$as_me: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&2;} + have_doxygen=no + else + as_fn_error $? "doxygen version $doxygen_version found, but 1.6.1 needed" "$LINENO" 5 + fi ;; #( + 0) : + ;; #( + 2) : + ;; #( + *) : + ;; +esac +fi + +HAVE_DOT=no +if test "x$have_doxygen" = "xyes"; then + # Extract the first word of "dot", so it can be a program name with args. +set dummy dot; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DOT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOT="$DOT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_DOT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOT=$ac_cv_path_DOT +if test -n "$DOT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 +$as_echo "$DOT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DOT" != "x"; then + HAVE_DOT=yes + fi +fi + + + if test "$HAVE_DOT" = "yes"; then + HAVE_DOT_TRUE= + HAVE_DOT_FALSE='#' +else + HAVE_DOT_TRUE='#' + HAVE_DOT_FALSE= +fi + + if test "$have_doxygen" = yes; then + HAVE_DOXYGEN_TRUE= + HAVE_DOXYGEN_FALSE='#' +else + HAVE_DOXYGEN_TRUE='#' + HAVE_DOXYGEN_FALSE= +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X.Org SGML entities >= 1.8" >&5 +$as_echo_n "checking for X.Org SGML entities >= 1.8... " >&6; } +XORG_SGML_PATH= +if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools >= 1.8\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xorg-sgml-doctools >= 1.8") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools` +else + : + +fi + +# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing +# the path and the name of the doc stylesheet +if test "x$XORG_SGML_PATH" != "x" ; then + { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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 + + + + +# Check whether --enable-docs was given. +if test "${enable_docs+set}" = set; then : + enableval=$enable_docs; build_docs=$enableval +else + build_docs=yes +fi + + + if test x$build_docs = xyes; then + ENABLE_DOCS_TRUE= + ENABLE_DOCS_FALSE='#' +else + ENABLE_DOCS_TRUE='#' + ENABLE_DOCS_FALSE= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5 +$as_echo_n "checking whether to build documentation... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_docs" >&5 +$as_echo "$build_docs" >&6; } + + + +# Check whether --enable-devel-docs was given. +if test "${enable_devel_docs+set}" = set; then : + enableval=$enable_devel_docs; build_devel_docs=$enableval +else + build_devel_docs=yes +fi + + + if test x$build_devel_docs = xyes; then + ENABLE_DEVEL_DOCS_TRUE= + ENABLE_DEVEL_DOCS_FALSE='#' +else + ENABLE_DEVEL_DOCS_TRUE='#' + ENABLE_DEVEL_DOCS_FALSE= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build developer documentation" >&5 +$as_echo_n "checking whether to build developer documentation... " >&6; } +{ $as_echo "$as_me:${as_lineno-$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 + use_xmlto=auto +fi + + + +if test "x$use_xmlto" = x"auto"; then + # Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XMLTO+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XMLTO in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_XMLTO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XMLTO=$ac_cv_path_XMLTO +if test -n "$XMLTO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 +$as_echo "$XMLTO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$XMLTO" = "x"; then + { $as_echo "$as_me:${as_lineno-$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_xmlto=yes + fi +elif test "x$use_xmlto" = x"yes" ; then + # Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XMLTO+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XMLTO in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_XMLTO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XMLTO=$ac_cv_path_XMLTO +if test -n "$XMLTO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 +$as_echo "$XMLTO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$XMLTO" = "x"; then + as_fn_error $? "--with-xmlto=yes specified but xmlto not found in PATH" "$LINENO" 5 + fi + have_xmlto=yes +elif test "x$use_xmlto" = x"no" ; then + if test "x$XMLTO" != "x"; then + { $as_echo "$as_me:${as_lineno-$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_xmlto=no +else + as_fn_error $? "--with-xmlto expects 'yes' or 'no'" "$LINENO" 5 +fi + +# Test for a minimum version of xmlto, if provided. +if test "$have_xmlto" = yes; then + # scrape the xmlto version + { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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_fn_error $? "xmlto version $xmlto_version found, but 0.0.20 needed" "$LINENO" 5 + fi ;; #( + 0) : + ;; #( + 2) : + ;; #( + *) : + ;; +esac +fi + +# Test for the ability of xmlto to generate a text target +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 + { $as_echo "$as_me:${as_lineno-$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 + + + + + + +# 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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_FOP+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: $FOP" >&5 +$as_echo "$FOP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$FOP" = "x"; then + { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_FOP+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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:${as_lineno-$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:${as_lineno-$LINENO}: result: $FOP" >&5 +$as_echo "$FOP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$FOP" = "x"; then + as_fn_error $? "--with-fop=yes specified but fop not found in PATH" "$LINENO" 5 + fi + have_fop=yes +elif test "x$use_fop" = x"no" ; then + if test "x$FOP" != "x"; then + { $as_echo "$as_me:${as_lineno-$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 + as_fn_error $? "--with-fop expects 'yes' or 'no'" "$LINENO" 5 +fi + +# Test for a minimum version of fop, if provided. + + if test "$have_fop" = yes; then + HAVE_FOP_TRUE= + HAVE_FOP_FALSE='#' +else + HAVE_FOP_TRUE='#' + HAVE_FOP_FALSE= +fi + + + + +# Preserves the interface, should it be implemented later + + + +# Check whether --with-xsltproc was given. +if test "${with_xsltproc+set}" = set; then : + withval=$with_xsltproc; use_xsltproc=$withval +else + use_xsltproc=auto +fi + + + +if test "x$use_xsltproc" = x"auto"; then + # Extract the first word of "xsltproc", so it can be a program name with args. +set dummy xsltproc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XSLTPROC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XSLTPROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XSLTPROC=$ac_cv_path_XSLTPROC +if test -n "$XSLTPROC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$XSLTPROC" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xsltproc not found - cannot transform XML documents" >&5 +$as_echo "$as_me: WARNING: xsltproc not found - cannot transform XML documents" >&2;} + have_xsltproc=no + else + have_xsltproc=yes + fi +elif test "x$use_xsltproc" = x"yes" ; then + # Extract the first word of "xsltproc", so it can be a program name with args. +set dummy xsltproc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XSLTPROC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XSLTPROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +XSLTPROC=$ac_cv_path_XSLTPROC +if test -n "$XSLTPROC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 +$as_echo "$XSLTPROC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$XSLTPROC" = "x"; then + as_fn_error $? "--with-xsltproc=yes specified but xsltproc not found in PATH" "$LINENO" 5 + fi + have_xsltproc=yes +elif test "x$use_xsltproc" = x"no" ; then + if test "x$XSLTPROC" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&5 +$as_echo "$as_me: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&2;} + fi + have_xsltproc=no +else + as_fn_error $? "--with-xsltproc expects 'yes' or 'no'" "$LINENO" 5 +fi + + if test "$have_xsltproc" = yes; then + HAVE_XSLTPROC_TRUE= + HAVE_XSLTPROC_FALSE='#' +else + HAVE_XSLTPROC_TRUE='#' + HAVE_XSLTPROC_FALSE= +fi + + + + + + + +# Check for different types of support on different platforms +case $host_os in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5 +$as_echo_n "checking for umem_alloc in -lumem... " >&6; } +if ${ac_cv_lib_umem_umem_alloc+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lumem $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char umem_alloc (); +int +main () +{ +return umem_alloc (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_umem_umem_alloc=yes +else + ac_cv_lib_umem_umem_alloc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umem_umem_alloc" >&5 +$as_echo "$ac_cv_lib_umem_umem_alloc" >&6; } +if test "x$ac_cv_lib_umem_umem_alloc" = xyes; then : + malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default' +fi + + ;; + *-gnu*) # GNU libc - Value is used as a single byte bit pattern, + # both directly and inverted, so should not be 0 or 255. + malloc_debug_env='MALLOC_PERTURB_=15' + ;; + darwin*) + malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' + ;; + *bsd*) + malloc_debug_env='MallocPreScribble=1 MallocScribble=1' + ;; +esac + +# User supplied flags override default flags +if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then + malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" +fi + +XORG_MALLOC_DEBUG_ENV=$malloc_debug_env + + + + + + + +# Check whether --enable-unit-tests was given. +if test "${enable_unit_tests+set}" = set; then : + enableval=$enable_unit_tests; enable_unit_tests=$enableval +else + enable_unit_tests=auto +fi + + + if test "x$enable_unit_tests" != xno; then + ENABLE_UNIT_TESTS_TRUE= + ENABLE_UNIT_TESTS_FALSE='#' +else + ENABLE_UNIT_TESTS_TRUE='#' + ENABLE_UNIT_TESTS_FALSE= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build unit test cases" >&5 +$as_echo_n "checking whether to build unit test cases... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_unit_tests" >&5 +$as_echo "$enable_unit_tests" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-wrap,exit" >&5 +$as_echo_n "checking whether the linker accepts -Wl,-wrap,exit... " >&6; } +if ${xorg_cv_linker_flags__Wl__wrap_exit+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_save_FLAGS=$LDFLAGS + LDFLAGS="-Wl,-wrap,exit" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + void __wrap_exit(int status) { return; } +int +main () +{ +exit(0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + xorg_cv_linker_flags__Wl__wrap_exit=yes +else + xorg_cv_linker_flags__Wl__wrap_exit=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_save_FLAGS +fi + +eval xorg_check_linker_flags=$xorg_cv_linker_flags__Wl__wrap_exit +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5 +$as_echo "$xorg_check_linker_flags" >&6; } +if test "x$xorg_check_linker_flags" = xyes; then + have_ld_wrap=yes +else + have_ld_wrap=no +fi + +# Not having ld wrap when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes" -a "xoptional" != "xoptional"; then + if test "x$have_ld_wrap" = x"no"; then + as_fn_error $? "--enable-unit-tests=yes specified but ld -wrap support is not available" "$LINENO" 5 + fi +fi + if test "$have_ld_wrap" = yes; then + HAVE_LD_WRAP_TRUE= + HAVE_LD_WRAP_FALSE='#' +else + HAVE_LD_WRAP_TRUE='#' + HAVE_LD_WRAP_FALSE= +fi + +# + + + + + + + + + + + + + + +ac_config_headers="$ac_config_headers include/do-not-use-config.h" + +ac_config_headers="$ac_config_headers include/xorg-server.h" + +ac_config_headers="$ac_config_headers include/dix-config.h" + +ac_config_headers="$ac_config_headers include/xorg-config.h" + +ac_config_headers="$ac_config_headers include/xkb-config.h" + +ac_config_headers="$ac_config_headers include/xwin-config.h" + +ac_config_headers="$ac_config_headers include/kdrive-config.h" + +ac_config_headers="$ac_config_headers include/version-config.h" + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LEX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_LEX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +$as_echo "$LEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; +#endif +int +main (void) +{ + return ! yylex () + ! yywrap (); +} +_ACEOF +{ { ac_try="$LEX conftest.l" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 +$as_echo_n "checking lex output file root... " >&6; } +if ${ac_cv_prog_lex_root+:} false; then : + $as_echo_n "(cached) " >&6 +else + +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 +$as_echo "$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +if test -z "${LEXLIB+set}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 +$as_echo_n "checking lex library... " >&6; } +if ${ac_cv_lib_lex+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lex=$ac_lib +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 +$as_echo "$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 +$as_echo_n "checking whether yytext is a pointer... " >&6; } +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : + $as_echo_n "(cached) " >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +ac_save_LIBS=$LIBS +LIBS="$LEXLIB $ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define YYTEXT_POINTER 1 +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_lex_yytext_pointer=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 +$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h + +fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c + +fi +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_YACC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_YACC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + + + +for ac_prog in cpp +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_RAWCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $RAWCPP in + [\\/]* | ?:[\\/]*) + ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + 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_RAWCPP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +RAWCPP=$ac_cv_path_RAWCPP +if test -n "$RAWCPP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAWCPP" >&5 +$as_echo "$RAWCPP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$RAWCPP" && break +done +test -n "$RAWCPP" || RAWCPP="${CPP}" + + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -undef" >&5 +$as_echo_n "checking if $RAWCPP requires -undef... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +Does cpp redefine unix ? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with -ansi" >&5 +$as_echo "yes, with -ansi" >&6; } + else + as_fn_error $? "${RAWCPP} defines unix with or without -undef. I don't know what to do." "$LINENO" 5 + fi +fi +rm -f conftest.$ac_ext + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -traditional" >&5 +$as_echo_n "checking if $RAWCPP requires -traditional... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +Does cpp preserve "whitespace"? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + as_fn_error $? "${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." "$LINENO" 5 + fi +fi +rm -f conftest.$ac_ext + + + +# Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow +# easier overrides at build time. +XSERVER_CFLAGS='$(CWARNFLAGS)' + +if test "x$GCC" = xyes ; then + XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing" +fi + + +# Check whether --with-dtrace was given. +if test "${with_dtrace+set}" = set; then : + withval=$with_dtrace; WDTRACE=$withval +else + WDTRACE=auto +fi + +if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then + # Extract the first word of "dtrace", so it can be a program name with args. +set dummy dtrace; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DTRACE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DTRACE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/sbin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + 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_DTRACE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not_found" + ;; +esac +fi +DTRACE=$ac_cv_path_DTRACE +if test -n "$DTRACE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 +$as_echo "$DTRACE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$DTRACE" = "xnot_found" ; then + if test "x$WDTRACE" = "xyes" ; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "dtrace requested but not found +See \`config.log' for more details" "$LINENO" 5; } + fi + WDTRACE="no" + else + ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sdt_h" = xyes; then : + HAS_SDT_H="yes" +else + HAS_SDT_H="no" +fi + + + if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then + WDTRACE="no" + fi + fi +fi +if test "x$WDTRACE" != "xno" ; then + +$as_echo "#define XSERVER_DTRACE 1" >>confdefs.h + + +# Solaris/OpenSolaris require dtrace -G to build dtrace probe information into +# object files, and require linking with those as relocatable objects, not .a +# archives. MacOS X handles all this in the normal compiler toolchain, and on +# some releases (like Tiger), will error out on dtrace -G. For now, other +# platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux +# ports appear to, based on my web searches, but have not yet been tested). + case $host_os in + darwin*) SPECIAL_DTRACE_OBJECTS=no ;; + *) SPECIAL_DTRACE_OBJECTS=yes ;; + esac +fi + if test "x$WDTRACE" != "xno"; then + XSERVER_DTRACE_TRUE= + XSERVER_DTRACE_FALSE='#' +else + XSERVER_DTRACE_TRUE='#' + XSERVER_DTRACE_FALSE= +fi + + if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"; then + SPECIAL_DTRACE_OBJECTS_TRUE= + SPECIAL_DTRACE_OBJECTS_FALSE='#' +else + SPECIAL_DTRACE_OBJECTS_TRUE='#' + SPECIAL_DTRACE_OBJECTS_FALSE= +fi + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" +else + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +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` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5 +$as_echo_n "checking for typeof syntax and keyword spelling... " >&6; } +if ${ac_cv_c_typeof+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_typeof=no + for ac_kw in typeof __typeof__ no; do + test $ac_kw = no && break + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + int value; + typedef struct { + char a [1 + + ! (($ac_kw (value)) + (($ac_kw (value)) 0 < ($ac_kw (value)) -1 + ? ($ac_kw (value)) - 1 + : ~ (~ ($ac_kw (value)) 0 + << sizeof ($ac_kw (value)))))]; } + ac__typeof_type_; + return + (! ((void) ((ac__typeof_type_ *) 0), 0)); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_typeof=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test $ac_cv_c_typeof != no && break + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5 +$as_echo "$ac_cv_c_typeof" >&6; } + if test $ac_cv_c_typeof != no; then + +$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h + + if test $ac_cv_c_typeof != typeof; then + +cat >>confdefs.h <<_ACEOF +#define typeof $ac_cv_c_typeof +_ACEOF + + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + #include <sys/param.h> + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> + #include <sys/param.h> + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <limits.h> + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <limits.h> + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + ENDIAN="X_BIG_ENDIAN";; #( + no) + ENDIAN="X_LITTLE_ENDIAN" ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 +$as_echo_n "checking size of unsigned long... " >&6; } +if ${ac_cv_sizeof_unsigned_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_unsigned_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_unsigned_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 +$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +_ACEOF + + +if test "$ac_cv_sizeof_unsigned_long" = 8; then + +$as_echo "#define _XSERVER64 1" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + + +# Checks for headers/macros for byte swapping +# Known variants: +# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc) +# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD) +# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's) +# and a fallback to local macros if none of the above are found + +# if <byteswap.h> is found, assume it's the correct version +for ac_header in byteswap.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" +if test "x$ac_cv_header_byteswap_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BYTESWAP_H 1 +_ACEOF + +fi + +done + + +# if <sys/endian.h> is found, have to check which version +ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_endian_h" = xyes; then : + HAVE_SYS_ENDIAN_H="yes" +else + HAVE_SYS_ENDIAN_H="no" +fi + + + +if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __swap16 variant of <sys/endian.h> byteswapping macros" >&5 +$as_echo_n "checking for __swap16 variant of <sys/endian.h> byteswapping macros... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <sys/types.h> +#include <sys/endian.h> + +int +main () +{ + +int a = 1, b; +b = __swap16(a); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + SYS_ENDIAN__SWAP='yes' +else + SYS_ENDIAN__SWAP='no' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN__SWAP" >&5 +$as_echo "$SYS_ENDIAN__SWAP" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16 variant of <sys/endian.h> byteswapping macros" >&5 +$as_echo_n "checking for bswap16 variant of <sys/endian.h> byteswapping macros... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <sys/types.h> +#include <sys/endian.h> + +int +main () +{ + +int a = 1, b; +b = bswap16(a); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + SYS_ENDIAN_BSWAP='yes' +else + SYS_ENDIAN_BSWAP='no' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN_BSWAP" >&5 +$as_echo "$SYS_ENDIAN_BSWAP" >&6; } + + if test "$SYS_ENDIAN_BSWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=bswap + else + if test "$SYS_ENDIAN__SWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=__swap + else + USE_SYS_ENDIAN_H=no + fi + fi + + if test "$USE_SYS_ENDIAN_H" = "yes" ; then + +$as_echo "#define USE_SYS_ENDIAN_H 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define bswap_16 ${BSWAP}16 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_32 ${BSWAP}32 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define bswap_64 ${BSWAP}64 +_ACEOF + + fi +fi + +ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + DLOPEN_LIBS="-ldl" +fi + +fi + + + +for ac_func in backtrace ffs geteuid getuid issetugid getresuid \ + getdtablesize getifaddrs getpeereid getpeerucred getzoneid \ + mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : + $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strcasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes; then : + $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strcasestr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" +if test "x$ac_cv_func_strlcat" = xyes; then : + $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strlcat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" +if test "x$ac_cv_func_strlcpy" = xyes; then : + $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strlcpy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "strndup" "ac_cv_func_strndup" +if test "x$ac_cv_func_strndup" = xyes; then : + $as_echo "#define HAVE_STRNDUP 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strndup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strndup.$ac_objext" + ;; +esac + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if ${ac_cv_lib_m_sqrt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +for ac_func in cbrt +do : + ac_fn_c_check_func "$LINENO" "cbrt" "ac_cv_func_cbrt" +if test "x$ac_cv_func_cbrt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CBRT 1 +_ACEOF + +fi +done + + +for ac_header in ndbm.h dbm.h rpcsvc/dbm.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in linux/agpgart.h sys/agpio.h sys/agpgart.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + AGP=yes +fi + +done + + if test "x$AGP" = xyes; then + AGP_TRUE= + AGP_FALSE='#' +else + AGP_TRUE='#' + AGP_FALSE= +fi + + +for ac_header in linux/fb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/fb.h" "ac_cv_header_linux_fb_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_fb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_FB_H 1 +_ACEOF + FBDEV=yes +fi + +done + + if test "x$FBDEV" = xyes; then + FBDEVHW_TRUE= + FBDEVHW_FALSE='#' +else + FBDEVHW_TRUE='#' + FBDEVHW_FALSE= +fi + + +for ac_header in asm/mtrr.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "asm/mtrr.h" "ac_cv_header_asm_mtrr_h" "$ac_includes_default" +if test "x$ac_cv_header_asm_mtrr_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ASM_MTRR_H 1 +_ACEOF + ac_cv_asm_mtrr_h=yes +fi + +done + +if test "x$ac_cv_asm_mtrr_h" = xyes; then + HAVE_MTRR=yes +fi + +for ac_header in sys/memrange.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/memrange.h" "ac_cv_header_sys_memrange_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_memrange_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_MEMRANGE_H 1 +_ACEOF + ac_cv_memrange_h=yes +fi + +done + +if test "x$ac_cv_memrange_h" = xyes; then + HAVE_MTRR=yes +fi + +if test "x$HAVE_MTRR" = xyes; then + +$as_echo "#define HAS_MTRR_SUPPORT 1" >>confdefs.h + +fi + +for ac_header in machine/mtrr.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "machine/mtrr.h" "ac_cv_header_machine_mtrr_h" "$ac_includes_default" +if test "x$ac_cv_header_machine_mtrr_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MACHINE_MTRR_H 1 +_ACEOF + ac_cv_machine_mtrr_h=yes +fi + +done + +if test "x$ac_cv_machine_mtrr_h" = xyes; then + +$as_echo "#define HAS_MTRR_BUILTIN 1" >>confdefs.h + +fi + +for ac_header in sys/linker.h +do : + ac_fn_c_check_header_compile "$LINENO" "sys/linker.h" "ac_cv_header_sys_linker_h" "#include <sys/param.h> +" +if test "x$ac_cv_header_sys_linker_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_LINKER_H 1 +_ACEOF + ac_cv_sys_linker_h=yes +else + ac_cv_sys_linker_h=no +fi + +done + + if test "x$ac_cv_sys_linker_h" = xyes; then + FREEBSD_KLDLOAD_TRUE= + FREEBSD_KLDLOAD_FALSE='#' +else + FREEBSD_KLDLOAD_TRUE='#' + FREEBSD_KLDLOAD_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSV IPC" >&5 +$as_echo_n "checking for SYSV IPC... " >&6; } +if ${ac_cv_sysv_ipc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <sys/stat.h> + +int +main () +{ + +{ + int id; + id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR); + if (id < 0) return -1; + return shmctl(id, IPC_RMID, 0); +} + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sysv_ipc=yes +else + ac_cv_sysv_ipc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_ipc" >&5 +$as_echo "$ac_cv_sysv_ipc" >&6; } +if test "x$ac_cv_sysv_ipc" = xyes; then + +$as_echo "#define HAVE_SYSV_IPC 1" >>confdefs.h + +fi + +if test -c /dev/xf86 ; then + +$as_echo "#define HAS_APERTURE_DRV 1" >>confdefs.h + +fi + +ac_fn_c_check_header_mongrel "$LINENO" "machine/apmvar.h" "ac_cv_header_machine_apmvar_h" "$ac_includes_default" +if test "x$ac_cv_header_machine_apmvar_h" = xyes; then : + + ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_event_h" = xyes; then : + ac_cv_BSD_KQUEUE_APM=yes +else + ac_cv_BSD_APM=yes +fi + + +fi + + + + if test "x$ac_cv_BSD_APM" = xyes; then + BSD_APM_TRUE= + BSD_APM_FALSE='#' +else + BSD_APM_TRUE='#' + BSD_APM_FALSE= +fi + + if test "x$ac_cv_BSD_KQUEUE_APM" = xyes; then + BSD_KQUEUE_APM_TRUE= + BSD_KQUEUE_APM_FALSE='#' +else + BSD_KQUEUE_APM_TRUE='#' + BSD_KQUEUE_APM_FALSE= +fi + + +ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_execinfo_h" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lc" >&5 +$as_echo_n "checking for backtrace in -lc... " >&6; } +if ${ac_cv_lib_c_backtrace+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char backtrace (); +int +main () +{ +return backtrace (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_backtrace=yes +else + ac_cv_lib_c_backtrace=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_backtrace" >&5 +$as_echo "$ac_cv_lib_c_backtrace" >&6; } +if test "x$ac_cv_lib_c_backtrace" = xyes; then : + + +$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h + + +$as_echo "#define HAVE_EXECINFO_H 1" >>confdefs.h + + +fi + + +fi + + + +DEFAULT_INT10="x86emu" + + +case $host_cpu in + alpha*) + ALPHA_VIDEO=yes + case $host_os in + *freebsd*) SYS_LIBS=-lio ;; + *netbsd*) +$as_echo "#define USE_ALPHA_PIO 1" >>confdefs.h + ;; + esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" + ;; + arm*) + ARM_VIDEO=yes + ;; + i*86) + I386_VIDEO=yes + case $host_os in + *freebsd*) $as_echo "#define USE_DEV_IO 1" >>confdefs.h + ;; + *dragonfly*) $as_echo "#define USE_DEV_IO 1" >>confdefs.h + ;; + *netbsd*) $as_echo "#define USE_I386_IOPL 1" >>confdefs.h + + SYS_LIBS=-li386 + ;; + *openbsd*) $as_echo "#define USE_I386_IOPL 1" >>confdefs.h + + SYS_LIBS=-li386 + ;; + esac + ;; + powerpc*) + PPC_VIDEO=yes + case $host_os in + *freebsd*) DEFAULT_INT10=stub ;; + esac + ;; + sparc*) + SPARC64_VIDEO=yes + BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + x86_64*|amd64*) + I386_VIDEO=yes + case $host_os in + *freebsd*) +$as_echo "#define USE_DEV_IO 1" >>confdefs.h + ;; + *dragonfly*) +$as_echo "#define USE_DEV_IO 1" >>confdefs.h + ;; + *netbsd*) +$as_echo "#define USE_I386_IOPL 1" >>confdefs.h + + SYS_LIBS=-lx86_64 + ;; + *openbsd*) +$as_echo "#define USE_AMD64_IOPL 1" >>confdefs.h + + SYS_LIBS=-lamd64 + ;; + esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + ia64*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + s390*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; +esac + + + if test "x$ALPHA_VIDEO" = xyes; then + ALPHA_VIDEO_TRUE= + ALPHA_VIDEO_FALSE='#' +else + ALPHA_VIDEO_TRUE='#' + ALPHA_VIDEO_FALSE= +fi + + if test "x$ARM_VIDEO" = xyes; then + ARM_VIDEO_TRUE= + ARM_VIDEO_FALSE='#' +else + ARM_VIDEO_TRUE='#' + ARM_VIDEO_FALSE= +fi + + if test "x$I386_VIDEO" = xyes; then + I386_VIDEO_TRUE= + I386_VIDEO_FALSE='#' +else + I386_VIDEO_TRUE='#' + I386_VIDEO_FALSE= +fi + + if test "x$PPC_VIDEO" = xyes; then + PPC_VIDEO_TRUE= + PPC_VIDEO_FALSE='#' +else + PPC_VIDEO_TRUE='#' + PPC_VIDEO_FALSE= +fi + + if test "x$SPARC64_VIDEO" = xyes; then + SPARC64_VIDEO_TRUE= + SPARC64_VIDEO_FALSE='#' +else + SPARC64_VIDEO_TRUE='#' + SPARC64_VIDEO_FALSE= +fi + + +DRI=no +USE_SIGIO_BY_DEFAULT="yes" +case $host_os in + *freebsd* | *dragonfly*) + case $host_os in + kfreebsd*-gnu) ;; + *) +$as_echo "#define CSRG_BASED 1" >>confdefs.h + ;; + esac + +$as_echo "#define PCCONS_SUPPORT 1" >>confdefs.h + + +$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h + + +$as_echo "#define SYSCONS_SUPPORT 1" >>confdefs.h + + DRI=yes + ;; + *netbsd*) + +$as_echo "#define CSRG_BASED 1" >>confdefs.h + + +$as_echo "#define PCCONS_SUPPORT 1" >>confdefs.h + + +$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h + + +$as_echo "#define WSCONS_SUPPORT 1" >>confdefs.h + + DRI=yes + ;; + *openbsd*) + +$as_echo "#define CSRG_BASED 1" >>confdefs.h + + +$as_echo "#define PCVT_SUPPORT 1" >>confdefs.h + + +$as_echo "#define WSCONS_SUPPORT 1" >>confdefs.h + + ;; + *linux*) + DRI=yes + ;; + *solaris*) + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdrm") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + DRI=yes +else + DRI=no +fi + # Disable use of SIGIO by default until some system bugs are + # fixed - see Sun/OpenSolaris bug id 6879897 + USE_SIGIO_BY_DEFAULT="no" + ;; + darwin*) + +$as_echo "#define CSRG_BASED 1" >>confdefs.h + + ;; + cygwin*|mingw*) + CFLAGS="$CFLAGS -DFD_SETSIZE=256" + ;; +esac + +PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` +PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1` +if test "x$PVS" = "x"; then + PVS="0" +fi + +VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)" +VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" + +VENDOR_NAME="The X.Org Foundation" +VENDOR_NAME_SHORT="X.Org" +VENDOR_WEB="http://wiki.x.org" + + + +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; as_fn_error $? "--enable-werror has been replaced by --enable-strict-compilation" "$LINENO" 5 +fi + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; DEBUGGING=$enableval +else + DEBUGGING=no +fi + +# Check whether --enable-use-sigio-by-default was given. +if test "${enable_use_sigio_by_default+set}" = set; then : + enableval=$enable_use_sigio_by_default; USE_SIGIO_BY_DEFAULT=$enableval +fi + + +# Check whether --with-int10 was given. +if test "${with_int10+set}" = set; then : + withval=$with_int10; INT10="$withval" +else + INT10="$DEFAULT_INT10" +fi + + +# Check whether --with-vendor-name was given. +if test "${with_vendor_name+set}" = set; then : + withval=$with_vendor_name; VENDOR_NAME="$withval" +fi + + +# Check whether --with-vendor-name-short was given. +if test "${with_vendor_name_short+set}" = set; then : + withval=$with_vendor_name_short; VENDOR_NAME_SHORT="$withval" +fi + + +# Check whether --with-vendor-web was given. +if test "${with_vendor_web+set}" = set; then : + withval=$with_vendor_web; VENDOR_WEB="$withval" +fi + + +# Check whether --with-module-dir was given. +if test "${with_module_dir+set}" = set; then : + withval=$with_module_dir; moduledir="$withval" +else + moduledir="${libdir}/xorg/modules" +fi + + +# Check whether --with-log-dir was given. +if test "${with_log_dir+set}" = set; then : + withval=$with_log_dir; logdir="$withval" +else + logdir="$localstatedir/log" +fi + + +# Check whether --with-builder-addr was given. +if test "${with_builder_addr+set}" = set; then : + withval=$with_builder_addr; BUILDERADDR="$withval" +else + BUILDERADDR="xorg@lists.freedesktop.org" +fi + + +# Check whether --with-os-name was given. +if test "${with_os_name+set}" = set; then : + withval=$with_os_name; OSNAME="$withval" +else + OSNAME=`uname -srm` +fi + + +# Check whether --with-os-vendor was given. +if test "${with_os_vendor+set}" = set; then : + withval=$with_os_vendor; OSVENDOR="$withval" +else + OSVENDOR="" +fi + + +# Check whether --with-builderstring was given. +if test "${with_builderstring+set}" = set; then : + withval=$with_builderstring; BUILDERSTRING="$withval" + +fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for root directory for font files" >&5 +$as_echo_n "checking for root directory for font files... " >&6; } + +# Check whether --with-fontrootdir was given. +if test "${with_fontrootdir+set}" = set; then : + withval=$with_fontrootdir; FONTROOTDIR="$withval" +fi + + # if --with-fontrootdir not specified... + if test "x${FONTROOTDIR}" = "x"; then + FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` + fi + # ...and if pkg-config didn't find fontdir in fontutil.pc... + if test "x${FONTROOTDIR}" = "x"; then + FONTROOTDIR="${datadir}/fonts/X11" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTROOTDIR}" >&5 +$as_echo "${FONTROOTDIR}" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for misc files" >&5 +$as_echo_n "checking for directory for misc files... " >&6; } + +# Check whether --with-fontmiscdir was given. +if test "${with_fontmiscdir+set}" = set; then : + withval=$with_fontmiscdir; FONTMISCDIR="${withval}" +else + FONTMISCDIR='${FONTROOTDIR}/misc' +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTMISCDIR}" >&5 +$as_echo "${FONTMISCDIR}" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for OTF files" >&5 +$as_echo_n "checking for directory for OTF files... " >&6; } + +# Check whether --with-fontotfdir was given. +if test "${with_fontotfdir+set}" = set; then : + withval=$with_fontotfdir; FONTOTFDIR="${withval}" +else + FONTOTFDIR='${FONTROOTDIR}/OTF' +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTOTFDIR}" >&5 +$as_echo "${FONTOTFDIR}" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for TTF files" >&5 +$as_echo_n "checking for directory for TTF files... " >&6; } + +# Check whether --with-fontttfdir was given. +if test "${with_fontttfdir+set}" = set; then : + withval=$with_fontttfdir; FONTTTFDIR="${withval}" +else + FONTTTFDIR='${FONTROOTDIR}/TTF' +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTTTFDIR}" >&5 +$as_echo "${FONTTTFDIR}" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for Type1 files" >&5 +$as_echo_n "checking for directory for Type1 files... " >&6; } + +# Check whether --with-fonttype1dir was given. +if test "${with_fonttype1dir+set}" = set; then : + withval=$with_fonttype1dir; FONTTYPE1DIR="${withval}" +else + FONTTYPE1DIR='${FONTROOTDIR}/Type1' +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONTTYPE1DIR}" >&5 +$as_echo "${FONTTYPE1DIR}" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for 75dpi files" >&5 +$as_echo_n "checking for directory for 75dpi files... " >&6; } + +# Check whether --with-font75dpidir was given. +if test "${with_font75dpidir+set}" = set; then : + withval=$with_font75dpidir; FONT75DPIDIR="${withval}" +else + FONT75DPIDIR='${FONTROOTDIR}/75dpi' +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONT75DPIDIR}" >&5 +$as_echo "${FONT75DPIDIR}" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory for 100dpi files" >&5 +$as_echo_n "checking for directory for 100dpi files... " >&6; } + +# Check whether --with-font100dpidir was given. +if test "${with_font100dpidir+set}" = set; then : + withval=$with_font100dpidir; FONT100DPIDIR="${withval}" +else + FONT100DPIDIR='${FONTROOTDIR}/100dpi' +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FONT100DPIDIR}" >&5 +$as_echo "${FONT100DPIDIR}" >&6; } + + +DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/" +if test "$cross_compiling" != yes; then + as_ac_File=`$as_echo "ac_cv_file_${sysconfdir}/X11/fontpath.d" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${sysconfdir}/X11/fontpath.d" >&5 +$as_echo_n "checking for ${sysconfdir}/X11/fontpath.d... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "${sysconfdir}/X11/fontpath.d"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d' +else + case $host_os in + darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; + esac +fi + +fi + +# Check whether --with-default-font-path was given. +if test "${with_default_font_path+set}" = set; then : + withval=$with_default_font_path; FONTPATH="$withval" +else + FONTPATH="${DEFAULT_FONT_PATH}" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default font path" >&5 +$as_echo_n "checking for default font path... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTPATH" >&5 +$as_echo "$FONTPATH" >&6; } + + +# Check whether --with-xkb-path was given. +if test "${with_xkb_path+set}" = set; then : + withval=$with_xkb_path; XKBPATH="$withval" +else + XKBPATH="${datadir}/X11/xkb" +fi + + +# Check whether --with-xkb-output was given. +if test "${with_xkb_output+set}" = set; then : + withval=$with_xkb_output; XKBOUTPUT="$withval" +else + XKBOUTPUT="compiled" +fi + + +# Check whether --with-default-xkb-rules was given. +if test "${with_default_xkb_rules+set}" = set; then : + withval=$with_default_xkb_rules; XKB_DFLT_RULES="$withval" +else + XKB_DFLT_RULES="" +fi + + +# Check whether --with-default-xkb-model was given. +if test "${with_default_xkb_model+set}" = set; then : + withval=$with_default_xkb_model; XKB_DFLT_MODEL="$withval" +else + XKB_DFLT_MODEL="pc105" +fi + + +# Check whether --with-default-xkb-layout was given. +if test "${with_default_xkb_layout+set}" = set; then : + withval=$with_default_xkb_layout; XKB_DFLT_LAYOUT="$withval" +else + XKB_DFLT_LAYOUT="us" +fi + + +# Check whether --with-default-xkb-variant was given. +if test "${with_default_xkb_variant+set}" = set; then : + withval=$with_default_xkb_variant; XKB_DFLT_VARIANT="$withval" +else + XKB_DFLT_VARIANT="" +fi + + +# Check whether --with-default-xkb-options was given. +if test "${with_default_xkb_options+set}" = set; then : + withval=$with_default_xkb_options; XKB_DFLT_OPTIONS="$withval" +else + XKB_DFLT_OPTIONS="" +fi + + +# Check whether --with-serverconfig-path was given. +if test "${with_serverconfig_path+set}" = set; then : + withval=$with_serverconfig_path; SERVERCONFIG="$withval" +else + SERVERCONFIG="${libdir}/xorg" +fi + + +# Check whether --with-apple-applications-dir was given. +if test "${with_apple_applications_dir+set}" = set; then : + withval=$with_apple_applications_dir; APPLE_APPLICATIONS_DIR="${withval}" +else + APPLE_APPLICATIONS_DIR="/Applications/Utilities" +fi + + + +# Check whether --with-apple-application-name was given. +if test "${with_apple_application_name+set}" = set; then : + withval=$with_apple_application_name; APPLE_APPLICATION_NAME="${withval}" +else + APPLE_APPLICATION_NAME="X11" +fi + + + +# Check whether --with-launchd-id-prefix was given. +if test "${with_launchd_id_prefix+set}" = set; then : + withval=$with_launchd_id_prefix; BUNDLE_ID_PREFIX="${withval}" +else + BUNDLE_ID_PREFIX="org.x" +fi + + +# Check whether --with-bundle-id-prefix was given. +if test "${with_bundle_id_prefix+set}" = set; then : + withval=$with_bundle_id_prefix; BUNDLE_ID_PREFIX="${withval}" +fi + + + +cat >>confdefs.h <<_ACEOF +#define BUNDLE_ID_PREFIX "$BUNDLE_ID_PREFIX" +_ACEOF + +# Check whether --enable-sparkle was given. +if test "${enable_sparkle+set}" = set; then : + enableval=$enable_sparkle; XQUARTZ_SPARKLE="${enableval}" +else + XQUARTZ_SPARKLE="no" +fi + + +# Check whether --enable-install-libxf86config was given. +if test "${enable_install_libxf86config+set}" = set; then : + enableval=$enable_install_libxf86config; INSTALL_LIBXF86CONFIG=$enableval +else + INSTALL_LIBXF86CONFIG=no +fi + +# Check whether --enable-visibility was given. +if test "${enable_visibility+set}" = set; then : + enableval=$enable_visibility; SYMBOL_VISIBILITY=$enableval +else + SYMBOL_VISIBILITY=auto +fi + + +# Check whether --enable-aiglx was given. +if test "${enable_aiglx+set}" = set; then : + enableval=$enable_aiglx; AIGLX=$enableval +else + AIGLX=yes +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) support" >&5 +$as_echo_n "checking for thread local storage (TLS) support... " >&6; } + if ${ac_cv_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ac_cv_tls=none + keywords="__thread __declspec(thread)" + for kw in $keywords ; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int $kw test; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_tls=$kw ; break ; +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 +$as_echo "$ac_cv_tls" >&6; } + + if test "$ac_cv_tls" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tls_model attribute support" >&5 +$as_echo_n "checking for tls_model attribute support... " >&6; } + if ${ac_cv_tls_model+:} false; then : + $as_echo_n "(cached) " >&6 +else + + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $STRICT_CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int $ac_cv_tls __attribute__((tls_model("initial-exec"))) test; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_tls_model=yes +else + ac_cv_tls_model=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls_model" >&5 +$as_echo "$ac_cv_tls_model" >&6; } + + if test "x$ac_cv_tls_model" = "xyes" ; then + xorg_tls=$ac_cv_tls' __attribute__((tls_model("initial-exec")))' + else + xorg_tls=$ac_cv_tls + fi + + +cat >>confdefs.h <<_ACEOF +#define TLS $xorg_tls +_ACEOF + + fi + +# Check whether --enable-glx-tls was given. +if test "${enable_glx_tls+set}" = set; then : + enableval=$enable_glx_tls; GLX_USE_TLS=$enableval + if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then + as_fn_error $? "GLX with TLS support requested, but the compiler does not support it." "$LINENO" 5 + fi +else + GLX_USE_TLS=no + if test "${ac_cv_tls}" != "none" ; then + GLX_USE_TLS=yes + fi +fi + +GLX_TLS=${GLX_USE_TLS} + + +# Check whether --with-khronos-spec-dir was given. +if test "${with_khronos_spec_dir+set}" = set; then : + withval=$with_khronos_spec_dir; KHRONOS_SPEC_DIR="${withval}" +else + KHRONOS_SPEC_DIR=auto +fi + + +# Check whether --enable-registry was given. +if test "${enable_registry+set}" = set; then : + enableval=$enable_registry; XREGISTRY=$enableval +else + XREGISTRY=yes +fi + +# Check whether --enable-composite was given. +if test "${enable_composite+set}" = set; then : + enableval=$enable_composite; COMPOSITE=$enableval +else + COMPOSITE=yes +fi + +# Check whether --enable-mitshm was given. +if test "${enable_mitshm+set}" = set; then : + enableval=$enable_mitshm; MITSHM=$enableval +else + MITSHM=auto +fi + +# Check whether --enable-xres was given. +if test "${enable_xres+set}" = set; then : + enableval=$enable_xres; RES=$enableval +else + RES=yes +fi + +# Check whether --enable-record was given. +if test "${enable_record+set}" = set; then : + enableval=$enable_record; RECORD=$enableval +else + RECORD=yes +fi + +# Check whether --enable-xv was given. +if test "${enable_xv+set}" = set; then : + enableval=$enable_xv; XV=$enableval +else + XV=yes +fi + +# Check whether --enable-xvmc was given. +if test "${enable_xvmc+set}" = set; then : + enableval=$enable_xvmc; XVMC=$enableval +else + XVMC=yes +fi + +# Check whether --enable-dga was given. +if test "${enable_dga+set}" = set; then : + enableval=$enable_dga; DGA=$enableval +else + DGA=auto +fi + +# Check whether --enable-screensaver was given. +if test "${enable_screensaver+set}" = set; then : + enableval=$enable_screensaver; SCREENSAVER=$enableval +else + SCREENSAVER=yes +fi + +# Check whether --enable-xdmcp was given. +if test "${enable_xdmcp+set}" = set; then : + enableval=$enable_xdmcp; XDMCP=$enableval +else + XDMCP=auto +fi + +# Check whether --enable-xdm-auth-1 was given. +if test "${enable_xdm_auth_1+set}" = set; then : + enableval=$enable_xdm_auth_1; XDMAUTH=$enableval +else + XDMAUTH=auto +fi + +# Check whether --enable-glx was given. +if test "${enable_glx+set}" = set; then : + enableval=$enable_glx; GLX=$enableval +else + GLX=yes +fi + +# Check whether --enable-dri was given. +if test "${enable_dri+set}" = set; then : + enableval=$enable_dri; DRI=$enableval +fi + +# Check whether --enable-dri2 was given. +if test "${enable_dri2+set}" = set; then : + enableval=$enable_dri2; DRI2=$enableval +else + DRI2=auto +fi + +# Check whether --enable-dri3 was given. +if test "${enable_dri3+set}" = set; then : + enableval=$enable_dri3; DRI3=$enableval +else + DRI3=auto +fi + +# Check whether --enable-present was given. +if test "${enable_present+set}" = set; then : + enableval=$enable_present; PRESENT=$enableval +else + PRESENT=yes +fi + +# Check whether --enable-xinerama was given. +if test "${enable_xinerama+set}" = set; then : + enableval=$enable_xinerama; XINERAMA=$enableval +else + XINERAMA=yes +fi + +# Check whether --enable-xf86vidmode was given. +if test "${enable_xf86vidmode+set}" = set; then : + enableval=$enable_xf86vidmode; XF86VIDMODE=$enableval +else + XF86VIDMODE=auto +fi + +# Check whether --enable-xace was given. +if test "${enable_xace+set}" = set; then : + enableval=$enable_xace; XACE=$enableval +else + XACE=yes +fi + +# Check whether --enable-xselinux was given. +if test "${enable_xselinux+set}" = set; then : + enableval=$enable_xselinux; XSELINUX=$enableval +else + XSELINUX=no +fi + +# Check whether --enable-xcsecurity was given. +if test "${enable_xcsecurity+set}" = set; then : + enableval=$enable_xcsecurity; XCSECURITY=$enableval +else + XCSECURITY=no +fi + +# Check whether --enable-tslib was given. +if test "${enable_tslib+set}" = set; then : + enableval=$enable_tslib; TSLIB=$enableval +else + TSLIB=no +fi + +# Check whether --enable-dbe was given. +if test "${enable_dbe+set}" = set; then : + enableval=$enable_dbe; DBE=$enableval +else + DBE=yes +fi + +# Check whether --enable-xf86bigfont was given. +if test "${enable_xf86bigfont+set}" = set; then : + enableval=$enable_xf86bigfont; XF86BIGFONT=$enableval +else + XF86BIGFONT=no +fi + +# Check whether --enable-dpms was given. +if test "${enable_dpms+set}" = set; then : + enableval=$enable_dpms; DPMSExtension=$enableval +else + DPMSExtension=yes +fi + +# Check whether --enable-config-udev was given. +if test "${enable_config_udev+set}" = set; then : + enableval=$enable_config_udev; CONFIG_UDEV=$enableval +else + CONFIG_UDEV=auto +fi + +# Check whether --enable-config-udev-kms was given. +if test "${enable_config_udev_kms+set}" = set; then : + enableval=$enable_config_udev_kms; CONFIG_UDEV_KMS=$enableval +else + CONFIG_UDEV_KMS=auto +fi + +# Check whether --enable-config-dbus was given. +if test "${enable_config_dbus+set}" = set; then : + enableval=$enable_config_dbus; CONFIG_DBUS_API=$enableval +else + CONFIG_DBUS_API=no +fi + +# Check whether --enable-config-hal was given. +if test "${enable_config_hal+set}" = set; then : + enableval=$enable_config_hal; CONFIG_HAL=$enableval +else + CONFIG_HAL=auto +fi + +# Check whether --enable-config-wscons was given. +if test "${enable_config_wscons+set}" = set; then : + enableval=$enable_config_wscons; CONFIG_WSCONS=$enableval +else + CONFIG_WSCONS=auto +fi + +# Check whether --enable-xfree86-utils was given. +if test "${enable_xfree86_utils+set}" = set; then : + enableval=$enable_xfree86_utils; XF86UTILS=$enableval +else + XF86UTILS=yes +fi + +# Check whether --enable-vgahw was given. +if test "${enable_vgahw+set}" = set; then : + enableval=$enable_vgahw; VGAHW=$enableval +else + VGAHW=yes +fi + +# Check whether --enable-vbe was given. +if test "${enable_vbe+set}" = set; then : + enableval=$enable_vbe; VBE=$enableval +else + VBE=yes +fi + +# Check whether --enable-int10-module was given. +if test "${enable_int10_module+set}" = set; then : + enableval=$enable_int10_module; INT10MODULE=$enableval +else + INT10MODULE=yes +fi + +# Check whether --enable-windowswm was given. +if test "${enable_windowswm+set}" = set; then : + enableval=$enable_windowswm; WINDOWSWM=$enableval +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-clientids was given. +if test "${enable_clientids+set}" = set; then : + enableval=$enable_clientids; CLIENTIDS=$enableval +else + CLIENTIDS=yes +fi + +# Check whether --enable-pciaccess was given. +if test "${enable_pciaccess+set}" = set; then : + enableval=$enable_pciaccess; PCI=$enableval +else + PCI=yes +fi + +# Check whether --enable-linux_acpi was given. +if test "${enable_linux_acpi+set}" = set; then : + enableval=$enable_linux_acpi; enable_linux_acpi=$enableval +else + enable_linux_acpi=yes +fi + +# Check whether --enable-linux_apm was given. +if test "${enable_linux_apm+set}" = set; then : + enableval=$enable_linux_apm; enable_linux_apm=$enableval +else + enable_linux_apm=yes +fi + + +# Check whether --enable-xorg was given. +if test "${enable_xorg+set}" = set; then : + enableval=$enable_xorg; XORG=$enableval +else + XORG=auto +fi + +# Check whether --enable-dmx was given. +if test "${enable_dmx+set}" = set; then : + enableval=$enable_dmx; DMX=$enableval +else + DMX=auto +fi + +# Check whether --enable-xvfb was given. +if test "${enable_xvfb+set}" = set; then : + enableval=$enable_xvfb; XVFB=$enableval +else + XVFB=yes +fi + +# Check whether --enable-xnest was given. +if test "${enable_xnest+set}" = set; then : + enableval=$enable_xnest; XNEST=$enableval +else + XNEST=auto +fi + +# Check whether --enable-xquartz was given. +if test "${enable_xquartz+set}" = set; then : + enableval=$enable_xquartz; XQUARTZ=$enableval +else + XQUARTZ=auto +fi + +# Check whether --enable-standalone-xpbproxy was given. +if test "${enable_standalone_xpbproxy+set}" = set; then : + enableval=$enable_standalone_xpbproxy; STANDALONE_XPBPROXY=$enableval +else + STANDALONE_XPBPROXY=no +fi + +# Check whether --enable-xwin was given. +if test "${enable_xwin+set}" = set; then : + enableval=$enable_xwin; XWIN=$enableval +else + XWIN=auto +fi + +# Check whether --enable-kdrive was given. +if test "${enable_kdrive+set}" = set; then : + enableval=$enable_kdrive; KDRIVE=$enableval +else + KDRIVE=no +fi + +# Check whether --enable-xephyr was given. +if test "${enable_xephyr+set}" = set; then : + enableval=$enable_xephyr; XEPHYR=$enableval +else + XEPHYR=auto +fi + +# Check whether --enable-xfake was given. +if test "${enable_xfake+set}" = set; then : + enableval=$enable_xfake; XFAKE=$enableval +else + XFAKE=auto +fi + +# Check whether --enable-xfbdev was given. +if test "${enable_xfbdev+set}" = set; then : + enableval=$enable_xfbdev; XFBDEV=$enableval +else + XFBDEV=auto +fi + +# Check whether --enable-kdrive-kbd was given. +if test "${enable_kdrive_kbd+set}" = set; then : + enableval=$enable_kdrive_kbd; KDRIVE_KBD=$enableval +else + KDRIVE_KBD=auto +fi + +# Check whether --enable-kdrive-mouse was given. +if test "${enable_kdrive_mouse+set}" = set; then : + enableval=$enable_kdrive_mouse; KDRIVE_MOUSE=$enableval +else + KDRIVE_MOUSE=auto +fi + +# Check whether --enable-kdrive-evdev was given. +if test "${enable_kdrive_evdev+set}" = set; then : + enableval=$enable_kdrive_evdev; KDRIVE_EVDEV=$enableval +else + KDRIVE_EVDEV=auto +fi + +# Check whether --enable-libunwind was given. +if test "${enable_libunwind+set}" = set; then : + enableval=$enable_libunwind; LIBUNWIND="$enableval" +else + LIBUNWIND="auto" +fi + + + +# Check whether --enable-install-setuid was given. +if test "${enable_install_setuid+set}" = set; then : + enableval=$enable_install_setuid; SETUID=$enableval +else + SETUID=auto +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we can install the Xorg server as root" >&5 +$as_echo_n "checking to see if we can install the Xorg server as root... " >&6; } +if test "x$SETUID" = "xauto" ; then + case $host_os in + cygwin*) SETUID="no" ;; + mingw*) SETUID="no" ;; + darwin*) SETUID="no" ;; + *) + case $host_cpu in + sparc) SETUID="no" ;; + *) SETUID="yes" ;; + esac + esac + if test "x$SETUID" = xyes; then + touch testfile + chown root testfile > /dev/null 2>&1 || SETUID="no" + rm -f testfile + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETUID" >&5 +$as_echo "$SETUID" >&6; } + if test "x$SETUID" = "xyes"; then + INSTALL_SETUID_TRUE= + INSTALL_SETUID_FALSE='#' +else + INSTALL_SETUID_TRUE='#' + INSTALL_SETUID_FALSE= +fi + + + + +# Transport selection macro from xtrans.m4 + + + case $host_os in + mingw*) unixdef="no" ;; + *) unixdef="yes" ;; + esac + # Check whether --enable-unix-transport was given. +if test "${enable_unix_transport+set}" = set; then : + enableval=$enable_unix_transport; UNIXCONN=$enableval +else + UNIXCONN=$unixdef +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support UNIX socket connections" >&5 +$as_echo_n "checking if Xtrans should support UNIX socket connections... " >&6; } + if test "$UNIXCONN" = "yes"; then + +$as_echo "#define UNIXCONN 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIXCONN" >&5 +$as_echo "$UNIXCONN" >&6; } + # Check whether --enable-tcp-transport was given. +if test "${enable_tcp_transport+set}" = set; then : + enableval=$enable_tcp_transport; TCPCONN=$enableval +else + TCPCONN=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support TCP socket connections" >&5 +$as_echo_n "checking if Xtrans should support TCP socket connections... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCPCONN" >&5 +$as_echo "$TCPCONN" >&6; } + if test "$TCPCONN" = "yes"; then + +$as_echo "#define TCPCONN 1" >>confdefs.h + + + # SVR4 hides these in libraries other than libc + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_socket=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : + break +fi +done +if ${ac_cv_search_socket+:} false; then : + +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 +$as_echo_n "checking for main in -lws2_32... " >&6; } +if ${ac_cv_lib_ws2_32_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ws2_32_main=yes +else + ac_cv_lib_ws2_32_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 +$as_echo "$ac_cv_lib_ws2_32_main" >&6; } +if test "x$ac_cv_lib_ws2_32_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + + LIBS="-lws2_32 $LIBS" + +fi + + fi + + # Needs to come after above checks for libsocket & libnsl for SVR4 systems + # Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; IPV6CONN=$enableval +else + ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes; then : + IPV6CONN=yes +else + IPV6CONN=no +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IPv6 support should be built" >&5 +$as_echo_n "checking if IPv6 support should be built... " >&6; } + if test "$IPV6CONN" = "yes"; then + +$as_echo "#define IPv6 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPV6CONN" >&5 +$as_echo "$IPV6CONN" >&6; } + + # 4.3BSD-Reno added a new member to struct sockaddr_in + ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" " +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> + +" +if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes; then : + +$as_echo "#define BSD44SOCKETS 1" >>confdefs.h + +fi + + + # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +$ac_includes_default +#include <sys/socket.h> +" +if test "x$ac_cv_type_socklen_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKLEN_T 1 +_ACEOF + + +fi + + + # XPG4v2/UNIX95 added msg_control - check to see if we need to define + # _XOPEN_SOURCE to get it (such as on Solaris) + ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " +$ac_includes_default +#include <sys/socket.h> + +" +if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : + +fi + + # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 + if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then + unset ac_cv_member_struct_msghdr_msg_control + { $as_echo "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=600" >&5 +$as_echo "$as_me: trying again with _XOPEN_SOURCE=600" >&6;} + ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " +#define _XOPEN_SOURCE 600 +$ac_includes_default +#include <sys/socket.h> + +" +if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : + +$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h + + +fi + + fi + # If that didn't work, fall back to XPG5/UNIX98 with C89 + if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then + unset ac_cv_member_struct_msghdr_msg_control + { $as_echo "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=500" >&5 +$as_echo "$as_me: trying again with _XOPEN_SOURCE=500" >&6;} + ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " +#define _XOPEN_SOURCE 500 +$ac_includes_default +#include <sys/socket.h> + +" +if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : + +$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h + + +fi + + fi + + + + fi + case $host_os in + solaris*|sco*|sysv4*) localdef="yes" ;; + *) localdef="no" ;; + esac + # Check whether --enable-local-transport was given. +if test "${enable_local_transport+set}" = set; then : + enableval=$enable_local_transport; LOCALCONN=$enableval +else + LOCALCONN=$localdef +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support os-specific local connections" >&5 +$as_echo_n "checking if Xtrans should support os-specific local connections... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCALCONN" >&5 +$as_echo "$LOCALCONN" >&6; } + if test "$LOCALCONN" = "yes"; then + +$as_echo "#define LOCALCONN 1" >>confdefs.h + + fi + + + +# Secure RPC detection macro from xtrans.m4 + + # Check whether --enable-secure-rpc was given. +if test "${enable_secure_rpc+set}" = set; then : + enableval=$enable_secure_rpc; SECURE_RPC=$enableval +else + SECURE_RPC="try" +fi + + + if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then + FOUND_SECURE_RPC="no" + for ac_func in authdes_seccreate authdes_create +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + FOUND_SECURE_RPC="yes" +fi +done + + if test "x$FOUND_SECURE_RPC" = "xno" ; then + if test "x$SECURE_RPC" = "xyes" ; then + as_fn_error $? "Secure RPC requested, but required functions not found" "$LINENO" 5 + fi + SECURE_RPC="no" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsecretkey" >&5 +$as_echo_n "checking for library containing getsecretkey... " >&6; } +if ${ac_cv_search_getsecretkey+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getsecretkey (); +int +main () +{ +return getsecretkey (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rpcsvc; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_getsecretkey=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_getsecretkey+:} false; then : + break +fi +done +if ${ac_cv_search_getsecretkey+:} false; then : + +else + ac_cv_search_getsecretkey=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsecretkey" >&5 +$as_echo "$ac_cv_search_getsecretkey" >&6; } +ac_res=$ac_cv_search_getsecretkey +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + SECURE_RPC="yes" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5 +$as_echo_n "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; } + if test "x$SECURE_RPC" = "xyes" ; then + +$as_echo "#define SECURE_RPC 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SECURE_RPC" >&5 +$as_echo "$SECURE_RPC" >&6; } + + if test "x$SECURE_RPC" = xyes; then + SECURE_RPC_TRUE= + SECURE_RPC_FALSE='#' +else + SECURE_RPC_TRUE='#' + SECURE_RPC_FALSE= +fi + + + if test "x$INT10" = xvm86; then + INT10_VM86_TRUE= + INT10_VM86_FALSE='#' +else + INT10_VM86_TRUE='#' + INT10_VM86_FALSE= +fi + + if test "x$INT10" = xx86emu; then + INT10_X86EMU_TRUE= + INT10_X86EMU_FALSE='#' +else + INT10_X86EMU_TRUE='#' + INT10_X86EMU_FALSE= +fi + + if test "x$INT10" = xstub; then + INT10_STUB_TRUE= + INT10_STUB_FALSE='#' +else + INT10_STUB_TRUE='#' + INT10_STUB_FALSE= +fi + + + if test "x$INSTALL_LIBXF86CONFIG" = xyes; then + INSTALL_LIBXF86CONFIG_TRUE= + INSTALL_LIBXF86CONFIG_FALSE='#' +else + INSTALL_LIBXF86CONFIG_TRUE='#' + INSTALL_LIBXF86CONFIG_FALSE= +fi + + +case $host_os in + cygwin* | mingw*) + CONFIG_DBUS_API=no + CONFIG_HAL=no + CONFIG_UDEV=no + CONFIG_UDEV_KMS=no + DGA=no + DRI2=no + DRI3=no + INT10MODULE=no + PCI=no + VGAHW=no + VBE=no + XF86UTILS=no + XF86VIDMODE=no + XSELINUX=no + XV=no + SYMBOL_VISIBILITY=no + ;; + darwin*) + PCI=no + INT10MODULE=no + VGAHW=no + VBE=no + DRM=no + DRI2=no + DRI3=no + + if test x$XQUARTZ = xauto; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xquartz" >&5 +$as_echo_n "checking whether to build Xquartz... " >&6; } +if ${xorg_cv_Carbon_framework+:} false; then : + $as_echo_n "(cached) " >&6 +else + + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -framework Carbon" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +char FSFindFolder(); int main() { FSFindFolder(); return 0;} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + xorg_cv_Carbon_framework=yes +else + xorg_cv_Carbon_framework=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_Carbon_framework" >&5 +$as_echo "$xorg_cv_Carbon_framework" >&6; } + + if test "X$xorg_cv_Carbon_framework" = Xyes; then + XQUARTZ=yes + else + XQUARTZ=no + fi + fi + + ac_fn_c_check_func "$LINENO" "dispatch_async" "ac_cv_func_dispatch_async" +if test "x$ac_cv_func_dispatch_async" = xyes; then : + +$as_echo "#define HAVE_LIBDISPATCH 1" >>confdefs.h + +fi + + + if test "x$XQUARTZ" = xyes ; then + XQUARTZ=yes + XVFB=no + XNEST=no + + COMPOSITE=no + DGA=no + DPMSExtension=no + XF86VIDMODE=no + fi + ;; + *) XQUARTZ=no ;; +esac + +XEXT_INC='-I$(top_srcdir)/Xext' +XEXT_LIB='$(top_builddir)/Xext/libXext.la' + +VIDEOPROTO="videoproto" +COMPOSITEPROTO="compositeproto >= 0.4" +RECORDPROTO="recordproto >= 1.13.99.1" +SCRNSAVERPROTO="scrnsaverproto >= 1.1" +RESOURCEPROTO="resourceproto >= 1.2.0" +DRIPROTO="xf86driproto >= 2.1.0" +DRI2PROTO="dri2proto >= 2.8" +DRI3PROTO="dri3proto >= 1.0" +XINERAMAPROTO="xineramaproto" +BIGFONTPROTO="xf86bigfontproto >= 1.2.0" +DGAPROTO="xf86dgaproto >= 2.0.99.1" +GLPROTO="glproto >= 1.4.17" +DMXPROTO="dmxproto >= 2.2.99.1" +VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" +WINDOWSWMPROTO="windowswmproto" +APPLEWMPROTO="applewmproto >= 1.4" +XSHMFENCE="xshmfence >= 1.1" + +XPROTO="xproto >= 7.0.22" +RANDRPROTO="randrproto >= 1.4.0" +RENDERPROTO="renderproto >= 0.11" +XEXTPROTO="xextproto >= 7.2.99.901" +INPUTPROTO="inputproto >= 2.3" +KBPROTO="kbproto >= 1.0.3" +FONTSPROTO="fontsproto" +FIXESPROTO="fixesproto >= 5.0" +DAMAGEPROTO="damageproto >= 1.1" +XCMISCPROTO="xcmiscproto >= 1.2.0" +BIGREQSPROTO="bigreqsproto >= 1.1.0" +XTRANS="xtrans >= 1.3.2" +PRESENTPROTO="presentproto >= 1.0" + +LIBAPPLEWM="applewm >= 1.4" +LIBDMX="dmx >= 1.0.99.1" +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.12.901" +LIBUDEV="libudev >= 143" +LIBSELINUX="libselinux >= 2.0.86" +LIBDBUS="dbus-1 >= 1.0" +LIBPIXMAN="pixman-1 >= 0.27.2" + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIXMAN" >&5 +$as_echo_n "checking for PIXMAN... " >&6; } + +if test -n "$PIXMAN_CFLAGS"; then + pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "$LIBPIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PIXMAN_LIBS"; then + pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PIXMAN_LIBS=`$PKG_CONFIG --libs "$LIBPIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBPIXMAN" 2>&1` + else + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBPIXMAN" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PIXMAN_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBPIXMAN) were not met: + +$PIXMAN_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + PIXMAN_CFLAGS=$pkg_cv_PIXMAN_CFLAGS + PIXMAN_LIBS=$pkg_cv_PIXMAN_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau" + +SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN" +# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc + + +REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES" + +if test "x$CONFIG_UDEV" = xyes && + { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then + as_fn_error $? "Hotplugging through both libudev and dbus/hal not allowed" "$LINENO" 5 +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UDEV" >&5 +$as_echo_n "checking for UDEV... " >&6; } + +if test -n "$UDEV_CFLAGS"; then + pkg_cv_UDEV_CFLAGS="$UDEV_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UDEV_CFLAGS=`$PKG_CONFIG --cflags "$LIBUDEV" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$UDEV_LIBS"; then + pkg_cv_UDEV_LIBS="$UDEV_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_UDEV_LIBS=`$PKG_CONFIG --libs "$LIBUDEV" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + UDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBUDEV" 2>&1` + else + UDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBUDEV" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$UDEV_PKG_ERRORS" >&5 + + HAVE_LIBUDEV=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_LIBUDEV=no +else + UDEV_CFLAGS=$pkg_cv_UDEV_CFLAGS + UDEV_LIBS=$pkg_cv_UDEV_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_LIBUDEV=yes +fi +if test "x$CONFIG_UDEV" = xauto; then + CONFIG_UDEV="$HAVE_LIBUDEV" +fi + if test "x$CONFIG_UDEV" = xyes; then + CONFIG_UDEV_TRUE= + CONFIG_UDEV_FALSE='#' +else + CONFIG_UDEV_TRUE='#' + CONFIG_UDEV_FALSE= +fi + +if test "x$CONFIG_UDEV" = xyes; then + CONFIG_DBUS_API=no + CONFIG_HAL=no + if test "x$CONFIG_UDEV_KMS" = xauto; then + CONFIG_UDEV_KMS="$HAVE_LIBUDEV" + fi + if ! test "x$HAVE_LIBUDEV" = xyes; then + as_fn_error $? "udev configuration API requested, but libudev is not installed" "$LINENO" 5 + fi + +$as_echo "#define CONFIG_UDEV 1" >>confdefs.h + + if test "x$CONFIG_UDEV_KMS" = xyes; then + +$as_echo "#define CONFIG_UDEV_KMS 1" >>confdefs.h + + fi + SAVE_LIBS=$LIBS + SAVE_CFLAGS=$CFLAGS + CFLAGS=$UDEV_CFLAGS + LIBS=$UDEV_LIBS + for ac_func in udev_monitor_filter_add_match_tag +do : + ac_fn_c_check_func "$LINENO" "udev_monitor_filter_add_match_tag" "ac_cv_func_udev_monitor_filter_add_match_tag" +if test "x$ac_cv_func_udev_monitor_filter_add_match_tag" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG 1 +_ACEOF + +fi +done + + for ac_func in udev_enumerate_add_match_tag +do : + ac_fn_c_check_func "$LINENO" "udev_enumerate_add_match_tag" "ac_cv_func_udev_enumerate_add_match_tag" +if test "x$ac_cv_func_udev_enumerate_add_match_tag" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG 1 +_ACEOF + +fi +done + + LIBS=$SAVE_LIBS + CFLAGS=$SAVE_CFLAGS +fi + if test "x$CONFIG_UDEV_KMS" = xyes; then + CONFIG_UDEV_KMS_TRUE= + CONFIG_UDEV_KMS_FALSE='#' +else + CONFIG_UDEV_KMS_TRUE='#' + CONFIG_UDEV_KMS_FALSE= +fi + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5 +$as_echo_n "checking for DBUS... " >&6; } + +if test -n "$DBUS_CFLAGS"; then + pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "$LIBDBUS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DBUS_LIBS"; then + pkg_cv_DBUS_LIBS="$DBUS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "$LIBDBUS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBDBUS" 2>&1` + else + DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBDBUS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DBUS_PKG_ERRORS" >&5 + + HAVE_DBUS=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_DBUS=no +else + DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS + DBUS_LIBS=$pkg_cv_DBUS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_DBUS=yes +fi +if test "x$HAVE_DBUS" = xyes; then + +$as_echo "#define HAVE_DBUS 1" >>confdefs.h + +fi + if test "x$HAVE_DBUS" = xyes; then + HAVE_DBUS_TRUE= + HAVE_DBUS_FALSE='#' +else + HAVE_DBUS_TRUE='#' + HAVE_DBUS_FALSE= +fi + + +if test "x$CONFIG_DBUS_API" = xauto; then + CONFIG_DBUS_API="$HAVE_DBUS" +fi +if test "x$CONFIG_DBUS_API" = xyes; then + if ! test "x$HAVE_DBUS" = xyes; then + as_fn_error $? "D-Bus configuration API requested, but D-Bus is not installed." "$LINENO" 5 + fi + + +$as_echo "#define CONFIG_DBUS_API 1" >>confdefs.h + + CONFIG_NEED_DBUS="yes" +fi + if test "x$CONFIG_DBUS_API" = xyes; then + CONFIG_DBUS_API_TRUE= + CONFIG_DBUS_API_FALSE='#' +else + CONFIG_DBUS_API_TRUE='#' + CONFIG_DBUS_API_FALSE= +fi + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HAL" >&5 +$as_echo_n "checking for HAL... " >&6; } + +if test -n "$HAL_CFLAGS"; then + pkg_cv_HAL_CFLAGS="$HAL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$HAL_LIBS"; then + pkg_cv_HAL_LIBS="$HAL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "hal" 2>&1` + else + HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors "hal" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HAL_PKG_ERRORS" >&5 + + HAVE_HAL=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_HAL=no +else + HAL_CFLAGS=$pkg_cv_HAL_CFLAGS + HAL_LIBS=$pkg_cv_HAL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_HAL=yes +fi +if test "x$CONFIG_HAL" = xauto; then + CONFIG_HAL="$HAVE_HAL" +fi +if test "x$CONFIG_HAL" = xyes; then + if ! test "x$HAVE_HAL" = xyes; then + as_fn_error $? "HAL hotplug API requested, but HAL is not installed." "$LINENO" 5 + fi + + +$as_echo "#define CONFIG_HAL 1" >>confdefs.h + + CONFIG_NEED_DBUS="yes" +fi + if test "x$CONFIG_HAL" = xyes; then + CONFIG_HAL_TRUE= + CONFIG_HAL_FALSE='#' +else + CONFIG_HAL_TRUE='#' + CONFIG_HAL_FALSE= +fi + + +if test "x$CONFIG_NEED_DBUS" = xyes; then + +$as_echo "#define CONFIG_NEED_DBUS 1" >>confdefs.h + +fi + if test "x$CONFIG_NEED_DBUS" = xyes; then + CONFIG_NEED_DBUS_TRUE= + CONFIG_NEED_DBUS_FALSE='#' +else + CONFIG_NEED_DBUS_TRUE='#' + CONFIG_NEED_DBUS_FALSE= +fi + + +if test "x$CONFIG_WSCONS" = xauto; then + case $host_os in + *openbsd*) + CONFIG_WSCONS=yes; + ;; + *) + CONFIG_WSCONS=no; + ;; + esac +fi + if test "x$CONFIG_WSCONS" = xyes; then + CONFIG_WSCONS_TRUE= + CONFIG_WSCONS_FALSE='#' +else + CONFIG_WSCONS_TRUE='#' + CONFIG_WSCONS_FALSE= +fi + +if test "x$CONFIG_WSCONS" = xyes; then + +$as_echo "#define CONFIG_WSCONS 1" >>confdefs.h + +fi + +if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then + USE_SIGIO_BY_DEFAULT_VALUE=TRUE +else + USE_SIGIO_BY_DEFAULT_VALUE=FALSE +fi + +cat >>confdefs.h <<_ACEOF +#define USE_SIGIO_BY_DEFAULT $USE_SIGIO_BY_DEFAULT_VALUE +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc..." >&5 +$as_echo_n "checking for glibc...... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <features.h> +#ifndef __GLIBC__ +#error +#endif + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + glibc=yes +else + glibc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibc" >&5 +$as_echo "$glibc" >&6; } + +for ac_func in clock_gettime +do : + ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CLOCK_GETTIME 1 +_ACEOF + have_clock_gettime=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes +else + ac_cv_lib_rt_clock_gettime=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : + have_clock_gettime=-lrt +else + have_clock_gettime=no +fi + +fi +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a useful monotonic clock ..." >&5 +$as_echo_n "checking for a useful monotonic clock ...... " >&6; } + +if ! test "x$have_clock_gettime" = xno; then + if ! test "x$have_clock_gettime" = xyes; then + CLOCK_LIBS="$have_clock_gettime" + else + CLOCK_LIBS="" + fi + + LIBS_SAVE="$LIBS" + LIBS="$CLOCK_LIBS" + CPPFLAGS_SAVE="$CPPFLAGS" + + if test x"$glibc" = xyes; then + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + fi + + if test "$cross_compiling" = yes; then : + MONOTONIC_CLOCK="cross compiling" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <time.h> + +int main(int argc, char *argv[]) { + struct timespec tp; + + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + return 0; + else + return 1; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + MONOTONIC_CLOCK=yes +else + MONOTONIC_CLOCK=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" +else + MONOTONIC_CLOCK=no +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MONOTONIC_CLOCK" >&5 +$as_echo "$MONOTONIC_CLOCK" >&6; } + +if test "x$MONOTONIC_CLOCK" = xyes; then + +$as_echo "#define MONOTONIC_CLOCK 1" >>confdefs.h + + LIBS="$LIBS $CLOCK_LIBS" +fi + + if test "x$XV" = xyes; then + XV_TRUE= + XV_FALSE='#' +else + XV_TRUE='#' + XV_FALSE= +fi + +if test "x$XV" = xyes; then + +$as_echo "#define XV 1" >>confdefs.h + + +$as_echo "#define XvExtension 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" +else + XVMC=no +fi + + if test "x$XVMC" = xyes; then + XVMC_TRUE= + XVMC_FALSE='#' +else + XVMC_TRUE='#' + XVMC_FALSE= +fi + +if test "x$XVMC" = xyes; then + +$as_echo "#define XvMCExtension 1" >>confdefs.h + +fi + + if test "x$XREGISTRY" = xyes; then + XREGISTRY_TRUE= + XREGISTRY_FALSE='#' +else + XREGISTRY_TRUE='#' + XREGISTRY_FALSE= +fi + +if test "x$XREGISTRY" = xyes; then + +$as_echo "#define XREGISTRY 1" >>confdefs.h + +fi + + if test "x$COMPOSITE" = xyes; then + COMPOSITE_TRUE= + COMPOSITE_FALSE='#' +else + COMPOSITE_TRUE='#' + COMPOSITE_FALSE= +fi + +if test "x$COMPOSITE" = xyes; then + +$as_echo "#define COMPOSITE 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO" + COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' + COMPOSITE_INC='-I$(top_srcdir)/composite' +fi + +if test "x$MITSHM" = xauto; then + MITSHM="$ac_cv_sysv_ipc" +fi + if test "x$MITSHM" = xyes; then + MITSHM_TRUE= + MITSHM_FALSE='#' +else + MITSHM_TRUE='#' + MITSHM_FALSE= +fi + +if test "x$MITSHM" = xyes; then + +$as_echo "#define MITSHM 1" >>confdefs.h + + +$as_echo "#define HAS_SHM 1" >>confdefs.h + +fi + + if test "x$RECORD" = xyes; then + RECORD_TRUE= + RECORD_FALSE='#' +else + RECORD_TRUE='#' + RECORD_FALSE= +fi + +if test "x$RECORD" = xyes; then + +$as_echo "#define XRECORD 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO" + RECORD_LIB='$(top_builddir)/record/librecord.la' +fi + + if test "x$SCREENSAVER" = xyes; then + SCREENSAVER_TRUE= + SCREENSAVER_FALSE='#' +else + SCREENSAVER_TRUE='#' + SCREENSAVER_FALSE= +fi + +if test "x$SCREENSAVER" = xyes; then + +$as_echo "#define SCREENSAVER 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO" +fi + + if test "x$RES" = xyes; then + RES_TRUE= + RES_FALSE='#' +else + RES_TRUE='#' + RES_FALSE= +fi + +if test "x$RES" = xyes; then + +$as_echo "#define RES 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO" +fi + +# The XRes extension may support client ID tracking only if it has +# been specifically enabled. Client ID tracking is implicitly not +# supported if XRes extension is disabled. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to track client ids" >&5 +$as_echo_n "checking whether to track client ids... " >&6; } +if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then + +$as_echo "#define CLIENTIDS 1" >>confdefs.h + +else + CLIENTIDS=no +fi +if test "x$CLIENTIDS" = xyes; then + case $host_os in + openbsd*) + SYS_LIBS="$SYS_LIBS -lkvm" + ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLIENTIDS" >&5 +$as_echo "$CLIENTIDS" >&6; } + if test "x$CLIENTIDS" = xyes; then + CLIENTIDS_TRUE= + CLIENTIDS_FALSE='#' +else + CLIENTIDS_TRUE='#' + CLIENTIDS_FALSE= +fi + + + if test "x$DRI" = xyes; then + DRI_TRUE= + DRI_FALSE='#' +else + DRI_TRUE='#' + DRI_FALSE= +fi + +if test "x$DRI" = xyes; then + +$as_echo "#define XF86DRI 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI2PROTO" >&5 +$as_echo_n "checking for DRI2PROTO... " >&6; } + +if test -n "$DRI2PROTO_CFLAGS"; then + pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI2PROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DRI2PROTO_LIBS"; then + pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "$DRI2PROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DRI2PROTO" 2>&1` + else + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DRI2PROTO" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRI2PROTO_PKG_ERRORS" >&5 + + HAVE_DRI2PROTO=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_DRI2PROTO=no +else + DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS + DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_DRI2PROTO=yes +fi +case "$DRI2,$HAVE_DRI2PROTO" in + yes,no) + as_fn_error $? "DRI2 requested, but dri2proto not found." "$LINENO" 5 + ;; + yes,yes | auto,yes) + +$as_echo "#define DRI2 1" >>confdefs.h + + DRI2=yes + LIBGL="gl >= 9.2.0" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO" + ;; +esac + if test "x$DRI2" = xyes; then + DRI2_TRUE= + DRI2_FALSE='#' +else + DRI2_TRUE='#' + DRI2_FALSE= +fi + + + + +# Check whether --with-shared-memory-dir was given. +if test "${with_shared_memory_dir+set}" = set; then : + withval=$with_shared_memory_dir; +else + with_shared_memory_dir=yes +fi + + +shmdirs="/run/shm /var/tmp /tmp" + +case x"$with_shared_memory_dir" in +xyes) + for dir in $shmdirs; do + case x"$with_shared_memory_dir" in + xyes) + echo Checking temp dir "$dir" + if test -d "$dir"; then + with_shared_memory_dir="$dir" + fi + ;; + esac + done + ;; +x/*) + ;; +xno) + ;; +*) + as_fn_error $? "Invalid directory specified for --with-shared-memory-dir: $with_shared_memory_dir" "$LINENO" 5 + ;; +esac + +case x"$with_shared_memory_dir" in +xyes) + as_fn_error $? "No directory found for shared memory temp files." "$LINENO" 5 + ;; +xno) + ;; +*) + +cat >>confdefs.h <<_ACEOF +#define SHMDIR "$with_shared_memory_dir" +_ACEOF + + ;; +esac + +# Check whether --enable-xtrans-send-fds was given. +if test "${enable_xtrans_send_fds+set}" = set; then : + enableval=$enable_xtrans_send_fds; XTRANS_SEND_FDS=$enableval +else + XTRANS_SEND_FDS=auto +fi + + +case "x$XTRANS_SEND_FDS" in +xauto) + case "$host_os" in + linux*|solaris*) + XTRANS_SEND_FDS=yes + ;; + *) + XTRANS_SEND_FDS=no + ;; + esac +esac + +case "x$XTRANS_SEND_FDS" in +xyes) + +$as_echo "#define XTRANS_SEND_FDS 1" >>confdefs.h + + ;; +esac + +case "$DRI3,$XTRANS_SEND_FDS" in + yes,yes | auto,yes) + ;; + yes,no) + as_fn_error $? "DRI3 requested, but xtrans fd passing support not found." "$LINENO" 5 + DRI3=no + ;; + no,*) + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xtrans fd passing support not found." >&5 +$as_echo "$as_me: DRI3 disabled because xtrans fd passing support not found." >&6;} + DRI3=no + ;; +esac + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI3PROTO" >&5 +$as_echo_n "checking for DRI3PROTO... " >&6; } + +if test -n "$DRI3PROTO_CFLAGS"; then + pkg_cv_DRI3PROTO_CFLAGS="$DRI3PROTO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DRI3PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI3PROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DRI3PROTO_LIBS"; then + pkg_cv_DRI3PROTO_LIBS="$DRI3PROTO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DRI3PROTO_LIBS=`$PKG_CONFIG --libs "$DRI3PROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DRI3PROTO" 2>&1` + else + DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DRI3PROTO" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRI3PROTO_PKG_ERRORS" >&5 + + HAVE_DRI3PROTO=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_DRI3PROTO=no +else + DRI3PROTO_CFLAGS=$pkg_cv_DRI3PROTO_CFLAGS + DRI3PROTO_LIBS=$pkg_cv_DRI3PROTO_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_DRI3PROTO=yes +fi + +case "$DRI3,$HAVE_DRI3PROTO" in + yes,yes | auto,yes) + ;; + yes,no) + as_fn_error $? "DRI3 requested, but dri3proto not found." "$LINENO" 5 + DRI3=no + ;; + no,*) + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 disabled because dri3proto not found." >&5 +$as_echo "$as_me: DRI3 disabled because dri3proto not found." >&6;} + DRI3=no + ;; +esac + +for ac_func in sigaction +do : + ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" +if test "x$ac_cv_func_sigaction" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGACTION 1 +_ACEOF + +fi +done + + +BUSFAULT=no + +case x"$ac_cv_func_sigaction" in + xyes) + +$as_echo "#define HAVE_SIGACTION 1" >>confdefs.h + + BUSFAULT=yes + ;; +esac + +case x"$BUSFAULT" in + xyes) + +$as_echo "#define BUSFAULT 1" >>confdefs.h + + ;; +esac + + if test x"$BUSFAULT" = xyes; then + BUSFAULT_TRUE= + BUSFAULT_FALSE='#' +else + BUSFAULT_TRUE='#' + BUSFAULT_FALSE= +fi + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHMFENCE" >&5 +$as_echo_n "checking for XSHMFENCE... " >&6; } + +if test -n "$XSHMFENCE_CFLAGS"; then + pkg_cv_XSHMFENCE_CFLAGS="$XSHMFENCE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XSHMFENCE\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XSHMFENCE") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XSHMFENCE_CFLAGS=`$PKG_CONFIG --cflags "$XSHMFENCE" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XSHMFENCE_LIBS"; then + pkg_cv_XSHMFENCE_LIBS="$XSHMFENCE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XSHMFENCE\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XSHMFENCE") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XSHMFENCE_LIBS=`$PKG_CONFIG --libs "$XSHMFENCE" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XSHMFENCE" 2>&1` + else + XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XSHMFENCE" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSHMFENCE_PKG_ERRORS" >&5 + + HAVE_XSHMFENCE=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_XSHMFENCE=no +else + XSHMFENCE_CFLAGS=$pkg_cv_XSHMFENCE_CFLAGS + XSHMFENCE_LIBS=$pkg_cv_XSHMFENCE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_XSHMFENCE=yes +fi + + if test "x$HAVE_XSHMFENCE" = xyes; then + XSHMFENCE_TRUE= + XSHMFENCE_FALSE='#' +else + XSHMFENCE_TRUE='#' + XSHMFENCE_FALSE= +fi + + +case x"$HAVE_XSHMFENCE" in + xyes) + +$as_echo "#define HAVE_XSHMFENCE 1" >>confdefs.h + + REQUIRED_LIBS="$REQUIRED_LIBS xshmfence" + ;; +esac + + +case "$DRI3,$HAVE_XSHMFENCE" in + yes,yes | auto,yes) + ;; + yes,no) + as_fn_error $? "DRI3 requested, but xshmfence not found." "$LINENO" 5 + DRI3=no + ;; + no,*) + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xshmfence not found." >&5 +$as_echo "$as_me: DRI3 disabled because xshmfence not found." >&6;} + DRI3=no + ;; +esac + +case x"$DRI3" in + xyes|xauto) + DRI3=yes + +$as_echo "#define DRI3 1" >>confdefs.h + + DRI3_LIB='$(top_builddir)/dri3/libdri3.la' + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO" + { $as_echo "$as_me:${as_lineno-$LINENO}: DRI3 enabled" >&5 +$as_echo "$as_me: DRI3 enabled" >&6;}; + ;; +esac + + if test "x$DRI3" = xyes; then + DRI3_TRUE= + DRI3_FALSE='#' +else + DRI3_TRUE='#' + DRI3_FALSE= +fi + + +if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then + if test "x$DRM" = xyes; then + +$as_echo "#define WITH_LIBDRM 1" >>confdefs.h + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5 +$as_echo_n "checking for LIBDRM... " >&6; } + +if test -n "$LIBDRM_CFLAGS"; then + pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "$LIBDRM" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBDRM_LIBS"; then + pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "$LIBDRM" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBDRM" 2>&1` + else + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBDRM" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDRM_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBDRM) were not met: + +$LIBDRM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS + LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + fi +fi + +if test "x$DRI2" = xyes; then + save_CFLAGS=$CFLAGS + CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <GL/gl.h> +#include <GL/internal/dri_interface.h> +#ifndef __DRI_DRI2 +#error DRI2 extension not available. +#endif +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + HAVE_DRI2EXTENSION=yes +else + HAVE_DRI2EXTENSION=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$save_CFLAGS + if test "x$HAVE_DRI2EXTENSION" = xyes; then + +$as_echo "#define DRI2_AIGLX 1" >>confdefs.h + + DRI2_AIGLX=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h." >&5 +$as_echo "$as_me: DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h." >&6;} + DRI2_AIGLX=no + fi +fi + if test "x$DRI2_AIGLX" = xyes; then + DRI2_AIGLX_TRUE= + DRI2_AIGLX_FALSE='#' +else + DRI2_AIGLX_TRUE='#' + DRI2_AIGLX_FALSE= +fi + + +if test "x$GLX" = xyes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIB" >&5 +$as_echo_n "checking for XLIB... " >&6; } + +if test -n "$XLIB_CFLAGS"; then + pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XLIB_LIBS"; then + pkg_cv_XLIB_LIBS="$XLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1` + else + XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XLIB_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (x11) were not met: + +$XLIB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XLIB_CFLAGS +and XLIB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XLIB_CFLAGS=$pkg_cv_XLIB_CFLAGS + XLIB_LIBS=$pkg_cv_XLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 +$as_echo_n "checking for GL... " >&6; } + +if test -n "$GL_CFLAGS"; then + pkg_cv_GL_CFLAGS="$GL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "$GLPROTO $LIBGL" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GL_LIBS"; then + pkg_cv_GL_LIBS="$GL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "$GLPROTO $LIBGL" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$GLPROTO $LIBGL" 2>&1` + else + GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "$GLPROTO $LIBGL" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($GLPROTO $LIBGL) were not met: + +$GL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GL_CFLAGS +and GL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + GL_CFLAGS=$pkg_cv_GL_CFLAGS + GL_LIBS=$pkg_cv_GL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +$as_echo "#define GLXEXT 1" >>confdefs.h + + GLX_LIBS='$(top_builddir)/glx/libglx.la' + GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS" +else + GLX=no +fi + if test "x$GLX" = xyes; then + GLX_TRUE= + GLX_FALSE='#' +else + GLX_TRUE='#' + GLX_FALSE= +fi + + +if test "x$GLX" = xno; then + AIGLX=no +fi + +if test "x$AIGLX" = xyes -a \( "x$DRI2" = xyes \); then + +$as_echo "#define AIGLX 1" >>confdefs.h + +fi + if { test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes; then + AIGLX_DRI_LOADER_TRUE= + AIGLX_DRI_LOADER_FALSE='#' +else + AIGLX_DRI_LOADER_TRUE='#' + AIGLX_DRI_LOADER_FALSE= +fi + + +if test "x$GLX_USE_TLS" = xyes ; then + GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS" + GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread" +fi + + + + if test "x$PRESENT" = xyes; then + PRESENT_TRUE= + PRESENT_FALSE='#' +else + PRESENT_TRUE='#' + PRESENT_FALSE= +fi + +if test "x$PRESENT" = xyes; then + +$as_echo "#define PRESENT 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $PRESENTPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $PRESENTPROTO" + PRESENT_INC='-I$(top_srcdir)/present' + PRESENT_LIB='$(top_builddir)/present/libpresent.la' +fi + + if test "x$XINERAMA" = xyes; then + XINERAMA_TRUE= + XINERAMA_FALSE='#' +else + XINERAMA_TRUE='#' + XINERAMA_FALSE= +fi + +if test "x$XINERAMA" = xyes; then + +$as_echo "#define XINERAMA 1" >>confdefs.h + + +$as_echo "#define PANORAMIX 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO" +fi + + if test "x$XACE" = xyes; then + XACE_TRUE= + XACE_FALSE='#' +else + XACE_TRUE='#' + XACE_FALSE= +fi + +if test "x$XACE" = xyes; then + +$as_echo "#define XACE 1" >>confdefs.h + +fi + + if test "x$XSELINUX" = xyes; then + XSELINUX_TRUE= + XSELINUX_FALSE='#' +else + XSELINUX_TRUE='#' + XSELINUX_FALSE= +fi + +if test "x$XSELINUX" = xyes; then + if test "x$XACE" != xyes; then + as_fn_error $? "cannot build SELinux extension without X-ACE" "$LINENO" 5 + fi + for ac_header in libaudit.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" +if test "x$ac_cv_header_libaudit_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBAUDIT_H 1 +_ACEOF + +else + as_fn_error $? "SELinux extension requires audit system headers" "$LINENO" 5 +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audit_open in -laudit" >&5 +$as_echo_n "checking for audit_open in -laudit... " >&6; } +if ${ac_cv_lib_audit_audit_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-laudit $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char audit_open (); +int +main () +{ +return audit_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_audit_audit_open=yes +else + ac_cv_lib_audit_audit_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_open" >&5 +$as_echo "$ac_cv_lib_audit_audit_open" >&6; } +if test "x$ac_cv_lib_audit_audit_open" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBAUDIT 1 +_ACEOF + + LIBS="-laudit $LIBS" + +else + as_fn_error $? "SELinux extension requires audit system library" "$LINENO" 5 +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SELINUX" >&5 +$as_echo_n "checking for SELINUX... " >&6; } + +if test -n "$SELINUX_CFLAGS"; then + pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "$LIBSELINUX" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SELINUX_LIBS"; then + pkg_cv_SELINUX_LIBS="$SELINUX_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "$LIBSELINUX" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBSELINUX" 2>&1` + else + SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBSELINUX" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SELINUX_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBSELINUX) were not met: + +$SELINUX_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables SELINUX_CFLAGS +and SELINUX_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables SELINUX_CFLAGS +and SELINUX_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS + SELINUX_LIBS=$pkg_cv_SELINUX_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + SELINUX_LIBS="$SELINUX_LIBS -laudit" + +$as_echo "#define XSELINUX 1" >>confdefs.h + +fi + + if test "x$XCSECURITY" = xyes; then + XCSECURITY_TRUE= + XCSECURITY_FALSE='#' +else + XCSECURITY_TRUE='#' + XCSECURITY_FALSE= +fi + +if test "x$XCSECURITY" = xyes; then + if test "x$XACE" != xyes; then + as_fn_error $? "cannot build Security extension without X-ACE" "$LINENO" 5 + fi + +$as_echo "#define XCSECURITY 1" >>confdefs.h + +fi + + if test "x$DBE" = xyes; then + DBE_TRUE= + DBE_FALSE='#' +else + DBE_TRUE='#' + DBE_FALSE= +fi + +if test "x$DBE" = xyes; then + +$as_echo "#define DBE 1" >>confdefs.h + + DBE_LIB='$(top_builddir)/dbe/libdbe.la' + DBE_INC='-I$(top_srcdir)/dbe' +fi + + if test "x$XF86BIGFONT" = xyes; then + XF86BIGFONT_TRUE= + XF86BIGFONT_FALSE='#' +else + XF86BIGFONT_TRUE='#' + XF86BIGFONT_FALSE= +fi + +if test "x$XF86BIGFONT" = xyes; then + +$as_echo "#define XF86BIGFONT 1" >>confdefs.h + + REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO" +fi + + if test "x$DPMSExtension" = xyes; then + DPMSExtension_TRUE= + DPMSExtension_FALSE='#' +else + DPMSExtension_TRUE='#' + DPMSExtension_FALSE= +fi + +if test "x$DPMSExtension" = xyes; then + +$as_echo "#define DPMSExtension 1" >>confdefs.h + +fi + + +$as_echo "#define RENDER 1" >>confdefs.h + +RENDER_LIB='$(top_builddir)/render/librender.la' +RENDER_INC='-I$(top_srcdir)/render' + + +$as_echo "#define RANDR 1" >>confdefs.h + +RANDR_LIB='$(top_builddir)/randr/librandr.la' +RANDR_INC='-I$(top_srcdir)/randr' + + +$as_echo "#define XFIXES 1" >>confdefs.h + +FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' +FIXES_INC='-I$(top_srcdir)/xfixes' + + +$as_echo "#define DAMAGE 1" >>confdefs.h + +DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' +DAMAGE_INC='-I$(top_srcdir)/damageext' +MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' +MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' + +# XINPUT extension is integral part of the server + +$as_echo "#define XINPUT 1" >>confdefs.h + +XI_LIB='$(top_builddir)/Xi/libXi.la' +XI_INC='-I$(top_srcdir)/Xi' + + if test "x$XF86UTILS" = xyes; then + XF86UTILS_TRUE= + XF86UTILS_FALSE='#' +else + XF86UTILS_TRUE='#' + XF86UTILS_FALSE= +fi + + if test "x$VGAHW" = xyes; then + VGAHW_TRUE= + VGAHW_FALSE='#' +else + VGAHW_TRUE='#' + VGAHW_FALSE= +fi + + if test "x$VBE" = xyes; then + VBE_TRUE= + VBE_FALSE='#' +else + VBE_TRUE='#' + VBE_FALSE= +fi + + if test "x$INT10MODULE" = xyes; then + INT10MODULE_TRUE= + INT10MODULE_FALSE='#' +else + INT10MODULE_TRUE='#' + INT10MODULE_FALSE= +fi + + + +$as_echo "#define SHAPE 1" >>confdefs.h + + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XKBPATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKB_BASE_DIRECTORY="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKB_BASE_DIRECTORY "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +# Check whether --with-xkb-bin-directory was given. +if test "${with_xkb_bin_directory+set}" = set; then : + withval=$with_xkb_bin_directory; XKB_BIN_DIRECTORY="$withval" +else + XKB_BIN_DIRECTORY="$bindir" +fi + + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XKB_BIN_DIRECTORY\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKB_BIN_DIRECTORY="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKB_BIN_DIRECTORY "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` +if [ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ] ; then + XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" +fi + + +XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'` +XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'` + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XKBOUTPUT\"" + eval ac_define_dir="\"$ac_define_dir\"" + XKM_OUTPUT_DIR="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XKM_OUTPUT_DIR "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + +if test "x$XKB_DFLT_RULES" = x; then + case $host_os in + linux*) + XKB_DFLT_RULES="evdev" + ;; + *) + XKB_DFLT_RULES="base" + ;; + esac +fi + +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_RULES "$XKB_DFLT_RULES" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_MODEL "$XKB_DFLT_MODEL" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_LAYOUT "$XKB_DFLT_LAYOUT" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_VARIANT "$XKB_DFLT_VARIANT" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XKB_DFLT_OPTIONS "$XKB_DFLT_OPTIONS" +_ACEOF + + + + + + + +XKB_LIB='$(top_builddir)/xkb/libxkb.la' +XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' +REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDMCP" >&5 +$as_echo_n "checking for XDMCP... " >&6; } + +if test -n "$XDMCP_CFLAGS"; then + pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XDMCP_LIBS"; then + pkg_cv_XDMCP_LIBS="$XDMCP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xdmcp" 2>&1` + else + XDMCP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xdmcp" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XDMCP_PKG_ERRORS" >&5 + + have_libxdmcp="no" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_libxdmcp="no" +else + XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS + XDMCP_LIBS=$pkg_cv_XDMCP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_libxdmcp="yes" +fi +if test "x$have_libxdmcp" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XdmcpWrap in -lXdmcp" >&5 +$as_echo_n "checking for XdmcpWrap in -lXdmcp... " >&6; } +if ${ac_cv_lib_Xdmcp_XdmcpWrap+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXdmcp $XDMCP_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XdmcpWrap (); +int +main () +{ +return XdmcpWrap (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xdmcp_XdmcpWrap=yes +else + ac_cv_lib_Xdmcp_XdmcpWrap=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp_XdmcpWrap" >&5 +$as_echo "$ac_cv_lib_Xdmcp_XdmcpWrap" >&6; } +if test "x$ac_cv_lib_Xdmcp_XdmcpWrap" = xyes; then : + have_xdmcpwrap="yes" +else + have_xdmcpwrap="no" +fi + +fi +if test "x$XDMCP" = xauto; then + if test "x$have_libxdmcp" = xyes; then + XDMCP=yes + else + XDMCP=no + fi +fi +if test "x$XDMAUTH" = xauto; then + if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then + XDMAUTH=yes + else + XDMAUTH=no + fi +fi + + if test "x$XDMCP" = xyes; then + XDMCP_TRUE= + XDMCP_FALSE='#' +else + XDMCP_TRUE='#' + XDMCP_FALSE= +fi + +if test "x$XDMCP" = xyes; then + +$as_echo "#define XDMCP 1" >>confdefs.h + + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" +fi + + if test "x$XDMAUTH" = xyes; then + XDMAUTH_TRUE= + XDMAUTH_FALSE='#' +else + XDMAUTH_TRUE='#' + XDMAUTH_FALSE= +fi + +if test "x$XDMAUTH" = xyes; then + +$as_echo "#define HASXDMAUTH 1" >>confdefs.h + + if ! test "x$XDMCP" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" + fi +fi + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$FONTPATH\"" + eval ac_define_dir="\"$ac_define_dir\"" + COMPILEDDEFAULTFONTPATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define COMPILEDDEFAULTFONTPATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$SERVERCONFIG\"" + eval ac_define_dir="\"$ac_define_dir\"" + SERVER_MISC_CONFIG_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define SERVER_MISC_CONFIG_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$FONTROOTDIR\"" + eval ac_define_dir="\"$ac_define_dir\"" + BASE_FONT_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define BASE_FONT_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + +dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri` + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$dridriverdir\"" + eval ac_define_dir="\"$ac_define_dir\"" + DRI_DRIVER_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DRI_DRIVER_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +cat >>confdefs.h <<_ACEOF +#define XVENDORNAME "$VENDOR_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XVENDORNAMESHORT "$VENDOR_NAME_SHORT" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XORG_DATE "$RELEASE_DATE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define XORG_MAN_VERSION "$VENDOR_MAN_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define BUILDERADDR "$BUILDERADDR" +_ACEOF + + +if test -z "$OSNAME"; then + OSNAME="UNKNOWN" +fi + + +cat >>confdefs.h <<_ACEOF +#define OSNAME "$OSNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define OSVENDOR "$OSVENDOR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define BUILDERSTRING "$BUILDERSTRING" +_ACEOF + + + + +cat >>confdefs.h <<_ACEOF +#define VENDOR_NAME "$VENDOR_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VENDOR_NAME_SHORT "$VENDOR_NAME_SHORT" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VENDOR_RELEASE $VENDOR_RELEASE +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VENDOR_MAN_VERSION "$VENDOR_MAN_VERSION" +_ACEOF + + + +$as_echo "#define NO_LIBCWRAPPER 1" >>confdefs.h + + +if test "x$DEBUGGING" = xyes; then + +$as_echo "#define DEBUG 1" >>confdefs.h + +fi + if test "x$DEBUGGING" = xyes; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + + + +$as_echo "#define XTEST 1" >>confdefs.h + + +$as_echo "#define XSYNC 1" >>confdefs.h + + +$as_echo "#define XCMISC 1" >>confdefs.h + + +$as_echo "#define BIGREQS 1" >>confdefs.h + + +if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then + DIX_LIB='$(top_builddir)/dix/dix.O' + OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)' +else + DIX_LIB='$(top_builddir)/dix/libdix.la' + OS_LIB='$(top_builddir)/os/libos.la' +fi + + + +MAIN_LIB='$(top_builddir)/dix/libmain.la' + + +MI_LIB='$(top_builddir)/mi/libmi.la' +MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' +MI_INC='-I$(top_srcdir)/mi' +FB_LIB='$(top_builddir)/fb/libfb.la' +FB_INC='-I$(top_srcdir)/fb' +MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' +MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' +MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync' +MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la' +CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' + +# SHA1 hashing + +# Check whether --with-sha1 was given. +if test "${with_sha1+set}" = set; then : + withval=$with_sha1; +fi + +ac_fn_c_check_func "$LINENO" "SHA1Init" "ac_cv_func_SHA1Init" +if test "x$ac_cv_func_SHA1Init" = xyes; then : + HAVE_SHA1_IN_LIBC=yes +fi + +if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then + with_sha1=libc +fi +if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then + as_fn_error $? "libc requested but not found" "$LINENO" 5 +fi +if test "x$with_sha1" = xlibc; then + +$as_echo "#define HAVE_SHA1_IN_LIBC 1" >>confdefs.h + + SHA1_LIBS="" +fi +ac_fn_c_check_func "$LINENO" "CC_SHA1_Init" "ac_cv_func_CC_SHA1_Init" +if test "x$ac_cv_func_CC_SHA1_Init" = xyes; then : + HAVE_SHA1_IN_COMMONCRYPTO=yes +fi + +if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then + with_sha1=CommonCrypto +fi +if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then + as_fn_error $? "CommonCrypto requested but not found" "$LINENO" 5 +fi +if test "x$with_sha1" = xCommonCrypto; then + +$as_echo "#define HAVE_SHA1_IN_COMMONCRYPTO 1" >>confdefs.h + + SHA1_LIBS="" +fi +ac_fn_c_check_header_compile "$LINENO" "wincrypt.h" "ac_cv_header_wincrypt_h" "#include <windows.h> +" +if test "x$ac_cv_header_wincrypt_h" = xyes; then : + HAVE_SHA1_IN_CRYPTOAPI=yes +fi + + +if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then + with_sha1=CryptoAPI +fi +if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then + as_fn_error $? "CryptoAPI requested but not found" "$LINENO" 5 +fi +if test "x$with_sha1" = xCryptoAPI; then + +$as_echo "#define HAVE_SHA1_IN_CRYPTOAPI 1" >>confdefs.h + + SHA1_LIBS="" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1Init in -lmd" >&5 +$as_echo_n "checking for SHA1Init in -lmd... " >&6; } +if ${ac_cv_lib_md_SHA1Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SHA1Init (); +int +main () +{ +return SHA1Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_md_SHA1Init=yes +else + ac_cv_lib_md_SHA1Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_md_SHA1Init" >&5 +$as_echo "$ac_cv_lib_md_SHA1Init" >&6; } +if test "x$ac_cv_lib_md_SHA1Init" = xyes; then : + HAVE_LIBMD=yes +fi + +if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then + with_sha1=libmd +fi +if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then + as_fn_error $? "libmd requested but not found" "$LINENO" 5 +fi +if test "x$with_sha1" = xlibmd; then + +$as_echo "#define HAVE_SHA1_IN_LIBMD 1" >>confdefs.h + + SHA1_LIBS=-lmd +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSHA1" >&5 +$as_echo_n "checking for LIBSHA1... " >&6; } + +if test -n "$LIBSHA1_CFLAGS"; then + pkg_cv_LIBSHA1_CFLAGS="$LIBSHA1_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBSHA1_CFLAGS=`$PKG_CONFIG --cflags "libsha1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBSHA1_LIBS"; then + pkg_cv_LIBSHA1_LIBS="$LIBSHA1_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBSHA1_LIBS=`$PKG_CONFIG --libs "libsha1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsha1" 2>&1` + else + LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsha1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBSHA1_PKG_ERRORS" >&5 + + HAVE_LIBSHA1=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_LIBSHA1=no +else + LIBSHA1_CFLAGS=$pkg_cv_LIBSHA1_CFLAGS + LIBSHA1_LIBS=$pkg_cv_LIBSHA1_LIBS + { $as_echo "$as_me:${as_lineno-$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 +if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then + as_fn_error $? "libsha1 requested but not found" "$LINENO" 5 +fi +if test "x$with_sha1" = xlibsha1; then + +$as_echo "#define HAVE_SHA1_IN_LIBSHA1 1" >>confdefs.h + + SHA1_LIBS=-lsha1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_sha1_init in -lnettle" >&5 +$as_echo_n "checking for nettle_sha1_init in -lnettle... " >&6; } +if ${ac_cv_lib_nettle_nettle_sha1_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnettle $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nettle_sha1_init (); +int +main () +{ +return nettle_sha1_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nettle_nettle_sha1_init=yes +else + ac_cv_lib_nettle_nettle_sha1_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_sha1_init" >&5 +$as_echo "$ac_cv_lib_nettle_nettle_sha1_init" >&6; } +if test "x$ac_cv_lib_nettle_nettle_sha1_init" = xyes; then : + HAVE_LIBNETTLE=yes +fi + +if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then + with_sha1=libnettle +fi +if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then + as_fn_error $? "libnettle requested but not found" "$LINENO" 5 +fi +if test "x$with_sha1" = xlibnettle; then + +$as_echo "#define HAVE_SHA1_IN_LIBNETTLE 1" >>confdefs.h + + SHA1_LIBS=-lnettle +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_md_open in -lgcrypt" >&5 +$as_echo_n "checking for gcry_md_open in -lgcrypt... " >&6; } +if ${ac_cv_lib_gcrypt_gcry_md_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcrypt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gcry_md_open (); +int +main () +{ +return gcry_md_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gcrypt_gcry_md_open=yes +else + ac_cv_lib_gcrypt_gcry_md_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_md_open" >&5 +$as_echo "$ac_cv_lib_gcrypt_gcry_md_open" >&6; } +if test "x$ac_cv_lib_gcrypt_gcry_md_open" = xyes; then : + HAVE_LIBGCRYPT=yes +fi + +if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then + with_sha1=libgcrypt +fi +if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then + as_fn_error $? "libgcrypt requested but not found" "$LINENO" 5 +fi +if test "x$with_sha1" = xlibgcrypt; then + +$as_echo "#define HAVE_SHA1_IN_LIBGCRYPT 1" >>confdefs.h + + SHA1_LIBS=-lgcrypt +fi +# We don't need all of the OpenSSL libraries, just libcrypto +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 +$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_SHA1_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SHA1_Init (); +int +main () +{ +return SHA1_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_SHA1_Init=yes +else + ac_cv_lib_crypto_SHA1_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 +$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; } +if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes; then : + HAVE_LIBCRYPTO=yes +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5 +$as_echo_n "checking for OPENSSL... " >&6; } + +if test -n "$OPENSSL_CFLAGS"; then + pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$OPENSSL_LIBS"; then + pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "openssl" 2>&1` + else + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "openssl" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$OPENSSL_PKG_ERRORS" >&5 + + HAVE_OPENSSL_PKC=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_OPENSSL_PKC=no +else + OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS + OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_OPENSSL_PKC=yes +fi +if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then + if test "x$with_sha1" = x; then + with_sha1=libcrypto + fi +else + if test "x$with_sha1" = xlibcrypto; then + as_fn_error $? "OpenSSL libcrypto requested but not found" "$LINENO" 5 + fi +fi +if test "x$with_sha1" = xlibcrypto; then + if test "x$HAVE_LIBCRYPTO" = xyes; then + SHA1_LIBS=-lcrypto + else + SHA1_LIBS="$OPENSSL_LIBS" + SHA1_CFLAGS="$OPENSSL_CFLAGS" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1 implementation" >&5 +$as_echo_n "checking for SHA1 implementation... " >&6; } +if test "x$with_sha1" = x; then + as_fn_error $? "No suitable SHA1 implementation found" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sha1" >&5 +$as_echo "$with_sha1" >&6; } + + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSERVERCFLAGS" >&5 +$as_echo_n "checking for XSERVERCFLAGS... " >&6; } + +if test -n "$XSERVERCFLAGS_CFLAGS"; then + pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XSERVERCFLAGS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XSERVERCFLAGS_LIBS"; then + pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XSERVERCFLAGS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` + else + XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERCFLAGS_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met: + +$XSERVERCFLAGS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS +and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XSERVERCFLAGS_CFLAGS=$pkg_cv_XSERVERCFLAGS_CFLAGS + XSERVERCFLAGS_LIBS=$pkg_cv_XSERVERCFLAGS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSERVERLIBS" >&5 +$as_echo_n "checking for XSERVERLIBS... " >&6; } + +if test -n "$XSERVERLIBS_CFLAGS"; then + pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XSERVERLIBS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XSERVERLIBS_LIBS"; then + pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XSERVERLIBS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$REQUIRED_LIBS" 2>&1` + else + XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERLIBS_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($REQUIRED_LIBS) were not met: + +$XSERVERLIBS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS +and XSERVERLIBS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XSERVERLIBS_CFLAGS=$pkg_cv_XSERVERLIBS_CFLAGS + XSERVERLIBS_LIBS=$pkg_cv_XSERVERLIBS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUNWIND" >&5 +$as_echo_n "checking for LIBUNWIND... " >&6; } + +if test -n "$LIBUNWIND_CFLAGS"; then + pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBUNWIND_LIBS"; then + pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libunwind" 2>&1` + else + LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "libunwind" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBUNWIND_PKG_ERRORS" >&5 + + HAVE_LIBUNWIND=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_LIBUNWIND=no +else + LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS + LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_LIBUNWIND=yes +fi +if test "x$LIBUNWIND" = "xauto"; then + LIBUNWIND="$HAVE_LIBUNWIND" +fi + +if test "x$LIBUNWIND" = "xyes"; then + if test "x$HAVE_LIBUNWIND" != "xyes"; then + as_fn_error $? "libunwind requested but not installed." "$LINENO" 5 + fi + +$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h + +fi + + if test "x$LIBUNWIND" = xyes; then + HAVE_LIBUNWIND_TRUE= + HAVE_LIBUNWIND_FALSE='#' +else + HAVE_LIBUNWIND_TRUE='#' + HAVE_LIBUNWIND_FALSE= +fi + + +# Autotools has some unfortunate issues with library handling. In order to +# get a server to rebuild when a dependency in the tree is changed, it must +# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be +# listed there, or some versions of autotools will break (especially if a -L +# is required to find the library). So, we keep two sets of libraries +# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which +# will go into the _DEPENDENCIES and _LDADD of the server, and +# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The +# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in +# NAMESPACE_SYS_LIBS. +# +# XSERVER_LIBS is the set of in-tree libraries which all servers require. +# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers +# require. +# +XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" +XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB" +XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" + + + +UTILS_SYS_LIBS="${SYS_LIBS}" + + +# The Xorg binary needs to export symbols so that they can be used from modules +# Some platforms require extra flags to do this. libtool should set the +# necessary flags for each platform when -export-dynamic is passed to it. +LD_EXPORT_SYMBOLS_FLAG="-export-dynamic" +LD_NO_UNDEFINED_FLAG= +XORG_DRIVER_LIBS= +case "$host_os" in + cygwin*) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a" + LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a" + XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined" + CYGWIN=yes + ;; + solaris*) + # We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT + # that we can link against for testing if the system linker is new + # enough to support -z parent=<program> for verifying loadable modules + # are only calling functions defined in either the loading program or + # the libraries they're linked with. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(int argc, char **argv) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + mv conftest$EXEEXT conftest.parent + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,parent=conftest.parent -G" >&5 +$as_echo_n "checking whether the linker accepts -Wl,-z,parent=conftest.parent -G... " >&6; } +ax_save_FLAGS=$LDFLAGS + LDFLAGS="-Wl,-z,parent=conftest.parent -G" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval `$as_echo "xorg_cv_linker_flags_-Wl,-z,parent=conftest.parent -G" | $as_tr_sh`=yes +else + eval `$as_echo "xorg_cv_linker_flags_-Wl,-z,parent=conftest.parent -G" | $as_tr_sh`=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_save_FLAGS +eval xorg_check_linker_flags=$`$as_echo "xorg_cv_linker_flags_-Wl,-z,parent=conftest.parent -G" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5 +$as_echo "$xorg_check_linker_flags" >&6; } +if test "x$xorg_check_linker_flags" = xyes; then + LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg" +# Not set yet, since this gets exported in xorg-server.pc to all the drivers, +# and they're not all fixed to build correctly with it yet. +# XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg" + +else + : +fi + + rm -f conftest.parent + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; +esac + + + + if test x"$CYGWIN" = xyes; then + CYGWIN_TRUE= + CYGWIN_FALSE='#' +else + CYGWIN_TRUE='#' + CYGWIN_FALSE= +fi + + if test x"$LD_NO_UNDEFINED_FLAG" != x; then + NO_UNDEFINED_TRUE= + NO_UNDEFINED_FALSE='#' +else + NO_UNDEFINED_TRUE='#' + NO_UNDEFINED_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SVR4 needs to be defined" >&5 +$as_echo_n "checking if SVR4 needs to be defined... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) + I_AM_SVR4 +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I_AM_SVR4" >/dev/null 2>&1; then : + + +$as_echo "#define SVR4 1" >>confdefs.h + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f conftest* + + +XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC $PRESENT_INC" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xvfb DDX" >&5 +$as_echo_n "checking whether to build Xvfb DDX... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XVFB" >&5 +$as_echo "$XVFB" >&6; } + if test "x$XVFB" = xyes; then + XVFB_TRUE= + XVFB_FALSE='#' +else + XVFB_TRUE='#' + XVFB_FALSE= +fi + + +if test "x$XVFB" = xyes; then + XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" + XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" + + +fi + + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XNESTMODULES" >&5 +$as_echo_n "checking for XNESTMODULES... " >&6; } + +if test -n "$XNESTMODULES_CFLAGS"; then + pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XNESTMODULES_LIBS"; then + pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1` + else + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XNESTMODULES_PKG_ERRORS" >&5 + + have_xnest=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_xnest=no +else + XNESTMODULES_CFLAGS=$pkg_cv_XNESTMODULES_CFLAGS + XNESTMODULES_LIBS=$pkg_cv_XNESTMODULES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_xnest=yes +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xnest DDX" >&5 +$as_echo_n "checking whether to build Xnest DDX... " >&6; } +if test "x$XNEST" = xauto; then + XNEST="$have_xnest" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XNEST" >&5 +$as_echo "$XNEST" >&6; } + if test "x$XNEST" = xyes; then + XNEST_TRUE= + XNEST_FALSE='#' +else + XNEST_TRUE='#' + XNEST_FALSE= +fi + + +if test "x$XNEST" = xyes; then + if test "x$have_xnest" = xno; then + as_fn_error $? "Xnest build explicitly requested, but required modules not found." "$LINENO" 5 + fi + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB" + XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" + + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg DDX" >&5 +$as_echo_n "checking whether to build Xorg DDX... " >&6; } +if test "x$XORG" = xauto; then + XORG="yes" + case $host_os in + cygwin*) XORG="no" ;; + mingw*) XORG="no" ;; + darwin*) XORG="no" ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XORG" >&5 +$as_echo "$XORG" >&6; } + +if test "x$XORG" = xyes; then + XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' + XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' + XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" + XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" + XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB" + + symbol_visibility= + have_visibility=disabled + if test x$SYMBOL_VISIBILITY != xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol visibility support" >&5 +$as_echo_n "checking for symbol visibility support... " >&6; } + if test x$GCC = xyes; then + VISIBILITY_CFLAGS="-fvisibility=hidden" + else + if test x$SUNCC = xyes; then + VISIBILITY_CFLAGS="-xldscope=hidden" + else + have_visibility=no + fi + fi + if test x$have_visibility != xno; then + save_CFLAGS="$CFLAGS" + proto_inc=`$PKG_CONFIG --cflags xproto` + CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <X11/Xfuncproto.h> + extern _X_HIDDEN int hidden_int; + extern _X_EXPORT int public_int; + extern _X_HIDDEN int hidden_int_func(void); + extern _X_EXPORT int public_int_func(void); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + have_visibility=yes +else + have_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$save_CFLAGS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_visibility" >&5 +$as_echo "$have_visibility" >&6; } + if test x$have_visibility != xno; then + symbol_visibility=$VISIBILITY_CFLAGS + XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS" + XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS" + fi + fi + + + xorg_bus_bsdpci=no + xorg_bus_sparc=no + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg PCI functions" >&5 +$as_echo_n "checking whether to build Xorg PCI functions... " >&6; } + if test "x$PCI" = xyes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5 +$as_echo_n "checking for PCIACCESS... " >&6; } + +if test -n "$PCIACCESS_CFLAGS"; then + pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "$LIBPCIACCESS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PCIACCESS_LIBS"; then + pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "$LIBPCIACCESS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBPCIACCESS" 2>&1` + else + PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBPCIACCESS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PCIACCESS_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBPCIACCESS) were not met: + +$PCIACCESS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PCIACCESS_CFLAGS +and PCIACCESS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PCIACCESS_CFLAGS +and PCIACCESS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS + PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS" + XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $LIBDRM_LIBS" + XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS" + + +$as_echo "#define XSERVER_LIBPCIACCESS 1" >>confdefs.h + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$PCI_TXT_IDS_DIR\"" + eval ac_define_dir="\"$ac_define_dir\"" + PCI_TXT_IDS_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define PCI_TXT_IDS_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + case $host_os in + gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*) + xorg_bus_bsdpci="yes" + ;; + esac + case $host_cpu in + sparc*) + xorg_bus_sparc="yes" + ;; + esac + else + if test "x$CONFIG_UDEV_KMS" = xyes; then + as_fn_error $? "Platform device enumeration requires libpciaccess" "$LINENO" 5 + fi + if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then + as_fn_error $? "Cannot build int10 without libpciaccess" "$LINENO" 5 + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCI" >&5 +$as_echo "$PCI" >&6; } + + if test "x$CONFIG_UDEV_KMS" = xyes; then + +$as_echo "#define XSERVER_PLATFORM_BUS 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSERVER_PLATFORM_BUS" >&5 +$as_echo "$XSERVER_PLATFORM_BUS" >&6; } + + case $host_os in + linux*) + XORG_OS_SUBDIR="linux" + linux_acpi="no" + case $host_cpu in + alpha*) + linux_alpha=yes + ;; + i*86|amd64*|x86_64*|ia64*) + linux_acpi=$enable_linux_acpi + ;; + *) + ;; + esac + for ac_header in linux/apm_bios.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/apm_bios.h" "ac_cv_header_linux_apm_bios_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_apm_bios_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_APM_BIOS_H 1 +_ACEOF + linux_apm=$enable_linux_apm +fi + +done + + if test "x$linux_apm" = xyes -o "x$linux_acpi" = xyes; then + +$as_echo "#define XF86PM 1" >>confdefs.h + + fi + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + XORG_OS_SUBDIR="bsd" + ;; + netbsd*) + XORG_OS_SUBDIR="bsd" + ;; + openbsd*) + if test "x$ac_cv_BSD_APM" = xyes \ + -o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + XORG_OS_SUBDIR="bsd" + ;; + solaris*) + XORG_OS_SUBDIR="solaris" + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + for ac_header in sys/kd.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/kd.h" "ac_cv_header_sys_kd_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_kd_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_KD_H 1 +_ACEOF + +fi + +done + + for ac_header in sys/vt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/vt.h" "ac_cv_header_sys_vt_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vt_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_VT_H 1 +_ACEOF + solaris_vt=yes +else + solaris_vt=no +fi + +done + + # Check for minimum supported release + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris version" >&5 +$as_echo_n "checking Solaris version... " >&6; } + OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'` + if test "${OS_MINOR}" -ge 7 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris ${OS_MINOR}" >&5 +$as_echo "Solaris ${OS_MINOR}" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&5 +$as_echo "Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&6; } + fi + if test "${OS_MINOR}" -lt 8 ; then + as_fn_error $? "This release no longer supports Solaris versions older than Solaris 8." "$LINENO" 5 + fi + ac_fn_c_check_decl "$LINENO" "_LP64" "ac_cv_have_decl__LP64" "$ac_includes_default" +if test "x$ac_cv_have_decl__LP64" = xyes; then : + SOLARIS_64="yes" +else + SOLARIS_64="no" +fi + + + case $host_cpu in + sparc*) + SOLARIS_INOUT_ARCH="sparcv8plus" + ;; + i*86) + if test x$SOLARIS_64 = xyes ; then + SOLARIS_INOUT_ARCH="amd64" + else + SOLARIS_INOUT_ARCH="ia32" + fi + ;; + *) + as_fn_error $? "Unsupported Solaris platform. Only SPARC & x86 \ + are supported on Solaris in this release. If you are \ + interested in porting Xorg to your platform, please email \ + xorg@lists.freedesktop.org." "$LINENO" 5 ;; + esac + + ;; + gnu*) + XORG_OS_SUBDIR="hurd" + ;; + *) + XORG_OS_SUBDIR="stub" + { $as_echo "$as_me:${as_lineno-$LINENO}: 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: 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." >&6;} + ;; + esac + + case $host_cpu in + i*86) + ;; + esac + + if test "x$DGA" = xauto; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5 +$as_echo_n "checking for DGA... " >&6; } + +if test -n "$DGA_CFLAGS"; then + pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DGA_LIBS"; then + pkg_cv_DGA_LIBS="$DGA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DGAPROTO" 2>&1` + else + DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DGAPROTO" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DGA_PKG_ERRORS" >&5 + + DGA=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DGA=no +else + DGA_CFLAGS=$pkg_cv_DGA_CFLAGS + DGA_LIBS=$pkg_cv_DGA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DGA=yes +fi + fi + if test "x$DGA" = xyes; then + XORG_MODULES="$XORG_MODULES $DGAPROTO" + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGA" >&5 +$as_echo_n "checking for DGA... " >&6; } + +if test -n "$DGA_CFLAGS"; then + pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DGA_LIBS"; then + pkg_cv_DGA_LIBS="$DGA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DGAPROTO" 2>&1` + else + DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DGAPROTO" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DGA_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($DGAPROTO) were not met: + +$DGA_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DGA_CFLAGS +and DGA_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + DGA_CFLAGS=$pkg_cv_DGA_CFLAGS + DGA_LIBS=$pkg_cv_DGA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +$as_echo "#define DGA 1" >>confdefs.h + + +$as_echo "#define XFreeXDGA 1" >>confdefs.h + + fi + + if test "x$XF86VIDMODE" = xauto; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VIDMODE" >&5 +$as_echo_n "checking for XF86VIDMODE... " >&6; } + +if test -n "$XF86VIDMODE_CFLAGS"; then + pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "$VIDMODEPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XF86VIDMODE_LIBS"; then + pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "$VIDMODEPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$VIDMODEPROTO" 2>&1` + else + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$VIDMODEPROTO" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86VIDMODE_PKG_ERRORS" >&5 + + XF86VIDMODE=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + XF86VIDMODE=no +else + XF86VIDMODE_CFLAGS=$pkg_cv_XF86VIDMODE_CFLAGS + XF86VIDMODE_LIBS=$pkg_cv_XF86VIDMODE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + XF86VIDMODE=yes +fi + fi + if test "x$XF86VIDMODE" = xyes; then + XORG_MODULES="$XORG_MODULES $VIDMODEPROTO" + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VIDMODE" >&5 +$as_echo_n "checking for XF86VIDMODE... " >&6; } + +if test -n "$XF86VIDMODE_CFLAGS"; then + pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "$VIDMODEPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XF86VIDMODE_LIBS"; then + pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "$VIDMODEPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$VIDMODEPROTO" 2>&1` + else + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$VIDMODEPROTO" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86VIDMODE_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($VIDMODEPROTO) were not met: + +$XF86VIDMODE_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 XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS +and XF86VIDMODE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XF86VIDMODE_CFLAGS=$pkg_cv_XF86VIDMODE_CFLAGS + XF86VIDMODE_LIBS=$pkg_cv_XF86VIDMODE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +$as_echo "#define XF86VIDMODE 1" >>confdefs.h + + fi + + if test -n "$XORG_MODULES"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XORG_MODULES" >&5 +$as_echo_n "checking for XORG_MODULES... " >&6; } + +if test -n "$XORG_MODULES_CFLAGS"; then + pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XORG_MODULES_CFLAGS=`$PKG_CONFIG --cflags "$XORG_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XORG_MODULES_LIBS"; then + pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XORG_MODULES_LIBS=`$PKG_CONFIG --libs "$XORG_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XORG_MODULES" 2>&1` + else + XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XORG_MODULES" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XORG_MODULES_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($XORG_MODULES) were not met: + +$XORG_MODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XORG_MODULES_CFLAGS +and XORG_MODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XORG_MODULES_CFLAGS=$pkg_cv_XORG_MODULES_CFLAGS + XORG_MODULES_LIBS=$pkg_cv_XORG_MODULES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" + XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" + fi + + + + + + + + XF86CONFIGFILE="xorg.conf" + XF86CONFIGDIR="xorg.conf.d" + + CONFIGFILE="$sysconfdir/$XF86CONFIGFILE" + LOGPREFIX="$logdir/Xorg." + +$as_echo "#define XORG_SERVER 1" >>confdefs.h + + +$as_echo "#define XORGSERVER 1" >>confdefs.h + + +$as_echo "#define XFree86Server 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define XORG_VERSION_CURRENT $VENDOR_RELEASE +_ACEOF + + +$as_echo "#define NEED_XF86_TYPES 1" >>confdefs.h + + +$as_echo "#define NEED_XF86_PROTOTYPES 1" >>confdefs.h + + +$as_echo "#define __XSERVERNAME__ \"Xorg\"" >>confdefs.h + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XF86CONFIGFILE\"" + eval ac_define_dir="\"$ac_define_dir\"" + __XCONFIGFILE__="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define __XCONFIGFILE__ "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XF86CONFIGFILE\"" + eval ac_define_dir="\"$ac_define_dir\"" + XF86CONFIGFILE="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define XF86CONFIGFILE "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$XF86CONFIGDIR\"" + eval ac_define_dir="\"$ac_define_dir\"" + __XCONFIGDIR__="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define __XCONFIGDIR__ "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$moduledir\"" + eval ac_define_dir="\"$ac_define_dir\"" + DEFAULT_MODULE_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_MODULE_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$libdir\"" + eval ac_define_dir="\"$ac_define_dir\"" + DEFAULT_LIBRARY_PATH="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_LIBRARY_PATH "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$LOGPREFIX\"" + eval ac_define_dir="\"$ac_define_dir\"" + DEFAULT_LOGPREFIX="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_LOGPREFIX "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +cat >>confdefs.h <<_ACEOF +#define __VENDORDWEBSUPPORT__ "$VENDOR_WEB" +_ACEOF + + if test "x$VGAHW" = xyes; then + +$as_echo "#define WITH_VGAHW 1" >>confdefs.h + + fi + + driverdir="$moduledir/drivers" + + + sdkdir="$includedir/xorg" + extdir="$includedir/X11/extensions" + sysconfigdir="$datadir/X11/$XF86CONFIGDIR" + + + + + + # stuff the ABI versions into the pc file too + extract_abi() { + grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }' + } + abi_ansic=`extract_abi ANSIC` + abi_videodrv=`extract_abi VIDEODRV` + abi_xinput=`extract_abi XINPUT` + abi_extension=`extract_abi EXTENSION` + + + + +fi + if test "x$XORG" = xyes; then + XORG_TRUE= + XORG_FALSE='#' +else + XORG_TRUE='#' + XORG_FALSE= +fi + + if test "x$PCI" = xyes; then + XORG_BUS_PCI_TRUE= + XORG_BUS_PCI_FALSE='#' +else + XORG_BUS_PCI_TRUE='#' + XORG_BUS_PCI_FALSE= +fi + + if test "x$xorg_bus_bsdpci" = xyes; then + XORG_BUS_BSDPCI_TRUE= + XORG_BUS_BSDPCI_FALSE='#' +else + XORG_BUS_BSDPCI_TRUE='#' + XORG_BUS_BSDPCI_FALSE= +fi + + if test "x$xorg_bus_sparc" = xyes; then + XORG_BUS_SPARC_TRUE= + XORG_BUS_SPARC_FALSE='#' +else + XORG_BUS_SPARC_TRUE='#' + XORG_BUS_SPARC_FALSE= +fi + + if test "x$linux_alpha" = xyes; then + LINUX_ALPHA_TRUE= + LINUX_ALPHA_FALSE='#' +else + LINUX_ALPHA_TRUE='#' + LINUX_ALPHA_FALSE= +fi + + if test "x$linux_acpi" = xyes; then + LNXACPI_TRUE= + LNXACPI_FALSE='#' +else + LNXACPI_TRUE='#' + LNXACPI_FALSE= +fi + + if test "x$linux_apm" = xyes; then + LNXAPM_TRUE= + LNXAPM_FALSE='#' +else + LNXAPM_TRUE='#' + LNXAPM_FALSE= +fi + + if test "x$solaris_vt" = xyes; then + SOLARIS_VT_TRUE= + SOLARIS_VT_FALSE='#' +else + SOLARIS_VT_TRUE='#' + SOLARIS_VT_FALSE= +fi + + if test "x$DGA" = xyes; then + DGA_TRUE= + DGA_FALSE='#' +else + DGA_TRUE='#' + DGA_FALSE= +fi + + if test "x$XF86VIDMODE" = xyes; then + XF86VIDMODE_TRUE= + XF86VIDMODE_FALSE='#' +else + XF86VIDMODE_TRUE='#' + XF86VIDMODE_FALSE= +fi + + if test "x$CONFIG_UDEV_KMS" = xyes; then + XORG_BUS_PLATFORM_TRUE= + XORG_BUS_PLATFORM_FALSE='#' +else + XORG_BUS_PLATFORM_TRUE='#' + XORG_BUS_PLATFORM_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build XWin DDX" >&5 +$as_echo_n "checking whether to build XWin DDX... " >&6; } +if test "x$XWIN" = xauto; then + case $host_os in + cygwin*) XWIN="yes" ;; + mingw*) XWIN="yes" ;; + *) XWIN="no" ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XWIN" >&5 +$as_echo "$XWIN" >&6; } + +if test "x$XWIN" = xyes; then + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$sysconfdir\"" + eval ac_define_dir="\"$ac_define_dir\"" + SYSCONFDIR="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define SYSCONFDIR "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$logdir\"" + eval ac_define_dir="\"$ac_define_dir\"" + DEFAULT_LOGDIR="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_LOGDIR "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + +cat >>confdefs.h <<_ACEOF +#define XORG_VERSION_CURRENT $VENDOR_RELEASE +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define __VENDORDWEBSUPPORT__ "$VENDOR_WEB" +_ACEOF + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_WINDRES+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_WINDRES="${ac_tool_prefix}windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_ac_ct_WINDRES="windres" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XWINMODULES" >&5 +$as_echo_n "checking for XWINMODULES... " >&6; } + +if test -n "$XWINMODULES_CFLAGS"; then + pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XWINMODULES_LIBS"; then + pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xdmcp xau" 2>&1` + else + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xdmcp xau" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XWINMODULES_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (x11 xdmcp xau) were not met: + +$XWINMODULES_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XWINMODULES_CFLAGS +and XWINMODULES_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS + XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + if test "x$WINDOWSWM" = xauto; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WINDOWSWMPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$WINDOWSWMPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + WINDOWSWM=yes +else + WINDOWSWM=no +fi + fi + if test "x$WINDOWSWM" = xyes ; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WINDOWSWM" >&5 +$as_echo_n "checking for WINDOWSWM... " >&6; } + +if test -n "$WINDOWSWM_CFLAGS"; then + pkg_cv_WINDOWSWM_CFLAGS="$WINDOWSWM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WINDOWSWMPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$WINDOWSWMPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WINDOWSWM_CFLAGS=`$PKG_CONFIG --cflags "$WINDOWSWMPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$WINDOWSWM_LIBS"; then + pkg_cv_WINDOWSWM_LIBS="$WINDOWSWM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$WINDOWSWMPROTO\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$WINDOWSWMPROTO") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WINDOWSWM_LIBS=`$PKG_CONFIG --libs "$WINDOWSWMPROTO" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + WINDOWSWM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$WINDOWSWMPROTO" 2>&1` + else + WINDOWSWM_PKG_ERRORS=`$PKG_CONFIG --print-errors "$WINDOWSWMPROTO" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$WINDOWSWM_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($WINDOWSWMPROTO) were not met: + +$WINDOWSWM_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 WINDOWSWM_CFLAGS +and WINDOWSWM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables WINDOWSWM_CFLAGS +and WINDOWSWM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + WINDOWSWM_CFLAGS=$pkg_cv_WINDOWSWM_CFLAGS + WINDOWSWM_LIBS=$pkg_cv_WINDOWSWM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS $WINDOWSWM_CFLAGS" + +$as_echo "#define ROOTLESS 1" >>confdefs.h + + fi + + case $host_os in + cygwin*) + XWIN_SERVER_NAME=XWin + +$as_echo "#define HAS_DEVWINDOWS 1" >>confdefs.h + + ;; + mingw*) + XWIN_SERVER_NAME=Xming + +$as_echo "#define RELOCATE_PROJECTROOT 1" >>confdefs.h + + +$as_echo "#define HAS_WINSOCK 1" >>confdefs.h + + XWIN_SYS_LIBS="-lpthread -lws2_32" + ;; + esac + + XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" + XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" + + + + + if test "x$DEBUGGING" = xyes; then + +$as_echo "#define CYGDEBUG 1" >>confdefs.h + + +$as_echo "#define CYGWINDOWING_DEBUG 1" >>confdefs.h + + +$as_echo "#define CYGMULTIWINDOW_DEBUG 1" >>confdefs.h + + fi + + +$as_echo "#define DDXOSVERRORF 1" >>confdefs.h + + +$as_echo "#define DDXBEFORERESET 1" >>confdefs.h + + + if test "x$XWIN" = xyes && test "x$AIGLX" = xyes ; then + # Extract the first word of "python3", so it can be a program name with args. +set dummy python3; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PYTHON3+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PYTHON3"; then + ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + 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_prog_PYTHON3="python3" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PYTHON3=$ac_cv_prog_PYTHON3 +if test -n "$PYTHON3"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 +$as_echo "$PYTHON3" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$PYTHON3"; then + as_fn_error $? "python3 not found" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module lxml" >&5 +$as_echo_n "checking for python module lxml... " >&6; } + $PYTHON3 -c "import lxml;" + if test $? -ne 0 ; then + as_fn_error $? "not found" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for KHRONOS_OPENGL_REGISTRY" >&5 +$as_echo_n "checking for KHRONOS_OPENGL_REGISTRY... " >&6; } + +if test -n "$KHRONOS_OPENGL_REGISTRY_CFLAGS"; then + pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS="$KHRONOS_OPENGL_REGISTRY_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5 + ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS=`$PKG_CONFIG --cflags "khronos-opengl-registry" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$KHRONOS_OPENGL_REGISTRY_LIBS"; then + pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS="$KHRONOS_OPENGL_REGISTRY_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5 + ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS=`$PKG_CONFIG --libs "khronos-opengl-registry" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "khronos-opengl-registry" 2>&1` + else + KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --print-errors "khronos-opengl-registry" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$KHRONOS_OPENGL_REGISTRY_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (khronos-opengl-registry) were not met: + +$KHRONOS_OPENGL_REGISTRY_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS +and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS +and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + KHRONOS_OPENGL_REGISTRY_CFLAGS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS + KHRONOS_OPENGL_REGISTRY_LIBS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir` + fi + + fi + +fi + if test "x$XWIN" = xyes; then + XWIN_TRUE= + XWIN_FALSE='#' +else + XWIN_TRUE='#' + XWIN_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_MULTIWINDOW_TRUE= + XWIN_MULTIWINDOW_FALSE='#' +else + XWIN_MULTIWINDOW_TRUE='#' + XWIN_MULTIWINDOW_FALSE= +fi + + if test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes; then + XWIN_MULTIWINDOWEXTWM_TRUE= + XWIN_MULTIWINDOWEXTWM_FALSE='#' +else + XWIN_MULTIWINDOWEXTWM_TRUE='#' + XWIN_MULTIWINDOWEXTWM_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_CLIPBOARD_TRUE= + XWIN_CLIPBOARD_FALSE='#' +else + XWIN_CLIPBOARD_TRUE='#' + XWIN_CLIPBOARD_FALSE= +fi + + if test "x$XWIN" = xyes && test "x$AIGLX" = xyes; then + XWIN_GLX_WINDOWS_TRUE= + XWIN_GLX_WINDOWS_FALSE='#' +else + XWIN_GLX_WINDOWS_TRUE='#' + XWIN_GLX_WINDOWS_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_NATIVEGDI_TRUE= + XWIN_NATIVEGDI_FALSE='#' +else + XWIN_NATIVEGDI_TRUE='#' + XWIN_NATIVEGDI_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_PRIMARYFB_TRUE= + XWIN_PRIMARYFB_FALSE='#' +else + XWIN_PRIMARYFB_TRUE='#' + XWIN_PRIMARYFB_FALSE= +fi + + if test "x$XWIN" = xyes; then + XWIN_RANDR_TRUE= + XWIN_RANDR_FALSE='#' +else + XWIN_RANDR_TRUE='#' + XWIN_RANDR_FALSE= +fi + + if test "x$XWIN" = xyes && test "x$XV" = xyes; then + XWIN_XV_TRUE= + XWIN_XV_FALSE='#' +else + XWIN_XV_TRUE='#' + XWIN_XV_FALSE= +fi + + +if test "x$XQUARTZ" = xyes; then + +$as_echo "#define XQUARTZ 1" >>confdefs.h + + +$as_echo "#define ROOTLESS 1" >>confdefs.h + + + XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xp_init in -lXplugin" >&5 +$as_echo_n "checking for xp_init in -lXplugin... " >&6; } +if ${ac_cv_lib_Xplugin_xp_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXplugin $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xp_init (); +int +main () +{ +return xp_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xplugin_xp_init=yes +else + ac_cv_lib_Xplugin_xp_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xplugin_xp_init" >&5 +$as_echo "$ac_cv_lib_Xplugin_xp_init" >&6; } +if test "x$ac_cv_lib_Xplugin_xp_init" = xyes; then : + : +fi + + + CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XPBPROXY" >&5 +$as_echo_n "checking for XPBPROXY... " >&6; } + +if test -n "$XPBPROXY_CFLAGS"; then + pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XPBPROXY_LIBS"; then + pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1` + else + XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XPBPROXY_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($APPLEWMPROTO $LIBAPPLEWM xfixes x11) were not met: + +$XPBPROXY_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XPBPROXY_CFLAGS +and XPBPROXY_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XPBPROXY_CFLAGS +and XPBPROXY_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XPBPROXY_CFLAGS=$pkg_cv_XPBPROXY_CFLAGS + XPBPROXY_LIBS=$pkg_cv_XPBPROXY_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + if test "x$XQUARTZ_SPARKLE" = xyes ; then + +$as_echo "#define XQUARTZ_SPARKLE 1" >>confdefs.h + + fi + + if test "x$STANDALONE_XPBPROXY" = xyes ; then + +$as_echo "#define STANDALONE_XPBPROXY 1" >>confdefs.h + + fi +fi + +# Support for objc in autotools is minimal and not documented. +OBJC='$(CC)' +OBJCLD='$(CCLD)' +OBJCLINK='$(LINK)' +OBJCFLAGS='$(CFLAGS)' + + + + +# internal, undocumented automake func follows :( + +depcc="$OBJC" am_compiler_list='gcc3 gcc' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_OBJC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_OBJC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_OBJC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_OBJC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_OBJC_dependencies_compiler_type" >&6; } +OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then + am__fastdepOBJC_TRUE= + am__fastdepOBJC_FALSE='#' +else + am__fastdepOBJC_TRUE='#' + am__fastdepOBJC_FALSE= +fi + + + if test "x$XQUARTZ" = xyes; then + XQUARTZ_TRUE= + XQUARTZ_FALSE='#' +else + XQUARTZ_TRUE='#' + XQUARTZ_FALSE= +fi + + if test "x$XQUARTZ_SPARKLE" != "xno"; then + XQUARTZ_SPARKLE_TRUE= + XQUARTZ_SPARKLE_FALSE='#' +else + XQUARTZ_SPARKLE_TRUE='#' + XQUARTZ_SPARKLE_FALSE= +fi + + if test "x$STANDALONE_XPBPROXY" = xyes; then + STANDALONE_XPBPROXY_TRUE= + STANDALONE_XPBPROXY_FALSE='#' +else + STANDALONE_XPBPROXY_TRUE='#' + STANDALONE_XPBPROXY_FALSE= +fi + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXMODULES" >&5 +$as_echo_n "checking for DMXMODULES... " >&6; } + +if test -n "$DMXMODULES_CFLAGS"; then + pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 >= 1.6 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DMXMODULES_LIBS"; then + pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 >= 1.6 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1` + else + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXMODULES_PKG_ERRORS" >&5 + + have_dmx=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_dmx=no +else + DMXMODULES_CFLAGS=$pkg_cv_DMXMODULES_CFLAGS + DMXMODULES_LIBS=$pkg_cv_DMXMODULES_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDMXCONFIG_DEP" >&5 +$as_echo_n "checking for XDMXCONFIG_DEP... " >&6; } + +if test -n "$XDMXCONFIG_DEP_CFLAGS"; then + pkg_cv_XDMXCONFIG_DEP_CFLAGS="$XDMXCONFIG_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XDMXCONFIG_DEP_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt xpm x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XDMXCONFIG_DEP_LIBS"; then + pkg_cv_XDMXCONFIG_DEP_LIBS="$XDMXCONFIG_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XDMXCONFIG_DEP_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt xpm x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu xt xpm x11" 2>&1` + else + XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu xt xpm x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XDMXCONFIG_DEP_PKG_ERRORS" >&5 + + have_dmx=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_dmx=no +else + XDMXCONFIG_DEP_CFLAGS=$pkg_cv_XDMXCONFIG_DEP_CFLAGS + XDMXCONFIG_DEP_LIBS=$pkg_cv_XDMXCONFIG_DEP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_dmx=yes +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Xdmx DDX" >&5 +$as_echo_n "checking whether to build Xdmx DDX... " >&6; } +if test "x$DMX" = xauto; then + DMX="$have_dmx" + case $host_os in + cygwin*) DMX="no" ;; + mingw*) DMX="no" ;; + darwin*) DMX="no" ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DMX" >&5 +$as_echo "$DMX" >&6; } + if test "x$DMX" = xyes; then + DMX_TRUE= + DMX_FALSE='#' +else + DMX_TRUE='#' + DMX_FALSE= +fi + + +if test "x$DMX" = xyes; then + if test "x$have_dmx" = xno; then + as_fn_error $? "Xdmx build explicitly requested, but required + modules not found." "$LINENO" 5 + fi + DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC" + XDMX_CFLAGS="$DMXMODULES_CFLAGS" + XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB" + XDMX_SYS_LIBS="$DMXMODULES_LIBS" + + + + + ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_input_h" = xyes; then : + DMX_BUILD_USB="yes" +else + DMX_BUILD_USB="no" +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "linux/keyboard.h" "ac_cv_header_linux_keyboard_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_keyboard_h" = xyes; then : + DMX_BUILD_LNX="yes" +else + DMX_BUILD_LNX="no" +fi + + + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXEXAMPLES_DEP" >&5 +$as_echo_n "checking for DMXEXAMPLES_DEP... " >&6; } + +if test -n "$DMXEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXEXAMPLES_DEP_CFLAGS="$DMXEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBDMX $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DMXEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXEXAMPLES_DEP_LIBS="$DMXEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBDMX $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBDMX $LIBXEXT x11" 2>&1` + else + DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBDMX $LIBXEXT x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXEXAMPLES_DEP_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBDMX $LIBXEXT x11) were not met: + +$DMXEXAMPLES_DEP_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 DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXEXAMPLES_DEP_CFLAGS +and DMXEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + DMXEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXEXAMPLES_DEP_CFLAGS + DMXEXAMPLES_DEP_LIBS=$pkg_cv_DMXEXAMPLES_DEP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXXMUEXAMPLES_DEP" >&5 +$as_echo_n "checking for DMXXMUEXAMPLES_DEP... " >&6; } + +if test -n "$DMXXMUEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS="$DMXXMUEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX xmu \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDMX xmu $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBDMX xmu $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DMXXMUEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXXMUEXAMPLES_DEP_LIBS="$DMXXMUEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX xmu \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDMX xmu $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXXMUEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBDMX xmu $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBDMX xmu $LIBXEXT x11" 2>&1` + else + DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBDMX xmu $LIBXEXT x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXXMUEXAMPLES_DEP_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBDMX xmu $LIBXEXT x11) were not met: + +$DMXXMUEXAMPLES_DEP_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 DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXMUEXAMPLES_DEP_CFLAGS +and DMXXMUEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + DMXXMUEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS + DMXXMUEXAMPLES_DEP_LIBS=$pkg_cv_DMXXMUEXAMPLES_DEP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXXIEXAMPLES_DEP" >&5 +$as_echo_n "checking for DMXXIEXAMPLES_DEP... " >&6; } + +if test -n "$DMXXIEXAMPLES_DEP_CFLAGS"; then + pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS="$DMXXIEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXI \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXI $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBDMX $LIBXI $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DMXXIEXAMPLES_DEP_LIBS"; then + pkg_cv_DMXXIEXAMPLES_DEP_LIBS="$DMXXIEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDMX \$LIBXI \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDMX $LIBXI $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DMXXIEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBDMX $LIBXI $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBDMX $LIBXI $LIBXEXT x11" 2>&1` + else + DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBDMX $LIBXI $LIBXEXT x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXXIEXAMPLES_DEP_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBDMX $LIBXI $LIBXEXT x11) were not met: + +$DMXXIEXAMPLES_DEP_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 DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DMXXIEXAMPLES_DEP_CFLAGS +and DMXXIEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + DMXXIEXAMPLES_DEP_CFLAGS=$pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS + DMXXIEXAMPLES_DEP_LIBS=$pkg_cv_DMXXIEXAMPLES_DEP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XTSTEXAMPLES_DEP" >&5 +$as_echo_n "checking for XTSTEXAMPLES_DEP... " >&6; } + +if test -n "$XTSTEXAMPLES_DEP_CFLAGS"; then + pkg_cv_XTSTEXAMPLES_DEP_CFLAGS="$XTSTEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXTST \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXTST $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XTSTEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBXTST $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XTSTEXAMPLES_DEP_LIBS"; then + pkg_cv_XTSTEXAMPLES_DEP_LIBS="$XTSTEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXTST \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXTST $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XTSTEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBXTST $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBXTST $LIBXEXT x11" 2>&1` + else + XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBXTST $LIBXEXT x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XTSTEXAMPLES_DEP_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBXTST $LIBXEXT x11) were not met: + +$XTSTEXAMPLES_DEP_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 XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XTSTEXAMPLES_DEP_CFLAGS +and XTSTEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XTSTEXAMPLES_DEP_CFLAGS=$pkg_cv_XTSTEXAMPLES_DEP_CFLAGS + XTSTEXAMPLES_DEP_LIBS=$pkg_cv_XTSTEXAMPLES_DEP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRESEXAMPLES_DEP" >&5 +$as_echo_n "checking for XRESEXAMPLES_DEP... " >&6; } + +if test -n "$XRESEXAMPLES_DEP_CFLAGS"; then + pkg_cv_XRESEXAMPLES_DEP_CFLAGS="$XRESEXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xres \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xres $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XRESEXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "xres $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XRESEXAMPLES_DEP_LIBS"; then + pkg_cv_XRESEXAMPLES_DEP_LIBS="$XRESEXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xres \$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xres $LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XRESEXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "xres $LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xres $LIBXEXT x11" 2>&1` + else + XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xres $LIBXEXT x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XRESEXAMPLES_DEP_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (xres $LIBXEXT x11) were not met: + +$XRESEXAMPLES_DEP_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 XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XRESEXAMPLES_DEP_CFLAGS +and XRESEXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XRESEXAMPLES_DEP_CFLAGS=$pkg_cv_XRESEXAMPLES_DEP_CFLAGS + XRESEXAMPLES_DEP_LIBS=$pkg_cv_XRESEXAMPLES_DEP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11EXAMPLES_DEP" >&5 +$as_echo_n "checking for X11EXAMPLES_DEP... " >&6; } + +if test -n "$X11EXAMPLES_DEP_CFLAGS"; then + pkg_cv_X11EXAMPLES_DEP_CFLAGS="$X11EXAMPLES_DEP_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_X11EXAMPLES_DEP_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$X11EXAMPLES_DEP_LIBS"; then + pkg_cv_X11EXAMPLES_DEP_LIBS="$X11EXAMPLES_DEP_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_X11EXAMPLES_DEP_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$LIBXEXT x11" 2>&1` + else + X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "$LIBXEXT x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$X11EXAMPLES_DEP_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($LIBXEXT x11) were not met: + +$X11EXAMPLES_DEP_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 X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables X11EXAMPLES_DEP_CFLAGS +and X11EXAMPLES_DEP_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + X11EXAMPLES_DEP_CFLAGS=$pkg_cv_X11EXAMPLES_DEP_CFLAGS + X11EXAMPLES_DEP_LIBS=$pkg_cv_X11EXAMPLES_DEP_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +fi + if test "x$DMX_BUILD_LNX" = xyes; then + DMX_BUILD_LNX_TRUE= + DMX_BUILD_LNX_FALSE='#' +else + DMX_BUILD_LNX_TRUE='#' + DMX_BUILD_LNX_FALSE= +fi + + if test "x$DMX_BUILD_USB" = xyes; then + DMX_BUILD_USB_TRUE= + DMX_BUILD_USB_FALSE='#' +else + DMX_BUILD_USB_TRUE='#' + DMX_BUILD_USB_FALSE= +fi + + + +XEPHYR_LIBS= +XEPHYR_INCS= + + if test x$KDRIVE = xyes; then + KDRIVE_TRUE= + KDRIVE_FALSE='#' +else + KDRIVE_TRUE='#' + KDRIVE_FALSE= +fi + + +if test "$KDRIVE" = yes; then + +$as_echo "#define KDRIVESERVER 1" >>confdefs.h + + +$as_echo "#define KDRIVEDDXACTIONS /**/" >>confdefs.h + + + for ac_header in linux/fb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/fb.h" "ac_cv_header_linux_fb_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_fb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_FB_H 1 +_ACEOF + +fi + +done + + if test "$ac_cv_header_linux_fb_h" = yes && test "x$XFBDEV" = xauto; then + XFBDEV=yes + fi + + if test "x$XFBDEV" = xyes; then + KDRIVEFBDEVLIB=yes + +$as_echo "#define KDRIVEFBDEV 1" >>confdefs.h + + fi + + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 +$as_echo_n "checking for TSLIB... " >&6; } + +if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-0.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-0.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-0.0" 2>&1` + else + TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-0.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$TSLIB_PKG_ERRORS" >&5 + + HAVE_TSLIB="no" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_TSLIB="no" +else + TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS + TSLIB_LIBS=$pkg_cv_TSLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_TSLIB="yes" +fi + if test "x$HAVE_TSLIB" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ts_open in -lts" >&5 +$as_echo_n "checking for ts_open in -lts... " >&6; } +if ${ac_cv_lib_ts_ts_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lts $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ts_open (); +int +main () +{ +return ts_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ts_ts_open=yes +else + ac_cv_lib_ts_ts_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ts_ts_open" >&5 +$as_echo "$ac_cv_lib_ts_ts_open" >&6; } +if test "x$ac_cv_lib_ts_ts_open" = xyes; then : + + HAVE_TSLIB="yes" + TSLIB_LIBS="-lts" + +fi + + fi + + if test "xTSLIB" = xauto; then + TSLIB="$HAVE_TSLIB" + fi + + if test "x$TSLIB" = xyes; then + if ! test "x$HAVE_TSLIB" = xyes; then + as_fn_error $? "tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" "$LINENO" 5 + else + +$as_echo "#define TSLIB 1" >>confdefs.h + + fi + fi + + if test "x$KDRIVE_KBD" = xyes; then + +$as_echo "#define KDRIVE_KBD 1" >>confdefs.h + + fi + if test "x$KDRIVE_EVDEV" = xyes; then + +$as_echo "#define KDRIVE_EVDEV 1" >>confdefs.h + + fi + if test "x$KDRIVE_MOUSE" = xyes; then + +$as_echo "#define KDRIVE_MOUSE 1" >>confdefs.h + + fi + + XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms" + if test "x$XV" = xyes; then + XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv" + fi + if test "x$DRI" = xyes && test "x$GLX" = xyes; then + XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS libdrm xcb-glx xcb-xf86dri > 1.6" + fi + + if test "x$XEPHYR" = xauto; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEPHYR" >&5 +$as_echo_n "checking for XEPHYR... " >&6; } + +if test -n "$XEPHYR_CFLAGS"; then + pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XEPHYR_LIBS"; then + pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` + else + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XEPHYR_PKG_ERRORS" >&5 + + XEPHYR="no" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + XEPHYR="no" +else + XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS + XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + XEPHYR="yes" +fi + elif test "x$XEPHYR" = xyes ; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEPHYR" >&5 +$as_echo_n "checking for XEPHYR... " >&6; } + +if test -n "$XEPHYR_CFLAGS"; then + pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$XEPHYR_LIBS"; then + pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` + else + XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XEPHYR_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ($XEPHYR_REQUIRED_LIBS) were not met: + +$XEPHYR_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XEPHYR_CFLAGS +and XEPHYR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XEPHYR_CFLAGS +and XEPHYR_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } + +else + XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS + XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + fi + + # Xephyr needs nanosleep() which is in librt on Solaris + ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" +if test "x$ac_cv_func_nanosleep" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 +$as_echo_n "checking for nanosleep in -lrt... " >&6; } +if ${ac_cv_lib_rt_nanosleep+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); +int +main () +{ +return nanosleep (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_nanosleep=yes +else + ac_cv_lib_rt_nanosleep=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 +$as_echo "$ac_cv_lib_rt_nanosleep" >&6; } +if test "x$ac_cv_lib_rt_nanosleep" = xyes; then : + XEPHYR_LIBS="$XEPHYR_LIBS -lrt" +fi + +fi + + + # damage shadow extension glx (NOTYET) fb mi + KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' + KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" + KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' + KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" + + KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" + + KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB" + KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la' + case $host_os in + *linux*) + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la' + KDRIVELINUX=yes + if test "x$KDRIVE_EVDEV" = xauto; then + KDRIVE_EVDEV=yes + fi + if test "x$KDRIVE_KBD" = xauto; then + KDRIVE_KBD=yes + fi + if test "x$KDRIVE_MOUSE" = xauto; then + KDRIVE_MOUSE=yes + fi + ;; + *) + if test "x$KDRIVE_EVDEV" = xauto; then + KDRIVE_EVDEV=no + fi + if test "x$KDRIVE_KBD" = xauto; then + KDRIVE_KBD=no + fi + if test "x$KDRIVE_MOUSE" = xauto; then + KDRIVE_MOUSE=no + fi + ;; + esac + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la' + 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" + KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS $TSLIB_LIBS" + + + +fi + + + + + + + if test "x$KDRIVELINUX" = xyes; then + KDRIVELINUX_TRUE= + KDRIVELINUX_FALSE='#' +else + KDRIVELINUX_TRUE='#' + KDRIVELINUX_FALSE= +fi + + if test "x$KDRIVE_EVDEV" = xyes; then + KDRIVE_EVDEV_TRUE= + KDRIVE_EVDEV_FALSE='#' +else + KDRIVE_EVDEV_TRUE='#' + KDRIVE_EVDEV_FALSE= +fi + + if test "x$KDRIVE_KBD" = xyes; then + KDRIVE_KBD_TRUE= + KDRIVE_KBD_FALSE='#' +else + KDRIVE_KBD_TRUE='#' + KDRIVE_KBD_FALSE= +fi + + if test "x$KDRIVE_MOUSE" = xyes; then + KDRIVE_MOUSE_TRUE= + KDRIVE_MOUSE_FALSE='#' +else + KDRIVE_MOUSE_TRUE='#' + KDRIVE_MOUSE_FALSE= +fi + + if test "x$HAVE_TSLIB" = xyes; then + TSLIB_TRUE= + TSLIB_FALSE='#' +else + TSLIB_TRUE='#' + TSLIB_FALSE= +fi + + if test "x$XFBDEV" = xyes; then + KDRIVEFBDEV_TRUE= + KDRIVEFBDEV_FALSE='#' +else + KDRIVEFBDEV_TRUE='#' + KDRIVEFBDEV_FALSE= +fi + + if test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes; then + XEPHYR_TRUE= + XEPHYR_FALSE='#' +else + XEPHYR_TRUE='#' + XEPHYR_FALSE= +fi + + if test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes; then + BUILD_KDRIVEFBDEVLIB_TRUE= + BUILD_KDRIVEFBDEVLIB_FALSE='#' +else + BUILD_KDRIVEFBDEVLIB_TRUE='#' + BUILD_KDRIVEFBDEVLIB_FALSE= +fi + + if test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes; then + XFAKESERVER_TRUE= + XFAKESERVER_FALSE='#' +else + XFAKESERVER_TRUE='#' + XFAKESERVER_FALSE= +fi + + + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <features.h> +#ifndef __GLIBC__ +#error not glibc +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define _GNU_SOURCE 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix + eval ac_define_dir="\"$prefix\"" + eval ac_define_dir="\"$ac_define_dir\"" + PROJECTROOT="$ac_define_dir" + + +cat >>confdefs.h <<_ACEOF +#define PROJECTROOT "$ac_define_dir" +_ACEOF + + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE + + + +BUILD_DATE="`date +'%Y%m%d'`" + +BUILD_TIME="`date +'1%H%M%S'`" + + +DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" + + + + + + + +ac_config_commands="$ac_config_commands sdksyms" + + +if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + *********************************************** + Neither HAL nor udev backend will be enabled. + Input device hotplugging will not be available! + ***********************************************" >&5 +$as_echo "$as_me: WARNING: + *********************************************** + Neither HAL nor udev backend will be enabled. + Input device hotplugging will not be available! + ***********************************************" >&2;} +fi + +ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/config/man/Makefile hw/dmx/doc/Makefile hw/dmx/doxygen/doxygen.conf hw/dmx/doxygen/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/dmx/man/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/src/Makefile test/Makefile test/xi2/Makefile xserver.ent xorg-server.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_DOT_TRUE}" && test -z "${HAVE_DOT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DOT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_STYLESHEETS_TRUE}" && test -z "${HAVE_STYLESHEETS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_STYLESHEETS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_DOCS_TRUE}" && test -z "${ENABLE_DOCS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_DEVEL_DOCS_TRUE}" && test -z "${ENABLE_DEVEL_DOCS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_DEVEL_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_XMLTO_TEXT_TRUE}" && test -z "${HAVE_XMLTO_TEXT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_XMLTO_TEXT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then + as_fn_error $? "conditional \"HAVE_XMLTO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_FOP_TRUE}" && test -z "${HAVE_FOP_FALSE}"; then + as_fn_error $? "conditional \"HAVE_FOP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_XSLTPROC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_UNIT_TESTS_TRUE}" && test -z "${ENABLE_UNIT_TESTS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_UNIT_TESTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LD_WRAP_TRUE}" && test -z "${HAVE_LD_WRAP_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LD_WRAP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XSERVER_DTRACE_TRUE}" && test -z "${XSERVER_DTRACE_FALSE}"; then + as_fn_error $? "conditional \"XSERVER_DTRACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SPECIAL_DTRACE_OBJECTS_TRUE}" && test -z "${SPECIAL_DTRACE_OBJECTS_FALSE}"; then + as_fn_error $? "conditional \"SPECIAL_DTRACE_OBJECTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${AGP_TRUE}" && test -z "${AGP_FALSE}"; then + as_fn_error $? "conditional \"AGP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FBDEVHW_TRUE}" && test -z "${FBDEVHW_FALSE}"; then + as_fn_error $? "conditional \"FBDEVHW\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FREEBSD_KLDLOAD_TRUE}" && test -z "${FREEBSD_KLDLOAD_FALSE}"; then + as_fn_error $? "conditional \"FREEBSD_KLDLOAD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BSD_APM_TRUE}" && test -z "${BSD_APM_FALSE}"; then + as_fn_error $? "conditional \"BSD_APM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BSD_KQUEUE_APM_TRUE}" && test -z "${BSD_KQUEUE_APM_FALSE}"; then + as_fn_error $? "conditional \"BSD_KQUEUE_APM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ALPHA_VIDEO_TRUE}" && test -z "${ALPHA_VIDEO_FALSE}"; then + as_fn_error $? "conditional \"ALPHA_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ARM_VIDEO_TRUE}" && test -z "${ARM_VIDEO_FALSE}"; then + as_fn_error $? "conditional \"ARM_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${I386_VIDEO_TRUE}" && test -z "${I386_VIDEO_FALSE}"; then + as_fn_error $? "conditional \"I386_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PPC_VIDEO_TRUE}" && test -z "${PPC_VIDEO_FALSE}"; then + as_fn_error $? "conditional \"PPC_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SPARC64_VIDEO_TRUE}" && test -z "${SPARC64_VIDEO_FALSE}"; then + as_fn_error $? "conditional \"SPARC64_VIDEO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INSTALL_SETUID_TRUE}" && test -z "${INSTALL_SETUID_FALSE}"; then + as_fn_error $? "conditional \"INSTALL_SETUID\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SECURE_RPC_TRUE}" && test -z "${SECURE_RPC_FALSE}"; then + as_fn_error $? "conditional \"SECURE_RPC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INT10_VM86_TRUE}" && test -z "${INT10_VM86_FALSE}"; then + as_fn_error $? "conditional \"INT10_VM86\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INT10_X86EMU_TRUE}" && test -z "${INT10_X86EMU_FALSE}"; then + as_fn_error $? "conditional \"INT10_X86EMU\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INT10_STUB_TRUE}" && test -z "${INT10_STUB_FALSE}"; then + as_fn_error $? "conditional \"INT10_STUB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INSTALL_LIBXF86CONFIG_TRUE}" && test -z "${INSTALL_LIBXF86CONFIG_FALSE}"; then + as_fn_error $? "conditional \"INSTALL_LIBXF86CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CONFIG_UDEV_TRUE}" && test -z "${CONFIG_UDEV_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_UDEV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CONFIG_UDEV_KMS_TRUE}" && test -z "${CONFIG_UDEV_KMS_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_UDEV_KMS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_DBUS_TRUE}" && test -z "${HAVE_DBUS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CONFIG_DBUS_API_TRUE}" && test -z "${CONFIG_DBUS_API_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_DBUS_API\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CONFIG_HAL_TRUE}" && test -z "${CONFIG_HAL_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_HAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CONFIG_NEED_DBUS_TRUE}" && test -z "${CONFIG_NEED_DBUS_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_NEED_DBUS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CONFIG_WSCONS_TRUE}" && test -z "${CONFIG_WSCONS_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_WSCONS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XV_TRUE}" && test -z "${XV_FALSE}"; then + as_fn_error $? "conditional \"XV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XVMC_TRUE}" && test -z "${XVMC_FALSE}"; then + as_fn_error $? "conditional \"XVMC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XREGISTRY_TRUE}" && test -z "${XREGISTRY_FALSE}"; then + as_fn_error $? "conditional \"XREGISTRY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${COMPOSITE_TRUE}" && test -z "${COMPOSITE_FALSE}"; then + as_fn_error $? "conditional \"COMPOSITE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MITSHM_TRUE}" && test -z "${MITSHM_FALSE}"; then + as_fn_error $? "conditional \"MITSHM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${RECORD_TRUE}" && test -z "${RECORD_FALSE}"; then + as_fn_error $? "conditional \"RECORD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SCREENSAVER_TRUE}" && test -z "${SCREENSAVER_FALSE}"; then + as_fn_error $? "conditional \"SCREENSAVER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${RES_TRUE}" && test -z "${RES_FALSE}"; then + as_fn_error $? "conditional \"RES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CLIENTIDS_TRUE}" && test -z "${CLIENTIDS_FALSE}"; then + as_fn_error $? "conditional \"CLIENTIDS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DRI_TRUE}" && test -z "${DRI_FALSE}"; then + as_fn_error $? "conditional \"DRI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DRI2_TRUE}" && test -z "${DRI2_FALSE}"; then + as_fn_error $? "conditional \"DRI2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUSFAULT_TRUE}" && test -z "${BUSFAULT_FALSE}"; then + as_fn_error $? "conditional \"BUSFAULT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XSHMFENCE_TRUE}" && test -z "${XSHMFENCE_FALSE}"; then + as_fn_error $? "conditional \"XSHMFENCE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DRI3_TRUE}" && test -z "${DRI3_FALSE}"; then + as_fn_error $? "conditional \"DRI3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DRI2_AIGLX_TRUE}" && test -z "${DRI2_AIGLX_FALSE}"; then + as_fn_error $? "conditional \"DRI2_AIGLX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GLX_TRUE}" && test -z "${GLX_FALSE}"; then + as_fn_error $? "conditional \"GLX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AIGLX_DRI_LOADER_TRUE}" && test -z "${AIGLX_DRI_LOADER_FALSE}"; then + as_fn_error $? "conditional \"AIGLX_DRI_LOADER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PRESENT_TRUE}" && test -z "${PRESENT_FALSE}"; then + as_fn_error $? "conditional \"PRESENT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XINERAMA_TRUE}" && test -z "${XINERAMA_FALSE}"; then + as_fn_error $? "conditional \"XINERAMA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XACE_TRUE}" && test -z "${XACE_FALSE}"; then + as_fn_error $? "conditional \"XACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XSELINUX_TRUE}" && test -z "${XSELINUX_FALSE}"; then + as_fn_error $? "conditional \"XSELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XCSECURITY_TRUE}" && test -z "${XCSECURITY_FALSE}"; then + as_fn_error $? "conditional \"XCSECURITY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBE_TRUE}" && test -z "${DBE_FALSE}"; then + as_fn_error $? "conditional \"DBE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XF86BIGFONT_TRUE}" && test -z "${XF86BIGFONT_FALSE}"; then + as_fn_error $? "conditional \"XF86BIGFONT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DPMSExtension_TRUE}" && test -z "${DPMSExtension_FALSE}"; then + as_fn_error $? "conditional \"DPMSExtension\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XF86UTILS_TRUE}" && test -z "${XF86UTILS_FALSE}"; then + as_fn_error $? "conditional \"XF86UTILS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${VGAHW_TRUE}" && test -z "${VGAHW_FALSE}"; then + as_fn_error $? "conditional \"VGAHW\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${VBE_TRUE}" && test -z "${VBE_FALSE}"; then + as_fn_error $? "conditional \"VBE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INT10MODULE_TRUE}" && test -z "${INT10MODULE_FALSE}"; then + as_fn_error $? "conditional \"INT10MODULE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XDMCP_TRUE}" && test -z "${XDMCP_FALSE}"; then + as_fn_error $? "conditional \"XDMCP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XDMAUTH_TRUE}" && test -z "${XDMAUTH_FALSE}"; then + as_fn_error $? "conditional \"XDMAUTH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then + as_fn_error $? "conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LIBUNWIND_TRUE}" && test -z "${HAVE_LIBUNWIND_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBUNWIND\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CYGWIN_TRUE}" && test -z "${CYGWIN_FALSE}"; then + as_fn_error $? "conditional \"CYGWIN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${NO_UNDEFINED_TRUE}" && test -z "${NO_UNDEFINED_FALSE}"; then + as_fn_error $? "conditional \"NO_UNDEFINED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XVFB_TRUE}" && test -z "${XVFB_FALSE}"; then + as_fn_error $? "conditional \"XVFB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XNEST_TRUE}" && test -z "${XNEST_FALSE}"; then + as_fn_error $? "conditional \"XNEST\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XORG_TRUE}" && test -z "${XORG_FALSE}"; then + as_fn_error $? "conditional \"XORG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XORG_BUS_PCI_TRUE}" && test -z "${XORG_BUS_PCI_FALSE}"; then + as_fn_error $? "conditional \"XORG_BUS_PCI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XORG_BUS_BSDPCI_TRUE}" && test -z "${XORG_BUS_BSDPCI_FALSE}"; then + as_fn_error $? "conditional \"XORG_BUS_BSDPCI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XORG_BUS_SPARC_TRUE}" && test -z "${XORG_BUS_SPARC_FALSE}"; then + as_fn_error $? "conditional \"XORG_BUS_SPARC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LINUX_ALPHA_TRUE}" && test -z "${LINUX_ALPHA_FALSE}"; then + as_fn_error $? "conditional \"LINUX_ALPHA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LNXACPI_TRUE}" && test -z "${LNXACPI_FALSE}"; then + as_fn_error $? "conditional \"LNXACPI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LNXAPM_TRUE}" && test -z "${LNXAPM_FALSE}"; then + as_fn_error $? "conditional \"LNXAPM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SOLARIS_VT_TRUE}" && test -z "${SOLARIS_VT_FALSE}"; then + as_fn_error $? "conditional \"SOLARIS_VT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DGA_TRUE}" && test -z "${DGA_FALSE}"; then + as_fn_error $? "conditional \"DGA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XF86VIDMODE_TRUE}" && test -z "${XF86VIDMODE_FALSE}"; then + as_fn_error $? "conditional \"XF86VIDMODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XORG_BUS_PLATFORM_TRUE}" && test -z "${XORG_BUS_PLATFORM_FALSE}"; then + as_fn_error $? "conditional \"XORG_BUS_PLATFORM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_TRUE}" && test -z "${XWIN_FALSE}"; then + as_fn_error $? "conditional \"XWIN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_MULTIWINDOW_TRUE}" && test -z "${XWIN_MULTIWINDOW_FALSE}"; then + as_fn_error $? "conditional \"XWIN_MULTIWINDOW\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_MULTIWINDOWEXTWM_TRUE}" && test -z "${XWIN_MULTIWINDOWEXTWM_FALSE}"; then + as_fn_error $? "conditional \"XWIN_MULTIWINDOWEXTWM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_CLIPBOARD_TRUE}" && test -z "${XWIN_CLIPBOARD_FALSE}"; then + as_fn_error $? "conditional \"XWIN_CLIPBOARD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_GLX_WINDOWS_TRUE}" && test -z "${XWIN_GLX_WINDOWS_FALSE}"; then + as_fn_error $? "conditional \"XWIN_GLX_WINDOWS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_NATIVEGDI_TRUE}" && test -z "${XWIN_NATIVEGDI_FALSE}"; then + as_fn_error $? "conditional \"XWIN_NATIVEGDI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_PRIMARYFB_TRUE}" && test -z "${XWIN_PRIMARYFB_FALSE}"; then + as_fn_error $? "conditional \"XWIN_PRIMARYFB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_RANDR_TRUE}" && test -z "${XWIN_RANDR_FALSE}"; then + as_fn_error $? "conditional \"XWIN_RANDR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XWIN_XV_TRUE}" && test -z "${XWIN_XV_FALSE}"; then + as_fn_error $? "conditional \"XWIN_XV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XQUARTZ_TRUE}" && test -z "${XQUARTZ_FALSE}"; then + as_fn_error $? "conditional \"XQUARTZ\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XQUARTZ_SPARKLE_TRUE}" && test -z "${XQUARTZ_SPARKLE_FALSE}"; then + as_fn_error $? "conditional \"XQUARTZ_SPARKLE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${STANDALONE_XPBPROXY_TRUE}" && test -z "${STANDALONE_XPBPROXY_FALSE}"; then + as_fn_error $? "conditional \"STANDALONE_XPBPROXY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DMX_TRUE}" && test -z "${DMX_FALSE}"; then + as_fn_error $? "conditional \"DMX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DMX_BUILD_LNX_TRUE}" && test -z "${DMX_BUILD_LNX_FALSE}"; then + as_fn_error $? "conditional \"DMX_BUILD_LNX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DMX_BUILD_USB_TRUE}" && test -z "${DMX_BUILD_USB_FALSE}"; then + as_fn_error $? "conditional \"DMX_BUILD_USB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${KDRIVE_TRUE}" && test -z "${KDRIVE_FALSE}"; then + as_fn_error $? "conditional \"KDRIVE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${KDRIVELINUX_TRUE}" && test -z "${KDRIVELINUX_FALSE}"; then + as_fn_error $? "conditional \"KDRIVELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${KDRIVE_EVDEV_TRUE}" && test -z "${KDRIVE_EVDEV_FALSE}"; then + as_fn_error $? "conditional \"KDRIVE_EVDEV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${KDRIVE_KBD_TRUE}" && test -z "${KDRIVE_KBD_FALSE}"; then + as_fn_error $? "conditional \"KDRIVE_KBD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${KDRIVE_MOUSE_TRUE}" && test -z "${KDRIVE_MOUSE_FALSE}"; then + as_fn_error $? "conditional \"KDRIVE_MOUSE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${TSLIB_TRUE}" && test -z "${TSLIB_FALSE}"; then + as_fn_error $? "conditional \"TSLIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${KDRIVEFBDEV_TRUE}" && test -z "${KDRIVEFBDEV_FALSE}"; then + as_fn_error $? "conditional \"KDRIVEFBDEV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XEPHYR_TRUE}" && test -z "${XEPHYR_FALSE}"; then + as_fn_error $? "conditional \"XEPHYR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_KDRIVEFBDEVLIB_TRUE}" && test -z "${BUILD_KDRIVEFBDEVLIB_FALSE}"; then + as_fn_error $? "conditional \"BUILD_KDRIVEFBDEVLIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${XFAKESERVER_TRUE}" && test -z "${XFAKESERVER_FALSE}"; then + as_fn_error $? "conditional \"XFAKESERVER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by xorg-server $as_me 1.15.1, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +xorg-server config.status 1.15.1 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "include/do-not-use-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/do-not-use-config.h" ;; + "include/xorg-server.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-server.h" ;; + "include/dix-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dix-config.h" ;; + "include/xorg-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-config.h" ;; + "include/xkb-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xkb-config.h" ;; + "include/xwin-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xwin-config.h" ;; + "include/kdrive-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/kdrive-config.h" ;; + "include/version-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/version-config.h" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "sdksyms") CONFIG_COMMANDS="$CONFIG_COMMANDS sdksyms" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "glx/Makefile") CONFIG_FILES="$CONFIG_FILES glx/Makefile" ;; + "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "composite/Makefile") CONFIG_FILES="$CONFIG_FILES composite/Makefile" ;; + "damageext/Makefile") CONFIG_FILES="$CONFIG_FILES damageext/Makefile" ;; + "dbe/Makefile") CONFIG_FILES="$CONFIG_FILES dbe/Makefile" ;; + "dix/Makefile") CONFIG_FILES="$CONFIG_FILES dix/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/dtrace/Makefile") CONFIG_FILES="$CONFIG_FILES doc/dtrace/Makefile" ;; + "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "fb/Makefile") CONFIG_FILES="$CONFIG_FILES fb/Makefile" ;; + "record/Makefile") CONFIG_FILES="$CONFIG_FILES record/Makefile" ;; + "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; + "mi/Makefile") CONFIG_FILES="$CONFIG_FILES mi/Makefile" ;; + "miext/Makefile") CONFIG_FILES="$CONFIG_FILES miext/Makefile" ;; + "miext/sync/Makefile") CONFIG_FILES="$CONFIG_FILES miext/sync/Makefile" ;; + "miext/damage/Makefile") CONFIG_FILES="$CONFIG_FILES miext/damage/Makefile" ;; + "miext/shadow/Makefile") CONFIG_FILES="$CONFIG_FILES miext/shadow/Makefile" ;; + "miext/rootless/Makefile") CONFIG_FILES="$CONFIG_FILES miext/rootless/Makefile" ;; + "os/Makefile") CONFIG_FILES="$CONFIG_FILES os/Makefile" ;; + "pseudoramiX/Makefile") CONFIG_FILES="$CONFIG_FILES pseudoramiX/Makefile" ;; + "randr/Makefile") CONFIG_FILES="$CONFIG_FILES randr/Makefile" ;; + "render/Makefile") CONFIG_FILES="$CONFIG_FILES render/Makefile" ;; + "xkb/Makefile") CONFIG_FILES="$CONFIG_FILES xkb/Makefile" ;; + "Xext/Makefile") CONFIG_FILES="$CONFIG_FILES Xext/Makefile" ;; + "Xi/Makefile") CONFIG_FILES="$CONFIG_FILES Xi/Makefile" ;; + "xfixes/Makefile") CONFIG_FILES="$CONFIG_FILES xfixes/Makefile" ;; + "exa/Makefile") CONFIG_FILES="$CONFIG_FILES exa/Makefile" ;; + "dri3/Makefile") CONFIG_FILES="$CONFIG_FILES dri3/Makefile" ;; + "present/Makefile") CONFIG_FILES="$CONFIG_FILES present/Makefile" ;; + "hw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/Makefile" ;; + "hw/xfree86/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/Makefile" ;; + "hw/xfree86/common/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/Makefile" ;; + "hw/xfree86/common/xf86Build.h") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/xf86Build.h" ;; + "hw/xfree86/ddc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ddc/Makefile" ;; + "hw/xfree86/dixmods/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dixmods/Makefile" ;; + "hw/xfree86/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/Makefile" ;; + "hw/xfree86/dri/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri/Makefile" ;; + "hw/xfree86/dri2/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri2/Makefile" ;; + "hw/xfree86/exa/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/Makefile" ;; + "hw/xfree86/exa/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/man/Makefile" ;; + "hw/xfree86/fbdevhw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/fbdevhw/Makefile" ;; + "hw/xfree86/fbdevhw/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/fbdevhw/man/Makefile" ;; + "hw/xfree86/i2c/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/i2c/Makefile" ;; + "hw/xfree86/int10/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/int10/Makefile" ;; + "hw/xfree86/loader/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/loader/Makefile" ;; + "hw/xfree86/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/man/Makefile" ;; + "hw/xfree86/modes/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/modes/Makefile" ;; + "hw/xfree86/os-support/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/Makefile" ;; + "hw/xfree86/os-support/bsd/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/bsd/Makefile" ;; + "hw/xfree86/os-support/bus/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/bus/Makefile" ;; + "hw/xfree86/os-support/hurd/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/hurd/Makefile" ;; + "hw/xfree86/os-support/misc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/misc/Makefile" ;; + "hw/xfree86/os-support/linux/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/linux/Makefile" ;; + "hw/xfree86/os-support/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/solaris/Makefile" ;; + "hw/xfree86/os-support/stub/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/stub/Makefile" ;; + "hw/xfree86/parser/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/parser/Makefile" ;; + "hw/xfree86/ramdac/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ramdac/Makefile" ;; + "hw/xfree86/shadowfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/shadowfb/Makefile" ;; + "hw/xfree86/vbe/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/vbe/Makefile" ;; + "hw/xfree86/vgahw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/vgahw/Makefile" ;; + "hw/xfree86/x86emu/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/x86emu/Makefile" ;; + "hw/xfree86/utils/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/Makefile" ;; + "hw/xfree86/utils/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/man/Makefile" ;; + "hw/xfree86/utils/cvt/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/cvt/Makefile" ;; + "hw/xfree86/utils/gtf/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/gtf/Makefile" ;; + "hw/dmx/config/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/config/Makefile" ;; + "hw/dmx/config/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/config/man/Makefile" ;; + "hw/dmx/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/doc/Makefile" ;; + "hw/dmx/doxygen/doxygen.conf") CONFIG_FILES="$CONFIG_FILES hw/dmx/doxygen/doxygen.conf" ;; + "hw/dmx/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/doxygen/Makefile" ;; + "hw/dmx/examples/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/examples/Makefile" ;; + "hw/dmx/input/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/input/Makefile" ;; + "hw/dmx/glxProxy/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/glxProxy/Makefile" ;; + "hw/dmx/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/Makefile" ;; + "hw/dmx/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/man/Makefile" ;; + "hw/vfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/Makefile" ;; + "hw/vfb/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/man/Makefile" ;; + "hw/xnest/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xnest/Makefile" ;; + "hw/xnest/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xnest/man/Makefile" ;; + "hw/xwin/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/Makefile" ;; + "hw/xwin/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/glx/Makefile" ;; + "hw/xwin/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/man/Makefile" ;; + "hw/xquartz/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/Makefile" ;; + "hw/xquartz/GL/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/GL/Makefile" ;; + "hw/xquartz/bundle/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/bundle/Makefile" ;; + "hw/xquartz/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/man/Makefile" ;; + "hw/xquartz/mach-startup/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/mach-startup/Makefile" ;; + "hw/xquartz/pbproxy/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/pbproxy/Makefile" ;; + "hw/xquartz/xpr/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/xpr/Makefile" ;; + "hw/kdrive/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/Makefile" ;; + "hw/kdrive/ephyr/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ephyr/Makefile" ;; + "hw/kdrive/ephyr/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ephyr/man/Makefile" ;; + "hw/kdrive/fake/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/fake/Makefile" ;; + "hw/kdrive/fbdev/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/fbdev/Makefile" ;; + "hw/kdrive/linux/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/linux/Makefile" ;; + "hw/kdrive/src/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/src/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "test/xi2/Makefile") CONFIG_FILES="$CONFIG_FILES test/xi2/Makefile" ;; + "xserver.ent") CONFIG_FILES="$CONFIG_FILES xserver.ent" ;; + "xorg-server.pc") CONFIG_FILES="$CONFIG_FILES xorg-server.pc" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Assembler program. +AS=$lt_AS + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Object dumper program. +OBJDUMP=$lt_OBJDUMP + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + "sdksyms":C) touch hw/xfree86/sdksyms.dep ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..b7b78a4 --- /dev/null +++ b/configure.ac @@ -0,0 +1,2528 @@ +dnl Copyright © 2003-2007 Keith Packard, Daniel Stone +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. +dnl +dnl Authors: Keith Packard <keithp@keithp.com> +dnl Daniel Stone <daniel@fooishbar.org> +dnl an unwitting cast of miscellaneous others +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ(2.60) +AC_INIT([xorg-server], 1.15.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2014-04-13" +RELEASE_NAME="Heart Candy" +AC_CONFIG_SRCDIR([Makefile.am]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AC_USE_SYSTEM_EXTENSIONS + +# Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.14 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.14) +XORG_DEFAULT_OPTIONS +XORG_WITH_DOXYGEN(1.6.1) +XORG_CHECK_SGML_DOCTOOLS(1.8) +XORG_ENABLE_DOCS +XORG_ENABLE_DEVEL_DOCS +XORG_WITH_XMLTO(0.0.20) +XORG_WITH_FOP +XORG_WITH_XSLTPROC +XORG_ENABLE_UNIT_TESTS +XORG_LD_WRAP([optional]) + +m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install font-util 1.1 or later before running autoconf/autogen])]) +XORG_FONT_MACROS_VERSION(1.1) + +dnl this gets generated by autoheader, and thus contains all the defines. we +dnl don't ever actually use it, internally. +AC_CONFIG_HEADERS(include/do-not-use-config.h) +dnl xorg-server.h is an external header, designed to be included by loadable +dnl drivers. +AC_CONFIG_HEADERS(include/xorg-server.h) +dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just +dnl dix/). +AC_CONFIG_HEADERS(include/dix-config.h) +dnl xorg-config.h covers the Xorg DDX. +AC_CONFIG_HEADERS(include/xorg-config.h) +dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs. +AC_CONFIG_HEADERS(include/xkb-config.h) +dnl xwin-config.h covers the XWin DDX. +AC_CONFIG_HEADERS(include/xwin-config.h) +dnl kdrive-config.h covers the kdrive DDX +AC_CONFIG_HEADERS(include/kdrive-config.h) +dnl version-config.h covers the version numbers so they can be bumped without +dnl forcing an entire recompile.x +AC_CONFIG_HEADERS(include/version-config.h) + +AM_PROG_AS +AC_PROG_LN_S +AC_LIBTOOL_WIN32_DLL +AC_DISABLE_STATIC +AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG +AC_PROG_LEX +AC_PROG_YACC +AC_SYS_LARGEFILE +XORG_PROG_RAWCPP + +# Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow +# easier overrides at build time. +XSERVER_CFLAGS='$(CWARNFLAGS)' + +dnl Explicitly add -fno-strict-aliasing since this option should disappear +dnl from util-macros CWARNFLAGS +if test "x$GCC" = xyes ; then + XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing" +fi + +dnl Check for dtrace program (needed to build Xserver dtrace probes) +dnl Also checks for <sys/sdt.h>, since some Linux distros have an +dnl ISDN trace program named dtrace +AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], + [Enable dtrace probes (default: enabled if dtrace found)]), + [WDTRACE=$withval], [WDTRACE=auto]) +if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then + AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin]) + if test "x$DTRACE" = "xnot_found" ; then + if test "x$WDTRACE" = "xyes" ; then + AC_MSG_FAILURE([dtrace requested but not found]) + fi + WDTRACE="no" + else + AC_CHECK_HEADER(sys/sdt.h, [HAS_SDT_H="yes"], [HAS_SDT_H="no"]) + if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then + WDTRACE="no" + fi + fi +fi +if test "x$WDTRACE" != "xno" ; then + AC_DEFINE(XSERVER_DTRACE, 1, + [Define to 1 if the DTrace Xserver provider probes should be built in.]) + +# Solaris/OpenSolaris require dtrace -G to build dtrace probe information into +# object files, and require linking with those as relocatable objects, not .a +# archives. MacOS X handles all this in the normal compiler toolchain, and on +# some releases (like Tiger), will error out on dtrace -G. For now, other +# platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux +# ports appear to, based on my web searches, but have not yet been tested). + case $host_os in + darwin*) SPECIAL_DTRACE_OBJECTS=no ;; + *) SPECIAL_DTRACE_OBJECTS=yes ;; + esac +fi +AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"]) +AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"]) + +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h sys/utsname.h]) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_TYPEOF +AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"]) + +AC_CHECK_SIZEOF([unsigned long]) +if test "$ac_cv_sizeof_unsigned_long" = 8; then + AC_DEFINE(_XSERVER64, 1, [Define to 1 if unsigned long is 64 bits.]) +fi + +AC_TYPE_PID_T + +# Checks for headers/macros for byte swapping +# Known variants: +# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc) +# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD) +# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's) +# and a fallback to local macros if none of the above are found + +# if <byteswap.h> is found, assume it's the correct version +AC_CHECK_HEADERS([byteswap.h]) + +# if <sys/endian.h> is found, have to check which version +AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"]) + +if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then + AC_MSG_CHECKING([for __swap16 variant of <sys/endian.h> byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include <sys/types.h> +#include <sys/endian.h> + ], [ +int a = 1, b; +b = __swap16(a); + ]) +], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no']) + AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) + + AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include <sys/types.h> +#include <sys/endian.h> + ], [ +int a = 1, b; +b = bswap16(a); + ]) +], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no']) + AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) + + if test "$SYS_ENDIAN_BSWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=bswap + else + if test "$SYS_ENDIAN__SWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=__swap + else + USE_SYS_ENDIAN_H=no + fi + fi + + if test "$USE_SYS_ENDIAN_H" = "yes" ; then + AC_DEFINE([USE_SYS_ENDIAN_H], 1, + [Define to use byteswap macros from <sys/endian.h>]) + AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, + [Define to 16-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, + [Define to 32-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, + [Define to 64-bit byteswap macro]) + fi +fi + +dnl Check to see if dlopen is in default libraries (like Solaris, which +dnl has it in libc), or if libdl is needed to get it. +AC_CHECK_FUNC([dlopen], [], + AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) +AC_SUBST(DLOPEN_LIBS) + +dnl Checks for library functions. +AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \ + getdtablesize getifaddrs getpeereid getpeerucred getzoneid \ + mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext]) +AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup]) + +dnl Find the math libary, then check for cbrt function in it. +AC_CHECK_LIB(m, sqrt) +AC_CHECK_FUNCS([cbrt]) + +AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h]) + +dnl AGPGART headers +AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes) +AM_CONDITIONAL(AGP, [test "x$AGP" = xyes]) + +dnl fbdev header +AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes) +AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes]) + +dnl MTRR header +AC_CHECK_HEADERS([asm/mtrr.h], ac_cv_asm_mtrr_h=yes) +if test "x$ac_cv_asm_mtrr_h" = xyes; then + HAVE_MTRR=yes +fi + +dnl BSD MTRR header +AC_CHECK_HEADERS([sys/memrange.h], ac_cv_memrange_h=yes) +if test "x$ac_cv_memrange_h" = xyes; then + HAVE_MTRR=yes +fi + +if test "x$HAVE_MTRR" = xyes; then + AC_DEFINE(HAS_MTRR_SUPPORT, 1, [MTRR support available]) +fi + +dnl A NetBSD MTRR header +AC_CHECK_HEADERS([machine/mtrr.h], ac_cv_machine_mtrr_h=yes) +if test "x$ac_cv_machine_mtrr_h" = xyes; then + AC_DEFINE(HAS_MTRR_BUILTIN, 1, [Define to 1 if NetBSD built-in MTRR + support is available]) +fi + +dnl FreeBSD kldload support (sys/linker.h) +AC_CHECK_HEADERS([sys/linker.h], + [ac_cv_sys_linker_h=yes], + [ac_cv_sys_linker_h=no], + [#include <sys/param.h>]) +AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes]) + +AC_CACHE_CHECK([for SYSV IPC], + ac_cv_sysv_ipc, + [AC_TRY_LINK([ +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <sys/stat.h> +],[ +{ + int id; + id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR); + if (id < 0) return -1; + return shmctl(id, IPC_RMID, 0); +}], + [ac_cv_sysv_ipc=yes], + [ac_cv_sysv_ipc=no])]) +if test "x$ac_cv_sysv_ipc" = xyes; then + AC_DEFINE(HAVE_SYSV_IPC, 1, [Define to 1 if SYSV IPC is available]) +fi + +dnl OpenBSD /dev/xf86 aperture driver +if test -c /dev/xf86 ; then + AC_DEFINE(HAS_APERTURE_DRV, 1, [System has /dev/xf86 aperture driver]) +fi + +dnl BSD APM support +AC_CHECK_HEADER([machine/apmvar.h],[ + AC_CHECK_HEADER([sys/event.h], + ac_cv_BSD_KQUEUE_APM=yes, + ac_cv_BSD_APM=yes)]) + +AM_CONDITIONAL(BSD_APM, [test "x$ac_cv_BSD_APM" = xyes]) +AM_CONDITIONAL(BSD_KQUEUE_APM, [test "x$ac_cv_BSD_KQUEUE_APM" = xyes]) + +dnl glibc backtrace support check +AC_CHECK_HEADER([execinfo.h],[ + AC_CHECK_LIB(c, backtrace, [ + AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support]) + AC_DEFINE(HAVE_EXECINFO_H, 1, [Have execinfo.h]) + ])] +) + +dnl --------------------------------------------------------------------------- +dnl Bus options and CPU capabilities. Replaces logic in +dnl hw/xfree86/os-support/bus/Makefile.am, among others. +dnl --------------------------------------------------------------------------- +DEFAULT_INT10="x86emu" + +dnl Override defaults as needed for specific platforms: + +case $host_cpu in + alpha*) + ALPHA_VIDEO=yes + case $host_os in + *freebsd*) SYS_LIBS=-lio ;; + *netbsd*) AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;; + esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" + ;; + arm*) + ARM_VIDEO=yes + ;; + i*86) + I386_VIDEO=yes + case $host_os in + *freebsd*) AC_DEFINE(USE_DEV_IO) ;; + *dragonfly*) AC_DEFINE(USE_DEV_IO) ;; + *netbsd*) AC_DEFINE(USE_I386_IOPL) + SYS_LIBS=-li386 + ;; + *openbsd*) AC_DEFINE(USE_I386_IOPL) + SYS_LIBS=-li386 + ;; + esac + ;; + powerpc*) + PPC_VIDEO=yes + case $host_os in + *freebsd*) DEFAULT_INT10=stub ;; + esac + ;; + sparc*) + SPARC64_VIDEO=yes + BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + x86_64*|amd64*) + I386_VIDEO=yes + case $host_os in + *freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; + *dragonfly*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; + *netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl]) + SYS_LIBS=-lx86_64 + ;; + *openbsd*) AC_DEFINE(USE_AMD64_IOPL, 1, [BSD AMD64 iopl]) + SYS_LIBS=-lamd64 + ;; + esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + ia64*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + s390*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; +esac +AC_SUBST(GLX_ARCH_DEFINES) + +dnl BSD *_video.c selection +AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes]) +AM_CONDITIONAL(ARM_VIDEO, [test "x$ARM_VIDEO" = xyes]) +AM_CONDITIONAL(I386_VIDEO, [test "x$I386_VIDEO" = xyes]) +AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) +AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) + +DRI=no +USE_SIGIO_BY_DEFAULT="yes" +dnl it would be nice to autodetect these *CONS_SUPPORTs +case $host_os in + *freebsd* | *dragonfly*) + case $host_os in + kfreebsd*-gnu) ;; + *) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; + esac + AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) + AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) + AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console]) + DRI=yes + ;; + *netbsd*) + AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) + AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) + AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) + AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) + DRI=yes + ;; + *openbsd*) + AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) + AC_DEFINE(PCVT_SUPPORT, 1, [System has PC console]) + AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) + ;; + *linux*) + DRI=yes + ;; + *solaris*) + PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no) + # Disable use of SIGIO by default until some system bugs are + # fixed - see Sun/OpenSolaris bug id 6879897 + USE_SIGIO_BY_DEFAULT="no" + ;; + darwin*) + AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) + ;; + cygwin*|mingw*) + CFLAGS="$CFLAGS -DFD_SETSIZE=256" + ;; +esac + +dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the +dnl major number +PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` +PVS=`echo $PACKAGE_VERSION | cut -d . -f 4 | cut -d - -f 1` +if test "x$PVS" = "x"; then + PVS="0" +fi + +VENDOR_RELEASE="((($PVMAJOR) * 10000000) + (($PVM) * 100000) + (($PVP) * 1000) + $PVS)" +VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" + +VENDOR_NAME="The X.Org Foundation" +VENDOR_NAME_SHORT="X.Org" +VENDOR_WEB="http://wiki.x.org" + +m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))]) + +dnl Build options. +AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], + [Obsolete - use --enable-strict-compilation instead]), + AC_MSG_ERROR([--enable-werror has been replaced by --enable-strict-compilation])) + +AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], + [Enable debugging (default: disabled)]), + [DEBUGGING=$enableval], [DEBUGGING=no]) +AC_ARG_ENABLE(use-sigio-by-default, AS_HELP_STRING([--enable-use-sigio-by-default] + [Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT)]), + [USE_SIGIO_BY_DEFAULT=$enableval], []) +AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), + [INT10="$withval"], + [INT10="$DEFAULT_INT10"]) +AC_ARG_WITH(vendor-name, AS_HELP_STRING([--with-vendor-name=VENDOR], + [Vendor string reported by the server]), + [ VENDOR_NAME="$withval" ], []) +AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-name-short=VENDOR], + [Short version of vendor string reported by the server]), + [ VENDOR_NAME_SHORT="$withval" ], []) +AC_ARG_WITH(vendor-web, AS_HELP_STRING([--with-vendor-web=URL], + [Vendor web address reported by the server]), + [ VENDOR_WEB="$withval" ], []) +AC_ARG_WITH(module-dir, AS_HELP_STRING([--with-module-dir=DIR], + [Directory where modules are installed (default: $libdir/xorg/modules)]), + [ moduledir="$withval" ], + [ moduledir="${libdir}/xorg/modules" ]) +AC_ARG_WITH(log-dir, AS_HELP_STRING([--with-log-dir=DIR], + [Directory where log files are kept (default: $localstatedir/log)]), + [ logdir="$withval" ], + [ logdir="$localstatedir/log" ]) +AC_ARG_WITH(builder-addr, AS_HELP_STRING([--with-builder-addr=ADDRESS], + [Builder address (default: xorg@lists.freedesktop.org)]), + [ BUILDERADDR="$withval" ], + [ BUILDERADDR="xorg@lists.freedesktop.org" ]) +AC_ARG_WITH(os-name, AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS (default: output of "uname -srm")]), + [ OSNAME="$withval" ], + [ OSNAME=`uname -srm` ]) +AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]), + [ OSVENDOR="$withval" ], + [ OSVENDOR="" ]) +AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]), + [ BUILDERSTRING="$withval" ] + [ ]) + +dnl Determine font path +XORG_FONTROOTDIR +XORG_FONTSUBDIR(FONTMISCDIR, fontmiscdir, misc) +XORG_FONTSUBDIR(FONTOTFDIR, fontotfdir, OTF) +XORG_FONTSUBDIR(FONTTTFDIR, fontttfdir, TTF) +XORG_FONTSUBDIR(FONTTYPE1DIR, fonttype1dir, Type1) +XORG_FONTSUBDIR(FONT75DPIDIR, font75dpidir, 75dpi) +XORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi) + +dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d, +dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross +dnl compiling, assume default font path uses standard FONTROOTDIR directories. +DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/" +if test "$cross_compiling" != yes; then + AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d], + [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'], + [case $host_os in + darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; + esac]) +fi +AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), + [ FONTPATH="$withval" ], + [ FONTPATH="${DEFAULT_FONT_PATH}" ]) + +AC_MSG_CHECKING([for default font path]) +AC_MSG_RESULT([$FONTPATH]) + +AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]), + [ XKBPATH="$withval" ], + [ XKBPATH="${datadir}/X11/xkb" ]) +AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), + [ XKBOUTPUT="$withval" ], + [ XKBOUTPUT="compiled" ]) +AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES], + [Keyboard ruleset (default: base/evdev)]), + [ XKB_DFLT_RULES="$withval" ], + [ XKB_DFLT_RULES="" ]) +AC_ARG_WITH(default-xkb-model, AS_HELP_STRING([--with-default-xkb-model=MODEL], + [Keyboard model (default: pc105)]), + [ XKB_DFLT_MODEL="$withval" ], + [ XKB_DFLT_MODEL="pc105" ]) +AC_ARG_WITH(default-xkb-layout, AS_HELP_STRING([--with-default-xkb-layout=LAYOUT], + [Keyboard layout (default: us)]), + [ XKB_DFLT_LAYOUT="$withval" ], + [ XKB_DFLT_LAYOUT="us" ]) +AC_ARG_WITH(default-xkb-variant, AS_HELP_STRING([--with-default-xkb-variant=VARIANT], + [Keyboard variant (default: (none))]), + [ XKB_DFLT_VARIANT="$withval" ], + [ XKB_DFLT_VARIANT="" ]) +AC_ARG_WITH(default-xkb-options, AS_HELP_STRING([--with-default-xkb-options=OPTIONS], + [Keyboard layout options (default: (none))]), + [ XKB_DFLT_OPTIONS="$withval" ], + [ XKB_DFLT_OPTIONS="" ]) +AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], + [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]), + [ SERVERCONFIG="$withval" ], + [ SERVERCONFIG="${libdir}/xorg" ]) +AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: /Applications/Utilities)]), + [ APPLE_APPLICATIONS_DIR="${withval}" ], + [ APPLE_APPLICATIONS_DIR="/Applications/Utilities" ]) +AC_SUBST([APPLE_APPLICATIONS_DIR]) +AC_ARG_WITH(apple-application-name,AS_HELP_STRING([--with-apple-application-name=NAME], [Name for the .app (default: X11)]), + [ APPLE_APPLICATION_NAME="${withval}" ], + [ APPLE_APPLICATION_NAME="X11" ]) +AC_SUBST([APPLE_APPLICATION_NAME]) +AC_ARG_WITH(launchd-id-prefix, AS_HELP_STRING([--with-launchd-id-prefix=PATH], [Deprecated: Use --with-bundle-id-prefix.]), + [ BUNDLE_ID_PREFIX="${withval}" ], + [ BUNDLE_ID_PREFIX="org.x" ]) +AC_ARG_WITH(bundle-id-prefix, AS_HELP_STRING([--with-bundle-id-prefix=PATH], [Prefix to use for bundle identifiers (default: org.x)]), + [ BUNDLE_ID_PREFIX="${withval}" ]) +AC_SUBST([BUNDLE_ID_PREFIX]) +AC_DEFINE_UNQUOTED(BUNDLE_ID_PREFIX, "$BUNDLE_ID_PREFIX", [Prefix to use for bundle identifiers]) +AC_ARG_ENABLE(sparkle,AS_HELP_STRING([--enable-sparkle], [Enable updating of X11.app using the Sparkle Framework (default: disabled)]), + [ XQUARTZ_SPARKLE="${enableval}" ], + [ XQUARTZ_SPARKLE="no" ]) +AC_SUBST([XQUARTZ_SPARKLE]) +AC_ARG_ENABLE(install-libxf86config, + AS_HELP_STRING([--enable-install-libxf86config], + [Install libxf86config (default: disabled)]), + [INSTALL_LIBXF86CONFIG=$enableval], + [INSTALL_LIBXF86CONFIG=no]) +AC_ARG_ENABLE(visibility, AC_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]), + [SYMBOL_VISIBILITY=$enableval], + [SYMBOL_VISIBILITY=auto]) + +dnl GLX build options +AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerated indirect GLX (default: enabled)]), + [AIGLX=$enableval], + [AIGLX=yes]) +XORG_TLS +AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: auto)]), + [GLX_USE_TLS=$enableval + if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then + AC_MSG_ERROR([GLX with TLS support requested, but the compiler does not support it.]) + fi], + [GLX_USE_TLS=no + if test "${ac_cv_tls}" != "none" ; then + GLX_USE_TLS=yes + fi]) +AC_SUBST(GLX_TLS, ${GLX_USE_TLS}) +AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Path to Khronos OpenGL registry database files (default: auto)]), + [KHRONOS_SPEC_DIR="${withval}"], + [KHRONOS_SPEC_DIR=auto]) + +dnl Extensions. +AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes]) +AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) +AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto]) +AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) +AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) +AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) +AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) +AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) +AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes]) +AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP extension (default: auto)]), [XDMCP=$enableval], [XDMCP=auto]) +AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto]) +AC_ARG_ENABLE(glx, AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes]) +AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval]) +AC_ARG_ENABLE(dri2, AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval], [DRI2=auto]) +AC_ARG_ENABLE(dri3, AS_HELP_STRING([--enable-dri3], [Build DRI3 extension (default: auto)]), [DRI3=$enableval], [DRI3=auto]) +AC_ARG_ENABLE(present, AS_HELP_STRING([--disable-present], [Build Present extension (default: enabled)]), [PRESENT=$enableval], [PRESENT=yes]) +AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes]) +AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) +AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) +AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--enable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no]) +AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--enable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no]) +AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) +AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) +AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--enable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no]) +AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) +AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto]) +AC_ARG_ENABLE(config-udev-kms, AS_HELP_STRING([--enable-config-udev-kms], [Build udev kms support (default: auto)]), [CONFIG_UDEV_KMS=$enableval], [CONFIG_UDEV_KMS=auto]) +AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no]) +AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto]) +AC_ARG_ENABLE(config-wscons, AS_HELP_STRING([--enable-config-wscons], [Build wscons config support (default: auto)]), [CONFIG_WSCONS=$enableval], [CONFIG_WSCONS=auto]) +AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes]) +AC_ARG_ENABLE(vgahw, AS_HELP_STRING([--enable-vgahw], [Build Xorg with vga access (default: enabled)]), [VGAHW=$enableval], [VGAHW=yes]) +AC_ARG_ENABLE(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]) +AC_ARG_ENABLE(clientids, AS_HELP_STRING([--disable-clientids], [Build Xorg with client ID tracking (default: enabled)]), [CLIENTIDS=$enableval], [CLIENTIDS=yes]) +AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes]) +AC_ARG_ENABLE(linux_acpi, AC_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes]) +AC_ARG_ENABLE(linux_apm, AC_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes]) + +dnl DDXes. +AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) +AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: auto)]), [DMX=$enableval], [DMX=auto]) +AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) +AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) +AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) +AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no]) +AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) +dnl kdrive and its subsystems +AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) +AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto]) +AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto]) +AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto]) +dnl kdrive options +AC_ARG_ENABLE(kdrive-kbd, AS_HELP_STRING([--enable-kdrive-kbd], [Build kbd driver for kdrive (default: auto)]), [KDRIVE_KBD=$enableval], [KDRIVE_KBD=auto]) +AC_ARG_ENABLE(kdrive-mouse, AC_HELP_STRING([--enable-kdrive-mouse], [Build mouse driver for kdrive (default: auto)]), [KDRIVE_MOUSE=$enableval], [KDRIVE_MOUSE=auto]) +AC_ARG_ENABLE(kdrive-evdev, AC_HELP_STRING([--enable-kdrive-evdev], [Build evdev driver for kdrive (default: auto)]), [KDRIVE_EVDEV=$enableval], [KDRIVE_EVDEV=auto]) +AC_ARG_ENABLE(libunwind, AS_HELP_STRING([--enable-libunwind], [Use libunwind for backtracing (default: auto)]), [LIBUNWIND="$enableval"], [LIBUNWIND="auto"]) + + +dnl chown/chmod to be setuid root as part of build +dnl Replaces InstallXserverSetUID in imake +AC_ARG_ENABLE(install-setuid, + AS_HELP_STRING([--enable-install-setuid], + [Install Xorg server as owned by root with setuid bit (default: auto)]), + [SETUID=$enableval], [SETUID=auto]) +AC_MSG_CHECKING([to see if we can install the Xorg server as root]) +if test "x$SETUID" = "xauto" ; then + case $host_os in + cygwin*) SETUID="no" ;; + mingw*) SETUID="no" ;; + darwin*) SETUID="no" ;; + *) + case $host_cpu in + sparc) SETUID="no" ;; + *) SETUID="yes" ;; + esac + esac + if test "x$SETUID" = xyes; then + touch testfile + chown root testfile > /dev/null 2>&1 || SETUID="no" + rm -f testfile + fi +fi +AC_MSG_RESULT([$SETUID]) +AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"]) + +dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro +dnl was not expanded, since xorg-server with no transport types is rather useless. +dnl +dnl If you're seeing an error here, be sure you installed the lib/xtrans module +dnl first and if it's not in the default location, that you set the ACLOCAL +dnl environment variable to find it, such as: +dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" +m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$]) + +# Transport selection macro from xtrans.m4 +XTRANS_CONNECTION_FLAGS + +# Secure RPC detection macro from xtrans.m4 +XTRANS_SECURE_RPC_FLAGS +AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes]) + +AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86]) +AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu]) +AM_CONDITIONAL(INT10_STUB, [test "x$INT10" = xstub]) + +dnl Handle installing libxf86config +AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes]) + +dnl DDX Detection... Yes, it's ugly to have it here... but we need to +dnl handle this early on so that we don't require unsupported extensions +case $host_os in + cygwin* | mingw*) + CONFIG_DBUS_API=no + CONFIG_HAL=no + CONFIG_UDEV=no + CONFIG_UDEV_KMS=no + DGA=no + DRI2=no + DRI3=no + INT10MODULE=no + PCI=no + VGAHW=no + VBE=no + XF86UTILS=no + XF86VIDMODE=no + XSELINUX=no + XV=no + SYMBOL_VISIBILITY=no + ;; + darwin*) + PCI=no + INT10MODULE=no + VGAHW=no + VBE=no + DRM=no + DRI2=no + DRI3=no + + if test x$XQUARTZ = xauto; then + AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[ + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -framework Carbon" + AC_LINK_IFELSE([AC_LANG_SOURCE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}])], + [xorg_cv_Carbon_framework=yes], + [xorg_cv_Carbon_framework=no]) + LDFLAGS=$save_LDFLAGS]) + + if test "X$xorg_cv_Carbon_framework" = Xyes; then + XQUARTZ=yes + else + XQUARTZ=no + fi + fi + + AC_CHECK_FUNC(dispatch_async, + AC_DEFINE([HAVE_LIBDISPATCH], 1, [Define to 1 if you have the libdispatch (GCD) available]), + []) + + if test "x$XQUARTZ" = xyes ; then + XQUARTZ=yes + XVFB=no + XNEST=no + + COMPOSITE=no + DGA=no + DPMSExtension=no + XF86VIDMODE=no + fi + ;; + *) XQUARTZ=no ;; +esac + +dnl --------------------------------------------------------------------------- +dnl Extension section +dnl --------------------------------------------------------------------------- +XEXT_INC='-I$(top_srcdir)/Xext' +XEXT_LIB='$(top_builddir)/Xext/libXext.la' + +dnl Optional modules +VIDEOPROTO="videoproto" +COMPOSITEPROTO="compositeproto >= 0.4" +RECORDPROTO="recordproto >= 1.13.99.1" +SCRNSAVERPROTO="scrnsaverproto >= 1.1" +RESOURCEPROTO="resourceproto >= 1.2.0" +DRIPROTO="xf86driproto >= 2.1.0" +DRI2PROTO="dri2proto >= 2.8" +DRI3PROTO="dri3proto >= 1.0" +XINERAMAPROTO="xineramaproto" +BIGFONTPROTO="xf86bigfontproto >= 1.2.0" +DGAPROTO="xf86dgaproto >= 2.0.99.1" +GLPROTO="glproto >= 1.4.17" +DMXPROTO="dmxproto >= 2.2.99.1" +VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" +WINDOWSWMPROTO="windowswmproto" +APPLEWMPROTO="applewmproto >= 1.4" +XSHMFENCE="xshmfence >= 1.1" + +dnl Required modules +XPROTO="xproto >= 7.0.22" +RANDRPROTO="randrproto >= 1.4.0" +RENDERPROTO="renderproto >= 0.11" +XEXTPROTO="xextproto >= 7.2.99.901" +INPUTPROTO="inputproto >= 2.3" +KBPROTO="kbproto >= 1.0.3" +FONTSPROTO="fontsproto" +FIXESPROTO="fixesproto >= 5.0" +DAMAGEPROTO="damageproto >= 1.1" +XCMISCPROTO="xcmiscproto >= 1.2.0" +BIGREQSPROTO="bigreqsproto >= 1.1.0" +XTRANS="xtrans >= 1.3.2" +PRESENTPROTO="presentproto >= 1.0" + +dnl List of libraries that require a specific version +LIBAPPLEWM="applewm >= 1.4" +LIBDMX="dmx >= 1.0.99.1" +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.12.901" +LIBUDEV="libudev >= 143" +LIBSELINUX="libselinux >= 2.0.86" +LIBDBUS="dbus-1 >= 1.0" +LIBPIXMAN="pixman-1 >= 0.27.2" + +dnl Pixman is always required, but we separate it out so we can link +dnl specific modules against it +PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN) +REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau" + +dnl Core modules for most extensions, et al. +SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN" +# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc +AC_SUBST(SDK_REQUIRED_MODULES) + +REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES" + +if test "x$CONFIG_UDEV" = xyes && + { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then + AC_MSG_ERROR([Hotplugging through both libudev and dbus/hal not allowed]) +fi + +PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) +if test "x$CONFIG_UDEV" = xauto; then + CONFIG_UDEV="$HAVE_LIBUDEV" +fi +AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes]) +if test "x$CONFIG_UDEV" = xyes; then + CONFIG_DBUS_API=no + CONFIG_HAL=no + if test "x$CONFIG_UDEV_KMS" = xauto; then + CONFIG_UDEV_KMS="$HAVE_LIBUDEV" + fi + if ! test "x$HAVE_LIBUDEV" = xyes; then + AC_MSG_ERROR([udev configuration API requested, but libudev is not installed]) + fi + AC_DEFINE(CONFIG_UDEV, 1, [Use libudev for input hotplug]) + if test "x$CONFIG_UDEV_KMS" = xyes; then + AC_DEFINE(CONFIG_UDEV_KMS, 1, [Use libudev for kms enumeration]) + fi + SAVE_LIBS=$LIBS + SAVE_CFLAGS=$CFLAGS + CFLAGS=$UDEV_CFLAGS + LIBS=$UDEV_LIBS + AC_CHECK_FUNCS([udev_monitor_filter_add_match_tag]) + AC_CHECK_FUNCS([udev_enumerate_add_match_tag]) + LIBS=$SAVE_LIBS + CFLAGS=$SAVE_CFLAGS +fi +AM_CONDITIONAL(CONFIG_UDEV_KMS, [test "x$CONFIG_UDEV_KMS" = xyes]) + +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, $LIBDBUS, [HAVE_DBUS=yes], [HAVE_DBUS=no]) +if test "x$HAVE_DBUS" = xyes; then + AC_DEFINE(HAVE_DBUS, 1, [Have D-Bus support]) +fi +AM_CONDITIONAL(HAVE_DBUS, [test "x$HAVE_DBUS" = xyes]) + +if test "x$CONFIG_DBUS_API" = xauto; then + CONFIG_DBUS_API="$HAVE_DBUS" +fi +if test "x$CONFIG_DBUS_API" = xyes; then + if ! test "x$HAVE_DBUS" = xyes; then + AC_MSG_ERROR([D-Bus configuration API requested, but D-Bus is not installed.]) + fi + + AC_DEFINE(CONFIG_DBUS_API, 1, [Use the D-Bus input configuration API]) + CONFIG_NEED_DBUS="yes" +fi +AM_CONDITIONAL(CONFIG_DBUS_API, [test "x$CONFIG_DBUS_API" = xyes]) + +PKG_CHECK_MODULES(HAL, hal, [HAVE_HAL=yes], [HAVE_HAL=no]) +if test "x$CONFIG_HAL" = xauto; then + CONFIG_HAL="$HAVE_HAL" +fi +if test "x$CONFIG_HAL" = xyes; then + if ! test "x$HAVE_HAL" = xyes; then + AC_MSG_ERROR([HAL hotplug API requested, but HAL is not installed.]) + fi + + AC_DEFINE(CONFIG_HAL, 1, [Use the HAL hotplug API]) + CONFIG_NEED_DBUS="yes" +fi +AM_CONDITIONAL(CONFIG_HAL, [test "x$CONFIG_HAL" = xyes]) + +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]) + +if test "x$CONFIG_WSCONS" = xauto; then + case $host_os in + *openbsd*) + CONFIG_WSCONS=yes; + ;; + *) + CONFIG_WSCONS=no; + ;; + esac +fi +AM_CONDITIONAL(CONFIG_WSCONS, [test "x$CONFIG_WSCONS" = xyes]) +if test "x$CONFIG_WSCONS" = xyes; then + AC_DEFINE(CONFIG_WSCONS, 1, [Use wscons for input auto configuration]) +fi + +if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then + USE_SIGIO_BY_DEFAULT_VALUE=TRUE +else + USE_SIGIO_BY_DEFAULT_VALUE=FALSE +fi +AC_DEFINE_UNQUOTED([USE_SIGIO_BY_DEFAULT], [$USE_SIGIO_BY_DEFAULT_VALUE], + [Use SIGIO handlers for input device events by default]) + +AC_MSG_CHECKING([for glibc...]) +AC_PREPROC_IFELSE([AC_LANG_SOURCE([ +#include <features.h> +#ifndef __GLIBC__ +#error +#endif +])], glibc=yes, glibc=no) +AC_MSG_RESULT([$glibc]) + +AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes], + [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt], + [have_clock_gettime=no])]) + +AC_MSG_CHECKING([for a useful monotonic clock ...]) + +if ! test "x$have_clock_gettime" = xno; then + if ! test "x$have_clock_gettime" = xyes; then + CLOCK_LIBS="$have_clock_gettime" + else + CLOCK_LIBS="" + fi + + LIBS_SAVE="$LIBS" + LIBS="$CLOCK_LIBS" + CPPFLAGS_SAVE="$CPPFLAGS" + + if test x"$glibc" = xyes; then + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + fi + + AC_RUN_IFELSE([AC_LANG_SOURCE([ +#include <time.h> + +int main(int argc, char *argv[[]]) { + struct timespec tp; + + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + return 0; + else + return 1; +} + ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], + [MONOTONIC_CLOCK="cross compiling"]) + + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" +else + MONOTONIC_CLOCK=no +fi + +AC_MSG_RESULT([$MONOTONIC_CLOCK]) + +if test "x$MONOTONIC_CLOCK" = xyes; then + AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()]) + LIBS="$LIBS $CLOCK_LIBS" +fi + +AM_CONDITIONAL(XV, [test "x$XV" = xyes]) +if test "x$XV" = xyes; then + AC_DEFINE(XV, 1, [Support Xv extension]) + AC_DEFINE(XvExtension, 1, [Build Xv extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" +else + XVMC=no +fi + +AM_CONDITIONAL(XVMC, [test "x$XVMC" = xyes]) +if test "x$XVMC" = xyes; then + AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) +fi + +AM_CONDITIONAL(XREGISTRY, [test "x$XREGISTRY" = xyes]) +if test "x$XREGISTRY" = xyes; then + AC_DEFINE(XREGISTRY, 1, [Build registry module]) +fi + +AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) +if test "x$COMPOSITE" = xyes; then + AC_DEFINE(COMPOSITE, 1, [Support Composite Extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO" + COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' + COMPOSITE_INC='-I$(top_srcdir)/composite' +fi + +if test "x$MITSHM" = xauto; then + MITSHM="$ac_cv_sysv_ipc" +fi +AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes]) +if test "x$MITSHM" = xyes; then + AC_DEFINE(MITSHM, 1, [Support MIT-SHM extension]) + AC_DEFINE(HAS_SHM, 1, [Support SHM]) +fi + +AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes]) +if test "x$RECORD" = xyes; then + AC_DEFINE(XRECORD, 1, [Support Record extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO" + RECORD_LIB='$(top_builddir)/record/librecord.la' +fi + +AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes]) +if test "x$SCREENSAVER" = xyes; then + AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO" +fi + +AM_CONDITIONAL(RES, [test "x$RES" = xyes]) +if test "x$RES" = xyes; then + AC_DEFINE(RES, 1, [Support X resource extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO" +fi + +# The XRes extension may support client ID tracking only if it has +# been specifically enabled. Client ID tracking is implicitly not +# supported if XRes extension is disabled. +AC_MSG_CHECKING([whether to track client ids]) +if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then + AC_DEFINE(CLIENTIDS, 1, [Support client ID tracking]) +else + CLIENTIDS=no +fi +if test "x$CLIENTIDS" = xyes; then + case $host_os in + openbsd*) + SYS_LIBS="$SYS_LIBS -lkvm" + ;; + esac +fi +AC_MSG_RESULT([$CLIENTIDS]) +AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes]) + +AM_CONDITIONAL(DRI, test "x$DRI" = xyes) +if test "x$DRI" = xyes; then + AC_DEFINE(XF86DRI, 1, [Build DRI extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" +fi + +PKG_CHECK_MODULES([DRI2PROTO], $DRI2PROTO, + [HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no]) +case "$DRI2,$HAVE_DRI2PROTO" in + yes,no) + AC_MSG_ERROR([DRI2 requested, but dri2proto not found.]) + ;; + yes,yes | auto,yes) + AC_DEFINE(DRI2, 1, [Build DRI2 extension]) + DRI2=yes + LIBGL="gl >= 9.2.0" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO" + ;; +esac +AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) + +dnl +dnl Locate a suitable tmp file system for creating shared memeory files +dnl + +AC_ARG_WITH(shared-memory-dir, AS_HELP_STRING([--with-shared-memory-dir=PATH], [Path to directory in a world-writable temporary directory for anonymous shared memory (default: auto)]), +[], +[with_shared_memory_dir=yes]) + +shmdirs="/run/shm /var/tmp /tmp" + +case x"$with_shared_memory_dir" in +xyes) + for dir in $shmdirs; do + case x"$with_shared_memory_dir" in + xyes) + echo Checking temp dir "$dir" + if test -d "$dir"; then + with_shared_memory_dir="$dir" + fi + ;; + esac + done + ;; +x/*) + ;; +xno) + ;; +*) + AC_MSG_ERROR([Invalid directory specified for --with-shared-memory-dir: $with_shared_memory_dir]) + ;; +esac + +case x"$with_shared_memory_dir" in +xyes) + AC_MSG_ERROR([No directory found for shared memory temp files.]) + ;; +xno) + ;; +*) + AC_DEFINE_UNQUOTED(SHMDIR, ["$with_shared_memory_dir"], [Directory for shared memory temp files]) + ;; +esac + +AC_ARG_ENABLE(xtrans-send-fds, AS_HELP_STRING([--disable-xtrans-send-fds], [Use Xtrans support for fd passing (default: auto)]), [XTRANS_SEND_FDS=$enableval], [XTRANS_SEND_FDS=auto]) + +case "x$XTRANS_SEND_FDS" in +xauto) + case "$host_os" in + linux*|solaris*) + XTRANS_SEND_FDS=yes + ;; + *) + XTRANS_SEND_FDS=no + ;; + esac +esac + +case "x$XTRANS_SEND_FDS" in +xyes) + AC_DEFINE(XTRANS_SEND_FDS, 1, [Enable xtrans fd passing support]) + ;; +esac + +case "$DRI3,$XTRANS_SEND_FDS" in + yes,yes | auto,yes) + ;; + yes,no) + AC_MSG_ERROR([DRI3 requested, but xtrans fd passing support not found.]) + DRI3=no + ;; + no,*) + ;; + *) + AC_MSG_NOTICE([DRI3 disabled because xtrans fd passing support not found.]) + DRI3=no + ;; +esac + +PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO, + [HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no]) + +case "$DRI3,$HAVE_DRI3PROTO" in + yes,yes | auto,yes) + ;; + yes,no) + AC_MSG_ERROR([DRI3 requested, but dri3proto not found.]) + DRI3=no + ;; + no,*) + ;; + *) + AC_MSG_NOTICE([DRI3 disabled because dri3proto not found.]) + DRI3=no + ;; +esac + +AC_CHECK_FUNCS([sigaction]) + +BUSFAULT=no + +case x"$ac_cv_func_sigaction" in + xyes) + AC_DEFINE(HAVE_SIGACTION, 1, [Have sigaction function]) + BUSFAULT=yes + ;; +esac + +case x"$BUSFAULT" in + xyes) + AC_DEFINE(BUSFAULT, 1, [Include busfault OS API]) + ;; +esac + +AM_CONDITIONAL(BUSFAULT, test x"$BUSFAULT" = xyes) + +PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE, + [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no]) + +AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes) + +case x"$HAVE_XSHMFENCE" in + xyes) + AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library]) + REQUIRED_LIBS="$REQUIRED_LIBS xshmfence" + ;; +esac + + +case "$DRI3,$HAVE_XSHMFENCE" in + yes,yes | auto,yes) + ;; + yes,no) + AC_MSG_ERROR([DRI3 requested, but xshmfence not found.]) + DRI3=no + ;; + no,*) + ;; + *) + AC_MSG_NOTICE([DRI3 disabled because xshmfence not found.]) + DRI3=no + ;; +esac + +case x"$DRI3" in + xyes|xauto) + DRI3=yes + AC_DEFINE(DRI3, 1, [Build DRI3 extension]) + DRI3_LIB='$(top_builddir)/dri3/libdri3.la' + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO" + AC_MSG_NOTICE([DRI3 enabled]); + ;; +esac + +AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes) + +if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then + if test "x$DRM" = xyes; then + AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support]) + PKG_CHECK_MODULES([LIBDRM], $LIBDRM) + fi +fi + +if test "x$DRI2" = xyes; then + save_CFLAGS=$CFLAGS + CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <GL/gl.h> +#include <GL/internal/dri_interface.h> +#ifndef __DRI_DRI2 +#error DRI2 extension not available. +#endif]])], + [HAVE_DRI2EXTENSION=yes], + [HAVE_DRI2EXTENSION=no]) + CFLAGS=$save_CFLAGS + if test "x$HAVE_DRI2EXTENSION" = xyes; then + AC_DEFINE(DRI2_AIGLX, 1, [Build DRI2 AIGLX loader]) + DRI2_AIGLX=yes + else + AC_MSG_NOTICE([DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h.]) + DRI2_AIGLX=no + fi +fi +AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" = xyes) + +if test "x$GLX" = xyes; then + PKG_CHECK_MODULES([XLIB], [x11]) + PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL) + AC_SUBST(XLIB_CFLAGS) + AC_DEFINE(GLXEXT, 1, [Build GLX extension]) + GLX_LIBS='$(top_builddir)/glx/libglx.la' + GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS" +else + GLX=no +fi +AM_CONDITIONAL(GLX, test "x$GLX" = xyes) + +if test "x$GLX" = xno; then + AIGLX=no +fi + +if test "x$AIGLX" = xyes -a \( "x$DRI2" = xyes \); then + AC_DEFINE(AIGLX, 1, [Build AIGLX loader]) +fi +AM_CONDITIONAL(AIGLX_DRI_LOADER, { test "x$DRI2" = xyes; } && test "x$AIGLX" = xyes) + +if test "x$GLX_USE_TLS" = xyes ; then + GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS" + GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread" +fi +AC_SUBST([GLX_DEFINES]) +AC_SUBST([GLX_SYS_LIBS]) + +AM_CONDITIONAL(PRESENT, [test "x$PRESENT" = xyes]) +if test "x$PRESENT" = xyes; then + AC_DEFINE(PRESENT, 1, [Support Present extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $PRESENTPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $PRESENTPROTO" + PRESENT_INC='-I$(top_srcdir)/present' + PRESENT_LIB='$(top_builddir)/present/libpresent.la' +fi + +AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) +if test "x$XINERAMA" = xyes; then + AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) + AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama]) + REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO" +fi + +AM_CONDITIONAL(XACE, [test "x$XACE" = xyes]) +if test "x$XACE" = xyes; then + AC_DEFINE(XACE, 1, [Build X-ACE extension]) +fi + +AM_CONDITIONAL(XSELINUX, [test "x$XSELINUX" = xyes]) +if test "x$XSELINUX" = xyes; then + if test "x$XACE" != xyes; then + AC_MSG_ERROR([cannot build SELinux extension without X-ACE]) + fi + AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers])) + AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library])) + PKG_CHECK_MODULES([SELINUX], $LIBSELINUX) + SELINUX_LIBS="$SELINUX_LIBS -laudit" + AC_DEFINE(XSELINUX, 1, [Build SELinux extension]) +fi + +AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes]) +if test "x$XCSECURITY" = xyes; then + if test "x$XACE" != xyes; then + AC_MSG_ERROR([cannot build Security extension without X-ACE]) + fi + AC_DEFINE(XCSECURITY, 1, [Build Security extension]) +fi + +AM_CONDITIONAL(DBE, [test "x$DBE" = xyes]) +if test "x$DBE" = xyes; then + AC_DEFINE(DBE, 1, [Support DBE extension]) + DBE_LIB='$(top_builddir)/dbe/libdbe.la' + DBE_INC='-I$(top_srcdir)/dbe' +fi + +AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes]) +if test "x$XF86BIGFONT" = xyes; then + AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension]) + REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO" +fi + +AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes]) +if test "x$DPMSExtension" = xyes; then + AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) +fi + +AC_DEFINE(RENDER, 1, [Support RENDER extension]) +RENDER_LIB='$(top_builddir)/render/librender.la' +RENDER_INC='-I$(top_srcdir)/render' + +AC_DEFINE(RANDR, 1, [Support RANDR extension]) +RANDR_LIB='$(top_builddir)/randr/librandr.la' +RANDR_INC='-I$(top_srcdir)/randr' + +AC_DEFINE(XFIXES,1,[Support XFixes extension]) +FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' +FIXES_INC='-I$(top_srcdir)/xfixes' + +AC_DEFINE(DAMAGE,1,[Support Damage extension]) +DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' +DAMAGE_INC='-I$(top_srcdir)/damageext' +MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' +MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' + +# XINPUT extension is integral part of the server +AC_DEFINE(XINPUT, 1, [Support X Input extension]) +XI_LIB='$(top_builddir)/Xi/libXi.la' +XI_INC='-I$(top_srcdir)/Xi' + +AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) +AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes) +AM_CONDITIONAL(VBE, test "x$VBE" = xyes) +AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes) + +AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) + +AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) +AC_ARG_WITH(xkb-bin-directory, + AS_HELP_STRING([--with-xkb-bin-directory=DIR], [Directory containing xkbcomp program]), + [XKB_BIN_DIRECTORY="$withval"], + [XKB_BIN_DIRECTORY="$bindir"]) + +AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir]) + +dnl Make sure XKM_OUTPUT_DIR is an absolute path +XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` +if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then + XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" +fi + +dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed +dnl XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused + +XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'` +XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'` +AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir]) +AC_SUBST(XKB_COMPILED_DIR) + +if test "x$XKB_DFLT_RULES" = x; then + case $host_os in + linux*) + dnl doesn't take AutoAddDevices into account, but whatever. + XKB_DFLT_RULES="evdev" + ;; + *) + XKB_DFLT_RULES="base" + ;; + esac +fi +AC_DEFINE_UNQUOTED(XKB_DFLT_RULES, ["$XKB_DFLT_RULES"], [Default XKB ruleset]) +AC_DEFINE_UNQUOTED(XKB_DFLT_MODEL, ["$XKB_DFLT_MODEL"], [Default XKB model]) +AC_DEFINE_UNQUOTED(XKB_DFLT_LAYOUT, ["$XKB_DFLT_LAYOUT"], [Default XKB layout]) +AC_DEFINE_UNQUOTED(XKB_DFLT_VARIANT, ["$XKB_DFLT_VARIANT"], [Default XKB variant]) +AC_DEFINE_UNQUOTED(XKB_DFLT_OPTIONS, ["$XKB_DFLT_OPTIONS"], [Default XKB options]) +AC_SUBST([XKB_DFLT_RULES]) +AC_SUBST([XKB_DFLT_MODEL]) +AC_SUBST([XKB_DFLT_LAYOUT]) +AC_SUBST([XKB_DFLT_VARIANT]) +AC_SUBST([XKB_DFLT_OPTIONS]) + +XKB_LIB='$(top_builddir)/xkb/libxkb.la' +XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' +REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" + +PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"]) +if test "x$have_libxdmcp" = xyes; then + AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS]) +fi +if test "x$XDMCP" = xauto; then + if test "x$have_libxdmcp" = xyes; then + XDMCP=yes + else + XDMCP=no + fi +fi +if test "x$XDMAUTH" = xauto; then + if test "x$have_libxdmcp" = xyes && test "x$have_xdmcpwrap" = xyes; then + XDMAUTH=yes + else + XDMAUTH=no + fi +fi + +AM_CONDITIONAL(XDMCP, [test "x$XDMCP" = xyes]) +if test "x$XDMCP" = xyes; then + AC_DEFINE(XDMCP, 1, [Support XDM Control Protocol]) + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" +fi + +AM_CONDITIONAL(XDMAUTH, [test "x$XDMAUTH" = xyes]) +if test "x$XDMAUTH" = xyes; then + AC_DEFINE(HASXDMAUTH,1,[Support XDM-AUTH*-1]) + if ! test "x$XDMCP" = xyes; then + REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" + XDMCP_MODULES="xdmcp" + fi +fi + +AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) +AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path]) +AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path]) +dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri` +AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI driver path]) +AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name]) +AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name]) +AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release]) +AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) +AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address]) + +if test -z "$OSNAME"; then + OSNAME="UNKNOWN" +fi + +AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name]) +AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor]) +AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string]) + +AC_SUBST([VENDOR_NAME_SHORT]) +AC_DEFINE_UNQUOTED(VENDOR_NAME, ["$VENDOR_NAME"], [Vendor name]) +AC_DEFINE_UNQUOTED(VENDOR_NAME_SHORT, ["$VENDOR_NAME_SHORT"], [Vendor name]) +AC_DEFINE_UNQUOTED(VENDOR_RELEASE, [$VENDOR_RELEASE], [Vendor release]) +AC_DEFINE_UNQUOTED(VENDOR_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) + +AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper]) + +if test "x$DEBUGGING" = xyes; then + AC_DEFINE(DEBUG, 1, [Enable debugging code]) +fi +AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) + +AC_DEFINE(XTEST, 1, [Support XTest extension]) +AC_DEFINE(XSYNC, 1, [Support XSync extension]) +AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) +AC_DEFINE(BIGREQS, 1, [Support BigRequests extension]) + +if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then + DIX_LIB='$(top_builddir)/dix/dix.O' + OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)' +else + DIX_LIB='$(top_builddir)/dix/libdix.la' + OS_LIB='$(top_builddir)/os/libos.la' +fi +AC_SUBST([DIX_LIB]) +AC_SUBST([OS_LIB]) + +MAIN_LIB='$(top_builddir)/dix/libmain.la' +AC_SUBST([MAIN_LIB]) + +MI_LIB='$(top_builddir)/mi/libmi.la' +MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' +MI_INC='-I$(top_srcdir)/mi' +FB_LIB='$(top_builddir)/fb/libfb.la' +FB_INC='-I$(top_srcdir)/fb' +MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' +MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' +MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync' +MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la' +CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' + +# SHA1 hashing +AC_ARG_WITH([sha1], + [AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI], + [choose SHA1 implementation])]) +AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes]) +if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then + with_sha1=libc +fi +if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then + AC_MSG_ERROR([libc requested but not found]) +fi +if test "x$with_sha1" = xlibc; then + AC_DEFINE([HAVE_SHA1_IN_LIBC], [1], + [Use libc SHA1 functions]) + SHA1_LIBS="" +fi +AC_CHECK_FUNC([CC_SHA1_Init], [HAVE_SHA1_IN_COMMONCRYPTO=yes]) +if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then + with_sha1=CommonCrypto +fi +if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then + AC_MSG_ERROR([CommonCrypto requested but not found]) +fi +if test "x$with_sha1" = xCommonCrypto; then + AC_DEFINE([HAVE_SHA1_IN_COMMONCRYPTO], [1], + [Use CommonCrypto SHA1 functions]) + SHA1_LIBS="" +fi +dnl stdcall functions cannot be tested with AC_CHECK_LIB +AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include <windows.h>]) +if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then + with_sha1=CryptoAPI +fi +if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then + AC_MSG_ERROR([CryptoAPI requested but not found]) +fi +if test "x$with_sha1" = xCryptoAPI; then + AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1], + [Use CryptoAPI SHA1 functions]) + SHA1_LIBS="" +fi +AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes]) +if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then + with_sha1=libmd +fi +if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then + AC_MSG_ERROR([libmd requested but not found]) +fi +if test "x$with_sha1" = xlibmd; then + AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1], + [Use libmd SHA1 functions]) + SHA1_LIBS=-lmd +fi +PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no]) +if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then + with_sha1=libsha1 +fi +if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then + AC_MSG_ERROR([libsha1 requested but not found]) +fi +if test "x$with_sha1" = xlibsha1; then + AC_DEFINE([HAVE_SHA1_IN_LIBSHA1], [1], + [Use libsha1 for SHA1]) + SHA1_LIBS=-lsha1 +fi +AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes]) +if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then + with_sha1=libnettle +fi +if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then + AC_MSG_ERROR([libnettle requested but not found]) +fi +if test "x$with_sha1" = xlibnettle; then + AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1], + [Use libnettle SHA1 functions]) + SHA1_LIBS=-lnettle +fi +AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes]) +if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then + with_sha1=libgcrypt +fi +if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then + AC_MSG_ERROR([libgcrypt requested but not found]) +fi +if test "x$with_sha1" = xlibgcrypt; then + AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1], + [Use libgcrypt SHA1 functions]) + SHA1_LIBS=-lgcrypt +fi +# We don't need all of the OpenSSL libraries, just libcrypto +AC_CHECK_LIB([crypto], [SHA1_Init], [HAVE_LIBCRYPTO=yes]) +PKG_CHECK_MODULES([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes], + [HAVE_OPENSSL_PKC=no]) +if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then + if test "x$with_sha1" = x; then + with_sha1=libcrypto + fi +else + if test "x$with_sha1" = xlibcrypto; then + AC_MSG_ERROR([OpenSSL libcrypto requested but not found]) + fi +fi +if test "x$with_sha1" = xlibcrypto; then + if test "x$HAVE_LIBCRYPTO" = xyes; then + SHA1_LIBS=-lcrypto + else + SHA1_LIBS="$OPENSSL_LIBS" + SHA1_CFLAGS="$OPENSSL_CFLAGS" + fi +fi +AC_MSG_CHECKING([for SHA1 implementation]) +if test "x$with_sha1" = x; then + AC_MSG_ERROR([No suitable SHA1 implementation found]) +fi +AC_MSG_RESULT([$with_sha1]) +AC_SUBST(SHA1_LIBS) +AC_SUBST(SHA1_CFLAGS) + +PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) +PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) + +PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no]) +if test "x$LIBUNWIND" = "xauto"; then + LIBUNWIND="$HAVE_LIBUNWIND" +fi + +if test "x$LIBUNWIND" = "xyes"; then + if test "x$HAVE_LIBUNWIND" != "xyes"; then + AC_MSG_ERROR([libunwind requested but not installed.]) + fi + AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support]) +fi + +AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$LIBUNWIND" = xyes]) + +# Autotools has some unfortunate issues with library handling. In order to +# get a server to rebuild when a dependency in the tree is changed, it must +# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be +# listed there, or some versions of autotools will break (especially if a -L +# is required to find the library). So, we keep two sets of libraries +# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which +# will go into the _DEPENDENCIES and _LDADD of the server, and +# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The +# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in +# NAMESPACE_SYS_LIBS. +# +# XSERVER_LIBS is the set of in-tree libraries which all servers require. +# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers +# require. +# +XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" +XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB" +XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" +AC_SUBST([XSERVER_LIBS]) +AC_SUBST([XSERVER_SYS_LIBS]) + +UTILS_SYS_LIBS="${SYS_LIBS}" +AC_SUBST([UTILS_SYS_LIBS]) + +# The Xorg binary needs to export symbols so that they can be used from modules +# Some platforms require extra flags to do this. libtool should set the +# necessary flags for each platform when -export-dynamic is passed to it. +LD_EXPORT_SYMBOLS_FLAG="-export-dynamic" +LD_NO_UNDEFINED_FLAG= +XORG_DRIVER_LIBS= +case "$host_os" in + cygwin*) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a" + LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a" + XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined" + CYGWIN=yes + ;; + solaris*) + # We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT + # that we can link against for testing if the system linker is new + # enough to support -z parent=<program> for verifying loadable modules + # are only calling functions defined in either the loading program or + # the libraries they're linked with. + AC_LINK_IFELSE( + [AC_LANG_SOURCE([int main(int argc, char **argv) { return 0; }])], + [mv conftest$EXEEXT conftest.parent + XORG_CHECK_LINKER_FLAGS([-Wl,-z,parent=conftest.parent -G], + [LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg" +# Not set yet, since this gets exported in xorg-server.pc to all the drivers, +# and they're not all fixed to build correctly with it yet. +# XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg" + ],[], + [AC_LANG_SOURCE([extern int main(int argc, char **argv); + int call_main(void) { return main(0, NULL); }])]) + rm -f conftest.parent + ]) + ;; +esac +AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) +AC_SUBST([LD_NO_UNDEFINED_FLAG]) +AC_SUBST([XORG_DRIVER_LIBS]) +AM_CONDITIONAL([CYGWIN], [test x"$CYGWIN" = xyes]) +AM_CONDITIONAL([NO_UNDEFINED], [test x"$LD_NO_UNDEFINED_FLAG" != x]) + +dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so +dnl we need to replicate that here until those can all be fixed +AC_MSG_CHECKING([if SVR4 needs to be defined]) +AC_EGREP_CPP([I_AM_SVR4],[ +#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) + I_AM_SVR4 +#endif +],[ +AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4]) +AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) + +XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC $PRESENT_INC" + +dnl --------------------------------------------------------------------------- +dnl DDX section. +dnl --------------------------------------------------------------------------- + +dnl Xvfb DDX + +AC_MSG_CHECKING([whether to build Xvfb DDX]) +AC_MSG_RESULT([$XVFB]) +AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) + +if test "x$XVFB" = xyes; then + XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" + XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" + AC_SUBST([XVFB_LIBS]) + AC_SUBST([XVFB_SYS_LIBS]) +fi + + +dnl Xnest DDX + +PKG_CHECK_MODULES(XNESTMODULES, [$LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no]) +AC_MSG_CHECKING([whether to build Xnest DDX]) +if test "x$XNEST" = xauto; then + XNEST="$have_xnest" +fi +AC_MSG_RESULT([$XNEST]) +AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) + +if test "x$XNEST" = xyes; then + if test "x$have_xnest" = xno; then + AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.]) + fi + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB" + XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" + AC_SUBST([XNEST_LIBS]) + AC_SUBST([XNEST_SYS_LIBS]) +fi + + +dnl Xorg DDX + +AC_MSG_CHECKING([whether to build Xorg DDX]) +if test "x$XORG" = xauto; then + XORG="yes" + case $host_os in + cygwin*) XORG="no" ;; + mingw*) XORG="no" ;; + darwin*) XORG="no" ;; + esac +fi +AC_MSG_RESULT([$XORG]) + +if test "x$XORG" = xyes; then + XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' + XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' + XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" + XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" + XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB" + + dnl ================================================================== + dnl symbol visibility + symbol_visibility= + have_visibility=disabled + if test x$SYMBOL_VISIBILITY != xno; then + AC_MSG_CHECKING(for symbol visibility support) + if test x$GCC = xyes; then + VISIBILITY_CFLAGS="-fvisibility=hidden" + else + if test x$SUNCC = xyes; then + VISIBILITY_CFLAGS="-xldscope=hidden" + else + have_visibility=no + fi + fi + if test x$have_visibility != xno; then + save_CFLAGS="$CFLAGS" + proto_inc=`$PKG_CONFIG --cflags xproto` + CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc" + AC_TRY_COMPILE( + [#include <X11/Xfuncproto.h> + extern _X_HIDDEN int hidden_int; + extern _X_EXPORT int public_int; + extern _X_HIDDEN int hidden_int_func(void); + extern _X_EXPORT int public_int_func(void);], + [], + have_visibility=yes, + have_visibility=no) + CFLAGS=$save_CFLAGS + fi + AC_MSG_RESULT([$have_visibility]) + if test x$have_visibility != xno; then + symbol_visibility=$VISIBILITY_CFLAGS + XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS" + XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS" + fi + fi + dnl added to xorg-server.pc + AC_SUBST([symbol_visibility]) + dnl =================================================================== + + dnl =================================================================== + dnl ================= beginning of PCI configuration ================== + dnl =================================================================== + xorg_bus_bsdpci=no + xorg_bus_sparc=no + + AC_MSG_CHECKING([whether to build Xorg PCI functions]) + if test "x$PCI" = xyes; then + PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS) + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS" + XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $LIBDRM_LIBS" + XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS" + + AC_DEFINE(XSERVER_LIBPCIACCESS, 1, [Use libpciaccess for all pci manipulation]) + AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path]) + case $host_os in + gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*) + xorg_bus_bsdpci="yes" + ;; + esac + case $host_cpu in + sparc*) + xorg_bus_sparc="yes" + ;; + esac + else + if test "x$CONFIG_UDEV_KMS" = xyes; then + AC_MSG_ERROR([Platform device enumeration requires libpciaccess]) + fi + if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then + AC_MSG_ERROR([Cannot build int10 without libpciaccess]) + fi + fi + AC_MSG_RESULT([$PCI]) + + if test "x$CONFIG_UDEV_KMS" = xyes; then + AC_DEFINE(XSERVER_PLATFORM_BUS, 1, [X server supports platform device enumeration]) + fi + AC_MSG_RESULT([$XSERVER_PLATFORM_BUS]) + dnl =================================================================== + dnl ==================== end of PCI configuration ===================== + dnl =================================================================== + + case $host_os in + linux*) + XORG_OS_SUBDIR="linux" + linux_acpi="no" + case $host_cpu in + alpha*) + linux_alpha=yes + ;; + i*86|amd64*|x86_64*|ia64*) + linux_acpi=$enable_linux_acpi + ;; + *) + ;; + esac + dnl APM header + AC_CHECK_HEADERS([linux/apm_bios.h], [linux_apm=$enable_linux_apm]) + if test "x$linux_apm" = xyes -o "x$linux_acpi" = xyes; then + AC_DEFINE(XF86PM, 1, [Support APM/ACPI power management in the server]) + fi + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + XORG_OS_SUBDIR="bsd" + ;; + netbsd*) + XORG_OS_SUBDIR="bsd" + ;; + openbsd*) + if test "x$ac_cv_BSD_APM" = xyes \ + -o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + fi + XORG_OS_SUBDIR="bsd" + ;; + solaris*) + XORG_OS_SUBDIR="solaris" + XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" + AC_CHECK_HEADERS([sys/kd.h]) + AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no]) + # Check for minimum supported release + AC_MSG_CHECKING([Solaris version]) + OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'` + if test "${OS_MINOR}" -ge 7 ; then + AC_MSG_RESULT(Solaris ${OS_MINOR}) + else + AC_MSG_RESULT(Solaris `echo ${host_os}|$SED -e 's/^.*solaris//`) + fi + if test "${OS_MINOR}" -lt 8 ; then + AC_MSG_ERROR([This release no longer supports Solaris versions older than Solaris 8.]) + fi + AC_CHECK_DECL([_LP64], [SOLARIS_64="yes"], [SOLARIS_64="no"]) + + case $host_cpu in + sparc*) + SOLARIS_INOUT_ARCH="sparcv8plus" + ;; + i*86) + if test x$SOLARIS_64 = xyes ; then + SOLARIS_INOUT_ARCH="amd64" + else + SOLARIS_INOUT_ARCH="ia32" + fi + ;; + *) + AC_MSG_ERROR([Unsupported Solaris platform. Only SPARC & x86 \ + are supported on Solaris in this release. If you are \ + interested in porting Xorg to your platform, please email \ + xorg@lists.freedesktop.org.]) ;; + esac + AC_SUBST([SOLARIS_INOUT_ARCH]) + ;; + gnu*) + XORG_OS_SUBDIR="hurd" + ;; + *) + XORG_OS_SUBDIR="stub" + AC_MSG_NOTICE([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 + + case $host_cpu in + i*86) + ;; + esac + + if test "x$DGA" = xauto; then + PKG_CHECK_MODULES(DGA, $DGAPROTO, [DGA=yes], [DGA=no]) + fi + if test "x$DGA" = xyes; then + XORG_MODULES="$XORG_MODULES $DGAPROTO" + PKG_CHECK_MODULES(DGA, $DGAPROTO) + AC_DEFINE(DGA, 1, [Support DGA extension]) + AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) + fi + + if test "x$XF86VIDMODE" = xauto; then + PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO, [XF86VIDMODE=yes], [XF86VIDMODE=no]) + fi + if test "x$XF86VIDMODE" = xyes; then + XORG_MODULES="$XORG_MODULES $VIDMODEPROTO" + PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO) + AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) + fi + + if test -n "$XORG_MODULES"; then + PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES]) + XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" + XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" + fi + + AC_SUBST([XORG_LIBS]) + AC_SUBST([XORG_SYS_LIBS]) + AC_SUBST([XORG_INCS]) + AC_SUBST([XORG_OS_SUBDIR]) + AC_SUBST([XORG_CFLAGS]) + + dnl these only go in xorg-config.h + XF86CONFIGFILE="xorg.conf" + XF86CONFIGDIR="xorg.conf.d" + AC_SUBST(XF86CONFIGDIR) + CONFIGFILE="$sysconfdir/$XF86CONFIGFILE" + LOGPREFIX="$logdir/Xorg." + AC_DEFINE(XORG_SERVER, 1, [Building Xorg server]) + AC_DEFINE(XORGSERVER, 1, [Building Xorg server]) + AC_DEFINE(XFree86Server, 1, [Building XFree86 server]) + AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) + AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) + AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) + AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) + AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file]) + AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) + AC_DEFINE_DIR(__XCONFIGDIR__, XF86CONFIGDIR, [Name of configuration directory]) + AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path]) + AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path]) + AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location]) + AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) + if test "x$VGAHW" = xyes; then + AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) + fi + + driverdir="$moduledir/drivers" + AC_SUBST([moduledir]) + AC_SUBST([driverdir]) + sdkdir="$includedir/xorg" + extdir="$includedir/X11/extensions" + sysconfigdir="$datadir/X11/$XF86CONFIGDIR" + AC_SUBST([sdkdir]) + AC_SUBST([extdir]) + AC_SUBST([sysconfigdir]) + AC_SUBST([logdir]) + + # stuff the ABI versions into the pc file too + extract_abi() { + grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }' + } + abi_ansic=`extract_abi ANSIC` + abi_videodrv=`extract_abi VIDEODRV` + abi_xinput=`extract_abi XINPUT` + abi_extension=`extract_abi EXTENSION` + AC_SUBST([abi_ansic]) + AC_SUBST([abi_videodrv]) + AC_SUBST([abi_xinput]) + AC_SUBST([abi_extension]) +fi +AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) +AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes]) +AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes]) +AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) +AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes]) +AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes]) +AM_CONDITIONAL([LNXAPM], [test "x$linux_apm" = xyes]) +AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes]) +AM_CONDITIONAL([DGA], [test "x$DGA" = xyes]) +AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes]) +AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes]) +dnl XWin DDX + +AC_MSG_CHECKING([whether to build XWin DDX]) +if test "x$XWIN" = xauto; then + case $host_os in + cygwin*) XWIN="yes" ;; + mingw*) XWIN="yes" ;; + *) XWIN="no" ;; + esac +fi +AC_MSG_RESULT([$XWIN]) + +if test "x$XWIN" = xyes; then + AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [Location of system.XWinrc]) + AC_DEFINE_DIR(DEFAULT_LOGDIR, logdir, [Default log location]) + AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) + AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) + AC_CHECK_TOOL(WINDRES, windres) + + PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau]) + + if test "x$WINDOWSWM" = xauto; then + PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no]) + fi + if test "x$WINDOWSWM" = xyes ; then + PKG_CHECK_MODULES(WINDOWSWM, $WINDOWSWMPROTO) + XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS $WINDOWSWM_CFLAGS" + AC_DEFINE(ROOTLESS,1,[Build Rootless code]) + fi + + case $host_os in + cygwin*) + XWIN_SERVER_NAME=XWin + AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages]) + ;; + mingw*) + XWIN_SERVER_NAME=Xming + AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location]) + AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets]) + XWIN_SYS_LIBS="-lpthread -lws2_32" + ;; + esac + + XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" + XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" + AC_SUBST(XWIN_LIBS) + AC_SUBST(XWIN_SERVER_NAME) + AC_SUBST(XWIN_SYS_LIBS) + + if test "x$DEBUGGING" = xyes; then + AC_DEFINE(CYGDEBUG, 1, [Simple debug messages]) + AC_DEFINE(CYGWINDOWING_DEBUG, 1, [Debug messages for window handling]) + AC_DEFINE(CYGMULTIWINDOW_DEBUG, 1, [Debug window manager]) + fi + + AC_DEFINE(DDXOSVERRORF, 1, [Use OsVendorVErrorF]) + AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ]) + +dnl XWin with AIGLX requires OpenGL spec files in order to generate wrapper code for native GL functions + if [test "x$XWIN" = xyes && test "x$AIGLX" = xyes] ; then + AC_CHECK_PROG(PYTHON3, python3, python3) + if test -z "$PYTHON3"; then + AC_MSG_ERROR([python3 not found]) + fi + AC_MSG_CHECKING(for python module lxml) + $PYTHON3 -c "import lxml;" + if test $? -ne 0 ; then + AC_MSG_ERROR([not found]) + fi + AC_MSG_RESULT(yes) + if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then + PKG_CHECK_MODULES([KHRONOS_OPENGL_REGISTRY], [khronos-opengl-registry]) + KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir` + fi + AC_SUBST(KHRONOS_SPEC_DIR) + fi + +fi +AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_MULTIWINDOW, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_MULTIWINDOWEXTWM, [test "x$XWIN" = xyes && test "x$WINDOWSWM" = xyes]) +AM_CONDITIONAL(XWIN_CLIPBOARD, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$AIGLX" = xyes]) +AM_CONDITIONAL(XWIN_NATIVEGDI, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) +AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) + +dnl Darwin / OS X DDX +if test "x$XQUARTZ" = xyes; then + AC_DEFINE(XQUARTZ,1,[Have Quartz]) + AC_DEFINE(ROOTLESS,1,[Build Rootless code]) + + XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB" + AC_SUBST([XQUARTZ_LIBS]) + + AC_CHECK_LIB([Xplugin],[xp_init],[:]) + + CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" + + PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO $LIBAPPLEWM xfixes x11) + + if test "x$XQUARTZ_SPARKLE" = xyes ; then + AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.]) + fi + + if test "x$STANDALONE_XPBPROXY" = xyes ; then + AC_DEFINE(STANDALONE_XPBPROXY,1,[Build a standalone xpbproxy]) + fi +fi + +# Support for objc in autotools is minimal and not documented. +OBJC='$(CC)' +OBJCLD='$(CCLD)' +OBJCLINK='$(LINK)' +OBJCFLAGS='$(CFLAGS)' +AC_SUBST([OBJC]) +AC_SUBST([OBJCCLD]) +AC_SUBST([OBJCLINK]) +AC_SUBST([OBJCFLAGS]) +# internal, undocumented automake func follows :( +_AM_DEPENDENCIES([OBJC]) +AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) +AM_CONDITIONAL(XQUARTZ_SPARKLE, [test "x$XQUARTZ_SPARKLE" != "xno"]) +AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes]) + +dnl DMX DDX +PKG_CHECK_MODULES( + [DMXMODULES], + [xmuu $LIBXEXT x11 >= 1.6 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES], + [PKG_CHECK_MODULES( + [XDMXCONFIG_DEP], + [xaw7 xmu xt xpm x11], + [have_dmx=yes], + [have_dmx=no])], + [have_dmx=no]) +AC_MSG_CHECKING([whether to build Xdmx DDX]) +if test "x$DMX" = xauto; then + DMX="$have_dmx" + case $host_os in + cygwin*) DMX="no" ;; + mingw*) DMX="no" ;; + darwin*) DMX="no" ;; + esac +fi +AC_MSG_RESULT([$DMX]) +AM_CONDITIONAL(DMX, [test "x$DMX" = xyes]) + +if test "x$DMX" = xyes; then + if test "x$have_dmx" = xno; then + AC_MSG_ERROR([Xdmx build explicitly requested, but required + modules not found.]) + fi + DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC" + XDMX_CFLAGS="$DMXMODULES_CFLAGS" + XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB" + XDMX_SYS_LIBS="$DMXMODULES_LIBS" + AC_SUBST([XDMX_CFLAGS]) + AC_SUBST([XDMX_LIBS]) + AC_SUBST([XDMX_SYS_LIBS]) + +dnl USB sources in DMX require <linux/input.h> + AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes", + DMX_BUILD_USB="no") +dnl Linux sources in DMX require <linux/keyboard.h> + AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes", + DMX_BUILD_LNX="no") + AC_SUBST(XDMXCONFIG_DEP_CFLAGS) + AC_SUBST(XDMXCONFIG_DEP_LIBS) + PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [$LIBDMX $LIBXEXT x11]) + AC_SUBST(DMXEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [$LIBDMX xmu $LIBXEXT x11]) + AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [$LIBDMX $LIBXI $LIBXEXT x11]) + AC_SUBST(DMXXIEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [$LIBXTST $LIBXEXT x11]) + AC_SUBST(XTSTEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres $LIBXEXT x11]) + AC_SUBST(XRESEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([X11EXAMPLES_DEP], [$LIBXEXT x11]) + AC_SUBST(X11EXAMPLES_DEP_LIBS) + +fi +AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes]) +AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes]) + +dnl kdrive DDX + +XEPHYR_LIBS= +XEPHYR_INCS= + +AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes]) + +if test "$KDRIVE" = yes; then + AC_DEFINE(KDRIVESERVER,1,[Build Kdrive X server]) + AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx]) + + AC_CHECK_HEADERS([linux/fb.h]) + if test "$ac_cv_header_linux_fb_h" = yes && test "x$XFBDEV" = xauto; then + XFBDEV=yes + fi + + if test "x$XFBDEV" = xyes; then + KDRIVEFBDEVLIB=yes + AC_DEFINE(KDRIVEFBDEV, 1, [Build fbdev-based kdrive server]) + fi + + + PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) + if test "x$HAVE_TSLIB" = xno; then + AC_CHECK_LIB(ts, ts_open, [ + HAVE_TSLIB="yes" + TSLIB_LIBS="-lts" + ]) + fi + + if test "xTSLIB" = xauto; then + TSLIB="$HAVE_TSLIB" + fi + + if test "x$TSLIB" = xyes; then + if ! test "x$HAVE_TSLIB" = xyes; then + AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) + else + AC_DEFINE(TSLIB, 1, [Have tslib support]) + fi + fi + + if test "x$KDRIVE_KBD" = xyes; then + AC_DEFINE(KDRIVE_KBD, 1, [Enable KDrive kbd driver]) + fi + if test "x$KDRIVE_EVDEV" = xyes; then + AC_DEFINE(KDRIVE_EVDEV, 1, [Enable KDrive evdev driver]) + fi + if test "x$KDRIVE_MOUSE" = xyes; then + AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver]) + fi + + XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms" + if test "x$XV" = xyes; then + XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv" + fi + if test "x$DRI" = xyes && test "x$GLX" = xyes; then + XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS libdrm xcb-glx xcb-xf86dri > 1.6" + fi + + if test "x$XEPHYR" = xauto; then + PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [XEPHYR="yes"], [XEPHYR="no"]) + elif test "x$XEPHYR" = xyes ; then + PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS) + fi + + # Xephyr needs nanosleep() which is in librt on Solaris + AC_CHECK_FUNC([nanosleep], [], + AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) + + # damage shadow extension glx (NOTYET) fb mi + KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' + KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" + KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' + KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" + + KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" + + KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB" + KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la' + case $host_os in + *linux*) + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la' + KDRIVELINUX=yes + if test "x$KDRIVE_EVDEV" = xauto; then + KDRIVE_EVDEV=yes + fi + if test "x$KDRIVE_KBD" = xauto; then + KDRIVE_KBD=yes + fi + if test "x$KDRIVE_MOUSE" = xauto; then + KDRIVE_MOUSE=yes + fi + ;; + *) + if test "x$KDRIVE_EVDEV" = xauto; then + KDRIVE_EVDEV=no + fi + if test "x$KDRIVE_KBD" = xauto; then + KDRIVE_KBD=no + fi + if test "x$KDRIVE_MOUSE" = xauto; then + KDRIVE_MOUSE=no + fi + ;; + esac + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la' + 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" + KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS $TSLIB_LIBS" + + AC_SUBST([XEPHYR_LIBS]) + AC_SUBST([XEPHYR_INCS]) +fi +AC_SUBST([KDRIVE_INCS]) +AC_SUBST([KDRIVE_PURE_INCS]) +AC_SUBST([KDRIVE_CFLAGS]) +AC_SUBST([KDRIVE_PURE_LIBS]) +AC_SUBST([KDRIVE_LOCAL_LIBS]) +AC_SUBST([KDRIVE_LIBS]) +AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes]) +AM_CONDITIONAL(KDRIVE_EVDEV, [test "x$KDRIVE_EVDEV" = xyes]) +AM_CONDITIONAL(KDRIVE_KBD, [test "x$KDRIVE_KBD" = xyes]) +AM_CONDITIONAL(KDRIVE_MOUSE, [test "x$KDRIVE_MOUSE" = xyes]) +AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes]) +AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes]) +AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) +AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes]) +AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) + +dnl and the rest of these are generic, so they're in config.h +dnl +dnl though, thanks to the passing of some significant amount of time, the +dnl above is probably a complete fallacy, and you should not rely on it. +dnl but this is still actually better than imake, honest. -daniels + +AC_TRY_COMPILE([ +#include <features.h> +#ifndef __GLIBC__ +#error not glibc +#endif +], [], [AC_DEFINE(_GNU_SOURCE, 1, + [ Enable GNU and other extensions to the C environment for glibc])]) + +AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) + +AC_SUBST([RELEASE_DATE]) +BUILD_DATE="`date +'%Y%m%d'`" +AC_SUBST([BUILD_DATE]) +BUILD_TIME="`date +'1%H%M%S'`" +AC_SUBST([BUILD_TIME]) + +DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" + +AC_SUBST([DIX_CFLAGS]) + +AC_SUBST([libdir]) +AC_SUBST([exec_prefix]) +AC_SUBST([prefix]) + +AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/sdksyms.dep]) + +if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then + AC_WARN([ + *********************************************** + Neither HAL nor udev backend will be enabled. + Input device hotplugging will not be available! + ***********************************************]) +fi + +AC_CONFIG_FILES([ +Makefile +glx/Makefile +include/Makefile +composite/Makefile +damageext/Makefile +dbe/Makefile +dix/Makefile +doc/Makefile +doc/dtrace/Makefile +man/Makefile +fb/Makefile +record/Makefile +config/Makefile +mi/Makefile +miext/Makefile +miext/sync/Makefile +miext/damage/Makefile +miext/shadow/Makefile +miext/rootless/Makefile +os/Makefile +pseudoramiX/Makefile +randr/Makefile +render/Makefile +xkb/Makefile +Xext/Makefile +Xi/Makefile +xfixes/Makefile +exa/Makefile +dri3/Makefile +present/Makefile +hw/Makefile +hw/xfree86/Makefile +hw/xfree86/common/Makefile +hw/xfree86/common/xf86Build.h +hw/xfree86/ddc/Makefile +hw/xfree86/dixmods/Makefile +hw/xfree86/doc/Makefile +hw/xfree86/dri/Makefile +hw/xfree86/dri2/Makefile +hw/xfree86/exa/Makefile +hw/xfree86/exa/man/Makefile +hw/xfree86/fbdevhw/Makefile +hw/xfree86/fbdevhw/man/Makefile +hw/xfree86/i2c/Makefile +hw/xfree86/int10/Makefile +hw/xfree86/loader/Makefile +hw/xfree86/man/Makefile +hw/xfree86/modes/Makefile +hw/xfree86/os-support/Makefile +hw/xfree86/os-support/bsd/Makefile +hw/xfree86/os-support/bus/Makefile +hw/xfree86/os-support/hurd/Makefile +hw/xfree86/os-support/misc/Makefile +hw/xfree86/os-support/linux/Makefile +hw/xfree86/os-support/solaris/Makefile +hw/xfree86/os-support/stub/Makefile +hw/xfree86/parser/Makefile +hw/xfree86/ramdac/Makefile +hw/xfree86/shadowfb/Makefile +hw/xfree86/vbe/Makefile +hw/xfree86/vgahw/Makefile +hw/xfree86/x86emu/Makefile +hw/xfree86/utils/Makefile +hw/xfree86/utils/man/Makefile +hw/xfree86/utils/cvt/Makefile +hw/xfree86/utils/gtf/Makefile +hw/dmx/config/Makefile +hw/dmx/config/man/Makefile +hw/dmx/doc/Makefile +hw/dmx/doxygen/doxygen.conf +hw/dmx/doxygen/Makefile +hw/dmx/examples/Makefile +hw/dmx/input/Makefile +hw/dmx/glxProxy/Makefile +hw/dmx/Makefile +hw/dmx/man/Makefile +hw/vfb/Makefile +hw/vfb/man/Makefile +hw/xnest/Makefile +hw/xnest/man/Makefile +hw/xwin/Makefile +hw/xwin/glx/Makefile +hw/xwin/man/Makefile +hw/xquartz/Makefile +hw/xquartz/GL/Makefile +hw/xquartz/bundle/Makefile +hw/xquartz/man/Makefile +hw/xquartz/mach-startup/Makefile +hw/xquartz/pbproxy/Makefile +hw/xquartz/xpr/Makefile +hw/kdrive/Makefile +hw/kdrive/ephyr/Makefile +hw/kdrive/ephyr/man/Makefile +hw/kdrive/fake/Makefile +hw/kdrive/fbdev/Makefile +hw/kdrive/linux/Makefile +hw/kdrive/src/Makefile +test/Makefile +test/xi2/Makefile +xserver.ent +xorg-server.pc +]) +AC_OUTPUT diff --git a/damageext/Makefile.am b/damageext/Makefile.am new file mode 100644 index 0000000..4d4cf44 --- /dev/null +++ b/damageext/Makefile.am @@ -0,0 +1,7 @@ +noinst_LTLIBRARIES = libdamageext.la + +AM_CFLAGS = $(DIX_CFLAGS) + +libdamageext_la_SOURCES = \ + damageext.c \ + damageextint.h diff --git a/damageext/Makefile.in b/damageext/Makefile.in new file mode 100644 index 0000000..f566e7e --- /dev/null +++ b/damageext/Makefile.in @@ -0,0 +1,740 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = damageext +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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libdamageext_la_LIBADD = +am_libdamageext_la_OBJECTS = damageext.lo +libdamageext_la_OBJECTS = $(am_libdamageext_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libdamageext_la_SOURCES) +DIST_SOURCES = $(libdamageext_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libdamageext.la +AM_CFLAGS = $(DIX_CFLAGS) +libdamageext_la_SOURCES = \ + damageext.c \ + damageextint.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign damageext/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign damageext/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libdamageext.la: $(libdamageext_la_OBJECTS) $(libdamageext_la_DEPENDENCIES) $(EXTRA_libdamageext_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libdamageext_la_OBJECTS) $(libdamageext_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/damageext.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# 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/damageext/damageext.c b/damageext/damageext.c new file mode 100644 index 0000000..5650953 --- /dev/null +++ b/damageext/damageext.c @@ -0,0 +1,779 @@ +/* + * Copyright © 2002 Keith Packard + * Copyright 2013 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "damageextint.h" +#include "damagestr.h" +#include "protocol-versions.h" +#include "extinit.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" + +typedef struct { + DamageExtPtr ext; + DamagePtr damage[MAXSCREENS]; +} PanoramiXDamageRes; + +static RESTYPE XRT_DAMAGE; +static int (*PanoramiXSaveDamageCreate) (ClientPtr); + +#endif + +static unsigned char DamageReqCode; +static int DamageEventBase; +static RESTYPE DamageExtType; + +static DevPrivateKeyRec DamageClientPrivateKeyRec; + +#define DamageClientPrivateKey (&DamageClientPrivateKeyRec) + +static void +DamageNoteCritical(ClientPtr pClient) +{ + DamageClientPtr pDamageClient = GetDamageClient(pClient); + + /* Composite extension marks clients with manual Subwindows as critical */ + if (pDamageClient->critical > 0) { + SetCriticalOutputPending(); + pClient->smart_priority = SMART_MAX_PRIORITY; + } +} + +static void +damageGetGeometry(DrawablePtr draw, int *x, int *y, int *w, int *h) +{ +#ifdef PANORAMIX + if (!noPanoramiXExtension && draw->type == DRAWABLE_WINDOW) { + WindowPtr win = (WindowPtr)draw; + + if (!win->parent) { + *x = screenInfo.x; + *y = screenInfo.y; + *w = screenInfo.width; + *h = screenInfo.height; + return; + } + } +#endif + + *x = draw->x; + *y = draw->y; + *w = draw->width; + *h = draw->height; +} + +static void +DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) +{ + ClientPtr pClient = pDamageExt->pClient; + DrawablePtr pDrawable = pDamageExt->pDrawable; + xDamageNotifyEvent ev; + int i, x, y, w, h; + + damageGetGeometry(pDrawable, &x, &y, &w, &h); + + UpdateCurrentTimeIf(); + ev = (xDamageNotifyEvent) { + .type = DamageEventBase + XDamageNotify, + .level = pDamageExt->level, + .drawable = pDamageExt->drawable, + .damage = pDamageExt->id, + .timestamp = currentTime.milliseconds, + .geometry.x = x, + .geometry.y = y, + .geometry.width = w, + .geometry.height = h + }; + if (pBoxes) { + for (i = 0; i < nBoxes; i++) { + ev.level = pDamageExt->level; + if (i < nBoxes - 1) + ev.level |= DamageNotifyMore; + ev.area.x = pBoxes[i].x1; + ev.area.y = pBoxes[i].y1; + ev.area.width = pBoxes[i].x2 - pBoxes[i].x1; + ev.area.height = pBoxes[i].y2 - pBoxes[i].y1; + WriteEventsToClient(pClient, 1, (xEvent *) &ev); + } + } + else { + ev.area.x = 0; + ev.area.y = 0; + ev.area.width = w; + ev.area.height = h; + WriteEventsToClient(pClient, 1, (xEvent *) &ev); + } + + DamageNoteCritical(pClient); +} + +static void +DamageExtReport(DamagePtr pDamage, RegionPtr pRegion, void *closure) +{ + DamageExtPtr pDamageExt = closure; + + switch (pDamageExt->level) { + case DamageReportRawRegion: + case DamageReportDeltaRegion: + DamageExtNotify(pDamageExt, RegionRects(pRegion), + RegionNumRects(pRegion)); + break; + case DamageReportBoundingBox: + DamageExtNotify(pDamageExt, RegionExtents(pRegion), 1); + break; + case DamageReportNonEmpty: + DamageExtNotify(pDamageExt, NullBox, 0); + break; + case DamageReportNone: + break; + } +} + +static void +DamageExtDestroy(DamagePtr pDamage, void *closure) +{ + DamageExtPtr pDamageExt = closure; + + pDamageExt->pDamage = 0; + if (pDamageExt->id) + FreeResource(pDamageExt->id, RT_NONE); +} + +void +DamageExtSetCritical(ClientPtr pClient, Bool critical) +{ + DamageClientPtr pDamageClient = GetDamageClient(pClient); + + if (pDamageClient) + pDamageClient->critical += critical ? 1 : -1; +} + +static int +ProcDamageQueryVersion(ClientPtr client) +{ + DamageClientPtr pDamageClient = GetDamageClient(client); + xDamageQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0 + }; + + REQUEST(xDamageQueryVersionReq); + + REQUEST_SIZE_MATCH(xDamageQueryVersionReq); + + if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } + else { + rep.majorVersion = SERVER_DAMAGE_MAJOR_VERSION; + if (stuff->majorVersion == SERVER_DAMAGE_MAJOR_VERSION && + stuff->minorVersion < SERVER_DAMAGE_MINOR_VERSION) + rep.minorVersion = stuff->minorVersion; + else + rep.minorVersion = SERVER_DAMAGE_MINOR_VERSION; + } + pDamageClient->major_version = rep.majorVersion; + pDamageClient->minor_version = rep.minorVersion; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.majorVersion); + swapl(&rep.minorVersion); + } + WriteToClient(client, sizeof(xDamageQueryVersionReply), &rep); + return Success; +} + +static void +DamageExtRegister(DrawablePtr pDrawable, DamagePtr pDamage, Bool report) +{ + DamageSetReportAfterOp(pDamage, TRUE); + DamageRegister(pDrawable, pDamage); + + if (report) { + RegionPtr pRegion = &((WindowPtr) pDrawable)->borderClip; + RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y); + DamageReportDamage(pDamage, pRegion); + RegionTranslate(pRegion, pDrawable->x, pDrawable->y); + } +} + +static DamageExtPtr +DamageExtCreate(DrawablePtr pDrawable, DamageReportLevel level, + ClientPtr client, XID id, XID drawable) +{ + DamageExtPtr pDamageExt = malloc(sizeof(DamageExtRec)); + if (!pDamageExt) + return NULL; + + pDamageExt->id = id; + pDamageExt->drawable = drawable; + pDamageExt->pDrawable = pDrawable; + pDamageExt->level = level; + pDamageExt->pClient = client; + pDamageExt->pDamage = DamageCreate(DamageExtReport, DamageExtDestroy, level, + FALSE, pDrawable->pScreen, pDamageExt); + if (!pDamageExt->pDamage) { + free(pDamageExt); + return NULL; + } + + if (!AddResource(id, DamageExtType, (pointer) pDamageExt)) + return NULL; + + DamageExtRegister(pDrawable, pDamageExt->pDamage, + pDrawable->type == DRAWABLE_WINDOW); + + return pDamageExt; +} + +static DamageExtPtr +doDamageCreate(ClientPtr client, int *rc) +{ + DrawablePtr pDrawable; + DamageExtPtr pDamageExt; + DamageReportLevel level; + + REQUEST(xDamageCreateReq); + + *rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixGetAttrAccess | DixReadAccess); + if (*rc != Success) + return NULL; + + switch (stuff->level) { + case XDamageReportRawRectangles: + level = DamageReportRawRegion; + break; + case XDamageReportDeltaRectangles: + level = DamageReportDeltaRegion; + break; + case XDamageReportBoundingBox: + level = DamageReportBoundingBox; + break; + case XDamageReportNonEmpty: + level = DamageReportNonEmpty; + break; + default: + client->errorValue = stuff->level; + *rc = BadValue; + return NULL; + } + + pDamageExt = DamageExtCreate(pDrawable, level, client, stuff->damage, + stuff->drawable); + if (!pDamageExt) + *rc = BadAlloc; + + return pDamageExt; +} + +static int +ProcDamageCreate(ClientPtr client) +{ + int rc; + REQUEST(xDamageCreateReq); + REQUEST_SIZE_MATCH(xDamageCreateReq); + LEGAL_NEW_RESOURCE(stuff->damage, client); + doDamageCreate(client, &rc); + return rc; +} + +static int +ProcDamageDestroy(ClientPtr client) +{ + REQUEST(xDamageDestroyReq); + DamageExtPtr pDamageExt; + + REQUEST_SIZE_MATCH(xDamageDestroyReq); + VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); + FreeResource(stuff->damage, RT_NONE); + return Success; +} + +#ifdef PANORAMIX +static RegionPtr +DamageExtSubtractWindowClip(DamageExtPtr pDamageExt) +{ + WindowPtr win = (WindowPtr)pDamageExt->pDrawable; + PanoramiXRes *res = NULL; + RegionPtr ret; + int i; + + if (!win->parent) + return &PanoramiXScreenRegion; + + dixLookupResourceByType((void **)&res, win->drawable.id, XRT_WINDOW, + serverClient, DixReadAccess); + if (!res) + return NULL; + + ret = RegionCreate(NULL, 0); + if (!ret) + return NULL; + + FOR_NSCREENS_FORWARD(i) { + ScreenPtr screen; + if (Success != dixLookupWindow(&win, res->info[i].id, serverClient, + DixReadAccess)) + goto out; + + screen = win->drawable.pScreen; + + RegionTranslate(ret, -screen->x, -screen->y); + if (!RegionUnion(ret, ret, &win->borderClip)) + goto out; + RegionTranslate(ret, screen->x, screen->y); + } + + return ret; + +out: + RegionDestroy(ret); + return NULL; +} + +static void +DamageExtFreeWindowClip(RegionPtr reg) +{ + if (reg != &PanoramiXScreenRegion) + RegionDestroy(reg); +} +#endif + +/* + * DamageSubtract intersects with borderClip, so we must reconstruct the + * protocol's perspective of same... + */ +static Bool +DamageExtSubtract(DamageExtPtr pDamageExt, const RegionPtr pRegion) +{ + DamagePtr pDamage = pDamageExt->pDamage; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + RegionPtr damage = DamageRegion(pDamage); + RegionSubtract(damage, damage, pRegion); + + if (pDamageExt->pDrawable->type == DRAWABLE_WINDOW) { + DrawablePtr pDraw = pDamageExt->pDrawable; + RegionPtr clip = DamageExtSubtractWindowClip(pDamageExt); + if (clip) { + RegionTranslate(clip, -pDraw->x, -pDraw->y); + RegionIntersect(damage, damage, clip); + RegionTranslate(clip, pDraw->x, pDraw->y); + DamageExtFreeWindowClip(clip); + } + } + + return RegionNotEmpty(damage); + } +#endif + + return DamageSubtract(pDamage, pRegion); +} + +static int +ProcDamageSubtract(ClientPtr client) +{ + REQUEST(xDamageSubtractReq); + DamageExtPtr pDamageExt; + RegionPtr pRepair; + RegionPtr pParts; + + REQUEST_SIZE_MATCH(xDamageSubtractReq); + VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); + VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, DixWriteAccess); + VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, DixWriteAccess); + + if (pDamageExt->level != DamageReportRawRegion) { + DamagePtr pDamage = pDamageExt->pDamage; + + if (pRepair) { + if (pParts) + RegionIntersect(pParts, DamageRegion(pDamage), pRepair); + if (DamageExtSubtract(pDamageExt, pRepair)) + DamageExtReport(pDamage, DamageRegion(pDamage), + (void *) pDamageExt); + } + else { + if (pParts) + RegionCopy(pParts, DamageRegion(pDamage)); + DamageEmpty(pDamage); + } + } + + return Success; +} + +static int +ProcDamageAdd(ClientPtr client) +{ + REQUEST(xDamageAddReq); + DrawablePtr pDrawable; + RegionPtr pRegion; + int rc; + + REQUEST_SIZE_MATCH(xDamageAddReq); + VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixWriteAccess); + if (rc != Success) + return rc; + + /* The region is relative to the drawable origin, so translate it out to + * screen coordinates like damage expects. + */ + RegionTranslate(pRegion, pDrawable->x, pDrawable->y); + DamageDamageRegion(pDrawable, pRegion); + RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y); + + return Success; +} + +/* Major version controls available requests */ +static const int version_requests[] = { + X_DamageQueryVersion, /* before client sends QueryVersion */ + X_DamageAdd, /* Version 1 */ +}; + +#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) + +static int (*ProcDamageVector[XDamageNumberRequests]) (ClientPtr) = { + /*************** Version 1 ******************/ + ProcDamageQueryVersion, + ProcDamageCreate, + ProcDamageDestroy, + ProcDamageSubtract, + /*************** Version 1.1 ****************/ + ProcDamageAdd, +}; + +static int +ProcDamageDispatch(ClientPtr client) +{ + REQUEST(xDamageReq); + DamageClientPtr pDamageClient = GetDamageClient(client); + + if (pDamageClient->major_version >= NUM_VERSION_REQUESTS) + return BadRequest; + if (stuff->damageReqType > version_requests[pDamageClient->major_version]) + return BadRequest; + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageQueryVersion(ClientPtr client) +{ + REQUEST(xDamageQueryVersionReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDamageQueryVersionReq); + swapl(&stuff->majorVersion); + swapl(&stuff->minorVersion); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageCreate(ClientPtr client) +{ + REQUEST(xDamageCreateReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDamageCreateReq); + swapl(&stuff->damage); + swapl(&stuff->drawable); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageDestroy(ClientPtr client) +{ + REQUEST(xDamageDestroyReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDamageDestroyReq); + swapl(&stuff->damage); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageSubtract(ClientPtr client) +{ + REQUEST(xDamageSubtractReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDamageSubtractReq); + swapl(&stuff->damage); + swapl(&stuff->repair); + swapl(&stuff->parts); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int +SProcDamageAdd(ClientPtr client) +{ + REQUEST(xDamageAddReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDamageSubtractReq); + swapl(&stuff->drawable); + swapl(&stuff->region); + return (*ProcDamageVector[stuff->damageReqType]) (client); +} + +static int (*SProcDamageVector[XDamageNumberRequests]) (ClientPtr) = { + /*************** Version 1 ******************/ + SProcDamageQueryVersion, + SProcDamageCreate, + SProcDamageDestroy, + SProcDamageSubtract, + /*************** Version 1.1 ****************/ + SProcDamageAdd, +}; + +static int +SProcDamageDispatch(ClientPtr client) +{ + REQUEST(xDamageReq); + if (stuff->damageReqType >= XDamageNumberRequests) + return BadRequest; + return (*SProcDamageVector[stuff->damageReqType]) (client); +} + +static void +DamageClientCallback(CallbackListPtr *list, pointer closure, pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + DamageClientPtr pDamageClient = GetDamageClient(pClient); + + pDamageClient->critical = 0; + pDamageClient->major_version = 0; + pDamageClient->minor_version = 0; +} + + /*ARGSUSED*/ static void +DamageResetProc(ExtensionEntry * extEntry) +{ + DeleteCallback(&ClientStateCallback, DamageClientCallback, 0); +} + +static int +FreeDamageExt(pointer value, XID did) +{ + DamageExtPtr pDamageExt = (DamageExtPtr) value; + + /* + * Get rid of the resource table entry hanging from the window id + */ + pDamageExt->id = 0; + if (pDamageExt->pDamage) { + DamageDestroy(pDamageExt->pDamage); + } + free(pDamageExt); + return Success; +} + +static void +SDamageNotifyEvent(xDamageNotifyEvent * from, xDamageNotifyEvent * to) +{ + to->type = from->type; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->drawable, to->drawable); + cpswapl(from->damage, to->damage); + cpswaps(from->area.x, to->area.x); + cpswaps(from->area.y, to->area.y); + cpswaps(from->area.width, to->area.width); + cpswaps(from->area.height, to->area.height); + cpswaps(from->geometry.x, to->geometry.x); + cpswaps(from->geometry.y, to->geometry.y); + cpswaps(from->geometry.width, to->geometry.width); + cpswaps(from->geometry.height, to->geometry.height); +} + +#ifdef PANORAMIX + +static void +PanoramiXDamageReport(DamagePtr pDamage, RegionPtr pRegion, void *closure) +{ + PanoramiXDamageRes *res = closure; + DamageExtPtr pDamageExt = res->ext; + WindowPtr pWin = (WindowPtr)pDamage->pDrawable; + ScreenPtr pScreen = pDamage->pScreen; + + /* happens on unmap? sigh xinerama */ + if (RegionNil(pRegion)) + return; + + /* translate root windows if necessary */ + if (!pWin->parent) + RegionTranslate(pRegion, pScreen->x, pScreen->y); + + /* add our damage to the protocol view */ + DamageReportDamage(pDamageExt->pDamage, pRegion); + + /* empty our view */ + DamageEmpty(pDamage); +} + +static void +PanoramiXDamageExtDestroy(DamagePtr pDamage, void *closure) +{ + PanoramiXDamageRes *damage = closure; + damage->damage[pDamage->pScreen->myNum] = NULL; +} + +static int +PanoramiXDamageCreate(ClientPtr client) +{ + PanoramiXDamageRes *damage; + PanoramiXRes *draw; + int i, rc; + + REQUEST(xDamageCreateReq); + + REQUEST_SIZE_MATCH(xDamageCreateReq); + LEGAL_NEW_RESOURCE(stuff->damage, client); + rc = dixLookupResourceByClass((void **)&draw, stuff->drawable, XRC_DRAWABLE, + client, DixGetAttrAccess | DixReadAccess); + if (rc != Success) + return rc; + + if (!(damage = calloc(1, sizeof(PanoramiXDamageRes)))) + return BadAlloc; + + if (!AddResource(stuff->damage, XRT_DAMAGE, damage)) + return BadAlloc; + + damage->ext = doDamageCreate(client, &rc); + if (rc == Success && draw->type == XRT_WINDOW) { + FOR_NSCREENS_FORWARD(i) { + DrawablePtr pDrawable; + DamagePtr pDamage = DamageCreate(PanoramiXDamageReport, + PanoramiXDamageExtDestroy, + DamageReportRawRegion, + FALSE, + screenInfo.screens[i], + damage); + if (!pDamage) { + rc = BadAlloc; + } else { + damage->damage[i] = pDamage; + rc = dixLookupDrawable(&pDrawable, draw->info[i].id, client, + M_WINDOW, + DixGetAttrAccess | DixReadAccess); + } + if (rc != Success) + break; + + DamageExtRegister(pDrawable, pDamage, i != 0); + } + } + + if (rc != Success) + FreeResource(stuff->damage, RT_NONE); + + return rc; +} + +static int +PanoramiXDamageDelete(void *res, XID id) +{ + int i; + PanoramiXDamageRes *damage = res; + + FOR_NSCREENS_BACKWARD(i) { + if (damage->damage[i]) { + DamageDestroy(damage->damage[i]); + damage->damage[i] = NULL; + } + } + + free(damage); + return 1; +} + +void +PanoramiXDamageInit(void) +{ + XRT_DAMAGE = CreateNewResourceType(PanoramiXDamageDelete, "XineramaDamage"); + if (!XRT_DAMAGE) + FatalError("Couldn't Xineramify Damage extension\n"); + + PanoramiXSaveDamageCreate = ProcDamageVector[X_DamageCreate]; + ProcDamageVector[X_DamageCreate] = PanoramiXDamageCreate; +} + +void +PanoramiXDamageReset(void) +{ + ProcDamageVector[X_DamageCreate] = PanoramiXSaveDamageCreate; +} + +#endif /* PANORAMIX */ + +void +DamageExtensionInit(void) +{ + ExtensionEntry *extEntry; + int s; + + for (s = 0; s < screenInfo.numScreens; s++) + DamageSetup(screenInfo.screens[s]); + + DamageExtType = CreateNewResourceType(FreeDamageExt, "DamageExt"); + if (!DamageExtType) + return; + + if (!dixRegisterPrivateKey + (&DamageClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(DamageClientRec))) + return; + + if (!AddCallback(&ClientStateCallback, DamageClientCallback, 0)) + return; + + if ((extEntry = AddExtension(DAMAGE_NAME, XDamageNumberEvents, + XDamageNumberErrors, + ProcDamageDispatch, SProcDamageDispatch, + DamageResetProc, StandardMinorOpcode)) != 0) { + DamageReqCode = (unsigned char) extEntry->base; + DamageEventBase = extEntry->eventBase; + EventSwapVector[DamageEventBase + XDamageNotify] = + (EventSwapPtr) SDamageNotifyEvent; + SetResourceTypeErrorValue(DamageExtType, + extEntry->errorBase + BadDamage); +#ifdef PANORAMIX + if (XRT_DAMAGE) + SetResourceTypeErrorValue(XRT_DAMAGE, + extEntry->errorBase + BadDamage); +#endif + } +} diff --git a/damageext/damageextint.h b/damageext/damageextint.h new file mode 100644 index 0000000..e501495 --- /dev/null +++ b/damageext/damageextint.h @@ -0,0 +1,73 @@ +/* + * Copyright © 2002 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _DAMAGEEXTINT_H_ +#define _DAMAGEEXTINT_H_ + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include <X11/extensions/damageproto.h> +#include "windowstr.h" +#include "selection.h" +#include "scrnintstr.h" +#include "damage.h" +#include "xfixes.h" + +typedef struct _DamageClient { + CARD32 major_version; + CARD32 minor_version; + int critical; +} DamageClientRec, *DamageClientPtr; + +#define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey)) + +typedef struct _DamageExt { + DamagePtr pDamage; + DrawablePtr pDrawable; + DamageReportLevel level; + ClientPtr pClient; + XID id; + XID drawable; +} DamageExtRec, *DamageExtPtr; + +#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ + int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \ + DamageExtType, client, mode); \ + if (rc != Success) \ + return rc; \ +} + +void + DamageExtSetCritical(ClientPtr pClient, Bool critical); + +void PanoramiXDamageInit(void); +void PanoramiXDamageReset(void); + +#endif /* _DAMAGEEXTINT_H_ */ diff --git a/dbe/Makefile.am b/dbe/Makefile.am new file mode 100644 index 0000000..7d034c7 --- /dev/null +++ b/dbe/Makefile.am @@ -0,0 +1,12 @@ +noinst_LTLIBRARIES = libdbe.la + +AM_CFLAGS = $(DIX_CFLAGS) + +if XORG +sdk_HEADERS = dbestruct.h +endif + +libdbe_la_SOURCES = \ + dbe.c \ + midbe.c \ + midbe.h diff --git a/dbe/Makefile.in b/dbe/Makefile.in new file mode 100644 index 0000000..bc4bc52 --- /dev/null +++ b/dbe/Makefile.in @@ -0,0 +1,800 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = dbe +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libdbe_la_LIBADD = +am_libdbe_la_OBJECTS = dbe.lo midbe.lo +libdbe_la_OBJECTS = $(am_libdbe_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libdbe_la_SOURCES) +DIST_SOURCES = $(libdbe_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__sdk_HEADERS_DIST = dbestruct.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libdbe.la +AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = dbestruct.h +libdbe_la_SOURCES = \ + dbe.c \ + midbe.c \ + midbe.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dbe/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign dbe/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libdbe.la: $(libdbe_la_OBJECTS) $(libdbe_la_DEPENDENCIES) $(EXTRA_libdbe_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libdbe_la_OBJECTS) $(libdbe_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midbe.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +# 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/dbe/dbe.c b/dbe/dbe.c new file mode 100644 index 0000000..5524615 --- /dev/null +++ b/dbe/dbe.c @@ -0,0 +1,1464 @@ +/****************************************************************************** + * + * Copyright (c) 1994, 1995 Hewlett-Packard Company + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the Hewlett-Packard + * Company shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the Hewlett-Packard Company. + * + * DIX DBE code + * + *****************************************************************************/ + +/* INCLUDES */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <string.h> +#include <stdint.h> +#include <X11/X.h> +#include <X11/Xproto.h> +#include "scrnintstr.h" +#include "extnsionst.h" +#include "extinit.h" +#include "gcstruct.h" +#include "dixstruct.h" +#define NEED_DBE_PROTOCOL +#include "dbestruct.h" +#include "midbe.h" +#include "xace.h" + +/* GLOBALS */ + +/* These are globals for use by DDX */ +DevPrivateKeyRec dbeScreenPrivKeyRec; +DevPrivateKeyRec dbeWindowPrivKeyRec; + +/* These are globals for use by DDX */ +RESTYPE dbeDrawableResType; +RESTYPE dbeWindowPrivResType; + +/* Used to generate DBE's BadBuffer error. */ +static int dbeErrorBase; + +/****************************************************************************** + * + * DBE DIX Procedure: DbeStubScreen + * + * Description: + * + * This is function stubs the function pointers in the given DBE screen + * private and increments the number of stubbed screens. + * + *****************************************************************************/ + +static void +DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens) +{ + /* Stub DIX. */ + pDbeScreenPriv->SetupBackgroundPainter = NULL; + + /* Do not unwrap PositionWindow nor DestroyWindow. If the DDX + * initialization function failed, we assume that it did not wrap + * PositionWindow. Also, DestroyWindow is only wrapped if the DDX + * initialization function succeeded. + */ + + /* Stub DDX. */ + pDbeScreenPriv->GetVisualInfo = NULL; + pDbeScreenPriv->AllocBackBufferName = NULL; + pDbeScreenPriv->SwapBuffers = NULL; + pDbeScreenPriv->WinPrivDelete = NULL; + + (*nStubbedScreens)++; + +} /* DbeStubScreen() */ + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeGetVersion + * + * Description: + * + * This function is for processing a DbeGetVersion request. + * This request returns the major and minor version numbers of this + * extension. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +ProcDbeGetVersion(ClientPtr client) +{ + /* REQUEST(xDbeGetVersionReq); */ + xDbeGetVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = DBE_MAJOR_VERSION, + .minorVersion = DBE_MINOR_VERSION + }; + + REQUEST_SIZE_MATCH(xDbeGetVersionReq); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + } + + WriteToClient(client, sizeof(xDbeGetVersionReply), &rep); + + return Success; + +} /* ProcDbeGetVersion() */ + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeAllocateBackBufferName + * + * Description: + * + * This function is for processing a DbeAllocateBackBufferName request. + * This request allocates a drawable ID used to refer to the back buffer + * of a window. + * + * Return Values: + * + * BadAlloc - server can not allocate resources + * BadIDChoice - id is out of range for client; id is already in use + * BadMatch - window is not an InputOutput window; + * visual of window is not on list returned by + * DBEGetVisualInfo; + * BadValue - invalid swap action is specified + * BadWindow - window is not a valid window + * Success + * + *****************************************************************************/ + +static int +ProcDbeAllocateBackBufferName(ClientPtr client) +{ + REQUEST(xDbeAllocateBackBufferNameReq); + WindowPtr pWin; + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv; + XdbeScreenVisualInfo scrVisInfo; + register int i; + Bool visualMatched = FALSE; + xDbeSwapAction swapAction; + VisualID visual; + int status; + int add_index; + + REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); + + /* The window must be valid. */ + status = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); + if (status != Success) + return status; + + /* The window must be InputOutput. */ + if (pWin->drawable.class != InputOutput) { + return BadMatch; + } + + /* The swap action must be valid. */ + swapAction = stuff->swapAction; /* use local var for performance. */ + if ((swapAction != XdbeUndefined) && + (swapAction != XdbeBackground) && + (swapAction != XdbeUntouched) && (swapAction != XdbeCopied)) { + return BadValue; + } + + /* The id must be in range and not already in use. */ + LEGAL_NEW_RESOURCE(stuff->buffer, client); + + /* The visual of the window must be in the list returned by + * GetVisualInfo. + */ + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); + if (!pDbeScreenPriv->GetVisualInfo) + return BadMatch; /* screen doesn't support double buffering */ + + if (!(*pDbeScreenPriv->GetVisualInfo) (pWin->drawable.pScreen, &scrVisInfo)) { + /* GetVisualInfo() failed to allocate visual info data. */ + return BadAlloc; + } + + /* See if the window's visual is on the list. */ + visual = wVisual(pWin); + for (i = 0; (i < scrVisInfo.count) && !visualMatched; i++) { + if (scrVisInfo.visinfo[i].visual == visual) { + visualMatched = TRUE; + } + } + + /* Free what was allocated by the GetVisualInfo() call above. */ + free(scrVisInfo.visinfo); + + if (!visualMatched) { + return BadMatch; + } + + if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)) == NULL) { + /* There is no buffer associated with the window. + * Allocate a window priv. + */ + + pDbeWindowPriv = calloc(1, sizeof(DbeWindowPrivRec)); + if (!pDbeWindowPriv) + return BadAlloc; + + /* Fill out window priv information. */ + pDbeWindowPriv->pWindow = pWin; + pDbeWindowPriv->width = pWin->drawable.width; + pDbeWindowPriv->height = pWin->drawable.height; + pDbeWindowPriv->x = pWin->drawable.x; + pDbeWindowPriv->y = pWin->drawable.y; + pDbeWindowPriv->nBufferIDs = 0; + + /* Set the buffer ID array pointer to the initial (static) array). */ + pDbeWindowPriv->IDs = pDbeWindowPriv->initIDs; + + /* Initialize the buffer ID list. */ + pDbeWindowPriv->maxAvailableIDs = DBE_INIT_MAX_IDS; + pDbeWindowPriv->IDs[0] = stuff->buffer; + + add_index = 0; + for (i = 0; i < DBE_INIT_MAX_IDS; i++) { + pDbeWindowPriv->IDs[i] = DBE_FREE_ID_ELEMENT; + } + + /* Actually connect the window priv to the window. */ + dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, pDbeWindowPriv); + + } /* if -- There is no buffer associated with the window. */ + + else { + /* A buffer is already associated with the window. + * Add the new buffer ID to the array, reallocating the array memory + * if necessary. + */ + + /* Determine if there is a free element in the ID array. */ + for (i = 0; i < pDbeWindowPriv->maxAvailableIDs; i++) { + if (pDbeWindowPriv->IDs[i] == DBE_FREE_ID_ELEMENT) { + /* There is still room in the ID array. */ + break; + } + } + + if (i == pDbeWindowPriv->maxAvailableIDs) { + /* No more room in the ID array -- reallocate another array. */ + XID *pIDs; + + /* Setup an array pointer for the realloc operation below. */ + if (pDbeWindowPriv->maxAvailableIDs == DBE_INIT_MAX_IDS) { + /* We will malloc a new array. */ + pIDs = NULL; + } + else { + /* We will realloc a new array. */ + pIDs = pDbeWindowPriv->IDs; + } + + /* malloc/realloc a new array and initialize all elements to 0. */ + pDbeWindowPriv->IDs = (XID *) realloc(pIDs, + (pDbeWindowPriv-> + maxAvailableIDs + + DBE_INCR_MAX_IDS) * + sizeof(XID)); + if (!pDbeWindowPriv->IDs) { + return BadAlloc; + } + memset(&pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs], 0, + (pDbeWindowPriv->maxAvailableIDs + DBE_INCR_MAX_IDS - + pDbeWindowPriv->nBufferIDs) * sizeof(XID)); + + if (pDbeWindowPriv->maxAvailableIDs == DBE_INIT_MAX_IDS) { + /* We just went from using the initial (static) array to a + * newly allocated array. Copy the IDs from the initial array + * to the new array. + */ + memcpy(pDbeWindowPriv->IDs, pDbeWindowPriv->initIDs, + DBE_INIT_MAX_IDS * sizeof(XID)); + } + + pDbeWindowPriv->maxAvailableIDs += DBE_INCR_MAX_IDS; + } + + add_index = i; + + } /* else -- A buffer is already associated with the window. */ + + /* Call the DDX routine to allocate the back buffer. */ + status = (*pDbeScreenPriv->AllocBackBufferName) (pWin, stuff->buffer, + stuff->swapAction); + + if (status == Success) { + pDbeWindowPriv->IDs[add_index] = stuff->buffer; + if (!AddResource(stuff->buffer, dbeWindowPrivResType, + (pointer) pDbeWindowPriv)) { + pDbeWindowPriv->IDs[add_index] = DBE_FREE_ID_ELEMENT; + + if (pDbeWindowPriv->nBufferIDs == 0) { + status = BadAlloc; + goto out_free; + } + } + } + else { + /* The DDX buffer allocation routine failed for the first buffer of + * this window. + */ + if (pDbeWindowPriv->nBufferIDs == 0) { + goto out_free; + } + } + + /* Increment the number of buffers (XIDs) associated with this window. */ + pDbeWindowPriv->nBufferIDs++; + + /* Set swap action on all calls. */ + pDbeWindowPriv->swapAction = stuff->swapAction; + + return status; + + out_free: + dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, NULL); + free(pDbeWindowPriv); + return status; + +} /* ProcDbeAllocateBackBufferName() */ + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeDeallocateBackBufferName + * + * Description: + * + * This function is for processing a DbeDeallocateBackBufferName request. + * This request frees a drawable ID that was obtained by a + * DbeAllocateBackBufferName request. + * + * Return Values: + * + * BadBuffer - buffer to deallocate is not associated with a window + * Success + * + *****************************************************************************/ + +static int +ProcDbeDeallocateBackBufferName(ClientPtr client) +{ + REQUEST(xDbeDeallocateBackBufferNameReq); + DbeWindowPrivPtr pDbeWindowPriv; + int rc, i; + pointer val; + + REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); + + /* Buffer name must be valid */ + rc = dixLookupResourceByType((pointer *) &pDbeWindowPriv, stuff->buffer, + dbeWindowPrivResType, client, + DixDestroyAccess); + if (rc != Success) + return rc; + + rc = dixLookupResourceByType(&val, stuff->buffer, dbeDrawableResType, + client, DixDestroyAccess); + if (rc != Success) + return rc; + + /* Make sure that the id is valid for the window. + * This is paranoid code since we already looked up the ID by type + * above. + */ + + for (i = 0; i < pDbeWindowPriv->nBufferIDs; i++) { + /* Loop through the ID list to find the ID. */ + if (pDbeWindowPriv->IDs[i] == stuff->buffer) { + break; + } + } + + if (i == pDbeWindowPriv->nBufferIDs) { + /* We did not find the ID in the ID list. */ + client->errorValue = stuff->buffer; + return dbeErrorBase + DbeBadBuffer; + } + + FreeResource(stuff->buffer, RT_NONE); + + return Success; + +} /* ProcDbeDeallocateBackBufferName() */ + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeSwapBuffers + * + * Description: + * + * This function is for processing a DbeSwapBuffers request. + * This request swaps the buffers for all windows listed, applying the + * appropriate swap action for each window. + * + * Return Values: + * + * BadAlloc - local allocation failed; this return value is not defined + * by the protocol + * BadMatch - a window in request is not double-buffered; a window in + * request is listed more than once + * BadValue - invalid swap action is specified; no swap action is + * specified + * BadWindow - a window in request is not valid + * Success + * + *****************************************************************************/ + +static int +ProcDbeSwapBuffers(ClientPtr client) +{ + REQUEST(xDbeSwapBuffersReq); + WindowPtr pWin; + DbeScreenPrivPtr pDbeScreenPriv; + DbeSwapInfoPtr swapInfo; + xDbeSwapInfo *dbeSwapInfo; + int error; + register int i, j; + int nStuff; + + REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq); + nStuff = stuff->n; /* use local variable for performance. */ + + if (nStuff == 0) { + return Success; + } + + if (nStuff > UINT32_MAX / sizeof(DbeSwapInfoRec)) + return BadAlloc; + + /* Get to the swap info appended to the end of the request. */ + dbeSwapInfo = (xDbeSwapInfo *) &stuff[1]; + + /* Allocate array to record swap information. */ + swapInfo = (DbeSwapInfoPtr) malloc(nStuff * sizeof(DbeSwapInfoRec)); + if (swapInfo == NULL) { + return BadAlloc; + } + + for (i = 0; i < nStuff; i++) { + /* Check all windows to swap. */ + + /* Each window must be a valid window - BadWindow. */ + error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client, + DixWriteAccess); + if (error != Success) { + free(swapInfo); + return error; + } + + /* Each window must be double-buffered - BadMatch. */ + if (DBE_WINDOW_PRIV(pWin) == NULL) { + free(swapInfo); + return BadMatch; + } + + /* Each window must only be specified once - BadMatch. */ + for (j = i + 1; j < nStuff; j++) { + if (dbeSwapInfo[i].window == dbeSwapInfo[j].window) { + free(swapInfo); + return BadMatch; + } + } + + /* Each swap action must be valid - BadValue. */ + if ((dbeSwapInfo[i].swapAction != XdbeUndefined) && + (dbeSwapInfo[i].swapAction != XdbeBackground) && + (dbeSwapInfo[i].swapAction != XdbeUntouched) && + (dbeSwapInfo[i].swapAction != XdbeCopied)) { + free(swapInfo); + return BadValue; + } + + /* Everything checks out OK. Fill in the swap info array. */ + swapInfo[i].pWindow = pWin; + swapInfo[i].swapAction = dbeSwapInfo[i].swapAction; + + } /* for (i = 0; i < nStuff; i++) */ + + /* Call the DDX routine to perform the swap(s). The DDX routine should + * scan the swap list (swap info), swap any buffers that it knows how to + * handle, delete them from the list, and update nStuff to indicate how + * many windows it did not handle. + * + * This scheme allows a range of sophistication in the DDX SwapBuffers() + * implementation. Naive implementations could just swap the first buffer + * in the list, move the last buffer to the front, decrement nStuff, and + * return. The next level of sophistication could be to scan the whole + * list for windows on the same screen. Up another level, the DDX routine + * could deal with cross-screen synchronization. + */ + + while (nStuff > 0) { + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(swapInfo[0].pWindow); + error = (*pDbeScreenPriv->SwapBuffers) (client, &nStuff, swapInfo); + if (error != Success) { + free(swapInfo); + return error; + } + } + + free(swapInfo); + return Success; + +} /* ProcDbeSwapBuffers() */ + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeGetVisualInfo + * + * Description: + * + * This function is for processing a ProcDbeGetVisualInfo request. + * This request returns information about which visuals support + * double buffering. + * + * Return Values: + * + * BadDrawable - value in screen specifiers is not a valid drawable + * Success + * + *****************************************************************************/ + +static int +ProcDbeGetVisualInfo(ClientPtr client) +{ + REQUEST(xDbeGetVisualInfoReq); + DbeScreenPrivPtr pDbeScreenPriv; + xDbeGetVisualInfoReply rep; + Drawable *drawables; + DrawablePtr *pDrawables = NULL; + register int i, j, rc; + register int count; /* number of visual infos in reply */ + register int length; /* length of reply */ + ScreenPtr pScreen; + XdbeScreenVisualInfo *pScrVisInfo; + + REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq); + + if (stuff->n > UINT32_MAX / sizeof(DrawablePtr)) + return BadAlloc; + /* Make sure any specified drawables are valid. */ + if (stuff->n != 0) { + if (!(pDrawables = (DrawablePtr *) malloc(stuff->n * + sizeof(DrawablePtr)))) { + return BadAlloc; + } + + drawables = (Drawable *) &stuff[1]; + + for (i = 0; i < stuff->n; i++) { + rc = dixLookupDrawable(pDrawables + i, drawables[i], client, 0, + DixGetAttrAccess); + if (rc != Success) { + free(pDrawables); + return rc; + } + } + } + + count = (stuff->n == 0) ? screenInfo.numScreens : stuff->n; + if (!(pScrVisInfo = calloc(count, sizeof(XdbeScreenVisualInfo)))) { + free(pDrawables); + + return BadAlloc; + } + + length = 0; + + for (i = 0; i < count; i++) { + pScreen = (stuff->n == 0) ? screenInfo.screens[i] : + pDrawables[i]->pScreen; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); + if (rc != Success) + goto freeScrVisInfo; + + if (!(*pDbeScreenPriv->GetVisualInfo) (pScreen, &pScrVisInfo[i])) { + /* We failed to alloc pScrVisInfo[i].visinfo. */ + rc = BadAlloc; + + /* Free visinfos that we allocated for previous screen infos. */ + goto freeScrVisInfo; + } + + /* Account for n, number of xDbeVisInfo items in list. */ + length += sizeof(CARD32); + + /* Account for n xDbeVisInfo items */ + length += pScrVisInfo[i].count * sizeof(xDbeVisInfo); + } + + rep = (xDbeGetVisualInfoReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(length), + .m = count + }; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.m); + } + + /* Send off reply. */ + WriteToClient(client, sizeof(xDbeGetVisualInfoReply), &rep); + + for (i = 0; i < count; i++) { + CARD32 data32; + + /* For each screen in the reply, send off the visual info */ + + /* Send off number of visuals. */ + data32 = (CARD32) pScrVisInfo[i].count; + + if (client->swapped) { + swapl(&data32); + } + + WriteToClient(client, sizeof(CARD32), &data32); + + /* Now send off visual info items. */ + for (j = 0; j < pScrVisInfo[i].count; j++) { + xDbeVisInfo visInfo; + + /* Copy the data in the client data structure to a protocol + * data structure. We will send data to the client from the + * protocol data structure. + */ + + visInfo.visualID = (CARD32) pScrVisInfo[i].visinfo[j].visual; + visInfo.depth = (CARD8) pScrVisInfo[i].visinfo[j].depth; + visInfo.perfLevel = (CARD8) pScrVisInfo[i].visinfo[j].perflevel; + + if (client->swapped) { + swapl(&visInfo.visualID); + + /* We do not need to swap depth and perfLevel since they are + * already 1 byte quantities. + */ + } + + /* Write visualID(32), depth(8), perfLevel(8), and pad(16). */ + WriteToClient(client, 2 * sizeof(CARD32), &visInfo.visualID); + } + } + + rc = Success; + + freeScrVisInfo: + /* Clean up memory. */ + for (i = 0; i < count; i++) { + free(pScrVisInfo[i].visinfo); + } + free(pScrVisInfo); + + free(pDrawables); + + return rc; + +} /* ProcDbeGetVisualInfo() */ + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeGetbackBufferAttributes + * + * Description: + * + * This function is for processing a ProcDbeGetbackBufferAttributes + * request. This request returns information about a back buffer. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +ProcDbeGetBackBufferAttributes(ClientPtr client) +{ + REQUEST(xDbeGetBackBufferAttributesReq); + xDbeGetBackBufferAttributesReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0 + }; + DbeWindowPrivPtr pDbeWindowPriv; + int rc; + + REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); + + rc = dixLookupResourceByType((pointer *) &pDbeWindowPriv, stuff->buffer, + dbeWindowPrivResType, client, + DixGetAttrAccess); + if (rc == Success) { + rep.attributes = pDbeWindowPriv->pWindow->drawable.id; + } + else { + rep.attributes = None; + } + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.attributes); + } + + WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply), &rep); + return Success; + +} /* ProcDbeGetbackBufferAttributes() */ + +/****************************************************************************** + * + * DBE DIX Procedure: ProcDbeDispatch + * + * Description: + * + * This function dispatches DBE requests. + * + *****************************************************************************/ + +static int +ProcDbeDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_DbeGetVersion: + return (ProcDbeGetVersion(client)); + + case X_DbeAllocateBackBufferName: + return (ProcDbeAllocateBackBufferName(client)); + + case X_DbeDeallocateBackBufferName: + return (ProcDbeDeallocateBackBufferName(client)); + + case X_DbeSwapBuffers: + return (ProcDbeSwapBuffers(client)); + + case X_DbeBeginIdiom: + return Success; + + case X_DbeEndIdiom: + return Success; + + case X_DbeGetVisualInfo: + return (ProcDbeGetVisualInfo(client)); + + case X_DbeGetBackBufferAttributes: + return (ProcDbeGetBackBufferAttributes(client)); + + default: + return BadRequest; + } + +} /* ProcDbeDispatch() */ + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeGetVersion + * + * Description: + * + * This function is for processing a DbeGetVersion request on a swapped + * server. This request returns the major and minor version numbers of + * this extension. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +SProcDbeGetVersion(ClientPtr client) +{ + REQUEST(xDbeGetVersionReq); + + swaps(&stuff->length); + return (ProcDbeGetVersion(client)); + +} /* SProcDbeGetVersion() */ + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeAllocateBackBufferName + * + * Description: + * + * This function is for processing a DbeAllocateBackBufferName request on + * a swapped server. This request allocates a drawable ID used to refer + * to the back buffer of a window. + * + * Return Values: + * + * BadAlloc - server can not allocate resources + * BadIDChoice - id is out of range for client; id is already in use + * BadMatch - window is not an InputOutput window; + * visual of window is not on list returned by + * DBEGetVisualInfo; + * BadValue - invalid swap action is specified + * BadWindow - window is not a valid window + * Success + * + *****************************************************************************/ + +static int +SProcDbeAllocateBackBufferName(ClientPtr client) +{ + REQUEST(xDbeAllocateBackBufferNameReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); + + swapl(&stuff->window); + swapl(&stuff->buffer); + /* stuff->swapAction is a byte. We do not need to swap this field. */ + + return (ProcDbeAllocateBackBufferName(client)); + +} /* SProcDbeAllocateBackBufferName() */ + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeDeallocateBackBufferName + * + * Description: + * + * This function is for processing a DbeDeallocateBackBufferName request + * on a swapped server. This request frees a drawable ID that was + * obtained by a DbeAllocateBackBufferName request. + * + * Return Values: + * + * BadBuffer - buffer to deallocate is not associated with a window + * Success + * + *****************************************************************************/ + +static int +SProcDbeDeallocateBackBufferName(ClientPtr client) +{ + REQUEST(xDbeDeallocateBackBufferNameReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); + + swapl(&stuff->buffer); + + return (ProcDbeDeallocateBackBufferName(client)); + +} /* SProcDbeDeallocateBackBufferName() */ + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeSwapBuffers + * + * Description: + * + * This function is for processing a DbeSwapBuffers request on a swapped + * server. This request swaps the buffers for all windows listed, + * applying the appropriate swap action for each window. + * + * Return Values: + * + * BadMatch - a window in request is not double-buffered; a window in + * request is listed more than once; all windows in request do + * not have the same root + * BadValue - invalid swap action is specified + * BadWindow - a window in request is not valid + * Success + * + *****************************************************************************/ + +static int +SProcDbeSwapBuffers(ClientPtr client) +{ + REQUEST(xDbeSwapBuffersReq); + register int i; + xDbeSwapInfo *pSwapInfo; + + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq); + + swapl(&stuff->n); + + if (stuff->n != 0) { + pSwapInfo = (xDbeSwapInfo *) stuff + 1; + + /* The swap info following the fix part of this request is a window(32) + * followed by a 1 byte swap action and then 3 pad bytes. We only need + * to swap the window information. + */ + for (i = 0; i < stuff->n; i++) { + swapl(&pSwapInfo->window); + } + } + + return (ProcDbeSwapBuffers(client)); + +} /* SProcDbeSwapBuffers() */ + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeGetVisualInfo + * + * Description: + * + * This function is for processing a ProcDbeGetVisualInfo request on a + * swapped server. This request returns information about which visuals + * support double buffering. + * + * Return Values: + * + * BadDrawable - value in screen specifiers is not a valid drawable + * Success + * + *****************************************************************************/ + +static int +SProcDbeGetVisualInfo(ClientPtr client) +{ + REQUEST(xDbeGetVisualInfoReq); + + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq); + + swapl(&stuff->n); + SwapRestL(stuff); + + return (ProcDbeGetVisualInfo(client)); + +} /* SProcDbeGetVisualInfo() */ + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeGetbackBufferAttributes + * + * Description: + * + * This function is for processing a ProcDbeGetbackBufferAttributes + * request on a swapped server. This request returns information about a + * back buffer. + * + * Return Values: + * + * Success + * + *****************************************************************************/ + +static int +SProcDbeGetBackBufferAttributes(ClientPtr client) +{ + REQUEST(xDbeGetBackBufferAttributesReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); + + swapl(&stuff->buffer); + + return (ProcDbeGetBackBufferAttributes(client)); + +} /* SProcDbeGetBackBufferAttributes() */ + +/****************************************************************************** + * + * DBE DIX Procedure: SProcDbeDispatch + * + * Description: + * + * This function dispatches DBE requests on a swapped server. + * + *****************************************************************************/ + +static int +SProcDbeDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) { + case X_DbeGetVersion: + return (SProcDbeGetVersion(client)); + + case X_DbeAllocateBackBufferName: + return (SProcDbeAllocateBackBufferName(client)); + + case X_DbeDeallocateBackBufferName: + return (SProcDbeDeallocateBackBufferName(client)); + + case X_DbeSwapBuffers: + return (SProcDbeSwapBuffers(client)); + + case X_DbeBeginIdiom: + return Success; + + case X_DbeEndIdiom: + return Success; + + case X_DbeGetVisualInfo: + return (SProcDbeGetVisualInfo(client)); + + case X_DbeGetBackBufferAttributes: + return (SProcDbeGetBackBufferAttributes(client)); + + default: + return BadRequest; + } + +} /* SProcDbeDispatch() */ + +/****************************************************************************** + * + * DBE DIX Procedure: DbeSetupBackgroundPainter + * + * Description: + * + * This function sets up pGC to clear pixmaps. + * + * Return Values: + * + * TRUE - setup was successful + * FALSE - the window's background state is NONE + * + *****************************************************************************/ + +static Bool +DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) +{ + ChangeGCVal gcvalues[4]; + int ts_x_origin, ts_y_origin; + PixUnion background; + int backgroundState; + Mask gcmask; + + /* First take care of any ParentRelative stuff by altering the + * tile/stipple origin to match the coordinates of the upper-left + * corner of the first ancestor without a ParentRelative background. + * This coordinate is, of course, negative. + */ + ts_x_origin = ts_y_origin = 0; + while (pWin->backgroundState == ParentRelative) { + ts_x_origin -= pWin->origin.x; + ts_y_origin -= pWin->origin.y; + + pWin = pWin->parent; + } + backgroundState = pWin->backgroundState; + background = pWin->background; + + switch (backgroundState) { + case BackgroundPixel: + gcvalues[0].val = background.pixel; + gcvalues[1].val = FillSolid; + gcmask = GCForeground | GCFillStyle; + break; + + case BackgroundPixmap: + gcvalues[0].val = FillTiled; + gcvalues[1].ptr = background.pixmap; + gcvalues[2].val = ts_x_origin; + gcvalues[3].val = ts_y_origin; + gcmask = GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; + break; + + default: + /* pWin->backgroundState == None */ + return FALSE; + } + + return ChangeGC(NullClient, pGC, gcmask, gcvalues) == 0; +} /* DbeSetupBackgroundPainter() */ + +/****************************************************************************** + * + * DBE DIX Procedure: DbeDrawableDelete + * + * Description: + * + * This is the resource delete function for dbeDrawableResType. + * It is registered when the drawable resource type is created in + * DbeExtensionInit(). + * + * To make resource deletion simple, we do not do anything in this function + * and leave all resource deleteion to DbeWindowPrivDelete(), which will + * eventually be called or already has been called. Deletion functions are + * not guaranteed to be called in any particular order. + * + *****************************************************************************/ +static int +DbeDrawableDelete(pointer pDrawable, XID id) +{ + return Success; + +} /* DbeDrawableDelete() */ + +/****************************************************************************** + * + * DBE DIX Procedure: DbeWindowPrivDelete + * + * Description: + * + * This is the resource delete function for dbeWindowPrivResType. + * It is registered when the drawable resource type is created in + * DbeExtensionInit(). + * + *****************************************************************************/ +static int +DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) +{ + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv = (DbeWindowPrivPtr) pDbeWinPriv; + int i; + + /* + ************************************************************************** + ** Remove the buffer ID from the ID array. + ************************************************************************** + */ + + /* Find the ID in the ID array. */ + i = 0; + while ((i < pDbeWindowPriv->nBufferIDs) && (pDbeWindowPriv->IDs[i] != id)) { + i++; + } + + if (i == pDbeWindowPriv->nBufferIDs) { + /* We did not find the ID in the array. We should never get here. */ + return BadValue; + } + + /* Remove the ID from the array. */ + + if (i < (pDbeWindowPriv->nBufferIDs - 1)) { + /* Compress the buffer ID array, overwriting the ID in the process. */ + memmove(&pDbeWindowPriv->IDs[i], &pDbeWindowPriv->IDs[i + 1], + (pDbeWindowPriv->nBufferIDs - i - 1) * sizeof(XID)); + } + else { + /* We are removing the last ID in the array, in which case, the + * assignement below is all that we need to do. + */ + } + pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs - 1] = DBE_FREE_ID_ELEMENT; + + pDbeWindowPriv->nBufferIDs--; + + /* If an extended array was allocated, then check to see if the remaining + * buffer IDs will fit in the static array. + */ + + if ((pDbeWindowPriv->maxAvailableIDs > DBE_INIT_MAX_IDS) && + (pDbeWindowPriv->nBufferIDs == DBE_INIT_MAX_IDS)) { + /* Copy the IDs back into the static array. */ + memcpy(pDbeWindowPriv->initIDs, pDbeWindowPriv->IDs, + DBE_INIT_MAX_IDS * sizeof(XID)); + + /* Free the extended array; use the static array. */ + free(pDbeWindowPriv->IDs); + pDbeWindowPriv->IDs = pDbeWindowPriv->initIDs; + pDbeWindowPriv->maxAvailableIDs = DBE_INIT_MAX_IDS; + } + + /* + ************************************************************************** + ** Perform DDX level tasks. + ************************************************************************** + */ + + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW_PRIV((DbeWindowPrivPtr) + pDbeWindowPriv); + (*pDbeScreenPriv->WinPrivDelete) ((DbeWindowPrivPtr) pDbeWindowPriv, id); + + /* + ************************************************************************** + ** Perform miscellaneous tasks if this is the last buffer associated + ** with the window. + ************************************************************************** + */ + + if (pDbeWindowPriv->nBufferIDs == 0) { + /* Reset the DBE window priv pointer. */ + dixSetPrivate(&pDbeWindowPriv->pWindow->devPrivates, dbeWindowPrivKey, + NULL); + + /* We are done with the window priv. */ + free(pDbeWindowPriv); + } + + return Success; + +} /* DbeWindowPrivDelete() */ + +/****************************************************************************** + * + * DBE DIX Procedure: DbeResetProc + * + * Description: + * + * This routine is called at the end of every server generation. + * It deallocates any memory reserved for the extension and performs any + * other tasks related to shutting down the extension. + * + *****************************************************************************/ +static void +DbeResetProc(ExtensionEntry * extEntry) +{ + int i; + ScreenPtr pScreen; + DbeScreenPrivPtr pDbeScreenPriv; + + for (i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + if (pDbeScreenPriv) { + /* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit(). */ + pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow; + pScreen->PositionWindow = pDbeScreenPriv->PositionWindow; + free(pDbeScreenPriv); + } + } +} /* DbeResetProc() */ + +/****************************************************************************** + * + * DBE DIX Procedure: DbeDestroyWindow + * + * Description: + * + * This is the wrapper for pScreen->DestroyWindow. + * This function frees buffer resources for a window before it is + * destroyed. + * + *****************************************************************************/ + +static Bool +DbeDestroyWindow(WindowPtr pWin) +{ + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv; + ScreenPtr pScreen; + Bool ret; + + /* + ************************************************************************** + ** 1. Unwrap the member routine. + ************************************************************************** + */ + + pScreen = pWin->drawable.pScreen; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow; + + /* + ************************************************************************** + ** 2. Do any work necessary before the member routine is called. + ** + ** Call the window priv delete function for all buffer IDs associated + ** with this window. + ************************************************************************** + */ + + if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) { + while (pDbeWindowPriv) { + /* *DbeWinPrivDelete() will free the window private and set it to + * NULL if there are no more buffer IDs associated with this + * window. + */ + FreeResource(pDbeWindowPriv->IDs[0], RT_NONE); + pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); + } + } + + /* + ************************************************************************** + ** 3. Call the member routine, saving its result if necessary. + ************************************************************************** + */ + + ret = (*pScreen->DestroyWindow) (pWin); + + /* + ************************************************************************** + ** 4. Rewrap the member routine, restoring the wrapper value first in case + ** the wrapper (or something that it wrapped) change this value. + ************************************************************************** + */ + + pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = DbeDestroyWindow; + + /* + ************************************************************************** + ** 5. Do any work necessary after the member routine has been called. + ** + ** In this case we do not need to do anything. + ************************************************************************** + */ + + return ret; + +} /* DbeDestroyWindow() */ + +/****************************************************************************** + * + * DBE DIX Procedure: DbeExtensionInit + * + * Description: + * + * Called from InitExtensions in main() + * + *****************************************************************************/ + +void +DbeExtensionInit(void) +{ + ExtensionEntry *extEntry; + register int i, j; + ScreenPtr pScreen = NULL; + DbeScreenPrivPtr pDbeScreenPriv; + int nStubbedScreens = 0; + Bool ddxInitSuccess; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return; +#endif + + /* Create the resource types. */ + dbeDrawableResType = + CreateNewResourceType(DbeDrawableDelete, "dbeDrawable"); + if (!dbeDrawableResType) + return; + dbeDrawableResType |= RC_DRAWABLE; + + dbeWindowPrivResType = + CreateNewResourceType(DbeWindowPrivDelete, "dbeWindow"); + if (!dbeWindowPrivResType) + return; + + if (!dixRegisterPrivateKey(&dbeScreenPrivKeyRec, PRIVATE_SCREEN, 0)) + return; + + if (!dixRegisterPrivateKey(&dbeWindowPrivKeyRec, PRIVATE_WINDOW, 0)) + return; + + for (i = 0; i < screenInfo.numScreens; i++) { + /* For each screen, set up DBE screen privates and init DIX and DDX + * interface. + */ + + pScreen = screenInfo.screens[i]; + + if (!(pDbeScreenPriv = malloc(sizeof(DbeScreenPrivRec)))) { + /* If we can not alloc a window or screen private, + * then free any privates that we already alloc'ed and return + */ + + for (j = 0; j < i; j++) { + free(dixLookupPrivate(&screenInfo.screens[j]->devPrivates, + dbeScreenPrivKey)); + dixSetPrivate(&screenInfo.screens[j]->devPrivates, + dbeScreenPrivKey, NULL); + } + return; + } + + dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, pDbeScreenPriv); + + { + /* We don't have DDX support for DBE anymore */ + +#ifndef DISABLE_MI_DBE_BY_DEFAULT + /* Setup DIX. */ + pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter; + + /* Setup DDX. */ + ddxInitSuccess = miDbeInit(pScreen, pDbeScreenPriv); + + /* DDX DBE initialization may have the side affect of + * reallocating pDbeScreenPriv, so we need to update it. + */ + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + if (ddxInitSuccess) { + /* Wrap DestroyWindow. The DDX initialization function + * already wrapped PositionWindow for us. + */ + + pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; + pScreen->DestroyWindow = DbeDestroyWindow; + } + else { + /* DDX initialization failed. Stub the screen. */ + DbeStubScreen(pDbeScreenPriv, &nStubbedScreens); + } +#else + DbeStubScreen(pDbeScreenPriv, &nStubbedScreens); +#endif + + } + + } /* for (i = 0; i < screenInfo.numScreens; i++) */ + + if (nStubbedScreens == screenInfo.numScreens) { + /* All screens stubbed. Clean up and return. */ + + for (i = 0; i < screenInfo.numScreens; i++) { + free(dixLookupPrivate(&screenInfo.screens[i]->devPrivates, + dbeScreenPrivKey)); + dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, NULL); + } + return; + } + + /* Now add the extension. */ + extEntry = AddExtension(DBE_PROTOCOL_NAME, DbeNumberEvents, + DbeNumberErrors, ProcDbeDispatch, SProcDbeDispatch, + DbeResetProc, StandardMinorOpcode); + + dbeErrorBase = extEntry->errorBase; + SetResourceTypeErrorValue(dbeWindowPrivResType, + dbeErrorBase + DbeBadBuffer); + SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer); + +} /* DbeExtensionInit() */ diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h new file mode 100644 index 0000000..2002066 --- /dev/null +++ b/dbe/dbestruct.h @@ -0,0 +1,202 @@ +/****************************************************************************** + * + * Copyright (c) 1994, 1995 Hewlett-Packard Company + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the Hewlett-Packard + * Company shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the Hewlett-Packard Company. + * + * Header file for DIX-related DBE + * + *****************************************************************************/ + +#ifndef DBE_STRUCT_H +#define DBE_STRUCT_H + +/* INCLUDES */ + +#define NEED_DBE_PROTOCOL +#include <X11/extensions/dbeproto.h> +#include "windowstr.h" +#include "privates.h" + +typedef struct { + VisualID visual; /* one visual ID that supports double-buffering */ + int depth; /* depth of visual in bits */ + int perflevel; /* performance level of visual */ +} XdbeVisualInfo; + +typedef struct { + int count; /* number of items in visual_depth */ + XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */ +} XdbeScreenVisualInfo; + +/* DEFINES */ + +#define DBE_SCREEN_PRIV(pScreen) ((DbeScreenPrivPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, dbeScreenPrivKey)) + +#define DBE_SCREEN_PRIV_FROM_DRAWABLE(pDrawable) \ + DBE_SCREEN_PRIV((pDrawable)->pScreen) + +#define DBE_SCREEN_PRIV_FROM_WINDOW_PRIV(pDbeWindowPriv) \ + DBE_SCREEN_PRIV((pDbeWindowPriv)->pWindow->drawable.pScreen) + +#define DBE_SCREEN_PRIV_FROM_WINDOW(pWindow) \ + DBE_SCREEN_PRIV((pWindow)->drawable.pScreen) + +#define DBE_SCREEN_PRIV_FROM_PIXMAP(pPixmap) \ + DBE_SCREEN_PRIV((pPixmap)->drawable.pScreen) + +#define DBE_SCREEN_PRIV_FROM_GC(pGC)\ + DBE_SCREEN_PRIV((pGC)->pScreen) + +#define DBE_WINDOW_PRIV(pWin) ((DbeWindowPrivPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, dbeWindowPrivKey)) + +/* Initial size of the buffer ID array in the window priv. */ +#define DBE_INIT_MAX_IDS 2 + +/* Reallocation increment for the buffer ID array. */ +#define DBE_INCR_MAX_IDS 4 + +/* Marker for free elements in the buffer ID array. */ +#define DBE_FREE_ID_ELEMENT 0 + +/* TYPEDEFS */ + +/* Record used to pass swap information between DIX and DDX swapping + * procedures. + */ +typedef struct _DbeSwapInfoRec { + WindowPtr pWindow; + unsigned char swapAction; + +} DbeSwapInfoRec, *DbeSwapInfoPtr; + +/* + ****************************************************************************** + ** Per-window data + ****************************************************************************** + */ + +typedef struct _DbeWindowPrivRec { + /* A pointer to the window with which the DBE window private (buffer) is + * associated. + */ + WindowPtr pWindow; + + /* Last known swap action for this buffer. Legal values for this field + * are XdbeUndefined, XdbeBackground, XdbeUntouched, and XdbeCopied. + */ + unsigned char swapAction; + + /* Last known buffer size. + */ + unsigned short width, height; + + /* Coordinates used for static gravity when the window is positioned. + */ + short x, y; + + /* Number of XIDs associated with this buffer. + */ + int nBufferIDs; + + /* Capacity of the current buffer ID array, IDs. */ + int maxAvailableIDs; + + /* Pointer to the array of buffer IDs. This initially points to initIDs. + * When the static limit of the initIDs array is reached, the array is + * reallocated and this pointer is set to the new array instead of initIDs. + */ + XID *IDs; + + /* Initial array of buffer IDs. We are defining the XID array within the + * window priv to optimize for data locality. In most cases, only one + * buffer will be associated with a window. Having the array declared + * here can prevent us from accessing the data in another memory page, + * possibly resulting in a page swap and loss of performance. Initially we + * will use this array to store buffer IDs. For situations where we have + * more IDs than can fit in this static array, we will allocate a larger + * array to use, possibly suffering a performance loss. + */ + XID initIDs[DBE_INIT_MAX_IDS]; + + /* Pointer to a drawable that contains the contents of the back buffer. + */ + PixmapPtr pBackBuffer; + + /* Pointer to a drawable that contains the contents of the front buffer. + * This pointer is only used for the XdbeUntouched swap action. For that + * swap action, we need to copy the front buffer (window) contents into + * this drawable, copy the contents of current back buffer drawable (the + * back buffer) into the window, swap the front and back drawable pointers, + * and then swap the drawable/resource associations in the resource + * database. + */ + PixmapPtr pFrontBuffer; + + /* Device-specific private information. + */ + PrivateRec *devPrivates; + +} DbeWindowPrivRec, *DbeWindowPrivPtr; + +/* + ****************************************************************************** + ** Per-screen data + ****************************************************************************** + */ + +typedef struct _DbeScreenPrivRec { + /* Wrapped functions + * It is the responsibilty of the DDX layer to wrap PositionWindow(). + * DbeExtensionInit wraps DestroyWindow(). + */ + PositionWindowProcPtr PositionWindow; + DestroyWindowProcPtr DestroyWindow; + + /* Per-screen DIX routines */ + Bool (*SetupBackgroundPainter) (WindowPtr /*pWin */ , + GCPtr /*pGC */ + ); + + /* Per-screen DDX routines */ + Bool (*GetVisualInfo) (ScreenPtr /*pScreen */ , + XdbeScreenVisualInfo * /*pVisInfo */ + ); + int (*AllocBackBufferName) (WindowPtr /*pWin */ , + XID /*bufId */ , + int /*swapAction */ + ); + int (*SwapBuffers) (ClientPtr /*client */ , + int * /*pNumWindows */ , + DbeSwapInfoPtr /*swapInfo */ + ); + void (*WinPrivDelete) (DbeWindowPrivPtr /*pDbeWindowPriv */ , + XID /*bufId */ + ); +} DbeScreenPrivRec, *DbeScreenPrivPtr; + +#endif /* DBE_STRUCT_H */ diff --git a/dbe/midbe.c b/dbe/midbe.c new file mode 100644 index 0000000..3663fdd --- /dev/null +++ b/dbe/midbe.c @@ -0,0 +1,687 @@ +/****************************************************************************** + * + * Copyright (c) 1994, 1995 Hewlett-Packard Company + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the Hewlett-Packard + * Company shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the Hewlett-Packard Company. + * + * Machine-independent DBE code + * + *****************************************************************************/ + +/* INCLUDES */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "os.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "resource.h" +#include "opaque.h" +#include "dbestruct.h" +#include "regionstr.h" +#include "gcstruct.h" +#include "inputstr.h" +#include "midbe.h" +#include "xace.h" + +#include <stdio.h> + + +/****************************************************************************** + * + * DBE MI Procedure: miDbeGetVisualInfo + * + * Description: + * + * This is the MI function for the DbeGetVisualInfo request. This function + * is called through pDbeScreenPriv->GetVisualInfo. This function is also + * called for the DbeAllocateBackBufferName request at the extension level; + * it is called by ProcDbeAllocateBackBufferName() in dbe.c. + * + * If memory allocation fails or we can not get the visual info, this + * function returns FALSE. Otherwise, it returns TRUE for success. + * + *****************************************************************************/ + +static Bool +miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo * pScrVisInfo) +{ + register int i, j, k; + register int count; + DepthPtr pDepth; + XdbeVisualInfo *visInfo; + + /* Determine number of visuals for this screen. */ + for (i = 0, count = 0; i < pScreen->numDepths; i++) { + count += pScreen->allowedDepths[i].numVids; + } + + /* Allocate an array of XdbeVisualInfo items. */ + if (!(visInfo = (XdbeVisualInfo *) malloc(count * sizeof(XdbeVisualInfo)))) { + return FALSE; /* memory alloc failure */ + } + + for (i = 0, k = 0; i < pScreen->numDepths; i++) { + /* For each depth of this screen, get visual information. */ + + pDepth = &pScreen->allowedDepths[i]; + + for (j = 0; j < pDepth->numVids; j++) { + /* For each visual for this depth of this screen, get visual ID + * and visual depth. Since this is MI code, we will always return + * the same performance level for all visuals (0). A higher + * performance level value indicates higher performance. + */ + visInfo[k].visual = pDepth->vids[j]; + visInfo[k].depth = pDepth->depth; + visInfo[k].perflevel = 0; + k++; + } + } + + /* Record the number of visuals and point visual_depth to + * the array of visual info. + */ + pScrVisInfo->count = count; + pScrVisInfo->visinfo = visInfo; + + return TRUE; /* success */ + +} /* miDbeGetVisualInfo() */ + +/****************************************************************************** + * + * DBE MI Procedure: miAllocBackBufferName + * + * Description: + * + * This is the MI function for the DbeAllocateBackBufferName request. + * + *****************************************************************************/ + +static int +miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) +{ + ScreenPtr pScreen; + DbeWindowPrivPtr pDbeWindowPriv; + DbeScreenPrivPtr pDbeScreenPriv; + GCPtr pGC; + xRectangle clearRect; + int rc; + + pScreen = pWin->drawable.pScreen; + pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); + + if (pDbeWindowPriv->nBufferIDs == 0) { + /* There is no buffer associated with the window. + * We have to create the window priv priv. Remember, the window + * priv was created at the DIX level, so all we need to do is + * create the priv priv and attach it to the priv. + */ + + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + + /* Get a front pixmap. */ + if (!(pDbeWindowPriv->pFrontBuffer = + (*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width, + pDbeWindowPriv->height, + pWin->drawable.depth, 0))) { + return BadAlloc; + } + + /* Get a back pixmap. */ + if (!(pDbeWindowPriv->pBackBuffer = + (*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width, + pDbeWindowPriv->height, + pWin->drawable.depth, 0))) { + (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); + return BadAlloc; + } + + /* Security creation/labeling check. */ + rc = XaceHook(XACE_RESOURCE_ACCESS, serverClient, bufId, + dbeDrawableResType, pDbeWindowPriv->pBackBuffer, + RT_WINDOW, pWin, DixCreateAccess); + + /* Make the back pixmap a DBE drawable resource. */ + if (rc != Success || !AddResource(bufId, dbeDrawableResType, + pDbeWindowPriv->pBackBuffer)) { + /* free the buffer and the drawable resource */ + FreeResource(bufId, RT_NONE); + return (rc == Success) ? BadAlloc : rc; + } + + /* Clear the back buffer. */ + pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); + if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) { + ValidateGC((DrawablePtr) pDbeWindowPriv->pBackBuffer, pGC); + clearRect.x = clearRect.y = 0; + clearRect.width = pDbeWindowPriv->pBackBuffer->drawable.width; + clearRect.height = pDbeWindowPriv->pBackBuffer->drawable.height; + (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPriv-> + pBackBuffer, pGC, 1, &clearRect); + } + FreeScratchGC(pGC); + + } /* if no buffer associated with the window */ + + else { + /* A buffer is already associated with the window. + * Place the new buffer ID information at the head of the ID list. + */ + + /* Associate the new ID with an existing pixmap. */ + if (!AddResource(bufId, dbeDrawableResType, + (pointer) pDbeWindowPriv->pBackBuffer)) { + return BadAlloc; + } + + } + + return Success; + +} /* miDbeAllocBackBufferName() */ + +/****************************************************************************** + * + * DBE MI Procedure: miDbeAliasBuffers + * + * Description: + * + * This function associates all XIDs of a buffer with the back pixmap + * stored in the window priv. + * + *****************************************************************************/ + +static void +miDbeAliasBuffers(DbeWindowPrivPtr pDbeWindowPriv) +{ + int i; + + for (i = 0; i < pDbeWindowPriv->nBufferIDs; i++) { + ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType, + (pointer) pDbeWindowPriv->pBackBuffer); + } + +} /* miDbeAliasBuffers() */ + +/****************************************************************************** + * + * DBE MI Procedure: miDbeSwapBuffers + * + * Description: + * + * This is the MI function for the DbeSwapBuffers request. + * + *****************************************************************************/ + +static int +miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo) +{ + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv; + GCPtr pGC; + WindowPtr pWin; + PixmapPtr pTmpBuffer; + xRectangle clearRect; + + pWin = swapInfo[0].pWindow; + pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); + pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); + pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); + + /* + ********************************************************************** + ** Setup before swap. + ********************************************************************** + */ + + switch (swapInfo[0].swapAction) { + case XdbeUndefined: + break; + + case XdbeBackground: + break; + + case XdbeUntouched: + ValidateGC((DrawablePtr) pDbeWindowPriv->pFrontBuffer, pGC); + (*pGC->ops->CopyArea) ((DrawablePtr) pWin, + (DrawablePtr) pDbeWindowPriv->pFrontBuffer, + pGC, 0, 0, pWin->drawable.width, + pWin->drawable.height, 0, 0); + break; + + case XdbeCopied: + break; + + } + + /* + ********************************************************************** + ** Swap. + ********************************************************************** + */ + + ValidateGC((DrawablePtr) pWin, pGC); + (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer, + (DrawablePtr) pWin, pGC, 0, 0, + pWin->drawable.width, pWin->drawable.height, 0, 0); + + /* + ********************************************************************** + ** Tasks after swap. + ********************************************************************** + */ + + switch (swapInfo[0].swapAction) { + case XdbeUndefined: + break; + + case XdbeBackground: + if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) { + ValidateGC((DrawablePtr) pDbeWindowPriv->pBackBuffer, pGC); + clearRect.x = 0; + clearRect.y = 0; + clearRect.width = pDbeWindowPriv->pBackBuffer->drawable.width; + clearRect.height = pDbeWindowPriv->pBackBuffer->drawable.height; + (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPriv-> + pBackBuffer, pGC, 1, &clearRect); + } + break; + + case XdbeUntouched: + /* Swap pixmap pointers. */ + pTmpBuffer = pDbeWindowPriv->pBackBuffer; + pDbeWindowPriv->pBackBuffer = pDbeWindowPriv->pFrontBuffer; + pDbeWindowPriv->pFrontBuffer = pTmpBuffer; + + miDbeAliasBuffers(pDbeWindowPriv); + + break; + + case XdbeCopied: + break; + + } + + /* Remove the swapped window from the swap information array and decrement + * pNumWindows to indicate to the DIX level how many windows were actually + * swapped. + */ + + if (*pNumWindows > 1) { + /* We were told to swap more than one window, but we only swapped the + * first one. Remove the first window in the list by moving the last + * window to the beginning. + */ + swapInfo[0].pWindow = swapInfo[*pNumWindows - 1].pWindow; + swapInfo[0].swapAction = swapInfo[*pNumWindows - 1].swapAction; + + /* Clear the last window information just to be safe. */ + swapInfo[*pNumWindows - 1].pWindow = (WindowPtr) NULL; + swapInfo[*pNumWindows - 1].swapAction = 0; + } + else { + /* Clear the window information just to be safe. */ + swapInfo[0].pWindow = (WindowPtr) NULL; + swapInfo[0].swapAction = 0; + } + + (*pNumWindows)--; + + FreeScratchGC(pGC); + + return Success; + +} /* miSwapBuffers() */ + +/****************************************************************************** + * + * DBE MI Procedure: miDbeWinPrivDelete + * + * Description: + * + * This is the MI function for deleting the dbeWindowPrivResType resource. + * This function is invoked indirectly by calling FreeResource() to free + * the resources associated with a DBE buffer ID. There are 5 ways that + * miDbeWinPrivDelete() can be called by FreeResource(). They are: + * + * - A DBE window is destroyed, in which case the DbeDestroyWindow() + * wrapper is invoked. The wrapper calls FreeResource() for all DBE + * buffer IDs. + * + * - miDbeAllocBackBufferName() calls FreeResource() to clean up resources + * after a buffer allocation failure. + * + * - The PositionWindow wrapper, miDbePositionWindow(), calls + * FreeResource() when it fails to create buffers of the new size. + * FreeResource() is called for all DBE buffer IDs. + * + * - FreeClientResources() calls FreeResource() when a client dies or the + * the server resets. + * + * When FreeResource() is called for a DBE buffer ID, the delete function + * for the only other type of DBE resource, dbeDrawableResType, is also + * invoked. This delete function (DbeDrawableDelete) is a NOOP to make + * resource deletion easier. It is not guaranteed which delete function is + * called first. Hence, we will let miDbeWinPrivDelete() free all DBE + * resources. + * + * This function deletes/frees the following stuff associated with + * the window private: + * + * - the ID node in the ID list representing the passed in ID. + * + * In addition, pDbeWindowPriv->nBufferIDs is decremented. + * + * If this function is called for the last/only buffer ID for a window, + * these are additionally deleted/freed: + * + * - the front and back pixmaps + * - the window priv itself + * + *****************************************************************************/ + +static void +miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId) +{ + if (pDbeWindowPriv->nBufferIDs != 0) { + /* We still have at least one more buffer ID associated with this + * window. + */ + return; + } + + /* We have no more buffer IDs associated with this window. We need to + * free some stuff. + */ + + /* Destroy the front and back pixmaps. */ + if (pDbeWindowPriv->pFrontBuffer) { + (*pDbeWindowPriv->pWindow->drawable.pScreen-> + DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); + } + if (pDbeWindowPriv->pBackBuffer) { + (*pDbeWindowPriv->pWindow->drawable.pScreen-> + DestroyPixmap) (pDbeWindowPriv->pBackBuffer); + } +} /* miDbeWinPrivDelete() */ + +/****************************************************************************** + * + * DBE MI Procedure: miDbePositionWindow + * + * Description: + * + * This function was cloned from miMbxPositionWindow() in mimultibuf.c. + * This function resizes the buffer when the window is resized. + * + *****************************************************************************/ + +static Bool +miDbePositionWindow(WindowPtr pWin, int x, int y) +{ + ScreenPtr pScreen; + DbeScreenPrivPtr pDbeScreenPriv; + DbeWindowPrivPtr pDbeWindowPriv; + int width, height; + int dx, dy, dw, dh; + int sourcex, sourcey; + int destx, desty; + int savewidth, saveheight; + PixmapPtr pFrontBuffer; + PixmapPtr pBackBuffer; + Bool clear; + GCPtr pGC; + xRectangle clearRect; + Bool ret; + + /* + ************************************************************************** + ** 1. Unwrap the member routine. + ************************************************************************** + */ + + pScreen = pWin->drawable.pScreen; + pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); + pScreen->PositionWindow = pDbeScreenPriv->PositionWindow; + + /* + ************************************************************************** + ** 2. Do any work necessary before the member routine is called. + ** + ** In this case we do not need to do anything. + ************************************************************************** + */ + + /* + ************************************************************************** + ** 3. Call the member routine, saving its result if necessary. + ************************************************************************** + */ + + ret = (*pScreen->PositionWindow) (pWin, x, y); + + /* + ************************************************************************** + ** 4. Rewrap the member routine, restoring the wrapper value first in case + ** the wrapper (or something that it wrapped) change this value. + ************************************************************************** + */ + + pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = miDbePositionWindow; + + /* + ************************************************************************** + ** 5. Do any work necessary after the member routine has been called. + ************************************************************************** + */ + + if (!(pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) { + return ret; + } + + if (pDbeWindowPriv->width == pWin->drawable.width && + pDbeWindowPriv->height == pWin->drawable.height) { + return ret; + } + + width = pWin->drawable.width; + height = pWin->drawable.height; + + dx = pWin->drawable.x - pDbeWindowPriv->x; + dy = pWin->drawable.y - pDbeWindowPriv->y; + dw = width - pDbeWindowPriv->width; + dh = height - pDbeWindowPriv->height; + + GravityTranslate(0, 0, -dx, -dy, dw, dh, pWin->bitGravity, &destx, &desty); + + clear = ((pDbeWindowPriv->width < (unsigned short) width) || + (pDbeWindowPriv->height < (unsigned short) height) || + (pWin->bitGravity == ForgetGravity)); + + sourcex = 0; + sourcey = 0; + savewidth = pDbeWindowPriv->width; + saveheight = pDbeWindowPriv->height; + + /* Clip rectangle to source and destination. */ + if (destx < 0) { + savewidth += destx; + sourcex -= destx; + destx = 0; + } + + if (destx + savewidth > width) { + savewidth = width - destx; + } + + if (desty < 0) { + saveheight += desty; + sourcey -= desty; + desty = 0; + } + + if (desty + saveheight > height) { + saveheight = height - desty; + } + + pDbeWindowPriv->width = width; + pDbeWindowPriv->height = height; + pDbeWindowPriv->x = pWin->drawable.x; + pDbeWindowPriv->y = pWin->drawable.y; + + pGC = GetScratchGC(pWin->drawable.depth, pScreen); + + if (clear) { + if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) { + clearRect.x = 0; + clearRect.y = 0; + clearRect.width = width; + clearRect.height = height; + } + else { + clear = FALSE; + } + } + + /* Create DBE buffer pixmaps equal to size of resized window. */ + pFrontBuffer = (*pScreen->CreatePixmap) (pScreen, width, height, + pWin->drawable.depth, 0); + + pBackBuffer = (*pScreen->CreatePixmap) (pScreen, width, height, + pWin->drawable.depth, 0); + + if (!pFrontBuffer || !pBackBuffer) { + /* We failed at creating 1 or 2 of the pixmaps. */ + + if (pFrontBuffer) { + (*pScreen->DestroyPixmap) (pFrontBuffer); + } + + if (pBackBuffer) { + (*pScreen->DestroyPixmap) (pBackBuffer); + } + + /* Destroy all buffers for this window. */ + while (pDbeWindowPriv) { + /* DbeWindowPrivDelete() will free the window private if there no + * more buffer IDs associated with this window. + */ + FreeResource(pDbeWindowPriv->IDs[0], RT_NONE); + pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); + } + + FreeScratchGC(pGC); + return FALSE; + } + + else { + /* Clear out the new DBE buffer pixmaps. */ + + /* I suppose this could avoid quite a bit of work if + * it computed the minimal area required. + */ + ValidateGC(&pFrontBuffer->drawable, pGC); + if (clear) { + (*pGC->ops->PolyFillRect) ((DrawablePtr) pFrontBuffer, pGC, 1, + &clearRect); + } + /* Copy the contents of the old front pixmap to the new one. */ + if (pWin->bitGravity != ForgetGravity) { + (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pFrontBuffer, + (DrawablePtr) pFrontBuffer, pGC, + sourcex, sourcey, savewidth, saveheight, + destx, desty); + } + + ValidateGC(&pBackBuffer->drawable, pGC); + if (clear) { + (*pGC->ops->PolyFillRect) ((DrawablePtr) pBackBuffer, pGC, 1, + &clearRect); + } + /* Copy the contents of the old back pixmap to the new one. */ + if (pWin->bitGravity != ForgetGravity) { + (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer, + (DrawablePtr) pBackBuffer, pGC, + sourcex, sourcey, savewidth, saveheight, + destx, desty); + } + + /* Destroy the old pixmaps, and point the DBE window priv to the new + * pixmaps. + */ + + (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); + (*pScreen->DestroyPixmap) (pDbeWindowPriv->pBackBuffer); + + pDbeWindowPriv->pFrontBuffer = pFrontBuffer; + pDbeWindowPriv->pBackBuffer = pBackBuffer; + + /* Make sure all XID are associated with the new back pixmap. */ + miDbeAliasBuffers(pDbeWindowPriv); + + FreeScratchGC(pGC); + } + + return ret; + +} /* miDbePositionWindow() */ + +/****************************************************************************** + * + * DBE MI Procedure: miDbeInit + * + * Description: + * + * This is the MI initialization function called by DbeExtensionInit(). + * + *****************************************************************************/ + +Bool +miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv) +{ + /* Wrap functions. */ + pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = miDbePositionWindow; + + /* Initialize the per-screen DBE function pointers. */ + pDbeScreenPriv->GetVisualInfo = miDbeGetVisualInfo; + pDbeScreenPriv->AllocBackBufferName = miDbeAllocBackBufferName; + pDbeScreenPriv->SwapBuffers = miDbeSwapBuffers; + pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete; + + return TRUE; + +} /* miDbeInit() */ diff --git a/dbe/midbe.h b/dbe/midbe.h new file mode 100644 index 0000000..4eed538 --- /dev/null +++ b/dbe/midbe.h @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) 1994, 1995 Hewlett-Packard Company + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the Hewlett-Packard + * Company shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the Hewlett-Packard Company. + * + * Header file for users of machine-independent DBE code + * + *****************************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef MIDBE_H +#define MIDBE_H + +#include "privates.h" + +/* EXTERNS */ + +extern Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv); + +extern DevPrivateKeyRec dbeScreenPrivKeyRec; + +#define dbeScreenPrivKey (&dbeScreenPrivKeyRec) + +extern DevPrivateKeyRec dbeWindowPrivKeyRec; + +#define dbeWindowPrivKey (&dbeWindowPrivKeyRec) + +extern RESTYPE dbeDrawableResType; +extern RESTYPE dbeWindowPrivResType; + +#endif /* MIDBE_H */ diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..25a39e6 --- /dev/null +++ b/depcomp @@ -0,0 +1,708 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2012-03-27.16; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependent.h'. + # Do two passes, one to just change these to + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\': + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Do two passes, one to just change these to + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' "$nl" < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/devbook.am b/devbook.am new file mode 100644 index 0000000..400b2ca --- /dev/null +++ b/devbook.am @@ -0,0 +1,55 @@ +# +# Generate output formats for a single DocBook/XML with/without chapters +# +# Variables set by the calling Makefile: +# noinst_DATA: developers docs are not installed +# docbook: the main DocBook/XML file, no chapters, appendix or image files +# chapters: all files pulled in by an XInclude statement and images. +# + +# +# This makefile is intended for Developers Documentation and is not installed. +# Do not use for Users docs or Specs which need to be installed and require olink support +# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 +# for an explanation on documents classification. +# + +# Developers documnetation is not installed +noinst_DATA = + +# DocBook/XML file with chapters, appendix and images it includes +dist_noinst_DATA = $(docbook) $(chapters) + +if HAVE_STYLESHEETS + +XMLTO_HTML_FLAGS = \ + --searchpath "$(XORG_SGML_PATH)/X11" \ + --searchpath "$(abs_top_builddir)" \ + -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl + +noinst_DATA += $(docbook:.xml=.html) +%.html: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< + +if HAVE_XMLTO_TEXT +noinst_DATA += $(docbook:.xml=.txt) +%.txt: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< +endif HAVE_XMLTO_TEXT + +if HAVE_FOP +XMLTO_FO_FLAGS = \ + --searchpath "$(XORG_SGML_PATH)/X11" \ + --searchpath "$(abs_top_builddir)" \ + --stringparam img.src.path=$(abs_builddir)/ \ + -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl + +noinst_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps) +%.pdf: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< +%.ps: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< +endif HAVE_FOP +endif HAVE_STYLESHEETS + +CLEANFILES = $(noinst_DATA) diff --git a/dix/BuiltInAtoms b/dix/BuiltInAtoms new file mode 100644 index 0000000..910c627 --- /dev/null +++ b/dix/BuiltInAtoms @@ -0,0 +1,329 @@ +File: .../x11/server/dix/BuiltInAtoms + +This file is of a fixed format and is used to generate both the file +include/XAtom.h and dix/initatoms.c. Neither of those files should be +edited directly. Changing the atoms in this file, or even the order in +which they occur, is equivalent to forcing a new (minor) version number +on the server. Take care. + +The format of the file is that each built in atom starts in column 1 +with no text, other than spaces and tabs, on that line other than a +mandatory trailing "@" at the end of the line. For each atom (Foo) +below the defines will be of the form + #define XA_Foo <n> +and the string value of the atom will be "Foo". + +The comment lines in this file are not guaranteed to be accurate. To see the +current truth, look at the Xlib documentation as well as the protocol spec. + +Atoms occur in five distinct name spaces within the protocol. Any particular +atom may or may not have some client interpretation within each of the name +spaces. For each of the built in atoms, the intended semantics and the space +within which it is defined is indicated. + +Those name spaces are + Property names + Property types + Selections + Font properties + Type of a ClientMessage event (none built into server) + +For the font properties mentioned here, see the spec for more information. + + -- Selections -- + +PRIMARY @ + Selection. +SECONDARY @ + Selection. + + -- Property types and names -- + +ARC @ + Property type: + x, y: INT16 + width, height: CARD16, + angle1, angle2: INT16 +ATOM @ + Property type: + atom: ATOM +BITMAP @ + Property type: + bitmap: PIXMAP + This is asserted to be of depth 1. +CARDINAL @ + Property type: + card: CARD32 or CARD16 or CARD8 + the datum size is dependent on the property format +COLORMAP @ + Property type: + colormap: COLORMAP +CURSOR @ + Property type: + cursor: CURSOR +CUT_BUFFER0 @ +CUT_BUFFER1 @ +CUT_BUFFER2 @ +CUT_BUFFER3 @ +CUT_BUFFER4 @ +CUT_BUFFER5 @ +CUT_BUFFER6 @ +CUT_BUFFER7 @ + Property name: (type: STRING) + Used to implement cut buffer ring, in particular Andrew uses + this mechanism. Anyone else using this sort of IPC mechanism + should use these properties. + + Data is normally fetched and stored out of CUT_BUFFER0; the + RotateProperties request is used to rotate these buffers. +DRAWABLE @ + Property type: + drawable: DRAWABLE +FONT @ + Property type: + font: FONT +INTEGER @ + Property type: + card: INT32 or INT16 or INT8 + the datum size is dependent on the property format +PIXMAP @ + Property type: + pixmap: PIXMAP +POINT @ + Property type: + x, y: INT16 +RECTANGLE @ + Property type: + x, y: INT16 + width, height: CARD16 +RESOURCE_MANAGER @ + Property name: (type: STRING) + Contents of the user's resource manager data base. +RGB_COLOR_MAP @ + Property type: + colormap: COLORMAP + red-max: CARD32 + red-mult: CARD32 + green-max: CARD32 + green-mult: CARD32 + blue-max: CARD32 + blue-mult: CARD32 + base-pixel: CARD32 + + The fields `red_max', `green_max', and `blue_max' give the maximum + red, green, and blue values, respectively. Each color + coefficient ranges from 0 to its max, inclusive. For example, + a common colormap allocation is 3/3/2: 3 planes for red, 3 + planes for green, and 2 planes for blue. Such a colormap would + have red_max == 7, green_max = 7, and blue_max = 3. An alternate + allocation that uses only 216 colors is red_max = 5, green_max = + 5, and blue_max = 5. + + The fields `red_mult', `green_mult', and `blue_mult' give the + scale factors used to compose a full pixel value. (See next + paragraph.) For a 3/3/2 allocation red_mult might be 32, + green_mult might be 4, and blue_mult might be 1. For a + 6-colors-each allocation, red_mult might be 36, green_mult might + be 6, and blue_mult might be 1. + + The field `base_pixel' gives the base pixel value used to + compose a full pixel value. Normally base_pixel is obtained + from a call to XAllocColorPlanes(). Given integer red, green, + and blue coefficients in their appropriate ranges, one can + compute a corresponding pixel value with the expression: + + r * red_mult + g * green_mult + b * blue_mult + base_pixel + + For gray-scale colormaps, only the colormap, red_max, red_mult, + and base_pixel fields are defined; the other fields are + ignored. To compute a gray-scale pixel value, use: + + gray * red_mult + base_pixel + + This is provided to allow applications to share color maps. + +RGB_BEST_MAP @ +RGB_BLUE_MAP @ +RGB_DEFAULT_MAP @ +RGB_GRAY_MAP @ +RGB_GREEN_MAP @ +RGB_RED_MAP @ + Property name: (type: RGB_COLOR_MAP) + The needs of most applications can be met with five colormaps. + Polite applications may need only a small RGB space, and can + use a portion of the default color map. Applications doing + high-quality RGB rendering will need an entire colormap, + filled with as large an RGB space as possible, e.g. 332. For + color separations, an application may need maximum device + resolution for each of red, green, and blue, even if this + requires three renderings with three colormaps. + + Each of the above five names would be used for sharing color + maps. +STRING @ + Property type: + sequence of Bytes +VISUALID @ + Property type: + visual: VISUALID +WINDOW @ + Property type: + window: WINDOW +WM_COMMAND @ + Property name: (type: STRING) + Command line arguments used to invoke this application. The + arguments are delimited by null characters (ASCII 0). +WM_HINTS @ + Property type: + flags: CARD32 + input: BOOL32 + initial-state: CARD32 + icon-pixmap: PIXMAP + icon-window: WINDOW + icon_mask: BITMAP + icon-x, icon-y: INT32 + flags contains the following bits + 0x00000001 input hint + 0x00000002 state hint + 0x00000004 icon pixmap hint + 0x00000008 icon window hint + 0x00000010 icon position hint + values for initial-state + 0 unspecified -> application does not + care and WM should pick one. + 1 normal + 2 zoomed + 3 iconic + 4 inactive -> application believes + itself to be seldomly used. WM may wish to + place it on an inactive menu. + This type is potentially extensible. The order is critical; + append to the end only. + Property name: (type: WM_HINTS) + Additional hints set by the client for use by the window + manager. +WM_CLIENT_MACHINE @ + Property name: (type: STRING) + used to communicate with the window manager. The host name + of the machine the client is running on may be set here. +WM_ICON_NAME @ + Property name: (type: STRING) + what the application would like the label to be for + the iconic form of the window. +WM_ICON_SIZE @ + Property type: + minWidth, min-height: CARD32 + maxWidth, max-height: CARD32 + widthInc, height-inc: CARD32 + Property name: (type: ICON_SIZE) + The window manager may set this property on the root window + to specify the icon sizes it allows. +WM_NAME @ + Property name: (type: STRING) + used to communicate with the window manager. This is + what the application would like the label for the window. +WM_NORMAL_HINTS @ + Property name: (type: SIZE_HINTS) + used to communicate with the window manager. This is size + hints for a window in its "normal" state. +WM_SIZE_HINTS @ + Property type: + flags: CARD32 + x, y: INT32 + width, height: CARD32 + min-width, min-height: CARD32 + max-width, max-height: CARD32 + width-inc, height-inc: CARD32 + min-aspect-x, min-aspect-y: CARD32 + max-aspect-x, max-aspect-y: CARD32 + flags contains the following bits + 0x00000001 user specified x and y + 0x00000002 user specified width and height + 0x00000004 program specified position + 0x00000008 program specified size + 0x00000010 program specified minimum size + 0x00000020 program specified maximum size + 0x00000040 program specified resize increment + 0x00000080 program specified aspect ratio + This type is potentially extensible. The order is critical; + append to the end only. +WM_ZOOM_HINTS @ + Property name: (type: SIZE_HINTS) + used to communicate with the window manager. This is size + hints for a window in its "zoomed" state. + + -- Font properties -- + +MIN_SPACE @ + Font property: CARD32 +NORM_SPACE @ + Font property: CARD32 +MAX_SPACE @ + Font property: CARD32 +END_SPACE @ + Font property: CARD32 +SUPERSCRIPT_X @ + Font property: INT32 +SUPERSCRIPT_Y @ + Font property: INT32 +SUBSCRIPT_X @ + Font property: INT32 +SUBSCRIPT_Y @ + Font property: INT32 +UNDERLINE_POSITION @ + Font property: INT32 +UNDERLINE_THICKNESS @ + Font property: CARD32 +STRIKEOUT_ASCENT @ + Font property: INT32 +STRIKEOUT_DESCENT @ + Font property: INT32 +ITALIC_ANGLE @ + Font property: INT32 +X_HEIGHT @ + Font property: INT32 +QUAD_WIDTH @ + Font property: INT32 +WEIGHT @ + Font property: CARD32 +POINT_SIZE @ + Font property: CARD32 +RESOLUTION @ + Font property: CARD32 + +The following optional properties on fonts have values that are atoms. The +atom print name is the useful information. + +COPYRIGHT @ + of the font distribution +NOTICE @ + trademark/copyright of the character shapes +FONT_NAME @ + name of this particular instance of a font +FAMILY_NAME @ + name of the 'font family' to which it belongs +FULL_NAME @ + full text name of the font + +The following aren't in order but putting them at the end avoids encoding +changes. + +CAP_HEIGHT @ + Font property: CARD32 + + +WM_CLASS @ + Property name: (type: STRING) + Used (possibly by some window managers; definitely by + session managers) to look up resources in the resource + data base on behalf of the client who set this property. + There are 2 elements: + {char *resource_name; char *resource_class;} + delimited by a null character (ascii 0) + +WM_TRANSIENT_FOR @ + Property name: (type: WINDOW) + Used by transient top-level windows, such as dialog + boxes, to point to their logical "parents". The window + manager can then take down the dialog boxes when the + "parent" gets iconified, for instance. diff --git a/dix/Makefile.am b/dix/Makefile.am new file mode 100644 index 0000000..e7ca236 --- /dev/null +++ b/dix/Makefile.am @@ -0,0 +1,74 @@ +noinst_LTLIBRARIES = libdix.la libmain.la + +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(DIX_CFLAGS) + +libmain_la_SOURCES = \ + stubmain.c + +libdix_la_SOURCES = \ + atom.c \ + colormap.c \ + cursor.c \ + devices.c \ + dispatch.c \ + dispatch.h \ + dixfonts.c \ + main.c \ + dixutils.c \ + enterleave.c \ + enterleave.h \ + events.c \ + eventconvert.c \ + extension.c \ + ffs.c \ + gc.c \ + getevents.c \ + globals.c \ + glyphcurs.c \ + grabs.c \ + initatoms.c \ + inpututils.c \ + pixmap.c \ + privates.c \ + property.c \ + ptrveloc.c \ + region.c \ + registry.c \ + resource.c \ + selection.c \ + swaprep.c \ + swapreq.c \ + tables.c \ + touch.c \ + window.c + +EXTRA_DIST = buildatoms BuiltInAtoms Xserver.d Xserver-dtrace.h.in + +# Install list of protocol names +miscconfigdir = $(SERVER_MISC_CONFIG_PATH) +dist_miscconfig_DATA = protocol.txt + +if XSERVER_DTRACE +# Generate dtrace header file for C sources to include +BUILT_SOURCES = Xserver-dtrace.h + +Xserver-dtrace.h: $(srcdir)/Xserver.d + $(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \ + || cp Xserver-dtrace.h.in $@ + +endif + +if SPECIAL_DTRACE_OBJECTS +# Generate dtrace object code for probes in libdix +dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) + $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) + +noinst_PROGRAMS = dix.O + +dix_O_SOURCES = +dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) + $(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) +endif + +CLEANFILES = Xserver-dtrace.h diff --git a/dix/Makefile.in b/dix/Makefile.in new file mode 100644 index 0000000..7067174 --- /dev/null +++ b/dix/Makefile.in @@ -0,0 +1,922 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@SPECIAL_DTRACE_OBJECTS_TRUE@noinst_PROGRAMS = dix.O$(EXEEXT) +subdir = dix +DIST_COMMON = $(dist_miscconfig_DATA) $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libdix_la_LIBADD = +am_libdix_la_OBJECTS = atom.lo colormap.lo cursor.lo devices.lo \ + dispatch.lo dixfonts.lo main.lo dixutils.lo enterleave.lo \ + events.lo eventconvert.lo extension.lo ffs.lo gc.lo \ + getevents.lo globals.lo glyphcurs.lo grabs.lo initatoms.lo \ + inpututils.lo pixmap.lo privates.lo property.lo ptrveloc.lo \ + region.lo registry.lo resource.lo selection.lo swaprep.lo \ + swapreq.lo tables.lo touch.lo window.lo +libdix_la_OBJECTS = $(am_libdix_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +libmain_la_LIBADD = +am_libmain_la_OBJECTS = stubmain.lo +libmain_la_OBJECTS = $(am_libmain_la_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +am_dix_O_OBJECTS = +dix_O_OBJECTS = $(am_dix_O_OBJECTS) +dix_O_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) $(dix_O_SOURCES) +DIST_SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) \ + $(dix_O_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(miscconfigdir)" +DATA = $(dist_miscconfig_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libdix.la libmain.la +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CFLAGS = $(DIX_CFLAGS) +libmain_la_SOURCES = \ + stubmain.c + +libdix_la_SOURCES = \ + atom.c \ + colormap.c \ + cursor.c \ + devices.c \ + dispatch.c \ + dispatch.h \ + dixfonts.c \ + main.c \ + dixutils.c \ + enterleave.c \ + enterleave.h \ + events.c \ + eventconvert.c \ + extension.c \ + ffs.c \ + gc.c \ + getevents.c \ + globals.c \ + glyphcurs.c \ + grabs.c \ + initatoms.c \ + inpututils.c \ + pixmap.c \ + privates.c \ + property.c \ + ptrveloc.c \ + region.c \ + registry.c \ + resource.c \ + selection.c \ + swaprep.c \ + swapreq.c \ + tables.c \ + touch.c \ + window.c + +EXTRA_DIST = buildatoms BuiltInAtoms Xserver.d Xserver-dtrace.h.in + +# Install list of protocol names +miscconfigdir = $(SERVER_MISC_CONFIG_PATH) +dist_miscconfig_DATA = protocol.txt + +# Generate dtrace header file for C sources to include +@XSERVER_DTRACE_TRUE@BUILT_SOURCES = Xserver-dtrace.h +@SPECIAL_DTRACE_OBJECTS_TRUE@dix_O_SOURCES = +CLEANFILES = Xserver-dtrace.h +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dix/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign dix/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libdix.la: $(libdix_la_OBJECTS) $(libdix_la_DEPENDENCIES) $(EXTRA_libdix_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libdix_la_OBJECTS) $(libdix_la_LIBADD) $(LIBS) +libmain.la: $(libmain_la_OBJECTS) $(libmain_la_DEPENDENCIES) $(EXTRA_libmain_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libmain_la_OBJECTS) $(libmain_la_LIBADD) $(LIBS) + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +@SPECIAL_DTRACE_OBJECTS_FALSE@dix.O$(EXEEXT): $(dix_O_OBJECTS) $(dix_O_DEPENDENCIES) $(EXTRA_dix_O_DEPENDENCIES) +@SPECIAL_DTRACE_OBJECTS_FALSE@ @rm -f dix.O$(EXEEXT) +@SPECIAL_DTRACE_OBJECTS_FALSE@ $(AM_V_CCLD)$(LINK) $(dix_O_OBJECTS) $(dix_O_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colormap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devices.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixfonts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixutils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enterleave.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventconvert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ffs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getevents.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyphcurs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initatoms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpututils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmap.Plo@am__quote@ +@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@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubmain.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swaprep.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapreq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tables.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/touch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_miscconfigDATA: $(dist_miscconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_miscconfig_DATA)'; test -n "$(miscconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(miscconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(miscconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(miscconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(miscconfigdir)" || exit $$?; \ + done + +uninstall-dist_miscconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_miscconfig_DATA)'; test -n "$(miscconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(miscconfigdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(miscconfigdir)"; 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 + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_miscconfigDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-dist_miscconfigDATA + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ + 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-dist_miscconfigDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-dist_miscconfigDATA + + +@XSERVER_DTRACE_TRUE@Xserver-dtrace.h: $(srcdir)/Xserver.d +@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \ +@XSERVER_DTRACE_TRUE@ || cp Xserver-dtrace.h.in $@ + +# Generate dtrace object code for probes in libdix +@SPECIAL_DTRACE_OBJECTS_TRUE@dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) +@SPECIAL_DTRACE_OBJECTS_TRUE@ $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) +@SPECIAL_DTRACE_OBJECTS_TRUE@dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) +@SPECIAL_DTRACE_OBJECTS_TRUE@ $(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/dix/Xserver-dtrace.h.in b/dix/Xserver-dtrace.h.in new file mode 100644 index 0000000..60ebbcd --- /dev/null +++ b/dix/Xserver-dtrace.h.in @@ -0,0 +1,99 @@ +/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/* + * Generated by dtrace(1M), and then modified for backwards compatibility + * with older versions of dtrace. Used if dtrace -h fails. + * (Since _ENABLED support was added after dtrace -h, this assumes if + * dtrace -h fails, _ENABLED will too.) + */ + +#ifndef _XSERVER_DTRACE_H +#define _XSERVER_DTRACE_H + +#include <unistd.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#if _DTRACE_VERSION + +#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___client__auth(arg0, arg1, arg2, arg3) +#define XSERVER_CLIENT_CONNECT(arg0, arg1) \ + __dtrace_Xserver___client__connect(arg0, arg1) +#define XSERVER_CLIENT_DISCONNECT(arg0) \ + __dtrace_Xserver___client__disconnect(arg0) +#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) \ + __dtrace_Xserver___request__done(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) \ + __dtrace_Xserver___request__start(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___resource__alloc(arg0, arg1, arg2, arg3) +#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___resource__free(arg0, arg1, arg2, arg3) +#define XSERVER_SEND_EVENT(arg0, arg1, arg2) \ + __dtrace_Xserver___send__event(arg0, arg1, arg2) +#define XSERVER_INPUT_EVENT(arg0, arg1, arg2, arg3, arg4, arg5, arg6) \ + __dtrace_Xserver___input__event(arg0, arg1, arg2, arg3, arg4, arg5, arg6) + +extern void __dtrace_Xserver___client__auth(int, string, pid_t, zoneid_t); +extern void __dtrace_Xserver___client__connect(int, int); +extern void __dtrace_Xserver___client__disconnect(int); +extern void __dtrace_Xserver___request__done(string, uint8_t, uint32_t, int, int); +extern void __dtrace_Xserver___request__start(string, uint8_t, uint16_t, int, void *); +extern void __dtrace_Xserver___resource__alloc(uint32_t, uint32_t, void *, string); +extern void __dtrace_Xserver___resource__free(uint32_t, uint32_t, void *, string); +extern void __dtrace_Xserver___send__event(int, uint8_t, void *); +extern void __dtrace_Xserver___input__event(int, uint16_t, uint32_t, uint32_t, int8_t, uint8_t *, double *); + + +#else + +#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) +#define XSERVER_CLIENT_CONNECT(arg0, arg1) +#define XSERVER_CLIENT_DISCONNECT(arg0) +#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) +#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) +#define XSERVER_SEND_EVENT(arg0, arg1, arg2) +#define XSERVER_INPUT_EVENT(arg0, arg1, arg2, arg3, arg4, arg5, arg6) + +#endif + +#define XSERVER_CLIENT_AUTH_ENABLED() (1) +#define XSERVER_CLIENT_CONNECT_ENABLED() (1) +#define XSERVER_CLIENT_DISCONNECT_ENABLED() (1) +#define XSERVER_REQUEST_DONE_ENABLED() (1) +#define XSERVER_REQUEST_START_ENABLED() (1) +#define XSERVER_RESOURCE_ALLOC_ENABLED() (1) +#define XSERVER_RESOURCE_FREE_ENABLED() (1) +#define XSERVER_SEND_EVENT_ENABLED() (1) +#define XSERVER_INPUT_EVENT_ENABLED() (1) + +#ifdef __cplusplus +} +#endif + +#endif /* _XSERVER_DTRACE_H */ diff --git a/dix/Xserver.d b/dix/Xserver.d new file mode 100644 index 0000000..248d48e --- /dev/null +++ b/dix/Xserver.d @@ -0,0 +1,60 @@ +/* Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/* + * Xserver dtrace provider definition + */ +#ifdef __APPLE__ +#define string char * +#define pid_t uint32_t +#define zoneid_t uint32_t +#else +#include <sys/types.h> +#endif + +provider Xserver { + /* reqType, data, length, client id, request buffer */ + probe request__start(string, uint8_t, uint16_t, int, void *); + /* reqType, data, sequence, client id, result */ + probe request__done(string, uint8_t, uint32_t, int, int); + /* client id, client fd */ + probe client__connect(int, int); + /* client id, client address, client pid, client zone id */ + probe client__auth(int, string, pid_t, zoneid_t); + /* client id */ + probe client__disconnect(int); + /* resource id, resource type, value, resource type name */ + probe resource__alloc(uint32_t, uint32_t, void *, string); + /* resource id, resource type, value, resource type name */ + probe resource__free(uint32_t, uint32_t, void *, string); + /* client id, event type, event* */ + probe send__event(int, uint8_t, void *); + /* deviceid, type, button/keycode/touchid, flags, nvalues, mask, values */ + probe input__event(int, int, uint32_t, uint32_t, int8_t, uint8_t*, double*); +}; + +#pragma D attributes Unstable/Unstable/Common provider Xserver provider +#pragma D attributes Private/Private/Unknown provider Xserver module +#pragma D attributes Private/Private/Unknown provider Xserver function +#pragma D attributes Unstable/Unstable/Common provider Xserver name +#pragma D attributes Unstable/Unstable/Common provider Xserver args + diff --git a/dix/atom.c b/dix/atom.c new file mode 100644 index 0000000..6f85968 --- /dev/null +++ b/dix/atom.c @@ -0,0 +1,210 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xatom.h> +#include <stdio.h> +#include <string.h> +#include "misc.h" +#include "resource.h" +#include "dix.h" + +#define InitialTableSize 100 + +typedef struct _Node { + struct _Node *left, *right; + Atom a; + unsigned int fingerPrint; + const char *string; +} NodeRec, *NodePtr; + +static Atom lastAtom = None; +static NodePtr atomRoot = NULL; +static unsigned long tableLength; +static NodePtr *nodeTable; + +void FreeAtom(NodePtr patom); + +Atom +MakeAtom(const char *string, unsigned len, Bool makeit) +{ + NodePtr *np; + unsigned i; + int comp; + unsigned int fp = 0; + + np = &atomRoot; + for (i = 0; i < (len + 1) / 2; i++) { + fp = fp * 27 + string[i]; + fp = fp * 27 + string[len - 1 - i]; + } + while (*np != NULL) { + if (fp < (*np)->fingerPrint) + np = &((*np)->left); + else if (fp > (*np)->fingerPrint) + np = &((*np)->right); + else { /* now start testing the strings */ + comp = strncmp(string, (*np)->string, (int) len); + if ((comp < 0) || ((comp == 0) && (len < strlen((*np)->string)))) + np = &((*np)->left); + else if (comp > 0) + np = &((*np)->right); + else + return (*np)->a; + } + } + if (makeit) { + NodePtr nd; + + nd = malloc(sizeof(NodeRec)); + if (!nd) + return BAD_RESOURCE; + if (lastAtom < XA_LAST_PREDEFINED) { + nd->string = string; + } + else { + nd->string = strndup(string, len); + if (!nd->string) { + free(nd); + return BAD_RESOURCE; + } + } + if ((lastAtom + 1) >= tableLength) { + NodePtr *table; + + table = realloc(nodeTable, tableLength * (2 * sizeof(NodePtr))); + if (!table) { + if (nd->string != string) { + /* nd->string has been strdup'ed */ + free((char *) nd->string); + } + free(nd); + return BAD_RESOURCE; + } + tableLength <<= 1; + nodeTable = table; + } + *np = nd; + nd->left = nd->right = NULL; + nd->fingerPrint = fp; + nd->a = ++lastAtom; + nodeTable[lastAtom] = nd; + return nd->a; + } + else + return None; +} + +Bool +ValidAtom(Atom atom) +{ + return (atom != None) && (atom <= lastAtom); +} + +const char * +NameForAtom(Atom atom) +{ + NodePtr node; + + if (atom > lastAtom) + return 0; + if ((node = nodeTable[atom]) == NULL) + return 0; + return node->string; +} + +void +AtomError(void) +{ + FatalError("initializing atoms"); +} + +void +FreeAtom(NodePtr patom) +{ + if (patom->left) + FreeAtom(patom->left); + if (patom->right) + FreeAtom(patom->right); + if (patom->a > XA_LAST_PREDEFINED) { + /* + * All strings above XA_LAST_PREDEFINED are strdup'ed, so it's safe to + * cast here + */ + free((char *) patom->string); + } + free(patom); +} + +void +FreeAllAtoms(void) +{ + if (atomRoot == NULL) + return; + FreeAtom(atomRoot); + atomRoot = NULL; + free(nodeTable); + nodeTable = NULL; + lastAtom = None; +} + +void +InitAtoms(void) +{ + FreeAllAtoms(); + tableLength = InitialTableSize; + nodeTable = malloc(InitialTableSize * sizeof(NodePtr)); + if (!nodeTable) + AtomError(); + nodeTable[None] = NULL; + MakePredeclaredAtoms(); + if (lastAtom != XA_LAST_PREDEFINED) + AtomError(); +} diff --git a/dix/buildatoms b/dix/buildatoms new file mode 100644 index 0000000..dfbbca8 --- /dev/null +++ b/dix/buildatoms @@ -0,0 +1,43 @@ +#!/bin/sh +hfile=../../../include/Xatom.h +cfile=initatoms.c +rm -f $hfile $cfile +umask 222 +awk ' +BEGIN { + hfile = "'$hfile'"; + cfile = "'$cfile'"; + hformat = "#define XA_%s ((Atom) %d)\n"; + printf("#ifndef XATOM_H\n") > hfile; + printf("#define XATOM_H 1\n\n") > hfile; + printf("/* THIS IS A GENERATED FILE\n") > hfile; + printf(" *\n") > hfile; + printf(" * Do not change! Changing this file implies a protocol change!\n") > hfile; + printf(" */\n\n") > hfile; + + printf("/* THIS IS A GENERATED FILE\n") > cfile; + printf(" *\n") > cfile; + printf(" * Do not change! Changing this file implies a protocol change!\n") > cfile; + printf(" */\n\n") > cfile; + printf("#include \"X.h\"\n") > cfile; + printf("#include \"Xatom.h\"\n") > cfile; + printf("#include \"misc.h\"\n") > cfile; + printf("#include \"dix.h\"\n") > cfile; + printf("void MakePredeclaredAtoms()\n") > cfile; + printf("{\n") > cfile; + + } + +NF == 2 && $2 == "@" { + printf(hformat, $1, ++atomno) > hfile ; + printf(" if (MakeAtom(\"%s\", %d, 1) != XA_%s) AtomError();\n", $1, length($1), $1) > cfile ; + } + +END { + printf("\n") > hfile; + printf(hformat, "LAST_PREDEFINED", atomno) > hfile ; + printf("#endif /* XATOM_H */\n") > hfile; + printf("}\n") > cfile ; + } +' BuiltInAtoms +exit 0 diff --git a/dix/colormap.c b/dix/colormap.c new file mode 100644 index 0000000..39fddc9 --- /dev/null +++ b/dix/colormap.c @@ -0,0 +1,2555 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include <stdio.h> +#include <string.h> +#include <strings.h> +#include "misc.h" +#include "dix.h" +#include "dixstruct.h" +#include "colormapst.h" +#include "os.h" +#include "scrnintstr.h" +#include "resource.h" +#include "windowstr.h" +#include "privates.h" +#include "xace.h" + +static Pixel FindBestPixel(EntryPtr /*pentFirst */ , + int /*size */ , + xrgb * /*prgb */ , + int /*channel */ + ); + +static int AllComp(EntryPtr /*pent */ , + xrgb * /*prgb */ + ); + +static int RedComp(EntryPtr /*pent */ , + xrgb * /*prgb */ + ); + +static int GreenComp(EntryPtr /*pent */ , + xrgb * /*prgb */ + ); + +static int BlueComp(EntryPtr /*pent */ , + xrgb * /*prgb */ + ); + +static void FreePixels(ColormapPtr /*pmap */ , + int /*client */ + ); + +static void CopyFree(int /*channel */ , + int /*client */ , + ColormapPtr /*pmapSrc */ , + ColormapPtr /*pmapDst */ + ); + +static void FreeCell(ColormapPtr /*pmap */ , + Pixel /*i */ , + int /*channel */ + ); + +static void UpdateColors(ColormapPtr /*pmap */ + ); + +static int AllocDirect(int /*client */ , + ColormapPtr /*pmap */ , + int /*c */ , + int /*r */ , + int /*g */ , + int /*b */ , + Bool /*contig */ , + Pixel * /*pixels */ , + Pixel * /*prmask */ , + Pixel * /*pgmask */ , + Pixel * /*pbmask */ + ); + +static int AllocPseudo(int /*client */ , + ColormapPtr /*pmap */ , + int /*c */ , + int /*r */ , + Bool /*contig */ , + Pixel * /*pixels */ , + Pixel * /*pmask */ , + Pixel ** /*pppixFirst */ + ); + +static Bool AllocCP(ColormapPtr /*pmap */ , + EntryPtr /*pentFirst */ , + int /*count */ , + int /*planes */ , + Bool /*contig */ , + Pixel * /*pixels */ , + Pixel * /*pMask */ + ); + +static Bool AllocShared(ColormapPtr /*pmap */ , + Pixel * /*ppix */ , + int /*c */ , + int /*r */ , + int /*g */ , + int /*b */ , + Pixel /*rmask */ , + Pixel /*gmask */ , + Pixel /*bmask */ , + Pixel * /*ppixFirst */ + ); + +static int FreeCo(ColormapPtr /*pmap */ , + int /*client */ , + int /*color */ , + int /*npixIn */ , + Pixel * /*ppixIn */ , + Pixel /*mask */ + ); + +static int TellNoMap(WindowPtr /*pwin */ , + Colormap * /*pmid */ + ); + +static void FindColorInRootCmap(ColormapPtr /* pmap */ , + EntryPtr /* pentFirst */ , + int /* size */ , + xrgb * /* prgb */ , + Pixel * /* pPixel */ , + int /* channel */ , + ColorCompareProcPtr /* comp */ + ); + +#define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1) +#define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1) +#define NUMBLUE(vis) ((vis->blueMask >> vis->offsetBlue) + 1) +#if COMPOSITE +#define ALPHAMASK(vis) ((vis)->nplanes < 32 ? 0 : \ + (CARD32) ~((vis)->redMask|(vis)->greenMask|(vis)->blueMask)) +#else +#define ALPHAMASK(vis) 0 +#endif + +#define RGBMASK(vis) (vis->redMask | vis->greenMask | vis->blueMask | ALPHAMASK(vis)) + +/* GetNextBitsOrBreak(bits, mask, base) -- + * (Suggestion: First read the macro, then read this explanation. + * + * Either generate the next value to OR in to a pixel or break out of this + * while loop + * + * This macro is used when we're trying to generate all 2^n combinations of + * bits in mask. What we're doing here is counting in binary, except that + * the bits we use to count may not be contiguous. This macro will be + * called 2^n times, returning a different value in bits each time. Then + * it will cause us to break out of a surrounding loop. (It will always be + * called from within a while loop.) + * On call: mask is the value we want to find all the combinations for + * base has 1 bit set where the least significant bit of mask is set + * + * For example,if mask is 01010, base should be 0010 and we count like this: + * 00010 (see this isn't so hard), + * then we add base to bits and get 0100. (bits & ~mask) is (0100 & 0100) so + * we add that to bits getting (0100 + 0100) = + * 01000 for our next value. + * then we add 0010 to get + * 01010 and we're done (easy as 1, 2, 3) + */ +#define GetNextBitsOrBreak(bits, mask, base) \ + if((bits) == (mask)) \ + break; \ + (bits) += (base); \ + while((bits) & ~(mask)) \ + (bits) += ((bits) & ~(mask)); +/* ID of server as client */ +#define SERVER_ID 0 + +typedef struct _colorResource { + Colormap mid; + int client; +} colorResource; + +/* Invariants: + * refcnt == 0 means entry is empty + * refcnt > 0 means entry is useable by many clients, so it can't be changed + * refcnt == AllocPrivate means entry owned by one client only + * fShared should only be set if refcnt == AllocPrivate, and only in red map + */ + +/** + * Create and initialize the color map + * + * \param mid resource to use for this colormap + * \param alloc 1 iff all entries are allocated writable + */ +int +CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, + ColormapPtr *ppcmap, int alloc, int client) +{ + int class, size; + unsigned long sizebytes; + ColormapPtr pmap; + EntryPtr pent; + int i; + Pixel *ppix, **pptr; + + class = pVisual->class; + if (!(class & DynamicClass) && (alloc != AllocNone) && + (client != SERVER_ID)) + return BadMatch; + + size = pVisual->ColormapEntries; + sizebytes = (size * sizeof(Entry)) + + (MAXCLIENTS * sizeof(Pixel *)) + (MAXCLIENTS * sizeof(int)); + if ((class | DynamicClass) == DirectColor) + sizebytes *= 3; + sizebytes += sizeof(ColormapRec); + if (mid == pScreen->defColormap) { + pmap = malloc(sizebytes); + if (!pmap) + return BadAlloc; + if (!dixAllocatePrivates(&pmap->devPrivates, PRIVATE_COLORMAP)) { + free(pmap); + return BadAlloc; + } + } + else { + pmap = _dixAllocateObjectWithPrivates(sizebytes, sizebytes, + offsetof(ColormapRec, + devPrivates), + PRIVATE_COLORMAP); + if (!pmap) + return BadAlloc; + } + pmap->red = (EntryPtr) ((char *) pmap + sizeof(ColormapRec)); + sizebytes = size * sizeof(Entry); + pmap->clientPixelsRed = (Pixel **) ((char *) pmap->red + sizebytes); + pmap->numPixelsRed = (int *) ((char *) pmap->clientPixelsRed + + (MAXCLIENTS * sizeof(Pixel *))); + pmap->mid = mid; + pmap->flags = 0; /* start out with all flags clear */ + if (mid == pScreen->defColormap) + pmap->flags |= IsDefault; + pmap->pScreen = pScreen; + pmap->pVisual = pVisual; + pmap->class = class; + if ((class | DynamicClass) == DirectColor) + size = NUMRED(pVisual); + pmap->freeRed = size; + memset((char *) pmap->red, 0, (int) sizebytes); + memset((char *) pmap->numPixelsRed, 0, MAXCLIENTS * sizeof(int)); + for (pptr = &pmap->clientPixelsRed[MAXCLIENTS]; + --pptr >= pmap->clientPixelsRed;) + *pptr = (Pixel *) NULL; + if (alloc == AllocAll) { + if (class & DynamicClass) + pmap->flags |= AllAllocated; + for (pent = &pmap->red[size - 1]; pent >= pmap->red; pent--) + pent->refcnt = AllocPrivate; + pmap->freeRed = 0; + ppix = malloc(size * sizeof(Pixel)); + if (!ppix) { + free(pmap); + return BadAlloc; + } + pmap->clientPixelsRed[client] = ppix; + for (i = 0; i < size; i++) + ppix[i] = i; + pmap->numPixelsRed[client] = size; + } + + if ((class | DynamicClass) == DirectColor) { + pmap->freeGreen = NUMGREEN(pVisual); + pmap->green = (EntryPtr) ((char *) pmap->numPixelsRed + + (MAXCLIENTS * sizeof(int))); + pmap->clientPixelsGreen = (Pixel **) ((char *) pmap->green + sizebytes); + pmap->numPixelsGreen = (int *) ((char *) pmap->clientPixelsGreen + + (MAXCLIENTS * sizeof(Pixel *))); + pmap->freeBlue = NUMBLUE(pVisual); + pmap->blue = (EntryPtr) ((char *) pmap->numPixelsGreen + + (MAXCLIENTS * sizeof(int))); + pmap->clientPixelsBlue = (Pixel **) ((char *) pmap->blue + sizebytes); + pmap->numPixelsBlue = (int *) ((char *) pmap->clientPixelsBlue + + (MAXCLIENTS * sizeof(Pixel *))); + + memset((char *) pmap->green, 0, (int) sizebytes); + memset((char *) pmap->blue, 0, (int) sizebytes); + + memmove((char *) pmap->clientPixelsGreen, + (char *) pmap->clientPixelsRed, MAXCLIENTS * sizeof(Pixel *)); + memmove((char *) pmap->clientPixelsBlue, + (char *) pmap->clientPixelsRed, MAXCLIENTS * sizeof(Pixel *)); + 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) { + size = pmap->freeGreen; + for (pent = &pmap->green[size - 1]; pent >= pmap->green; pent--) + pent->refcnt = AllocPrivate; + pmap->freeGreen = 0; + ppix = malloc(size * sizeof(Pixel)); + if (!ppix) { + free(pmap->clientPixelsRed[client]); + free(pmap); + return BadAlloc; + } + pmap->clientPixelsGreen[client] = ppix; + for (i = 0; i < size; i++) + ppix[i] = i; + pmap->numPixelsGreen[client] = size; + + size = pmap->freeBlue; + for (pent = &pmap->blue[size - 1]; pent >= pmap->blue; pent--) + pent->refcnt = AllocPrivate; + pmap->freeBlue = 0; + ppix = malloc(size * sizeof(Pixel)); + if (!ppix) { + free(pmap->clientPixelsGreen[client]); + free(pmap->clientPixelsRed[client]); + free(pmap); + return BadAlloc; + } + pmap->clientPixelsBlue[client] = ppix; + for (i = 0; i < size; i++) + ppix[i] = i; + pmap->numPixelsBlue[client] = size; + } + } + pmap->flags |= BeingCreated; + + if (!AddResource(mid, RT_COLORMAP, (pointer) pmap)) + return BadAlloc; + + /* + * Security creation/labeling check + */ + i = XaceHook(XACE_RESOURCE_ACCESS, clients[client], mid, RT_COLORMAP, + pmap, RT_NONE, NULL, DixCreateAccess); + if (i != Success) { + FreeResource(mid, RT_NONE); + return i; + } + + /* If the device wants a chance to initialize the colormap in any way, + * this is it. In specific, if this is a Static colormap, this is the + * time to fill in the colormap's values */ + if (!(*pScreen->CreateColormap) (pmap)) { + FreeResource(mid, RT_NONE); + return BadAlloc; + } + pmap->flags &= ~BeingCreated; + *ppcmap = pmap; + return Success; +} + +/** + * + * \param value must conform to DeleteType + */ +int +FreeColormap(pointer value, XID mid) +{ + int i; + EntryPtr pent; + ColormapPtr pmap = (ColormapPtr) value; + + if (CLIENT_ID(mid) != SERVER_ID) { + (*pmap->pScreen->UninstallColormap) (pmap); + WalkTree(pmap->pScreen, (VisitWindowProcPtr) TellNoMap, (pointer) &mid); + } + + /* This is the device's chance to undo anything it needs to, especially + * to free any storage it allocated */ + (*pmap->pScreen->DestroyColormap) (pmap); + + if (pmap->clientPixelsRed) { + for (i = 0; i < MAXCLIENTS; i++) + free(pmap->clientPixelsRed[i]); + } + + if ((pmap->class == PseudoColor) || (pmap->class == GrayScale)) { + for (pent = &pmap->red[pmap->pVisual->ColormapEntries - 1]; + pent >= pmap->red; pent--) { + if (pent->fShared) { + if (--pent->co.shco.red->refcnt == 0) + free(pent->co.shco.red); + if (--pent->co.shco.green->refcnt == 0) + free(pent->co.shco.green); + if (--pent->co.shco.blue->refcnt == 0) + free(pent->co.shco.blue); + } + } + } + if ((pmap->class | DynamicClass) == DirectColor) { + for (i = 0; i < MAXCLIENTS; i++) { + free(pmap->clientPixelsGreen[i]); + free(pmap->clientPixelsBlue[i]); + } + } + + if (pmap->flags & IsDefault) { + dixFreePrivates(pmap->devPrivates, PRIVATE_COLORMAP); + free(pmap); + } + else + dixFreeObjectWithPrivates(pmap, PRIVATE_COLORMAP); + return Success; +} + +/* Tell window that pmid has disappeared */ +static int +TellNoMap(WindowPtr pwin, Colormap * pmid) +{ + if (wColormap(pwin) == *pmid) { + /* This should be call to DeliverEvent */ + xEvent xE = { + .u.colormap.window = pwin->drawable.id, + .u.colormap.colormap = None, + .u.colormap.new = TRUE, + .u.colormap.state = ColormapUninstalled + }; + xE.u.u.type = ColormapNotify; +#ifdef PANORAMIX + if (noPanoramiXExtension || !pwin->drawable.pScreen->myNum) +#endif + DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL); + if (pwin->optional) { + pwin->optional->colormap = None; + CheckWindowOptionalNeed(pwin); + } + } + + return WT_WALKCHILDREN; +} + +/* Tell window that pmid got uninstalled */ +int +TellLostMap(WindowPtr pwin, pointer value) +{ + Colormap *pmid = (Colormap *) value; + +#ifdef PANORAMIX + if (!noPanoramiXExtension && pwin->drawable.pScreen->myNum) + return WT_STOPWALKING; +#endif + if (wColormap(pwin) == *pmid) { + /* This should be call to DeliverEvent */ + xEvent xE = { + .u.colormap.window = pwin->drawable.id, + .u.colormap.colormap = *pmid, + .u.colormap.new = FALSE, + .u.colormap.state = ColormapUninstalled + }; + xE.u.u.type = ColormapNotify; + DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL); + } + + return WT_WALKCHILDREN; +} + +/* Tell window that pmid got installed */ +int +TellGainedMap(WindowPtr pwin, pointer value) +{ + Colormap *pmid = (Colormap *) value; + +#ifdef PANORAMIX + if (!noPanoramiXExtension && pwin->drawable.pScreen->myNum) + return WT_STOPWALKING; +#endif + if (wColormap(pwin) == *pmid) { + /* This should be call to DeliverEvent */ + xEvent xE = { + .u.colormap.window = pwin->drawable.id, + .u.colormap.colormap = *pmid, + .u.colormap.new = FALSE, + .u.colormap.state = ColormapInstalled + }; + xE.u.u.type = ColormapNotify; + DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL); + } + + return WT_WALKCHILDREN; +} + +int +CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client) +{ + ColormapPtr pmap = (ColormapPtr) NULL; + int result, alloc, size; + Colormap midSrc; + ScreenPtr pScreen; + VisualPtr pVisual; + + pScreen = pSrc->pScreen; + pVisual = pSrc->pVisual; + midSrc = pSrc->mid; + alloc = ((pSrc->flags & AllAllocated) && CLIENT_ID(midSrc) == client) ? + AllocAll : AllocNone; + size = pVisual->ColormapEntries; + + /* If the create returns non-0, it failed */ + result = CreateColormap(mid, pScreen, pVisual, &pmap, alloc, client); + if (result != Success) + return result; + if (alloc == AllocAll) { + memmove((char *) pmap->red, (char *) pSrc->red, size * sizeof(Entry)); + if ((pmap->class | DynamicClass) == DirectColor) { + memmove((char *) pmap->green, (char *) pSrc->green, + size * sizeof(Entry)); + memmove((char *) pmap->blue, (char *) pSrc->blue, + size * sizeof(Entry)); + } + pSrc->flags &= ~AllAllocated; + FreePixels(pSrc, client); + UpdateColors(pmap); + return Success; + } + + CopyFree(REDMAP, client, pSrc, pmap); + if ((pmap->class | DynamicClass) == DirectColor) { + CopyFree(GREENMAP, client, pSrc, pmap); + CopyFree(BLUEMAP, client, pSrc, pmap); + } + if (pmap->class & DynamicClass) + UpdateColors(pmap); + /* XXX should worry about removing any RT_CMAPENTRY resource */ + return Success; +} + +/* Helper routine for freeing large numbers of cells from a map */ +static void +CopyFree(int channel, int client, ColormapPtr pmapSrc, ColormapPtr pmapDst) +{ + int z, npix; + EntryPtr pentSrcFirst, pentDstFirst; + EntryPtr pentSrc, pentDst; + Pixel *ppix; + int nalloc; + + switch (channel) { + default: /* so compiler can see that everything gets initialized */ + case REDMAP: + ppix = (pmapSrc->clientPixelsRed)[client]; + npix = (pmapSrc->numPixelsRed)[client]; + pentSrcFirst = pmapSrc->red; + pentDstFirst = pmapDst->red; + break; + case GREENMAP: + ppix = (pmapSrc->clientPixelsGreen)[client]; + npix = (pmapSrc->numPixelsGreen)[client]; + pentSrcFirst = pmapSrc->green; + pentDstFirst = pmapDst->green; + break; + case BLUEMAP: + ppix = (pmapSrc->clientPixelsBlue)[client]; + npix = (pmapSrc->numPixelsBlue)[client]; + pentSrcFirst = pmapSrc->blue; + pentDstFirst = pmapDst->blue; + break; + } + nalloc = 0; + if (pmapSrc->class & DynamicClass) { + for (z = npix; --z >= 0; ppix++) { + /* Copy entries */ + pentSrc = pentSrcFirst + *ppix; + pentDst = pentDstFirst + *ppix; + if (pentDst->refcnt > 0) { + pentDst->refcnt++; + } + else { + *pentDst = *pentSrc; + nalloc++; + if (pentSrc->refcnt > 0) + pentDst->refcnt = 1; + else + pentSrc->fShared = FALSE; + } + FreeCell(pmapSrc, *ppix, channel); + } + } + + /* Note that FreeCell has already fixed pmapSrc->free{Color} */ + switch (channel) { + case REDMAP: + pmapDst->freeRed -= nalloc; + (pmapDst->clientPixelsRed)[client] = (pmapSrc->clientPixelsRed)[client]; + (pmapSrc->clientPixelsRed)[client] = (Pixel *) NULL; + (pmapDst->numPixelsRed)[client] = (pmapSrc->numPixelsRed)[client]; + (pmapSrc->numPixelsRed)[client] = 0; + break; + case GREENMAP: + pmapDst->freeGreen -= nalloc; + (pmapDst->clientPixelsGreen)[client] = + (pmapSrc->clientPixelsGreen)[client]; + (pmapSrc->clientPixelsGreen)[client] = (Pixel *) NULL; + (pmapDst->numPixelsGreen)[client] = (pmapSrc->numPixelsGreen)[client]; + (pmapSrc->numPixelsGreen)[client] = 0; + break; + case BLUEMAP: + pmapDst->freeBlue -= nalloc; + pmapDst->clientPixelsBlue[client] = pmapSrc->clientPixelsBlue[client]; + pmapSrc->clientPixelsBlue[client] = (Pixel *) NULL; + pmapDst->numPixelsBlue[client] = pmapSrc->numPixelsBlue[client]; + pmapSrc->numPixelsBlue[client] = 0; + break; + } +} + +/* Free the ith entry in a color map. Must handle freeing of + * colors allocated through AllocColorPlanes */ +static void +FreeCell(ColormapPtr pmap, Pixel i, int channel) +{ + EntryPtr pent; + int *pCount; + + switch (channel) { + default: /* so compiler can see that everything gets initialized */ + case PSEUDOMAP: + case REDMAP: + pent = (EntryPtr) &pmap->red[i]; + pCount = &pmap->freeRed; + break; + case GREENMAP: + pent = (EntryPtr) &pmap->green[i]; + pCount = &pmap->freeGreen; + break; + case BLUEMAP: + pent = (EntryPtr) &pmap->blue[i]; + pCount = &pmap->freeBlue; + break; + } + /* If it's not privately allocated and it's not time to free it, just + * decrement the count */ + if (pent->refcnt > 1) + pent->refcnt--; + else { + /* If the color type is shared, find the sharedcolor. If decremented + * refcnt is 0, free the shared cell. */ + if (pent->fShared) { + if (--pent->co.shco.red->refcnt == 0) + free(pent->co.shco.red); + if (--pent->co.shco.green->refcnt == 0) + free(pent->co.shco.green); + if (--pent->co.shco.blue->refcnt == 0) + free(pent->co.shco.blue); + pent->fShared = FALSE; + } + pent->refcnt = 0; + *pCount += 1; + } +} + +static void +UpdateColors(ColormapPtr pmap) +{ + xColorItem *defs; + xColorItem *pdef; + EntryPtr pent; + VisualPtr pVisual; + int i, n, size; + + pVisual = pmap->pVisual; + size = pVisual->ColormapEntries; + defs = malloc(size * sizeof(xColorItem)); + if (!defs) + return; + n = 0; + pdef = defs; + if (pmap->class == DirectColor) { + for (i = 0; i < size; i++) { + if (!pmap->red[i].refcnt && + !pmap->green[i].refcnt && !pmap->blue[i].refcnt) + continue; + pdef->pixel = ((Pixel) i << pVisual->offsetRed) | + ((Pixel) i << pVisual->offsetGreen) | + ((Pixel) i << pVisual->offsetBlue); + pdef->red = pmap->red[i].co.local.red; + pdef->green = pmap->green[i].co.local.green; + pdef->blue = pmap->blue[i].co.local.blue; + pdef->flags = DoRed | DoGreen | DoBlue; + pdef++; + n++; + } + } + else { + for (i = 0, pent = pmap->red; i < size; i++, pent++) { + if (!pent->refcnt) + continue; + pdef->pixel = i; + if (pent->fShared) { + pdef->red = pent->co.shco.red->color; + pdef->green = pent->co.shco.green->color; + pdef->blue = pent->co.shco.blue->color; + } + else { + pdef->red = pent->co.local.red; + pdef->green = pent->co.local.green; + pdef->blue = pent->co.local.blue; + } + pdef->flags = DoRed | DoGreen | DoBlue; + pdef++; + n++; + } + } + if (n) + (*pmap->pScreen->StoreColors) (pmap, n, defs); + free(defs); +} + +/* Get a read-only color from a ColorMap (probably slow for large maps) + * Returns by changing the value in pred, pgreen, pblue and pPix + */ +int +AllocColor(ColormapPtr pmap, + unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, + Pixel * pPix, int client) +{ + Pixel pixR, pixG, pixB; + int entries; + xrgb rgb; + int class; + VisualPtr pVisual; + int npix; + Pixel *ppix; + + pVisual = pmap->pVisual; + (*pmap->pScreen->ResolveColor) (pred, pgreen, pblue, pVisual); + rgb.red = *pred; + rgb.green = *pgreen; + rgb.blue = *pblue; + class = pmap->class; + entries = pVisual->ColormapEntries; + + /* If the colormap is being created, then we want to be able to change + * the colormap, even if it's a static type. Otherwise, we'd never be + * able to initialize static colormaps + */ + if (pmap->flags & BeingCreated) + class |= DynamicClass; + + /* If this is one of the static storage classes, and we're not initializing + * it, the best we can do is to find the closest color entry to the + * requested one and return that. + */ + switch (class) { + case StaticColor: + case StaticGray: + /* Look up all three components in the same pmap */ + *pPix = pixR = FindBestPixel(pmap->red, entries, &rgb, PSEUDOMAP); + *pred = pmap->red[pixR].co.local.red; + *pgreen = pmap->red[pixR].co.local.green; + *pblue = pmap->red[pixR].co.local.blue; + npix = pmap->numPixelsRed[client]; + ppix = (Pixel *) realloc(pmap->clientPixelsRed[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return BadAlloc; + ppix[npix] = pixR; + pmap->clientPixelsRed[client] = ppix; + pmap->numPixelsRed[client]++; + break; + + case TrueColor: + /* Look up each component in its own map, then OR them together */ + pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP); + pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, GREENMAP); + pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP); + *pPix = (pixR << pVisual->offsetRed) | + (pixG << pVisual->offsetGreen) | + (pixB << pVisual->offsetBlue) | ALPHAMASK(pVisual); + + *pred = pmap->red[pixR].co.local.red; + *pgreen = pmap->green[pixG].co.local.green; + *pblue = pmap->blue[pixB].co.local.blue; + npix = pmap->numPixelsRed[client]; + ppix = (Pixel *) realloc(pmap->clientPixelsRed[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return BadAlloc; + ppix[npix] = pixR; + pmap->clientPixelsRed[client] = ppix; + npix = pmap->numPixelsGreen[client]; + ppix = (Pixel *) realloc(pmap->clientPixelsGreen[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return BadAlloc; + ppix[npix] = pixG; + pmap->clientPixelsGreen[client] = ppix; + npix = pmap->numPixelsBlue[client]; + ppix = (Pixel *) realloc(pmap->clientPixelsBlue[client], + (npix + 1) * sizeof(Pixel)); + if (!ppix) + return BadAlloc; + ppix[npix] = pixB; + pmap->clientPixelsBlue[client] = ppix; + pmap->numPixelsRed[client]++; + pmap->numPixelsGreen[client]++; + pmap->numPixelsBlue[client]++; + break; + + case GrayScale: + case PseudoColor: + if (pmap->mid != pmap->pScreen->defColormap && + pmap->pVisual->vid == pmap->pScreen->rootVisual) { + ColormapPtr prootmap; + + dixLookupResourceByType((pointer *) &prootmap, + pmap->pScreen->defColormap, RT_COLORMAP, + clients[client], DixReadAccess); + + if (pmap->class == prootmap->class) + FindColorInRootCmap(prootmap, prootmap->red, entries, &rgb, + pPix, PSEUDOMAP, AllComp); + } + if (FindColor(pmap, pmap->red, entries, &rgb, pPix, PSEUDOMAP, + client, AllComp) != Success) + return BadAlloc; + break; + + case DirectColor: + if (pmap->mid != pmap->pScreen->defColormap && + pmap->pVisual->vid == pmap->pScreen->rootVisual) { + ColormapPtr prootmap; + + dixLookupResourceByType((pointer *) &prootmap, + pmap->pScreen->defColormap, RT_COLORMAP, + clients[client], DixReadAccess); + + if (pmap->class == prootmap->class) { + pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed; + FindColorInRootCmap(prootmap, prootmap->red, entries, &rgb, + &pixR, REDMAP, RedComp); + pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen; + FindColorInRootCmap(prootmap, prootmap->green, entries, &rgb, + &pixG, GREENMAP, GreenComp); + pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue; + FindColorInRootCmap(prootmap, prootmap->blue, entries, &rgb, + &pixB, BLUEMAP, BlueComp); + *pPix = pixR | pixG | pixB; + } + } + + pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed; + if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP, + client, RedComp) != Success) + return BadAlloc; + pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen; + if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG, + GREENMAP, client, GreenComp) != Success) { + (void) FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel) 0); + return BadAlloc; + } + pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue; + if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP, + client, BlueComp) != Success) { + (void) FreeCo(pmap, client, GREENMAP, 1, &pixG, (Pixel) 0); + (void) FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel) 0); + return BadAlloc; + } + *pPix = pixR | pixG | pixB | ALPHAMASK(pVisual); + + break; + } + + /* if this is the client's first pixel in this colormap, tell the + * resource manager that the client has pixels in this colormap which + * should be freed when the client dies */ + if ((pmap->numPixelsRed[client] == 1) && + (CLIENT_ID(pmap->mid) != client) && !(pmap->flags & BeingCreated)) { + colorResource *pcr; + + pcr = malloc(sizeof(colorResource)); + if (!pcr) { + (void) FreeColors(pmap, client, 1, pPix, (Pixel) 0); + return BadAlloc; + } + pcr->mid = pmap->mid; + pcr->client = client; + if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer) pcr)) + return BadAlloc; + } + return Success; +} + +/* + * FakeAllocColor -- fake an AllocColor request by + * returning a free pixel if availible, otherwise returning + * the closest matching pixel. This is used by the mi + * software sprite code to recolor cursors. A nice side-effect + * is that this routine will never return failure. + */ + +void +FakeAllocColor(ColormapPtr pmap, xColorItem * item) +{ + Pixel pixR, pixG, pixB; + Pixel temp; + int entries; + xrgb rgb; + int class; + VisualPtr pVisual; + + pVisual = pmap->pVisual; + rgb.red = item->red; + rgb.green = item->green; + rgb.blue = item->blue; + (*pmap->pScreen->ResolveColor) (&rgb.red, &rgb.green, &rgb.blue, pVisual); + class = pmap->class; + entries = pVisual->ColormapEntries; + + switch (class) { + case GrayScale: + case PseudoColor: + temp = 0; + item->pixel = 0; + if (FindColor(pmap, pmap->red, entries, &rgb, &temp, PSEUDOMAP, + -1, AllComp) == Success) { + item->pixel = temp; + break; + } + /* fall through ... */ + case StaticColor: + case StaticGray: + item->pixel = FindBestPixel(pmap->red, entries, &rgb, PSEUDOMAP); + break; + + case DirectColor: + /* Look up each component in its own map, then OR them together */ + pixR = (item->pixel & pVisual->redMask) >> pVisual->offsetRed; + pixG = (item->pixel & pVisual->greenMask) >> pVisual->offsetGreen; + pixB = (item->pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP, + -1, RedComp) != Success) + pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP) + << pVisual->offsetRed; + if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG, + GREENMAP, -1, GreenComp) != Success) + pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, + GREENMAP) << pVisual->offsetGreen; + if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP, + -1, BlueComp) != Success) + pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP) + << pVisual->offsetBlue; + item->pixel = pixR | pixG | pixB; + break; + + case TrueColor: + /* Look up each component in its own map, then OR them together */ + pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP); + pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, GREENMAP); + pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP); + item->pixel = (pixR << pVisual->offsetRed) | + (pixG << pVisual->offsetGreen) | (pixB << pVisual->offsetBlue); + break; + } +} + +/* free a pixel value obtained from FakeAllocColor */ +void +FakeFreeColor(ColormapPtr pmap, Pixel pixel) +{ + VisualPtr pVisual; + Pixel pixR, pixG, pixB; + + switch (pmap->class) { + case GrayScale: + case PseudoColor: + if (pmap->red[pixel].refcnt == AllocTemporary) + pmap->red[pixel].refcnt = 0; + break; + case DirectColor: + pVisual = pmap->pVisual; + pixR = (pixel & pVisual->redMask) >> pVisual->offsetRed; + pixG = (pixel & pVisual->greenMask) >> pVisual->offsetGreen; + pixB = (pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (pmap->red[pixR].refcnt == AllocTemporary) + pmap->red[pixR].refcnt = 0; + if (pmap->green[pixG].refcnt == AllocTemporary) + pmap->green[pixG].refcnt = 0; + if (pmap->blue[pixB].refcnt == AllocTemporary) + pmap->blue[pixB].refcnt = 0; + break; + } +} + +typedef unsigned short BigNumUpper; +typedef unsigned long BigNumLower; + +#define BIGNUMLOWERBITS 24 +#define BIGNUMUPPERBITS 16 +#define BIGNUMLOWER (1 << BIGNUMLOWERBITS) +#define BIGNUMUPPER (1 << BIGNUMUPPERBITS) +#define UPPERPART(i) ((i) >> BIGNUMLOWERBITS) +#define LOWERPART(i) ((i) & (BIGNUMLOWER - 1)) + +typedef struct _bignum { + BigNumUpper upper; + BigNumLower lower; +} BigNumRec, *BigNumPtr; + +#define BigNumGreater(x,y) (((x)->upper > (y)->upper) ||\ + ((x)->upper == (y)->upper && (x)->lower > (y)->lower)) + +#define UnsignedToBigNum(u,r) (((r)->upper = UPPERPART(u)), \ + ((r)->lower = LOWERPART(u))) + +#define MaxBigNum(r) (((r)->upper = BIGNUMUPPER-1), \ + ((r)->lower = BIGNUMLOWER-1)) + +static void +BigNumAdd(BigNumPtr x, BigNumPtr y, BigNumPtr r) +{ + BigNumLower lower, carry = 0; + + lower = x->lower + y->lower; + if (lower >= BIGNUMLOWER) { + lower -= BIGNUMLOWER; + carry = 1; + } + r->lower = lower; + r->upper = x->upper + y->upper + carry; +} + +static Pixel +FindBestPixel(EntryPtr pentFirst, int size, xrgb * prgb, int channel) +{ + EntryPtr pent; + Pixel pixel, final; + long dr, dg, db; + unsigned long sq; + BigNumRec minval, sum, temp; + + final = 0; + MaxBigNum(&minval); + /* look for the minimal difference */ + for (pent = pentFirst, pixel = 0; pixel < size; pent++, pixel++) { + dr = dg = db = 0; + switch (channel) { + case PSEUDOMAP: + dg = (long) pent->co.local.green - prgb->green; + db = (long) pent->co.local.blue - prgb->blue; + case REDMAP: + dr = (long) pent->co.local.red - prgb->red; + break; + case GREENMAP: + dg = (long) pent->co.local.green - prgb->green; + break; + case BLUEMAP: + db = (long) pent->co.local.blue - prgb->blue; + break; + } + sq = dr * dr; + UnsignedToBigNum(sq, &sum); + sq = dg * dg; + UnsignedToBigNum(sq, &temp); + BigNumAdd(&sum, &temp, &sum); + sq = db * db; + UnsignedToBigNum(sq, &temp); + BigNumAdd(&sum, &temp, &sum); + if (BigNumGreater(&minval, &sum)) { + final = pixel; + minval = sum; + } + } + return final; +} + +static void +FindColorInRootCmap(ColormapPtr pmap, EntryPtr pentFirst, int size, + xrgb * prgb, Pixel * pPixel, int channel, + ColorCompareProcPtr comp) +{ + EntryPtr pent; + Pixel pixel; + int count; + + if ((pixel = *pPixel) >= size) + pixel = 0; + for (pent = pentFirst + pixel, count = size; --count >= 0; pent++, pixel++) { + if (pent->refcnt > 0 && (*comp) (pent, prgb)) { + switch (channel) { + case REDMAP: + pixel <<= pmap->pVisual->offsetRed; + break; + case GREENMAP: + pixel <<= pmap->pVisual->offsetGreen; + break; + case BLUEMAP: + pixel <<= pmap->pVisual->offsetBlue; + break; + default: /* PSEUDOMAP */ + break; + } + *pPixel = pixel; + } + } +} + +/* Tries to find a color in pmap that exactly matches the one requested in prgb + * if it can't it allocates one. + * Starts looking at pentFirst + *pPixel, so if you want a specific pixel, + * load *pPixel with that value, otherwise set it to 0 + */ +int +FindColor(ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb * prgb, + Pixel * pPixel, int channel, int client, ColorCompareProcPtr comp) +{ + EntryPtr pent; + Bool foundFree; + Pixel pixel, Free = 0; + int npix, count, *nump = NULL; + Pixel **pixp = NULL, *ppix; + xColorItem def; + + foundFree = FALSE; + + if ((pixel = *pPixel) >= size) + pixel = 0; + /* see if there is a match, and also look for a free entry */ + for (pent = pentFirst + pixel, count = size; --count >= 0;) { + if (pent->refcnt > 0) { + if ((*comp) (pent, prgb)) { + if (client >= 0) + pent->refcnt++; + *pPixel = pixel; + switch (channel) { + case REDMAP: + *pPixel <<= pmap->pVisual->offsetRed; + case PSEUDOMAP: + break; + case GREENMAP: + *pPixel <<= pmap->pVisual->offsetGreen; + break; + case BLUEMAP: + *pPixel <<= pmap->pVisual->offsetBlue; + break; + } + goto gotit; + } + } + else if (!foundFree && pent->refcnt == 0) { + Free = pixel; + foundFree = TRUE; + /* If we're initializing the colormap, then we are looking for + * the first free cell we can find, not to minimize the number + * of entries we use. So don't look any further. */ + if (pmap->flags & BeingCreated) + break; + } + pixel++; + if (pixel >= size) { + pent = pentFirst; + pixel = 0; + } + else + pent++; + } + + /* If we got here, we didn't find a match. If we also didn't find + * a free entry, we're out of luck. Otherwise, we'll usurp a free + * entry and fill it in */ + if (!foundFree) + return BadAlloc; + pent = pentFirst + Free; + pent->fShared = FALSE; + pent->refcnt = (client >= 0) ? 1 : AllocTemporary; + + switch (channel) { + case PSEUDOMAP: + pent->co.local.red = prgb->red; + pent->co.local.green = prgb->green; + pent->co.local.blue = prgb->blue; + def.red = prgb->red; + def.green = prgb->green; + def.blue = prgb->blue; + def.flags = (DoRed | DoGreen | DoBlue); + if (client >= 0) + pmap->freeRed--; + def.pixel = Free; + break; + + case REDMAP: + pent->co.local.red = prgb->red; + def.red = prgb->red; + def.green = pmap->green[0].co.local.green; + def.blue = pmap->blue[0].co.local.blue; + def.flags = DoRed; + if (client >= 0) + pmap->freeRed--; + def.pixel = Free << pmap->pVisual->offsetRed; + break; + + case GREENMAP: + pent->co.local.green = prgb->green; + def.red = pmap->red[0].co.local.red; + def.green = prgb->green; + def.blue = pmap->blue[0].co.local.blue; + def.flags = DoGreen; + if (client >= 0) + pmap->freeGreen--; + def.pixel = Free << pmap->pVisual->offsetGreen; + break; + + case BLUEMAP: + pent->co.local.blue = prgb->blue; + def.red = pmap->red[0].co.local.red; + def.green = pmap->green[0].co.local.green; + def.blue = prgb->blue; + def.flags = DoBlue; + if (client >= 0) + pmap->freeBlue--; + def.pixel = Free << pmap->pVisual->offsetBlue; + break; + } + (*pmap->pScreen->StoreColors) (pmap, 1, &def); + pixel = Free; + *pPixel = def.pixel; + + gotit: + if (pmap->flags & BeingCreated || client == -1) + return Success; + /* Now remember the pixel, for freeing later */ + switch (channel) { + case PSEUDOMAP: + case REDMAP: + nump = pmap->numPixelsRed; + pixp = pmap->clientPixelsRed; + break; + + case GREENMAP: + nump = pmap->numPixelsGreen; + pixp = pmap->clientPixelsGreen; + break; + + case BLUEMAP: + nump = pmap->numPixelsBlue; + pixp = pmap->clientPixelsBlue; + break; + } + npix = nump[client]; + ppix = (Pixel *) realloc(pixp[client], (npix + 1) * sizeof(Pixel)); + if (!ppix) { + pent->refcnt--; + if (!pent->fShared) + switch (channel) { + case PSEUDOMAP: + case REDMAP: + pmap->freeRed++; + break; + case GREENMAP: + pmap->freeGreen++; + break; + case BLUEMAP: + pmap->freeBlue++; + break; + } + return BadAlloc; + } + ppix[npix] = pixel; + pixp[client] = ppix; + nump[client]++; + + return Success; +} + +/* Comparison functions -- passed to FindColor to determine if an + * entry is already the color we're looking for or not */ +static int +AllComp(EntryPtr pent, xrgb * prgb) +{ + if ((pent->co.local.red == prgb->red) && + (pent->co.local.green == prgb->green) && + (pent->co.local.blue == prgb->blue)) + return 1; + return 0; +} + +static int +RedComp(EntryPtr pent, xrgb * prgb) +{ + if (pent->co.local.red == prgb->red) + return 1; + return 0; +} + +static int +GreenComp(EntryPtr pent, xrgb * prgb) +{ + if (pent->co.local.green == prgb->green) + return 1; + return 0; +} + +static int +BlueComp(EntryPtr pent, xrgb * prgb) +{ + if (pent->co.local.blue == prgb->blue) + return 1; + return 0; +} + +/* Read the color value of a cell */ + +int +QueryColors(ColormapPtr pmap, int count, Pixel * ppixIn, xrgb * prgbList, + ClientPtr client) +{ + Pixel *ppix, pixel; + xrgb *prgb; + VisualPtr pVisual; + EntryPtr pent; + Pixel i; + int errVal = Success; + + pVisual = pmap->pVisual; + if ((pmap->class | DynamicClass) == DirectColor) { + int numred, numgreen, numblue; + Pixel rgbbad; + + numred = NUMRED(pVisual); + numgreen = NUMGREEN(pVisual); + numblue = NUMBLUE(pVisual); + rgbbad = ~RGBMASK(pVisual); + for (ppix = ppixIn, prgb = prgbList; --count >= 0; ppix++, prgb++) { + pixel = *ppix; + if (pixel & rgbbad) { + client->errorValue = pixel; + errVal = BadValue; + continue; + } + i = (pixel & pVisual->redMask) >> pVisual->offsetRed; + if (i >= numred) { + client->errorValue = pixel; + errVal = BadValue; + continue; + } + prgb->red = pmap->red[i].co.local.red; + i = (pixel & pVisual->greenMask) >> pVisual->offsetGreen; + if (i >= numgreen) { + client->errorValue = pixel; + errVal = BadValue; + continue; + } + prgb->green = pmap->green[i].co.local.green; + i = (pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (i >= numblue) { + client->errorValue = pixel; + errVal = BadValue; + continue; + } + prgb->blue = pmap->blue[i].co.local.blue; + } + } + else { + for (ppix = ppixIn, prgb = prgbList; --count >= 0; ppix++, prgb++) { + pixel = *ppix; + if (pixel >= pVisual->ColormapEntries) { + client->errorValue = pixel; + errVal = BadValue; + } + else { + pent = (EntryPtr) &pmap->red[pixel]; + if (pent->fShared) { + prgb->red = pent->co.shco.red->color; + prgb->green = pent->co.shco.green->color; + prgb->blue = pent->co.shco.blue->color; + } + else { + prgb->red = pent->co.local.red; + prgb->green = pent->co.local.green; + prgb->blue = pent->co.local.blue; + } + } + } + } + return errVal; +} + +static void +FreePixels(ColormapPtr pmap, int client) +{ + Pixel *ppix, *ppixStart; + int n; + int class; + + class = pmap->class; + ppixStart = pmap->clientPixelsRed[client]; + if (class & DynamicClass) { + n = pmap->numPixelsRed[client]; + for (ppix = ppixStart; --n >= 0;) { + FreeCell(pmap, *ppix, REDMAP); + ppix++; + } + } + + free(ppixStart); + pmap->clientPixelsRed[client] = (Pixel *) NULL; + pmap->numPixelsRed[client] = 0; + if ((class | DynamicClass) == DirectColor) { + ppixStart = pmap->clientPixelsGreen[client]; + if (class & DynamicClass) + for (ppix = ppixStart, n = pmap->numPixelsGreen[client]; --n >= 0;) + FreeCell(pmap, *ppix++, GREENMAP); + free(ppixStart); + pmap->clientPixelsGreen[client] = (Pixel *) NULL; + pmap->numPixelsGreen[client] = 0; + + ppixStart = pmap->clientPixelsBlue[client]; + if (class & DynamicClass) + for (ppix = ppixStart, n = pmap->numPixelsBlue[client]; --n >= 0;) + FreeCell(pmap, *ppix++, BLUEMAP); + free(ppixStart); + pmap->clientPixelsBlue[client] = (Pixel *) NULL; + pmap->numPixelsBlue[client] = 0; + } +} + +/** + * Frees all of a client's colors and cells. + * + * \param value must conform to DeleteType + * \unused fakeid + */ +int +FreeClientPixels(pointer value, XID fakeid) +{ + pointer pmap; + colorResource *pcr = value; + int rc; + + rc = dixLookupResourceByType(&pmap, pcr->mid, RT_COLORMAP, serverClient, + DixRemoveAccess); + if (rc == Success) + FreePixels((ColormapPtr) pmap, pcr->client); + free(pcr); + return Success; +} + +int +AllocColorCells(int client, ColormapPtr pmap, int colors, int planes, + Bool contig, Pixel * ppix, Pixel * masks) +{ + Pixel rmask, gmask, bmask, *ppixFirst, r, g, b; + int n, class; + int ok; + int oldcount; + colorResource *pcr = (colorResource *) NULL; + + class = pmap->class; + if (!(class & DynamicClass)) + return BadAlloc; /* Shouldn't try on this type */ + oldcount = pmap->numPixelsRed[client]; + if (pmap->class == DirectColor) + oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; + if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { + pcr = malloc(sizeof(colorResource)); + if (!pcr) + return BadAlloc; + } + + if (pmap->class == DirectColor) { + ok = AllocDirect(client, pmap, colors, planes, planes, planes, + contig, ppix, &rmask, &gmask, &bmask); + if (ok == Success) { + for (r = g = b = 1, n = planes; --n >= 0; r += r, g += g, b += b) { + while (!(rmask & r)) + r += r; + while (!(gmask & g)) + g += g; + while (!(bmask & b)) + b += b; + *masks++ = r | g | b; + } + } + } + else { + ok = AllocPseudo(client, pmap, colors, planes, contig, ppix, &rmask, + &ppixFirst); + if (ok == Success) { + for (r = 1, n = planes; --n >= 0; r += r) { + while (!(rmask & r)) + r += r; + *masks++ = r; + } + } + } + + /* if this is the client's first pixels in this colormap, tell the + * resource manager that the client has pixels in this colormap which + * should be freed when the client dies */ + if ((ok == Success) && pcr) { + pcr->mid = pmap->mid; + pcr->client = client; + if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer) pcr)) + ok = BadAlloc; + } + else + free(pcr); + + return ok; +} + +int +AllocColorPlanes(int client, ColormapPtr pmap, int colors, + int r, int g, int b, Bool contig, Pixel * pixels, + Pixel * prmask, Pixel * pgmask, Pixel * pbmask) +{ + int ok; + Pixel mask, *ppixFirst; + Pixel shift; + int i; + int class; + int oldcount; + colorResource *pcr = (colorResource *) NULL; + + class = pmap->class; + if (!(class & DynamicClass)) + return BadAlloc; /* Shouldn't try on this type */ + oldcount = pmap->numPixelsRed[client]; + if (class == DirectColor) + oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; + if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { + pcr = malloc(sizeof(colorResource)); + if (!pcr) + return BadAlloc; + } + + if (class == DirectColor) { + ok = AllocDirect(client, pmap, colors, r, g, b, contig, pixels, + prmask, pgmask, pbmask); + } + else { + /* Allocate the proper pixels */ + /* XXX This is sort of bad, because of contig is set, we force all + * r + g + b bits to be contiguous. Should only force contiguity + * per mask + */ + ok = AllocPseudo(client, pmap, colors, r + g + b, contig, pixels, + &mask, &ppixFirst); + + if (ok == Success) { + /* now split that mask into three */ + *prmask = *pgmask = *pbmask = 0; + shift = 1; + for (i = r; --i >= 0; shift += shift) { + while (!(mask & shift)) + shift += shift; + *prmask |= shift; + } + for (i = g; --i >= 0; shift += shift) { + while (!(mask & shift)) + shift += shift; + *pgmask |= shift; + } + for (i = b; --i >= 0; shift += shift) { + while (!(mask & shift)) + shift += shift; + *pbmask |= shift; + } + + /* set up the shared color cells */ + if (!AllocShared(pmap, pixels, colors, r, g, b, + *prmask, *pgmask, *pbmask, ppixFirst)) { + (void) FreeColors(pmap, client, colors, pixels, mask); + ok = BadAlloc; + } + } + } + + /* if this is the client's first pixels in this colormap, tell the + * resource manager that the client has pixels in this colormap which + * should be freed when the client dies */ + if ((ok == Success) && pcr) { + pcr->mid = pmap->mid; + pcr->client = client; + if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer) pcr)) + ok = BadAlloc; + } + else + free(pcr); + + return ok; +} + +static int +AllocDirect(int client, ColormapPtr pmap, int c, int r, int g, int b, + Bool contig, Pixel * pixels, Pixel * prmask, Pixel * pgmask, + Pixel * pbmask) +{ + Pixel *ppixRed, *ppixGreen, *ppixBlue; + Pixel *ppix, *pDst, *p; + int npix, npixR, npixG, npixB; + Bool okR, okG, okB; + Pixel *rpix = 0, *gpix = 0, *bpix = 0; + + npixR = c << r; + npixG = c << g; + npixB = c << b; + if ((r >= 32) || (g >= 32) || (b >= 32) || + (npixR > pmap->freeRed) || (npixR < c) || + (npixG > pmap->freeGreen) || (npixG < c) || + (npixB > pmap->freeBlue) || (npixB < c)) + return BadAlloc; + + /* start out with empty pixels */ + for (p = pixels; p < pixels + c; p++) + *p = 0; + + ppixRed = malloc(npixR * sizeof(Pixel)); + ppixGreen = malloc(npixG * sizeof(Pixel)); + ppixBlue = malloc(npixB * sizeof(Pixel)); + if (!ppixRed || !ppixGreen || !ppixBlue) { + free(ppixBlue); + free(ppixGreen); + free(ppixRed); + return BadAlloc; + } + + okR = AllocCP(pmap, pmap->red, c, r, contig, ppixRed, prmask); + okG = AllocCP(pmap, pmap->green, c, g, contig, ppixGreen, pgmask); + okB = AllocCP(pmap, pmap->blue, c, b, contig, ppixBlue, pbmask); + + if (okR && okG && okB) { + rpix = (Pixel *) realloc(pmap->clientPixelsRed[client], + (pmap->numPixelsRed[client] + (c << r)) * + sizeof(Pixel)); + if (rpix) + pmap->clientPixelsRed[client] = rpix; + gpix = (Pixel *) realloc(pmap->clientPixelsGreen[client], + (pmap->numPixelsGreen[client] + (c << g)) * + sizeof(Pixel)); + if (gpix) + pmap->clientPixelsGreen[client] = gpix; + bpix = (Pixel *) realloc(pmap->clientPixelsBlue[client], + (pmap->numPixelsBlue[client] + (c << b)) * + sizeof(Pixel)); + if (bpix) + pmap->clientPixelsBlue[client] = bpix; + } + + if (!okR || !okG || !okB || !rpix || !gpix || !bpix) { + if (okR) + for (ppix = ppixRed, npix = npixR; --npix >= 0; ppix++) + pmap->red[*ppix].refcnt = 0; + if (okG) + for (ppix = ppixGreen, npix = npixG; --npix >= 0; ppix++) + pmap->green[*ppix].refcnt = 0; + if (okB) + for (ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++) + pmap->blue[*ppix].refcnt = 0; + free(ppixBlue); + free(ppixGreen); + free(ppixRed); + return BadAlloc; + } + + *prmask <<= pmap->pVisual->offsetRed; + *pgmask <<= pmap->pVisual->offsetGreen; + *pbmask <<= pmap->pVisual->offsetBlue; + + ppix = rpix + pmap->numPixelsRed[client]; + for (pDst = pixels, p = ppixRed; p < ppixRed + npixR; p++) { + *ppix++ = *p; + if (p < ppixRed + c) + *pDst++ |= *p << pmap->pVisual->offsetRed; + } + pmap->numPixelsRed[client] += npixR; + pmap->freeRed -= npixR; + + ppix = gpix + pmap->numPixelsGreen[client]; + for (pDst = pixels, p = ppixGreen; p < ppixGreen + npixG; p++) { + *ppix++ = *p; + if (p < ppixGreen + c) + *pDst++ |= *p << pmap->pVisual->offsetGreen; + } + pmap->numPixelsGreen[client] += npixG; + pmap->freeGreen -= npixG; + + ppix = bpix + pmap->numPixelsBlue[client]; + for (pDst = pixels, p = ppixBlue; p < ppixBlue + npixB; p++) { + *ppix++ = *p; + if (p < ppixBlue + c) + *pDst++ |= *p << pmap->pVisual->offsetBlue; + } + pmap->numPixelsBlue[client] += npixB; + pmap->freeBlue -= npixB; + + for (pDst = pixels; pDst < pixels + c; pDst++) + *pDst |= ALPHAMASK(pmap->pVisual); + + free(ppixBlue); + free(ppixGreen); + free(ppixRed); + + return Success; +} + +static int +AllocPseudo(int client, ColormapPtr pmap, int c, int r, Bool contig, + Pixel * pixels, Pixel * pmask, Pixel ** pppixFirst) +{ + Pixel *ppix, *p, *pDst, *ppixTemp; + int npix; + Bool ok; + + npix = c << r; + if ((r >= 32) || (npix > pmap->freeRed) || (npix < c)) + return BadAlloc; + if (!(ppixTemp = malloc(npix * sizeof(Pixel)))) + return BadAlloc; + ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask); + + if (ok) { + + /* all the allocated pixels are added to the client pixel list, + * but only the unique ones are returned to the client */ + ppix = (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; + free(ppixTemp); + return BadAlloc; + } + pmap->clientPixelsRed[client] = ppix; + ppix += pmap->numPixelsRed[client]; + *pppixFirst = ppix; + pDst = pixels; + for (p = ppixTemp; p < ppixTemp + npix; p++) { + *ppix++ = *p; + if (p < ppixTemp + c) + *pDst++ = *p; + } + pmap->numPixelsRed[client] += npix; + pmap->freeRed -= npix; + } + free(ppixTemp); + return ok ? Success : BadAlloc; +} + +/* Allocates count << planes pixels from colormap pmap for client. If + * contig, then the plane mask is made of consecutive bits. Returns + * all count << pixels in the array pixels. The first count of those + * pixels are the unique pixels. *pMask has the mask to Or with the + * unique pixels to get the rest of them. + * + * Returns True iff all pixels could be allocated + * All cells allocated will have refcnt set to AllocPrivate and shared to FALSE + * (see AllocShared for why we care) + */ +static Bool +AllocCP(ColormapPtr pmap, EntryPtr pentFirst, int count, int planes, + Bool contig, Pixel * pixels, Pixel * pMask) +{ + EntryPtr ent; + Pixel pixel, base, entries, maxp, save; + int dplanes, found; + Pixel *ppix; + Pixel mask; + Pixel finalmask; + + dplanes = pmap->pVisual->nplanes; + + /* Easy case. Allocate pixels only */ + if (planes == 0) { + /* allocate writable entries */ + ppix = pixels; + ent = pentFirst; + pixel = 0; + while (--count >= 0) { + /* Just find count unallocated cells */ + while (ent->refcnt) { + ent++; + pixel++; + } + ent->refcnt = AllocPrivate; + *ppix++ = pixel; + ent->fShared = FALSE; + } + *pMask = 0; + return TRUE; + } + else if (planes > dplanes) { + return FALSE; + } + + /* General case count pixels * 2 ^ planes cells to be allocated */ + + /* make room for new pixels */ + ent = pentFirst; + + /* first try for contiguous planes, since it's fastest */ + for (mask = (((Pixel) 1) << planes) - 1, base = 1, dplanes -= (planes - 1); + --dplanes >= 0; mask += mask, base += base) { + ppix = pixels; + found = 0; + pixel = 0; + entries = pmap->pVisual->ColormapEntries - mask; + while (pixel < entries) { + save = pixel; + maxp = pixel + mask + base; + /* check if all are free */ + while (pixel != maxp && ent[pixel].refcnt == 0) + pixel += base; + if (pixel == maxp) { + /* this one works */ + *ppix++ = save; + found++; + if (found == count) { + /* found enough, allocate them all */ + while (--count >= 0) { + pixel = pixels[count]; + maxp = pixel + mask; + while (1) { + ent[pixel].refcnt = AllocPrivate; + ent[pixel].fShared = FALSE; + if (pixel == maxp) + break; + pixel += base; + *ppix++ = pixel; + } + } + *pMask = mask; + return TRUE; + } + } + pixel = save + 1; + if (pixel & mask) + pixel += mask; + } + } + + dplanes = pmap->pVisual->nplanes; + if (contig || planes == 1 || dplanes < 3) + return FALSE; + + /* this will be very slow for large maps, need a better algorithm */ + + /* + we can generate the smallest and largest numbers that fits in dplanes + bits and contain exactly planes bits set as follows. First, we need to + check that it is possible to generate such a mask at all. + (Non-contiguous masks need one more bit than contiguous masks). Then + the smallest such mask consists of the rightmost planes-1 bits set, then + a zero, then a one in position planes + 1. The formula is + (3 << (planes-1)) -1 + The largest such masks consists of the leftmost planes-1 bits set, then + a zero, then a one bit in position dplanes-planes-1. If dplanes is + smaller than 32 (the number of bits in a word) then the formula is: + (1<<dplanes) - (1<<(dplanes-planes+1) + (1<<dplanes-planes-1) + If dplanes = 32, then we can't calculate (1<<dplanes) and we have + to use: + ( (1<<(planes-1)) - 1) << (dplanes-planes+1) + (1<<(dplanes-planes-1)) + + << Thank you, Loretta>>> + + */ + + finalmask = + (((((Pixel) 1) << (planes - 1)) - 1) << (dplanes - planes + 1)) + + (((Pixel) 1) << (dplanes - planes - 1)); + for (mask = (((Pixel) 3) << (planes - 1)) - 1; mask <= finalmask; mask++) { + /* next 3 magic statements count number of ones (HAKMEM #169) */ + pixel = (mask >> 1) & 033333333333; + pixel = mask - pixel - ((pixel >> 1) & 033333333333); + if ((((pixel + (pixel >> 3)) & 030707070707) % 077) != planes) + continue; + ppix = pixels; + found = 0; + entries = pmap->pVisual->ColormapEntries - mask; + base = lowbit(mask); + for (pixel = 0; pixel < entries; pixel++) { + if (pixel & mask) + continue; + maxp = 0; + /* check if all are free */ + while (ent[pixel + maxp].refcnt == 0) { + GetNextBitsOrBreak(maxp, mask, base); + } + if ((maxp < mask) || (ent[pixel + mask].refcnt != 0)) + continue; + /* this one works */ + *ppix++ = pixel; + found++; + if (found < count) + continue; + /* found enough, allocate them all */ + while (--count >= 0) { + pixel = (pixels)[count]; + maxp = 0; + while (1) { + ent[pixel + maxp].refcnt = AllocPrivate; + ent[pixel + maxp].fShared = FALSE; + GetNextBitsOrBreak(maxp, mask, base); + *ppix++ = pixel + maxp; + } + } + + *pMask = mask; + return TRUE; + } + } + return FALSE; +} + +/** + * + * \param ppixFirst First of the client's new pixels + */ +static Bool +AllocShared(ColormapPtr pmap, Pixel * ppix, int c, int r, int g, int b, + Pixel rmask, Pixel gmask, Pixel bmask, Pixel * ppixFirst) +{ + Pixel *pptr, *cptr; + int npix, z, npixClientNew, npixShared; + Pixel basemask, base, bits, common; + SHAREDCOLOR *pshared, **ppshared, **psharedList; + + npixClientNew = c << (r + g + b); + npixShared = (c << r) + (c << g) + (c << b); + psharedList = malloc(npixShared * sizeof(SHAREDCOLOR *)); + if (!psharedList) + return FALSE; + ppshared = psharedList; + for (z = npixShared; --z >= 0;) { + if (!(ppshared[z] = malloc(sizeof(SHAREDCOLOR)))) { + for (z++; z < npixShared; z++) + free(ppshared[z]); + free(psharedList); + return FALSE; + } + } + for (pptr = ppix, npix = c; --npix >= 0; pptr++) { + basemask = ~(gmask | bmask); + common = *pptr & basemask; + if (rmask) { + bits = 0; + base = lowbit(rmask); + while (1) { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { + if ((*cptr & basemask) == (common | bits)) { + pmap->red[*cptr].fShared = TRUE; + pmap->red[*cptr].co.shco.red = pshared; + } + } + GetNextBitsOrBreak(bits, rmask, base); + } + } + else { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { + if ((*cptr & basemask) == common) { + pmap->red[*cptr].fShared = TRUE; + pmap->red[*cptr].co.shco.red = pshared; + } + } + } + basemask = ~(rmask | bmask); + common = *pptr & basemask; + if (gmask) { + bits = 0; + base = lowbit(gmask); + while (1) { + pshared = *ppshared++; + pshared->refcnt = 1 << (r + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { + if ((*cptr & basemask) == (common | bits)) { + pmap->red[*cptr].co.shco.green = pshared; + } + } + GetNextBitsOrBreak(bits, gmask, base); + } + } + else { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { + if ((*cptr & basemask) == common) { + pmap->red[*cptr].co.shco.green = pshared; + } + } + } + basemask = ~(rmask | gmask); + common = *pptr & basemask; + if (bmask) { + bits = 0; + base = lowbit(bmask); + while (1) { + pshared = *ppshared++; + pshared->refcnt = 1 << (r + g); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { + if ((*cptr & basemask) == (common | bits)) { + pmap->red[*cptr].co.shco.blue = pshared; + } + } + GetNextBitsOrBreak(bits, bmask, base); + } + } + else { + pshared = *ppshared++; + pshared->refcnt = 1 << (g + b); + for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { + if ((*cptr & basemask) == common) { + pmap->red[*cptr].co.shco.blue = pshared; + } + } + } + } + free(psharedList); + return TRUE; +} + +/** FreeColors + * Free colors and/or cells (probably slow for large numbers) + */ +int +FreeColors(ColormapPtr pmap, int client, int count, Pixel * pixels, Pixel mask) +{ + int rval, result, class; + Pixel rmask; + + class = pmap->class; + if (pmap->flags & AllAllocated) + return BadAccess; + if ((class | DynamicClass) == DirectColor) { + rmask = mask & RGBMASK(pmap->pVisual); + result = FreeCo(pmap, client, REDMAP, count, pixels, + mask & pmap->pVisual->redMask); + /* If any of the three calls fails, we must report that, if more + * than one fails, it's ok that we report the last one */ + rval = FreeCo(pmap, client, GREENMAP, count, pixels, + mask & pmap->pVisual->greenMask); + if (rval != Success) + result = rval; + rval = FreeCo(pmap, client, BLUEMAP, count, pixels, + mask & pmap->pVisual->blueMask); + if (rval != Success) + result = rval; + } + else { + rmask = mask & ((((Pixel) 1) << pmap->pVisual->nplanes) - 1); + result = FreeCo(pmap, client, PSEUDOMAP, count, pixels, rmask); + } + if ((mask != rmask) && count) { + clients[client]->errorValue = *pixels | mask; + result = BadValue; + } + /* XXX should worry about removing any RT_CMAPENTRY resource */ + return result; +} + +/** + * Helper for FreeColors -- frees all combinations of *newpixels and mask bits + * which the client has allocated in channel colormap cells of pmap. + * doesn't change newpixels if it doesn't need to + * + * \param pmap which colormap head + * \param color which sub-map, eg, RED, BLUE, PSEUDO + * \param npixIn number of pixels passed in + * \param ppixIn number of base pixels + * \param mask mask client gave us + */ +static int +FreeCo(ColormapPtr pmap, int client, int color, int npixIn, Pixel * ppixIn, + Pixel mask) +{ + Pixel *ppixClient, pixTest; + int npixClient, npixNew, npix; + Pixel bits, base, cmask, rgbbad; + Pixel *pptr, *cptr; + int n, zapped; + int errVal = Success; + int offset, numents; + + if (npixIn == 0) + return errVal; + bits = 0; + zapped = 0; + base = lowbit(mask); + + switch (color) { + case REDMAP: + cmask = pmap->pVisual->redMask; + rgbbad = ~RGBMASK(pmap->pVisual); + offset = pmap->pVisual->offsetRed; + numents = (cmask >> offset) + 1; + ppixClient = pmap->clientPixelsRed[client]; + npixClient = pmap->numPixelsRed[client]; + break; + case GREENMAP: + cmask = pmap->pVisual->greenMask; + rgbbad = ~RGBMASK(pmap->pVisual); + offset = pmap->pVisual->offsetGreen; + numents = (cmask >> offset) + 1; + ppixClient = pmap->clientPixelsGreen[client]; + npixClient = pmap->numPixelsGreen[client]; + break; + case BLUEMAP: + cmask = pmap->pVisual->blueMask; + rgbbad = ~RGBMASK(pmap->pVisual); + offset = pmap->pVisual->offsetBlue; + numents = (cmask >> offset) + 1; + ppixClient = pmap->clientPixelsBlue[client]; + npixClient = pmap->numPixelsBlue[client]; + break; + default: /* so compiler can see that everything gets initialized */ + case PSEUDOMAP: + cmask = ~((Pixel) 0); + rgbbad = 0; + offset = 0; + numents = pmap->pVisual->ColormapEntries; + ppixClient = pmap->clientPixelsRed[client]; + npixClient = pmap->numPixelsRed[client]; + break; + } + + /* zap all pixels which match */ + while (1) { + /* go through pixel list */ + for (pptr = ppixIn, n = npixIn; --n >= 0; pptr++) { + pixTest = ((*pptr | bits) & cmask) >> offset; + if ((pixTest >= numents) || (*pptr & rgbbad)) { + clients[client]->errorValue = *pptr | bits; + errVal = BadValue; + continue; + } + + /* find match in client list */ + for (cptr = ppixClient, npix = npixClient; + --npix >= 0 && *cptr != pixTest; cptr++); + + if (npix >= 0) { + if (pmap->class & DynamicClass) { + FreeCell(pmap, pixTest, color); + } + *cptr = ~((Pixel) 0); + zapped++; + } + else + errVal = BadAccess; + } + /* generate next bits value */ + GetNextBitsOrBreak(bits, mask, base); + } + + /* delete freed pixels from client pixel list */ + if (zapped) { + npixNew = npixClient - zapped; + if (npixNew) { + /* Since the list can only get smaller, we can do a copy in + * place and then realloc to a smaller size */ + pptr = cptr = ppixClient; + + /* If we have all the new pixels, we don't have to examine the + * rest of the old ones */ + for (npix = 0; npix < npixNew; cptr++) { + if (*cptr != ~((Pixel) 0)) { + *pptr++ = *cptr; + npix++; + } + } + pptr = (Pixel *) realloc(ppixClient, npixNew * sizeof(Pixel)); + if (pptr) + ppixClient = pptr; + npixClient = npixNew; + } + else { + npixClient = 0; + free(ppixClient); + ppixClient = (Pixel *) NULL; + } + switch (color) { + case PSEUDOMAP: + case REDMAP: + pmap->clientPixelsRed[client] = ppixClient; + pmap->numPixelsRed[client] = npixClient; + break; + case GREENMAP: + pmap->clientPixelsGreen[client] = ppixClient; + pmap->numPixelsGreen[client] = npixClient; + break; + case BLUEMAP: + pmap->clientPixelsBlue[client] = ppixClient; + pmap->numPixelsBlue[client] = npixClient; + break; + } + } + return errVal; +} + +/* Redefine color values */ +int +StoreColors(ColormapPtr pmap, int count, xColorItem * defs, ClientPtr client) +{ + Pixel pix; + xColorItem *pdef; + EntryPtr pent, pentT, pentLast; + VisualPtr pVisual; + SHAREDCOLOR *pred, *pgreen, *pblue; + int n, ChgRed, ChgGreen, ChgBlue, idef; + int class, errVal = Success; + int ok; + + class = pmap->class; + if (!(class & DynamicClass) && !(pmap->flags & BeingCreated)) { + return BadAccess; + } + pVisual = pmap->pVisual; + + idef = 0; + if ((class | DynamicClass) == DirectColor) { + int numred, numgreen, numblue; + Pixel rgbbad; + + numred = NUMRED(pVisual); + numgreen = NUMGREEN(pVisual); + numblue = NUMBLUE(pVisual); + rgbbad = ~RGBMASK(pVisual); + for (pdef = defs, n = 0; n < count; pdef++, n++) { + ok = TRUE; + (*pmap->pScreen->ResolveColor) + (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); + + if (pdef->pixel & rgbbad) { + errVal = BadValue; + client->errorValue = pdef->pixel; + continue; + } + pix = (pdef->pixel & pVisual->redMask) >> pVisual->offsetRed; + if (pix >= numred) { + errVal = BadValue; + ok = FALSE; + } + else if (pmap->red[pix].refcnt != AllocPrivate) { + errVal = BadAccess; + ok = FALSE; + } + else if (pdef->flags & DoRed) { + pmap->red[pix].co.local.red = pdef->red; + } + else { + pdef->red = pmap->red[pix].co.local.red; + } + + pix = (pdef->pixel & pVisual->greenMask) >> pVisual->offsetGreen; + if (pix >= numgreen) { + errVal = BadValue; + ok = FALSE; + } + else if (pmap->green[pix].refcnt != AllocPrivate) { + errVal = BadAccess; + ok = FALSE; + } + else if (pdef->flags & DoGreen) { + pmap->green[pix].co.local.green = pdef->green; + } + else { + pdef->green = pmap->green[pix].co.local.green; + } + + pix = (pdef->pixel & pVisual->blueMask) >> pVisual->offsetBlue; + if (pix >= numblue) { + errVal = BadValue; + ok = FALSE; + } + else if (pmap->blue[pix].refcnt != AllocPrivate) { + errVal = BadAccess; + ok = FALSE; + } + else if (pdef->flags & DoBlue) { + pmap->blue[pix].co.local.blue = pdef->blue; + } + else { + pdef->blue = pmap->blue[pix].co.local.blue; + } + /* If this is an o.k. entry, then it gets added to the list + * to be sent to the hardware. If not, skip it. Once we've + * skipped one, we have to copy all the others. + */ + if (ok) { + if (idef != n) + defs[idef] = defs[n]; + idef++; + } + else + client->errorValue = pdef->pixel; + } + } + else { + for (pdef = defs, n = 0; n < count; pdef++, n++) { + + ok = TRUE; + if (pdef->pixel >= pVisual->ColormapEntries) { + client->errorValue = pdef->pixel; + errVal = BadValue; + ok = FALSE; + } + else if (pmap->red[pdef->pixel].refcnt != AllocPrivate) { + errVal = BadAccess; + ok = FALSE; + } + + /* If this is an o.k. entry, then it gets added to the list + * to be sent to the hardware. If not, skip it. Once we've + * skipped one, we have to copy all the others. + */ + if (ok) { + if (idef != n) + defs[idef] = defs[n]; + idef++; + } + else + continue; + + (*pmap->pScreen->ResolveColor) + (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); + + pent = &pmap->red[pdef->pixel]; + + if (pdef->flags & DoRed) { + if (pent->fShared) { + pent->co.shco.red->color = pdef->red; + if (pent->co.shco.red->refcnt > 1) + ok = FALSE; + } + else + pent->co.local.red = pdef->red; + } + else { + if (pent->fShared) + pdef->red = pent->co.shco.red->color; + else + pdef->red = pent->co.local.red; + } + if (pdef->flags & DoGreen) { + if (pent->fShared) { + pent->co.shco.green->color = pdef->green; + if (pent->co.shco.green->refcnt > 1) + ok = FALSE; + } + else + pent->co.local.green = pdef->green; + } + else { + if (pent->fShared) + pdef->green = pent->co.shco.green->color; + else + pdef->green = pent->co.local.green; + } + if (pdef->flags & DoBlue) { + if (pent->fShared) { + pent->co.shco.blue->color = pdef->blue; + if (pent->co.shco.blue->refcnt > 1) + ok = FALSE; + } + else + pent->co.local.blue = pdef->blue; + } + else { + if (pent->fShared) + pdef->blue = pent->co.shco.blue->color; + else + pdef->blue = pent->co.local.blue; + } + + if (!ok) { + /* have to run through the colormap and change anybody who + * shares this value */ + pred = pent->co.shco.red; + pgreen = pent->co.shco.green; + pblue = pent->co.shco.blue; + ChgRed = pdef->flags & DoRed; + ChgGreen = pdef->flags & DoGreen; + ChgBlue = pdef->flags & DoBlue; + pentLast = pmap->red + pVisual->ColormapEntries; + + for (pentT = pmap->red; pentT < pentLast; pentT++) { + if (pentT->fShared && (pentT != pent)) { + xColorItem defChg; + + /* There are, alas, devices in this world too dumb + * to read their own hardware colormaps. Sick, but + * true. So we're going to be really nice and load + * the xColorItem with the proper value for all the + * fields. We will only set the flags for those + * fields that actually change. Smart devices can + * arrange to change only those fields. Dumb devices + * can rest assured that we have provided for them, + * and can change all three fields */ + + defChg.flags = 0; + if (ChgRed && pentT->co.shco.red == pred) { + defChg.flags |= DoRed; + } + if (ChgGreen && pentT->co.shco.green == pgreen) { + defChg.flags |= DoGreen; + } + if (ChgBlue && pentT->co.shco.blue == pblue) { + defChg.flags |= DoBlue; + } + if (defChg.flags != 0) { + defChg.pixel = pentT - pmap->red; + defChg.red = pentT->co.shco.red->color; + defChg.green = pentT->co.shco.green->color; + defChg.blue = pentT->co.shco.blue->color; + (*pmap->pScreen->StoreColors) (pmap, 1, &defChg); + } + } + } + + } + } + } + /* Note that we use idef, the count of acceptable entries, and not + * count, the count of proposed entries */ + if (idef != 0) + (*pmap->pScreen->StoreColors) (pmap, idef, defs); + return errVal; +} + +int +IsMapInstalled(Colormap map, WindowPtr pWin) +{ + Colormap *pmaps; + int imap, nummaps, found; + + pmaps = + malloc(pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); + if (!pmaps) + return FALSE; + nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) + (pWin->drawable.pScreen, pmaps); + found = FALSE; + for (imap = 0; imap < nummaps; imap++) { + if (pmaps[imap] == map) { + found = TRUE; + break; + } + } + free(pmaps); + return found; +} + +struct colormap_lookup_data { + ScreenPtr pScreen; + VisualPtr visuals; +}; + +static void +_colormap_find_resource(pointer value, XID id, pointer cdata) +{ + struct colormap_lookup_data *cmap_data = cdata; + VisualPtr visuals = cmap_data->visuals; + ScreenPtr pScreen = cmap_data->pScreen; + ColormapPtr cmap = value; + int j; + + if (pScreen != cmap->pScreen) + return; + + j = cmap->pVisual - pScreen->visuals; + cmap->pVisual = &visuals[j]; +} + +/* something has realloced the visuals, instead of breaking + ABI fix it up here - glx and compsite did this wrong */ +Bool +ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth) +{ + struct colormap_lookup_data cdata; + int numVisuals; + VisualPtr visuals; + XID *vids, vid; + int first_new_vid, first_new_visual, i; + + first_new_vid = depth->numVids; + first_new_visual = pScreen->numVisuals; + + vids = + realloc(depth->vids, (depth->numVids + new_visual_count) * sizeof(XID)); + if (!vids) + return FALSE; + + /* its realloced now no going back if we fail the next one */ + depth->vids = vids; + + numVisuals = pScreen->numVisuals + new_visual_count; + visuals = realloc(pScreen->visuals, numVisuals * sizeof(VisualRec)); + if (!visuals) { + return FALSE; + } + + cdata.visuals = visuals; + cdata.pScreen = pScreen; + FindClientResourcesByType(serverClient, RT_COLORMAP, + _colormap_find_resource, &cdata); + + pScreen->visuals = visuals; + + for (i = 0; i < new_visual_count; i++) { + vid = FakeClientID(0); + pScreen->visuals[first_new_visual + i].vid = vid; + vids[first_new_vid + i] = vid; + } + + depth->numVids += new_visual_count; + pScreen->numVisuals += new_visual_count; + + return TRUE; +} diff --git a/dix/cursor.c b/dix/cursor.c new file mode 100644 index 0000000..8cc54bd --- /dev/null +++ b/dix/cursor.c @@ -0,0 +1,501 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include "servermd.h" +#include "scrnintstr.h" +#include "dixstruct.h" +#include "cursorstr.h" +#include "dixfontstr.h" +#include "opaque.h" +#include "inputstr.h" +#include "xace.h" + +typedef struct _GlyphShare { + FontPtr font; + unsigned short sourceChar; + unsigned short maskChar; + CursorBitsPtr bits; + struct _GlyphShare *next; +} GlyphShare, *GlyphSharePtr; + +static GlyphSharePtr sharedGlyphs = (GlyphSharePtr) NULL; + +DevScreenPrivateKeyRec cursorScreenDevPriv; + +static CARD32 cursorSerial; + +static void +FreeCursorBits(CursorBitsPtr bits) +{ + if (--bits->refcnt > 0) + return; + free(bits->source); + free(bits->mask); +#ifdef ARGB_CURSOR + free(bits->argb); +#endif + dixFiniPrivates(bits, PRIVATE_CURSOR_BITS); + if (bits->refcnt == 0) { + GlyphSharePtr *prev, this; + + for (prev = &sharedGlyphs; + (this = *prev) && (this->bits != bits); prev = &this->next); + if (this) { + *prev = this->next; + CloseFont(this->font, (Font) 0); + free(this); + } + free(bits); + } +} + +/** + * To be called indirectly by DeleteResource; must use exactly two args. + * + * \param value must conform to DeleteType + */ +int +FreeCursor(pointer value, XID cid) +{ + int nscr; + CursorPtr pCurs = (CursorPtr) value; + + ScreenPtr pscr; + DeviceIntPtr pDev = NULL; /* unused anyway */ + + + UnrefCursor(pCurs); + if (CursorRefCount(pCurs) != 0) + return Success; + + BUG_WARN(CursorRefCount(pCurs) < 0); + + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { + pscr = screenInfo.screens[nscr]; + (void) (*pscr->UnrealizeCursor) (pDev, pscr, pCurs); + } + FreeCursorBits(pCurs->bits); + dixFiniPrivates(pCurs, PRIVATE_CURSOR); + free(pCurs); + return Success; +} + +CursorPtr +RefCursor(CursorPtr cursor) +{ + if (cursor) + cursor->refcnt++; + return cursor; +} + +CursorPtr +UnrefCursor(CursorPtr cursor) +{ + if (cursor) + cursor->refcnt--; + return cursor; +} + +int +CursorRefCount(const CursorPtr cursor) +{ + return cursor ? cursor->refcnt : 0; +} + + +/* + * We check for empty cursors so that we won't have to display them + */ +static void +CheckForEmptyMask(CursorBitsPtr bits) +{ + unsigned char *msk = bits->mask; + int n = BitmapBytePad(bits->width) * bits->height; + + bits->emptyMask = FALSE; + while (n--) + if (*(msk++) != 0) + return; +#ifdef ARGB_CURSOR + if (bits->argb) { + CARD32 *argb = bits->argb; + + n = bits->width * bits->height; + while (n--) + if (*argb++ & 0xff000000) + return; + } +#endif + bits->emptyMask = TRUE; +} + +/** + * realize the cursor for every screen. Do not change the refcnt, this will be + * changed when ChangeToCursor actually changes the sprite. + * + * @return Success if all cursors realize on all screens, BadAlloc if realize + * failed for a device on a given screen. + */ +static int +RealizeCursorAllScreens(CursorPtr pCurs) +{ + DeviceIntPtr pDev; + ScreenPtr pscr; + int nscr; + + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { + pscr = screenInfo.screens[nscr]; + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if (DevHasCursor(pDev)) { + if (!(*pscr->RealizeCursor) (pDev, pscr, pCurs)) { + /* Realize failed for device pDev on screen pscr. + * We have to assume that for all devices before, realize + * worked. We need to rollback all devices so far on the + * current screen and then all devices on previous + * screens. + */ + DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator */ + + while (pDevIt && pDevIt != pDev) { + if (DevHasCursor(pDevIt)) + (*pscr->UnrealizeCursor) (pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } + while (--nscr >= 0) { + pscr = screenInfo.screens[nscr]; + /* now unrealize all devices on previous screens */ + pDevIt = inputInfo.devices; + while (pDevIt) { + if (DevHasCursor(pDevIt)) + (*pscr->UnrealizeCursor) (pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } + (*pscr->UnrealizeCursor) (pDev, pscr, pCurs); + } + return BadAlloc; + } + } + } + } + + return Success; +} + +/** + * does nothing about the resource table, just creates the data structure. + * does not copy the src and mask bits + * + * \param psrcbits server-defined padding + * \param pmaskbits server-defined padding + * \param argb no padding + */ +int +AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, + CARD32 *argb, CursorMetricPtr cm, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue, + CursorPtr *ppCurs, ClientPtr client, XID cid) +{ + CursorBitsPtr bits; + CursorPtr pCurs; + int rc; + + *ppCurs = NULL; + pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE + CURSOR_BITS_SIZE, 1); + if (!pCurs) + return BadAlloc; + + bits = (CursorBitsPtr) ((char *) pCurs + CURSOR_REC_SIZE); + dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); + dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS) + bits->source = psrcbits; + bits->mask = pmaskbits; +#ifdef ARGB_CURSOR + bits->argb = argb; +#endif + bits->width = cm->width; + bits->height = cm->height; + bits->xhot = cm->xhot; + bits->yhot = cm->yhot; + pCurs->refcnt = 1; + bits->refcnt = -1; + CheckForEmptyMask(bits); + pCurs->bits = bits; + pCurs->serialNumber = ++cursorSerial; + pCurs->name = None; + + pCurs->foreRed = foreRed; + pCurs->foreGreen = foreGreen; + pCurs->foreBlue = foreBlue; + + pCurs->backRed = backRed; + pCurs->backGreen = backGreen; + pCurs->backBlue = backBlue; + + pCurs->id = cid; + + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, + pCurs, RT_NONE, NULL, DixCreateAccess); + if (rc != Success) + goto error; + + rc = RealizeCursorAllScreens(pCurs); + if (rc != Success) + goto error; + + *ppCurs = pCurs; + return Success; + + error: + FreeCursorBits(bits); + dixFiniPrivates(pCurs, PRIVATE_CURSOR); + free(pCurs); + + return rc; +} + +int +AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue, + CursorPtr *ppCurs, ClientPtr client, XID cid) +{ + FontPtr sourcefont, maskfont; + unsigned char *srcbits; + unsigned char *mskbits; + CursorMetricRec cm; + int rc; + CursorBitsPtr bits; + CursorPtr pCurs; + GlyphSharePtr pShare; + + rc = dixLookupResourceByType((pointer *) &sourcefont, source, RT_FONT, + client, DixUseAccess); + if (rc != Success) { + client->errorValue = source; + return rc; + } + rc = dixLookupResourceByType((pointer *) &maskfont, mask, RT_FONT, client, + DixUseAccess); + if (rc != Success && mask != None) { + client->errorValue = mask; + return rc; + } + if (sourcefont != maskfont) + pShare = (GlyphSharePtr) NULL; + else { + for (pShare = sharedGlyphs; + pShare && + ((pShare->font != sourcefont) || + (pShare->sourceChar != sourceChar) || + (pShare->maskChar != maskChar)); pShare = pShare->next); + } + if (pShare) { + pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE, 1); + if (!pCurs) + return BadAlloc; + dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); + bits = pShare->bits; + bits->refcnt++; + } + else { + if (!CursorMetricsFromGlyph(sourcefont, sourceChar, &cm)) { + client->errorValue = sourceChar; + return BadValue; + } + if (!maskfont) { + long n; + unsigned char *mskptr; + + n = BitmapBytePad(cm.width) * (long) cm.height; + mskptr = mskbits = malloc(n); + if (!mskptr) + return BadAlloc; + while (--n >= 0) + *mskptr++ = ~0; + } + else { + if (!CursorMetricsFromGlyph(maskfont, maskChar, &cm)) { + client->errorValue = maskChar; + return BadValue; + } + if ((rc = ServerBitsFromGlyph(maskfont, maskChar, &cm, &mskbits))) + return rc; + } + if ((rc = ServerBitsFromGlyph(sourcefont, sourceChar, &cm, &srcbits))) { + free(mskbits); + return rc; + } + if (sourcefont != maskfont) { + pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE + CURSOR_BITS_SIZE, 1); + if (pCurs) + bits = (CursorBitsPtr) ((char *) pCurs + CURSOR_REC_SIZE); + else + bits = (CursorBitsPtr) NULL; + } + else { + pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE, 1); + if (pCurs) + bits = (CursorBitsPtr) calloc(CURSOR_BITS_SIZE, 1); + else + bits = (CursorBitsPtr) NULL; + } + if (!bits) { + free(pCurs); + free(mskbits); + free(srcbits); + return BadAlloc; + } + dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); + dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS); + bits->source = srcbits; + bits->mask = mskbits; +#ifdef ARGB_CURSOR + bits->argb = 0; +#endif + bits->width = cm.width; + bits->height = cm.height; + bits->xhot = cm.xhot; + bits->yhot = cm.yhot; + if (sourcefont != maskfont) + bits->refcnt = -1; + else { + bits->refcnt = 1; + pShare = malloc(sizeof(GlyphShare)); + if (!pShare) { + FreeCursorBits(bits); + return BadAlloc; + } + pShare->font = sourcefont; + sourcefont->refcnt++; + pShare->sourceChar = sourceChar; + pShare->maskChar = maskChar; + pShare->bits = bits; + pShare->next = sharedGlyphs; + sharedGlyphs = pShare; + } + } + + CheckForEmptyMask(bits); + pCurs->bits = bits; + pCurs->refcnt = 1; + pCurs->serialNumber = ++cursorSerial; + pCurs->name = None; + + pCurs->foreRed = foreRed; + pCurs->foreGreen = foreGreen; + pCurs->foreBlue = foreBlue; + + pCurs->backRed = backRed; + pCurs->backGreen = backGreen; + pCurs->backBlue = backBlue; + + pCurs->id = cid; + + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, + pCurs, RT_NONE, NULL, DixCreateAccess); + if (rc != Success) + goto error; + + rc = RealizeCursorAllScreens(pCurs); + if (rc != Success) + goto error; + + *ppCurs = pCurs; + return Success; + + error: + FreeCursorBits(bits); + dixFiniPrivates(pCurs, PRIVATE_CURSOR); + free(pCurs); + + return rc; +} + +/** CreateRootCursor + * + * look up the name of a font + * open the font + * add the font to the resource table + * make a cursor from the glyphs + * add the cursor to the resource table + *************************************************************/ + +CursorPtr +CreateRootCursor(char *unused1, unsigned int unused2) +{ + CursorPtr curs; + FontPtr cursorfont; + int err; + XID fontID; + + fontID = FakeClientID(0); + err = OpenFont(serverClient, fontID, FontLoadAll | FontOpenSync, + (unsigned) strlen(defaultCursorFont), defaultCursorFont); + if (err != Success) + return NullCursor; + + err = dixLookupResourceByType((pointer *) &cursorfont, fontID, RT_FONT, + serverClient, DixReadAccess); + if (err != Success) + return NullCursor; + if (AllocGlyphCursor(fontID, 0, fontID, 1, 0, 0, 0, ~0, ~0, ~0, + &curs, serverClient, (XID) 0) != Success) + return NullCursor; + + if (!AddResource(FakeClientID(0), RT_CURSOR, (pointer) curs)) + return NullCursor; + + return curs; +} diff --git a/dix/devices.c b/dix/devices.c new file mode 100644 index 0000000..8b9f5dd --- /dev/null +++ b/dix/devices.c @@ -0,0 +1,2832 @@ +/************************************************************ + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include "misc.h" +#include "resource.h" +#include <X11/Xproto.h> +#include <X11/Xatom.h> +#include "windowstr.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "ptrveloc.h" +#include "site.h" +#include "xkbsrv.h" +#include "privates.h" +#include "xace.h" +#include "mi.h" + +#include "dispatch.h" +#include "swaprep.h" +#include "dixevents.h" +#include "mipointer.h" +#include "eventstr.h" +#include "dixgrabs.h" + +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2.h> +#include <X11/extensions/XIproto.h> +#include <math.h> +#include <pixman.h> +#include "exglobals.h" +#include "exevents.h" +#include "xiquerydevice.h" /* for SizeDeviceClasses */ +#include "xiproperty.h" +#include "enterleave.h" /* for EnterWindow() */ +#include "xserver-properties.h" +#include "xichangehierarchy.h" /* For XISendDeviceHierarchyEvent */ +#include "syncsrv.h" + +/** @file + * This file handles input device-related stuff. + */ + +static void RecalculateMasterButtons(DeviceIntPtr slave); + +static void +DeviceSetTransform(DeviceIntPtr dev, float *transform_data) +{ + struct pixman_f_transform scale; + struct pixman_f_transform transform; + double sx, sy; + int x, y; + + /** + * calculate combined transformation matrix: + * + * M = InvScale * Transform * Scale + * + * So we can later transform points using M * p + * + * Where: + * Scale scales coordinates into 0..1 range + * Transform is the user supplied (affine) transform + * InvScale scales coordinates back up into their native range + */ + sx = dev->valuator->axes[0].max_value - dev->valuator->axes[0].min_value + 1; + sy = dev->valuator->axes[1].max_value - dev->valuator->axes[1].min_value + 1; + + /* invscale */ + pixman_f_transform_init_scale(&scale, sx, sy); + scale.m[0][2] = dev->valuator->axes[0].min_value; + scale.m[1][2] = dev->valuator->axes[1].min_value; + + /* transform */ + for (y = 0; y < 3; y++) + for (x = 0; x < 3; x++) + transform.m[y][x] = *transform_data++; + + pixman_f_transform_multiply(&dev->scale_and_transform, &scale, &transform); + + /* scale */ + pixman_f_transform_init_scale(&scale, 1.0 / sx, 1.0 / sy); + scale.m[0][2] = -dev->valuator->axes[0].min_value / sx; + scale.m[1][2] = -dev->valuator->axes[1].min_value / sy; + + pixman_f_transform_multiply(&dev->scale_and_transform, &dev->scale_and_transform, &scale); + + /* remove translation component for relative movements */ + dev->relative_transform = transform; + dev->relative_transform.m[0][2] = 0; + dev->relative_transform.m[1][2] = 0; +} + +/** + * DIX property handler. + */ +static int +DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, + BOOL checkonly) +{ + if (property == XIGetKnownProperty(XI_PROP_ENABLED)) { + if (prop->format != 8 || prop->type != XA_INTEGER || prop->size != 1) + return BadValue; + + /* Don't allow disabling of VCP/VCK or XTest devices */ + if ((dev == inputInfo.pointer || + dev == inputInfo.keyboard || + IsXTestDevice(dev, NULL)) + &&!(*(CARD8 *) prop->data)) + return BadAccess; + + if (!checkonly) { + if ((*((CARD8 *) prop->data)) && !dev->enabled) + EnableDevice(dev, TRUE); + else if (!(*((CARD8 *) prop->data)) && dev->enabled) + DisableDevice(dev, TRUE); + } + } + else if (property == XIGetKnownProperty(XI_PROP_TRANSFORM)) { + float *f = (float *) prop->data; + int i; + + if (prop->format != 32 || prop->size != 9 || + prop->type != XIGetKnownProperty(XATOM_FLOAT)) + return BadValue; + + for (i = 0; i < 9; i++) + if (!isfinite(f[i])) + return BadValue; + + if (!checkonly) + DeviceSetTransform(dev, f); + } + + return Success; +} + +/* Pair the keyboard to the pointer device. Keyboard events will follow the + * pointer sprite. Only applicable for master devices. + */ +static int +PairDevices(DeviceIntPtr ptr, DeviceIntPtr kbd) +{ + if (!ptr) + return BadDevice; + + /* Don't allow pairing for slave devices */ + if (!IsMaster(ptr) || !IsMaster(kbd)) + return BadDevice; + + if (ptr->spriteInfo->paired) + return BadDevice; + + if (kbd->spriteInfo->spriteOwner) { + free(kbd->spriteInfo->sprite); + kbd->spriteInfo->sprite = NULL; + kbd->spriteInfo->spriteOwner = FALSE; + } + + kbd->spriteInfo->sprite = ptr->spriteInfo->sprite; + kbd->spriteInfo->paired = ptr; + ptr->spriteInfo->paired = kbd; + return Success; +} + +/** + * Find and return the next unpaired MD pointer device. + */ +static DeviceIntPtr +NextFreePointerDevice(void) +{ + DeviceIntPtr dev; + + for (dev = inputInfo.devices; dev; dev = dev->next) + if (IsMaster(dev) && + dev->spriteInfo->spriteOwner && !dev->spriteInfo->paired) + return dev; + return NULL; +} + +/** + * Create a new input device and init it to sane values. The device is added + * to the server's off_devices list. + * + * @param deviceProc Callback for device control function (switch dev on/off). + * @return The newly created device. + */ +DeviceIntPtr +AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) +{ + DeviceIntPtr dev, *prev; /* not a typo */ + DeviceIntPtr devtmp; + int devid; + char devind[MAXDEVICES]; + BOOL enabled; + float transform[9]; + + /* Find next available id, 0 and 1 are reserved */ + memset(devind, 0, sizeof(char) * MAXDEVICES); + for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next) + devind[devtmp->id]++; + for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next) + devind[devtmp->id]++; + for (devid = 2; devid < MAXDEVICES && devind[devid]; devid++); + + if (devid >= MAXDEVICES) + return (DeviceIntPtr) NULL; + dev = calloc(1, + sizeof(DeviceIntRec) + + sizeof(SpriteInfoRec)); + if (!dev) + return (DeviceIntPtr) NULL; + + if (!dixAllocatePrivates(&dev->devPrivates, PRIVATE_DEVICE)) { + free(dev); + return NULL; + } + + if (!dev) + return (DeviceIntPtr) NULL; + + dev->last.scroll = NULL; + dev->last.touches = NULL; + dev->id = devid; + dev->public.processInputProc = ProcessOtherEvent; + dev->public.realInputProc = ProcessOtherEvent; + dev->public.enqueueInputProc = EnqueueEvent; + dev->deviceProc = deviceProc; + dev->startup = autoStart; + + /* device grab defaults */ + dev->deviceGrab.grabTime = currentTime; + dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + dev->deviceGrab.sync.event = calloc(1, sizeof(DeviceEvent)); + + XkbSetExtension(dev, ProcessKeyboardEvent); + + dev->coreEvents = TRUE; + + /* sprite defaults */ + dev->spriteInfo = (SpriteInfoPtr) &dev[1]; + + /* security creation/labeling check + */ + if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixCreateAccess)) { + dixFreePrivates(dev->devPrivates, PRIVATE_DEVICE); + free(dev); + return NULL; + } + + inputInfo.numDevices++; + + for (prev = &inputInfo.off_devices; *prev; prev = &(*prev)->next); + *prev = dev; + dev->next = NULL; + + enabled = FALSE; + XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_ENABLED), + XA_INTEGER, 8, PropModeReplace, 1, &enabled, FALSE); + XISetDevicePropertyDeletable(dev, XIGetKnownProperty(XI_PROP_ENABLED), + FALSE); + + /* unity matrix */ + memset(transform, 0, sizeof(transform)); + transform[0] = transform[4] = transform[8] = 1.0f; + dev->relative_transform.m[0][0] = 1.0; + dev->relative_transform.m[1][1] = 1.0; + dev->relative_transform.m[2][2] = 1.0; + dev->scale_and_transform = dev->relative_transform; + + XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), + XIGetKnownProperty(XATOM_FLOAT), 32, + PropModeReplace, 9, transform, FALSE); + XISetDevicePropertyDeletable(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), + FALSE); + + XIRegisterPropertyHandler(dev, DeviceSetProperty, NULL, NULL); + + return dev; +} + +void +SendDevicePresenceEvent(int deviceid, int type) +{ + DeviceIntRec dummyDev = { .id = XIAllDevices }; + devicePresenceNotify ev = { + .type = DevicePresenceNotify, + .time = currentTime.milliseconds, + .devchange = type, + .deviceid = deviceid + }; + + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent *) &ev, 1); +} + +/** + * Enable the device through the driver, add the device to the device list. + * Switch device ON through the driver and push it onto the global device + * list. Initialize the DIX sprite or pair the device. All clients are + * notified about the device being enabled. + * + * A master pointer device needs to be enabled before a master keyboard + * device. + * + * @param The device to be enabled. + * @param sendevent True if an XI2 event should be sent. + * @return TRUE on success or FALSE otherwise. + */ +Bool +EnableDevice(DeviceIntPtr dev, BOOL sendevent) +{ + DeviceIntPtr *prev; + int ret; + DeviceIntPtr other; + BOOL enabled; + int flags[MAXDEVICES] = { 0 }; + + for (prev = &inputInfo.off_devices; + *prev && (*prev != dev); prev = &(*prev)->next); + + if (!dev->spriteInfo->sprite) { + if (IsMaster(dev)) { + /* Sprites appear on first root window, so we can hardcode it */ + if (dev->spriteInfo->spriteOwner) { + InitializeSprite(dev, screenInfo.screens[0]->root); + /* mode doesn't matter */ + EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor); + } + else { + other = NextFreePointerDevice(); + BUG_RETURN_VAL_MSG(other == NULL, FALSE, + "[dix] cannot find pointer to pair with.\n"); + PairDevices(other, dev); + } + } + else { + if (dev->coreEvents) + other = (IsPointerDevice(dev)) ? inputInfo.pointer : + inputInfo.keyboard; + else + other = NULL; /* auto-float non-core devices */ + AttachDevice(NULL, dev, other); + } + } + + if ((*prev != dev) || !dev->inited || + ((ret = (*dev->deviceProc) (dev, DEVICE_ON)) != Success)) { + ErrorF("[dix] couldn't enable device %d\n", dev->id); + return FALSE; + } + dev->enabled = TRUE; + *prev = dev->next; + + for (prev = &inputInfo.devices; *prev; prev = &(*prev)->next); + *prev = dev; + dev->next = NULL; + + enabled = TRUE; + XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_ENABLED), + XA_INTEGER, 8, PropModeReplace, 1, &enabled, TRUE); + + SendDevicePresenceEvent(dev->id, DeviceEnabled); + if (sendevent) { + flags[dev->id] |= XIDeviceEnabled; + XISendDeviceHierarchyEvent(flags); + } + + RecalculateMasterButtons(dev); + + /* initialise an idle timer for this device*/ + dev->idle_counter = SyncInitDeviceIdleTime(dev); + + return TRUE; +} + + +/** + * Switch a device off through the driver and push it onto the off_devices + * list. A device will not send events while disabled. All clients are + * notified about the device being disabled. + * + * Master keyboard devices have to be disabled before master pointer devices + * otherwise things turn bad. + * + * @param sendevent True if an XI2 event should be sent. + * @return TRUE on success or FALSE otherwise. + */ +Bool +DisableDevice(DeviceIntPtr dev, BOOL sendevent) +{ + DeviceIntPtr *prev, other; + BOOL enabled; + int flags[MAXDEVICES] = { 0 }; + + if (!dev->enabled) + return TRUE; + + for (prev = &inputInfo.devices; + *prev && (*prev != dev); prev = &(*prev)->next); + if (*prev != dev) + return FALSE; + + TouchEndPhysicallyActiveTouches(dev); + ReleaseButtonsAndKeys(dev); + SyncRemoveDeviceIdleTime(dev->idle_counter); + dev->idle_counter = NULL; + + /* float attached devices */ + if (IsMaster(dev)) { + for (other = inputInfo.devices; other; other = other->next) { + if (!IsMaster(other) && GetMaster(other, MASTER_ATTACHED) == dev) { + AttachDevice(NULL, other, NULL); + flags[other->id] |= XISlaveDetached; + } + } + } + else { + for (other = inputInfo.devices; other; other = other->next) { + if (IsMaster(other) && other->lastSlave == dev) + other->lastSlave = NULL; + } + } + + if (IsMaster(dev) && dev->spriteInfo->sprite) { + for (other = inputInfo.devices; other; other = other->next) + if (other->spriteInfo->paired == dev && !other->spriteInfo->spriteOwner) + DisableDevice(other, sendevent); + } + + if (dev->spriteInfo->paired) + dev->spriteInfo->paired = NULL; + + (void) (*dev->deviceProc) (dev, DEVICE_OFF); + dev->enabled = FALSE; + + FreeSprite(dev); + + /* now that the device is disabled, we can reset the signal handler's + * last.slave */ + OsBlockSignals(); + for (other = inputInfo.devices; other; other = other->next) { + if (other->last.slave == dev) + other->last.slave = NULL; + } + OsReleaseSignals(); + + LeaveWindow(dev); + SetFocusOut(dev); + + *prev = dev->next; + dev->next = inputInfo.off_devices; + inputInfo.off_devices = dev; + + enabled = FALSE; + XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_ENABLED), + XA_INTEGER, 8, PropModeReplace, 1, &enabled, TRUE); + + SendDevicePresenceEvent(dev->id, DeviceDisabled); + if (sendevent) { + flags[dev->id] = XIDeviceDisabled; + XISendDeviceHierarchyEvent(flags); + } + + RecalculateMasterButtons(dev); + + return TRUE; +} + +void +DisableAllDevices(void) +{ + DeviceIntPtr dev, tmp; + + /* Disable slave devices first, excluding XTest devices */ + nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { + if (!IsXTestDevice(dev, NULL) && !IsMaster(dev)) + DisableDevice(dev, FALSE); + } + /* Disable XTest devices */ + nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { + if (!IsMaster(dev)) + DisableDevice(dev, FALSE); + } + /* master keyboards need to be disabled first */ + nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { + if (dev->enabled && IsMaster(dev) && IsKeyboardDevice(dev)) + DisableDevice(dev, FALSE); + } + nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { + if (dev->enabled) + DisableDevice(dev, FALSE); + } +} + +/** + * Initialise a new device through the driver and tell all clients about the + * new device. + * + * Must be called before EnableDevice. + * The device will NOT send events until it is enabled! + * + * @param sendevent True if an XI2 event should be sent. + * @return Success or an error code on failure. + */ +int +ActivateDevice(DeviceIntPtr dev, BOOL sendevent) +{ + int ret = Success; + ScreenPtr pScreen = screenInfo.screens[0]; + + if (!dev || !dev->deviceProc) + return BadImplementation; + + ret = (*dev->deviceProc) (dev, DEVICE_INIT); + dev->inited = (ret == Success); + if (!dev->inited) + return ret; + + /* Initialize memory for sprites. */ + if (IsMaster(dev) && dev->spriteInfo->spriteOwner) + if (!pScreen->DeviceCursorInitialize(dev, pScreen)) + ret = BadAlloc; + + SendDevicePresenceEvent(dev->id, DeviceAdded); + if (sendevent) { + int flags[MAXDEVICES] = { 0 }; + flags[dev->id] = XISlaveAdded; + XISendDeviceHierarchyEvent(flags); + } + return ret; +} + +/** + * Ring the bell. + * The actual task of ringing the bell is the job of the DDX. + */ +static void +CoreKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) +{ + KeybdCtrl *ctrl = arg; + + DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration); +} + +static void +CoreKeyboardCtl(DeviceIntPtr pDev, KeybdCtrl * ctrl) +{ + return; +} + +/** + * Device control function for the Virtual Core Keyboard. + */ +int +CoreKeyboardProc(DeviceIntPtr pDev, int what) +{ + + switch (what) { + case DEVICE_INIT: + if (!InitKeyboardDeviceStruct(pDev, NULL, CoreKeyboardBell, + CoreKeyboardCtl)) { + ErrorF("Keyboard initialization failed. This could be a missing " + "or incorrect setup of xkeyboard-config.\n"); + return BadValue; + } + return Success; + + case DEVICE_ON: + case DEVICE_OFF: + return Success; + + case DEVICE_CLOSE: + return Success; + } + + return BadMatch; +} + +/** + * Device control function for the Virtual Core Pointer. + */ +int +CorePointerProc(DeviceIntPtr pDev, int what) +{ +#define NBUTTONS 10 +#define NAXES 2 + BYTE map[NBUTTONS + 1]; + int i = 0; + Atom btn_labels[NBUTTONS] = { 0 }; + Atom axes_labels[NAXES] = { 0 }; + ScreenPtr scr = screenInfo.screens[0]; + + switch (what) { + case DEVICE_INIT: + for (i = 1; i <= NBUTTONS; i++) + map[i] = i; + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); + btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); + /* don't know about the rest */ + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + if (!InitPointerDeviceStruct + ((DevicePtr) pDev, map, NBUTTONS, btn_labels, + (PtrCtrlProcPtr) NoopDDA, GetMotionHistorySize(), NAXES, + axes_labels)) { + ErrorF("Could not initialize device '%s'. Out of memory.\n", + pDev->name); + return BadAlloc; /* IPDS only fails on allocs */ + } + /* axisVal is per-screen, last.valuators is desktop-wide */ + pDev->valuator->axisVal[0] = scr->width / 2; + pDev->last.valuators[0] = pDev->valuator->axisVal[0] + scr->x; + pDev->valuator->axisVal[1] = scr->height / 2; + pDev->last.valuators[1] = pDev->valuator->axisVal[1] + scr->y; + break; + + case DEVICE_CLOSE: + break; + + default: + break; + } + + return Success; + +#undef NBUTTONS +#undef NAXES +} + +/** + * Initialise the two core devices, VCP and VCK (see events.c). + * Both devices are not tied to physical devices, but guarantee that there is + * always a keyboard and a pointer present and keep the protocol semantics. + * + * Note that the server MUST have two core devices at all times, even if there + * is no physical device connected. + */ +void +InitCoreDevices(void) +{ + if (AllocDevicePair(serverClient, "Virtual core", + &inputInfo.pointer, &inputInfo.keyboard, + CorePointerProc, CoreKeyboardProc, TRUE) != Success) + FatalError("Failed to allocate core devices"); + + if (ActivateDevice(inputInfo.pointer, TRUE) != Success || + ActivateDevice(inputInfo.keyboard, TRUE) != Success) + FatalError("Failed to activate core devices."); + if (!EnableDevice(inputInfo.pointer, TRUE) || + !EnableDevice(inputInfo.keyboard, TRUE)) + FatalError("Failed to enable core devices."); + + InitXTestDevices(); +} + +/** + * Activate all switched-off devices and then enable all those devices. + * + * Will return an error if no core keyboard or core pointer is present. + * In theory this should never happen if you call InitCoreDevices() first. + * + * InitAndStartDevices needs to be called AFTER the windows are initialized. + * Devices will start sending events after InitAndStartDevices() has + * completed. + * + * @return Success or error code on failure. + */ +int +InitAndStartDevices(void) +{ + DeviceIntPtr dev, next; + + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + DebugF("(dix) initialising device %d\n", dev->id); + if (!dev->inited) + ActivateDevice(dev, TRUE); + } + + /* enable real devices */ + for (dev = inputInfo.off_devices; dev; dev = next) { + DebugF("(dix) enabling device %d\n", dev->id); + next = dev->next; + if (dev->inited && dev->startup) + EnableDevice(dev, TRUE); + } + + return Success; +} + +/** + * Free the given device class and reset the pointer to NULL. + */ +static void +FreeDeviceClass(int type, pointer *class) +{ + if (!(*class)) + return; + + switch (type) { + case KeyClass: + { + KeyClassPtr *k = (KeyClassPtr *) class; + + if ((*k)->xkbInfo) { + XkbFreeInfo((*k)->xkbInfo); + (*k)->xkbInfo = NULL; + } + free((*k)); + break; + } + case ButtonClass: + { + ButtonClassPtr *b = (ButtonClassPtr *) class; + + free((*b)->xkb_acts); + free((*b)); + break; + } + case ValuatorClass: + { + ValuatorClassPtr *v = (ValuatorClassPtr *) class; + + free((*v)->motion); + free((*v)); + break; + } + case XITouchClass: + { + TouchClassPtr *t = (TouchClassPtr *) class; + int i; + + for (i = 0; i < (*t)->num_touches; i++) { + free((*t)->touches[i].sprite.spriteTrace); + free((*t)->touches[i].listeners); + free((*t)->touches[i].valuators); + } + + free((*t)->touches); + free((*t)); + break; + } + case FocusClass: + { + FocusClassPtr *f = (FocusClassPtr *) class; + + free((*f)->trace); + free((*f)); + break; + } + case ProximityClass: + { + ProximityClassPtr *p = (ProximityClassPtr *) class; + + free((*p)); + break; + } + } + *class = NULL; +} + +static void +FreeFeedbackClass(int type, pointer *class) +{ + if (!(*class)) + return; + + switch (type) { + case KbdFeedbackClass: + { + KbdFeedbackPtr *kbdfeed = (KbdFeedbackPtr *) class; + KbdFeedbackPtr k, knext; + + for (k = (*kbdfeed); k; k = knext) { + knext = k->next; + if (k->xkb_sli) + XkbFreeSrvLedInfo(k->xkb_sli); + free(k); + } + break; + } + case PtrFeedbackClass: + { + PtrFeedbackPtr *ptrfeed = (PtrFeedbackPtr *) class; + PtrFeedbackPtr p, pnext; + + for (p = (*ptrfeed); p; p = pnext) { + pnext = p->next; + free(p); + } + break; + } + case IntegerFeedbackClass: + { + IntegerFeedbackPtr *intfeed = (IntegerFeedbackPtr *) class; + IntegerFeedbackPtr i, inext; + + for (i = (*intfeed); i; i = inext) { + inext = i->next; + free(i); + } + break; + } + case StringFeedbackClass: + { + StringFeedbackPtr *stringfeed = (StringFeedbackPtr *) class; + StringFeedbackPtr s, snext; + + for (s = (*stringfeed); s; s = snext) { + snext = s->next; + free(s->ctrl.symbols_supported); + free(s->ctrl.symbols_displayed); + free(s); + } + break; + } + case BellFeedbackClass: + { + BellFeedbackPtr *bell = (BellFeedbackPtr *) class; + BellFeedbackPtr b, bnext; + + for (b = (*bell); b; b = bnext) { + bnext = b->next; + free(b); + } + break; + } + case LedFeedbackClass: + { + LedFeedbackPtr *leds = (LedFeedbackPtr *) class; + LedFeedbackPtr l, lnext; + + for (l = (*leds); l; l = lnext) { + lnext = l->next; + if (l->xkb_sli) + XkbFreeSrvLedInfo(l->xkb_sli); + free(l); + } + break; + } + } + *class = NULL; +} + +static void +FreeAllDeviceClasses(ClassesPtr classes) +{ + if (!classes) + return; + + FreeDeviceClass(KeyClass, (pointer) &classes->key); + FreeDeviceClass(ValuatorClass, (pointer) &classes->valuator); + FreeDeviceClass(XITouchClass, (pointer) &classes->touch); + FreeDeviceClass(ButtonClass, (pointer) &classes->button); + FreeDeviceClass(FocusClass, (pointer) &classes->focus); + FreeDeviceClass(ProximityClass, (pointer) &classes->proximity); + + FreeFeedbackClass(KbdFeedbackClass, (pointer) &classes->kbdfeed); + FreeFeedbackClass(PtrFeedbackClass, (pointer) &classes->ptrfeed); + FreeFeedbackClass(IntegerFeedbackClass, (pointer) &classes->intfeed); + FreeFeedbackClass(StringFeedbackClass, (pointer) &classes->stringfeed); + FreeFeedbackClass(BellFeedbackClass, (pointer) &classes->bell); + FreeFeedbackClass(LedFeedbackClass, (pointer) &classes->leds); + +} + +/** + * Close down a device and free all resources. + * Once closed down, the driver will probably not expect you that you'll ever + * enable it again and free associated structs. If you want the device to just + * be disabled, DisableDevice(). + * Don't call this function directly, use RemoveDevice() instead. + */ +static void +CloseDevice(DeviceIntPtr dev) +{ + ScreenPtr screen = screenInfo.screens[0]; + ClassesPtr classes; + int j; + + if (!dev) + return; + + XIDeleteAllDeviceProperties(dev); + + if (dev->inited) + (void) (*dev->deviceProc) (dev, DEVICE_CLOSE); + + /* free sprite memory */ + if (IsMaster(dev) && dev->spriteInfo->sprite) + screen->DeviceCursorCleanup(dev, screen); + + /* free acceleration info */ + if (dev->valuator && dev->valuator->accelScheme.AccelCleanupProc) + dev->valuator->accelScheme.AccelCleanupProc(dev); + + while (dev->xkb_interest) + XkbRemoveResourceClient((DevicePtr) dev, dev->xkb_interest->resource); + + free(dev->name); + + classes = (ClassesPtr) &dev->key; + FreeAllDeviceClasses(classes); + + if (IsMaster(dev)) { + classes = dev->unused_classes; + FreeAllDeviceClasses(classes); + free(classes); + } + + FreeSprite(dev); + + /* a client may have the device set as client pointer */ + for (j = 0; j < currentMaxClients; j++) { + if (clients[j] && clients[j]->clientPtr == dev) { + clients[j]->clientPtr = NULL; + clients[j]->clientPtr = PickPointer(clients[j]); + } + } + + if (dev->deviceGrab.grab) + FreeGrab(dev->deviceGrab.grab); + free(dev->deviceGrab.sync.event); + free(dev->config_info); /* Allocated in xf86ActivateDevice. */ + free(dev->last.scroll); + for (j = 0; j < dev->last.num_touches; j++) + free(dev->last.touches[j].valuators); + free(dev->last.touches); + dev->config_info = NULL; + dixFreePrivates(dev->devPrivates, PRIVATE_DEVICE); + free(dev); +} + +/** + * Shut down all devices of one list and free all resources. + */ +static + void +CloseDeviceList(DeviceIntPtr *listHead) +{ + /* Used to mark devices that we tried to free */ + Bool freedIds[MAXDEVICES]; + DeviceIntPtr dev; + int i; + + if (listHead == NULL) + return; + + for (i = 0; i < MAXDEVICES; i++) + freedIds[i] = FALSE; + + dev = *listHead; + while (dev != NULL) { + freedIds[dev->id] = TRUE; + DeleteInputDeviceRequest(dev); + + dev = *listHead; + while (dev != NULL && freedIds[dev->id]) + dev = dev->next; + } +} + +/** + * Shut down all devices, free all resources, etc. + * Only useful if you're shutting down the server! + */ +void +CloseDownDevices(void) +{ + DeviceIntPtr dev; + + OsBlockSignals(); + + /* Float all SDs before closing them. Note that at this point resources + * (e.g. cursors) have been freed already, so we can't just call + * AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master + * to NULL and pretend nothing happened. + */ + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (!IsMaster(dev) && !IsFloating(dev)) + dev->master = NULL; + } + + CloseDeviceList(&inputInfo.devices); + CloseDeviceList(&inputInfo.off_devices); + + CloseDevice(inputInfo.pointer); + + CloseDevice(inputInfo.keyboard); + + inputInfo.devices = NULL; + inputInfo.off_devices = NULL; + inputInfo.keyboard = NULL; + inputInfo.pointer = NULL; + + XkbDeleteRulesDflts(); + XkbDeleteRulesUsed(); + + OsReleaseSignals(); +} + +/** + * Signal all devices that we're in the process of aborting. + * This function is called from a signal handler. + */ +void +AbortDevices(void) +{ + DeviceIntPtr dev; + nt_list_for_each_entry(dev, inputInfo.devices, next) { + if (!IsMaster(dev)) + (*dev->deviceProc) (dev, DEVICE_ABORT); + } + + nt_list_for_each_entry(dev, inputInfo.off_devices, next) { + if (!IsMaster(dev)) + (*dev->deviceProc) (dev, DEVICE_ABORT); + } +} + +/** + * Remove the cursor sprite for all devices. This needs to be done before any + * resources are freed or any device is deleted. + */ +void +UndisplayDevices(void) +{ + DeviceIntPtr dev; + ScreenPtr screen = screenInfo.screens[0]; + + for (dev = inputInfo.devices; dev; dev = dev->next) + screen->DisplayCursor(dev, screen, NullCursor); +} + +/** + * Remove a device from the device list, closes it and thus frees all + * resources. + * Removes both enabled and disabled devices and notifies all devices about + * the removal of the device. + * + * No PresenceNotify is sent for device that the client never saw. This can + * happen if a malloc fails during the addition of master devices. If + * dev->init is FALSE it means the client never received a DeviceAdded event, + * so let's not send a DeviceRemoved event either. + * + * @param sendevent True if an XI2 event should be sent. + */ +int +RemoveDevice(DeviceIntPtr dev, BOOL sendevent) +{ + DeviceIntPtr prev, tmp, next; + int ret = BadMatch; + ScreenPtr screen = screenInfo.screens[0]; + int deviceid; + int initialized; + int flags[MAXDEVICES] = { 0 }; + + DebugF("(dix) removing device %d\n", dev->id); + + if (!dev || dev == inputInfo.keyboard || dev == inputInfo.pointer) + return BadImplementation; + + initialized = dev->inited; + deviceid = dev->id; + + if (initialized) { + if (DevHasCursor(dev)) + screen->DisplayCursor(dev, screen, NullCursor); + + DisableDevice(dev, sendevent); + flags[dev->id] = XIDeviceDisabled; + } + + prev = NULL; + for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) { + next = tmp->next; + if (tmp == dev) { + + if (prev == NULL) + inputInfo.devices = next; + else + prev->next = next; + + flags[tmp->id] = IsMaster(tmp) ? XIMasterRemoved : XISlaveRemoved; + CloseDevice(tmp); + ret = Success; + } + } + + prev = NULL; + for (tmp = inputInfo.off_devices; tmp; (prev = tmp), (tmp = next)) { + next = tmp->next; + if (tmp == dev) { + flags[tmp->id] = IsMaster(tmp) ? XIMasterRemoved : XISlaveRemoved; + CloseDevice(tmp); + + if (prev == NULL) + inputInfo.off_devices = next; + else + prev->next = next; + + ret = Success; + } + } + + if (ret == Success && initialized) { + inputInfo.numDevices--; + SendDevicePresenceEvent(deviceid, DeviceRemoved); + if (sendevent) + XISendDeviceHierarchyEvent(flags); + } + + return ret; +} + +int +NumMotionEvents(void) +{ + /* only called to fill data in initial connection reply. + * VCP is ok here, it is the only fixed device we have. */ + return inputInfo.pointer->valuator->numMotionEvents; +} + +int +dixLookupDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode) +{ + DeviceIntPtr dev; + int rc; + + *pDev = NULL; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->id == id) + goto found; + } + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + if (dev->id == id) + goto found; + } + return BadDevice; + + found: + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc == Success) + *pDev = dev; + return rc; +} + +void +QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode) +{ + if (inputInfo.keyboard) { + *minCode = inputInfo.keyboard->key->xkbInfo->desc->min_key_code; + *maxCode = inputInfo.keyboard->key->xkbInfo->desc->max_key_code; + } +} + +/* Notably, this function does not expand the destination's keycode range, or + * notify clients. */ +Bool +SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) +{ + int i, j; + KeySym *tmp; + int rowDif = src->minKeyCode - dst->minKeyCode; + + /* if keysym map size changes, grow map first */ + if (src->mapWidth < dst->mapWidth) { + for (i = src->minKeyCode; i <= src->maxKeyCode; i++) { +#define SI(r, c) (((r - src->minKeyCode) * src->mapWidth) + (c)) +#define DI(r, c) (((r - dst->minKeyCode) * dst->mapWidth) + (c)) + for (j = 0; j < src->mapWidth; j++) + dst->map[DI(i, j)] = src->map[SI(i, j)]; + for (j = src->mapWidth; j < dst->mapWidth; j++) + dst->map[DI(i, j)] = NoSymbol; +#undef SI +#undef DI + } + return TRUE; + } + else if (src->mapWidth > dst->mapWidth) { + i = sizeof(KeySym) * src->mapWidth * + (dst->maxKeyCode - dst->minKeyCode + 1); + tmp = calloc(sizeof(KeySym), i); + if (!tmp) + return FALSE; + + if (dst->map) { + for (i = 0; i <= dst->maxKeyCode - dst->minKeyCode; i++) + memmove(&tmp[i * src->mapWidth], &dst->map[i * dst->mapWidth], + dst->mapWidth * sizeof(KeySym)); + free(dst->map); + } + dst->mapWidth = src->mapWidth; + dst->map = tmp; + } + else if (!dst->map) { + i = sizeof(KeySym) * src->mapWidth * + (dst->maxKeyCode - dst->minKeyCode + 1); + tmp = calloc(sizeof(KeySym), i); + if (!tmp) + return FALSE; + + dst->map = tmp; + dst->mapWidth = src->mapWidth; + } + + memmove(&dst->map[rowDif * dst->mapWidth], src->map, + (src->maxKeyCode - src->minKeyCode + 1) * + dst->mapWidth * sizeof(KeySym)); + + return TRUE; +} + +Bool +InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels, + CARD8 *map) +{ + ButtonClassPtr butc; + int i; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->button != NULL, FALSE); + BUG_RETURN_VAL(numButtons >= MAX_BUTTONS, FALSE); + + butc = calloc(1, sizeof(ButtonClassRec)); + if (!butc) + return FALSE; + butc->numButtons = numButtons; + butc->sourceid = dev->id; + for (i = 1; i <= numButtons; i++) + butc->map[i] = map[i]; + for (i = numButtons + 1; i < MAP_LENGTH; i++) + butc->map[i] = i; + memcpy(butc->labels, labels, numButtons * sizeof(Atom)); + dev->button = butc; + return TRUE; +} + +/** + * Allocate a valuator class and set up the pointers for the axis values + * appropriately. + * + * @param src If non-NULL, the memory is reallocated from src. If NULL, the + * memory is calloc'd. + * @parma numAxes Number of axes to allocate. + * @return The allocated valuator struct. + */ +ValuatorClassPtr +AllocValuatorClass(ValuatorClassPtr src, int numAxes) +{ + ValuatorClassPtr v; + + /* force alignment with double */ + union align_u { + ValuatorClassRec valc; + double d; + } *align; + int size; + + size = + sizeof(union align_u) + numAxes * (sizeof(double) + sizeof(AxisInfo)); + align = (union align_u *) realloc(src, size); + + if (!align) + return NULL; + + if (!src) + memset(align, 0, size); + + v = &align->valc; + v->numAxes = numAxes; + v->axisVal = (double *) (align + 1); + v->axes = (AxisInfoPtr) (v->axisVal + numAxes); + + return v; +} + +Bool +InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, + int numMotionEvents, int mode) +{ + int i; + ValuatorClassPtr valc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + + if (numAxes > MAX_VALUATORS) { + LogMessage(X_WARNING, + "Device '%s' has %d axes, only using first %d.\n", + dev->name, numAxes, MAX_VALUATORS); + numAxes = MAX_VALUATORS; + } + + valc = AllocValuatorClass(NULL, numAxes); + if (!valc) + return FALSE; + + dev->last.scroll = valuator_mask_new(numAxes); + if (!dev->last.scroll) { + free(valc); + return FALSE; + } + + valc->sourceid = dev->id; + valc->motion = NULL; + valc->first_motion = 0; + valc->last_motion = 0; + valc->h_scroll_axis = -1; + valc->v_scroll_axis = -1; + + valc->numMotionEvents = numMotionEvents; + valc->motionHintWindow = NullWindow; + + if ((mode & OutOfProximity) && !dev->proximity) + InitProximityClassDeviceStruct(dev); + + dev->valuator = valc; + + AllocateMotionHistory(dev); + + for (i = 0; i < numAxes; i++) { + InitValuatorAxisStruct(dev, i, labels[i], NO_AXIS_LIMITS, + NO_AXIS_LIMITS, 0, 0, 0, mode); + valc->axisVal[i] = 0; + } + + dev->last.numValuators = numAxes; + + if (IsMaster(dev) || /* do not accelerate master or xtest devices */ + IsXTestDevice(dev, NULL)) + InitPointerAccelerationScheme(dev, PtrAccelNoOp); + else + InitPointerAccelerationScheme(dev, PtrAccelDefault); + return TRUE; +} + +/* global list of acceleration schemes */ +ValuatorAccelerationRec pointerAccelerationScheme[] = { + {PtrAccelNoOp, NULL, NULL, NULL, NULL}, + {PtrAccelPredictable, acceleratePointerPredictable, NULL, + InitPredictableAccelerationScheme, AccelerationDefaultCleanup}, + {PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL, NULL}, + {-1, NULL, NULL, NULL, NULL} /* terminator */ +}; + +/** + * install an acceleration scheme. returns TRUE on success, and should not + * change anything if unsuccessful. + */ +Bool +InitPointerAccelerationScheme(DeviceIntPtr dev, int scheme) +{ + int x, i = -1; + ValuatorClassPtr val; + + val = dev->valuator; + + if (!val) + return FALSE; + + if (IsMaster(dev) && scheme != PtrAccelNoOp) + return FALSE; + + for (x = 0; pointerAccelerationScheme[x].number >= 0; x++) { + if (pointerAccelerationScheme[x].number == scheme) { + i = x; + break; + } + } + + if (-1 == i) + return FALSE; + + if (val->accelScheme.AccelCleanupProc) + val->accelScheme.AccelCleanupProc(dev); + + if (pointerAccelerationScheme[i].AccelInitProc) { + if (!pointerAccelerationScheme[i].AccelInitProc(dev, + &pointerAccelerationScheme[i])) { + return FALSE; + } + } + else { + val->accelScheme = pointerAccelerationScheme[i]; + } + return TRUE; +} + +Bool +InitFocusClassDeviceStruct(DeviceIntPtr dev) +{ + FocusClassPtr focc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->focus != NULL, FALSE); + + focc = malloc(sizeof(FocusClassRec)); + if (!focc) + return FALSE; + focc->win = PointerRootWin; + focc->revert = None; + focc->time = currentTime; + focc->trace = (WindowPtr *) NULL; + focc->traceSize = 0; + focc->traceGood = 0; + focc->sourceid = dev->id; + dev->focus = focc; + return TRUE; +} + +Bool +InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) +{ + PtrFeedbackPtr feedc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->ptrfeed != NULL, FALSE); + + feedc = malloc(sizeof(PtrFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl = defaultPointerControl; + feedc->ctrl.id = 0; + if ((feedc->next = dev->ptrfeed)) + feedc->ctrl.id = dev->ptrfeed->ctrl.id + 1; + dev->ptrfeed = feedc; + (*controlProc) (dev, &feedc->ctrl); + return TRUE; +} + +static LedCtrl defaultLedControl = { + DEFAULT_LEDS, DEFAULT_LEDS_MASK, 0 +}; + +static BellCtrl defaultBellControl = { + DEFAULT_BELL, + DEFAULT_BELL_PITCH, + DEFAULT_BELL_DURATION, + 0 +}; + +static IntegerCtrl defaultIntegerControl = { + DEFAULT_INT_RESOLUTION, + DEFAULT_INT_MIN_VALUE, + DEFAULT_INT_MAX_VALUE, + DEFAULT_INT_DISPLAYED, + 0 +}; + +Bool +InitStringFeedbackClassDeviceStruct(DeviceIntPtr dev, + StringCtrlProcPtr controlProc, + int max_symbols, int num_symbols_supported, + KeySym * symbols) +{ + int i; + StringFeedbackPtr feedc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->stringfeed != NULL, FALSE); + + feedc = malloc(sizeof(StringFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl.num_symbols_supported = num_symbols_supported; + feedc->ctrl.num_symbols_displayed = 0; + feedc->ctrl.max_symbols = max_symbols; + feedc->ctrl.symbols_supported = + malloc(sizeof(KeySym) * num_symbols_supported); + feedc->ctrl.symbols_displayed = malloc(sizeof(KeySym) * max_symbols); + if (!feedc->ctrl.symbols_supported || !feedc->ctrl.symbols_displayed) { + free(feedc->ctrl.symbols_supported); + free(feedc->ctrl.symbols_displayed); + free(feedc); + return FALSE; + } + for (i = 0; i < num_symbols_supported; i++) + *(feedc->ctrl.symbols_supported + i) = *symbols++; + for (i = 0; i < max_symbols; i++) + *(feedc->ctrl.symbols_displayed + i) = (KeySym) 0; + feedc->ctrl.id = 0; + if ((feedc->next = dev->stringfeed)) + feedc->ctrl.id = dev->stringfeed->ctrl.id + 1; + dev->stringfeed = feedc; + (*controlProc) (dev, &feedc->ctrl); + return TRUE; +} + +Bool +InitBellFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc, + BellCtrlProcPtr controlProc) +{ + BellFeedbackPtr feedc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->bell != NULL, FALSE); + + feedc = malloc(sizeof(BellFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->BellProc = bellProc; + feedc->ctrl = defaultBellControl; + feedc->ctrl.id = 0; + if ((feedc->next = dev->bell)) + feedc->ctrl.id = dev->bell->ctrl.id + 1; + dev->bell = feedc; + (*controlProc) (dev, &feedc->ctrl); + return TRUE; +} + +Bool +InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc) +{ + LedFeedbackPtr feedc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->leds != NULL, FALSE); + + feedc = malloc(sizeof(LedFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl = defaultLedControl; + feedc->ctrl.id = 0; + if ((feedc->next = dev->leds)) + feedc->ctrl.id = dev->leds->ctrl.id + 1; + feedc->xkb_sli = NULL; + dev->leds = feedc; + (*controlProc) (dev, &feedc->ctrl); + return TRUE; +} + +Bool +InitIntegerFeedbackClassDeviceStruct(DeviceIntPtr dev, + IntegerCtrlProcPtr controlProc) +{ + IntegerFeedbackPtr feedc; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->intfeed != NULL, FALSE); + + feedc = malloc(sizeof(IntegerFeedbackClassRec)); + if (!feedc) + return FALSE; + feedc->CtrlProc = controlProc; + feedc->ctrl = defaultIntegerControl; + feedc->ctrl.id = 0; + if ((feedc->next = dev->intfeed)) + feedc->ctrl.id = dev->intfeed->ctrl.id + 1; + dev->intfeed = feedc; + (*controlProc) (dev, &feedc->ctrl); + return TRUE; +} + +Bool +InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, + Atom *btn_labels, PtrCtrlProcPtr controlProc, + int numMotionEvents, int numAxes, Atom *axes_labels) +{ + DeviceIntPtr dev = (DeviceIntPtr) device; + + BUG_RETURN_VAL(dev == NULL, FALSE); + BUG_RETURN_VAL(dev->button != NULL, FALSE); + BUG_RETURN_VAL(dev->valuator != NULL, FALSE); + BUG_RETURN_VAL(dev->ptrfeed != NULL, FALSE); + + return (InitButtonClassDeviceStruct(dev, numButtons, btn_labels, map) && + InitValuatorClassDeviceStruct(dev, numAxes, axes_labels, + numMotionEvents, Relative) && + InitPtrFeedbackClassDeviceStruct(dev, controlProc)); +} + +/** + * Sets up multitouch capabilities on @device. + * + * @max_touches The maximum number of simultaneous touches, or 0 for unlimited. + * @mode The mode of the touch device (XIDirectTouch or XIDependentTouch). + * @num_axes The number of touch valuator axes. + */ +Bool +InitTouchClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches, + unsigned int mode, unsigned int num_axes) +{ + TouchClassPtr touch; + int i; + + BUG_RETURN_VAL(device == NULL, FALSE); + BUG_RETURN_VAL(device->touch != NULL, FALSE); + BUG_RETURN_VAL(device->valuator == NULL, FALSE); + + /* Check the mode is valid, and at least X and Y axes. */ + BUG_RETURN_VAL(mode != XIDirectTouch && mode != XIDependentTouch, FALSE); + BUG_RETURN_VAL(num_axes < 2, FALSE); + + if (num_axes > MAX_VALUATORS) { + LogMessage(X_WARNING, + "Device '%s' has %d touch axes, only using first %d.\n", + device->name, num_axes, MAX_VALUATORS); + num_axes = MAX_VALUATORS; + } + + touch = calloc(1, sizeof(*touch)); + if (!touch) + return FALSE; + + touch->max_touches = max_touches; + if (max_touches == 0) + max_touches = 5; /* arbitrary number plucked out of the air */ + touch->touches = calloc(max_touches, sizeof(*touch->touches)); + if (!touch->touches) + goto err; + touch->num_touches = max_touches; + for (i = 0; i < max_touches; i++) + TouchInitTouchPoint(touch, device->valuator, i); + + touch->mode = mode; + touch->sourceid = device->id; + + device->touch = touch; + device->last.touches = calloc(max_touches, sizeof(*device->last.touches)); + device->last.num_touches = touch->num_touches; + for (i = 0; i < touch->num_touches; i++) + TouchInitDDXTouchPoint(device, &device->last.touches[i]); + + return TRUE; + + err: + for (i = 0; i < touch->num_touches; i++) + TouchFreeTouchPoint(device, i); + + free(touch->touches); + free(touch); + + return FALSE; +} + +/* + * Check if the given buffer contains elements between low (inclusive) and + * high (inclusive) only. + * + * @return TRUE if the device map is invalid, FALSE otherwise. + */ +Bool +BadDeviceMap(BYTE * buff, int length, unsigned low, unsigned high, XID *errval) +{ + int i; + + for (i = 0; i < length; i++) + if (buff[i]) { /* only check non-zero elements */ + if ((low > buff[i]) || (high < buff[i])) { + *errval = buff[i]; + return TRUE; + } + } + return FALSE; +} + +int +ProcSetModifierMapping(ClientPtr client) +{ + xSetModifierMappingReply rep; + int rc; + + REQUEST(xSetModifierMappingReq); + REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq); + + if (client->req_len != ((stuff->numKeyPerModifier << 1) + + bytes_to_int32(sizeof(xSetModifierMappingReq)))) + return BadLength; + + rep = (xSetModifierMappingReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0 + }; + + rc = change_modmap(client, PickKeyboard(client), (KeyCode *) &stuff[1], + stuff->numKeyPerModifier); + if (rc == MappingFailed || rc == -1) + return BadValue; + if (rc != Success && rc != MappingSuccess && rc != MappingFailed && + rc != MappingBusy) + return rc; + + rep.success = rc; + + WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep); + return Success; +} + +int +ProcGetModifierMapping(ClientPtr client) +{ + xGetModifierMappingReply rep; + int max_keys_per_mod = 0; + KeyCode *modkeymap = NULL; + + REQUEST_SIZE_MATCH(xReq); + + generate_modkeymap(client, PickKeyboard(client), &modkeymap, + &max_keys_per_mod); + + rep = (xGetModifierMappingReply) { + .type = X_Reply, + .numKeyPerModifier = max_keys_per_mod, + .sequenceNumber = client->sequence, + /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ + .length = max_keys_per_mod << 1 + }; + + WriteReplyToClient(client, sizeof(xGetModifierMappingReply), &rep); + WriteToClient(client, max_keys_per_mod * 8, modkeymap); + + free(modkeymap); + + return Success; +} + +int +ProcChangeKeyboardMapping(ClientPtr client) +{ + REQUEST(xChangeKeyboardMappingReq); + unsigned len; + KeySymsRec keysyms; + DeviceIntPtr pDev, tmp; + int rc; + + REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); + + len = client->req_len - bytes_to_int32(sizeof(xChangeKeyboardMappingReq)); + if (len != (stuff->keyCodes * stuff->keySymsPerKeyCode)) + return BadLength; + + pDev = PickKeyboard(client); + + if ((stuff->firstKeyCode < pDev->key->xkbInfo->desc->min_key_code) || + (stuff->firstKeyCode > pDev->key->xkbInfo->desc->max_key_code)) { + client->errorValue = stuff->firstKeyCode; + return BadValue; + + } + if (((unsigned) (stuff->firstKeyCode + stuff->keyCodes - 1) > + pDev->key->xkbInfo->desc->max_key_code) || + (stuff->keySymsPerKeyCode == 0)) { + client->errorValue = stuff->keySymsPerKeyCode; + return BadValue; + } + + keysyms.minKeyCode = stuff->firstKeyCode; + keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1; + keysyms.mapWidth = stuff->keySymsPerKeyCode; + keysyms.map = (KeySym *) &stuff[1]; + + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); + if (rc != Success) + return rc; + + XkbApplyMappingChange(pDev, &keysyms, stuff->firstKeyCode, + stuff->keyCodes, NULL, client); + + for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { + if (IsMaster(tmp) || GetMaster(tmp, MASTER_KEYBOARD) != pDev) + continue; + if (!tmp->key) + continue; + + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); + if (rc != Success) + continue; + + XkbApplyMappingChange(tmp, &keysyms, stuff->firstKeyCode, + stuff->keyCodes, NULL, client); + } + + return Success; +} + +int +ProcSetPointerMapping(ClientPtr client) +{ + BYTE *map; + int ret; + int i, j; + DeviceIntPtr ptr = PickPointer(client); + xSetPointerMappingReply rep; + + REQUEST(xSetPointerMappingReq); + REQUEST_AT_LEAST_SIZE(xSetPointerMappingReq); + + if (client->req_len != + bytes_to_int32(sizeof(xSetPointerMappingReq) + stuff->nElts)) + return BadLength; + + rep = (xSetPointerMappingReply) { + .type = X_Reply, + .success = MappingSuccess, + .sequenceNumber = client->sequence, + .length = 0 + }; + map = (BYTE *) &stuff[1]; + + /* So we're bounded here by the number of core buttons. This check + * probably wants disabling through XFixes. */ + /* MPX: With ClientPointer, we can return the right number of buttons. + * Let's just hope nobody changed ClientPointer between GetPointerMapping + * and SetPointerMapping + */ + if (stuff->nElts != ptr->button->numButtons) { + client->errorValue = stuff->nElts; + return BadValue; + } + + /* Core protocol specs don't allow for duplicate mappings; this check + * almost certainly wants disabling through XFixes too. */ + for (i = 0; i < stuff->nElts; i++) { + for (j = i + 1; j < stuff->nElts; j++) { + if (map[i] && map[i] == map[j]) { + client->errorValue = map[i]; + return BadValue; + } + } + } + + ret = ApplyPointerMapping(ptr, map, stuff->nElts, client); + if (ret == MappingBusy) + rep.success = ret; + else if (ret == -1) + return BadValue; + else if (ret != Success) + return ret; + + WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); + return Success; +} + +int +ProcGetKeyboardMapping(ClientPtr client) +{ + xGetKeyboardMappingReply rep; + DeviceIntPtr kbd = PickKeyboard(client); + XkbDescPtr xkb; + KeySymsPtr syms; + int rc; + + REQUEST(xGetKeyboardMappingReq); + REQUEST_SIZE_MATCH(xGetKeyboardMappingReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetAttrAccess); + if (rc != Success) + return rc; + + xkb = kbd->key->xkbInfo->desc; + + if ((stuff->firstKeyCode < xkb->min_key_code) || + (stuff->firstKeyCode > xkb->max_key_code)) { + client->errorValue = stuff->firstKeyCode; + return BadValue; + } + if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) { + client->errorValue = stuff->count; + return BadValue; + } + + syms = XkbGetCoreMap(kbd); + if (!syms) + return BadAlloc; + + rep = (xGetKeyboardMappingReply) { + .type = X_Reply, + .keySymsPerKeyCode = syms->mapWidth, + .sequenceNumber = client->sequence, + /* length is a count of 4 byte quantities and KeySyms are 4 bytes */ + .length = syms->mapWidth * stuff->count + }; + WriteReplyToClient(client, sizeof(xGetKeyboardMappingReply), &rep); + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; + WriteSwappedDataToClient(client, + syms->mapWidth * stuff->count * sizeof(KeySym), + &syms->map[syms->mapWidth * (stuff->firstKeyCode - + syms->minKeyCode)]); + free(syms->map); + free(syms); + + return Success; +} + +int +ProcGetPointerMapping(ClientPtr client) +{ + xGetPointerMappingReply rep; + + /* Apps may get different values each time they call GetPointerMapping as + * the ClientPointer could change. */ + DeviceIntPtr ptr = PickPointer(client); + ButtonClassPtr butc = ptr->button; + int nElts; + int rc; + + REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, DixGetAttrAccess); + if (rc != Success) + return rc; + + nElts = (butc) ? butc->numButtons : 0; + rep = (xGetPointerMappingReply) { + .type = X_Reply, + .nElts = nElts, + .sequenceNumber = client->sequence, + .length = ((unsigned) nElts + (4 - 1)) / 4 + }; + WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep); + if (butc) + WriteToClient(client, nElts, &butc->map[1]); + return Success; +} + +void +NoteLedState(DeviceIntPtr keybd, int led, Bool on) +{ + KeybdCtrl *ctrl = &keybd->kbdfeed->ctrl; + + if (on) + ctrl->leds |= ((Leds) 1 << (led - 1)); + else + ctrl->leds &= ~((Leds) 1 << (led - 1)); +} + +int +Ones(unsigned long mask) +{ /* HACKMEM 169 */ + unsigned long y; + + y = (mask >> 1) & 033333333333; + y = mask - y - ((y >> 1) & 033333333333); + return (((y + (y >> 3)) & 030707070707) % 077); +} + +static int +DoChangeKeyboardControl(ClientPtr client, DeviceIntPtr keybd, XID *vlist, + BITS32 vmask) +{ +#define DO_ALL (-1) + KeybdCtrl ctrl; + int t; + int led = DO_ALL; + int key = DO_ALL; + BITS32 index2; + int mask = vmask, i; + XkbEventCauseRec cause; + + ctrl = keybd->kbdfeed->ctrl; + while (vmask) { + index2 = (BITS32) lowbit(vmask); + vmask &= ~index2; + switch (index2) { + case KBKeyClickPercent: + t = (INT8) *vlist; + vlist++; + if (t == -1) { + t = defaultKeyboardControl.click; + } + else if (t < 0 || t > 100) { + client->errorValue = t; + return BadValue; + } + ctrl.click = t; + break; + case KBBellPercent: + t = (INT8) *vlist; + vlist++; + if (t == -1) { + t = defaultKeyboardControl.bell; + } + else if (t < 0 || t > 100) { + client->errorValue = t; + return BadValue; + } + ctrl.bell = t; + break; + case KBBellPitch: + t = (INT16) *vlist; + vlist++; + if (t == -1) { + t = defaultKeyboardControl.bell_pitch; + } + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + ctrl.bell_pitch = t; + break; + case KBBellDuration: + t = (INT16) *vlist; + vlist++; + if (t == -1) + t = defaultKeyboardControl.bell_duration; + else if (t < 0) { + client->errorValue = t; + return BadValue; + } + ctrl.bell_duration = t; + break; + case KBLed: + led = (CARD8) *vlist; + vlist++; + if (led < 1 || led > 32) { + client->errorValue = led; + return BadValue; + } + if (!(mask & KBLedMode)) + return BadMatch; + break; + case KBLedMode: + t = (CARD8) *vlist; + vlist++; + if (t == LedModeOff) { + if (led == DO_ALL) + ctrl.leds = 0x0; + else + ctrl.leds &= ~(((Leds) (1)) << (led - 1)); + } + else if (t == LedModeOn) { + if (led == DO_ALL) + ctrl.leds = ~0L; + else + ctrl.leds |= (((Leds) (1)) << (led - 1)); + } + else { + client->errorValue = t; + return BadValue; + } + + XkbSetCauseCoreReq(&cause, X_ChangeKeyboardControl, client); + XkbSetIndicators(keybd, ((led == DO_ALL) ? ~0L : (1L << (led - 1))), + ctrl.leds, &cause); + ctrl.leds = keybd->kbdfeed->ctrl.leds; + + break; + case KBKey: + key = (KeyCode) *vlist; + vlist++; + if ((KeyCode) key < keybd->key->xkbInfo->desc->min_key_code || + (KeyCode) key > keybd->key->xkbInfo->desc->max_key_code) { + client->errorValue = key; + return BadValue; + } + if (!(mask & KBAutoRepeatMode)) + return BadMatch; + break; + case KBAutoRepeatMode: + i = (key >> 3); + mask = (1 << (key & 7)); + t = (CARD8) *vlist; + vlist++; + if (key != DO_ALL) + XkbDisableComputedAutoRepeats(keybd, key); + if (t == AutoRepeatModeOff) { + if (key == DO_ALL) + ctrl.autoRepeat = FALSE; + else + ctrl.autoRepeats[i] &= ~mask; + } + else if (t == AutoRepeatModeOn) { + if (key == DO_ALL) + ctrl.autoRepeat = TRUE; + else + ctrl.autoRepeats[i] |= mask; + } + else if (t == AutoRepeatModeDefault) { + if (key == DO_ALL) + ctrl.autoRepeat = defaultKeyboardControl.autoRepeat; + else + ctrl.autoRepeats[i] = + (ctrl.autoRepeats[i] & ~mask) | + (defaultKeyboardControl.autoRepeats[i] & mask); + } + else { + client->errorValue = t; + return BadValue; + } + break; + default: + client->errorValue = mask; + return BadValue; + } + } + keybd->kbdfeed->ctrl = ctrl; + + /* The XKB RepeatKeys control and core protocol global autorepeat */ + /* value are linked */ + XkbSetRepeatKeys(keybd, key, keybd->kbdfeed->ctrl.autoRepeat); + + return Success; + +#undef DO_ALL +} + +/** + * Changes kbd control on the ClientPointer and all attached SDs. + */ +int +ProcChangeKeyboardControl(ClientPtr client) +{ + XID *vlist; + BITS32 vmask; + int ret = Success, error = Success; + DeviceIntPtr pDev = NULL, keyboard; + + REQUEST(xChangeKeyboardControlReq); + + REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); + + vmask = stuff->mask; + vlist = (XID *) &stuff[1]; + + if (client->req_len != + (sizeof(xChangeKeyboardControlReq) >> 2) + Ones(vmask)) + return BadLength; + + keyboard = PickKeyboard(client); + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev == keyboard || + (!IsMaster(pDev) && GetMaster(pDev, MASTER_KEYBOARD) == keyboard)) + && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); + if (ret != Success) + return ret; + } + } + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev == keyboard || + (!IsMaster(pDev) && GetMaster(pDev, MASTER_KEYBOARD) == keyboard)) + && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + ret = DoChangeKeyboardControl(client, pDev, vlist, vmask); + if (ret != Success) + error = ret; + } + } + + return error; +} + +int +ProcGetKeyboardControl(ClientPtr client) +{ + int rc, i; + DeviceIntPtr kbd = PickKeyboard(client); + KeybdCtrl *ctrl = &kbd->kbdfeed->ctrl; + xGetKeyboardControlReply rep; + + REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xGetKeyboardControlReply) { + .type = X_Reply, + .globalAutoRepeat = ctrl->autoRepeat, + .sequenceNumber = client->sequence, + .length = 5, + .ledMask = ctrl->leds, + .keyClickPercent = ctrl->click, + .bellPercent = ctrl->bell, + .bellPitch = ctrl->bell_pitch, + .bellDuration = ctrl->bell_duration + }; + for (i = 0; i < 32; i++) + rep.map[i] = ctrl->autoRepeats[i]; + WriteReplyToClient(client, sizeof(xGetKeyboardControlReply), &rep); + return Success; +} + +int +ProcBell(ClientPtr client) +{ + DeviceIntPtr dev, keybd = PickKeyboard(client); + int base = keybd->kbdfeed->ctrl.bell; + int newpercent; + int rc; + + REQUEST(xBellReq); + REQUEST_SIZE_MATCH(xBellReq); + + if (stuff->percent < -100 || stuff->percent > 100) { + client->errorValue = stuff->percent; + return BadValue; + } + + newpercent = (base * stuff->percent) / 100; + if (stuff->percent < 0) + newpercent = base + newpercent; + else + newpercent = base - newpercent + stuff->percent; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev == keybd || + (!IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == keybd)) && + dev->kbdfeed && dev->kbdfeed->BellProc) { + + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess); + if (rc != Success) + return rc; + XkbHandleBell(FALSE, FALSE, dev, newpercent, + &dev->kbdfeed->ctrl, 0, None, NULL, client); + } + } + + return Success; +} + +int +ProcChangePointerControl(ClientPtr client) +{ + DeviceIntPtr dev, mouse = PickPointer(client); + PtrCtrl ctrl; /* might get BadValue part way through */ + int rc; + + REQUEST(xChangePointerControlReq); + REQUEST_SIZE_MATCH(xChangePointerControlReq); + + ctrl = mouse->ptrfeed->ctrl; + if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) { + client->errorValue = stuff->doAccel; + return BadValue; + } + if ((stuff->doThresh != xTrue) && (stuff->doThresh != xFalse)) { + client->errorValue = stuff->doThresh; + return BadValue; + } + if (stuff->doAccel) { + if (stuff->accelNum == -1) { + ctrl.num = defaultPointerControl.num; + } + else if (stuff->accelNum < 0) { + client->errorValue = stuff->accelNum; + return BadValue; + } + else { + ctrl.num = stuff->accelNum; + } + + if (stuff->accelDenum == -1) { + ctrl.den = defaultPointerControl.den; + } + else if (stuff->accelDenum <= 0) { + client->errorValue = stuff->accelDenum; + return BadValue; + } + else { + ctrl.den = stuff->accelDenum; + } + } + if (stuff->doThresh) { + if (stuff->threshold == -1) { + ctrl.threshold = defaultPointerControl.threshold; + } + else if (stuff->threshold < 0) { + client->errorValue = stuff->threshold; + return BadValue; + } + else { + ctrl.threshold = stuff->threshold; + } + } + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev == mouse || + (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) == mouse)) && + dev->ptrfeed) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); + if (rc != Success) + return rc; + } + } + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev == mouse || + (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) == mouse)) && + dev->ptrfeed) { + dev->ptrfeed->ctrl = ctrl; + } + } + + return Success; +} + +int +ProcGetPointerControl(ClientPtr client) +{ + DeviceIntPtr ptr = PickPointer(client); + PtrCtrl *ctrl = &ptr->ptrfeed->ctrl; + xGetPointerControlReply rep; + int rc; + + REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xGetPointerControlReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .accelNumerator = ctrl->num, + .accelDenominator = ctrl->den, + .threshold = ctrl->threshold + }; + WriteReplyToClient(client, sizeof(xGenericReply), &rep); + return Success; +} + +void +MaybeStopHint(DeviceIntPtr dev, ClientPtr client) +{ + GrabPtr grab = dev->deviceGrab.grab; + + if ((grab && SameClient(grab, client) && + ((grab->eventMask & PointerMotionHintMask) || + (grab->ownerEvents && + (EventMaskForClient(dev->valuator->motionHintWindow, client) & + PointerMotionHintMask)))) || + (!grab && + (EventMaskForClient(dev->valuator->motionHintWindow, client) & + PointerMotionHintMask))) + dev->valuator->motionHintWindow = NullWindow; +} + +int +ProcGetMotionEvents(ClientPtr client) +{ + WindowPtr pWin; + xTimecoord *coords = (xTimecoord *) NULL; + xGetMotionEventsReply rep; + int i, count, xmin, xmax, ymin, ymax, rc; + unsigned long nEvents; + DeviceIntPtr mouse = PickPointer(client); + TimeStamp start, stop; + + REQUEST(xGetMotionEventsReq); + REQUEST_SIZE_MATCH(xGetMotionEventsReq); + + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; + rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess); + if (rc != Success) + return rc; + + if (mouse->valuator->motionHintWindow) + MaybeStopHint(mouse, client); + rep = (xGetMotionEventsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence + }; + nEvents = 0; + start = ClientTimeToServerTime(stuff->start); + stop = ClientTimeToServerTime(stuff->stop); + if ((CompareTimeStamps(start, stop) != LATER) && + (CompareTimeStamps(start, currentTime) != LATER) && + mouse->valuator->numMotionEvents) { + if (CompareTimeStamps(stop, currentTime) == LATER) + stop = currentTime; + count = GetMotionHistory(mouse, &coords, start.milliseconds, + stop.milliseconds, pWin->drawable.pScreen, + TRUE); + xmin = pWin->drawable.x - wBorderWidth(pWin); + xmax = pWin->drawable.x + (int) pWin->drawable.width + + wBorderWidth(pWin); + ymin = pWin->drawable.y - wBorderWidth(pWin); + ymax = pWin->drawable.y + (int) pWin->drawable.height + + wBorderWidth(pWin); + for (i = 0; i < count; i++) + if ((xmin <= coords[i].x) && (coords[i].x < xmax) && + (ymin <= coords[i].y) && (coords[i].y < ymax)) { + coords[nEvents].time = coords[i].time; + coords[nEvents].x = coords[i].x - pWin->drawable.x; + coords[nEvents].y = coords[i].y - pWin->drawable.y; + nEvents++; + } + } + rep.length = nEvents * bytes_to_int32(sizeof(xTimecoord)); + rep.nEvents = nEvents; + WriteReplyToClient(client, sizeof(xGetMotionEventsReply), &rep); + if (nEvents) { + client->pSwapReplyFunc = (ReplySwapPtr) SwapTimeCoordWrite; + WriteSwappedDataToClient(client, nEvents * sizeof(xTimecoord), + (char *) coords); + } + free(coords); + return Success; +} + +int +ProcQueryKeymap(ClientPtr client) +{ + xQueryKeymapReply rep; + int rc, i; + DeviceIntPtr keybd = PickKeyboard(client); + CARD8 *down = keybd->key->down; + + REQUEST_SIZE_MATCH(xReq); + rep = (xQueryKeymapReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 2 + }; + + rc = XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess); + /* If rc is Success, we're allowed to copy out the keymap. + * If it's BadAccess, we leave it empty & lie to the client. + */ + if (rc == Success) { + for (i = 0; i < 32; i++) + rep.map[i] = down[i]; + } + else if (rc != BadAccess) + return rc; + + WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); + + return Success; +} + +/** + * Recalculate the number of buttons for the master device. The number of + * buttons on the master device is equal to the number of buttons on the + * slave device with the highest number of buttons. + */ +static void +RecalculateMasterButtons(DeviceIntPtr slave) +{ + DeviceIntPtr dev, master; + int maxbuttons = 0; + + if (!slave->button || IsMaster(slave)) + return; + + master = GetMaster(slave, MASTER_POINTER); + if (!master) + return; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (IsMaster(dev) || + GetMaster(dev, MASTER_ATTACHED) != master || !dev->button) + continue; + + maxbuttons = max(maxbuttons, dev->button->numButtons); + } + + if (master->button && master->button->numButtons != maxbuttons) { + int i; + DeviceChangedEvent event = { + .header = ET_Internal, + .type = ET_DeviceChanged, + .time = GetTimeInMillis(), + .deviceid = master->id, + .flags = DEVCHANGE_POINTER_EVENT | DEVCHANGE_DEVICE_CHANGE, + .buttons.num_buttons = maxbuttons + }; + + master->button->numButtons = maxbuttons; + + memcpy(&event.buttons.names, master->button->labels, maxbuttons * + sizeof(Atom)); + + if (master->valuator) { + event.num_valuators = master->valuator->numAxes; + for (i = 0; i < event.num_valuators; i++) { + event.valuators[i].min = master->valuator->axes[i].min_value; + event.valuators[i].max = master->valuator->axes[i].max_value; + event.valuators[i].resolution = + master->valuator->axes[i].resolution; + event.valuators[i].mode = master->valuator->axes[i].mode; + event.valuators[i].name = master->valuator->axes[i].label; + } + } + + if (master->key) { + event.keys.min_keycode = master->key->xkbInfo->desc->min_key_code; + event.keys.max_keycode = master->key->xkbInfo->desc->max_key_code; + } + + XISendDeviceChangedEvent(master, &event); + } +} + +/** + * Generate release events for all keys/button currently down on this + * device. + */ +void +ReleaseButtonsAndKeys(DeviceIntPtr dev) +{ + InternalEvent *eventlist = InitEventList(GetMaximumEventsNum()); + ButtonClassPtr b = dev->button; + KeyClassPtr k = dev->key; + int i, j, nevents; + + if (!eventlist) /* no release events for you */ + return; + + /* Release all buttons */ + for (i = 0; b && i < b->numButtons; i++) { + if (BitIsOn(b->down, i)) { + nevents = + GetPointerEvents(eventlist, dev, ButtonRelease, i, 0, NULL); + for (j = 0; j < nevents; j++) + mieqProcessDeviceEvent(dev, &eventlist[j], NULL); + } + } + + /* Release all keys */ + for (i = 0; k && i < MAP_LENGTH; i++) { + if (BitIsOn(k->down, i)) { + nevents = GetKeyboardEvents(eventlist, dev, KeyRelease, i, NULL); + for (j = 0; j < nevents; j++) + mieqProcessDeviceEvent(dev, &eventlist[j], NULL); + } + } + + FreeEventList(eventlist, GetMaximumEventsNum()); +} + +/** + * Attach device 'dev' to device 'master'. + * Client is set to the client that issued the request, or NULL if it comes + * from some internal automatic pairing. + * + * Master may be NULL to set the device floating. + * + * We don't allow multi-layer hierarchies right now. You can't attach a slave + * to another slave. + */ +int +AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) +{ + ScreenPtr screen; + + if (!dev || IsMaster(dev)) + return BadDevice; + + if (master && !IsMaster(master)) /* can't attach to slaves */ + return BadDevice; + + /* set from floating to floating? */ + if (IsFloating(dev) && !master && dev->enabled) + return Success; + + /* free the existing sprite. */ + if (IsFloating(dev) && dev->spriteInfo->paired == dev) { + screen = miPointerGetScreen(dev); + screen->DeviceCursorCleanup(dev, screen); + free(dev->spriteInfo->sprite); + } + + dev->master = master; + + /* If device is set to floating, we need to create a sprite for it, + * otherwise things go bad. However, we don't want to render the cursor, + * so we reset spriteOwner. + * Sprite has to be forced to NULL first, otherwise InitializeSprite won't + * alloc new memory but overwrite the previous one. + */ + if (!master) { + WindowPtr currentRoot; + + if (dev->spriteInfo->sprite) + currentRoot = GetCurrentRootWindow(dev); + else /* new device auto-set to floating */ + currentRoot = screenInfo.screens[0]->root; + + /* we need to init a fake sprite */ + screen = currentRoot->drawable.pScreen; + screen->DeviceCursorInitialize(dev, screen); + dev->spriteInfo->sprite = NULL; + InitializeSprite(dev, currentRoot); + dev->spriteInfo->spriteOwner = FALSE; + dev->spriteInfo->paired = dev; + } + else { + dev->spriteInfo->sprite = master->spriteInfo->sprite; + dev->spriteInfo->paired = master; + dev->spriteInfo->spriteOwner = FALSE; + + RecalculateMasterButtons(master); + } + + /* XXX: in theory, the MD should change back to its old, original + * classes when the last SD is detached. Thanks to the XTEST devices, + * we'll always have an SD attached until the MD is removed. + * So let's not worry about that. + */ + + return Success; +} + +/** + * Return the device paired with the given device or NULL. + * Returns the device paired with the parent master if the given device is a + * slave device. + */ +DeviceIntPtr +GetPairedDevice(DeviceIntPtr dev) +{ + if (!IsMaster(dev) && !IsFloating(dev)) + dev = GetMaster(dev, MASTER_ATTACHED); + + return dev->spriteInfo->paired; +} + +/** + * Returns the requested master for this device. + * The return values are: + * - MASTER_ATTACHED: the master for this device or NULL for a floating + * slave. + * - MASTER_KEYBOARD: the master keyboard for this device or NULL for a + * floating slave + * - MASTER_POINTER: the master keyboard for this device or NULL for a + * floating slave + * - POINTER_OR_FLOAT: the master pointer for this device or the device for + * a floating slave + * - KEYBOARD_OR_FLOAT: the master keyboard for this device or the device for + * a floating slave + * + * @param which ::MASTER_KEYBOARD or ::MASTER_POINTER, ::MASTER_ATTACHED, + * ::POINTER_OR_FLOAT or ::KEYBOARD_OR_FLOAT. + * @return The requested master device + */ +DeviceIntPtr +GetMaster(DeviceIntPtr dev, int which) +{ + DeviceIntPtr master; + + if (IsMaster(dev)) + master = dev; + else { + master = dev->master; + if (!master && + (which == POINTER_OR_FLOAT || which == KEYBOARD_OR_FLOAT)) + return dev; + } + + if (master && which != MASTER_ATTACHED) { + if (which == MASTER_KEYBOARD || which == KEYBOARD_OR_FLOAT) { + if (master->type != MASTER_KEYBOARD) + master = GetPairedDevice(master); + } + else { + if (master->type != MASTER_POINTER) + master = GetPairedDevice(master); + } + } + + return master; +} + +/** + * Create a new device pair (== one pointer, one keyboard device). + * Only allocates the devices, you will need to call ActivateDevice() and + * EnableDevice() manually. + * Either a master or a slave device can be created depending on + * the value for master. + */ +int +AllocDevicePair(ClientPtr client, const char *name, + DeviceIntPtr *ptr, + DeviceIntPtr *keybd, + DeviceProc ptr_proc, DeviceProc keybd_proc, Bool master) +{ + DeviceIntPtr pointer; + DeviceIntPtr keyboard; + + *ptr = *keybd = NULL; + + XkbInitPrivates(); + + pointer = AddInputDevice(client, ptr_proc, TRUE); + + if (!pointer) + return BadAlloc; + + if (asprintf(&pointer->name, "%s pointer", name) == -1) { + pointer->name = NULL; + RemoveDevice(pointer, FALSE); + + return BadAlloc; + } + + pointer->public.processInputProc = ProcessOtherEvent; + pointer->public.realInputProc = ProcessOtherEvent; + XkbSetExtension(pointer, ProcessPointerEvent); + pointer->deviceGrab.ActivateGrab = ActivatePointerGrab; + pointer->deviceGrab.DeactivateGrab = DeactivatePointerGrab; + pointer->coreEvents = TRUE; + pointer->spriteInfo->spriteOwner = TRUE; + + pointer->lastSlave = NULL; + pointer->last.slave = NULL; + pointer->type = (master) ? MASTER_POINTER : SLAVE; + + keyboard = AddInputDevice(client, keybd_proc, TRUE); + if (!keyboard) { + RemoveDevice(pointer, FALSE); + + return BadAlloc; + } + + if (asprintf(&keyboard->name, "%s keyboard", name) == -1) { + keyboard->name = NULL; + RemoveDevice(keyboard, FALSE); + RemoveDevice(pointer, FALSE); + + return BadAlloc; + } + + keyboard->public.processInputProc = ProcessOtherEvent; + keyboard->public.realInputProc = ProcessOtherEvent; + XkbSetExtension(keyboard, ProcessKeyboardEvent); + keyboard->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + keyboard->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + keyboard->coreEvents = TRUE; + keyboard->spriteInfo->spriteOwner = FALSE; + + keyboard->lastSlave = NULL; + keyboard->last.slave = NULL; + keyboard->type = (master) ? MASTER_KEYBOARD : SLAVE; + + /* The ClassesRec stores the device classes currently not used. */ + if (IsMaster(pointer)) { + pointer->unused_classes = calloc(1, sizeof(ClassesRec)); + keyboard->unused_classes = calloc(1, sizeof(ClassesRec)); + } + + *ptr = pointer; + + *keybd = keyboard; + + return Success; +} + +/** + * Return Relative or Absolute for the device. + */ +int +valuator_get_mode(DeviceIntPtr dev, int axis) +{ + return (dev->valuator->axes[axis].mode & DeviceMode); +} + +/** + * Set the given mode for the axis. If axis is VALUATOR_MODE_ALL_AXES, then + * set the mode for all axes. + */ +void +valuator_set_mode(DeviceIntPtr dev, int axis, int mode) +{ + if (axis != VALUATOR_MODE_ALL_AXES) + dev->valuator->axes[axis].mode = mode; + else { + int i; + + for (i = 0; i < dev->valuator->numAxes; i++) + dev->valuator->axes[i].mode = mode; + } +} diff --git a/dix/dispatch.c b/dix/dispatch.c new file mode 100644 index 0000000..8dcd9cb --- /dev/null +++ b/dix/dispatch.c @@ -0,0 +1,3956 @@ +/************************************************************ + +Copyright 1987, 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +/* XSERVER_DTRACE additions: + * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#include <version-config.h> +#endif + +#ifdef PANORAMIX_DEBUG +#include <stdio.h> +int ProcInitialConnection(); +#endif + +#include "windowstr.h" +#include <X11/fonts/fontstruct.h> +#include "dixfontstr.h" +#include "gcstruct.h" +#include "selection.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "scrnintstr.h" +#include "opaque.h" +#include "input.h" +#include "servermd.h" +#include "extnsionst.h" +#include "dixfont.h" +#include "dispatch.h" +#include "swaprep.h" +#include "swapreq.h" +#include "privates.h" +#include "xace.h" +#include "inputstr.h" +#include "xkbsrv.h" +#include "site.h" +#include "client.h" + +#ifdef XSERVER_DTRACE +#include "registry.h" +#include <sys/types.h> +typedef const char *string; + +#include "Xserver-dtrace.h" +#endif + +#define mskcnt ((MAXCLIENTS + 31) / 32) +#define BITMASK(i) (1U << ((i) & 31)) +#define MASKIDX(i) ((i) >> 5) +#define MASKWORD(buf, i) buf[MASKIDX(i)] +#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) +#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) +#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) + +xConnSetupPrefix connSetupPrefix; + +PaddingInfo PixmapWidthPaddingInfo[33]; + +static ClientPtr grabClient; + +#define GrabNone 0 +#define GrabActive 1 +#define GrabKickout 2 +static int grabState = GrabNone; +static long grabWaiters[mskcnt]; +CallbackListPtr ServerGrabCallback = NULL; +HWEventQueuePtr checkForInput[2]; +int connBlockScreenStart; + +static void KillAllClients(void); + +static int nextFreeClientID; /* always MIN free client ID */ + +static int nClients; /* number of authorized clients */ + +CallbackListPtr ClientStateCallback; + +/* dispatchException & isItTimeToYield must be declared volatile since they + * are modified by signal handlers - otherwise optimizer may assume it doesn't + * need to actually check value in memory when used and may miss changes from + * signal handlers. + */ +volatile char dispatchException = 0; +volatile char isItTimeToYield; + +#define SAME_SCREENS(a, b) (\ + (a.pScreen == b.pScreen)) + +void +SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1) +{ + checkForInput[0] = c0; + checkForInput[1] = c1; +} + +void +UpdateCurrentTime(void) +{ + TimeStamp systime; + + /* To avoid time running backwards, we must call GetTimeInMillis before + * calling ProcessInputEvents. + */ + systime.months = currentTime.months; + systime.milliseconds = GetTimeInMillis(); + if (systime.milliseconds < currentTime.milliseconds) + systime.months++; + if (*checkForInput[0] != *checkForInput[1]) + ProcessInputEvents(); + if (CompareTimeStamps(systime, currentTime) == LATER) + currentTime = systime; +} + +/* Like UpdateCurrentTime, but can't call ProcessInputEvents */ +void +UpdateCurrentTimeIf(void) +{ + TimeStamp systime; + + systime.months = currentTime.months; + systime.milliseconds = GetTimeInMillis(); + if (systime.milliseconds < currentTime.milliseconds) + systime.months++; + if (CompareTimeStamps(systime, currentTime) == LATER) + currentTime = systime; +} + +#undef SMART_DEBUG + +/* in milliseconds */ +#define SMART_SCHEDULE_DEFAULT_INTERVAL 5 +#define SMART_SCHEDULE_MAX_SLICE 15 + +#if defined(WIN32) && !defined(__CYGWIN__) +Bool SmartScheduleDisable = TRUE; +#else +Bool SmartScheduleDisable = FALSE; +#endif +long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; +long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; +long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; +long SmartScheduleTime; +int SmartScheduleLatencyLimited = 0; +static ClientPtr SmartLastClient; +static int SmartLastIndex[SMART_MAX_PRIORITY - SMART_MIN_PRIORITY + 1]; + +#ifdef SMART_DEBUG +long SmartLastPrint; +#endif + +void Dispatch(void); + +static int +SmartScheduleClient(int *clientReady, int nready) +{ + ClientPtr pClient; + int i; + int client; + int bestPrio, best = 0; + int bestRobin, robin; + long now = SmartScheduleTime; + long idle; + + bestPrio = -0x7fffffff; + bestRobin = 0; + idle = 2 * SmartScheduleSlice; + for (i = 0; i < nready; i++) { + client = clientReady[i]; + pClient = clients[client]; + /* Praise clients which are idle */ + if ((now - pClient->smart_check_tick) >= idle) { + if (pClient->smart_priority < 0) + pClient->smart_priority++; + } + pClient->smart_check_tick = now; + + /* check priority to select best client */ + robin = + (pClient->index - + SmartLastIndex[pClient->smart_priority - + SMART_MIN_PRIORITY]) & 0xff; + if (pClient->smart_priority > bestPrio || + (pClient->smart_priority == bestPrio && robin > bestRobin)) { + bestPrio = pClient->smart_priority; + bestRobin = robin; + best = client; + } +#ifdef SMART_DEBUG + if ((now - SmartLastPrint) >= 5000) + fprintf(stderr, " %2d: %3d", client, pClient->smart_priority); +#endif + } +#ifdef SMART_DEBUG + if ((now - SmartLastPrint) >= 5000) { + fprintf(stderr, " use %2d\n", best); + SmartLastPrint = now; + } +#endif + pClient = clients[best]; + SmartLastIndex[bestPrio - SMART_MIN_PRIORITY] = pClient->index; + /* + * Set current client pointer + */ + if (SmartLastClient != pClient) { + pClient->smart_start_tick = now; + SmartLastClient = pClient; + } + /* + * Adjust slice + */ + if (nready == 1 && SmartScheduleLatencyLimited == 0) { + /* + * If it's been a long time since another client + * has run, bump the slice up to get maximal + * performance from a single client + */ + if ((now - pClient->smart_start_tick) > 1000 && + SmartScheduleSlice < SmartScheduleMaxSlice) { + SmartScheduleSlice += SmartScheduleInterval; + } + } + else { + SmartScheduleSlice = SmartScheduleInterval; + } + return best; +} + +void +EnableLimitedSchedulingLatency(void) +{ + ++SmartScheduleLatencyLimited; + SmartScheduleSlice = SmartScheduleInterval; +} + +void +DisableLimitedSchedulingLatency(void) +{ + --SmartScheduleLatencyLimited; + + /* protect against bugs */ + if (SmartScheduleLatencyLimited < 0) + SmartScheduleLatencyLimited = 0; +} + +void +Dispatch(void) +{ + int *clientReady; /* array of request ready clients */ + int result; + ClientPtr client; + int nready; + HWEventQueuePtr *icheck = checkForInput; + long start_tick; + + nextFreeClientID = 1; + nClients = 0; + + clientReady = malloc(sizeof(int) * MaxClients); + if (!clientReady) + return; + + SmartScheduleSlice = SmartScheduleInterval; + while (!dispatchException) { + if (*icheck[0] != *icheck[1]) { + ProcessInputEvents(); + FlushIfCriticalOutputPending(); + } + + nready = WaitForSomething(clientReady); + + if (nready && !SmartScheduleDisable) { + clientReady[0] = SmartScheduleClient(clientReady, nready); + nready = 1; + } + /***************** + * Handle events in round robin fashion, doing input between + * each round + *****************/ + + while (!dispatchException && (--nready >= 0)) { + client = clients[clientReady[nready]]; + if (!client) { + /* KillClient can cause this to happen */ + continue; + } + /* GrabServer activation can cause this to be true */ + if (grabState == GrabKickout) { + grabState = GrabActive; + break; + } + isItTimeToYield = FALSE; + + start_tick = SmartScheduleTime; + while (!isItTimeToYield) { + if (*icheck[0] != *icheck[1]) + ProcessInputEvents(); + + FlushIfCriticalOutputPending(); + if (!SmartScheduleDisable && + (SmartScheduleTime - start_tick) >= SmartScheduleSlice) { + /* Penalize clients which consume ticks */ + if (client->smart_priority > SMART_MIN_PRIORITY) + client->smart_priority--; + break; + } + /* now, finally, deal with client requests */ + + /* Update currentTime so request time checks, such as for input + * device grabs, are calculated correctly */ + UpdateCurrentTimeIf(); + result = ReadRequestFromClient(client); + if (result <= 0) { + if (result < 0) + CloseDownClient(client); + break; + } + + client->sequence++; + client->majorOp = ((xReq *) client->requestBuffer)->reqType; + client->minorOp = 0; + if (client->majorOp >= EXTENSION_BASE) { + ExtensionEntry *ext = GetExtensionEntry(client->majorOp); + + if (ext) + client->minorOp = ext->MinorOpcode(client); + } +#ifdef XSERVER_DTRACE + if (XSERVER_REQUEST_START_ENABLED()) + XSERVER_REQUEST_START(LookupMajorName(client->majorOp), + client->majorOp, + ((xReq *) client->requestBuffer)->length, + client->index, + client->requestBuffer); +#endif + if (result > (maxBigRequestSize << 2)) + result = BadLength; + else { + result = XaceHookDispatch(client, client->majorOp); + if (result == Success) + result = + (*client->requestVector[client->majorOp]) (client); + XaceHookAuditEnd(client, result); + } +#ifdef XSERVER_DTRACE + if (XSERVER_REQUEST_DONE_ENABLED()) + XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), + client->majorOp, client->sequence, + client->index, result); +#endif + + if (client->noClientException != Success) { + CloseDownClient(client); + break; + } + else if (result != Success) { + SendErrorToClient(client, client->majorOp, + client->minorOp, + client->errorValue, result); + break; + } + } + FlushAllOutput(); + client = clients[clientReady[nready]]; + if (client) + client->smart_stop_tick = SmartScheduleTime; + } + dispatchException &= ~DE_PRIORITYCHANGE; + } +#if defined(DDXBEFORERESET) + ddxBeforeReset(); +#endif + KillAllClients(); + free(clientReady); + dispatchException &= ~DE_RESET; + SmartScheduleLatencyLimited = 0; + ResetOsBuffers(); +} + +static int VendorRelease = VENDOR_RELEASE; +static char *VendorString = VENDOR_NAME; + +void +SetVendorRelease(int release) +{ + VendorRelease = release; +} + +void +SetVendorString(char *string) +{ + VendorString = string; +} + +Bool +CreateConnectionBlock(void) +{ + xConnSetup setup; + xWindowRoot root; + xDepth depth; + xVisualType visual; + xPixmapFormat format; + unsigned long vid; + int i, j, k, lenofblock, sizesofar = 0; + char *pBuf; + + memset(&setup, 0, sizeof(xConnSetup)); + /* Leave off the ridBase and ridMask, these must be sent with + connection */ + + setup.release = VendorRelease; + /* + * per-server image and bitmap parameters are defined in Xmd.h + */ + setup.imageByteOrder = screenInfo.imageByteOrder; + + setup.bitmapScanlineUnit = screenInfo.bitmapScanlineUnit; + setup.bitmapScanlinePad = screenInfo.bitmapScanlinePad; + + setup.bitmapBitOrder = screenInfo.bitmapBitOrder; + setup.motionBufferSize = NumMotionEvents(); + setup.numRoots = screenInfo.numScreens; + setup.nbytesVendor = strlen(VendorString); + setup.numFormats = screenInfo.numPixmapFormats; + setup.maxRequestSize = MAX_REQUEST_SIZE; + QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode); + + lenofblock = sizeof(xConnSetup) + + pad_to_int32(setup.nbytesVendor) + + (setup.numFormats * sizeof(xPixmapFormat)) + + (setup.numRoots * sizeof(xWindowRoot)); + ConnectionInfo = malloc(lenofblock); + if (!ConnectionInfo) + return FALSE; + + memmove(ConnectionInfo, (char *) &setup, sizeof(xConnSetup)); + sizesofar = sizeof(xConnSetup); + pBuf = ConnectionInfo + sizeof(xConnSetup); + + memmove(pBuf, VendorString, (int) setup.nbytesVendor); + sizesofar += setup.nbytesVendor; + pBuf += setup.nbytesVendor; + i = padding_for_int32(setup.nbytesVendor); + sizesofar += i; + while (--i >= 0) + *pBuf++ = 0; + + memset(&format, 0, sizeof(xPixmapFormat)); + for (i = 0; i < screenInfo.numPixmapFormats; i++) { + format.depth = screenInfo.formats[i].depth; + format.bitsPerPixel = screenInfo.formats[i].bitsPerPixel; + format.scanLinePad = screenInfo.formats[i].scanlinePad; + memmove(pBuf, (char *) &format, sizeof(xPixmapFormat)); + pBuf += sizeof(xPixmapFormat); + sizesofar += sizeof(xPixmapFormat); + } + + connBlockScreenStart = sizesofar; + memset(&depth, 0, sizeof(xDepth)); + memset(&visual, 0, sizeof(xVisualType)); + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen; + DepthPtr pDepth; + VisualPtr pVisual; + + pScreen = screenInfo.screens[i]; + root.windowId = pScreen->root->drawable.id; + root.defaultColormap = pScreen->defColormap; + root.whitePixel = pScreen->whitePixel; + root.blackPixel = pScreen->blackPixel; + root.currentInputMask = 0; /* filled in when sent */ + root.pixWidth = pScreen->width; + root.pixHeight = pScreen->height; + root.mmWidth = pScreen->mmWidth; + root.mmHeight = pScreen->mmHeight; + root.minInstalledMaps = pScreen->minInstalledCmaps; + root.maxInstalledMaps = pScreen->maxInstalledCmaps; + root.rootVisualID = pScreen->rootVisual; + root.backingStore = pScreen->backingStoreSupport; + root.saveUnders = FALSE; + root.rootDepth = pScreen->rootDepth; + root.nDepths = pScreen->numDepths; + memmove(pBuf, (char *) &root, sizeof(xWindowRoot)); + sizesofar += sizeof(xWindowRoot); + pBuf += sizeof(xWindowRoot); + + pDepth = pScreen->allowedDepths; + for (j = 0; j < pScreen->numDepths; j++, pDepth++) { + lenofblock += sizeof(xDepth) + + (pDepth->numVids * sizeof(xVisualType)); + pBuf = (char *) realloc(ConnectionInfo, lenofblock); + if (!pBuf) { + free(ConnectionInfo); + return FALSE; + } + ConnectionInfo = pBuf; + pBuf += sizesofar; + depth.depth = pDepth->depth; + depth.nVisuals = pDepth->numVids; + memmove(pBuf, (char *) &depth, sizeof(xDepth)); + pBuf += sizeof(xDepth); + sizesofar += sizeof(xDepth); + for (k = 0; k < pDepth->numVids; k++) { + vid = pDepth->vids[k]; + for (pVisual = pScreen->visuals; + pVisual->vid != vid; pVisual++); + visual.visualID = vid; + visual.class = pVisual->class; + visual.bitsPerRGB = pVisual->bitsPerRGBValue; + visual.colormapEntries = pVisual->ColormapEntries; + visual.redMask = pVisual->redMask; + visual.greenMask = pVisual->greenMask; + visual.blueMask = pVisual->blueMask; + memmove(pBuf, (char *) &visual, sizeof(xVisualType)); + pBuf += sizeof(xVisualType); + sizesofar += sizeof(xVisualType); + } + } + } + connSetupPrefix.success = xTrue; + connSetupPrefix.length = lenofblock / 4; + connSetupPrefix.majorVersion = X_PROTOCOL; + connSetupPrefix.minorVersion = X_PROTOCOL_REVISION; + return TRUE; +} + +int +ProcBadRequest(ClientPtr client) +{ + return BadRequest; +} + +int +ProcCreateWindow(ClientPtr client) +{ + WindowPtr pParent, pWin; + + REQUEST(xCreateWindowReq); + int len, rc; + + REQUEST_AT_LEAST_SIZE(xCreateWindowReq); + + LEGAL_NEW_RESOURCE(stuff->wid, client); + rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); + if (rc != Success) + return rc; + len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq)); + if (Ones(stuff->mask) != len) + return BadLength; + if (!stuff->width || !stuff->height) { + client->errorValue = 0; + return BadValue; + } + pWin = CreateWindow(stuff->wid, pParent, stuff->x, + stuff->y, stuff->width, stuff->height, + stuff->borderWidth, stuff->class, + stuff->mask, (XID *) &stuff[1], + (int) stuff->depth, client, stuff->visual, &rc); + if (pWin) { + Mask mask = pWin->eventMask; + + pWin->eventMask = 0; /* subterfuge in case AddResource fails */ + if (!AddResource(stuff->wid, RT_WINDOW, (pointer) pWin)) + return BadAlloc; + pWin->eventMask = mask; + } + return rc; +} + +int +ProcChangeWindowAttributes(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xChangeWindowAttributesReq); + int len, rc; + Mask access_mode = 0; + + REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); + access_mode |= (stuff->valueMask & CWEventMask) ? DixReceiveAccess : 0; + access_mode |= (stuff->valueMask & ~CWEventMask) ? DixSetAttrAccess : 0; + rc = dixLookupWindow(&pWin, stuff->window, client, access_mode); + if (rc != Success) + return rc; + len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq)); + if (len != Ones(stuff->valueMask)) + return BadLength; + return ChangeWindowAttributes(pWin, + stuff->valueMask, (XID *) &stuff[1], client); +} + +int +ProcGetWindowAttributes(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xResourceReq); + xGetWindowAttributesReply wa; + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + memset(&wa, 0, sizeof(xGetWindowAttributesReply)); + GetWindowAttributes(pWin, client, &wa); + WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa); + return Success; +} + +int +ProcDestroyWindow(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; + if (pWin->parent) { + rc = dixLookupWindow(&pWin, pWin->parent->drawable.id, client, + DixRemoveAccess); + if (rc != Success) + return rc; + FreeResource(stuff->id, RT_NONE); + } + return Success; +} + +int +ProcDestroySubwindows(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixRemoveAccess); + if (rc != Success) + return rc; + DestroySubwindows(pWin, client); + return Success; +} + +int +ProcChangeSaveSet(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xChangeSaveSetReq); + int rc; + + REQUEST_SIZE_MATCH(xChangeSaveSetReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); + if (rc != Success) + return rc; + if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) + return BadMatch; + if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete)) + return AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE); + client->errorValue = stuff->mode; + return BadValue; +} + +int +ProcReparentWindow(ClientPtr client) +{ + WindowPtr pWin, pParent; + + REQUEST(xReparentWindowReq); + int rc; + + REQUEST_SIZE_MATCH(xReparentWindowReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); + if (rc != Success) + return rc; + if (!SAME_SCREENS(pWin->drawable, pParent->drawable)) + return BadMatch; + if ((pWin->backgroundState == ParentRelative) && + (pParent->drawable.depth != pWin->drawable.depth)) + return BadMatch; + if ((pWin->drawable.class != InputOnly) && + (pParent->drawable.class == InputOnly)) + return BadMatch; + return ReparentWindow(pWin, pParent, + (short) stuff->x, (short) stuff->y, client); +} + +int +ProcMapWindow(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixShowAccess); + if (rc != Success) + return rc; + MapWindow(pWin, client); + /* update cache to say it is mapped */ + return Success; +} + +int +ProcMapSubwindows(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); + if (rc != Success) + return rc; + MapSubwindows(pWin, client); + /* update cache to say it is mapped */ + return Success; +} + +int +ProcUnmapWindow(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixHideAccess); + if (rc != Success) + return rc; + UnmapWindow(pWin, FALSE); + /* update cache to say it is mapped */ + return Success; +} + +int +ProcUnmapSubwindows(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xResourceReq); + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); + if (rc != Success) + return rc; + UnmapSubwindows(pWin); + return Success; +} + +int +ProcConfigureWindow(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xConfigureWindowReq); + int len, rc; + + REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); + rc = dixLookupWindow(&pWin, stuff->window, client, + DixManageAccess | DixSetAttrAccess); + if (rc != Success) + return rc; + len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq)); + if (Ones((Mask) stuff->mask) != len) + return BadLength; + return ConfigureWindow(pWin, (Mask) stuff->mask, (XID *) &stuff[1], client); +} + +int +ProcCirculateWindow(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xCirculateWindowReq); + int rc; + + REQUEST_SIZE_MATCH(xCirculateWindowReq); + if ((stuff->direction != RaiseLowest) && (stuff->direction != LowerHighest)) { + client->errorValue = stuff->direction; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); + if (rc != Success) + return rc; + CirculateWindow(pWin, (int) stuff->direction, client); + return Success; +} + +static int +GetGeometry(ClientPtr client, xGetGeometryReply * rep) +{ + DrawablePtr pDraw; + int rc; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep->type = X_Reply; + rep->length = 0; + rep->sequenceNumber = client->sequence; + rep->root = pDraw->pScreen->root->drawable.id; + rep->depth = pDraw->depth; + rep->width = pDraw->width; + rep->height = pDraw->height; + + if (WindowDrawable(pDraw->type)) { + WindowPtr pWin = (WindowPtr) pDraw; + + rep->x = pWin->origin.x - wBorderWidth(pWin); + rep->y = pWin->origin.y - wBorderWidth(pWin); + rep->borderWidth = pWin->borderWidth; + } + else { /* DRAWABLE_PIXMAP */ + + rep->x = rep->y = rep->borderWidth = 0; + } + + return Success; +} + +int +ProcGetGeometry(ClientPtr client) +{ + xGetGeometryReply rep = { .type = X_Reply }; + int status; + + if ((status = GetGeometry(client, &rep)) != Success) + return status; + + WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); + return Success; +} + +int +ProcQueryTree(ClientPtr client) +{ + xQueryTreeReply reply; + int rc, numChildren = 0; + WindowPtr pChild, pWin, pHead; + Window *childIDs = (Window *) NULL; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); + if (rc != Success) + return rc; + + reply = (xQueryTreeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .root = pWin->drawable.pScreen->root->drawable.id, + .parent = (pWin->parent) ? pWin->parent->drawable.id : (Window) None + }; + pHead = RealChildHead(pWin); + for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) + numChildren++; + if (numChildren) { + int curChild = 0; + + childIDs = malloc(numChildren * sizeof(Window)); + if (!childIDs) + return BadAlloc; + for (pChild = pWin->lastChild; pChild != pHead; + pChild = pChild->prevSib) + childIDs[curChild++] = pChild->drawable.id; + } + + reply.nChildren = numChildren; + reply.length = bytes_to_int32(numChildren * sizeof(Window)); + + WriteReplyToClient(client, sizeof(xQueryTreeReply), &reply); + if (numChildren) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, numChildren * sizeof(Window), + childIDs); + free(childIDs); + } + + return Success; +} + +int +ProcInternAtom(ClientPtr client) +{ + Atom atom; + char *tchar; + + REQUEST(xInternAtomReq); + + REQUEST_FIXED_SIZE(xInternAtomReq, stuff->nbytes); + if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse)) { + client->errorValue = stuff->onlyIfExists; + return BadValue; + } + tchar = (char *) &stuff[1]; + atom = MakeAtom(tchar, stuff->nbytes, !stuff->onlyIfExists); + if (atom != BAD_RESOURCE) { + xInternAtomReply reply = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .atom = atom + }; + WriteReplyToClient(client, sizeof(xInternAtomReply), &reply); + return Success; + } + else + return BadAlloc; +} + +int +ProcGetAtomName(ClientPtr client) +{ + const char *str; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + if ((str = NameForAtom(stuff->id))) { + int len = strlen(str); + xGetAtomNameReply reply = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(len), + .nameLength = len + }; + + WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); + WriteToClient(client, len, str); + return Success; + } + else { + client->errorValue = stuff->id; + return BadAtom; + } +} + +int +ProcGrabServer(ClientPtr client) +{ + int rc; + + REQUEST_SIZE_MATCH(xReq); + if (grabState != GrabNone && client != grabClient) { + ResetCurrentRequest(client); + client->sequence--; + BITSET(grabWaiters, client->index); + IgnoreClient(client); + return Success; + } + rc = OnlyListenToOneClient(client); + if (rc != Success) + return rc; + grabState = GrabKickout; + grabClient = client; + + if (ServerGrabCallback) { + ServerGrabInfoRec grabinfo; + + grabinfo.client = client; + grabinfo.grabstate = SERVER_GRABBED; + CallCallbacks(&ServerGrabCallback, (pointer) &grabinfo); + } + + return Success; +} + +static void +UngrabServer(ClientPtr client) +{ + int i; + + grabState = GrabNone; + ListenToAllClients(); + for (i = mskcnt; --i >= 0 && !grabWaiters[i];); + if (i >= 0) { + i <<= 5; + while (!GETBIT(grabWaiters, i)) + i++; + BITCLEAR(grabWaiters, i); + AttendClient(clients[i]); + } + + if (ServerGrabCallback) { + ServerGrabInfoRec grabinfo; + + grabinfo.client = client; + grabinfo.grabstate = SERVER_UNGRABBED; + CallCallbacks(&ServerGrabCallback, (pointer) &grabinfo); + } +} + +int +ProcUngrabServer(ClientPtr client) +{ + REQUEST_SIZE_MATCH(xReq); + UngrabServer(client); + return Success; +} + +int +ProcTranslateCoords(ClientPtr client) +{ + REQUEST(xTranslateCoordsReq); + + WindowPtr pWin, pDst; + xTranslateCoordsReply rep; + int rc; + + REQUEST_SIZE_MATCH(xTranslateCoordsReq); + rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + rep = (xTranslateCoordsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0 + }; + if (!SAME_SCREENS(pWin->drawable, pDst->drawable)) { + rep.sameScreen = xFalse; + rep.child = None; + rep.dstX = rep.dstY = 0; + } + else { + INT16 x, y; + + rep.sameScreen = xTrue; + rep.child = None; + /* computing absolute coordinates -- adjust to destination later */ + x = pWin->drawable.x + stuff->srcX; + y = pWin->drawable.y + stuff->srcY; + pWin = pDst->firstChild; + while (pWin) { + BoxRec box; + + if ((pWin->mapped) && + (x >= pWin->drawable.x - wBorderWidth(pWin)) && + (x < pWin->drawable.x + (int) pWin->drawable.width + + wBorderWidth(pWin)) && + (y >= pWin->drawable.y - wBorderWidth(pWin)) && + (y < pWin->drawable.y + (int) pWin->drawable.height + + wBorderWidth(pWin)) + /* When a window is shaped, a further check + * is made to see if the point is inside + * borderSize + */ + && (!wBoundingShape(pWin) || + RegionContainsPoint(&pWin->borderSize, x, y, &box)) + + && (!wInputShape(pWin) || + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) + ) { + rep.child = pWin->drawable.id; + pWin = (WindowPtr) NULL; + } + else + pWin = pWin->nextSib; + } + /* adjust to destination coordinates */ + rep.dstX = x - pDst->drawable.x; + rep.dstY = y - pDst->drawable.y; + } + WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); + return Success; +} + +int +ProcOpenFont(ClientPtr client) +{ + int err; + + REQUEST(xOpenFontReq); + + REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes); + client->errorValue = stuff->fid; + LEGAL_NEW_RESOURCE(stuff->fid, client); + err = OpenFont(client, stuff->fid, (Mask) 0, + stuff->nbytes, (char *) &stuff[1]); + if (err == Success) { + return Success; + } + else + return err; +} + +int +ProcCloseFont(ClientPtr client) +{ + FontPtr pFont; + int rc; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupResourceByType((pointer *) &pFont, stuff->id, RT_FONT, + client, DixDestroyAccess); + if (rc == Success) { + FreeResource(stuff->id, RT_NONE); + return Success; + } + else { + client->errorValue = stuff->id; + return rc; + } +} + +int +ProcQueryFont(ClientPtr client) +{ + xQueryFontReply *reply; + FontPtr pFont; + int rc; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + { + xCharInfo *pmax = FONTINKMAX(pFont); + xCharInfo *pmin = FONTINKMIN(pFont); + int nprotoxcistructs; + int rlength; + + nprotoxcistructs = (pmax->rightSideBearing == pmin->rightSideBearing && + pmax->leftSideBearing == pmin->leftSideBearing && + pmax->descent == pmin->descent && + pmax->ascent == pmin->ascent && + pmax->characterWidth == pmin->characterWidth) ? + 0 : N2dChars(pFont); + + rlength = sizeof(xQueryFontReply) + + FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) + + nprotoxcistructs * sizeof(xCharInfo); + reply = calloc(1, rlength); + if (!reply) { + return BadAlloc; + } + + reply->type = X_Reply; + reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); + reply->sequenceNumber = client->sequence; + QueryFont(pFont, reply, nprotoxcistructs); + + WriteReplyToClient(client, rlength, reply); + free(reply); + return Success; + } +} + +int +ProcQueryTextExtents(ClientPtr client) +{ + xQueryTextExtentsReply reply; + FontPtr pFont; + ExtentInfoRec info; + unsigned long length; + int rc; + + REQUEST(xQueryTextExtentsReq); + REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq); + + rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + length = client->req_len - bytes_to_int32(sizeof(xQueryTextExtentsReq)); + length = length << 1; + if (stuff->oddLength) { + if (length == 0) + return BadLength; + length--; + } + if (!QueryTextExtents(pFont, length, (unsigned char *) &stuff[1], &info)) + return BadAlloc; + reply = (xQueryTextExtentsReply) { + .type = X_Reply, + .drawDirection = info.drawDirection, + .sequenceNumber = client->sequence, + .length = 0, + .fontAscent = info.fontAscent, + .fontDescent = info.fontDescent, + .overallAscent = info.overallAscent, + .overallDescent = info.overallDescent, + .overallWidth = info.overallWidth, + .overallLeft = info.overallLeft, + .overallRight = info.overallRight + }; + WriteReplyToClient(client, sizeof(xQueryTextExtentsReply), &reply); + return Success; +} + +int +ProcListFonts(ClientPtr client) +{ + REQUEST(xListFontsReq); + + REQUEST_FIXED_SIZE(xListFontsReq, stuff->nbytes); + + return ListFonts(client, (unsigned char *) &stuff[1], stuff->nbytes, + stuff->maxNames); +} + +int +ProcListFontsWithInfo(ClientPtr client) +{ + REQUEST(xListFontsWithInfoReq); + + REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes); + + return StartListFontsWithInfo(client, stuff->nbytes, + (unsigned char *) &stuff[1], stuff->maxNames); +} + +/** + * + * \param value must conform to DeleteType + */ +int +dixDestroyPixmap(pointer value, XID pid) +{ + PixmapPtr pPixmap = (PixmapPtr) value; + + return (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); +} + +int +ProcCreatePixmap(ClientPtr client) +{ + PixmapPtr pMap; + DrawablePtr pDraw; + + REQUEST(xCreatePixmapReq); + DepthPtr pDepth; + int i, rc; + + REQUEST_SIZE_MATCH(xCreatePixmapReq); + client->errorValue = stuff->pid; + LEGAL_NEW_RESOURCE(stuff->pid, client); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixGetAttrAccess); + if (rc != Success) + return rc; + + if (!stuff->width || !stuff->height) { + client->errorValue = 0; + return BadValue; + } + if (stuff->width > 32767 || stuff->height > 32767) { + /* It is allowed to try and allocate a pixmap which is larger than + * 32767 in either dimension. However, all of the framebuffer code + * is buggy and does not reliably draw to such big pixmaps, basically + * because the Region data structure operates with signed shorts + * for the rectangles in it. + * + * Furthermore, several places in the X server computes the + * size in bytes of the pixmap and tries to store it in an + * integer. This integer can overflow and cause the allocated size + * to be much smaller. + * + * So, such big pixmaps are rejected here with a BadAlloc + */ + return BadAlloc; + } + if (stuff->depth != 1) { + pDepth = pDraw->pScreen->allowedDepths; + for (i = 0; i < pDraw->pScreen->numDepths; i++, pDepth++) + if (pDepth->depth == stuff->depth) + goto CreatePmap; + client->errorValue = stuff->depth; + return BadValue; + } + CreatePmap: + pMap = (PixmapPtr) (*pDraw->pScreen->CreatePixmap) + (pDraw->pScreen, stuff->width, stuff->height, stuff->depth, 0); + if (pMap) { + pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pMap->drawable.id = stuff->pid; + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, + pMap, RT_NONE, NULL, DixCreateAccess); + if (rc != Success) { + (*pDraw->pScreen->DestroyPixmap) (pMap); + return rc; + } + if (AddResource(stuff->pid, RT_PIXMAP, (pointer) pMap)) + return Success; + } + return BadAlloc; +} + +int +ProcFreePixmap(ClientPtr client) +{ + PixmapPtr pMap; + int rc; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupResourceByType((pointer *) &pMap, stuff->id, RT_PIXMAP, + client, DixDestroyAccess); + if (rc == Success) { + FreeResource(stuff->id, RT_NONE); + return Success; + } + else { + client->errorValue = stuff->id; + return rc; + } +} + +int +ProcCreateGC(ClientPtr client) +{ + int error, rc; + GC *pGC; + DrawablePtr pDraw; + unsigned len; + + REQUEST(xCreateGCReq); + + REQUEST_AT_LEAST_SIZE(xCreateGCReq); + client->errorValue = stuff->gc; + LEGAL_NEW_RESOURCE(stuff->gc, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixGetAttrAccess); + if (rc != Success) + return rc; + + len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq)); + if (len != Ones(stuff->mask)) + return BadLength; + pGC = (GC *) CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error, + stuff->gc, client); + if (error != Success) + return error; + if (!AddResource(stuff->gc, RT_GC, (pointer) pGC)) + return BadAlloc; + return Success; +} + +int +ProcChangeGC(ClientPtr client) +{ + GC *pGC; + int result; + unsigned len; + + REQUEST(xChangeGCReq); + REQUEST_AT_LEAST_SIZE(xChangeGCReq); + + result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); + if (result != Success) + return result; + + len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq)); + if (len != Ones(stuff->mask)) + return BadLength; + + return ChangeGCXIDs(client, pGC, stuff->mask, (CARD32 *) &stuff[1]); +} + +int +ProcCopyGC(ClientPtr client) +{ + GC *dstGC; + GC *pGC; + int result; + + REQUEST(xCopyGCReq); + REQUEST_SIZE_MATCH(xCopyGCReq); + + result = dixLookupGC(&pGC, stuff->srcGC, client, DixGetAttrAccess); + if (result != Success) + return result; + result = dixLookupGC(&dstGC, stuff->dstGC, client, DixSetAttrAccess); + if (result != Success) + return result; + if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth)) + return BadMatch; + if (stuff->mask & ~GCAllBits) { + client->errorValue = stuff->mask; + return BadValue; + } + return CopyGC(pGC, dstGC, stuff->mask); +} + +int +ProcSetDashes(ClientPtr client) +{ + GC *pGC; + int result; + + REQUEST(xSetDashesReq); + + REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); + if (stuff->nDashes == 0) { + client->errorValue = 0; + return BadValue; + } + + result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); + if (result != Success) + return result; + + /* If there's an error, either there's no sensible errorValue, + * or there was a dash segment of 0. */ + client->errorValue = 0; + return SetDashes(pGC, stuff->dashOffset, stuff->nDashes, + (unsigned char *) &stuff[1]); +} + +int +ProcSetClipRectangles(ClientPtr client) +{ + int nr, result; + GC *pGC; + + REQUEST(xSetClipRectanglesReq); + + REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); + if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) && + (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) { + client->errorValue = stuff->ordering; + return BadValue; + } + result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); + if (result != Success) + return result; + + nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq); + if (nr & 4) + return BadLength; + nr >>= 3; + return SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin, + nr, (xRectangle *) &stuff[1], (int) stuff->ordering); +} + +int +ProcFreeGC(ClientPtr client) +{ + GC *pGC; + int rc; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; + + FreeResource(stuff->id, RT_NONE); + return Success; +} + +int +ProcClearToBackground(ClientPtr client) +{ + REQUEST(xClearAreaReq); + WindowPtr pWin; + int rc; + + REQUEST_SIZE_MATCH(xClearAreaReq); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + if (pWin->drawable.class == InputOnly) { + client->errorValue = stuff->window; + return BadMatch; + } + if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) { + client->errorValue = stuff->exposures; + return BadValue; + } + (*pWin->drawable.pScreen->ClearToBackground) (pWin, stuff->x, stuff->y, + stuff->width, stuff->height, + (Bool) stuff->exposures); + return Success; +} + +int +ProcCopyArea(ClientPtr client) +{ + DrawablePtr pDst; + DrawablePtr pSrc; + GC *pGC; + + REQUEST(xCopyAreaReq); + RegionPtr pRgn; + int rc; + + REQUEST_SIZE_MATCH(xCopyAreaReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); + if (stuff->dstDrawable != stuff->srcDrawable) { + rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { + client->errorValue = stuff->dstDrawable; + return BadMatch; + } + } + else + pSrc = pDst; + + pRgn = (*pGC->ops->CopyArea) (pSrc, pDst, pGC, stuff->srcX, stuff->srcY, + stuff->width, stuff->height, + stuff->dstX, stuff->dstY); + if (pGC->graphicsExposures) { + (*pDst->pScreen->SendGraphicsExpose) + (client, pRgn, stuff->dstDrawable, X_CopyArea, 0); + if (pRgn) + RegionDestroy(pRgn); + } + + return Success; +} + +int +ProcCopyPlane(ClientPtr client) +{ + DrawablePtr psrcDraw, pdstDraw; + GC *pGC; + + REQUEST(xCopyPlaneReq); + RegionPtr pRgn; + int rc; + + REQUEST_SIZE_MATCH(xCopyPlaneReq); + + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); + if (stuff->dstDrawable != stuff->srcDrawable) { + rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + + if (pdstDraw->pScreen != psrcDraw->pScreen) { + client->errorValue = stuff->dstDrawable; + return BadMatch; + } + } + else + psrcDraw = pdstDraw; + + /* Check to see if stuff->bitPlane has exactly ONE good bit set */ + if (stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) || + (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) { + client->errorValue = stuff->bitPlane; + return BadValue; + } + + pRgn = + (*pGC->ops->CopyPlane) (psrcDraw, pdstDraw, pGC, stuff->srcX, + stuff->srcY, stuff->width, stuff->height, + stuff->dstX, stuff->dstY, stuff->bitPlane); + if (pGC->graphicsExposures) { + (*pdstDraw->pScreen->SendGraphicsExpose) + (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); + if (pRgn) + RegionDestroy(pRgn); + } + return Success; +} + +int +ProcPolyPoint(ClientPtr client) +{ + int npoint; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xPolyPointReq); + + REQUEST_AT_LEAST_SIZE(xPolyPointReq); + if ((stuff->coordMode != CoordModeOrigin) && + (stuff->coordMode != CoordModePrevious)) { + client->errorValue = stuff->coordMode; + return BadValue; + } + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq)); + if (npoint) + (*pGC->ops->PolyPoint) (pDraw, pGC, stuff->coordMode, npoint, + (xPoint *) &stuff[1]); + return Success; +} + +int +ProcPolyLine(ClientPtr client) +{ + int npoint; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xPolyLineReq); + + REQUEST_AT_LEAST_SIZE(xPolyLineReq); + if ((stuff->coordMode != CoordModeOrigin) && + (stuff->coordMode != CoordModePrevious)) { + client->errorValue = stuff->coordMode; + return BadValue; + } + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq)); + if (npoint > 1) + (*pGC->ops->Polylines) (pDraw, pGC, stuff->coordMode, npoint, + (DDXPointPtr) &stuff[1]); + return Success; +} + +int +ProcPolySegment(ClientPtr client) +{ + int nsegs; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xPolySegmentReq); + + REQUEST_AT_LEAST_SIZE(xPolySegmentReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); + if (nsegs & 4) + return BadLength; + nsegs >>= 3; + if (nsegs) + (*pGC->ops->PolySegment) (pDraw, pGC, nsegs, (xSegment *) &stuff[1]); + return Success; +} + +int +ProcPolyRectangle(ClientPtr client) +{ + int nrects; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xPolyRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); + if (nrects & 4) + return BadLength; + nrects >>= 3; + if (nrects) + (*pGC->ops->PolyRectangle) (pDraw, pGC, + nrects, (xRectangle *) &stuff[1]); + return Success; +} + +int +ProcPolyArc(ClientPtr client) +{ + int narcs; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xPolyArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyArcReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + narcs = (client->req_len << 2) - sizeof(xPolyArcReq); + if (narcs % sizeof(xArc)) + return BadLength; + narcs /= sizeof(xArc); + if (narcs) + (*pGC->ops->PolyArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]); + return Success; +} + +int +ProcFillPoly(ClientPtr client) +{ + int things; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xFillPolyReq); + + REQUEST_AT_LEAST_SIZE(xFillPolyReq); + if ((stuff->shape != Complex) && (stuff->shape != Nonconvex) && + (stuff->shape != Convex)) { + client->errorValue = stuff->shape; + return BadValue; + } + if ((stuff->coordMode != CoordModeOrigin) && + (stuff->coordMode != CoordModePrevious)) { + client->errorValue = stuff->coordMode; + return BadValue; + } + + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + things = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq)); + if (things) + (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape, + stuff->coordMode, things, + (DDXPointPtr) &stuff[1]); + return Success; +} + +int +ProcPolyFillRectangle(ClientPtr client) +{ + int things; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xPolyFillRectangleReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); + if (things & 4) + return BadLength; + things >>= 3; + + if (things) + (*pGC->ops->PolyFillRect) (pDraw, pGC, things, + (xRectangle *) &stuff[1]); + return Success; +} + +int +ProcPolyFillArc(ClientPtr client) +{ + int narcs; + GC *pGC; + DrawablePtr pDraw; + + REQUEST(xPolyFillArcReq); + + REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); + if (narcs % sizeof(xArc)) + return BadLength; + narcs /= sizeof(xArc); + if (narcs) + (*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]); + return Success; +} + +#ifdef MATCH_CLIENT_ENDIAN + +int +ServerOrder(void) +{ + int whichbyte = 1; + + if (*((char *) &whichbyte)) + return LSBFirst; + return MSBFirst; +} + +#define ClientOrder(client) ((client)->swapped ? !ServerOrder() : ServerOrder()) + +void +ReformatImage(char *base, int nbytes, int bpp, int order) +{ + switch (bpp) { + case 1: /* yuck */ + if (BITMAP_BIT_ORDER != order) + BitOrderInvert((unsigned char *) base, nbytes); +#if IMAGE_BYTE_ORDER != BITMAP_BIT_ORDER && BITMAP_SCANLINE_UNIT != 8 + ReformatImage(base, nbytes, BITMAP_SCANLINE_UNIT, order); +#endif + break; + case 4: + break; /* yuck */ + case 8: + break; + case 16: + if (IMAGE_BYTE_ORDER != order) + TwoByteSwap((unsigned char *) base, nbytes); + break; + case 32: + if (IMAGE_BYTE_ORDER != order) + FourByteSwap((unsigned char *) base, nbytes); + break; + } +} +#else +#define ReformatImage(b,n,bpp,o) +#endif + +/* 64-bit server notes: the protocol restricts padding of images to + * 8-, 16-, or 32-bits. We would like to have 64-bits for the server + * to use internally. Removes need for internal alignment checking. + * All of the PutImage functions could be changed individually, but + * as currently written, they call other routines which require things + * to be 64-bit padded on scanlines, so we changed things here. + * If an image would be padded differently for 64- versus 32-, then + * copy each scanline to a 64-bit padded scanline. + * Also, we need to make sure that the image is aligned on a 64-bit + * boundary, even if the scanlines are padded to our satisfaction. + */ +int +ProcPutImage(ClientPtr client) +{ + GC *pGC; + DrawablePtr pDraw; + long length; /* length of scanline server padded */ + long lengthProto; /* length of scanline protocol padded */ + char *tmpImage; + + REQUEST(xPutImageReq); + + REQUEST_AT_LEAST_SIZE(xPutImageReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + if (stuff->format == XYBitmap) { + if ((stuff->depth != 1) || + (stuff->leftPad >= (unsigned int) screenInfo.bitmapScanlinePad)) + return BadMatch; + length = BitmapBytePad(stuff->width + stuff->leftPad); + } + else if (stuff->format == XYPixmap) { + if ((pDraw->depth != stuff->depth) || + (stuff->leftPad >= (unsigned int) screenInfo.bitmapScanlinePad)) + return BadMatch; + length = BitmapBytePad(stuff->width + stuff->leftPad); + length *= stuff->depth; + } + else if (stuff->format == ZPixmap) { + if ((pDraw->depth != stuff->depth) || (stuff->leftPad != 0)) + return BadMatch; + length = PixmapBytePad(stuff->width, stuff->depth); + } + else { + client->errorValue = stuff->format; + return BadValue; + } + + tmpImage = (char *) &stuff[1]; + lengthProto = length; + + if ((bytes_to_int32(lengthProto * stuff->height) + + bytes_to_int32(sizeof(xPutImageReq))) != client->req_len) + return BadLength; + + ReformatImage(tmpImage, lengthProto * stuff->height, + stuff->format == ZPixmap ? BitsPerPixel(stuff->depth) : 1, + ClientOrder(client)); + + (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY, + stuff->width, stuff->height, + stuff->leftPad, stuff->format, tmpImage); + + return Success; +} + +static int +DoGetImage(ClientPtr client, int format, Drawable drawable, + int x, int y, int width, int height, + Mask planemask) +{ + DrawablePtr pDraw, pBoundingDraw; + int nlines, linesPerBuf, rc; + int linesDone; + + /* coordinates relative to the bounding drawable */ + int relx, rely; + long widthBytesLine, length; + Mask plane = 0; + char *pBuf; + xGetImageReply xgi; + RegionPtr pVisibleRegion = NULL; + + if ((format != XYPixmap) && (format != ZPixmap)) { + client->errorValue = format; + return BadValue; + } + rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + + memset(&xgi, 0, sizeof(xGetImageReply)); + + relx = x; + rely = y; + + if (pDraw->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDraw; + + /* "If the drawable is a window, the window must be viewable ... or a + * BadMatch error results" */ + if (!pWin->viewable) + return BadMatch; + + /* If the drawable is a window, the rectangle must be contained within + * its bounds (including the border). */ + if (x < -wBorderWidth(pWin) || + x + width > wBorderWidth(pWin) + (int) pDraw->width || + y < -wBorderWidth(pWin) || + y + height > wBorderWidth(pWin) + (int) pDraw->height) + return BadMatch; + + relx += pDraw->x; + rely += pDraw->y; + + if (pDraw->pScreen->GetWindowPixmap) { + PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) (pWin); + + pBoundingDraw = &pPix->drawable; +#ifdef COMPOSITE + relx -= pPix->screen_x; + rely -= pPix->screen_y; +#endif + } + else { + pBoundingDraw = (DrawablePtr) pDraw->pScreen->root; + } + + xgi.visual = wVisual(pWin); + } + else { + pBoundingDraw = pDraw; + xgi.visual = None; + } + + /* "If the drawable is a pixmap, the given rectangle must be wholly + * contained within the pixmap, or a BadMatch error results. If the + * drawable is a window [...] it must be the case that if there were no + * inferiors or overlapping windows, the specified rectangle of the window + * would be fully visible on the screen and wholly contained within the + * outside edges of the window, or a BadMatch error results." + * + * We relax the window case slightly to mean that the rectangle must exist + * within the bounds of the window's backing pixmap. In particular, this + * means that a GetImage request may succeed or fail with BadMatch depending + * on whether any of its ancestor windows are redirected. */ + if (relx < 0 || relx + width > (int) pBoundingDraw->width || + rely < 0 || rely + height > (int) pBoundingDraw->height) + return BadMatch; + + xgi.type = X_Reply; + xgi.sequenceNumber = client->sequence; + xgi.depth = pDraw->depth; + if (format == ZPixmap) { + widthBytesLine = PixmapBytePad(width, pDraw->depth); + length = widthBytesLine * height; + + } + else { + widthBytesLine = BitmapBytePad(width); + plane = ((Mask) 1) << (pDraw->depth - 1); + /* only planes asked for */ + length = widthBytesLine * height * + Ones(planemask & (plane | (plane - 1))); + + } + + xgi.length = length; + + xgi.length = bytes_to_int32(xgi.length); + if (widthBytesLine == 0 || height == 0) + linesPerBuf = 0; + else if (widthBytesLine >= IMAGE_BUFSIZE) + linesPerBuf = 1; + else { + linesPerBuf = IMAGE_BUFSIZE / widthBytesLine; + if (linesPerBuf > height) + linesPerBuf = height; + } + length = linesPerBuf * widthBytesLine; + if (linesPerBuf < height) { + /* we have to make sure intermediate buffers don't need padding */ + while ((linesPerBuf > 1) && + (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1))) { + linesPerBuf--; + length -= widthBytesLine; + } + while (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1)) { + linesPerBuf++; + length += widthBytesLine; + } + } + if (!(pBuf = calloc(1, length))) + return BadAlloc; + WriteReplyToClient(client, sizeof(xGetImageReply), &xgi); + + if (pDraw->type == DRAWABLE_WINDOW) { + pVisibleRegion = NotClippedByChildren((WindowPtr) pDraw); + if (pVisibleRegion) { + RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y); + } + } + + if (linesPerBuf == 0) { + /* nothing to do */ + } + else if (format == ZPixmap) { + linesDone = 0; + while (height - linesDone > 0) { + nlines = min(linesPerBuf, height - linesDone); + (*pDraw->pScreen->GetImage) (pDraw, + x, + y + linesDone, + width, + nlines, + format, planemask, (pointer) pBuf); + if (pVisibleRegion) + XaceCensorImage(client, pVisibleRegion, widthBytesLine, + pDraw, x, y + linesDone, width, + nlines, format, pBuf); + + /* Note that this is NOT a call to WriteSwappedDataToClient, + as we do NOT byte swap */ + ReformatImage(pBuf, (int) (nlines * widthBytesLine), + BitsPerPixel(pDraw->depth), ClientOrder(client)); + + WriteToClient(client, (int) (nlines * widthBytesLine), pBuf); + linesDone += nlines; + } + } + else { /* XYPixmap */ + + for (; plane; plane >>= 1) { + if (planemask & plane) { + linesDone = 0; + while (height - linesDone > 0) { + nlines = min(linesPerBuf, height - linesDone); + (*pDraw->pScreen->GetImage) (pDraw, + x, + y + linesDone, + width, + nlines, + format, plane, (pointer) pBuf); + if (pVisibleRegion) + XaceCensorImage(client, pVisibleRegion, + widthBytesLine, + pDraw, x, y + linesDone, width, + nlines, format, pBuf); + + /* Note: NOT a call to WriteSwappedDataToClient, + as we do NOT byte swap */ + ReformatImage(pBuf, (int) (nlines * widthBytesLine), + 1, ClientOrder(client)); + + WriteToClient(client, (int)(nlines * widthBytesLine), pBuf); + linesDone += nlines; + } + } + } + } + if (pVisibleRegion) + RegionDestroy(pVisibleRegion); + free(pBuf); + return Success; +} + +int +ProcGetImage(ClientPtr client) +{ + REQUEST(xGetImageReq); + + REQUEST_SIZE_MATCH(xGetImageReq); + + return DoGetImage(client, stuff->format, stuff->drawable, + stuff->x, stuff->y, + (int) stuff->width, (int) stuff->height, + stuff->planeMask); +} + +int +ProcPolyText(ClientPtr client) +{ + int err; + + REQUEST(xPolyTextReq); + DrawablePtr pDraw; + GC *pGC; + + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + + err = PolyText(client, + pDraw, + pGC, + (unsigned char *) &stuff[1], + ((unsigned char *) stuff) + (client->req_len << 2), + stuff->x, stuff->y, stuff->reqType, stuff->drawable); + + if (err == Success) { + return Success; + } + else + return err; +} + +int +ProcImageText8(ClientPtr client) +{ + int err; + DrawablePtr pDraw; + GC *pGC; + + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + + err = ImageText(client, + pDraw, + pGC, + stuff->nChars, + (unsigned char *) &stuff[1], + stuff->x, stuff->y, stuff->reqType, stuff->drawable); + + if (err == Success) { + return Success; + } + else + return err; +} + +int +ProcImageText16(ClientPtr client) +{ + int err; + DrawablePtr pDraw; + GC *pGC; + + REQUEST(xImageTextReq); + + REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); + + err = ImageText(client, + pDraw, + pGC, + stuff->nChars, + (unsigned char *) &stuff[1], + stuff->x, stuff->y, stuff->reqType, stuff->drawable); + + if (err == Success) { + return Success; + } + else + return err; +} + +int +ProcCreateColormap(ClientPtr client) +{ + VisualPtr pVisual; + ColormapPtr pmap; + Colormap mid; + WindowPtr pWin; + ScreenPtr pScreen; + + REQUEST(xCreateColormapReq); + int i, result; + + REQUEST_SIZE_MATCH(xCreateColormapReq); + + if ((stuff->alloc != AllocNone) && (stuff->alloc != AllocAll)) { + client->errorValue = stuff->alloc; + return BadValue; + } + mid = stuff->mid; + LEGAL_NEW_RESOURCE(mid, client); + result = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (result != Success) + return result; + + pScreen = pWin->drawable.pScreen; + for (i = 0, pVisual = pScreen->visuals; + i < pScreen->numVisuals; i++, pVisual++) { + if (pVisual->vid != stuff->visual) + continue; + return CreateColormap(mid, pScreen, pVisual, &pmap, + (int) stuff->alloc, client->index); + } + client->errorValue = stuff->visual; + return BadMatch; +} + +int +ProcFreeColormap(ClientPtr client) +{ + ColormapPtr pmap; + int rc; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupResourceByType((pointer *) &pmap, stuff->id, RT_COLORMAP, + client, DixDestroyAccess); + if (rc == Success) { + /* Freeing a default colormap is a no-op */ + if (!(pmap->flags & IsDefault)) + FreeResource(stuff->id, RT_NONE); + return Success; + } + else { + client->errorValue = stuff->id; + return rc; + } +} + +int +ProcCopyColormapAndFree(ClientPtr client) +{ + Colormap mid; + ColormapPtr pSrcMap; + + REQUEST(xCopyColormapAndFreeReq); + int rc; + + REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); + mid = stuff->mid; + LEGAL_NEW_RESOURCE(mid, client); + rc = dixLookupResourceByType((pointer *) &pSrcMap, stuff->srcCmap, + RT_COLORMAP, client, + DixReadAccess | DixRemoveAccess); + if (rc == Success) + return CopyColormapAndFree(mid, pSrcMap, client->index); + client->errorValue = stuff->srcCmap; + return rc; +} + +int +ProcInstallColormap(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->id, RT_COLORMAP, + client, DixInstallAccess); + if (rc != Success) + goto out; + + rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); + if (rc != Success) { + if (rc == BadValue) + rc = BadColor; + goto out; + } + + (*(pcmp->pScreen->InstallColormap)) (pcmp); + return Success; + + out: + client->errorValue = stuff->id; + return rc; +} + +int +ProcUninstallColormap(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->id, RT_COLORMAP, + client, DixUninstallAccess); + if (rc != Success) + goto out; + + rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); + if (rc != Success) { + if (rc == BadValue) + rc = BadColor; + goto out; + } + + if (pcmp->mid != pcmp->pScreen->defColormap) + (*(pcmp->pScreen->UninstallColormap)) (pcmp); + return Success; + + out: + client->errorValue = stuff->id; + return rc; +} + +int +ProcListInstalledColormaps(ClientPtr client) +{ + xListInstalledColormapsReply *preply; + int nummaps, rc; + WindowPtr pWin; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, + DixGetAttrAccess); + if (rc != Success) + return rc; + + preply = malloc(sizeof(xListInstalledColormapsReply) + + pWin->drawable.pScreen->maxInstalledCmaps * + sizeof(Colormap)); + if (!preply) + return BadAlloc; + + preply->type = X_Reply; + preply->sequenceNumber = client->sequence; + nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) + (pWin->drawable.pScreen, (Colormap *) &preply[1]); + preply->nColormaps = nummaps; + preply->length = nummaps; + WriteReplyToClient(client, sizeof(xListInstalledColormapsReply), preply); + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]); + free(preply); + return Success; +} + +int +ProcAllocColor(ClientPtr client) +{ + ColormapPtr pmap; + int rc; + + REQUEST(xAllocColorReq); + + REQUEST_SIZE_MATCH(xAllocColorReq); + rc = dixLookupResourceByType((pointer *) &pmap, stuff->cmap, RT_COLORMAP, + client, DixAddAccess); + if (rc == Success) { + xAllocColorReply acr = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .red = stuff->red, + .green = stuff->green, + .blue = stuff->blue, + .pixel = 0 + }; + if ((rc = AllocColor(pmap, &acr.red, &acr.green, &acr.blue, + &acr.pixel, client->index))) + return rc; +#ifdef PANORAMIX + if (noPanoramiXExtension || !pmap->pScreen->myNum) +#endif + WriteReplyToClient(client, sizeof(xAllocColorReply), &acr); + return Success; + + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcAllocNamedColor(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xAllocNamedColorReq); + + REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixAddAccess); + if (rc == Success) { + xAllocNamedColorReply ancr = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0 + }; + if (OsLookupColor + (pcmp->pScreen->myNum, (char *) &stuff[1], stuff->nbytes, + &ancr.exactRed, &ancr.exactGreen, &ancr.exactBlue)) { + ancr.screenRed = ancr.exactRed; + ancr.screenGreen = ancr.exactGreen; + ancr.screenBlue = ancr.exactBlue; + ancr.pixel = 0; + if ((rc = AllocColor(pcmp, + &ancr.screenRed, &ancr.screenGreen, + &ancr.screenBlue, &ancr.pixel, client->index))) + return rc; +#ifdef PANORAMIX + if (noPanoramiXExtension || !pcmp->pScreen->myNum) +#endif + WriteReplyToClient(client, sizeof(xAllocNamedColorReply), + &ancr); + return Success; + } + else + return BadName; + + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcAllocColorCells(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xAllocColorCellsReq); + + REQUEST_SIZE_MATCH(xAllocColorCellsReq); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixAddAccess); + if (rc == Success) { + int npixels, nmasks; + long length; + Pixel *ppixels, *pmasks; + + npixels = stuff->colors; + if (!npixels) { + client->errorValue = npixels; + return BadValue; + } + if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) { + client->errorValue = stuff->contiguous; + return BadValue; + } + nmasks = stuff->planes; + length = ((long) npixels + (long) nmasks) * sizeof(Pixel); + ppixels = malloc(length); + if (!ppixels) + return BadAlloc; + pmasks = ppixels + npixels; + + if ((rc = AllocColorCells(client->index, pcmp, npixels, nmasks, + (Bool) stuff->contiguous, ppixels, pmasks))) { + free(ppixels); + return rc; + } +#ifdef PANORAMIX + if (noPanoramiXExtension || !pcmp->pScreen->myNum) +#endif + { + xAllocColorCellsReply accr = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(length), + .nPixels = npixels, + .nMasks = nmasks + }; + WriteReplyToClient(client, sizeof(xAllocColorCellsReply), &accr); + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, length, ppixels); + } + free(ppixels); + return Success; + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcAllocColorPlanes(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xAllocColorPlanesReq); + + REQUEST_SIZE_MATCH(xAllocColorPlanesReq); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixAddAccess); + if (rc == Success) { + xAllocColorPlanesReply acpr; + int npixels; + long length; + Pixel *ppixels; + + npixels = stuff->colors; + if (!npixels) { + client->errorValue = npixels; + return BadValue; + } + if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) { + client->errorValue = stuff->contiguous; + return BadValue; + } + acpr = (xAllocColorPlanesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .nPixels = npixels + }; + length = (long) npixels *sizeof(Pixel); + + ppixels = malloc(length); + if (!ppixels) + return BadAlloc; + if ((rc = AllocColorPlanes(client->index, pcmp, npixels, + (int) stuff->red, (int) stuff->green, + (int) stuff->blue, (Bool) stuff->contiguous, + ppixels, &acpr.redMask, &acpr.greenMask, + &acpr.blueMask))) { + free(ppixels); + return rc; + } + acpr.length = bytes_to_int32(length); +#ifdef PANORAMIX + if (noPanoramiXExtension || !pcmp->pScreen->myNum) +#endif + { + WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr); + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, length, ppixels); + } + free(ppixels); + return Success; + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcFreeColors(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xFreeColorsReq); + + REQUEST_AT_LEAST_SIZE(xFreeColorsReq); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixRemoveAccess); + if (rc == Success) { + int count; + + if (pcmp->flags & AllAllocated) + return BadAccess; + count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq)); + return FreeColors(pcmp, client->index, count, + (Pixel *) &stuff[1], (Pixel) stuff->planeMask); + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcStoreColors(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xStoreColorsReq); + + REQUEST_AT_LEAST_SIZE(xStoreColorsReq); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixWriteAccess); + if (rc == Success) { + int count; + + count = (client->req_len << 2) - sizeof(xStoreColorsReq); + if (count % sizeof(xColorItem)) + return BadLength; + count /= sizeof(xColorItem); + return StoreColors(pcmp, count, (xColorItem *) &stuff[1], client); + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcStoreNamedColor(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xStoreNamedColorReq); + + REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixWriteAccess); + if (rc == Success) { + xColorItem def; + + if (OsLookupColor(pcmp->pScreen->myNum, (char *) &stuff[1], + stuff->nbytes, &def.red, &def.green, &def.blue)) { + def.flags = stuff->flags; + def.pixel = stuff->pixel; + return StoreColors(pcmp, 1, &def, client); + } + return BadName; + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcQueryColors(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xQueryColorsReq); + + REQUEST_AT_LEAST_SIZE(xQueryColorsReq); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixReadAccess); + if (rc == Success) { + int count; + xrgb *prgbs; + xQueryColorsReply qcr; + + count = + bytes_to_int32((client->req_len << 2) - sizeof(xQueryColorsReq)); + prgbs = calloc(1, count * sizeof(xrgb)); + if (!prgbs && count) + return BadAlloc; + if ((rc = + QueryColors(pcmp, count, (Pixel *) &stuff[1], prgbs, client))) { + free(prgbs); + return rc; + } + qcr = (xQueryColorsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(count * sizeof(xrgb)), + .nColors = count + }; + WriteReplyToClient(client, sizeof(xQueryColorsReply), &qcr); + if (count) { + client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend; + WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs); + } + free(prgbs); + return Success; + + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcLookupColor(ClientPtr client) +{ + ColormapPtr pcmp; + int rc; + + REQUEST(xLookupColorReq); + + REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes); + rc = dixLookupResourceByType((pointer *) &pcmp, stuff->cmap, RT_COLORMAP, + client, DixReadAccess); + if (rc == Success) { + CARD16 exactRed, exactGreen, exactBlue; + + if (OsLookupColor + (pcmp->pScreen->myNum, (char *) &stuff[1], stuff->nbytes, + &exactRed, &exactGreen, &exactBlue)) { + xLookupColorReply lcr = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .exactRed = exactRed, + .exactGreen = exactGreen, + .exactBlue = exactBlue, + .screenRed = exactRed, + .screenGreen = exactGreen, + .screenBlue = exactBlue + }; + (*pcmp->pScreen->ResolveColor) (&lcr.screenRed, + &lcr.screenGreen, + &lcr.screenBlue, pcmp->pVisual); + WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr); + return Success; + } + return BadName; + } + else { + client->errorValue = stuff->cmap; + return rc; + } +} + +int +ProcCreateCursor(ClientPtr client) +{ + CursorPtr pCursor; + PixmapPtr src; + PixmapPtr msk; + unsigned char *srcbits; + unsigned char *mskbits; + unsigned short width, height; + long n; + CursorMetricRec cm; + int rc; + + REQUEST(xCreateCursorReq); + + REQUEST_SIZE_MATCH(xCreateCursorReq); + LEGAL_NEW_RESOURCE(stuff->cid, client); + + rc = dixLookupResourceByType((pointer *) &src, stuff->source, RT_PIXMAP, + client, DixReadAccess); + if (rc != Success) { + client->errorValue = stuff->source; + return rc; + } + + if (src->drawable.depth != 1) + return (BadMatch); + + /* Find and validate cursor mask pixmap, if one is provided */ + if (stuff->mask != None) { + rc = dixLookupResourceByType((pointer *) &msk, stuff->mask, RT_PIXMAP, + client, DixReadAccess); + if (rc != Success) { + client->errorValue = stuff->mask; + return rc; + } + + if (src->drawable.width != msk->drawable.width + || src->drawable.height != msk->drawable.height + || src->drawable.depth != 1 || msk->drawable.depth != 1) + return BadMatch; + } + else + msk = NULL; + + width = src->drawable.width; + height = src->drawable.height; + + if (stuff->x > width || stuff->y > height) + return BadMatch; + + n = BitmapBytePad(width) * height; + srcbits = calloc(1, n); + if (!srcbits) + return BadAlloc; + mskbits = malloc(n); + if (!mskbits) { + free(srcbits); + return BadAlloc; + } + + (*src->drawable.pScreen->GetImage) ((DrawablePtr) src, 0, 0, width, height, + XYPixmap, 1, (pointer) srcbits); + if (msk == (PixmapPtr) NULL) { + unsigned char *bits = mskbits; + + while (--n >= 0) + *bits++ = ~0; + } + else { + /* zeroing the (pad) bits helps some ddx cursor handling */ + memset((char *) mskbits, 0, n); + (*msk->drawable.pScreen->GetImage) ((DrawablePtr) msk, 0, 0, width, + height, XYPixmap, 1, + (pointer) mskbits); + } + cm.width = width; + cm.height = height; + cm.xhot = stuff->x; + cm.yhot = stuff->y; + rc = AllocARGBCursor(srcbits, mskbits, NULL, &cm, + stuff->foreRed, stuff->foreGreen, stuff->foreBlue, + stuff->backRed, stuff->backGreen, stuff->backBlue, + &pCursor, client, stuff->cid); + + if (rc != Success) + goto bail; + if (!AddResource(stuff->cid, RT_CURSOR, (pointer) pCursor)) { + rc = BadAlloc; + goto bail; + } + + return Success; + bail: + free(srcbits); + free(mskbits); + return rc; +} + +int +ProcCreateGlyphCursor(ClientPtr client) +{ + CursorPtr pCursor; + int res; + + REQUEST(xCreateGlyphCursorReq); + + REQUEST_SIZE_MATCH(xCreateGlyphCursorReq); + LEGAL_NEW_RESOURCE(stuff->cid, client); + + res = AllocGlyphCursor(stuff->source, stuff->sourceChar, + stuff->mask, stuff->maskChar, + stuff->foreRed, stuff->foreGreen, stuff->foreBlue, + stuff->backRed, stuff->backGreen, stuff->backBlue, + &pCursor, client, stuff->cid); + if (res != Success) + return res; + if (AddResource(stuff->cid, RT_CURSOR, (pointer) pCursor)) + return Success; + return BadAlloc; +} + +int +ProcFreeCursor(ClientPtr client) +{ + CursorPtr pCursor; + int rc; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupResourceByType((pointer *) &pCursor, stuff->id, RT_CURSOR, + client, DixDestroyAccess); + if (rc == Success) { + FreeResource(stuff->id, RT_NONE); + return Success; + } + else { + client->errorValue = stuff->id; + return rc; + } +} + +int +ProcQueryBestSize(ClientPtr client) +{ + xQueryBestSizeReply reply; + DrawablePtr pDraw; + ScreenPtr pScreen; + int rc; + + REQUEST(xQueryBestSizeReq); + REQUEST_SIZE_MATCH(xQueryBestSizeReq); + + if ((stuff->class != CursorShape) && + (stuff->class != TileShape) && (stuff->class != StippleShape)) { + client->errorValue = stuff->class; + return BadValue; + } + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixGetAttrAccess); + if (rc != Success) + return rc; + if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) + return BadMatch; + pScreen = pDraw->pScreen; + rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); + if (rc != Success) + return rc; + (*pScreen->QueryBestSize) (stuff->class, &stuff->width, + &stuff->height, pScreen); + reply = (xQueryBestSizeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .width = stuff->width, + .height = stuff->height + }; + WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply); + return Success; +} + +int +ProcSetScreenSaver(ClientPtr client) +{ + int rc, i, blankingOption, exposureOption; + + REQUEST(xSetScreenSaverReq); + REQUEST_SIZE_MATCH(xSetScreenSaverReq); + + for (i = 0; i < screenInfo.numScreens; i++) { + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], + DixSetAttrAccess); + if (rc != Success) + return rc; + } + + blankingOption = stuff->preferBlank; + if ((blankingOption != DontPreferBlanking) && + (blankingOption != PreferBlanking) && + (blankingOption != DefaultBlanking)) { + client->errorValue = blankingOption; + return BadValue; + } + exposureOption = stuff->allowExpose; + if ((exposureOption != DontAllowExposures) && + (exposureOption != AllowExposures) && + (exposureOption != DefaultExposures)) { + client->errorValue = exposureOption; + return BadValue; + } + if (stuff->timeout < -1) { + client->errorValue = stuff->timeout; + return BadValue; + } + if (stuff->interval < -1) { + client->errorValue = stuff->interval; + return BadValue; + } + + if (blankingOption == DefaultBlanking) + ScreenSaverBlanking = defaultScreenSaverBlanking; + else + ScreenSaverBlanking = blankingOption; + if (exposureOption == DefaultExposures) + ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; + else + ScreenSaverAllowExposures = exposureOption; + + if (stuff->timeout >= 0) + ScreenSaverTime = stuff->timeout * MILLI_PER_SECOND; + else + ScreenSaverTime = defaultScreenSaverTime; + if (stuff->interval >= 0) + ScreenSaverInterval = stuff->interval * MILLI_PER_SECOND; + else + ScreenSaverInterval = defaultScreenSaverInterval; + + SetScreenSaverTimer(); + return Success; +} + +int +ProcGetScreenSaver(ClientPtr client) +{ + xGetScreenSaverReply rep; + int rc, i; + + REQUEST_SIZE_MATCH(xReq); + + for (i = 0; i < screenInfo.numScreens; i++) { + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], + DixGetAttrAccess); + if (rc != Success) + return rc; + } + + rep = (xGetScreenSaverReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .timeout = ScreenSaverTime / MILLI_PER_SECOND, + .interval = ScreenSaverInterval / MILLI_PER_SECOND, + .preferBlanking = ScreenSaverBlanking, + .allowExposures = ScreenSaverAllowExposures + }; + WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep); + return Success; +} + +int +ProcChangeHosts(ClientPtr client) +{ + REQUEST(xChangeHostsReq); + + REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength); + + if (stuff->mode == HostInsert) + return AddHost(client, (int) stuff->hostFamily, + stuff->hostLength, (pointer) &stuff[1]); + if (stuff->mode == HostDelete) + return RemoveHost(client, (int) stuff->hostFamily, + stuff->hostLength, (pointer) &stuff[1]); + client->errorValue = stuff->mode; + return BadValue; +} + +int +ProcListHosts(ClientPtr client) +{ + xListHostsReply reply; + int len, nHosts, result; + BOOL enabled; + pointer pdata; + + /* REQUEST(xListHostsReq); */ + + REQUEST_SIZE_MATCH(xListHostsReq); + + /* untrusted clients can't list hosts */ + result = XaceHook(XACE_SERVER_ACCESS, client, DixReadAccess); + if (result != Success) + return result; + + result = GetHosts(&pdata, &nHosts, &len, &enabled); + if (result != Success) + return result; + + reply = (xListHostsReply) { + .type = X_Reply, + .enabled = enabled, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(len), + .nHosts = nHosts + }; + WriteReplyToClient(client, sizeof(xListHostsReply), &reply); + if (nHosts) { + client->pSwapReplyFunc = (ReplySwapPtr) SLHostsExtend; + WriteSwappedDataToClient(client, len, pdata); + } + free(pdata); + return Success; +} + +int +ProcChangeAccessControl(ClientPtr client) +{ + REQUEST(xSetAccessControlReq); + + REQUEST_SIZE_MATCH(xSetAccessControlReq); + if ((stuff->mode != EnableAccess) && (stuff->mode != DisableAccess)) { + client->errorValue = stuff->mode; + return BadValue; + } + return ChangeAccessControl(client, stuff->mode == EnableAccess); +} + +/********************* + * CloseDownRetainedResources + * + * Find all clients that are gone and have terminated in RetainTemporary + * and destroy their resources. + *********************/ + +static void +CloseDownRetainedResources(void) +{ + int i; + ClientPtr client; + + for (i = 1; i < currentMaxClients; i++) { + client = clients[i]; + if (client && (client->closeDownMode == RetainTemporary) + && (client->clientGone)) + CloseDownClient(client); + } +} + +int +ProcKillClient(ClientPtr client) +{ + REQUEST(xResourceReq); + ClientPtr killclient; + int rc; + + REQUEST_SIZE_MATCH(xResourceReq); + if (stuff->id == AllTemporary) { + CloseDownRetainedResources(); + return Success; + } + + rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess); + if (rc == Success) { + CloseDownClient(killclient); + /* if an LBX proxy gets killed, isItTimeToYield will be set */ + if (isItTimeToYield || (client == killclient)) { + /* force yield and return Success, so that Dispatch() + * doesn't try to touch client + */ + isItTimeToYield = TRUE; + return Success; + } + return Success; + } + else + return rc; +} + +int +ProcSetFontPath(ClientPtr client) +{ + unsigned char *ptr; + unsigned long nbytes, total; + long nfonts; + int n; + + REQUEST(xSetFontPathReq); + + REQUEST_AT_LEAST_SIZE(xSetFontPathReq); + + nbytes = (client->req_len << 2) - sizeof(xSetFontPathReq); + total = nbytes; + ptr = (unsigned char *) &stuff[1]; + nfonts = stuff->nFonts; + while (--nfonts >= 0) { + if ((total == 0) || (total < (n = (*ptr + 1)))) + return BadLength; + total -= n; + ptr += n; + } + if (total >= 4) + return BadLength; + return SetFontPath(client, stuff->nFonts, (unsigned char *) &stuff[1]); +} + +int +ProcGetFontPath(ClientPtr client) +{ + xGetFontPathReply reply; + int rc, stringLens, numpaths; + unsigned char *bufferStart; + + /* REQUEST (xReq); */ + + REQUEST_SIZE_MATCH(xReq); + rc = GetFontPath(client, &numpaths, &stringLens, &bufferStart); + if (rc != Success) + return rc; + + reply = (xGetFontPathReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(stringLens + numpaths), + .nPaths = numpaths + }; + + WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); + if (stringLens || numpaths) + WriteToClient(client, stringLens + numpaths, bufferStart); + return Success; +} + +int +ProcChangeCloseDownMode(ClientPtr client) +{ + int rc; + + REQUEST(xSetCloseDownModeReq); + REQUEST_SIZE_MATCH(xSetCloseDownModeReq); + + rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess); + if (rc != Success) + return rc; + + if ((stuff->mode == AllTemporary) || + (stuff->mode == RetainPermanent) || (stuff->mode == RetainTemporary)) { + client->closeDownMode = stuff->mode; + return Success; + } + else { + client->errorValue = stuff->mode; + return BadValue; + } +} + +int +ProcForceScreenSaver(ClientPtr client) +{ + int rc; + + REQUEST(xForceScreenSaverReq); + + REQUEST_SIZE_MATCH(xForceScreenSaverReq); + + if ((stuff->mode != ScreenSaverReset) && (stuff->mode != ScreenSaverActive)) { + client->errorValue = stuff->mode; + return BadValue; + } + rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int) stuff->mode); + if (rc != Success) + return rc; + return Success; +} + +int +ProcNoOperation(ClientPtr client) +{ + REQUEST_AT_LEAST_SIZE(xReq); + + /* noop -- don't do anything */ + return Success; +} + +/********************** + * CloseDownClient + * + * Client can either mark his resources destroy or retain. If retained and + * then killed again, the client is really destroyed. + *********************/ + +char dispatchExceptionAtReset = DE_RESET; + +void +CloseDownClient(ClientPtr client) +{ + Bool really_close_down = client->clientGone || + client->closeDownMode == DestroyAll; + + if (!client->clientGone) { + /* ungrab server if grabbing client dies */ + if (grabState != GrabNone && grabClient == client) { + UngrabServer(client); + } + BITCLEAR(grabWaiters, client->index); + DeleteClientFromAnySelections(client); + ReleaseActiveGrabs(client); + DeleteClientFontStuff(client); + if (!really_close_down) { + /* This frees resources that should never be retained + * no matter what the close down mode is. Actually we + * could do this unconditionally, but it's probably + * better not to traverse all the client's resources + * twice (once here, once a few lines down in + * FreeClientResources) in the common case of + * really_close_down == TRUE. + */ + FreeClientNeverRetainResources(client); + client->clientState = ClientStateRetained; + if (ClientStateCallback) { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *) NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer) &clientinfo); + } + } + client->clientGone = TRUE; /* so events aren't sent to client */ + if (ClientIsAsleep(client)) + ClientSignal(client); + ProcessWorkQueueZombies(); + CloseDownConnection(client); + + /* If the client made it to the Running stage, nClients has + * been incremented on its behalf, so we need to decrement it + * now. If it hasn't gotten to Running, nClients has *not* + * been incremented, so *don't* decrement it. + */ + if (client->clientState != ClientStateInitial) { + --nClients; + } + } + + if (really_close_down) { + if (client->clientState == ClientStateRunning && nClients == 0) + dispatchException |= dispatchExceptionAtReset; + + client->clientState = ClientStateGone; + if (ClientStateCallback) { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *) NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer) &clientinfo); + } + TouchListenerGone(client->clientAsMask); + FreeClientResources(client); + /* Disable client ID tracking. This must be done after + * ClientStateCallback. */ + ReleaseClientIds(client); +#ifdef XSERVER_DTRACE + XSERVER_CLIENT_DISCONNECT(client->index); +#endif + if (client->index < nextFreeClientID) + nextFreeClientID = client->index; + clients[client->index] = NullClient; + SmartLastClient = NullClient; + dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); + + while (!clients[currentMaxClients - 1]) + currentMaxClients--; + } +} + +static void +KillAllClients(void) +{ + int i; + + for (i = 1; i < currentMaxClients; i++) + if (clients[i]) { + /* Make sure Retained clients are released. */ + clients[i]->closeDownMode = DestroyAll; + CloseDownClient(clients[i]); + } +} + +void +InitClient(ClientPtr client, int i, pointer ospriv) +{ + client->index = i; + client->clientAsMask = ((Mask) i) << CLIENTOFFSET; + client->closeDownMode = i ? DestroyAll : RetainPermanent; + client->requestVector = InitialVector; + client->osPrivate = ospriv; + QueryMinMaxKeyCodes(&client->minKC, &client->maxKC); + client->smart_start_tick = SmartScheduleTime; + client->smart_stop_tick = SmartScheduleTime; + client->smart_check_tick = SmartScheduleTime; + client->clientIds = NULL; +} + +/************************ + * int NextAvailableClient(ospriv) + * + * OS dependent portion can't assign client id's because of CloseDownModes. + * Returns NULL if there are no free clients. + *************************/ + +ClientPtr +NextAvailableClient(pointer ospriv) +{ + int i; + ClientPtr client; + xReq data; + + i = nextFreeClientID; + if (i == MAXCLIENTS) + return (ClientPtr) NULL; + clients[i] = client = + dixAllocateObjectWithPrivates(ClientRec, PRIVATE_CLIENT); + if (!client) + return (ClientPtr) NULL; + InitClient(client, i, ospriv); + if (!InitClientResources(client)) { + dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); + return (ClientPtr) NULL; + } + data.reqType = 1; + data.length = bytes_to_int32(sz_xReq + sz_xConnClientPrefix); + if (!InsertFakeRequest(client, (char *) &data, sz_xReq)) { + FreeClientResources(client); + dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); + return (ClientPtr) NULL; + } + if (i == currentMaxClients) + currentMaxClients++; + while ((nextFreeClientID < MAXCLIENTS) && clients[nextFreeClientID]) + nextFreeClientID++; + + /* Enable client ID tracking. This must be done before + * ClientStateCallback. */ + ReserveClientIds(client); + + if (ClientStateCallback) { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *) NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer) &clientinfo); + } + return client; +} + +int +ProcInitialConnection(ClientPtr client) +{ + REQUEST(xReq); + xConnClientPrefix *prefix; + int whichbyte = 1; + char order; + + prefix = (xConnClientPrefix *) ((char *)stuff + sz_xReq); + order = prefix->byteOrder; + if (order != 'l' && order != 'B' && order != 'r' && order != 'R') + return client->noClientException = -1; + if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) || + (!(*(char *) &whichbyte) && (order == 'l' || order == 'r'))) { + client->swapped = TRUE; + SwapConnClientPrefix(prefix); + } + stuff->reqType = 2; + stuff->length += bytes_to_int32(prefix->nbytesAuthProto) + + bytes_to_int32(prefix->nbytesAuthString); + if (client->swapped) { + swaps(&stuff->length); + } + if (order == 'r' || order == 'R') { + client->local = FALSE; + } + ResetCurrentRequest(client); + return Success; +} + +static int +SendConnSetup(ClientPtr client, const char *reason) +{ + xWindowRoot *root; + int i; + int numScreens; + char *lConnectionInfo; + xConnSetupPrefix *lconnSetupPrefix; + + if (reason) { + xConnSetupPrefix csp; + + csp.success = xFalse; + csp.lengthReason = strlen(reason); + csp.length = bytes_to_int32(csp.lengthReason); + csp.majorVersion = X_PROTOCOL; + csp.minorVersion = X_PROTOCOL_REVISION; + if (client->swapped) + WriteSConnSetupPrefix(client, &csp); + else + WriteToClient(client, sz_xConnSetupPrefix, &csp); + WriteToClient(client, (int) csp.lengthReason, reason); + return client->noClientException = -1; + } + + numScreens = screenInfo.numScreens; + lConnectionInfo = ConnectionInfo; + lconnSetupPrefix = &connSetupPrefix; + + /* We're about to start speaking X protocol back to the client by + * sending the connection setup info. This means the authorization + * step is complete, and we can count the client as an + * authorized one. + */ + nClients++; + + client->requestVector = client->swapped ? SwappedProcVector : ProcVector; + client->sequence = 0; + ((xConnSetup *) lConnectionInfo)->ridBase = client->clientAsMask; + ((xConnSetup *) lConnectionInfo)->ridMask = RESOURCE_ID_MASK; +#ifdef MATCH_CLIENT_ENDIAN + ((xConnSetup *) lConnectionInfo)->imageByteOrder = ClientOrder(client); + ((xConnSetup *) lConnectionInfo)->bitmapBitOrder = ClientOrder(client); +#endif + /* fill in the "currentInputMask" */ + root = (xWindowRoot *) (lConnectionInfo + connBlockScreenStart); +#ifdef PANORAMIX + if (noPanoramiXExtension) + numScreens = screenInfo.numScreens; + else + numScreens = ((xConnSetup *) ConnectionInfo)->numRoots; +#endif + + for (i = 0; i < numScreens; i++) { + unsigned int j; + xDepth *pDepth; + WindowPtr pRoot = screenInfo.screens[i]->root; + + root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot); + pDepth = (xDepth *) (root + 1); + for (j = 0; j < root->nDepths; j++) { + pDepth = (xDepth *) (((char *) (pDepth + 1)) + + pDepth->nVisuals * sizeof(xVisualType)); + } + root = (xWindowRoot *) pDepth; + } + + if (client->swapped) { + WriteSConnSetupPrefix(client, lconnSetupPrefix); + WriteSConnectionInfo(client, + (unsigned long) (lconnSetupPrefix->length << 2), + lConnectionInfo); + } + else { + WriteToClient(client, sizeof(xConnSetupPrefix), lconnSetupPrefix); + WriteToClient(client, (int) (lconnSetupPrefix->length << 2), + lConnectionInfo); + } + client->clientState = ClientStateRunning; + if (ClientStateCallback) { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = lconnSetupPrefix; + clientinfo.setup = (xConnSetup *) lConnectionInfo; + CallCallbacks((&ClientStateCallback), (pointer) &clientinfo); + } + return Success; +} + +int +ProcEstablishConnection(ClientPtr client) +{ + const char *reason; + char *auth_proto, *auth_string; + xConnClientPrefix *prefix; + + REQUEST(xReq); + + prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq); + auth_proto = (char *) prefix + sz_xConnClientPrefix; + auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto); + if ((prefix->majorVersion != X_PROTOCOL) || + (prefix->minorVersion != X_PROTOCOL_REVISION)) + reason = "Protocol version mismatch"; + else + reason = ClientAuthorized(client, + (unsigned short) prefix->nbytesAuthProto, + auth_proto, + (unsigned short) prefix->nbytesAuthString, + auth_string); + + return (SendConnSetup(client, reason)); +} + +void +SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode, + XID resId, int errorCode) +{ + xError rep = { + .type = X_Error, + .errorCode = errorCode, + .resourceID = resId, + .minorCode = minorCode, + .majorCode = majorCode + }; + + WriteEventsToClient(client, 1, (xEvent *) &rep); +} + +void +MarkClientException(ClientPtr client) +{ + client->noClientException = -1; +} + +/* + * This array encodes the answer to the question "what is the log base 2 + * of the number of pixels that fit in a scanline pad unit?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int answer[6][4] = { + /* pad pad pad pad */ + /* 8 16 32 64 */ + + {3, 4, 5, 6}, /* 1 bit per pixel */ + {1, 2, 3, 4}, /* 4 bits per pixel */ + {0, 1, 2, 3}, /* 8 bits per pixel */ + {~0, 0, 1, 2}, /* 16 bits per pixel */ + {~0, ~0, 0, 1}, /* 24 bits per pixel */ + {~0, ~0, 0, 1} /* 32 bits per pixel */ +}; + +/* + * This array gives the answer to the question "what is the first index for + * the answer array above given the number of bits per pixel?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int indexForBitsPerPixel[33] = { + ~0, 0, ~0, ~0, /* 1 bit per pixel */ + 1, ~0, ~0, ~0, /* 4 bits per pixel */ + 2, ~0, ~0, ~0, /* 8 bits per pixel */ + ~0, ~0, ~0, ~0, + 3, ~0, ~0, ~0, /* 16 bits per pixel */ + ~0, ~0, ~0, ~0, + 4, ~0, ~0, ~0, /* 24 bits per pixel */ + ~0, ~0, ~0, ~0, + 5 /* 32 bits per pixel */ +}; + +/* + * This array gives the bytesperPixel value for cases where the number + * of bits per pixel is a multiple of 8 but not a power of 2. + */ +static int answerBytesPerPixel[33] = { + ~0, 0, ~0, ~0, /* 1 bit per pixel */ + 0, ~0, ~0, ~0, /* 4 bits per pixel */ + 0, ~0, ~0, ~0, /* 8 bits per pixel */ + ~0, ~0, ~0, ~0, + 0, ~0, ~0, ~0, /* 16 bits per pixel */ + ~0, ~0, ~0, ~0, + 3, ~0, ~0, ~0, /* 24 bits per pixel */ + ~0, ~0, ~0, ~0, + 0 /* 32 bits per pixel */ +}; + +/* + * This array gives the answer to the question "what is the second index for + * the answer array above given the number of bits per scanline pad unit?" + * Note that ~0 is an invalid entry (mostly for the benefit of the reader). + */ +static int indexForScanlinePad[65] = { + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 0, ~0, ~0, ~0, /* 8 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + 1, ~0, ~0, ~0, /* 16 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 2, ~0, ~0, ~0, /* 32 bits per scanline pad unit */ + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + ~0, ~0, ~0, ~0, + 3 /* 64 bits per scanline pad unit */ +}; + +/* + grow the array of screenRecs if necessary. + call the device-supplied initialization procedure +with its screen number, a pointer to its ScreenRec, argc, and argv. + return the number of successfully installed screens. + +*/ + +static int init_screen(ScreenPtr pScreen, int i, Bool gpu) +{ + int scanlinepad, format, depth, bitsPerPixel, j, k; + + dixInitScreenSpecificPrivates(pScreen); + + if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) { + return -1; + } + pScreen->myNum = i; + if (gpu) { + pScreen->myNum += GPU_SCREEN_OFFSET; + pScreen->isGPU = TRUE; + } + pScreen->totalPixmapSize = 0; /* computed in CreateScratchPixmapForScreen */ + pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ + pScreen->CreateScreenResources = 0; + + xorg_list_init(&pScreen->pixmap_dirty_list); + xorg_list_init(&pScreen->unattached_list); + xorg_list_init(&pScreen->output_slave_list); + xorg_list_init(&pScreen->offload_slave_list); + + /* + * This loop gets run once for every Screen that gets added, + * but thats ok. If the ddx layer initializes the formats + * one at a time calling AddScreen() after each, then each + * iteration will make it a little more accurate. Worst case + * we do this loop N * numPixmapFormats where N is # of screens. + * Anyway, this must be called after InitOutput and before the + * screen init routine is called. + */ + for (format = 0; format < screenInfo.numPixmapFormats; format++) { + depth = screenInfo.formats[format].depth; + bitsPerPixel = screenInfo.formats[format].bitsPerPixel; + scanlinepad = screenInfo.formats[format].scanlinePad; + j = indexForBitsPerPixel[bitsPerPixel]; + k = indexForScanlinePad[scanlinepad]; + PixmapWidthPaddingInfo[depth].padPixelsLog2 = answer[j][k]; + PixmapWidthPaddingInfo[depth].padRoundUp = + (scanlinepad / bitsPerPixel) - 1; + j = indexForBitsPerPixel[8]; /* bits per byte */ + PixmapWidthPaddingInfo[depth].padBytesLog2 = answer[j][k]; + PixmapWidthPaddingInfo[depth].bitsPerPixel = bitsPerPixel; + if (answerBytesPerPixel[bitsPerPixel]) { + PixmapWidthPaddingInfo[depth].notPower2 = 1; + PixmapWidthPaddingInfo[depth].bytesPerPixel = + answerBytesPerPixel[bitsPerPixel]; + } + else { + PixmapWidthPaddingInfo[depth].notPower2 = 0; + } + } + return 0; +} + +int +AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , + int /*argc */ , + char ** /*argv */ + ), int argc, char **argv) +{ + + int i; + ScreenPtr pScreen; + Bool ret; + + i = screenInfo.numScreens; + if (i == MAXSCREENS) + return -1; + + pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec)); + if (!pScreen) + return -1; + + ret = init_screen(pScreen, i, FALSE); + if (ret != 0) { + free(pScreen); + return ret; + } + /* This is where screen specific stuff gets initialized. Load the + screen structure, call the hardware, whatever. + This is also where the default colormap should be allocated and + also pixel values for blackPixel, whitePixel, and the cursor + Note that InitScreen is NOT allowed to modify argc, argv, or + any of the strings pointed to by argv. They may be passed to + multiple screens. + */ + screenInfo.screens[i] = pScreen; + screenInfo.numScreens++; + if (!(*pfnInit) (pScreen, argc, argv)) { + dixFreeScreenSpecificPrivates(pScreen); + dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); + free(pScreen); + screenInfo.numScreens--; + return -1; + } + + update_desktop_dimensions(); + + dixRegisterScreenPrivateKey(&cursorScreenDevPriv, pScreen, PRIVATE_CURSOR, + 0); + + return i; +} + +int +AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , + int /*argc */ , + char ** /*argv */ + ), + int argc, char **argv) +{ + int i; + ScreenPtr pScreen; + Bool ret; + + i = screenInfo.numGPUScreens; + if (i == MAXGPUSCREENS) + return -1; + + pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec)); + if (!pScreen) + return -1; + + ret = init_screen(pScreen, i, TRUE); + if (ret != 0) { + free(pScreen); + return ret; + } + + /* This is where screen specific stuff gets initialized. Load the + screen structure, call the hardware, whatever. + This is also where the default colormap should be allocated and + also pixel values for blackPixel, whitePixel, and the cursor + Note that InitScreen is NOT allowed to modify argc, argv, or + any of the strings pointed to by argv. They may be passed to + multiple screens. + */ + screenInfo.gpuscreens[i] = pScreen; + screenInfo.numGPUScreens++; + if (!(*pfnInit) (pScreen, argc, argv)) { + dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); + free(pScreen); + screenInfo.numGPUScreens--; + return -1; + } + + update_desktop_dimensions(); + + return i; +} + +void +RemoveGPUScreen(ScreenPtr pScreen) +{ + int idx, j; + if (!pScreen->isGPU) + return; + + idx = pScreen->myNum - GPU_SCREEN_OFFSET; + for (j = idx; j < screenInfo.numGPUScreens - 1; j++) { + screenInfo.gpuscreens[j] = screenInfo.gpuscreens[j + 1]; + screenInfo.gpuscreens[j]->myNum = j + GPU_SCREEN_OFFSET; + } + screenInfo.numGPUScreens--; + + /* this gets freed later in the resource list, but without + * the screen existing it causes crashes - so remove it here */ + if (pScreen->defColormap) + FreeResource(pScreen->defColormap, RT_COLORMAP); + free(pScreen); + +} + +void +AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr new) +{ + assert(new->isGPU); + assert(!new->current_master); + xorg_list_add(&new->unattached_head, &pScreen->unattached_list); + new->current_master = pScreen; +} + +void +DetachUnboundGPU(ScreenPtr slave) +{ + assert(slave->isGPU); + xorg_list_del(&slave->unattached_head); + slave->current_master = NULL; +} + +void +AttachOutputGPU(ScreenPtr pScreen, ScreenPtr new) +{ + assert(new->isGPU); + xorg_list_add(&new->output_head, &pScreen->output_slave_list); + new->current_master = pScreen; +} + +void +DetachOutputGPU(ScreenPtr slave) +{ + assert(slave->isGPU); + xorg_list_del(&slave->output_head); + slave->current_master = NULL; +} + +void +AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr new) +{ + assert(new->isGPU); + xorg_list_add(&new->offload_head, &pScreen->offload_slave_list); + new->current_master = pScreen; +} + +void +DetachOffloadGPU(ScreenPtr slave) +{ + assert(slave->isGPU); + xorg_list_del(&slave->offload_head); + slave->current_master = NULL; +} + diff --git a/dix/dispatch.h b/dix/dispatch.h new file mode 100644 index 0000000..3f3f3a2 --- /dev/null +++ b/dix/dispatch.h @@ -0,0 +1,145 @@ +/************************************************************ + +Copyright 1996 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +/* + * This prototypes the dispatch.c module (except for functions declared in + * global headers), plus related dispatch procedures from devices.c, events.c, + * extension.c, property.c. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef DISPATCH_H +#define DISPATCH_H 1 + +int ProcAllocColor(ClientPtr /* client */ ); +int ProcAllocColorCells(ClientPtr /* client */ ); +int ProcAllocColorPlanes(ClientPtr /* client */ ); +int ProcAllocNamedColor(ClientPtr /* client */ ); +int ProcBell(ClientPtr /* client */ ); +int ProcChangeAccessControl(ClientPtr /* client */ ); +int ProcChangeCloseDownMode(ClientPtr /* client */ ); +int ProcChangeGC(ClientPtr /* client */ ); +int ProcChangeHosts(ClientPtr /* client */ ); +int ProcChangeKeyboardControl(ClientPtr /* client */ ); +int ProcChangeKeyboardMapping(ClientPtr /* client */ ); +int ProcChangePointerControl(ClientPtr /* client */ ); +int ProcChangeProperty(ClientPtr /* client */ ); +int ProcChangeSaveSet(ClientPtr /* client */ ); +int ProcChangeWindowAttributes(ClientPtr /* client */ ); +int ProcCirculateWindow(ClientPtr /* client */ ); +int ProcClearToBackground(ClientPtr /* client */ ); +int ProcCloseFont(ClientPtr /* client */ ); +int ProcConfigureWindow(ClientPtr /* client */ ); +int ProcConvertSelection(ClientPtr /* client */ ); +int ProcCopyArea(ClientPtr /* client */ ); +int ProcCopyColormapAndFree(ClientPtr /* client */ ); +int ProcCopyGC(ClientPtr /* client */ ); +int ProcCopyPlane(ClientPtr /* client */ ); +int ProcCreateColormap(ClientPtr /* client */ ); +int ProcCreateCursor(ClientPtr /* client */ ); +int ProcCreateGC(ClientPtr /* client */ ); +int ProcCreateGlyphCursor(ClientPtr /* client */ ); +int ProcCreatePixmap(ClientPtr /* client */ ); +int ProcCreateWindow(ClientPtr /* client */ ); +int ProcDeleteProperty(ClientPtr /* client */ ); +int ProcDestroySubwindows(ClientPtr /* client */ ); +int ProcDestroyWindow(ClientPtr /* client */ ); +int ProcEstablishConnection(ClientPtr /* client */ ); +int ProcFillPoly(ClientPtr /* client */ ); +int ProcForceScreenSaver(ClientPtr /* client */ ); +int ProcFreeColormap(ClientPtr /* client */ ); +int ProcFreeColors(ClientPtr /* client */ ); +int ProcFreeCursor(ClientPtr /* client */ ); +int ProcFreeGC(ClientPtr /* client */ ); +int ProcFreePixmap(ClientPtr /* client */ ); +int ProcGetAtomName(ClientPtr /* client */ ); +int ProcGetFontPath(ClientPtr /* client */ ); +int ProcGetGeometry(ClientPtr /* client */ ); +int ProcGetImage(ClientPtr /* client */ ); +int ProcGetKeyboardControl(ClientPtr /* client */ ); +int ProcGetKeyboardMapping(ClientPtr /* client */ ); +int ProcGetModifierMapping(ClientPtr /* client */ ); +int ProcGetMotionEvents(ClientPtr /* client */ ); +int ProcGetPointerControl(ClientPtr /* client */ ); +int ProcGetPointerMapping(ClientPtr /* client */ ); +int ProcGetProperty(ClientPtr /* client */ ); +int ProcGetScreenSaver(ClientPtr /* client */ ); +int ProcGetSelectionOwner(ClientPtr /* client */ ); +int ProcGetWindowAttributes(ClientPtr /* client */ ); +int ProcGrabServer(ClientPtr /* client */ ); +int ProcImageText16(ClientPtr /* client */ ); +int ProcImageText8(ClientPtr /* client */ ); +int ProcInitialConnection(ClientPtr /* client */ ); +int ProcInstallColormap(ClientPtr /* client */ ); +int ProcInternAtom(ClientPtr /* client */ ); +int ProcKillClient(ClientPtr /* client */ ); +int ProcListExtensions(ClientPtr /* client */ ); +int ProcListFonts(ClientPtr /* client */ ); +int ProcListFontsWithInfo(ClientPtr /* client */ ); +int ProcListHosts(ClientPtr /* client */ ); +int ProcListInstalledColormaps(ClientPtr /* client */ ); +int ProcListProperties(ClientPtr /* client */ ); +int ProcLookupColor(ClientPtr /* client */ ); +int ProcMapSubwindows(ClientPtr /* client */ ); +int ProcMapWindow(ClientPtr /* client */ ); +int ProcNoOperation(ClientPtr /* client */ ); +int ProcOpenFont(ClientPtr /* client */ ); +int ProcPolyArc(ClientPtr /* client */ ); +int ProcPolyFillArc(ClientPtr /* client */ ); +int ProcPolyFillRectangle(ClientPtr /* client */ ); +int ProcPolyLine(ClientPtr /* client */ ); +int ProcPolyPoint(ClientPtr /* client */ ); +int ProcPolyRectangle(ClientPtr /* client */ ); +int ProcPolySegment(ClientPtr /* client */ ); +int ProcPolyText(ClientPtr /* client */ ); +int ProcPutImage(ClientPtr /* client */ ); +int ProcQueryBestSize(ClientPtr /* client */ ); +int ProcQueryColors(ClientPtr /* client */ ); +int ProcQueryExtension(ClientPtr /* client */ ); +int ProcQueryFont(ClientPtr /* client */ ); +int ProcQueryKeymap(ClientPtr /* client */ ); +int ProcQueryTextExtents(ClientPtr /* client */ ); +int ProcQueryTree(ClientPtr /* client */ ); +int ProcReparentWindow(ClientPtr /* client */ ); +int ProcRotateProperties(ClientPtr /* client */ ); +int ProcSetClipRectangles(ClientPtr /* client */ ); +int ProcSetDashes(ClientPtr /* client */ ); +int ProcSetFontPath(ClientPtr /* client */ ); +int ProcSetModifierMapping(ClientPtr /* client */ ); +int ProcSetPointerMapping(ClientPtr /* client */ ); +int ProcSetScreenSaver(ClientPtr /* client */ ); +int ProcSetSelectionOwner(ClientPtr /* client */ ); +int ProcStoreColors(ClientPtr /* client */ ); +int ProcStoreNamedColor(ClientPtr /* client */ ); +int ProcTranslateCoords(ClientPtr /* client */ ); +int ProcUngrabServer(ClientPtr /* client */ ); +int ProcUninstallColormap(ClientPtr /* client */ ); +int ProcUnmapSubwindows(ClientPtr /* client */ ); +int ProcUnmapWindow(ClientPtr /* client */ ); + +#endif /* DISPATCH_H */ diff --git a/dix/dixfonts.c b/dix/dixfonts.c new file mode 100644 index 0000000..9a686e6 --- /dev/null +++ b/dix/dixfonts.c @@ -0,0 +1,2009 @@ +/************************************************************************ +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +************************************************************************/ +/* The panoramix components contained the following notice */ +/* +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include <X11/Xproto.h> +#include "scrnintstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "cursorstr.h" +#include "misc.h" +#include "opaque.h" +#include "dixfontstr.h" +#include "closestr.h" +#include "dixfont.h" +#include "xace.h" + +#ifdef XF86BIGFONT +#include "xf86bigfontsrv.h" +#endif + +extern pointer fosNaturalParams; +extern FontPtr defaultFont; + +static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0; +static int num_fpes = 0; +static FPEFunctions *fpe_functions = (FPEFunctions *) 0; +static int num_fpe_types = 0; + +static unsigned char *font_path_string; + +static int num_slept_fpes = 0; +static int size_slept_fpes = 0; +static FontPathElementPtr *slept_fpes = (FontPathElementPtr *) 0; +static FontPatternCachePtr patternCache; + +static int +FontToXError(int err) +{ + switch (err) { + case Successful: + return Success; + case AllocError: + return BadAlloc; + case BadFontName: + return BadName; + case BadFontPath: + case BadFontFormat: /* is there something better? */ + case BadCharRange: + return BadValue; + default: + return err; + } +} + +static int +LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size, + unsigned char *data) +{ + if (fpe_functions[pfont->fpe->type].load_glyphs) + return (*fpe_functions[pfont->fpe->type].load_glyphs) + (client, pfont, 0, nchars, item_size, data); + else + return Successful; +} + +void +dixGetGlyphs(FontPtr font, unsigned long count, unsigned char *chars, + FontEncoding fontEncoding, + unsigned long *glyphcount, /* RETURN */ + CharInfoPtr *glyphs) /* RETURN */ +{ + (*font->get_glyphs) (font, count, chars, fontEncoding, glyphcount, glyphs); +} + +/* + * adding RT_FONT prevents conflict with default cursor font + */ +Bool +SetDefaultFont(char *defaultfontname) +{ + int err; + FontPtr pf; + XID fid; + + fid = FakeClientID(0); + err = OpenFont(serverClient, fid, FontLoadAll | FontOpenSync, + (unsigned) strlen(defaultfontname), defaultfontname); + if (err != Success) + return FALSE; + err = dixLookupResourceByType((pointer *) &pf, fid, RT_FONT, serverClient, + DixReadAccess); + if (err != Success) + return FALSE; + defaultFont = pf; + return TRUE; +} + +/* + * note that the font wakeup queue is not refcounted. this is because + * an fpe needs to be added when it's inited, and removed when it's finally + * freed, in order to handle any data that isn't requested, like FS events. + * + * since the only thing that should call these routines is the renderer's + * init_fpe() and free_fpe(), there shouldn't be any problem in using + * freed data. + */ +void +QueueFontWakeup(FontPathElementPtr fpe) +{ + int i; + FontPathElementPtr *new; + + for (i = 0; i < num_slept_fpes; i++) { + if (slept_fpes[i] == fpe) { + return; + } + } + if (num_slept_fpes == size_slept_fpes) { + new = (FontPathElementPtr *) + realloc(slept_fpes, + sizeof(FontPathElementPtr) * (size_slept_fpes + 4)); + if (!new) + return; + slept_fpes = new; + size_slept_fpes += 4; + } + slept_fpes[num_slept_fpes] = fpe; + num_slept_fpes++; +} + +void +RemoveFontWakeup(FontPathElementPtr fpe) +{ + int i, j; + + for (i = 0; i < num_slept_fpes; i++) { + if (slept_fpes[i] == fpe) { + for (j = i; j < num_slept_fpes; j++) { + slept_fpes[j] = slept_fpes[j + 1]; + } + num_slept_fpes--; + return; + } + } +} + +void +FontWakeup(pointer data, int count, pointer LastSelectMask) +{ + int i; + FontPathElementPtr fpe; + + if (count < 0) + return; + /* wake up any fpe's that may be waiting for information */ + for (i = 0; i < num_slept_fpes; i++) { + fpe = slept_fpes[i]; + (void) (*fpe_functions[fpe->type].wakeup_fpe) (fpe, LastSelectMask); + } +} + +/* XXX -- these two funcs may want to be broken into macros */ +static void +UseFPE(FontPathElementPtr fpe) +{ + fpe->refcount++; +} + +static void +FreeFPE(FontPathElementPtr fpe) +{ + fpe->refcount--; + if (fpe->refcount == 0) { + (*fpe_functions[fpe->type].free_fpe) (fpe); + free(fpe->name); + free(fpe); + } +} + +static Bool +doOpenFont(ClientPtr client, OFclosurePtr c) +{ + FontPtr pfont = NullFont; + FontPathElementPtr fpe = NULL; + ScreenPtr pScr; + int err = Successful; + int i; + char *alias, *newname; + int newlen; + int aliascount = 20; + + /* + * Decide at runtime what FontFormat to use. + */ + Mask FontFormat = + ((screenInfo.imageByteOrder == LSBFirst) ? + BitmapFormatByteOrderLSB : BitmapFormatByteOrderMSB) | + ((screenInfo.bitmapBitOrder == LSBFirst) ? + BitmapFormatBitOrderLSB : BitmapFormatBitOrderMSB) | + BitmapFormatImageRectMin | +#if GLYPHPADBYTES == 1 + BitmapFormatScanlinePad8 | +#endif +#if GLYPHPADBYTES == 2 + BitmapFormatScanlinePad16 | +#endif +#if GLYPHPADBYTES == 4 + BitmapFormatScanlinePad32 | +#endif +#if GLYPHPADBYTES == 8 + BitmapFormatScanlinePad64 | +#endif + BitmapFormatScanlineUnit8; + + if (client->clientGone) { + if (c->current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current_fpe]; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } + err = Successful; + goto bail; + } + while (c->current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current_fpe]; + err = (*fpe_functions[fpe->type].open_font) + ((pointer) client, fpe, c->flags, + c->fontname, c->fnamelen, FontFormat, + BitmapFormatMaskByte | + BitmapFormatMaskBit | + BitmapFormatMaskImageRectangle | + BitmapFormatMaskScanLinePad | + BitmapFormatMaskScanLineUnit, + c->fontid, &pfont, &alias, + c->non_cachable_font && c->non_cachable_font->fpe == fpe ? + c->non_cachable_font : (FontPtr) 0); + + if (err == FontNameAlias && alias) { + newlen = strlen(alias); + newname = (char *) realloc(c->fontname, newlen); + if (!newname) { + err = AllocError; + break; + } + memmove(newname, alias, newlen); + c->fontname = newname; + c->fnamelen = newlen; + c->current_fpe = 0; + if (--aliascount <= 0) { + /* We've tried resolving this alias 20 times, we're + * probably stuck in an infinite loop of aliases pointing + * to each other - time to take emergency exit! + */ + err = BadImplementation; + break; + } + continue; + } + if (err == BadFontName) { + c->current_fpe++; + continue; + } + if (err == Suspended) { + if (!ClientIsAsleep(client)) + ClientSleep(client, (ClientSleepProcPtr) doOpenFont, c); + else + goto xinerama_sleep; + return TRUE; + } + break; + } + + if (err != Successful) + goto bail; + if (!pfont) { + err = BadFontName; + goto bail; + } + /* check values for firstCol, lastCol, firstRow, and lastRow */ + if (pfont->info.firstCol > pfont->info.lastCol || + pfont->info.firstRow > pfont->info.lastRow || + pfont->info.lastCol - pfont->info.firstCol > 255) { + err = AllocError; + goto bail; + } + if (!pfont->fpe) + pfont->fpe = fpe; + pfont->refcnt++; + if (pfont->refcnt == 1) { + UseFPE(pfont->fpe); + for (i = 0; i < screenInfo.numScreens; i++) { + pScr = screenInfo.screens[i]; + if (pScr->RealizeFont) { + if (!(*pScr->RealizeFont) (pScr, pfont)) { + CloseFont(pfont, (Font) 0); + err = AllocError; + goto bail; + } + } + } + } + if (!AddResource(c->fontid, RT_FONT, (pointer) pfont)) { + err = AllocError; + goto bail; + } + if (patternCache && pfont != c->non_cachable_font) + CacheFontPattern(patternCache, c->origFontName, c->origFontNameLen, + pfont); + bail: + if (err != Successful && c->client != serverClient) { + SendErrorToClient(c->client, X_OpenFont, 0, + c->fontid, FontToXError(err)); + } + ClientWakeup(c->client); + xinerama_sleep: + for (i = 0; i < c->num_fpes; i++) { + FreeFPE(c->fpe_list[i]); + } + free(c->fpe_list); + free(c->fontname); + free(c); + return TRUE; +} + +int +OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, + char *pfontname) +{ + OFclosurePtr c; + int i; + FontPtr cached = (FontPtr) 0; + + if (!lenfname || lenfname > XLFDMAXFONTNAMELEN) + return BadName; + if (patternCache) { + + /* + ** Check name cache. If we find a cached version of this font that + ** is cachable, immediately satisfy the request with it. If we find + ** a cached version of this font that is non-cachable, we do not + ** satisfy the request with it. Instead, we pass the FontPtr to the + ** FPE's open_font code (the fontfile FPE in turn passes the + ** information to the rasterizer; the fserve FPE ignores it). + ** + ** Presumably, the font is marked non-cachable because the FPE has + ** put some licensing restrictions on it. If the FPE, using + ** whatever logic it relies on, determines that it is willing to + ** share this existing font with the client, then it has the option + ** to return the FontPtr we passed it as the newly-opened font. + ** This allows the FPE to exercise its licensing logic without + ** having to create another instance of a font that already exists. + */ + + cached = FindCachedFontPattern(patternCache, pfontname, lenfname); + if (cached && cached->info.cachable) { + if (!AddResource(fid, RT_FONT, (pointer) cached)) + return BadAlloc; + cached->refcnt++; + return Success; + } + } + c = malloc(sizeof(OFclosureRec)); + if (!c) + return BadAlloc; + c->fontname = malloc(lenfname); + c->origFontName = pfontname; + c->origFontNameLen = lenfname; + if (!c->fontname) { + free(c); + return BadAlloc; + } + /* + * copy the current FPE list, so that if it gets changed by another client + * while we're blocking, the request still appears atomic + */ + c->fpe_list = malloc(sizeof(FontPathElementPtr) * num_fpes); + if (!c->fpe_list) { + free(c->fontname); + free(c); + return BadAlloc; + } + memmove(c->fontname, pfontname, lenfname); + for (i = 0; i < num_fpes; i++) { + c->fpe_list[i] = font_path_elements[i]; + UseFPE(c->fpe_list[i]); + } + c->client = client; + c->fontid = fid; + c->current_fpe = 0; + c->num_fpes = num_fpes; + c->fnamelen = lenfname; + c->flags = flags; + c->non_cachable_font = cached; + + (void) doOpenFont(client, c); + return Success; +} + +/** + * Decrement font's ref count, and free storage if ref count equals zero + * + * \param value must conform to DeleteType + */ +int +CloseFont(pointer value, XID fid) +{ + int nscr; + ScreenPtr pscr; + FontPathElementPtr fpe; + FontPtr pfont = (FontPtr) value; + + if (pfont == NullFont) + return Success; + if (--pfont->refcnt == 0) { + if (patternCache) + RemoveCachedFontPattern(patternCache, pfont); + /* + * since the last reference is gone, ask each screen to free any + * storage it may have allocated locally for it. + */ + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { + pscr = screenInfo.screens[nscr]; + if (pscr->UnrealizeFont) + (*pscr->UnrealizeFont) (pscr, pfont); + } + if (pfont == defaultFont) + defaultFont = NULL; +#ifdef XF86BIGFONT + XF86BigfontFreeFontShm(pfont); +#endif + fpe = pfont->fpe; + (*fpe_functions[fpe->type].close_font) (fpe, pfont); + FreeFPE(fpe); + } + return Success; +} + +/***====================================================================***/ + +/** + * Sets up pReply as the correct QueryFontReply for pFont with the first + * nProtoCCIStructs char infos. + * + * \param pReply caller must allocate this storage + */ +void +QueryFont(FontPtr pFont, xQueryFontReply * pReply, int nProtoCCIStructs) +{ + FontPropPtr pFP; + int r, c, i; + xFontProp *prFP; + xCharInfo *prCI; + xCharInfo *charInfos[256]; + unsigned char chars[512]; + int ninfos; + unsigned long ncols; + unsigned long count; + + /* pr->length set in dispatch */ + pReply->minCharOrByte2 = pFont->info.firstCol; + pReply->defaultChar = pFont->info.defaultCh; + pReply->maxCharOrByte2 = pFont->info.lastCol; + pReply->drawDirection = pFont->info.drawDirection; + pReply->allCharsExist = pFont->info.allExist; + pReply->minByte1 = pFont->info.firstRow; + pReply->maxByte1 = pFont->info.lastRow; + pReply->fontAscent = pFont->info.fontAscent; + pReply->fontDescent = pFont->info.fontDescent; + + pReply->minBounds = pFont->info.ink_minbounds; + pReply->maxBounds = pFont->info.ink_maxbounds; + + pReply->nFontProps = pFont->info.nprops; + pReply->nCharInfos = nProtoCCIStructs; + + for (i = 0, pFP = pFont->info.props, prFP = (xFontProp *) (&pReply[1]); + i < pFont->info.nprops; i++, pFP++, prFP++) { + prFP->name = pFP->name; + prFP->value = pFP->value; + } + + ninfos = 0; + ncols = (unsigned long) (pFont->info.lastCol - pFont->info.firstCol + 1); + prCI = (xCharInfo *) (prFP); + for (r = pFont->info.firstRow; + ninfos < nProtoCCIStructs && r <= (int) pFont->info.lastRow; r++) { + i = 0; + for (c = pFont->info.firstCol; c <= (int) pFont->info.lastCol; c++) { + chars[i++] = r; + chars[i++] = c; + } + (*pFont->get_metrics) (pFont, ncols, chars, + TwoD16Bit, &count, charInfos); + i = 0; + for (i = 0; i < (int) count && ninfos < nProtoCCIStructs; i++) { + *prCI = *charInfos[i]; + prCI++; + ninfos++; + } + } + return; +} + +static Bool +doListFontsAndAliases(ClientPtr client, LFclosurePtr c) +{ + FontPathElementPtr fpe; + int err = Successful; + FontNamesPtr names = NULL; + char *name, *resolved = NULL; + int namelen, resolvedlen; + int nnames; + int stringLens; + int i; + xListFontsReply reply; + char *bufptr; + char *bufferStart; + int aliascount = 0; + + if (client->clientGone) { + if (c->current.current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current.current_fpe]; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } + err = Successful; + goto bail; + } + + if (!c->current.patlen) + goto finish; + + while (c->current.current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current.current_fpe]; + err = Successful; + + if (!fpe_functions[fpe->type].start_list_fonts_and_aliases) { + /* This FPE doesn't support/require list_fonts_and_aliases */ + + err = (*fpe_functions[fpe->type].list_fonts) + ((pointer) c->client, fpe, c->current.pattern, + c->current.patlen, c->current.max_names - c->names->nnames, + c->names); + + if (err == Suspended) { + if (!ClientIsAsleep(client)) + ClientSleep(client, + (ClientSleepProcPtr) doListFontsAndAliases, c); + else + goto xinerama_sleep; + return TRUE; + } + + err = BadFontName; + } + else { + /* Start of list_fonts_and_aliases functionality. Modeled + after list_fonts_with_info in that it resolves aliases, + except that the information collected from FPEs is just + names, not font info. Each list_next_font_or_alias() + returns either a name into name/namelen or an alias into + name/namelen and its target name into resolved/resolvedlen. + The code at this level then resolves the alias by polling + the FPEs. */ + + if (!c->current.list_started) { + err = (*fpe_functions[fpe->type].start_list_fonts_and_aliases) + ((pointer) c->client, fpe, c->current.pattern, + c->current.patlen, c->current.max_names - c->names->nnames, + &c->current.private); + if (err == Suspended) { + if (!ClientIsAsleep(client)) + ClientSleep(client, + (ClientSleepProcPtr) doListFontsAndAliases, + c); + else + goto xinerama_sleep; + return TRUE; + } + if (err == Successful) + c->current.list_started = TRUE; + } + if (err == Successful) { + char *tmpname; + + name = 0; + err = (*fpe_functions[fpe->type].list_next_font_or_alias) + ((pointer) c->client, fpe, &name, &namelen, &tmpname, + &resolvedlen, c->current.private); + if (err == Suspended) { + if (!ClientIsAsleep(client)) + ClientSleep(client, + (ClientSleepProcPtr) doListFontsAndAliases, + c); + else + goto xinerama_sleep; + return TRUE; + } + if (err == FontNameAlias) { + free(resolved); + resolved = malloc(resolvedlen + 1); + if (resolved) + memmove(resolved, tmpname, resolvedlen + 1); + } + } + + if (err == Successful) { + if (c->haveSaved) { + if (c->savedName) + (void) AddFontNamesName(c->names, c->savedName, + c->savedNameLen); + } + else + (void) AddFontNamesName(c->names, name, namelen); + } + + /* + * When we get an alias back, save our state and reset back to + * the start of the FPE looking for the specified name. As + * soon as a real font is found for the alias, pop back to the + * old state + */ + else if (err == FontNameAlias) { + char tmp_pattern[XLFDMAXFONTNAMELEN]; + + /* + * when an alias recurses, we need to give + * the last FPE a chance to clean up; so we call + * it again, and assume that the error returned + * is BadFontName, indicating the alias resolution + * is complete. + */ + memmove(tmp_pattern, resolved, resolvedlen); + if (c->haveSaved) { + char *tmpname; + int tmpnamelen; + + tmpname = 0; + (void) (*fpe_functions[fpe->type].list_next_font_or_alias) + ((pointer) c->client, fpe, &tmpname, &tmpnamelen, + &tmpname, &tmpnamelen, c->current.private); + if (--aliascount <= 0) { + err = BadFontName; + goto ContBadFontName; + } + } + else { + c->saved = c->current; + c->haveSaved = TRUE; + free(c->savedName); + c->savedName = malloc(namelen + 1); + if (c->savedName) + memmove(c->savedName, name, namelen + 1); + c->savedNameLen = namelen; + aliascount = 20; + } + memmove(c->current.pattern, tmp_pattern, resolvedlen); + c->current.patlen = resolvedlen; + c->current.max_names = c->names->nnames + 1; + c->current.current_fpe = -1; + c->current.private = 0; + err = BadFontName; + } + } + /* + * At the end of this FPE, step to the next. If we've finished + * processing an alias, pop state back. If we've collected enough + * font names, quit. + */ + if (err == BadFontName) { + ContBadFontName:; + c->current.list_started = FALSE; + c->current.current_fpe++; + err = Successful; + if (c->haveSaved) { + if (c->names->nnames == c->current.max_names || + c->current.current_fpe == c->num_fpes) { + c->haveSaved = FALSE; + c->current = c->saved; + /* Give the saved namelist a chance to clean itself up */ + continue; + } + } + if (c->names->nnames == c->current.max_names) + break; + } + } + + /* + * send the reply + */ + if (err != Successful) { + SendErrorToClient(client, X_ListFonts, 0, 0, FontToXError(err)); + goto bail; + } + + finish: + + names = c->names; + nnames = names->nnames; + client = c->client; + stringLens = 0; + for (i = 0; i < nnames; i++) + stringLens += (names->length[i] <= 255) ? names->length[i] : 0; + + reply = (xListFontsReply) { + .type = X_Reply, + .length = bytes_to_int32(stringLens + nnames), + .nFonts = nnames, + .sequenceNumber = client->sequence + }; + + bufptr = bufferStart = malloc(reply.length << 2); + + if (!bufptr && reply.length) { + SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc); + goto bail; + } + /* + * since WriteToClient long word aligns things, copy to temp buffer and + * write all at once + */ + for (i = 0; i < nnames; i++) { + if (names->length[i] > 255) + reply.nFonts--; + else { + *bufptr++ = names->length[i]; + memmove(bufptr, names->names[i], names->length[i]); + bufptr += names->length[i]; + } + } + nnames = reply.nFonts; + reply.length = bytes_to_int32(stringLens + nnames); + client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; + WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); + WriteToClient(client, stringLens + nnames, bufferStart); + free(bufferStart); + + bail: + ClientWakeup(client); + xinerama_sleep: + for (i = 0; i < c->num_fpes; i++) + FreeFPE(c->fpe_list[i]); + free(c->fpe_list); + free(c->savedName); + FreeFontNames(names); + free(c); + free(resolved); + return TRUE; +} + +int +ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, + unsigned max_names) +{ + int i; + LFclosurePtr c; + + /* + * The right error to return here would be BadName, however the + * specification does not allow for a Name error on this request. + * Perhaps a better solution would be to return a nil list, i.e. + * a list containing zero fontnames. + */ + if (length > XLFDMAXFONTNAMELEN) + return BadAlloc; + + i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); + if (i != Success) + return i; + + if (!(c = malloc(sizeof *c))) + return BadAlloc; + c->fpe_list = malloc(sizeof(FontPathElementPtr) * num_fpes); + if (!c->fpe_list) { + free(c); + return BadAlloc; + } + c->names = MakeFontNamesRecord(max_names < 100 ? max_names : 100); + if (!c->names) { + free(c->fpe_list); + free(c); + return BadAlloc; + } + memmove(c->current.pattern, pattern, length); + for (i = 0; i < num_fpes; i++) { + c->fpe_list[i] = font_path_elements[i]; + UseFPE(c->fpe_list[i]); + } + c->client = client; + c->num_fpes = num_fpes; + c->current.patlen = length; + c->current.current_fpe = 0; + c->current.max_names = max_names; + c->current.list_started = FALSE; + c->current.private = 0; + c->haveSaved = FALSE; + c->savedName = 0; + doListFontsAndAliases(client, c); + return Success; +} + +int +doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) +{ + FontPathElementPtr fpe; + int err = Successful; + char *name; + int namelen; + int numFonts; + FontInfoRec fontInfo, *pFontInfo; + xListFontsWithInfoReply *reply; + int length; + xFontProp *pFP; + int i; + int aliascount = 0; + xListFontsWithInfoReply finalReply; + + if (client->clientGone) { + if (c->current.current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current.current_fpe]; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } + err = Successful; + goto bail; + } + client->pSwapReplyFunc = ReplySwapVector[X_ListFontsWithInfo]; + if (!c->current.patlen) + goto finish; + while (c->current.current_fpe < c->num_fpes) { + fpe = c->fpe_list[c->current.current_fpe]; + err = Successful; + if (!c->current.list_started) { + err = (*fpe_functions[fpe->type].start_list_fonts_with_info) + (client, fpe, c->current.pattern, c->current.patlen, + c->current.max_names, &c->current.private); + if (err == Suspended) { + if (!ClientIsAsleep(client)) + ClientSleep(client, + (ClientSleepProcPtr) doListFontsWithInfo, c); + else + goto xinerama_sleep; + return TRUE; + } + if (err == Successful) + c->current.list_started = TRUE; + } + if (err == Successful) { + name = 0; + pFontInfo = &fontInfo; + err = (*fpe_functions[fpe->type].list_next_font_with_info) + (client, fpe, &name, &namelen, &pFontInfo, + &numFonts, c->current.private); + if (err == Suspended) { + if (!ClientIsAsleep(client)) + ClientSleep(client, + (ClientSleepProcPtr) doListFontsWithInfo, c); + else + goto xinerama_sleep; + return TRUE; + } + } + /* + * When we get an alias back, save our state and reset back to the + * start of the FPE looking for the specified name. As soon as a real + * font is found for the alias, pop back to the old state + */ + if (err == FontNameAlias) { + /* + * when an alias recurses, we need to give + * the last FPE a chance to clean up; so we call + * it again, and assume that the error returned + * is BadFontName, indicating the alias resolution + * is complete. + */ + if (c->haveSaved) { + char *tmpname; + int tmpnamelen; + FontInfoPtr tmpFontInfo; + + tmpname = 0; + tmpFontInfo = &fontInfo; + (void) (*fpe_functions[fpe->type].list_next_font_with_info) + (client, fpe, &tmpname, &tmpnamelen, &tmpFontInfo, + &numFonts, c->current.private); + if (--aliascount <= 0) { + err = BadFontName; + goto ContBadFontName; + } + } + else { + c->saved = c->current; + c->haveSaved = TRUE; + c->savedNumFonts = numFonts; + free(c->savedName); + c->savedName = malloc(namelen + 1); + if (c->savedName) + memmove(c->savedName, name, namelen + 1); + aliascount = 20; + } + memmove(c->current.pattern, name, namelen); + c->current.patlen = namelen; + c->current.max_names = 1; + c->current.current_fpe = 0; + c->current.private = 0; + c->current.list_started = FALSE; + } + /* + * At the end of this FPE, step to the next. If we've finished + * processing an alias, pop state back. If we've sent enough font + * names, quit. Always wait for BadFontName to let the FPE + * have a chance to clean up. + */ + else if (err == BadFontName) { + ContBadFontName:; + c->current.list_started = FALSE; + c->current.current_fpe++; + err = Successful; + if (c->haveSaved) { + if (c->current.max_names == 0 || + c->current.current_fpe == c->num_fpes) { + c->haveSaved = FALSE; + c->saved.max_names -= (1 - c->current.max_names); + c->current = c->saved; + } + } + else if (c->current.max_names == 0) + break; + } + else if (err == Successful) { + length = sizeof(*reply) + pFontInfo->nprops * sizeof(xFontProp); + reply = c->reply; + if (c->length < length) { + reply = (xListFontsWithInfoReply *) realloc(c->reply, length); + if (!reply) { + err = AllocError; + break; + } + memset((char *) reply + c->length, 0, length - c->length); + c->reply = reply; + c->length = length; + } + if (c->haveSaved) { + numFonts = c->savedNumFonts; + name = c->savedName; + namelen = strlen(name); + } + reply->type = X_Reply; + reply->length = + bytes_to_int32(sizeof *reply - sizeof(xGenericReply) + + pFontInfo->nprops * sizeof(xFontProp) + namelen); + reply->sequenceNumber = client->sequence; + reply->nameLength = namelen; + reply->minBounds = pFontInfo->ink_minbounds; + reply->maxBounds = pFontInfo->ink_maxbounds; + reply->minCharOrByte2 = pFontInfo->firstCol; + reply->maxCharOrByte2 = pFontInfo->lastCol; + reply->defaultChar = pFontInfo->defaultCh; + reply->nFontProps = pFontInfo->nprops; + reply->drawDirection = pFontInfo->drawDirection; + reply->minByte1 = pFontInfo->firstRow; + reply->maxByte1 = pFontInfo->lastRow; + reply->allCharsExist = pFontInfo->allExist; + reply->fontAscent = pFontInfo->fontAscent; + reply->fontDescent = pFontInfo->fontDescent; + reply->nReplies = numFonts; + pFP = (xFontProp *) (reply + 1); + for (i = 0; i < pFontInfo->nprops; i++) { + pFP->name = pFontInfo->props[i].name; + pFP->value = pFontInfo->props[i].value; + pFP++; + } + WriteSwappedDataToClient(client, length, reply); + WriteToClient(client, namelen, name); + if (pFontInfo == &fontInfo) { + free(fontInfo.props); + free(fontInfo.isStringProp); + } + --c->current.max_names; + } + } + finish: + length = sizeof(xListFontsWithInfoReply); + finalReply = (xListFontsWithInfoReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(sizeof(xListFontsWithInfoReply) + - sizeof(xGenericReply)) + }; + WriteSwappedDataToClient(client, length, &finalReply); + bail: + ClientWakeup(client); + xinerama_sleep: + for (i = 0; i < c->num_fpes; i++) + FreeFPE(c->fpe_list[i]); + free(c->reply); + free(c->fpe_list); + free(c->savedName); + free(c); + return TRUE; +} + +int +StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, + int max_names) +{ + int i; + LFWIclosurePtr c; + + /* + * The right error to return here would be BadName, however the + * specification does not allow for a Name error on this request. + * Perhaps a better solution would be to return a nil list, i.e. + * a list containing zero fontnames. + */ + if (length > XLFDMAXFONTNAMELEN) + return BadAlloc; + + i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); + if (i != Success) + return i; + + if (!(c = malloc(sizeof *c))) + goto badAlloc; + c->fpe_list = malloc(sizeof(FontPathElementPtr) * num_fpes); + if (!c->fpe_list) { + free(c); + goto badAlloc; + } + memmove(c->current.pattern, pattern, length); + for (i = 0; i < num_fpes; i++) { + c->fpe_list[i] = font_path_elements[i]; + UseFPE(c->fpe_list[i]); + } + c->client = client; + c->num_fpes = num_fpes; + c->reply = 0; + c->length = 0; + c->current.patlen = length; + c->current.current_fpe = 0; + c->current.max_names = max_names; + c->current.list_started = FALSE; + c->current.private = 0; + c->savedNumFonts = 0; + c->haveSaved = FALSE; + c->savedName = 0; + doListFontsWithInfo(client, c); + return Success; + badAlloc: + return BadAlloc; +} + +#define TextEltHeader 2 +#define FontShiftSize 5 +static ChangeGCVal clearGC[] = { {.ptr = NullPixmap} }; + +#define clearGCmask (GCClipMask) + +int +doPolyText(ClientPtr client, PTclosurePtr c) +{ + FontPtr pFont = c->pGC->font, oldpFont; + int err = Success, lgerr; /* err is in X error, not font error, space */ + enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT; + FontPathElementPtr fpe; + GC *origGC = NULL; + int itemSize = c->reqType == X_PolyText8 ? 1 : 2; + + if (client->clientGone) { + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + + if (ClientIsAsleep(client)) { + /* Client has died, but we cannot bail out right now. We + need to clean up after the work we did when going to + sleep. Setting the drawable pointer to 0 makes this + happen without any attempts to render or perform other + unnecessary activities. */ + c->pDraw = (DrawablePtr) 0; + } + else { + err = Success; + goto bail; + } + } + + /* Make sure our drawable hasn't disappeared while we slept. */ + if (ClientIsAsleep(client) && c->pDraw) { + DrawablePtr pDraw; + + dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); + if (c->pDraw != pDraw) { + /* Our drawable has disappeared. Treat like client died... ask + the FPE code to clean up after client and avoid further + rendering while we clean up after ourself. */ + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + c->pDraw = (DrawablePtr) 0; + } + } + + client_state = ClientIsAsleep(client) ? SLEEPING : NEVER_SLEPT; + + while (c->endReq - c->pElt > TextEltHeader) { + if (*c->pElt == FontChange) { + Font fid; + + if (c->endReq - c->pElt < FontShiftSize) { + err = BadLength; + goto bail; + } + + oldpFont = pFont; + + fid = ((Font) *(c->pElt + 4)) /* big-endian */ + |((Font) *(c->pElt + 3)) << 8 + | ((Font) *(c->pElt + 2)) << 16 | ((Font) *(c->pElt + 1)) << 24; + err = dixLookupResourceByType((pointer *) &pFont, fid, RT_FONT, + client, DixUseAccess); + if (err != Success) { + /* restore pFont for step 4 (described below) */ + pFont = oldpFont; + + /* If we're in START_SLEEP mode, the following step + shortens the request... in the unlikely event that + the fid somehow becomes valid before we come through + again to actually execute the polytext, which would + then mess up our refcounting scheme badly. */ + c->err = err; + c->endReq = c->pElt; + + goto bail; + } + + /* Step 3 (described below) on our new font */ + if (client_state == START_SLEEP) + pFont->refcnt++; + else { + if (pFont != c->pGC->font && c->pDraw) { + ChangeGCVal val; + + val.ptr = pFont; + ChangeGC(NullClient, c->pGC, GCFont, &val); + ValidateGC(c->pDraw, c->pGC); + } + + /* Undo the refcnt++ we performed when going to sleep */ + if (client_state == SLEEPING) + (void) CloseFont(c->pGC->font, (Font) 0); + } + c->pElt += FontShiftSize; + } + else { /* print a string */ + + unsigned char *pNextElt; + + pNextElt = c->pElt + TextEltHeader + (*c->pElt) * itemSize; + if (pNextElt > c->endReq) { + err = BadLength; + goto bail; + } + if (client_state == START_SLEEP) { + c->pElt = pNextElt; + continue; + } + if (c->pDraw) { + lgerr = LoadGlyphs(client, c->pGC->font, *c->pElt, itemSize, + c->pElt + TextEltHeader); + } + else + lgerr = Successful; + + if (lgerr == Suspended) { + if (!ClientIsAsleep(client)) { + int len; + GC *pGC; + PTclosurePtr new_closure; + + /* We're putting the client to sleep. We need to do a few things + to ensure successful and atomic-appearing execution of the + remainder of the request. First, copy the remainder of the + request into a safe malloc'd area. Second, create a scratch GC + to use for the remainder of the request. Third, mark all fonts + referenced in the remainder of the request to prevent their + deallocation. Fourth, make the original GC look like the + request has completed... set its font to the final font value + from this request. These GC manipulations are for the unlikely + (but possible) event that some other client is using the GC. + Steps 3 and 4 are performed by running this procedure through + the remainder of the request in a special no-render mode + indicated by client_state = START_SLEEP. */ + + /* Step 1 */ + /* Allocate a malloc'd closure structure to replace + the local one we were passed */ + new_closure = malloc(sizeof(PTclosureRec)); + if (!new_closure) { + err = BadAlloc; + goto bail; + } + *new_closure = *c; + + len = new_closure->endReq - new_closure->pElt; + new_closure->data = malloc(len); + if (!new_closure->data) { + free(new_closure); + err = BadAlloc; + goto bail; + } + memmove(new_closure->data, new_closure->pElt, len); + new_closure->pElt = new_closure->data; + new_closure->endReq = new_closure->pElt + len; + + /* Step 2 */ + + pGC = + GetScratchGC(new_closure->pGC->depth, + new_closure->pGC->pScreen); + if (!pGC) { + free(new_closure->data); + free(new_closure); + err = BadAlloc; + goto bail; + } + if ((err = CopyGC(new_closure->pGC, pGC, GCFunction | + GCPlaneMask | GCForeground | + GCBackground | GCFillStyle | + GCTile | GCStipple | + GCTileStipXOrigin | + GCTileStipYOrigin | GCFont | + GCSubwindowMode | GCClipXOrigin | + GCClipYOrigin | GCClipMask)) != Success) { + FreeScratchGC(pGC); + free(new_closure->data); + free(new_closure); + err = BadAlloc; + goto bail; + } + c = new_closure; + origGC = c->pGC; + c->pGC = pGC; + ValidateGC(c->pDraw, c->pGC); + + ClientSleep(client, (ClientSleepProcPtr) doPolyText, c); + + /* Set up to perform steps 3 and 4 */ + client_state = START_SLEEP; + continue; /* on to steps 3 and 4 */ + } + else + goto xinerama_sleep; + return TRUE; + } + else if (lgerr != Successful) { + err = FontToXError(lgerr); + goto bail; + } + if (c->pDraw) { + c->xorg += *((INT8 *) (c->pElt + 1)); /* must be signed */ + if (c->reqType == X_PolyText8) + c->xorg = + (*c->pGC->ops->PolyText8) (c->pDraw, c->pGC, c->xorg, + c->yorg, *c->pElt, + (char *) (c->pElt + + TextEltHeader)); + else + c->xorg = + (*c->pGC->ops->PolyText16) (c->pDraw, c->pGC, c->xorg, + c->yorg, *c->pElt, + (unsigned short *) (c-> + pElt + + TextEltHeader)); + } + c->pElt = pNextElt; + } + } + + bail: + + if (client_state == START_SLEEP) { + /* Step 4 */ + if (pFont != origGC->font) { + ChangeGCVal val; + + val.ptr = pFont; + ChangeGC(NullClient, origGC, GCFont, &val); + ValidateGC(c->pDraw, origGC); + } + + /* restore pElt pointer for execution of remainder of the request */ + c->pElt = c->data; + return TRUE; + } + + if (c->err != Success) + err = c->err; + if (err != Success && c->client != serverClient) { +#ifdef PANORAMIX + if (noPanoramiXExtension || !c->pGC->pScreen->myNum) +#endif + SendErrorToClient(c->client, c->reqType, 0, 0, err); + } + if (ClientIsAsleep(client)) { + ClientWakeup(c->client); + 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); + free(c->data); + free(c); + } + return TRUE; +} + +int +PolyText(ClientPtr client, DrawablePtr pDraw, GC * pGC, unsigned char *pElt, + unsigned char *endReq, int xorg, int yorg, int reqType, XID did) +{ + PTclosureRec local_closure; + + local_closure.pElt = pElt; + local_closure.endReq = endReq; + local_closure.client = client; + local_closure.pDraw = pDraw; + local_closure.xorg = xorg; + local_closure.yorg = yorg; + local_closure.reqType = reqType; + local_closure.pGC = pGC; + local_closure.did = did; + local_closure.err = Success; + + (void) doPolyText(client, &local_closure); + return Success; +} + +#undef TextEltHeader +#undef FontShiftSize + +int +doImageText(ClientPtr client, ITclosurePtr c) +{ + int err = Success, lgerr; /* err is in X error, not font error, space */ + FontPathElementPtr fpe; + int itemSize = c->reqType == X_ImageText8 ? 1 : 2; + + if (client->clientGone) { + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + err = Success; + goto bail; + } + + /* Make sure our drawable hasn't disappeared while we slept. */ + if (ClientIsAsleep(client) && c->pDraw) { + DrawablePtr pDraw; + + dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); + if (c->pDraw != pDraw) { + /* Our drawable has disappeared. Treat like client died... ask + the FPE code to clean up after client. */ + fpe = c->pGC->font->fpe; + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + err = Success; + goto bail; + } + } + + lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, itemSize, c->data); + if (lgerr == Suspended) { + if (!ClientIsAsleep(client)) { + GC *pGC; + unsigned char *data; + ITclosurePtr new_closure; + ITclosurePtr old_closure; + + /* We're putting the client to sleep. We need to + save some state. Similar problem to that handled + in doPolyText, but much simpler because the + request structure is much simpler. */ + + new_closure = malloc(sizeof(ITclosureRec)); + if (!new_closure) { + err = BadAlloc; + goto bail; + } + old_closure = c; + *new_closure = *c; + c = new_closure; + + data = malloc(c->nChars * itemSize); + if (!data) { + free(c); + c = old_closure; + err = BadAlloc; + goto bail; + } + memmove(data, c->data, c->nChars * itemSize); + c->data = data; + + pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen); + if (!pGC) { + free(c->data); + free(c); + c = old_closure; + err = BadAlloc; + goto bail; + } + if ((err = CopyGC(c->pGC, pGC, GCFunction | GCPlaneMask | + GCForeground | GCBackground | GCFillStyle | + GCTile | GCStipple | GCTileStipXOrigin | + GCTileStipYOrigin | GCFont | + GCSubwindowMode | GCClipXOrigin | + GCClipYOrigin | GCClipMask)) != Success) { + FreeScratchGC(pGC); + free(c->data); + free(c); + c = old_closure; + err = BadAlloc; + goto bail; + } + c->pGC = pGC; + ValidateGC(c->pDraw, c->pGC); + + ClientSleep(client, (ClientSleepProcPtr) doImageText, c); + } + else + goto xinerama_sleep; + return TRUE; + } + else if (lgerr != Successful) { + err = FontToXError(lgerr); + goto bail; + } + if (c->pDraw) { + if (c->reqType == X_ImageText8) + (*c->pGC->ops->ImageText8) (c->pDraw, c->pGC, c->xorg, c->yorg, + c->nChars, (char *) c->data); + else + (*c->pGC->ops->ImageText16) (c->pDraw, c->pGC, c->xorg, c->yorg, + c->nChars, (unsigned short *) c->data); + } + + bail: + + if (err != Success && c->client != serverClient) { + SendErrorToClient(c->client, c->reqType, 0, 0, err); + } + if (ClientIsAsleep(client)) { + ClientWakeup(c->client); + 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); + free(c->data); + free(c); + } + return TRUE; +} + +int +ImageText(ClientPtr client, DrawablePtr pDraw, GC * pGC, int nChars, + unsigned char *data, int xorg, int yorg, int reqType, XID did) +{ + ITclosureRec local_closure; + + local_closure.client = client; + local_closure.pDraw = pDraw; + local_closure.pGC = pGC; + local_closure.nChars = nChars; + local_closure.data = data; + local_closure.xorg = xorg; + local_closure.yorg = yorg; + local_closure.reqType = reqType; + local_closure.did = did; + + (void) doImageText(client, &local_closure); + return Success; +} + +/* does the necessary magic to figure out the fpe type */ +static int +DetermineFPEType(char *pathname) +{ + int i; + + for (i = 0; i < num_fpe_types; i++) { + if ((*fpe_functions[i].name_check) (pathname)) + return i; + } + return -1; +} + +static void +FreeFontPath(FontPathElementPtr * list, int n, Bool force) +{ + int i; + + for (i = 0; i < n; i++) { + if (force) { + /* Sanity check that all refcounts will be 0 by the time + we get to the end of the list. */ + int found = 1; /* the first reference is us */ + int j; + + for (j = i + 1; j < n; j++) { + if (list[j] == list[i]) + found++; + } + if (list[i]->refcount != found) { + list[i]->refcount = found; /* ensure it will get freed */ + } + } + FreeFPE(list[i]); + } + free(list); +} + +static FontPathElementPtr +find_existing_fpe(FontPathElementPtr * list, int num, unsigned char *name, + int len) +{ + FontPathElementPtr fpe; + int i; + + for (i = 0; i < num; i++) { + fpe = list[i]; + if (fpe->name_length == len && memcmp(name, fpe->name, len) == 0) + return fpe; + } + return (FontPathElementPtr) 0; +} + +static int +SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) +{ + int i, err = 0; + int valid_paths = 0; + unsigned int len; + unsigned char *cp = paths; + FontPathElementPtr fpe = NULL, *fplist; + + fplist = malloc(sizeof(FontPathElementPtr) * npaths); + if (!fplist) { + *bad = 0; + return BadAlloc; + } + for (i = 0; i < num_fpe_types; i++) { + if (fpe_functions[i].set_path_hook) + (*fpe_functions[i].set_path_hook) (); + } + for (i = 0; i < npaths; i++) { + len = (unsigned int) (*cp++); + + if (len == 0) { + if (persist) + ErrorF + ("[dix] Removing empty element from the valid list of fontpaths\n"); + err = BadValue; + } + else { + /* if it's already in our active list, just reset it */ + /* + * note that this can miss FPE's in limbo -- may be worth catching + * them, though it'd muck up refcounting + */ + fpe = find_existing_fpe(font_path_elements, num_fpes, cp, len); + if (fpe) { + err = (*fpe_functions[fpe->type].reset_fpe) (fpe); + if (err == Successful) { + UseFPE(fpe); /* since it'll be decref'd later when freed + * from the old list */ + } + else + fpe = 0; + } + /* if error or can't do it, act like it's a new one */ + if (!fpe) { + fpe = malloc(sizeof(FontPathElementRec)); + if (!fpe) { + err = BadAlloc; + goto bail; + } + fpe->name = malloc(len + 1); + if (!fpe->name) { + free(fpe); + err = BadAlloc; + goto bail; + } + fpe->refcount = 1; + + strncpy(fpe->name, (char *) cp, (int) len); + fpe->name[len] = '\0'; + fpe->name_length = len; + fpe->type = DetermineFPEType(fpe->name); + if (fpe->type == -1) + err = BadValue; + else + err = (*fpe_functions[fpe->type].init_fpe) (fpe); + if (err != Successful) { + if (persist) { + ErrorF + ("[dix] Could not init font path element %s, removing from list!\n", + fpe->name); + } + free(fpe->name); + free(fpe); + } + } + } + if (err != Successful) { + if (!persist) + goto bail; + } + else { + fplist[valid_paths++] = fpe; + } + cp += len; + } + + FreeFontPath(font_path_elements, num_fpes, FALSE); + font_path_elements = fplist; + if (patternCache) + EmptyFontPatternCache(patternCache); + num_fpes = valid_paths; + + return Success; + bail: + *bad = i; + while (--valid_paths >= 0) + FreeFPE(fplist[valid_paths]); + free(fplist); + return FontToXError(err); +} + +int +SetFontPath(ClientPtr client, int npaths, unsigned char *paths) +{ + int err = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); + + if (err != Success) + return err; + + if (npaths == 0) { + if (SetDefaultFontPath(defaultFontPath) != Success) + return BadValue; + } + else { + int bad; + + err = SetFontPathElements(npaths, paths, &bad, FALSE); + client->errorValue = bad; + } + return err; +} + +int +SetDefaultFontPath(char *path) +{ + char *temp_path, *start, *end; + unsigned char *cp, *pp, *nump, *newpath; + int num = 1, len, err, size = 0, bad; + + /* ensure temp_path contains "built-ins" */ + start = path; + while (1) { + start = strstr(start, "built-ins"); + if (start == NULL) + break; + end = start + strlen("built-ins"); + if ((start == path || start[-1] == ',') && (!*end || *end == ',')) + break; + start = end; + } + if (!start) { + if (asprintf(&temp_path, "%s%sbuilt-ins", path, *path ? "," : "") + == -1) + temp_path = NULL; + } + else { + temp_path = strdup(path); + } + if (!temp_path) + return BadAlloc; + + /* get enough for string, plus values -- use up commas */ + len = strlen(temp_path) + 1; + nump = cp = newpath = malloc(len); + if (!newpath) { + free(temp_path); + return BadAlloc; + } + pp = (unsigned char *) temp_path; + cp++; + while (*pp) { + if (*pp == ',') { + *nump = (unsigned char) size; + nump = cp++; + pp++; + num++; + size = 0; + } + else { + *cp++ = *pp++; + size++; + } + } + *nump = (unsigned char) size; + + err = SetFontPathElements(num, newpath, &bad, TRUE); + + free(newpath); + free(temp_path); + + return err; +} + +int +GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result) +{ + int i; + unsigned char *c; + int len; + FontPathElementPtr fpe; + + i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); + if (i != Success) + return i; + + len = 0; + for (i = 0; i < num_fpes; i++) { + fpe = font_path_elements[i]; + len += fpe->name_length + 1; + } + c = realloc(font_path_string, len); + if (c == NULL) { + free(font_path_string); + font_path_string = NULL; + return BadAlloc; + } + + font_path_string = c; + *length = 0; + for (i = 0; i < num_fpes; i++) { + fpe = font_path_elements[i]; + *c = fpe->name_length; + *length += *c++; + memmove(c, fpe->name, fpe->name_length); + c += fpe->name_length; + } + *count = num_fpes; + *result = font_path_string; + return Success; +} + +void +DeleteClientFontStuff(ClientPtr client) +{ + int i; + FontPathElementPtr fpe; + + for (i = 0; i < num_fpes; i++) { + fpe = font_path_elements[i]; + if (fpe_functions[fpe->type].client_died) + (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); + } +} + +void +InitFonts(void) +{ + patternCache = MakeFontPatternCache(); + + register_fpe_functions(); +} + +_X_EXPORT +int +GetDefaultPointSize(void) +{ + return 120; +} + +_X_EXPORT +FontResolutionPtr +GetClientResolutions(int *num) +{ + static struct _FontResolution res; + ScreenPtr pScreen; + + pScreen = screenInfo.screens[0]; + res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth; + /* + * XXX - we'll want this as long as bitmap instances are prevalent + so that we can match them from scalable fonts + */ + if (res.x_resolution < 88) + res.x_resolution = 75; + else + res.x_resolution = 100; + res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight; + if (res.y_resolution < 88) + res.y_resolution = 75; + else + res.y_resolution = 100; + res.point_size = 120; + *num = 1; + return &res; +} + +/* + * returns the type index of the new fpe + * + * should be called (only once!) by each type of fpe when initialized + */ + +_X_EXPORT +int +RegisterFPEFunctions(NameCheckFunc name_func, + InitFpeFunc init_func, + FreeFpeFunc free_func, + ResetFpeFunc reset_func, + OpenFontFunc open_func, + CloseFontFunc close_func, + ListFontsFunc list_func, + StartLfwiFunc start_lfwi_func, + NextLfwiFunc next_lfwi_func, + WakeupFpeFunc wakeup_func, + ClientDiedFunc client_died, + LoadGlyphsFunc load_glyphs, + StartLaFunc start_list_alias_func, + NextLaFunc next_list_alias_func, SetPathFunc set_path_func) +{ + FPEFunctions *new; + + /* grow the list */ + new = (FPEFunctions *) realloc(fpe_functions, + (num_fpe_types + 1) * sizeof(FPEFunctions)); + if (!new) + return -1; + fpe_functions = new; + + fpe_functions[num_fpe_types].name_check = name_func; + fpe_functions[num_fpe_types].open_font = open_func; + fpe_functions[num_fpe_types].close_font = close_func; + fpe_functions[num_fpe_types].wakeup_fpe = wakeup_func; + fpe_functions[num_fpe_types].list_fonts = list_func; + fpe_functions[num_fpe_types].start_list_fonts_with_info = start_lfwi_func; + fpe_functions[num_fpe_types].list_next_font_with_info = next_lfwi_func; + fpe_functions[num_fpe_types].init_fpe = init_func; + fpe_functions[num_fpe_types].free_fpe = free_func; + fpe_functions[num_fpe_types].reset_fpe = reset_func; + fpe_functions[num_fpe_types].client_died = client_died; + fpe_functions[num_fpe_types].load_glyphs = load_glyphs; + fpe_functions[num_fpe_types].start_list_fonts_and_aliases = + start_list_alias_func; + fpe_functions[num_fpe_types].list_next_font_or_alias = next_list_alias_func; + fpe_functions[num_fpe_types].set_path_hook = set_path_func; + + return num_fpe_types++; +} + +void +FreeFonts(void) +{ + if (patternCache) { + FreeFontPatternCache(patternCache); + patternCache = 0; + } + FreeFontPath(font_path_elements, num_fpes, TRUE); + font_path_elements = 0; + num_fpes = 0; + free(fpe_functions); + num_fpe_types = 0; + fpe_functions = (FPEFunctions *) 0; +} + +/* convenience functions for FS interface */ + +FontPtr +find_old_font(XID id) +{ + pointer pFont; + + dixLookupResourceByType(&pFont, id, RT_NONE, serverClient, DixReadAccess); + return (FontPtr) pFont; +} + +_X_EXPORT +Font +GetNewFontClientID(void) +{ + return FakeClientID(0); +} + +_X_EXPORT +int +StoreFontClientFont(FontPtr pfont, Font id) +{ + return AddResource(id, RT_NONE, (pointer) pfont); +} + +_X_EXPORT +void +DeleteFontClientID(Font id) +{ + FreeResource(id, RT_NONE); +} + +_X_EXPORT +int +client_auth_generation(ClientPtr client) +{ + return 0; +} + +static int fs_handlers_installed = 0; +static unsigned int last_server_gen; + +_X_EXPORT +int +init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler) +{ + /* if server has reset, make sure the b&w handlers are reinstalled */ + if (last_server_gen < serverGeneration) { + last_server_gen = serverGeneration; + fs_handlers_installed = 0; + } + if (fs_handlers_installed == 0) { + if (!RegisterBlockAndWakeupHandlers(block_handler, + FontWakeup, (pointer) 0)) + return AllocError; + fs_handlers_installed++; + } + QueueFontWakeup(fpe); + return Successful; +} + +_X_EXPORT +void +remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler, + Bool all) +{ + if (all) { + /* remove the handlers if no one else is using them */ + if (--fs_handlers_installed == 0) { + RemoveBlockAndWakeupHandlers(block_handler, FontWakeup, + (pointer) 0); + } + } + RemoveFontWakeup(fpe); +} diff --git a/dix/dixutils.c b/dix/dixutils.c new file mode 100644 index 0000000..c250bb1 --- /dev/null +++ b/dix/dixutils.c @@ -0,0 +1,869 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* + +(c)Copyright 1988,1991 Adobe Systems Incorporated. All rights reserved. + +Permission to use, copy, modify, distribute, and sublicense this software and its +documentation for any purpose and without fee is hereby granted, provided that +the above copyright notices appear in all copies and that both those copyright +notices and this permission notice appear in supporting documentation and that +the name of Adobe Systems Incorporated not be used in advertising or publicity +pertaining to distribution of the software without specific, written prior +permission. No trademark license to use the Adobe trademarks is hereby +granted. If the Adobe trademark "Display PostScript"(tm) is used to describe +this software, its functionality or for any other purpose, such use shall be +limited to a statement that this software works in conjunction with the Display +PostScript system. Proper trademark attribution to reflect Adobe's ownership +of the trademark shall be given whenever any such reference to the Display +PostScript system is made. + +ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY +PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ADOBE +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- +INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE TO YOU +OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE, STRICT +LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT PROVIDE ANY TRAINING OR OTHER +SUPPORT FOR THE SOFTWARE. + +Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems +Incorporated which may be registered in certain jurisdictions. + +Author: Adobe Systems Incorporated + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include "misc.h" +#include "windowstr.h" +#include "dixstruct.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#define XK_LATIN1 +#include <X11/keysymdef.h> +#include "xace.h" + +/* + * CompareTimeStamps returns -1, 0, or +1 depending on if the first + * argument is less than, equal to or greater than the second argument. + */ + +int +CompareTimeStamps(TimeStamp a, TimeStamp b) +{ + if (a.months < b.months) + return EARLIER; + if (a.months > b.months) + return LATER; + if (a.milliseconds < b.milliseconds) + return EARLIER; + if (a.milliseconds > b.milliseconds) + return LATER; + return SAMETIME; +} + +/* + * convert client times to server TimeStamps + */ + +#define HALFMONTH ((unsigned long) 1<<31) +TimeStamp +ClientTimeToServerTime(CARD32 c) +{ + TimeStamp ts; + + if (c == CurrentTime) + return currentTime; + ts.months = currentTime.months; + ts.milliseconds = c; + if (c > currentTime.milliseconds) { + if (((unsigned long) c - currentTime.milliseconds) > HALFMONTH) + ts.months -= 1; + } + else if (c < currentTime.milliseconds) { + if (((unsigned long) currentTime.milliseconds - c) > HALFMONTH) + ts.months += 1; + } + return ts; +} + +/* + * ISO Latin-1 case conversion routine + * + * this routine always null-terminates the result, so + * beware of too-small buffers + */ + +static unsigned char +ISOLatin1ToLower(unsigned char source) +{ + unsigned char dest; + + if ((source >= XK_A) && (source <= XK_Z)) + dest = source + (XK_a - XK_A); + else if ((source >= XK_Agrave) && (source <= XK_Odiaeresis)) + dest = source + (XK_agrave - XK_Agrave); + else if ((source >= XK_Ooblique) && (source <= XK_Thorn)) + dest = source + (XK_oslash - XK_Ooblique); + else + dest = source; + return dest; +} + +int +CompareISOLatin1Lowered(const unsigned char *s1, int s1len, + const unsigned char *s2, int s2len) +{ + unsigned char c1, c2; + + for (;;) { + /* note -- compare against zero so that -1 ignores len */ + c1 = s1len-- ? *s1++ : '\0'; + c2 = s2len-- ? *s2++ : '\0'; + if (!c1 || + (c1 != c2 && + (c1 = ISOLatin1ToLower(c1)) != (c2 = ISOLatin1ToLower(c2)))) + break; + } + return (int) c1 - (int) c2; +} + +/* + * dixLookupWindow and dixLookupDrawable: + * Look up the window/drawable taking into account the client doing the + * lookup, the type of drawable desired, and the type of access desired. + * Return Success with *pDraw set if the window/drawable exists and the client + * is allowed access, else return an error code with *pDraw set to NULL. The + * access mask values are defined in resource.h. The type mask values are + * defined in pixmap.h, with zero equivalent to M_DRAWABLE. + */ +int +dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, + Mask type, Mask access) +{ + DrawablePtr pTmp; + int rc; + + *pDraw = NULL; + + rc = dixLookupResourceByClass((pointer *) &pTmp, id, RC_DRAWABLE, client, + access); + + if (rc != Success) + client->errorValue = id; + + if (rc == BadValue) + return BadDrawable; + if (rc != Success) + return rc; + if (!((1 << pTmp->type) & (type ? type : M_DRAWABLE))) + return BadMatch; + + *pDraw = pTmp; + return Success; +} + +int +dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) +{ + int rc; + + rc = dixLookupDrawable((DrawablePtr *) pWin, id, client, M_WINDOW, access); + /* dixLookupDrawable returns BadMatch iff id is a valid Drawable + but is not a Window. Users of dixLookupWindow expect a BadWindow + error in this case; they don't care that it's a valid non-Window XID */ + if (rc == BadMatch) + rc = BadWindow; + /* Similarly, users of dixLookupWindow don't want BadDrawable. */ + if (rc == BadDrawable) + rc = BadWindow; + return rc; +} + +int +dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access) +{ + return dixLookupResourceByType((pointer *) pGC, id, RT_GC, client, access); +} + +int +dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access) +{ + int rc; + GC *pGC; + + client->errorValue = id; /* EITHER font or gc */ + rc = dixLookupResourceByType((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 +dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) +{ + pointer pRes; + int rc = BadValue, clientIndex = CLIENT_ID(rid); + + if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT)) + goto bad; + + rc = dixLookupResourceByClass(&pRes, rid, RC_ANY, client, DixGetAttrAccess); + if (rc != Success) + goto bad; + + rc = XaceHook(XACE_CLIENT_ACCESS, client, clients[clientIndex], access); + if (rc != Success) + goto bad; + + *pClient = clients[clientIndex]; + return Success; + bad: + if (client) + client->errorValue = rid; + *pClient = NULL; + return rc; +} + +int +AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, + Bool toRoot, Bool map) +{ + int numnow; + SaveSetElt *pTmp = NULL; + int j; + + numnow = client->numSaved; + j = 0; + if (numnow) { + pTmp = client->saveSet; + while ((j < numnow) && (SaveSetWindow(pTmp[j]) != (pointer) pWin)) + j++; + } + if (mode == SetModeInsert) { + if (j < numnow) /* duplicate */ + return Success; + numnow++; + pTmp = (SaveSetElt *) realloc(client->saveSet, sizeof(*pTmp) * numnow); + if (!pTmp) + return BadAlloc; + client->saveSet = pTmp; + client->numSaved = numnow; + SaveSetAssignWindow(client->saveSet[numnow - 1], pWin); + SaveSetAssignToRoot(client->saveSet[numnow - 1], toRoot); + SaveSetAssignMap(client->saveSet[numnow - 1], map); + return Success; + } + else if ((mode == SetModeDelete) && (j < numnow)) { + while (j < numnow - 1) { + pTmp[j] = pTmp[j + 1]; + j++; + } + numnow--; + if (numnow) { + pTmp = + (SaveSetElt *) realloc(client->saveSet, sizeof(*pTmp) * numnow); + if (pTmp) + client->saveSet = pTmp; + } + else { + free(client->saveSet); + client->saveSet = (SaveSetElt *) NULL; + } + client->numSaved = numnow; + return Success; + } + return Success; +} + +void +DeleteWindowFromAnySaveSet(WindowPtr pWin) +{ + int i; + ClientPtr client; + + for (i = 0; i < currentMaxClients; i++) { + client = clients[i]; + if (client && client->numSaved) + (void) AlterSaveSetForClient(client, pWin, SetModeDelete, FALSE, + TRUE); + } +} + +/* No-op Don't Do Anything : sometimes we need to be able to call a procedure + * that doesn't do anything. For example, on screen with only static + * colormaps, if someone calls install colormap, it's easier to have a dummy + * procedure to call than to check if there's a procedure + */ +void +NoopDDA(void) +{ +} + +typedef struct _BlockHandler { + BlockHandlerProcPtr BlockHandler; + WakeupHandlerProcPtr WakeupHandler; + pointer blockData; + Bool deleted; +} BlockHandlerRec, *BlockHandlerPtr; + +static BlockHandlerPtr handlers; +static int numHandlers; +static int sizeHandlers; +static Bool inHandler; +static Bool handlerDeleted; + +/** + * + * \param pTimeout DIX doesn't want to know how OS represents time + * \param pReadMask nor how it represents the det of descriptors + */ +void +BlockHandler(pointer pTimeout, pointer pReadmask) +{ + int i, j; + + ++inHandler; + for (i = 0; i < screenInfo.numScreens; i++) + (*screenInfo.screens[i]->BlockHandler) (screenInfo.screens[i], + pTimeout, pReadmask); + for (i = 0; i < screenInfo.numGPUScreens; i++) + (*screenInfo.gpuscreens[i]->BlockHandler) (screenInfo.gpuscreens[i], + pTimeout, pReadmask); + for (i = 0; i < numHandlers; i++) + if (!handlers[i].deleted) + (*handlers[i].BlockHandler) (handlers[i].blockData, + pTimeout, pReadmask); + if (handlerDeleted) { + for (i = 0; i < numHandlers;) + if (handlers[i].deleted) { + for (j = i; j < numHandlers - 1; j++) + handlers[j] = handlers[j + 1]; + numHandlers--; + } + else + i++; + handlerDeleted = FALSE; + } + --inHandler; +} + +/** + * + * \param result 32 bits of undefined result from the wait + * \param pReadmask the resulting descriptor mask + */ +void +WakeupHandler(int result, pointer pReadmask) +{ + int i, j; + + ++inHandler; + for (i = numHandlers - 1; i >= 0; i--) + if (!handlers[i].deleted) + (*handlers[i].WakeupHandler) (handlers[i].blockData, + result, pReadmask); + for (i = 0; i < screenInfo.numScreens; i++) + (*screenInfo.screens[i]->WakeupHandler) (screenInfo.screens[i], + result, pReadmask); + for (i = 0; i < screenInfo.numGPUScreens; i++) + (*screenInfo.gpuscreens[i]->WakeupHandler) (screenInfo.gpuscreens[i], + result, pReadmask); + if (handlerDeleted) { + for (i = 0; i < numHandlers;) + if (handlers[i].deleted) { + for (j = i; j < numHandlers - 1; j++) + handlers[j] = handlers[j + 1]; + numHandlers--; + } + else + i++; + handlerDeleted = FALSE; + } + --inHandler; +} + +/** + * Reentrant with BlockHandler and WakeupHandler, except wakeup won't + * get called until next time + */ +Bool +RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler, + WakeupHandlerProcPtr wakeupHandler, + pointer blockData) +{ + BlockHandlerPtr new; + + if (numHandlers >= sizeHandlers) { + new = (BlockHandlerPtr) realloc(handlers, (numHandlers + 1) * + sizeof(BlockHandlerRec)); + if (!new) + return FALSE; + handlers = new; + sizeHandlers = numHandlers + 1; + } + handlers[numHandlers].BlockHandler = blockHandler; + handlers[numHandlers].WakeupHandler = wakeupHandler; + handlers[numHandlers].blockData = blockData; + handlers[numHandlers].deleted = FALSE; + numHandlers = numHandlers + 1; + return TRUE; +} + +void +RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler, + WakeupHandlerProcPtr wakeupHandler, + pointer blockData) +{ + int i; + + for (i = 0; i < numHandlers; i++) + if (handlers[i].BlockHandler == blockHandler && + handlers[i].WakeupHandler == wakeupHandler && + handlers[i].blockData == blockData) { + if (inHandler) { + handlerDeleted = TRUE; + handlers[i].deleted = TRUE; + } + else { + for (; i < numHandlers - 1; i++) + handlers[i] = handlers[i + 1]; + numHandlers--; + } + break; + } +} + +void +InitBlockAndWakeupHandlers(void) +{ + free(handlers); + handlers = (BlockHandlerPtr) 0; + numHandlers = 0; + sizeHandlers = 0; +} + +/* + * A general work queue. Perform some task before the server + * sleeps for input. + */ + +WorkQueuePtr workQueue; +static WorkQueuePtr *workQueueLast = &workQueue; + +void +ProcessWorkQueue(void) +{ + WorkQueuePtr q, *p; + + p = &workQueue; + /* + * Scan the work queue once, calling each function. Those + * which return TRUE are removed from the queue, otherwise + * they will be called again. This must be reentrant with + * QueueWorkProc. + */ + while ((q = *p)) { + if ((*q->function) (q->client, q->closure)) { + /* remove q from the list */ + *p = q->next; /* don't fetch until after func called */ + free(q); + } + else { + p = &q->next; /* don't fetch until after func called */ + } + } + workQueueLast = p; +} + +void +ProcessWorkQueueZombies(void) +{ + WorkQueuePtr q, *p; + + p = &workQueue; + while ((q = *p)) { + if (q->client && q->client->clientGone) { + (void) (*q->function) (q->client, q->closure); + /* remove q from the list */ + *p = q->next; /* don't fetch until after func called */ + free(q); + } + else { + p = &q->next; /* don't fetch until after func called */ + } + } + workQueueLast = p; +} + +Bool +QueueWorkProc(Bool (*function) + (ClientPtr /* pClient */ , pointer /* closure */ ), + ClientPtr client, pointer closure) +{ + WorkQueuePtr q; + + q = malloc(sizeof *q); + if (!q) + return FALSE; + q->function = function; + q->client = client; + q->closure = closure; + q->next = NULL; + *workQueueLast = q; + workQueueLast = &q->next; + return TRUE; +} + +/* + * Manage a queue of sleeping clients, awakening them + * when requested, by using the OS functions IgnoreClient + * and AttendClient. Note that this *ignores* the troubles + * with request data interleaving itself with events, but + * we'll leave that until a later time. + */ + +typedef struct _SleepQueue { + struct _SleepQueue *next; + ClientPtr client; + ClientSleepProcPtr function; + pointer closure; +} SleepQueueRec, *SleepQueuePtr; + +static SleepQueuePtr sleepQueue = NULL; + +Bool +ClientSleep(ClientPtr client, ClientSleepProcPtr function, pointer closure) +{ + SleepQueuePtr q; + + q = malloc(sizeof *q); + if (!q) + return FALSE; + + IgnoreClient(client); + q->next = sleepQueue; + q->client = client; + q->function = function; + q->closure = closure; + sleepQueue = q; + return TRUE; +} + +Bool +ClientSignal(ClientPtr client) +{ + SleepQueuePtr q; + + for (q = sleepQueue; q; q = q->next) + if (q->client == client) { + return QueueWorkProc(q->function, q->client, q->closure); + } + return FALSE; +} + +void +ClientWakeup(ClientPtr client) +{ + SleepQueuePtr q, *prev; + + prev = &sleepQueue; + while ((q = *prev)) { + if (q->client == client) { + *prev = q->next; + free(q); + if (client->clientGone) + /* Oops -- new zombie cleanup code ensures this only + * happens from inside CloseDownClient; don't want to + * recurse here... + */ + /* CloseDownClient(client) */ ; + else + AttendClient(client); + break; + } + prev = &q->next; + } +} + +Bool +ClientIsAsleep(ClientPtr client) +{ + SleepQueuePtr q; + + for (q = sleepQueue; q; q = q->next) + if (q->client == client) + return TRUE; + return FALSE; +} + +/* + * Generic Callback Manager + */ + +/* ===== Private Procedures ===== */ + +static int numCallbackListsToCleanup = 0; +static CallbackListPtr **listsToCleanup = NULL; + +static Bool +_AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) +{ + CallbackPtr cbr; + + cbr = malloc(sizeof(CallbackRec)); + if (!cbr) + return FALSE; + cbr->proc = callback; + cbr->data = data; + cbr->next = (*pcbl)->list; + cbr->deleted = FALSE; + (*pcbl)->list = cbr; + return TRUE; +} + +static Bool +_DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) +{ + CallbackListPtr cbl = *pcbl; + CallbackPtr cbr, pcbr; + + for (pcbr = NULL, cbr = cbl->list; cbr != NULL; pcbr = cbr, cbr = cbr->next) { + if ((cbr->proc == callback) && (cbr->data == data)) + break; + } + if (cbr != NULL) { + if (cbl->inCallback) { + ++(cbl->numDeleted); + cbr->deleted = TRUE; + } + else { + if (pcbr == NULL) + cbl->list = cbr->next; + else + pcbr->next = cbr->next; + free(cbr); + } + return TRUE; + } + return FALSE; +} + +void +_CallCallbacks(CallbackListPtr *pcbl, pointer call_data) +{ + CallbackListPtr cbl = *pcbl; + CallbackPtr cbr, pcbr; + + ++(cbl->inCallback); + for (cbr = cbl->list; cbr != NULL; cbr = cbr->next) { + (*(cbr->proc)) (pcbl, cbr->data, call_data); + } + --(cbl->inCallback); + + if (cbl->inCallback) + return; + + /* Was the entire list marked for deletion? */ + + if (cbl->deleted) { + DeleteCallbackList(pcbl); + return; + } + + /* Were some individual callbacks on the list marked for deletion? + * If so, do the deletions. + */ + + if (cbl->numDeleted) { + for (pcbr = NULL, cbr = cbl->list; (cbr != NULL) && cbl->numDeleted;) { + if (cbr->deleted) { + if (pcbr) { + cbr = cbr->next; + free(pcbr->next); + pcbr->next = cbr; + } + else { + cbr = cbr->next; + free(cbl->list); + cbl->list = cbr; + } + cbl->numDeleted--; + } + else { /* this one wasn't deleted */ + + pcbr = cbr; + cbr = cbr->next; + } + } + } +} + +static void +_DeleteCallbackList(CallbackListPtr *pcbl) +{ + CallbackListPtr cbl = *pcbl; + CallbackPtr cbr, nextcbr; + int i; + + if (cbl->inCallback) { + cbl->deleted = TRUE; + return; + } + + for (i = 0; i < numCallbackListsToCleanup; i++) { + if (listsToCleanup[i] == pcbl) { + listsToCleanup[i] = NULL; + break; + } + } + + for (cbr = cbl->list; cbr != NULL; cbr = nextcbr) { + nextcbr = cbr->next; + free(cbr); + } + free(cbl); + *pcbl = NULL; +} + +static Bool +CreateCallbackList(CallbackListPtr *pcbl) +{ + CallbackListPtr cbl; + int i; + + if (!pcbl) + return FALSE; + cbl = malloc(sizeof(CallbackListRec)); + if (!cbl) + return FALSE; + cbl->inCallback = 0; + cbl->deleted = FALSE; + cbl->numDeleted = 0; + cbl->list = NULL; + *pcbl = cbl; + + for (i = 0; i < numCallbackListsToCleanup; i++) { + if (!listsToCleanup[i]) { + listsToCleanup[i] = pcbl; + return TRUE; + } + } + + listsToCleanup = (CallbackListPtr **) xnfrealloc(listsToCleanup, + sizeof(CallbackListPtr *) * + (numCallbackListsToCleanup + + 1)); + listsToCleanup[numCallbackListsToCleanup] = pcbl; + numCallbackListsToCleanup++; + return TRUE; +} + +/* ===== Public Procedures ===== */ + +Bool +AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) +{ + if (!pcbl) + return FALSE; + if (!*pcbl) { /* list hasn't been created yet; go create it */ + if (!CreateCallbackList(pcbl)) + return FALSE; + } + return _AddCallback(pcbl, callback, data); +} + +Bool +DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) +{ + if (!pcbl || !*pcbl) + return FALSE; + return _DeleteCallback(pcbl, callback, data); +} + +void +DeleteCallbackList(CallbackListPtr *pcbl) +{ + if (!pcbl || !*pcbl) + return; + _DeleteCallbackList(pcbl); +} + +void +DeleteCallbackManager(void) +{ + int i; + + for (i = 0; i < numCallbackListsToCleanup; i++) { + DeleteCallbackList(listsToCleanup[i]); + } + free(listsToCleanup); + + numCallbackListsToCleanup = 0; + listsToCleanup = NULL; +} + +void +InitCallbackManager(void) +{ + DeleteCallbackManager(); +} diff --git a/dix/enterleave.c b/dix/enterleave.c new file mode 100644 index 0000000..54f4b85 --- /dev/null +++ b/dix/enterleave.c @@ -0,0 +1,1558 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/extensions/XI2.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XI2proto.h> +#include "inputstr.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "exglobals.h" +#include "enterleave.h" +#include "eventconvert.h" +#include "xkbsrv.h" +#include "inpututils.h" + +/** + * @file + * This file describes the model for sending core enter/leave events and + * focus in/out in the case of multiple pointers/keyboard foci. + * + * Since we can't send more than one Enter or Leave/Focus in or out event per + * window to a core client without confusing it, this is a rather complicated + * approach. + * + * For a full description of the enter/leave model from a window's + * perspective, see + * http://lists.freedesktop.org/archives/xorg/2008-August/037606.html + * + * For a full description of the focus in/out model from a window's + * perspective, see + * http://lists.freedesktop.org/archives/xorg/2008-December/041740.html + * + * Additional notes: + * - The core protocol spec says that "In a LeaveNotify event, if a child of the + * event window contains the initial position of the pointer, then the child + * component is set to that child. Otherwise, it is None. For an EnterNotify + * event, if a child of the event window contains the final pointer position, + * then the child component is set to that child. Otherwise, it is None." + * + * By inference, this means that only NotifyVirtual or NotifyNonlinearVirtual + * events may have a subwindow set to other than None. + * + * - NotifyPointer events may be sent if the focus changes from window A to + * B. The assumption used in this model is that NotifyPointer events are only + * sent for the pointer paired with the keyboard that is involved in the focus + * events. For example, if F(W) changes because of keyboard 2, then + * NotifyPointer events are only sent for pointer 2. + */ + +static WindowPtr PointerWindows[MAXDEVICES]; +static WindowPtr FocusWindows[MAXDEVICES]; + +/** + * Return TRUE if 'win' has a pointer within its boundaries, excluding child + * window. + */ +static BOOL +HasPointer(DeviceIntPtr dev, WindowPtr win) +{ + int i; + + /* FIXME: The enter/leave model does not cater for grabbed devices. For + * now, a quickfix: if the device about to send an enter/leave event to + * a window is grabbed, assume there is no pointer in that window. + * Fixes fdo 27804. + * There isn't enough beer in my fridge to fix this properly. + */ + if (dev->deviceGrab.grab) + return FALSE; + + for (i = 0; i < MAXDEVICES; i++) + if (PointerWindows[i] == win) + return TRUE; + + return FALSE; +} + +/** + * Return TRUE if at least one keyboard focus is set to 'win' (excluding + * descendants of win). + */ +static BOOL +HasFocus(WindowPtr win) +{ + int i; + + for (i = 0; i < MAXDEVICES; i++) + if (FocusWindows[i] == win) + return TRUE; + + return FALSE; +} + +/** + * Return the window the device dev is currently on. + */ +static WindowPtr +PointerWin(DeviceIntPtr dev) +{ + return PointerWindows[dev->id]; +} + +/** + * Search for the first window below 'win' that has a pointer directly within + * it's boundaries (excluding boundaries of its own descendants). + * + * @return The child window that has the pointer within its boundaries or + * NULL. + */ +static WindowPtr +FirstPointerChild(WindowPtr win) +{ + int i; + + for (i = 0; i < MAXDEVICES; i++) { + if (PointerWindows[i] && IsParent(win, PointerWindows[i])) + return PointerWindows[i]; + } + + return NULL; +} + +/** + * Search for the first window below 'win' that has a focus directly within + * it's boundaries (excluding boundaries of its own descendants). + * + * @return The child window that has the pointer within its boundaries or + * NULL. + */ +static WindowPtr +FirstFocusChild(WindowPtr win) +{ + int i; + + for (i = 0; i < MAXDEVICES; i++) { + if (FocusWindows[i] && FocusWindows[i] != PointerRootWin && + IsParent(win, FocusWindows[i])) + return FocusWindows[i]; + } + + return NULL; +} + +/** + * Set the presence flag for dev to mark that it is now in 'win'. + */ +void +EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode) +{ + PointerWindows[dev->id] = win; +} + +/** + * Unset the presence flag for dev to mark that it is not in 'win' anymore. + */ +void +LeaveWindow(DeviceIntPtr dev) +{ + PointerWindows[dev->id] = NULL; +} + +/** + * Set the presence flag for dev to mark that it is now in 'win'. + */ +void +SetFocusIn(DeviceIntPtr dev, WindowPtr win) +{ + FocusWindows[dev->id] = win; +} + +/** + * Unset the presence flag for dev to mark that it is not in 'win' anymore. + */ +void +SetFocusOut(DeviceIntPtr dev) +{ + FocusWindows[dev->id] = NULL; +} + +/** + * Return the common ancestor of 'a' and 'b' (if one exists). + * @param a A window with the same ancestor as b. + * @param b A window with the same ancestor as a. + * @return The window that is the first ancestor of both 'a' and 'b', or the + * NullWindow if they do not have a common ancestor. + */ +WindowPtr +CommonAncestor(WindowPtr a, WindowPtr b) +{ + for (b = b->parent; b; b = b->parent) + if (IsParent(b, a)) + return b; + return NullWindow; +} + +/** + * Send enter notifies to all windows between 'ancestor' and 'child' (excluding + * both). Events are sent running up the window hierarchy. This function + * recurses. + */ +static void +DeviceEnterNotifies(DeviceIntPtr dev, + int sourceid, + WindowPtr ancestor, WindowPtr child, int mode, int detail) +{ + WindowPtr parent = child->parent; + + if (ancestor == parent) + return; + DeviceEnterNotifies(dev, sourceid, ancestor, parent, mode, detail); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, detail, parent, + child->drawable.id); +} + +/** + * Send enter notifies to all windows between 'ancestor' and 'child' (excluding + * both). Events are sent running down the window hierarchy. This function + * recurses. + */ +static void +CoreEnterNotifies(DeviceIntPtr dev, + WindowPtr ancestor, WindowPtr child, int mode, int detail) +{ + WindowPtr parent = child->parent; + + if (ancestor == parent) + return; + CoreEnterNotifies(dev, ancestor, parent, mode, detail); + + /* Case 3: + A is above W, B is a descendant + + Classically: The move generates an EnterNotify on W with a detail of + Virtual or NonlinearVirtual + + MPX: + Case 3A: There is at least one other pointer on W itself + P(W) doesn't change, so the event should be suppressed + Case 3B: Otherwise, if there is at least one other pointer in a + descendant + P(W) stays on the same descendant, or changes to a different + descendant. The event should be suppressed. + Case 3C: Otherwise: + P(W) moves from a window above W to a descendant. The subwindow + field is set to the child containing the descendant. The detail + may need to be changed from Virtual to NonlinearVirtual depending + on the previous P(W). */ + + if (!HasPointer(dev, parent) && !FirstPointerChild(parent)) + CoreEnterLeaveEvent(dev, EnterNotify, mode, detail, parent, + child->drawable.id); +} + +static void +CoreLeaveNotifies(DeviceIntPtr dev, + WindowPtr child, WindowPtr ancestor, int mode, int detail) +{ + WindowPtr win; + + if (ancestor == child) + return; + + for (win = child->parent; win != ancestor; win = win->parent) { + /*Case 7: + A is a descendant of W, B is above W + + Classically: A LeaveNotify is generated on W with a detail of Virtual + or NonlinearVirtual. + + MPX: + Case 3A: There is at least one other pointer on W itself + P(W) doesn't change, the event should be suppressed. + Case 3B: Otherwise, if there is at least one other pointer in a + descendant + P(W) stays on the same descendant, or changes to a different + descendant. The event should be suppressed. + Case 3C: Otherwise: + P(W) changes from the descendant of W to a window above W. + The detail may need to be changed from Virtual to NonlinearVirtual + or vice-versa depending on the new P(W). */ + + /* If one window has a pointer or a child with a pointer, skip some + * work and exit. */ + if (HasPointer(dev, win) || FirstPointerChild(win)) + return; + + CoreEnterLeaveEvent(dev, LeaveNotify, mode, detail, win, + child->drawable.id); + + child = win; + } +} + +/** + * Send leave notifies to all windows between 'child' and 'ancestor'. + * Events are sent running up the hierarchy. + */ +static void +DeviceLeaveNotifies(DeviceIntPtr dev, + int sourceid, + WindowPtr child, WindowPtr ancestor, int mode, int detail) +{ + WindowPtr win; + + if (ancestor == child) + return; + for (win = child->parent; win != ancestor; win = win->parent) { + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, detail, win, + child->drawable.id); + child = win; + } +} + +/** + * Pointer dev moves from A to B and A neither a descendant of B nor is + * B a descendant of A. + */ +static void +CoreEnterLeaveNonLinear(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) +{ + WindowPtr X = CommonAncestor(A, B); + + /* Case 4: + A is W, B is above W + + Classically: The move generates a LeaveNotify on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 3A: There is at least one other pointer on W itself + P(W) doesn't change, the event should be suppressed + Case 3B: Otherwise, if there is at least one other pointer in a + descendant of W + P(W) changes from W to a descendant of W. The subwindow field + is set to the child containing the new P(W), the detail field + is set to Inferior + Case 3C: Otherwise: + The pointer window moves from W to a window above W. + The detail may need to be changed from Ancestor to Nonlinear or + vice versa depending on the the new P(W) + */ + + if (!HasPointer(dev, A)) { + WindowPtr child = FirstPointerChild(A); + + if (child) + CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, + None); + else + CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyNonlinear, A, + None); + } + + CoreLeaveNotifies(dev, A, X, mode, NotifyNonlinearVirtual); + + /* + Case 9: + A is a descendant of W, B is a descendant of W + + Classically: No events are generated on W + MPX: The pointer window stays the same or moves to a different + descendant of W. No events should be generated on W. + + Therefore, no event to X. + */ + + CoreEnterNotifies(dev, X, B, mode, NotifyNonlinearVirtual); + + /* Case 2: + A is above W, B=W + + Classically: The move generates an EnterNotify on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 2A: There is at least one other pointer on W itself + P(W) doesn't change, so the event should be suppressed + Case 2B: Otherwise, if there is at least one other pointer in a + descendant + P(W) moves from a descendant to W. detail is changed to Inferior, + subwindow is set to the child containing the previous P(W) + Case 2C: Otherwise: + P(W) changes from a window above W to W itself. + The detail may need to be changed from Ancestor to Nonlinear + or vice-versa depending on the previous P(W). */ + + if (!HasPointer(dev, B)) { + WindowPtr child = FirstPointerChild(B); + + if (child) + CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, + None); + else + CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyNonlinear, B, + None); + } +} + +/** + * Pointer dev moves from A to B and A is a descendant of B. + */ +static void +CoreEnterLeaveToAncestor(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) +{ + /* Case 4: + A is W, B is above W + + Classically: The move generates a LeaveNotify on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 3A: There is at least one other pointer on W itself + P(W) doesn't change, the event should be suppressed + Case 3B: Otherwise, if there is at least one other pointer in a + descendant of W + P(W) changes from W to a descendant of W. The subwindow field + is set to the child containing the new P(W), the detail field + is set to Inferior + Case 3C: Otherwise: + The pointer window moves from W to a window above W. + The detail may need to be changed from Ancestor to Nonlinear or + vice versa depending on the the new P(W) + */ + if (!HasPointer(dev, A)) { + WindowPtr child = FirstPointerChild(A); + + if (child) + CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, + None); + else + CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyAncestor, A, + None); + } + + CoreLeaveNotifies(dev, A, B, mode, NotifyVirtual); + + /* Case 8: + A is a descendant of W, B is W + + Classically: A EnterNotify is generated on W with a detail of + NotifyInferior + + MPX: + Case 3A: There is at least one other pointer on W itself + P(W) doesn't change, the event should be suppressed + Case 3B: Otherwise: + P(W) changes from a descendant to W itself. The subwindow + field should be set to the child containing the old P(W) <<< WRONG */ + + if (!HasPointer(dev, B)) + CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None); + +} + +/** + * Pointer dev moves from A to B and B is a descendant of A. + */ +static void +CoreEnterLeaveToDescendant(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) +{ + /* Case 6: + A is W, B is a descendant of W + + Classically: A LeaveNotify is generated on W with a detail of + NotifyInferior + + MPX: + Case 3A: There is at least one other pointer on W itself + P(W) doesn't change, the event should be suppressed + Case 3B: Otherwise: + P(W) changes from W to a descendant of W. The subwindow field + is set to the child containing the new P(W) <<< THIS IS WRONG */ + + if (!HasPointer(dev, A)) + CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None); + + CoreEnterNotifies(dev, A, B, mode, NotifyVirtual); + + /* Case 2: + A is above W, B=W + + Classically: The move generates an EnterNotify on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 2A: There is at least one other pointer on W itself + P(W) doesn't change, so the event should be suppressed + Case 2B: Otherwise, if there is at least one other pointer in a + descendant + P(W) moves from a descendant to W. detail is changed to Inferior, + subwindow is set to the child containing the previous P(W) + Case 2C: Otherwise: + P(W) changes from a window above W to W itself. + The detail may need to be changed from Ancestor to Nonlinear + or vice-versa depending on the previous P(W). */ + + if (!HasPointer(dev, B)) { + WindowPtr child = FirstPointerChild(B); + + if (child) + CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, + None); + else + CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyAncestor, B, + None); + } +} + +static void +CoreEnterLeaveEvents(DeviceIntPtr dev, WindowPtr from, WindowPtr to, int mode) +{ + if (!IsMaster(dev)) + return; + + LeaveWindow(dev); + + if (IsParent(from, to)) + CoreEnterLeaveToDescendant(dev, from, to, mode); + else if (IsParent(to, from)) + CoreEnterLeaveToAncestor(dev, from, to, mode); + else + CoreEnterLeaveNonLinear(dev, from, to, mode); + + EnterWindow(dev, to, mode); +} + +static void +DeviceEnterLeaveEvents(DeviceIntPtr dev, + int sourceid, WindowPtr from, WindowPtr to, int mode) +{ + if (IsParent(from, to)) { + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyInferior, + from, None); + DeviceEnterNotifies(dev, sourceid, from, to, mode, NotifyVirtual); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyAncestor, to, + None); + } + else if (IsParent(to, from)) { + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyAncestor, + from, None); + DeviceLeaveNotifies(dev, sourceid, from, to, mode, NotifyVirtual); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyInferior, to, + None); + } + else { /* neither from nor to is descendent of the other */ + WindowPtr common = CommonAncestor(to, from); + + /* common == NullWindow ==> different screens */ + DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyNonlinear, + from, None); + DeviceLeaveNotifies(dev, sourceid, from, common, mode, + NotifyNonlinearVirtual); + DeviceEnterNotifies(dev, sourceid, common, to, mode, + NotifyNonlinearVirtual); + DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyNonlinear, + to, None); + } +} + +/** + * Figure out if enter/leave events are necessary and send them to the + * appropriate windows. + * + * @param fromWin Window the sprite moved out of. + * @param toWin Window the sprite moved into. + */ +void +DoEnterLeaveEvents(DeviceIntPtr pDev, + int sourceid, WindowPtr fromWin, WindowPtr toWin, int mode) +{ + if (!IsPointerDevice(pDev)) + return; + + if (fromWin == toWin) + return; + + if (mode != XINotifyPassiveGrab && mode != XINotifyPassiveUngrab) + CoreEnterLeaveEvents(pDev, fromWin, toWin, mode); + DeviceEnterLeaveEvents(pDev, sourceid, fromWin, toWin, mode); +} + +static void +FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v, + int first) +{ + int nval = v->numAxes - first; + + ev->type = DeviceValuator; + ev->deviceid = dev->id; + ev->num_valuators = nval < 3 ? nval : 3; + ev->first_valuator = first; + switch (ev->num_valuators) { + case 3: + ev->valuator2 = v->axisVal[first + 2]; + case 2: + ev->valuator1 = v->axisVal[first + 1]; + case 1: + ev->valuator0 = v->axisVal[first]; + break; + } + first += ev->num_valuators; +} + +static void +FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k, + ButtonClassPtr b, ValuatorClassPtr v, int first) +{ + ev->type = DeviceStateNotify; + ev->deviceid = dev->id; + ev->time = currentTime.milliseconds; + ev->classes_reported = 0; + ev->num_keys = 0; + ev->num_buttons = 0; + ev->num_valuators = 0; + + if (b) { + ev->classes_reported |= (1 << ButtonClass); + ev->num_buttons = b->numButtons; + memcpy((char *) ev->buttons, (char *) b->down, 4); + } + else if (k) { + ev->classes_reported |= (1 << KeyClass); + ev->num_keys = k->xkbInfo->desc->max_key_code - + k->xkbInfo->desc->min_key_code; + memmove((char *) &ev->keys[0], (char *) k->down, 4); + } + if (v) { + int nval = v->numAxes - first; + + ev->classes_reported |= (1 << ValuatorClass); + ev->classes_reported |= valuator_get_mode(dev, 0) << ModeBitsShift; + ev->num_valuators = nval < 3 ? nval : 3; + switch (ev->num_valuators) { + case 3: + ev->valuator2 = v->axisVal[first + 2]; + case 2: + ev->valuator1 = v->axisVal[first + 1]; + case 1: + ev->valuator0 = v->axisVal[first]; + break; + } + } +} + + +static void +DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win) +{ + int evcount = 1; + deviceStateNotify *ev, *sev; + deviceKeyStateNotify *kev; + deviceButtonStateNotify *bev; + + KeyClassPtr k; + ButtonClassPtr b; + ValuatorClassPtr v; + int nval = 0, nkeys = 0, nbuttons = 0, first = 0; + + if (!(wOtherInputMasks(win)) || + !(wOtherInputMasks(win)->inputEvents[dev->id] & DeviceStateNotifyMask)) + return; + + if ((b = dev->button) != NULL) { + nbuttons = b->numButtons; + if (nbuttons > 32) + evcount++; + } + if ((k = dev->key) != NULL) { + nkeys = k->xkbInfo->desc->max_key_code - k->xkbInfo->desc->min_key_code; + if (nkeys > 32) + evcount++; + if (nbuttons > 0) { + evcount++; + } + } + if ((v = dev->valuator) != NULL) { + nval = v->numAxes; + + if (nval > 3) + evcount++; + if (nval > 6) { + if (!(k && b)) + evcount++; + if (nval > 9) + evcount += ((nval - 7) / 3); + } + } + + sev = ev = (deviceStateNotify *) malloc(evcount * sizeof(xEvent)); + FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first); + + if (b != NULL) { + FixDeviceStateNotify(dev, ev++, NULL, b, v, first); + first += 3; + nval -= 3; + if (nbuttons > 32) { + (ev - 1)->deviceid |= MORE_EVENTS; + bev = (deviceButtonStateNotify *) ev++; + bev->type = DeviceButtonStateNotify; + bev->deviceid = dev->id; + memcpy((char *) &bev->buttons[4], (char *) &b->down[4], + DOWN_LENGTH - 4); + } + if (nval > 0) { + (ev - 1)->deviceid |= MORE_EVENTS; + FixDeviceValuator(dev, (deviceValuator *) ev++, v, first); + first += 3; + nval -= 3; + } + } + + if (k != NULL) { + FixDeviceStateNotify(dev, ev++, k, NULL, v, first); + first += 3; + nval -= 3; + if (nkeys > 32) { + (ev - 1)->deviceid |= MORE_EVENTS; + kev = (deviceKeyStateNotify *) ev++; + kev->type = DeviceKeyStateNotify; + kev->deviceid = dev->id; + memmove((char *) &kev->keys[0], (char *) &k->down[4], 28); + } + if (nval > 0) { + (ev - 1)->deviceid |= MORE_EVENTS; + FixDeviceValuator(dev, (deviceValuator *) ev++, v, first); + first += 3; + nval -= 3; + } + } + + while (nval > 0) { + FixDeviceStateNotify(dev, ev++, NULL, NULL, v, first); + first += 3; + nval -= 3; + if (nval > 0) { + (ev - 1)->deviceid |= MORE_EVENTS; + FixDeviceValuator(dev, (deviceValuator *) ev++, v, first); + first += 3; + nval -= 3; + } + } + + DeliverEventsToWindow(dev, win, (xEvent *) sev, evcount, + DeviceStateNotifyMask, NullGrab); + free(sev); +} + +void +DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, + WindowPtr pWin) +{ + deviceFocus event; + xXIFocusInEvent *xi2event; + DeviceIntPtr mouse; + int btlen, len, i; + + mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER); + + /* XI 2 event */ + btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0; + btlen = bytes_to_int32(btlen); + len = sizeof(xXIFocusInEvent) + btlen * 4; + + xi2event = calloc(1, len); + xi2event->type = GenericEvent; + xi2event->extension = IReqCode; + xi2event->evtype = type; + xi2event->length = bytes_to_int32(len - sizeof(xEvent)); + xi2event->buttons_len = btlen; + xi2event->detail = detail; + xi2event->time = currentTime.milliseconds; + xi2event->deviceid = dev->id; + xi2event->sourceid = dev->id; /* a device doesn't change focus by itself */ + xi2event->mode = mode; + xi2event->root_x = double_to_fp1616(mouse->spriteInfo->sprite->hot.x); + xi2event->root_y = double_to_fp1616(mouse->spriteInfo->sprite->hot.y); + + for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) + if (BitIsOn(mouse->button->down, i)) + SetBit(&xi2event[1], mouse->button->map[i]); + + if (dev->key) { + xi2event->mods.base_mods = dev->key->xkbInfo->state.base_mods; + xi2event->mods.latched_mods = dev->key->xkbInfo->state.latched_mods; + xi2event->mods.locked_mods = dev->key->xkbInfo->state.locked_mods; + xi2event->mods.effective_mods = dev->key->xkbInfo->state.mods; + + xi2event->group.base_group = dev->key->xkbInfo->state.base_group; + xi2event->group.latched_group = dev->key->xkbInfo->state.latched_group; + xi2event->group.locked_group = dev->key->xkbInfo->state.locked_group; + xi2event->group.effective_group = dev->key->xkbInfo->state.group; + } + + FixUpEventFromWindow(dev->spriteInfo->sprite, (xEvent *) xi2event, pWin, + None, FALSE); + + DeliverEventsToWindow(dev, pWin, (xEvent *) xi2event, 1, + GetEventFilter(dev, (xEvent *) xi2event), NullGrab); + + free(xi2event); + + /* XI 1.x event */ + event = (deviceFocus) { + .deviceid = dev->id, + .mode = mode, + .type = (type == XI_FocusIn) ? DeviceFocusIn : DeviceFocusOut, + .detail = detail, + .window = pWin->drawable.id, + .time = currentTime.milliseconds + }; + + DeliverEventsToWindow(dev, pWin, (xEvent *) &event, 1, + DeviceFocusChangeMask, NullGrab); + + if (event.type == DeviceFocusIn) + DeliverStateNotifyEvent(dev, pWin); +} + +/** + * Send focus out events to all windows between 'child' and 'ancestor'. + * Events are sent running up the hierarchy. + */ +static void +DeviceFocusOutEvents(DeviceIntPtr dev, + WindowPtr child, WindowPtr ancestor, int mode, int detail) +{ + WindowPtr win; + + if (ancestor == child) + return; + for (win = child->parent; win != ancestor; win = win->parent) + DeviceFocusEvent(dev, XI_FocusOut, mode, detail, win); +} + +/** + * Send enter notifies to all windows between 'ancestor' and 'child' (excluding + * both). Events are sent running up the window hierarchy. This function + * recurses. + */ +static void +DeviceFocusInEvents(DeviceIntPtr dev, + WindowPtr ancestor, WindowPtr child, int mode, int detail) +{ + WindowPtr parent = child->parent; + + if (ancestor == parent || !parent) + return; + DeviceFocusInEvents(dev, ancestor, parent, mode, detail); + DeviceFocusEvent(dev, XI_FocusIn, mode, detail, parent); +} + +/** + * Send FocusIn events to all windows between 'ancestor' and 'child' (excluding + * both). Events are sent running down the window hierarchy. This function + * recurses. + */ +static void +CoreFocusInEvents(DeviceIntPtr dev, + WindowPtr ancestor, WindowPtr child, int mode, int detail) +{ + WindowPtr parent = child->parent; + + if (ancestor == parent) + return; + CoreFocusInEvents(dev, ancestor, parent, mode, detail); + + /* Case 3: + A is above W, B is a descendant + + Classically: The move generates an FocusIn on W with a detail of + Virtual or NonlinearVirtual + + MPX: + Case 3A: There is at least one other focus on W itself + F(W) doesn't change, so the event should be suppressed + Case 3B: Otherwise, if there is at least one other focus in a + descendant + F(W) stays on the same descendant, or changes to a different + descendant. The event should be suppressed. + Case 3C: Otherwise: + F(W) moves from a window above W to a descendant. The detail may + need to be changed from Virtual to NonlinearVirtual depending + on the previous F(W). */ + + if (!HasFocus(parent) && !FirstFocusChild(parent)) + CoreFocusEvent(dev, FocusIn, mode, detail, parent); +} + +static void +CoreFocusOutEvents(DeviceIntPtr dev, + WindowPtr child, WindowPtr ancestor, int mode, int detail) +{ + WindowPtr win; + + if (ancestor == child) + return; + + for (win = child->parent; win != ancestor; win = win->parent) { + /*Case 7: + A is a descendant of W, B is above W + + Classically: A FocusOut is generated on W with a detail of Virtual + or NonlinearVirtual. + + MPX: + Case 3A: There is at least one other focus on W itself + F(W) doesn't change, the event should be suppressed. + Case 3B: Otherwise, if there is at least one other focus in a + descendant + F(W) stays on the same descendant, or changes to a different + descendant. The event should be suppressed. + Case 3C: Otherwise: + F(W) changes from the descendant of W to a window above W. + The detail may need to be changed from Virtual to NonlinearVirtual + or vice-versa depending on the new P(W). */ + + /* If one window has a focus or a child with a focuspointer, skip some + * work and exit. */ + if (HasFocus(win) || FirstFocusChild(win)) + return; + + CoreFocusEvent(dev, FocusOut, mode, detail, win); + } +} + +/** + * Send FocusOut(NotifyPointer) events from the current pointer window (which + * is a descendant of pwin_parent) up to (excluding) pwin_parent. + * + * NotifyPointer events are only sent for the device paired with dev. + * + * If the current pointer window is a descendant of 'exclude' or an ancestor of + * 'exclude', no events are sent. If the current pointer IS 'exclude', events + * are sent! + */ +static void +CoreFocusOutNotifyPointerEvents(DeviceIntPtr dev, + WindowPtr pwin_parent, + WindowPtr exclude, int mode, int inclusive) +{ + WindowPtr P, stopAt; + + P = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); + + if (!P) + return; + if (!IsParent(pwin_parent, P)) + if (!(pwin_parent == P && inclusive)) + return; + + if (exclude != None && exclude != PointerRootWin && + (IsParent(exclude, P) || IsParent(P, exclude))) + return; + + stopAt = (inclusive) ? pwin_parent->parent : pwin_parent; + + for (; P && P != stopAt; P = P->parent) + CoreFocusEvent(dev, FocusOut, mode, NotifyPointer, P); +} + +/** + * DO NOT CALL DIRECTLY. + * Recursion helper for CoreFocusInNotifyPointerEvents. + */ +static void +CoreFocusInRecurse(DeviceIntPtr dev, + WindowPtr win, WindowPtr stopAt, int mode, int inclusive) +{ + if ((!inclusive && win == stopAt) || !win) + return; + + CoreFocusInRecurse(dev, win->parent, stopAt, mode, inclusive); + CoreFocusEvent(dev, FocusIn, mode, NotifyPointer, win); +} + +/** + * Send FocusIn(NotifyPointer) events from pwin_parent down to + * including the current pointer window (which is a descendant of pwin_parent). + * + * @param pwin The pointer window. + * @param exclude If the pointer window is a child of 'exclude', no events are + * sent. + * @param inclusive If TRUE, pwin_parent will receive the event too. + */ +static void +CoreFocusInNotifyPointerEvents(DeviceIntPtr dev, + WindowPtr pwin_parent, + WindowPtr exclude, int mode, int inclusive) +{ + WindowPtr P; + + P = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); + + if (!P || P == exclude || (pwin_parent != P && !IsParent(pwin_parent, P))) + return; + + if (exclude != None && (IsParent(exclude, P) || IsParent(P, exclude))) + return; + + CoreFocusInRecurse(dev, P, pwin_parent, mode, inclusive); +} + +/** + * Focus of dev moves from A to B and A neither a descendant of B nor is + * B a descendant of A. + */ +static void +CoreFocusNonLinear(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) +{ + WindowPtr X = CommonAncestor(A, B); + + /* Case 4: + A is W, B is above W + + Classically: The change generates a FocusOut on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 3A: There is at least one other focus on W itself + F(W) doesn't change, the event should be suppressed + Case 3B: Otherwise, if there is at least one other focus in a + descendant of W + F(W) changes from W to a descendant of W. The detail field + is set to Inferior + Case 3C: Otherwise: + The focus window moves from W to a window above W. + The detail may need to be changed from Ancestor to Nonlinear or + vice versa depending on the the new F(W) + */ + + if (!HasFocus(A)) { + WindowPtr child = FirstFocusChild(A); + + if (child) { + /* NotifyPointer P-A unless P is child or below */ + CoreFocusOutNotifyPointerEvents(dev, A, child, mode, FALSE); + CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); + } + else { + /* NotifyPointer P-A */ + CoreFocusOutNotifyPointerEvents(dev, A, None, mode, FALSE); + CoreFocusEvent(dev, FocusOut, mode, NotifyNonlinear, A); + } + } + + CoreFocusOutEvents(dev, A, X, mode, NotifyNonlinearVirtual); + + /* + Case 9: + A is a descendant of W, B is a descendant of W + + Classically: No events are generated on W + MPX: The focus window stays the same or moves to a different + descendant of W. No events should be generated on W. + + Therefore, no event to X. + */ + + CoreFocusInEvents(dev, X, B, mode, NotifyNonlinearVirtual); + + /* Case 2: + A is above W, B=W + + Classically: The move generates an EnterNotify on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 2A: There is at least one other focus on W itself + F(W) doesn't change, so the event should be suppressed + Case 2B: Otherwise, if there is at least one other focus in a + descendant + F(W) moves from a descendant to W. detail is changed to Inferior. + Case 2C: Otherwise: + F(W) changes from a window above W to W itself. + The detail may need to be changed from Ancestor to Nonlinear + or vice-versa depending on the previous F(W). */ + + if (!HasFocus(B)) { + WindowPtr child = FirstFocusChild(B); + + if (child) { + CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); + /* NotifyPointer B-P unless P is child or below. */ + CoreFocusInNotifyPointerEvents(dev, B, child, mode, FALSE); + } + else { + CoreFocusEvent(dev, FocusIn, mode, NotifyNonlinear, B); + /* NotifyPointer B-P unless P is child or below. */ + CoreFocusInNotifyPointerEvents(dev, B, None, mode, FALSE); + } + } +} + +/** + * Focus of dev moves from A to B and A is a descendant of B. + */ +static void +CoreFocusToAncestor(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) +{ + /* Case 4: + A is W, B is above W + + Classically: The change generates a FocusOut on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 3A: There is at least one other focus on W itself + F(W) doesn't change, the event should be suppressed + Case 3B: Otherwise, if there is at least one other focus in a + descendant of W + F(W) changes from W to a descendant of W. The detail field + is set to Inferior + Case 3C: Otherwise: + The focus window moves from W to a window above W. + The detail may need to be changed from Ancestor to Nonlinear or + vice versa depending on the the new F(W) + */ + if (!HasFocus(A)) { + WindowPtr child = FirstFocusChild(A); + + if (child) { + /* NotifyPointer P-A unless P is child or below */ + CoreFocusOutNotifyPointerEvents(dev, A, child, mode, FALSE); + CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); + } + else + CoreFocusEvent(dev, FocusOut, mode, NotifyAncestor, A); + } + + CoreFocusOutEvents(dev, A, B, mode, NotifyVirtual); + + /* Case 8: + A is a descendant of W, B is W + + Classically: A FocusOut is generated on W with a detail of + NotifyInferior + + MPX: + Case 3A: There is at least one other focus on W itself + F(W) doesn't change, the event should be suppressed + Case 3B: Otherwise: + F(W) changes from a descendant to W itself. */ + + if (!HasFocus(B)) { + CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); + /* NotifyPointer B-P unless P is A or below. */ + CoreFocusInNotifyPointerEvents(dev, B, A, mode, FALSE); + } +} + +/** + * Focus of dev moves from A to B and B is a descendant of A. + */ +static void +CoreFocusToDescendant(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) +{ + /* Case 6: + A is W, B is a descendant of W + + Classically: A FocusOut is generated on W with a detail of + NotifyInferior + + MPX: + Case 3A: There is at least one other focus on W itself + F(W) doesn't change, the event should be suppressed + Case 3B: Otherwise: + F(W) changes from W to a descendant of W. */ + + if (!HasFocus(A)) { + /* NotifyPointer P-A unless P is B or below */ + CoreFocusOutNotifyPointerEvents(dev, A, B, mode, FALSE); + CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); + } + + CoreFocusInEvents(dev, A, B, mode, NotifyVirtual); + + /* Case 2: + A is above W, B=W + + Classically: The move generates an FocusIn on W with a detail of + Ancestor or Nonlinear + + MPX: + Case 2A: There is at least one other focus on W itself + F(W) doesn't change, so the event should be suppressed + Case 2B: Otherwise, if there is at least one other focus in a + descendant + F(W) moves from a descendant to W. detail is changed to Inferior. + Case 2C: Otherwise: + F(W) changes from a window above W to W itself. + The detail may need to be changed from Ancestor to Nonlinear + or vice-versa depending on the previous F(W). */ + + if (!HasFocus(B)) { + WindowPtr child = FirstFocusChild(B); + + if (child) { + CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); + /* NotifyPointer B-P unless P is child or below. */ + CoreFocusInNotifyPointerEvents(dev, B, child, mode, FALSE); + } + else + CoreFocusEvent(dev, FocusIn, mode, NotifyAncestor, B); + } +} + +static BOOL +HasOtherPointer(WindowPtr win, DeviceIntPtr exclude) +{ + int i; + + for (i = 0; i < MAXDEVICES; i++) + if (i != exclude->id && PointerWindows[i] == win) + return TRUE; + + return FALSE; +} + +/** + * Focus moves from PointerRoot to None or from None to PointerRoot. + * Assumption: Neither A nor B are valid windows. + */ +static void +CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, + WindowPtr A, /* PointerRootWin or NoneWin */ + WindowPtr B, /* NoneWin or PointerRootWin */ + int mode) +{ + WindowPtr root; + int i; + int nscreens = screenInfo.numScreens; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + nscreens = 1; +#endif + + for (i = 0; i < nscreens; i++) { + root = screenInfo.screens[i]->root; + if (!HasOtherPointer(root, GetMaster(dev, POINTER_OR_FLOAT)) && + !FirstFocusChild(root)) { + /* If pointer was on PointerRootWin and changes to NoneWin, and + * the pointer paired with dev is below the current root window, + * do a NotifyPointer run. */ + if (dev->focus && dev->focus->win == PointerRootWin && + B != PointerRootWin) { + WindowPtr ptrwin = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); + + if (ptrwin && IsParent(root, ptrwin)) + CoreFocusOutNotifyPointerEvents(dev, root, None, mode, + TRUE); + } + CoreFocusEvent(dev, FocusOut, mode, + A ? NotifyPointerRoot : NotifyDetailNone, root); + CoreFocusEvent(dev, FocusIn, mode, + B ? NotifyPointerRoot : NotifyDetailNone, root); + if (B == PointerRootWin) + CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE); + } + + } +} + +/** + * Focus moves from window A to PointerRoot or to None. + * Assumption: A is a valid window and not PointerRoot or None. + */ +static void +CoreFocusToPointerRootOrNone(DeviceIntPtr dev, WindowPtr A, + WindowPtr B, /* PointerRootWin or NoneWin */ + int mode) +{ + WindowPtr root; + int i; + int nscreens = screenInfo.numScreens; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + nscreens = 1; +#endif + + if (!HasFocus(A)) { + WindowPtr child = FirstFocusChild(A); + + if (child) { + /* NotifyPointer P-A unless P is B or below */ + CoreFocusOutNotifyPointerEvents(dev, A, B, mode, FALSE); + CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); + } + else { + /* NotifyPointer P-A */ + CoreFocusOutNotifyPointerEvents(dev, A, None, mode, FALSE); + CoreFocusEvent(dev, FocusOut, mode, NotifyNonlinear, A); + } + } + + /* NullWindow means we include the root window */ + CoreFocusOutEvents(dev, A, NullWindow, mode, NotifyNonlinearVirtual); + + for (i = 0; i < nscreens; i++) { + root = screenInfo.screens[i]->root; + if (!HasFocus(root) && !FirstFocusChild(root)) { + CoreFocusEvent(dev, FocusIn, mode, + B ? NotifyPointerRoot : NotifyDetailNone, root); + if (B == PointerRootWin) + CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE); + } + } +} + +/** + * Focus moves from PointerRoot or None to a window B. + * Assumption: B is a valid window and not PointerRoot or None. + */ +static void +CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, + WindowPtr A, /* PointerRootWin or NoneWin */ + WindowPtr B, int mode) +{ + WindowPtr root; + int i; + int nscreens = screenInfo.numScreens; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + nscreens = 1; +#endif + + for (i = 0; i < nscreens; i++) { + root = screenInfo.screens[i]->root; + if (!HasFocus(root) && !FirstFocusChild(root)) { + /* If pointer was on PointerRootWin and changes to NoneWin, and + * the pointer paired with dev is below the current root window, + * do a NotifyPointer run. */ + if (dev->focus && dev->focus->win == PointerRootWin && + B != PointerRootWin) { + WindowPtr ptrwin = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); + + if (ptrwin) + CoreFocusOutNotifyPointerEvents(dev, root, None, mode, + TRUE); + } + CoreFocusEvent(dev, FocusOut, mode, + A ? NotifyPointerRoot : NotifyDetailNone, root); + } + } + + root = B; /* get B's root window */ + while (root->parent) + root = root->parent; + + if (B != root) { + CoreFocusEvent(dev, FocusIn, mode, NotifyNonlinearVirtual, root); + CoreFocusInEvents(dev, root, B, mode, NotifyNonlinearVirtual); + } + + if (!HasFocus(B)) { + WindowPtr child = FirstFocusChild(B); + + if (child) { + CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); + /* NotifyPointer B-P unless P is child or below. */ + CoreFocusInNotifyPointerEvents(dev, B, child, mode, FALSE); + } + else { + CoreFocusEvent(dev, FocusIn, mode, NotifyNonlinear, B); + /* NotifyPointer B-P unless P is child or below. */ + CoreFocusInNotifyPointerEvents(dev, B, None, mode, FALSE); + } + } + +} + +static void +CoreFocusEvents(DeviceIntPtr dev, WindowPtr from, WindowPtr to, int mode) +{ + if (!IsMaster(dev)) + return; + + SetFocusOut(dev); + + if (((to == NullWindow) || (to == PointerRootWin)) && + ((from == NullWindow) || (from == PointerRootWin))) + CoreFocusPointerRootNoneSwitch(dev, from, to, mode); + else if ((to == NullWindow) || (to == PointerRootWin)) + CoreFocusToPointerRootOrNone(dev, from, to, mode); + else if ((from == NullWindow) || (from == PointerRootWin)) + CoreFocusFromPointerRootOrNone(dev, from, to, mode); + else if (IsParent(from, to)) + CoreFocusToDescendant(dev, from, to, mode); + else if (IsParent(to, from)) + CoreFocusToAncestor(dev, from, to, mode); + else + CoreFocusNonLinear(dev, from, to, mode); + + SetFocusIn(dev, to); +} + +static void +DeviceFocusEvents(DeviceIntPtr dev, WindowPtr from, WindowPtr to, int mode) +{ + int out, in; /* for holding details for to/from + PointerRoot/None */ + int i; + int nscreens = screenInfo.numScreens; + SpritePtr sprite = dev->spriteInfo->sprite; + + if (from == to) + return; + out = (from == NoneWin) ? NotifyDetailNone : NotifyPointerRoot; + in = (to == NoneWin) ? NotifyDetailNone : NotifyPointerRoot; + /* wrong values if neither, but then not referenced */ + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + nscreens = 1; +#endif + + if ((to == NullWindow) || (to == PointerRootWin)) { + if ((from == NullWindow) || (from == PointerRootWin)) { + if (from == PointerRootWin) + DeviceFocusOutEvents(dev, sprite->win, + GetCurrentRootWindow(dev), mode, + NotifyPointer); + /* Notify all the roots */ + for (i = 0; i < nscreens; i++) + DeviceFocusEvent(dev, XI_FocusOut, mode, out, + screenInfo.screens[i]->root); + } + else { + if (IsParent(from, sprite->win)) + DeviceFocusOutEvents(dev, sprite->win, from, mode, + NotifyPointer); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); + /* next call catches the root too, if the screen changed */ + DeviceFocusOutEvents(dev, from, NullWindow, mode, + NotifyNonlinearVirtual); + } + /* Notify all the roots */ + for (i = 0; i < nscreens; i++) + DeviceFocusEvent(dev, XI_FocusIn, mode, in, + screenInfo.screens[i]->root); + if (to == PointerRootWin) { + DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, + mode, NotifyPointer); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win); + } + } + else { + if ((from == NullWindow) || (from == PointerRootWin)) { + if (from == PointerRootWin) + DeviceFocusOutEvents(dev, sprite->win, + GetCurrentRootWindow(dev), mode, + NotifyPointer); + for (i = 0; i < nscreens; i++) + DeviceFocusEvent(dev, XI_FocusOut, mode, out, + screenInfo.screens[i]->root); + if (to->parent != NullWindow) + DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), to, mode, + NotifyNonlinearVirtual); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); + if (IsParent(to, sprite->win)) + DeviceFocusInEvents(dev, to, sprite->win, mode, NotifyPointer); + } + else { + if (IsParent(to, from)) { + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from); + DeviceFocusOutEvents(dev, from, to, mode, NotifyVirtual); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to); + if ((IsParent(to, sprite->win)) && + (sprite->win != from) && + (!IsParent(from, sprite->win)) && + (!IsParent(sprite->win, from))) + DeviceFocusInEvents(dev, to, sprite->win, mode, + NotifyPointer); + } + else if (IsParent(from, to)) { + if ((IsParent(from, sprite->win)) && + (sprite->win != from) && + (!IsParent(to, sprite->win)) && + (!IsParent(sprite->win, to))) + DeviceFocusOutEvents(dev, sprite->win, from, mode, + NotifyPointer); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyInferior, from); + DeviceFocusInEvents(dev, from, to, mode, NotifyVirtual); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyAncestor, to); + } + else { + /* neither from or to is child of other */ + WindowPtr common = CommonAncestor(to, from); + + /* common == NullWindow ==> different screens */ + if (IsParent(from, sprite->win)) + DeviceFocusOutEvents(dev, sprite->win, from, mode, + NotifyPointer); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); + if (from->parent != NullWindow) + DeviceFocusOutEvents(dev, from, common, mode, + NotifyNonlinearVirtual); + if (to->parent != NullWindow) + DeviceFocusInEvents(dev, common, to, mode, + NotifyNonlinearVirtual); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); + if (IsParent(to, sprite->win)) + DeviceFocusInEvents(dev, to, sprite->win, mode, + NotifyPointer); + } + } + } +} + +/** + * Figure out if focus events are necessary and send them to the + * appropriate windows. + * + * @param from Window the focus moved out of. + * @param to Window the focus moved into. + */ +void +DoFocusEvents(DeviceIntPtr pDev, WindowPtr from, WindowPtr to, int mode) +{ + if (!IsKeyboardDevice(pDev)) + return; + + if (from == to) + return; + + CoreFocusEvents(pDev, from, to, mode); + DeviceFocusEvents(pDev, from, to, mode); +} diff --git a/dix/enterleave.h b/dix/enterleave.h new file mode 100644 index 0000000..a59d057 --- /dev/null +++ b/dix/enterleave.h @@ -0,0 +1,71 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef ENTERLEAVE_H +#define ENTERLEAVE_H + +#include <dix.h> /* DoFocusEvents() */ + +extern void DoEnterLeaveEvents(DeviceIntPtr pDev, + int sourceid, + WindowPtr fromWin, WindowPtr toWin, int mode); + +extern void EnterLeaveEvent(DeviceIntPtr mouse, + int type, + int mode, int detail, WindowPtr pWin, Window child); + +extern WindowPtr CommonAncestor(WindowPtr a, WindowPtr b); + +extern void CoreEnterLeaveEvent(DeviceIntPtr mouse, + int type, + int mode, + int detail, WindowPtr pWin, Window child); +extern void DeviceEnterLeaveEvent(DeviceIntPtr mouse, + int sourceid, + int type, + int mode, + int detail, WindowPtr pWin, Window child); +extern void DeviceFocusEvent(DeviceIntPtr dev, + int type, + int mode, + int detail , + WindowPtr pWin); + +extern void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode); + +extern void LeaveWindow(DeviceIntPtr dev); + +extern void CoreFocusEvent(DeviceIntPtr kbd, + int type, int mode, int detail, WindowPtr pWin); + +extern void SetFocusIn(DeviceIntPtr kbd, WindowPtr win); + +extern void SetFocusOut(DeviceIntPtr dev); +#endif /* _ENTERLEAVE_H_ */ diff --git a/dix/eventconvert.c b/dix/eventconvert.c new file mode 100644 index 0000000..f7ecdba --- /dev/null +++ b/dix/eventconvert.c @@ -0,0 +1,978 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +/** + * @file eventconvert.c + * This file contains event conversion routines from InternalEvent to the + * matching protocol events. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stdint.h> +#include <X11/X.h> +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XI2proto.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2.h> + +#include "dix.h" +#include "inputstr.h" +#include "misc.h" +#include "eventstr.h" +#include "exevents.h" +#include "exglobals.h" +#include "eventconvert.h" +#include "inpututils.h" +#include "xiquerydevice.h" +#include "xkbsrv.h" +#include "inpututils.h" + +static int countValuators(DeviceEvent *ev, int *first); +static int getValuatorEvents(DeviceEvent *ev, deviceValuator * xv); +static int eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count); +static int eventToDeviceChanged(DeviceChangedEvent *ev, xEvent **dcce); +static int eventToDeviceEvent(DeviceEvent *ev, xEvent **xi); +static int eventToRawEvent(RawDeviceEvent *ev, xEvent **xi); +static int eventToBarrierEvent(BarrierEvent *ev, xEvent **xi); +static int eventToTouchOwnershipEvent(TouchOwnershipEvent *ev, xEvent **xi); + +/* Do not use, read comments below */ +BOOL EventIsKeyRepeat(xEvent *event); + +/** + * Hack to allow detectable autorepeat for core and XI1 events. + * The sequence number is unused until we send to the client and can be + * misused to store data. More or less, anyway. + * + * Do not use this. It may change any time without warning, eat your babies + * and piss on your cat. + */ +static void +EventSetKeyRepeatFlag(xEvent *event, BOOL on) +{ + event->u.u.sequenceNumber = on; +} + +/** + * Check if the event was marked as a repeat event before. + * NOTE: This is a nasty hack and should NOT be used by anyone else but + * TryClientEvents. + */ +BOOL +EventIsKeyRepeat(xEvent *event) +{ + return ! !event->u.u.sequenceNumber; +} + +/** + * Convert the given event to the respective core event. + * + * Return values: + * Success ... core contains the matching core event. + * BadValue .. One or more values in the internal event are invalid. + * BadMatch .. The event has no core equivalent. + * + * @param[in] event The event to convert into a core event. + * @param[in] core The memory location to store the core event at. + * @return Success or the matching error code. + */ +int +EventToCore(InternalEvent *event, xEvent **core_out, int *count_out) +{ + xEvent *core = NULL; + int count = 0; + int ret = BadImplementation; + + switch (event->any.type) { + case ET_Motion: + { + DeviceEvent *e = &event->device_event; + + /* Don't create core motion event if neither x nor y are + * present */ + if (!BitIsOn(e->valuators.mask, 0) && !BitIsOn(e->valuators.mask, 1)) { + ret = BadMatch; + goto out; + } + } + /* fallthrough */ + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + { + DeviceEvent *e = &event->device_event; + + if (e->detail.key > 0xFF) { + ret = BadMatch; + goto out; + } + + core = calloc(1, sizeof(*core)); + if (!core) + return BadAlloc; + count = 1; + core->u.u.type = e->type - ET_KeyPress + KeyPress; + core->u.u.detail = e->detail.key & 0xFF; + core->u.keyButtonPointer.time = e->time; + core->u.keyButtonPointer.rootX = e->root_x; + core->u.keyButtonPointer.rootY = e->root_y; + core->u.keyButtonPointer.state = e->corestate; + core->u.keyButtonPointer.root = e->root; + EventSetKeyRepeatFlag(core, (e->type == ET_KeyPress && e->key_repeat)); + ret = Success; + } + break; + case ET_ProximityIn: + case ET_ProximityOut: + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + case ET_RawTouchBegin: + case ET_RawTouchUpdate: + case ET_RawTouchEnd: + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + case ET_TouchOwnership: + case ET_BarrierHit: + case ET_BarrierLeave: + ret = BadMatch; + break; + default: + /* XXX: */ + ErrorF("[dix] EventToCore: Not implemented yet \n"); + ret = BadImplementation; + } + + out: + *core_out = core; + *count_out = count; + return ret; +} + +/** + * Convert the given event to the respective XI 1.x event and store it in + * xi. xi is allocated on demand and must be freed by the caller. + * count returns the number of events in xi. If count is 1, and the type of + * xi is GenericEvent, then xi may be larger than 32 bytes. + * + * Return values: + * Success ... core contains the matching core event. + * BadValue .. One or more values in the internal event are invalid. + * BadMatch .. The event has no XI equivalent. + * + * @param[in] ev The event to convert into an XI 1 event. + * @param[out] xi Future memory location for the XI event. + * @param[out] count Number of elements in xi. + * + * @return Success or the error code. + */ +int +EventToXI(InternalEvent *ev, xEvent **xi, int *count) +{ + switch (ev->any.type) { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + return eventToKeyButtonPointer(&ev->device_event, xi, count); + case ET_DeviceChanged: + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + case ET_RawTouchBegin: + case ET_RawTouchUpdate: + case ET_RawTouchEnd: + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + case ET_TouchOwnership: + case ET_BarrierHit: + case ET_BarrierLeave: + *count = 0; + *xi = NULL; + return BadMatch; + default: + break; + } + + ErrorF("[dix] EventToXI: Not implemented for %d \n", ev->any.type); + return BadImplementation; +} + +/** + * Convert the given event to the respective XI 2.x event and store it in xi. + * xi is allocated on demand and must be freed by the caller. + * + * Return values: + * Success ... core contains the matching core event. + * BadValue .. One or more values in the internal event are invalid. + * BadMatch .. The event has no XI2 equivalent. + * + * @param[in] ev The event to convert into an XI2 event + * @param[out] xi Future memory location for the XI2 event. + * + * @return Success or the error code. + */ +int +EventToXI2(InternalEvent *ev, xEvent **xi) +{ + switch (ev->any.type) { + /* Enter/FocusIn are for grabs. We don't need an actual event, since + * the real events delivered are triggered elsewhere */ + case ET_Enter: + case ET_FocusIn: + *xi = NULL; + return Success; + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + return eventToDeviceEvent(&ev->device_event, xi); + case ET_TouchOwnership: + return eventToTouchOwnershipEvent(&ev->touch_ownership_event, xi); + case ET_ProximityIn: + case ET_ProximityOut: + *xi = NULL; + return BadMatch; + case ET_DeviceChanged: + return eventToDeviceChanged(&ev->changed_event, xi); + case ET_RawKeyPress: + case ET_RawKeyRelease: + case ET_RawButtonPress: + case ET_RawButtonRelease: + case ET_RawMotion: + case ET_RawTouchBegin: + case ET_RawTouchUpdate: + case ET_RawTouchEnd: + return eventToRawEvent(&ev->raw_event, xi); + case ET_BarrierHit: + case ET_BarrierLeave: + return eventToBarrierEvent(&ev->barrier_event, xi); + default: + break; + } + + ErrorF("[dix] EventToXI2: Not implemented for %d \n", ev->any.type); + return BadImplementation; +} + +static int +eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count) +{ + int num_events; + int first; /* dummy */ + deviceKeyButtonPointer *kbp; + + /* Sorry, XI 1.x protocol restrictions. */ + if (ev->detail.button > 0xFF || ev->deviceid >= 0x80) { + *count = 0; + return Success; + } + + num_events = (countValuators(ev, &first) + 5) / 6; /* valuator ev */ + if (num_events <= 0) { + switch (ev->type) { + case ET_KeyPress: + case ET_KeyRelease: + case ET_ButtonPress: + case ET_ButtonRelease: + /* no axes is ok */ + break; + case ET_Motion: + case ET_ProximityIn: + case ET_ProximityOut: + *count = 0; + return BadMatch; + default: + *count = 0; + return BadImplementation; + } + } + + num_events++; /* the actual event event */ + + *xi = calloc(num_events, sizeof(xEvent)); + if (!(*xi)) { + return BadAlloc; + } + + kbp = (deviceKeyButtonPointer *) (*xi); + kbp->detail = ev->detail.button; + kbp->time = ev->time; + kbp->root = ev->root; + kbp->root_x = ev->root_x; + kbp->root_y = ev->root_y; + kbp->deviceid = ev->deviceid; + kbp->state = ev->corestate; + EventSetKeyRepeatFlag((xEvent *) kbp, + (ev->type == ET_KeyPress && ev->key_repeat)); + + if (num_events > 1) + kbp->deviceid |= MORE_EVENTS; + + switch (ev->type) { + case ET_Motion: + kbp->type = DeviceMotionNotify; + break; + case ET_ButtonPress: + kbp->type = DeviceButtonPress; + break; + case ET_ButtonRelease: + kbp->type = DeviceButtonRelease; + break; + case ET_KeyPress: + kbp->type = DeviceKeyPress; + break; + case ET_KeyRelease: + kbp->type = DeviceKeyRelease; + break; + case ET_ProximityIn: + kbp->type = ProximityIn; + break; + case ET_ProximityOut: + kbp->type = ProximityOut; + break; + default: + break; + } + + if (num_events > 1) { + getValuatorEvents(ev, (deviceValuator *) (kbp + 1)); + } + + *count = num_events; + return Success; +} + +/** + * Set first to the first valuator in the event ev and return the number of + * valuators from first to the last set valuator. + */ +static int +countValuators(DeviceEvent *ev, int *first) +{ + int first_valuator = -1, last_valuator = -1, num_valuators = 0; + int i; + + for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) { + if (BitIsOn(ev->valuators.mask, i)) { + if (first_valuator == -1) + first_valuator = i; + last_valuator = i; + } + } + + if (first_valuator != -1) { + num_valuators = last_valuator - first_valuator + 1; + *first = first_valuator; + } + + return num_valuators; +} + +static int +getValuatorEvents(DeviceEvent *ev, deviceValuator * xv) +{ + int i; + int state = 0; + int first_valuator, num_valuators; + + num_valuators = countValuators(ev, &first_valuator); + if (num_valuators > 0) { + DeviceIntPtr dev = NULL; + + dixLookupDevice(&dev, ev->deviceid, serverClient, DixUseAccess); + /* State needs to be assembled BEFORE the device is updated. */ + state = (dev && + dev->key) ? XkbStateFieldFromRec(&dev->key->xkbInfo-> + state) : 0; + state |= (dev && dev->button) ? (dev->button->state) : 0; + } + + for (i = 0; i < num_valuators; i += 6, xv++) { + INT32 *valuators = &xv->valuator0; // Treat all 6 vals as an array + int j; + + xv->type = DeviceValuator; + xv->first_valuator = first_valuator + i; + xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); + xv->deviceid = ev->deviceid; + xv->device_state = state; + + /* Unset valuators in masked valuator events have the proper data values + * in the case of an absolute axis in between two set valuators. */ + for (j = 0; j < xv->num_valuators; j++) + valuators[j] = ev->valuators.data[xv->first_valuator + j]; + + if (i + 6 < num_valuators) + xv->deviceid |= MORE_EVENTS; + } + + return (num_valuators + 5) / 6; +} + +static int +appendKeyInfo(DeviceChangedEvent *dce, xXIKeyInfo * info) +{ + uint32_t *kc; + int i; + + info->type = XIKeyClass; + info->num_keycodes = dce->keys.max_keycode - dce->keys.min_keycode + 1; + info->length = sizeof(xXIKeyInfo) / 4 + info->num_keycodes; + info->sourceid = dce->sourceid; + + kc = (uint32_t *) &info[1]; + for (i = 0; i < info->num_keycodes; i++) + *kc++ = i + dce->keys.min_keycode; + + return info->length * 4; +} + +static int +appendButtonInfo(DeviceChangedEvent *dce, xXIButtonInfo * info) +{ + unsigned char *bits; + int mask_len; + + mask_len = bytes_to_int32(bits_to_bytes(dce->buttons.num_buttons)); + + info->type = XIButtonClass; + info->num_buttons = dce->buttons.num_buttons; + info->length = bytes_to_int32(sizeof(xXIButtonInfo)) + + info->num_buttons + mask_len; + info->sourceid = dce->sourceid; + + bits = (unsigned char *) &info[1]; + memset(bits, 0, mask_len * 4); + /* FIXME: is_down? */ + + bits += mask_len * 4; + memcpy(bits, dce->buttons.names, dce->buttons.num_buttons * sizeof(Atom)); + + return info->length * 4; +} + +static int +appendValuatorInfo(DeviceChangedEvent *dce, xXIValuatorInfo * info, + int axisnumber) +{ + info->type = XIValuatorClass; + info->length = sizeof(xXIValuatorInfo) / 4; + info->label = dce->valuators[axisnumber].name; + info->min.integral = dce->valuators[axisnumber].min; + info->min.frac = 0; + info->max.integral = dce->valuators[axisnumber].max; + info->max.frac = 0; + info->value = double_to_fp3232(dce->valuators[axisnumber].value); + info->resolution = dce->valuators[axisnumber].resolution; + info->number = axisnumber; + info->mode = dce->valuators[axisnumber].mode; + info->sourceid = dce->sourceid; + + return info->length * 4; +} + +static int +appendScrollInfo(DeviceChangedEvent *dce, xXIScrollInfo * info, int axisnumber) +{ + if (dce->valuators[axisnumber].scroll.type == SCROLL_TYPE_NONE) + return 0; + + info->type = XIScrollClass; + info->length = sizeof(xXIScrollInfo) / 4; + info->number = axisnumber; + switch (dce->valuators[axisnumber].scroll.type) { + case SCROLL_TYPE_VERTICAL: + info->scroll_type = XIScrollTypeVertical; + break; + case SCROLL_TYPE_HORIZONTAL: + info->scroll_type = XIScrollTypeHorizontal; + break; + default: + ErrorF("[Xi] Unknown scroll type %d. This is a bug.\n", + dce->valuators[axisnumber].scroll.type); + break; + } + info->increment = + double_to_fp3232(dce->valuators[axisnumber].scroll.increment); + info->sourceid = dce->sourceid; + + info->flags = 0; + + if (dce->valuators[axisnumber].scroll.flags & SCROLL_FLAG_DONT_EMULATE) + info->flags |= XIScrollFlagNoEmulation; + if (dce->valuators[axisnumber].scroll.flags & SCROLL_FLAG_PREFERRED) + info->flags |= XIScrollFlagPreferred; + + return info->length * 4; +} + +static int +eventToDeviceChanged(DeviceChangedEvent *dce, xEvent **xi) +{ + xXIDeviceChangedEvent *dcce; + int len = sizeof(xXIDeviceChangedEvent); + int nkeys; + char *ptr; + + if (dce->buttons.num_buttons) { + len += sizeof(xXIButtonInfo); + len += dce->buttons.num_buttons * sizeof(Atom); /* button names */ + len += pad_to_int32(bits_to_bytes(dce->buttons.num_buttons)); + } + if (dce->num_valuators) { + int i; + + len += sizeof(xXIValuatorInfo) * dce->num_valuators; + + for (i = 0; i < dce->num_valuators; i++) + if (dce->valuators[i].scroll.type != SCROLL_TYPE_NONE) + len += sizeof(xXIScrollInfo); + } + + nkeys = (dce->keys.max_keycode > 0) ? + dce->keys.max_keycode - dce->keys.min_keycode + 1 : 0; + if (nkeys > 0) { + len += sizeof(xXIKeyInfo); + len += sizeof(CARD32) * nkeys; /* keycodes */ + } + + dcce = calloc(1, len); + if (!dcce) { + ErrorF("[Xi] BadAlloc in SendDeviceChangedEvent.\n"); + return BadAlloc; + } + + dcce->type = GenericEvent; + dcce->extension = IReqCode; + dcce->evtype = XI_DeviceChanged; + dcce->time = dce->time; + dcce->deviceid = dce->deviceid; + dcce->sourceid = dce->sourceid; + dcce->reason = + (dce->flags & DEVCHANGE_DEVICE_CHANGE) ? XIDeviceChange : XISlaveSwitch; + dcce->num_classes = 0; + dcce->length = bytes_to_int32(len - sizeof(xEvent)); + + ptr = (char *) &dcce[1]; + if (dce->buttons.num_buttons) { + dcce->num_classes++; + ptr += appendButtonInfo(dce, (xXIButtonInfo *) ptr); + } + + if (nkeys) { + dcce->num_classes++; + ptr += appendKeyInfo(dce, (xXIKeyInfo *) ptr); + } + + if (dce->num_valuators) { + int i; + + dcce->num_classes += dce->num_valuators; + for (i = 0; i < dce->num_valuators; i++) + ptr += appendValuatorInfo(dce, (xXIValuatorInfo *) ptr, i); + + for (i = 0; i < dce->num_valuators; i++) { + if (dce->valuators[i].scroll.type != SCROLL_TYPE_NONE) { + dcce->num_classes++; + ptr += appendScrollInfo(dce, (xXIScrollInfo *) ptr, i); + } + } + } + + *xi = (xEvent *) dcce; + + return Success; +} + +static int +count_bits(unsigned char *ptr, int len) +{ + int bits = 0; + unsigned int i; + unsigned char x; + + for (i = 0; i < len; i++) { + x = ptr[i]; + while (x > 0) { + bits += (x & 0x1); + x >>= 1; + } + } + return bits; +} + +static int +eventToDeviceEvent(DeviceEvent *ev, xEvent **xi) +{ + int len = sizeof(xXIDeviceEvent); + xXIDeviceEvent *xde; + int i, btlen, vallen; + char *ptr; + FP3232 *axisval; + + /* FIXME: this should just send the buttons we have, not MAX_BUTTONs. Same + * with MAX_VALUATORS below */ + /* btlen is in 4 byte units */ + btlen = bytes_to_int32(bits_to_bytes(MAX_BUTTONS)); + len += btlen * 4; /* buttonmask len */ + + vallen = + count_bits(ev->valuators.mask, + sizeof(ev->valuators.mask) / sizeof(ev->valuators.mask[0])); + len += vallen * 2 * sizeof(uint32_t); /* axisvalues */ + vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); + len += vallen * 4; /* valuators mask */ + + *xi = calloc(1, len); + xde = (xXIDeviceEvent *) * xi; + xde->type = GenericEvent; + xde->extension = IReqCode; + xde->evtype = GetXI2Type(ev->type); + xde->time = ev->time; + xde->length = bytes_to_int32(len - sizeof(xEvent)); + if (IsTouchEvent((InternalEvent *) ev)) + xde->detail = ev->touchid; + else + xde->detail = ev->detail.button; + + xde->root = ev->root; + xde->buttons_len = btlen; + xde->valuators_len = vallen; + xde->deviceid = ev->deviceid; + xde->sourceid = ev->sourceid; + xde->root_x = double_to_fp1616(ev->root_x + ev->root_x_frac); + xde->root_y = double_to_fp1616(ev->root_y + ev->root_y_frac); + + if (IsTouchEvent((InternalEvent *)ev)) { + if (ev->type == ET_TouchUpdate) + xde->flags |= (ev->flags & TOUCH_PENDING_END) ? XITouchPendingEnd : 0; + + if (ev->flags & TOUCH_POINTER_EMULATED) + xde->flags |= XITouchEmulatingPointer; + } else { + xde->flags = ev->flags; + + if (ev->key_repeat) + xde->flags |= XIKeyRepeat; + } + + xde->mods.base_mods = ev->mods.base; + xde->mods.latched_mods = ev->mods.latched; + xde->mods.locked_mods = ev->mods.locked; + xde->mods.effective_mods = ev->mods.effective; + + xde->group.base_group = ev->group.base; + xde->group.latched_group = ev->group.latched; + xde->group.locked_group = ev->group.locked; + xde->group.effective_group = ev->group.effective; + + ptr = (char *) &xde[1]; + for (i = 0; i < sizeof(ev->buttons) * 8; i++) { + if (BitIsOn(ev->buttons, i)) + SetBit(ptr, i); + } + + ptr += xde->buttons_len * 4; + axisval = (FP3232 *) (ptr + xde->valuators_len * 4); + for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) { + if (BitIsOn(ev->valuators.mask, i)) { + SetBit(ptr, i); + *axisval = double_to_fp3232(ev->valuators.data[i]); + axisval++; + } + } + + return Success; +} + +static int +eventToTouchOwnershipEvent(TouchOwnershipEvent *ev, xEvent **xi) +{ + int len = sizeof(xXITouchOwnershipEvent); + xXITouchOwnershipEvent *xtoe; + + *xi = calloc(1, len); + xtoe = (xXITouchOwnershipEvent *) * xi; + xtoe->type = GenericEvent; + xtoe->extension = IReqCode; + xtoe->length = bytes_to_int32(len - sizeof(xEvent)); + xtoe->evtype = GetXI2Type(ev->type); + xtoe->deviceid = ev->deviceid; + xtoe->time = ev->time; + xtoe->sourceid = ev->sourceid; + xtoe->touchid = ev->touchid; + xtoe->flags = 0; /* we don't have wire flags for ownership yet */ + + return Success; +} + +static int +eventToRawEvent(RawDeviceEvent *ev, xEvent **xi) +{ + xXIRawEvent *raw; + int vallen, nvals; + int i, len = sizeof(xXIRawEvent); + char *ptr; + FP3232 *axisval, *axisval_raw; + + nvals = count_bits(ev->valuators.mask, sizeof(ev->valuators.mask)); + len += nvals * sizeof(FP3232) * 2; /* 8 byte per valuator, once + raw, once processed */ + vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); + len += vallen * 4; /* valuators mask */ + + *xi = calloc(1, len); + raw = (xXIRawEvent *) * xi; + raw->type = GenericEvent; + raw->extension = IReqCode; + raw->evtype = GetXI2Type(ev->type); + raw->time = ev->time; + raw->length = bytes_to_int32(len - sizeof(xEvent)); + raw->detail = ev->detail.button; + raw->deviceid = ev->deviceid; + raw->sourceid = ev->sourceid; + raw->valuators_len = vallen; + raw->flags = ev->flags; + + ptr = (char *) &raw[1]; + axisval = (FP3232 *) (ptr + raw->valuators_len * 4); + axisval_raw = axisval + nvals; + for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) { + if (BitIsOn(ev->valuators.mask, i)) { + SetBit(ptr, i); + *axisval = double_to_fp3232(ev->valuators.data[i]); + *axisval_raw = double_to_fp3232(ev->valuators.data_raw[i]); + axisval++; + axisval_raw++; + } + } + + return Success; +} + +static int +eventToBarrierEvent(BarrierEvent *ev, xEvent **xi) +{ + xXIBarrierEvent *barrier; + int len = sizeof(xXIBarrierEvent); + + *xi = calloc(1, len); + barrier = (xXIBarrierEvent*) *xi; + barrier->type = GenericEvent; + barrier->extension = IReqCode; + barrier->evtype = GetXI2Type(ev->type); + barrier->length = bytes_to_int32(len - sizeof(xEvent)); + barrier->deviceid = ev->deviceid; + barrier->sourceid = ev->sourceid; + barrier->time = ev->time; + barrier->event = ev->window; + barrier->root = ev->root; + barrier->dx = double_to_fp3232(ev->dx); + barrier->dy = double_to_fp3232(ev->dy); + barrier->dtime = ev->dt; + barrier->flags = ev->flags; + barrier->eventid = ev->event_id; + barrier->barrier = ev->barrierid; + barrier->root_x = double_to_fp1616(ev->root_x); + barrier->root_y = double_to_fp1616(ev->root_y); + + return Success; +} + +/** + * Return the corresponding core type for the given event or 0 if no core + * equivalent exists. + */ +int +GetCoreType(enum EventType type) +{ + int coretype = 0; + + switch (type) { + case ET_Motion: + coretype = MotionNotify; + break; + case ET_ButtonPress: + coretype = ButtonPress; + break; + case ET_ButtonRelease: + coretype = ButtonRelease; + break; + case ET_KeyPress: + coretype = KeyPress; + break; + case ET_KeyRelease: + coretype = KeyRelease; + break; + default: + break; + } + return coretype; +} + +/** + * Return the corresponding XI 1.x type for the given event or 0 if no + * equivalent exists. + */ +int +GetXIType(enum EventType type) +{ + int xitype = 0; + + switch (type) { + case ET_Motion: + xitype = DeviceMotionNotify; + break; + case ET_ButtonPress: + xitype = DeviceButtonPress; + break; + case ET_ButtonRelease: + xitype = DeviceButtonRelease; + break; + case ET_KeyPress: + xitype = DeviceKeyPress; + break; + case ET_KeyRelease: + xitype = DeviceKeyRelease; + break; + case ET_ProximityIn: + xitype = ProximityIn; + break; + case ET_ProximityOut: + xitype = ProximityOut; + break; + default: + break; + } + return xitype; +} + +/** + * Return the corresponding XI 2.x type for the given event or 0 if no + * equivalent exists. + */ +int +GetXI2Type(enum EventType type) +{ + int xi2type = 0; + + switch (type) { + case ET_Motion: + xi2type = XI_Motion; + break; + case ET_ButtonPress: + xi2type = XI_ButtonPress; + break; + case ET_ButtonRelease: + xi2type = XI_ButtonRelease; + break; + case ET_KeyPress: + xi2type = XI_KeyPress; + break; + case ET_KeyRelease: + xi2type = XI_KeyRelease; + break; + case ET_Enter: + xi2type = XI_Enter; + break; + case ET_Leave: + xi2type = XI_Leave; + break; + case ET_Hierarchy: + xi2type = XI_HierarchyChanged; + break; + case ET_DeviceChanged: + xi2type = XI_DeviceChanged; + break; + case ET_RawKeyPress: + xi2type = XI_RawKeyPress; + break; + case ET_RawKeyRelease: + xi2type = XI_RawKeyRelease; + break; + case ET_RawButtonPress: + xi2type = XI_RawButtonPress; + break; + case ET_RawButtonRelease: + xi2type = XI_RawButtonRelease; + break; + case ET_RawMotion: + xi2type = XI_RawMotion; + break; + case ET_RawTouchBegin: + xi2type = XI_RawTouchBegin; + break; + case ET_RawTouchUpdate: + xi2type = XI_RawTouchUpdate; + break; + case ET_RawTouchEnd: + xi2type = XI_RawTouchEnd; + break; + case ET_FocusIn: + xi2type = XI_FocusIn; + break; + case ET_FocusOut: + xi2type = XI_FocusOut; + break; + case ET_TouchBegin: + xi2type = XI_TouchBegin; + break; + case ET_TouchEnd: + xi2type = XI_TouchEnd; + break; + case ET_TouchUpdate: + xi2type = XI_TouchUpdate; + break; + case ET_TouchOwnership: + xi2type = XI_TouchOwnership; + break; + case ET_BarrierHit: + xi2type = XI_BarrierHit; + break; + case ET_BarrierLeave: + xi2type = XI_BarrierLeave; + break; + default: + break; + } + return xi2type; +} diff --git a/dix/events.c b/dix/events.c new file mode 100644 index 0000000..4aaa54c --- /dev/null +++ b/dix/events.c @@ -0,0 +1,6175 @@ +/************************************************************ + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +/* + * Copyright (c) 2003-2005, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/** @file events.c + * This file handles event delivery and a big part of the server-side protocol + * handling (the parts for input devices). + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include "misc.h" +#include "resource.h" +#include <X11/Xproto.h> +#include "windowstr.h" +#include "inputstr.h" +#include "inpututils.h" +#include "scrnintstr.h" +#include "cursorstr.h" + +#include "dixstruct.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "globals.h" + +#include <X11/extensions/XKBproto.h> +#include "xkbsrv.h" +#include "xace.h" + +#ifdef XSERVER_DTRACE +#include <sys/types.h> +typedef const char *string; + +#include "Xserver-dtrace.h" +#endif + +#include <X11/extensions/XIproto.h> +#include <X11/extensions/XI2proto.h> +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2.h> +#include "exglobals.h" +#include "exevents.h" +#include "extnsionst.h" + +#include "dixevents.h" +#include "dixgrabs.h" +#include "dispatch.h" + +#include <X11/extensions/ge.h> +#include "geext.h" +#include "geint.h" + +#include "eventstr.h" +#include "enterleave.h" +#include "eventconvert.h" +#include "mi.h" + +/* Extension events type numbering starts at EXTENSION_EVENT_BASE. */ +#define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ +#define StructureAndSubMask ( StructureNotifyMask | SubstructureNotifyMask ) +#define AllButtonsMask ( \ + Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) +#define MotionMask ( \ + PointerMotionMask | Button1MotionMask | \ + Button2MotionMask | Button3MotionMask | Button4MotionMask | \ + Button5MotionMask | ButtonMotionMask ) +#define PropagateMask ( \ + KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \ + MotionMask ) +#define PointerGrabMask ( \ + ButtonPressMask | ButtonReleaseMask | \ + EnterWindowMask | LeaveWindowMask | \ + PointerMotionHintMask | KeymapStateMask | \ + MotionMask ) +#define AllModifiersMask ( \ + ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ + Mod3Mask | Mod4Mask | Mod5Mask ) +#define LastEventMask OwnerGrabButtonMask +#define AllEventMasks (LastEventMask|(LastEventMask-1)) + +/* @return the core event type or 0 if the event is not a core event */ +static inline int +core_get_type(const xEvent *event) +{ + int type = event->u.u.type; + + return ((type & EXTENSION_EVENT_BASE) || type == GenericEvent) ? 0 : type; +} + +/* @return the XI2 event type or 0 if the event is not a XI2 event */ +static inline int +xi2_get_type(const xEvent *event) +{ + const xGenericEvent *e = (const xGenericEvent *) event; + + return (e->type != GenericEvent || + e->extension != IReqCode) ? 0 : e->evtype; +} + +/** + * Used to indicate a implicit passive grab created by a ButtonPress event. + * See DeliverEventsToWindow(). + */ +#define ImplicitGrabMask (1 << 7) + +#define WID(w) ((w) ? ((w)->drawable.id) : 0) + +#define XE_KBPTR (xE->u.keyButtonPointer) + +CallbackListPtr EventCallback; +CallbackListPtr DeviceEventCallback; + +#define DNPMCOUNT 8 + +Mask DontPropagateMasks[DNPMCOUNT]; +static int DontPropagateRefCnts[DNPMCOUNT]; + +static void CheckVirtualMotion(DeviceIntPtr pDev, QdEventPtr qe, + WindowPtr pWin); +static void CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, + Bool generateEvents, Bool confineToScreen, + ScreenPtr pScreen); +static Bool IsWrongPointerBarrierClient(ClientPtr client, + DeviceIntPtr dev, + xEvent *event); + +/** Key repeat hack. Do not use but in TryClientEvents */ +extern BOOL EventIsKeyRepeat(xEvent *event); + +/** + * Main input device struct. + * inputInfo.pointer + * is the core pointer. Referred to as "virtual core pointer", "VCP", + * "core pointer" or inputInfo.pointer. The VCP is the first master + * pointer device and cannot be deleted. + * + * inputInfo.keyboard + * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard"). + * See inputInfo.pointer. + * + * inputInfo.devices + * linked list containing all devices including VCP and VCK. + * + * inputInfo.off_devices + * Devices that have not been initialized and are thus turned off. + * + * inputInfo.numDevices + * Total number of devices. + * + * inputInfo.all_devices + * Virtual device used for XIAllDevices passive grabs. This device is + * not part of the inputInfo.devices list and mostly unset except for + * the deviceid. It exists because passivegrabs need a valid device + * reference. + * + * inputInfo.all_master_devices + * Virtual device used for XIAllMasterDevices passive grabs. This device + * is not part of the inputInfo.devices list and mostly unset except for + * the deviceid. It exists because passivegrabs need a valid device + * reference. + */ +InputInfo inputInfo; + +EventSyncInfoRec syncEvents; + +static struct DeviceEventTime { + Bool reset; + TimeStamp time; +} lastDeviceEventTime[MAXDEVICES]; + +/** + * The root window the given device is currently on. + */ +#define RootWindow(sprite) sprite->spriteTrace[0] + +static xEvent *swapEvent = NULL; +static int swapEventLen = 0; + +void +NotImplemented(xEvent *from, xEvent *to) +{ + FatalError("Not implemented"); +} + +/** + * Convert the given event type from an XI event to a core event. + * @param[in] The XI 1.x event type. + * @return The matching core event type or 0 if there is none. + */ +int +XItoCoreType(int xitype) +{ + int coretype = 0; + + if (xitype == DeviceMotionNotify) + coretype = MotionNotify; + else if (xitype == DeviceButtonPress) + coretype = ButtonPress; + else if (xitype == DeviceButtonRelease) + coretype = ButtonRelease; + else if (xitype == DeviceKeyPress) + coretype = KeyPress; + else if (xitype == DeviceKeyRelease) + coretype = KeyRelease; + + return coretype; +} + +/** + * @return true if the device owns a cursor, false if device shares a cursor + * sprite with another device. + */ +Bool +DevHasCursor(DeviceIntPtr pDev) +{ + return pDev->spriteInfo->spriteOwner; +} + +/* + * @return true if a device is a pointer, check is the same as used by XI to + * fill the 'use' field. + */ +Bool +IsPointerDevice(DeviceIntPtr dev) +{ + return (dev->type == MASTER_POINTER) || + (dev->valuator && dev->button) || (dev->valuator && !dev->key); +} + +/* + * @return true if a device is a keyboard, check is the same as used by XI to + * fill the 'use' field. + * + * Some pointer devices have keys as well (e.g. multimedia keys). Try to not + * count them as keyboard devices. + */ +Bool +IsKeyboardDevice(DeviceIntPtr dev) +{ + return (dev->type == MASTER_KEYBOARD) || + ((dev->key && dev->kbdfeed) && !IsPointerDevice(dev)); +} + +Bool +IsMaster(DeviceIntPtr dev) +{ + return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD; +} + +Bool +IsFloating(DeviceIntPtr dev) +{ + return !IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == NULL; +} + +/** + * Max event opcode. + */ +extern int lastEvent; + +#define CantBeFiltered NoEventMask +/** + * Event masks for each event type. + * + * One set of filters for each device, initialized by memcpy of + * default_filter in InitEvents. + * + * Filters are used whether a given event may be delivered to a client, + * usually in the form of if (window-event-mask & filter); then deliver event. + * + * One notable filter is for PointerMotion/DevicePointerMotion events. Each + * time a button is pressed, the filter is modified to also contain the + * matching ButtonXMotion mask. + */ +Mask event_filters[MAXDEVICES][MAXEVENTS]; + +static const Mask default_filter[MAXEVENTS] = { + NoSuchEvent, /* 0 */ + NoSuchEvent, /* 1 */ + KeyPressMask, /* KeyPress */ + KeyReleaseMask, /* KeyRelease */ + ButtonPressMask, /* ButtonPress */ + ButtonReleaseMask, /* ButtonRelease */ + PointerMotionMask, /* MotionNotify (initial state) */ + EnterWindowMask, /* EnterNotify */ + LeaveWindowMask, /* LeaveNotify */ + FocusChangeMask, /* FocusIn */ + FocusChangeMask, /* FocusOut */ + KeymapStateMask, /* KeymapNotify */ + ExposureMask, /* Expose */ + CantBeFiltered, /* GraphicsExpose */ + CantBeFiltered, /* NoExpose */ + VisibilityChangeMask, /* VisibilityNotify */ + SubstructureNotifyMask, /* CreateNotify */ + StructureAndSubMask, /* DestroyNotify */ + StructureAndSubMask, /* UnmapNotify */ + StructureAndSubMask, /* MapNotify */ + SubstructureRedirectMask, /* MapRequest */ + StructureAndSubMask, /* ReparentNotify */ + StructureAndSubMask, /* ConfigureNotify */ + SubstructureRedirectMask, /* ConfigureRequest */ + StructureAndSubMask, /* GravityNotify */ + ResizeRedirectMask, /* ResizeRequest */ + StructureAndSubMask, /* CirculateNotify */ + SubstructureRedirectMask, /* CirculateRequest */ + PropertyChangeMask, /* PropertyNotify */ + CantBeFiltered, /* SelectionClear */ + CantBeFiltered, /* SelectionRequest */ + CantBeFiltered, /* SelectionNotify */ + ColormapChangeMask, /* ColormapNotify */ + CantBeFiltered, /* ClientMessage */ + CantBeFiltered /* MappingNotify */ +}; + +/** + * For the given event, return the matching event filter. This filter may then + * be AND'ed with the selected event mask. + * + * For XI2 events, the returned filter is simply the byte containing the event + * mask we're interested in. E.g. for a mask of (1 << 13), this would be + * byte[1]. + * + * @param[in] dev The device the event belongs to, may be NULL. + * @param[in] event The event to get the filter for. Only the type of the + * event matters, or the extension + evtype for GenericEvents. + * @return The filter mask for the given event. + * + * @see GetEventMask + */ +Mask +GetEventFilter(DeviceIntPtr dev, xEvent *event) +{ + int evtype = 0; + + if (event->u.u.type != GenericEvent) + return event_get_filter_from_type(dev, event->u.u.type); + else if ((evtype = xi2_get_type(event))) + return event_get_filter_from_xi2type(evtype); + ErrorF("[dix] Unknown event type %d. No filter\n", event->u.u.type); + return 0; +} + +/** + * Return the single byte of the device's XI2 mask that contains the mask + * for the event_type. + */ +int +GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type) +{ + /* we just return the matching filter because that's the only use + * for this mask anyway. + */ + if (xi2mask_isset(mask, dev, event_type)) + return event_get_filter_from_xi2type(event_type); + else + return 0; +} + +/** + * @return TRUE if the mask is set for this event from this device on the + * window, or FALSE otherwise. + */ +Bool +WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev) +{ + OtherInputMasks *inputMasks = wOtherInputMasks(win); + int evtype; + + if (!inputMasks || xi2_get_type(ev) == 0) + return 0; + + evtype = ((xGenericEvent *) ev)->evtype; + + return xi2mask_isset(inputMasks->xi2mask, dev, evtype); +} + +Mask +GetEventMask(DeviceIntPtr dev, xEvent *event, InputClients * other) +{ + int evtype; + + /* XI2 filters are only ever 8 bit, so let's return a 8 bit mask */ + if ((evtype = xi2_get_type(event))) { + return GetXI2MaskByte(other->xi2mask, dev, evtype); + } + else if (core_get_type(event) != 0) + return other->mask[XIAllDevices]; + else + return other->mask[dev->id]; +} + +static CARD8 criticalEvents[32] = { + 0x7c, 0x30, 0x40 /* key, button, expose, and configure events */ +}; + +static void +SyntheticMotion(DeviceIntPtr dev, int x, int y) +{ + int screenno = 0; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + screenno = dev->spriteInfo->sprite->screen->myNum; +#endif + PostSyntheticMotion(dev, x, y, screenno, + (syncEvents.playingEvents) ? syncEvents.time. + milliseconds : currentTime.milliseconds); + +} + +#ifdef PANORAMIX +static void PostNewCursor(DeviceIntPtr pDev); + +static Bool +XineramaSetCursorPosition(DeviceIntPtr pDev, int x, int y, Bool generateEvent) +{ + ScreenPtr pScreen; + int i; + SpritePtr pSprite = pDev->spriteInfo->sprite; + + /* x,y are in Screen 0 coordinates. We need to decide what Screen + to send the message too and what the coordinates relative to + that screen are. */ + + pScreen = pSprite->screen; + x += screenInfo.screens[0]->x; + y += screenInfo.screens[0]->y; + + if (!point_on_screen(pScreen, x, y)) { + FOR_NSCREENS(i) { + if (i == pScreen->myNum) + continue; + if (point_on_screen(screenInfo.screens[i], x, y)) { + pScreen = screenInfo.screens[i]; + break; + } + } + } + + pSprite->screen = pScreen; + pSprite->hotPhys.x = x - screenInfo.screens[0]->x; + pSprite->hotPhys.y = y - screenInfo.screens[0]->y; + x -= pScreen->x; + y -= pScreen->y; + + return (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); +} + +static void +XineramaConstrainCursor(DeviceIntPtr pDev) +{ + SpritePtr pSprite = pDev->spriteInfo->sprite; + ScreenPtr pScreen; + BoxRec newBox; + + pScreen = pSprite->screen; + newBox = pSprite->physLimits; + + /* Translate the constraining box to the screen + the sprite is actually on */ + newBox.x1 += screenInfo.screens[0]->x - pScreen->x; + newBox.x2 += screenInfo.screens[0]->x - pScreen->x; + newBox.y1 += screenInfo.screens[0]->y - pScreen->y; + newBox.y2 += screenInfo.screens[0]->y - pScreen->y; + + (*pScreen->ConstrainCursor) (pDev, pScreen, &newBox); +} + +static Bool +XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) +{ + SpritePtr pSprite = pDev->spriteInfo->sprite; + + if (pWin == screenInfo.screens[0]->root) { + int i; + + FOR_NSCREENS(i) + pSprite->windows[i] = screenInfo.screens[i]->root; + } + else { + PanoramiXRes *win; + int rc, i; + + rc = dixLookupResourceByType((pointer *) &win, pWin->drawable.id, + XRT_WINDOW, serverClient, DixReadAccess); + if (rc != Success) + return FALSE; + + FOR_NSCREENS(i) { + rc = dixLookupWindow(pSprite->windows + i, win->info[i].id, + serverClient, DixReadAccess); + if (rc != Success) /* window is being unmapped */ + return FALSE; + } + } + return TRUE; +} + +static void +XineramaConfineCursorToWindow(DeviceIntPtr pDev, + WindowPtr pWin, Bool generateEvents) +{ + SpritePtr pSprite = pDev->spriteInfo->sprite; + + int x, y, off_x, off_y, i; + + if (!XineramaSetWindowPntrs(pDev, pWin)) + return; + + i = PanoramiXNumScreens - 1; + + RegionCopy(&pSprite->Reg1, &pSprite->windows[i]->borderSize); + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; + + while (i--) { + x = off_x - screenInfo.screens[i]->x; + y = off_y - screenInfo.screens[i]->y; + + if (x || y) + RegionTranslate(&pSprite->Reg1, x, y); + + RegionUnion(&pSprite->Reg1, &pSprite->Reg1, + &pSprite->windows[i]->borderSize); + + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; + } + + pSprite->hotLimits = *RegionExtents(&pSprite->Reg1); + + if (RegionNumRects(&pSprite->Reg1) > 1) + pSprite->hotShape = &pSprite->Reg1; + else + pSprite->hotShape = NullRegion; + + pSprite->confined = FALSE; + pSprite->confineWin = + (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin; + + CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL); +} + +#endif /* PANORAMIX */ + +/** + * Modifies the filter for the given protocol event type to the given masks. + * + * There's only two callers: UpdateDeviceState() and XI's SetMaskForExtEvent(). + * The latter initialises masks for the matching XI events, it's a once-off + * setting. + * UDS however changes the mask for MotionNotify and DeviceMotionNotify each + * time a button is pressed to include the matching ButtonXMotion mask in the + * filter. + * + * @param[in] deviceid The device to modify the filter for. + * @param[in] mask The new filter mask. + * @param[in] event Protocol event type. + */ +void +SetMaskForEvent(int deviceid, Mask mask, int event) +{ + if (deviceid < 0 || deviceid >= MAXDEVICES) + FatalError("SetMaskForEvent: bogus device id"); + event_filters[deviceid][event] = mask; +} + +void +SetCriticalEvent(int event) +{ + if (event >= MAXEVENTS) + FatalError("SetCriticalEvent: bogus event number"); + criticalEvents[event >> 3] |= 1 << (event & 7); +} + +void +ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) +{ + BoxRec box; + int x = *px, y = *py; + int incx = 1, incy = 1; + + if (RegionContainsPoint(shape, x, y, &box)) + return; + box = *RegionExtents(shape); + /* this is rather crude */ + do { + x += incx; + if (x >= box.x2) { + incx = -1; + x = *px - 1; + } + else if (x < box.x1) { + incx = 1; + x = *px; + y += incy; + if (y >= box.y2) { + incy = -1; + y = *py - 1; + } + else if (y < box.y1) + return; /* should never get here! */ + } + } while (!RegionContainsPoint(shape, x, y, &box)); + *px = x; + *py = y; +} + +static void +CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, + Bool confineToScreen, /* unused if PanoramiX on */ + ScreenPtr pScreen) /* unused if PanoramiX on */ +{ + HotSpot new; + SpritePtr pSprite = pDev->spriteInfo->sprite; + + if (!cursor) + return; + new = pSprite->hotPhys; +#ifdef PANORAMIX + if (!noPanoramiXExtension) + /* I don't care what the DDX has to say about it */ + pSprite->physLimits = pSprite->hotLimits; + else +#endif + { + if (pScreen) + new.pScreen = pScreen; + else + pScreen = new.pScreen; + (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits, + &pSprite->physLimits); + pSprite->confined = confineToScreen; + (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); + } + + /* constrain the pointer to those limits */ + if (new.x < pSprite->physLimits.x1) + new.x = pSprite->physLimits.x1; + else if (new.x >= pSprite->physLimits.x2) + new.x = pSprite->physLimits.x2 - 1; + if (new.y < pSprite->physLimits.y1) + new.y = pSprite->physLimits.y1; + else if (new.y >= pSprite->physLimits.y2) + new.y = pSprite->physLimits.y2 - 1; + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); + if (( +#ifdef PANORAMIX + noPanoramiXExtension && +#endif + (pScreen != pSprite->hotPhys.pScreen)) || + (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { +#ifdef PANORAMIX + if (!noPanoramiXExtension) + XineramaSetCursorPosition(pDev, new.x, new.y, generateEvents); + else +#endif + { + if (pScreen != pSprite->hotPhys.pScreen) + pSprite->hotPhys = new; + (*pScreen->SetCursorPosition) + (pDev, pScreen, new.x, new.y, generateEvents); + } + if (!generateEvents) + SyntheticMotion(pDev, new.x, new.y); + } + +#ifdef PANORAMIX + /* Tell DDX what the limits are */ + if (!noPanoramiXExtension) + XineramaConstrainCursor(pDev); +#endif +} + +static void +CheckVirtualMotion(DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin) +{ + SpritePtr pSprite = pDev->spriteInfo->sprite; + RegionPtr reg = NULL; + DeviceEvent *ev = NULL; + + if (qe) { + ev = &qe->event->device_event; + switch (ev->type) { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + pSprite->hot.pScreen = qe->pScreen; + pSprite->hot.x = ev->root_x; + pSprite->hot.y = ev->root_y; + pWin = + pDev->deviceGrab.grab ? pDev->deviceGrab.grab-> + confineTo : NullWindow; + break; + default: + break; + } + } + if (pWin) { + BoxRec lims; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + int x, y, off_x, off_y, i; + + if (!XineramaSetWindowPntrs(pDev, pWin)) + return; + + i = PanoramiXNumScreens - 1; + + RegionCopy(&pSprite->Reg2, &pSprite->windows[i]->borderSize); + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; + + while (i--) { + x = off_x - screenInfo.screens[i]->x; + y = off_y - screenInfo.screens[i]->y; + + if (x || y) + RegionTranslate(&pSprite->Reg2, x, y); + + RegionUnion(&pSprite->Reg2, &pSprite->Reg2, + &pSprite->windows[i]->borderSize); + + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; + } + } + else +#endif + { + if (pSprite->hot.pScreen != pWin->drawable.pScreen) { + pSprite->hot.pScreen = pWin->drawable.pScreen; + pSprite->hot.x = pSprite->hot.y = 0; + } + } + + lims = *RegionExtents(&pWin->borderSize); + if (pSprite->hot.x < lims.x1) + pSprite->hot.x = lims.x1; + else if (pSprite->hot.x >= lims.x2) + pSprite->hot.x = lims.x2 - 1; + if (pSprite->hot.y < lims.y1) + pSprite->hot.y = lims.y1; + else if (pSprite->hot.y >= lims.y2) + pSprite->hot.y = lims.y2 - 1; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + if (RegionNumRects(&pSprite->Reg2) > 1) + reg = &pSprite->Reg2; + + } + else +#endif + { + if (wBoundingShape(pWin)) + reg = &pWin->borderSize; + } + + if (reg) + ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y); + + if (qe && ev) { + qe->pScreen = pSprite->hot.pScreen; + ev->root_x = pSprite->hot.x; + ev->root_y = pSprite->hot.y; + } + } +#ifdef PANORAMIX + if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */ +#endif + RootWindow(pDev->spriteInfo->sprite) = pSprite->hot.pScreen->root; +} + +static void +ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, + Bool confineToScreen) +{ + SpritePtr pSprite = pDev->spriteInfo->sprite; + + if (syncEvents.playingEvents) { + CheckVirtualMotion(pDev, (QdEventPtr) NULL, pWin); + SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y); + } + else { +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + XineramaConfineCursorToWindow(pDev, pWin, generateEvents); + return; + } +#endif + pSprite->hotLimits = *RegionExtents(&pWin->borderSize); + pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize + : NullRegion; + CheckPhysLimits(pDev, pSprite->current, generateEvents, + confineToScreen, pWin->drawable.pScreen); + } +} + +Bool +PointerConfinedToScreen(DeviceIntPtr pDev) +{ + return pDev->spriteInfo->sprite->confined; +} + +/** + * Update the sprite cursor to the given cursor. + * + * ChangeToCursor() will display the new cursor and free the old cursor (if + * applicable). If the provided cursor is already the updated cursor, nothing + * happens. + */ +static void +ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) +{ + SpritePtr pSprite = pDev->spriteInfo->sprite; + ScreenPtr pScreen; + + if (cursor != pSprite->current) { + if ((pSprite->current->bits->xhot != cursor->bits->xhot) || + (pSprite->current->bits->yhot != cursor->bits->yhot)) + CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined, + (ScreenPtr) NULL); +#ifdef PANORAMIX + /* XXX: is this really necessary?? (whot) */ + if (!noPanoramiXExtension) + pScreen = pSprite->screen; + else +#endif + pScreen = pSprite->hotPhys.pScreen; + + (*pScreen->DisplayCursor) (pDev, pScreen, cursor); + FreeCursor(pSprite->current, (Cursor) 0); + pSprite->current = RefCursor(cursor); + } +} + +/** + * @returns true if b is a descendent of a + */ +Bool +IsParent(WindowPtr a, WindowPtr b) +{ + for (b = b->parent; b; b = b->parent) + if (b == a) + return TRUE; + return FALSE; +} + +/** + * Update the cursor displayed on the screen. + * + * Called whenever a cursor may have changed shape or position. + */ +static void +PostNewCursor(DeviceIntPtr pDev) +{ + WindowPtr win; + GrabPtr grab = pDev->deviceGrab.grab; + SpritePtr pSprite = pDev->spriteInfo->sprite; + CursorPtr pCursor; + + if (syncEvents.playingEvents) + return; + if (grab) { + if (grab->cursor) { + ChangeToCursor(pDev, grab->cursor); + return; + } + if (IsParent(grab->window, pSprite->win)) + win = pSprite->win; + else + win = grab->window; + } + else + win = pSprite->win; + for (; win; win = win->parent) { + if (win->optional) { + pCursor = WindowGetDeviceCursor(win, pDev); + if (!pCursor && win->optional->cursor != NullCursor) + pCursor = win->optional->cursor; + if (pCursor) { + ChangeToCursor(pDev, pCursor); + return; + } + } + } +} + +/** + * @param dev device which you want to know its current root window + * @return root window where dev's sprite is located + */ +WindowPtr +GetCurrentRootWindow(DeviceIntPtr dev) +{ + return RootWindow(dev->spriteInfo->sprite); +} + +/** + * @return window underneath the cursor sprite. + */ +WindowPtr +GetSpriteWindow(DeviceIntPtr pDev) +{ + return pDev->spriteInfo->sprite->win; +} + +/** + * @return current sprite cursor. + */ +CursorPtr +GetSpriteCursor(DeviceIntPtr pDev) +{ + return pDev->spriteInfo->sprite->current; +} + +/** + * Set x/y current sprite position in screen coordinates. + */ +void +GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) +{ + SpritePtr pSprite = pDev->spriteInfo->sprite; + + *px = pSprite->hotPhys.x; + *py = pSprite->hotPhys.y; +} + +#ifdef PANORAMIX +int +XineramaGetCursorScreen(DeviceIntPtr pDev) +{ + if (!noPanoramiXExtension) { + return pDev->spriteInfo->sprite->screen->myNum; + } + else { + return 0; + } +} +#endif /* PANORAMIX */ + +#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */ + +static void +MonthChangedOrBadTime(CARD32 *ms) +{ + /* If the ddx/OS is careless about not processing timestamped events from + * different sources in sorted order, then it's possible for time to go + * backwards when it should not. Here we ensure a decent time. + */ + if ((currentTime.milliseconds - *ms) > TIMESLOP) + currentTime.months++; + else + *ms = currentTime.milliseconds; +} + +void +NoticeTime(const DeviceIntPtr dev, TimeStamp time) +{ + lastDeviceEventTime[XIAllDevices].time = currentTime; + lastDeviceEventTime[dev->id].time = currentTime; + + LastEventTimeToggleResetFlag(dev->id, TRUE); + LastEventTimeToggleResetFlag(XIAllDevices, TRUE); +} + +static void +NoticeTimeMillis(const DeviceIntPtr dev, CARD32 *ms) +{ + TimeStamp time; + if (*ms < currentTime.milliseconds) + MonthChangedOrBadTime(ms); + time.months = currentTime.months; + time.milliseconds = *ms; + NoticeTime(dev, time); +} + +void +NoticeEventTime(InternalEvent *ev, DeviceIntPtr dev) +{ + if (!syncEvents.playingEvents) + NoticeTimeMillis(dev, &ev->any.time); +} + +TimeStamp +LastEventTime(int deviceid) +{ + return lastDeviceEventTime[deviceid].time; +} + +Bool +LastEventTimeWasReset(int deviceid) +{ + return lastDeviceEventTime[deviceid].reset; +} + +void +LastEventTimeToggleResetFlag(int deviceid, Bool state) +{ + lastDeviceEventTime[deviceid].reset = state; +} + +void +LastEventTimeToggleResetAll(Bool state) +{ + DeviceIntPtr dev; + nt_list_for_each_entry(dev, inputInfo.devices, next) { + LastEventTimeToggleResetFlag(dev->id, FALSE); + } + LastEventTimeToggleResetFlag(XIAllDevices, FALSE); + LastEventTimeToggleResetFlag(XIAllMasterDevices, FALSE); +} + +/************************************************************************** + * The following procedures deal with synchronous events * + **************************************************************************/ + +/** + * EnqueueEvent is a device's processInputProc if a device is frozen. + * Instead of delivering the events to the client, the event is tacked onto a + * linked list for later delivery. + */ +void +EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) +{ + QdEventPtr tail = NULL; + QdEventPtr qe; + SpritePtr pSprite = device->spriteInfo->sprite; + int eventlen; + DeviceEvent *event = &ev->device_event; + + if (!xorg_list_is_empty(&syncEvents.pending)) + tail = xorg_list_last_entry(&syncEvents.pending, QdEventRec, next); + + NoticeTimeMillis(device, &ev->any.time); + + /* Fix for key repeating bug. */ + if (device->key != NULL && device->key->xkbInfo != NULL && + event->type == ET_KeyRelease) + AccessXCancelRepeatKey(device->key->xkbInfo, event->detail.key); + + if (DeviceEventCallback) { + DeviceEventInfoRec eventinfo; + + /* The RECORD spec says that the root window field of motion events + * must be valid. At this point, it hasn't been filled in yet, so + * we do it here. The long expression below is necessary to get + * the current root window; the apparently reasonable alternative + * GetCurrentRootWindow()->drawable.id doesn't give you the right + * answer on the first motion event after a screen change because + * the data that GetCurrentRootWindow relies on hasn't been + * updated yet. + */ + if (ev->any.type == ET_Motion) + ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id; + + eventinfo.event = ev; + eventinfo.device = device; + CallCallbacks(&DeviceEventCallback, (pointer) &eventinfo); + } + + if (event->type == ET_Motion) { +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + event->root_x += pSprite->screen->x - screenInfo.screens[0]->x; + event->root_y += pSprite->screen->y - screenInfo.screens[0]->y; + } +#endif + pSprite->hotPhys.x = event->root_x; + pSprite->hotPhys.y = event->root_y; + /* do motion compression, but not if from different devices */ + if (tail && + (tail->event->any.type == ET_Motion) && + (tail->device == device) && + (tail->pScreen == pSprite->hotPhys.pScreen)) { + DeviceEvent *tailev = &tail->event->device_event; + + tailev->root_x = pSprite->hotPhys.x; + tailev->root_y = pSprite->hotPhys.y; + tailev->time = event->time; + tail->months = currentTime.months; + return; + } + } + + eventlen = event->length; + + qe = malloc(sizeof(QdEventRec) + eventlen); + if (!qe) + return; + xorg_list_init(&qe->next); + qe->device = device; + qe->pScreen = pSprite->hotPhys.pScreen; + qe->months = currentTime.months; + qe->event = (InternalEvent *) (qe + 1); + memcpy(qe->event, event, eventlen); + xorg_list_append(&qe->next, &syncEvents.pending); +} + +/** + * Run through the list of events queued up in syncEvents. + * For each event do: + * If the device for this event is not frozen anymore, take it and process it + * as usually. + * After that, check if there's any devices in the list that are not frozen. + * If there is none, we're done. If there is at least one device that is not + * frozen, then re-run from the beginning of the event queue. + */ +void +PlayReleasedEvents(void) +{ + QdEventPtr tmp; + QdEventPtr qe; + DeviceIntPtr dev; + DeviceIntPtr pDev; + + restart: + xorg_list_for_each_entry_safe(qe, tmp, &syncEvents.pending, next) { + if (!qe->device->deviceGrab.sync.frozen) { + xorg_list_del(&qe->next); + pDev = qe->device; + if (qe->event->any.type == ET_Motion) + CheckVirtualMotion(pDev, qe, NullWindow); + syncEvents.time.months = qe->months; + syncEvents.time.milliseconds = qe->event->any.time; +#ifdef PANORAMIX + /* Translate back to the sprite screen since processInputProc + will translate from sprite screen to screen 0 upon reentry + to the DIX layer */ + if (!noPanoramiXExtension) { + DeviceEvent *ev = &qe->event->device_event; + + switch (ev->type) { + case ET_Motion: + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_KeyPress: + case ET_KeyRelease: + case ET_ProximityIn: + case ET_ProximityOut: + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + ev->root_x += screenInfo.screens[0]->x - + pDev->spriteInfo->sprite->screen->x; + ev->root_y += screenInfo.screens[0]->y - + pDev->spriteInfo->sprite->screen->y; + break; + default: + break; + } + + } +#endif + (*qe->device->public.processInputProc) (qe->event, qe->device); + free(qe); + for (dev = inputInfo.devices; dev && dev->deviceGrab.sync.frozen; + dev = dev->next); + if (!dev) + break; + + /* Playing the event may have unfrozen another device. */ + /* So to play it safe, restart at the head of the queue */ + goto restart; + } + } +} + +/** + * Freeze or thaw the given devices. The device's processing proc is + * switched to either the real processing proc (in case of thawing) or an + * enqueuing processing proc (usually EnqueueEvent()). + * + * @param dev The device to freeze/thaw + * @param frozen True to freeze or false to thaw. + */ +static void +FreezeThaw(DeviceIntPtr dev, Bool frozen) +{ + dev->deviceGrab.sync.frozen = frozen; + if (frozen) + dev->public.processInputProc = dev->public.enqueueInputProc; + else + dev->public.processInputProc = dev->public.realInputProc; +} + +/** + * Unfreeze devices and replay all events to the respective clients. + * + * ComputeFreezes takes the first event in the device's frozen event queue. It + * runs up the sprite tree (spriteTrace) and searches for the window to replay + * the events from. If it is found, it checks for passive grabs one down from + * the window or delivers the events. + */ +static void +ComputeFreezes(void) +{ + DeviceIntPtr replayDev = syncEvents.replayDev; + WindowPtr w; + GrabPtr grab; + DeviceIntPtr dev; + + for (dev = inputInfo.devices; dev; dev = dev->next) + FreezeThaw(dev, dev->deviceGrab.sync.other || + (dev->deviceGrab.sync.state >= FROZEN)); + if (syncEvents.playingEvents || + (!replayDev && xorg_list_is_empty(&syncEvents.pending))) + return; + syncEvents.playingEvents = TRUE; + if (replayDev) { + DeviceEvent *event = replayDev->deviceGrab.sync.event; + + syncEvents.replayDev = (DeviceIntPtr) NULL; + + w = XYToWindow(replayDev->spriteInfo->sprite, + event->root_x, event->root_y); + if (!CheckDeviceGrabs(replayDev, event, syncEvents.replayWin)) { + if (IsTouchEvent((InternalEvent *) event)) { + TouchPointInfoPtr ti = + TouchFindByClientID(replayDev, event->touchid); + BUG_WARN(!ti); + + TouchListenerAcceptReject(replayDev, ti, 0, XIRejectTouch); + } + else if (replayDev->focus && + !IsPointerEvent((InternalEvent *) event)) + DeliverFocusedEvent(replayDev, (InternalEvent *) event, w); + else + DeliverDeviceEvents(w, (InternalEvent *) event, NullGrab, + NullWindow, replayDev); + } + } + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (!dev->deviceGrab.sync.frozen) { + PlayReleasedEvents(); + break; + } + } + syncEvents.playingEvents = FALSE; + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (DevHasCursor(dev)) { + /* the following may have been skipped during replay, + so do it now */ + if ((grab = dev->deviceGrab.grab) && grab->confineTo) { + if (grab->confineTo->drawable.pScreen != + dev->spriteInfo->sprite->hotPhys.pScreen) + dev->spriteInfo->sprite->hotPhys.x = + dev->spriteInfo->sprite->hotPhys.y = 0; + ConfineCursorToWindow(dev, grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(dev, + dev->spriteInfo->sprite->hotPhys.pScreen-> + root, TRUE, FALSE); + PostNewCursor(dev); + } + } +} + +#ifdef RANDR +void +ScreenRestructured(ScreenPtr pScreen) +{ + GrabPtr grab; + DeviceIntPtr pDev; + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if (!IsFloating(pDev) && !DevHasCursor(pDev)) + continue; + + /* GrabDevice doesn't have a confineTo field, so we don't need to + * worry about it. */ + if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { + if (grab->confineTo->drawable.pScreen + != pDev->spriteInfo->sprite->hotPhys.pScreen) + pDev->spriteInfo->sprite->hotPhys.x = + pDev->spriteInfo->sprite->hotPhys.y = 0; + ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(pDev, + pDev->spriteInfo->sprite->hotPhys.pScreen-> + root, TRUE, FALSE); + } +} +#endif + +static void +CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) +{ + GrabPtr grab = thisDev->deviceGrab.grab; + DeviceIntPtr dev; + + if (thisMode == GrabModeSync) + thisDev->deviceGrab.sync.state = FROZEN_NO_EVENT; + else { /* free both if same client owns both */ + thisDev->deviceGrab.sync.state = THAWED; + if (thisDev->deviceGrab.sync.other && + (CLIENT_BITS(thisDev->deviceGrab.sync.other->resource) == + CLIENT_BITS(grab->resource))) + thisDev->deviceGrab.sync.other = NullGrab; + } + + if (IsMaster(thisDev)) { + dev = GetPairedDevice(thisDev); + if (otherMode == GrabModeSync) + dev->deviceGrab.sync.other = grab; + else { /* free both if same client owns both */ + if (dev->deviceGrab.sync.other && + (CLIENT_BITS(dev->deviceGrab.sync.other->resource) == + CLIENT_BITS(grab->resource))) + dev->deviceGrab.sync.other = NullGrab; + } + } + ComputeFreezes(); +} + +/** + * Save the device's master device id. This needs to be done + * if a client directly grabs a slave device that is attached to a master. For + * the duration of the grab, the device is detached, ungrabbing re-attaches it + * though. + * + * We store the ID of the master device only in case the master disappears + * while the device has a grab. + */ +static void +DetachFromMaster(DeviceIntPtr dev) +{ + if (IsFloating(dev)) + return; + + dev->saved_master_id = GetMaster(dev, MASTER_ATTACHED)->id; + + AttachDevice(NULL, dev, NULL); +} + +static void +ReattachToOldMaster(DeviceIntPtr dev) +{ + DeviceIntPtr master = NULL; + + if (IsMaster(dev)) + return; + + dixLookupDevice(&master, dev->saved_master_id, serverClient, DixUseAccess); + + if (master) { + AttachDevice(serverClient, dev, master); + dev->saved_master_id = 0; + } +} + +/** + * Update touch records when an explicit grab is activated. Any touches owned by + * the grabbing client are updated so the listener state reflects the new grab. + */ +static void +UpdateTouchesForGrab(DeviceIntPtr mouse) +{ + int i; + + if (!mouse->touch || mouse->deviceGrab.fromPassiveGrab) + return; + + for (i = 0; i < mouse->touch->num_touches; i++) { + TouchPointInfoPtr ti = mouse->touch->touches + i; + TouchListener *listener = &ti->listeners[0]; + GrabPtr grab = mouse->deviceGrab.grab; + + if (ti->active && + CLIENT_BITS(listener->listener) == grab->resource) { + listener->listener = grab->resource; + listener->level = grab->grabtype; + listener->state = LISTENER_IS_OWNER; + listener->window = grab->window; + + if (grab->grabtype == CORE || grab->grabtype == XI || + !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) + listener->type = LISTENER_POINTER_GRAB; + else + listener->type = LISTENER_GRAB; + if (listener->grab) + FreeGrab(listener->grab); + listener->grab = AllocGrab(grab); + } + } +} + +/** + * Activate a pointer grab on the given device. A pointer grab will cause all + * core pointer events of this device to be delivered to the grabbing client only. + * No other device will send core events to the grab client while the grab is + * on, but core events will be sent to other clients. + * Can cause the cursor to change if a grab cursor is set. + * + * Note that parameter autoGrab may be (True & ImplicitGrabMask) if the grab + * is an implicit grab caused by a ButtonPress event. + * + * @param mouse The device to grab. + * @param grab The grab structure, needs to be setup. + * @param autoGrab True if the grab was caused by a button down event and not + * explicitely by a client. + */ +void +ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, + TimeStamp time, Bool autoGrab) +{ + GrabInfoPtr grabinfo = &mouse->deviceGrab; + GrabPtr oldgrab = grabinfo->grab; + WindowPtr oldWin = (grabinfo->grab) ? + grabinfo->grab->window : mouse->spriteInfo->sprite->win; + Bool isPassive = autoGrab & ~ImplicitGrabMask; + + /* slave devices need to float for the duration of the grab. */ + if (grab->grabtype == XI2 && + !(autoGrab & ImplicitGrabMask) && !IsMaster(mouse)) + DetachFromMaster(mouse); + + if (grab->confineTo) { + if (grab->confineTo->drawable.pScreen + != mouse->spriteInfo->sprite->hotPhys.pScreen) + mouse->spriteInfo->sprite->hotPhys.x = + mouse->spriteInfo->sprite->hotPhys.y = 0; + ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); + } + DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab); + mouse->valuator->motionHintWindow = NullWindow; + if (syncEvents.playingEvents) + grabinfo->grabTime = syncEvents.time; + else + grabinfo->grabTime = time; + grabinfo->grab = AllocGrab(grab); + grabinfo->fromPassiveGrab = isPassive; + grabinfo->implicitGrab = autoGrab & ImplicitGrabMask; + PostNewCursor(mouse); + UpdateTouchesForGrab(mouse); + CheckGrabForSyncs(mouse, (Bool) grab->pointerMode, + (Bool) grab->keyboardMode); + if (oldgrab) + FreeGrab(oldgrab); +} + +/** + * Delete grab on given device, update the sprite. + * + * Extension devices are set up for ActivateKeyboardGrab(). + */ +void +DeactivatePointerGrab(DeviceIntPtr mouse) +{ + GrabPtr grab = mouse->deviceGrab.grab; + DeviceIntPtr dev; + Bool wasPassive = mouse->deviceGrab.fromPassiveGrab; + Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab && + mouse->deviceGrab.implicitGrab); + XID grab_resource = grab->resource; + int i; + + /* If an explicit grab was deactivated, we must remove it from the head of + * all the touches' listener lists. */ + for (i = 0; !wasPassive && mouse->touch && i < mouse->touch->num_touches; i++) { + TouchPointInfoPtr ti = mouse->touch->touches + i; + if (ti->active && TouchResourceIsOwner(ti, grab_resource)) { + int mode = XIRejectTouch; + /* Rejecting will generate a TouchEnd, but we must not + emulate a ButtonRelease here. So pretend the listener + already has the end event */ + if (grab->grabtype == CORE || grab->grabtype == XI || + !xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin)) { + mode = XIAcceptTouch; + /* NOTE: we set the state here, but + * ProcessTouchOwnershipEvent() will still call + * TouchEmitTouchEnd for this listener. The other half of + * this hack is in DeliverTouchEndEvent */ + ti->listeners[0].state = LISTENER_HAS_END; + } + TouchListenerAcceptReject(mouse, ti, 0, mode); + } + } + + TouchRemovePointerGrab(mouse); + + mouse->valuator->motionHintWindow = NullWindow; + mouse->deviceGrab.grab = NullGrab; + mouse->deviceGrab.sync.state = NOT_GRABBED; + mouse->deviceGrab.fromPassiveGrab = FALSE; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->deviceGrab.sync.other == grab) + dev->deviceGrab.sync.other = NullGrab; + } + DoEnterLeaveEvents(mouse, mouse->id, grab->window, + mouse->spriteInfo->sprite->win, NotifyUngrab); + if (grab->confineTo) + ConfineCursorToWindow(mouse, GetCurrentRootWindow(mouse), FALSE, FALSE); + PostNewCursor(mouse); + + if (!wasImplicit && grab->grabtype == XI2) + ReattachToOldMaster(mouse); + + ComputeFreezes(); + + FreeGrab(grab); +} + +/** + * Activate a keyboard grab on the given device. + * + * Extension devices have ActivateKeyboardGrab() set as their grabbing proc. + */ +void +ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, + Bool passive) +{ + GrabInfoPtr grabinfo = &keybd->deviceGrab; + GrabPtr oldgrab = grabinfo->grab; + WindowPtr oldWin; + + /* slave devices need to float for the duration of the grab. */ + if (grab->grabtype == XI2 && keybd->enabled && + !(passive & ImplicitGrabMask) && !IsMaster(keybd)) + DetachFromMaster(keybd); + + if (!keybd->enabled) + oldWin = NULL; + else if (grabinfo->grab) + oldWin = grabinfo->grab->window; + else if (keybd->focus) + oldWin = keybd->focus->win; + else + oldWin = keybd->spriteInfo->sprite->win; + if (oldWin == FollowKeyboardWin) + oldWin = keybd->focus->win; + if (keybd->valuator) + keybd->valuator->motionHintWindow = NullWindow; + if (oldWin) + DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); + if (syncEvents.playingEvents) + grabinfo->grabTime = syncEvents.time; + else + grabinfo->grabTime = time; + grabinfo->grab = AllocGrab(grab); + grabinfo->fromPassiveGrab = passive; + grabinfo->implicitGrab = passive & ImplicitGrabMask; + CheckGrabForSyncs(keybd, (Bool) grab->keyboardMode, + (Bool) grab->pointerMode); + if (oldgrab) + FreeGrab(oldgrab); +} + +/** + * Delete keyboard grab for the given device. + */ +void +DeactivateKeyboardGrab(DeviceIntPtr keybd) +{ + GrabPtr grab = keybd->deviceGrab.grab; + DeviceIntPtr dev; + WindowPtr focusWin; + Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab && + keybd->deviceGrab.implicitGrab); + + if (keybd->valuator) + keybd->valuator->motionHintWindow = NullWindow; + keybd->deviceGrab.grab = NullGrab; + keybd->deviceGrab.sync.state = NOT_GRABBED; + keybd->deviceGrab.fromPassiveGrab = FALSE; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->deviceGrab.sync.other == grab) + dev->deviceGrab.sync.other = NullGrab; + } + + if (keybd->focus) + focusWin = keybd->focus->win; + else if (keybd->spriteInfo->sprite) + focusWin = keybd->spriteInfo->sprite->win; + else + focusWin = NullWindow; + + if (focusWin == FollowKeyboardWin) + focusWin = inputInfo.keyboard->focus->win; + + DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); + + if (!wasImplicit && grab->grabtype == XI2) + ReattachToOldMaster(keybd); + + ComputeFreezes(); + + FreeGrab(grab); +} + +void +AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) +{ + Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced; + TimeStamp grabTime; + DeviceIntPtr dev; + GrabInfoPtr devgrabinfo, grabinfo = &thisDev->deviceGrab; + + thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client); + thisSynced = FALSE; + otherGrabbed = FALSE; + othersFrozen = FALSE; + grabTime = grabinfo->grabTime; + for (dev = inputInfo.devices; dev; dev = dev->next) { + devgrabinfo = &dev->deviceGrab; + + if (dev == thisDev) + continue; + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) { + if (!(thisGrabbed || otherGrabbed) || + (CompareTimeStamps(devgrabinfo->grabTime, grabTime) == LATER)) + grabTime = devgrabinfo->grabTime; + otherGrabbed = TRUE; + if (grabinfo->sync.other == devgrabinfo->grab) + thisSynced = TRUE; + if (devgrabinfo->sync.state >= FROZEN) + othersFrozen = TRUE; + } + } + if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced)) + return; + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, grabTime) == EARLIER)) + return; + switch (newState) { + case THAWED: /* Async */ + if (thisGrabbed) + grabinfo->sync.state = THAWED; + if (thisSynced) + grabinfo->sync.other = NullGrab; + ComputeFreezes(); + break; + case FREEZE_NEXT_EVENT: /* Sync */ + if (thisGrabbed) { + grabinfo->sync.state = FREEZE_NEXT_EVENT; + if (thisSynced) + grabinfo->sync.other = NullGrab; + ComputeFreezes(); + } + break; + case THAWED_BOTH: /* AsyncBoth */ + if (othersFrozen) { + for (dev = inputInfo.devices; dev; dev = dev->next) { + devgrabinfo = &dev->deviceGrab; + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) + devgrabinfo->sync.state = THAWED; + if (devgrabinfo->sync.other && + SameClient(devgrabinfo->sync.other, client)) + devgrabinfo->sync.other = NullGrab; + } + ComputeFreezes(); + } + break; + case FREEZE_BOTH_NEXT_EVENT: /* SyncBoth */ + if (othersFrozen) { + for (dev = inputInfo.devices; dev; dev = dev->next) { + devgrabinfo = &dev->deviceGrab; + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) + devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT; + if (devgrabinfo->sync.other + && SameClient(devgrabinfo->sync.other, client)) + devgrabinfo->sync.other = NullGrab; + } + ComputeFreezes(); + } + break; + case NOT_GRABBED: /* Replay */ + if (thisGrabbed && grabinfo->sync.state == FROZEN_WITH_EVENT) { + if (thisSynced) + grabinfo->sync.other = NullGrab; + syncEvents.replayDev = thisDev; + syncEvents.replayWin = grabinfo->grab->window; + (*grabinfo->DeactivateGrab) (thisDev); + syncEvents.replayDev = (DeviceIntPtr) NULL; + } + break; + case THAW_OTHERS: /* AsyncOthers */ + if (othersFrozen) { + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev == thisDev) + continue; + devgrabinfo = &dev->deviceGrab; + if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) + devgrabinfo->sync.state = THAWED; + if (devgrabinfo->sync.other + && SameClient(devgrabinfo->sync.other, client)) + devgrabinfo->sync.other = NullGrab; + } + ComputeFreezes(); + } + break; + } + + /* We've unfrozen the grab. If the grab was a touch grab, we're now the + * owner and expected to accept/reject it. Reject == ReplayPointer which + * we've handled in ComputeFreezes() (during DeactivateGrab) above, + * anything else is accept. + */ + if (newState != NOT_GRABBED /* Replay */ && + IsTouchEvent((InternalEvent*)grabinfo->sync.event)) { + TouchAcceptAndEnd(thisDev, grabinfo->sync.event->touchid); + } +} + +/** + * Server-side protocol handling for AllowEvents request. + * + * Release some events from a frozen device. + */ +int +ProcAllowEvents(ClientPtr client) +{ + TimeStamp time; + DeviceIntPtr mouse = NULL; + DeviceIntPtr keybd = NULL; + + REQUEST(xAllowEventsReq); + + REQUEST_SIZE_MATCH(xAllowEventsReq); + time = ClientTimeToServerTime(stuff->time); + + mouse = PickPointer(client); + keybd = PickKeyboard(client); + + switch (stuff->mode) { + case ReplayPointer: + AllowSome(client, time, mouse, NOT_GRABBED); + break; + case SyncPointer: + AllowSome(client, time, mouse, FREEZE_NEXT_EVENT); + break; + case AsyncPointer: + AllowSome(client, time, mouse, THAWED); + break; + case ReplayKeyboard: + AllowSome(client, time, keybd, NOT_GRABBED); + break; + case SyncKeyboard: + AllowSome(client, time, keybd, FREEZE_NEXT_EVENT); + break; + case AsyncKeyboard: + AllowSome(client, time, keybd, THAWED); + break; + case SyncBoth: + AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT); + break; + case AsyncBoth: + AllowSome(client, time, keybd, THAWED_BOTH); + break; + default: + client->errorValue = stuff->mode; + return BadValue; + } + return Success; +} + +/** + * Deactivate grabs from any device that has been grabbed by the client. + */ +void +ReleaseActiveGrabs(ClientPtr client) +{ + DeviceIntPtr dev; + Bool done; + + /* XXX CloseDownClient should remove passive grabs before + * releasing active grabs. + */ + do { + done = TRUE; + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->deviceGrab.grab && + SameClient(dev->deviceGrab.grab, client)) { + (*dev->deviceGrab.DeactivateGrab) (dev); + done = FALSE; + } + } + } while (!done); +} + +/************************************************************************** + * The following procedures deal with delivering events * + **************************************************************************/ + +/** + * Deliver the given events to the given client. + * + * More than one event may be delivered at a time. This is the case with + * DeviceMotionNotifies which may be followed by DeviceValuator events. + * + * TryClientEvents() is the last station before actually writing the events to + * the socket. Anything that is not filtered here, will get delivered to the + * client. + * An event is only delivered if + * - mask and filter match up. + * - no other client has a grab on the device that caused the event. + * + * + * @param client The target client to deliver to. + * @param dev The device the event came from. May be NULL. + * @param pEvents The events to be delivered. + * @param count Number of elements in pEvents. + * @param mask Event mask as set by the window. + * @param filter Mask based on event type. + * @param grab Possible grab on the device that caused the event. + * + * @return 1 if event was delivered, 0 if not or -1 if grab was not set by the + * client. + */ +int +TryClientEvents(ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, + int count, Mask mask, Mask filter, GrabPtr grab) +{ + int type; + +#ifdef DEBUG_EVENTS + ErrorF("[dix] Event([%d, %d], mask=0x%lx), client=%d%s", + pEvents->u.u.type, pEvents->u.u.detail, mask, + client ? client->index : -1, + (client && client->clientGone) ? " (gone)" : ""); +#endif + + if (!client || client == serverClient || client->clientGone) { +#ifdef DEBUG_EVENTS + ErrorF(" not delivered to fake/dead client\n"); +#endif + return 0; + } + + if (filter != CantBeFiltered && !(mask & filter)) { +#ifdef DEBUG_EVENTS + ErrorF(" filtered\n"); +#endif + return 0; + } + + if (grab && !SameClient(grab, client)) { +#ifdef DEBUG_EVENTS + ErrorF(" not delivered due to grab\n"); +#endif + return -1; /* don't send, but notify caller */ + } + + type = pEvents->u.u.type; + if (type == MotionNotify) { + if (mask & PointerMotionHintMask) { + if (WID(dev->valuator->motionHintWindow) == + pEvents->u.keyButtonPointer.event) { +#ifdef DEBUG_EVENTS + ErrorF("[dix] \n"); + ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n"); +#endif + return 1; /* don't send, but pretend we did */ + } + pEvents->u.u.detail = NotifyHint; + } + else { + pEvents->u.u.detail = NotifyNormal; + } + } + else if (type == DeviceMotionNotify) { + if (MaybeSendDeviceMotionNotifyHint((deviceKeyButtonPointer *) pEvents, + mask) != 0) + return 1; + } + else if (type == KeyPress) { + if (EventIsKeyRepeat(pEvents)) { + if (!_XkbWantsDetectableAutoRepeat(client)) { + xEvent release = *pEvents; + + release.u.u.type = KeyRelease; + WriteEventsToClient(client, 1, &release); +#ifdef DEBUG_EVENTS + ErrorF(" (plus fake core release for repeat)"); +#endif + } + else { +#ifdef DEBUG_EVENTS + ErrorF(" (detectable autorepeat for core)"); +#endif + } + } + + } + else if (type == DeviceKeyPress) { + if (EventIsKeyRepeat(pEvents)) { + if (!_XkbWantsDetectableAutoRepeat(client)) { + deviceKeyButtonPointer release = + *(deviceKeyButtonPointer *) pEvents; + release.type = DeviceKeyRelease; +#ifdef DEBUG_EVENTS + ErrorF(" (plus fake xi1 release for repeat)"); +#endif + WriteEventsToClient(client, 1, (xEvent *) &release); + } + else { +#ifdef DEBUG_EVENTS + ErrorF(" (detectable autorepeat for core)"); +#endif + } + } + } + + if (BitIsOn(criticalEvents, type)) { + if (client->smart_priority < SMART_MAX_PRIORITY) + client->smart_priority++; + SetCriticalOutputPending(); + } + + WriteEventsToClient(client, count, pEvents); +#ifdef DEBUG_EVENTS + ErrorF("[dix] delivered\n"); +#endif + return 1; +} + +static BOOL +ActivateImplicitGrab(DeviceIntPtr dev, ClientPtr client, WindowPtr win, + xEvent *event, Mask deliveryMask) +{ + GrabPtr tempGrab; + OtherInputMasks *inputMasks; + CARD8 type = event->u.u.type; + enum InputLevel grabtype; + + if (type == ButtonPress) + grabtype = CORE; + else if (type == DeviceButtonPress) + grabtype = XI; + else if ((type = xi2_get_type(event)) == XI_ButtonPress) + grabtype = XI2; + else + return FALSE; + + tempGrab = AllocGrab(NULL); + if (!tempGrab) + return FALSE; + tempGrab->next = NULL; + tempGrab->device = dev; + tempGrab->resource = client->clientAsMask; + tempGrab->window = win; + tempGrab->ownerEvents = (deliveryMask & OwnerGrabButtonMask) ? TRUE : FALSE; + tempGrab->eventMask = deliveryMask; + tempGrab->keyboardMode = GrabModeAsync; + tempGrab->pointerMode = GrabModeAsync; + tempGrab->confineTo = NullWindow; + tempGrab->cursor = NullCursor; + tempGrab->type = type; + tempGrab->grabtype = grabtype; + + /* get the XI and XI2 device mask */ + inputMasks = wOtherInputMasks(win); + tempGrab->deviceMask = (inputMasks) ? inputMasks->inputEvents[dev->id] : 0; + + if (inputMasks) + xi2mask_merge(tempGrab->xi2mask, inputMasks->xi2mask); + + (*dev->deviceGrab.ActivateGrab) (dev, tempGrab, + currentTime, TRUE | ImplicitGrabMask); + FreeGrab(tempGrab); + return TRUE; +} + +/** + * Attempt event delivery to the client owning the window. + */ +static enum EventDeliveryState +DeliverToWindowOwner(DeviceIntPtr dev, WindowPtr win, + xEvent *events, int count, Mask filter, GrabPtr grab) +{ + /* if nobody ever wants to see this event, skip some work */ + if (filter != CantBeFiltered && + !((wOtherEventMasks(win) | win->eventMask) & filter)) + return EVENT_SKIP; + + if (IsInterferingGrab(wClient(win), dev, events)) + return EVENT_SKIP; + + if (!XaceHook(XACE_RECEIVE_ACCESS, wClient(win), win, events, count)) { + int attempt = TryClientEvents(wClient(win), dev, events, + count, win->eventMask, + filter, grab); + + if (attempt > 0) + return EVENT_DELIVERED; + if (attempt < 0) + return EVENT_REJECTED; + } + + return EVENT_NOT_DELIVERED; +} + +/** + * Get the list of clients that should be tried for event delivery on the + * given window. + * + * @return 1 if the client list should be traversed, zero if the event + * should be skipped. + */ +static Bool +GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win, + xEvent *events, Mask filter, InputClients ** iclients) +{ + int rc = 0; + + if (core_get_type(events) != 0) + *iclients = (InputClients *) wOtherClients(win); + else if (xi2_get_type(events) != 0) { + OtherInputMasks *inputMasks = wOtherInputMasks(win); + + /* Has any client selected for the event? */ + if (!WindowXI2MaskIsset(dev, win, events)) + goto out; + *iclients = inputMasks->inputClients; + } + else { + OtherInputMasks *inputMasks = wOtherInputMasks(win); + + /* Has any client selected for the event? */ + if (!inputMasks || !(inputMasks->inputEvents[dev->id] & filter)) + goto out; + + *iclients = inputMasks->inputClients; + } + + rc = 1; + out: + return rc; +} + +/** + * Try delivery on each client in inputclients, provided the event mask + * accepts it and there is no interfering core grab.. + */ +static enum EventDeliveryState +DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients, + WindowPtr win, xEvent *events, + int count, Mask filter, GrabPtr grab, + ClientPtr *client_return, Mask *mask_return) +{ + int attempt; + enum EventDeliveryState rc = EVENT_NOT_DELIVERED; + Bool have_device_button_grab_class_client = FALSE; + + for (; inputclients; inputclients = inputclients->next) { + Mask mask; + ClientPtr client = rClient(inputclients); + + if (IsInterferingGrab(client, dev, events)) + continue; + + if (IsWrongPointerBarrierClient(client, dev, events)) + continue; + + mask = GetEventMask(dev, events, inputclients); + + if (XaceHook(XACE_RECEIVE_ACCESS, client, win, events, count)) + /* do nothing */ ; + else if ((attempt = TryClientEvents(client, dev, + events, count, + mask, filter, grab))) { + if (attempt > 0) { + /* + * The order of clients is arbitrary therefore if one + * client belongs to DeviceButtonGrabClass make sure to + * catch it. + */ + if (!have_device_button_grab_class_client) { + rc = EVENT_DELIVERED; + *client_return = client; + *mask_return = mask; + /* Success overrides non-success, so if we've been + * successful on one client, return that */ + if (mask & DeviceButtonGrabMask) + have_device_button_grab_class_client = TRUE; + } + } else if (rc == EVENT_NOT_DELIVERED) + rc = EVENT_REJECTED; + } + } + + return rc; +} + +/** + * Deliver events to clients registered on the window. + * + * @param client_return On successful delivery, set to the recipient. + * @param mask_return On successful delivery, set to the recipient's event + * mask for this event. + */ +static enum EventDeliveryState +DeliverEventToWindowMask(DeviceIntPtr dev, WindowPtr win, xEvent *events, + int count, Mask filter, GrabPtr grab, + ClientPtr *client_return, Mask *mask_return) +{ + InputClients *iclients; + + if (!GetClientsForDelivery(dev, win, events, filter, &iclients)) + return EVENT_SKIP; + + return DeliverEventToInputClients(dev, iclients, win, events, count, filter, + grab, client_return, mask_return); + +} + +/** + * Deliver events to a window. At this point, we do not yet know if the event + * actually needs to be delivered. May activate a grab if the event is a + * button press. + * + * Core events are always delivered to the window owner. If the filter is + * something other than CantBeFiltered, the event is also delivered to other + * clients with the matching mask on the window. + * + * More than one event may be delivered at a time. This is the case with + * DeviceMotionNotifies which may be followed by DeviceValuator events. + * + * @param pWin The window that would get the event. + * @param pEvents The events to be delivered. + * @param count Number of elements in pEvents. + * @param filter Mask based on event type. + * @param grab Possible grab on the device that caused the event. + * + * @return a positive number if at least one successful delivery has been + * made, 0 if no events were delivered, or a negative number if the event + * has not been delivered _and_ rejected by at least one client. + */ +int +DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent + *pEvents, int count, Mask filter, GrabPtr grab) +{ + int deliveries = 0, nondeliveries = 0; + ClientPtr client = NullClient; + Mask deliveryMask = 0; /* If a grab occurs due to a button press, then + this mask is the mask of the grab. */ + int type = pEvents->u.u.type; + + /* Deliver to window owner */ + if ((filter == CantBeFiltered) || core_get_type(pEvents) != 0) { + enum EventDeliveryState rc; + + rc = DeliverToWindowOwner(pDev, pWin, pEvents, count, filter, grab); + + switch (rc) { + case EVENT_SKIP: + return 0; + case EVENT_REJECTED: + nondeliveries--; + break; + case EVENT_DELIVERED: + /* We delivered to the owner, with our event mask */ + deliveries++; + client = wClient(pWin); + deliveryMask = pWin->eventMask; + break; + case EVENT_NOT_DELIVERED: + break; + } + } + + /* CantBeFiltered means only window owner gets the event */ + if (filter != CantBeFiltered) { + enum EventDeliveryState rc; + + rc = DeliverEventToWindowMask(pDev, pWin, pEvents, count, filter, + grab, &client, &deliveryMask); + + switch (rc) { + case EVENT_SKIP: + return 0; + case EVENT_REJECTED: + nondeliveries--; + break; + case EVENT_DELIVERED: + deliveries++; + break; + case EVENT_NOT_DELIVERED: + break; + } + } + + if (deliveries) { + /* + * Note that since core events are delivered first, an implicit grab may + * be activated on a core grab, stopping the XI events. + */ + if (!grab && + ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask)) + /* grab activated */ ; + else if (type == MotionNotify) + pDev->valuator->motionHintWindow = pWin; + else if (type == DeviceMotionNotify || type == DeviceButtonPress) + CheckDeviceGrabAndHintWindow(pWin, type, + (deviceKeyButtonPointer *) pEvents, + grab, client, deliveryMask); + return deliveries; + } + return nondeliveries; +} + +/** + * Filter out raw events for XI 2.0 and XI 2.1 clients. + * + * If there is a grab on the device, 2.0 clients only get raw events if they + * have the grab. 2.1+ clients get raw events in all cases. + * + * @return TRUE if the event should be discarded, FALSE otherwise. + */ +static BOOL +FilterRawEvents(const ClientPtr client, const GrabPtr grab, WindowPtr root) +{ + XIClientPtr client_xi_version; + int cmp; + + /* device not grabbed -> don't filter */ + if (!grab) + return FALSE; + + client_xi_version = + dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); + + cmp = version_compare(client_xi_version->major_version, + client_xi_version->minor_version, 2, 0); + /* XI 2.0: if device is grabbed, skip + XI 2.1: if device is grabbed by us, skip, we've already delivered */ + if (cmp == 0) + return TRUE; + + return (grab->window != root) ? FALSE : SameClient(grab, client); +} + +/** + * Deliver a raw event to the grab owner (if any) and to all root windows. + * + * Raw event delivery differs between XI 2.0 and XI 2.1. + * XI 2.0: events delivered to the grabbing client (if any) OR to all root + * windows + * XI 2.1: events delivered to all root windows, regardless of grabbing + * state. + */ +void +DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device) +{ + GrabPtr grab = device->deviceGrab.grab; + xEvent *xi; + int i, rc; + int filter; + + rc = EventToXI2((InternalEvent *) ev, (xEvent **) &xi); + if (rc != Success) { + ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n", + __func__, device->name, rc); + return; + } + + if (grab) + DeliverGrabbedEvent((InternalEvent *) ev, device, FALSE); + + filter = GetEventFilter(device, xi); + + for (i = 0; i < screenInfo.numScreens; i++) { + WindowPtr root; + InputClients *inputclients; + + root = screenInfo.screens[i]->root; + if (!GetClientsForDelivery(device, root, xi, filter, &inputclients)) + continue; + + for (; inputclients; inputclients = inputclients->next) { + ClientPtr c; /* unused */ + Mask m; /* unused */ + InputClients ic = *inputclients; + + /* Because we run through the list manually, copy the actual + * list, shorten the copy to only have one client and then pass + * that down to DeliverEventToInputClients. This way we avoid + * double events on XI 2.1 clients that have a grab on the + * device. + */ + ic.next = NULL; + + if (!FilterRawEvents(rClient(&ic), grab, root)) + DeliverEventToInputClients(device, &ic, root, xi, 1, + filter, NULL, &c, &m); + } + } + + free(xi); +} + +/* If the event goes to dontClient, don't send it and return 0. if + send works, return 1 or if send didn't work, return 2. + Only works for core events. +*/ + +#ifdef PANORAMIX +static int +XineramaTryClientEventsResult(ClientPtr client, + GrabPtr grab, Mask mask, Mask filter) +{ + if ((client) && (client != serverClient) && (!client->clientGone) && + ((filter == CantBeFiltered) || (mask & filter))) { + if (grab && !SameClient(grab, client)) + return -1; + else + return 1; + } + return 0; +} +#endif + +/** + * Try to deliver events to the interested parties. + * + * @param pWin The window that would get the event. + * @param pEvents The events to be delivered. + * @param count Number of elements in pEvents. + * @param filter Mask based on event type. + * @param dontClient Don't deliver to the dontClient. + */ +int +MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, + int count, Mask filter, ClientPtr dontClient) +{ + OtherClients *other; + + if (pWin->eventMask & filter) { + if (wClient(pWin) == dontClient) + return 0; +#ifdef PANORAMIX + if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + return XineramaTryClientEventsResult(wClient(pWin), NullGrab, + pWin->eventMask, filter); +#endif + if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) + return 1; /* don't send, but pretend we did */ + return TryClientEvents(wClient(pWin), NULL, pEvents, count, + pWin->eventMask, filter, NullGrab); + } + for (other = wOtherClients(pWin); other; other = other->next) { + if (other->mask & filter) { + if (SameClient(other, dontClient)) + return 0; +#ifdef PANORAMIX + if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + return XineramaTryClientEventsResult(rClient(other), NullGrab, + other->mask, filter); +#endif + if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, + count)) + return 1; /* don't send, but pretend we did */ + return TryClientEvents(rClient(other), NULL, pEvents, count, + other->mask, filter, NullGrab); + } + } + return 2; +} + +static Window +FindChildForEvent(SpritePtr pSprite, WindowPtr event) +{ + WindowPtr w = DeepestSpriteWin(pSprite); + Window child = None; + + /* If the search ends up past the root should the child field be + set to none or should the value in the argument be passed + through. It probably doesn't matter since everyone calls + this function with child == None anyway. */ + while (w) { + /* If the source window is same as event window, child should be + none. Don't bother going all all the way back to the root. */ + + if (w == event) { + child = None; + break; + } + + if (w->parent == event) { + child = w->drawable.id; + break; + } + w = w->parent; + } + return child; +} + +/** + * Adjust event fields to comply with the window properties. + * + * @param xE Event to be modified in place + * @param pWin The window to get the information from. + * @param child Child window setting for event (if applicable) + * @param calcChild If True, calculate the child window. + */ +void +FixUpEventFromWindow(SpritePtr pSprite, + xEvent *xE, WindowPtr pWin, Window child, Bool calcChild) +{ + int evtype; + + if (calcChild) + child = FindChildForEvent(pSprite, pWin); + + if ((evtype = xi2_get_type(xE))) { + xXIDeviceEvent *event = (xXIDeviceEvent *) xE; + + switch (evtype) { + case XI_RawKeyPress: + case XI_RawKeyRelease: + case XI_RawButtonPress: + case XI_RawButtonRelease: + case XI_RawMotion: + case XI_RawTouchBegin: + case XI_RawTouchUpdate: + case XI_RawTouchEnd: + case XI_DeviceChanged: + case XI_HierarchyChanged: + case XI_PropertyEvent: + case XI_BarrierHit: + case XI_BarrierLeave: + return; + default: + break; + } + + event->root = RootWindow(pSprite)->drawable.id; + event->event = pWin->drawable.id; + + if (evtype == XI_TouchOwnership) { + event->child = child; + return; + } + + if (pSprite->hot.pScreen == pWin->drawable.pScreen) { + event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x); + event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y); + event->child = child; + } + else { + event->event_x = 0; + event->event_y = 0; + event->child = None; + } + + if (event->evtype == XI_Enter || event->evtype == XI_Leave || + event->evtype == XI_FocusIn || event->evtype == XI_FocusOut) + ((xXIEnterEvent *) event)->same_screen = + (pSprite->hot.pScreen == pWin->drawable.pScreen); + + } + else { + XE_KBPTR.root = RootWindow(pSprite)->drawable.id; + XE_KBPTR.event = pWin->drawable.id; + if (pSprite->hot.pScreen == pWin->drawable.pScreen) { + XE_KBPTR.sameScreen = xTrue; + XE_KBPTR.child = child; + XE_KBPTR.eventX = XE_KBPTR.rootX - pWin->drawable.x; + XE_KBPTR.eventY = XE_KBPTR.rootY - pWin->drawable.y; + } + else { + XE_KBPTR.sameScreen = xFalse; + XE_KBPTR.child = None; + XE_KBPTR.eventX = 0; + XE_KBPTR.eventY = 0; + } + } +} + +/** + * Check if a given event is deliverable at all on a given window. + * + * This function only checks if any client wants it, not for a specific + * client. + * + * @param[in] dev The device this event is being sent for. + * @param[in] evtype The event type of the event that is to be sent. + * @param[in] win The current event window. + * + * @return Bitmask of ::EVENT_XI2_MASK, ::EVENT_XI1_MASK, ::EVENT_CORE_MASK, and + * ::EVENT_DONT_PROPAGATE_MASK. + */ +int +EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win) +{ + int rc = 0; + int filter = 0; + int type; + OtherInputMasks *inputMasks = wOtherInputMasks(win); + + if ((type = GetXI2Type(evtype)) != 0) { + if (inputMasks && xi2mask_isset(inputMasks->xi2mask, dev, type)) + rc |= EVENT_XI2_MASK; + } + + if ((type = GetXIType(evtype)) != 0) { + filter = event_get_filter_from_type(dev, type); + + /* Check for XI mask */ + if (inputMasks && + (inputMasks->deliverableEvents[dev->id] & filter) && + (inputMasks->inputEvents[dev->id] & filter)) + rc |= EVENT_XI1_MASK; + + /* Check for XI DontPropagate mask */ + if (inputMasks && (inputMasks->dontPropagateMask[dev->id] & filter)) + rc |= EVENT_DONT_PROPAGATE_MASK; + + } + + if ((type = GetCoreType(evtype)) != 0) { + filter = event_get_filter_from_type(dev, type); + + /* Check for core mask */ + if ((win->deliverableEvents & filter) && + ((wOtherEventMasks(win) | win->eventMask) & filter)) + rc |= EVENT_CORE_MASK; + + /* Check for core DontPropagate mask */ + if (filter & wDontPropagateMask(win)) + rc |= EVENT_DONT_PROPAGATE_MASK; + } + + return rc; +} + +static int +DeliverEvent(DeviceIntPtr dev, xEvent *xE, int count, + WindowPtr win, Window child, GrabPtr grab) +{ + SpritePtr pSprite = dev->spriteInfo->sprite; + Mask filter; + int deliveries = 0; + + if (XaceHook(XACE_SEND_ACCESS, NULL, dev, win, xE, count) == Success) { + filter = GetEventFilter(dev, xE); + FixUpEventFromWindow(pSprite, xE, win, child, FALSE); + deliveries = DeliverEventsToWindow(dev, win, xE, count, filter, grab); + } + + return deliveries; +} + +static int +DeliverOneEvent(InternalEvent *event, DeviceIntPtr dev, enum InputLevel level, + WindowPtr win, Window child, GrabPtr grab) +{ + xEvent *xE = NULL; + int count = 0; + int deliveries = 0; + int rc; + + switch (level) { + case XI2: + rc = EventToXI2(event, &xE); + count = 1; + break; + case XI: + rc = EventToXI(event, &xE, &count); + break; + case CORE: + rc = EventToCore(event, &xE, &count); + break; + } + + if (rc == Success) { + deliveries = DeliverEvent(dev, xE, count, win, child, grab); + free(xE); + } + else + BUG_WARN_MSG(rc != BadMatch, + "%s: conversion to level %d failed with rc %d\n", + dev->name, level, rc); + return deliveries; +} + +/** + * Deliver events caused by input devices. + * + * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is + * called directly from the processInputProc. + * For grabbed devices, DeliverGrabbedEvent is called first, and _may_ call + * DeliverDeviceEvents. + * For focused events, DeliverFocusedEvent is called first, and _may_ call + * DeliverDeviceEvents. + * + * @param pWin Window to deliver event to. + * @param event The events to deliver, not yet in wire format. + * @param grab Possible grab on a device. + * @param stopAt Don't recurse up to the root window. + * @param dev The device that is responsible for the event. + * + * @see DeliverGrabbedEvent + * @see DeliverFocusedEvent + */ +int +DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab, + WindowPtr stopAt, DeviceIntPtr dev) +{ + Window child = None; + int deliveries = 0; + int mask; + + verify_internal_event(event); + + while (pWin) { + if ((mask = EventIsDeliverable(dev, event->any.type, pWin))) { + /* XI2 events first */ + if (mask & EVENT_XI2_MASK) { + deliveries = + DeliverOneEvent(event, dev, XI2, pWin, child, grab); + if (deliveries > 0) + break; + } + + /* XI events */ + if (mask & EVENT_XI1_MASK) { + deliveries = DeliverOneEvent(event, dev, XI, pWin, child, grab); + if (deliveries > 0) + break; + } + + /* Core event */ + if ((mask & EVENT_CORE_MASK) && IsMaster(dev) && dev->coreEvents) { + deliveries = + DeliverOneEvent(event, dev, CORE, pWin, child, grab); + if (deliveries > 0) + break; + } + + } + + if ((deliveries < 0) || (pWin == stopAt) || + (mask & EVENT_DONT_PROPAGATE_MASK)) { + deliveries = 0; + break; + } + + child = pWin->drawable.id; + pWin = pWin->parent; + } + + return deliveries; +} + +/** + * Deliver event to a window and it's immediate parent. Used for most window + * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that + * propagate up the tree or extension events + * + * In case of a ReparentNotify event, the event will be delivered to the + * otherParent as well. + * + * @param pWin Window to deliver events to. + * @param xE Events to deliver. + * @param count number of events in xE. + * @param otherParent Used for ReparentNotify events. + */ +int +DeliverEvents(WindowPtr pWin, xEvent *xE, int count, WindowPtr otherParent) +{ + DeviceIntRec dummy; + int deliveries; + +#ifdef PANORAMIX + if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + return count; +#endif + + if (!count) + return 0; + + dummy.id = XIAllDevices; + + switch (xE->u.u.type) { + case DestroyNotify: + case UnmapNotify: + case MapNotify: + case MapRequest: + case ReparentNotify: + case ConfigureNotify: + case ConfigureRequest: + case GravityNotify: + case CirculateNotify: + case CirculateRequest: + xE->u.destroyNotify.event = pWin->drawable.id; + break; + } + + switch (xE->u.u.type) { + case DestroyNotify: + case UnmapNotify: + case MapNotify: + case ReparentNotify: + case ConfigureNotify: + case GravityNotify: + case CirculateNotify: + break; + default: + { + Mask filter; + + filter = GetEventFilter(&dummy, xE); + return DeliverEventsToWindow(&dummy, pWin, xE, count, filter, NullGrab); + } + } + + deliveries = DeliverEventsToWindow(&dummy, pWin, xE, count, + StructureNotifyMask, NullGrab); + if (pWin->parent) { + xE->u.destroyNotify.event = pWin->parent->drawable.id; + deliveries += DeliverEventsToWindow(&dummy, pWin->parent, xE, count, + SubstructureNotifyMask, NullGrab); + if (xE->u.u.type == ReparentNotify) { + xE->u.destroyNotify.event = otherParent->drawable.id; + deliveries += DeliverEventsToWindow(&dummy, + otherParent, xE, count, + SubstructureNotifyMask, + NullGrab); + } + } + return deliveries; +} + +static Bool +PointInBorderSize(WindowPtr pWin, int x, int y) +{ + BoxRec box; + + if (RegionContainsPoint(&pWin->borderSize, x, y, &box)) + return TRUE; + +#ifdef PANORAMIX + if (!noPanoramiXExtension && + XineramaSetWindowPntrs(inputInfo.pointer, pWin)) { + SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite; + int i; + + FOR_NSCREENS_FORWARD_SKIP(i) { + if (RegionContainsPoint(&pSprite->windows[i]->borderSize, + x + screenInfo.screens[0]->x - + screenInfo.screens[i]->x, + y + screenInfo.screens[0]->y - + screenInfo.screens[i]->y, &box)) + return TRUE; + } + } +#endif + return FALSE; +} + +/** + * Traversed from the root window to the window at the position x/y. While + * traversing, it sets up the traversal history in the spriteTrace array. + * After completing, the spriteTrace history is set in the following way: + * spriteTrace[0] ... root window + * spriteTrace[1] ... top level window that encloses x/y + * ... + * spriteTrace[spriteTraceGood - 1] ... window at x/y + * + * @returns the window at the given coordinates. + */ +WindowPtr +XYToWindow(SpritePtr pSprite, int x, int y) +{ + WindowPtr pWin; + BoxRec box; + + pSprite->spriteTraceGood = 1; /* root window still there */ + pWin = RootWindow(pSprite)->firstChild; + while (pWin) { + if ((pWin->mapped) && + (x >= pWin->drawable.x - wBorderWidth(pWin)) && + (x < pWin->drawable.x + (int) pWin->drawable.width + + wBorderWidth(pWin)) && + (y >= pWin->drawable.y - wBorderWidth(pWin)) && + (y < pWin->drawable.y + (int) pWin->drawable.height + + wBorderWidth(pWin)) + /* When a window is shaped, a further check + * is made to see if the point is inside + * borderSize + */ + && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y)) + && (!wInputShape(pWin) || + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) +#ifdef ROOTLESS + /* In rootless mode windows may be offscreen, even when + * they're in X's stack. (E.g. if the native window system + * implements some form of virtual desktop system). + */ + && !pWin->rootlessUnhittable +#endif + ) { + if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize) { + pSprite->spriteTraceSize += 10; + pSprite->spriteTrace = realloc(pSprite->spriteTrace, + pSprite->spriteTraceSize * + sizeof(WindowPtr)); + } + pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin; + pWin = pWin->firstChild; + } + else + pWin = pWin->nextSib; + } + return DeepestSpriteWin(pSprite); +} + +/** + * Ungrab a currently FocusIn grabbed device and grab the device on the + * given window. If the win given is the NoneWin, the device is ungrabbed if + * applicable and FALSE is returned. + * + * @returns TRUE if the device has been grabbed, or FALSE otherwise. + */ +BOOL +ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) +{ + BOOL rc = FALSE; + DeviceEvent event; + + if (dev->deviceGrab.grab) { + if (!dev->deviceGrab.fromPassiveGrab || + dev->deviceGrab.grab->type != XI_Enter || + dev->deviceGrab.grab->window == win || + IsParent(dev->deviceGrab.grab->window, win)) + return FALSE; + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); + (*dev->deviceGrab.DeactivateGrab) (dev); + } + + if (win == NoneWin || win == PointerRootWin) + return FALSE; + + event = (DeviceEvent) { + .header = ET_Internal, + .type = ET_FocusIn, + .length = sizeof(DeviceEvent), + .time = GetTimeInMillis(), + .deviceid = dev->id, + .sourceid = dev->id, + .detail.button = 0 + }; + rc = (CheckPassiveGrabsOnWindow(win, dev, (InternalEvent *) &event, FALSE, + TRUE) != NULL); + if (rc) + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); + return rc; +} + +/** + * Ungrab a currently Enter grabbed device and grab the device for the given + * window. + * + * @returns TRUE if the device has been grabbed, or FALSE otherwise. + */ +static BOOL +ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) +{ + BOOL rc = FALSE; + DeviceEvent event; + + if (dev->deviceGrab.grab) { + if (!dev->deviceGrab.fromPassiveGrab || + dev->deviceGrab.grab->type != XI_Enter || + dev->deviceGrab.grab->window == win || + IsParent(dev->deviceGrab.grab->window, win)) + return FALSE; + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); + (*dev->deviceGrab.DeactivateGrab) (dev); + } + + event = (DeviceEvent) { + .header = ET_Internal, + .type = ET_Enter, + .length = sizeof(DeviceEvent), + .time = GetTimeInMillis(), + .deviceid = dev->id, + .sourceid = dev->id, + .detail.button = 0 + }; + rc = (CheckPassiveGrabsOnWindow(win, dev, (InternalEvent *) &event, FALSE, + TRUE) != NULL); + if (rc) + DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab); + return rc; +} + +/** + * Update the sprite coordinates based on the event. Update the cursor + * position, then update the event with the new coordinates that may have been + * changed. If the window underneath the sprite has changed, change to new + * cursor and send enter/leave events. + * + * CheckMotion() will not do anything and return FALSE if the event is not a + * pointer event. + * + * @return TRUE if the sprite has moved or FALSE otherwise. + */ +Bool +CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) +{ + WindowPtr prevSpriteWin, newSpriteWin; + SpritePtr pSprite = pDev->spriteInfo->sprite; + + verify_internal_event((InternalEvent *) ev); + + prevSpriteWin = pSprite->win; + + if (ev && !syncEvents.playingEvents) { + /* GetPointerEvents() guarantees that pointer events have the correct + rootX/Y set already. */ + switch (ev->type) { + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_Motion: + case ET_TouchBegin: + case ET_TouchUpdate: + case ET_TouchEnd: + break; + default: + /* all other events return FALSE */ + return FALSE; + } + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + /* Motion events entering DIX get translated to Screen 0 + coordinates. Replayed events have already been + translated since they've entered DIX before */ + ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x; + ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y; + } + else +#endif + { + if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) { + pSprite->hot.pScreen = pSprite->hotPhys.pScreen; + RootWindow(pDev->spriteInfo->sprite) = + pSprite->hot.pScreen->root; + } + } + + pSprite->hot.x = ev->root_x; + pSprite->hot.y = ev->root_y; + if (pSprite->hot.x < pSprite->physLimits.x1) + pSprite->hot.x = pSprite->physLimits.x1; + else if (pSprite->hot.x >= pSprite->physLimits.x2) + pSprite->hot.x = pSprite->physLimits.x2 - 1; + if (pSprite->hot.y < pSprite->physLimits.y1) + pSprite->hot.y = pSprite->physLimits.y1; + else if (pSprite->hot.y >= pSprite->physLimits.y2) + pSprite->hot.y = pSprite->physLimits.y2 - 1; + if (pSprite->hotShape) + ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, + &pSprite->hot.y); + pSprite->hotPhys = pSprite->hot; + + if ((pSprite->hotPhys.x != ev->root_x) || + (pSprite->hotPhys.y != ev->root_y)) { +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + XineramaSetCursorPosition(pDev, pSprite->hotPhys.x, + pSprite->hotPhys.y, FALSE); + } + else +#endif + { + (*pSprite->hotPhys.pScreen->SetCursorPosition) (pDev, + pSprite-> + hotPhys.pScreen, + pSprite-> + hotPhys.x, + pSprite-> + hotPhys.y, + FALSE); + } + } + + ev->root_x = pSprite->hot.x; + ev->root_y = pSprite->hot.y; + } + + newSpriteWin = XYToWindow(pSprite, pSprite->hot.x, pSprite->hot.y); + + if (newSpriteWin != prevSpriteWin) { + int sourceid; + + if (!ev) { + UpdateCurrentTimeIf(); + sourceid = pDev->id; /* when from WindowsRestructured */ + } + else + sourceid = ev->sourceid; + + if (prevSpriteWin != NullWindow) { + if (!ActivateEnterGrab(pDev, prevSpriteWin, newSpriteWin)) + DoEnterLeaveEvents(pDev, sourceid, prevSpriteWin, + newSpriteWin, NotifyNormal); + } + /* set pSprite->win after ActivateEnterGrab, otherwise + sprite window == grab_window and no enter/leave events are + sent. */ + pSprite->win = newSpriteWin; + PostNewCursor(pDev); + return FALSE; + } + return TRUE; +} + +/** + * Windows have restructured, we need to update the sprite position and the + * sprite's cursor. + */ +void +WindowsRestructured(void) +{ + DeviceIntPtr pDev = inputInfo.devices; + + while (pDev) { + if (IsMaster(pDev) || IsFloating(pDev)) + CheckMotion(NULL, pDev); + pDev = pDev->next; + } +} + +#ifdef PANORAMIX +/* This was added to support reconfiguration under Xdmx. The problem is + * that if the 0th screen (i.e., screenInfo.screens[0]) is moved to an origin + * other than 0,0, the information in the private sprite structure must + * be updated accordingly, or XYToWindow (and other routines) will not + * compute correctly. */ +void +ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) +{ + GrabPtr grab; + DeviceIntPtr pDev; + SpritePtr pSprite; + + if (noPanoramiXExtension) + return; + + pDev = inputInfo.devices; + while (pDev) { + if (DevHasCursor(pDev)) { + pSprite = pDev->spriteInfo->sprite; + pSprite->hot.x -= xoff; + pSprite->hot.y -= yoff; + + pSprite->hotPhys.x -= xoff; + pSprite->hotPhys.y -= yoff; + + pSprite->hotLimits.x1 -= xoff; + pSprite->hotLimits.y1 -= yoff; + pSprite->hotLimits.x2 -= xoff; + pSprite->hotLimits.y2 -= yoff; + + if (RegionNotEmpty(&pSprite->Reg1)) + RegionTranslate(&pSprite->Reg1, xoff, yoff); + if (RegionNotEmpty(&pSprite->Reg2)) + RegionTranslate(&pSprite->Reg2, xoff, yoff); + + /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ + if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { + if (grab->confineTo->drawable.pScreen + != pSprite->hotPhys.pScreen) + pSprite->hotPhys.x = pSprite->hotPhys.y = 0; + ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(pDev, + pSprite->hotPhys.pScreen->root, + TRUE, FALSE); + + } + pDev = pDev->next; + } +} +#endif + +/** + * Initialize a sprite for the given device and set it to some sane values. If + * the device already has a sprite alloc'd, don't realloc but just reset to + * default values. + * If a window is supplied, the sprite will be initialized with the window's + * cursor and positioned in the center of the window's screen. The root window + * is a good choice to pass in here. + * + * It's a good idea to call it only for pointer devices, unless you have a + * really talented keyboard. + * + * @param pDev The device to initialize. + * @param pWin The window where to generate the sprite in. + * + */ +void +InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) +{ + SpritePtr pSprite; + ScreenPtr pScreen; + CursorPtr pCursor; + + if (!pDev->spriteInfo->sprite) { + DeviceIntPtr it; + + pDev->spriteInfo->sprite = (SpritePtr) calloc(1, sizeof(SpriteRec)); + if (!pDev->spriteInfo->sprite) + FatalError("InitializeSprite: failed to allocate sprite struct"); + + /* We may have paired another device with this device before our + * device had a actual sprite. We need to check for this and reset the + * sprite field for all paired devices. + * + * The VCK is always paired with the VCP before the VCP has a sprite. + */ + for (it = inputInfo.devices; it; it = it->next) { + if (it->spriteInfo->paired == pDev) + it->spriteInfo->sprite = pDev->spriteInfo->sprite; + } + if (inputInfo.keyboard->spriteInfo->paired == pDev) + inputInfo.keyboard->spriteInfo->sprite = pDev->spriteInfo->sprite; + } + + pSprite = pDev->spriteInfo->sprite; + pDev->spriteInfo->spriteOwner = TRUE; + + pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr) NULL; + pSprite->hot.pScreen = pScreen; + pSprite->hotPhys.pScreen = pScreen; + if (pScreen) { + pSprite->hotPhys.x = pScreen->width / 2; + pSprite->hotPhys.y = pScreen->height / 2; + pSprite->hotLimits.x2 = pScreen->width; + pSprite->hotLimits.y2 = pScreen->height; + } + + pSprite->hot = pSprite->hotPhys; + pSprite->win = pWin; + + if (pWin) { + pCursor = wCursor(pWin); + pSprite->spriteTrace = (WindowPtr *) calloc(1, 32 * sizeof(WindowPtr)); + if (!pSprite->spriteTrace) + FatalError("Failed to allocate spriteTrace"); + pSprite->spriteTraceSize = 32; + + RootWindow(pDev->spriteInfo->sprite) = pWin; + pSprite->spriteTraceGood = 1; + + pSprite->pEnqueueScreen = pScreen; + pSprite->pDequeueScreen = pSprite->pEnqueueScreen; + + } + else { + pCursor = NullCursor; + pSprite->spriteTrace = NULL; + pSprite->spriteTraceSize = 0; + pSprite->spriteTraceGood = 0; + pSprite->pEnqueueScreen = screenInfo.screens[0]; + pSprite->pDequeueScreen = pSprite->pEnqueueScreen; + } + pCursor = RefCursor(pCursor); + if (pSprite->current) + FreeCursor(pSprite->current, None); + pSprite->current = RefCursor(pCursor); + + if (pScreen) { + (*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current); + (*pScreen->CursorLimits) (pDev, pScreen, pSprite->current, + &pSprite->hotLimits, &pSprite->physLimits); + pSprite->confined = FALSE; + + (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); + (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, + pSprite->hot.y, FALSE); + (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); + } +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + pSprite->hotLimits.x1 = -screenInfo.screens[0]->x; + pSprite->hotLimits.y1 = -screenInfo.screens[0]->y; + pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x; + pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y; + pSprite->physLimits = pSprite->hotLimits; + pSprite->confineWin = NullWindow; + pSprite->hotShape = NullRegion; + pSprite->screen = pScreen; + /* gotta UNINIT these someplace */ + RegionNull(&pSprite->Reg1); + RegionNull(&pSprite->Reg2); + } +#endif +} + +void FreeSprite(DeviceIntPtr dev) +{ + if (DevHasCursor(dev) && dev->spriteInfo->sprite) { + if (dev->spriteInfo->sprite->current) + FreeCursor(dev->spriteInfo->sprite->current, None); + free(dev->spriteInfo->sprite->spriteTrace); + free(dev->spriteInfo->sprite); + } + dev->spriteInfo->sprite = NULL; +} + + +/** + * Update the mouse sprite info when the server switches from a pScreen to another. + * Otherwise, the pScreen of the mouse sprite is never updated when we switch + * from a pScreen to another. Never updating the pScreen of the mouse sprite + * implies that windows that are in pScreen whose pScreen->myNum >0 will never + * get pointer events. This is because in CheckMotion(), sprite.hotPhys.pScreen + * always points to the first pScreen it has been set by + * DefineInitialRootWindow(). + * + * Calling this function is useful for use cases where the server + * has more than one pScreen. + * This function is similar to DefineInitialRootWindow() but it does not + * reset the mouse pointer position. + * @param win must be the new pScreen we are switching to. + */ +void +UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + SpritePtr pSprite = NULL; + WindowPtr win = NULL; + CursorPtr pCursor; + + if (!pScreen) + return; + + if (!pDev->spriteInfo->sprite) + return; + + pSprite = pDev->spriteInfo->sprite; + + win = pScreen->root; + + pSprite->hotPhys.pScreen = pScreen; + pSprite->hot = pSprite->hotPhys; + pSprite->hotLimits.x2 = pScreen->width; + pSprite->hotLimits.y2 = pScreen->height; + pSprite->win = win; + pCursor = RefCursor(wCursor(win)); + if (pSprite->current) + FreeCursor(pSprite->current, 0); + pSprite->current = pCursor; + pSprite->spriteTraceGood = 1; + pSprite->spriteTrace[0] = win; + (*pScreen->CursorLimits) (pDev, + pScreen, + pSprite->current, + &pSprite->hotLimits, &pSprite->physLimits); + pSprite->confined = FALSE; + (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); + (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + pSprite->hotLimits.x1 = -screenInfo.screens[0]->x; + pSprite->hotLimits.y1 = -screenInfo.screens[0]->y; + pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x; + pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y; + pSprite->physLimits = pSprite->hotLimits; + pSprite->screen = pScreen; + } +#endif +} + +/* + * This does not take any shortcuts, and even ignores its argument, since + * it does not happen very often, and one has to walk up the tree since + * this might be a newly instantiated cursor for an intermediate window + * between the one the pointer is in and the one that the last cursor was + * instantiated from. + */ +void +WindowHasNewCursor(WindowPtr pWin) +{ + DeviceIntPtr pDev; + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) + if (DevHasCursor(pDev)) + PostNewCursor(pDev); +} + +void +NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) +{ + DeviceIntPtr ptr; + SpritePtr pSprite; + + ptr = + IsFloating(pDev) ? pDev : + GetXTestDevice(GetMaster(pDev, MASTER_POINTER)); + pSprite = ptr->spriteInfo->sprite; + + pSprite->hotPhys.x = x; + pSprite->hotPhys.y = y; +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x; + pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y; + if (newScreen != pSprite->screen) { + pSprite->screen = newScreen; + /* Make sure we tell the DDX to update its copy of the screen */ + if (pSprite->confineWin) + XineramaConfineCursorToWindow(ptr, pSprite->confineWin, TRUE); + else + XineramaConfineCursorToWindow(ptr, screenInfo.screens[0]->root, + TRUE); + /* if the pointer wasn't confined, the DDX won't get + told of the pointer warp so we reposition it here */ + if (!syncEvents.playingEvents) + (*pSprite->screen->SetCursorPosition) (ptr, + pSprite->screen, + pSprite->hotPhys.x + + screenInfo.screens[0]-> + x - pSprite->screen->x, + pSprite->hotPhys.y + + screenInfo.screens[0]-> + y - pSprite->screen->y, + FALSE); + } + } + else +#endif + if (newScreen != pSprite->hotPhys.pScreen) + ConfineCursorToWindow(ptr, newScreen->root, TRUE, FALSE); +} + +#ifdef PANORAMIX + +static Bool +XineramaPointInWindowIsVisible(WindowPtr pWin, int x, int y) +{ + BoxRec box; + int i, xoff, yoff; + + if (!pWin->realized) + return FALSE; + + if (RegionContainsPoint(&pWin->borderClip, x, y, &box)) + return TRUE; + + if (!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) + return FALSE; + + xoff = x + screenInfo.screens[0]->x; + yoff = y + screenInfo.screens[0]->y; + + FOR_NSCREENS_FORWARD_SKIP(i) { + pWin = inputInfo.pointer->spriteInfo->sprite->windows[i]; + + x = xoff - screenInfo.screens[i]->x; + y = yoff - screenInfo.screens[i]->y; + + if (RegionContainsPoint(&pWin->borderClip, x, y, &box) + && (!wInputShape(pWin) || + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box))) + return TRUE; + + } + + return FALSE; +} + +static int +XineramaWarpPointer(ClientPtr client) +{ + WindowPtr dest = NULL; + int x, y, rc; + SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; + + REQUEST(xWarpPointerReq); + + if (stuff->dstWid != None) { + rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; + } + x = pSprite->hotPhys.x; + y = pSprite->hotPhys.y; + + if (stuff->srcWid != None) { + int winX, winY; + XID winID = stuff->srcWid; + WindowPtr source; + + rc = dixLookupWindow(&source, winID, client, DixReadAccess); + if (rc != Success) + return rc; + + winX = source->drawable.x; + winY = source->drawable.y; + if (source == screenInfo.screens[0]->root) { + winX -= screenInfo.screens[0]->x; + winY -= screenInfo.screens[0]->y; + } + if (x < winX + stuff->srcX || + y < winY + stuff->srcY || + (stuff->srcWidth != 0 && + winX + stuff->srcX + (int) stuff->srcWidth < x) || + (stuff->srcHeight != 0 && + winY + stuff->srcY + (int) stuff->srcHeight < y) || + !XineramaPointInWindowIsVisible(source, x, y)) + return Success; + } + if (dest) { + x = dest->drawable.x; + y = dest->drawable.y; + if (dest == screenInfo.screens[0]->root) { + x -= screenInfo.screens[0]->x; + y -= screenInfo.screens[0]->y; + } + } + + x += stuff->dstX; + y += stuff->dstY; + + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + if (pSprite->hotShape) + ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); + + XineramaSetCursorPosition(PickPointer(client), x, y, TRUE); + + return Success; +} + +#endif + +/** + * Server-side protocol handling for WarpPointer request. + * Warps the cursor position to the coordinates given in the request. + */ +int +ProcWarpPointer(ClientPtr client) +{ + WindowPtr dest = NULL; + int x, y, rc; + ScreenPtr newScreen; + DeviceIntPtr dev, tmp; + SpritePtr pSprite; + + REQUEST(xWarpPointerReq); + REQUEST_SIZE_MATCH(xWarpPointerReq); + + dev = PickPointer(client); + + for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { + if (GetMaster(tmp, MASTER_ATTACHED) == dev) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess); + if (rc != Success) + return rc; + } + } + + if (dev->lastSlave) + dev = dev->lastSlave; + pSprite = dev->spriteInfo->sprite; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return XineramaWarpPointer(client); +#endif + + if (stuff->dstWid != None) { + rc = dixLookupWindow(&dest, stuff->dstWid, client, DixGetAttrAccess); + if (rc != Success) + return rc; + } + x = pSprite->hotPhys.x; + y = pSprite->hotPhys.y; + + if (stuff->srcWid != None) { + int winX, winY; + XID winID = stuff->srcWid; + WindowPtr source; + + rc = dixLookupWindow(&source, winID, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + winX = source->drawable.x; + winY = source->drawable.y; + if (source->drawable.pScreen != pSprite->hotPhys.pScreen || + x < winX + stuff->srcX || + y < winY + stuff->srcY || + (stuff->srcWidth != 0 && + winX + stuff->srcX + (int) stuff->srcWidth < x) || + (stuff->srcHeight != 0 && + winY + stuff->srcY + (int) stuff->srcHeight < y) || + !PointInWindowIsVisible(source, x, y)) + return Success; + } + if (dest) { + x = dest->drawable.x; + y = dest->drawable.y; + newScreen = dest->drawable.pScreen; + } + else + newScreen = pSprite->hotPhys.pScreen; + + x += stuff->dstX; + y += stuff->dstY; + + if (x < 0) + x = 0; + else if (x >= newScreen->width) + x = newScreen->width - 1; + if (y < 0) + y = 0; + else if (y >= newScreen->height) + y = newScreen->height - 1; + + if (newScreen == pSprite->hotPhys.pScreen) { + if (x < pSprite->physLimits.x1) + x = pSprite->physLimits.x1; + else if (x >= pSprite->physLimits.x2) + x = pSprite->physLimits.x2 - 1; + if (y < pSprite->physLimits.y1) + y = pSprite->physLimits.y1; + else if (y >= pSprite->physLimits.y2) + y = pSprite->physLimits.y2 - 1; + if (pSprite->hotShape) + ConfineToShape(dev, pSprite->hotShape, &x, &y); + (*newScreen->SetCursorPosition) (dev, newScreen, x, y, TRUE); + } + else if (!PointerConfinedToScreen(dev)) { + NewCurrentScreen(dev, newScreen, x, y); + } + return Success; +} + +static Bool +BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) +{ + if (RegionNotEmpty(&pWin->borderSize)) + return TRUE; + +#ifdef PANORAMIX + if (!noPanoramiXExtension && XineramaSetWindowPntrs(pDev, pWin)) { + int i; + + FOR_NSCREENS_FORWARD_SKIP(i) { + if (RegionNotEmpty + (&pDev->spriteInfo->sprite->windows[i]->borderSize)) + return TRUE; + } + } +#endif + return FALSE; +} + +/** + * Activate the given passive grab. If the grab is activated successfully, the + * event has been delivered to the client. + * + * @param device The device of the event to check. + * @param grab The grab to check. + * @param event The current device event. + * @param real_event The original event, in case of touch emulation. The + * real event is the one stored in the sync queue. + * + * @return Whether the grab has been activated. + */ +Bool +ActivatePassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event, + InternalEvent *real_event) +{ + SpritePtr pSprite = device->spriteInfo->sprite; + GrabInfoPtr grabinfo = &device->deviceGrab; + xEvent *xE = NULL; + int count; + int rc; + + /* The only consumers of corestate are Xi 1.x and core events, which + * are guaranteed to come from DeviceEvents. */ + if (grab->grabtype == XI || grab->grabtype == CORE) { + DeviceIntPtr gdev; + + event->device_event.corestate &= 0x1f00; + + if (grab->grabtype == CORE) + gdev = GetMaster(device, KEYBOARD_OR_FLOAT); + else + gdev = grab->modifierDevice; + + if (gdev && gdev->key && gdev->key->xkbInfo) + event->device_event.corestate |= + gdev->key->xkbInfo->state.grab_mods & (~0x1f00); + } + + if (grab->grabtype == CORE) { + rc = EventToCore(event, &xE, &count); + if (rc != Success) { + BUG_WARN_MSG(rc != BadMatch, "[dix] %s: core conversion failed" + "(%d, %d).\n", device->name, event->any.type, rc); + return FALSE; + } + } + else if (grab->grabtype == XI2) { + rc = EventToXI2(event, &xE); + if (rc != Success) { + if (rc != BadMatch) + BUG_WARN_MSG(rc != BadMatch, "[dix] %s: XI2 conversion failed" + "(%d, %d).\n", device->name, event->any.type, rc); + return FALSE; + } + count = 1; + } + else { + rc = EventToXI(event, &xE, &count); + if (rc != Success) { + if (rc != BadMatch) + BUG_WARN_MSG(rc != BadMatch, "[dix] %s: XI conversion failed" + "(%d, %d).\n", device->name, event->any.type, rc); + return FALSE; + } + } + + (*grabinfo->ActivateGrab) (device, grab, + ClientTimeToServerTime(event->any.time), TRUE); + + if (xE) { + FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE); + + /* XXX: XACE? */ + TryClientEvents(rClient(grab), device, xE, count, + GetEventFilter(device, xE), + GetEventFilter(device, xE), grab); + } + + if (grabinfo->sync.state == FROZEN_NO_EVENT) + grabinfo->sync.state = FROZEN_WITH_EVENT; + *grabinfo->sync.event = real_event->device_event; + + free(xE); + return TRUE; +} + +static BOOL +CoreGrabInterferes(DeviceIntPtr device, GrabPtr grab) +{ + DeviceIntPtr other; + BOOL interfering = FALSE; + + for (other = inputInfo.devices; other; other = other->next) { + GrabPtr othergrab = other->deviceGrab.grab; + + if (othergrab && othergrab->grabtype == CORE && + SameClient(grab, rClient(othergrab)) && + ((IsPointerDevice(grab->device) && + IsPointerDevice(othergrab->device)) || + (IsKeyboardDevice(grab->device) && + IsKeyboardDevice(othergrab->device)))) { + interfering = TRUE; + break; + } + } + + return interfering; +} + +enum MatchFlags { + NO_MATCH = 0x0, + CORE_MATCH = 0x1, + XI_MATCH = 0x2, + XI2_MATCH = 0x4, +}; + +/** + * Match the grab against the temporary grab on the given input level. + * Modifies the temporary grab pointer. + * + * @param grab The grab to match against + * @param tmp The temporary grab to use for matching + * @param level The input level we want to match on + * @param event_type Wire protocol event type + * + * @return The respective matched flag or 0 for no match + */ +static enum MatchFlags +MatchForType(const GrabPtr grab, GrabPtr tmp, enum InputLevel level, + int event_type) +{ + enum MatchFlags match; + BOOL ignore_device = FALSE; + int grabtype; + int evtype; + + switch (level) { + case XI2: + grabtype = XI2; + evtype = GetXI2Type(event_type); + BUG_WARN(!evtype); + match = XI2_MATCH; + break; + case XI: + grabtype = XI; + evtype = GetXIType(event_type); + match = XI_MATCH; + break; + case CORE: + grabtype = CORE; + evtype = GetCoreType(event_type); + match = CORE_MATCH; + ignore_device = TRUE; + break; + } + + tmp->grabtype = grabtype; + tmp->type = evtype; + + if (tmp->type && GrabMatchesSecond(tmp, grab, ignore_device)) + return match; + + return NO_MATCH; +} + +/** + * Check an individual grab against an event to determine if a passive grab + * should be activated. + * + * @param device The device of the event to check. + * @param grab The grab to check. + * @param event The current device event. + * @param checkCore Check for core grabs too. + * @param tempGrab A pre-allocated temporary grab record for matching. This + * must have the window and device values filled in. + * + * @return Whether the grab matches the event. + */ +static Bool +CheckPassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event, + Bool checkCore, GrabPtr tempGrab) +{ + DeviceIntPtr gdev; + XkbSrvInfoPtr xkbi = NULL; + enum MatchFlags match = 0; + int emulated_type = 0; + + gdev = grab->modifierDevice; + if (grab->grabtype == CORE) { + gdev = GetMaster(device, KEYBOARD_OR_FLOAT); + } + else if (grab->grabtype == XI2) { + /* if the device is an attached slave device, gdev must be the + * attached master keyboard. Since the slave may have been + * reattached after the grab, the modifier device may not be the + * same. */ + if (!IsMaster(grab->device) && !IsFloating(device)) + gdev = GetMaster(device, MASTER_KEYBOARD); + } + + if (gdev && gdev->key) + xkbi = gdev->key->xkbInfo; + tempGrab->modifierDevice = grab->modifierDevice; + tempGrab->modifiersDetail.exact = xkbi ? xkbi->state.grab_mods : 0; + + /* Check for XI2 and XI grabs first */ + match = MatchForType(grab, tempGrab, XI2, event->any.type); + + if (!match && IsTouchEvent(event) && + (event->device_event.flags & TOUCH_POINTER_EMULATED)) { + emulated_type = TouchGetPointerEventType(event); + match = MatchForType(grab, tempGrab, XI2, emulated_type); + } + + if (!match) + match = MatchForType(grab, tempGrab, XI, event->any.type); + + if (!match && emulated_type) + match = MatchForType(grab, tempGrab, XI, emulated_type); + + if (!match && checkCore) { + match = MatchForType(grab, tempGrab, CORE, event->any.type); + if (!match && emulated_type) + match = MatchForType(grab, tempGrab, CORE, emulated_type); + } + + if (!match || (grab->confineTo && + (!grab->confineTo->realized || + !BorderSizeNotEmpty(device, grab->confineTo)))) + return FALSE; + + /* In some cases a passive core grab may exist, but the client + * already has a core grab on some other device. In this case we + * must not get the grab, otherwise we may never ungrab the + * device. + */ + + if (grab->grabtype == CORE) { + /* A passive grab may have been created for a different device + than it is assigned to at this point in time. + Update the grab's device and modifier device to reflect the + current state. + Since XGrabDeviceButton requires to specify the + modifierDevice explicitly, we don't override this choice. + */ + if (grab->type < GenericEvent) { + grab->device = device; + grab->modifierDevice = GetMaster(device, MASTER_KEYBOARD); + } + + if (CoreGrabInterferes(device, grab)) + return FALSE; + } + + return TRUE; +} + +/** + * "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a + * passive grab set on the window to be activated. + * If activate is true and a passive grab is found, it will be activated, + * and the event will be delivered to the client. + * + * @param pWin The window that may be subject to a passive grab. + * @param device Device that caused the event. + * @param event The current device event. + * @param checkCore Check for core grabs too. + * @param activate If a grab is found, activate it and deliver the event. + */ + +GrabPtr +CheckPassiveGrabsOnWindow(WindowPtr pWin, + DeviceIntPtr device, + InternalEvent *event, BOOL checkCore, BOOL activate) +{ + GrabPtr grab = wPassiveGrabs(pWin); + GrabPtr tempGrab; + + if (!grab) + return NULL; + + tempGrab = AllocGrab(NULL); + + /* Fill out the grab details, but leave the type for later before + * comparing */ + switch (event->any.type) { + case ET_KeyPress: + case ET_KeyRelease: + tempGrab->detail.exact = event->device_event.detail.key; + break; + case ET_ButtonPress: + case ET_ButtonRelease: + case ET_TouchBegin: + case ET_TouchEnd: + tempGrab->detail.exact = event->device_event.detail.button; + break; + default: + tempGrab->detail.exact = 0; + break; + } + tempGrab->window = pWin; + tempGrab->device = device; + tempGrab->detail.pMask = NULL; + tempGrab->modifiersDetail.pMask = NULL; + tempGrab->next = NULL; + + for (; grab; grab = grab->next) { + if (!CheckPassiveGrab(device, grab, event, checkCore, tempGrab)) + continue; + + if (activate && !ActivatePassiveGrab(device, grab, event, event)) + continue; + + break; + } + + FreeGrab(tempGrab); + return grab; +} + +/** + * CheckDeviceGrabs handles both keyboard and pointer events that may cause + * a passive grab to be activated. + * + * If the event is a keyboard event, the ancestors of the focus window are + * traced down and tried to see if they have any passive grabs to be + * activated. If the focus window itself is reached and it's descendants + * contain the pointer, the ancestors of the window that the pointer is in + * are then traced down starting at the focus window, otherwise no grabs are + * activated. + * If the event is a pointer event, the ancestors of the window that the + * pointer is in are traced down starting at the root until CheckPassiveGrabs + * causes a passive grab to activate or all the windows are + * tried. PRH + * + * If a grab is activated, the event has been sent to the client already! + * + * The event we pass in must always be an XI event. From this, we then emulate + * the core event and then check for grabs. + * + * @param device The device that caused the event. + * @param xE The event to handle (Device{Button|Key}Press). + * @param count Number of events in list. + * @return TRUE if a grab has been activated or false otherwise. +*/ + +Bool +CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor) +{ + int i; + WindowPtr pWin = NULL; + FocusClassPtr focus = + IsPointerEvent((InternalEvent *) event) ? NULL : device->focus; + BOOL sendCore = (IsMaster(device) && device->coreEvents); + Bool ret = FALSE; + + if (event->type != ET_ButtonPress && event->type != ET_KeyPress) + return FALSE; + + if (event->type == ET_ButtonPress && (device->button->buttonsDown != 1)) + return FALSE; + + if (device->deviceGrab.grab) + return FALSE; + + i = 0; + if (ancestor) { + while (i < device->spriteInfo->sprite->spriteTraceGood) + if (device->spriteInfo->sprite->spriteTrace[i++] == ancestor) + break; + if (i == device->spriteInfo->sprite->spriteTraceGood) + goto out; + } + + if (focus) { + for (; i < focus->traceGood; i++) { + pWin = focus->trace[i]; + if (CheckPassiveGrabsOnWindow(pWin, device, (InternalEvent *) event, + sendCore, TRUE)) { + ret = TRUE; + goto out; + } + } + + if ((focus->win == NoneWin) || + (i >= device->spriteInfo->sprite->spriteTraceGood) || + (pWin && pWin != device->spriteInfo->sprite->spriteTrace[i - 1])) + goto out; + } + + for (; i < device->spriteInfo->sprite->spriteTraceGood; i++) { + pWin = device->spriteInfo->sprite->spriteTrace[i]; + if (CheckPassiveGrabsOnWindow(pWin, device, (InternalEvent *) event, + sendCore, TRUE)) { + ret = TRUE; + goto out; + } + } + + out: + if (ret == TRUE && event->type == ET_KeyPress) + device->deviceGrab.activatingKey = event->detail.key; + return ret; +} + +/** + * Called for keyboard events to deliver event to whatever client owns the + * focus. + * + * The event is delivered to the keyboard's focus window, the root window or + * to the window owning the input focus. + * + * @param keybd The keyboard originating the event. + * @param event The event, not yet in wire format. + * @param window Window underneath the sprite. + */ +void +DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window) +{ + DeviceIntPtr ptr; + WindowPtr focus = keybd->focus->win; + BOOL sendCore = (IsMaster(keybd) && keybd->coreEvents); + xEvent *core = NULL, *xE = NULL, *xi2 = NULL; + int count, rc; + int deliveries = 0; + + if (focus == FollowKeyboardWin) + focus = inputInfo.keyboard->focus->win; + if (!focus) + return; + if (focus == PointerRootWin) { + DeliverDeviceEvents(window, event, NullGrab, NullWindow, keybd); + return; + } + if ((focus == window) || IsParent(focus, window)) { + if (DeliverDeviceEvents(window, event, NullGrab, focus, keybd)) + return; + } + + /* just deliver it to the focus window */ + ptr = GetMaster(keybd, POINTER_OR_FLOAT); + + rc = EventToXI2(event, &xi2); + if (rc == Success) { + /* XXX: XACE */ + int filter = GetEventFilter(keybd, xi2); + + FixUpEventFromWindow(ptr->spriteInfo->sprite, xi2, focus, None, FALSE); + deliveries = DeliverEventsToWindow(keybd, focus, xi2, 1, + filter, NullGrab); + if (deliveries > 0) + goto unwind; + } + else if (rc != BadMatch) + ErrorF + ("[dix] %s: XI2 conversion failed in DFE (%d, %d). Skipping delivery.\n", + keybd->name, event->any.type, rc); + + rc = EventToXI(event, &xE, &count); + if (rc == Success && + XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count) == Success) { + FixUpEventFromWindow(ptr->spriteInfo->sprite, xE, focus, None, FALSE); + deliveries = DeliverEventsToWindow(keybd, focus, xE, count, + GetEventFilter(keybd, xE), NullGrab); + + if (deliveries > 0) + goto unwind; + } + else if (rc != BadMatch) + ErrorF + ("[dix] %s: XI conversion failed in DFE (%d, %d). Skipping delivery.\n", + keybd->name, event->any.type, rc); + + if (sendCore) { + rc = EventToCore(event, &core, &count); + if (rc == Success) { + if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, core, count) == + Success) { + FixUpEventFromWindow(keybd->spriteInfo->sprite, core, focus, + None, FALSE); + deliveries = + DeliverEventsToWindow(keybd, focus, core, count, + GetEventFilter(keybd, core), + NullGrab); + } + } + else if (rc != BadMatch) + ErrorF + ("[dix] %s: core conversion failed DFE (%d, %d). Skipping delivery.\n", + keybd->name, event->any.type, rc); + } + + unwind: + free(core); + free(xE); + free(xi2); + return; +} + +int +DeliverOneGrabbedEvent(InternalEvent *event, DeviceIntPtr dev, + enum InputLevel level) +{ + SpritePtr pSprite = dev->spriteInfo->sprite; + int rc; + xEvent *xE = NULL; + int count = 0; + int deliveries = 0; + Mask mask; + GrabInfoPtr grabinfo = &dev->deviceGrab; + GrabPtr grab = grabinfo->grab; + Mask filter; + + if (grab->grabtype != level) + return 0; + + switch (level) { + case XI2: + rc = EventToXI2(event, &xE); + count = 1; + if (rc == Success) { + int evtype = xi2_get_type(xE); + + mask = GetXI2MaskByte(grab->xi2mask, dev, evtype); + filter = GetEventFilter(dev, xE); + } + break; + case XI: + if (grabinfo->fromPassiveGrab && grabinfo->implicitGrab) + mask = grab->deviceMask; + else + mask = grab->eventMask; + rc = EventToXI(event, &xE, &count); + if (rc == Success) + filter = GetEventFilter(dev, xE); + break; + case CORE: + rc = EventToCore(event, &xE, &count); + mask = grab->eventMask; + if (rc == Success) + filter = GetEventFilter(dev, xE); + break; + default: + BUG_WARN_MSG(1, "Invalid input level %d\n", level); + return 0; + } + + if (rc == Success) { + FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE); + if (XaceHook(XACE_SEND_ACCESS, 0, dev, + grab->window, xE, count) || + XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), + grab->window, xE, count)) + deliveries = 1; /* don't send, but pretend we did */ + else if (level != CORE || !IsInterferingGrab(rClient(grab), dev, xE)) { + deliveries = TryClientEvents(rClient(grab), dev, + xE, count, mask, filter, grab); + } + } + else + BUG_WARN_MSG(rc != BadMatch, + "%s: conversion to mode %d failed on %d with %d\n", + dev->name, level, event->any.type, rc); + + free(xE); + return deliveries; +} + +/** + * Deliver an event from a device that is currently grabbed. Uses + * DeliverDeviceEvents() for further delivery if a ownerEvents is set on the + * grab. If not, TryClientEvents() is used. + * + * @param deactivateGrab True if the device's grab should be deactivated. + * + * @return The number of events delivered. + */ +int +DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, + Bool deactivateGrab) +{ + GrabPtr grab; + GrabInfoPtr grabinfo; + int deliveries = 0; + DeviceIntPtr dev; + SpritePtr pSprite = thisDev->spriteInfo->sprite; + BOOL sendCore = FALSE; + + grabinfo = &thisDev->deviceGrab; + grab = grabinfo->grab; + + if (grab->ownerEvents) { + WindowPtr focus; + + /* Hack: Some pointer device have a focus class. So we need to check + * for the type of event, to see if we really want to deliver it to + * the focus window. For pointer events, the answer is no. + */ + if (IsPointerEvent(event)) + focus = PointerRootWin; + else if (thisDev->focus) { + focus = thisDev->focus->win; + if (focus == FollowKeyboardWin) + focus = inputInfo.keyboard->focus->win; + } + else + focus = PointerRootWin; + if (focus == PointerRootWin) + deliveries = DeliverDeviceEvents(pSprite->win, event, grab, + NullWindow, thisDev); + else if (focus && (focus == pSprite->win || + IsParent(focus, pSprite->win))) + deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus, + thisDev); + else if (focus) + deliveries = DeliverDeviceEvents(focus, event, grab, focus, + thisDev); + } + if (!deliveries) { + /* XXX: In theory, we could pass the internal events through to + * everything and only convert just before hitting the wire. We can't + * do that yet, so DGE is the last stop for internal events. From here + * onwards, we deal with core/XI events. + */ + + sendCore = (IsMaster(thisDev) && thisDev->coreEvents); + /* try core event */ + if ((sendCore && grab->grabtype == CORE) || grab->grabtype != CORE) + deliveries = DeliverOneGrabbedEvent(event, thisDev, grab->grabtype); + + if (deliveries && (event->any.type == ET_Motion)) + thisDev->valuator->motionHintWindow = grab->window; + } + if (deliveries && !deactivateGrab && + (event->any.type == ET_KeyPress || + event->any.type == ET_KeyRelease || + event->any.type == ET_ButtonPress || + event->any.type == ET_ButtonRelease)) { + switch (grabinfo->sync.state) { + case FREEZE_BOTH_NEXT_EVENT: + dev = GetPairedDevice(thisDev); + if (dev) { + FreezeThaw(dev, TRUE); + if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) && + (CLIENT_BITS(grab->resource) == + CLIENT_BITS(dev->deviceGrab.grab->resource))) + dev->deviceGrab.sync.state = FROZEN_NO_EVENT; + else + dev->deviceGrab.sync.other = grab; + } + /* fall through */ + case FREEZE_NEXT_EVENT: + grabinfo->sync.state = FROZEN_WITH_EVENT; + FreezeThaw(thisDev, TRUE); + *grabinfo->sync.event = event->device_event; + break; + } + } + + return deliveries; +} + +/* This function is used to set the key pressed or key released state - + this is only used when the pressing of keys does not cause + the device's processInputProc to be called, as in for example Mouse Keys. +*/ +void +FixKeyState(DeviceEvent *event, DeviceIntPtr keybd) +{ + int key = event->detail.key; + + if (event->type == ET_KeyPress) { + DebugF("FixKeyState: Key %d %s\n", key, + ((event->type == ET_KeyPress) ? "down" : "up")); + } + + if (event->type == ET_KeyPress) + set_key_down(keybd, key, KEY_PROCESSED); + else if (event->type == ET_KeyRelease) + set_key_up(keybd, key, KEY_PROCESSED); + else + FatalError("Impossible keyboard event"); +} + +#define AtMostOneClient \ + (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask) +#define ManagerMask \ + (SubstructureRedirectMask | ResizeRedirectMask) + +/** + * Recalculate which events may be deliverable for the given window. + * Recalculated mask is used for quicker determination which events may be + * delivered to a window. + * + * The otherEventMasks on a WindowOptional is the combination of all event + * masks set by all clients on the window. + * deliverableEventMask is the combination of the eventMask and the + * otherEventMask plus the events that may be propagated to the parent. + * + * Traverses to siblings and parents of the window. + */ +void +RecalculateDeliverableEvents(WindowPtr pWin) +{ + OtherClients *others; + WindowPtr pChild; + + pChild = pWin; + while (1) { + if (pChild->optional) { + pChild->optional->otherEventMasks = 0; + for (others = wOtherClients(pChild); others; others = others->next) { + pChild->optional->otherEventMasks |= others->mask; + } + } + pChild->deliverableEvents = pChild->eventMask | + wOtherEventMasks(pChild); + if (pChild->parent) + pChild->deliverableEvents |= + (pChild->parent->deliverableEvents & + ~wDontPropagateMask(pChild) & PropagateMask); + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } +} + +/** + * + * \param value must conform to DeleteType + */ +int +OtherClientGone(pointer value, XID id) +{ + OtherClientsPtr other, prev; + WindowPtr pWin = (WindowPtr) value; + + prev = 0; + for (other = wOtherClients(pWin); other; other = other->next) { + if (other->resource == id) { + if (prev) + prev->next = other->next; + else { + if (!(pWin->optional->otherClients = other->next)) + CheckWindowOptionalNeed(pWin); + } + free(other); + RecalculateDeliverableEvents(pWin); + return Success; + } + prev = other; + } + FatalError("client not on event list"); +} + +int +EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) +{ + Mask check; + OtherClients *others; + DeviceIntPtr dev; + int rc; + + if (mask & ~AllEventMasks) { + client->errorValue = mask; + return BadValue; + } + check = (mask & ManagerMask); + if (check) { + rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, + RT_WINDOW, pWin, RT_NONE, NULL, DixManageAccess); + if (rc != Success) + return rc; + } + check = (mask & AtMostOneClient); + if (check & (pWin->eventMask | wOtherEventMasks(pWin))) { + /* It is illegal for two different clients to select on any of the + events for AtMostOneClient. However, it is OK, for some client to + continue selecting on one of those events. */ + if ((wClient(pWin) != client) && (check & pWin->eventMask)) + return BadAccess; + for (others = wOtherClients(pWin); others; others = others->next) { + if (!SameClient(others, client) && (check & others->mask)) + return BadAccess; + } + } + if (wClient(pWin) == client) { + check = pWin->eventMask; + pWin->eventMask = mask; + } + else { + for (others = wOtherClients(pWin); others; others = others->next) { + if (SameClient(others, client)) { + check = others->mask; + if (mask == 0) { + FreeResource(others->resource, RT_NONE); + return Success; + } + else + others->mask = mask; + goto maskSet; + } + } + check = 0; + if (!pWin->optional && !MakeWindowOptional(pWin)) + return BadAlloc; + others = malloc(sizeof(OtherClients)); + if (!others) + return BadAlloc; + others->mask = mask; + others->resource = FakeClientID(client->index); + others->next = pWin->optional->otherClients; + pWin->optional->otherClients = others; + if (!AddResource(others->resource, RT_OTHERCLIENT, (pointer) pWin)) + return BadAlloc; + } + maskSet: + if ((mask & PointerMotionHintMask) && !(check & PointerMotionHintMask)) { + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev->valuator && dev->valuator->motionHintWindow == pWin) + dev->valuator->motionHintWindow = NullWindow; + } + } + RecalculateDeliverableEvents(pWin); + return Success; +} + +int +EventSuppressForWindow(WindowPtr pWin, ClientPtr client, + Mask mask, Bool *checkOptional) +{ + int i, freed; + + if (mask & ~PropagateMask) { + client->errorValue = mask; + return BadValue; + } + if (pWin->dontPropagate) + DontPropagateRefCnts[pWin->dontPropagate]--; + if (!mask) + i = 0; + else { + for (i = DNPMCOUNT, freed = 0; --i > 0;) { + if (!DontPropagateRefCnts[i]) + freed = i; + else if (mask == DontPropagateMasks[i]) + break; + } + if (!i && freed) { + i = freed; + DontPropagateMasks[i] = mask; + } + } + if (i || !mask) { + pWin->dontPropagate = i; + if (i) + DontPropagateRefCnts[i]++; + if (pWin->optional) { + pWin->optional->dontPropagateMask = mask; + *checkOptional = TRUE; + } + } + else { + if (!pWin->optional && !MakeWindowOptional(pWin)) { + if (pWin->dontPropagate) + DontPropagateRefCnts[pWin->dontPropagate]++; + return BadAlloc; + } + pWin->dontPropagate = 0; + pWin->optional->dontPropagateMask = mask; + } + RecalculateDeliverableEvents(pWin); + return Success; +} + +/** + * Assembles an EnterNotify or LeaveNotify and sends it event to the client. + * Uses the paired keyboard to get some additional information. + */ +void +CoreEnterLeaveEvent(DeviceIntPtr mouse, + int type, + int mode, int detail, WindowPtr pWin, Window child) +{ + xEvent event = { + .u.u.type = type, + .u.u.detail = detail + }; + WindowPtr focus; + DeviceIntPtr keybd; + GrabPtr grab = mouse->deviceGrab.grab; + Mask mask; + + keybd = GetMaster(mouse, KEYBOARD_OR_FLOAT); + + if ((pWin == mouse->valuator->motionHintWindow) && + (detail != NotifyInferior)) + mouse->valuator->motionHintWindow = NullWindow; + if (grab) { + mask = (pWin == grab->window) ? grab->eventMask : 0; + if (grab->ownerEvents) + mask |= EventMaskForClient(pWin, rClient(grab)); + } + else { + mask = pWin->eventMask | wOtherEventMasks(pWin); + } + + event.u.enterLeave.time = currentTime.milliseconds; + event.u.enterLeave.rootX = mouse->spriteInfo->sprite->hot.x; + event.u.enterLeave.rootY = mouse->spriteInfo->sprite->hot.y; + /* Counts on the same initial structure of crossing & button events! */ + FixUpEventFromWindow(mouse->spriteInfo->sprite, &event, pWin, None, FALSE); + /* Enter/Leave events always set child */ + event.u.enterLeave.child = child; + event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ? + ELFlagSameScreen : 0; + event.u.enterLeave.state = + mouse->button ? (mouse->button->state & 0x1f00) : 0; + if (keybd) + event.u.enterLeave.state |= + XkbGrabStateFromRec(&keybd->key->xkbInfo->state); + event.u.enterLeave.mode = mode; + focus = (keybd) ? keybd->focus->win : None; + if ((focus != NoneWin) && + ((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin))) + event.u.enterLeave.flags |= ELFlagFocus; + + if ((mask & GetEventFilter(mouse, &event))) { + if (grab) + TryClientEvents(rClient(grab), mouse, &event, 1, mask, + GetEventFilter(mouse, &event), grab); + else + DeliverEventsToWindow(mouse, pWin, &event, 1, + GetEventFilter(mouse, &event), NullGrab); + } + + if ((type == EnterNotify) && (mask & KeymapStateMask)) { + xKeymapEvent ke = { + .type = KeymapNotify + }; + ClientPtr client = grab ? rClient(grab) : wClient(pWin); + int rc; + + rc = XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess); + if (rc == Success) + memcpy((char *) &ke.map[0], (char *) &keybd->key->down[1], 31); + + if (grab) + TryClientEvents(rClient(grab), keybd, (xEvent *) &ke, 1, + mask, KeymapStateMask, grab); + else + DeliverEventsToWindow(mouse, pWin, (xEvent *) &ke, 1, + KeymapStateMask, NullGrab); + } +} + +void +DeviceEnterLeaveEvent(DeviceIntPtr mouse, + int sourceid, + int type, + int mode, int detail, WindowPtr pWin, Window child) +{ + GrabPtr grab = mouse->deviceGrab.grab; + xXIEnterEvent *event; + WindowPtr focus; + int filter; + int btlen, len, i; + DeviceIntPtr kbd; + + if ((mode == XINotifyPassiveGrab && type == XI_Leave) || + (mode == XINotifyPassiveUngrab && type == XI_Enter)) + return; + + btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0; + btlen = bytes_to_int32(btlen); + len = sizeof(xXIEnterEvent) + btlen * 4; + + event = calloc(1, len); + event->type = GenericEvent; + event->extension = IReqCode; + event->evtype = type; + event->length = (len - sizeof(xEvent)) / 4; + event->buttons_len = btlen; + event->detail = detail; + event->time = currentTime.milliseconds; + event->deviceid = mouse->id; + event->sourceid = sourceid; + event->mode = mode; + event->root_x = double_to_fp1616(mouse->spriteInfo->sprite->hot.x); + event->root_y = double_to_fp1616(mouse->spriteInfo->sprite->hot.y); + + for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) + if (BitIsOn(mouse->button->down, i)) + SetBit(&event[1], i); + + kbd = GetMaster(mouse, MASTER_KEYBOARD); + if (kbd && kbd->key) { + event->mods.base_mods = kbd->key->xkbInfo->state.base_mods; + event->mods.latched_mods = kbd->key->xkbInfo->state.latched_mods; + event->mods.locked_mods = kbd->key->xkbInfo->state.locked_mods; + + event->group.base_group = kbd->key->xkbInfo->state.base_group; + event->group.latched_group = kbd->key->xkbInfo->state.latched_group; + event->group.locked_group = kbd->key->xkbInfo->state.locked_group; + } + + focus = (kbd) ? kbd->focus->win : None; + if ((focus != NoneWin) && + ((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin))) + event->focus = TRUE; + + FixUpEventFromWindow(mouse->spriteInfo->sprite, (xEvent *) event, pWin, + None, FALSE); + + filter = GetEventFilter(mouse, (xEvent *) event); + + if (grab && grab->grabtype == XI2) { + Mask mask; + + mask = xi2mask_isset(grab->xi2mask, mouse, type); + TryClientEvents(rClient(grab), mouse, (xEvent *) event, 1, mask, 1, + grab); + } + else { + if (!WindowXI2MaskIsset(mouse, pWin, (xEvent *) event)) + goto out; + DeliverEventsToWindow(mouse, pWin, (xEvent *) event, 1, filter, + NullGrab); + } + + out: + free(event); +} + +void +CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) +{ + xEvent event = { + .u.u.type = type, + .u.u.detail = detail + }; + event.u.focus.mode = mode; + event.u.focus.window = pWin->drawable.id; + + DeliverEventsToWindow(dev, pWin, &event, 1, + GetEventFilter(dev, &event), NullGrab); + if ((type == FocusIn) && + ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) { + xKeymapEvent ke = { + .type = KeymapNotify + }; + ClientPtr client = wClient(pWin); + int rc; + + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess); + if (rc == Success) + memcpy((char *) &ke.map[0], (char *) &dev->key->down[1], 31); + + DeliverEventsToWindow(dev, pWin, (xEvent *) &ke, 1, + KeymapStateMask, NullGrab); + } +} + +/** + * Set the input focus to the given window. Subsequent keyboard events will be + * delivered to the given window. + * + * Usually called from ProcSetInputFocus as result of a client request. If so, + * the device is the inputInfo.keyboard. + * If called from ProcXSetInputFocus as result of a client xinput request, the + * device is set to the device specified by the client. + * + * @param client Client that requested input focus change. + * @param dev Focus device. + * @param focusID The window to obtain the focus. Can be PointerRoot or None. + * @param revertTo Specifies where the focus reverts to when window becomes + * unviewable. + * @param ctime Specifies the time. + * @param followOK True if pointer is allowed to follow the keyboard. + */ +int +SetInputFocus(ClientPtr client, + DeviceIntPtr dev, + Window focusID, CARD8 revertTo, Time ctime, Bool followOK) +{ + FocusClassPtr focus; + WindowPtr focusWin; + int mode, rc; + TimeStamp time; + DeviceIntPtr keybd; /* used for FollowKeyboard or FollowKeyboardWin */ + + UpdateCurrentTime(); + if ((revertTo != RevertToParent) && + (revertTo != RevertToPointerRoot) && + (revertTo != RevertToNone) && + ((revertTo != RevertToFollowKeyboard) || !followOK)) { + client->errorValue = revertTo; + return BadValue; + } + time = ClientTimeToServerTime(ctime); + + keybd = GetMaster(dev, KEYBOARD_OR_FLOAT); + + if ((focusID == None) || (focusID == PointerRoot)) + focusWin = (WindowPtr) (long) focusID; + else if ((focusID == FollowKeyboard) && followOK) { + focusWin = keybd->focus->win; + } + else { + rc = dixLookupWindow(&focusWin, focusID, client, DixSetAttrAccess); + if (rc != Success) + return rc; + /* It is a match error to try to set the input focus to an + unviewable window. */ + if (!focusWin->realized) + return BadMatch; + } + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetFocusAccess); + if (rc != Success) + return Success; + + focus = dev->focus; + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, focus->time) == EARLIER)) + return Success; + mode = (dev->deviceGrab.grab) ? NotifyWhileGrabbed : NotifyNormal; + if (focus->win == FollowKeyboardWin) { + if (!ActivateFocusInGrab(dev, keybd->focus->win, focusWin)) + DoFocusEvents(dev, keybd->focus->win, focusWin, mode); + } + else { + if (!ActivateFocusInGrab(dev, focus->win, focusWin)) + DoFocusEvents(dev, focus->win, focusWin, mode); + } + focus->time = time; + focus->revert = revertTo; + if (focusID == FollowKeyboard) + focus->win = FollowKeyboardWin; + else + focus->win = focusWin; + if ((focusWin == NoneWin) || (focusWin == PointerRootWin)) + focus->traceGood = 0; + else { + int depth = 0; + WindowPtr pWin; + + for (pWin = focusWin; pWin; pWin = pWin->parent) + depth++; + if (depth > focus->traceSize) { + focus->traceSize = depth + 1; + focus->trace = realloc(focus->trace, + focus->traceSize * sizeof(WindowPtr)); + } + focus->traceGood = depth; + for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--) + focus->trace[depth] = pWin; + } + return Success; +} + +/** + * Server-side protocol handling for SetInputFocus request. + * + * Sets the input focus for the virtual core keyboard. + */ +int +ProcSetInputFocus(ClientPtr client) +{ + DeviceIntPtr kbd = PickKeyboard(client); + + REQUEST(xSetInputFocusReq); + + REQUEST_SIZE_MATCH(xSetInputFocusReq); + + return SetInputFocus(client, kbd, stuff->focus, + stuff->revertTo, stuff->time, FALSE); +} + +/** + * Server-side protocol handling for GetInputFocus request. + * + * Sends the current input focus for the client's keyboard back to the + * client. + */ +int +ProcGetInputFocus(ClientPtr client) +{ + DeviceIntPtr kbd = PickKeyboard(client); + xGetInputFocusReply rep; + FocusClassPtr focus = kbd->focus; + int rc; + + /* REQUEST(xReq); */ + REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetFocusAccess); + if (rc != Success) + return rc; + + rep = (xGetInputFocusReply) { + .type = X_Reply, + .length = 0, + .sequenceNumber = client->sequence, + .revertTo = focus->revert + }; + + if (focus->win == NoneWin) + rep.focus = None; + else if (focus->win == PointerRootWin) + rep.focus = PointerRoot; + else + rep.focus = focus->win->drawable.id; + + WriteReplyToClient(client, sizeof(xGetInputFocusReply), &rep); + return Success; +} + +/** + * Server-side protocol handling for GrabPointer request. + * + * Sets an active grab on the client's ClientPointer and returns success + * status to client. + */ +int +ProcGrabPointer(ClientPtr client) +{ + xGrabPointerReply rep; + DeviceIntPtr device = PickPointer(client); + GrabPtr grab; + GrabMask mask; + WindowPtr confineTo; + BYTE status; + + REQUEST(xGrabPointerReq); + int rc; + + REQUEST_SIZE_MATCH(xGrabPointerReq); + UpdateCurrentTime(); + + if (stuff->eventMask & ~PointerGrabMask) { + client->errorValue = stuff->eventMask; + return BadValue; + } + + if (stuff->confineTo == None) + confineTo = NullWindow; + else { + rc = dixLookupWindow(&confineTo, stuff->confineTo, client, + DixSetAttrAccess); + if (rc != Success) + return rc; + } + + grab = device->deviceGrab.grab; + + if (grab && grab->confineTo && !confineTo) + ConfineCursorToWindow(device, GetCurrentRootWindow(device), FALSE, FALSE); + + mask.core = stuff->eventMask; + + rc = GrabDevice(client, device, stuff->pointerMode, stuff->keyboardMode, + stuff->grabWindow, stuff->ownerEvents, stuff->time, + &mask, CORE, stuff->cursor, stuff->confineTo, &status); + if (rc != Success) + return rc; + + rep = (xGrabPointerReply) { + .type = X_Reply, + .status = status, + .sequenceNumber = client->sequence, + .length = 0 + }; + WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); + return Success; +} + +/** + * Server-side protocol handling for ChangeActivePointerGrab request. + * + * Changes properties of the grab hold by the client. If the client does not + * hold an active grab on the device, nothing happens. + */ +int +ProcChangeActivePointerGrab(ClientPtr client) +{ + DeviceIntPtr device; + GrabPtr grab; + CursorPtr newCursor, oldCursor; + + REQUEST(xChangeActivePointerGrabReq); + TimeStamp time; + + REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq); + if (stuff->eventMask & ~PointerGrabMask) { + client->errorValue = stuff->eventMask; + return BadValue; + } + if (stuff->cursor == None) + newCursor = NullCursor; + else { + int rc = dixLookupResourceByType((pointer *) &newCursor, stuff->cursor, + RT_CURSOR, client, DixUseAccess); + + if (rc != Success) { + client->errorValue = stuff->cursor; + return rc; + } + } + + device = PickPointer(client); + grab = device->deviceGrab.grab; + + if (!grab) + return Success; + if (!SameClient(grab, client)) + return Success; + time = ClientTimeToServerTime(stuff->time); + if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, device->deviceGrab.grabTime) == EARLIER)) + return Success; + oldCursor = grab->cursor; + grab->cursor = RefCursor(newCursor); + PostNewCursor(device); + if (oldCursor) + FreeCursor(oldCursor, (Cursor) 0); + grab->eventMask = stuff->eventMask; + return Success; +} + +/** + * Server-side protocol handling for UngrabPointer request. + * + * Deletes a pointer grab on a device the client has grabbed. + */ +int +ProcUngrabPointer(ClientPtr client) +{ + DeviceIntPtr device = PickPointer(client); + GrabPtr grab; + TimeStamp time; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + UpdateCurrentTime(); + grab = device->deviceGrab.grab; + + time = ClientTimeToServerTime(stuff->id); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && + (grab) && SameClient(grab, client)) + (*device->deviceGrab.DeactivateGrab) (device); + return Success; +} + +/** + * Sets a grab on the given device. + * + * Called from ProcGrabKeyboard to work on the client's keyboard. + * Called from ProcXGrabDevice to work on the device specified by the client. + * + * The parameters this_mode and other_mode represent the keyboard_mode and + * pointer_mode parameters of XGrabKeyboard(). + * See man page for details on all the parameters + * + * @param client Client that owns the grab. + * @param dev The device to grab. + * @param this_mode GrabModeSync or GrabModeAsync + * @param other_mode GrabModeSync or GrabModeAsync + * @param status Return code to be returned to the caller. + * + * @returns Success or BadValue. + */ +int +GrabDevice(ClientPtr client, DeviceIntPtr dev, + unsigned pointer_mode, unsigned keyboard_mode, Window grabWindow, + unsigned ownerEvents, Time ctime, GrabMask *mask, + int grabtype, Cursor curs, Window confineToWin, CARD8 *status) +{ + WindowPtr pWin, confineTo; + GrabPtr grab; + TimeStamp time; + Mask access_mode = DixGrabAccess; + int rc; + GrabInfoPtr grabInfo = &dev->deviceGrab; + CursorPtr cursor; + + UpdateCurrentTime(); + if ((keyboard_mode != GrabModeSync) && (keyboard_mode != GrabModeAsync)) { + client->errorValue = keyboard_mode; + return BadValue; + } + if ((pointer_mode != GrabModeSync) && (pointer_mode != GrabModeAsync)) { + client->errorValue = pointer_mode; + return BadValue; + } + if ((ownerEvents != xFalse) && (ownerEvents != xTrue)) { + client->errorValue = ownerEvents; + return BadValue; + } + + rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + if (confineToWin == None) + confineTo = NullWindow; + else { + rc = dixLookupWindow(&confineTo, confineToWin, client, + DixSetAttrAccess); + if (rc != Success) + return rc; + } + + if (curs == None) + cursor = NullCursor; + else { + rc = dixLookupResourceByType((pointer *) &cursor, curs, RT_CURSOR, + client, DixUseAccess); + if (rc != Success) { + client->errorValue = curs; + return rc; + } + access_mode |= DixForceAccess; + } + + if (keyboard_mode == GrabModeSync || pointer_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; + + time = ClientTimeToServerTime(ctime); + grab = grabInfo->grab; + if (grab && grab->grabtype != grabtype) + *status = AlreadyGrabbed; + else if (grab && !SameClient(grab, client)) + *status = AlreadyGrabbed; + else if ((!pWin->realized) || + (confineTo && + !(confineTo->realized && BorderSizeNotEmpty(dev, confineTo)))) + *status = GrabNotViewable; + else if ((CompareTimeStamps(time, currentTime) == LATER) || + (CompareTimeStamps(time, grabInfo->grabTime) == EARLIER)) + *status = GrabInvalidTime; + else if (grabInfo->sync.frozen && + grabInfo->sync.other && !SameClient(grabInfo->sync.other, client)) + *status = GrabFrozen; + else { + GrabPtr tempGrab; + + tempGrab = AllocGrab(NULL); + + tempGrab->next = NULL; + tempGrab->window = pWin; + tempGrab->resource = client->clientAsMask; + tempGrab->ownerEvents = ownerEvents; + tempGrab->keyboardMode = keyboard_mode; + tempGrab->pointerMode = pointer_mode; + if (grabtype == CORE) + tempGrab->eventMask = mask->core; + else if (grabtype == XI) + tempGrab->eventMask = mask->xi; + else + xi2mask_merge(tempGrab->xi2mask, mask->xi2mask); + tempGrab->device = dev; + tempGrab->cursor = RefCursor(cursor); + tempGrab->confineTo = confineTo; + tempGrab->grabtype = grabtype; + (*grabInfo->ActivateGrab) (dev, tempGrab, time, FALSE); + *status = GrabSuccess; + + FreeGrab(tempGrab); + } + return Success; +} + +/** + * Server-side protocol handling for GrabKeyboard request. + * + * Grabs the client's keyboard and returns success status to client. + */ +int +ProcGrabKeyboard(ClientPtr client) +{ + xGrabKeyboardReply rep; + BYTE status; + + REQUEST(xGrabKeyboardReq); + int result; + DeviceIntPtr keyboard = PickKeyboard(client); + GrabMask mask; + + REQUEST_SIZE_MATCH(xGrabKeyboardReq); + + mask.core = KeyPressMask | KeyReleaseMask; + + result = GrabDevice(client, keyboard, stuff->pointerMode, + stuff->keyboardMode, stuff->grabWindow, + stuff->ownerEvents, stuff->time, &mask, CORE, None, + None, &status); + + if (result != Success) + return result; + + rep = (xGrabKeyboardReply) { + .type = X_Reply, + .status = status, + .sequenceNumber = client->sequence, + .length = 0 + }; + WriteReplyToClient(client, sizeof(xGrabKeyboardReply), &rep); + return Success; +} + +/** + * Server-side protocol handling for UngrabKeyboard request. + * + * Deletes a possible grab on the client's keyboard. + */ +int +ProcUngrabKeyboard(ClientPtr client) +{ + DeviceIntPtr device = PickKeyboard(client); + GrabPtr grab; + TimeStamp time; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + UpdateCurrentTime(); + + grab = device->deviceGrab.grab; + + time = ClientTimeToServerTime(stuff->id); + if ((CompareTimeStamps(time, currentTime) != LATER) && + (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && + (grab) && SameClient(grab, client) && grab->grabtype == CORE) + (*device->deviceGrab.DeactivateGrab) (device); + return Success; +} + +/** + * Server-side protocol handling for QueryPointer request. + * + * Returns the current state and position of the client's ClientPointer to the + * client. + */ +int +ProcQueryPointer(ClientPtr client) +{ + xQueryPointerReply rep; + WindowPtr pWin, t; + DeviceIntPtr mouse = PickPointer(client); + DeviceIntPtr keyboard; + SpritePtr pSprite; + int rc; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess); + if (rc != Success && rc != BadAccess) + return rc; + + keyboard = GetMaster(mouse, MASTER_KEYBOARD); + + pSprite = mouse->spriteInfo->sprite; + if (mouse->valuator->motionHintWindow) + MaybeStopHint(mouse, client); + rep = (xQueryPointerReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .mask = event_get_corestate(mouse, keyboard), + .root = (GetCurrentRootWindow(mouse))->drawable.id, + .rootX = pSprite->hot.x, + .rootY = pSprite->hot.y, + .child = None + }; + if (pSprite->hot.pScreen == pWin->drawable.pScreen) { + rep.sameScreen = xTrue; + rep.winX = pSprite->hot.x - pWin->drawable.x; + rep.winY = pSprite->hot.y - pWin->drawable.y; + for (t = pSprite->win; t; t = t->parent) + if (t->parent == pWin) { + rep.child = t->drawable.id; + break; + } + } + else { + rep.sameScreen = xFalse; + rep.winX = 0; + rep.winY = 0; + } + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + rep.rootX += screenInfo.screens[0]->x; + rep.rootY += screenInfo.screens[0]->y; + if (stuff->id == rep.root) { + rep.winX += screenInfo.screens[0]->x; + rep.winY += screenInfo.screens[0]->y; + } + } +#endif + + if (rc == BadAccess) { + rep.mask = 0; + rep.child = None; + rep.rootX = 0; + rep.rootY = 0; + rep.winX = 0; + rep.winY = 0; + } + + WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep); + + return Success; +} + +/** + * Initializes the device list and the DIX sprite to sane values. Allocates + * trace memory used for quick window traversal. + */ +void +InitEvents(void) +{ + int i; + QdEventPtr qe, tmp; + + inputInfo.numDevices = 0; + inputInfo.devices = (DeviceIntPtr) NULL; + inputInfo.off_devices = (DeviceIntPtr) NULL; + inputInfo.keyboard = (DeviceIntPtr) NULL; + inputInfo.pointer = (DeviceIntPtr) NULL; + + for (i = 0; i < MAXDEVICES; i++) { + DeviceIntRec dummy; + memcpy(&event_filters[i], default_filter, sizeof(default_filter)); + + dummy.id = i; + NoticeTime(&dummy, currentTime); + LastEventTimeToggleResetFlag(i, FALSE); + } + + syncEvents.replayDev = (DeviceIntPtr) NULL; + syncEvents.replayWin = NullWindow; + if (syncEvents.pending.next) + xorg_list_for_each_entry_safe(qe, tmp, &syncEvents.pending, next) + free(qe); + xorg_list_init(&syncEvents.pending); + syncEvents.playingEvents = FALSE; + syncEvents.time.months = 0; + syncEvents.time.milliseconds = 0; /* hardly matters */ + currentTime.months = 0; + currentTime.milliseconds = GetTimeInMillis(); + for (i = 0; i < DNPMCOUNT; i++) { + DontPropagateMasks[i] = 0; + DontPropagateRefCnts[i] = 0; + } + + InputEventList = InitEventList(GetMaximumEventsNum()); + if (!InputEventList) + FatalError("[dix] Failed to allocate input event list.\n"); +} + +void +CloseDownEvents(void) +{ + FreeEventList(InputEventList, GetMaximumEventsNum()); + InputEventList = NULL; +} + +#define SEND_EVENT_BIT 0x80 + +/** + * Server-side protocol handling for SendEvent request. + * + * Locates the window to send the event to and forwards the event. + */ +int +ProcSendEvent(ClientPtr client) +{ + WindowPtr pWin; + WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ + DeviceIntPtr dev = PickPointer(client); + DeviceIntPtr keybd = GetMaster(dev, MASTER_KEYBOARD); + SpritePtr pSprite = dev->spriteInfo->sprite; + + REQUEST(xSendEventReq); + + REQUEST_SIZE_MATCH(xSendEventReq); + + /* libXext and other extension libraries may set the bit indicating + * that this event came from a SendEvent request so remove it + * since otherwise the event type may fail the range checks + * and cause an invalid BadValue error to be returned. + * + * This is safe to do since we later add the SendEvent bit (0x80) + * back in once we send the event to the client */ + + stuff->event.u.u.type &= ~(SEND_EVENT_BIT); + + /* The client's event type must be a core event type or one defined by an + extension. */ + + if (!((stuff->event.u.u.type > X_Reply && + stuff->event.u.u.type < LASTEvent) || + (stuff->event.u.u.type >= EXTENSION_EVENT_BASE && + stuff->event.u.u.type < (unsigned) lastEvent))) { + client->errorValue = stuff->event.u.u.type; + return BadValue; + } + if (stuff->event.u.u.type == ClientMessage && + stuff->event.u.u.detail != 8 && + stuff->event.u.u.detail != 16 && stuff->event.u.u.detail != 32) { + client->errorValue = stuff->event.u.u.detail; + return BadValue; + } + if (stuff->eventMask & ~AllEventMasks) { + client->errorValue = stuff->eventMask; + return BadValue; + } + + if (stuff->destination == PointerWindow) + pWin = pSprite->win; + else if (stuff->destination == InputFocus) { + WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin; + + if (inputFocus == NoneWin) + return Success; + + /* If the input focus is PointerRootWin, send the event to where + the pointer is if possible, then perhaps propogate up to root. */ + if (inputFocus == PointerRootWin) + inputFocus = GetCurrentRootWindow(dev); + + if (IsParent(inputFocus, pSprite->win)) { + effectiveFocus = inputFocus; + pWin = pSprite->win; + } + else + effectiveFocus = pWin = inputFocus; + } + else + dixLookupWindow(&pWin, stuff->destination, client, DixSendAccess); + + if (!pWin) + return BadWindow; + if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) { + client->errorValue = stuff->propagate; + return BadValue; + } + stuff->event.u.u.type |= SEND_EVENT_BIT; + if (stuff->propagate) { + for (; pWin; pWin = pWin->parent) { + if (XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, + &stuff->event, 1)) + return Success; + if (DeliverEventsToWindow(dev, pWin, + &stuff->event, 1, stuff->eventMask, + NullGrab)) + return Success; + if (pWin == effectiveFocus) + return Success; + stuff->eventMask &= ~wDontPropagateMask(pWin); + if (!stuff->eventMask) + break; + } + } + else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1)) + DeliverEventsToWindow(dev, pWin, &stuff->event, + 1, stuff->eventMask, NullGrab); + return Success; +} + +/** + * Server-side protocol handling for UngrabKey request. + * + * Deletes a passive grab for the given key. Works on the + * client's keyboard. + */ +int +ProcUngrabKey(ClientPtr client) +{ + REQUEST(xUngrabKeyReq); + WindowPtr pWin; + GrabPtr tempGrab; + DeviceIntPtr keybd = PickKeyboard(client); + int rc; + + REQUEST_SIZE_MATCH(xUngrabKeyReq); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) || + (stuff->key < keybd->key->xkbInfo->desc->min_key_code)) + && (stuff->key != AnyKey)) { + client->errorValue = stuff->key; + return BadValue; + } + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) { + client->errorValue = stuff->modifiers; + return BadValue; + } + tempGrab = AllocGrab(NULL); + if (!tempGrab) + return BadAlloc; + tempGrab->resource = client->clientAsMask; + tempGrab->device = keybd; + tempGrab->window = pWin; + tempGrab->modifiersDetail.exact = stuff->modifiers; + tempGrab->modifiersDetail.pMask = NULL; + tempGrab->modifierDevice = keybd; + tempGrab->type = KeyPress; + tempGrab->grabtype = CORE; + tempGrab->detail.exact = stuff->key; + tempGrab->detail.pMask = NULL; + tempGrab->next = NULL; + + if (!DeletePassiveGrabFromList(tempGrab)) + rc = BadAlloc; + + FreeGrab(tempGrab); + + return rc; +} + +/** + * Server-side protocol handling for GrabKey request. + * + * Creates a grab for the client's keyboard and adds it to the list of passive + * grabs. + */ +int +ProcGrabKey(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xGrabKeyReq); + GrabPtr grab; + DeviceIntPtr keybd = PickKeyboard(client); + int rc; + GrabParameters param; + GrabMask mask; + + REQUEST_SIZE_MATCH(xGrabKeyReq); + + param = (GrabParameters) { + .grabtype = CORE, + .ownerEvents = stuff->ownerEvents, + .this_device_mode = stuff->keyboardMode, + .other_devices_mode = stuff->pointerMode, + .modifiers = stuff->modifiers + }; + + rc = CheckGrabValues(client, ¶m); + if (rc != Success) + return rc; + + if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) || + (stuff->key < keybd->key->xkbInfo->desc->min_key_code)) + && (stuff->key != AnyKey)) { + client->errorValue = stuff->key; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + mask.core = (KeyPressMask | KeyReleaseMask); + + grab = CreateGrab(client->index, keybd, keybd, pWin, CORE, &mask, + ¶m, KeyPress, stuff->key, NullWindow, NullCursor); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(client, grab); +} + +/** + * Server-side protocol handling for GrabButton request. + * + * Creates a grab for the client's ClientPointer and adds it as a passive grab + * to the list. + */ +int +ProcGrabButton(ClientPtr client) +{ + WindowPtr pWin, confineTo; + + REQUEST(xGrabButtonReq); + CursorPtr cursor; + GrabPtr grab; + DeviceIntPtr ptr, modifierDevice; + Mask access_mode = DixGrabAccess; + GrabMask mask; + GrabParameters param; + int rc; + + REQUEST_SIZE_MATCH(xGrabButtonReq); + if ((stuff->pointerMode != GrabModeSync) && + (stuff->pointerMode != GrabModeAsync)) { + client->errorValue = stuff->pointerMode; + return BadValue; + } + if ((stuff->keyboardMode != GrabModeSync) && + (stuff->keyboardMode != GrabModeAsync)) { + client->errorValue = stuff->keyboardMode; + return BadValue; + } + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) { + client->errorValue = stuff->modifiers; + return BadValue; + } + if ((stuff->ownerEvents != xFalse) && (stuff->ownerEvents != xTrue)) { + client->errorValue = stuff->ownerEvents; + return BadValue; + } + if (stuff->eventMask & ~PointerGrabMask) { + client->errorValue = stuff->eventMask; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (stuff->confineTo == None) + confineTo = NullWindow; + else { + rc = dixLookupWindow(&confineTo, stuff->confineTo, client, + DixSetAttrAccess); + if (rc != Success) + return rc; + } + if (stuff->cursor == None) + cursor = NullCursor; + else { + rc = dixLookupResourceByType((pointer *) &cursor, stuff->cursor, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) { + client->errorValue = stuff->cursor; + return rc; + } + access_mode |= DixForceAccess; + } + + ptr = PickPointer(client); + modifierDevice = GetMaster(ptr, MASTER_KEYBOARD); + if (stuff->pointerMode == GrabModeSync || + stuff->keyboardMode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, access_mode); + if (rc != Success) + return rc; + + param = (GrabParameters) { + .grabtype = CORE, + .ownerEvents = stuff->ownerEvents, + .this_device_mode = stuff->keyboardMode, + .other_devices_mode = stuff->pointerMode, + .modifiers = stuff->modifiers + }; + + mask.core = stuff->eventMask; + + grab = CreateGrab(client->index, ptr, modifierDevice, pWin, + CORE, &mask, ¶m, ButtonPress, + stuff->button, confineTo, cursor); + if (!grab) + return BadAlloc; + return AddPassiveGrabToList(client, grab); +} + +/** + * Server-side protocol handling for UngrabButton request. + * + * Deletes a passive grab on the client's ClientPointer from the list. + */ +int +ProcUngrabButton(ClientPtr client) +{ + REQUEST(xUngrabButtonReq); + WindowPtr pWin; + GrabPtr tempGrab; + int rc; + DeviceIntPtr ptr; + + REQUEST_SIZE_MATCH(xUngrabButtonReq); + if ((stuff->modifiers != AnyModifier) && + (stuff->modifiers & ~AllModifiersMask)) { + client->errorValue = stuff->modifiers; + return BadValue; + } + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; + + ptr = PickPointer(client); + + tempGrab = AllocGrab(NULL); + if (!tempGrab) + return BadAlloc; + tempGrab->resource = client->clientAsMask; + tempGrab->device = ptr; + tempGrab->window = pWin; + tempGrab->modifiersDetail.exact = stuff->modifiers; + tempGrab->modifiersDetail.pMask = NULL; + tempGrab->modifierDevice = GetMaster(ptr, MASTER_KEYBOARD); + tempGrab->type = ButtonPress; + tempGrab->detail.exact = stuff->button; + tempGrab->grabtype = CORE; + tempGrab->detail.pMask = NULL; + tempGrab->next = NULL; + + if (!DeletePassiveGrabFromList(tempGrab)) + rc = BadAlloc; + + FreeGrab(tempGrab); + return rc; +} + +/** + * Deactivate any grab that may be on the window, remove the focus. + * Delete any XInput extension events from the window too. Does not change the + * window mask. Use just before the window is deleted. + * + * If freeResources is set, passive grabs on the window are deleted. + * + * @param pWin The window to delete events from. + * @param freeResources True if resources associated with the window should be + * deleted. + */ +void +DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) +{ + WindowPtr parent; + DeviceIntPtr mouse = inputInfo.pointer; + DeviceIntPtr keybd = inputInfo.keyboard; + FocusClassPtr focus; + OtherClientsPtr oc; + GrabPtr passive; + GrabPtr grab; + + /* Deactivate any grabs performed on this window, before making any + input focus changes. */ + grab = mouse->deviceGrab.grab; + if (grab && ((grab->window == pWin) || (grab->confineTo == pWin))) + (*mouse->deviceGrab.DeactivateGrab) (mouse); + + /* Deactivating a keyboard grab should cause focus events. */ + grab = keybd->deviceGrab.grab; + if (grab && (grab->window == pWin)) + (*keybd->deviceGrab.DeactivateGrab) (keybd); + + /* And now the real devices */ + for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { + grab = mouse->deviceGrab.grab; + if (grab && ((grab->window == pWin) || (grab->confineTo == pWin))) + (*mouse->deviceGrab.DeactivateGrab) (mouse); + } + + for (keybd = inputInfo.devices; keybd; keybd = keybd->next) { + if (IsKeyboardDevice(keybd)) { + focus = keybd->focus; + + /* If the focus window is a root window (ie. has no parent) + then don't delete the focus from it. */ + + if ((pWin == focus->win) && (pWin->parent != NullWindow)) { + int focusEventMode = NotifyNormal; + + /* If a grab is in progress, then alter the mode of focus events. */ + + if (keybd->deviceGrab.grab) + focusEventMode = NotifyWhileGrabbed; + + switch (focus->revert) { + case RevertToNone: + DoFocusEvents(keybd, pWin, NoneWin, focusEventMode); + focus->win = NoneWin; + focus->traceGood = 0; + break; + case RevertToParent: + parent = pWin; + do { + parent = parent->parent; + focus->traceGood--; + } while (!parent->realized + /* This would be a good protocol change -- windows being + reparented during SaveSet processing would cause the + focus to revert to the nearest enclosing window which + will survive the death of the exiting client, instead + of ending up reverting to a dying window and thence + to None */ +#ifdef NOTDEF + || wClient(parent)->clientGone +#endif + ); + if (!ActivateFocusInGrab(keybd, pWin, parent)) + DoFocusEvents(keybd, pWin, parent, focusEventMode); + focus->win = parent; + focus->revert = RevertToNone; + break; + case RevertToPointerRoot: + if (!ActivateFocusInGrab(keybd, pWin, PointerRootWin)) + DoFocusEvents(keybd, pWin, PointerRootWin, + focusEventMode); + focus->win = PointerRootWin; + focus->traceGood = 0; + break; + } + } + } + + if (IsPointerDevice(keybd)) { + if (keybd->valuator->motionHintWindow == pWin) + keybd->valuator->motionHintWindow = NullWindow; + } + } + + if (freeResources) { + if (pWin->dontPropagate) + DontPropagateRefCnts[pWin->dontPropagate]--; + while ((oc = wOtherClients(pWin))) + FreeResource(oc->resource, RT_NONE); + while ((passive = wPassiveGrabs(pWin))) + FreeResource(passive->resource, RT_NONE); + } + + DeleteWindowFromAnyExtEvents(pWin, freeResources); +} + +/** + * Call this whenever some window at or below pWin has changed geometry. If + * there is a grab on the window, the cursor will be re-confined into the + * window. + */ +void +CheckCursorConfinement(WindowPtr pWin) +{ + GrabPtr grab; + WindowPtr confineTo; + DeviceIntPtr pDev; + +#ifdef PANORAMIX + if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) + return; +#endif + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if (DevHasCursor(pDev)) { + grab = pDev->deviceGrab.grab; + if (grab && (confineTo = grab->confineTo)) { + if (!BorderSizeNotEmpty(pDev, confineTo)) + (*pDev->deviceGrab.DeactivateGrab) (pDev); + else if ((pWin == confineTo) || IsParent(pWin, confineTo)) + ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); + } + } + } +} + +Mask +EventMaskForClient(WindowPtr pWin, ClientPtr client) +{ + OtherClientsPtr other; + + if (wClient(pWin) == client) + return pWin->eventMask; + for (other = wOtherClients(pWin); other; other = other->next) { + if (SameClient(other, client)) + return other->mask; + } + return 0; +} + +/** + * Server-side protocol handling for RecolorCursor request. + */ +int +ProcRecolorCursor(ClientPtr client) +{ + CursorPtr pCursor; + int rc, nscr; + ScreenPtr pscr; + Bool displayed; + SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; + + REQUEST(xRecolorCursorReq); + + REQUEST_SIZE_MATCH(xRecolorCursorReq); + rc = dixLookupResourceByType((pointer *) &pCursor, stuff->cursor, RT_CURSOR, + client, DixWriteAccess); + if (rc != Success) { + client->errorValue = stuff->cursor; + return rc; + } + + pCursor->foreRed = stuff->foreRed; + pCursor->foreGreen = stuff->foreGreen; + pCursor->foreBlue = stuff->foreBlue; + + pCursor->backRed = stuff->backRed; + pCursor->backGreen = stuff->backGreen; + pCursor->backBlue = stuff->backBlue; + + for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { + pscr = screenInfo.screens[nscr]; +#ifdef PANORAMIX + if (!noPanoramiXExtension) + displayed = (pscr == pSprite->screen); + else +#endif + displayed = (pscr == pSprite->hotPhys.pScreen); + (*pscr->RecolorCursor) (PickPointer(client), pscr, pCursor, + (pCursor == pSprite->current) && displayed); + } + return Success; +} + +/** + * Write the given events to a client, swapping the byte order if necessary. + * To swap the byte ordering, a callback is called that has to be set up for + * the given event type. + * + * In the case of DeviceMotionNotify trailed by DeviceValuators, the events + * can be more than one. Usually it's just one event. + * + * Do not modify the event structure passed in. See comment below. + * + * @param pClient Client to send events to. + * @param count Number of events. + * @param events The event list. + */ +void +WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) +{ +#ifdef PANORAMIX + xEvent eventCopy; +#endif + xEvent *eventTo, *eventFrom; + int i, eventlength = sizeof(xEvent); + + if (!pClient || pClient == serverClient || pClient->clientGone) + return; + + for (i = 0; i < count; i++) + if ((events[i].u.u.type & 0x7f) != KeymapNotify) + events[i].u.u.sequenceNumber = pClient->sequence; + + /* Let XKB rewrite the state, as it depends on client preferences. */ + XkbFilterEvents(pClient, count, events); + +#ifdef PANORAMIX + if (!noPanoramiXExtension && + (screenInfo.screens[0]->x || screenInfo.screens[0]->y)) { + switch (events->u.u.type) { + case MotionNotify: + case ButtonPress: + case ButtonRelease: + case KeyPress: + case KeyRelease: + case EnterNotify: + case LeaveNotify: + /* + When multiple clients want the same event DeliverEventsToWindow + passes the same event structure multiple times so we can't + modify the one passed to us + */ + count = 1; /* should always be 1 */ + memcpy(&eventCopy, events, sizeof(xEvent)); + eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x; + eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y; + if (eventCopy.u.keyButtonPointer.event == + eventCopy.u.keyButtonPointer.root) { + eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x; + eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y; + } + events = &eventCopy; + break; + default: + break; + } + } +#endif + + if (EventCallback) { + EventInfoRec eventinfo; + + eventinfo.client = pClient; + eventinfo.events = events; + eventinfo.count = count; + CallCallbacks(&EventCallback, (pointer) &eventinfo); + } +#ifdef XSERVER_DTRACE + if (XSERVER_SEND_EVENT_ENABLED()) { + for (i = 0; i < count; i++) { + XSERVER_SEND_EVENT(pClient->index, events[i].u.u.type, &events[i]); + } + } +#endif + /* Just a safety check to make sure we only have one GenericEvent, it just + * makes things easier for me right now. (whot) */ + for (i = 1; i < count; i++) { + if (events[i].u.u.type == GenericEvent) { + ErrorF("[dix] TryClientEvents: Only one GenericEvent at a time.\n"); + return; + } + } + + if (events->u.u.type == GenericEvent) { + eventlength += ((xGenericEvent *) events)->length * 4; + } + + if (pClient->swapped) { + if (eventlength > swapEventLen) { + swapEventLen = eventlength; + swapEvent = realloc(swapEvent, swapEventLen); + if (!swapEvent) { + FatalError("WriteEventsToClient: Out of memory.\n"); + return; + } + } + + for (i = 0; i < count; i++) { + eventFrom = &events[i]; + eventTo = swapEvent; + + /* Remember to strip off the leading bit of type in case + this event was sent with "SendEvent." */ + (*EventSwapVector[eventFrom->u.u.type & 0177]) + (eventFrom, eventTo); + + WriteToClient(pClient, eventlength, eventTo); + } + } + else { + /* only one GenericEvent, remember? that means either count is 1 and + * eventlength is arbitrary or eventlength is 32 and count doesn't + * matter. And we're all set. Woohoo. */ + WriteToClient(pClient, count * eventlength, events); + } +} + +/* + * Set the client pointer for the given client. + * + * A client can have exactly one ClientPointer. Each time a + * request/reply/event is processed and the choice of devices is ambiguous + * (e.g. QueryPointer request), the server will pick the ClientPointer (see + * PickPointer()). + * If a keyboard is needed, the first keyboard paired with the CP is used. + */ +int +SetClientPointer(ClientPtr client, DeviceIntPtr device) +{ + int rc = XaceHook(XACE_DEVICE_ACCESS, client, device, DixUseAccess); + + if (rc != Success) + return rc; + + if (!IsMaster(device)) { + ErrorF("[dix] Need master device for ClientPointer. This is a bug.\n"); + return BadDevice; + } + else if (!device->spriteInfo->spriteOwner) { + ErrorF("[dix] Device %d does not have a sprite. " + "Cannot be ClientPointer\n", device->id); + return BadDevice; + } + client->clientPtr = device; + return Success; +} + +/* PickPointer will pick an appropriate pointer for the given client. + * + * An "appropriate device" is (in order of priority): + * 1) A device the given client has a core grab on. + * 2) A device set as ClientPointer for the given client. + * 3) The first master device. + */ +DeviceIntPtr +PickPointer(ClientPtr client) +{ + DeviceIntPtr it = inputInfo.devices; + + /* First, check if the client currently has a grab on a device. Even + * keyboards count. */ + for (it = inputInfo.devices; it; it = it->next) { + GrabPtr grab = it->deviceGrab.grab; + + if (grab && grab->grabtype == CORE && SameClient(grab, client)) { + it = GetMaster(it, MASTER_POINTER); + return it; /* Always return a core grabbed device */ + } + } + + if (!client->clientPtr) { + it = inputInfo.devices; + while (it) { + if (IsMaster(it) && it->spriteInfo->spriteOwner) { + client->clientPtr = it; + break; + } + it = it->next; + } + } + return client->clientPtr; +} + +/* PickKeyboard will pick an appropriate keyboard for the given client by + * searching the list of devices for the keyboard device that is paired with + * the client's pointer. + */ +DeviceIntPtr +PickKeyboard(ClientPtr client) +{ + DeviceIntPtr ptr = PickPointer(client); + DeviceIntPtr kbd = GetMaster(ptr, MASTER_KEYBOARD); + + if (!kbd) { + ErrorF("[dix] ClientPointer not paired with a keyboard. This " + "is a bug.\n"); + } + + return kbd; +} + +/* A client that has one or more core grabs does not get core events from + * devices it does not have a grab on. Legacy applications behave bad + * otherwise because they are not used to it and the events interfere. + * Only applies for core events. + * + * Return true if a core event from the device would interfere and should not + * be delivered. + */ +Bool +IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent *event) +{ + DeviceIntPtr it = inputInfo.devices; + + switch (event->u.u.type) { + case KeyPress: + case KeyRelease: + case ButtonPress: + case ButtonRelease: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + break; + default: + return FALSE; + } + + if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) + return FALSE; + + while (it) { + if (it != dev) { + if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client) + && !it->deviceGrab.fromPassiveGrab) { + if ((IsPointerDevice(it) && IsPointerDevice(dev)) || + (IsKeyboardDevice(it) && IsKeyboardDevice(dev))) + return TRUE; + } + } + it = it->next; + } + + return FALSE; +} + +/* PointerBarrier events are only delivered to the client that created that + * barrier */ +static Bool +IsWrongPointerBarrierClient(ClientPtr client, DeviceIntPtr dev, xEvent *event) +{ + xXIBarrierEvent *ev = (xXIBarrierEvent*)event; + + if (ev->type != GenericEvent || ev->extension != IReqCode) + return FALSE; + + if (ev->evtype != XI_BarrierHit && ev->evtype != XI_BarrierLeave) + return FALSE; + + return client->index != CLIENT_ID(ev->barrier); +} diff --git a/dix/extension.c b/dix/extension.c new file mode 100644 index 0000000..6380db3 --- /dev/null +++ b/dix/extension.c @@ -0,0 +1,335 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "gcstruct.h" +#include "scrnintstr.h" +#include "dispatch.h" +#include "privates.h" +#include "registry.h" +#include "xace.h" + +#define LAST_ERROR 255 + +static ExtensionEntry **extensions = (ExtensionEntry **) NULL; + +int lastEvent = EXTENSION_EVENT_BASE; +static int lastError = FirstExtensionError; +static unsigned int NumExtensions = 0; + +ExtensionEntry * +AddExtension(const char *name, int NumEvents, int NumErrors, + int (*MainProc) (ClientPtr c1), + int (*SwappedMainProc) (ClientPtr c2), + void (*CloseDownProc) (ExtensionEntry * e), + unsigned short (*MinorOpcodeProc) (ClientPtr c3)) +{ + int i; + ExtensionEntry *ext, **newexts; + + if (!MainProc || !SwappedMainProc || !MinorOpcodeProc) + return ((ExtensionEntry *) NULL); + if ((lastEvent + NumEvents > MAXEVENTS) || + (unsigned) (lastError + NumErrors > LAST_ERROR)) { + LogMessage(X_ERROR, "Not enabling extension %s: maximum number of " + "events or errors exceeded.\n", name); + return ((ExtensionEntry *) NULL); + } + + ext = calloc(sizeof(ExtensionEntry), 1); + if (!ext) + return NULL; + if (!dixAllocatePrivates(&ext->devPrivates, PRIVATE_EXTENSION)) { + free(ext); + return NULL; + } + ext->name = strdup(name); + ext->num_aliases = 0; + ext->aliases = (char **) NULL; + if (!ext->name) { + dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); + free(ext); + return ((ExtensionEntry *) NULL); + } + i = NumExtensions; + newexts = (ExtensionEntry **) realloc(extensions, + (i + 1) * sizeof(ExtensionEntry *)); + if (!newexts) { + free(ext->name); + dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); + free(ext); + return ((ExtensionEntry *) NULL); + } + NumExtensions++; + extensions = newexts; + extensions[i] = ext; + ext->index = i; + ext->base = i + EXTENSION_BASE; + ext->CloseDown = CloseDownProc; + ext->MinorOpcode = MinorOpcodeProc; + ProcVector[i + EXTENSION_BASE] = MainProc; + SwappedProcVector[i + EXTENSION_BASE] = SwappedMainProc; + if (NumEvents) { + ext->eventBase = lastEvent; + ext->eventLast = lastEvent + NumEvents; + lastEvent += NumEvents; + } + else { + ext->eventBase = 0; + ext->eventLast = 0; + } + if (NumErrors) { + ext->errorBase = lastError; + ext->errorLast = lastError + NumErrors; + lastError += NumErrors; + } + else { + ext->errorBase = 0; + ext->errorLast = 0; + } + + RegisterExtensionNames(ext); + return ext; +} + +Bool +AddExtensionAlias(const char *alias, ExtensionEntry * ext) +{ + char *name; + char **aliases; + + if (!ext) + return FALSE; + aliases = (char **) realloc(ext->aliases, + (ext->num_aliases + 1) * sizeof(char *)); + if (!aliases) + return FALSE; + ext->aliases = aliases; + name = strdup(alias); + if (!name) + return FALSE; + ext->aliases[ext->num_aliases] = name; + ext->num_aliases++; + return TRUE; +} + +static int +FindExtension(const char *extname, int len) +{ + int i, j; + + for (i = 0; i < NumExtensions; i++) { + if ((strlen(extensions[i]->name) == len) && + !strncmp(extname, extensions[i]->name, len)) + break; + for (j = extensions[i]->num_aliases; --j >= 0;) { + if ((strlen(extensions[i]->aliases[j]) == len) && + !strncmp(extname, extensions[i]->aliases[j], len)) + break; + } + if (j >= 0) + break; + } + return ((i == NumExtensions) ? -1 : i); +} + +/* + * CheckExtension returns the extensions[] entry for the requested + * extension name. Maybe this could just return a Bool instead? + */ +ExtensionEntry * +CheckExtension(const char *extname) +{ + int n; + + n = FindExtension(extname, strlen(extname)); + if (n != -1) + return extensions[n]; + else + return NULL; +} + +/* + * Added as part of Xace. + */ +ExtensionEntry * +GetExtensionEntry(int major) +{ + if (major < EXTENSION_BASE) + return NULL; + major -= EXTENSION_BASE; + if (major >= NumExtensions) + return NULL; + return extensions[major]; +} + +unsigned short +StandardMinorOpcode(ClientPtr client) +{ + return ((xReq *) client->requestBuffer)->data; +} + +void +CloseDownExtensions(void) +{ + int i, j; + + for (i = NumExtensions - 1; i >= 0; i--) { + if (extensions[i]->CloseDown) + extensions[i]->CloseDown(extensions[i]); + NumExtensions = i; + free(extensions[i]->name); + for (j = extensions[i]->num_aliases; --j >= 0;) + free(extensions[i]->aliases[j]); + free(extensions[i]->aliases); + dixFreePrivates(extensions[i]->devPrivates, PRIVATE_EXTENSION); + free(extensions[i]); + } + free(extensions); + extensions = (ExtensionEntry **) NULL; + lastEvent = EXTENSION_EVENT_BASE; + lastError = FirstExtensionError; +} + +int +ProcQueryExtension(ClientPtr client) +{ + xQueryExtensionReply reply; + int i; + + REQUEST(xQueryExtensionReq); + + REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes); + + reply = (xQueryExtensionReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .major_opcode = 0 + }; + + if (!NumExtensions) + reply.present = xFalse; + else { + i = FindExtension((char *) &stuff[1], stuff->nbytes); + if (i < 0 || XaceHook(XACE_EXT_ACCESS, client, extensions[i])) + reply.present = xFalse; + else { + reply.present = xTrue; + reply.major_opcode = extensions[i]->base; + reply.first_event = extensions[i]->eventBase; + reply.first_error = extensions[i]->errorBase; + } + } + WriteReplyToClient(client, sizeof(xQueryExtensionReply), &reply); + return Success; +} + +int +ProcListExtensions(ClientPtr client) +{ + xListExtensionsReply reply; + char *bufptr, *buffer; + int total_length = 0; + + REQUEST_SIZE_MATCH(xReq); + + reply = (xListExtensionsReply) { + .type = X_Reply, + .nExtensions = 0, + .sequenceNumber = client->sequence, + .length = 0 + }; + buffer = NULL; + + if (NumExtensions) { + int i, j; + + for (i = 0; i < NumExtensions; i++) { + /* call callbacks to find out whether to show extension */ + if (XaceHook(XACE_EXT_ACCESS, client, extensions[i]) != Success) + continue; + + total_length += strlen(extensions[i]->name) + 1; + reply.nExtensions += 1 + extensions[i]->num_aliases; + for (j = extensions[i]->num_aliases; --j >= 0;) + total_length += strlen(extensions[i]->aliases[j]) + 1; + } + reply.length = bytes_to_int32(total_length); + buffer = bufptr = malloc(total_length); + if (!buffer) + return BadAlloc; + for (i = 0; i < NumExtensions; i++) { + int len; + + if (XaceHook(XACE_EXT_ACCESS, client, extensions[i]) != Success) + continue; + + *bufptr++ = len = strlen(extensions[i]->name); + memmove(bufptr, extensions[i]->name, len); + bufptr += len; + for (j = extensions[i]->num_aliases; --j >= 0;) { + *bufptr++ = len = strlen(extensions[i]->aliases[j]); + memmove(bufptr, extensions[i]->aliases[j], len); + bufptr += len; + } + } + } + WriteReplyToClient(client, sizeof(xListExtensionsReply), &reply); + if (reply.length) + WriteToClient(client, total_length, buffer); + + free(buffer); + return Success; +} diff --git a/dix/ffs.c b/dix/ffs.c new file mode 100644 index 0000000..f0400cb --- /dev/null +++ b/dix/ffs.c @@ -0,0 +1,49 @@ +/* + +Copyright 1996, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- +ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL- +ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR 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 <dix-config.h> +#endif + +#ifndef HAVE_FFS + +#include "dix.h" + +int +ffs(int i) +{ + int j; + + if (i == 0) + return 0; + for (j = 1; (i & 1) == 0; j++) + i >>= 1; + return j; +} + +#endif diff --git a/dix/gc.c b/dix/gc.c new file mode 100644 index 0000000..f46e0dd --- /dev/null +++ b/dix/gc.c @@ -0,0 +1,1093 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "resource.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "dixfontstr.h" +#include "scrnintstr.h" +#include "region.h" +#include "dixstruct.h" + +#include "privates.h" +#include "dix.h" +#include "xace.h" +#include <assert.h> + +extern FontPtr defaultFont; + +static Bool CreateDefaultTile(GCPtr pGC); + +static unsigned char DefaultDash[2] = { 4, 4 }; + +void +ValidateGC(DrawablePtr pDraw, GC * pGC) +{ + (*pGC->funcs->ValidateGC) (pGC, pGC->stateChanges, pDraw); + pGC->stateChanges = 0; + pGC->serialNumber = pDraw->serialNumber; +} + +/* + * ChangeGC/ChangeGCXIDs: + * + * The client performing the gc change must be passed so that access + * checks can be performed on any tiles, stipples, or fonts that are + * specified. ddxen can call this too; they should normally pass + * NullClient for the client since any access checking should have + * already been done at a higher level. + * + * If you have any XIDs, you must use ChangeGCXIDs: + * + * CARD32 v[2]; + * v[0] = FillTiled; + * v[1] = pid; + * ChangeGCXIDs(client, pGC, GCFillStyle|GCTile, v); + * + * However, if you need to pass a pointer to a pixmap or font, you must + * use ChangeGC: + * + * ChangeGCVal v[2]; + * v[0].val = FillTiled; + * v[1].ptr = pPixmap; + * ChangeGC(client, pGC, GCFillStyle|GCTile, v); + * + * If you have neither XIDs nor pointers, you can use either function, + * but ChangeGC will do less work. + * + * ChangeGCVal v[2]; + * v[0].val = foreground; + * v[1].val = background; + * ChangeGC(client, pGC, GCForeground|GCBackground, v); + */ + +#define NEXTVAL(_type, _var) { \ + _var = (_type)(pUnion->val); pUnion++; \ + } + +#define NEXT_PTR(_type, _var) { \ + _var = (_type)pUnion->ptr; pUnion++; } + +int +ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion) +{ + BITS32 index2; + int error = 0; + PixmapPtr pPixmap; + BITS32 maskQ; + + assert(pUnion); + pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; + + maskQ = mask; /* save these for when we walk the GCque */ + while (mask && !error) { + index2 = (BITS32) lowbit(mask); + mask &= ~index2; + pGC->stateChanges |= index2; + switch (index2) { + case GCFunction: + { + CARD8 newalu; + NEXTVAL(CARD8, newalu); + + if (newalu <= GXset) + pGC->alu = newalu; + else { + if (client) + client->errorValue = newalu; + error = BadValue; + } + break; + } + case GCPlaneMask: + NEXTVAL(unsigned long, pGC->planemask); + + break; + case GCForeground: + NEXTVAL(unsigned long, pGC->fgPixel); + + /* + * this is for CreateGC + */ + if (!pGC->tileIsPixel && !pGC->tile.pixmap) { + pGC->tileIsPixel = TRUE; + pGC->tile.pixel = pGC->fgPixel; + } + break; + case GCBackground: + NEXTVAL(unsigned long, pGC->bgPixel); + + break; + case GCLineWidth: /* ??? line width is a CARD16 */ + NEXTVAL(CARD16, pGC->lineWidth); + + break; + case GCLineStyle: + { + unsigned int newlinestyle; + NEXTVAL(unsigned int, newlinestyle); + + if (newlinestyle <= LineDoubleDash) + pGC->lineStyle = newlinestyle; + else { + if (client) + client->errorValue = newlinestyle; + error = BadValue; + } + break; + } + case GCCapStyle: + { + unsigned int newcapstyle; + NEXTVAL(unsigned int, newcapstyle); + + if (newcapstyle <= CapProjecting) + pGC->capStyle = newcapstyle; + else { + if (client) + client->errorValue = newcapstyle; + error = BadValue; + } + break; + } + case GCJoinStyle: + { + unsigned int newjoinstyle; + NEXTVAL(unsigned int, newjoinstyle); + + if (newjoinstyle <= JoinBevel) + pGC->joinStyle = newjoinstyle; + else { + if (client) + client->errorValue = newjoinstyle; + error = BadValue; + } + break; + } + case GCFillStyle: + { + unsigned int newfillstyle; + NEXTVAL(unsigned int, newfillstyle); + + if (newfillstyle <= FillOpaqueStippled) + pGC->fillStyle = newfillstyle; + else { + if (client) + client->errorValue = newfillstyle; + error = BadValue; + } + break; + } + case GCFillRule: + { + unsigned int newfillrule; + NEXTVAL(unsigned int, newfillrule); + + if (newfillrule <= WindingRule) + pGC->fillRule = newfillrule; + else { + if (client) + client->errorValue = newfillrule; + error = BadValue; + } + break; + } + case GCTile: + NEXT_PTR(PixmapPtr, pPixmap); + + if ((pPixmap->drawable.depth != pGC->depth) || + (pPixmap->drawable.pScreen != pGC->pScreen)) { + error = BadMatch; + } + else { + pPixmap->refcnt++; + if (!pGC->tileIsPixel) + (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap); + pGC->tileIsPixel = FALSE; + pGC->tile.pixmap = pPixmap; + } + break; + case GCStipple: + NEXT_PTR(PixmapPtr, pPixmap); + + if ((pPixmap->drawable.depth != 1) || + (pPixmap->drawable.pScreen != pGC->pScreen)) { + error = BadMatch; + } + else { + pPixmap->refcnt++; + if (pGC->stipple) + (*pGC->pScreen->DestroyPixmap) (pGC->stipple); + pGC->stipple = pPixmap; + } + break; + case GCTileStipXOrigin: + NEXTVAL(INT16, pGC->patOrg.x); + + break; + case GCTileStipYOrigin: + NEXTVAL(INT16, pGC->patOrg.y); + + break; + case GCFont: + { + FontPtr pFont; + NEXT_PTR(FontPtr, pFont); + + pFont->refcnt++; + if (pGC->font) + CloseFont(pGC->font, (Font) 0); + pGC->font = pFont; + break; + } + case GCSubwindowMode: + { + unsigned int newclipmode; + NEXTVAL(unsigned int, newclipmode); + + if (newclipmode <= IncludeInferiors) + pGC->subWindowMode = newclipmode; + else { + if (client) + client->errorValue = newclipmode; + error = BadValue; + } + break; + } + case GCGraphicsExposures: + { + unsigned int newge; + NEXTVAL(unsigned int, newge); + + if (newge <= xTrue) + pGC->graphicsExposures = newge; + else { + if (client) + client->errorValue = newge; + error = BadValue; + } + break; + } + case GCClipXOrigin: + NEXTVAL(INT16, pGC->clipOrg.x); + + break; + case GCClipYOrigin: + NEXTVAL(INT16, pGC->clipOrg.y); + + break; + case GCClipMask: + NEXT_PTR(PixmapPtr, pPixmap); + + if (pPixmap) { + if ((pPixmap->drawable.depth != 1) || + (pPixmap->drawable.pScreen != pGC->pScreen)) { + error = BadMatch; + break; + } + pPixmap->refcnt++; + } + (*pGC->funcs->ChangeClip) (pGC, pPixmap ? CT_PIXMAP : CT_NONE, + (pointer) pPixmap, 0); + break; + case GCDashOffset: + NEXTVAL(INT16, pGC->dashOffset); + + break; + case GCDashList: + { + CARD8 newdash; + NEXTVAL(CARD8, newdash); + + if (newdash == 4) { + if (pGC->dash != DefaultDash) { + free(pGC->dash); + pGC->numInDashList = 2; + pGC->dash = DefaultDash; + } + } + else if (newdash != 0) { + unsigned char *dash; + + dash = malloc(2 * sizeof(unsigned char)); + if (dash) { + if (pGC->dash != DefaultDash) + free(pGC->dash); + pGC->numInDashList = 2; + pGC->dash = dash; + dash[0] = newdash; + dash[1] = newdash; + } + else + error = BadAlloc; + } + else { + if (client) + client->errorValue = newdash; + error = BadValue; + } + break; + } + case GCArcMode: + { + unsigned int newarcmode; + NEXTVAL(unsigned int, newarcmode); + + if (newarcmode <= ArcPieSlice) + pGC->arcMode = newarcmode; + else { + if (client) + client->errorValue = newarcmode; + error = BadValue; + } + break; + } + default: + if (client) + client->errorValue = maskQ; + error = BadValue; + break; + } + } /* end while mask && !error */ + + if (pGC->fillStyle == FillTiled && pGC->tileIsPixel) { + if (!CreateDefaultTile(pGC)) { + pGC->fillStyle = FillSolid; + error = BadAlloc; + } + } + (*pGC->funcs->ChangeGC) (pGC, maskQ); + return error; +} + +#undef NEXTVAL +#undef NEXT_PTR + +static const struct { + BITS32 mask; + RESTYPE type; + Mask access_mode; +} xidfields[] = { + {GCTile, RT_PIXMAP, DixReadAccess}, + {GCStipple, RT_PIXMAP, DixReadAccess}, + {GCFont, RT_FONT, DixUseAccess}, + {GCClipMask, RT_PIXMAP, DixReadAccess}, +}; + +int +ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32) +{ + ChangeGCVal vals[GCLastBit + 1]; + int i; + + if (mask & ~GCAllBits) { + client->errorValue = mask; + return BadValue; + } + for (i = Ones(mask); i--;) + vals[i].val = pC32[i]; + for (i = 0; i < 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); +} + +static GCPtr +NewGCObject(ScreenPtr pScreen, int depth) +{ + GCPtr pGC; + + pGC = dixAllocateScreenObjectWithPrivates(pScreen, GC, PRIVATE_GC); + if (!pGC) { + return (GCPtr) NULL; + } + + pGC->pScreen = pScreen; + pGC->depth = depth; + pGC->alu = GXcopy; /* dst <- src */ + pGC->planemask = ~0; + pGC->serialNumber = 0; + pGC->funcs = 0; + pGC->fgPixel = 0; + pGC->bgPixel = 1; + pGC->lineWidth = 0; + pGC->lineStyle = LineSolid; + pGC->capStyle = CapButt; + pGC->joinStyle = JoinMiter; + pGC->fillStyle = FillSolid; + pGC->fillRule = EvenOddRule; + pGC->arcMode = ArcPieSlice; + pGC->tile.pixel = 0; + pGC->tile.pixmap = NullPixmap; + + pGC->tileIsPixel = TRUE; + pGC->patOrg.x = 0; + pGC->patOrg.y = 0; + pGC->subWindowMode = ClipByChildren; + pGC->graphicsExposures = TRUE; + pGC->clipOrg.x = 0; + pGC->clipOrg.y = 0; + pGC->clientClipType = CT_NONE; + pGC->clientClip = (pointer) NULL; + pGC->numInDashList = 2; + pGC->dash = DefaultDash; + pGC->dashOffset = 0; + + /* use the default font and stipple */ + pGC->font = defaultFont; + if (pGC->font) /* necessary, because open of default font could fail */ + pGC->font->refcnt++; + pGC->stipple = pGC->pScreen->PixmapPerDepth[0]; + if (pGC->stipple) + pGC->stipple->refcnt++; + + /* this is not a scratch GC */ + pGC->scratch_inuse = FALSE; + return pGC; +} + +/* CreateGC(pDrawable, mask, pval, pStatus) + creates a default GC for the given drawable, using mask to fill + in any non-default values. + Returns a pointer to the new GC on success, NULL otherwise. + returns status of non-default fields in pStatus +BUG: + should check for failure to create default tile + +*/ +GCPtr +CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, + XID gcid, ClientPtr client) +{ + GCPtr pGC; + + pGC = NewGCObject(pDrawable->pScreen, pDrawable->depth); + if (!pGC) { + *pStatus = BadAlloc; + return (GCPtr) NULL; + } + + pGC->serialNumber = GC_CHANGE_SERIAL_BIT; + if (mask & GCForeground) { + /* + * magic special case -- ChangeGC checks for this condition + * and snags the Foreground value to create a pseudo default-tile + */ + pGC->tileIsPixel = FALSE; + } + else { + pGC->tileIsPixel = TRUE; + } + + /* security creation/labeling check */ + *pStatus = XaceHook(XACE_RESOURCE_ACCESS, client, gcid, RT_GC, pGC, + RT_NONE, NULL, DixCreateAccess | DixSetAttrAccess); + if (*pStatus != Success) + goto out; + + pGC->stateChanges = GCAllBits; + if (!(*pGC->pScreen->CreateGC) (pGC)) + *pStatus = BadAlloc; + else if (mask) + *pStatus = ChangeGCXIDs(client, pGC, mask, pval); + else + *pStatus = Success; + + out: + if (*pStatus != Success) { + if (!pGC->tileIsPixel && !pGC->tile.pixmap) + pGC->tileIsPixel = TRUE; /* undo special case */ + FreeGC(pGC, (XID) 0); + pGC = (GCPtr) NULL; + } + + return pGC; +} + +static Bool +CreateDefaultTile(GCPtr pGC) +{ + ChangeGCVal tmpval[3]; + PixmapPtr pTile; + GCPtr pgcScratch; + xRectangle rect; + CARD16 w, h; + + w = 1; + h = 1; + (*pGC->pScreen->QueryBestSize) (TileShape, &w, &h, pGC->pScreen); + pTile = (PixmapPtr) + (*pGC->pScreen->CreatePixmap) (pGC->pScreen, w, h, pGC->depth, 0); + pgcScratch = GetScratchGC(pGC->depth, pGC->pScreen); + if (!pTile || !pgcScratch) { + if (pTile) + (*pTile->drawable.pScreen->DestroyPixmap) (pTile); + if (pgcScratch) + FreeScratchGC(pgcScratch); + return FALSE; + } + tmpval[0].val = GXcopy; + tmpval[1].val = pGC->tile.pixel; + tmpval[2].val = FillSolid; + (void) ChangeGC(NullClient, pgcScratch, + GCFunction | GCForeground | GCFillStyle, tmpval); + ValidateGC((DrawablePtr) pTile, pgcScratch); + rect.x = 0; + rect.y = 0; + rect.width = w; + rect.height = h; + (*pgcScratch->ops->PolyFillRect) ((DrawablePtr) pTile, pgcScratch, 1, + &rect); + /* Always remember to free the scratch graphics context after use. */ + FreeScratchGC(pgcScratch); + + pGC->tileIsPixel = FALSE; + pGC->tile.pixmap = pTile; + return TRUE; +} + +int +CopyGC(GC * pgcSrc, GC * pgcDst, BITS32 mask) +{ + BITS32 index2; + BITS32 maskQ; + int error = 0; + + if (pgcSrc == pgcDst) + return Success; + pgcDst->serialNumber |= GC_CHANGE_SERIAL_BIT; + pgcDst->stateChanges |= mask; + maskQ = mask; + while (mask) { + index2 = (BITS32) lowbit(mask); + mask &= ~index2; + switch (index2) { + case GCFunction: + pgcDst->alu = pgcSrc->alu; + break; + case GCPlaneMask: + pgcDst->planemask = pgcSrc->planemask; + break; + case GCForeground: + pgcDst->fgPixel = pgcSrc->fgPixel; + break; + case GCBackground: + pgcDst->bgPixel = pgcSrc->bgPixel; + break; + case GCLineWidth: + pgcDst->lineWidth = pgcSrc->lineWidth; + break; + case GCLineStyle: + pgcDst->lineStyle = pgcSrc->lineStyle; + break; + case GCCapStyle: + pgcDst->capStyle = pgcSrc->capStyle; + break; + case GCJoinStyle: + pgcDst->joinStyle = pgcSrc->joinStyle; + break; + case GCFillStyle: + pgcDst->fillStyle = pgcSrc->fillStyle; + break; + case GCFillRule: + pgcDst->fillRule = pgcSrc->fillRule; + break; + case GCTile: + { + if (EqualPixUnion(pgcDst->tileIsPixel, + pgcDst->tile, + pgcSrc->tileIsPixel, pgcSrc->tile)) { + break; + } + if (!pgcDst->tileIsPixel) + (*pgcDst->pScreen->DestroyPixmap) (pgcDst->tile.pixmap); + pgcDst->tileIsPixel = pgcSrc->tileIsPixel; + pgcDst->tile = pgcSrc->tile; + if (!pgcDst->tileIsPixel) + pgcDst->tile.pixmap->refcnt++; + break; + } + case GCStipple: + { + if (pgcDst->stipple == pgcSrc->stipple) + break; + if (pgcDst->stipple) + (*pgcDst->pScreen->DestroyPixmap) (pgcDst->stipple); + pgcDst->stipple = pgcSrc->stipple; + if (pgcDst->stipple) + pgcDst->stipple->refcnt++; + break; + } + case GCTileStipXOrigin: + pgcDst->patOrg.x = pgcSrc->patOrg.x; + break; + case GCTileStipYOrigin: + pgcDst->patOrg.y = pgcSrc->patOrg.y; + break; + case GCFont: + if (pgcDst->font == pgcSrc->font) + break; + if (pgcDst->font) + CloseFont(pgcDst->font, (Font) 0); + if ((pgcDst->font = pgcSrc->font) != NullFont) + (pgcDst->font)->refcnt++; + break; + case GCSubwindowMode: + pgcDst->subWindowMode = pgcSrc->subWindowMode; + break; + case GCGraphicsExposures: + pgcDst->graphicsExposures = pgcSrc->graphicsExposures; + break; + case GCClipXOrigin: + pgcDst->clipOrg.x = pgcSrc->clipOrg.x; + break; + case GCClipYOrigin: + pgcDst->clipOrg.y = pgcSrc->clipOrg.y; + break; + case GCClipMask: + (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); + break; + case GCDashOffset: + pgcDst->dashOffset = pgcSrc->dashOffset; + break; + case GCDashList: + if (pgcSrc->dash == DefaultDash) { + if (pgcDst->dash != DefaultDash) { + free(pgcDst->dash); + pgcDst->numInDashList = pgcSrc->numInDashList; + pgcDst->dash = pgcSrc->dash; + } + } + else { + unsigned char *dash; + unsigned int i; + + dash = malloc(pgcSrc->numInDashList * sizeof(unsigned char)); + if (dash) { + if (pgcDst->dash != DefaultDash) + free(pgcDst->dash); + pgcDst->numInDashList = pgcSrc->numInDashList; + pgcDst->dash = dash; + for (i = 0; i < pgcSrc->numInDashList; i++) + dash[i] = pgcSrc->dash[i]; + } + else + error = BadAlloc; + } + break; + case GCArcMode: + pgcDst->arcMode = pgcSrc->arcMode; + break; + default: + FatalError("CopyGC: Unhandled mask!\n"); + } + } + if (pgcDst->fillStyle == FillTiled && pgcDst->tileIsPixel) { + if (!CreateDefaultTile(pgcDst)) { + pgcDst->fillStyle = FillSolid; + error = BadAlloc; + } + } + (*pgcDst->funcs->CopyGC) (pgcSrc, maskQ, pgcDst); + return error; +} + +/** + * does the diX part of freeing the characteristics in the GC. + * + * \param value must conform to DeleteType + */ +int +FreeGC(pointer value, XID gid) +{ + GCPtr pGC = (GCPtr) value; + + CloseFont(pGC->font, (Font) 0); + (*pGC->funcs->DestroyClip) (pGC); + + if (!pGC->tileIsPixel) + (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap); + if (pGC->stipple) + (*pGC->pScreen->DestroyPixmap) (pGC->stipple); + + (*pGC->funcs->DestroyGC) (pGC); + if (pGC->dash != DefaultDash) + free(pGC->dash); + dixFreeObjectWithPrivates(pGC, PRIVATE_GC); + return Success; +} + +/* CreateScratchGC(pScreen, depth) + like CreateGC, but doesn't do the default tile or stipple, +since we can't create them without already having a GC. any code +using the tile or stipple has to set them explicitly anyway, +since the state of the scratch gc is unknown. This is OK +because ChangeGC() has to be able to deal with NULL tiles and +stipples anyway (in case the CreateGC() call has provided a +value for them -- we can't set the default tile until the +client-supplied attributes are installed, since the fgPixel +is what fills the default tile. (maybe this comment should +go with CreateGC() or ChangeGC().) +*/ + +static GCPtr +CreateScratchGC(ScreenPtr pScreen, unsigned depth) +{ + GCPtr pGC; + + pGC = NewGCObject(pScreen, depth); + if (!pGC) + return (GCPtr) NULL; + + pGC->stateChanges = GCAllBits; + if (!(*pScreen->CreateGC) (pGC)) { + FreeGC(pGC, (XID) 0); + pGC = (GCPtr) NULL; + } + return pGC; +} + +void +FreeGCperDepth(int screenNum) +{ + int i; + ScreenPtr pScreen; + GCPtr *ppGC; + + pScreen = screenInfo.screens[screenNum]; + ppGC = pScreen->GCperDepth; + + for (i = 0; i <= pScreen->numDepths; i++) { + (void) FreeGC(ppGC[i], (XID) 0); + ppGC[i] = NULL; + } +} + +Bool +CreateGCperDepth(int screenNum) +{ + int i; + ScreenPtr pScreen; + DepthPtr pDepth; + GCPtr *ppGC; + + pScreen = screenInfo.screens[screenNum]; + ppGC = pScreen->GCperDepth; + /* do depth 1 separately because it's not included in list */ + if (!(ppGC[0] = CreateScratchGC(pScreen, 1))) + return FALSE; + ppGC[0]->graphicsExposures = FALSE; + /* Make sure we don't overflow GCperDepth[] */ + if (pScreen->numDepths > MAXFORMATS) + return FALSE; + + pDepth = pScreen->allowedDepths; + for (i = 0; i < pScreen->numDepths; i++, pDepth++) { + if (!(ppGC[i + 1] = CreateScratchGC(pScreen, pDepth->depth))) { + for (; i >= 0; i--) + (void) FreeGC(ppGC[i], (XID) 0); + return FALSE; + } + ppGC[i + 1]->graphicsExposures = FALSE; + } + return TRUE; +} + +Bool +CreateDefaultStipple(int screenNum) +{ + ScreenPtr pScreen; + ChangeGCVal tmpval[3]; + xRectangle rect; + CARD16 w, h; + GCPtr pgcScratch; + + pScreen = screenInfo.screens[screenNum]; + + w = 16; + h = 16; + (*pScreen->QueryBestSize) (StippleShape, &w, &h, pScreen); + if (!(pScreen->PixmapPerDepth[0] = + (*pScreen->CreatePixmap) (pScreen, w, h, 1, 0))) + return FALSE; + /* fill stipple with 1 */ + tmpval[0].val = GXcopy; + tmpval[1].val = 1; + tmpval[2].val = FillSolid; + pgcScratch = GetScratchGC(1, pScreen); + if (!pgcScratch) { + (*pScreen->DestroyPixmap) (pScreen->PixmapPerDepth[0]); + return FALSE; + } + (void) ChangeGC(NullClient, pgcScratch, + GCFunction | GCForeground | GCFillStyle, tmpval); + ValidateGC((DrawablePtr) pScreen->PixmapPerDepth[0], pgcScratch); + rect.x = 0; + rect.y = 0; + rect.width = w; + rect.height = h; + (*pgcScratch->ops->PolyFillRect) ((DrawablePtr) pScreen->PixmapPerDepth[0], + pgcScratch, 1, &rect); + FreeScratchGC(pgcScratch); + return TRUE; +} + +void +FreeDefaultStipple(int screenNum) +{ + ScreenPtr pScreen = screenInfo.screens[screenNum]; + + (*pScreen->DestroyPixmap) (pScreen->PixmapPerDepth[0]); +} + +int +SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) +{ + long i; + unsigned char *p, *indash; + BITS32 maskQ = 0; + + i = ndash; + p = pdash; + while (i--) { + if (!*p++) { + /* dash segment must be > 0 */ + return BadValue; + } + } + + if (ndash & 1) + p = malloc(2 * ndash * sizeof(unsigned char)); + else + p = malloc(ndash * sizeof(unsigned char)); + if (!p) + return BadAlloc; + + pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; + if (offset != pGC->dashOffset) { + pGC->dashOffset = offset; + pGC->stateChanges |= GCDashOffset; + maskQ |= GCDashOffset; + } + + if (pGC->dash != DefaultDash) + free(pGC->dash); + pGC->numInDashList = ndash; + pGC->dash = p; + if (ndash & 1) { + pGC->numInDashList += ndash; + indash = pdash; + i = ndash; + while (i--) + *p++ = *indash++; + } + while (ndash--) + *p++ = *pdash++; + pGC->stateChanges |= GCDashList; + maskQ |= GCDashList; + + if (pGC->funcs->ChangeGC) + (*pGC->funcs->ChangeGC) (pGC, maskQ); + return Success; +} + +int +VerifyRectOrder(int nrects, xRectangle *prects, int ordering) +{ + xRectangle *prectP, *prectN; + int i; + + switch (ordering) { + case Unsorted: + return CT_UNSORTED; + case YSorted: + if (nrects > 1) { + for (i = 1, prectP = prects, prectN = prects + 1; + i < nrects; i++, prectP++, prectN++) + if (prectN->y < prectP->y) + return -1; + } + return CT_YSORTED; + case YXSorted: + if (nrects > 1) { + for (i = 1, prectP = prects, prectN = prects + 1; + i < nrects; i++, prectP++, prectN++) + if ((prectN->y < prectP->y) || + ((prectN->y == prectP->y) && (prectN->x < prectP->x))) + return -1; + } + return CT_YXSORTED; + case YXBanded: + if (nrects > 1) { + for (i = 1, prectP = prects, prectN = prects + 1; + i < nrects; i++, prectP++, prectN++) + if ((prectN->y != prectP->y && + prectN->y < prectP->y + (int) prectP->height) || + ((prectN->y == prectP->y) && + (prectN->height != prectP->height || + prectN->x < prectP->x + (int) prectP->width))) + return -1; + } + return CT_YXBANDED; + } + return -1; +} + +int +SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, + xRectangle *prects, int ordering) +{ + int newct, size; + xRectangle *prectsNew; + + newct = VerifyRectOrder(nrects, prects, ordering); + if (newct < 0) + return BadMatch; + size = nrects * sizeof(xRectangle); + prectsNew = malloc(size); + if (!prectsNew && size) + return BadAlloc; + + pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; + pGC->clipOrg.x = xOrigin; + pGC->stateChanges |= GCClipXOrigin; + + pGC->clipOrg.y = yOrigin; + pGC->stateChanges |= GCClipYOrigin; + + if (size) + memmove((char *) prectsNew, (char *) prects, size); + (*pGC->funcs->ChangeClip) (pGC, newct, (pointer) prectsNew, nrects); + if (pGC->funcs->ChangeGC) + (*pGC->funcs->ChangeGC) (pGC, + GCClipXOrigin | GCClipYOrigin | GCClipMask); + return Success; +} + +/* + sets reasonable defaults + if we can get a pre-allocated one, use it and mark it as used. + if we can't, create one out of whole cloth (The Velveteen GC -- if + you use it often enough it will become real.) +*/ +GCPtr +GetScratchGC(unsigned depth, ScreenPtr pScreen) +{ + int i; + GCPtr pGC; + + for (i = 0; i <= pScreen->numDepths; i++) { + pGC = pScreen->GCperDepth[i]; + if (pGC && pGC->depth == depth && !pGC->scratch_inuse) { + pGC->scratch_inuse = TRUE; + + pGC->alu = GXcopy; + pGC->planemask = ~0; + pGC->serialNumber = 0; + pGC->fgPixel = 0; + pGC->bgPixel = 1; + pGC->lineWidth = 0; + pGC->lineStyle = LineSolid; + pGC->capStyle = CapButt; + pGC->joinStyle = JoinMiter; + pGC->fillStyle = FillSolid; + pGC->fillRule = EvenOddRule; + pGC->arcMode = ArcChord; + pGC->patOrg.x = 0; + pGC->patOrg.y = 0; + pGC->subWindowMode = ClipByChildren; + pGC->graphicsExposures = FALSE; + pGC->clipOrg.x = 0; + pGC->clipOrg.y = 0; + if (pGC->clientClipType != CT_NONE) + (*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0); + pGC->stateChanges = GCAllBits; + return pGC; + } + } + /* if we make it this far, need to roll our own */ + pGC = CreateScratchGC(pScreen, depth); + if (pGC) + pGC->graphicsExposures = FALSE; + return pGC; +} + +/* + if the gc to free is in the table of pre-existing ones, +mark it as available. + if not, free it for real +*/ +void +FreeScratchGC(GCPtr pGC) +{ + if (pGC->scratch_inuse) + pGC->scratch_inuse = FALSE; + else + FreeGC(pGC, (GContext) 0); +} diff --git a/dix/getevents.c b/dix/getevents.c new file mode 100644 index 0000000..23f9c33 --- /dev/null +++ b/dix/getevents.c @@ -0,0 +1,2126 @@ +/* + * Copyright © 2006 Nokia Corporation + * Copyright © 2006-2007 Daniel Stone + * Copyright © 2008 Red Hat, Inc. + * Copyright © 2011 The Chromium Authors + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Daniel Stone <daniel@fooishbar.org> + * Peter Hutterer <peter.hutterer@who-t.net> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/keysym.h> +#include <X11/Xproto.h> +#include <math.h> +#include <limits.h> + +#include "misc.h" +#include "resource.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "globals.h" +#include "dixevents.h" +#include "mipointer.h" +#include "eventstr.h" +#include "eventconvert.h" +#include "inpututils.h" +#include "mi.h" +#include "windowstr.h" + +#include <X11/extensions/XKBproto.h> +#include "xkbsrv.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +#include <X11/extensions/XI.h> +#include <X11/extensions/XI2.h> +#include <X11/extensions/XIproto.h> +#include <pixman.h> +#include "exglobals.h" +#include "exevents.h" +#include "extnsionst.h" +#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */ + +#if XSERVER_DTRACE +#include <sys/types.h> +typedef const char *string; +#include <Xserver-dtrace.h> +#endif + +/* Number of motion history events to store. */ +#define MOTION_HISTORY_SIZE 256 + +/** + * InputEventList is the storage for input events generated by + * QueuePointerEvents, QueueKeyboardEvents, and QueueProximityEvents. + * This list is allocated on startup by the DIX. + */ +InternalEvent *InputEventList = NULL; + +/** + * Pick some arbitrary size for Xi motion history. + */ +int +GetMotionHistorySize(void) +{ + return MOTION_HISTORY_SIZE; +} + +void +set_button_down(DeviceIntPtr pDev, int button, int type) +{ + if (type == BUTTON_PROCESSED) + SetBit(pDev->button->down, button); + else + SetBit(pDev->button->postdown, button); +} + +void +set_button_up(DeviceIntPtr pDev, int button, int type) +{ + if (type == BUTTON_PROCESSED) + ClearBit(pDev->button->down, button); + else + ClearBit(pDev->button->postdown, button); +} + +Bool +button_is_down(DeviceIntPtr pDev, int button, int type) +{ + Bool ret = FALSE; + + if (type & BUTTON_PROCESSED) + ret = ret || BitIsOn(pDev->button->down, button); + if (type & BUTTON_POSTED) + ret = ret || BitIsOn(pDev->button->postdown, button); + + return ret; +} + +void +set_key_down(DeviceIntPtr pDev, int key_code, int type) +{ + if (type == KEY_PROCESSED) + SetBit(pDev->key->down, key_code); + else + SetBit(pDev->key->postdown, key_code); +} + +void +set_key_up(DeviceIntPtr pDev, int key_code, int type) +{ + if (type == KEY_PROCESSED) + ClearBit(pDev->key->down, key_code); + else + ClearBit(pDev->key->postdown, key_code); +} + +Bool +key_is_down(DeviceIntPtr pDev, int key_code, int type) +{ + Bool ret = FALSE; + + if (type & KEY_PROCESSED) + ret = ret || BitIsOn(pDev->key->down, key_code); + if (type & KEY_POSTED) + ret = ret || BitIsOn(pDev->key->postdown, key_code); + + return ret; +} + +static Bool +key_autorepeats(DeviceIntPtr pDev, int key_code) +{ + return ! !(pDev->kbdfeed->ctrl.autoRepeats[key_code >> 3] & + (1 << (key_code & 7))); +} + +static void +init_touch_ownership(DeviceIntPtr dev, TouchOwnershipEvent *event, Time ms) +{ + memset(event, 0, sizeof(TouchOwnershipEvent)); + event->header = ET_Internal; + event->type = ET_TouchOwnership; + event->length = sizeof(TouchOwnershipEvent); + event->time = ms; + event->deviceid = dev->id; +} + +static void +init_raw(DeviceIntPtr dev, RawDeviceEvent *event, Time ms, int type, int detail) +{ + memset(event, 0, sizeof(RawDeviceEvent)); + event->header = ET_Internal; + event->length = sizeof(RawDeviceEvent); + switch (type) { + case MotionNotify: + event->type = ET_RawMotion; + break; + case ButtonPress: + event->type = ET_RawButtonPress; + break; + case ButtonRelease: + event->type = ET_RawButtonRelease; + break; + case KeyPress: + event->type = ET_RawKeyPress; + break; + case KeyRelease: + event->type = ET_RawKeyRelease; + break; + case XI_TouchBegin: + event->type = ET_RawTouchBegin; + break; + case XI_TouchUpdate: + event->type = ET_RawTouchUpdate; + break; + case XI_TouchEnd: + event->type = ET_RawTouchEnd; + break; + } + event->time = ms; + event->deviceid = dev->id; + event->sourceid = dev->id; + event->detail.button = detail; +} + +static void +set_raw_valuators(RawDeviceEvent *event, ValuatorMask *mask, double *data) +{ + int i; + + for (i = 0; i < valuator_mask_size(mask); i++) { + if (valuator_mask_isset(mask, i)) { + SetBit(event->valuators.mask, i); + data[i] = valuator_mask_get_double(mask, i); + } + } +} + +static void +set_valuators(DeviceIntPtr dev, DeviceEvent *event, ValuatorMask *mask) +{ + int i; + + /* Set the data to the previous value for unset absolute axes. The values + * may be used when sent as part of an XI 1.x valuator event. */ + for (i = 0; i < valuator_mask_size(mask); i++) { + if (valuator_mask_isset(mask, i)) { + SetBit(event->valuators.mask, i); + if (valuator_get_mode(dev, i) == Absolute) + SetBit(event->valuators.mode, i); + event->valuators.data[i] = valuator_mask_get_double(mask, i); + } + else + event->valuators.data[i] = dev->valuator->axisVal[i]; + } +} + +void +CreateClassesChangedEvent(InternalEvent *event, + DeviceIntPtr master, DeviceIntPtr slave, int flags) +{ + int i; + DeviceChangedEvent *dce; + CARD32 ms = GetTimeInMillis(); + + dce = &event->changed_event; + memset(dce, 0, sizeof(DeviceChangedEvent)); + dce->deviceid = slave->id; + dce->masterid = master ? master->id : 0; + dce->header = ET_Internal; + dce->length = sizeof(DeviceChangedEvent); + dce->type = ET_DeviceChanged; + dce->time = ms; + dce->flags = flags; + dce->sourceid = slave->id; + + if (slave->button) { + dce->buttons.num_buttons = slave->button->numButtons; + for (i = 0; i < dce->buttons.num_buttons; i++) + dce->buttons.names[i] = slave->button->labels[i]; + } + if (slave->valuator) { + dce->num_valuators = slave->valuator->numAxes; + for (i = 0; i < dce->num_valuators; i++) { + dce->valuators[i].min = slave->valuator->axes[i].min_value; + dce->valuators[i].max = slave->valuator->axes[i].max_value; + dce->valuators[i].resolution = slave->valuator->axes[i].resolution; + dce->valuators[i].mode = slave->valuator->axes[i].mode; + dce->valuators[i].name = slave->valuator->axes[i].label; + dce->valuators[i].scroll = slave->valuator->axes[i].scroll; + dce->valuators[i].value = slave->valuator->axisVal[i]; + } + } + if (slave->key) { + dce->keys.min_keycode = slave->key->xkbInfo->desc->min_key_code; + dce->keys.max_keycode = slave->key->xkbInfo->desc->max_key_code; + } +} + +/** + * Rescale the coord between the two axis ranges. + */ +static double +rescaleValuatorAxis(double coord, AxisInfoPtr from, AxisInfoPtr to, + double defmin, double defmax) +{ + double fmin = defmin, fmax = defmax; + double tmin = defmin, tmax = defmax; + + if (from && from->min_value < from->max_value) { + fmin = from->min_value; + fmax = from->max_value + 1; + } + if (to && to->min_value < to->max_value) { + tmin = to->min_value; + tmax = to->max_value + 1; + } + + if (fmin == tmin && fmax == tmax) + return coord; + + if (fmax == fmin) /* avoid division by 0 */ + return 0.0; + + return (coord - fmin) * (tmax - tmin) / (fmax - fmin) + tmin; +} + +/** + * Update all coordinates when changing to a different SD + * to ensure that relative reporting will work as expected + * without loss of precision. + * + * pDev->last.valuators will be in absolute device coordinates after this + * function. + */ +static void +updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) +{ + int i; + DeviceIntPtr lastSlave; + + /* master->last.valuators[0]/[1] is in desktop-wide coords and the actual + * position of the pointer */ + pDev->last.valuators[0] = master->last.valuators[0]; + pDev->last.valuators[1] = master->last.valuators[1]; + + if (!pDev->valuator) + return; + + /* scale back to device coordinates */ + if (pDev->valuator->numAxes > 0) { + pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0], + NULL, + pDev->valuator->axes + 0, + screenInfo.x, + screenInfo.width); + } + if (pDev->valuator->numAxes > 1) { + pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1], + NULL, + pDev->valuator->axes + 1, + screenInfo.y, + screenInfo.height); + } + + /* calculate the other axis as well based on info from the old + * slave-device. If the old slave had less axes than this one, + * last.valuators is reset to 0. + */ + if ((lastSlave = master->last.slave) && lastSlave->valuator) { + for (i = 2; i < pDev->valuator->numAxes; i++) { + if (i >= lastSlave->valuator->numAxes) { + pDev->last.valuators[i] = 0; + valuator_mask_set_double(pDev->last.scroll, i, 0); + } + else { + double val = pDev->last.valuators[i]; + + val = rescaleValuatorAxis(val, lastSlave->valuator->axes + i, + pDev->valuator->axes + i, 0, 0); + pDev->last.valuators[i] = val; + valuator_mask_set_double(pDev->last.scroll, i, val); + } + } + } + +} + +/** + * Allocate the motion history buffer. + */ +void +AllocateMotionHistory(DeviceIntPtr pDev) +{ + int size; + + free(pDev->valuator->motion); + + if (pDev->valuator->numMotionEvents < 1) + return; + + /* An MD must have a motion history size large enough to keep all + * potential valuators, plus the respective range of the valuators. + * 3 * INT32 for (min_val, max_val, curr_val)) + */ + if (IsMaster(pDev)) + size = sizeof(INT32) * 3 * MAX_VALUATORS; + else { + ValuatorClassPtr v = pDev->valuator; + int numAxes; + + /* XI1 doesn't understand mixed mode devices */ + for (numAxes = 0; numAxes < v->numAxes; numAxes++) + if (valuator_get_mode(pDev, numAxes) != valuator_get_mode(pDev, 0)) + break; + size = sizeof(INT32) * numAxes; + } + + size += sizeof(Time); + + pDev->valuator->motion = calloc(pDev->valuator->numMotionEvents, size); + pDev->valuator->first_motion = 0; + pDev->valuator->last_motion = 0; + if (!pDev->valuator->motion) + ErrorF("[dix] %s: Failed to alloc motion history (%d bytes).\n", + pDev->name, size * pDev->valuator->numMotionEvents); +} + +/** + * Dump the motion history between start and stop into the supplied buffer. + * Only records the event for a given screen in theory, but in practice, we + * sort of ignore this. + * + * If core is set, we only generate x/y, in INT16, scaled to screen coords. + */ +int +GetMotionHistory(DeviceIntPtr pDev, xTimecoord ** buff, unsigned long start, + unsigned long stop, ScreenPtr pScreen, BOOL core) +{ + char *ibuff = NULL, *obuff; + int i = 0, ret = 0; + int j, coord; + Time current; + + /* The size of a single motion event. */ + int size; + AxisInfo from, *to; /* for scaling */ + INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */ + INT16 *corebuf; + AxisInfo core_axis = { 0 }; + + if (!pDev->valuator || !pDev->valuator->numMotionEvents) + return 0; + + if (core && !pScreen) + return 0; + + if (IsMaster(pDev)) + size = (sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(Time); + else + size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); + + *buff = malloc(size * pDev->valuator->numMotionEvents); + if (!(*buff)) + return 0; + obuff = (char *) *buff; + + for (i = pDev->valuator->first_motion; + i != pDev->valuator->last_motion; + i = (i + 1) % pDev->valuator->numMotionEvents) { + /* We index the input buffer by which element we're accessing, which + * is not monotonic, and the output buffer by how many events we've + * written so far. */ + ibuff = (char *) pDev->valuator->motion + (i * size); + memcpy(¤t, ibuff, sizeof(Time)); + + if (current > stop) { + return ret; + } + else if (current >= start) { + if (core) { + memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ + + icbuf = (INT32 *) (ibuff + sizeof(Time)); + corebuf = (INT16 *) (obuff + sizeof(Time)); + + /* fetch x coordinate + range */ + memcpy(&from.min_value, icbuf++, sizeof(INT32)); + memcpy(&from.max_value, icbuf++, sizeof(INT32)); + memcpy(&coord, icbuf++, sizeof(INT32)); + + /* scale to screen coords */ + to = &core_axis; + to->max_value = pScreen->width; + coord = + rescaleValuatorAxis(coord, &from, to, 0, pScreen->width); + + memcpy(corebuf, &coord, sizeof(INT16)); + corebuf++; + + /* fetch y coordinate + range */ + memcpy(&from.min_value, icbuf++, sizeof(INT32)); + memcpy(&from.max_value, icbuf++, sizeof(INT32)); + memcpy(&coord, icbuf++, sizeof(INT32)); + + to->max_value = pScreen->height; + coord = + rescaleValuatorAxis(coord, &from, to, 0, pScreen->height); + memcpy(corebuf, &coord, sizeof(INT16)); + + } + else if (IsMaster(pDev)) { + memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ + + ocbuf = (INT32 *) (obuff + sizeof(Time)); + icbuf = (INT32 *) (ibuff + sizeof(Time)); + for (j = 0; j < MAX_VALUATORS; j++) { + if (j >= pDev->valuator->numAxes) + break; + + /* fetch min/max/coordinate */ + memcpy(&from.min_value, icbuf++, sizeof(INT32)); + memcpy(&from.max_value, icbuf++, sizeof(INT32)); + memcpy(&coord, icbuf++, sizeof(INT32)); + + to = (j < + pDev->valuator->numAxes) ? &pDev->valuator-> + axes[j] : NULL; + + /* x/y scaled to screen if no range is present */ + if (j == 0 && (from.max_value < from.min_value)) + from.max_value = pScreen->width; + else if (j == 1 && (from.max_value < from.min_value)) + from.max_value = pScreen->height; + + /* scale from stored range into current range */ + coord = rescaleValuatorAxis(coord, &from, to, 0, 0); + memcpy(ocbuf, &coord, sizeof(INT32)); + ocbuf++; + } + } + else + memcpy(obuff, ibuff, size); + + /* don't advance by size here. size may be different to the + * actually written size if the MD has less valuators than MAX */ + if (core) + obuff += sizeof(INT32) + sizeof(Time); + else + obuff += + (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); + ret++; + } + } + + return ret; +} + +/** + * Update the motion history for a specific device, with the list of + * valuators. + * + * Layout of the history buffer: + * for SDs: [time] [val0] [val1] ... [valn] + * for MDs: [time] [min_val0] [max_val0] [val0] [min_val1] ... [valn] + * + * For events that have some valuators unset: + * min_val == max_val == val == 0. + */ +static void +updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, ValuatorMask *mask, + double *valuators) +{ + char *buff = (char *) pDev->valuator->motion; + ValuatorClassPtr v; + int i; + + if (!pDev->valuator->numMotionEvents) + return; + + v = pDev->valuator; + if (IsMaster(pDev)) { + buff += ((sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(CARD32)) * + v->last_motion; + + memcpy(buff, &ms, sizeof(Time)); + buff += sizeof(Time); + + memset(buff, 0, sizeof(INT32) * 3 * MAX_VALUATORS); + + for (i = 0; i < v->numAxes; i++) { + int val; + + /* XI1 doesn't support mixed mode devices */ + if (valuator_get_mode(pDev, i) != valuator_get_mode(pDev, 0)) + break; + if (valuator_mask_size(mask) <= i || !valuator_mask_isset(mask, i)) { + buff += 3 * sizeof(INT32); + continue; + } + memcpy(buff, &v->axes[i].min_value, sizeof(INT32)); + buff += sizeof(INT32); + memcpy(buff, &v->axes[i].max_value, sizeof(INT32)); + buff += sizeof(INT32); + val = valuators[i]; + memcpy(buff, &val, sizeof(INT32)); + buff += sizeof(INT32); + } + } + else { + + buff += ((sizeof(INT32) * pDev->valuator->numAxes) + sizeof(CARD32)) * + pDev->valuator->last_motion; + + memcpy(buff, &ms, sizeof(Time)); + buff += sizeof(Time); + + memset(buff, 0, sizeof(INT32) * pDev->valuator->numAxes); + + for (i = 0; i < MAX_VALUATORS; i++) { + int val; + + if (valuator_mask_size(mask) <= i || !valuator_mask_isset(mask, i)) { + buff += sizeof(INT32); + continue; + } + val = valuators[i]; + memcpy(buff, &val, sizeof(INT32)); + buff += sizeof(INT32); + } + } + + pDev->valuator->last_motion = (pDev->valuator->last_motion + 1) % + pDev->valuator->numMotionEvents; + /* If we're wrapping around, just keep the circular buffer going. */ + if (pDev->valuator->first_motion == pDev->valuator->last_motion) + pDev->valuator->first_motion = (pDev->valuator->first_motion + 1) % + pDev->valuator->numMotionEvents; + + return; +} + +/** + * Returns the maximum number of events GetKeyboardEvents + * and GetPointerEvents will ever return. + * + * This MUST be absolutely constant, from init until exit. + */ +int +GetMaximumEventsNum(void) +{ + /* One raw event + * One device event + * One possible device changed event + * Lots of possible separate button scroll events (horiz + vert) + * Lots of possible separate raw button scroll events (horiz + vert) + */ + return 100; +} + +/** + * Clip an axis to its bounds, which are declared in the call to + * InitValuatorAxisClassStruct. + */ +static void +clipAxis(DeviceIntPtr pDev, int axisNum, double *val) +{ + AxisInfoPtr axis; + + if (axisNum >= pDev->valuator->numAxes) + return; + + axis = pDev->valuator->axes + axisNum; + + /* If a value range is defined, clip. If not, do nothing */ + if (axis->max_value <= axis->min_value) + return; + + if (*val < axis->min_value) + *val = axis->min_value; + if (*val > axis->max_value) + *val = axis->max_value; +} + +/** + * Clip every axis in the list of valuators to its bounds. + */ +static void +clipValuators(DeviceIntPtr pDev, ValuatorMask *mask) +{ + int i; + + for (i = 0; i < valuator_mask_size(mask); i++) + if (valuator_mask_isset(mask, i)) { + double val = valuator_mask_get_double(mask, i); + + clipAxis(pDev, i, &val); + valuator_mask_set_double(mask, i, val); + } +} + +/** + * Create the DCCE event (does not update the master's device state yet, this + * is done in the event processing). + * Pull in the coordinates from the MD if necessary. + * + * @param events Pointer to a pre-allocated event array. + * @param dev The slave device that generated an event. + * @param type Either DEVCHANGE_POINTER_EVENT and/or DEVCHANGE_KEYBOARD_EVENT + * @param num_events The current number of events, returns the number of + * events if a DCCE was generated. + * @return The updated @events pointer. + */ +InternalEvent * +UpdateFromMaster(InternalEvent *events, DeviceIntPtr dev, int type, + int *num_events) +{ + DeviceIntPtr master; + + master = + GetMaster(dev, + (type & DEVCHANGE_POINTER_EVENT) ? MASTER_POINTER : + MASTER_KEYBOARD); + + if (master && master->last.slave != dev) { + CreateClassesChangedEvent(events, master, dev, + type | DEVCHANGE_SLAVE_SWITCH); + if (IsPointerDevice(master)) { + updateSlaveDeviceCoords(master, dev); + master->last.numValuators = dev->last.numValuators; + } + master->last.slave = dev; + (*num_events)++; + events++; + } + return events; +} + +/** + * Move the device's pointer to the position given in the valuators. + * + * @param dev The device whose pointer is to be moved. + * @param mask Valuator data for this event. + */ +static void +clipAbsolute(DeviceIntPtr dev, ValuatorMask *mask) +{ + int i; + + for (i = 0; i < valuator_mask_size(mask); i++) { + double val; + + if (!valuator_mask_isset(mask, i)) + continue; + val = valuator_mask_get_double(mask, i); + clipAxis(dev, i, &val); + valuator_mask_set_double(mask, i, val); + } +} + +static void +add_to_scroll_valuator(DeviceIntPtr dev, ValuatorMask *mask, int valuator, double value) +{ + double v; + + if (!valuator_mask_fetch_double(mask, valuator, &v)) + return; + + /* protect against scrolling overflow. INT_MAX for double, because + * we'll eventually write this as 32.32 fixed point */ + if ((value > 0 && v > INT_MAX - value) || (value < 0 && v < INT_MIN - value)) { + v = 0; + + /* reset last.scroll to avoid a button storm */ + valuator_mask_set_double(dev->last.scroll, valuator, 0); + } + else + v += value; + + valuator_mask_set_double(mask, valuator, v); +} + + +static void +scale_for_device_resolution(DeviceIntPtr dev, ValuatorMask *mask) +{ + double y; + ValuatorClassPtr v = dev->valuator; + int xrange = v->axes[0].max_value - v->axes[0].min_value + 1; + int yrange = v->axes[1].max_value - v->axes[1].min_value + 1; + + double screen_ratio = 1.0 * screenInfo.width/screenInfo.height; + double device_ratio = 1.0 * xrange/yrange; + double resolution_ratio = 1.0; + double ratio; + + if (!valuator_mask_fetch_double(mask, 1, &y)) + return; + + if (v->axes[0].resolution != 0 && v->axes[1].resolution != 0) + resolution_ratio = 1.0 * v->axes[0].resolution/v->axes[1].resolution; + + ratio = device_ratio/resolution_ratio/screen_ratio; + valuator_mask_set_double(mask, 1, y / ratio); +} + +/** + * Move the device's pointer by the values given in @valuators. + * + * @param dev The device whose pointer is to be moved. + * @param[in,out] mask Valuator data for this event, modified in-place. + */ +static void +moveRelative(DeviceIntPtr dev, int flags, ValuatorMask *mask) +{ + int i; + Bool clip_xy = IsMaster(dev) || !IsFloating(dev); + ValuatorClassPtr v = dev->valuator; + + /* for abs devices in relative mode, we've just scaled wrong, since we + mapped the device's shape into the screen shape. Undo this. */ + if ((flags & POINTER_ABSOLUTE) == 0 && v && v->numAxes > 1 && + v->axes[0].min_value < v->axes[0].max_value && + v->axes[1].min_value < v->axes[1].max_value) { + scale_for_device_resolution(dev, mask); + } + + /* calc other axes, clip, drop back into valuators */ + for (i = 0; i < valuator_mask_size(mask); i++) { + double val = dev->last.valuators[i]; + + if (!valuator_mask_isset(mask, i)) + continue; + + add_to_scroll_valuator(dev, mask, i, val); + + /* x & y need to go over the limits to cross screens if the SD + * isn't currently attached; otherwise, clip to screen bounds. */ + if (valuator_get_mode(dev, i) == Absolute && + ((i != 0 && i != 1) || clip_xy)) { + val = valuator_mask_get_double(mask, i); + clipAxis(dev, i, &val); + valuator_mask_set_double(mask, i, val); + } + } +} + +/** + * Accelerate the data in valuators based on the device's acceleration scheme. + * + * @param dev The device which's pointer is to be moved. + * @param valuators Valuator mask + * @param ms Current time. + */ +static void +accelPointer(DeviceIntPtr dev, ValuatorMask *valuators, CARD32 ms) +{ + if (dev->valuator->accelScheme.AccelSchemeProc) + dev->valuator->accelScheme.AccelSchemeProc(dev, valuators, ms); +} + +/** + * Scale from absolute screen coordinates to absolute coordinates in the + * device's coordinate range. + * + * @param dev The device to scale for. + * @param[in, out] mask The mask in desktop/screen coordinates, modified in place + * to contain device coordinate range. + * @param flags If POINTER_SCREEN is set, mask is in per-screen coordinates. + * Otherwise, mask is in desktop coords. + */ +static void +scale_from_screen(DeviceIntPtr dev, ValuatorMask *mask, int flags) +{ + double scaled; + ScreenPtr scr = miPointerGetScreen(dev); + + if (valuator_mask_isset(mask, 0)) { + scaled = valuator_mask_get_double(mask, 0); + if (flags & POINTER_SCREEN) + scaled += scr->x; + scaled = rescaleValuatorAxis(scaled, + NULL, dev->valuator->axes + 0, + screenInfo.x, screenInfo.width); + valuator_mask_set_double(mask, 0, scaled); + } + if (valuator_mask_isset(mask, 1)) { + scaled = valuator_mask_get_double(mask, 1); + if (flags & POINTER_SCREEN) + scaled += scr->y; + scaled = rescaleValuatorAxis(scaled, + NULL, dev->valuator->axes + 1, + screenInfo.y, screenInfo.height); + valuator_mask_set_double(mask, 1, scaled); + } +} + +/** + * Scale from (absolute) device to screen coordinates here, + * + * The coordinates provided are always absolute. see fill_pointer_events for + * information on coordinate systems. + * + * @param dev The device to be moved. + * @param mask Mask of axis values for this event + * @param[out] devx x desktop-wide coordinate in device coordinate system + * @param[out] devy y desktop-wide coordinate in device coordinate system + * @param[out] screenx x coordinate in desktop coordinate system + * @param[out] screeny y coordinate in desktop coordinate system + */ +static ScreenPtr +scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask, + double *devx, double *devy, double *screenx, double *screeny) +{ + ScreenPtr scr = miPointerGetScreen(dev); + double x, y; + + BUG_WARN(dev->valuator && dev->valuator->numAxes < 2); + if (!dev->valuator || dev->valuator->numAxes < 2) { + /* if we have no axes, last.valuators must be in screen coords + * anyway */ + *devx = *screenx = dev->last.valuators[0]; + *devy = *screeny = dev->last.valuators[1]; + return scr; + } + + if (valuator_mask_isset(mask, 0)) + x = valuator_mask_get_double(mask, 0); + else + x = dev->last.valuators[0]; + if (valuator_mask_isset(mask, 1)) + y = valuator_mask_get_double(mask, 1); + else + y = dev->last.valuators[1]; + + /* scale x&y to desktop coordinates */ + *screenx = rescaleValuatorAxis(x, dev->valuator->axes + 0, NULL, + screenInfo.x, screenInfo.width); + *screeny = rescaleValuatorAxis(y, dev->valuator->axes + 1, NULL, + screenInfo.y, screenInfo.height); + + *devx = x; + *devy = y; + + return scr; +} + +/** + * If we have HW cursors, this actually moves the visible sprite. If not, we + * just do all the screen crossing, etc. + * + * We use the screen coordinates here, call miPointerSetPosition() and then + * scale back into device coordinates (if needed). miPSP will change x/y if + * the screen was crossed. + * + * The coordinates provided are always absolute. The parameter mode + * specifies whether it was relative or absolute movement that landed us at + * those coordinates. see fill_pointer_events for information on coordinate + * systems. + * + * @param dev The device to be moved. + * @param mode Movement mode (Absolute or Relative) + * @param[out] mask Mask of axis values for this event, returns the + * per-screen device coordinates after confinement + * @param[in,out] devx x desktop-wide coordinate in device coordinate system + * @param[in,out] devy y desktop-wide coordinate in device coordinate system + * @param[in,out] screenx x coordinate in desktop coordinate system + * @param[in,out] screeny y coordinate in desktop coordinate system + * @param[out] nevents Number of barrier events added to events + * @param[in,out] events List of events barrier events are added to + */ +static ScreenPtr +positionSprite(DeviceIntPtr dev, int mode, ValuatorMask *mask, + double *devx, double *devy, double *screenx, double *screeny, + int *nevents, InternalEvent* events) +{ + ScreenPtr scr = miPointerGetScreen(dev); + double tmpx, tmpy; + + if (!dev->valuator || dev->valuator->numAxes < 2) + return scr; + + tmpx = *screenx; + tmpy = *screeny; + + /* miPointerSetPosition takes care of crossing screens for us, as well as + * clipping to the current screen. Coordinates returned are in desktop + * coord system */ + scr = miPointerSetPosition(dev, mode, screenx, screeny, nevents, events); + + /* If we were constrained, rescale x/y from the screen coordinates so + * the device valuators reflect the correct position. For screen + * crossing this doesn't matter much, the coords would be 0 or max. + */ + if (tmpx != *screenx) + *devx = rescaleValuatorAxis(*screenx, NULL, dev->valuator->axes + 0, + screenInfo.x, screenInfo.width); + + if (tmpy != *screeny) + *devy = rescaleValuatorAxis(*screeny, NULL, dev->valuator->axes + 1, + screenInfo.y, screenInfo.height); + + /* Recalculate the per-screen device coordinates */ + if (valuator_mask_isset(mask, 0)) { + double x; + + x = rescaleValuatorAxis(*screenx - scr->x, NULL, + dev->valuator->axes + 0, 0, scr->width); + valuator_mask_set_double(mask, 0, x); + } + if (valuator_mask_isset(mask, 1)) { + double y; + + y = rescaleValuatorAxis(*screeny - scr->y, NULL, + dev->valuator->axes + 1, 0, scr->height); + valuator_mask_set_double(mask, 1, y); + } + + return scr; +} + +/** + * Update the motion history for the device and (if appropriate) for its + * master device. + * @param dev Slave device to update. + * @param mask Bit mask of valid valuators to append to history. + * @param num Total number of valuators to append to history. + * @param ms Current time + */ +static void +updateHistory(DeviceIntPtr dev, ValuatorMask *mask, CARD32 ms) +{ + if (!dev->valuator) + return; + + updateMotionHistory(dev, ms, mask, dev->last.valuators); + if (!IsMaster(dev) && !IsFloating(dev)) { + DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); + + updateMotionHistory(master, ms, mask, dev->last.valuators); + } +} + +static void +queueEventList(DeviceIntPtr device, InternalEvent *events, int nevents) +{ + int i; + + for (i = 0; i < nevents; i++) + mieqEnqueue(device, &events[i]); +} + +static void +event_set_root_coordinates(DeviceEvent *event, double x, double y) +{ + event->root_x = trunc(x); + event->root_y = trunc(y); + event->root_x_frac = x - trunc(x); + event->root_y_frac = y - trunc(y); +} + +/** + * Generate internal events representing this keyboard event and enqueue + * them on the event queue. + * + * This function is not reentrant. Disable signals before calling. + * + * FIXME: flags for relative/abs motion? + * + * @param device The device to generate the event for + * @param type Event type, one of KeyPress or KeyRelease + * @param keycode Key code of the pressed/released key + * @param mask Valuator mask for valuators present for this event. + * + */ +void +QueueKeyboardEvents(DeviceIntPtr device, int type, + int keycode, const ValuatorMask *mask) +{ + int nevents; + + nevents = GetKeyboardEvents(InputEventList, device, type, keycode, mask); + queueEventList(device, InputEventList, nevents); +} + +/** + * Returns a set of InternalEvents for KeyPress/KeyRelease, optionally + * also with valuator events. + * + * The DDX is responsible for allocating the event list in the first + * place via InitEventList(), and for freeing it. + * + * @return the number of events written into events. + */ +int +GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, + int key_code, const ValuatorMask *mask_in) +{ + int num_events = 0; + CARD32 ms = 0; + DeviceEvent *event; + RawDeviceEvent *raw; + ValuatorMask mask; + +#if XSERVER_DTRACE + if (XSERVER_INPUT_EVENT_ENABLED()) { + XSERVER_INPUT_EVENT(pDev->id, type, key_code, 0, + mask_in ? mask_in->last_bit + 1 : 0, + mask_in ? mask_in->mask : NULL, + mask_in ? mask_in->valuators : NULL); + } +#endif + + /* refuse events from disabled devices */ + if (!pDev->enabled) + return 0; + + if (!events || !pDev->key || !pDev->focus || !pDev->kbdfeed || + (type != KeyPress && type != KeyRelease) || + (key_code < 8 || key_code > 255)) + return 0; + + if (mask_in && valuator_mask_size(mask_in) > 1) { + ErrorF("[dix] the server does not handle valuator masks with " + "keyboard events. This is a bug. You may fix it.\n"); + } + + num_events = 1; + + events = + UpdateFromMaster(events, pDev, DEVCHANGE_KEYBOARD_EVENT, &num_events); + + /* Handle core repeating, via press/release/press/release. */ + if (type == KeyPress && key_is_down(pDev, key_code, KEY_POSTED)) { + /* If autorepeating is disabled either globally or just for that key, + * or we have a modifier, don't generate a repeat event. */ + if (!pDev->kbdfeed->ctrl.autoRepeat || + !key_autorepeats(pDev, key_code) || + pDev->key->xkbInfo->desc->map->modmap[key_code]) + return 0; + } + + ms = GetTimeInMillis(); + + raw = &events->raw_event; + events++; + num_events++; + + valuator_mask_copy(&mask, mask_in); + + init_raw(pDev, raw, ms, type, key_code); + set_raw_valuators(raw, &mask, raw->valuators.data_raw); + + clipValuators(pDev, &mask); + + set_raw_valuators(raw, &mask, raw->valuators.data); + + event = &events->device_event; + init_device_event(event, pDev, ms); + event->detail.key = key_code; + + if (type == KeyPress) { + event->type = ET_KeyPress; + set_key_down(pDev, key_code, KEY_POSTED); + } + else if (type == KeyRelease) { + event->type = ET_KeyRelease; + set_key_up(pDev, key_code, KEY_POSTED); + } + + clipValuators(pDev, &mask); + + set_valuators(pDev, event, &mask); + + if (!IsFloating(pDev)) { + DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); + + event_set_root_coordinates(event, + master->last.valuators[0], + master->last.valuators[1]); + } + + return num_events; +} + +/** + * Initialize an event array large enough for num_events arrays. + * This event list is to be passed into GetPointerEvents() and + * GetKeyboardEvents(). + * + * @param num_events Number of elements in list. + */ +InternalEvent * +InitEventList(int num_events) +{ + InternalEvent *events = calloc(num_events, sizeof(InternalEvent)); + + return events; +} + +/** + * Free an event list. + * + * @param list The list to be freed. + * @param num_events Number of elements in list. + */ +void +FreeEventList(InternalEvent *list, int num_events) +{ + free(list); +} + +/** + * Transform vector x/y according to matrix m and drop the rounded coords + * back into x/y. + */ +static void +transform(struct pixman_f_transform *m, double *x, double *y) +{ + struct pixman_f_vector p = {.v = {*x, *y, 1} }; + pixman_f_transform_point(m, &p); + + *x = p.v[0]; + *y = p.v[1]; +} + +static void +transformRelative(DeviceIntPtr dev, ValuatorMask *mask) +{ + double x = 0, y = 0; + + valuator_mask_fetch_double(mask, 0, &x); + valuator_mask_fetch_double(mask, 1, &y); + + transform(&dev->relative_transform, &x, &y); + + if (x) + valuator_mask_set_double(mask, 0, x); + else + valuator_mask_unset(mask, 0); + + if (y) + valuator_mask_set_double(mask, 1, y); + else + valuator_mask_unset(mask, 1); +} + +/** + * Apply the device's transformation matrix to the valuator mask and replace + * the scaled values in mask. This transformation only applies to valuators + * 0 and 1, others will be untouched. + * + * @param dev The device the valuators came from + * @param[in,out] mask The valuator mask. + */ +static void +transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask) +{ + double x, y, ox, oy; + int has_x, has_y; + + has_x = valuator_mask_fetch_double(mask, 0, &ox); + has_y = valuator_mask_fetch_double(mask, 1, &oy); + + if (!has_x && !has_y) + return; + + if (!has_x || !has_y) { + struct pixman_f_transform invert; + + /* undo transformation from last event */ + ox = dev->last.valuators[0]; + oy = dev->last.valuators[1]; + + pixman_f_transform_invert(&invert, &dev->scale_and_transform); + transform(&invert, &ox, &oy); + + x = ox; + y = oy; + } + + if (valuator_mask_isset(mask, 0)) + ox = x = valuator_mask_get_double(mask, 0); + + if (valuator_mask_isset(mask, 1)) + oy = y = valuator_mask_get_double(mask, 1); + + transform(&dev->scale_and_transform, &x, &y); + + if (valuator_mask_isset(mask, 0) || ox != x) + valuator_mask_set_double(mask, 0, x); + + if (valuator_mask_isset(mask, 1) || oy != y) + valuator_mask_set_double(mask, 1, y); +} + +static void +storeLastValuators(DeviceIntPtr dev, ValuatorMask *mask, + int xaxis, int yaxis, double devx, double devy) +{ + int i; + + /* store desktop-wide in last.valuators */ + if (valuator_mask_isset(mask, xaxis)) + dev->last.valuators[0] = devx; + if (valuator_mask_isset(mask, yaxis)) + dev->last.valuators[1] = devy; + + for (i = 0; i < valuator_mask_size(mask); i++) { + if (i == xaxis || i == yaxis) + continue; + + if (valuator_mask_isset(mask, i)) + dev->last.valuators[i] = valuator_mask_get_double(mask, i); + } + +} + +/** + * Generate internal events representing this pointer event and enqueue them + * on the event queue. + * + * This function is not reentrant. Disable signals before calling. + * + * @param device The device to generate the event for + * @param type Event type, one of ButtonPress, ButtonRelease, MotionNotify + * @param buttons Button number of the buttons modified. Must be 0 for + * MotionNotify + * @param flags Event modification flags + * @param mask Valuator mask for valuators present for this event. + */ +void +QueuePointerEvents(DeviceIntPtr device, int type, + int buttons, int flags, const ValuatorMask *mask) +{ + int nevents; + + nevents = + GetPointerEvents(InputEventList, device, type, buttons, flags, mask); + queueEventList(device, InputEventList, nevents); +} + +/** + * Helper function for GetPointerEvents, which only generates motion and + * raw motion events for the slave device: does not update the master device. + * + * Should not be called by anyone other than GetPointerEvents. + * + * We use several different coordinate systems and need to switch between + * the three in fill_pointer_events, positionSprite and + * miPointerSetPosition. "desktop" refers to the width/height of all + * screenInfo.screens[n]->width/height added up. "screen" is ScreenRec, not + * output. + * + * Coordinate systems: + * - relative events have a mask_in in relative coordinates, mapped to + * pixels. These events are mapped to the current position±delta. + * - absolute events have a mask_in in absolute device coordinates in + * device-specific range. This range is mapped to the desktop. + * - POINTER_SCREEN absolute events (x86WarpCursor) are in screen-relative + * screen coordinate range. + * - rootx/rooty in events must be be relative to the current screen's + * origin (screen coordinate system) + * - XI2 valuators must be relative to the current screen's origin. On + * the protocol the device min/max range maps to the current screen. + * + * For screen switching we need to get the desktop coordinates for each + * event, then map that to the respective position on each screen and + * position the cursor there. + * The device's last.valuator[] stores the last position in desktop-wide + * coordinates (in device range for slave devices, desktop range for master + * devices). + * + * screen-relative device coordinates requires scaling: A device coordinate + * x/y of range [n..m] that maps to positions Sx/Sy on Screen S must be + * rescaled to match Sx/Sy for [n..m]. In the simplest example, x of (m/2-1) + * is the last coordinate on the first screen and must be rescaled for the + * event to be m. XI2 clients that do their own coordinate mapping would + * otherwise interpret the position of the device elsewere to the cursor. + * However, this scaling leads to losses: + * if we have two ScreenRecs we scale from e.g. [0..44704] (Wacom I4) to + * [0..2048[. that gives us 2047.954 as desktop coord, or the per-screen + * coordinate 1023.954. Scaling that back into the device coordinate range + * gives us 44703. So off by one device unit. It's a bug, but we'll have to + * live with it because with all this scaling, we just cannot win. + * + * @return the number of events written into events. + */ +static int +fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, + int buttons, CARD32 ms, int flags, + const ValuatorMask *mask_in) +{ + int num_events = 1; + DeviceEvent *event; + RawDeviceEvent *raw; + double screenx = 0.0, screeny = 0.0; /* desktop coordinate system */ + double devx = 0.0, devy = 0.0; /* desktop-wide in device coords */ + int sx, sy; /* for POINTER_SCREEN */ + ValuatorMask mask; + ScreenPtr scr; + int num_barrier_events = 0; + + switch (type) { + case MotionNotify: + if (!pDev->valuator) { + ErrorF("[dix] motion events from device %d without valuators\n", + pDev->id); + return 0; + } + if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) + return 0; + break; + case ButtonPress: + case ButtonRelease: + if (!pDev->button || !buttons) + return 0; + if (mask_in && valuator_mask_size(mask_in) > 0 && !pDev->valuator) { + ErrorF + ("[dix] button event with valuator from device %d without valuators\n", + pDev->id); + return 0; + } + break; + default: + return 0; + } + + valuator_mask_copy(&mask, mask_in); + + if ((flags & POINTER_NORAW) == 0) { + raw = &events->raw_event; + events++; + num_events++; + + init_raw(pDev, raw, ms, type, buttons); + set_raw_valuators(raw, &mask, raw->valuators.data_raw); + } + + /* valuators are in driver-native format (rel or abs) */ + + if (flags & POINTER_ABSOLUTE) { + if (flags & (POINTER_SCREEN | POINTER_DESKTOP)) { /* valuators are in screen/desktop coords */ + sx = valuator_mask_get(&mask, 0); + sy = valuator_mask_get(&mask, 1); + scale_from_screen(pDev, &mask, flags); + } + + transformAbsolute(pDev, &mask); + clipAbsolute(pDev, &mask); + if ((flags & POINTER_NORAW) == 0) + set_raw_valuators(raw, &mask, raw->valuators.data); + } + else { + transformRelative(pDev, &mask); + + if (flags & POINTER_ACCELERATE) + accelPointer(pDev, &mask, ms); + if ((flags & POINTER_NORAW) == 0) + set_raw_valuators(raw, &mask, raw->valuators.data); + + moveRelative(pDev, flags, &mask); + } + + /* valuators are in device coordinate system in absolute coordinates */ + scale_to_desktop(pDev, &mask, &devx, &devy, &screenx, &screeny); + + /* #53037 XWarpPointer's scaling back and forth between screen and + device may leave us with rounding errors. End result is that the + pointer doesn't end up on the pixel it should. + Avoid this by forcing screenx/screeny back to what the input + coordinates were. + */ + if (flags & POINTER_SCREEN) { + scr = miPointerGetScreen(pDev); + screenx = sx + scr->x; + screeny = sy + scr->y; + } + + scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative, + &mask, &devx, &devy, &screenx, &screeny, + &num_barrier_events, events); + num_events += num_barrier_events; + events += num_barrier_events; + + /* screenx, screeny are in desktop coordinates, + mask is in device coordinates per-screen (the event data) + devx/devy is in device coordinate desktop-wide */ + updateHistory(pDev, &mask, ms); + + clipValuators(pDev, &mask); + + storeLastValuators(pDev, &mask, 0, 1, devx, devy); + + /* Update the MD's co-ordinates, which are always in desktop space. */ + if (!IsMaster(pDev) && !IsFloating(pDev)) { + DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); + + master->last.valuators[0] = screenx; + master->last.valuators[1] = screeny; + } + + event = &events->device_event; + init_device_event(event, pDev, ms); + + if (type == MotionNotify) { + event->type = ET_Motion; + event->detail.button = 0; + } + else { + if (type == ButtonPress) { + event->type = ET_ButtonPress; + set_button_down(pDev, buttons, BUTTON_POSTED); + } + else if (type == ButtonRelease) { + event->type = ET_ButtonRelease; + set_button_up(pDev, buttons, BUTTON_POSTED); + } + event->detail.button = buttons; + } + + /* root_x and root_y must be in per-screen co-ordinates */ + event_set_root_coordinates(event, screenx - scr->x, screeny - scr->y); + + if (flags & POINTER_EMULATED) { + raw->flags = XIPointerEmulated; + event->flags = XIPointerEmulated; + } + + set_valuators(pDev, event, &mask); + + return num_events; +} + +/** + * Generate events for each scroll axis that changed between before/after + * for the device. + * + * @param events The pointer to the event list to fill the events + * @param dev The device to generate the events for + * @param type The real type of the event + * @param axis The axis number to generate events for + * @param mask State before this event in absolute coords + * @param[in,out] last Last scroll state posted in absolute coords (modified + * in-place) + * @param ms Current time in ms + * @param max_events Max number of events to be generated + * @return The number of events generated + */ +static int +emulate_scroll_button_events(InternalEvent *events, + DeviceIntPtr dev, + int type, + int axis, + const ValuatorMask *mask, + ValuatorMask *last, CARD32 ms, int max_events) +{ + AxisInfoPtr ax; + double delta; + double incr; + int num_events = 0; + double total; + int b; + int flags = 0; + + if (dev->valuator->axes[axis].scroll.type == SCROLL_TYPE_NONE) + return 0; + + if (!valuator_mask_isset(mask, axis)) + return 0; + + ax = &dev->valuator->axes[axis]; + incr = ax->scroll.increment; + + if (type != ButtonPress && type != ButtonRelease) + flags |= POINTER_EMULATED; + + if (!valuator_mask_isset(last, axis)) + valuator_mask_set_double(last, axis, 0); + + delta = + valuator_mask_get_double(mask, axis) - valuator_mask_get_double(last, + axis); + total = delta; + b = (ax->scroll.type == SCROLL_TYPE_VERTICAL) ? 5 : 7; + + if ((incr > 0 && delta < 0) || (incr < 0 && delta > 0)) + b--; /* we're scrolling up or left → button 4 or 6 */ + + while (fabs(delta) >= fabs(incr)) { + int nev_tmp; + + if (delta > 0) + delta -= fabs(incr); + else if (delta < 0) + delta += fabs(incr); + + /* fill_pointer_events() generates four events: one normal and one raw + * event for button press and button release. + * We may get a bigger scroll delta than we can generate events + * for. In that case, we keep decreasing delta, but skip events. + */ + if (num_events + 4 < max_events) { + if (type != ButtonRelease) { + nev_tmp = fill_pointer_events(events, dev, ButtonPress, b, ms, + flags, NULL); + events += nev_tmp; + num_events += nev_tmp; + } + if (type != ButtonPress) { + nev_tmp = fill_pointer_events(events, dev, ButtonRelease, b, ms, + flags, NULL); + events += nev_tmp; + num_events += nev_tmp; + } + } + } + + /* We emulated, update last.scroll */ + if (total != delta) { + total -= delta; + valuator_mask_set_double(last, axis, + valuator_mask_get_double(last, axis) + total); + } + + return num_events; +} + + +/** + * Generate a complete series of InternalEvents (filled into the EventList) + * representing pointer motion, or button presses. If the device is a slave + * device, also potentially generate a DeviceClassesChangedEvent to update + * the master device. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via InitEventList() and GetMaximumEventsNum(), and for freeing it. + * + * In the generated events rootX/Y will be in absolute screen coords and + * the valuator information in the absolute or relative device coords. + * + * last.valuators[x] of the device is always in absolute device coords. + * last.valuators[x] of the master device is in absolute screen coords. + * + * master->last.valuators[x] for x > 2 is undefined. + */ +int +GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, + int buttons, int flags, const ValuatorMask *mask_in) +{ + CARD32 ms = GetTimeInMillis(); + int num_events = 0, nev_tmp; + ValuatorMask mask; + ValuatorMask scroll; + int i; + int realtype = type; + +#if XSERVER_DTRACE + if (XSERVER_INPUT_EVENT_ENABLED()) { + XSERVER_INPUT_EVENT(pDev->id, type, buttons, flags, + mask_in ? mask_in->last_bit + 1 : 0, + mask_in ? mask_in->mask : NULL, + mask_in ? mask_in->valuators : NULL); + } +#endif + + BUG_RETURN_VAL(buttons >= MAX_BUTTONS, 0); + + /* refuse events from disabled devices */ + if (!pDev->enabled) + return 0; + + if (!miPointerGetScreen(pDev)) + return 0; + + events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, + &num_events); + + valuator_mask_copy(&mask, mask_in); + + /* Turn a scroll button press into a smooth-scrolling event if + * necessary. This only needs to cater for the XIScrollFlagPreferred + * axis (if more than one scrolling axis is present) */ + if (type == ButtonPress) { + double adj; + int axis; + int h_scroll_axis = -1; + int v_scroll_axis = -1; + + if (pDev->valuator) { + h_scroll_axis = pDev->valuator->h_scroll_axis; + v_scroll_axis = pDev->valuator->v_scroll_axis; + } + + /* Up is negative on valuators, down positive */ + switch (buttons) { + case 4: + adj = -1.0; + axis = v_scroll_axis; + break; + case 5: + adj = 1.0; + axis = v_scroll_axis; + break; + case 6: + adj = -1.0; + axis = h_scroll_axis; + break; + case 7: + adj = 1.0; + axis = h_scroll_axis; + break; + default: + adj = 0.0; + axis = -1; + break; + } + + if (adj != 0.0 && axis != -1) { + adj *= pDev->valuator->axes[axis].scroll.increment; + if (!valuator_mask_isset(&mask, axis)) + valuator_mask_set(&mask, axis, 0); + add_to_scroll_valuator(pDev, &mask, axis, adj); + type = MotionNotify; + buttons = 0; + flags |= POINTER_EMULATED; + } + } + + /* First fill out the original event set, with smooth-scrolling axes. */ + nev_tmp = fill_pointer_events(events, pDev, type, buttons, ms, flags, + &mask); + events += nev_tmp; + num_events += nev_tmp; + + valuator_mask_zero(&scroll); + + /* Now turn the smooth-scrolling axes back into emulated button presses + * for legacy clients, based on the integer delta between before and now */ + for (i = 0; i < valuator_mask_size(&mask); i++) { + if ( !pDev->valuator || (i >= pDev->valuator->numAxes)) + break; + + if (!valuator_mask_isset(&mask, i)) + continue; + + valuator_mask_set_double(&scroll, i, pDev->last.valuators[i]); + + nev_tmp = + emulate_scroll_button_events(events, pDev, realtype, i, &scroll, + pDev->last.scroll, ms, + GetMaximumEventsNum() - num_events); + events += nev_tmp; + num_events += nev_tmp; + } + + return num_events; +} + +/** + * Generate internal events representing this proximity event and enqueue + * them on the event queue. + * + * This function is not reentrant. Disable signals before calling. + * + * @param device The device to generate the event for + * @param type Event type, one of ProximityIn or ProximityOut + * @param keycode Key code of the pressed/released key + * @param mask Valuator mask for valuators present for this event. + * + */ +void +QueueProximityEvents(DeviceIntPtr device, int type, const ValuatorMask *mask) +{ + int nevents; + + nevents = GetProximityEvents(InputEventList, device, type, mask); + queueEventList(device, InputEventList, nevents); +} + +/** + * Generate ProximityIn/ProximityOut InternalEvents, accompanied by + * valuators. + * + * The DDX is responsible for allocating the events in the first place via + * InitEventList(), and for freeing it. + * + * @return the number of events written into events. + */ +int +GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, + const ValuatorMask *mask_in) +{ + int num_events = 1, i; + DeviceEvent *event; + ValuatorMask mask; + +#if XSERVER_DTRACE + if (XSERVER_INPUT_EVENT_ENABLED()) { + XSERVER_INPUT_EVENT(pDev->id, type, 0, 0, + mask_in ? mask_in->last_bit + 1 : 0, + mask_in ? mask_in->mask : NULL, + mask_in ? mask_in->valuators : NULL); + } +#endif + + /* refuse events from disabled devices */ + if (!pDev->enabled) + return 0; + + /* Sanity checks. */ + if ((type != ProximityIn && type != ProximityOut) || !mask_in) + return 0; + if (!pDev->valuator || !pDev->proximity) + return 0; + + valuator_mask_copy(&mask, mask_in); + + /* ignore relative axes for proximity. */ + for (i = 0; i < valuator_mask_size(&mask); i++) { + if (valuator_mask_isset(&mask, i) && + valuator_get_mode(pDev, i) == Relative) + valuator_mask_unset(&mask, i); + } + + /* FIXME: posting proximity events with relative valuators only results + * in an empty event, EventToXI() will fail to convert → no event sent + * to client. */ + + events = + UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); + + event = &events->device_event; + init_device_event(event, pDev, GetTimeInMillis()); + event->type = (type == ProximityIn) ? ET_ProximityIn : ET_ProximityOut; + + clipValuators(pDev, &mask); + + set_valuators(pDev, event, &mask); + + return num_events; +} + +int +GetTouchOwnershipEvents(InternalEvent *events, DeviceIntPtr pDev, + TouchPointInfoPtr ti, uint8_t reason, XID resource, + uint32_t flags) +{ + TouchClassPtr t = pDev->touch; + TouchOwnershipEvent *event; + CARD32 ms = GetTimeInMillis(); + + if (!pDev->enabled || !t || !ti) + return 0; + + event = &events->touch_ownership_event; + init_touch_ownership(pDev, event, ms); + + event->touchid = ti->client_id; + event->sourceid = ti->sourceid; + event->resource = resource; + event->flags = flags; + event->reason = reason; + + return 1; +} + +/** + * Generate internal events representing this touch event and enqueue them + * on the event queue. + * + * This function is not reentrant. Disable signals before calling. + * + * @param device The device to generate the event for + * @param type Event type, one of XI_TouchBegin, XI_TouchUpdate, XI_TouchEnd + * @param touchid Touch point ID + * @param flags Event modification flags + * @param mask Valuator mask for valuators present for this event. + */ +void +QueueTouchEvents(DeviceIntPtr device, int type, + uint32_t ddx_touchid, int flags, const ValuatorMask *mask) +{ + int nevents; + + nevents = + GetTouchEvents(InputEventList, device, ddx_touchid, type, flags, mask); + queueEventList(device, InputEventList, nevents); +} + +/** + * Get events for a touch. Generates a TouchBegin event if end is not set and + * the touch id is not active. Generates a TouchUpdate event if end is not set + * and the touch id is active. Generates a TouchEnd event if end is set and the + * touch id is active. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via GetMaximumEventsNum(), and for freeing it. + * + * @param[out] events The list of events generated + * @param dev The device to generate the events for + * @param ddx_touchid The touch ID as assigned by the DDX + * @param type XI_TouchBegin, XI_TouchUpdate or XI_TouchEnd + * @param flags Event flags + * @param mask_in Valuator information for this event + */ +int +GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid, + uint16_t type, uint32_t flags, const ValuatorMask *mask_in) +{ + ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen; + TouchClassPtr t = dev->touch; + ValuatorClassPtr v = dev->valuator; + DeviceEvent *event; + CARD32 ms = GetTimeInMillis(); + ValuatorMask mask; + double screenx = 0.0, screeny = 0.0; /* desktop coordinate system */ + double devx = 0.0, devy = 0.0; /* desktop-wide in device coords */ + int i; + int num_events = 0; + RawDeviceEvent *raw; + DDXTouchPointInfoPtr ti; + int need_rawevent = TRUE; + Bool emulate_pointer = FALSE; + int client_id = 0; + +#if XSERVER_DTRACE + if (XSERVER_INPUT_EVENT_ENABLED()) { + XSERVER_INPUT_EVENT(dev->id, type, ddx_touchid, flags, + mask_in ? mask_in->last_bit + 1 : 0, + mask_in ? mask_in->mask : NULL, + mask_in ? mask_in->valuators : NULL); + } +#endif + + if (!dev->enabled || !t || !v) + return 0; + + /* Find and/or create the DDX touch info */ + + ti = TouchFindByDDXID(dev, ddx_touchid, (type == XI_TouchBegin)); + if (!ti) { + ErrorFSigSafe("[dix] %s: unable to %s touch point %u\n", dev->name, + type == XI_TouchBegin ? "begin" : "find", ddx_touchid); + return 0; + } + client_id = ti->client_id; + + emulate_pointer = ti->emulate_pointer; + + if (!IsMaster(dev)) + events = + UpdateFromMaster(events, dev, DEVCHANGE_POINTER_EVENT, &num_events); + + valuator_mask_copy(&mask, mask_in); + + if (need_rawevent) { + raw = &events->raw_event; + events++; + num_events++; + init_raw(dev, raw, ms, type, client_id); + set_raw_valuators(raw, &mask, raw->valuators.data_raw); + } + + event = &events->device_event; + num_events++; + + init_device_event(event, dev, ms); + + switch (type) { + case XI_TouchBegin: + event->type = ET_TouchBegin; + /* If we're starting a touch, we must have x & y co-ordinates. */ + if (!mask_in || + !valuator_mask_isset(mask_in, 0) || + !valuator_mask_isset(mask_in, 1)) { + ErrorFSigSafe("%s: Attempted to start touch without x/y " + "(driver bug)\n", dev->name); + return 0; + } + break; + case XI_TouchUpdate: + event->type = ET_TouchUpdate; + if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) { + ErrorFSigSafe("%s: TouchUpdate with no valuators? Driver bug\n", + dev->name); + } + break; + case XI_TouchEnd: + event->type = ET_TouchEnd; + /* We can end the DDX touch here, since we don't use the active + * field below */ + TouchEndDDXTouch(dev, ti); + break; + default: + return 0; + } + + /* Get our screen event co-ordinates (root_x/root_y/event_x/event_y): + * these come from the touchpoint in Absolute mode, or the sprite in + * Relative. */ + if (t->mode == XIDirectTouch) { + for (i = 0; i < max(valuator_mask_size(&mask), 2); i++) { + double val; + + if (valuator_mask_fetch_double(&mask, i, &val)) + valuator_mask_set_double(ti->valuators, i, val); + /* If the device doesn't post new X and Y axis values, + * use the last values posted. + */ + else if (i < 2 && + valuator_mask_fetch_double(ti->valuators, i, &val)) + valuator_mask_set_double(&mask, i, val); + } + + transformAbsolute(dev, &mask); + clipAbsolute(dev, &mask); + } + else { + screenx = dev->spriteInfo->sprite->hotPhys.x; + screeny = dev->spriteInfo->sprite->hotPhys.y; + } + if (need_rawevent) + set_raw_valuators(raw, &mask, raw->valuators.data); + + /* Indirect device touch coordinates are not used for cursor positioning. + * They are merely informational, and are provided in device coordinates. + * The device sprite is used for positioning instead, and it is already + * scaled. */ + if (t->mode == XIDirectTouch) + scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny); + if (emulate_pointer) + scr = positionSprite(dev, Absolute, &mask, + &devx, &devy, &screenx, &screeny, NULL, NULL); + + /* see fill_pointer_events for coordinate systems */ + if (emulate_pointer) + updateHistory(dev, &mask, ms); + + clipValuators(dev, &mask); + + if (emulate_pointer) + storeLastValuators(dev, &mask, 0, 1, devx, devy); + + /* Update the MD's co-ordinates, which are always in desktop space. */ + if (emulate_pointer && !IsMaster(dev) && !IsFloating(dev)) { + DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); + + master->last.valuators[0] = screenx; + master->last.valuators[1] = screeny; + } + + event->root = scr->root->drawable.id; + + event_set_root_coordinates(event, screenx, screeny); + event->touchid = client_id; + event->flags = flags; + + if (emulate_pointer) { + event->flags |= TOUCH_POINTER_EMULATED; + event->detail.button = 1; + } + + set_valuators(dev, event, &mask); + for (i = 0; i < v->numAxes; i++) { + if (valuator_mask_isset(&mask, i)) + v->axisVal[i] = valuator_mask_get(&mask, i); + } + + return num_events; +} + +void +GetDixTouchEnd(InternalEvent *ievent, DeviceIntPtr dev, TouchPointInfoPtr ti, + uint32_t flags) +{ + ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen; + DeviceEvent *event = &ievent->device_event; + CARD32 ms = GetTimeInMillis(); + + BUG_WARN(!dev->enabled); + + init_device_event(event, dev, ms); + + event->sourceid = ti->sourceid; + event->type = ET_TouchEnd; + + event->root = scr->root->drawable.id; + + /* Get screen event coordinates from the sprite. Is this really the best + * we can do? */ + event_set_root_coordinates(event, + dev->last.valuators[0], + dev->last.valuators[1]); + event->touchid = ti->client_id; + event->flags = flags; + + if (flags & TOUCH_POINTER_EMULATED) { + event->flags |= TOUCH_POINTER_EMULATED; + event->detail.button = 1; + } +} + +/** + * Synthesize a single motion event for the core pointer. + * + * Used in cursor functions, e.g. when cursor confinement changes, and we need + * to shift the pointer to get it inside the new bounds. + */ +void +PostSyntheticMotion(DeviceIntPtr pDev, + int x, int y, int screen, unsigned long time) +{ + DeviceEvent ev; + +#ifdef PANORAMIX + /* Translate back to the sprite screen since processInputProc + will translate from sprite screen to screen 0 upon reentry + to the DIX layer. */ + if (!noPanoramiXExtension) { + x += screenInfo.screens[0]->x - screenInfo.screens[screen]->x; + y += screenInfo.screens[0]->y - screenInfo.screens[screen]->y; + } +#endif + + memset(&ev, 0, sizeof(DeviceEvent)); + init_device_event(&ev, pDev, time); + ev.root_x = x; + ev.root_y = y; + ev.type = ET_Motion; + ev.time = time; + + /* FIXME: MD/SD considerations? */ + (*pDev->public.processInputProc) ((InternalEvent *) &ev, pDev); +} diff --git a/dix/globals.c b/dix/globals.c new file mode 100644 index 0000000..ad9145b --- /dev/null +++ b/dix/globals.c @@ -0,0 +1,133 @@ +/************************************************************ + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include "misc.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "input.h" +#include "dixfont.h" +#include "site.h" +#include "dixstruct.h" +#include "os.h" + +ScreenInfo screenInfo; + +KeybdCtrl defaultKeyboardControl = { + DEFAULT_KEYBOARD_CLICK, + DEFAULT_BELL, + DEFAULT_BELL_PITCH, + DEFAULT_BELL_DURATION, + DEFAULT_AUTOREPEAT, + DEFAULT_AUTOREPEATS, + DEFAULT_LEDS, + 0 +}; + +PtrCtrl defaultPointerControl = { + DEFAULT_PTR_NUMERATOR, + DEFAULT_PTR_DENOMINATOR, + DEFAULT_PTR_THRESHOLD, + 0 +}; + +ClientPtr clients[MAXCLIENTS]; +ClientPtr serverClient; +int currentMaxClients; /* current size of clients array */ +long maxBigRequestSize = MAX_BIG_REQUEST_SIZE; + +unsigned long globalSerialNumber = 0; +unsigned long serverGeneration = 0; + +/* these next four are initialized in main.c */ +CARD32 ScreenSaverTime; +CARD32 ScreenSaverInterval; +int ScreenSaverBlanking; +int ScreenSaverAllowExposures; + +#ifdef DPMSExtension +CARD16 DPMSPowerLevel = 0; +Bool DPMSDisabledSwitch = FALSE; +Bool DPMSCapableFlag = FALSE; +CARD32 DPMSStandbyTime; +CARD32 DPMSSuspendTime; +CARD32 DPMSOffTime; +Bool DPMSEnabled; +#endif + +CARD32 defaultScreenSaverTime = DEFAULT_SCREEN_SAVER_TIME; +CARD32 defaultScreenSaverInterval = DEFAULT_SCREEN_SAVER_INTERVAL; +int defaultScreenSaverBlanking = DEFAULT_SCREEN_SAVER_BLANKING; +int defaultScreenSaverAllowExposures = DEFAULT_SCREEN_SAVER_EXPOSURES; + +#ifdef SCREENSAVER +Bool screenSaverSuspended = FALSE; +#endif + +char *defaultFontPath = COMPILEDDEFAULTFONTPATH; +char *defaultTextFont = COMPILEDDEFAULTFONT; +char *defaultCursorFont = COMPILEDCURSORFONT; +FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in + every compilation of dix code */ +CursorPtr rootCursor; +Bool party_like_its_1989 = FALSE; +Bool whiteRoot = FALSE; + +TimeStamp currentTime; + +int defaultColorVisualClass = -1; +int monitorResolution = 0; + +char *display; +int displayfd; +char *ConnectionInfo; + +CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c new file mode 100644 index 0000000..9004cb1 --- /dev/null +++ b/dix/glyphcurs.c @@ -0,0 +1,181 @@ +/************************************************************************ + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +************************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "misc.h" +#include <X11/fonts/fontstruct.h> +#include "dixfontstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "resource.h" +#include "dix.h" +#include "cursorstr.h" +#include "opaque.h" +#include "servermd.h" + +/* + get the bits out of the font in a portable way. to avoid +dealing with padding and such-like, we draw the glyph into +a bitmap, then read the bits out with GetImage, which +uses server-natural format. + since all screens return the same bitmap format, we'll just use +the first one we find. + the character origin lines up with the hotspot in the +cursor metrics. +*/ + +int +ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, + unsigned char **ppbits) +{ + ScreenPtr pScreen; + GCPtr pGC; + xRectangle rect; + PixmapPtr ppix; + long nby; + char *pbits; + ChangeGCVal gcval[3]; + unsigned char char2b[2]; + + /* turn glyph index into a protocol-format char2b */ + char2b[0] = (unsigned char) (ch >> 8); + char2b[1] = (unsigned char) (ch & 0xff); + + pScreen = screenInfo.screens[0]; + nby = BitmapBytePad(cm->width) * (long) cm->height; + pbits = calloc(1, nby); + if (!pbits) + return BadAlloc; + + ppix = (PixmapPtr) (*pScreen->CreatePixmap) (pScreen, cm->width, + cm->height, 1, + CREATE_PIXMAP_USAGE_SCRATCH); + pGC = GetScratchGC(1, pScreen); + if (!ppix || !pGC) { + if (ppix) + (*pScreen->DestroyPixmap) (ppix); + if (pGC) + FreeScratchGC(pGC); + free(pbits); + return BadAlloc; + } + + rect.x = 0; + rect.y = 0; + rect.width = cm->width; + rect.height = cm->height; + + /* fill the pixmap with 0 */ + gcval[0].val = GXcopy; + gcval[1].val = 0; + gcval[2].ptr = (pointer) pfont; + ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, gcval); + ValidateGC((DrawablePtr) ppix, pGC); + (*pGC->ops->PolyFillRect) ((DrawablePtr) ppix, pGC, 1, &rect); + + /* draw the glyph */ + gcval[0].val = 1; + ChangeGC(NullClient, pGC, GCForeground, gcval); + ValidateGC((DrawablePtr) ppix, pGC); + (*pGC->ops->PolyText16) ((DrawablePtr) ppix, pGC, cm->xhot, cm->yhot, + 1, (unsigned short *) char2b); + (*pScreen->GetImage) ((DrawablePtr) ppix, 0, 0, cm->width, cm->height, + XYPixmap, 1, pbits); + *ppbits = (unsigned char *) pbits; + FreeScratchGC(pGC); + (*pScreen->DestroyPixmap) (ppix); + return Success; +} + +Bool +CursorMetricsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm) +{ + CharInfoPtr pci; + unsigned long nglyphs; + CARD8 chs[2]; + FontEncoding encoding; + + chs[0] = ch >> 8; + chs[1] = ch; + encoding = (FONTLASTROW(pfont) == 0) ? Linear16Bit : TwoD16Bit; + if (encoding == Linear16Bit) { + if (ch < pfont->info.firstCol || pfont->info.lastCol < ch) + return FALSE; + } + else { + if (chs[0] < pfont->info.firstRow || pfont->info.lastRow < chs[0]) + return FALSE; + if (chs[1] < pfont->info.firstCol || pfont->info.lastCol < chs[1]) + return FALSE; + } + (*pfont->get_glyphs) (pfont, 1, chs, encoding, &nglyphs, &pci); + if (nglyphs == 0) + return FALSE; + cm->width = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; + cm->height = pci->metrics.descent + pci->metrics.ascent; + if (pci->metrics.leftSideBearing > 0) { + cm->width += pci->metrics.leftSideBearing; + cm->xhot = 0; + } + else { + cm->xhot = -pci->metrics.leftSideBearing; + if (pci->metrics.rightSideBearing < 0) + cm->width -= pci->metrics.rightSideBearing; + } + if (pci->metrics.ascent < 0) { + cm->height -= pci->metrics.ascent; + cm->yhot = 0; + } + else { + cm->yhot = pci->metrics.ascent; + if (pci->metrics.descent < 0) + cm->height -= pci->metrics.descent; + } + return TRUE; +} diff --git a/dix/grabs.c b/dix/grabs.c new file mode 100644 index 0000000..a03897a --- /dev/null +++ b/dix/grabs.c @@ -0,0 +1,719 @@ +/* + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN action OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include "misc.h" +#include <X11/Xproto.h> +#include <X11/extensions/XI2.h> +#include "windowstr.h" +#include "inputstr.h" +#include "cursorstr.h" +#include "dixgrabs.h" +#include "xace.h" +#include "exevents.h" +#include "exglobals.h" +#include "inpututils.h" +#include "client.h" + +#define BITMASK(i) (((Mask)1) << ((i) & 31)) +#define MASKIDX(i) ((i) >> 5) +#define MASKWORD(buf, i) buf[MASKIDX(i)] +#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) +#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) +#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) + +void +PrintDeviceGrabInfo(DeviceIntPtr dev) +{ + ClientPtr client; + LocalClientCredRec *lcc; + int i, j; + GrabInfoPtr devGrab = &dev->deviceGrab; + GrabPtr grab = devGrab->grab; + Bool clientIdPrinted = FALSE; + + ErrorF("Active grab 0x%lx (%s) on device '%s' (%d):\n", + (unsigned long) grab->resource, + (grab->grabtype == XI2) ? "xi2" : + ((grab->grabtype == CORE) ? "core" : "xi1"), dev->name, dev->id); + + client = clients[CLIENT_ID(grab->resource)]; + if (client) { + pid_t clientpid = GetClientPid(client); + const char *cmdname = GetClientCmdName(client); + const char *cmdargs = GetClientCmdArgs(client); + + if ((clientpid > 0) && (cmdname != NULL)) { + ErrorF(" client pid %ld %s %s\n", + (long) clientpid, cmdname, cmdargs ? cmdargs : ""); + clientIdPrinted = TRUE; + } + else if (GetLocalClientCreds(client, &lcc) != -1) { + ErrorF(" client pid %ld uid %ld gid %ld\n", + (lcc->fieldsSet & LCC_PID_SET) ? (long) lcc->pid : 0, + (lcc->fieldsSet & LCC_UID_SET) ? (long) lcc->euid : 0, + (lcc->fieldsSet & LCC_GID_SET) ? (long) lcc->egid : 0); + FreeLocalClientCreds(lcc); + clientIdPrinted = TRUE; + } + } + if (!clientIdPrinted) { + ErrorF(" (no client information available for client %d)\n", + CLIENT_ID(grab->resource)); + } + + /* XXX is this even correct? */ + if (devGrab->sync.other) + ErrorF(" grab ID 0x%lx from paired device\n", + (unsigned long) devGrab->sync.other->resource); + + ErrorF(" at %ld (from %s grab)%s (device %s, state %d)\n", + (unsigned long) devGrab->grabTime.milliseconds, + devGrab->fromPassiveGrab ? "passive" : "active", + devGrab->implicitGrab ? " (implicit)" : "", + devGrab->sync.frozen ? "frozen" : "thawed", devGrab->sync.state); + + if (grab->grabtype == CORE) { + ErrorF(" core event mask 0x%lx\n", + (unsigned long) grab->eventMask); + } + else if (grab->grabtype == XI) { + ErrorF(" xi1 event mask 0x%lx\n", + devGrab->implicitGrab ? (unsigned long) grab->deviceMask : + (unsigned long) grab->eventMask); + } + else if (grab->grabtype == XI2) { + for (i = 0; i < xi2mask_num_masks(grab->xi2mask); i++) { + const unsigned char *mask; + int print; + + print = 0; + for (j = 0; j < XI2MASKSIZE; j++) { + mask = xi2mask_get_one_mask(grab->xi2mask, i); + if (mask[j]) { + print = 1; + break; + } + } + if (!print) + continue; + ErrorF(" xi2 event mask for device %d: 0x", dev->id); + for (j = 0; j < xi2mask_mask_size(grab->xi2mask); j++) + ErrorF("%x", mask[j]); + ErrorF("\n"); + } + } + + if (devGrab->fromPassiveGrab) { + ErrorF(" passive grab type %d, detail 0x%x, " + "activating key %d\n", grab->type, grab->detail.exact, + devGrab->activatingKey); + } + + ErrorF(" owner-events %s, kb %d ptr %d, confine %lx, cursor 0x%lx\n", + grab->ownerEvents ? "true" : "false", + grab->keyboardMode, grab->pointerMode, + grab->confineTo ? (unsigned long) grab->confineTo->drawable.id : 0, + grab->cursor ? (unsigned long) grab->cursor->id : 0); +} + +void +UngrabAllDevices(Bool kill_client) +{ + DeviceIntPtr dev; + ClientPtr client; + + ErrorF("Ungrabbing all devices%s; grabs listed below:\n", + kill_client ? " and killing their owners" : ""); + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (!dev->deviceGrab.grab) + continue; + PrintDeviceGrabInfo(dev); + client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)]; + if (!kill_client || !client || client->clientGone) + dev->deviceGrab.DeactivateGrab(dev); + if (kill_client) + CloseDownClient(client); + } + + ErrorF("End list of ungrabbed devices\n"); +} + +GrabPtr +AllocGrab(const GrabPtr src) +{ + GrabPtr grab = calloc(1, sizeof(GrabRec)); + + if (grab) { + grab->xi2mask = xi2mask_new(); + if (!grab->xi2mask) { + free(grab); + grab = NULL; + } + } + + if (src && !CopyGrab(grab, src)) { + free(grab->xi2mask); + free(grab); + grab = NULL; + } + + return grab; +} + +GrabPtr +CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice, + WindowPtr window, enum InputLevel grabtype, GrabMask *mask, + GrabParameters *param, int type, + KeyCode keybut, /* key or button */ + WindowPtr confineTo, CursorPtr cursor) +{ + GrabPtr grab; + + grab = AllocGrab(NULL); + if (!grab) + return (GrabPtr) NULL; + grab->resource = FakeClientID(client); + grab->device = device; + grab->window = window; + if (grabtype == CORE || grabtype == XI) + grab->eventMask = mask->core; /* same for XI */ + else + grab->eventMask = 0; + grab->deviceMask = 0; + grab->ownerEvents = param->ownerEvents; + grab->keyboardMode = param->this_device_mode; + grab->pointerMode = param->other_devices_mode; + grab->modifiersDetail.exact = param->modifiers; + grab->modifiersDetail.pMask = NULL; + grab->modifierDevice = modDevice; + grab->type = type; + grab->grabtype = grabtype; + grab->detail.exact = keybut; + grab->detail.pMask = NULL; + grab->confineTo = confineTo; + grab->cursor = RefCursor(cursor); + grab->next = NULL; + + if (grabtype == XI2) + xi2mask_merge(grab->xi2mask, mask->xi2mask); + return grab; + +} + +void +FreeGrab(GrabPtr pGrab) +{ + BUG_RETURN(!pGrab); + + free(pGrab->modifiersDetail.pMask); + free(pGrab->detail.pMask); + + if (pGrab->cursor) + FreeCursor(pGrab->cursor, (Cursor) 0); + + xi2mask_free(&pGrab->xi2mask); + free(pGrab); +} + +Bool +CopyGrab(GrabPtr dst, const GrabPtr src) +{ + Mask *mdetails_mask = NULL; + Mask *details_mask = NULL; + XI2Mask *xi2mask; + + if (src->modifiersDetail.pMask) { + int len = MasksPerDetailMask * sizeof(Mask); + + mdetails_mask = malloc(len); + if (!mdetails_mask) + return FALSE; + memcpy(mdetails_mask, src->modifiersDetail.pMask, len); + } + + if (src->detail.pMask) { + int len = MasksPerDetailMask * sizeof(Mask); + + details_mask = malloc(len); + if (!details_mask) { + free(mdetails_mask); + return FALSE; + } + memcpy(details_mask, src->detail.pMask, len); + } + + if (!dst->xi2mask) { + xi2mask = xi2mask_new(); + if (!xi2mask) { + free(mdetails_mask); + free(details_mask); + return FALSE; + } + } + else { + xi2mask = dst->xi2mask; + xi2mask_zero(xi2mask, -1); + } + + *dst = *src; + dst->modifiersDetail.pMask = mdetails_mask; + dst->detail.pMask = details_mask; + dst->xi2mask = xi2mask; + dst->cursor = RefCursor(src->cursor); + + xi2mask_merge(dst->xi2mask, src->xi2mask); + + return TRUE; +} + +int +DeletePassiveGrab(pointer value, XID id) +{ + GrabPtr g, prev; + GrabPtr pGrab = (GrabPtr) value; + + /* it is OK if the grab isn't found */ + prev = 0; + for (g = (wPassiveGrabs(pGrab->window)); g; g = g->next) { + if (pGrab == g) { + if (prev) + prev->next = g->next; + else if (!(pGrab->window->optional->passiveGrabs = g->next)) + CheckWindowOptionalNeed(pGrab->window); + break; + } + prev = g; + } + FreeGrab(pGrab); + return Success; +} + +static Mask * +DeleteDetailFromMask(Mask *pDetailMask, unsigned int detail) +{ + Mask *mask; + int i; + + mask = malloc(sizeof(Mask) * MasksPerDetailMask); + if (mask) { + if (pDetailMask) + for (i = 0; i < MasksPerDetailMask; i++) + mask[i] = pDetailMask[i]; + else + for (i = 0; i < MasksPerDetailMask; i++) + mask[i] = ~0L; + BITCLEAR(mask, detail); + } + return mask; +} + +static Bool +IsInGrabMask(DetailRec firstDetail, + DetailRec secondDetail, unsigned int exception) +{ + if (firstDetail.exact == exception) { + if (firstDetail.pMask == NULL) + return TRUE; + + /* (at present) never called with two non-null pMasks */ + if (secondDetail.exact == exception) + return FALSE; + + if (GETBIT(firstDetail.pMask, secondDetail.exact)) + return TRUE; + } + + return FALSE; +} + +static Bool +IdenticalExactDetails(unsigned int firstExact, + unsigned int secondExact, unsigned int exception) +{ + if ((firstExact == exception) || (secondExact == exception)) + return FALSE; + + if (firstExact == secondExact) + return TRUE; + + return FALSE; +} + +static Bool +DetailSupersedesSecond(DetailRec firstDetail, + DetailRec secondDetail, unsigned int exception) +{ + if (IsInGrabMask(firstDetail, secondDetail, exception)) + return TRUE; + + if (IdenticalExactDetails(firstDetail.exact, secondDetail.exact, exception)) + return TRUE; + + return FALSE; +} + +static Bool +GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) +{ + unsigned int any_modifier = (pFirstGrab->grabtype == XI2) ? + (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; + if (!DetailSupersedesSecond(pFirstGrab->modifiersDetail, + pSecondGrab->modifiersDetail, any_modifier)) + return FALSE; + + if (DetailSupersedesSecond(pFirstGrab->detail, + pSecondGrab->detail, (unsigned int) AnyKey)) + return TRUE; + + return FALSE; +} + +/** + * Compares two grabs and returns TRUE if the first grab matches the second + * grab. + * + * A match is when + * - the devices set for the grab are equal (this is optional). + * - the event types for both grabs are equal. + * - XXX + * + * @param ignoreDevice TRUE if the device settings on the grabs are to be + * ignored. + * @return TRUE if the grabs match or FALSE otherwise. + */ +Bool +GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice) +{ + unsigned int any_modifier = (pFirstGrab->grabtype == XI2) ? + (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; + + if (pFirstGrab->grabtype != pSecondGrab->grabtype) + return FALSE; + + if (pFirstGrab->grabtype == XI2) { + if (pFirstGrab->device == inputInfo.all_devices || + pSecondGrab->device == inputInfo.all_devices) { + /* do nothing */ + } + else if (pFirstGrab->device == inputInfo.all_master_devices) { + if (pSecondGrab->device != inputInfo.all_master_devices && + !IsMaster(pSecondGrab->device)) + return FALSE; + } + else if (pSecondGrab->device == inputInfo.all_master_devices) { + if (pFirstGrab->device != inputInfo.all_master_devices && + !IsMaster(pFirstGrab->device)) + return FALSE; + } + else if (pSecondGrab->device != pFirstGrab->device) + return FALSE; + } + else if (!ignoreDevice && + ((pFirstGrab->device != pSecondGrab->device) || + (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice))) + return FALSE; + + if (pFirstGrab->type != pSecondGrab->type) + return FALSE; + + if (GrabSupersedesSecond(pFirstGrab, pSecondGrab) || + GrabSupersedesSecond(pSecondGrab, pFirstGrab)) + return TRUE; + + if (DetailSupersedesSecond(pSecondGrab->detail, pFirstGrab->detail, + (unsigned int) AnyKey) + && + DetailSupersedesSecond(pFirstGrab->modifiersDetail, + pSecondGrab->modifiersDetail, any_modifier)) + return TRUE; + + if (DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail, + (unsigned int) AnyKey) + && + DetailSupersedesSecond(pSecondGrab->modifiersDetail, + pFirstGrab->modifiersDetail, any_modifier)) + return TRUE; + + return FALSE; +} + +static Bool +GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab) +{ + unsigned int any_modifier = (pFirstGrab->grabtype == XI2) ? + (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; + + if (pFirstGrab->grabtype != pSecondGrab->grabtype) + return FALSE; + + if (pFirstGrab->device != pSecondGrab->device || + (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) || + (pFirstGrab->type != pSecondGrab->type)) + return FALSE; + + if (!(DetailSupersedesSecond(pFirstGrab->detail, + pSecondGrab->detail, + (unsigned int) AnyKey) && + DetailSupersedesSecond(pSecondGrab->detail, + pFirstGrab->detail, (unsigned int) AnyKey))) + return FALSE; + + if (!(DetailSupersedesSecond(pFirstGrab->modifiersDetail, + pSecondGrab->modifiersDetail, + any_modifier) && + DetailSupersedesSecond(pSecondGrab->modifiersDetail, + pFirstGrab->modifiersDetail, any_modifier))) + return FALSE; + + return TRUE; +} + +/** + * Prepend the new grab to the list of passive grabs on the window. + * Any previously existing grab that matches the new grab will be removed. + * Adding a new grab that would override another client's grab will result in + * a BadAccess. + * + * @return Success or X error code on failure. + */ +int +AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab) +{ + GrabPtr grab; + Mask access_mode = DixGrabAccess; + int rc; + + for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { + if (GrabMatchesSecond(pGrab, grab, (pGrab->grabtype == CORE))) { + if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource)) { + FreeGrab(pGrab); + return BadAccess; + } + } + } + + if (pGrab->keyboardMode == GrabModeSync || + pGrab->pointerMode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, pGrab->device, access_mode); + if (rc != Success) + return rc; + + /* Remove all grabs that match the new one exactly */ + for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { + if (GrabsAreIdentical(pGrab, grab)) { + DeletePassiveGrabFromList(grab); + break; + } + } + + if (!pGrab->window->optional && !MakeWindowOptional(pGrab->window)) { + FreeGrab(pGrab); + return BadAlloc; + } + + pGrab->next = pGrab->window->optional->passiveGrabs; + pGrab->window->optional->passiveGrabs = pGrab; + if (AddResource(pGrab->resource, RT_PASSIVEGRAB, (pointer) pGrab)) + return Success; + return BadAlloc; +} + +/* the following is kinda complicated, because we need to be able to back out + * if any allocation fails + */ + +Bool +DeletePassiveGrabFromList(GrabPtr pMinuendGrab) +{ + GrabPtr grab; + GrabPtr *deletes, *adds; + Mask ***updates, **details; + int i, ndels, nadds, nups; + Bool ok; + unsigned int any_modifier; + unsigned int any_key; + +#define UPDATE(mask,exact) \ + if (!(details[nups] = DeleteDetailFromMask(mask, exact))) \ + ok = FALSE; \ + else \ + updates[nups++] = &(mask) + + i = 0; + for (grab = wPassiveGrabs(pMinuendGrab->window); grab; grab = grab->next) + i++; + if (!i) + return TRUE; + deletes = malloc(i * sizeof(GrabPtr)); + adds = malloc(i * sizeof(GrabPtr)); + updates = malloc(i * sizeof(Mask **)); + details = malloc(i * sizeof(Mask *)); + if (!deletes || !adds || !updates || !details) { + free(details); + free(updates); + free(adds); + free(deletes); + return FALSE; + } + + any_modifier = (pMinuendGrab->grabtype == XI2) ? + (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; + any_key = (pMinuendGrab->grabtype == XI2) ? + (unsigned int) XIAnyKeycode : (unsigned int) AnyKey; + ndels = nadds = nups = 0; + ok = TRUE; + for (grab = wPassiveGrabs(pMinuendGrab->window); + grab && ok; grab = grab->next) { + if ((CLIENT_BITS(grab->resource) != CLIENT_BITS(pMinuendGrab->resource)) + || !GrabMatchesSecond(grab, pMinuendGrab, (grab->grabtype == CORE))) + continue; + if (GrabSupersedesSecond(pMinuendGrab, grab)) { + deletes[ndels++] = grab; + } + else if ((grab->detail.exact == any_key) + && (grab->modifiersDetail.exact != any_modifier)) { + UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); + } + else if ((grab->modifiersDetail.exact == any_modifier) + && (grab->detail.exact != any_key)) { + UPDATE(grab->modifiersDetail.pMask, + pMinuendGrab->modifiersDetail.exact); + } + else if ((pMinuendGrab->detail.exact != any_key) + && (pMinuendGrab->modifiersDetail.exact != any_modifier)) { + GrabPtr pNewGrab; + GrabParameters param; + + UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); + + memset(¶m, 0, sizeof(param)); + param.ownerEvents = grab->ownerEvents; + param.this_device_mode = grab->keyboardMode; + param.other_devices_mode = grab->pointerMode; + param.modifiers = any_modifier; + + pNewGrab = CreateGrab(CLIENT_ID(grab->resource), grab->device, + grab->modifierDevice, grab->window, + grab->grabtype, + (GrabMask *) &grab->eventMask, + ¶m, (int) grab->type, + pMinuendGrab->detail.exact, + grab->confineTo, grab->cursor); + if (!pNewGrab) + ok = FALSE; + else if (!(pNewGrab->modifiersDetail.pMask = + DeleteDetailFromMask(grab->modifiersDetail.pMask, + pMinuendGrab->modifiersDetail. + exact)) + || (!pNewGrab->window->optional && + !MakeWindowOptional(pNewGrab->window))) { + FreeGrab(pNewGrab); + ok = FALSE; + } + else if (!AddResource(pNewGrab->resource, RT_PASSIVEGRAB, + (pointer) pNewGrab)) + ok = FALSE; + else + adds[nadds++] = pNewGrab; + } + else if (pMinuendGrab->detail.exact == any_key) { + UPDATE(grab->modifiersDetail.pMask, + pMinuendGrab->modifiersDetail.exact); + } + else { + UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); + } + } + + if (!ok) { + for (i = 0; i < nadds; i++) + FreeResource(adds[i]->resource, RT_NONE); + for (i = 0; i < nups; i++) + free(details[i]); + } + else { + for (i = 0; i < ndels; i++) + FreeResource(deletes[i]->resource, RT_NONE); + for (i = 0; i < nadds; i++) { + grab = adds[i]; + grab->next = grab->window->optional->passiveGrabs; + grab->window->optional->passiveGrabs = grab; + } + for (i = 0; i < nups; i++) { + free(*updates[i]); + *updates[i] = details[i]; + } + } + free(details); + free(updates); + free(adds); + free(deletes); + return ok; + +#undef UPDATE +} + +Bool +GrabIsPointerGrab(GrabPtr grab) +{ + return (grab->type == ButtonPress || + grab->type == DeviceButtonPress || grab->type == XI_ButtonPress); +} + +Bool +GrabIsKeyboardGrab(GrabPtr grab) +{ + return (grab->type == KeyPress || + grab->type == DeviceKeyPress || grab->type == XI_KeyPress); +} diff --git a/dix/initatoms.c b/dix/initatoms.c new file mode 100644 index 0000000..bcc38a0 --- /dev/null +++ b/dix/initatoms.c @@ -0,0 +1,153 @@ +/* THIS IS A GENERATED FILE + * + * Do not change! Changing this file implies a protocol change! + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xatom.h> +#include "misc.h" +#include "dix.h" +void +MakePredeclaredAtoms(void) +{ + if (MakeAtom("PRIMARY", 7, 1) != XA_PRIMARY) + AtomError(); + if (MakeAtom("SECONDARY", 9, 1) != XA_SECONDARY) + AtomError(); + if (MakeAtom("ARC", 3, 1) != XA_ARC) + AtomError(); + if (MakeAtom("ATOM", 4, 1) != XA_ATOM) + AtomError(); + if (MakeAtom("BITMAP", 6, 1) != XA_BITMAP) + AtomError(); + if (MakeAtom("CARDINAL", 8, 1) != XA_CARDINAL) + AtomError(); + if (MakeAtom("COLORMAP", 8, 1) != XA_COLORMAP) + AtomError(); + if (MakeAtom("CURSOR", 6, 1) != XA_CURSOR) + AtomError(); + if (MakeAtom("CUT_BUFFER0", 11, 1) != XA_CUT_BUFFER0) + AtomError(); + if (MakeAtom("CUT_BUFFER1", 11, 1) != XA_CUT_BUFFER1) + AtomError(); + if (MakeAtom("CUT_BUFFER2", 11, 1) != XA_CUT_BUFFER2) + AtomError(); + if (MakeAtom("CUT_BUFFER3", 11, 1) != XA_CUT_BUFFER3) + AtomError(); + if (MakeAtom("CUT_BUFFER4", 11, 1) != XA_CUT_BUFFER4) + AtomError(); + if (MakeAtom("CUT_BUFFER5", 11, 1) != XA_CUT_BUFFER5) + AtomError(); + if (MakeAtom("CUT_BUFFER6", 11, 1) != XA_CUT_BUFFER6) + AtomError(); + if (MakeAtom("CUT_BUFFER7", 11, 1) != XA_CUT_BUFFER7) + AtomError(); + if (MakeAtom("DRAWABLE", 8, 1) != XA_DRAWABLE) + AtomError(); + if (MakeAtom("FONT", 4, 1) != XA_FONT) + AtomError(); + if (MakeAtom("INTEGER", 7, 1) != XA_INTEGER) + AtomError(); + if (MakeAtom("PIXMAP", 6, 1) != XA_PIXMAP) + AtomError(); + if (MakeAtom("POINT", 5, 1) != XA_POINT) + AtomError(); + if (MakeAtom("RECTANGLE", 9, 1) != XA_RECTANGLE) + AtomError(); + if (MakeAtom("RESOURCE_MANAGER", 16, 1) != XA_RESOURCE_MANAGER) + AtomError(); + if (MakeAtom("RGB_COLOR_MAP", 13, 1) != XA_RGB_COLOR_MAP) + AtomError(); + if (MakeAtom("RGB_BEST_MAP", 12, 1) != XA_RGB_BEST_MAP) + AtomError(); + if (MakeAtom("RGB_BLUE_MAP", 12, 1) != XA_RGB_BLUE_MAP) + AtomError(); + if (MakeAtom("RGB_DEFAULT_MAP", 15, 1) != XA_RGB_DEFAULT_MAP) + AtomError(); + if (MakeAtom("RGB_GRAY_MAP", 12, 1) != XA_RGB_GRAY_MAP) + AtomError(); + if (MakeAtom("RGB_GREEN_MAP", 13, 1) != XA_RGB_GREEN_MAP) + AtomError(); + if (MakeAtom("RGB_RED_MAP", 11, 1) != XA_RGB_RED_MAP) + AtomError(); + if (MakeAtom("STRING", 6, 1) != XA_STRING) + AtomError(); + if (MakeAtom("VISUALID", 8, 1) != XA_VISUALID) + AtomError(); + if (MakeAtom("WINDOW", 6, 1) != XA_WINDOW) + AtomError(); + if (MakeAtom("WM_COMMAND", 10, 1) != XA_WM_COMMAND) + AtomError(); + if (MakeAtom("WM_HINTS", 8, 1) != XA_WM_HINTS) + AtomError(); + if (MakeAtom("WM_CLIENT_MACHINE", 17, 1) != XA_WM_CLIENT_MACHINE) + AtomError(); + if (MakeAtom("WM_ICON_NAME", 12, 1) != XA_WM_ICON_NAME) + AtomError(); + if (MakeAtom("WM_ICON_SIZE", 12, 1) != XA_WM_ICON_SIZE) + AtomError(); + if (MakeAtom("WM_NAME", 7, 1) != XA_WM_NAME) + AtomError(); + if (MakeAtom("WM_NORMAL_HINTS", 15, 1) != XA_WM_NORMAL_HINTS) + AtomError(); + if (MakeAtom("WM_SIZE_HINTS", 13, 1) != XA_WM_SIZE_HINTS) + AtomError(); + if (MakeAtom("WM_ZOOM_HINTS", 13, 1) != XA_WM_ZOOM_HINTS) + AtomError(); + if (MakeAtom("MIN_SPACE", 9, 1) != XA_MIN_SPACE) + AtomError(); + if (MakeAtom("NORM_SPACE", 10, 1) != XA_NORM_SPACE) + AtomError(); + if (MakeAtom("MAX_SPACE", 9, 1) != XA_MAX_SPACE) + AtomError(); + if (MakeAtom("END_SPACE", 9, 1) != XA_END_SPACE) + AtomError(); + if (MakeAtom("SUPERSCRIPT_X", 13, 1) != XA_SUPERSCRIPT_X) + AtomError(); + if (MakeAtom("SUPERSCRIPT_Y", 13, 1) != XA_SUPERSCRIPT_Y) + AtomError(); + if (MakeAtom("SUBSCRIPT_X", 11, 1) != XA_SUBSCRIPT_X) + AtomError(); + if (MakeAtom("SUBSCRIPT_Y", 11, 1) != XA_SUBSCRIPT_Y) + AtomError(); + if (MakeAtom("UNDERLINE_POSITION", 18, 1) != XA_UNDERLINE_POSITION) + AtomError(); + if (MakeAtom("UNDERLINE_THICKNESS", 19, 1) != XA_UNDERLINE_THICKNESS) + AtomError(); + if (MakeAtom("STRIKEOUT_ASCENT", 16, 1) != XA_STRIKEOUT_ASCENT) + AtomError(); + if (MakeAtom("STRIKEOUT_DESCENT", 17, 1) != XA_STRIKEOUT_DESCENT) + AtomError(); + if (MakeAtom("ITALIC_ANGLE", 12, 1) != XA_ITALIC_ANGLE) + AtomError(); + if (MakeAtom("X_HEIGHT", 8, 1) != XA_X_HEIGHT) + AtomError(); + if (MakeAtom("QUAD_WIDTH", 10, 1) != XA_QUAD_WIDTH) + AtomError(); + if (MakeAtom("WEIGHT", 6, 1) != XA_WEIGHT) + AtomError(); + if (MakeAtom("POINT_SIZE", 10, 1) != XA_POINT_SIZE) + AtomError(); + if (MakeAtom("RESOLUTION", 10, 1) != XA_RESOLUTION) + AtomError(); + if (MakeAtom("COPYRIGHT", 9, 1) != XA_COPYRIGHT) + AtomError(); + if (MakeAtom("NOTICE", 6, 1) != XA_NOTICE) + AtomError(); + if (MakeAtom("FONT_NAME", 9, 1) != XA_FONT_NAME) + AtomError(); + if (MakeAtom("FAMILY_NAME", 11, 1) != XA_FAMILY_NAME) + AtomError(); + if (MakeAtom("FULL_NAME", 9, 1) != XA_FULL_NAME) + AtomError(); + if (MakeAtom("CAP_HEIGHT", 10, 1) != XA_CAP_HEIGHT) + AtomError(); + if (MakeAtom("WM_CLASS", 8, 1) != XA_WM_CLASS) + AtomError(); + if (MakeAtom("WM_TRANSIENT_FOR", 16, 1) != XA_WM_TRANSIENT_FOR) + AtomError(); +} diff --git a/dix/inpututils.c b/dix/inpututils.c new file mode 100644 index 0000000..e5bcc31 --- /dev/null +++ b/dix/inpututils.c @@ -0,0 +1,1139 @@ +/* + * Copyright © 2008 Daniel Stone + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include "dix-config.h" +#endif + +#include "exevents.h" +#include "exglobals.h" +#include "misc.h" +#include "input.h" +#include "inputstr.h" +#include "xace.h" +#include "xkbsrv.h" +#include "xkbstr.h" +#include "inpututils.h" +#include "eventstr.h" +#include "scrnintstr.h" +#include "optionstr.h" + +/* Check if a button map change is okay with the device. + * Returns -1 for BadValue, as it collides with MappingBusy. */ +static int +check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out, + ClientPtr client) +{ + int i, ret; + + if (!dev || !dev->button) { + client->errorValue = (dev) ? dev->id : 0; + return BadDevice; + } + + ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); + if (ret != Success) { + client->errorValue = dev->id; + return ret; + } + + for (i = 0; i < len; i++) { + if (dev->button->map[i + 1] != map[i] && + button_is_down(dev, i + 1, BUTTON_PROCESSED)) + return MappingBusy; + } + + return Success; +} + +static void +do_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client) +{ + int i; + xEvent core_mn = { .u.u.type = MappingNotify }; + deviceMappingNotify xi_mn; + + /* The map in ButtonClassRec refers to button numbers, whereas the + * protocol is zero-indexed. Sigh. */ + memcpy(&(dev->button->map[1]), map, len); + + core_mn.u.mappingNotify.request = MappingPointer; + + /* 0 is the server client. */ + for (i = 1; i < currentMaxClients; i++) { + /* Don't send irrelevant events to naïve clients. */ + if (!clients[i] || clients[i]->clientState != ClientStateRunning) + continue; + + if (!XIShouldNotify(clients[i], dev)) + continue; + + WriteEventsToClient(clients[i], 1, &core_mn); + } + + xi_mn = (deviceMappingNotify) { + .type = DeviceMappingNotify, + .request = MappingPointer, + .deviceid = dev->id, + .time = GetTimeInMillis() + }; + + SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) &xi_mn, 1); +} + +/* + * Does what it says on the box, both for core and Xi. + * + * Faithfully reports any errors encountered while trying to apply the map + * to the requested device, faithfully ignores any errors encountered while + * trying to apply the map to its master/slaves. + */ +int +ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client) +{ + int ret; + + /* If we can't perform the change on the requested device, bail out. */ + ret = check_butmap_change(dev, map, len, &client->errorValue, client); + if (ret != Success) + return ret; + do_butmap_change(dev, map, len, client); + + return Success; +} + +/* Check if a modifier map change is okay with the device. + * Returns -1 for BadValue, as it collides with MappingBusy; this particular + * caveat can be removed with LegalModifier, as we have no other reason to + * set MappingFailed. Sigh. */ +static int +check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap) +{ + int ret, i; + XkbDescPtr xkb; + + ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); + if (ret != Success) + return ret; + + if (!dev->key) + return BadMatch; + xkb = dev->key->xkbInfo->desc; + + for (i = 0; i < MAP_LENGTH; i++) { + if (!modmap[i]) + continue; + + /* Check that all the new modifiers fall within the advertised + * keycode range. */ + if (i < xkb->min_key_code || i > xkb->max_key_code) { + client->errorValue = i; + return -1; + } + + /* Make sure the mapping is okay with the DDX. */ + if (!LegalModifier(i, dev)) { + client->errorValue = i; + return MappingFailed; + } + + /* None of the new modifiers may be down while we change the + * map. */ + if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) { + client->errorValue = i; + return MappingBusy; + } + } + + /* None of the old modifiers may be down while we change the map, + * either. */ + for (i = xkb->min_key_code; i < xkb->max_key_code; i++) { + if (!xkb->map->modmap[i]) + continue; + if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) { + client->errorValue = i; + return MappingBusy; + } + } + + return Success; +} + +static int +check_modmap_change_slave(ClientPtr client, DeviceIntPtr master, + DeviceIntPtr slave, CARD8 *modmap) +{ + XkbDescPtr master_xkb, slave_xkb; + int i, j; + + if (!slave->key || !master->key) + return 0; + + master_xkb = master->key->xkbInfo->desc; + slave_xkb = slave->key->xkbInfo->desc; + + /* Ignore devices with a clearly different keymap. */ + if (slave_xkb->min_key_code != master_xkb->min_key_code || + slave_xkb->max_key_code != master_xkb->max_key_code) + return 0; + + for (i = 0; i < MAP_LENGTH; i++) { + if (!modmap[i]) + continue; + + /* If we have different symbols for any modifier on an + * extended keyboard, ignore the whole remap request. */ + for (j = 0; + j < XkbKeyNumSyms(slave_xkb, i) && + j < XkbKeyNumSyms(master_xkb, i); j++) + if (XkbKeySymsPtr(slave_xkb, i)[j] != + XkbKeySymsPtr(master_xkb, i)[j]) + return 0; + } + + if (check_modmap_change(client, slave, modmap) != Success) + return 0; + + return 1; +} + +/* Actually change the modifier map, and send notifications. Cannot fail. */ +static void +do_modmap_change(ClientPtr client, DeviceIntPtr dev, CARD8 *modmap) +{ + XkbApplyMappingChange(dev, NULL, 0, 0, modmap, serverClient); +} + +/* Rebuild modmap (key -> mod) from map (mod -> key). */ +static int +build_modmap_from_modkeymap(CARD8 *modmap, KeyCode *modkeymap, + int max_keys_per_mod) +{ + int i, len = max_keys_per_mod * 8; + + memset(modmap, 0, MAP_LENGTH); + + for (i = 0; i < len; i++) { + if (!modkeymap[i]) + continue; + + if (modkeymap[i] >= MAP_LENGTH) + return BadValue; + + if (modmap[modkeymap[i]]) + return BadValue; + + modmap[modkeymap[i]] = 1 << (i / max_keys_per_mod); + } + + return Success; +} + +int +change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap, + int max_keys_per_mod) +{ + int ret; + CARD8 modmap[MAP_LENGTH]; + DeviceIntPtr tmp; + + ret = build_modmap_from_modkeymap(modmap, modkeymap, max_keys_per_mod); + if (ret != Success) + return ret; + + /* If we can't perform the change on the requested device, bail out. */ + ret = check_modmap_change(client, dev, modmap); + if (ret != Success) + return ret; + do_modmap_change(client, dev, modmap); + + /* Change any attached masters/slaves. */ + if (IsMaster(dev)) { + for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { + if (!IsMaster(tmp) && GetMaster(tmp, MASTER_KEYBOARD) == dev) + if (check_modmap_change_slave(client, dev, tmp, modmap)) + do_modmap_change(client, tmp, modmap); + } + } + else if (!IsFloating(dev) && + GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) { + /* If this fails, expect the results to be weird. */ + if (check_modmap_change(client, dev->master, modmap)) + do_modmap_change(client, dev->master, modmap); + } + + return Success; +} + +int +generate_modkeymap(ClientPtr client, DeviceIntPtr dev, + KeyCode **modkeymap_out, int *max_keys_per_mod_out) +{ + CARD8 keys_per_mod[8]; + int max_keys_per_mod; + KeyCode *modkeymap = NULL; + int i, j, ret; + + ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess); + if (ret != Success) + return ret; + + if (!dev->key) + return BadMatch; + + /* Count the number of keys per modifier to determine how wide we + * should make the map. */ + max_keys_per_mod = 0; + for (i = 0; i < 8; i++) + keys_per_mod[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) { + for (j = 0; j < 8; j++) { + if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) { + if (++keys_per_mod[j] > max_keys_per_mod) + max_keys_per_mod = keys_per_mod[j]; + } + } + } + + if (max_keys_per_mod != 0) { + modkeymap = calloc(max_keys_per_mod * 8, sizeof(KeyCode)); + if (!modkeymap) + return BadAlloc; + + for (i = 0; i < 8; i++) + keys_per_mod[i] = 0; + + for (i = 8; i < MAP_LENGTH; i++) { + for (j = 0; j < 8; j++) { + if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) { + modkeymap[(j * max_keys_per_mod) + keys_per_mod[j]] = i; + keys_per_mod[j]++; + } + } + } + } + + *max_keys_per_mod_out = max_keys_per_mod; + *modkeymap_out = modkeymap; + + return Success; +} + +/** + * Duplicate the InputAttributes in the most obvious way. + * No special memory handling is used to give drivers the maximum + * flexibility with the data. Drivers should be able to call realloc on the + * product string if needed and perform similar operations. + */ +InputAttributes * +DuplicateInputAttributes(InputAttributes * attrs) +{ + InputAttributes *new_attr; + int ntags = 0; + char **tags, **new_tags; + + if (!attrs) + return NULL; + + if (!(new_attr = calloc(1, sizeof(InputAttributes)))) + goto unwind; + + if (attrs->product && !(new_attr->product = strdup(attrs->product))) + goto unwind; + if (attrs->vendor && !(new_attr->vendor = strdup(attrs->vendor))) + goto unwind; + if (attrs->device && !(new_attr->device = strdup(attrs->device))) + goto unwind; + if (attrs->pnp_id && !(new_attr->pnp_id = strdup(attrs->pnp_id))) + goto unwind; + if (attrs->usb_id && !(new_attr->usb_id = strdup(attrs->usb_id))) + goto unwind; + + new_attr->flags = attrs->flags; + + if ((tags = attrs->tags)) { + while (*tags++) + ntags++; + + new_attr->tags = calloc(ntags + 1, sizeof(char *)); + if (!new_attr->tags) + goto unwind; + + tags = attrs->tags; + new_tags = new_attr->tags; + + while (*tags) { + *new_tags = strdup(*tags); + if (!*new_tags) + goto unwind; + + tags++; + new_tags++; + } + } + + return new_attr; + + unwind: + FreeInputAttributes(new_attr); + return NULL; +} + +void +FreeInputAttributes(InputAttributes * attrs) +{ + char **tags; + + if (!attrs) + return; + + free(attrs->product); + free(attrs->vendor); + free(attrs->device); + free(attrs->pnp_id); + free(attrs->usb_id); + + if ((tags = attrs->tags)) + while (*tags) + free(*tags++); + + free(attrs->tags); + free(attrs); +} + +/** + * Alloc a valuator mask large enough for num_valuators. + */ +ValuatorMask * +valuator_mask_new(int num_valuators) +{ + /* alloc a fixed size mask for now and ignore num_valuators. in the + * flying-car future, when we can dynamically alloc the masks and are + * not constrained by signals, we can start using num_valuators */ + ValuatorMask *mask = calloc(1, sizeof(ValuatorMask)); + + if (mask == NULL) + return NULL; + + mask->last_bit = -1; + return mask; +} + +void +valuator_mask_free(ValuatorMask **mask) +{ + free(*mask); + *mask = NULL; +} + +/** + * Sets a range of valuators between first_valuator and num_valuators with + * the data in the valuators array. All other values are set to 0. + */ +void +valuator_mask_set_range(ValuatorMask *mask, int first_valuator, + int num_valuators, const int *valuators) +{ + int i; + + valuator_mask_zero(mask); + + for (i = first_valuator; + i < min(first_valuator + num_valuators, MAX_VALUATORS); i++) + valuator_mask_set(mask, i, valuators[i - first_valuator]); +} + +/** + * Reset mask to zero. + */ +void +valuator_mask_zero(ValuatorMask *mask) +{ + memset(mask, 0, sizeof(*mask)); + mask->last_bit = -1; +} + +/** + * Returns the current size of the mask (i.e. the highest number of + * valuators currently set + 1). + */ +int +valuator_mask_size(const ValuatorMask *mask) +{ + return mask->last_bit + 1; +} + +/** + * Returns the number of valuators set in the given mask. + */ +int +valuator_mask_num_valuators(const ValuatorMask *mask) +{ + return CountBits(mask->mask, min(mask->last_bit + 1, MAX_VALUATORS)); +} + +/** + * Return true if the valuator is set in the mask, or false otherwise. + */ +int +valuator_mask_isset(const ValuatorMask *mask, int valuator) +{ + return mask->last_bit >= valuator && BitIsOn(mask->mask, valuator); +} + +/** + * Set the valuator to the given floating-point data. + */ +void +valuator_mask_set_double(ValuatorMask *mask, int valuator, double data) +{ + mask->last_bit = max(valuator, mask->last_bit); + SetBit(mask->mask, valuator); + mask->valuators[valuator] = data; +} + +/** + * Set the valuator to the given integer data. + */ +void +valuator_mask_set(ValuatorMask *mask, int valuator, int data) +{ + valuator_mask_set_double(mask, valuator, data); +} + +/** + * Return the requested valuator value as a double. If the mask bit is not + * set for the given valuator, the returned value is undefined. + */ +double +valuator_mask_get_double(const ValuatorMask *mask, int valuator) +{ + return mask->valuators[valuator]; +} + +/** + * Return the requested valuator value as an integer, rounding towards zero. + * If the mask bit is not set for the given valuator, the returned value is + * undefined. + */ +int +valuator_mask_get(const ValuatorMask *mask, int valuator) +{ + return trunc(valuator_mask_get_double(mask, valuator)); +} + +/** + * Set value to the requested valuator. If the mask bit is set for this + * valuator, value contains the requested valuator value and TRUE is + * returned. + * If the mask bit is not set for this valuator, value is unchanged and + * FALSE is returned. + */ +Bool +valuator_mask_fetch_double(const ValuatorMask *mask, int valuator, + double *value) +{ + if (valuator_mask_isset(mask, valuator)) { + *value = valuator_mask_get_double(mask, valuator); + return TRUE; + } + else + return FALSE; +} + +/** + * Set value to the requested valuator. If the mask bit is set for this + * valuator, value contains the requested valuator value and TRUE is + * returned. + * If the mask bit is not set for this valuator, value is unchanged and + * FALSE is returned. + */ +Bool +valuator_mask_fetch(const ValuatorMask *mask, int valuator, int *value) +{ + if (valuator_mask_isset(mask, valuator)) { + *value = valuator_mask_get(mask, valuator); + return TRUE; + } + else + return FALSE; +} + +/** + * Remove the valuator from the mask. + */ +void +valuator_mask_unset(ValuatorMask *mask, int valuator) +{ + if (mask->last_bit >= valuator) { + int i, lastbit = -1; + + ClearBit(mask->mask, valuator); + mask->valuators[valuator] = 0.0; + + for (i = 0; i <= mask->last_bit; i++) + if (valuator_mask_isset(mask, i)) + lastbit = max(lastbit, i); + mask->last_bit = lastbit; + } +} + +void +valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src) +{ + if (src) + memcpy(dest, src, sizeof(*dest)); + else + valuator_mask_zero(dest); +} + +int +CountBits(const uint8_t * mask, int len) +{ + int i; + int ret = 0; + + for (i = 0; i < len; i++) + if (BitIsOn(mask, i)) + ret++; + + return ret; +} + +/** + * Verifies sanity of the event. If the event is not an internal event, + * memdumps the first 32 bytes of event to the log, a backtrace, then kill + * the server. + */ +void +verify_internal_event(const InternalEvent *ev) +{ + if (ev && ev->any.header != ET_Internal) { + int i; + const unsigned char *data = (const unsigned char *) ev; + + ErrorF("dix: invalid event type %d\n", ev->any.header); + + for (i = 0; i < sizeof(xEvent); i++, data++) { + ErrorF("%02hhx ", *data); + + if ((i % 8) == 7) + ErrorF("\n"); + } + + xorg_backtrace(); + FatalError("Wrong event type %d. Aborting server\n", ev->any.header); + } +} + +/** + * Initializes the given event to zero (or default values), for the given + * device. + */ +void +init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms) +{ + memset(event, 0, sizeof(DeviceEvent)); + event->header = ET_Internal; + event->length = sizeof(DeviceEvent); + event->time = ms; + event->deviceid = dev->id; + event->sourceid = dev->id; +} + +int +event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd) +{ + int corestate; + + /* core state needs to be assembled BEFORE the device is updated. */ + corestate = (kbd && + kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo-> + state) : 0; + corestate |= (mouse && mouse->button) ? (mouse->button->state) : 0; + corestate |= (mouse && mouse->touch) ? (mouse->touch->state) : 0; + + return corestate; +} + +void +event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event) +{ + int i; + + for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) + if (BitIsOn(mouse->button->down, i)) + SetBit(event->buttons, mouse->button->map[i]); + + if (mouse && mouse->touch && mouse->touch->buttonsDown > 0) + SetBit(event->buttons, mouse->button->map[1]); + + if (kbd && kbd->key) { + XkbStatePtr state; + + /* we need the state before the event happens */ + if (event->type == ET_KeyPress || event->type == ET_KeyRelease) + state = &kbd->key->xkbInfo->prev_state; + else + state = &kbd->key->xkbInfo->state; + + event->mods.base = state->base_mods; + event->mods.latched = state->latched_mods; + event->mods.locked = state->locked_mods; + event->mods.effective = state->mods; + + event->group.base = state->base_group; + event->group.latched = state->latched_group; + event->group.locked = state->locked_group; + event->group.effective = state->group; + } +} + +/** + * Return the event filter mask for the given device and the given core or + * XI1 protocol type. + */ +Mask +event_get_filter_from_type(DeviceIntPtr dev, int evtype) +{ + return event_filters[dev ? dev->id : 0][evtype]; +} + +/** + * Return the event filter mask for the given device and the given core or + * XI2 protocol type. + */ +Mask +event_get_filter_from_xi2type(int evtype) +{ + return (1 << (evtype % 8)); +} + +Bool +point_on_screen(ScreenPtr pScreen, int x, int y) +{ + return x >= pScreen->x && x < pScreen->x + pScreen->width && + y >= pScreen->y && y < pScreen->y + pScreen->height; +} + +/** + * Update desktop dimensions on the screenInfo struct. + */ +void +update_desktop_dimensions(void) +{ + int i; + int x1 = INT_MAX, y1 = INT_MAX; /* top-left */ + int x2 = INT_MIN, y2 = INT_MIN; /* bottom-right */ + + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr screen = screenInfo.screens[i]; + + x1 = min(x1, screen->x); + y1 = min(y1, screen->y); + x2 = max(x2, screen->x + screen->width); + y2 = max(y2, screen->y + screen->height); + } + + screenInfo.x = x1; + screenInfo.y = y1; + screenInfo.width = x2 - x1; + screenInfo.height = y2 - y1; +} + +/* + * Delete the element with the key from the list, freeing all memory + * associated with the element.. + */ +static void +input_option_free(InputOption *o) +{ + free(o->opt_name); + free(o->opt_val); + free(o->opt_comment); + free(o); +} + +/* + * Create a new InputOption with the key/value pair provided. + * If a list is provided, the new options is added to the list and the list + * is returned. + * + * If a new option is added to a list that already contains that option, the + * previous option is overwritten. + * + * @param list The list to add to. + * @param key Option key, will be copied. + * @param value Option value, will be copied. + * + * @return If list is not NULL, the list with the new option added. If list + * is NULL, a new option list with one element. On failure, NULL is + * returned. + */ +InputOption * +input_option_new(InputOption *list, const char *key, const char *value) +{ + InputOption *opt = NULL; + + if (!key) + return NULL; + + if (list) { + nt_list_for_each_entry(opt, list, list.next) { + if (strcmp(input_option_get_key(opt), key) == 0) { + input_option_set_value(opt, value); + return list; + } + } + } + + opt = calloc(1, sizeof(InputOption)); + if (!opt) + return NULL; + + nt_list_init(opt, list.next); + input_option_set_key(opt, key); + input_option_set_value(opt, value); + + if (list) { + nt_list_append(opt, list, InputOption, list.next); + + return list; + } + else + return opt; +} + +InputOption * +input_option_free_element(InputOption *list, const char *key) +{ + InputOption *element; + + nt_list_for_each_entry(element, list, list.next) { + if (strcmp(input_option_get_key(element), key) == 0) { + nt_list_del(element, list, InputOption, list.next); + + input_option_free(element); + break; + } + } + return list; +} + +/** + * Free the list pointed at by opt. + */ +void +input_option_free_list(InputOption **opt) +{ + InputOption *element, *tmp; + + nt_list_for_each_entry_safe(element, tmp, *opt, list.next) { + nt_list_del(element, *opt, InputOption, list.next); + + input_option_free(element); + } + *opt = NULL; +} + +/** + * Find the InputOption with the given option name. + * + * @return The InputOption or NULL if not present. + */ +InputOption * +input_option_find(InputOption *list, const char *key) +{ + InputOption *element; + + nt_list_for_each_entry(element, list, list.next) { + if (strcmp(input_option_get_key(element), key) == 0) + return element; + } + + return NULL; +} + +const char * +input_option_get_key(const InputOption *opt) +{ + return opt->opt_name; +} + +const char * +input_option_get_value(const InputOption *opt) +{ + return opt->opt_val; +} + +void +input_option_set_key(InputOption *opt, const char *key) +{ + free(opt->opt_name); + if (key) + opt->opt_name = strdup(key); +} + +void +input_option_set_value(InputOption *opt, const char *value) +{ + free(opt->opt_val); + if (value) + opt->opt_val = strdup(value); +} + +/* FP1616/FP3232 conversion functions. + * Fixed point types are encoded as signed integral and unsigned frac. So any + * negative number -n.m is encoded as floor(n) + (1 - 0.m). + */ +double +fp1616_to_double(FP1616 in) +{ + return pixman_fixed_to_double(in); +} + +double +fp3232_to_double(FP3232 in) +{ + double ret; + + ret = (double) in.integral; + ret += (double) in.frac * (1.0 / (1ULL << 32)); /* Optimized: ldexp((double)in.frac, -32); */ + return ret; +} + +FP1616 +double_to_fp1616(double in) +{ + return pixman_double_to_fixed(in); +} + +FP3232 +double_to_fp3232(double in) +{ + FP3232 ret; + int32_t integral; + double tmp; + uint32_t frac_d; + + tmp = floor(in); + integral = (int32_t) tmp; + + tmp = (in - integral) * (1ULL << 32); /* Optimized: ldexp(in - integral, 32) */ + frac_d = (uint32_t) tmp; + + ret.integral = integral; + ret.frac = frac_d; + return ret; +} + +/** + * DO NOT USE THIS FUNCTION. It only exists for the test cases. Use + * xi2mask_new() instead to get the standard sized masks. + * + * @param nmasks The number of masks (== number of devices) + * @param size The size of the masks in bytes + * @return The new mask or NULL on allocation error. + */ +XI2Mask * +xi2mask_new_with_size(size_t nmasks, size_t size) +{ + int i; + int alloc_size; + unsigned char *cursor; + XI2Mask *mask; + + alloc_size = sizeof(struct _XI2Mask) + + nmasks * sizeof(unsigned char *) + + nmasks * size; + + mask = calloc(1, alloc_size); + + if (!mask) + return NULL; + + mask->nmasks = nmasks; + mask->mask_size = size; + + mask->masks = (unsigned char **)(mask + 1); + cursor = (unsigned char *)(mask + 1) + nmasks * sizeof(unsigned char *); + + for (i = 0; i < nmasks; i++) { + mask->masks[i] = cursor; + cursor += size; + } + return mask; +} + +/** + * Create a new XI2 mask of the standard size, i.e. for all devices + fake + * devices and for the highest supported XI2 event type. + * + * @return The new mask or NULL on allocation error. + */ +XI2Mask * +xi2mask_new(void) +{ + return xi2mask_new_with_size(EMASKSIZE, XI2MASKSIZE); +} + +/** + * Frees memory associated with mask and resets mask to NULL. + */ +void +xi2mask_free(XI2Mask **mask) +{ + if (!(*mask)) + return; + + free((*mask)); + *mask = NULL; +} + +/** + * Test if the bit for event type is set for this device only. + * + * @return TRUE if the bit is set, FALSE otherwise + */ +Bool +xi2mask_isset_for_device(XI2Mask *mask, const DeviceIntPtr dev, int event_type) +{ + BUG_WARN(dev->id < 0); + BUG_WARN(dev->id >= mask->nmasks); + BUG_WARN(bits_to_bytes(event_type + 1) > mask->mask_size); + + return BitIsOn(mask->masks[dev->id], event_type); +} + +/** + * Test if the bit for event type is set for this device, or the + * XIAllDevices/XIAllMasterDevices (if applicable) is set. + * + * @return TRUE if the bit is set, FALSE otherwise + */ +Bool +xi2mask_isset(XI2Mask *mask, const DeviceIntPtr dev, int event_type) +{ + int set = 0; + + if (xi2mask_isset_for_device(mask, inputInfo.all_devices, event_type)) + set = 1; + else if (xi2mask_isset_for_device(mask, dev, event_type)) + set = 1; + else if (IsMaster(dev) && xi2mask_isset_for_device(mask, inputInfo.all_master_devices, event_type)) + set = 1; + + return set; +} + +/** + * Set the mask bit for this event type for this device. + */ +void +xi2mask_set(XI2Mask *mask, int deviceid, int event_type) +{ + BUG_WARN(deviceid < 0); + BUG_WARN(deviceid >= mask->nmasks); + BUG_WARN(bits_to_bytes(event_type + 1) > mask->mask_size); + + SetBit(mask->masks[deviceid], event_type); +} + +/** + * Zero out the xi2mask, for the deviceid given. If the deviceid is < 0, all + * masks are zeroed. + */ +void +xi2mask_zero(XI2Mask *mask, int deviceid) +{ + int i; + + BUG_WARN(deviceid > 0 && deviceid >= mask->nmasks); + + if (deviceid >= 0) + memset(mask->masks[deviceid], 0, mask->mask_size); + else + for (i = 0; i < mask->nmasks; i++) + memset(mask->masks[i], 0, mask->mask_size); +} + +/** + * Merge source into dest, i.e. dest |= source. + * If the masks are of different size, only the overlapping section is merged. + */ +void +xi2mask_merge(XI2Mask *dest, const XI2Mask *source) +{ + int i, j; + + for (i = 0; i < min(dest->nmasks, source->nmasks); i++) + for (j = 0; j < min(dest->mask_size, source->mask_size); j++) + dest->masks[i][j] |= source->masks[i][j]; +} + +/** + * @return The number of masks in mask + */ +size_t +xi2mask_num_masks(const XI2Mask *mask) +{ + return mask->nmasks; +} + +/** + * @return The size of each mask in bytes + */ +size_t +xi2mask_mask_size(const XI2Mask *mask) +{ + return mask->mask_size; +} + +/** + * Set the mask for the given deviceid to the source mask. + * If the mask given is larger than the target memory, only the overlapping + * parts are copied. + */ +void +xi2mask_set_one_mask(XI2Mask *xi2mask, int deviceid, const unsigned char *mask, + size_t mask_size) +{ + BUG_WARN(deviceid < 0); + BUG_WARN(deviceid >= xi2mask->nmasks); + + memcpy(xi2mask->masks[deviceid], mask, min(xi2mask->mask_size, mask_size)); +} + +/** + * Get a reference to the XI2mask for this particular device. + */ +const unsigned char * +xi2mask_get_one_mask(const XI2Mask *mask, int deviceid) +{ + BUG_WARN(deviceid < 0); + BUG_WARN(deviceid >= mask->nmasks); + + return mask->masks[deviceid]; +} diff --git a/dix/main.c b/dix/main.c new file mode 100644 index 0000000..05dcbed --- /dev/null +++ b/dix/main.c @@ -0,0 +1,382 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#include <version-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xos.h> /* for unistd.h */ +#include <X11/Xproto.h> +#include <pixman.h> +#include "scrnintstr.h" +#include "misc.h" +#include "os.h" +#include "windowstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "extension.h" +#include "colormap.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "selection.h" +#include <X11/fonts/font.h> +#include "opaque.h" +#include "servermd.h" +#include "hotplug.h" +#include "site.h" +#include "dixfont.h" +#include "extnsionst.h" +#include "privates.h" +#include "registry.h" +#include "client.h" +#include "exevents.h" +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#else +#include "dixevents.h" /* InitEvents() */ +#endif + +#ifdef DPMSExtension +#include <X11/extensions/dpmsconst.h> +#include "dpmsproc.h" +#endif + +extern void Dispatch(void); + +#ifdef XQUARTZ +#include <pthread.h> + +BOOL serverRunning = FALSE; +pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER; + +#endif + +int +dix_main(int argc, char *argv[], char *envp[]) +{ + int i; + HWEventQueueType alwaysCheckForInput[2]; + + display = "0"; + + InitRegions(); + + CheckUserParameters(argc, argv, envp); + + CheckUserAuthorization(); + + InitConnectionLimits(); + + ProcessCommandLine(argc, argv); + + alwaysCheckForInput[0] = 0; + alwaysCheckForInput[1] = 1; + while (1) { + serverGeneration++; + ScreenSaverTime = defaultScreenSaverTime; + ScreenSaverInterval = defaultScreenSaverInterval; + ScreenSaverBlanking = defaultScreenSaverBlanking; + ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; +#ifdef DPMSExtension + DPMSStandbyTime = DPMSSuspendTime = DPMSOffTime = ScreenSaverTime; + DPMSEnabled = TRUE; + DPMSPowerLevel = 0; +#endif + InitBlockAndWakeupHandlers(); + /* Perform any operating system dependent initializations you'd like */ + OsInit(); + if (serverGeneration == 1) { + CreateWellKnownSockets(); + for (i = 1; i < MAXCLIENTS; i++) + clients[i] = NullClient; + serverClient = calloc(sizeof(ClientRec), 1); + if (!serverClient) + FatalError("couldn't create server client"); + InitClient(serverClient, 0, (pointer) NULL); + } + else + ResetWellKnownSockets(); + clients[0] = serverClient; + currentMaxClients = 1; + + /* Initialize privates before first allocation */ + dixResetPrivates(); + + /* Initialize server client devPrivates, to be reallocated as + * more client privates are registered + */ + if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT)) + FatalError("failed to create server client privates"); + + if (!InitClientResources(serverClient)) /* for root resources */ + FatalError("couldn't init server resources"); + + SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]); + screenInfo.numScreens = 0; + + InitAtoms(); + InitEvents(); + InitSelections(); + InitGlyphCaching(); + dixResetRegistry(); + ResetFontPrivateIndex(); + InitCallbackManager(); + InitOutput(&screenInfo, argc, argv); + + if (screenInfo.numScreens < 1) + FatalError("no screens found"); + InitExtensions(argc, argv); + + for (i = 0; i < screenInfo.numGPUScreens; i++) { + ScreenPtr pScreen = screenInfo.gpuscreens[i]; + if (!CreateScratchPixmapsForScreen(pScreen)) + FatalError("failed to create scratch pixmaps"); + if (pScreen->CreateScreenResources && + !(*pScreen->CreateScreenResources) (pScreen)) + FatalError("failed to create screen resources"); + } + + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + + if (!CreateScratchPixmapsForScreen(pScreen)) + FatalError("failed to create scratch pixmaps"); + if (pScreen->CreateScreenResources && + !(*pScreen->CreateScreenResources) (pScreen)) + FatalError("failed to create screen resources"); + if (!CreateGCperDepth(i)) + FatalError("failed to create scratch GCs"); + if (!CreateDefaultStipple(i)) + FatalError("failed to create default stipple"); + if (!CreateRootWindow(pScreen)) + FatalError("failed to create root window"); + } + + InitFonts(); + if (SetDefaultFontPath(defaultFontPath) != Success) { + ErrorF("[dix] failed to set default font path '%s'", + defaultFontPath); + } + if (!SetDefaultFont(defaultTextFont)) { + FatalError("could not open default font '%s'", defaultTextFont); + } + + if (!(rootCursor = CreateRootCursor(NULL, 0))) { + FatalError("could not open default cursor font '%s'", + defaultCursorFont); + } + +#ifdef DPMSExtension + /* check all screens, looking for DPMS Capabilities */ + DPMSCapableFlag = DPMSSupported(); + if (!DPMSCapableFlag) + DPMSEnabled = FALSE; +#endif + +#ifdef PANORAMIX + /* + * Consolidate window and colourmap information for each screen + */ + if (!noPanoramiXExtension) + PanoramiXConsolidate(); +#endif + + for (i = 0; i < screenInfo.numScreens; i++) + InitRootWindow(screenInfo.screens[i]->root); + + InitCoreDevices(); + InitInput(argc, argv); + InitAndStartDevices(); + ReserveClientIds(serverClient); + + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + if (!PanoramiXCreateConnectionBlock()) { + FatalError("could not create connection block info"); + } + } + else +#endif + { + if (!CreateConnectionBlock()) { + FatalError("could not create connection block info"); + } + } + +#ifdef XQUARTZ + /* Let the other threads know the server is done with its init */ + pthread_mutex_lock(&serverRunningMutex); + serverRunning = TRUE; + pthread_cond_broadcast(&serverRunningCond); + pthread_mutex_unlock(&serverRunningMutex); +#endif + + NotifyParentProcess(); + + Dispatch(); + +#ifdef XQUARTZ + /* Let the other threads know the server is no longer running */ + pthread_mutex_lock(&serverRunningMutex); + serverRunning = FALSE; + pthread_mutex_unlock(&serverRunningMutex); +#endif + + UndisplayDevices(); + DisableAllDevices(); + + /* Now free up whatever must be freed */ + if (screenIsSaved == SCREEN_SAVER_ON) + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + FreeScreenSaverTimer(); + CloseDownExtensions(); + +#ifdef PANORAMIX + { + Bool remember_it = noPanoramiXExtension; + + noPanoramiXExtension = TRUE; + FreeAllResources(); + noPanoramiXExtension = remember_it; + } +#else + FreeAllResources(); +#endif + + CloseInput(); + + for (i = 0; i < screenInfo.numScreens; i++) + screenInfo.screens[i]->root = NullWindow; + + CloseDownDevices(); + + CloseDownEvents(); + + for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) { + ScreenPtr pScreen = screenInfo.gpuscreens[i]; + FreeScratchPixmapsForScreen(pScreen); + (*pScreen->CloseScreen) (pScreen); + dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); + free(pScreen); + screenInfo.numGPUScreens = i; + } + + for (i = screenInfo.numScreens - 1; i >= 0; i--) { + FreeScratchPixmapsForScreen(screenInfo.screens[i]); + FreeGCperDepth(i); + FreeDefaultStipple(i); + dixFreeScreenSpecificPrivates(screenInfo.screens[i]); + (*screenInfo.screens[i]->CloseScreen) (screenInfo.screens[i]); + dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN); + free(screenInfo.screens[i]); + screenInfo.numScreens = i; + } + + ReleaseClientIds(serverClient); + dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT); + serverClient->devPrivates = NULL; + + dixFreeRegistry(); + + FreeFonts(); + + FreeAllAtoms(); + + FreeAuditTimer(); + + DeleteCallbackManager(); + + if (dispatchException & DE_TERMINATE) { + CloseWellKnownConnections(); + } + + OsCleanup((dispatchException & DE_TERMINATE) != 0); + + if (dispatchException & DE_TERMINATE) { + ddxGiveUp(EXIT_NO_ERROR); + break; + } + + free(ConnectionInfo); + ConnectionInfo = NULL; + } + return 0; +} diff --git a/dix/pixmap.c b/dix/pixmap.c new file mode 100644 index 0000000..d5dc383 --- /dev/null +++ b/dix/pixmap.c @@ -0,0 +1,271 @@ +/* + +Copyright 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include "scrnintstr.h" +#include "misc.h" +#include "os.h" +#include "windowstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "servermd.h" +#include "site.h" + +/* + * Scratch pixmap management and device independent pixmap allocation + * function. + */ + +/* callable by ddx */ +PixmapPtr +GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) +{ + PixmapPtr pPixmap = pScreen->pScratchPixmap; + + if (pPixmap) + pScreen->pScratchPixmap = NULL; + else + /* width and height of 0 means don't allocate any pixmap data */ + pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0); + + if (pPixmap) { + if ((*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData)) + return pPixmap; + (*pScreen->DestroyPixmap) (pPixmap); + } + return NullPixmap; +} + +/* callable by ddx */ +void +FreeScratchPixmapHeader(PixmapPtr pPixmap) +{ + if (pPixmap) { + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + pPixmap->devPrivate.ptr = NULL; /* lest ddx chases bad ptr */ + if (pScreen->pScratchPixmap) + (*pScreen->DestroyPixmap) (pPixmap); + else + pScreen->pScratchPixmap = pPixmap; + } +} + +Bool +CreateScratchPixmapsForScreen(ScreenPtr pScreen) +{ + unsigned int pixmap_size; + + pixmap_size = sizeof(PixmapRec) + dixScreenSpecificPrivatesSize(pScreen, PRIVATE_PIXMAP); + pScreen->totalPixmapSize = + BitmapBytePad(pixmap_size * 8); + + /* let it be created on first use */ + pScreen->pScratchPixmap = NULL; + return TRUE; +} + +void +FreeScratchPixmapsForScreen(ScreenPtr pScreen) +{ + FreeScratchPixmapHeader(pScreen->pScratchPixmap); +} + +/* callable by ddx */ +PixmapPtr +AllocatePixmap(ScreenPtr pScreen, int pixDataSize) +{ + PixmapPtr pPixmap; + + assert(pScreen->totalPixmapSize > 0); + + if (pScreen->totalPixmapSize > ((size_t) - 1) - pixDataSize) + return NullPixmap; + + pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize); + if (!pPixmap) + return NullPixmap; + + dixInitScreenPrivates(pScreen, pPixmap, pPixmap + 1, PRIVATE_PIXMAP); + return pPixmap; +} + +/* callable by ddx */ +void +FreePixmap(PixmapPtr pPixmap) +{ + dixFiniPrivates(pPixmap, PRIVATE_PIXMAP); + free(pPixmap); +} + +PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave) +{ + PixmapPtr spix; + int ret; + void *handle; + ScreenPtr master = pixmap->drawable.pScreen; + int depth = pixmap->drawable.depth; + + ret = master->SharePixmapBacking(pixmap, slave, &handle); + if (ret == FALSE) + return NULL; + + spix = slave->CreatePixmap(slave, 0, 0, depth, + CREATE_PIXMAP_USAGE_SHARED); + slave->ModifyPixmapHeader(spix, pixmap->drawable.width, + pixmap->drawable.height, depth, 0, + pixmap->devKind, NULL); + + /* have the slave pixmap take a reference on the master pixmap + later we destroy them both at the same time */ + pixmap->refcnt++; + + spix->master_pixmap = pixmap; + + ret = slave->SetSharedPixmapBacking(spix, handle); + if (ret == FALSE) { + slave->DestroyPixmap(spix); + return NULL; + } + + return spix; +} + +Bool +PixmapStartDirtyTracking(PixmapPtr src, + PixmapPtr slave_dst, + int x, int y) +{ + ScreenPtr screen = src->drawable.pScreen; + PixmapDirtyUpdatePtr dirty_update; + + dirty_update = calloc(1, sizeof(PixmapDirtyUpdateRec)); + if (!dirty_update) + return FALSE; + + dirty_update->src = src; + dirty_update->slave_dst = slave_dst; + dirty_update->x = x; + dirty_update->y = y; + + dirty_update->damage = DamageCreate(NULL, NULL, + DamageReportNone, + TRUE, src->drawable.pScreen, + src->drawable.pScreen); + if (!dirty_update->damage) { + free(dirty_update); + return FALSE; + } + + DamageRegister(&src->drawable, dirty_update->damage); + xorg_list_add(&dirty_update->ent, &screen->pixmap_dirty_list); + return TRUE; +} + +Bool +PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst) +{ + ScreenPtr screen = src->drawable.pScreen; + PixmapDirtyUpdatePtr ent, safe; + + xorg_list_for_each_entry_safe(ent, safe, &screen->pixmap_dirty_list, ent) { + if (ent->src == src && ent->slave_dst == slave_dst) { + DamageDestroy(ent->damage); + xorg_list_del(&ent->ent); + free(ent); + } + } + return TRUE; +} + +/* + * this function can possibly be improved and optimised, by clipping + * instead of iterating + */ +Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region) +{ + ScreenPtr pScreen = dirty->src->drawable.pScreen; + int n; + BoxPtr b; + RegionPtr region = DamageRegion(dirty->damage); + GCPtr pGC; + PixmapPtr dst; + SourceValidateProcPtr SourceValidate; + + /* + * SourceValidate is used by the software cursor code + * to pull the cursor off of the screen when reading + * bits from the frame buffer. Bypassing this function + * leaves the software cursor in place + */ + SourceValidate = pScreen->SourceValidate; + pScreen->SourceValidate = NULL; + + RegionTranslate(dirty_region, dirty->x, dirty->y); + RegionIntersect(dirty_region, dirty_region, region); + + if (RegionNil(dirty_region)) { + RegionUninit(dirty_region); + return FALSE; + } + + dst = dirty->slave_dst->master_pixmap; + if (!dst) + dst = dirty->slave_dst; + + RegionTranslate(dirty_region, -dirty->x, -dirty->y); + n = RegionNumRects(dirty_region); + b = RegionRects(dirty_region); + + pGC = GetScratchGC(dirty->src->drawable.depth, pScreen); + ValidateGC(&dst->drawable, pGC); + + while (n--) { + BoxRec dst_box; + int w, h; + + dst_box = *b; + w = dst_box.x2 - dst_box.x1; + h = dst_box.y2 - dst_box.y1; + + pGC->ops->CopyArea(&dirty->src->drawable, &dst->drawable, pGC, + dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h, dst_box.x1, dst_box.y1); + b++; + } + FreeScratchGC(pGC); + + pScreen->SourceValidate = SourceValidate; + return TRUE; +} diff --git a/dix/privates.c b/dix/privates.c new file mode 100644 index 0000000..41b1a76 --- /dev/null +++ b/dix/privates.c @@ -0,0 +1,776 @@ +/* + +Copyright 1993, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +*/ +/* + * Copyright © 2010, Keith Packard + * Copyright © 2010, Jamey Sharp + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <stddef.h> +#include "windowstr.h" +#include "resource.h" +#include "privates.h" +#include "gcstruct.h" +#include "cursorstr.h" +#include "colormapst.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "extnsionst.h" +#include "inputstr.h" + +static DevPrivateSetRec global_keys[PRIVATE_LAST]; + +static const Bool xselinux_private[PRIVATE_LAST] = { + [PRIVATE_SCREEN] = TRUE, + [PRIVATE_CLIENT] = TRUE, + [PRIVATE_WINDOW] = TRUE, + [PRIVATE_PIXMAP] = TRUE, + [PRIVATE_GC] = TRUE, + [PRIVATE_CURSOR] = TRUE, + [PRIVATE_COLORMAP] = TRUE, + [PRIVATE_DEVICE] = TRUE, + [PRIVATE_EXTENSION] = TRUE, + [PRIVATE_SELECTION] = TRUE, + [PRIVATE_PROPERTY] = TRUE, + [PRIVATE_PICTURE] = TRUE, + [PRIVATE_GLYPHSET] = TRUE, +}; + +static const char *key_names[PRIVATE_LAST] = { + /* XSELinux uses the same private keys for numerous objects */ + [PRIVATE_XSELINUX] = "XSELINUX", + + /* Otherwise, you get a private in just the requested structure + */ + /* These can have objects created before all of the keys are registered */ + [PRIVATE_SCREEN] = "SCREEN", + [PRIVATE_EXTENSION] = "EXTENSION", + [PRIVATE_COLORMAP] = "COLORMAP", + [PRIVATE_DEVICE] = "DEVICE", + + /* These cannot have any objects before all relevant keys are registered */ + [PRIVATE_CLIENT] = "CLIENT", + [PRIVATE_PROPERTY] = "PROPERTY", + [PRIVATE_SELECTION] = "SELECTION", + [PRIVATE_WINDOW] = "WINDOW", + [PRIVATE_PIXMAP] = "PIXMAP", + [PRIVATE_GC] = "GC", + [PRIVATE_CURSOR] = "CURSOR", + [PRIVATE_CURSOR_BITS] = "CURSOR_BITS", + + /* extension privates */ + [PRIVATE_DAMAGE] = "DAMAGE", + [PRIVATE_GLYPH] = "GLYPH", + [PRIVATE_GLYPHSET] = "GLYPHSET", + [PRIVATE_PICTURE] = "PICTURE", + [PRIVATE_SYNC_FENCE] = "SYNC_FENCE", +}; + +static const Bool screen_specific_private[PRIVATE_LAST] = { + [PRIVATE_SCREEN] = FALSE, + [PRIVATE_CLIENT] = FALSE, + [PRIVATE_WINDOW] = TRUE, + [PRIVATE_PIXMAP] = TRUE, + [PRIVATE_GC] = TRUE, + [PRIVATE_CURSOR] = FALSE, + [PRIVATE_COLORMAP] = FALSE, + [PRIVATE_DEVICE] = FALSE, + [PRIVATE_EXTENSION] = FALSE, + [PRIVATE_SELECTION] = FALSE, + [PRIVATE_PROPERTY] = FALSE, + [PRIVATE_PICTURE] = TRUE, + [PRIVATE_GLYPHSET] = FALSE, +}; + +typedef Bool (*FixupFunc) (PrivatePtr *privates, int offset, unsigned bytes); + +typedef enum { FixupMove, FixupRealloc } FixupType; + +static Bool +dixReallocPrivates(PrivatePtr *privates, int old_offset, unsigned bytes) +{ + void *new_privates; + + new_privates = realloc(*privates, old_offset + bytes); + if (!new_privates) + return FALSE; + memset((char *) new_privates + old_offset, '\0', bytes); + *privates = new_privates; + return TRUE; +} + +static Bool +dixMovePrivates(PrivatePtr *privates, int new_offset, unsigned bytes) +{ + memmove((char *) *privates + bytes, *privates, new_offset - bytes); + memset(*privates, '\0', bytes); + return TRUE; +} + +static Bool +fixupOneScreen(ScreenPtr pScreen, FixupFunc fixup, unsigned bytes) +{ + intptr_t dist; + char *old; + char *new; + DevPrivateKey *keyp, key; + DevPrivateType type; + int size; + + old = (char *) pScreen->devPrivates; + size = global_keys[PRIVATE_SCREEN].offset; + if (!fixup (&pScreen->devPrivates, size, bytes)) + return FALSE; + + /* Screen privates can contain screen-specific private keys + * for other types. When they move, the linked list we use to + * track them gets scrambled. Fix that by computing the change + * in the location of each private adjusting our linked list + * pointers to match + */ + + new = (char *) pScreen->devPrivates; + + /* Moving means everyone shifts up in the privates by 'bytes' amount, + * realloc means the base pointer moves + */ + if (fixup == dixMovePrivates) + new += bytes; + + dist = new - old; + + if (dist) { + for (type = PRIVATE_XSELINUX; type < PRIVATE_LAST; type++) + + /* Walk the privates list, being careful as the + * pointers are scrambled before we patch them. + */ + for (keyp = &pScreen->screenSpecificPrivates[type].key; + (key = *keyp) != NULL; + keyp = &key->next) + { + + /* Only mangle things if the private structure + * is contained within the allocation. Privates + * stored elsewhere will be left alone + */ + if (old <= (char *) key && (char *) key < old + size) + { + /* Compute new location of key */ + key = (DevPrivateKey) ((char *) key + dist); + + /* Patch the list */ + *keyp = key; + } + } + } + return TRUE; +} + +static Bool +fixupScreens(FixupFunc fixup, unsigned bytes) +{ + int s; + + for (s = 0; s < screenInfo.numScreens; s++) + if (!fixupOneScreen (screenInfo.screens[s], fixup, bytes)) + return FALSE; + + for (s = 0; s < screenInfo.numGPUScreens; s++) + if (!fixupOneScreen (screenInfo.gpuscreens[s], fixup, bytes)) + return FALSE; + return TRUE; +} + +static Bool +fixupServerClient(FixupFunc fixup, unsigned bytes) +{ + if (serverClient) + return fixup(&serverClient->devPrivates, global_keys[PRIVATE_CLIENT].offset, + bytes); + return TRUE; +} + +static Bool +fixupExtensions(FixupFunc fixup, unsigned bytes) +{ + unsigned char major; + ExtensionEntry *extension; + + for (major = EXTENSION_BASE; (extension = GetExtensionEntry(major)); + major++) + if (!fixup + (&extension->devPrivates, global_keys[PRIVATE_EXTENSION].offset, bytes)) + return FALSE; + return TRUE; +} + +static Bool +fixupDefaultColormaps(FixupFunc fixup, unsigned bytes) +{ + int s; + + for (s = 0; s < screenInfo.numScreens; s++) { + ColormapPtr cmap; + + dixLookupResourceByType((pointer *) &cmap, + screenInfo.screens[s]->defColormap, RT_COLORMAP, + serverClient, DixCreateAccess); + if (cmap && + !fixup(&cmap->devPrivates, screenInfo.screens[s]->screenSpecificPrivates[PRIVATE_COLORMAP].offset, bytes)) + return FALSE; + } + return TRUE; +} + +static Bool +fixupDeviceList(DeviceIntPtr device, FixupFunc fixup, unsigned bytes) +{ + while (device) { + if (!fixup(&device->devPrivates, global_keys[PRIVATE_DEVICE].offset, bytes)) + return FALSE; + device = device->next; + } + return TRUE; +} + +static Bool +fixupDevices(FixupFunc fixup, unsigned bytes) +{ + return (fixupDeviceList(inputInfo.devices, fixup, bytes) && + fixupDeviceList(inputInfo.off_devices, fixup, bytes)); +} + +static Bool (*const allocated_early[PRIVATE_LAST]) (FixupFunc, unsigned) = { + [PRIVATE_SCREEN] = fixupScreens, + [PRIVATE_CLIENT] = fixupServerClient, + [PRIVATE_EXTENSION] = fixupExtensions, + [PRIVATE_COLORMAP] = fixupDefaultColormaps, + [PRIVATE_DEVICE] = fixupDevices, +}; + +static void +grow_private_set(DevPrivateSetPtr set, unsigned bytes) +{ + DevPrivateKey k; + + for (k = set->key; k; k = k->next) + k->offset += bytes; + set->offset += bytes; +} + +static void +grow_screen_specific_set(DevPrivateType type, unsigned bytes) +{ + int s; + + /* Update offsets for all screen-specific keys */ + for (s = 0; s < screenInfo.numScreens; s++) { + ScreenPtr pScreen = screenInfo.screens[s]; + + grow_private_set(&pScreen->screenSpecificPrivates[type], bytes); + } + for (s = 0; s < screenInfo.numGPUScreens; s++) { + ScreenPtr pScreen = screenInfo.gpuscreens[s]; + + grow_private_set(&pScreen->screenSpecificPrivates[type], bytes); + } +} + +/* + * Register a private key. This takes the type of object the key will + * be used with, which may be PRIVATE_ALL indicating that this key + * will be used with all of the private objects. If 'size' is + * non-zero, then the specified amount of space will be allocated in + * the private storage. Otherwise, space for a single pointer will + * be allocated which can be set with dixSetPrivate + */ +Bool +dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size) +{ + DevPrivateType t; + int offset; + unsigned bytes; + + if (key->initialized) { + assert(size == key->size); + return TRUE; + } + + /* Compute required space */ + bytes = size; + if (size == 0) + bytes = sizeof(void *); + + /* align to void * size */ + bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1); + + /* Update offsets for all affected keys */ + if (type == PRIVATE_XSELINUX) { + + /* Resize if we can, or make sure nothing's allocated if we can't + */ + for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) + if (xselinux_private[t]) { + if (!allocated_early[t]) + assert(!global_keys[t].created); + else if (!allocated_early[t] (dixReallocPrivates, bytes)) + return FALSE; + } + + /* Move all existing keys up in the privates space to make + * room for this new global key + */ + for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) { + if (xselinux_private[t]) { + grow_private_set(&global_keys[t], bytes); + grow_screen_specific_set(t, bytes); + if (allocated_early[t]) + allocated_early[t] (dixMovePrivates, bytes); + } + + } + + offset = 0; + } + else { + /* Resize if we can, or make sure nothing's allocated if we can't */ + if (!allocated_early[type]) + assert(!global_keys[type].created); + else if (!allocated_early[type] (dixReallocPrivates, bytes)) + return FALSE; + offset = global_keys[type].offset; + global_keys[type].offset += bytes; + grow_screen_specific_set(type, bytes); + } + + /* Setup this key */ + key->offset = offset; + key->size = size; + key->initialized = TRUE; + key->type = type; + key->allocated = FALSE; + key->next = global_keys[type].key; + global_keys[type].key = key; + + return TRUE; +} + +Bool +dixRegisterScreenPrivateKey(DevScreenPrivateKey screenKey, ScreenPtr pScreen, + DevPrivateType type, unsigned size) +{ + DevPrivateKey key; + + if (!dixRegisterPrivateKey(&screenKey->screenKey, PRIVATE_SCREEN, 0)) + return FALSE; + key = dixGetPrivate(&pScreen->devPrivates, &screenKey->screenKey); + if (key != NULL) { + assert(key->size == size); + assert(key->type == type); + return TRUE; + } + key = calloc(sizeof(DevPrivateKeyRec), 1); + if (!key) + return FALSE; + if (!dixRegisterPrivateKey(key, type, size)) { + free(key); + return FALSE; + } + key->allocated = TRUE; + dixSetPrivate(&pScreen->devPrivates, &screenKey->screenKey, key); + return TRUE; +} + +DevPrivateKey +_dixGetScreenPrivateKey(const DevScreenPrivateKey key, ScreenPtr pScreen) +{ + return dixGetPrivate(&pScreen->devPrivates, &key->screenKey); +} + +/* + * Initialize privates by zeroing them + */ +void +_dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type) +{ + assert (!screen_specific_private[type]); + + global_keys[type].created++; + if (xselinux_private[type]) + global_keys[PRIVATE_XSELINUX].created++; + if (global_keys[type].offset == 0) + addr = 0; + *privates = addr; + memset(addr, '\0', global_keys[type].offset); +} + +/* + * Clean up privates + */ +void +_dixFiniPrivates(PrivatePtr privates, DevPrivateType type) +{ + global_keys[type].created--; + if (xselinux_private[type]) + global_keys[PRIVATE_XSELINUX].created--; +} + +/* + * Allocate new object with privates. + * + * This is expected to be invoked from the + * dixAllocateObjectWithPrivates macro + */ +void * +_dixAllocateObjectWithPrivates(unsigned baseSize, unsigned clear, + unsigned offset, DevPrivateType type) +{ + unsigned totalSize; + void *object; + PrivatePtr privates; + PrivatePtr *devPrivates; + + assert(type > PRIVATE_SCREEN && type < PRIVATE_LAST); + assert(!screen_specific_private[type]); + + /* round up so that void * is aligned */ + baseSize = (baseSize + sizeof(void *) - 1) & ~(sizeof(void *) - 1); + totalSize = baseSize + global_keys[type].offset; + object = malloc(totalSize); + if (!object) + return NULL; + + memset(object, '\0', clear); + privates = (PrivatePtr) (((char *) object) + baseSize); + devPrivates = (PrivatePtr *) ((char *) object + offset); + + _dixInitPrivates(devPrivates, privates, type); + + return object; +} + +/* + * Allocate privates separately from containing object. + * Used for clients and screens. + */ +Bool +dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type) +{ + unsigned size; + PrivatePtr p; + + assert(type > PRIVATE_XSELINUX && type < PRIVATE_LAST); + assert(!screen_specific_private[type]); + + size = global_keys[type].offset; + if (!size) { + p = NULL; + } + else { + if (!(p = malloc(size))) + return FALSE; + } + + _dixInitPrivates(privates, p, type); + ++global_keys[type].allocated; + + return TRUE; +} + +/* + * Free an object that has privates + * + * This is expected to be invoked from the + * dixFreeObjectWithPrivates macro + */ +void +_dixFreeObjectWithPrivates(void *object, PrivatePtr privates, + DevPrivateType type) +{ + _dixFiniPrivates(privates, type); + free(object); +} + +/* + * Called to free screen or client privates + */ +void +dixFreePrivates(PrivatePtr privates, DevPrivateType type) +{ + _dixFiniPrivates(privates, type); + --global_keys[type].allocated; + free(privates); +} + +/* + * Return size of privates for the specified type + */ +extern _X_EXPORT int +dixPrivatesSize(DevPrivateType type) +{ + assert(type >= PRIVATE_SCREEN && type < PRIVATE_LAST); + assert (!screen_specific_private[type]); + + return global_keys[type].offset; +} + +/* Table of devPrivates offsets */ +static const int offsets[] = { + -1, /* RT_NONE */ + offsetof(WindowRec, devPrivates), /* RT_WINDOW */ + offsetof(PixmapRec, devPrivates), /* RT_PIXMAP */ + offsetof(GC, devPrivates), /* RT_GC */ + -1, /* RT_FONT */ + offsetof(CursorRec, devPrivates), /* RT_CURSOR */ + offsetof(ColormapRec, devPrivates), /* RT_COLORMAP */ +}; + +#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; + if (type < NUM_OFFSETS) + return offsets[type]; + return -1; +} + +/* + * Screen-specific privates + */ + +extern _X_EXPORT Bool +dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key, + DevPrivateType type, unsigned size) +{ + int offset; + unsigned bytes; + + if (!screen_specific_private[type]) + FatalError("Attempt to allocate screen-specific private storage for type %s\n", + key_names[type]); + + if (key->initialized) { + assert(size == key->size); + return TRUE; + } + + /* Compute required space */ + bytes = size; + if (size == 0) + bytes = sizeof(void *); + + /* align to void * size */ + bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1); + + assert (!allocated_early[type]); + assert (!pScreen->screenSpecificPrivates[type].created); + offset = pScreen->screenSpecificPrivates[type].offset; + pScreen->screenSpecificPrivates[type].offset += bytes; + + /* Setup this key */ + key->offset = offset; + key->size = size; + key->initialized = TRUE; + key->type = type; + key->allocated = FALSE; + key->next = pScreen->screenSpecificPrivates[type].key; + pScreen->screenSpecificPrivates[type].key = key; + + return TRUE; +} + +/* Clean up screen-specific privates before CloseScreen */ +void +dixFreeScreenSpecificPrivates(ScreenPtr pScreen) +{ +} + +/* Initialize screen-specific privates in AddScreen */ +void +dixInitScreenSpecificPrivates(ScreenPtr pScreen) +{ + DevPrivateType t; + + for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) + pScreen->screenSpecificPrivates[t].offset = global_keys[t].offset; +} + +/* Initialize screen-specific privates in AddScreen */ +void +_dixInitScreenPrivates(ScreenPtr pScreen, PrivatePtr *privates, void *addr, DevPrivateType type) +{ + int privates_size; + assert (screen_specific_private[type]); + + if (pScreen) { + privates_size = pScreen->screenSpecificPrivates[type].offset; + pScreen->screenSpecificPrivates[type].created++; + } + else + privates_size = global_keys[type].offset; + + global_keys[type].created++; + if (xselinux_private[type]) + global_keys[PRIVATE_XSELINUX].created++; + if (privates_size == 0) + addr = 0; + *privates = addr; + memset(addr, '\0', privates_size); +} + +void * +_dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen, + unsigned baseSize, + unsigned clear, + unsigned offset, + DevPrivateType type) +{ + unsigned totalSize; + void *object; + PrivatePtr privates; + PrivatePtr *devPrivates; + int privates_size; + + assert(type > PRIVATE_SCREEN && type < PRIVATE_LAST); + assert (screen_specific_private[type]); + + if (pScreen) + privates_size = pScreen->screenSpecificPrivates[type].offset; + else + privates_size = global_keys[type].offset; + /* round up so that void * is aligned */ + baseSize = (baseSize + sizeof(void *) - 1) & ~(sizeof(void *) - 1); + totalSize = baseSize + privates_size; + object = malloc(totalSize); + if (!object) + return NULL; + + memset(object, '\0', clear); + privates = (PrivatePtr) (((char *) object) + baseSize); + devPrivates = (PrivatePtr *) ((char *) object + offset); + + _dixInitScreenPrivates(pScreen, devPrivates, privates, type); + + return object; +} + +int +dixScreenSpecificPrivatesSize(ScreenPtr pScreen, DevPrivateType type) +{ + assert(type >= PRIVATE_SCREEN && type < PRIVATE_LAST); + + if (screen_specific_private[type]) + return pScreen->screenSpecificPrivates[type].offset; + else + return global_keys[type].offset; +} + +void +dixPrivateUsage(void) +{ + int objects = 0; + int bytes = 0; + int alloc = 0; + DevPrivateType t; + + for (t = PRIVATE_XSELINUX + 1; t < PRIVATE_LAST; t++) { + if (global_keys[t].offset) { + ErrorF + ("%s: %d objects of %d bytes = %d total bytes %d private allocs\n", + key_names[t], global_keys[t].created, global_keys[t].offset, + global_keys[t].created * global_keys[t].offset, global_keys[t].allocated); + bytes += global_keys[t].created * global_keys[t].offset; + objects += global_keys[t].created; + alloc += global_keys[t].allocated; + } + } + ErrorF("TOTAL: %d objects, %d bytes, %d allocs\n", objects, bytes, alloc); +} + +void +dixResetPrivates(void) +{ + DevPrivateType t; + + for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) { + DevPrivateKey key, next; + + for (key = global_keys[t].key; key; key = next) { + next = key->next; + key->offset = 0; + key->initialized = FALSE; + key->size = 0; + key->type = 0; + if (key->allocated) + free(key); + } + if (global_keys[t].created) { + ErrorF("%d %ss still allocated at reset\n", + global_keys[t].created, key_names[t]); + dixPrivateUsage(); + } + global_keys[t].key = NULL; + global_keys[t].offset = 0; + global_keys[t].created = 0; + global_keys[t].allocated = 0; + } +} diff --git a/dix/property.c b/dix/property.c new file mode 100644 index 0000000..dec4090 --- /dev/null +++ b/dix/property.c @@ -0,0 +1,632 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "windowstr.h" +#include "propertyst.h" +#include "dixstruct.h" +#include "dispatch.h" +#include "swaprep.h" +#include "xace.h" + +/***************************************************************** + * Property Stuff + * + * dixLookupProperty, dixChangeProperty, DeleteProperty + * + * Properties belong to windows. The list of properties should not be + * traversed directly. Instead, use the three functions listed above. + * + *****************************************************************/ + +#ifdef notdef +static void +PrintPropertys(WindowPtr pWin) +{ + PropertyPtr pProp; + int j; + + pProp = pWin->userProps; + while (pProp) { + ErrorF("[dix] %x %x\n", pProp->propertyName, pProp->type); + ErrorF("[dix] property format: %d\n", pProp->format); + ErrorF("[dix] property data: \n"); + for (j = 0; j < (pProp->format / 8) * pProp->size; j++) + ErrorF("[dix] %c\n", pProp->data[j]); + pProp = pProp->next; + } +} +#endif + +int +dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName, + ClientPtr client, Mask access_mode) +{ + PropertyPtr pProp; + int rc = BadMatch; + + client->errorValue = propertyName; + + for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) + if (pProp->propertyName == propertyName) + break; + + if (pProp) + rc = XaceHookPropertyAccess(client, pWin, &pProp, access_mode); + *result = pProp; + return rc; +} + +static void +deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom) +{ + xEvent event = { + .u.property.window = pWin->drawable.id, + .u.property.state = state, + .u.property.atom = atom, + .u.property.time = currentTime.milliseconds + }; + event.u.u.type = PropertyNotify; + DeliverEvents(pWin, &event, 1, (WindowPtr) NULL); +} + +int +ProcRotateProperties(ClientPtr client) +{ + int i, j, delta, rc; + + REQUEST(xRotatePropertiesReq); + WindowPtr pWin; + Atom *atoms; + PropertyPtr *props; /* array of pointer */ + PropertyPtr pProp, saved; + + REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); + UpdateCurrentTime(); + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); + if (rc != Success || stuff->nAtoms <= 0) + return rc; + + atoms = (Atom *) &stuff[1]; + props = malloc(stuff->nAtoms * sizeof(PropertyPtr)); + saved = malloc(stuff->nAtoms * sizeof(PropertyRec)); + if (!props || !saved) { + rc = BadAlloc; + goto out; + } + + for (i = 0; i < stuff->nAtoms; i++) { + if (!ValidAtom(atoms[i])) { + rc = BadAtom; + client->errorValue = atoms[i]; + goto out; + } + for (j = i + 1; j < stuff->nAtoms; j++) + if (atoms[j] == atoms[i]) { + rc = BadMatch; + goto out; + } + + rc = dixLookupProperty(&pProp, pWin, atoms[i], client, + DixReadAccess | DixWriteAccess); + if (rc != Success) + goto out; + + props[i] = pProp; + saved[i] = *pProp; + } + delta = stuff->nPositions; + + /* If the rotation is a complete 360 degrees, then moving the properties + around and generating PropertyNotify events should be skipped. */ + + if (abs(delta) % stuff->nAtoms) { + while (delta < 0) /* faster if abs value is small */ + delta += stuff->nAtoms; + for (i = 0; i < stuff->nAtoms; i++) { + j = (i + delta) % stuff->nAtoms; + deliverPropertyNotifyEvent(pWin, PropertyNewValue, atoms[i]); + + /* Preserve name and devPrivates */ + props[j]->type = saved[i].type; + props[j]->format = saved[i].format; + props[j]->size = saved[i].size; + props[j]->data = saved[i].data; + } + } + out: + free(saved); + free(props); + return rc; +} + +int +ProcChangeProperty(ClientPtr client) +{ + WindowPtr pWin; + char format, mode; + unsigned long len; + int sizeInBytes, totalSize, err; + + REQUEST(xChangePropertyReq); + + REQUEST_AT_LEAST_SIZE(xChangePropertyReq); + UpdateCurrentTime(); + format = stuff->format; + mode = stuff->mode; + if ((mode != PropModeReplace) && (mode != PropModeAppend) && + (mode != PropModePrepend)) { + client->errorValue = mode; + return BadValue; + } + if ((format != 8) && (format != 16) && (format != 32)) { + client->errorValue = format; + return BadValue; + } + len = stuff->nUnits; + if (len > bytes_to_int32(0xffffffff - sizeof(xChangePropertyReq))) + return BadLength; + sizeInBytes = format >> 3; + totalSize = len * sizeInBytes; + REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize); + + err = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); + if (err != Success) + return err; + if (!ValidAtom(stuff->property)) { + client->errorValue = stuff->property; + return BadAtom; + } + if (!ValidAtom(stuff->type)) { + client->errorValue = stuff->type; + return BadAtom; + } + + err = dixChangeWindowProperty(client, pWin, stuff->property, stuff->type, + (int) format, (int) mode, len, &stuff[1], + TRUE); + if (err != Success) + return err; + else + return Success; +} + +int +dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, + Atom type, int format, int mode, unsigned long len, + pointer value, Bool sendevent) +{ + PropertyPtr pProp; + PropertyRec savedProp; + int sizeInBytes, totalSize, rc; + unsigned char *data; + Mask access_mode; + + sizeInBytes = format >> 3; + totalSize = len * sizeInBytes; + access_mode = (mode == PropModeReplace) ? DixWriteAccess : DixBlendAccess; + + /* first see if property already exists */ + rc = dixLookupProperty(&pProp, pWin, property, pClient, access_mode); + + if (rc == BadMatch) { /* just add to list */ + if (!pWin->optional && !MakeWindowOptional(pWin)) + return BadAlloc; + pProp = dixAllocateObjectWithPrivates(PropertyRec, PRIVATE_PROPERTY); + if (!pProp) + return BadAlloc; + data = malloc(totalSize); + if (!data && len) { + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); + return BadAlloc; + } + memcpy(data, value, totalSize); + pProp->propertyName = property; + pProp->type = type; + pProp->format = format; + pProp->data = data; + pProp->size = len; + rc = XaceHookPropertyAccess(pClient, pWin, &pProp, + DixCreateAccess | DixWriteAccess); + if (rc != Success) { + free(data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); + pClient->errorValue = property; + return rc; + } + pProp->next = pWin->optional->userProps; + pWin->optional->userProps = pProp; + } + else if (rc == Success) { + /* To append or prepend to a property the request format and type + must match those of the already defined property. The + existing format and type are irrelevant when using the mode + "PropModeReplace" since they will be written over. */ + + if ((format != pProp->format) && (mode != PropModeReplace)) + return BadMatch; + if ((pProp->type != type) && (mode != PropModeReplace)) + return BadMatch; + + /* save the old values for later */ + savedProp = *pProp; + + if (mode == PropModeReplace) { + data = malloc(totalSize); + if (!data && len) + return BadAlloc; + memcpy(data, value, totalSize); + pProp->data = data; + pProp->size = len; + pProp->type = type; + pProp->format = format; + } + else if (len == 0) { + /* do nothing */ + } + else if (mode == PropModeAppend) { + data = malloc((pProp->size + len) * sizeInBytes); + if (!data) + return BadAlloc; + memcpy(data, pProp->data, pProp->size * sizeInBytes); + memcpy(data + pProp->size * sizeInBytes, value, totalSize); + pProp->data = data; + pProp->size += len; + } + else if (mode == PropModePrepend) { + data = malloc(sizeInBytes * (len + pProp->size)); + if (!data) + return BadAlloc; + memcpy(data + totalSize, pProp->data, pProp->size * sizeInBytes); + memcpy(data, value, totalSize); + pProp->data = data; + pProp->size += len; + } + + /* Allow security modules to check the new content */ + access_mode |= DixPostAccess; + rc = XaceHookPropertyAccess(pClient, pWin, &pProp, access_mode); + if (rc == Success) { + if (savedProp.data != pProp->data) + free(savedProp.data); + } + else { + if (savedProp.data != pProp->data) + free(pProp->data); + *pProp = savedProp; + return rc; + } + } + else + return rc; + + if (sendevent) + deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp->propertyName); + + return Success; +} + +int +ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, + int mode, unsigned long len, pointer value, Bool sendevent) +{ + return dixChangeWindowProperty(serverClient, pWin, property, type, format, + mode, len, value, sendevent); +} + +int +DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) +{ + PropertyPtr pProp, prevProp; + int rc; + + rc = dixLookupProperty(&pProp, pWin, propName, client, DixDestroyAccess); + if (rc == BadMatch) + return Success; /* Succeed if property does not exist */ + + if (rc == Success) { + if (pWin->optional->userProps == pProp) { + /* Takes care of head */ + if (!(pWin->optional->userProps = pProp->next)) + CheckWindowOptionalNeed(pWin); + } + else { + /* Need to traverse to find the previous element */ + prevProp = pWin->optional->userProps; + while (prevProp->next != pProp) + prevProp = prevProp->next; + prevProp->next = pProp->next; + } + + deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); + free(pProp->data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); + } + return rc; +} + +void +DeleteAllWindowProperties(WindowPtr pWin) +{ + PropertyPtr pProp, pNextProp; + + pProp = wUserProps(pWin); + while (pProp) { + deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); + pNextProp = pProp->next; + free(pProp->data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); + pProp = pNextProp; + } + + if (pWin->optional) + pWin->optional->userProps = NULL; +} + +static int +NullPropertyReply(ClientPtr client, ATOM propertyType, int format) +{ + xGetPropertyReply reply = { + .type = X_Reply, + .format = format, + .sequenceNumber = client->sequence, + .length = 0, + .propertyType = propertyType, + .bytesAfter = 0, + .nItems = 0 + }; + WriteReplyToClient(client, sizeof(xGenericReply), &reply); + return Success; +} + +/***************** + * GetProperty + * If type Any is specified, returns the property from the specified + * window regardless of its type. If a type is specified, returns the + * property only if its type equals the specified type. + * If delete is True and a property is returned, the property is also + * deleted from the window and a PropertyNotify event is generated on the + * window. + *****************/ + +int +ProcGetProperty(ClientPtr client) +{ + PropertyPtr pProp, prevProp; + unsigned long n, len, ind; + int rc; + WindowPtr pWin; + xGetPropertyReply reply; + Mask win_mode = DixGetPropAccess, prop_mode = DixReadAccess; + + REQUEST(xGetPropertyReq); + + REQUEST_SIZE_MATCH(xGetPropertyReq); + if (stuff->delete) { + UpdateCurrentTime(); + win_mode |= DixSetPropAccess; + prop_mode |= DixDestroyAccess; + } + rc = dixLookupWindow(&pWin, stuff->window, client, win_mode); + if (rc != Success) + return rc; + + if (!ValidAtom(stuff->property)) { + client->errorValue = stuff->property; + return BadAtom; + } + if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) { + client->errorValue = stuff->delete; + return BadValue; + } + if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) { + client->errorValue = stuff->type; + return BadAtom; + } + + rc = dixLookupProperty(&pProp, pWin, stuff->property, client, prop_mode); + if (rc == BadMatch) + return NullPropertyReply(client, None, 0); + else if (rc != Success) + return rc; + + /* If the request type and actual type don't match. Return the + property information, but not the data. */ + + if (((stuff->type != pProp->type) && (stuff->type != AnyPropertyType)) + ) { + reply = (xGetPropertyReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .bytesAfter = pProp->size, + .format = pProp->format, + .length = 0, + .nItems = 0, + .propertyType = pProp->type + }; + WriteReplyToClient(client, sizeof(xGenericReply), &reply); + return Success; + } + +/* + * Return type, format, value to client + */ + n = (pProp->format / 8) * pProp->size; /* size (bytes) of prop */ + ind = stuff->longOffset << 2; + + /* If longOffset is invalid such that it causes "len" to + be negative, it's a value error. */ + + if (n < ind) { + client->errorValue = stuff->longOffset; + return BadValue; + } + + len = min(n - ind, 4 * stuff->longLength); + + reply = (xGetPropertyReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .bytesAfter = n - (ind + len), + .format = pProp->format, + .length = bytes_to_int32(len), + .nItems = len / (pProp->format / 8), + .propertyType = pProp->type + }; + + if (stuff->delete && (reply.bytesAfter == 0)) + deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); + + WriteReplyToClient(client, sizeof(xGenericReply), &reply); + if (len) { + switch (reply.format) { + case 32: + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; + break; + case 16: + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; + break; + default: + client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; + break; + } + WriteSwappedDataToClient(client, len, (char *) pProp->data + ind); + } + + if (stuff->delete && (reply.bytesAfter == 0)) { + /* Delete the Property */ + if (pWin->optional->userProps == pProp) { + /* Takes care of head */ + if (!(pWin->optional->userProps = pProp->next)) + CheckWindowOptionalNeed(pWin); + } + else { + /* Need to traverse to find the previous element */ + prevProp = pWin->optional->userProps; + while (prevProp->next != pProp) + prevProp = prevProp->next; + prevProp->next = pProp->next; + } + + free(pProp->data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); + } + return Success; +} + +int +ProcListProperties(ClientPtr client) +{ + Atom *pAtoms = NULL, *temppAtoms; + xListPropertiesReply xlpr; + int rc, numProps = 0; + WindowPtr pWin; + PropertyPtr pProp, realProp; + + REQUEST(xResourceReq); + + REQUEST_SIZE_MATCH(xResourceReq); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListPropAccess); + if (rc != Success) + return rc; + + for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) + numProps++; + + if (numProps && !(pAtoms = malloc(numProps * sizeof(Atom)))) + return BadAlloc; + + numProps = 0; + temppAtoms = pAtoms; + for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) { + realProp = pProp; + rc = XaceHookPropertyAccess(client, pWin, &realProp, DixGetAttrAccess); + if (rc == Success && realProp == pProp) { + *temppAtoms++ = pProp->propertyName; + numProps++; + } + } + + xlpr = (xListPropertiesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(numProps * sizeof(Atom)), + .nProperties = numProps + }; + WriteReplyToClient(client, sizeof(xGenericReply), &xlpr); + if (numProps) { + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); + } + free(pAtoms); + return Success; +} + +int +ProcDeleteProperty(ClientPtr client) +{ + WindowPtr pWin; + + REQUEST(xDeletePropertyReq); + int result; + + REQUEST_SIZE_MATCH(xDeletePropertyReq); + UpdateCurrentTime(); + result = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); + if (result != Success) + return result; + if (!ValidAtom(stuff->property)) { + client->errorValue = stuff->property; + return BadAtom; + } + + return DeleteProperty(client, pWin, stuff->property); +} diff --git a/dix/protocol.txt b/dix/protocol.txt new file mode 100644 index 0000000..8e152ed --- /dev/null +++ b/dix/protocol.txt @@ -0,0 +1,1103 @@ +# Registry of protocol names used by X Server +# This will eventually be replaced by server-side XCB +# +# Format is Xnnn <extension-name>:<object-name> +# R=Request, V=Event, E=Error +# +# This is a security-sensitive file, please set permissions as appropriate. +# +R001 Adobe-DPS-Extension:Init +R002 Adobe-DPS-Extension:CreateContext +R003 Adobe-DPS-Extension:CreateSpace +R004 Adobe-DPS-Extension:GiveInput +R005 Adobe-DPS-Extension:GetStatus +R006 Adobe-DPS-Extension:DestroySpace +R007 Adobe-DPS-Extension:Reset +R008 Adobe-DPS-Extension:NotifyContext +R009 Adobe-DPS-Extension:CreateContextFromID +R010 Adobe-DPS-Extension:XIDFromContext +R011 Adobe-DPS-Extension:ContextFromXID +R012 Adobe-DPS-Extension:SetStatusMask +R013 Adobe-DPS-Extension:CreateSecureContext +R014 Adobe-DPS-Extension:NotifyWhenReady +R000 Apple-DRI:QueryVersion +R001 Apple-DRI:QueryDirectRenderingCapable +R002 Apple-DRI:CreateSurface +R003 Apple-DRI:DestroySurface +R004 Apple-DRI:AuthConnection +V000 Apple-DRI:ObsoleteEvent1 +V001 Apple-DRI:ObsoleteEvent2 +V002 Apple-DRI:ObsoleteEvent3 +V003 Apple-DRI:SurfaceNotify +E000 Apple-DRI:ClientNotLocal +E001 Apple-DRI:OperationNotSupported +R000 Apple-WM:QueryVersion +R001 Apple-WM:FrameGetRect +R002 Apple-WM:FrameHitTest +R003 Apple-WM:FrameDraw +R004 Apple-WM:DisableUpdate +R005 Apple-WM:ReenableUpdate +R006 Apple-WM:SelectInput +R007 Apple-WM:SetWindowMenuCheck +R008 Apple-WM:SetFrontProcess +R009 Apple-WM:SetWindowLevel +R010 Apple-WM:SetCanQuit +R011 Apple-WM:SetWindowMenu +V000 Apple-WM:ControllerNotify +V001 Apple-WM:ActivationNotify +V002 Apple-WM:PasteboardNotify +E000 Apple-WM:ClientNotLocal +E001 Apple-WM:OperationNotSupported +R000 BIG-REQUESTS:Enable +R000 Composite:CompositeQueryVersion +R001 Composite:CompositeRedirectWindow +R002 Composite:CompositeRedirectSubwindows +R003 Composite:CompositeUnredirectWindow +R004 Composite:CompositeUnredirectSubwindows +R005 Composite:CompositeCreateRegionFromBorderClip +R006 Composite:CompositeNameWindowPixmap +R007 Composite:CompositeGetOverlayWindow +R008 Composite:CompositeReleaseOverlayWindow +R000 DAMAGE:QueryVersion +R001 DAMAGE:Create +R002 DAMAGE:Destroy +R003 DAMAGE:Subtract +R004 DAMAGE:Add +V000 DAMAGE:Notify +E000 DAMAGE:BadDamage +R000 DEC-XTRAP:Reset +R001 DEC-XTRAP:GetAvailable +R002 DEC-XTRAP:Config +R003 DEC-XTRAP:StartTrap +R004 DEC-XTRAP:StopTrap +R005 DEC-XTRAP:GetCurrent +R006 DEC-XTRAP:GetStatistics +R007 DEC-XTRAP:SimulateXEvent +R008 DEC-XTRAP:GetVersion +R009 DEC-XTRAP:GetLastInpTime +V000 DEC-XTRAP:Event +E002 DEC-XTRAP:BadIO +E004 DEC-XTRAP:BadStatistics +E005 DEC-XTRAP:BadDevices +E007 DEC-XTRAP:BadScreen +E008 DEC-XTRAP:BadSwapReq +R000 DMX:DMXQueryVersion +R001 DMX:DMXGetScreenCount +R002 DMX:DMXGetScreenInfoDEPRECATED +R003 DMX:DMXGetWindowAttributes +R004 DMX:DMXGetInputCount +R005 DMX:DMXGetInputAttributes +R006 DMX:DMXForceWindowCreationDEPRECATED +R007 DMX:DMXReconfigureScreenDEPRECATED +R008 DMX:DMXSync +R009 DMX:DMXForceWindowCreation +R010 DMX:DMXGetScreenAttributes +R011 DMX:DMXChangeScreensAttributes +R012 DMX:DMXAddScreen +R013 DMX:DMXRemoveScreen +R014 DMX:DMXGetDesktopAttributes +R015 DMX:DMXChangeDesktopAttributes +R016 DMX:DMXAddInput +R017 DMX:DMXRemoveInput +R000 DOUBLE-BUFFER:GetVersion +R001 DOUBLE-BUFFER:AllocateBackBufferName +R002 DOUBLE-BUFFER:DeallocateBackBufferName +R003 DOUBLE-BUFFER:SwapBuffers +R004 DOUBLE-BUFFER:BeginIdiom +R005 DOUBLE-BUFFER:EndIdiom +R006 DOUBLE-BUFFER:GetVisualInfo +R007 DOUBLE-BUFFER:GetBackBufferAttributes +E000 DOUBLE-BUFFER:BadBuffer +R000 DPMS:GetVersion +R001 DPMS:Capable +R002 DPMS:GetTimeouts +R003 DPMS:SetTimeouts +R004 DPMS:Enable +R005 DPMS:Disable +R006 DPMS:ForceLevel +R007 DPMS:Info +R000 DRI2:QueryVersion +R001 DRI2:Connect +R002 DRI2:Authenticate +R003 DRI2:CreateDrawable +R004 DRI2:DestroyDrawable +R005 DRI2:GetBuffers +R006 DRI2:CopyRegion +R007 DRI2:GetBuffersWithFormat +R000 Extended-Visual-Information:QueryVersion +R001 Extended-Visual-Information:GetVisualInfo +R000 FontCache:QueryVersion +R001 FontCache:GetCacheSettings +R002 FontCache:ChangeCacheSettings +R003 FontCache:GetCacheStatistics +E000 FontCache:BadProtocol +E001 FontCache:CannotAllocMemory +R001 GLX: +R002 GLX:Large +R003 GLX:CreateContext +R004 GLX:DestroyContext +R005 GLX:MakeCurrent +R006 GLX:IsDirect +R007 GLX:QueryVersion +R008 GLX:WaitGL +R009 GLX:WaitX +R010 GLX:CopyContext +R011 GLX:SwapBuffers +R012 GLX:UseXFont +R013 GLX:CreateGLXPixmap +R014 GLX:GetVisualConfigs +R015 GLX:DestroyGLXPixmap +R016 GLX:VendorPrivate +R017 GLX:VendorPrivateWithReply +R018 GLX:QueryExtensionsString +R019 GLX:QueryServerString +R020 GLX:ClientInfo +R101 GLX:NewList +R102 GLX:EndList +R103 GLX:DeleteLists +R104 GLX:GenLists +R105 GLX:FeedbackBuffer +R106 GLX:SelectBuffer +R107 GLX:Mode +R108 GLX:Finish +R109 GLX:PixelStoref +R110 GLX:PixelStorei +R111 GLX:ReadPixels +R112 GLX:GetBooleanv +R113 GLX:GetClipPlane +R114 GLX:GetDoublev +R115 GLX:GetError +R116 GLX:GetFloatv +R117 GLX:GetIntegerv +R118 GLX:GetLightfv +R119 GLX:GetLightiv +R120 GLX:GetMapdv +R121 GLX:GetMapfv +R122 GLX:GetMapiv +R123 GLX:GetMaterialfv +R124 GLX:GetMaterialiv +R125 GLX:GetPixelfv +R126 GLX:GetPixelMapuiv +R127 GLX:GetPixelMapusv +R128 GLX:GetPolygonStipple +R129 GLX:GetString +R130 GLX:GetTexEnvfv +R131 GLX:GetTexEnviv +R132 GLX:GetTexGendv +R133 GLX:GetTexGenfv +R134 GLX:GetTexGeniv +R135 GLX:GetTexImage +R136 GLX:GetTexParameterfv +R137 GLX:GetTexParameteriv +R138 GLX:GetTexLevelParameterfv +R139 GLX:GetTexLevelParameteriv +R140 GLX:IsEnabled +R141 GLX:IsList +R142 GLX:Flush +E000 GLX:BadContext +E001 GLX:BadContextState +E002 GLX:BadDrawable +E003 GLX:BadPixmap +E004 GLX:BadContextTag +E005 GLX:BadCurrentWindow +E006 GLX:BadRenderRequest +E007 GLX:BadLargeRequest +E008 GLX:UnsupportedPrivateRequest +R000 LBX:QueryVersion +R001 LBX:StartProxy +R002 LBX:StopProxy +R003 LBX:Switch +R004 LBX:NewClient +R005 LBX:CloseClient +R006 LBX:ModifySequence +R007 LBX:AllowMotion +R008 LBX:IncrementPixel +R009 LBX:Delta +R010 LBX:GetModifierMapping +R011 LBX:QueryTag +R012 LBX:InvalidateTag +R013 LBX:PolyPoint +R014 LBX:PolyLine +R015 LBX:PolySegment +R016 LBX:PolyRectangle +R017 LBX:PolyArc +R018 LBX:FillPoly +R019 LBX:PolyFillRectangle +R020 LBX:PolyFillArc +R021 LBX:GetKeyboardMapping +R022 LBX:QueryFont +R023 LBX:ChangeProperty +R024 LBX:GetProperty +R025 LBX:TagData +R026 LBX:CopyArea +R027 LBX:CopyPlane +R028 LBX:PolyText8 +R029 LBX:PolyText16 +R030 LBX:ImageText8 +R031 LBX:ImageText16 +R032 LBX:QueryExtension +R033 LBX:PutImage +R034 LBX:GetImage +R035 LBX:BeginLargeRequest +R036 LBX:LargeRequestData +R037 LBX:EndLargeRequest +R038 LBX:InternAtoms +R039 LBX:GetWinAttrAndGeom +R040 LBX:GrabCmap +R041 LBX:ReleaseCmap +R042 LBX:AllocColor +R043 LBX:Sync +E000 LBX:BadLbxClient +R000 MIT-SCREEN-SAVER:QueryVersion +R001 MIT-SCREEN-SAVER:QueryInfo +R002 MIT-SCREEN-SAVER:SelectInput +R003 MIT-SCREEN-SAVER:SetAttributes +R004 MIT-SCREEN-SAVER:UnsetAttributes +R005 MIT-SCREEN-SAVER:Suspend +V000 MIT-SCREEN-SAVER:Notify +R000 MIT-SHM:QueryVersion +R001 MIT-SHM:Attach +R002 MIT-SHM:Detach +R003 MIT-SHM:PutImage +R004 MIT-SHM:GetImage +R005 MIT-SHM:CreatePixmap +V000 MIT-SHM:Completion +E000 MIT-SHM:BadShmSeg +R000 MIT-SUNDRY-NONSTANDARD:SetBugMode +R001 MIT-SUNDRY-NONSTANDARD:GetBugMode +R000 Multi-Buffering:GetBufferVersion +R001 Multi-Buffering:CreateImageBuffers +R002 Multi-Buffering:DestroyImageBuffers +R003 Multi-Buffering:DisplayImageBuffers +R004 Multi-Buffering:SetMBufferAttributes +R005 Multi-Buffering:GetMBufferAttributes +R006 Multi-Buffering:SetBufferAttributes +R007 Multi-Buffering:GetBufferAttributes +R008 Multi-Buffering:GetBufferInfo +R009 Multi-Buffering:CreateStereoWindow +R010 Multi-Buffering:ClearImageBufferArea +V000 Multi-Buffering:ClobberNotify +V001 Multi-Buffering:UpdateNotify +E000 Multi-Buffering:BadBuffer +R000 RANDR:QueryVersion +R001 RANDR:OldGetScreenInfo +R002 RANDR:SetScreenConfig +R003 RANDR:OldScreenChangeSelectInput +R004 RANDR:SelectInput +R005 RANDR:GetScreenInfo +R006 RANDR:GetScreenSizeRange +R007 RANDR:SetScreenSize +R008 RANDR:GetScreenResources +R009 RANDR:GetOutputInfo +R010 RANDR:ListOutputProperties +R011 RANDR:QueryOutputProperty +R012 RANDR:ConfigureOutputProperty +R013 RANDR:ChangeOutputProperty +R014 RANDR:DeleteOutputProperty +R015 RANDR:GetOutputProperty +R016 RANDR:CreateMode +R017 RANDR:DestroyMode +R018 RANDR:AddOutputMode +R019 RANDR:DeleteOutputMode +R020 RANDR:GetCrtcInfo +R021 RANDR:SetCrtcConfig +R022 RANDR:GetCrtcGammaSize +R023 RANDR:GetCrtcGamma +R024 RANDR:SetCrtcGamma +R025 RANDR:GetScreenResourcesCurrent +R026 RANDR:SetCrtcTransform +R027 RANDR:GetCrtcTransform +R028 RANDR:GetPanning +R029 RANDR:SetPanning +R030 RANDR:SetOutputPrimary +R031 RANDR:GetOutputPrimary +V000 RANDR:ScreenChangeNotify +V001 RANDR:Notify +E000 RANDR:BadRROutput +E001 RANDR:BadRRCrtc +E002 RANDR:BadRRMode +R000 RECORD:QueryVersion +R001 RECORD:CreateContext +R002 RECORD:RegisterClients +R003 RECORD:UnregisterClients +R004 RECORD:GetContext +R005 RECORD:EnableContext +R006 RECORD:DisableContext +R007 RECORD:FreeContext +E000 RECORD:BadContext +R000 RENDER:QueryVersion +R001 RENDER:QueryPictFormats +R002 RENDER:QueryPictIndexValues +R003 RENDER:QueryDithers +R004 RENDER:CreatePicture +R005 RENDER:ChangePicture +R006 RENDER:SetPictureClipRectangles +R007 RENDER:FreePicture +R008 RENDER:Composite +R009 RENDER:Scale +R010 RENDER:Trapezoids +R011 RENDER:Triangles +R012 RENDER:TriStrip +R013 RENDER:TriFan +R014 RENDER:ColorTrapezoids +R015 RENDER:ColorTriangles +R016 RENDER:Transform +R017 RENDER:CreateGlyphSet +R018 RENDER:ReferenceGlyphSet +R019 RENDER:FreeGlyphSet +R020 RENDER:AddGlyphs +R021 RENDER:AddGlyphsFromPicture +R022 RENDER:FreeGlyphs +R023 RENDER:CompositeGlyphs8 +R024 RENDER:CompositeGlyphs16 +R025 RENDER:CompositeGlyphs32 +R026 RENDER:FillRectangles +R027 RENDER:CreateCursor +R028 RENDER:SetPictureTransform +R029 RENDER:QueryFilters +R030 RENDER:SetPictureFilter +R031 RENDER:CreateAnimCursor +R032 RENDER:AddTraps +R033 RENDER:CreateSolidFill +R034 RENDER:CreateLinearGradient +R035 RENDER:CreateRadialGradient +R036 RENDER:CreateConicalGradient +E000 RENDER:BadPictFormat +E001 RENDER:BadPicture +E002 RENDER:BadPictOp +E003 RENDER:BadGlyphSet +E004 RENDER:BadGlyph +R000 SECURITY:QueryVersion +R001 SECURITY:GenerateAuthorization +R002 SECURITY:RevokeAuthorization +V000 SECURITY:AuthorizationRevoked +E000 SECURITY:BadAuthorization +E001 SECURITY:BadAuthorizationProtocol +R000 SELinux:SELinuxQueryVersion +R001 SELinux:SELinuxSetDeviceCreateContext +R002 SELinux:SELinuxGetDeviceCreateContext +R003 SELinux:SELinuxSetDeviceContext +R004 SELinux:SELinuxGetDeviceContext +R005 SELinux:SELinuxSetWindowCreateContext +R006 SELinux:SELinuxGetWindowCreateContext +R007 SELinux:SELinuxGetWindowContext +R008 SELinux:SELinuxSetPropertyCreateContext +R009 SELinux:SELinuxGetPropertyCreateContext +R010 SELinux:SELinuxSetPropertyUseContext +R011 SELinux:SELinuxGetPropertyUseContext +R012 SELinux:SELinuxGetPropertyContext +R013 SELinux:SELinuxGetPropertyDataContext +R014 SELinux:SELinuxListProperties +R015 SELinux:SELinuxSetSelectionCreateContext +R016 SELinux:SELinuxGetSelectionCreateContext +R017 SELinux:SELinuxSetSelectionUseContext +R018 SELinux:SELinuxGetSelectionUseContext +R019 SELinux:SELinuxGetSelectionContext +R020 SELinux:SELinuxGetSelectionDataContext +R021 SELinux:SELinuxListSelections +R022 SELinux:SELinuxGetClientContext +R000 SHAPE:QueryVersion +R001 SHAPE:Rectangles +R002 SHAPE:Mask +R003 SHAPE:Combine +R004 SHAPE:Offset +R005 SHAPE:QueryExtents +R006 SHAPE:SelectInput +R007 SHAPE:InputSelected +R008 SHAPE:GetRectangles +V000 SHAPE:Notify +R000 SYNC:Initialize +R001 SYNC:ListSystemCounters +R002 SYNC:CreateCounter +R003 SYNC:SetCounter +R004 SYNC:ChangeCounter +R005 SYNC:QueryCounter +R006 SYNC:DestroyCounter +R007 SYNC:Await +R008 SYNC:CreateAlarm +R009 SYNC:ChangeAlarm +R010 SYNC:QueryAlarm +R011 SYNC:DestroyAlarm +R012 SYNC:SetPriority +R013 SYNC:GetPriority +V000 SYNC:CounterNotify +V001 SYNC:AlarmNotify +E000 SYNC:BadCounter +E001 SYNC:BadAlarm +R000 TOG-CUP:QueryVersion +R001 TOG-CUP:GetReservedColormapEntries +R002 TOG-CUP:StoreColors +R000 Windows-WM:QueryVersion +R001 Windows-WM:FrameGetRect +R002 Windows-WM:FrameDraw +R003 Windows-WM:FrameSetTitle +R004 Windows-WM:DisableUpdate +R005 Windows-WM:ReenableUpdate +R006 Windows-WM:SelectInput +R007 Windows-WM:SetFrontProcess +V000 Windows-WM:ControllerNotify +V001 Windows-WM:ActivationNotify +E000 Windows-WM:ClientNotLocal +E001 Windows-WM:OperationNotSupported +R000 X-Resource:QueryVersion +R001 X-Resource:QueryClients +R002 X-Resource:QueryClientResources +R003 X-Resource:QueryClientPixmapBytes +R001 X11:CreateWindow +R002 X11:ChangeWindowAttributes +R003 X11:GetWindowAttributes +R004 X11:DestroyWindow +R005 X11:DestroySubwindows +R006 X11:ChangeSaveSet +R007 X11:ReparentWindow +R008 X11:MapWindow +R009 X11:MapSubwindows +R010 X11:UnmapWindow +R011 X11:UnmapSubwindows +R012 X11:ConfigureWindow +R013 X11:CirculateWindow +R014 X11:GetGeometry +R015 X11:QueryTree +R016 X11:InternAtom +R017 X11:GetAtomName +R018 X11:ChangeProperty +R019 X11:DeleteProperty +R020 X11:GetProperty +R021 X11:ListProperties +R022 X11:SetSelectionOwner +R023 X11:GetSelectionOwner +R024 X11:ConvertSelection +R025 X11:SendEvent +R026 X11:GrabPointer +R027 X11:UngrabPointer +R028 X11:GrabButton +R029 X11:UngrabButton +R030 X11:ChangeActivePointerGrab +R031 X11:GrabKeyboard +R032 X11:UngrabKeyboard +R033 X11:GrabKey +R034 X11:UngrabKey +R035 X11:AllowEvents +R036 X11:GrabServer +R037 X11:UngrabServer +R038 X11:QueryPointer +R039 X11:GetMotionEvents +R040 X11:TranslateCoords +R041 X11:WarpPointer +R042 X11:SetInputFocus +R043 X11:GetInputFocus +R044 X11:QueryKeymap +R045 X11:OpenFont +R046 X11:CloseFont +R047 X11:QueryFont +R048 X11:QueryTextExtents +R049 X11:ListFonts +R050 X11:ListFontsWithInfo +R051 X11:SetFontPath +R052 X11:GetFontPath +R053 X11:CreatePixmap +R054 X11:FreePixmap +R055 X11:CreateGC +R056 X11:ChangeGC +R057 X11:CopyGC +R058 X11:SetDashes +R059 X11:SetClipRectangles +R060 X11:FreeGC +R061 X11:ClearArea +R062 X11:CopyArea +R063 X11:CopyPlane +R064 X11:PolyPoint +R065 X11:PolyLine +R066 X11:PolySegment +R067 X11:PolyRectangle +R068 X11:PolyArc +R069 X11:FillPoly +R070 X11:PolyFillRectangle +R071 X11:PolyFillArc +R072 X11:PutImage +R073 X11:GetImage +R074 X11:PolyText8 +R075 X11:PolyText16 +R076 X11:ImageText8 +R077 X11:ImageText16 +R078 X11:CreateColormap +R079 X11:FreeColormap +R080 X11:CopyColormapAndFree +R081 X11:InstallColormap +R082 X11:UninstallColormap +R083 X11:ListInstalledColormaps +R084 X11:AllocColor +R085 X11:AllocNamedColor +R086 X11:AllocColorCells +R087 X11:AllocColorPlanes +R088 X11:FreeColors +R089 X11:StoreColors +R090 X11:StoreNamedColor +R091 X11:QueryColors +R092 X11:LookupColor +R093 X11:CreateCursor +R094 X11:CreateGlyphCursor +R095 X11:FreeCursor +R096 X11:RecolorCursor +R097 X11:QueryBestSize +R098 X11:QueryExtension +R099 X11:ListExtensions +R100 X11:ChangeKeyboardMapping +R101 X11:GetKeyboardMapping +R102 X11:ChangeKeyboardControl +R103 X11:GetKeyboardControl +R104 X11:Bell +R105 X11:ChangePointerControl +R106 X11:GetPointerControl +R107 X11:SetScreenSaver +R108 X11:GetScreenSaver +R109 X11:ChangeHosts +R110 X11:ListHosts +R111 X11:SetAccessControl +R112 X11:SetCloseDownMode +R113 X11:KillClient +R114 X11:RotateProperties +R115 X11:ForceScreenSaver +R116 X11:SetPointerMapping +R117 X11:GetPointerMapping +R118 X11:SetModifierMapping +R119 X11:GetModifierMapping +R127 X11:NoOperation +V000 X11:X_Error +V001 X11:X_Reply +V002 X11:KeyPress +V003 X11:KeyRelease +V004 X11:ButtonPress +V005 X11:ButtonRelease +V006 X11:MotionNotify +V007 X11:EnterNotify +V008 X11:LeaveNotify +V009 X11:FocusIn +V010 X11:FocusOut +V011 X11:KeymapNotify +V012 X11:Expose +V013 X11:GraphicsExpose +V014 X11:NoExpose +V015 X11:VisibilityNotify +V016 X11:CreateNotify +V017 X11:DestroyNotify +V018 X11:UnmapNotify +V019 X11:MapNotify +V020 X11:MapRequest +V021 X11:ReparentNotify +V022 X11:ConfigureNotify +V023 X11:ConfigureRequest +V024 X11:GravityNotify +V025 X11:ResizeRequest +V026 X11:CirculateNotify +V027 X11:CirculateRequest +V028 X11:PropertyNotify +V029 X11:SelectionClear +V030 X11:SelectionRequest +V031 X11:SelectionNotify +V032 X11:ColormapNotify +V033 X11:ClientMessage +V034 X11:MappingNotify +V035 X11:GenericEvent +E000 X11:Success +E001 X11:BadRequest +E002 X11:BadValue +E003 X11:BadWindow +E004 X11:BadPixmap +E005 X11:BadAtom +E006 X11:BadCursor +E007 X11:BadFont +E008 X11:BadMatch +E009 X11:BadDrawable +E010 X11:BadAccess +E011 X11:BadAlloc +E012 X11:BadColor +E013 X11:BadGC +E014 X11:BadIDChoice +E015 X11:BadName +E016 X11:BadLength +E017 X11:BadImplementation +R001 X3D-PEX:GetExtensionInfo +R002 X3D-PEX:GetEnumeratedTypeInfo +R003 X3D-PEX:GetImpDepConstants +R004 X3D-PEX:CreateLookupTable +R005 X3D-PEX:CopyLookupTable +R006 X3D-PEX:FreeLookupTable +R007 X3D-PEX:GetTableInfo +R008 X3D-PEX:GetPredefinedEntries +R009 X3D-PEX:GetDefinedIndices +R010 X3D-PEX:GetTableEntry +R011 X3D-PEX:GetTableEntries +R012 X3D-PEX:SetTableEntries +R013 X3D-PEX:DeleteTableEntries +R014 X3D-PEX:CreatePipelineContext +R015 X3D-PEX:CopyPipelineContext +R016 X3D-PEX:FreePipelineContext +R017 X3D-PEX:GetPipelineContext +R018 X3D-PEX:ChangePipelineContext +R019 X3D-PEX:CreateRenderer +R020 X3D-PEX:FreeRenderer +R021 X3D-PEX:ChangeRenderer +R022 X3D-PEX:GetRendererAttributes +R023 X3D-PEX:GetRendererDynamics +R024 X3D-PEX:BeginRendering +R025 X3D-PEX:EndRendering +R026 X3D-PEX:BeginStructure +R027 X3D-PEX:EndStructure +R028 X3D-PEX:OutputCommands +R029 X3D-PEX:Network +R030 X3D-PEX:CreateStructure +R031 X3D-PEX:CopyStructure +R032 X3D-PEX:DestroyStructures +R033 X3D-PEX:GetStructureInfo +R034 X3D-PEX:GetElementInfo +R035 X3D-PEX:GetStructuresInNetwork +R036 X3D-PEX:GetAncestors +R037 X3D-PEX:GetDescendants +R038 X3D-PEX:FetchElements +R039 X3D-PEX:SetEditingMode +R040 X3D-PEX:SetElementPointer +R041 X3D-PEX:SetElementPointerAtLabel +R042 X3D-PEX:ElementSearch +R043 X3D-PEX:StoreElements +R044 X3D-PEX:DeleteElements +R045 X3D-PEX:DeleteElementsToLabel +R046 X3D-PEX:DeleteBetweenLabels +R047 X3D-PEX:CopyElements +R048 X3D-PEX:ChangeStructureRefs +R049 X3D-PEX:CreateNameSet +R050 X3D-PEX:CopyNameSet +R051 X3D-PEX:FreeNameSet +R052 X3D-PEX:GetNameSet +R053 X3D-PEX:ChangeNameSet +R054 X3D-PEX:CreateSearchContext +R055 X3D-PEX:CopySearchContext +R056 X3D-PEX:FreeSearchContext +R057 X3D-PEX:GetSearchContext +R058 X3D-PEX:ChangeSearchContext +R059 X3D-PEX:SearchNetwork +R060 X3D-PEX:CreatePhigsWks +R061 X3D-PEX:FreePhigsWks +R062 X3D-PEX:GetWksInfo +R063 X3D-PEX:GetDynamics +R064 X3D-PEX:GetViewRep +R065 X3D-PEX:RedrawAllStructures +R066 X3D-PEX:UpdateWorkstation +R067 X3D-PEX:RedrawClipRegion +R068 X3D-PEX:ExecuteDeferredActions +R069 X3D-PEX:SetViewPriority +R070 X3D-PEX:SetDisplayUpdateMode +R071 X3D-PEX:MapDCtoWC +R072 X3D-PEX:MapWCtoDC +R073 X3D-PEX:SetViewRep +R074 X3D-PEX:SetWksWindow +R075 X3D-PEX:SetWksViewport +R076 X3D-PEX:SetHlhsrMode +R077 X3D-PEX:SetWksBufferMode +R078 X3D-PEX:PostStructure +R079 X3D-PEX:UnpostStructure +R080 X3D-PEX:UnpostAllStructures +R081 X3D-PEX:GetWksPostings +R082 X3D-PEX:GetPickDevice +R083 X3D-PEX:ChangePickDevice +R084 X3D-PEX:CreatePickMeasure +R085 X3D-PEX:FreePickMeasure +R086 X3D-PEX:GetPickMeasure +R087 X3D-PEX:UpdatePickMeasure +R088 X3D-PEX:OpenFont +R089 X3D-PEX:CloseFont +R090 X3D-PEX:QueryFont +R091 X3D-PEX:ListFonts +R092 X3D-PEX:ListFontsWithInfo +R093 X3D-PEX:QueryTextExtents +R094 X3D-PEX:MatchRenderingTargets +R095 X3D-PEX:Escape +R096 X3D-PEX:EscapeWithReply +R097 X3D-PEX:Elements +R098 X3D-PEX:AccumulateState +R099 X3D-PEX:BeginPickOne +R100 X3D-PEX:EndPickOne +R101 X3D-PEX:PickOne +R102 X3D-PEX:BeginPickAll +R103 X3D-PEX:EndPickAll +R104 X3D-PEX:PickAll +E000 X3D-PEX:ColorTypeError +E001 X3D-PEX:erStateError +E002 X3D-PEX:FloatingPointFormatError +E003 X3D-PEX:LabelError +E004 X3D-PEX:LookupTableError +E005 X3D-PEX:NameSetError +E006 X3D-PEX:PathError +E007 X3D-PEX:FontError +E008 X3D-PEX:PhigsWksError +E009 X3D-PEX:PickMeasureError +E010 X3D-PEX:PipelineContextError +E011 X3D-PEX:erError +E012 X3D-PEX:SearchContextError +E013 X3D-PEX:StructureError +E014 X3D-PEX:OutputCommandError +R000 XC-APPGROUP:QueryVersion +R001 XC-APPGROUP:Create +R002 XC-APPGROUP:Destroy +R003 XC-APPGROUP:GetAttr +R004 XC-APPGROUP:Query +R005 XC-APPGROUP:CreateAssoc +R006 XC-APPGROUP:DestroyAssoc +E000 XC-APPGROUP:BadAppGroup +R000 XC-MISC:GetVersion +R001 XC-MISC:GetXIDRange +R002 XC-MISC:GetXIDList +R000 XFIXES:QueryVersion +R001 XFIXES:ChangeSaveSet +R002 XFIXES:SelectSelectionInput +R003 XFIXES:SelectCursorInput +R004 XFIXES:GetCursorImage +R005 XFIXES:CreateRegion +R006 XFIXES:CreateRegionFromBitmap +R007 XFIXES:CreateRegionFromWindow +R008 XFIXES:CreateRegionFromGC +R009 XFIXES:CreateRegionFromPicture +R010 XFIXES:DestroyRegion +R011 XFIXES:SetRegion +R012 XFIXES:CopyRegion +R013 XFIXES:UnionRegion +R014 XFIXES:IntersectRegion +R015 XFIXES:SubtractRegion +R016 XFIXES:InvertRegion +R017 XFIXES:TranslateRegion +R018 XFIXES:RegionExtents +R019 XFIXES:FetchRegion +R020 XFIXES:SetGCClipRegion +R021 XFIXES:SetWindowShapeRegion +R022 XFIXES:SetPictureClipRegion +R023 XFIXES:SetCursorName +R024 XFIXES:GetCursorName +R025 XFIXES:GetCursorImageAndName +R026 XFIXES:ChangeCursor +R027 XFIXES:ChangeCursorByName +R028 XFIXES:ExpandRegion +R029 XFIXES:HideCursor +R030 XFIXES:ShowCursor +V000 XFIXES:SelectionNotify +V001 XFIXES:CursorNotify +E000 XFIXES:BadRegion +R000 XFree86-Bigfont:QueryVersion +R001 XFree86-Bigfont:QueryFont +R000 XFree86-DGA:QueryVersion +R001 XFree86-DGA:GetVideoLL +R002 XFree86-DGA:DirectVideo +R003 XFree86-DGA:GetViewPortSize +R004 XFree86-DGA:SetViewPort +R005 XFree86-DGA:GetVidPage +R006 XFree86-DGA:SetVidPage +R007 XFree86-DGA:InstallColormap +R008 XFree86-DGA:QueryDirectVideo +R009 XFree86-DGA:ViewPortChanged +R010 XFree86-DGA:Obsolete1 +R011 XFree86-DGA:Obsolete2 +R012 XFree86-DGA:QueryModes +R013 XFree86-DGA:SetMode +R014 XFree86-DGA:SetViewport +R015 XFree86-DGA:InstallColormap +R016 XFree86-DGA:SelectInput +R017 XFree86-DGA:FillRectangle +R018 XFree86-DGA:CopyArea +R019 XFree86-DGA:CopyTransparentArea +R020 XFree86-DGA:GetViewportStatus +R021 XFree86-DGA:Sync +R022 XFree86-DGA:OpenFramebuffer +R023 XFree86-DGA:CloseFramebuffer +R024 XFree86-DGA:SetClientVersion +R025 XFree86-DGA:ChangePixmapMode +R026 XFree86-DGA:CreateColormap +E000 XFree86-DGA:ClientNotLocal +E001 XFree86-DGA:NoDirectVideoMode +E002 XFree86-DGA:ScreenNotActive +E003 XFree86-DGA:DirectNotActivated +E004 XFree86-DGA:OperationNotSupported +R000 XFree86-DRI:QueryVersion +R001 XFree86-DRI:QueryDirectRenderingCapable +R002 XFree86-DRI:OpenConnection +R003 XFree86-DRI:CloseConnection +R004 XFree86-DRI:GetClientDriverName +R005 XFree86-DRI:CreateContext +R006 XFree86-DRI:DestroyContext +R007 XFree86-DRI:CreateDrawable +R008 XFree86-DRI:DestroyDrawable +R009 XFree86-DRI:GetDrawableInfo +R010 XFree86-DRI:GetDeviceInfo +R011 XFree86-DRI:AuthConnection +R012 XFree86-DRI:OpenFullScreen +R013 XFree86-DRI:CloseFullScreen +E000 XFree86-DRI:ClientNotLocal +E001 XFree86-DRI:OperationNotSupported +R000 XFree86-Misc:QueryVersion +R001 XFree86-Misc:GetSaver +R002 XFree86-Misc:SetSaver +R003 XFree86-Misc:GetMouseSettings +R004 XFree86-Misc:GetKbdSettings +R005 XFree86-Misc:SetMouseSettings +R006 XFree86-Misc:SetKbdSettings +R007 XFree86-Misc:SetGrabKeysState +R008 XFree86-Misc:SetClientVersion +R009 XFree86-Misc:GetFilePaths +R010 XFree86-Misc:PassMessage +E000 XFree86-Misc:BadMouseProtocol +E001 XFree86-Misc:BadMouseBaudRate +E002 XFree86-Misc:BadMouseFlags +E003 XFree86-Misc:BadMouseCombo +E004 XFree86-Misc:BadKbdType +E005 XFree86-Misc:ModInDevDisabled +E006 XFree86-Misc:ModInDevClientNotLocal +E007 XFree86-Misc:NoModule +R000 XFree86-VidModeExtension:QueryVersion +R001 XFree86-VidModeExtension:GetModeLine +R002 XFree86-VidModeExtension:ModModeLine +R003 XFree86-VidModeExtension:SwitchMode +R004 XFree86-VidModeExtension:GetMonitor +R005 XFree86-VidModeExtension:LockModeSwitch +R006 XFree86-VidModeExtension:GetAllModeLines +R007 XFree86-VidModeExtension:AddModeLine +R008 XFree86-VidModeExtension:DeleteModeLine +R009 XFree86-VidModeExtension:ValidateModeLine +R010 XFree86-VidModeExtension:SwitchToMode +R011 XFree86-VidModeExtension:GetViewPort +R012 XFree86-VidModeExtension:SetViewPort +R013 XFree86-VidModeExtension:GetDotClocks +R014 XFree86-VidModeExtension:SetClientVersion +R015 XFree86-VidModeExtension:SetGamma +R016 XFree86-VidModeExtension:GetGamma +R017 XFree86-VidModeExtension:GetGammaRamp +R018 XFree86-VidModeExtension:SetGammaRamp +R019 XFree86-VidModeExtension:GetGammaRampSize +R020 XFree86-VidModeExtension:GetPermissions +V000 XFree86-VidModeExtension:Notify +E000 XFree86-VidModeExtension:BadClock +E001 XFree86-VidModeExtension:BadHTimings +E002 XFree86-VidModeExtension:BadVTimings +E003 XFree86-VidModeExtension:ModeUnsuitable +E004 XFree86-VidModeExtension:ExtensionDisabled +E005 XFree86-VidModeExtension:ClientNotLocal +E006 XFree86-VidModeExtension:ZoomLocked +R001 XIE:QueryImageExtension +R002 XIE:QueryTechniques +R003 XIE:CreateColorList +R004 XIE:DestroyColorList +R005 XIE:PurgeColorList +R006 XIE:QueryColorList +R007 XIE:CreateLUT +R008 XIE:DestroyLUT +R009 XIE:CreatePhotomap +R010 XIE:DestroyPhotomap +R011 XIE:QueryPhotomap +R012 XIE:CreateROI +R013 XIE:DestroyROI +R014 XIE:CreatePhotospace +R015 XIE:DestroyPhotospace +R016 XIE:ExecuteImmediate +R017 XIE:CreatePhotoflo +R018 XIE:DestroyPhotoflo +R019 XIE:ExecutePhotoflo +R020 XIE:ModifyPhotoflo +R021 XIE:RedefinePhotoflo +R022 XIE:PutClientData +R023 XIE:GetClientData +R024 XIE:QueryPhotoflo +R025 XIE:Await +R026 XIE:Abort +E000 XIE:ColorListError +E001 XIE:LUTError +E002 XIE:PhotofloError +E003 XIE:PhotomapError +E004 XIE:PhotospaceError +E005 XIE:ROIError +E006 XIE:FloError +R000 XINERAMA:QueryVersion +R001 XINERAMA:GetState +R002 XINERAMA:GetScreenCount +R003 XINERAMA:GetScreenSize +R004 XINERAMA:IsActive +R005 XINERAMA:QueryScreens +R001 XInputExtension:GetExtensionVersion +R002 XInputExtension:ListInputDevices +R003 XInputExtension:OpenDevice +R004 XInputExtension:CloseDevice +R005 XInputExtension:SetDeviceMode +R006 XInputExtension:SelectExtensionEvent +R007 XInputExtension:GetSelectedExtensionEvents +R008 XInputExtension:ChangeDeviceDontPropagateList +R009 XInputExtension:GetDeviceDontPropagageList +R010 XInputExtension:GetDeviceMotionEvents +R011 XInputExtension:ChangeKeyboardDevice +R012 XInputExtension:ChangePointerDevice +R013 XInputExtension:GrabDevice +R014 XInputExtension:UngrabDevice +R015 XInputExtension:GrabDeviceKey +R016 XInputExtension:UngrabDeviceKey +R017 XInputExtension:GrabDeviceButton +R018 XInputExtension:UngrabDeviceButton +R019 XInputExtension:AllowDeviceEvents +R020 XInputExtension:GetDeviceFocus +R021 XInputExtension:SetDeviceFocus +R022 XInputExtension:GetFeedbackControl +R023 XInputExtension:ChangeFeedbackControl +R024 XInputExtension:GetDeviceKeyMapping +R025 XInputExtension:ChangeDeviceKeyMapping +R026 XInputExtension:GetDeviceModifierMapping +R027 XInputExtension:SetDeviceModifierMapping +R028 XInputExtension:GetDeviceButtonMapping +R029 XInputExtension:SetDeviceButtonMapping +R030 XInputExtension:QueryDeviceState +R031 XInputExtension:SendExtensionEvent +R032 XInputExtension:DeviceBell +R033 XInputExtension:SetDeviceValuators +R034 XInputExtension:GetDeviceControl +R035 XInputExtension:ChangeDeviceControl +R036 XInputExtension:ListDeviceProperties +R037 XInputExtension:ChangeDeviceProperty +R038 XInputExtension:DeleteDeviceProperty +R039 XInputExtension:GetDeviceProperty +R040 XInputExtension:QueryPointer +R041 XInputExtension:WarpPointer +R042 XInputExtension:ChangeCursor +R043 XInputExtension:ChangeHierarchy +R044 XInputExtension:SetClientPointer +R045 XInputExtension:GetClientPointer +R046 XInputExtension:SelectEvents +R047 XInputExtension:QueryVersion +R048 XInputExtension:QueryDevice +R049 XInputExtension:SetFocus +R050 XInputExtension:GetFocus +R051 XInputExtension:GrabDevice +R052 XInputExtension:UngrabDevice +R053 XInputExtension:AllowEvents +R054 XInputExtension:PassiveGrabDevice +R055 XInputExtension:PassiveUngrabDevice +R056 XInputExtension:ListProperties +R057 XInputExtension:ChangeProperty +R058 XInputExtension:DeleteProperty +R059 XInputExtension:GetProperty +R060 XInputExtension:GetSelectedEvents +V000 XInputExtension:DeviceValuator +V001 XInputExtension:DeviceKeyPress +V002 XInputExtension:DeviceKeyRelease +V003 XInputExtension:DeviceButtonPress +V004 XInputExtension:DeviceButtonRelease +V005 XInputExtension:DeviceMotionNotify +V006 XInputExtension:DeviceFocusIn +V007 XInputExtension:DeviceFocusOut +V008 XInputExtension:ProximityIn +V009 XInputExtension:ProximityOut +V010 XInputExtension:DeviceStateNotify +V011 XInputExtension:DeviceMappingNotify +V012 XInputExtension:ChangeDeviceNotify +V013 XInputExtension:DeviceKeystateNotify +V014 XInputExtension:DeviceButtonstateNotify +V015 XInputExtension:DevicePresenceNotify +V016 XInputExtension:DevicePropertyNotify +E000 XInputExtension:BadDevice +E001 XInputExtension:BadEvent +E002 XInputExtension:BadMode +E003 XInputExtension:DeviceBusy +E004 XInputExtension:BadClass +R000 XKEYBOARD:UseExtension +R001 XKEYBOARD:SelectEvents +R002 XKEYBOARD:Obsolete +R003 XKEYBOARD:Bell +R004 XKEYBOARD:GetState +R005 XKEYBOARD:LatchLockState +R006 XKEYBOARD:GetControls +R007 XKEYBOARD:SetControls +R008 XKEYBOARD:GetMap +R009 XKEYBOARD:SetMap +R010 XKEYBOARD:GetCompatMap +R011 XKEYBOARD:SetCompatMap +R012 XKEYBOARD:GetIndicatorState +R013 XKEYBOARD:GetIndicatorMap +R014 XKEYBOARD:SetIndicatorMap +R015 XKEYBOARD:GetNamedIndicator +R016 XKEYBOARD:SetNamedIndicator +R017 XKEYBOARD:GetNames +R018 XKEYBOARD:SetNames +R019 XKEYBOARD:GetGeometry +R020 XKEYBOARD:SetGeometry +R021 XKEYBOARD:PerClientFlags +R022 XKEYBOARD:ListComponents +R023 XKEYBOARD:GetKbdByName +R024 XKEYBOARD:GetDeviceInfo +R025 XKEYBOARD:SetDeviceInfo +R101 XKEYBOARD:SetDebuggingFlags +V000 XKEYBOARD:EventCode +E000 XKEYBOARD:BadKeyboard +R000 XTEST:GetVersion +R001 XTEST:CompareCursor +R002 XTEST:FakeInput +R003 XTEST:GrabControl +R000 XVideo:QueryExtension +R001 XVideo:QueryAdaptors +R002 XVideo:QueryEncodings +R003 XVideo:GrabPort +R004 XVideo:UngrabPort +R005 XVideo:PutVideo +R006 XVideo:PutStill +R007 XVideo:GetVideo +R008 XVideo:GetStill +R009 XVideo:StopVideo +R010 XVideo:SelectVideoNotify +R011 XVideo:SelectPortNotify +R012 XVideo:QueryBestSize +R013 XVideo:SetPortAttribute +R014 XVideo:GetPortAttribute +R015 XVideo:QueryPortAttributes +R016 XVideo:ListImageFormats +R017 XVideo:QueryImageAttributes +R018 XVideo:PutImage +R019 XVideo:ShmPutImage +V000 XVideo:VideoNotify +V001 XVideo:PortNotify +E000 XVideo:BadPort +E001 XVideo:BadEncoding +E002 XVideo:BadControl +R000 XVideo-MotionCompensation:QueryVersion +R001 XVideo-MotionCompensation:ListSurfaceTypes +R002 XVideo-MotionCompensation:CreateContext +R003 XVideo-MotionCompensation:DestroyContext +R004 XVideo-MotionCompensation:CreateSurface +R005 XVideo-MotionCompensation:DestroySurface +R006 XVideo-MotionCompensation:CreateSubpicture +R007 XVideo-MotionCompensation:DestroySubpicture +R008 XVideo-MotionCompensation:ListSubpictureTypes +R009 XVideo-MotionCompensation:GetDRInfo +E000 XVideo-MotionCompensation:BadContext +E001 XVideo-MotionCompensation:BadSurface +E002 XVideo-MotionCompensation:BadSubpicture +R000 XpExtension:QueryVersion +R001 XpExtension:GetPrinterList +R002 XpExtension:CreateContext +R003 XpExtension:SetContext +R004 XpExtension:GetContext +R005 XpExtension:DestroyContext +R006 XpExtension:GetContextScreen +R007 XpExtension:StartJob +R008 XpExtension:EndJob +R009 XpExtension:StartDoc +R010 XpExtension:EndDoc +R011 XpExtension:PutDocumentData +R012 XpExtension:GetDocumentData +R013 XpExtension:StartPage +R014 XpExtension:EndPage +R015 XpExtension:SelectInput +R016 XpExtension:InputSelected +R017 XpExtension:GetAttributes +R018 XpExtension:SetAttributes +R019 XpExtension:GetOneAttribute +R020 XpExtension:RehashPrinterList +R021 XpExtension:GetPageDimensions +R022 XpExtension:QueryScreens +R023 XpExtension:SetImageResolution +R024 XpExtension:GetImageResolution +V000 XpExtension:PrintNotify +V001 XpExtension:AttributeNotify +E000 XpExtension:BadContext +E001 XpExtension:BadSequence +E002 XpExtension:BadResourceID diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c new file mode 100644 index 0000000..e75300a --- /dev/null +++ b/dix/ptrveloc.c @@ -0,0 +1,1183 @@ +/* + * + * Copyright © 2006-2009 Simon Thum simon dot thum at gmx dot de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <math.h> +#include <ptrveloc.h> +#include <exevents.h> +#include <X11/Xatom.h> +#include <os.h> + +#include <xserver-properties.h> + +/***************************************************************************** + * Predictable pointer acceleration + * + * 2006-2009 by Simon Thum (simon [dot] thum [at] gmx de) + * + * Serves 3 complementary functions: + * 1) provide a sophisticated ballistic velocity estimate to improve + * the relation between velocity (of the device) and acceleration + * 2) make arbitrary acceleration profiles possible + * 3) decelerate by two means (constant and adaptive) if enabled + * + * Important concepts are the + * + * - Scheme + * which selects the basic algorithm + * (see devices.c/InitPointerAccelerationScheme) + * - Profile + * which returns an acceleration + * for a given velocity + * + * The profile can be selected by the user at runtime. + * The classic profile is intended to cleanly perform old-style + * function selection (threshold =/!= 0) + * + ****************************************************************************/ + +/* fwds */ +static double +SimpleSmoothProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, + double threshold, double acc); +static PointerAccelerationProfileFunc +GetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); +static BOOL +InitializePredictableAccelerationProperties(DeviceIntPtr, + DeviceVelocityPtr, + PredictableAccelSchemePtr); +static BOOL +DeletePredictableAccelerationProperties(DeviceIntPtr, + PredictableAccelSchemePtr); + +/*#define PTRACCEL_DEBUGGING*/ + +#ifdef PTRACCEL_DEBUGGING +#define DebugAccelF(...) ErrorFSigSafe("dix/ptraccel: " __VA_ARGS__) +#else +#define DebugAccelF(...) /* */ +#endif + +/******************************** + * Init/Uninit + *******************************/ + +/* some int which is not a profile number */ +#define PROFILE_UNINITIALIZE (-100) + +/** + * Init DeviceVelocity struct so it should match the average case + */ +void +InitVelocityData(DeviceVelocityPtr vel) +{ + memset(vel, 0, sizeof(DeviceVelocityRec)); + + vel->corr_mul = 10.0; /* dots per 10 milisecond should be usable */ + vel->const_acceleration = 1.0; /* no acceleration/deceleration */ + vel->reset_time = 300; + vel->use_softening = 1; + vel->min_acceleration = 1.0; /* don't decelerate */ + vel->max_rel_diff = 0.2; + vel->max_diff = 1.0; + vel->initial_range = 2; + vel->average_accel = TRUE; + SetAccelerationProfile(vel, AccelProfileClassic); + InitTrackers(vel, 16); +} + +/** + * Clean up DeviceVelocityRec + */ +void +FreeVelocityData(DeviceVelocityPtr vel) +{ + free(vel->tracker); + SetAccelerationProfile(vel, PROFILE_UNINITIALIZE); +} + +/** + * Init predictable scheme + */ +Bool +InitPredictableAccelerationScheme(DeviceIntPtr dev, + ValuatorAccelerationPtr protoScheme) +{ + DeviceVelocityPtr vel; + ValuatorAccelerationRec scheme; + PredictableAccelSchemePtr schemeData; + + scheme = *protoScheme; + vel = calloc(1, sizeof(DeviceVelocityRec)); + schemeData = calloc(1, sizeof(PredictableAccelSchemeRec)); + if (!vel || !schemeData) + return FALSE; + InitVelocityData(vel); + schemeData->vel = vel; + scheme.accelData = schemeData; + if (!InitializePredictableAccelerationProperties(dev, vel, schemeData)) + return FALSE; + /* all fine, assign scheme to device */ + dev->valuator->accelScheme = scheme; + return TRUE; +} + +/** + * Uninit scheme + */ +void +AccelerationDefaultCleanup(DeviceIntPtr dev) +{ + DeviceVelocityPtr vel = GetDevicePredictableAccelData(dev); + + if (vel) { + /* the proper guarantee would be that we're not inside of + * AccelSchemeProc(), but that seems impossible. Schemes don't get + * switched often anyway. + */ + OsBlockSignals(); + dev->valuator->accelScheme.AccelSchemeProc = NULL; + FreeVelocityData(vel); + free(vel); + DeletePredictableAccelerationProperties(dev, + (PredictableAccelSchemePtr) + dev->valuator->accelScheme. + accelData); + free(dev->valuator->accelScheme.accelData); + dev->valuator->accelScheme.accelData = NULL; + OsReleaseSignals(); + } +} + +/************************* + * Input property support + ************************/ + +/** + * choose profile + */ +static int +AccelSetProfileProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) +{ + DeviceVelocityPtr vel; + int profile, *ptr = &profile; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER)) + return Success; + + vel = GetDevicePredictableAccelData(dev); + if (!vel) + return BadValue; + rc = XIPropToInt(val, &nelem, &ptr); + + if (checkOnly) { + if (rc) + return rc; + + if (GetAccelerationProfile(vel, profile) == NULL) + return BadValue; + } + else + SetAccelerationProfile(vel, profile); + + return Success; +} + +static long +AccelInitProfileProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) +{ + int profile = vel->statistics.profile_number; + Atom prop_profile_number = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); + + XIChangeDeviceProperty(dev, prop_profile_number, XA_INTEGER, 32, + PropModeReplace, 1, &profile, FALSE); + XISetDevicePropertyDeletable(dev, prop_profile_number, FALSE); + return XIRegisterPropertyHandler(dev, AccelSetProfileProperty, NULL, NULL); +} + +/** + * constant deceleration + */ +static int +AccelSetDecelProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) +{ + DeviceVelocityPtr vel; + float v, *ptr = &v; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION)) + return Success; + + vel = GetDevicePredictableAccelData(dev); + if (!vel) + return BadValue; + rc = XIPropToFloat(val, &nelem, &ptr); + + if (checkOnly) { + if (rc) + return rc; + return (v > 0) ? Success : BadValue; + } + + vel->const_acceleration = 1 / v; + + return Success; +} + +static long +AccelInitDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) +{ + float fval = 1.0 / vel->const_acceleration; + Atom prop_const_decel = + XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); + XIChangeDeviceProperty(dev, prop_const_decel, + XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, + 1, &fval, FALSE); + XISetDevicePropertyDeletable(dev, prop_const_decel, FALSE); + return XIRegisterPropertyHandler(dev, AccelSetDecelProperty, NULL, NULL); +} + +/** + * adaptive deceleration + */ +static int +AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) +{ + DeviceVelocityPtr veloc; + float v, *ptr = &v; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION)) + return Success; + + veloc = GetDevicePredictableAccelData(dev); + if (!veloc) + return BadValue; + rc = XIPropToFloat(val, &nelem, &ptr); + + if (checkOnly) { + if (rc) + return rc; + return (v >= 1.0f) ? Success : BadValue; + } + + if (v >= 1.0f) + veloc->min_acceleration = 1 / v; + + return Success; +} + +static long +AccelInitAdaptDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) +{ + float fval = 1.0 / vel->min_acceleration; + Atom prop_adapt_decel = + XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); + + XIChangeDeviceProperty(dev, prop_adapt_decel, + XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, + 1, &fval, FALSE); + XISetDevicePropertyDeletable(dev, prop_adapt_decel, FALSE); + return XIRegisterPropertyHandler(dev, AccelSetAdaptDecelProperty, NULL, + NULL); +} + +/** + * velocity scaling + */ +static int +AccelSetScaleProperty(DeviceIntPtr dev, Atom atom, + XIPropertyValuePtr val, BOOL checkOnly) +{ + DeviceVelocityPtr vel; + float v, *ptr = &v; + int rc; + int nelem = 1; + + if (atom != XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING)) + return Success; + + vel = GetDevicePredictableAccelData(dev); + if (!vel) + return BadValue; + rc = XIPropToFloat(val, &nelem, &ptr); + + if (checkOnly) { + if (rc) + return rc; + + return (v > 0) ? Success : BadValue; + } + + if (v > 0) + vel->corr_mul = v; + + return Success; +} + +static long +AccelInitScaleProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) +{ + float fval = vel->corr_mul; + Atom prop_velo_scale = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); + + XIChangeDeviceProperty(dev, prop_velo_scale, + XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, + 1, &fval, FALSE); + XISetDevicePropertyDeletable(dev, prop_velo_scale, FALSE); + return XIRegisterPropertyHandler(dev, AccelSetScaleProperty, NULL, NULL); +} + +static BOOL +InitializePredictableAccelerationProperties(DeviceIntPtr dev, + DeviceVelocityPtr vel, + PredictableAccelSchemePtr + schemeData) +{ + int num_handlers = 4; + + if (!vel) + return FALSE; + + schemeData->prop_handlers = calloc(num_handlers, sizeof(long)); + if (!schemeData->prop_handlers) + return FALSE; + schemeData->num_prop_handlers = num_handlers; + schemeData->prop_handlers[0] = AccelInitProfileProperty(dev, vel); + schemeData->prop_handlers[1] = AccelInitDecelProperty(dev, vel); + schemeData->prop_handlers[2] = AccelInitAdaptDecelProperty(dev, vel); + schemeData->prop_handlers[3] = AccelInitScaleProperty(dev, vel); + + return TRUE; +} + +BOOL +DeletePredictableAccelerationProperties(DeviceIntPtr dev, + PredictableAccelSchemePtr scheme) +{ + DeviceVelocityPtr vel; + Atom prop; + int i; + + prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); + XIDeleteDeviceProperty(dev, prop, FALSE); + prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); + XIDeleteDeviceProperty(dev, prop, FALSE); + prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); + XIDeleteDeviceProperty(dev, prop, FALSE); + prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); + XIDeleteDeviceProperty(dev, prop, FALSE); + + vel = GetDevicePredictableAccelData(dev); + if (vel) { + for (i = 0; i < scheme->num_prop_handlers; i++) + if (scheme->prop_handlers[i]) + XIUnregisterPropertyHandler(dev, scheme->prop_handlers[i]); + } + + free(scheme->prop_handlers); + scheme->prop_handlers = NULL; + scheme->num_prop_handlers = 0; + return TRUE; +} + +/********************* + * Tracking logic + ********************/ + +void +InitTrackers(DeviceVelocityPtr vel, int ntracker) +{ + if (ntracker < 1) { + ErrorF("invalid number of trackers\n"); + return; + } + free(vel->tracker); + vel->tracker = (MotionTrackerPtr) calloc(ntracker, sizeof(MotionTracker)); + vel->num_tracker = ntracker; +} + +enum directions { + N = (1 << 0), + NE = (1 << 1), + E = (1 << 2), + SE = (1 << 3), + S = (1 << 4), + SW = (1 << 5), + W = (1 << 6), + NW = (1 << 7), + UNDEFINED = 0xFF +}; + +/** + * return a bit field of possible directions. + * There's no reason against widening to more precise directions (<45 degrees), + * should it not perform well. All this is needed for is sort out non-linear + * motion, so precision isn't paramount. However, one should not flag direction + * too narrow, since it would then cut the linear segment to zero size way too + * often. + * + * @return A bitmask for N, NE, S, SE, etc. indicating the directions for + * this movement. + */ +static int +DoGetDirection(int dx, int dy) +{ + int dir = 0; + + /* on insignificant mickeys, flag 135 degrees */ + if (abs(dx) < 2 && abs(dy) < 2) { + /* first check diagonal cases */ + if (dx > 0 && dy > 0) + dir = E | SE | S; + else if (dx > 0 && dy < 0) + dir = N | NE | E; + else if (dx < 0 && dy < 0) + dir = W | NW | N; + else if (dx < 0 && dy > 0) + dir = W | SW | S; + /* check axis-aligned directions */ + else if (dx > 0) + dir = NE | E | SE; + else if (dx < 0) + dir = NW | W | SW; + else if (dy > 0) + dir = SE | S | SW; + else if (dy < 0) + dir = NE | N | NW; + else + dir = UNDEFINED; /* shouldn't happen */ + } + else { /* compute angle and set appropriate flags */ + double r; + int i1, i2; + + r = atan2(dy, dx); + /* find direction. + * + * Add 360° to avoid r become negative since C has no well-defined + * modulo for such cases. Then divide by 45° to get the octant + * number, e.g. + * 0 <= r <= 1 is [0-45]° + * 1 <= r <= 2 is [45-90]° + * etc. + * But we add extra 90° to match up with our N, S, etc. defines up + * there, rest stays the same. + */ + r = (r + (M_PI * 2.5)) / (M_PI / 4); + /* this intends to flag 2 directions (45 degrees), + * except on very well-aligned mickeys. */ + i1 = (int) (r + 0.1) % 8; + i2 = (int) (r + 0.9) % 8; + if (i1 < 0 || i1 > 7 || i2 < 0 || i2 > 7) + dir = UNDEFINED; /* shouldn't happen */ + else + dir = (1 << i1 | 1 << i2); + } + return dir; +} + +#define DIRECTION_CACHE_RANGE 5 +#define DIRECTION_CACHE_SIZE (DIRECTION_CACHE_RANGE*2+1) + +/* cache DoGetDirection(). + * To avoid excessive use of direction calculation, cache the values for + * [-5..5] for both x/y. Anything outside of that is calcualted on the fly. + * + * @return A bitmask for N, NE, S, SE, etc. indicating the directions for + * this movement. + */ +static int +GetDirection(int dx, int dy) +{ + static int cache[DIRECTION_CACHE_SIZE][DIRECTION_CACHE_SIZE]; + int dir; + + if (abs(dx) <= DIRECTION_CACHE_RANGE && abs(dy) <= DIRECTION_CACHE_RANGE) { + /* cacheable */ + dir = cache[DIRECTION_CACHE_RANGE + dx][DIRECTION_CACHE_RANGE + dy]; + if (dir == 0) { + dir = DoGetDirection(dx, dy); + cache[DIRECTION_CACHE_RANGE + dx][DIRECTION_CACHE_RANGE + dy] = dir; + } + } + else { + /* non-cacheable */ + dir = DoGetDirection(dx, dy); + } + + return dir; +} + +#undef DIRECTION_CACHE_RANGE +#undef DIRECTION_CACHE_SIZE + +/* convert offset (age) to array index */ +#define TRACKER_INDEX(s, d) (((s)->num_tracker + (s)->cur_tracker - (d)) % (s)->num_tracker) +#define TRACKER(s, d) &(s)->tracker[TRACKER_INDEX(s,d)] + +/** + * Add the delta motion to each tracker, then reset the latest tracker to + * 0/0 and set it as the current one. + */ +static inline void +FeedTrackers(DeviceVelocityPtr vel, double dx, double dy, int cur_t) +{ + int n; + + for (n = 0; n < vel->num_tracker; n++) { + vel->tracker[n].dx += dx; + vel->tracker[n].dy += dy; + } + n = (vel->cur_tracker + 1) % vel->num_tracker; + vel->tracker[n].dx = 0.0; + vel->tracker[n].dy = 0.0; + vel->tracker[n].time = cur_t; + vel->tracker[n].dir = GetDirection(dx, dy); + DebugAccelF("motion [dx: %f dy: %f dir:%d diff: %d]\n", + dx, dy, vel->tracker[n].dir, + cur_t - vel->tracker[vel->cur_tracker].time); + vel->cur_tracker = n; +} + +/** + * calc velocity for given tracker, with + * velocity scaling. + * This assumes linear motion. + */ +static double +CalcTracker(const MotionTracker * tracker, int cur_t) +{ + double dist = sqrt(tracker->dx * tracker->dx + tracker->dy * tracker->dy); + int dtime = cur_t - tracker->time; + + if (dtime > 0) + return dist / dtime; + else + return 0; /* synonymous for NaN, since we're not C99 */ +} + +/* find the most plausible velocity. That is, the most distant + * (in time) tracker which isn't too old, the movement vector was + * in the same octant, and where the velocity is within an + * acceptable range to the inital velocity. + * + * @return The tracker's velocity or 0 if the above conditions are unmet + */ +static double +QueryTrackers(DeviceVelocityPtr vel, int cur_t) +{ + int offset, dir = UNDEFINED, used_offset = -1, age_ms; + + /* initial velocity: a low-offset, valid velocity */ + double initial_velocity = 0, result = 0, velocity_diff; + double velocity_factor = vel->corr_mul * vel->const_acceleration; /* premultiply */ + + /* loop from current to older data */ + for (offset = 1; offset < vel->num_tracker; offset++) { + MotionTracker *tracker = TRACKER(vel, offset); + double tracker_velocity; + + age_ms = cur_t - tracker->time; + + /* bail out if data is too old and protect from overrun */ + if (age_ms >= vel->reset_time || age_ms < 0) { + DebugAccelF("query: tracker too old (reset after %d, age is %d)\n", + vel->reset_time, age_ms); + break; + } + + /* + * this heuristic avoids using the linear-motion velocity formula + * in CalcTracker() on motion that isn't exactly linear. So to get + * even more precision we could subdivide as a final step, so possible + * non-linearities are accounted for. + */ + dir &= tracker->dir; + if (dir == 0) { /* we've changed octant of movement (e.g. NE → NW) */ + DebugAccelF("query: no longer linear\n"); + /* instead of breaking it we might also inspect the partition after, + * but actual improvement with this is probably rare. */ + break; + } + + tracker_velocity = CalcTracker(tracker, cur_t) * velocity_factor; + + if ((initial_velocity == 0 || offset <= vel->initial_range) && + tracker_velocity != 0) { + /* set initial velocity and result */ + result = initial_velocity = tracker_velocity; + used_offset = offset; + } + else if (initial_velocity != 0 && tracker_velocity != 0) { + velocity_diff = fabs(initial_velocity - tracker_velocity); + + if (velocity_diff > vel->max_diff && + velocity_diff / (initial_velocity + tracker_velocity) >= + vel->max_rel_diff) { + /* we're not in range, quit - it won't get better. */ + DebugAccelF("query: tracker too different:" + " old %2.2f initial %2.2f diff: %2.2f\n", + tracker_velocity, initial_velocity, velocity_diff); + break; + } + /* we're in range with the initial velocity, + * so this result is likely better + * (it contains more information). */ + result = tracker_velocity; + used_offset = offset; + } + } + if (offset == vel->num_tracker) { + DebugAccelF("query: last tracker in effect\n"); + used_offset = vel->num_tracker - 1; + } + if (used_offset >= 0) { +#ifdef PTRACCEL_DEBUGGING + MotionTracker *tracker = TRACKER(vel, used_offset); + + DebugAccelF("result: offset %i [dx: %f dy: %f diff: %i]\n", + used_offset, tracker->dx, tracker->dy, + cur_t - tracker->time); +#endif + } + return result; +} + +#undef TRACKER_INDEX +#undef TRACKER + +/** + * Perform velocity approximation based on 2D 'mickeys' (mouse motion delta). + * return true if non-visible state reset is suggested + */ +BOOL +ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time) +{ + double velocity; + + vel->last_velocity = vel->velocity; + + FeedTrackers(vel, dx, dy, time); + + velocity = QueryTrackers(vel, time); + + DebugAccelF("velocity is %f\n", velocity); + + vel->velocity = velocity; + return velocity == 0; +} + +/** + * this flattens significant ( > 1) mickeys a little bit for more steady + * constant-velocity response + */ +static inline double +ApplySimpleSoftening(double prev_delta, double delta) +{ + double result = delta; + + if (delta < -1.0 || delta > 1.0) { + if (delta > prev_delta) + result -= 0.5; + else if (delta < prev_delta) + result += 0.5; + } + return result; +} + +/** + * Soften the delta based on previous deltas stored in vel. + * + * @param[in,out] fdx Delta X, modified in-place. + * @param[in,out] fdx Delta Y, modified in-place. + */ +static void +ApplySoftening(DeviceVelocityPtr vel, double *fdx, double *fdy) +{ + if (vel->use_softening) { + *fdx = ApplySimpleSoftening(vel->last_dx, *fdx); + *fdy = ApplySimpleSoftening(vel->last_dy, *fdy); + } +} + +static void +ApplyConstantDeceleration(DeviceVelocityPtr vel, double *fdx, double *fdy) +{ + *fdx *= vel->const_acceleration; + *fdy *= vel->const_acceleration; +} + +/* + * compute the acceleration for given velocity and enforce min_acceleration + */ +double +BasicComputeAcceleration(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double threshold, double acc) +{ + + double result; + + result = vel->Profile(dev, vel, velocity, threshold, acc); + + /* enforce min_acceleration */ + if (result < vel->min_acceleration) + result = vel->min_acceleration; + return result; +} + +/** + * Compute acceleration. Takes into account averaging, nv-reset, etc. + * If the velocity has changed, an average is taken of 6 velocity factors: + * current velocity, last velocity and 4 times the average between the two. + */ +static double +ComputeAcceleration(DeviceIntPtr dev, + DeviceVelocityPtr vel, double threshold, double acc) +{ + double result; + + if (vel->velocity <= 0) { + DebugAccelF("profile skipped\n"); + /* + * If we have no idea about device velocity, don't pretend it. + */ + return 1; + } + + if (vel->average_accel && vel->velocity != vel->last_velocity) { + /* use simpson's rule to average acceleration between + * current and previous velocity. + * Though being the more natural choice, it causes a minor delay + * in comparison, so it can be disabled. */ + result = + BasicComputeAcceleration(dev, vel, vel->velocity, threshold, acc); + result += + BasicComputeAcceleration(dev, vel, vel->last_velocity, threshold, + acc); + result += + 4.0f * BasicComputeAcceleration(dev, vel, + (vel->last_velocity + + vel->velocity) / 2, + threshold, + acc); + result /= 6.0f; + DebugAccelF("profile average [%.2f ... %.2f] is %.3f\n", + vel->velocity, vel->last_velocity, result); + } + else { + result = BasicComputeAcceleration(dev, vel, + vel->velocity, threshold, acc); + DebugAccelF("profile sample [%.2f] is %.3f\n", + vel->velocity, result); + } + + return result; +} + +/***************************************** + * Acceleration functions and profiles + ****************************************/ + +/** + * Polynomial function similar previous one, but with f(1) = 1 + */ +static double +PolynomialAccelerationProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double ignored, double acc) +{ + return pow(velocity, (acc - 1.0) * 0.5); +} + +/** + * returns acceleration for velocity. + * This profile selects the two functions like the old scheme did + */ +static double +ClassicProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double threshold, double acc) +{ + if (threshold > 0) { + return SimpleSmoothProfile(dev, vel, velocity, threshold, acc); + } + else { + return PolynomialAccelerationProfile(dev, vel, velocity, 0, acc); + } +} + +/** + * Power profile + * This has a completely smooth transition curve, i.e. no jumps in the + * derivatives. + * + * This has the expense of overall response dependency on min-acceleration. + * In effect, min_acceleration mimics const_acceleration in this profile. + */ +static double +PowerProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double threshold, double acc) +{ + double vel_dist; + + acc = (acc - 1.0) * 0.1f + 1.0; /* without this, acc of 2 is unuseable */ + + if (velocity <= threshold) + return vel->min_acceleration; + vel_dist = velocity - threshold; + return (pow(acc, vel_dist)) * vel->min_acceleration; +} + +/** + * just a smooth function in [0..1] -> [0..1] + * - point symmetry at 0.5 + * - f'(0) = f'(1) = 0 + * - starts faster than a sinoid + * - smoothness C1 (Cinf if you dare to ignore endpoints) + */ +static inline double +CalcPenumbralGradient(double x) +{ + x *= 2.0f; + x -= 1.0f; + return 0.5f + (x * sqrt(1.0 - x * x) + asin(x)) / M_PI; +} + +/** + * acceleration function similar to classic accelerated/unaccelerated, + * but with smooth transition in between (and towards zero for adaptive dec.). + */ +static double +SimpleSmoothProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double threshold, double acc) +{ + if (velocity < 1.0f) + return CalcPenumbralGradient(0.5 + velocity * 0.5) * 2.0f - 1.0f; + if (threshold < 1.0f) + threshold = 1.0f; + if (velocity <= threshold) + return 1; + velocity /= threshold; + if (velocity >= acc) + return acc; + else + return 1.0f + (CalcPenumbralGradient(velocity / acc) * (acc - 1.0f)); +} + +/** + * This profile uses the first half of the penumbral gradient as a start + * and then scales linearly. + */ +static double +SmoothLinearProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double threshold, double acc) +{ + double res, nv; + + if (acc > 1.0f) + acc -= 1.0f; /*this is so acc = 1 is no acceleration */ + else + return 1.0f; + + nv = (velocity - threshold) * acc * 0.5f; + + if (nv < 0) { + res = 0; + } + else if (nv < 2) { + res = CalcPenumbralGradient(nv * 0.25f) * 2.0f; + } + else { + nv -= 2.0f; + res = nv * 2.0f / M_PI /* steepness of gradient at 0.5 */ + + 1.0f; /* gradient crosses 2|1 */ + } + res += vel->min_acceleration; + return res; +} + +/** + * From 0 to threshold, the response graduates smoothly from min_accel to + * acceleration. Beyond threshold it is exactly the specified acceleration. + */ +static double +SmoothLimitedProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double threshold, double acc) +{ + double res; + + if (velocity >= threshold || threshold == 0.0f) + return acc; + + velocity /= threshold; /* should be [0..1[ now */ + + res = CalcPenumbralGradient(velocity) * (acc - vel->min_acceleration); + + return vel->min_acceleration + res; +} + +static double +LinearProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, + double velocity, double threshold, double acc) +{ + return acc * velocity; +} + +static double +NoProfile(DeviceIntPtr dev, + DeviceVelocityPtr vel, double velocity, double threshold, double acc) +{ + return 1.0f; +} + +static PointerAccelerationProfileFunc +GetAccelerationProfile(DeviceVelocityPtr vel, int profile_num) +{ + switch (profile_num) { + case AccelProfileClassic: + return ClassicProfile; + case AccelProfileDeviceSpecific: + return vel->deviceSpecificProfile; + case AccelProfilePolynomial: + return PolynomialAccelerationProfile; + case AccelProfileSmoothLinear: + return SmoothLinearProfile; + case AccelProfileSimple: + return SimpleSmoothProfile; + case AccelProfilePower: + return PowerProfile; + case AccelProfileLinear: + return LinearProfile; + case AccelProfileSmoothLimited: + return SmoothLimitedProfile; + case AccelProfileNone: + return NoProfile; + default: + return NULL; + } +} + +/** + * Set the profile by number. + * Intended to make profiles exchangeable at runtime. + * If you created a profile, give it a number here and in the header to + * make it selectable. In case some profile-specific init is needed, here + * would be a good place, since FreeVelocityData() also calls this with + * PROFILE_UNINITIALIZE. + * + * returns FALSE if profile number is unavailable, TRUE otherwise. + */ +int +SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num) +{ + PointerAccelerationProfileFunc profile; + + profile = GetAccelerationProfile(vel, profile_num); + + if (profile == NULL && profile_num != PROFILE_UNINITIALIZE) + return FALSE; + + /* Here one could free old profile-private data */ + free(vel->profile_private); + vel->profile_private = NULL; + /* Here one could init profile-private data */ + vel->Profile = profile; + vel->statistics.profile_number = profile_num; + return TRUE; +} + +/********************************************** + * driver interaction + **********************************************/ + +/** + * device-specific profile + * + * The device-specific profile is intended as a hook for a driver + * which may want to provide an own acceleration profile. + * It should not rely on profile-private data, instead + * it should do init/uninit in the driver (ie. with DEVICE_INIT and friends). + * Users may override or choose it. + */ +void +SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel, + PointerAccelerationProfileFunc profile) +{ + if (vel) + vel->deviceSpecificProfile = profile; +} + +/** + * Use this function to obtain a DeviceVelocityPtr for a device. Will return NULL if + * the predictable acceleration scheme is not in effect. + */ +DeviceVelocityPtr +GetDevicePredictableAccelData(DeviceIntPtr dev) +{ + BUG_RETURN_VAL(!dev, NULL); + + if (dev->valuator && + dev->valuator->accelScheme.AccelSchemeProc == + acceleratePointerPredictable && + dev->valuator->accelScheme.accelData != NULL) { + + return ((PredictableAccelSchemePtr) + dev->valuator->accelScheme.accelData)->vel; + } + return NULL; +} + +/******************************** + * acceleration schemes + *******************************/ + +/** + * Modifies valuators in-place. + * This version employs a velocity approximation algorithm to + * enable fine-grained predictable acceleration profiles. + */ +void +acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val, CARD32 evtime) +{ + double dx = 0, dy = 0; + DeviceVelocityPtr velocitydata = GetDevicePredictableAccelData(dev); + Bool soften = TRUE; + + if (valuator_mask_num_valuators(val) == 0 || !velocitydata) + return; + + if (velocitydata->statistics.profile_number == AccelProfileNone && + velocitydata->const_acceleration == 1.0f) { + return; /*we're inactive anyway, so skip the whole thing. */ + } + + if (valuator_mask_isset(val, 0)) { + dx = valuator_mask_get_double(val, 0); + } + + if (valuator_mask_isset(val, 1)) { + dy = valuator_mask_get_double(val, 1); + } + + if (dx != 0.0 || dy != 0.0) { + /* reset non-visible state? */ + if (ProcessVelocityData2D(velocitydata, dx, dy, evtime)) { + soften = FALSE; + } + + if (dev->ptrfeed && dev->ptrfeed->ctrl.num) { + double mult; + + /* invoke acceleration profile to determine acceleration */ + mult = ComputeAcceleration(dev, velocitydata, + dev->ptrfeed->ctrl.threshold, + (double) dev->ptrfeed->ctrl.num / + (double) dev->ptrfeed->ctrl.den); + + DebugAccelF("mult is %f\n", mult); + if (mult != 1.0f || velocitydata->const_acceleration != 1.0f) { + if (mult > 1.0f && soften) + ApplySoftening(velocitydata, &dx, &dy); + ApplyConstantDeceleration(velocitydata, &dx, &dy); + + if (dx != 0.0) + valuator_mask_set_double(val, 0, mult * dx); + if (dy != 0.0) + valuator_mask_set_double(val, 1, mult * dy); + DebugAccelF("delta x:%.3f y:%.3f\n", mult * dx, mult * dy); + } + } + } + /* remember last motion delta (for softening/slow movement treatment) */ + velocitydata->last_dx = dx; + velocitydata->last_dy = dy; +} + +/** + * Originally a part of xf86PostMotionEvent; modifies valuators + * in-place. Retained mostly for embedded scenarios. + */ +void +acceleratePointerLightweight(DeviceIntPtr dev, + ValuatorMask *val, CARD32 ignored) +{ + double mult = 0.0, tmpf; + double dx = 0.0, dy = 0.0; + + if (valuator_mask_isset(val, 0)) { + dx = valuator_mask_get(val, 0); + } + + if (valuator_mask_isset(val, 1)) { + dy = valuator_mask_get(val, 1); + } + + if (valuator_mask_num_valuators(val) == 0) + return; + + if (dev->ptrfeed && dev->ptrfeed->ctrl.num) { + /* modeled from xf86Events.c */ + if (dev->ptrfeed->ctrl.threshold) { + if ((fabs(dx) + fabs(dy)) >= dev->ptrfeed->ctrl.threshold) { + if (dx != 0.0) { + tmpf = (dx * (double) (dev->ptrfeed->ctrl.num)) / + (double) (dev->ptrfeed->ctrl.den); + valuator_mask_set_double(val, 0, tmpf); + } + + if (dy != 0.0) { + tmpf = (dy * (double) (dev->ptrfeed->ctrl.num)) / + (double) (dev->ptrfeed->ctrl.den); + valuator_mask_set_double(val, 1, tmpf); + } + } + } + else { + mult = pow(dx * dx + dy * dy, + ((double) (dev->ptrfeed->ctrl.num) / + (double) (dev->ptrfeed->ctrl.den) - 1.0) / 2.0) / 2.0; + if (dx != 0.0) + valuator_mask_set_double(val, 0, mult * dx); + if (dy != 0.0) + valuator_mask_set_double(val, 1, mult * dy); + } + } +} diff --git a/dix/region.c b/dix/region.c new file mode 100644 index 0000000..15f3d01 --- /dev/null +++ b/dix/region.c @@ -0,0 +1,1380 @@ +/*********************************************************** + +Copyright 1987, 1988, 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright 1987, 1988, 1989 by +Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "regionstr.h" +#include <X11/Xprotostr.h> +#include <X11/Xfuncproto.h> +#include "gc.h" +#include <pixman.h> + +#undef assert +#ifdef REGION_DEBUG +#define assert(expr) { \ + CARD32 *foo = NULL; \ + if (!(expr)) { \ + ErrorF("Assertion failed file %s, line %d: %s\n", \ + __FILE__, __LINE__, #expr); \ + *foo = 0xdeadbeef; /* to get a backtrace */ \ + } \ + } +#else +#define assert(expr) +#endif + +#define good(reg) assert(RegionIsValid(reg)) + +/* + * The functions in this file implement the Region abstraction used extensively + * throughout the X11 sample server. A Region is simply a set of disjoint + * (non-overlapping) rectangles, plus an "extent" rectangle which is the + * smallest single rectangle that contains all the non-overlapping rectangles. + * + * A Region is implemented as a "y-x-banded" array of rectangles. This array + * imposes two degrees of order. First, all rectangles are sorted by top side + * y coordinate first (y1), and then by left side x coordinate (x1). + * + * Furthermore, the rectangles are grouped into "bands". Each rectangle in a + * band has the same top y coordinate (y1), and each has the same bottom y + * coordinate (y2). Thus all rectangles in a band differ only in their left + * and right side (x1 and x2). Bands are implicit in the array of rectangles: + * there is no separate list of band start pointers. + * + * The y-x band representation does not minimize rectangles. In particular, + * if a rectangle vertically crosses a band (the rectangle has scanlines in + * the y1 to y2 area spanned by the band), then the rectangle may be broken + * down into two or more smaller rectangles stacked one atop the other. + * + * ----------- ----------- + * | | | | band 0 + * | | -------- ----------- -------- + * | | | | in y-x banded | | | | band 1 + * | | | | form is | | | | + * ----------- | | ----------- -------- + * | | | | band 2 + * -------- -------- + * + * An added constraint on the rectangles is that they must cover as much + * horizontal area as possible: no two rectangles within a band are allowed + * to touch. + * + * Whenever possible, bands will be merged together to cover a greater vertical + * distance (and thus reduce the number of rectangles). Two bands can be merged + * only if the bottom of one touches the top of the other and they have + * rectangles in the same places (of the same width, of course). + * + * Adam de Boor wrote most of the original region code. Joel McCormack + * substantially modified or rewrote most of the core arithmetic routines, + * and added RegionValidate in order to support several speed improvements + * to miValidateTree. Bob Scheifler changed the representation to be more + * compact when empty or a single rectangle, and did a bunch of gratuitous + * reformatting. + */ + +/* true iff two Boxes overlap */ +#define EXTENTCHECK(r1,r2) \ + (!( ((r1)->x2 <= (r2)->x1) || \ + ((r1)->x1 >= (r2)->x2) || \ + ((r1)->y2 <= (r2)->y1) || \ + ((r1)->y1 >= (r2)->y2) ) ) + +/* true iff (x,y) is in Box */ +#define INBOX(r,x,y) \ + ( ((r)->x2 > x) && \ + ((r)->x1 <= x) && \ + ((r)->y2 > y) && \ + ((r)->y1 <= y) ) + +/* true iff Box r1 contains Box r2 */ +#define SUBSUMES(r1,r2) \ + ( ((r1)->x1 <= (r2)->x1) && \ + ((r1)->x2 >= (r2)->x2) && \ + ((r1)->y1 <= (r2)->y1) && \ + ((r1)->y2 >= (r2)->y2) ) + +#define 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 (!RegionRectAlloc(pReg, n)) { goto bail; } + +#define RECTALLOC(pReg,n) \ +if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ + if (!RegionRectAlloc(pReg, n)) { return FALSE; } + +#define ADDRECT(pNextRect,nx1,ny1,nx2,ny2) \ +{ \ + pNextRect->x1 = nx1; \ + pNextRect->y1 = ny1; \ + pNextRect->x2 = nx2; \ + pNextRect->y2 = ny2; \ + pNextRect++; \ +} + +#define NEWRECT(pReg,pNextRect,nx1,ny1,nx2,ny2) \ +{ \ + if (!(pReg)->data || ((pReg)->data->numRects == (pReg)->data->size))\ + { \ + if (!RegionRectAlloc(pReg, 1)) \ + return FALSE; \ + pNextRect = RegionTop(pReg); \ + } \ + ADDRECT(pNextRect,nx1,ny1,nx2,ny2); \ + pReg->data->numRects++; \ + assert(pReg->data->numRects<=pReg->data->size); \ +} + +#define DOWNSIZE(reg,numRects) \ +if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \ +{ \ + RegDataPtr NewData; \ + NewData = (RegDataPtr)realloc((reg)->data, RegionSizeof(numRects)); \ + if (NewData) \ + { \ + NewData->size = (numRects); \ + (reg)->data = NewData; \ + } \ +} + +BoxRec RegionEmptyBox = { 0, 0, 0, 0 }; +RegDataRec RegionEmptyData = { 0, 0 }; + +RegDataRec RegionBrokenData = { 0, 0 }; +static RegionRec RegionBrokenRegion = { {0, 0, 0, 0}, &RegionBrokenData }; + +void +InitRegions(void) +{ + pixman_region_set_static_pointers(&RegionEmptyBox, &RegionEmptyData, + &RegionBrokenData); +} + +/***************************************************************** + * RegionCreate(rect, size) + * This routine does a simple malloc to make a structure of + * REGION of "size" number of rectangles. + *****************************************************************/ + +RegionPtr +RegionCreate(BoxPtr rect, int size) +{ + RegionPtr pReg; + + pReg = (RegionPtr) malloc(sizeof(RegionRec)); + if (!pReg) + return &RegionBrokenRegion; + + RegionInit(pReg, rect, size); + + return pReg; +} + +void +RegionDestroy(RegionPtr pReg) +{ + pixman_region_fini(pReg); + if (pReg != &RegionBrokenRegion) + free(pReg); +} + +RegionPtr +RegionDuplicate(RegionPtr pOld) +{ + RegionPtr pNew; + + pNew = RegionCreate(&pOld->extents, 0); + if (!pNew) + return NULL; + if (!RegionCopy(pNew, pOld)) { + RegionDestroy(pNew); + return NULL; + } + return pNew; +} + +void +RegionPrint(RegionPtr rgn) +{ + int num, size; + int i; + BoxPtr rects; + + num = RegionNumRects(rgn); + size = RegionSize(rgn); + rects = RegionRects(rgn); + ErrorF("[mi] num: %d size: %d\n", num, size); + ErrorF("[mi] extents: %d %d %d %d\n", + rgn->extents.x1, rgn->extents.y1, rgn->extents.x2, rgn->extents.y2); + for (i = 0; i < num; i++) + ErrorF("[mi] %d %d %d %d \n", + rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); + ErrorF("[mi] \n"); +} + +#ifdef DEBUG +Bool +RegionIsValid(RegionPtr reg) +{ + int i, numRects; + + if ((reg->extents.x1 > reg->extents.x2) || + (reg->extents.y1 > reg->extents.y2)) + return FALSE; + numRects = RegionNumRects(reg); + if (!numRects) + return ((reg->extents.x1 == reg->extents.x2) && + (reg->extents.y1 == reg->extents.y2) && + (reg->data->size || (reg->data == &RegionEmptyData))); + else if (numRects == 1) + return !reg->data; + else { + BoxPtr pboxP, pboxN; + BoxRec box; + + pboxP = RegionRects(reg); + box = *pboxP; + box.y2 = pboxP[numRects - 1].y2; + pboxN = pboxP + 1; + for (i = numRects; --i > 0; pboxP++, pboxN++) { + if ((pboxN->x1 >= pboxN->x2) || (pboxN->y1 >= pboxN->y2)) + return FALSE; + if (pboxN->x1 < box.x1) + box.x1 = pboxN->x1; + if (pboxN->x2 > box.x2) + box.x2 = pboxN->x2; + if ((pboxN->y1 < pboxP->y1) || + ((pboxN->y1 == pboxP->y1) && + ((pboxN->x1 < pboxP->x2) || (pboxN->y2 != pboxP->y2)))) + return FALSE; + } + return ((box.x1 == reg->extents.x1) && + (box.x2 == reg->extents.x2) && + (box.y1 == reg->extents.y1) && (box.y2 == reg->extents.y2)); + } +} +#endif /* DEBUG */ + +Bool +RegionBreak(RegionPtr pReg) +{ + xfreeData(pReg); + pReg->extents = RegionEmptyBox; + pReg->data = &RegionBrokenData; + return FALSE; +} + +Bool +RegionRectAlloc(RegionPtr pRgn, int n) +{ + RegDataPtr data; + + if (!pRgn->data) { + n++; + pRgn->data = xallocData(n); + if (!pRgn->data) + return RegionBreak(pRgn); + pRgn->data->numRects = 1; + *RegionBoxptr(pRgn) = pRgn->extents; + } + else if (!pRgn->data->size) { + pRgn->data = xallocData(n); + if (!pRgn->data) + return RegionBreak(pRgn); + pRgn->data->numRects = 0; + } + else { + if (n == 1) { + n = pRgn->data->numRects; + if (n > 500) /* XXX pick numbers out of a hat */ + n = 250; + } + n += pRgn->data->numRects; + data = (RegDataPtr) realloc(pRgn->data, RegionSizeof(n)); + if (!data) + return RegionBreak(pRgn); + pRgn->data = data; + } + pRgn->data->size = n; + return TRUE; +} + +/*====================================================================== + * Generic Region Operator + *====================================================================*/ + +/*- + *----------------------------------------------------------------------- + * RegionCoalesce -- + * Attempt to merge the boxes in the current band with those in the + * previous one. We are guaranteed that the current band extends to + * the end of the rects array. Used only by RegionOp. + * + * Results: + * The new index for the previous band. + * + * Side Effects: + * If coalescing takes place: + * - rectangles in the previous band will have their y2 fields + * altered. + * - pReg->data->numRects will be decreased. + * + *----------------------------------------------------------------------- + */ +_X_INLINE static int +RegionCoalesce(RegionPtr pReg, /* Region to coalesce */ + int prevStart, /* Index of start of previous band */ + int curStart) +{ /* Index of start of current band */ + BoxPtr pPrevBox; /* Current box in previous band */ + BoxPtr pCurBox; /* Current box in current band */ + int numRects; /* Number rectangles in both bands */ + int y2; /* Bottom of current band */ + + /* + * Figure out how many rectangles are in the band. + */ + numRects = curStart - prevStart; + assert(numRects == pReg->data->numRects - curStart); + + if (!numRects) + return curStart; + + /* + * The bands may only be coalesced if the bottom of the previous + * matches the top scanline of the current. + */ + pPrevBox = RegionBox(pReg, prevStart); + pCurBox = RegionBox(pReg, curStart); + if (pPrevBox->y2 != pCurBox->y1) + return curStart; + + /* + * Make sure the bands have boxes in the same places. This + * assumes that boxes have been added in such a way that they + * cover the most area possible. I.e. two boxes in a band must + * have some horizontal space between them. + */ + y2 = pCurBox->y2; + + do { + if ((pPrevBox->x1 != pCurBox->x1) || (pPrevBox->x2 != pCurBox->x2)) { + return curStart; + } + pPrevBox++; + pCurBox++; + numRects--; + } while (numRects); + + /* + * The bands may be merged, so set the bottom y of each box + * in the previous band to the bottom y of the current band. + */ + numRects = curStart - prevStart; + pReg->data->numRects -= numRects; + do { + pPrevBox--; + pPrevBox->y2 = y2; + numRects--; + } while (numRects); + return prevStart; +} + +/* Quicky macro to avoid trivial reject procedure calls to RegionCoalesce */ + +#define Coalesce(newReg, prevBand, curBand) \ + if (curBand - prevBand == newReg->data->numRects - curBand) { \ + prevBand = RegionCoalesce(newReg, prevBand, curBand); \ + } else { \ + prevBand = curBand; \ + } + +/*- + *----------------------------------------------------------------------- + * RegionAppendNonO -- + * Handle a non-overlapping band for the union and subtract operations. + * Just adds the (top/bottom-clipped) rectangles into the region. + * Doesn't have to check for subsumption or anything. + * + * Results: + * None. + * + * Side Effects: + * pReg->data->numRects is incremented and the rectangles overwritten + * with the rectangles we're passed. + * + *----------------------------------------------------------------------- + */ + +_X_INLINE static Bool +RegionAppendNonO(RegionPtr pReg, BoxPtr r, BoxPtr rEnd, int y1, int y2) +{ + BoxPtr pNextRect; + int newRects; + + newRects = rEnd - r; + + assert(y1 < y2); + assert(newRects != 0); + + /* Make sure we have enough space for all rectangles to be added */ + RECTALLOC(pReg, newRects); + pNextRect = RegionTop(pReg); + pReg->data->numRects += newRects; + do { + assert(r->x1 < r->x2); + ADDRECT(pNextRect, r->x1, y1, r->x2, y2); + r++; + } while (r != rEnd); + + return TRUE; +} + +#define FindBand(r, rBandEnd, rEnd, ry1) \ +{ \ + ry1 = r->y1; \ + rBandEnd = r+1; \ + while ((rBandEnd != rEnd) && (rBandEnd->y1 == ry1)) { \ + rBandEnd++; \ + } \ +} + +#define AppendRegions(newReg, r, rEnd) \ +{ \ + int newRects; \ + if ((newRects = rEnd - r)) { \ + RECTALLOC(newReg, newRects); \ + memmove((char *)RegionTop(newReg),(char *)r, \ + newRects * sizeof(BoxRec)); \ + newReg->data->numRects += newRects; \ + } \ +} + +/*- + *----------------------------------------------------------------------- + * RegionOp -- + * Apply an operation to two regions. Called by RegionUnion, RegionInverse, + * RegionSubtract, RegionIntersect.... Both regions MUST have at least one + * rectangle, and cannot be the same object. + * + * Results: + * TRUE if successful. + * + * Side Effects: + * The new region is overwritten. + * pOverlap set to TRUE if overlapFunc ever returns TRUE. + * + * Notes: + * The idea behind this function is to view the two regions as sets. + * Together they cover a rectangle of area that this function divides + * into horizontal bands where points are covered only by one region + * or by both. For the first case, the nonOverlapFunc is called with + * each the band and the band's upper and lower extents. For the + * second, the overlapFunc is called to process the entire band. It + * is responsible for clipping the rectangles in the band, though + * this function provides the boundaries. + * At the end of each band, the new region is coalesced, if possible, + * to reduce the number of rectangles in the region. + * + *----------------------------------------------------------------------- + */ + +typedef Bool (*OverlapProcPtr) (RegionPtr pReg, + BoxPtr r1, + BoxPtr r1End, + BoxPtr r2, + BoxPtr r2End, + short y1, short y2, Bool *pOverlap); + +static Bool +RegionOp(RegionPtr newReg, /* Place to store result */ + RegionPtr reg1, /* First region in operation */ + RegionPtr reg2, /* 2d region in operation */ + OverlapProcPtr overlapFunc, /* Function to call for over- + * lapping bands */ + Bool appendNon1, /* Append non-overlapping bands */ + /* in region 1 ? */ + Bool appendNon2, /* Append non-overlapping bands */ + /* in region 2 ? */ + Bool *pOverlap) +{ + BoxPtr r1; /* Pointer into first region */ + BoxPtr r2; /* Pointer into 2d region */ + BoxPtr r1End; /* End of 1st region */ + BoxPtr r2End; /* End of 2d region */ + short ybot; /* Bottom of intersection */ + short ytop; /* Top of intersection */ + RegDataPtr oldData; /* Old data for newReg */ + int prevBand; /* Index of start of + * previous band in newReg */ + int curBand; /* Index of start of current + * band in newReg */ + BoxPtr r1BandEnd; /* End of current band in r1 */ + BoxPtr r2BandEnd; /* End of current band in r2 */ + short top; /* Top of non-overlapping band */ + short bot; /* Bottom of non-overlapping band */ + int r1y1; /* Temps for r1->y1 and r2->y1 */ + int r2y1; + int newSize; + int numRects; + + /* + * Break any region computed from a broken region + */ + if (RegionNar(reg1) || RegionNar(reg2)) + return RegionBreak(newReg); + + /* + * Initialization: + * set r1, r2, r1End and r2End appropriately, save the rectangles + * of the destination region until the end in case it's one of + * the two source regions, then mark the "new" region empty, allocating + * another array of rectangles for it to use. + */ + + r1 = RegionRects(reg1); + newSize = RegionNumRects(reg1); + r1End = r1 + newSize; + numRects = RegionNumRects(reg2); + r2 = RegionRects(reg2); + r2End = r2 + numRects; + assert(r1 != r1End); + assert(r2 != r2End); + + oldData = NULL; + if (((newReg == reg1) && (newSize > 1)) || + ((newReg == reg2) && (numRects > 1))) { + oldData = newReg->data; + newReg->data = &RegionEmptyData; + } + /* guess at new size */ + if (numRects > newSize) + newSize = numRects; + newSize <<= 1; + if (!newReg->data) + newReg->data = &RegionEmptyData; + else if (newReg->data->size) + newReg->data->numRects = 0; + if (newSize > newReg->data->size) + if (!RegionRectAlloc(newReg, newSize)) + return FALSE; + + /* + * Initialize ybot. + * In the upcoming loop, ybot and ytop serve different functions depending + * on whether the band being handled is an overlapping or non-overlapping + * band. + * In the case of a non-overlapping band (only one of the regions + * has points in the band), ybot is the bottom of the most recent + * intersection and thus clips the top of the rectangles in that band. + * ytop is the top of the next intersection between the two regions and + * serves to clip the bottom of the rectangles in the current band. + * For an overlapping band (where the two regions intersect), ytop clips + * the top of the rectangles of both regions and ybot clips the bottoms. + */ + + ybot = min(r1->y1, r2->y1); + + /* + * prevBand serves to mark the start of the previous band so rectangles + * can be coalesced into larger rectangles. qv. RegionCoalesce, above. + * In the beginning, there is no previous band, so prevBand == curBand + * (curBand is set later on, of course, but the first band will always + * start at index 0). prevBand and curBand must be indices because of + * the possible expansion, and resultant moving, of the new region's + * array of rectangles. + */ + prevBand = 0; + + do { + /* + * This algorithm proceeds one source-band (as opposed to a + * destination band, which is determined by where the two regions + * intersect) at a time. r1BandEnd and r2BandEnd serve to mark the + * rectangle after the last one in the current band for their + * respective regions. + */ + assert(r1 != r1End); + assert(r2 != r2End); + + FindBand(r1, r1BandEnd, r1End, r1y1); + FindBand(r2, r2BandEnd, r2End, r2y1); + + /* + * First handle the band that doesn't intersect, if any. + * + * Note that attention is restricted to one band in the + * non-intersecting region at once, so if a region has n + * bands between the current position and the next place it overlaps + * the other, this entire loop will be passed through n times. + */ + if (r1y1 < r2y1) { + if (appendNon1) { + top = max(r1y1, ybot); + bot = min(r1->y2, r2y1); + if (top != bot) { + curBand = newReg->data->numRects; + RegionAppendNonO(newReg, r1, r1BandEnd, top, bot); + Coalesce(newReg, prevBand, curBand); + } + } + ytop = r2y1; + } + else if (r2y1 < r1y1) { + if (appendNon2) { + top = max(r2y1, ybot); + bot = min(r2->y2, r1y1); + if (top != bot) { + curBand = newReg->data->numRects; + RegionAppendNonO(newReg, r2, r2BandEnd, top, bot); + Coalesce(newReg, prevBand, curBand); + } + } + ytop = r1y1; + } + else { + ytop = r1y1; + } + + /* + * Now see if we've hit an intersecting band. The two bands only + * intersect if ybot > ytop + */ + ybot = min(r1->y2, r2->y2); + if (ybot > ytop) { + curBand = newReg->data->numRects; + (*overlapFunc) (newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot, + pOverlap); + Coalesce(newReg, prevBand, curBand); + } + + /* + * If we've finished with a band (y2 == ybot) we skip forward + * in the region to the next band. + */ + if (r1->y2 == ybot) + r1 = r1BandEnd; + if (r2->y2 == ybot) + r2 = r2BandEnd; + + } while (r1 != r1End && r2 != r2End); + + /* + * Deal with whichever region (if any) still has rectangles left. + * + * We only need to worry about banding and coalescing for the very first + * band left. After that, we can just group all remaining boxes, + * regardless of how many bands, into one final append to the list. + */ + + if ((r1 != r1End) && appendNon1) { + /* Do first nonOverlap1Func call, which may be able to coalesce */ + FindBand(r1, r1BandEnd, r1End, r1y1); + curBand = newReg->data->numRects; + RegionAppendNonO(newReg, r1, r1BandEnd, max(r1y1, ybot), r1->y2); + Coalesce(newReg, prevBand, curBand); + /* Just append the rest of the boxes */ + AppendRegions(newReg, r1BandEnd, r1End); + + } + else if ((r2 != r2End) && appendNon2) { + /* Do first nonOverlap2Func call, which may be able to coalesce */ + FindBand(r2, r2BandEnd, r2End, r2y1); + curBand = newReg->data->numRects; + RegionAppendNonO(newReg, r2, r2BandEnd, max(r2y1, ybot), r2->y2); + Coalesce(newReg, prevBand, curBand); + /* Append rest of boxes */ + AppendRegions(newReg, r2BandEnd, r2End); + } + + free(oldData); + + if (!(numRects = newReg->data->numRects)) { + xfreeData(newReg); + newReg->data = &RegionEmptyData; + } + else if (numRects == 1) { + newReg->extents = *RegionBoxptr(newReg); + xfreeData(newReg); + newReg->data = NULL; + } + else { + DOWNSIZE(newReg, numRects); + } + + return TRUE; +} + +/*- + *----------------------------------------------------------------------- + * RegionSetExtents -- + * Reset the extents of a region to what they should be. Called by + * Subtract and Intersect as they can't figure it out along the + * way or do so easily, as Union can. + * + * Results: + * None. + * + * Side Effects: + * The region's 'extents' structure is overwritten. + * + *----------------------------------------------------------------------- + */ +static void +RegionSetExtents(RegionPtr pReg) +{ + BoxPtr pBox, pBoxEnd; + + if (!pReg->data) + return; + if (!pReg->data->size) { + pReg->extents.x2 = pReg->extents.x1; + pReg->extents.y2 = pReg->extents.y1; + return; + } + + pBox = RegionBoxptr(pReg); + pBoxEnd = RegionEnd(pReg); + + /* + * Since pBox is the first rectangle in the region, it must have the + * smallest y1 and since pBoxEnd is the last rectangle in the region, + * it must have the largest y2, because of banding. Initialize x1 and + * x2 from pBox and pBoxEnd, resp., as good things to initialize them + * to... + */ + pReg->extents.x1 = pBox->x1; + pReg->extents.y1 = pBox->y1; + pReg->extents.x2 = pBoxEnd->x2; + pReg->extents.y2 = pBoxEnd->y2; + + assert(pReg->extents.y1 < pReg->extents.y2); + while (pBox <= pBoxEnd) { + if (pBox->x1 < pReg->extents.x1) + pReg->extents.x1 = pBox->x1; + if (pBox->x2 > pReg->extents.x2) + pReg->extents.x2 = pBox->x2; + pBox++; + }; + + assert(pReg->extents.x1 < pReg->extents.x2); +} + +/*====================================================================== + * Region Intersection + *====================================================================*/ +/*- + *----------------------------------------------------------------------- + * RegionIntersectO -- + * Handle an overlapping band for RegionIntersect. + * + * Results: + * TRUE if successful. + * + * Side Effects: + * Rectangles may be added to the region. + * + *----------------------------------------------------------------------- + */ + /*ARGSUSED*/ +#define MERGERECT(r) \ +{ \ + if (r->x1 <= x2) { \ + /* Merge with current rectangle */ \ + if (r->x1 < x2) *pOverlap = TRUE; \ + if (x2 < r->x2) x2 = r->x2; \ + } else { \ + /* Add current rectangle, start new one */ \ + NEWRECT(pReg, pNextRect, x1, y1, x2, y2); \ + x1 = r->x1; \ + x2 = r->x2; \ + } \ + r++; \ +} +/*====================================================================== + * Region Union + *====================================================================*/ +/*- + *----------------------------------------------------------------------- + * RegionUnionO -- + * Handle an overlapping band for the union operation. Picks the + * left-most rectangle each time and merges it into the region. + * + * Results: + * TRUE if successful. + * + * Side Effects: + * pReg is overwritten. + * pOverlap is set to TRUE if any boxes overlap. + * + *----------------------------------------------------------------------- + */ + static Bool +RegionUnionO(RegionPtr pReg, + BoxPtr r1, + BoxPtr r1End, + BoxPtr r2, BoxPtr r2End, short y1, short y2, Bool *pOverlap) +{ + BoxPtr pNextRect; + int x1; /* left and right side of current union */ + int x2; + + assert(y1 < y2); + assert(r1 != r1End && r2 != r2End); + + pNextRect = RegionTop(pReg); + + /* Start off current rectangle */ + if (r1->x1 < r2->x1) { + x1 = r1->x1; + x2 = r1->x2; + r1++; + } + else { + x1 = r2->x1; + x2 = r2->x2; + r2++; + } + while (r1 != r1End && r2 != r2End) { + if (r1->x1 < r2->x1) + MERGERECT(r1) + else + MERGERECT(r2); + } + + /* Finish off whoever (if any) is left */ + if (r1 != r1End) { + do { + MERGERECT(r1); + } while (r1 != r1End); + } + else if (r2 != r2End) { + do { + MERGERECT(r2); + } while (r2 != r2End); + } + + /* Add current rectangle */ + NEWRECT(pReg, pNextRect, x1, y1, x2, y2); + + return TRUE; +} + +/*====================================================================== + * Batch Rectangle Union + *====================================================================*/ + +/*- + *----------------------------------------------------------------------- + * RegionAppend -- + * + * "Append" the rgn rectangles onto the end of dstrgn, maintaining + * knowledge of YX-banding when it's easy. Otherwise, dstrgn just + * becomes a non-y-x-banded random collection of rectangles, and not + * yet a true region. After a sequence of appends, the caller must + * call RegionValidate to ensure that a valid region is constructed. + * + * Results: + * TRUE if successful. + * + * Side Effects: + * dstrgn is modified if rgn has rectangles. + * + */ +Bool +RegionAppend(RegionPtr dstrgn, RegionPtr rgn) +{ + int numRects, dnumRects, size; + BoxPtr new, old; + Bool prepend; + + if (RegionNar(rgn)) + return RegionBreak(dstrgn); + + if (!rgn->data && (dstrgn->data == &RegionEmptyData)) { + dstrgn->extents = rgn->extents; + dstrgn->data = NULL; + return TRUE; + } + + numRects = RegionNumRects(rgn); + if (!numRects) + return TRUE; + prepend = FALSE; + size = numRects; + dnumRects = RegionNumRects(dstrgn); + if (!dnumRects && (size < 200)) + size = 200; /* XXX pick numbers out of a hat */ + RECTALLOC(dstrgn, size); + old = RegionRects(rgn); + if (!dnumRects) + dstrgn->extents = rgn->extents; + else if (dstrgn->extents.x2 > dstrgn->extents.x1) { + BoxPtr first, last; + + first = old; + last = RegionBoxptr(dstrgn) + (dnumRects - 1); + if ((first->y1 > last->y2) || + ((first->y1 == last->y1) && (first->y2 == last->y2) && + (first->x1 > last->x2))) { + if (rgn->extents.x1 < dstrgn->extents.x1) + dstrgn->extents.x1 = rgn->extents.x1; + if (rgn->extents.x2 > dstrgn->extents.x2) + dstrgn->extents.x2 = rgn->extents.x2; + dstrgn->extents.y2 = rgn->extents.y2; + } + else { + first = RegionBoxptr(dstrgn); + last = old + (numRects - 1); + if ((first->y1 > last->y2) || + ((first->y1 == last->y1) && (first->y2 == last->y2) && + (first->x1 > last->x2))) { + prepend = TRUE; + if (rgn->extents.x1 < dstrgn->extents.x1) + dstrgn->extents.x1 = rgn->extents.x1; + if (rgn->extents.x2 > dstrgn->extents.x2) + dstrgn->extents.x2 = rgn->extents.x2; + dstrgn->extents.y1 = rgn->extents.y1; + } + else + dstrgn->extents.x2 = dstrgn->extents.x1; + } + } + if (prepend) { + new = RegionBox(dstrgn, numRects); + if (dnumRects == 1) + *new = *RegionBoxptr(dstrgn); + else + memmove((char *) new, (char *) RegionBoxptr(dstrgn), + dnumRects * sizeof(BoxRec)); + new = RegionBoxptr(dstrgn); + } + else + new = RegionBoxptr(dstrgn) + dnumRects; + if (numRects == 1) + *new = *old; + else + memmove((char *) new, (char *) old, numRects * sizeof(BoxRec)); + dstrgn->data->numRects += numRects; + return TRUE; +} + +#define ExchangeRects(a, b) \ +{ \ + BoxRec t; \ + t = rects[a]; \ + rects[a] = rects[b]; \ + rects[b] = t; \ +} + +static void +QuickSortRects(BoxRec rects[], int numRects) +{ + int y1; + int x1; + int i, j; + BoxPtr r; + + /* Always called with numRects > 1 */ + + do { + if (numRects == 2) { + if (rects[0].y1 > rects[1].y1 || + (rects[0].y1 == rects[1].y1 && rects[0].x1 > rects[1].x1)) + ExchangeRects(0, 1); + return; + } + + /* Choose partition element, stick in location 0 */ + ExchangeRects(0, numRects >> 1); + y1 = rects[0].y1; + x1 = rects[0].x1; + + /* Partition array */ + i = 0; + j = numRects; + do { + r = &(rects[i]); + do { + r++; + i++; + } while (i != numRects && + (r->y1 < y1 || (r->y1 == y1 && r->x1 < x1))); + r = &(rects[j]); + do { + r--; + j--; + } while (y1 < r->y1 || (y1 == r->y1 && x1 < r->x1)); + if (i < j) + ExchangeRects(i, j); + } while (i < j); + + /* Move partition element back to middle */ + ExchangeRects(0, j); + + /* Recurse */ + if (numRects - j - 1 > 1) + QuickSortRects(&rects[j + 1], numRects - j - 1); + numRects = j; + } while (numRects > 1); +} + +/*- + *----------------------------------------------------------------------- + * RegionValidate -- + * + * Take a ``region'' which is a non-y-x-banded random collection of + * rectangles, and compute a nice region which is the union of all the + * rectangles. + * + * Results: + * TRUE if successful. + * + * Side Effects: + * The passed-in ``region'' may be modified. + * pOverlap set to TRUE if any retangles overlapped, else FALSE; + * + * Strategy: + * Step 1. Sort the rectangles into ascending order with primary key y1 + * and secondary key x1. + * + * Step 2. Split the rectangles into the minimum number of proper y-x + * banded regions. This may require horizontally merging + * rectangles, and vertically coalescing bands. With any luck, + * this step in an identity tranformation (ala the Box widget), + * or a coalescing into 1 box (ala Menus). + * + * Step 3. Merge the separate regions down to a single region by calling + * Union. Maximize the work each Union call does by using + * a binary merge. + * + *----------------------------------------------------------------------- + */ + +Bool +RegionValidate(RegionPtr badreg, Bool *pOverlap) +{ + /* Descriptor for regions under construction in Step 2. */ + typedef struct { + RegionRec reg; + int prevBand; + int curBand; + } RegionInfo; + + int numRects; /* Original numRects for badreg */ + RegionInfo *ri; /* Array of current regions */ + int numRI; /* Number of entries used in ri */ + int sizeRI; /* Number of entries available in ri */ + int i; /* Index into rects */ + int j; /* Index into ri */ + RegionInfo *rit; /* &ri[j] */ + RegionPtr reg; /* ri[j].reg */ + BoxPtr box; /* Current box in rects */ + BoxPtr riBox; /* Last box in ri[j].reg */ + RegionPtr hreg; /* ri[j_half].reg */ + Bool ret = TRUE; + + *pOverlap = FALSE; + if (!badreg->data) { + good(badreg); + return TRUE; + } + numRects = badreg->data->numRects; + if (!numRects) { + if (RegionNar(badreg)) + return FALSE; + good(badreg); + return TRUE; + } + if (badreg->extents.x1 < badreg->extents.x2) { + if ((numRects) == 1) { + xfreeData(badreg); + badreg->data = (RegDataPtr) NULL; + } + else { + DOWNSIZE(badreg, numRects); + } + good(badreg); + return TRUE; + } + + /* Step 1: Sort the rects array into ascending (y1, x1) order */ + QuickSortRects(RegionBoxptr(badreg), numRects); + + /* Step 2: Scatter the sorted array into the minimum number of regions */ + + /* Set up the first region to be the first rectangle in badreg */ + /* Note that step 2 code will never overflow the ri[0].reg rects array */ + ri = (RegionInfo *) malloc(4 * sizeof(RegionInfo)); + if (!ri) + return RegionBreak(badreg); + sizeRI = 4; + numRI = 1; + ri[0].prevBand = 0; + ri[0].curBand = 0; + ri[0].reg = *badreg; + box = RegionBoxptr(&ri[0].reg); + ri[0].reg.extents = *box; + ri[0].reg.data->numRects = 1; + + /* Now scatter rectangles into the minimum set of valid regions. If the + next rectangle to be added to a region would force an existing rectangle + in the region to be split up in order to maintain y-x banding, just + forget it. Try the next region. If it doesn't fit cleanly into any + region, make a new one. */ + + for (i = numRects; --i > 0;) { + box++; + /* Look for a region to append box to */ + for (j = numRI, rit = ri; --j >= 0; rit++) { + reg = &rit->reg; + riBox = RegionEnd(reg); + + if (box->y1 == riBox->y1 && box->y2 == riBox->y2) { + /* box is in same band as riBox. Merge or append it */ + if (box->x1 <= riBox->x2) { + /* Merge it with riBox */ + if (box->x1 < riBox->x2) + *pOverlap = TRUE; + if (box->x2 > riBox->x2) + riBox->x2 = box->x2; + } + else { + RECTALLOC_BAIL(reg, 1, bail); + *RegionTop(reg) = *box; + reg->data->numRects++; + } + goto NextRect; /* So sue me */ + } + else if (box->y1 >= riBox->y2) { + /* Put box into new band */ + if (reg->extents.x2 < riBox->x2) + reg->extents.x2 = riBox->x2; + if (reg->extents.x1 > box->x1) + reg->extents.x1 = box->x1; + Coalesce(reg, rit->prevBand, rit->curBand); + rit->curBand = reg->data->numRects; + RECTALLOC_BAIL(reg, 1, bail); + *RegionTop(reg) = *box; + reg->data->numRects++; + goto NextRect; + } + /* Well, this region was inappropriate. Try the next one. */ + } /* for j */ + + /* Uh-oh. No regions were appropriate. Create a new one. */ + if (sizeRI == numRI) { + /* Oops, allocate space for new region information */ + sizeRI <<= 1; + rit = (RegionInfo *) realloc(ri, sizeRI * sizeof(RegionInfo)); + if (!rit) + goto bail; + ri = rit; + rit = &ri[numRI]; + } + numRI++; + rit->prevBand = 0; + rit->curBand = 0; + rit->reg.extents = *box; + rit->reg.data = NULL; + if (!RegionRectAlloc(&rit->reg, (i + numRI) / numRI)) /* MUST force allocation */ + goto bail; + NextRect:; + } /* for i */ + + /* Make a final pass over each region in order to Coalesce and set + extents.x2 and extents.y2 */ + + for (j = numRI, rit = ri; --j >= 0; rit++) { + reg = &rit->reg; + riBox = RegionEnd(reg); + reg->extents.y2 = riBox->y2; + if (reg->extents.x2 < riBox->x2) + reg->extents.x2 = riBox->x2; + Coalesce(reg, rit->prevBand, rit->curBand); + if (reg->data->numRects == 1) { /* keep unions happy below */ + xfreeData(reg); + reg->data = NULL; + } + } + + /* Step 3: Union all regions into a single region */ + while (numRI > 1) { + int half = numRI / 2; + + for (j = numRI & 1; j < (half + (numRI & 1)); j++) { + reg = &ri[j].reg; + hreg = &ri[j + half].reg; + if (!RegionOp(reg, reg, hreg, RegionUnionO, TRUE, TRUE, pOverlap)) + ret = FALSE; + if (hreg->extents.x1 < reg->extents.x1) + reg->extents.x1 = hreg->extents.x1; + if (hreg->extents.y1 < reg->extents.y1) + reg->extents.y1 = hreg->extents.y1; + if (hreg->extents.x2 > reg->extents.x2) + reg->extents.x2 = hreg->extents.x2; + if (hreg->extents.y2 > reg->extents.y2) + reg->extents.y2 = hreg->extents.y2; + xfreeData(hreg); + } + numRI -= half; + } + *badreg = ri[0].reg; + free(ri); + good(badreg); + return ret; + bail: + for (i = 0; i < numRI; i++) + xfreeData(&ri[i].reg); + free(ri); + return RegionBreak(badreg); +} + +RegionPtr +RegionFromRects(int nrects, xRectangle *prect, int ctype) +{ + + RegionPtr pRgn; + RegDataPtr pData; + BoxPtr pBox; + int i; + int x1, y1, x2, y2; + + pRgn = RegionCreate(NullBox, 0); + if (RegionNar(pRgn)) + return pRgn; + if (!nrects) + return pRgn; + if (nrects == 1) { + x1 = prect->x; + y1 = prect->y; + if ((x2 = x1 + (int) prect->width) > MAXSHORT) + x2 = MAXSHORT; + if ((y2 = y1 + (int) prect->height) > MAXSHORT) + y2 = MAXSHORT; + if (x1 != x2 && y1 != y2) { + pRgn->extents.x1 = x1; + pRgn->extents.y1 = y1; + pRgn->extents.x2 = x2; + pRgn->extents.y2 = y2; + pRgn->data = NULL; + } + return pRgn; + } + pData = xallocData(nrects); + if (!pData) { + RegionBreak(pRgn); + return pRgn; + } + pBox = (BoxPtr) (pData + 1); + for (i = nrects; --i >= 0; prect++) { + x1 = prect->x; + y1 = prect->y; + if ((x2 = x1 + (int) prect->width) > MAXSHORT) + x2 = MAXSHORT; + if ((y2 = y1 + (int) prect->height) > MAXSHORT) + y2 = MAXSHORT; + if (x1 != x2 && y1 != y2) { + pBox->x1 = x1; + pBox->y1 = y1; + pBox->x2 = x2; + pBox->y2 = y2; + pBox++; + } + } + if (pBox != (BoxPtr) (pData + 1)) { + pData->size = nrects; + pData->numRects = pBox - (BoxPtr) (pData + 1); + pRgn->data = pData; + if (ctype != CT_YXBANDED) { + Bool overlap; /* result ignored */ + + pRgn->extents.x1 = pRgn->extents.x2 = 0; + RegionValidate(pRgn, &overlap); + } + else + RegionSetExtents(pRgn); + good(pRgn); + } + else { + free(pData); + } + return pRgn; +} diff --git a/dix/registry.c b/dix/registry.c new file mode 100644 index 0000000..82a3340 --- /dev/null +++ b/dix/registry.c @@ -0,0 +1,351 @@ +/************************************************************ + +Author: Eamon Walsh <ewalsh@tycho.nsa.gov> + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifdef XREGISTRY + +#include <stdlib.h> +#include <string.h> +#include <X11/X.h> +#include <X11/Xproto.h> +#include "resource.h" +#include "registry.h" + +#define BASE_SIZE 16 +#define CORE "X11" +#define FILENAME SERVER_MISC_CONFIG_PATH "/protocol.txt" + +#define PROT_COMMENT '#' +#define PROT_REQUEST 'R' +#define PROT_EVENT 'V' +#define PROT_ERROR 'E' + +static FILE *fh; + +static char ***requests, **events, **errors; +static const char **resources; +static unsigned nmajor, *nminor, nevent, nerror, nresource; + +/* + * File parsing routines + */ +static int +double_size(void *p, unsigned n, unsigned size) +{ + char **ptr = (char **) p; + unsigned s, f; + + if (n) { + s = n * size; + n *= 2 * size; + f = n; + } + else { + s = 0; + n = f = BASE_SIZE * size; + } + + *ptr = realloc(*ptr, n); + if (!*ptr) { + dixResetRegistry(); + return FALSE; + } + memset(*ptr + s, 0, f - s); + return TRUE; +} + +static void +RegisterRequestName(unsigned major, unsigned minor, char *name) +{ + while (major >= nmajor) { + if (!double_size(&requests, nmajor, sizeof(char **))) + return; + if (!double_size(&nminor, nmajor, sizeof(unsigned))) + return; + nmajor = nmajor ? nmajor * 2 : BASE_SIZE; + } + while (minor >= nminor[major]) { + if (!double_size(requests + major, nminor[major], sizeof(char *))) + return; + nminor[major] = nminor[major] ? nminor[major] * 2 : BASE_SIZE; + } + + free(requests[major][minor]); + requests[major][minor] = name; +} + +static void +RegisterEventName(unsigned event, char *name) +{ + while (event >= nevent) { + if (!double_size(&events, nevent, sizeof(char *))) + return; + nevent = nevent ? nevent * 2 : BASE_SIZE; + } + + free(events[event]); + events[event] = name; +} + +static void +RegisterErrorName(unsigned error, char *name) +{ + while (error >= nerror) { + if (!double_size(&errors, nerror, sizeof(char *))) + return; + nerror = nerror ? nerror * 2 : BASE_SIZE; + } + + free(errors[error]); + errors[error] = name; +} + +void +RegisterExtensionNames(ExtensionEntry * extEntry) +{ + char buf[256], *lineobj, *ptr; + unsigned offset; + + if (fh == NULL) + return; + + rewind(fh); + + while (fgets(buf, sizeof(buf), fh)) { + lineobj = NULL; + ptr = strchr(buf, '\n'); + if (ptr) + *ptr = 0; + + /* Check for comments or empty lines */ + switch (buf[0]) { + case PROT_REQUEST: + case PROT_EVENT: + case PROT_ERROR: + break; + case PROT_COMMENT: + case '\0': + continue; + default: + goto invalid; + } + + /* Check for space character in the fifth position */ + ptr = strchr(buf, ' '); + if (!ptr || ptr != buf + 4) + goto invalid; + + /* Duplicate the string after the space */ + lineobj = strdup(ptr + 1); + if (!lineobj) + continue; + + /* Check for a colon somewhere on the line */ + ptr = strchr(buf, ':'); + if (!ptr) + goto invalid; + + /* Compare the part before colon with the target extension name */ + *ptr = 0; + if (strcmp(buf + 5, extEntry->name)) + goto skip; + + /* Get the opcode for the request, event, or error */ + offset = strtol(buf + 1, &ptr, 10); + if (offset == 0 && ptr == buf + 1) + goto invalid; + + /* Save the strdup result in the registry */ + switch (buf[0]) { + case PROT_REQUEST: + if (extEntry->base) + RegisterRequestName(extEntry->base, offset, lineobj); + else + RegisterRequestName(offset, 0, lineobj); + continue; + case PROT_EVENT: + RegisterEventName(extEntry->eventBase + offset, lineobj); + continue; + case PROT_ERROR: + RegisterErrorName(extEntry->errorBase + offset, lineobj); + continue; + } + + invalid: + LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n"); + skip: + free(lineobj); + } +} + +/* + * Registration functions + */ + +void +RegisterResourceName(RESTYPE resource, const char *name) +{ + resource &= TypeMask; + + while (resource >= nresource) { + if (!double_size(&resources, nresource, sizeof(char *))) + return; + nresource = nresource ? nresource * 2 : BASE_SIZE; + } + + resources[resource] = name; +} + +/* + * Lookup functions + */ + +const char * +LookupRequestName(int major, int minor) +{ + if (major >= nmajor) + return XREGISTRY_UNKNOWN; + if (minor >= nminor[major]) + return XREGISTRY_UNKNOWN; + + return requests[major][minor] ? requests[major][minor] : XREGISTRY_UNKNOWN; +} + +const char * +LookupMajorName(int major) +{ + if (major < 128) { + const char *retval; + + if (major >= nmajor) + return XREGISTRY_UNKNOWN; + if (0 >= nminor[major]) + return XREGISTRY_UNKNOWN; + + retval = requests[major][0]; + return retval ? retval + sizeof(CORE) : XREGISTRY_UNKNOWN; + } + else { + ExtensionEntry *extEntry = GetExtensionEntry(major); + + return extEntry ? extEntry->name : XREGISTRY_UNKNOWN; + } +} + +const char * +LookupEventName(int event) +{ + event &= 127; + if (event >= nevent) + return XREGISTRY_UNKNOWN; + + return events[event] ? events[event] : XREGISTRY_UNKNOWN; +} + +const char * +LookupErrorName(int error) +{ + if (error >= nerror) + return XREGISTRY_UNKNOWN; + + return errors[error] ? errors[error] : XREGISTRY_UNKNOWN; +} + +const char * +LookupResourceName(RESTYPE resource) +{ + resource &= TypeMask; + if (resource >= nresource) + return XREGISTRY_UNKNOWN; + + return resources[resource] ? resources[resource] : XREGISTRY_UNKNOWN; +} + +void +dixFreeRegistry(void) +{ + /* Free all memory */ + while (nmajor--) { + while (nminor[nmajor]) + free(requests[nmajor][--nminor[nmajor]]); + free(requests[nmajor]); + } + free(requests); + free(nminor); + + while (nevent--) + free(events[nevent]); + free(events); + + while (nerror--) + free(errors[nerror]); + free(errors); + + free(resources); + + requests = NULL; + nminor = NULL; + events = NULL; + errors = NULL; + resources = NULL; + + nmajor = nevent = nerror = nresource = 0; + + if (fh) { + fclose(fh); + fh = NULL; + } +} + +/* + * Setup and teardown + */ +void +dixResetRegistry(void) +{ + ExtensionEntry extEntry = { .name = CORE }; + + dixFreeRegistry(); + + /* Open the protocol file */ + fh = fopen(FILENAME, "r"); + if (!fh) + LogMessage(X_WARNING, + "Failed to open protocol names file " FILENAME "\n"); + + /* Add built-in resources */ + RegisterResourceName(RT_NONE, "NONE"); + RegisterResourceName(RT_WINDOW, "WINDOW"); + RegisterResourceName(RT_PIXMAP, "PIXMAP"); + RegisterResourceName(RT_GC, "GC"); + RegisterResourceName(RT_FONT, "FONT"); + RegisterResourceName(RT_CURSOR, "CURSOR"); + RegisterResourceName(RT_COLORMAP, "COLORMAP"); + RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); + RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); + RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); + + /* Add the core protocol */ + RegisterExtensionNames(&extEntry); +} + +#endif /* XREGISTRY */ diff --git a/dix/resource.c b/dix/resource.c new file mode 100644 index 0000000..2aafa34 --- /dev/null +++ b/dix/resource.c @@ -0,0 +1,1247 @@ +/************************************************************ + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ +/* The panoramix components contained the following notice */ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ +/* XSERVER_DTRACE additions: + * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/* Routines to manage various kinds of resources: + * + * CreateNewResourceType, CreateNewResourceClass, InitClientResources, + * FakeClientID, AddResource, FreeResource, FreeClientResources, + * FreeAllResources, LookupIDByType, LookupIDByClass, GetXIDRange + */ + +/* + * A resource ID is a 32 bit quantity, the upper 2 bits of which are + * off-limits for client-visible resources. The next 8 bits are + * used as client ID, and the low 22 bits come from the client. + * A resource ID is "hashed" by extracting and xoring subfields + * (varying with the size of the hash table). + * + * It is sometimes necessary for the server to create an ID that looks + * like it belongs to a client. This ID, however, must not be one + * the client actually can create, or we have the potential for conflict. + * The 31st bit of the ID is reserved for the server's use for this + * purpose. By setting CLIENT_ID(id) to the client, the SERVER_BIT to + * 1, and an otherwise arbitrary ID in the low 22 bits, we can create a + * resource "owned" by the client. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include "misc.h" +#include "os.h" +#include "resource.h" +#include "dixstruct.h" +#include "opaque.h" +#include "windowstr.h" +#include "dixfont.h" +#include "colormap.h" +#include "inputstr.h" +#include "dixevents.h" +#include "dixgrabs.h" +#include "cursor.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "xace.h" +#include <assert.h> +#include "registry.h" +#include "gcstruct.h" + +#ifdef XSERVER_DTRACE +#include <sys/types.h> +typedef const char *string; + +#include "Xserver-dtrace.h" + +#define TypeNameString(t) LookupResourceName(t) +#endif + +static void RebuildTable(int /*client */ + ); + +#define SERVER_MINID 32 + +#define INITBUCKETS 64 +#define INITHASHSIZE 6 +#define MAXHASHSIZE 11 + +typedef struct _Resource { + struct _Resource *next; + XID id; + RESTYPE type; + pointer value; +} ResourceRec, *ResourcePtr; + +typedef struct _ClientResource { + ResourcePtr *resources; + int elements; + int buckets; + int hashsize; /* log(2)(buckets) */ + XID fakeID; + XID endFakeID; +} ClientResourceRec; + +RESTYPE lastResourceType; +static RESTYPE lastResourceClass; +RESTYPE TypeMask; + +struct ResourceType { + DeleteType deleteFunc; + SizeType sizeFunc; + FindTypeSubResources findSubResFunc; + int errorValue; +}; + +/** + * Used by all resources that don't specify a function to calculate + * resource size. Currently this is used for all resources with + * insignificant memory usage. + * + * @see GetResourceTypeSizeFunc, SetResourceTypeSizeFunc + * + * @param[in] value Pointer to resource object. + * + * @param[in] id Resource ID for the object. + * + * @param[out] size Fill all fields to zero to indicate that size of + * resource can't be determined. + */ +static void +GetDefaultBytes(pointer value, XID id, ResourceSizePtr size) +{ + size->resourceSize = 0; + size->pixmapRefSize = 0; + size->refCnt = 1; +} + +/** + * Used by all resources that don't specify a function to iterate + * through subresources. Currently this is used for all resources with + * insignificant memory usage. + * + * @see FindSubResources, SetResourceTypeFindSubResFunc + * + * @param[in] value Pointer to resource object. + * + * @param[in] func Function to call for each subresource. + + * @param[out] cdata Pointer to opaque data. + */ +static void +DefaultFindSubRes(pointer value, FindAllRes func, pointer cdata) +{ + /* do nothing */ +} + +/** + * Calculate drawable size in bytes. Reference counting is not taken + * into account. + * + * @param[in] drawable Pointer to a drawable. + * + * @return Estimate of total memory usage for the drawable. + */ +static unsigned long +GetDrawableBytes(DrawablePtr drawable) +{ + int bytes = 0; + + if (drawable) + { + int bytesPerPixel = drawable->bitsPerPixel >> 3; + int numberOfPixels = drawable->width * drawable->height; + bytes = numberOfPixels * bytesPerPixel; + } + + return bytes; +} + +/** + * Calculate pixmap size in bytes. Reference counting is taken into + * account. Any extra data attached by extensions and drivers is not + * taken into account. The purpose of this function is to estimate + * memory usage that can be attributed to single reference of the + * pixmap. + * + * @param[in] value Pointer to a pixmap. + * + * @param[in] id Resource ID of pixmap. If the pixmap hasn't been + * added as resource, just pass value->drawable.id. + * + * @param[out] size Estimate of memory usage attributed to a single + * pixmap reference. + */ +static void +GetPixmapBytes(pointer value, XID id, ResourceSizePtr size) +{ + PixmapPtr pixmap = value; + + size->resourceSize = 0; + size->pixmapRefSize = 0; + size->refCnt = pixmap->refcnt; + + if (pixmap && pixmap->refcnt) + { + DrawablePtr drawable = &pixmap->drawable; + size->resourceSize = GetDrawableBytes(drawable); + size->pixmapRefSize = size->resourceSize / pixmap->refcnt; + } +} + +/** + * Calculate window size in bytes. The purpose of this function is to + * estimate memory usage that can be attributed to all pixmap + * references of the window. + * + * @param[in] value Pointer to a window. + * + * @param[in] id Resource ID of window. + * + * @param[out] size Estimate of memory usage attributed to a all + * pixmap references of a window. + */ +static void +GetWindowBytes(pointer value, XID id, ResourceSizePtr size) +{ + SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); + ResourceSizeRec pixmapSize = { 0, 0, 0 }; + WindowPtr window = value; + + /* Currently only pixmap bytes are reported to clients. */ + size->resourceSize = 0; + + /* Calculate pixmap reference sizes. */ + size->pixmapRefSize = 0; + + size->refCnt = 1; + + if (window->backgroundState == BackgroundPixmap) + { + PixmapPtr pixmap = window->background.pixmap; + pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); + size->pixmapRefSize += pixmapSize.pixmapRefSize; + } + if (window->border.pixmap && !window->borderIsPixel) + { + PixmapPtr pixmap = window->border.pixmap; + pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); + size->pixmapRefSize += pixmapSize.pixmapRefSize; + } +} + +/** + * Iterate through subresources of a window. The purpose of this + * function is to gather accurate information on what resources + * a resource uses. + * + * @note Currently only sub-pixmaps are iterated + * + * @param[in] value Pointer to a window + * + * @param[in] func Function to call with each subresource + * + * @param[out] cdata Pointer to opaque data + */ +static void +FindWindowSubRes(pointer value, FindAllRes func, pointer cdata) +{ + WindowPtr window = value; + + /* Currently only pixmap subresources are reported to clients. */ + + if (window->backgroundState == BackgroundPixmap) + { + PixmapPtr pixmap = window->background.pixmap; + func(window->background.pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); + } + if (window->border.pixmap && !window->borderIsPixel) + { + PixmapPtr pixmap = window->border.pixmap; + func(window->background.pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); + } +} + +/** + * Calculate graphics context size in bytes. The purpose of this + * function is to estimate memory usage that can be attributed to all + * pixmap references of the graphics context. + * + * @param[in] value Pointer to a graphics context. + * + * @param[in] id Resource ID of graphics context. + * + * @param[out] size Estimate of memory usage attributed to a all + * pixmap references of a graphics context. + */ +static void +GetGcBytes(pointer value, XID id, ResourceSizePtr size) +{ + SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); + ResourceSizeRec pixmapSize = { 0, 0, 0 }; + GCPtr gc = value; + + /* Currently only pixmap bytes are reported to clients. */ + size->resourceSize = 0; + + /* Calculate pixmap reference sizes. */ + size->pixmapRefSize = 0; + + size->refCnt = 1; + if (gc->stipple) + { + PixmapPtr pixmap = gc->stipple; + pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); + size->pixmapRefSize += pixmapSize.pixmapRefSize; + } + if (gc->tile.pixmap && !gc->tileIsPixel) + { + PixmapPtr pixmap = gc->tile.pixmap; + pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); + size->pixmapRefSize += pixmapSize.pixmapRefSize; + } +} + +/** + * Iterate through subresources of a graphics context. The purpose of + * this function is to gather accurate information on what resources a + * resource uses. + * + * @note Currently only sub-pixmaps are iterated + * + * @param[in] value Pointer to a window + * + * @param[in] func Function to call with each subresource + * + * @param[out] cdata Pointer to opaque data + */ +static void +FindGCSubRes(pointer value, FindAllRes func, pointer cdata) +{ + GCPtr gc = value; + + /* Currently only pixmap subresources are reported to clients. */ + + if (gc->stipple) + { + PixmapPtr pixmap = gc->stipple; + func(pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); + } + if (gc->tile.pixmap && !gc->tileIsPixel) + { + PixmapPtr pixmap = gc->tile.pixmap; + func(pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); + } +} + +static struct ResourceType *resourceTypes; + +static const struct ResourceType predefTypes[] = { + [RT_NONE & (RC_LASTPREDEF - 1)] = { + .deleteFunc = (DeleteType) NoopDDA, + .sizeFunc = GetDefaultBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadValue, + }, + [RT_WINDOW & (RC_LASTPREDEF - 1)] = { + .deleteFunc = DeleteWindow, + .sizeFunc = GetWindowBytes, + .findSubResFunc = FindWindowSubRes, + .errorValue = BadWindow, + }, + [RT_PIXMAP & (RC_LASTPREDEF - 1)] = { + .deleteFunc = dixDestroyPixmap, + .sizeFunc = GetPixmapBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadPixmap, + }, + [RT_GC & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeGC, + .sizeFunc = GetGcBytes, + .findSubResFunc = FindGCSubRes, + .errorValue = BadGC, + }, + [RT_FONT & (RC_LASTPREDEF - 1)] = { + .deleteFunc = CloseFont, + .sizeFunc = GetDefaultBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadFont, + }, + [RT_CURSOR & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeCursor, + .sizeFunc = GetDefaultBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadCursor, + }, + [RT_COLORMAP & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeColormap, + .sizeFunc = GetDefaultBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadColor, + }, + [RT_CMAPENTRY & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeClientPixels, + .sizeFunc = GetDefaultBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadColor, + }, + [RT_OTHERCLIENT & (RC_LASTPREDEF - 1)] = { + .deleteFunc = OtherClientGone, + .sizeFunc = GetDefaultBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadValue, + }, + [RT_PASSIVEGRAB & (RC_LASTPREDEF - 1)] = { + .deleteFunc = DeletePassiveGrab, + .sizeFunc = GetDefaultBytes, + .findSubResFunc = DefaultFindSubRes, + .errorValue = BadValue, + }, +}; + +CallbackListPtr ResourceStateCallback; + +static _X_INLINE void +CallResourceStateCallback(ResourceState state, ResourceRec * res) +{ + if (ResourceStateCallback) { + ResourceStateInfoRec rsi = { state, res->id, res->type, res->value }; + CallCallbacks(&ResourceStateCallback, &rsi); + } +} + +RESTYPE +CreateNewResourceType(DeleteType deleteFunc, const char *name) +{ + RESTYPE next = lastResourceType + 1; + struct ResourceType *types; + + if (next & lastResourceClass) + return 0; + types = realloc(resourceTypes, (next + 1) * sizeof(*resourceTypes)); + if (!types) + return 0; + + lastResourceType = next; + resourceTypes = types; + resourceTypes[next].deleteFunc = deleteFunc; + resourceTypes[next].sizeFunc = GetDefaultBytes; + resourceTypes[next].findSubResFunc = DefaultFindSubRes; + resourceTypes[next].errorValue = BadValue; + + /* Called even if name is NULL, to remove any previous entry */ + RegisterResourceName(next, name); + + return next; +} + +/** + * Get the function used to calculate resource size. Extensions and + * drivers need to be able to determine the current size calculation + * function if they want to wrap or override it. + * + * @param[in] type Resource type used in size calculations. + * + * @return Function to calculate the size of a single + * resource. + */ +SizeType +GetResourceTypeSizeFunc(RESTYPE type) +{ + return resourceTypes[type & TypeMask].sizeFunc; +} + +/** + * Override the default function that calculates resource size. For + * example, video driver knows better how to calculate pixmap memory + * usage and can therefore wrap or override size calculation for + * RT_PIXMAP. + * + * @param[in] type Resource type used in size calculations. + * + * @param[in] sizeFunc Function to calculate the size of a single + * resource. + */ +void +SetResourceTypeSizeFunc(RESTYPE type, SizeType sizeFunc) +{ + resourceTypes[type & TypeMask].sizeFunc = sizeFunc; +} + +/** + * Provide a function for iterating the subresources of a resource. + * This allows for example more accurate accounting of the (memory) + * resources consumed by a resource. + * + * @see FindSubResources + * + * @param[in] type Resource type used in size calculations. + * + * @param[in] sizeFunc Function to calculate the size of a single + * resource. + */ +void +SetResourceTypeFindSubResFunc(RESTYPE type, FindTypeSubResources findFunc) +{ + resourceTypes[type & TypeMask].findSubResFunc = findFunc; +} + +void +SetResourceTypeErrorValue(RESTYPE type, int errorValue) +{ + resourceTypes[type & TypeMask].errorValue = errorValue; +} + +RESTYPE +CreateNewResourceClass(void) +{ + RESTYPE next = lastResourceClass >> 1; + + if (next & lastResourceType) + return 0; + lastResourceClass = next; + TypeMask = next - 1; + return next; +} + +static ClientResourceRec clientTable[MAXCLIENTS]; + +/***************** + * InitClientResources + * When a new client is created, call this to allocate space + * in resource table + *****************/ + +Bool +InitClientResources(ClientPtr client) +{ + int i, j; + + if (client == serverClient) { + lastResourceType = RT_LASTPREDEF; + lastResourceClass = RC_LASTPREDEF; + TypeMask = RC_LASTPREDEF - 1; + free(resourceTypes); + resourceTypes = malloc(sizeof(predefTypes)); + if (!resourceTypes) + return FALSE; + memcpy(resourceTypes, predefTypes, sizeof(predefTypes)); + } + clientTable[i = client->index].resources = + malloc(INITBUCKETS * sizeof(ResourcePtr)); + if (!clientTable[i].resources) + return FALSE; + clientTable[i].buckets = INITBUCKETS; + clientTable[i].elements = 0; + clientTable[i].hashsize = INITHASHSIZE; + /* Many IDs allocated from the server client are visible to clients, + * so we don't use the SERVER_BIT for them, but we have to start + * past the magic value constants used in the protocol. For normal + * clients, we can start from zero, with SERVER_BIT set. + */ + clientTable[i].fakeID = client->clientAsMask | + (client->index ? SERVER_BIT : SERVER_MINID); + clientTable[i].endFakeID = (clientTable[i].fakeID | RESOURCE_ID_MASK) + 1; + for (j = 0; j < INITBUCKETS; j++) { + clientTable[i].resources[j] = NULL; + } + return TRUE; +} + +int +HashResourceID(XID id, int numBits) +{ + id &= RESOURCE_ID_MASK; + switch (numBits) + { + case 6: + return ((int)(0x03F & (id ^ (id>>6) ^ (id>>12)))); + case 7: + return ((int)(0x07F & (id ^ (id>>7) ^ (id>>13)))); + case 8: + return ((int)(0x0FF & (id ^ (id>>8) ^ (id>>16)))); + case 9: + return ((int)(0x1FF & (id ^ (id>>9)))); + case 10: + return ((int)(0x3FF & (id ^ (id>>10)))); + case 11: + return ((int)(0x7FF & (id ^ (id>>11)))); + } + if (numBits >= 11) + return ((int)(0x7FF & (id ^ (id>>11)))); + else + { + assert(numBits >= 0); + return id & ~((~0) << numBits); + } +} + +static XID +AvailableID(int client, XID id, XID maxid, XID goodid) +{ + ResourcePtr res; + + if ((goodid >= id) && (goodid <= maxid)) + return goodid; + for (; id <= maxid; id++) { + res = clientTable[client].resources[HashResourceID(id, clientTable[client].hashsize)]; + while (res && (res->id != id)) + res = res->next; + if (!res) + return id; + } + return 0; +} + +void +GetXIDRange(int client, Bool server, XID *minp, XID *maxp) +{ + XID id, maxid; + ResourcePtr *resp; + ResourcePtr res; + int i; + XID goodid; + + id = (Mask) client << CLIENTOFFSET; + if (server) + id |= client ? SERVER_BIT : SERVER_MINID; + maxid = id | RESOURCE_ID_MASK; + goodid = 0; + for (resp = clientTable[client].resources, i = clientTable[client].buckets; + --i >= 0;) { + for (res = *resp++; res; res = res->next) { + if ((res->id < id) || (res->id > maxid)) + continue; + if (((res->id - id) >= (maxid - res->id)) ? + (goodid = AvailableID(client, id, res->id - 1, goodid)) : + !(goodid = AvailableID(client, res->id + 1, maxid, goodid))) + maxid = res->id - 1; + else + id = res->id + 1; + } + } + if (id > maxid) + id = maxid = 0; + *minp = id; + *maxp = maxid; +} + +/** + * GetXIDList is called by the XC-MISC extension's MiscGetXIDList function. + * This function tries to find count unused XIDs for the given client. It + * puts the IDs in the array pids and returns the number found, which should + * almost always be the number requested. + * + * The circumstances that lead to a call to this function are very rare. + * Xlib must run out of IDs while trying to generate a request that wants + * multiple ID's, like the Multi-buffering CreateImageBuffers request. + * + * No rocket science in the implementation; just iterate over all + * possible IDs for the given client and pick the first count IDs + * that aren't in use. A more efficient algorithm could probably be + * invented, but this will be used so rarely that this should suffice. + */ + +unsigned int +GetXIDList(ClientPtr pClient, unsigned count, XID *pids) +{ + unsigned int found = 0; + XID rc, id = pClient->clientAsMask; + XID maxid; + pointer val; + + maxid = id | RESOURCE_ID_MASK; + while ((found < count) && (id <= maxid)) { + rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient, + DixGetAttrAccess); + if (rc == BadValue) { + pids[found++] = id; + } + id++; + } + return found; +} + +/* + * Return the next usable fake client ID. + * + * Normally this is just the next one in line, but if we've used the last + * in the range, we need to find a new range of safe IDs to avoid + * over-running another client. + */ + +XID +FakeClientID(int client) +{ + XID id, maxid; + + id = clientTable[client].fakeID++; + if (id != clientTable[client].endFakeID) + return id; + GetXIDRange(client, TRUE, &id, &maxid); + if (!id) { + if (!client) + FatalError("FakeClientID: server internal ids exhausted\n"); + MarkClientException(clients[client]); + id = ((Mask) client << CLIENTOFFSET) | (SERVER_BIT * 3); + maxid = id | RESOURCE_ID_MASK; + } + clientTable[client].fakeID = id + 1; + clientTable[client].endFakeID = maxid + 1; + return id; +} + +Bool +AddResource(XID id, RESTYPE type, pointer value) +{ + int client; + ClientResourceRec *rrec; + ResourcePtr res, *head; + +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type)); +#endif + client = CLIENT_ID(id); + rrec = &clientTable[client]; + if (!rrec->buckets) { + ErrorF("[dix] AddResource(%lx, %x, %lx), client=%d \n", + (unsigned long) id, type, (unsigned long) value, client); + FatalError("client not in use\n"); + } + if ((rrec->elements >= 4 * rrec->buckets) && (rrec->hashsize < MAXHASHSIZE)) + RebuildTable(client); + head = &rrec->resources[HashResourceID(id, clientTable[client].hashsize)]; + res = malloc(sizeof(ResourceRec)); + if (!res) { + (*resourceTypes[type & TypeMask].deleteFunc) (value, id); + return FALSE; + } + res->next = *head; + res->id = id; + res->type = type; + res->value = value; + *head = res; + rrec->elements++; + CallResourceStateCallback(ResourceStateAdding, res); + return TRUE; +} + +static void +RebuildTable(int client) +{ + int j; + ResourcePtr res, next; + ResourcePtr **tails, *resources; + ResourcePtr **tptr, *rptr; + + /* + * For now, preserve insertion order, since some ddx layers depend + * on resources being free in the opposite order they are added. + */ + + j = 2 * clientTable[client].buckets; + tails = malloc(j * sizeof(ResourcePtr *)); + if (!tails) + return; + resources = malloc(j * sizeof(ResourcePtr)); + if (!resources) { + free(tails); + return; + } + for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++) { + *rptr = NULL; + *tptr = rptr; + } + clientTable[client].hashsize++; + for (j = clientTable[client].buckets, + rptr = clientTable[client].resources; --j >= 0; rptr++) { + for (res = *rptr; res; res = next) { + next = res->next; + res->next = NULL; + tptr = &tails[HashResourceID(res->id, clientTable[client].hashsize)]; + **tptr = res; + *tptr = &res->next; + } + } + free(tails); + clientTable[client].buckets *= 2; + free(clientTable[client].resources); + clientTable[client].resources = resources; +} + +static void +doFreeResource(ResourcePtr res, Bool skip) +{ + CallResourceStateCallback(ResourceStateFreeing, res); + + if (!skip) + resourceTypes[res->type & TypeMask].deleteFunc(res->value, res->id); + + free(res); +} + +void +FreeResource(XID id, RESTYPE skipDeleteFuncType) +{ + int cid; + ResourcePtr res; + ResourcePtr *prev, *head; + int *eltptr; + int elements; + + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) { + head = &clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; + eltptr = &clientTable[cid].elements; + + prev = head; + while ((res = *prev)) { + if (res->id == id) { + RESTYPE rtype = res->type; + +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(res->id, res->type, + res->value, TypeNameString(res->type)); +#endif + *prev = res->next; + elements = --*eltptr; + + doFreeResource(res, rtype == skipDeleteFuncType); + + if (*eltptr != elements) + prev = head; /* prev may no longer be valid */ + } + else + prev = &res->next; + } + } +} + +void +FreeResourceByType(XID id, RESTYPE type, Bool skipFree) +{ + int cid; + ResourcePtr res; + ResourcePtr *prev, *head; + + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) { + head = &clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; + + prev = head; + while ((res = *prev)) { + if (res->id == id && res->type == type) { +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(res->id, res->type, + res->value, TypeNameString(res->type)); +#endif + *prev = res->next; + clientTable[cid].elements--; + + doFreeResource(res, skipFree); + + break; + } + else + prev = &res->next; + } + } +} + +/* + * Change the value associated with a resource id. Caller + * is responsible for "doing the right thing" with the old + * data + */ + +Bool +ChangeResourceValue(XID id, RESTYPE rtype, pointer value) +{ + int cid; + ResourcePtr res; + + if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) { + res = clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; + + for (; res; res = res->next) + if ((res->id == id) && (res->type == rtype)) { + res->value = value; + return TRUE; + } + } + return FALSE; +} + +/* Note: if func adds or deletes resources, then func can get called + * more than once for some resources. If func adds new resources, + * func might or might not get called for them. func cannot both + * add and delete an equal number of resources! + */ + +void +FindClientResourcesByType(ClientPtr client, + RESTYPE type, FindResType func, pointer cdata) +{ + ResourcePtr *resources; + ResourcePtr this, next; + int i, elements; + int *eltptr; + + if (!client) + client = serverClient; + + resources = clientTable[client->index].resources; + eltptr = &clientTable[client->index].elements; + for (i = 0; i < clientTable[client->index].buckets; i++) { + for (this = resources[i]; this; this = next) { + next = this->next; + if (!type || this->type == type) { + elements = *eltptr; + (*func) (this->value, this->id, cdata); + if (*eltptr != elements) + next = resources[i]; /* start over */ + } + } + } +} + +void FindSubResources(pointer resource, + RESTYPE type, + FindAllRes func, + pointer cdata) +{ + struct ResourceType rtype = resourceTypes[type & TypeMask]; + rtype.findSubResFunc(resource, func, cdata); +} + +void +FindAllClientResources(ClientPtr client, FindAllRes func, pointer cdata) +{ + ResourcePtr *resources; + ResourcePtr this, next; + int i, elements; + int *eltptr; + + if (!client) + client = serverClient; + + resources = clientTable[client->index].resources; + eltptr = &clientTable[client->index].elements; + for (i = 0; i < clientTable[client->index].buckets; i++) { + for (this = resources[i]; this; this = next) { + next = this->next; + elements = *eltptr; + (*func) (this->value, this->id, this->type, cdata); + if (*eltptr != elements) + next = resources[i]; /* start over */ + } + } +} + +pointer +LookupClientResourceComplex(ClientPtr client, + RESTYPE type, + FindComplexResType func, pointer cdata) +{ + ResourcePtr *resources; + ResourcePtr this, next; + pointer value; + int i; + + if (!client) + client = serverClient; + + resources = clientTable[client->index].resources; + for (i = 0; i < clientTable[client->index].buckets; i++) { + for (this = resources[i]; this; this = next) { + next = this->next; + if (!type || this->type == type) { + /* workaround func freeing the type as DRI1 does */ + value = this->value; + if ((*func) (value, this->id, cdata)) + return value; + } + } + } + return NULL; +} + +void +FreeClientNeverRetainResources(ClientPtr client) +{ + ResourcePtr *resources; + ResourcePtr this; + ResourcePtr *prev; + int j, elements; + int *eltptr; + + if (!client) + return; + + resources = clientTable[client->index].resources; + eltptr = &clientTable[client->index].elements; + for (j = 0; j < clientTable[client->index].buckets; j++) { + prev = &resources[j]; + while ((this = *prev)) { + RESTYPE rtype = this->type; + + if (rtype & RC_NEVERRETAIN) { +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(this->id, this->type, + this->value, TypeNameString(this->type)); +#endif + *prev = this->next; + clientTable[client->index].elements--; + elements = *eltptr; + + doFreeResource(this, FALSE); + + if (*eltptr != elements) + prev = &resources[j]; /* prev may no longer be valid */ + } + else + prev = &this->next; + } + } +} + +void +FreeClientResources(ClientPtr client) +{ + ResourcePtr *resources; + ResourcePtr this; + int j; + + /* This routine shouldn't be called with a null client, but just in + case ... */ + + if (!client) + return; + + HandleSaveSet(client); + + resources = clientTable[client->index].resources; + for (j = 0; j < clientTable[client->index].buckets; j++) { + /* It may seem silly to update the head of this resource list as + we delete the members, since the entire list will be deleted any way, + but there are some resource deletion functions "FreeClientPixels" for + one which do a LookupID on another resource id (a Colormap id in this + case), so the resource list must be kept valid up to the point that + it is deleted, so every time we delete a resource, we must update the + head, just like in FreeResource. I hope that this doesn't slow down + mass deletion appreciably. PRH */ + + ResourcePtr *head; + + head = &resources[j]; + + for (this = *head; this; this = *head) { +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(this->id, this->type, + this->value, TypeNameString(this->type)); +#endif + *head = this->next; + clientTable[client->index].elements--; + + doFreeResource(this, FALSE); + } + } + free(clientTable[client->index].resources); + clientTable[client->index].resources = NULL; + clientTable[client->index].buckets = 0; +} + +void +FreeAllResources(void) +{ + int i; + + for (i = currentMaxClients; --i >= 0;) { + if (clientTable[i].buckets) + FreeClientResources(clients[i]); + } +} + +Bool +LegalNewID(XID id, ClientPtr client) +{ + pointer val; + int rc; + +#ifdef PANORAMIX + XID minid, maxid; + + if (!noPanoramiXExtension) { + minid = client->clientAsMask | (client->index ? + SERVER_BIT : SERVER_MINID); + maxid = (clientTable[client->index].fakeID | RESOURCE_ID_MASK) + 1; + if ((id >= minid) && (id <= maxid)) + return TRUE; + } +#endif /* PANORAMIX */ + if (client->clientAsMask == (id & ~RESOURCE_ID_MASK)) { + rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient, + DixGetAttrAccess); + return rc == BadValue; + } + return FALSE; +} + +int +dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype, + ClientPtr client, Mask mode) +{ + int cid = CLIENT_ID(id); + ResourcePtr res = NULL; + + *result = NULL; + if ((rtype & TypeMask) > lastResourceType) + return BadImplementation; + + if ((cid < MAXCLIENTS) && clientTable[cid].buckets) { + res = clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; + + for (; res; res = res->next) + if (res->id == id && res->type == rtype) + break; + } + if (!res) + 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; + } + + *result = res->value; + return Success; +} + +int +dixLookupResourceByClass(pointer *result, XID id, RESTYPE rclass, + ClientPtr client, Mask mode) +{ + int cid = CLIENT_ID(id); + ResourcePtr res = NULL; + + *result = NULL; + + if ((cid < MAXCLIENTS) && clientTable[cid].buckets) { + res = clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; + + for (; res; res = res->next) + if (res->id == id && (res->type & rclass)) + break; + } + if (!res) + return BadValue; + + if (client) { + client->errorValue = id; + cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, + res->value, RT_NONE, NULL, mode); + if (cid != Success) + return cid; + } + + *result = res->value; + return Success; +} diff --git a/dix/selection.c b/dix/selection.c new file mode 100644 index 0000000..e905b1e --- /dev/null +++ b/dix/selection.c @@ -0,0 +1,310 @@ +/************************************************************ + +Copyright 1987, 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "windowstr.h" +#include "dixstruct.h" +#include "dispatch.h" +#include "selection.h" +#include "xace.h" + +/***************************************************************** + * Selection Stuff + * + * dixLookupSelection + * + * Selections are global to the server. The list of selections should + * not be traversed directly. Instead, use the functions listed above. + * + *****************************************************************/ + +Selection *CurrentSelections; +CallbackListPtr SelectionCallback; + +int +dixLookupSelection(Selection ** result, Atom selectionName, + ClientPtr client, Mask access_mode) +{ + Selection *pSel; + int rc = BadMatch; + + client->errorValue = selectionName; + + for (pSel = CurrentSelections; pSel; pSel = pSel->next) + if (pSel->selection == selectionName) + break; + + if (pSel) + rc = XaceHookSelectionAccess(client, &pSel, access_mode); + *result = pSel; + return rc; +} + +void +InitSelections(void) +{ + Selection *pSel, *pNextSel; + + pSel = CurrentSelections; + while (pSel) { + pNextSel = pSel->next; + dixFreeObjectWithPrivates(pSel, PRIVATE_SELECTION); + pSel = pNextSel; + } + + CurrentSelections = NULL; +} + +static _X_INLINE void +CallSelectionCallback(Selection * pSel, ClientPtr client, + SelectionCallbackKind kind) +{ + SelectionInfoRec info = { pSel, client, kind }; + CallCallbacks(&SelectionCallback, &info); +} + +void +DeleteWindowFromAnySelections(WindowPtr pWin) +{ + Selection *pSel; + + for (pSel = CurrentSelections; pSel; pSel = pSel->next) + if (pSel->pWin == pWin) { + CallSelectionCallback(pSel, NULL, SelectionWindowDestroy); + + pSel->pWin = (WindowPtr) NULL; + pSel->window = None; + pSel->client = NullClient; + } +} + +void +DeleteClientFromAnySelections(ClientPtr client) +{ + Selection *pSel; + + for (pSel = CurrentSelections; pSel; pSel = pSel->next) + if (pSel->client == client) { + CallSelectionCallback(pSel, NULL, SelectionClientClose); + + pSel->pWin = (WindowPtr) NULL; + pSel->window = None; + pSel->client = NullClient; + } +} + +int +ProcSetSelectionOwner(ClientPtr client) +{ + WindowPtr pWin = NULL; + TimeStamp time; + Selection *pSel; + int rc; + + REQUEST(xSetSelectionOwnerReq); + REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); + + UpdateCurrentTime(); + time = ClientTimeToServerTime(stuff->time); + + /* If the client's time stamp is in the future relative to the server's + time stamp, do not set the selection, just return success. */ + if (CompareTimeStamps(time, currentTime) == LATER) + return Success; + + if (stuff->window != None) { + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); + if (rc != Success) + return rc; + } + if (!ValidAtom(stuff->selection)) { + client->errorValue = stuff->selection; + return BadAtom; + } + + /* + * First, see if the selection is already set... + */ + rc = dixLookupSelection(&pSel, stuff->selection, client, DixSetAttrAccess); + + if (rc == Success) { + /* If the timestamp in client's request is in the past relative + to the time stamp indicating the last time the owner of the + selection was set, do not set the selection, just return + success. */ + if (CompareTimeStamps(time, pSel->lastTimeChanged) == EARLIER) + return Success; + if (pSel->client && (!pWin || (pSel->client != client))) { + xEvent event = { + .u.selectionClear.time = time.milliseconds, + .u.selectionClear.window = pSel->window, + .u.selectionClear.atom = pSel->selection + }; + event.u.u.type = SelectionClear; + WriteEventsToClient(pSel->client, 1, &event); + } + } + else if (rc == BadMatch) { + /* + * It doesn't exist, so add it... + */ + pSel = dixAllocateObjectWithPrivates(Selection, PRIVATE_SELECTION); + if (!pSel) + return BadAlloc; + + pSel->selection = stuff->selection; + + /* security creation/labeling check */ + rc = XaceHookSelectionAccess(client, &pSel, + DixCreateAccess | DixSetAttrAccess); + if (rc != Success) { + free(pSel); + return rc; + } + + pSel->next = CurrentSelections; + CurrentSelections = pSel; + } + else + return rc; + + pSel->lastTimeChanged = time; + pSel->window = stuff->window; + pSel->pWin = pWin; + pSel->client = (pWin ? client : NullClient); + + CallSelectionCallback(pSel, client, SelectionSetOwner); + return Success; +} + +int +ProcGetSelectionOwner(ClientPtr client) +{ + int rc; + Selection *pSel; + xGetSelectionOwnerReply reply; + + REQUEST(xResourceReq); + REQUEST_SIZE_MATCH(xResourceReq); + + if (!ValidAtom(stuff->id)) { + client->errorValue = stuff->id; + return BadAtom; + } + + reply = (xGetSelectionOwnerReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + }; + + rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess); + if (rc == Success) + reply.owner = pSel->window; + else if (rc == BadMatch) + reply.owner = None; + else + return rc; + + WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); + return Success; +} + +int +ProcConvertSelection(ClientPtr client) +{ + Bool paramsOkay; + xEvent event; + WindowPtr pWin; + Selection *pSel; + int rc; + + REQUEST(xConvertSelectionReq); + REQUEST_SIZE_MATCH(xConvertSelectionReq); + + rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess); + if (rc != Success) + return rc; + + paramsOkay = ValidAtom(stuff->selection) && ValidAtom(stuff->target); + paramsOkay &= (stuff->property == None) || ValidAtom(stuff->property); + if (!paramsOkay) { + client->errorValue = stuff->property; + return BadAtom; + } + + rc = dixLookupSelection(&pSel, stuff->selection, client, DixReadAccess); + + memset(&event, 0, sizeof(xEvent)); + if (rc != Success && rc != BadMatch) + return rc; + else if (rc == Success && pSel->window != None) { + event.u.u.type = SelectionRequest; + event.u.selectionRequest.owner = pSel->window; + event.u.selectionRequest.time = stuff->time; + event.u.selectionRequest.requestor = stuff->requestor; + event.u.selectionRequest.selection = stuff->selection; + event.u.selectionRequest.target = stuff->target; + event.u.selectionRequest.property = stuff->property; + if (pSel->client && pSel->client != serverClient && + !pSel->client->clientGone) { + WriteEventsToClient(pSel->client, 1, &event); + return Success; + } + } + + event.u.u.type = SelectionNotify; + event.u.selectionNotify.time = stuff->time; + event.u.selectionNotify.requestor = stuff->requestor; + event.u.selectionNotify.selection = stuff->selection; + event.u.selectionNotify.target = stuff->target; + event.u.selectionNotify.property = None; + WriteEventsToClient(client, 1, &event); + return Success; +} diff --git a/dix/stubmain.c b/dix/stubmain.c new file mode 100644 index 0000000..7efb4b8 --- /dev/null +++ b/dix/stubmain.c @@ -0,0 +1,35 @@ +/*********************************************************** + +Copyright 2012 Jon TURNEY + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +******************************************************************/ + +int dix_main(int argc, char *argv[], char *envp[]); + +/* + A default implementation of main, which can be overridden by the DDX + */ +int +main(int argc, char *argv[], char *envp[]) +{ + return dix_main(argc, argv, envp); +} diff --git a/dix/swaprep.c b/dix/swaprep.c new file mode 100644 index 0000000..559fe27 --- /dev/null +++ b/dix/swaprep.c @@ -0,0 +1,1174 @@ +/************************************************************ + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "misc.h" +#include "dixstruct.h" +#include <X11/fonts/fontstruct.h> +#include "scrnintstr.h" +#include "swaprep.h" +#include "globals.h" + +static void SwapFontInfo(xQueryFontReply * pr); + +static void SwapCharInfo(xCharInfo * pInfo); + +static void SwapFont(xQueryFontReply * pr, Bool hasGlyphs); + +/** + * Thanks to Jack Palevich for testing and subsequently rewriting all this + * + * \param size size in bytes + */ +void +Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf) +{ + int i; + + size >>= 2; + for (i = 0; i < size; i++) + /* brackets are mandatory here, because "swapl" macro expands + to several statements */ + { + swapl(&pbuf[i]); + } + WriteToClient(pClient, size << 2, pbuf); +} + +/** + * + * \param size size in bytes + */ +void +CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) +{ + int bufsize = size; + CARD32 *pbufT; + CARD32 *from, *to, *fromLast, *toLast; + CARD32 tmpbuf[1]; + + /* Allocate as big a buffer as we can... */ + while (!(pbufT = malloc(bufsize))) { + bufsize >>= 1; + if (bufsize == 4) { + pbufT = tmpbuf; + break; + } + } + + /* convert lengths from # of bytes to # of longs */ + size >>= 2; + bufsize >>= 2; + + from = pbuf; + fromLast = from + size; + while (from < fromLast) { + int nbytes; + + to = pbufT; + toLast = to + min(bufsize, fromLast - from); + nbytes = (toLast - to) << 2; + while (to < toLast) { + /* can't write "cpswapl(*from++, *to++)" because cpswapl is a macro + that evaulates its args more than once */ + cpswapl(*from, *to); + from++; + to++; + } + WriteToClient(pClient, nbytes, pbufT); + } + + if (pbufT != tmpbuf) + free(pbufT); +} + +/** + * + * \param size size in bytes + */ +void +CopySwap16Write(ClientPtr pClient, int size, short *pbuf) +{ + int bufsize = size; + short *pbufT; + short *from, *to, *fromLast, *toLast; + short tmpbuf[2]; + + /* Allocate as big a buffer as we can... */ + while (!(pbufT = malloc(bufsize))) { + bufsize >>= 1; + if (bufsize == 4) { + pbufT = tmpbuf; + break; + } + } + + /* convert lengths from # of bytes to # of shorts */ + size >>= 1; + bufsize >>= 1; + + from = pbuf; + fromLast = from + size; + while (from < fromLast) { + int nbytes; + + to = pbufT; + toLast = to + min(bufsize, fromLast - from); + nbytes = (toLast - to) << 1; + while (to < toLast) { + /* can't write "cpswaps(*from++, *to++)" because cpswaps is a macro + that evaulates its args more than once */ + cpswaps(*from, *to); + from++; + to++; + } + WriteToClient(pClient, nbytes, pbufT); + } + + if (pbufT != tmpbuf) + free(pbufT); +} + +/* Extra-small reply */ +void +SGenericReply(ClientPtr pClient, int size, xGenericReply * pRep) +{ + swaps(&pRep->sequenceNumber); + WriteToClient(pClient, size, pRep); +} + +/* Extra-large reply */ +void +SGetWindowAttributesReply(ClientPtr pClient, int size, + xGetWindowAttributesReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swapl(&pRep->visualID); + swaps(&pRep->class); + swapl(&pRep->backingBitPlanes); + swapl(&pRep->backingPixel); + swapl(&pRep->colormap); + swapl(&pRep->allEventMasks); + swapl(&pRep->yourEventMask); + swaps(&pRep->doNotPropagateMask); + WriteToClient(pClient, size, pRep); +} + +void +SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->root); + swaps(&pRep->x); + swaps(&pRep->y); + swaps(&pRep->width); + swaps(&pRep->height); + swaps(&pRep->borderWidth); + WriteToClient(pClient, size, pRep); +} + +void +SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swapl(&pRep->root); + swapl(&pRep->parent); + swaps(&pRep->nChildren); + WriteToClient(pClient, size, pRep); +} + +void +SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->atom); + WriteToClient(pClient, size, pRep); +} + +void +SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nameLength); + WriteToClient(pClient, size, pRep); +} + +void +SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swapl(&pRep->propertyType); + swapl(&pRep->bytesAfter); + swapl(&pRep->nItems); + WriteToClient(pClient, size, pRep); +} + +void +SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nProperties); + WriteToClient(pClient, size, pRep); +} + +void +SGetSelectionOwnerReply(ClientPtr pClient, int size, + xGetSelectionOwnerReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->owner); + WriteToClient(pClient, size, pRep); +} + +void +SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->root); + swapl(&pRep->child); + swaps(&pRep->rootX); + swaps(&pRep->rootY); + swaps(&pRep->winX); + swaps(&pRep->winY); + swaps(&pRep->mask); + WriteToClient(pClient, size, pRep); +} + +static void +SwapTimecoord(xTimecoord * pCoord) +{ + swapl(&pCoord->time); + swaps(&pCoord->x); + swaps(&pCoord->y); +} + +void +SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord * pRep) +{ + int i, n; + xTimecoord *pRepT; + + n = size / sizeof(xTimecoord); + pRepT = pRep; + for (i = 0; i < n; i++) { + SwapTimecoord(pRepT); + pRepT++; + } + WriteToClient(pClient, size, pRep); + +} + +void +SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swapl(&pRep->nEvents); + WriteToClient(pClient, size, pRep); +} + +void +STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->child); + swaps(&pRep->dstX); + swaps(&pRep->dstY); + WriteToClient(pClient, size, pRep); +} + +void +SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->focus); + WriteToClient(pClient, size, pRep); +} + +/* extra long reply */ +void +SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + WriteToClient(pClient, size, pRep); +} + +static void +SwapCharInfo(xCharInfo * pInfo) +{ + swaps(&pInfo->leftSideBearing); + swaps(&pInfo->rightSideBearing); + swaps(&pInfo->characterWidth); + swaps(&pInfo->ascent); + swaps(&pInfo->descent); + swaps(&pInfo->attributes); +} + +static void +SwapFontInfo(xQueryFontReply * pr) +{ + swaps(&pr->minCharOrByte2); + swaps(&pr->maxCharOrByte2); + swaps(&pr->defaultChar); + swaps(&pr->nFontProps); + swaps(&pr->fontAscent); + swaps(&pr->fontDescent); + SwapCharInfo(&pr->minBounds); + SwapCharInfo(&pr->maxBounds); + swapl(&pr->nCharInfos); +} + +static void +SwapFont(xQueryFontReply * pr, Bool hasGlyphs) +{ + unsigned i; + xCharInfo *pxci; + unsigned nchars, nprops; + char *pby; + + swaps(&pr->sequenceNumber); + swapl(&pr->length); + nchars = pr->nCharInfos; + nprops = pr->nFontProps; + SwapFontInfo(pr); + pby = (char *) &pr[1]; + /* Font properties are an atom and either an int32 or a CARD32, so + * they are always 2 4 byte values */ + for (i = 0; i < nprops; i++) { + swapl((int *) pby); + pby += 4; + swapl((int *) pby); + pby += 4; + } + if (hasGlyphs) { + pxci = (xCharInfo *) pby; + for (i = 0; i < nchars; i++, pxci++) + SwapCharInfo(pxci); + } +} + +void +SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply * pRep) +{ + SwapFont(pRep, TRUE); + WriteToClient(pClient, size, pRep); +} + +void +SQueryTextExtentsReply(ClientPtr pClient, int size, + xQueryTextExtentsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swaps(&pRep->fontAscent); + swaps(&pRep->fontDescent); + swaps(&pRep->overallAscent); + swaps(&pRep->overallDescent); + swapl(&pRep->overallWidth); + swapl(&pRep->overallLeft); + swapl(&pRep->overallRight); + WriteToClient(pClient, size, pRep); +} + +void +SListFontsReply(ClientPtr pClient, int size, xListFontsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nFonts); + WriteToClient(pClient, size, pRep); +} + +void +SListFontsWithInfoReply(ClientPtr pClient, int size, + xListFontsWithInfoReply * pRep) +{ + SwapFont((xQueryFontReply *) pRep, FALSE); + WriteToClient(pClient, size, pRep); +} + +void +SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nPaths); + WriteToClient(pClient, size, pRep); +} + +void +SGetImageReply(ClientPtr pClient, int size, xGetImageReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swapl(&pRep->visual); + WriteToClient(pClient, size, pRep); + /* Fortunately, image doesn't need swapping */ +} + +void +SListInstalledColormapsReply(ClientPtr pClient, int size, + xListInstalledColormapsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nColormaps); + WriteToClient(pClient, size, pRep); +} + +void +SAllocColorReply(ClientPtr pClient, int size, xAllocColorReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swaps(&pRep->red); + swaps(&pRep->green); + swaps(&pRep->blue); + swapl(&pRep->pixel); + WriteToClient(pClient, size, pRep); +} + +void +SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->pixel); + swaps(&pRep->exactRed); + swaps(&pRep->exactGreen); + swaps(&pRep->exactBlue); + swaps(&pRep->screenRed); + swaps(&pRep->screenGreen); + swaps(&pRep->screenBlue); + WriteToClient(pClient, size, pRep); +} + +void +SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nPixels); + swaps(&pRep->nMasks); + WriteToClient(pClient, size, pRep); +} + +void +SAllocColorPlanesReply(ClientPtr pClient, int size, + xAllocColorPlanesReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nPixels); + swapl(&pRep->redMask); + swapl(&pRep->greenMask); + swapl(&pRep->blueMask); + WriteToClient(pClient, size, pRep); +} + +static void +SwapRGB(xrgb * prgb) +{ + swaps(&prgb->red); + swaps(&prgb->green); + swaps(&prgb->blue); +} + +void +SQColorsExtend(ClientPtr pClient, int size, xrgb * prgb) +{ + int i, n; + xrgb *prgbT; + + n = size / sizeof(xrgb); + prgbT = prgb; + for (i = 0; i < n; i++) { + SwapRGB(prgbT); + prgbT++; + } + WriteToClient(pClient, size, prgb); +} + +void +SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nColors); + WriteToClient(pClient, size, pRep); +} + +void +SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swaps(&pRep->exactRed); + swaps(&pRep->exactGreen); + swaps(&pRep->exactBlue); + swaps(&pRep->screenRed); + swaps(&pRep->screenGreen); + swaps(&pRep->screenBlue); + WriteToClient(pClient, size, pRep); +} + +void +SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swaps(&pRep->width); + swaps(&pRep->height); + WriteToClient(pClient, size, pRep); +} + +void +SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + WriteToClient(pClient, size, pRep); +} + +void +SGetKeyboardMappingReply(ClientPtr pClient, int size, + xGetKeyboardMappingReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + WriteToClient(pClient, size, pRep); +} + +void +SGetPointerMappingReply(ClientPtr pClient, int size, + xGetPointerMappingReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + WriteToClient(pClient, size, pRep); +} + +void +SGetModifierMappingReply(ClientPtr pClient, int size, + xGetModifierMappingReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + WriteToClient(pClient, size, pRep); +} + +void +SGetKeyboardControlReply(ClientPtr pClient, int size, + xGetKeyboardControlReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swapl(&pRep->ledMask); + swaps(&pRep->bellPitch); + swaps(&pRep->bellDuration); + WriteToClient(pClient, size, pRep); +} + +void +SGetPointerControlReply(ClientPtr pClient, int size, + xGetPointerControlReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swaps(&pRep->accelNumerator); + swaps(&pRep->accelDenominator); + swaps(&pRep->threshold); + WriteToClient(pClient, size, pRep); +} + +void +SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swaps(&pRep->timeout); + swaps(&pRep->interval); + WriteToClient(pClient, size, pRep); +} + +void +SLHostsExtend(ClientPtr pClient, int size, char *buf) +{ + char *bufT = buf; + char *endbuf = buf + size; + + while (bufT < endbuf) { + xHostEntry *host = (xHostEntry *) bufT; + int len = host->length; + + swaps(&host->length); + bufT += sizeof(xHostEntry) + pad_to_int32(len); + } + WriteToClient(pClient, size, buf); +} + +void +SListHostsReply(ClientPtr pClient, int size, xListHostsReply * pRep) +{ + swaps(&pRep->sequenceNumber); + swapl(&pRep->length); + swaps(&pRep->nHosts); + WriteToClient(pClient, size, pRep); +} + +void +SErrorEvent(xError * from, xError * to) +{ + to->type = X_Error; + to->errorCode = from->errorCode; + cpswaps(from->sequenceNumber, to->sequenceNumber); + cpswapl(from->resourceID, to->resourceID); + cpswaps(from->minorCode, to->minorCode); + to->majorCode = from->majorCode; +} + +void +SKeyButtonPtrEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.keyButtonPointer.time, to->u.keyButtonPointer.time); + cpswapl(from->u.keyButtonPointer.root, to->u.keyButtonPointer.root); + cpswapl(from->u.keyButtonPointer.event, to->u.keyButtonPointer.event); + cpswapl(from->u.keyButtonPointer.child, to->u.keyButtonPointer.child); + cpswaps(from->u.keyButtonPointer.rootX, to->u.keyButtonPointer.rootX); + cpswaps(from->u.keyButtonPointer.rootY, to->u.keyButtonPointer.rootY); + cpswaps(from->u.keyButtonPointer.eventX, to->u.keyButtonPointer.eventX); + cpswaps(from->u.keyButtonPointer.eventY, to->u.keyButtonPointer.eventY); + cpswaps(from->u.keyButtonPointer.state, to->u.keyButtonPointer.state); + to->u.keyButtonPointer.sameScreen = from->u.keyButtonPointer.sameScreen; +} + +void +SEnterLeaveEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.enterLeave.time, to->u.enterLeave.time); + cpswapl(from->u.enterLeave.root, to->u.enterLeave.root); + cpswapl(from->u.enterLeave.event, to->u.enterLeave.event); + cpswapl(from->u.enterLeave.child, to->u.enterLeave.child); + cpswaps(from->u.enterLeave.rootX, to->u.enterLeave.rootX); + cpswaps(from->u.enterLeave.rootY, to->u.enterLeave.rootY); + cpswaps(from->u.enterLeave.eventX, to->u.enterLeave.eventX); + cpswaps(from->u.enterLeave.eventY, to->u.enterLeave.eventY); + cpswaps(from->u.enterLeave.state, to->u.enterLeave.state); + to->u.enterLeave.mode = from->u.enterLeave.mode; + to->u.enterLeave.flags = from->u.enterLeave.flags; +} + +void +SFocusEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.focus.window, to->u.focus.window); + to->u.focus.mode = from->u.focus.mode; +} + +void +SExposeEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.expose.window, to->u.expose.window); + cpswaps(from->u.expose.x, to->u.expose.x); + cpswaps(from->u.expose.y, to->u.expose.y); + cpswaps(from->u.expose.width, to->u.expose.width); + cpswaps(from->u.expose.height, to->u.expose.height); + cpswaps(from->u.expose.count, to->u.expose.count); +} + +void +SGraphicsExposureEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.graphicsExposure.drawable, to->u.graphicsExposure.drawable); + cpswaps(from->u.graphicsExposure.x, to->u.graphicsExposure.x); + cpswaps(from->u.graphicsExposure.y, to->u.graphicsExposure.y); + cpswaps(from->u.graphicsExposure.width, to->u.graphicsExposure.width); + cpswaps(from->u.graphicsExposure.height, to->u.graphicsExposure.height); + cpswaps(from->u.graphicsExposure.minorEvent, + to->u.graphicsExposure.minorEvent); + cpswaps(from->u.graphicsExposure.count, to->u.graphicsExposure.count); + to->u.graphicsExposure.majorEvent = from->u.graphicsExposure.majorEvent; +} + +void +SNoExposureEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.noExposure.drawable, to->u.noExposure.drawable); + cpswaps(from->u.noExposure.minorEvent, to->u.noExposure.minorEvent); + to->u.noExposure.majorEvent = from->u.noExposure.majorEvent; +} + +void +SVisibilityEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.visibility.window, to->u.visibility.window); + to->u.visibility.state = from->u.visibility.state; +} + +void +SCreateNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.createNotify.window, to->u.createNotify.window); + cpswapl(from->u.createNotify.parent, to->u.createNotify.parent); + cpswaps(from->u.createNotify.x, to->u.createNotify.x); + cpswaps(from->u.createNotify.y, to->u.createNotify.y); + cpswaps(from->u.createNotify.width, to->u.createNotify.width); + cpswaps(from->u.createNotify.height, to->u.createNotify.height); + cpswaps(from->u.createNotify.borderWidth, to->u.createNotify.borderWidth); + to->u.createNotify.override = from->u.createNotify.override; +} + +void +SDestroyNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.destroyNotify.event, to->u.destroyNotify.event); + cpswapl(from->u.destroyNotify.window, to->u.destroyNotify.window); +} + +void +SUnmapNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.unmapNotify.event, to->u.unmapNotify.event); + cpswapl(from->u.unmapNotify.window, to->u.unmapNotify.window); + to->u.unmapNotify.fromConfigure = from->u.unmapNotify.fromConfigure; +} + +void +SMapNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.mapNotify.event, to->u.mapNotify.event); + cpswapl(from->u.mapNotify.window, to->u.mapNotify.window); + to->u.mapNotify.override = from->u.mapNotify.override; +} + +void +SMapRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.mapRequest.parent, to->u.mapRequest.parent); + cpswapl(from->u.mapRequest.window, to->u.mapRequest.window); +} + +void +SReparentEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.reparent.event, to->u.reparent.event); + cpswapl(from->u.reparent.window, to->u.reparent.window); + cpswapl(from->u.reparent.parent, to->u.reparent.parent); + cpswaps(from->u.reparent.x, to->u.reparent.x); + cpswaps(from->u.reparent.y, to->u.reparent.y); + to->u.reparent.override = from->u.reparent.override; +} + +void +SConfigureNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.configureNotify.event, to->u.configureNotify.event); + cpswapl(from->u.configureNotify.window, to->u.configureNotify.window); + cpswapl(from->u.configureNotify.aboveSibling, + to->u.configureNotify.aboveSibling); + cpswaps(from->u.configureNotify.x, to->u.configureNotify.x); + cpswaps(from->u.configureNotify.y, to->u.configureNotify.y); + cpswaps(from->u.configureNotify.width, to->u.configureNotify.width); + cpswaps(from->u.configureNotify.height, to->u.configureNotify.height); + cpswaps(from->u.configureNotify.borderWidth, + to->u.configureNotify.borderWidth); + to->u.configureNotify.override = from->u.configureNotify.override; +} + +void +SConfigureRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; /* actually stack-mode */ + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.configureRequest.parent, to->u.configureRequest.parent); + cpswapl(from->u.configureRequest.window, to->u.configureRequest.window); + cpswapl(from->u.configureRequest.sibling, to->u.configureRequest.sibling); + cpswaps(from->u.configureRequest.x, to->u.configureRequest.x); + cpswaps(from->u.configureRequest.y, to->u.configureRequest.y); + cpswaps(from->u.configureRequest.width, to->u.configureRequest.width); + cpswaps(from->u.configureRequest.height, to->u.configureRequest.height); + cpswaps(from->u.configureRequest.borderWidth, + to->u.configureRequest.borderWidth); + cpswaps(from->u.configureRequest.valueMask, + to->u.configureRequest.valueMask); +} + +void +SGravityEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.gravity.event, to->u.gravity.event); + cpswapl(from->u.gravity.window, to->u.gravity.window); + cpswaps(from->u.gravity.x, to->u.gravity.x); + cpswaps(from->u.gravity.y, to->u.gravity.y); +} + +void +SResizeRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.resizeRequest.window, to->u.resizeRequest.window); + cpswaps(from->u.resizeRequest.width, to->u.resizeRequest.width); + cpswaps(from->u.resizeRequest.height, to->u.resizeRequest.height); +} + +void +SCirculateEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.circulate.event, to->u.circulate.event); + cpswapl(from->u.circulate.window, to->u.circulate.window); + cpswapl(from->u.circulate.parent, to->u.circulate.parent); + to->u.circulate.place = from->u.circulate.place; +} + +void +SPropertyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.property.window, to->u.property.window); + cpswapl(from->u.property.atom, to->u.property.atom); + cpswapl(from->u.property.time, to->u.property.time); + to->u.property.state = from->u.property.state; +} + +void +SSelectionClearEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.selectionClear.time, to->u.selectionClear.time); + cpswapl(from->u.selectionClear.window, to->u.selectionClear.window); + cpswapl(from->u.selectionClear.atom, to->u.selectionClear.atom); +} + +void +SSelectionRequestEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.selectionRequest.time, to->u.selectionRequest.time); + cpswapl(from->u.selectionRequest.owner, to->u.selectionRequest.owner); + cpswapl(from->u.selectionRequest.requestor, + to->u.selectionRequest.requestor); + cpswapl(from->u.selectionRequest.selection, + to->u.selectionRequest.selection); + cpswapl(from->u.selectionRequest.target, to->u.selectionRequest.target); + cpswapl(from->u.selectionRequest.property, to->u.selectionRequest.property); +} + +void +SSelectionNotifyEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.selectionNotify.time, to->u.selectionNotify.time); + cpswapl(from->u.selectionNotify.requestor, to->u.selectionNotify.requestor); + cpswapl(from->u.selectionNotify.selection, to->u.selectionNotify.selection); + cpswapl(from->u.selectionNotify.target, to->u.selectionNotify.target); + cpswapl(from->u.selectionNotify.property, to->u.selectionNotify.property); +} + +void +SColormapEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.colormap.window, to->u.colormap.window); + cpswapl(from->u.colormap.colormap, to->u.colormap.colormap); + to->u.colormap.new = from->u.colormap.new; + to->u.colormap.state = from->u.colormap.state; +} + +void +SMappingEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + to->u.mappingNotify.request = from->u.mappingNotify.request; + to->u.mappingNotify.firstKeyCode = from->u.mappingNotify.firstKeyCode; + to->u.mappingNotify.count = from->u.mappingNotify.count; +} + +void +SClientMessageEvent(xEvent *from, xEvent *to) +{ + to->u.u.type = from->u.u.type; + to->u.u.detail = from->u.u.detail; /* actually format */ + cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); + cpswapl(from->u.clientMessage.window, to->u.clientMessage.window); + cpswapl(from->u.clientMessage.u.l.type, to->u.clientMessage.u.l.type); + switch (from->u.u.detail) { + case 8: + memmove(to->u.clientMessage.u.b.bytes, + from->u.clientMessage.u.b.bytes, 20); + break; + case 16: + cpswaps(from->u.clientMessage.u.s.shorts0, + to->u.clientMessage.u.s.shorts0); + cpswaps(from->u.clientMessage.u.s.shorts1, + to->u.clientMessage.u.s.shorts1); + cpswaps(from->u.clientMessage.u.s.shorts2, + to->u.clientMessage.u.s.shorts2); + cpswaps(from->u.clientMessage.u.s.shorts3, + to->u.clientMessage.u.s.shorts3); + cpswaps(from->u.clientMessage.u.s.shorts4, + to->u.clientMessage.u.s.shorts4); + cpswaps(from->u.clientMessage.u.s.shorts5, + to->u.clientMessage.u.s.shorts5); + cpswaps(from->u.clientMessage.u.s.shorts6, + to->u.clientMessage.u.s.shorts6); + cpswaps(from->u.clientMessage.u.s.shorts7, + to->u.clientMessage.u.s.shorts7); + cpswaps(from->u.clientMessage.u.s.shorts8, + to->u.clientMessage.u.s.shorts8); + cpswaps(from->u.clientMessage.u.s.shorts9, + to->u.clientMessage.u.s.shorts9); + break; + case 32: + cpswapl(from->u.clientMessage.u.l.longs0, + to->u.clientMessage.u.l.longs0); + cpswapl(from->u.clientMessage.u.l.longs1, + to->u.clientMessage.u.l.longs1); + cpswapl(from->u.clientMessage.u.l.longs2, + to->u.clientMessage.u.l.longs2); + cpswapl(from->u.clientMessage.u.l.longs3, + to->u.clientMessage.u.l.longs3); + cpswapl(from->u.clientMessage.u.l.longs4, + to->u.clientMessage.u.l.longs4); + break; + } +} + +void +SKeymapNotifyEvent(xEvent *from, xEvent *to) +{ + /* Keymap notify events are special; they have no + sequence number field, and contain entirely 8-bit data */ + *to = *from; +} + +static void +SwapConnSetup(xConnSetup * pConnSetup, xConnSetup * pConnSetupT) +{ + cpswapl(pConnSetup->release, pConnSetupT->release); + cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase); + cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask); + cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize); + cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor); + cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize); + pConnSetupT->minKeyCode = pConnSetup->minKeyCode; + pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode; + pConnSetupT->numRoots = pConnSetup->numRoots; + pConnSetupT->numFormats = pConnSetup->numFormats; + pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder; + pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder; + pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit; + pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad; +} + +static void +SwapWinRoot(xWindowRoot * pRoot, xWindowRoot * pRootT) +{ + cpswapl(pRoot->windowId, pRootT->windowId); + cpswapl(pRoot->defaultColormap, pRootT->defaultColormap); + cpswapl(pRoot->whitePixel, pRootT->whitePixel); + cpswapl(pRoot->blackPixel, pRootT->blackPixel); + cpswapl(pRoot->currentInputMask, pRootT->currentInputMask); + cpswaps(pRoot->pixWidth, pRootT->pixWidth); + cpswaps(pRoot->pixHeight, pRootT->pixHeight); + cpswaps(pRoot->mmWidth, pRootT->mmWidth); + cpswaps(pRoot->mmHeight, pRootT->mmHeight); + cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps); + cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps); + cpswapl(pRoot->rootVisualID, pRootT->rootVisualID); + pRootT->backingStore = pRoot->backingStore; + pRootT->saveUnders = pRoot->saveUnders; + pRootT->rootDepth = pRoot->rootDepth; + pRootT->nDepths = pRoot->nDepths; +} + +static void +SwapVisual(xVisualType * pVis, xVisualType * pVisT) +{ + cpswapl(pVis->visualID, pVisT->visualID); + pVisT->class = pVis->class; + pVisT->bitsPerRGB = pVis->bitsPerRGB; + cpswaps(pVis->colormapEntries, pVisT->colormapEntries); + cpswapl(pVis->redMask, pVisT->redMask); + cpswapl(pVis->greenMask, pVisT->greenMask); + cpswapl(pVis->blueMask, pVisT->blueMask); +} + +void +SwapConnSetupInfo(char *pInfo, char *pInfoT) +{ + int i, j, k; + xConnSetup *pConnSetup = (xConnSetup *) pInfo; + xDepth *depth; + xWindowRoot *root; + + SwapConnSetup(pConnSetup, (xConnSetup *) pInfoT); + pInfo += sizeof(xConnSetup); + pInfoT += sizeof(xConnSetup); + + /* Copy the vendor string */ + i = pad_to_int32(pConnSetup->nbytesVendor); + memcpy(pInfoT, pInfo, i); + pInfo += i; + pInfoT += i; + + /* The Pixmap formats don't need to be swapped, just copied. */ + i = sizeof(xPixmapFormat) * pConnSetup->numFormats; + memcpy(pInfoT, pInfo, i); + pInfo += i; + pInfoT += i; + + for (i = 0; i < pConnSetup->numRoots; i++) { + root = (xWindowRoot *) pInfo; + SwapWinRoot(root, (xWindowRoot *) pInfoT); + pInfo += sizeof(xWindowRoot); + pInfoT += sizeof(xWindowRoot); + + for (j = 0; j < root->nDepths; j++) { + depth = (xDepth *) pInfo; + ((xDepth *) pInfoT)->depth = depth->depth; + cpswaps(depth->nVisuals, ((xDepth *) pInfoT)->nVisuals); + pInfo += sizeof(xDepth); + pInfoT += sizeof(xDepth); + for (k = 0; k < depth->nVisuals; k++) { + SwapVisual((xVisualType *) pInfo, (xVisualType *) pInfoT); + pInfo += sizeof(xVisualType); + pInfoT += sizeof(xVisualType); + } + } + } +} + +void +WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) +{ + char *pInfoTBase; + + pInfoTBase = malloc(size); + if (!pInfoTBase) { + pClient->noClientException = -1; + return; + } + SwapConnSetupInfo(pInfo, pInfoTBase); + WriteToClient(pClient, (int) size, pInfoTBase); + free(pInfoTBase); +} + +void +SwapConnSetupPrefix(xConnSetupPrefix * pcspFrom, xConnSetupPrefix * pcspTo) +{ + pcspTo->success = pcspFrom->success; + pcspTo->lengthReason = pcspFrom->lengthReason; + cpswaps(pcspFrom->majorVersion, pcspTo->majorVersion); + cpswaps(pcspFrom->minorVersion, pcspTo->minorVersion); + cpswaps(pcspFrom->length, pcspTo->length); +} + +void +WriteSConnSetupPrefix(ClientPtr pClient, xConnSetupPrefix * pcsp) +{ + xConnSetupPrefix cspT; + + SwapConnSetupPrefix(pcsp, &cspT); + WriteToClient(pClient, sizeof(cspT), &cspT); +} + +/* + * Dummy entry for ReplySwapVector[] + */ + +void +ReplyNotSwappd(ClientPtr pClient, int size, void *pbuf) +{ + FatalError("Not implemented"); +} diff --git a/dix/swapreq.c b/dix/swapreq.c new file mode 100644 index 0000000..0f6d49e --- /dev/null +++ b/dix/swapreq.c @@ -0,0 +1,1012 @@ +/************************************************************ + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include <X11/Xprotostr.h> +#include "misc.h" +#include "dixstruct.h" +#include "extnsionst.h" /* for SendEvent */ +#include "swapreq.h" + +/* Thanks to Jack Palevich for testing and subsequently rewriting all this */ + +/* Byte swap a list of longs */ +void +SwapLongs(CARD32 *list, unsigned long count) +{ + while (count >= 8) { + swapl(list + 0); + swapl(list + 1); + swapl(list + 2); + swapl(list + 3); + swapl(list + 4); + swapl(list + 5); + swapl(list + 6); + swapl(list + 7); + list += 8; + count -= 8; + } + if (count != 0) { + do { + swapl(list); + list++; + } while (--count != 0); + } +} + +/* Byte swap a list of shorts */ +void +SwapShorts(short *list, unsigned long count) +{ + while (count >= 16) { + swaps(list + 0); + swaps(list + 1); + swaps(list + 2); + swaps(list + 3); + swaps(list + 4); + swaps(list + 5); + swaps(list + 6); + swaps(list + 7); + swaps(list + 8); + swaps(list + 9); + swaps(list + 10); + swaps(list + 11); + swaps(list + 12); + swaps(list + 13); + swaps(list + 14); + swaps(list + 15); + list += 16; + count -= 16; + } + if (count != 0) { + do { + swaps(list); + list++; + } while (--count != 0); + } +} + +/* The following is used for all requests that have + no fields to be swapped (except "length") */ +int +SProcSimpleReq(ClientPtr client) +{ + REQUEST(xReq); + swaps(&stuff->length); + return (*ProcVector[stuff->reqType]) (client); +} + +/* The following is used for all requests that have + only a single 32-bit field to be swapped, coming + right after the "length" field */ +int +SProcResourceReq(ClientPtr client) +{ + REQUEST(xResourceReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xResourceReq); /* not EXACT */ + swapl(&stuff->id); + return (*ProcVector[stuff->reqType]) (client); +} + +int +SProcCreateWindow(ClientPtr client) +{ + REQUEST(xCreateWindowReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xCreateWindowReq); + swapl(&stuff->wid); + swapl(&stuff->parent); + swaps(&stuff->x); + swaps(&stuff->y); + swaps(&stuff->width); + swaps(&stuff->height); + swaps(&stuff->borderWidth); + swaps(&stuff->class); + swapl(&stuff->visual); + swapl(&stuff->mask); + SwapRestL(stuff); + return ((*ProcVector[X_CreateWindow]) (client)); +} + +int +SProcChangeWindowAttributes(ClientPtr client) +{ + REQUEST(xChangeWindowAttributesReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); + swapl(&stuff->window); + swapl(&stuff->valueMask); + SwapRestL(stuff); + return ((*ProcVector[X_ChangeWindowAttributes]) (client)); +} + +int +SProcReparentWindow(ClientPtr client) +{ + REQUEST(xReparentWindowReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xReparentWindowReq); + swapl(&stuff->window); + swapl(&stuff->parent); + swaps(&stuff->x); + swaps(&stuff->y); + return ((*ProcVector[X_ReparentWindow]) (client)); +} + +int +SProcConfigureWindow(ClientPtr client) +{ + REQUEST(xConfigureWindowReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); + swapl(&stuff->window); + swaps(&stuff->mask); + SwapRestL(stuff); + return ((*ProcVector[X_ConfigureWindow]) (client)); + +} + +int +SProcInternAtom(ClientPtr client) +{ + REQUEST(xInternAtomReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xInternAtomReq); + swaps(&stuff->nbytes); + return ((*ProcVector[X_InternAtom]) (client)); +} + +int +SProcChangeProperty(ClientPtr client) +{ + REQUEST(xChangePropertyReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangePropertyReq); + swapl(&stuff->window); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->nUnits); + switch (stuff->format) { + case 8: + break; + case 16: + SwapRestS(stuff); + break; + case 32: + SwapRestL(stuff); + break; + } + return ((*ProcVector[X_ChangeProperty]) (client)); +} + +int +SProcDeleteProperty(ClientPtr client) +{ + REQUEST(xDeletePropertyReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xDeletePropertyReq); + swapl(&stuff->window); + swapl(&stuff->property); + return ((*ProcVector[X_DeleteProperty]) (client)); + +} + +int +SProcGetProperty(ClientPtr client) +{ + REQUEST(xGetPropertyReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGetPropertyReq); + swapl(&stuff->window); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->longOffset); + swapl(&stuff->longLength); + return ((*ProcVector[X_GetProperty]) (client)); +} + +int +SProcSetSelectionOwner(ClientPtr client) +{ + REQUEST(xSetSelectionOwnerReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); + swapl(&stuff->window); + swapl(&stuff->selection); + swapl(&stuff->time); + return ((*ProcVector[X_SetSelectionOwner]) (client)); +} + +int +SProcConvertSelection(ClientPtr client) +{ + REQUEST(xConvertSelectionReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xConvertSelectionReq); + swapl(&stuff->requestor); + swapl(&stuff->selection); + swapl(&stuff->target); + swapl(&stuff->property); + swapl(&stuff->time); + return ((*ProcVector[X_ConvertSelection]) (client)); +} + +int +SProcSendEvent(ClientPtr client) +{ + xEvent eventT = { .u.u.type = 0 }; + EventSwapPtr proc; + + REQUEST(xSendEventReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSendEventReq); + swapl(&stuff->destination); + swapl(&stuff->eventMask); + + /* Swap event */ + proc = EventSwapVector[stuff->event.u.u.type & 0177]; + if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ + return BadValue; + (*proc) (&stuff->event, &eventT); + stuff->event = eventT; + + return ((*ProcVector[X_SendEvent]) (client)); +} + +int +SProcGrabPointer(ClientPtr client) +{ + REQUEST(xGrabPointerReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGrabPointerReq); + swapl(&stuff->grabWindow); + swaps(&stuff->eventMask); + swapl(&stuff->confineTo); + swapl(&stuff->cursor); + swapl(&stuff->time); + return ((*ProcVector[X_GrabPointer]) (client)); +} + +int +SProcGrabButton(ClientPtr client) +{ + REQUEST(xGrabButtonReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGrabButtonReq); + swapl(&stuff->grabWindow); + swaps(&stuff->eventMask); + swapl(&stuff->confineTo); + swapl(&stuff->cursor); + swaps(&stuff->modifiers); + return ((*ProcVector[X_GrabButton]) (client)); +} + +int +SProcUngrabButton(ClientPtr client) +{ + REQUEST(xUngrabButtonReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xUngrabButtonReq); + swapl(&stuff->grabWindow); + swaps(&stuff->modifiers); + return ((*ProcVector[X_UngrabButton]) (client)); +} + +int +SProcChangeActivePointerGrab(ClientPtr client) +{ + REQUEST(xChangeActivePointerGrabReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq); + swapl(&stuff->cursor); + swapl(&stuff->time); + swaps(&stuff->eventMask); + return ((*ProcVector[X_ChangeActivePointerGrab]) (client)); +} + +int +SProcGrabKeyboard(ClientPtr client) +{ + REQUEST(xGrabKeyboardReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGrabKeyboardReq); + swapl(&stuff->grabWindow); + swapl(&stuff->time); + return ((*ProcVector[X_GrabKeyboard]) (client)); +} + +int +SProcGrabKey(ClientPtr client) +{ + REQUEST(xGrabKeyReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGrabKeyReq); + swapl(&stuff->grabWindow); + swaps(&stuff->modifiers); + return ((*ProcVector[X_GrabKey]) (client)); +} + +int +SProcUngrabKey(ClientPtr client) +{ + REQUEST(xUngrabKeyReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xUngrabKeyReq); + swapl(&stuff->grabWindow); + swaps(&stuff->modifiers); + return ((*ProcVector[X_UngrabKey]) (client)); +} + +int +SProcGetMotionEvents(ClientPtr client) +{ + REQUEST(xGetMotionEventsReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGetMotionEventsReq); + swapl(&stuff->window); + swapl(&stuff->start); + swapl(&stuff->stop); + return ((*ProcVector[X_GetMotionEvents]) (client)); +} + +int +SProcTranslateCoords(ClientPtr client) +{ + REQUEST(xTranslateCoordsReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xTranslateCoordsReq); + swapl(&stuff->srcWid); + swapl(&stuff->dstWid); + swaps(&stuff->srcX); + swaps(&stuff->srcY); + return ((*ProcVector[X_TranslateCoords]) (client)); +} + +int +SProcWarpPointer(ClientPtr client) +{ + REQUEST(xWarpPointerReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xWarpPointerReq); + swapl(&stuff->srcWid); + swapl(&stuff->dstWid); + swaps(&stuff->srcX); + swaps(&stuff->srcY); + swaps(&stuff->srcWidth); + swaps(&stuff->srcHeight); + swaps(&stuff->dstX); + swaps(&stuff->dstY); + return ((*ProcVector[X_WarpPointer]) (client)); +} + +int +SProcSetInputFocus(ClientPtr client) +{ + REQUEST(xSetInputFocusReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSetInputFocusReq); + swapl(&stuff->focus); + swapl(&stuff->time); + return ((*ProcVector[X_SetInputFocus]) (client)); +} + +int +SProcOpenFont(ClientPtr client) +{ + REQUEST(xOpenFontReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xOpenFontReq); + swapl(&stuff->fid); + swaps(&stuff->nbytes); + return ((*ProcVector[X_OpenFont]) (client)); +} + +int +SProcListFonts(ClientPtr client) +{ + REQUEST(xListFontsReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xListFontsReq); + swaps(&stuff->maxNames); + swaps(&stuff->nbytes); + return ((*ProcVector[X_ListFonts]) (client)); +} + +int +SProcListFontsWithInfo(ClientPtr client) +{ + REQUEST(xListFontsWithInfoReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq); + swaps(&stuff->maxNames); + swaps(&stuff->nbytes); + return ((*ProcVector[X_ListFontsWithInfo]) (client)); +} + +int +SProcSetFontPath(ClientPtr client) +{ + REQUEST(xSetFontPathReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSetFontPathReq); + swaps(&stuff->nFonts); + return ((*ProcVector[X_SetFontPath]) (client)); +} + +int +SProcCreatePixmap(ClientPtr client) +{ + REQUEST(xCreatePixmapReq); + + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCreatePixmapReq); + swapl(&stuff->pid); + swapl(&stuff->drawable); + swaps(&stuff->width); + swaps(&stuff->height); + return ((*ProcVector[X_CreatePixmap]) (client)); +} + +int +SProcCreateGC(ClientPtr client) +{ + REQUEST(xCreateGCReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xCreateGCReq); + swapl(&stuff->gc); + swapl(&stuff->drawable); + swapl(&stuff->mask); + SwapRestL(stuff); + return ((*ProcVector[X_CreateGC]) (client)); +} + +int +SProcChangeGC(ClientPtr client) +{ + REQUEST(xChangeGCReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeGCReq); + swapl(&stuff->gc); + swapl(&stuff->mask); + SwapRestL(stuff); + return ((*ProcVector[X_ChangeGC]) (client)); +} + +int +SProcCopyGC(ClientPtr client) +{ + REQUEST(xCopyGCReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCopyGCReq); + swapl(&stuff->srcGC); + swapl(&stuff->dstGC); + swapl(&stuff->mask); + return ((*ProcVector[X_CopyGC]) (client)); +} + +int +SProcSetDashes(ClientPtr client) +{ + REQUEST(xSetDashesReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSetDashesReq); + swapl(&stuff->gc); + swaps(&stuff->dashOffset); + swaps(&stuff->nDashes); + return ((*ProcVector[X_SetDashes]) (client)); + +} + +int +SProcSetClipRectangles(ClientPtr client) +{ + REQUEST(xSetClipRectanglesReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); + swapl(&stuff->gc); + swaps(&stuff->xOrigin); + swaps(&stuff->yOrigin); + SwapRestS(stuff); + return ((*ProcVector[X_SetClipRectangles]) (client)); +} + +int +SProcClearToBackground(ClientPtr client) +{ + REQUEST(xClearAreaReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xClearAreaReq); + swapl(&stuff->window); + swaps(&stuff->x); + swaps(&stuff->y); + swaps(&stuff->width); + swaps(&stuff->height); + return ((*ProcVector[X_ClearArea]) (client)); +} + +int +SProcCopyArea(ClientPtr client) +{ + REQUEST(xCopyAreaReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCopyAreaReq); + swapl(&stuff->srcDrawable); + swapl(&stuff->dstDrawable); + swapl(&stuff->gc); + swaps(&stuff->srcX); + swaps(&stuff->srcY); + swaps(&stuff->dstX); + swaps(&stuff->dstY); + swaps(&stuff->width); + swaps(&stuff->height); + return ((*ProcVector[X_CopyArea]) (client)); +} + +int +SProcCopyPlane(ClientPtr client) +{ + REQUEST(xCopyPlaneReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCopyPlaneReq); + swapl(&stuff->srcDrawable); + swapl(&stuff->dstDrawable); + swapl(&stuff->gc); + swaps(&stuff->srcX); + swaps(&stuff->srcY); + swaps(&stuff->dstX); + swaps(&stuff->dstY); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->bitPlane); + return ((*ProcVector[X_CopyPlane]) (client)); +} + +/* The following routine is used for all Poly drawing requests + (except FillPoly, which uses a different request format) */ +int +SProcPoly(ClientPtr client) +{ + REQUEST(xPolyPointReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xPolyPointReq); + swapl(&stuff->drawable); + swapl(&stuff->gc); + SwapRestS(stuff); + return ((*ProcVector[stuff->reqType]) (client)); +} + +/* cannot use SProcPoly for this one, because xFillPolyReq + is longer than xPolyPointReq, and we don't want to swap + the difference as shorts! */ +int +SProcFillPoly(ClientPtr client) +{ + REQUEST(xFillPolyReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xFillPolyReq); + swapl(&stuff->drawable); + swapl(&stuff->gc); + SwapRestS(stuff); + return ((*ProcVector[X_FillPoly]) (client)); +} + +int +SProcPutImage(ClientPtr client) +{ + REQUEST(xPutImageReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xPutImageReq); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->width); + swaps(&stuff->height); + swaps(&stuff->dstX); + swaps(&stuff->dstY); + /* Image should already be swapped */ + return ((*ProcVector[X_PutImage]) (client)); + +} + +int +SProcGetImage(ClientPtr client) +{ + REQUEST(xGetImageReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xGetImageReq); + swapl(&stuff->drawable); + swaps(&stuff->x); + swaps(&stuff->y); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->planeMask); + return ((*ProcVector[X_GetImage]) (client)); +} + +/* ProcPolyText used for both PolyText8 and PolyText16 */ + +int +SProcPolyText(ClientPtr client) +{ + REQUEST(xPolyTextReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xPolyTextReq); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->x); + swaps(&stuff->y); + return ((*ProcVector[stuff->reqType]) (client)); +} + +/* ProcImageText used for both ImageText8 and ImageText16 */ + +int +SProcImageText(ClientPtr client) +{ + REQUEST(xImageTextReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xImageTextReq); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->x); + swaps(&stuff->y); + return ((*ProcVector[stuff->reqType]) (client)); +} + +int +SProcCreateColormap(ClientPtr client) +{ + REQUEST(xCreateColormapReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCreateColormapReq); + swapl(&stuff->mid); + swapl(&stuff->window); + swapl(&stuff->visual); + return ((*ProcVector[X_CreateColormap]) (client)); +} + +int +SProcCopyColormapAndFree(ClientPtr client) +{ + REQUEST(xCopyColormapAndFreeReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); + swapl(&stuff->mid); + swapl(&stuff->srcCmap); + return ((*ProcVector[X_CopyColormapAndFree]) (client)); + +} + +int +SProcAllocColor(ClientPtr client) +{ + REQUEST(xAllocColorReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xAllocColorReq); + swapl(&stuff->cmap); + swaps(&stuff->red); + swaps(&stuff->green); + swaps(&stuff->blue); + return ((*ProcVector[X_AllocColor]) (client)); +} + +int +SProcAllocNamedColor(ClientPtr client) +{ + REQUEST(xAllocNamedColorReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xAllocNamedColorReq); + swapl(&stuff->cmap); + swaps(&stuff->nbytes); + return ((*ProcVector[X_AllocNamedColor]) (client)); +} + +int +SProcAllocColorCells(ClientPtr client) +{ + REQUEST(xAllocColorCellsReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xAllocColorCellsReq); + swapl(&stuff->cmap); + swaps(&stuff->colors); + swaps(&stuff->planes); + return ((*ProcVector[X_AllocColorCells]) (client)); +} + +int +SProcAllocColorPlanes(ClientPtr client) +{ + REQUEST(xAllocColorPlanesReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xAllocColorPlanesReq); + swapl(&stuff->cmap); + swaps(&stuff->colors); + swaps(&stuff->red); + swaps(&stuff->green); + swaps(&stuff->blue); + return ((*ProcVector[X_AllocColorPlanes]) (client)); +} + +int +SProcFreeColors(ClientPtr client) +{ + REQUEST(xFreeColorsReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xFreeColorsReq); + swapl(&stuff->cmap); + swapl(&stuff->planeMask); + SwapRestL(stuff); + return ((*ProcVector[X_FreeColors]) (client)); + +} + +void +SwapColorItem(xColorItem * pItem) +{ + swapl(&pItem->pixel); + swaps(&pItem->red); + swaps(&pItem->green); + swaps(&pItem->blue); +} + +int +SProcStoreColors(ClientPtr client) +{ + long count; + xColorItem *pItem; + + REQUEST(xStoreColorsReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xStoreColorsReq); + swapl(&stuff->cmap); + pItem = (xColorItem *) &stuff[1]; + for (count = LengthRestB(stuff) / sizeof(xColorItem); --count >= 0;) + SwapColorItem(pItem++); + return ((*ProcVector[X_StoreColors]) (client)); +} + +int +SProcStoreNamedColor(ClientPtr client) +{ + REQUEST(xStoreNamedColorReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq); + swapl(&stuff->cmap); + swapl(&stuff->pixel); + swaps(&stuff->nbytes); + return ((*ProcVector[X_StoreNamedColor]) (client)); +} + +int +SProcQueryColors(ClientPtr client) +{ + REQUEST(xQueryColorsReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xQueryColorsReq); + swapl(&stuff->cmap); + SwapRestL(stuff); + return ((*ProcVector[X_QueryColors]) (client)); +} + +int +SProcLookupColor(ClientPtr client) +{ + REQUEST(xLookupColorReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xLookupColorReq); + swapl(&stuff->cmap); + swaps(&stuff->nbytes); + return ((*ProcVector[X_LookupColor]) (client)); +} + +int +SProcCreateCursor(ClientPtr client) +{ + REQUEST(xCreateCursorReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCreateCursorReq); + swapl(&stuff->cid); + swapl(&stuff->source); + swapl(&stuff->mask); + swaps(&stuff->foreRed); + swaps(&stuff->foreGreen); + swaps(&stuff->foreBlue); + swaps(&stuff->backRed); + swaps(&stuff->backGreen); + swaps(&stuff->backBlue); + swaps(&stuff->x); + swaps(&stuff->y); + return ((*ProcVector[X_CreateCursor]) (client)); +} + +int +SProcCreateGlyphCursor(ClientPtr client) +{ + REQUEST(xCreateGlyphCursorReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xCreateGlyphCursorReq); + swapl(&stuff->cid); + swapl(&stuff->source); + swapl(&stuff->mask); + swaps(&stuff->sourceChar); + swaps(&stuff->maskChar); + swaps(&stuff->foreRed); + swaps(&stuff->foreGreen); + swaps(&stuff->foreBlue); + swaps(&stuff->backRed); + swaps(&stuff->backGreen); + swaps(&stuff->backBlue); + return ((*ProcVector[X_CreateGlyphCursor]) (client)); +} + +int +SProcRecolorCursor(ClientPtr client) +{ + REQUEST(xRecolorCursorReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xRecolorCursorReq); + swapl(&stuff->cursor); + swaps(&stuff->foreRed); + swaps(&stuff->foreGreen); + swaps(&stuff->foreBlue); + swaps(&stuff->backRed); + swaps(&stuff->backGreen); + swaps(&stuff->backBlue); + return ((*ProcVector[X_RecolorCursor]) (client)); +} + +int +SProcQueryBestSize(ClientPtr client) +{ + REQUEST(xQueryBestSizeReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xQueryBestSizeReq); + swapl(&stuff->drawable); + swaps(&stuff->width); + swaps(&stuff->height); + return ((*ProcVector[X_QueryBestSize]) (client)); + +} + +int +SProcQueryExtension(ClientPtr client) +{ + REQUEST(xQueryExtensionReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xQueryExtensionReq); + swaps(&stuff->nbytes); + return ((*ProcVector[X_QueryExtension]) (client)); +} + +int +SProcChangeKeyboardMapping(ClientPtr client) +{ + REQUEST(xChangeKeyboardMappingReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); + SwapRestL(stuff); + return ((*ProcVector[X_ChangeKeyboardMapping]) (client)); +} + +int +SProcChangeKeyboardControl(ClientPtr client) +{ + REQUEST(xChangeKeyboardControlReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); + swapl(&stuff->mask); + SwapRestL(stuff); + return ((*ProcVector[X_ChangeKeyboardControl]) (client)); +} + +int +SProcChangePointerControl(ClientPtr client) +{ + REQUEST(xChangePointerControlReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xChangePointerControlReq); + swaps(&stuff->accelNum); + swaps(&stuff->accelDenum); + swaps(&stuff->threshold); + return ((*ProcVector[X_ChangePointerControl]) (client)); +} + +int +SProcSetScreenSaver(ClientPtr client) +{ + REQUEST(xSetScreenSaverReq); + swaps(&stuff->length); + REQUEST_SIZE_MATCH(xSetScreenSaverReq); + swaps(&stuff->timeout); + swaps(&stuff->interval); + return ((*ProcVector[X_SetScreenSaver]) (client)); +} + +int +SProcChangeHosts(ClientPtr client) +{ + REQUEST(xChangeHostsReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xChangeHostsReq); + swaps(&stuff->hostLength); + return ((*ProcVector[X_ChangeHosts]) (client)); + +} + +int +SProcRotateProperties(ClientPtr client) +{ + REQUEST(xRotatePropertiesReq); + swaps(&stuff->length); + REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq); + swapl(&stuff->window); + swaps(&stuff->nAtoms); + swaps(&stuff->nPositions); + SwapRestL(stuff); + return ((*ProcVector[X_RotateProperties]) (client)); +} + +int +SProcNoOperation(ClientPtr client) +{ + REQUEST(xReq); + swaps(&stuff->length); + return ((*ProcVector[X_NoOperation]) (client)); +} + +void +SwapConnClientPrefix(xConnClientPrefix * pCCP) +{ + swaps(&pCCP->majorVersion); + swaps(&pCCP->minorVersion); + swaps(&pCCP->nbytesAuthProto); + swaps(&pCCP->nbytesAuthString); +} diff --git a/dix/tables.c b/dix/tables.c new file mode 100644 index 0000000..686cddd --- /dev/null +++ b/dix/tables.c @@ -0,0 +1,973 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xproto.h> +#include "windowstr.h" +#include "extnsionst.h" +#include "dixstruct.h" +#include "dixevents.h" +#include "dispatch.h" +#include "swaprep.h" +#include "swapreq.h" + +int (*InitialVector[3]) (ClientPtr /* client */) = { + 0, + ProcInitialConnection, + ProcEstablishConnection +}; + +int (*ProcVector[256]) (ClientPtr /* client */) = { + ProcBadRequest, + ProcCreateWindow, + ProcChangeWindowAttributes, + ProcGetWindowAttributes, + ProcDestroyWindow, + ProcDestroySubwindows, /* 5 */ + ProcChangeSaveSet, + ProcReparentWindow, + ProcMapWindow, + ProcMapSubwindows, + ProcUnmapWindow, /* 10 */ + ProcUnmapSubwindows, + ProcConfigureWindow, + ProcCirculateWindow, + ProcGetGeometry, + ProcQueryTree, /* 15 */ + ProcInternAtom, + ProcGetAtomName, + ProcChangeProperty, + ProcDeleteProperty, + ProcGetProperty, /* 20 */ + ProcListProperties, + ProcSetSelectionOwner, + ProcGetSelectionOwner, + ProcConvertSelection, + ProcSendEvent, /* 25 */ + ProcGrabPointer, + ProcUngrabPointer, + ProcGrabButton, + ProcUngrabButton, + ProcChangeActivePointerGrab, /* 30 */ + ProcGrabKeyboard, + ProcUngrabKeyboard, + ProcGrabKey, + ProcUngrabKey, + ProcAllowEvents, /* 35 */ + ProcGrabServer, + ProcUngrabServer, + ProcQueryPointer, + ProcGetMotionEvents, + ProcTranslateCoords, /* 40 */ + ProcWarpPointer, + ProcSetInputFocus, + ProcGetInputFocus, + ProcQueryKeymap, + ProcOpenFont, /* 45 */ + ProcCloseFont, + ProcQueryFont, + ProcQueryTextExtents, + ProcListFonts, + ProcListFontsWithInfo, /* 50 */ + ProcSetFontPath, + ProcGetFontPath, + ProcCreatePixmap, + ProcFreePixmap, + ProcCreateGC, /* 55 */ + ProcChangeGC, + ProcCopyGC, + ProcSetDashes, + ProcSetClipRectangles, + ProcFreeGC, /* 60 */ + ProcClearToBackground, + ProcCopyArea, + ProcCopyPlane, + ProcPolyPoint, + ProcPolyLine, /* 65 */ + ProcPolySegment, + ProcPolyRectangle, + ProcPolyArc, + ProcFillPoly, + ProcPolyFillRectangle, /* 70 */ + ProcPolyFillArc, + ProcPutImage, + ProcGetImage, + ProcPolyText, + ProcPolyText, /* 75 */ + ProcImageText8, + ProcImageText16, + ProcCreateColormap, + ProcFreeColormap, + ProcCopyColormapAndFree, /* 80 */ + ProcInstallColormap, + ProcUninstallColormap, + ProcListInstalledColormaps, + ProcAllocColor, + ProcAllocNamedColor, /* 85 */ + ProcAllocColorCells, + ProcAllocColorPlanes, + ProcFreeColors, + ProcStoreColors, + ProcStoreNamedColor, /* 90 */ + ProcQueryColors, + ProcLookupColor, + ProcCreateCursor, + ProcCreateGlyphCursor, + ProcFreeCursor, /* 95 */ + ProcRecolorCursor, + ProcQueryBestSize, + ProcQueryExtension, + ProcListExtensions, + ProcChangeKeyboardMapping, /* 100 */ + ProcGetKeyboardMapping, + ProcChangeKeyboardControl, + ProcGetKeyboardControl, + ProcBell, + ProcChangePointerControl, /* 105 */ + ProcGetPointerControl, + ProcSetScreenSaver, + ProcGetScreenSaver, + ProcChangeHosts, + ProcListHosts, /* 110 */ + ProcChangeAccessControl, + ProcChangeCloseDownMode, + ProcKillClient, + ProcRotateProperties, + ProcForceScreenSaver, /* 115 */ + ProcSetPointerMapping, + ProcGetPointerMapping, + ProcSetModifierMapping, + ProcGetModifierMapping, + ProcBadRequest, /* 120 */ + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, /* 125 */ + ProcBadRequest, + ProcNoOperation, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest +}; + +int (*SwappedProcVector[256]) (ClientPtr /* client */) = { + ProcBadRequest, + SProcCreateWindow, + SProcChangeWindowAttributes, + SProcResourceReq, /* GetWindowAttributes */ + SProcResourceReq, /* DestroyWindow */ + SProcResourceReq, /* 5 DestroySubwindows */ + SProcResourceReq, /* SProcChangeSaveSet, */ + SProcReparentWindow, + SProcResourceReq, /* MapWindow */ + SProcResourceReq, /* MapSubwindows */ + SProcResourceReq, /* 10 UnmapWindow */ + SProcResourceReq, /* UnmapSubwindows */ + SProcConfigureWindow, + SProcResourceReq, /* SProcCirculateWindow, */ + SProcResourceReq, /* GetGeometry */ + SProcResourceReq, /* 15 QueryTree */ + SProcInternAtom, + SProcResourceReq, /* SProcGetAtomName, */ + SProcChangeProperty, + SProcDeleteProperty, + SProcGetProperty, /* 20 */ + SProcResourceReq, /* SProcListProperties, */ + SProcSetSelectionOwner, + SProcResourceReq, /* SProcGetSelectionOwner, */ + SProcConvertSelection, + SProcSendEvent, /* 25 */ + SProcGrabPointer, + SProcResourceReq, /* SProcUngrabPointer, */ + SProcGrabButton, + SProcUngrabButton, + SProcChangeActivePointerGrab, /* 30 */ + SProcGrabKeyboard, + SProcResourceReq, /* SProcUngrabKeyboard, */ + SProcGrabKey, + SProcUngrabKey, + SProcResourceReq, /* 35 SProcAllowEvents, */ + SProcSimpleReq, /* SProcGrabServer, */ + SProcSimpleReq, /* SProcUngrabServer, */ + SProcResourceReq, /* SProcQueryPointer, */ + SProcGetMotionEvents, + SProcTranslateCoords, /*40 */ + SProcWarpPointer, + SProcSetInputFocus, + SProcSimpleReq, /* SProcGetInputFocus, */ + SProcSimpleReq, /* QueryKeymap, */ + SProcOpenFont, /* 45 */ + SProcResourceReq, /* SProcCloseFont, */ + SProcResourceReq, /* SProcQueryFont, */ + SProcResourceReq, /* SProcQueryTextExtents, */ + SProcListFonts, + SProcListFontsWithInfo, /* 50 */ + SProcSetFontPath, + SProcSimpleReq, /* GetFontPath, */ + SProcCreatePixmap, + SProcResourceReq, /* SProcFreePixmap, */ + SProcCreateGC, /* 55 */ + SProcChangeGC, + SProcCopyGC, + SProcSetDashes, + SProcSetClipRectangles, + SProcResourceReq, /* 60 SProcFreeGC, */ + SProcClearToBackground, + SProcCopyArea, + SProcCopyPlane, + SProcPoly, /* PolyPoint, */ + SProcPoly, /* 65 PolyLine */ + SProcPoly, /* PolySegment, */ + SProcPoly, /* PolyRectangle, */ + SProcPoly, /* PolyArc, */ + SProcFillPoly, + SProcPoly, /* 70 PolyFillRectangle */ + SProcPoly, /* PolyFillArc, */ + SProcPutImage, + SProcGetImage, + SProcPolyText, + SProcPolyText, /* 75 */ + SProcImageText, + SProcImageText, + SProcCreateColormap, + SProcResourceReq, /* SProcFreeColormap, */ + SProcCopyColormapAndFree, /* 80 */ + SProcResourceReq, /* SProcInstallColormap, */ + SProcResourceReq, /* SProcUninstallColormap, */ + SProcResourceReq, /* SProcListInstalledColormaps, */ + SProcAllocColor, + SProcAllocNamedColor, /* 85 */ + SProcAllocColorCells, + SProcAllocColorPlanes, + SProcFreeColors, + SProcStoreColors, + SProcStoreNamedColor, /* 90 */ + SProcQueryColors, + SProcLookupColor, + SProcCreateCursor, + SProcCreateGlyphCursor, + SProcResourceReq, /* 95 SProcFreeCursor, */ + SProcRecolorCursor, + SProcQueryBestSize, + SProcQueryExtension, + SProcSimpleReq, /* ListExtensions, */ + SProcChangeKeyboardMapping, /* 100 */ + SProcSimpleReq, /* GetKeyboardMapping, */ + SProcChangeKeyboardControl, + SProcSimpleReq, /* GetKeyboardControl, */ + SProcSimpleReq, /* Bell, */ + SProcChangePointerControl, /* 105 */ + SProcSimpleReq, /* GetPointerControl, */ + SProcSetScreenSaver, + SProcSimpleReq, /* GetScreenSaver, */ + SProcChangeHosts, + SProcSimpleReq, /* 110 ListHosts, */ + SProcSimpleReq, /* SProcChangeAccessControl, */ + SProcSimpleReq, /* SProcChangeCloseDownMode, */ + SProcResourceReq, /* SProcKillClient, */ + SProcRotateProperties, + SProcSimpleReq, /* 115 ForceScreenSaver */ + SProcSimpleReq, /* SetPointerMapping, */ + SProcSimpleReq, /* GetPointerMapping, */ + SProcSimpleReq, /* SetModifierMapping, */ + SProcSimpleReq, /* GetModifierMapping, */ + ProcBadRequest, /* 120 */ + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, /* 125 */ + ProcBadRequest, + SProcNoOperation, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest +}; + +EventSwapPtr EventSwapVector[MAXEVENTS] = { + (EventSwapPtr) SErrorEvent, + NotImplemented, + SKeyButtonPtrEvent, + SKeyButtonPtrEvent, + SKeyButtonPtrEvent, + SKeyButtonPtrEvent, /* 5 */ + SKeyButtonPtrEvent, + SEnterLeaveEvent, + SEnterLeaveEvent, + SFocusEvent, + SFocusEvent, /* 10 */ + SKeymapNotifyEvent, + SExposeEvent, + SGraphicsExposureEvent, + SNoExposureEvent, + SVisibilityEvent, /* 15 */ + SCreateNotifyEvent, + SDestroyNotifyEvent, + SUnmapNotifyEvent, + SMapNotifyEvent, + SMapRequestEvent, /* 20 */ + SReparentEvent, + SConfigureNotifyEvent, + SConfigureRequestEvent, + SGravityEvent, + SResizeRequestEvent, /* 25 */ + SCirculateEvent, + SCirculateEvent, + SPropertyEvent, + SSelectionClearEvent, + SSelectionRequestEvent, /* 30 */ + SSelectionNotifyEvent, + SColormapEvent, + SClientMessageEvent, + SMappingEvent, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented +}; + +ReplySwapPtr ReplySwapVector[256] = { + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr) SGetWindowAttributesReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 5 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 10 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr) SGetGeometryReply, + (ReplySwapPtr) SQueryTreeReply, /* 15 */ + (ReplySwapPtr) SInternAtomReply, + (ReplySwapPtr) SGetAtomNameReply, + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr) SGetPropertyReply, /* 20 */ + (ReplySwapPtr) SListPropertiesReply, + ReplyNotSwappd, + (ReplySwapPtr) SGetSelectionOwnerReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 25 */ + (ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 30 */ + (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 35 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr) SQueryPointerReply, + (ReplySwapPtr) SGetMotionEventsReply, + (ReplySwapPtr) STranslateCoordsReply, /* 40 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr) SGetInputFocusReply, + (ReplySwapPtr) SQueryKeymapReply, + ReplyNotSwappd, /* 45 */ + ReplyNotSwappd, + (ReplySwapPtr) SQueryFontReply, + (ReplySwapPtr) SQueryTextExtentsReply, + (ReplySwapPtr) SListFontsReply, + (ReplySwapPtr) SListFontsWithInfoReply, /* 50 */ + ReplyNotSwappd, + (ReplySwapPtr) SGetFontPathReply, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 55 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 60 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 65 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 70 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr) SGetImageReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 75 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 80 */ + ReplyNotSwappd, + ReplyNotSwappd, + (ReplySwapPtr) SListInstalledColormapsReply, + (ReplySwapPtr) SAllocColorReply, + (ReplySwapPtr) SAllocNamedColorReply, /* 85 */ + (ReplySwapPtr) SAllocColorCellsReply, + (ReplySwapPtr) SAllocColorPlanesReply, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 90 */ + (ReplySwapPtr) SQueryColorsReply, + (ReplySwapPtr) SLookupColorReply, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 95 */ + ReplyNotSwappd, + (ReplySwapPtr) SQueryBestSizeReply, + (ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */ + (ReplySwapPtr) SListExtensionsReply, + ReplyNotSwappd, /* 100 */ + (ReplySwapPtr) SGetKeyboardMappingReply, + ReplyNotSwappd, + (ReplySwapPtr) SGetKeyboardControlReply, + ReplyNotSwappd, + ReplyNotSwappd, /* 105 */ + (ReplySwapPtr) SGetPointerControlReply, + ReplyNotSwappd, + (ReplySwapPtr) SGetScreenSaverReply, + ReplyNotSwappd, + (ReplySwapPtr) SListHostsReply, /* 110 */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, /* 115 */ + (ReplySwapPtr) SGenericReply, /* SetPointerMapping */ + (ReplySwapPtr) SGetPointerMappingReply, + (ReplySwapPtr) SGenericReply, /* SetModifierMapping */ + (ReplySwapPtr) SGetModifierMappingReply, /* 119 */ + ReplyNotSwappd, /* 120 */ + ReplyNotSwappd, /* 121 */ + ReplyNotSwappd, /* 122 */ + ReplyNotSwappd, /* 123 */ + ReplyNotSwappd, /* 124 */ + ReplyNotSwappd, /* 125 */ + ReplyNotSwappd, /* 126 */ + ReplyNotSwappd, /* NoOperation */ + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd, + ReplyNotSwappd +}; diff --git a/dix/touch.c b/dix/touch.c new file mode 100644 index 0000000..a7ea213 --- /dev/null +++ b/dix/touch.c @@ -0,0 +1,1140 @@ +/* + * Copyright © 2011 Collabra Ltd. + * Copyright © 2011 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone <daniel@fooishbar.org> + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "inputstr.h" +#include "scrnintstr.h" +#include "dixgrabs.h" + +#include "eventstr.h" +#include "exevents.h" +#include "exglobals.h" +#include "inpututils.h" +#include "eventconvert.h" +#include "windowstr.h" +#include "mi.h" + +#define TOUCH_HISTORY_SIZE 100 + +/* If a touch queue resize is needed, the device id's bit is set. */ +static unsigned char resize_waiting[(MAXDEVICES + 7) / 8]; + +/** + * Some documentation about touch points: + * The driver submits touch events with it's own (unique) touch point ID. + * The driver may re-use those IDs, the DDX doesn't care. It just passes on + * the data to the DIX. In the server, the driver's ID is referred to as the + * DDX id anyway. + * + * On a TouchBegin, we create a DDXTouchPointInfo that contains the DDX id + * and the client ID that this touchpoint will have. The client ID is the + * one visible on the protocol. + * + * TouchUpdate and TouchEnd will only be processed if there is an active + * touchpoint with the same DDX id. + * + * The DDXTouchPointInfo struct is stored dev->last.touches. When the event + * being processed, it becomes a TouchPointInfo in dev->touch-touches which + * contains amongst other things the sprite trace and delivery information. + */ + +/** + * Check which devices need a bigger touch event queue and grow their + * last.touches by half it's current size. + * + * @param client Always the serverClient + * @param closure Always NULL + * + * @return Always True. If we fail to grow we probably will topple over soon + * anyway and re-executing this won't help. + */ +static Bool +TouchResizeQueue(ClientPtr client, pointer closure) +{ + int i; + + OsBlockSignals(); + + /* first two ids are reserved */ + for (i = 2; i < MAXDEVICES; i++) { + DeviceIntPtr dev; + DDXTouchPointInfoPtr tmp; + size_t size; + + if (!BitIsOn(resize_waiting, i)) + continue; + + ClearBit(resize_waiting, i); + + /* device may have disappeared by now */ + dixLookupDevice(&dev, i, serverClient, DixWriteAccess); + if (!dev) + continue; + + /* Need to grow the queue means dropping events. Grow sufficiently so we + * don't need to do it often */ + size = dev->last.num_touches + dev->last.num_touches / 2 + 1; + + tmp = realloc(dev->last.touches, size * sizeof(*dev->last.touches)); + if (tmp) { + int j; + + dev->last.touches = tmp; + for (j = dev->last.num_touches; j < size; j++) + TouchInitDDXTouchPoint(dev, &dev->last.touches[j]); + dev->last.num_touches = size; + } + + } + OsReleaseSignals(); + + return TRUE; +} + +/** + * Given the DDX-facing ID (which is _not_ DeviceEvent::detail.touch), find the + * associated DDXTouchPointInfoRec. + * + * @param dev The device to create the touch point for + * @param ddx_id Touch id assigned by the driver/ddx + * @param create Create the touchpoint if it cannot be found + */ +DDXTouchPointInfoPtr +TouchFindByDDXID(DeviceIntPtr dev, uint32_t ddx_id, Bool create) +{ + DDXTouchPointInfoPtr ti; + int i; + + if (!dev->touch) + return NULL; + + for (i = 0; i < dev->last.num_touches; i++) { + ti = &dev->last.touches[i]; + if (ti->active && ti->ddx_id == ddx_id) + return ti; + } + + return create ? TouchBeginDDXTouch(dev, ddx_id) : NULL; +} + +/** + * Given a unique DDX ID for a touchpoint, create a touchpoint record and + * return it. + * + * If no other touch points are active, mark new touchpoint for pointer + * emulation. + * + * Returns NULL on failure (i.e. if another touch with that ID is already active, + * allocation failure). + */ +DDXTouchPointInfoPtr +TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id) +{ + static int next_client_id = 1; + int i; + TouchClassPtr t = dev->touch; + DDXTouchPointInfoPtr ti = NULL; + Bool emulate_pointer; + + if (!t) + return NULL; + + emulate_pointer = (t->mode == XIDirectTouch); + + /* Look for another active touchpoint with the same DDX ID. DDX + * touchpoints must be unique. */ + if (TouchFindByDDXID(dev, ddx_id, FALSE)) + return NULL; + + for (i = 0; i < dev->last.num_touches; i++) { + /* Only emulate pointer events on the first touch */ + if (dev->last.touches[i].active) + emulate_pointer = FALSE; + else if (!ti) /* ti is now first non-active touch rec */ + ti = &dev->last.touches[i]; + + if (!emulate_pointer && ti) + break; + } + + if (ti) { + int client_id; + + ti->active = TRUE; + ti->ddx_id = ddx_id; + client_id = next_client_id; + next_client_id++; + if (next_client_id == 0) + next_client_id = 1; + ti->client_id = client_id; + ti->emulate_pointer = emulate_pointer; + return ti; + } + + /* If we get here, then we've run out of touches and we need to drop the + * event (we're inside the SIGIO handler here) schedule a WorkProc to + * grow the queue for us for next time. */ + ErrorFSigSafe("%s: not enough space for touch events (max %u touchpoints). " + "Dropping this event.\n", dev->name, dev->last.num_touches); + + if (!BitIsOn(resize_waiting, dev->id)) { + SetBit(resize_waiting, dev->id); + QueueWorkProc(TouchResizeQueue, serverClient, NULL); + } + + return NULL; +} + +void +TouchEndDDXTouch(DeviceIntPtr dev, DDXTouchPointInfoPtr ti) +{ + TouchClassPtr t = dev->touch; + + if (!t) + return; + + ti->active = FALSE; +} + +void +TouchInitDDXTouchPoint(DeviceIntPtr dev, DDXTouchPointInfoPtr ddxtouch) +{ + memset(ddxtouch, 0, sizeof(*ddxtouch)); + ddxtouch->valuators = valuator_mask_new(dev->valuator->numAxes); +} + +Bool +TouchInitTouchPoint(TouchClassPtr t, ValuatorClassPtr v, int index) +{ + TouchPointInfoPtr ti; + + if (index >= t->num_touches) + return FALSE; + ti = &t->touches[index]; + + memset(ti, 0, sizeof(*ti)); + + ti->valuators = valuator_mask_new(v->numAxes); + if (!ti->valuators) + return FALSE; + + ti->sprite.spriteTrace = calloc(32, sizeof(*ti->sprite.spriteTrace)); + if (!ti->sprite.spriteTrace) { + valuator_mask_free(&ti->valuators); + return FALSE; + } + ti->sprite.spriteTraceSize = 32; + ti->sprite.spriteTrace[0] = screenInfo.screens[0]->root; + ti->sprite.hot.pScreen = screenInfo.screens[0]; + ti->sprite.hotPhys.pScreen = screenInfo.screens[0]; + + ti->client_id = -1; + + return TRUE; +} + +void +TouchFreeTouchPoint(DeviceIntPtr device, int index) +{ + TouchPointInfoPtr ti; + int i; + + if (!device->touch || index >= device->touch->num_touches) + return; + ti = &device->touch->touches[index]; + + if (ti->active) + TouchEndTouch(device, ti); + + for (i = 0; i < ti->num_listeners; i++) + TouchRemoveListener(ti, ti->listeners[0].listener); + + valuator_mask_free(&ti->valuators); + free(ti->sprite.spriteTrace); + ti->sprite.spriteTrace = NULL; + free(ti->listeners); + ti->listeners = NULL; + free(ti->history); + ti->history = NULL; + ti->history_size = 0; + ti->history_elements = 0; +} + +/** + * Given a client-facing ID (e.g. DeviceEvent::detail.touch), find the + * associated TouchPointInfoRec. + */ +TouchPointInfoPtr +TouchFindByClientID(DeviceIntPtr dev, uint32_t client_id) +{ + TouchClassPtr t = dev->touch; + TouchPointInfoPtr ti; + int i; + + if (!t) + return NULL; + + for (i = 0; i < t->num_touches; i++) { + ti = &t->touches[i]; + if (ti->active && ti->client_id == client_id) + return ti; + } + + return NULL; +} + +/** + * Given a unique ID for a touchpoint, create a touchpoint record in the + * server. + * + * Returns NULL on failure (i.e. if another touch with that ID is already active, + * allocation failure). + */ +TouchPointInfoPtr +TouchBeginTouch(DeviceIntPtr dev, int sourceid, uint32_t touchid, + Bool emulate_pointer) +{ + int i; + TouchClassPtr t = dev->touch; + TouchPointInfoPtr ti; + void *tmp; + + if (!t) + return NULL; + + /* Look for another active touchpoint with the same client ID. It's + * technically legitimate for a touchpoint to still exist with the same + * ID but only once the 32 bits wrap over and you've used up 4 billion + * touch ids without lifting that one finger off once. In which case + * you deserve a medal or something, but not error handling code. */ + if (TouchFindByClientID(dev, touchid)) + return NULL; + + try_find_touch: + for (i = 0; i < t->num_touches; i++) { + ti = &t->touches[i]; + if (!ti->active) { + ti->active = TRUE; + ti->client_id = touchid; + ti->sourceid = sourceid; + ti->emulate_pointer = emulate_pointer; + return ti; + } + } + + /* If we get here, then we've run out of touches: enlarge dev->touch and + * try again. */ + tmp = realloc(t->touches, (t->num_touches + 1) * sizeof(*ti)); + if (tmp) { + t->touches = tmp; + t->num_touches++; + if (TouchInitTouchPoint(t, dev->valuator, t->num_touches - 1)) + goto try_find_touch; + } + + return NULL; +} + +/** + * Releases a touchpoint for use: this must only be called after all events + * related to that touchpoint have been sent and finalised. Called from + * ProcessTouchEvent and friends. Not by you. + */ +void +TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti) +{ + int i; + + if (ti->emulate_pointer) { + GrabPtr grab; + + if ((grab = dev->deviceGrab.grab)) { + if (dev->deviceGrab.fromPassiveGrab && + !dev->button->buttonsDown && + !dev->touch->buttonsDown && GrabIsPointerGrab(grab)) + (*dev->deviceGrab.DeactivateGrab) (dev); + } + } + + for (i = 0; i < ti->num_listeners; i++) + TouchRemoveListener(ti, ti->listeners[0].listener); + + ti->active = FALSE; + ti->pending_finish = FALSE; + ti->sprite.spriteTraceGood = 0; + free(ti->listeners); + ti->listeners = NULL; + ti->num_listeners = 0; + ti->num_grabs = 0; + ti->client_id = 0; + + TouchEventHistoryFree(ti); + + valuator_mask_zero(ti->valuators); +} + +/** + * Allocate the event history for this touch pointer. Calling this on a + * touchpoint that already has an event history does nothing but counts as + * as success. + * + * @return TRUE on success, FALSE on allocation errors + */ +Bool +TouchEventHistoryAllocate(TouchPointInfoPtr ti) +{ + if (ti->history) + return TRUE; + + ti->history = calloc(TOUCH_HISTORY_SIZE, sizeof(*ti->history)); + ti->history_elements = 0; + if (ti->history) + ti->history_size = TOUCH_HISTORY_SIZE; + return ti->history != NULL; +} + +void +TouchEventHistoryFree(TouchPointInfoPtr ti) +{ + free(ti->history); + ti->history = NULL; + ti->history_size = 0; + ti->history_elements = 0; +} + +/** + * Store the given event on the event history (if one exists) + * A touch event history consists of one TouchBegin and several TouchUpdate + * events (if applicable) but no TouchEnd event. + * If more than one TouchBegin is pushed onto the stack, the push is + * ignored, calling this function multiple times for the TouchBegin is + * valid. + */ +void +TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev) +{ + if (!ti->history) + return; + + switch (ev->type) { + case ET_TouchBegin: + /* don't store the same touchbegin twice */ + if (ti->history_elements > 0) + return; + break; + case ET_TouchUpdate: + break; + case ET_TouchEnd: + return; /* no TouchEnd events in the history */ + default: + return; + } + + /* We only store real events in the history */ + if (ev->flags & (TOUCH_CLIENT_ID | TOUCH_REPLAYING)) + return; + + ti->history[ti->history_elements++] = *ev; + /* FIXME: proper overflow fixes */ + if (ti->history_elements > ti->history_size - 1) { + ti->history_elements = ti->history_size - 1; + DebugF("source device %d: history size %d overflowing for touch %u\n", + ti->sourceid, ti->history_size, ti->client_id); + } +} + +void +TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource) +{ + int i; + + if (!ti->history) + return; + + TouchDeliverDeviceClassesChangedEvent(ti, ti->history[0].time, resource); + + for (i = 0; i < ti->history_elements; i++) { + DeviceEvent *ev = &ti->history[i]; + + ev->flags |= TOUCH_REPLAYING; + ev->resource = resource; + /* FIXME: + We're replaying ti->history which contains the TouchBegin + + all TouchUpdates for ti. This needs to be passed on to the next + listener. If that is a touch listener, everything is dandy. + If the TouchBegin however triggers a sync passive grab, the + TouchUpdate events must be sent to EnqueueEvent so the events end + up in syncEvents.pending to be forwarded correctly in a + subsequent ComputeFreeze(). + + However, if we just send them to EnqueueEvent the sync'ing device + prevents handling of touch events for ownership listeners who + want the events right here, right now. + */ + dev->public.processInputProc((InternalEvent*)ev, dev); + } +} + +void +TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti, Time time, + XID resource) +{ + DeviceIntPtr dev; + int num_events = 0; + InternalEvent dcce; + + dixLookupDevice(&dev, ti->sourceid, serverClient, DixWriteAccess); + + if (!dev) + return; + + /* UpdateFromMaster generates at most one event */ + UpdateFromMaster(&dcce, dev, DEVCHANGE_POINTER_EVENT, &num_events); + BUG_WARN(num_events > 1); + + if (num_events) { + dcce.any.time = time; + /* FIXME: This doesn't do anything */ + dev->public.processInputProc(&dcce, dev); + } +} + +Bool +TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite) +{ + int i; + TouchClassPtr t = dev->touch; + WindowPtr *trace; + SpritePtr srcsprite; + + /* All touches should have the same sprite trace, so find and reuse an + * existing touch's sprite if possible, else use the device's sprite. */ + for (i = 0; i < t->num_touches; i++) + if (!t->touches[i].pending_finish && + t->touches[i].sprite.spriteTraceGood > 0) + break; + if (i < t->num_touches) + srcsprite = &t->touches[i].sprite; + else if (dev->spriteInfo->sprite) + srcsprite = dev->spriteInfo->sprite; + else + return FALSE; + + if (srcsprite->spriteTraceGood > sprite->spriteTraceSize) { + trace = realloc(sprite->spriteTrace, + srcsprite->spriteTraceSize * sizeof(*trace)); + if (!trace) { + sprite->spriteTraceGood = 0; + return FALSE; + } + sprite->spriteTrace = trace; + sprite->spriteTraceSize = srcsprite->spriteTraceGood; + } + memcpy(sprite->spriteTrace, srcsprite->spriteTrace, + srcsprite->spriteTraceGood * sizeof(*trace)); + sprite->spriteTraceGood = srcsprite->spriteTraceGood; + + return TRUE; +} + +/** + * Ensure a window trace is present in ti->sprite, constructing one for + * TouchBegin events. + */ +Bool +TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, + InternalEvent *ev) +{ + TouchClassPtr t = sourcedev->touch; + SpritePtr sprite = &ti->sprite; + + if (t->mode == XIDirectTouch) { + /* Focus immediately under the touchpoint in direct touch mode. + * XXX: Do we need to handle crossing screens here? */ + sprite->spriteTrace[0] = + sourcedev->spriteInfo->sprite->hotPhys.pScreen->root; + XYToWindow(sprite, ev->device_event.root_x, ev->device_event.root_y); + } + else if (!TouchBuildDependentSpriteTrace(sourcedev, sprite)) + return FALSE; + + if (sprite->spriteTraceGood <= 0) + return FALSE; + + /* Mark which grabs/event selections we're delivering to: max one grab per + * window plus the bottom-most event selection, plus any active grab. */ + ti->listeners = calloc(sprite->spriteTraceGood + 2, sizeof(*ti->listeners)); + if (!ti->listeners) { + sprite->spriteTraceGood = 0; + return FALSE; + } + ti->num_listeners = 0; + + return TRUE; +} + +/** + * Copy the touch event into the pointer_event, switching the required + * fields to make it a correct pointer event. + * + * @param event The original touch event + * @param[in] motion_event The respective motion event + * @param[in] button_event The respective button event (if any) + * + * @returns The number of converted events. + * @retval 0 An error occured + * @retval 1 only the motion event is valid + * @retval 2 motion and button event are valid + */ +int +TouchConvertToPointerEvent(const InternalEvent *event, + InternalEvent *motion_event, + InternalEvent *button_event) +{ + int ptrtype; + int nevents = 0; + + BUG_RETURN_VAL(!event, 0); + BUG_RETURN_VAL(!motion_event, 0); + + switch (event->any.type) { + case ET_TouchUpdate: + nevents = 1; + break; + case ET_TouchBegin: + nevents = 2; /* motion + press */ + ptrtype = ET_ButtonPress; + break; + case ET_TouchEnd: + nevents = 2; /* motion + release */ + ptrtype = ET_ButtonRelease; + break; + default: + BUG_WARN_MSG(1, "Invalid event type %d\n", event->any.type); + return 0; + } + + BUG_WARN_MSG(!(event->device_event.flags & TOUCH_POINTER_EMULATED), + "Non-emulating touch event\n"); + + motion_event->device_event = event->device_event; + motion_event->any.type = ET_Motion; + motion_event->device_event.detail.button = 0; + motion_event->device_event.flags = XIPointerEmulated; + + if (nevents > 1) { + BUG_RETURN_VAL(!button_event, 0); + button_event->device_event = event->device_event; + button_event->any.type = ptrtype; + button_event->device_event.flags = XIPointerEmulated; + /* detail is already correct */ + } + + return nevents; +} + +/** + * Return the corresponding pointer emulation internal event type for the given + * touch event or 0 if no such event type exists. + */ +int +TouchGetPointerEventType(const InternalEvent *event) +{ + int type = 0; + + switch (event->any.type) { + case ET_TouchBegin: + type = ET_ButtonPress; + break; + case ET_TouchUpdate: + type = ET_Motion; + break; + case ET_TouchEnd: + type = ET_ButtonRelease; + break; + default: + break; + } + return type; +} + +/** + * @returns TRUE if the specified grab or selection is the current owner of + * the touch sequence. + */ +Bool +TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource) +{ + return (ti->listeners[0].listener == resource); +} + +/** + * Add the resource to this touch's listeners. + */ +void +TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type, + enum InputLevel level, enum TouchListenerType type, + enum TouchListenerState state, WindowPtr window, + const GrabPtr grab) +{ + GrabPtr g = NULL; + + /* We need a copy of the grab, not the grab itself since that may be + * deleted by a UngrabButton request and leaves us with a dangling + * pointer */ + if (grab) + g = AllocGrab(grab); + + ti->listeners[ti->num_listeners].listener = resource; + ti->listeners[ti->num_listeners].resource_type = resource_type; + ti->listeners[ti->num_listeners].level = level; + ti->listeners[ti->num_listeners].state = state; + ti->listeners[ti->num_listeners].type = type; + ti->listeners[ti->num_listeners].window = window; + ti->listeners[ti->num_listeners].grab = g; + if (grab) + ti->num_grabs++; + ti->num_listeners++; +} + +/** + * Remove the resource from this touch's listeners. + * + * @return TRUE if the resource was removed, FALSE if the resource was not + * in the list + */ +Bool +TouchRemoveListener(TouchPointInfoPtr ti, XID resource) +{ + int i; + + for (i = 0; i < ti->num_listeners; i++) { + int j; + TouchListener *listener = &ti->listeners[i]; + + if (listener->listener != resource) + continue; + + if (listener->grab) { + FreeGrab(listener->grab); + listener->grab = NULL; + ti->num_grabs--; + } + + for (j = i; j < ti->num_listeners - 1; j++) + ti->listeners[j] = ti->listeners[j + 1]; + ti->num_listeners--; + ti->listeners[ti->num_listeners].listener = 0; + ti->listeners[ti->num_listeners].state = LISTENER_AWAITING_BEGIN; + + return TRUE; + } + return FALSE; +} + +static void +TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti, + InternalEvent *ev, GrabPtr grab) +{ + enum TouchListenerType type = LISTENER_GRAB; + + /* FIXME: owner_events */ + + if (grab->grabtype == XI2) { + if (!xi2mask_isset(grab->xi2mask, dev, XI_TouchOwnership)) + TouchEventHistoryAllocate(ti); + if (!xi2mask_isset(grab->xi2mask, dev, XI_TouchBegin)) + type = LISTENER_POINTER_GRAB; + } + else if (grab->grabtype == XI || grab->grabtype == CORE) { + TouchEventHistoryAllocate(ti); + type = LISTENER_POINTER_GRAB; + } + + /* grab listeners are always RT_NONE since we keep the grab pointer */ + TouchAddListener(ti, grab->resource, RT_NONE, grab->grabtype, + type, LISTENER_AWAITING_BEGIN, grab->window, grab); +} + +/** + * Add one listener if there is a grab on the given window. + */ +static void +TouchAddPassiveGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti, + WindowPtr win, InternalEvent *ev) +{ + GrabPtr grab; + Bool check_core = IsMaster(dev) && ti->emulate_pointer; + + /* FIXME: make CheckPassiveGrabsOnWindow only trigger on TouchBegin */ + grab = CheckPassiveGrabsOnWindow(win, dev, ev, check_core, FALSE); + if (!grab) + return; + + TouchAddGrabListener(dev, ti, ev, grab); +} + +static Bool +TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, + WindowPtr win, InternalEvent *ev) +{ + InputClients *iclients = NULL; + OtherInputMasks *inputMasks = NULL; + uint16_t evtype = 0; /* may be event type or emulated event type */ + enum TouchListenerType type = LISTENER_REGULAR; + int mask; + + evtype = GetXI2Type(ev->any.type); + mask = EventIsDeliverable(dev, ev->any.type, win); + if (!mask && !ti->emulate_pointer) + return FALSE; + else if (!mask) { /* now try for pointer event */ + mask = EventIsDeliverable(dev, TouchGetPointerEventType(ev), win); + if (mask) { + evtype = GetXI2Type(TouchGetPointerEventType(ev)); + type = LISTENER_POINTER_REGULAR; + } + } + if (!mask) + return FALSE; + + inputMasks = wOtherInputMasks(win); + + if (mask & EVENT_XI2_MASK) { + nt_list_for_each_entry(iclients, inputMasks->inputClients, next) { + if (!xi2mask_isset(iclients->xi2mask, dev, evtype)) + continue; + + if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership)) + TouchEventHistoryAllocate(ti); + + TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI2, + type, LISTENER_AWAITING_BEGIN, win, NULL); + return TRUE; + } + } + + if (mask & EVENT_XI1_MASK) { + int xitype = GetXIType(TouchGetPointerEventType(ev)); + Mask xi_filter = event_get_filter_from_type(dev, xitype); + + nt_list_for_each_entry(iclients, inputMasks->inputClients, next) { + if (!(iclients->mask[dev->id] & xi_filter)) + continue; + + TouchEventHistoryAllocate(ti); + TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI, + LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN, + win, NULL); + return TRUE; + } + } + + if (mask & EVENT_CORE_MASK) { + int coretype = GetCoreType(TouchGetPointerEventType(ev)); + Mask core_filter = event_get_filter_from_type(dev, coretype); + OtherClients *oclients; + + /* window owner */ + if (IsMaster(dev) && (win->eventMask & core_filter)) { + TouchEventHistoryAllocate(ti); + TouchAddListener(ti, win->drawable.id, RT_WINDOW, CORE, + LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN, + win, NULL); + return TRUE; + } + + /* all others */ + nt_list_for_each_entry(oclients, wOtherClients(win), next) { + if (!(oclients->mask & core_filter)) + continue; + + TouchEventHistoryAllocate(ti); + TouchAddListener(ti, oclients->resource, RT_OTHERCLIENT, CORE, + type, LISTENER_AWAITING_BEGIN, win, NULL); + return TRUE; + } + } + + return FALSE; +} + +static void +TouchAddActiveGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti, + InternalEvent *ev, GrabPtr grab) +{ + if (!ti->emulate_pointer && + (grab->grabtype == CORE || grab->grabtype == XI)) + return; + + if (!ti->emulate_pointer && + grab->grabtype == XI2 && + !xi2mask_isset(grab->xi2mask, dev, XI_TouchBegin)) + return; + + TouchAddGrabListener(dev, ti, ev, grab); +} + +void +TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev) +{ + int i; + SpritePtr sprite = &ti->sprite; + WindowPtr win; + + if (dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab) + TouchAddActiveGrabListener(dev, ti, ev, dev->deviceGrab.grab); + + /* We set up an active touch listener for existing touches, but not any + * passive grab or regular listeners. */ + if (ev->any.type != ET_TouchBegin) + return; + + /* First, find all grabbing clients from the root window down + * to the deepest child window. */ + for (i = 0; i < sprite->spriteTraceGood; i++) { + win = sprite->spriteTrace[i]; + TouchAddPassiveGrabListener(dev, ti, win, ev); + } + + /* Find the first client with an applicable event selection, + * going from deepest child window back up to the root window. */ + for (i = sprite->spriteTraceGood - 1; i >= 0; i--) { + Bool delivered; + + win = sprite->spriteTrace[i]; + delivered = TouchAddRegularListener(dev, ti, win, ev); + if (delivered) + return; + } +} + +/** + * Remove the touch pointer grab from the device. Called from + * DeactivatePointerGrab() + */ +void +TouchRemovePointerGrab(DeviceIntPtr dev) +{ + TouchPointInfoPtr ti; + GrabPtr grab; + DeviceEvent *ev; + + if (!dev->touch) + return; + + grab = dev->deviceGrab.grab; + if (!grab) + return; + + ev = dev->deviceGrab.sync.event; + if (!IsTouchEvent((InternalEvent *) ev)) + return; + + ti = TouchFindByClientID(dev, ev->touchid); + if (!ti) + return; + + /* FIXME: missing a bit of code here... */ +} + +/* As touch grabs don't turn into active grabs with their own resources, we + * need to walk all the touches and remove this grab from any delivery + * lists. */ +void +TouchListenerGone(XID resource) +{ + TouchPointInfoPtr ti; + DeviceIntPtr dev; + InternalEvent *events = InitEventList(GetMaximumEventsNum()); + int i, j, k, nev; + + if (!events) + FatalError("TouchListenerGone: couldn't allocate events\n"); + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (!dev->touch) + continue; + + for (i = 0; i < dev->touch->num_touches; i++) { + ti = &dev->touch->touches[i]; + if (!ti->active) + continue; + + for (j = 0; j < ti->num_listeners; j++) { + if (CLIENT_BITS(ti->listeners[j].listener) != resource) + continue; + + nev = GetTouchOwnershipEvents(events, dev, ti, XIRejectTouch, + ti->listeners[j].listener, 0); + for (k = 0; k < nev; k++) + mieqProcessDeviceEvent(dev, events + k, NULL); + + break; + } + } + } + + FreeEventList(events, GetMaximumEventsNum()); +} + +int +TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener, + int mode) +{ + InternalEvent *events; + int nev; + int i; + + BUG_RETURN_VAL(listener < 0, BadMatch); + BUG_RETURN_VAL(listener >= ti->num_listeners, BadMatch); + + if (listener > 0) { + if (mode == XIRejectTouch) + TouchRejected(dev, ti, ti->listeners[listener].listener, NULL); + else + ti->listeners[listener].state = LISTENER_EARLY_ACCEPT; + + return Success; + } + + events = InitEventList(GetMaximumEventsNum()); + BUG_RETURN_VAL_MSG(!events, BadAlloc, "Failed to allocate touch ownership events\n"); + + nev = GetTouchOwnershipEvents(events, dev, ti, mode, + ti->listeners[0].listener, 0); + BUG_WARN_MSG(nev == 0, "Failed to get touch ownership events\n"); + + for (i = 0; i < nev; i++) + mieqProcessDeviceEvent(dev, events + i, NULL); + + FreeEventList(events, GetMaximumEventsNum()); + + return nev ? Success : BadMatch; +} + +int +TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, + uint32_t touchid, Window grab_window, XID *error) +{ + TouchPointInfoPtr ti; + int i; + + if (!dev->touch) { + *error = dev->id; + return BadDevice; + } + + ti = TouchFindByClientID(dev, touchid); + if (!ti) { + *error = touchid; + return BadValue; + } + + for (i = 0; i < ti->num_listeners; i++) { + if (CLIENT_ID(ti->listeners[i].listener) == client->index && + ti->listeners[i].window->drawable.id == grab_window) + break; + } + if (i == ti->num_listeners) + return BadAccess; + + return TouchListenerAcceptReject(dev, ti, i, mode); +} + +/** + * End physically active touches for a device. + */ +void +TouchEndPhysicallyActiveTouches(DeviceIntPtr dev) +{ + InternalEvent *eventlist = InitEventList(GetMaximumEventsNum()); + int i; + + OsBlockSignals(); + mieqProcessInputEvents(); + for (i = 0; i < dev->last.num_touches; i++) { + DDXTouchPointInfoPtr ddxti = dev->last.touches + i; + + if (ddxti->active) { + int j; + int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id, + XI_TouchEnd, 0, NULL); + + for (j = 0; j < nevents; j++) + mieqProcessDeviceEvent(dev, eventlist + j, NULL); + } + } + OsReleaseSignals(); + + FreeEventList(eventlist, GetMaximumEventsNum()); +} + +/** + * Generate and deliver a TouchEnd event. + * + * @param dev The device to deliver the event for. + * @param ti The touch point record to deliver the event for. + * @param flags Internal event flags. The called does not need to provide + * TOUCH_CLIENT_ID and TOUCH_POINTER_EMULATED, this function will ensure + * they are set appropriately. + * @param resource The client resource to deliver to, or 0 for all clients. + */ +void +TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource) +{ + InternalEvent event; + + /* We're not processing a touch end for a frozen device */ + if (dev->deviceGrab.sync.frozen) + return; + + flags |= TOUCH_CLIENT_ID; + if (ti->emulate_pointer) + flags |= TOUCH_POINTER_EMULATED; + TouchDeliverDeviceClassesChangedEvent(ti, GetTimeInMillis(), resource); + GetDixTouchEnd(&event, dev, ti, flags); + DeliverTouchEvents(dev, ti, &event, resource); + if (ti->num_grabs == 0) + UpdateDeviceState(dev, &event.device_event); +} + +void +TouchAcceptAndEnd(DeviceIntPtr dev, int touchid) +{ + TouchPointInfoPtr ti = TouchFindByClientID(dev, touchid); + if (!ti) + return; + + TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); + if (ti->pending_finish) + TouchEmitTouchEnd(dev, ti, 0, 0); + if (ti->num_listeners <= 1) + TouchEndTouch(dev, ti); +} diff --git a/dix/window.c b/dix/window.c new file mode 100644 index 0000000..0e9109e --- /dev/null +++ b/dix/window.c @@ -0,0 +1,3630 @@ +/* + +Copyright (c) 2006, Red Hat, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "misc.h" +#include "scrnintstr.h" +#include "os.h" +#include "regionstr.h" +#include "validate.h" +#include "windowstr.h" +#include "propertyst.h" +#include "input.h" +#include "inputstr.h" +#include "resource.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "servermd.h" +#include "mivalidate.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif +#include "dixevents.h" +#include "globals.h" +#include "mi.h" /* miPaintWindow */ +#ifdef COMPOSITE +#include "compint.h" +#endif +#include "selection.h" + +#include "privates.h" +#include "xace.h" +#include "exevents.h" + +#include <X11/Xatom.h> /* must come after server includes */ + +/****** + * Window stuff for server + * + * CreateRootWindow, CreateWindow, ChangeWindowAttributes, + * GetWindowAttributes, DeleteWindow, DestroySubWindows, + * HandleSaveSet, ReparentWindow, MapWindow, MapSubWindows, + * UnmapWindow, UnmapSubWindows, ConfigureWindow, CirculateWindow, + * ChangeWindowDeviceCursor + ******/ + +Bool bgNoneRoot = FALSE; + +static unsigned char _back_lsb[4] = { 0x88, 0x22, 0x44, 0x11 }; +static unsigned char _back_msb[4] = { 0x11, 0x44, 0x22, 0x88 }; + +static Bool WindowParentHasDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, CursorPtr pCurs); +static Bool + +WindowSeekDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, + DevCursNodePtr * pNode, DevCursNodePtr * pPrev); + +int screenIsSaved = SCREEN_SAVER_OFF; + +static Bool TileScreenSaver(ScreenPtr pScreen, int kind); + +#define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ + CWDontPropagate | CWOverrideRedirect | CWCursor ) + +#define BOXES_OVERLAP(b1, b2) \ + (!( ((b1)->x2 <= (b2)->x1) || \ + ( ((b1)->x1 >= (b2)->x2)) || \ + ( ((b1)->y2 <= (b2)->y1)) || \ + ( ((b1)->y1 >= (b2)->y2)) ) ) + +#define RedirectSend(pWin) \ + ((pWin->eventMask|wOtherEventMasks(pWin)) & SubstructureRedirectMask) + +#define SubSend(pWin) \ + ((pWin->eventMask|wOtherEventMasks(pWin)) & SubstructureNotifyMask) + +#define StrSend(pWin) \ + ((pWin->eventMask|wOtherEventMasks(pWin)) & StructureNotifyMask) + +#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent)) + +#ifdef COMPOSITE +static const char *overlay_win_name = "<composite overlay>"; +#endif + +static const char * +get_window_name(WindowPtr pWin) +{ +#define WINDOW_NAME_BUF_LEN 512 + PropertyPtr prop; + static char buf[WINDOW_NAME_BUF_LEN]; + int len; + +#ifdef COMPOSITE + CompScreenPtr comp_screen = GetCompScreen(pWin->drawable.pScreen); + + if (comp_screen && pWin == comp_screen->pOverlayWin) + return overlay_win_name; +#endif + + for (prop = wUserProps(pWin); prop; prop = prop->next) { + if (prop->propertyName == XA_WM_NAME && prop->type == XA_STRING && + prop->data) { + len = min(prop->size, WINDOW_NAME_BUF_LEN - 1); + memcpy(buf, prop->data, len); + buf[len] = '\0'; + return buf; + } + } + + return NULL; +#undef WINDOW_NAME_BUF_LEN +} + +static void +log_window_info(WindowPtr pWin, int depth) +{ + int i; + const char *win_name, *visibility; + BoxPtr rects; + ScreenPtr pScreen = pWin->drawable.pScreen; + + for (i = 0; i < (depth << 2); i++) + ErrorF(" "); + + win_name = get_window_name(pWin); + ErrorF("win 0x%.8x (%s), [%d, %d] to [%d, %d]", + pWin->drawable.id, + win_name ? win_name : "no name", + pWin->drawable.x, pWin->drawable.y, + pWin->drawable.x + pWin->drawable.width, + pWin->drawable.y + pWin->drawable.height); + + if (pWin->overrideRedirect) + ErrorF(" (override redirect)"); +#ifdef COMPOSITE + if (pWin->redirectDraw) + ErrorF(" (%s compositing: pixmap %x)", + (pWin->redirectDraw == RedirectDrawAutomatic) ? + "automatic" : "manual", + pScreen->GetWindowPixmap(pWin)->drawable.id); +#endif + + switch (pWin->visibility) { + case VisibilityUnobscured: + visibility = "unobscured"; + break; + case VisibilityPartiallyObscured: + visibility = "partially obscured"; + break; + case VisibilityFullyObscured: + visibility = "fully obscured"; + break; + case VisibilityNotViewable: + visibility = "unviewable"; + break; + } + ErrorF(", %s", visibility); + + if (REGION_NOTEMPTY(pScreen, &pWin->clipList)) { + ErrorF(", clip list:"); + rects = REGION_RECTS(&pWin->clipList); + for (i = 0; i < REGION_NUM_RECTS(&pWin->clipList); i++) + ErrorF(" [(%d, %d) to (%d, %d)]", + rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); + ErrorF("; extents [(%d, %d) to (%d, %d)]", + pWin->clipList.extents.x1, pWin->clipList.extents.y1, + pWin->clipList.extents.x2, pWin->clipList.extents.y2); + } + + ErrorF("\n"); +} + +void +PrintWindowTree(void) +{ + int scrnum, depth; + ScreenPtr pScreen; + WindowPtr pWin; + + for (scrnum = 0; scrnum < screenInfo.numScreens; scrnum++) { + pScreen = screenInfo.screens[scrnum]; + ErrorF("[dix] Dumping windows for screen %d (pixmap %x):\n", scrnum, + pScreen->GetScreenPixmap(pScreen)->drawable.id); + pWin = pScreen->root; + depth = 1; + while (pWin) { + log_window_info(pWin, depth); + if (pWin->firstChild) { + pWin = pWin->firstChild; + depth++; + continue; + } + while (pWin && !pWin->nextSib) { + pWin = pWin->parent; + depth--; + } + if (!pWin) + break; + pWin = pWin->nextSib; + } + } +} + +int +TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) +{ + int result; + WindowPtr pChild; + + if (!(pChild = pWin)) + return WT_NOMATCH; + while (1) { + result = (*func) (pChild, data); + if (result == WT_STOPWALKING) + return WT_STOPWALKING; + if ((result == WT_WALKCHILDREN) && pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } + return WT_NOMATCH; +} + +/***** + * WalkTree + * Walk the window tree, for SCREEN, preforming FUNC(pWin, data) on + * each window. If FUNC returns WT_WALKCHILDREN, traverse the children, + * if it returns WT_DONTWALKCHILDREN, dont. If it returns WT_STOPWALKING + * exit WalkTree. Does depth-first traverse. + *****/ + +int +WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data) +{ + return (TraverseTree(pScreen->root, func, data)); +} + +/* hack for forcing backing store on all windows */ +int defaultBackingStore = NotUseful; + +/* hack to force no backing store */ +Bool disableBackingStore = FALSE; +Bool enableBackingStore = FALSE; + +static void +SetWindowToDefaults(WindowPtr pWin) +{ + pWin->prevSib = NullWindow; + pWin->firstChild = NullWindow; + pWin->lastChild = NullWindow; + + pWin->valdata = (ValidatePtr) NULL; + pWin->optional = (WindowOptPtr) NULL; + pWin->cursorIsNone = TRUE; + + pWin->backingStore = NotUseful; + pWin->DIXsaveUnder = FALSE; + pWin->backStorage = (pointer) NULL; + + pWin->mapped = FALSE; /* off */ + pWin->realized = FALSE; /* off */ + pWin->viewable = FALSE; + pWin->visibility = VisibilityNotViewable; + pWin->overrideRedirect = FALSE; + pWin->saveUnder = FALSE; + + pWin->bitGravity = ForgetGravity; + pWin->winGravity = NorthWestGravity; + + pWin->eventMask = 0; + pWin->deliverableEvents = 0; + pWin->dontPropagate = 0; + pWin->forcedBS = FALSE; + pWin->redirectDraw = RedirectDrawNone; + pWin->forcedBG = FALSE; + +#ifdef ROOTLESS + pWin->rootlessUnhittable = FALSE; +#endif + +#ifdef COMPOSITE + pWin->damagedDescendants = FALSE; +#endif +} + +static void +MakeRootTile(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + GCPtr pGC; + unsigned char back[128]; + int len = BitmapBytePad(sizeof(long)); + unsigned char *from, *to; + int i, j; + + pWin->background.pixmap = (*pScreen->CreatePixmap) (pScreen, 4, 4, + pScreen->rootDepth, 0); + + pWin->backgroundState = BackgroundPixmap; + pGC = GetScratchGC(pScreen->rootDepth, pScreen); + if (!pWin->background.pixmap || !pGC) + FatalError("could not create root tile"); + + { + ChangeGCVal attributes[2]; + + attributes[0].val = pScreen->whitePixel; + attributes[1].val = pScreen->blackPixel; + + (void) ChangeGC(NullClient, pGC, GCForeground | GCBackground, + attributes); + } + + ValidateGC((DrawablePtr) pWin->background.pixmap, pGC); + + from = (screenInfo.bitmapBitOrder == LSBFirst) ? _back_lsb : _back_msb; + to = back; + + for (i = 4; i > 0; i--, from++) + for (j = len; j > 0; j--) + *to++ = *from; + + (*pGC->ops->PutImage) ((DrawablePtr) pWin->background.pixmap, pGC, 1, + 0, 0, len, 4, 0, XYBitmap, (char *) back); + + FreeScratchGC(pGC); + +} + +/***** + * CreateRootWindow + * Makes a window at initialization time for specified screen + *****/ + +Bool +CreateRootWindow(ScreenPtr pScreen) +{ + WindowPtr pWin; + BoxRec box; + PixmapFormatRec *format; + + pWin = dixAllocateScreenObjectWithPrivates(pScreen, WindowRec, PRIVATE_WINDOW); + if (!pWin) + return FALSE; + + pScreen->screensaver.pWindow = NULL; + pScreen->screensaver.wid = FakeClientID(0); + pScreen->screensaver.ExternalScreenSaver = NULL; + screenIsSaved = SCREEN_SAVER_OFF; + + pScreen->root = pWin; + + pWin->drawable.pScreen = pScreen; + pWin->drawable.type = DRAWABLE_WINDOW; + + pWin->drawable.depth = pScreen->rootDepth; + for (format = screenInfo.formats; + format->depth != pScreen->rootDepth; format++); + pWin->drawable.bitsPerPixel = format->bitsPerPixel; + + pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + pWin->parent = NullWindow; + SetWindowToDefaults(pWin); + + pWin->optional = malloc(sizeof(WindowOptRec)); + if (!pWin->optional) + return FALSE; + + pWin->optional->dontPropagateMask = 0; + pWin->optional->otherEventMasks = 0; + pWin->optional->otherClients = NULL; + pWin->optional->passiveGrabs = NULL; + pWin->optional->userProps = NULL; + pWin->optional->backingBitPlanes = ~0L; + pWin->optional->backingPixel = 0; + pWin->optional->boundingShape = NULL; + pWin->optional->clipShape = NULL; + pWin->optional->inputShape = NULL; + pWin->optional->inputMasks = NULL; + pWin->optional->deviceCursors = NULL; + pWin->optional->colormap = pScreen->defColormap; + pWin->optional->visual = pScreen->rootVisual; + + pWin->nextSib = NullWindow; + + pWin->drawable.id = FakeClientID(0); + + pWin->origin.x = pWin->origin.y = 0; + pWin->drawable.height = pScreen->height; + pWin->drawable.width = pScreen->width; + pWin->drawable.x = pWin->drawable.y = 0; + + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + RegionInit(&pWin->clipList, &box, 1); + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); + RegionInit(&pWin->borderClip, &box, 1); + + pWin->drawable.class = InputOutput; + pWin->optional->visual = pScreen->rootVisual; + + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = pScreen->whitePixel; + + pWin->borderIsPixel = TRUE; + pWin->border.pixel = pScreen->blackPixel; + pWin->borderWidth = 0; + + /* security creation/labeling check + */ + if (XaceHook(XACE_RESOURCE_ACCESS, serverClient, pWin->drawable.id, + RT_WINDOW, pWin, RT_NONE, NULL, DixCreateAccess)) + return FALSE; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer) pWin)) + return FALSE; + + if (disableBackingStore) + pScreen->backingStoreSupport = NotUseful; + if (enableBackingStore) + pScreen->backingStoreSupport = WhenMapped; +#ifdef COMPOSITE + if (noCompositeExtension) + pScreen->backingStoreSupport = NotUseful; +#endif + + pScreen->saveUnderSupport = NotUseful; + + return TRUE; +} + +void +InitRootWindow(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + int backFlag = CWBorderPixel | CWCursor | CWBackingStore; + + if (!(*pScreen->CreateWindow) (pWin)) + return; /* XXX */ + (*pScreen->PositionWindow) (pWin, 0, 0); + + pWin->cursorIsNone = FALSE; + pWin->optional->cursor = RefCursor(rootCursor); + + if (party_like_its_1989) { + MakeRootTile(pWin); + backFlag |= CWBackPixmap; + } + else if (pScreen->canDoBGNoneRoot && bgNoneRoot) { + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; + backFlag |= CWBackPixmap; + } + else { + pWin->backgroundState = BackgroundPixel; + if (whiteRoot) + pWin->background.pixel = pScreen->whitePixel; + else + pWin->background.pixel = pScreen->blackPixel; + backFlag |= CWBackPixel; + } + + pWin->backingStore = defaultBackingStore; + pWin->forcedBS = (defaultBackingStore != NotUseful); + /* We SHOULD check for an error value here XXX */ + (*pScreen->ChangeWindowAttributes) (pWin, backFlag); + + MapWindow(pWin, serverClient); +} + +/* Set the region to the intersection of the rectangle and the + * window's winSize. The window is typically the parent of the + * window from which the region came. + */ + +static void +ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn, int x, int y, int w, int h) +{ + BoxRec box = *RegionExtents(&pWin->winSize); + + /* we do these calculations to avoid overflows */ + if (x > box.x1) + box.x1 = x; + if (y > box.y1) + box.y1 = y; + x += w; + if (x < box.x2) + box.x2 = x; + y += h; + if (y < box.y2) + box.y2 = y; + if (box.x1 > box.x2) + box.x2 = box.x1; + if (box.y1 > box.y2) + box.y2 = box.y1; + RegionReset(Rgn, &box); + RegionIntersect(Rgn, Rgn, &pWin->winSize); +} + +static RealChildHeadProc realChildHeadProc = NULL; + +void +RegisterRealChildHeadProc(RealChildHeadProc proc) +{ + realChildHeadProc = proc; +} + +WindowPtr +RealChildHead(WindowPtr pWin) +{ + if (realChildHeadProc) { + return realChildHeadProc(pWin); + } + + if (!pWin->parent && + (screenIsSaved == SCREEN_SAVER_ON) && + (HasSaverWindow(pWin->drawable.pScreen))) + return pWin->firstChild; + else + return NullWindow; +} + +/***** + * CreateWindow + * Makes a window in response to client request + *****/ + +WindowPtr +CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, + unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist, + int depth, ClientPtr client, VisualID visual, int *error) +{ + WindowPtr pWin; + WindowPtr pHead; + ScreenPtr pScreen; + int idepth, ivisual; + Bool fOK; + DepthPtr pDepth; + PixmapFormatRec *format; + WindowOptPtr ancwopt; + + if (class == CopyFromParent) + class = pParent->drawable.class; + + if ((class != InputOutput) && (class != InputOnly)) { + *error = BadValue; + client->errorValue = class; + return NullWindow; + } + + if ((class != InputOnly) && (pParent->drawable.class == InputOnly)) { + *error = BadMatch; + return NullWindow; + } + + if ((class == InputOnly) && ((bw != 0) || (depth != 0))) { + *error = BadMatch; + return NullWindow; + } + + pScreen = pParent->drawable.pScreen; + if ((class == InputOutput) && (depth == 0)) + depth = pParent->drawable.depth; + ancwopt = pParent->optional; + if (!ancwopt) + ancwopt = FindWindowWithOptional(pParent)->optional; + if (visual == CopyFromParent) { + visual = ancwopt->visual; + } + + /* Find out if the depth and visual are acceptable for this Screen */ + if ((visual != ancwopt->visual) || (depth != pParent->drawable.depth)) { + fOK = FALSE; + for (idepth = 0; idepth < pScreen->numDepths; idepth++) { + pDepth = (DepthPtr) &pScreen->allowedDepths[idepth]; + if ((depth == pDepth->depth) || (depth == 0)) { + for (ivisual = 0; ivisual < pDepth->numVids; ivisual++) { + if (visual == pDepth->vids[ivisual]) { + fOK = TRUE; + break; + } + } + } + } + if (fOK == FALSE) { + *error = BadMatch; + return NullWindow; + } + } + + if (((vmask & (CWBorderPixmap | CWBorderPixel)) == 0) && + (class != InputOnly) && (depth != pParent->drawable.depth)) { + *error = BadMatch; + return NullWindow; + } + + if (((vmask & CWColormap) == 0) && + (class != InputOnly) && + ((visual != ancwopt->visual) || (ancwopt->colormap == None))) { + *error = BadMatch; + return NullWindow; + } + + pWin = dixAllocateScreenObjectWithPrivates(pScreen, WindowRec, PRIVATE_WINDOW); + if (!pWin) { + *error = BadAlloc; + return NullWindow; + } + pWin->drawable = pParent->drawable; + pWin->drawable.depth = depth; + if (depth == pParent->drawable.depth) + pWin->drawable.bitsPerPixel = pParent->drawable.bitsPerPixel; + else { + for (format = screenInfo.formats; format->depth != depth; format++); + pWin->drawable.bitsPerPixel = format->bitsPerPixel; + } + if (class == InputOnly) + pWin->drawable.type = (short) UNDRAWABLE_WINDOW; + pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + pWin->drawable.id = wid; + pWin->drawable.class = class; + + pWin->parent = pParent; + SetWindowToDefaults(pWin); + + if (visual != ancwopt->visual) { + if (!MakeWindowOptional(pWin)) { + dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); + *error = BadAlloc; + return NullWindow; + } + pWin->optional->visual = visual; + pWin->optional->colormap = None; + } + + pWin->borderWidth = bw; + + /* security creation/labeling check + */ + *error = XaceHook(XACE_RESOURCE_ACCESS, client, wid, RT_WINDOW, pWin, + RT_WINDOW, pWin->parent, + DixCreateAccess | DixSetAttrAccess); + if (*error != Success) { + dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); + return NullWindow; + } + + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; + + pWin->borderIsPixel = pParent->borderIsPixel; + pWin->border = pParent->border; + if (pWin->borderIsPixel == FALSE) + pWin->border.pixmap->refcnt++; + + pWin->origin.x = x + (int) bw; + pWin->origin.y = y + (int) bw; + pWin->drawable.width = w; + pWin->drawable.height = h; + pWin->drawable.x = pParent->drawable.x + x + (int) bw; + pWin->drawable.y = pParent->drawable.y + y + (int) bw; + + /* set up clip list correctly for unobscured WindowPtr */ + RegionNull(&pWin->clipList); + RegionNull(&pWin->borderClip); + RegionNull(&pWin->winSize); + RegionNull(&pWin->borderSize); + + pHead = RealChildHead(pParent); + if (pHead) { + pWin->nextSib = pHead->nextSib; + if (pHead->nextSib) + pHead->nextSib->prevSib = pWin; + else + pParent->lastChild = pWin; + pHead->nextSib = pWin; + pWin->prevSib = pHead; + } + else { + pWin->nextSib = pParent->firstChild; + if (pParent->firstChild) + pParent->firstChild->prevSib = pWin; + else + pParent->lastChild = pWin; + pParent->firstChild = pWin; + } + + SetWinSize(pWin); + SetBorderSize(pWin); + + /* We SHOULD check for an error value here XXX */ + if (!(*pScreen->CreateWindow) (pWin)) { + *error = BadAlloc; + DeleteWindow(pWin, None); + return NullWindow; + } + /* We SHOULD check for an error value here XXX */ + (*pScreen->PositionWindow) (pWin, pWin->drawable.x, pWin->drawable.y); + + if (!(vmask & CWEventMask)) + RecalculateDeliverableEvents(pWin); + + if (vmask) + *error = ChangeWindowAttributes(pWin, vmask, vlist, wClient(pWin)); + else + *error = Success; + + if (*error != Success) { + DeleteWindow(pWin, None); + return NullWindow; + } + if (!(vmask & CWBackingStore) && (defaultBackingStore != NotUseful)) { + XID value = defaultBackingStore; + + (void) ChangeWindowAttributes(pWin, CWBackingStore, &value, + wClient(pWin)); + pWin->forcedBS = TRUE; + } + + if (SubSend(pParent)) { + xEvent event = { + .u.createNotify.window = wid, + .u.createNotify.parent = pParent->drawable.id, + .u.createNotify.x = x, + .u.createNotify.y = y, + .u.createNotify.width = w, + .u.createNotify.height = h, + .u.createNotify.borderWidth = bw, + .u.createNotify.override = pWin->overrideRedirect + }; + event.u.u.type = CreateNotify; + DeliverEvents(pParent, &event, 1, NullWindow); + } + return pWin; +} + +static void +DisposeWindowOptional(WindowPtr pWin) +{ + if (!pWin->optional) + return; + /* + * everything is peachy. Delete the optional record + * and clean up + */ + if (pWin->optional->cursor) { + FreeCursor(pWin->optional->cursor, (Cursor) 0); + pWin->cursorIsNone = FALSE; + } + else + pWin->cursorIsNone = TRUE; + + if (pWin->optional->deviceCursors) { + DevCursorList pList; + DevCursorList pPrev; + + pList = pWin->optional->deviceCursors; + while (pList) { + if (pList->cursor) + FreeCursor(pList->cursor, (XID) 0); + pPrev = pList; + pList = pList->next; + free(pPrev); + } + pWin->optional->deviceCursors = NULL; + } + + free(pWin->optional); + pWin->optional = NULL; +} + +static void +FreeWindowResources(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DeleteWindowFromAnySaveSet(pWin); + DeleteWindowFromAnySelections(pWin); + DeleteWindowFromAnyEvents(pWin, TRUE); + RegionUninit(&pWin->clipList); + RegionUninit(&pWin->winSize); + RegionUninit(&pWin->borderClip); + RegionUninit(&pWin->borderSize); + if (wBoundingShape(pWin)) + RegionDestroy(wBoundingShape(pWin)); + if (wClipShape(pWin)) + RegionDestroy(wClipShape(pWin)); + if (wInputShape(pWin)) + RegionDestroy(wInputShape(pWin)); + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap) (pWin->border.pixmap); + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap) (pWin->background.pixmap); + + DeleteAllWindowProperties(pWin); + /* We SHOULD check for an error value here XXX */ + (*pScreen->DestroyWindow) (pWin); + DisposeWindowOptional(pWin); +} + +static void +CrushTree(WindowPtr pWin) +{ + WindowPtr pChild, pSib, pParent; + UnrealizeWindowProcPtr UnrealizeWindow; + + if (!(pChild = pWin->firstChild)) + return; + UnrealizeWindow = pWin->drawable.pScreen->UnrealizeWindow; + while (1) { + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + while (1) { + pParent = pChild->parent; + if (SubStrSend(pChild, pParent)) { + xEvent event = { .u.u.type = DestroyNotify }; + event.u.destroyNotify.window = pChild->drawable.id; + DeliverEvents(pChild, &event, 1, NullWindow); + } + FreeResource(pChild->drawable.id, RT_WINDOW); + pSib = pChild->nextSib; + pChild->viewable = FALSE; + if (pChild->realized) { + pChild->realized = FALSE; + (*UnrealizeWindow) (pChild); + } + FreeWindowResources(pChild); + dixFreeObjectWithPrivates(pChild, PRIVATE_WINDOW); + if ((pChild = pSib)) + break; + pChild = pParent; + pChild->firstChild = NullWindow; + pChild->lastChild = NullWindow; + if (pChild == pWin) + return; + } + } +} + +/***** + * DeleteWindow + * Deletes child of window then window itself + * If wid is None, don't send any events + *****/ + +int +DeleteWindow(pointer value, XID wid) +{ + WindowPtr pParent; + WindowPtr pWin = (WindowPtr) value; + + UnmapWindow(pWin, FALSE); + + CrushTree(pWin); + + pParent = pWin->parent; + if (wid && pParent && SubStrSend(pWin, pParent)) { + xEvent event = { .u.u.type = DestroyNotify }; + event.u.destroyNotify.window = pWin->drawable.id; + DeliverEvents(pWin, &event, 1, NullWindow); + } + + FreeWindowResources(pWin); + if (pParent) { + if (pParent->firstChild == pWin) + pParent->firstChild = pWin->nextSib; + if (pParent->lastChild == pWin) + pParent->lastChild = pWin->prevSib; + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + } + else + pWin->drawable.pScreen->root = NULL; + dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); + return Success; +} + +int +DestroySubwindows(WindowPtr pWin, ClientPtr client) +{ + /* XXX + * The protocol is quite clear that each window should be + * destroyed in turn, however, unmapping all of the first + * eliminates most of the calls to ValidateTree. So, + * this implementation is incorrect in that all of the + * UnmapNotifies occur before all of the DestroyNotifies. + * If you care, simply delete the call to UnmapSubwindows. + */ + UnmapSubwindows(pWin); + while (pWin->lastChild) { + int rc = XaceHook(XACE_RESOURCE_ACCESS, client, + pWin->lastChild->drawable.id, RT_WINDOW, + pWin->lastChild, RT_NONE, NULL, DixDestroyAccess); + + if (rc != Success) + return rc; + FreeResource(pWin->lastChild->drawable.id, RT_NONE); + } + return Success; +} + +static void +SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2) +{ + /* following the protocol: "Changing the background of a root window to + * None or ParentRelative restores the default background pixmap" */ + if (bgNoneRoot) { + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; + } + else if (party_like_its_1989) + MakeRootTile(pWin); + else { + pWin->backgroundState = BackgroundPixel; + if (whiteRoot) + pWin->background.pixel = pScreen->whitePixel; + else + pWin->background.pixel = pScreen->blackPixel; + *index2 = CWBackPixel; + } +} + +/***** + * ChangeWindowAttributes + * + * The value-mask specifies which attributes are to be changed; the + * value-list contains one value for each one bit in the mask, from least + * to most significant bit in the mask. + *****/ + +int +ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) +{ + XID *pVlist; + PixmapPtr pPixmap; + Pixmap pixID; + CursorPtr pCursor, pOldCursor; + Cursor cursorID; + WindowPtr pChild; + Colormap cmap; + ColormapPtr pCmap; + xEvent xE; + int error, rc; + ScreenPtr pScreen; + Mask index2, tmask, vmaskCopy = 0; + unsigned int val; + Bool checkOptional = FALSE, borderRelative = FALSE; + + if ((pWin->drawable.class == InputOnly) && + (vmask & (~INPUTONLY_LEGAL_MASK))) + return BadMatch; + + error = Success; + pScreen = pWin->drawable.pScreen; + pVlist = vlist; + tmask = vmask; + while (tmask) { + index2 = (Mask) lowbit(tmask); + tmask &= ~index2; + switch (index2) { + case CWBackPixmap: + pixID = (Pixmap) * pVlist; + pVlist++; + if (pWin->backgroundState == ParentRelative) + borderRelative = TRUE; + if (pixID == None) { + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap) (pWin->background.pixmap); + if (!pWin->parent) + SetRootWindowBackground(pWin, pScreen, &index2); + else { + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; + } + } + else if (pixID == ParentRelative) { + if (pWin->parent && + pWin->drawable.depth != pWin->parent->drawable.depth) { + error = BadMatch; + goto PatchUp; + } + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap) (pWin->background.pixmap); + if (!pWin->parent) + SetRootWindowBackground(pWin, pScreen, &index2); + else + pWin->backgroundState = ParentRelative; + borderRelative = TRUE; + /* Note that the parent's backgroundTile's refcnt is NOT + * incremented. */ + } + else { + rc = dixLookupResourceByType((pointer *) &pPixmap, pixID, + RT_PIXMAP, client, DixReadAccess); + if (rc == Success) { + if ((pPixmap->drawable.depth != pWin->drawable.depth) || + (pPixmap->drawable.pScreen != pScreen)) { + error = BadMatch; + goto PatchUp; + } + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap) (pWin->background.pixmap); + pWin->backgroundState = BackgroundPixmap; + pWin->background.pixmap = pPixmap; + pPixmap->refcnt++; + } + else { + error = rc; + client->errorValue = pixID; + goto PatchUp; + } + } + break; + case CWBackPixel: + if (pWin->backgroundState == ParentRelative) + borderRelative = TRUE; + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap) (pWin->background.pixmap); + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = (CARD32) *pVlist; + /* background pixel overrides background pixmap, + so don't let the ddx layer see both bits */ + vmaskCopy &= ~CWBackPixmap; + pVlist++; + break; + case CWBorderPixmap: + pixID = (Pixmap) * pVlist; + pVlist++; + if (pixID == CopyFromParent) { + if (!pWin->parent || + (pWin->drawable.depth != pWin->parent->drawable.depth)) { + error = BadMatch; + goto PatchUp; + } + if (pWin->parent->borderIsPixel == TRUE) { + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap) (pWin->border.pixmap); + pWin->border = pWin->parent->border; + pWin->borderIsPixel = TRUE; + index2 = CWBorderPixel; + break; + } + else { + pixID = pWin->parent->border.pixmap->drawable.id; + } + } + rc = dixLookupResourceByType((pointer *) &pPixmap, pixID, RT_PIXMAP, + client, DixReadAccess); + if (rc == Success) { + if ((pPixmap->drawable.depth != pWin->drawable.depth) || + (pPixmap->drawable.pScreen != pScreen)) { + error = BadMatch; + goto PatchUp; + } + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap) (pWin->border.pixmap); + pWin->borderIsPixel = FALSE; + pWin->border.pixmap = pPixmap; + pPixmap->refcnt++; + } + else { + error = rc; + client->errorValue = pixID; + goto PatchUp; + } + break; + case CWBorderPixel: + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap) (pWin->border.pixmap); + pWin->borderIsPixel = TRUE; + pWin->border.pixel = (CARD32) *pVlist; + /* border pixel overrides border pixmap, + so don't let the ddx layer see both bits */ + vmaskCopy &= ~CWBorderPixmap; + pVlist++; + break; + case CWBitGravity: + val = (CARD8) *pVlist; + pVlist++; + if (val > StaticGravity) { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->bitGravity = val; + break; + case CWWinGravity: + val = (CARD8) *pVlist; + pVlist++; + if (val > StaticGravity) { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->winGravity = val; + break; + case CWBackingStore: + val = (CARD8) *pVlist; + pVlist++; + if ((val != NotUseful) && (val != WhenMapped) && (val != Always)) { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->backingStore = val; + pWin->forcedBS = FALSE; + break; + case CWBackingPlanes: + if (pWin->optional || ((CARD32) *pVlist != (CARD32) ~0L)) { + if (!pWin->optional && !MakeWindowOptional(pWin)) { + error = BadAlloc; + goto PatchUp; + } + pWin->optional->backingBitPlanes = (CARD32) *pVlist; + if ((CARD32) *pVlist == (CARD32) ~0L) + checkOptional = TRUE; + } + pVlist++; + break; + case CWBackingPixel: + if (pWin->optional || (CARD32) *pVlist) { + if (!pWin->optional && !MakeWindowOptional(pWin)) { + error = BadAlloc; + goto PatchUp; + } + pWin->optional->backingPixel = (CARD32) *pVlist; + if (!*pVlist) + checkOptional = TRUE; + } + pVlist++; + break; + case CWSaveUnder: + val = (BOOL) * pVlist; + pVlist++; + if ((val != xTrue) && (val != xFalse)) { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + pWin->saveUnder = val; + break; + case CWEventMask: + rc = EventSelectForWindow(pWin, client, (Mask) *pVlist); + if (rc) { + error = rc; + goto PatchUp; + } + pVlist++; + break; + case CWDontPropagate: + rc = EventSuppressForWindow(pWin, client, (Mask) *pVlist, + &checkOptional); + if (rc) { + error = rc; + goto PatchUp; + } + pVlist++; + break; + case CWOverrideRedirect: + val = (BOOL) * pVlist; + pVlist++; + if ((val != xTrue) && (val != xFalse)) { + error = BadValue; + client->errorValue = val; + goto PatchUp; + } + if (val == xTrue) { + rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, + RT_WINDOW, pWin, RT_NONE, NULL, DixGrabAccess); + if (rc != Success) { + error = rc; + client->errorValue = pWin->drawable.id; + goto PatchUp; + } + } + pWin->overrideRedirect = val; + break; + case CWColormap: + cmap = (Colormap) * pVlist; + pVlist++; + if (cmap == CopyFromParent) { + if (pWin->parent && + (!pWin->optional || + pWin->optional->visual == wVisual(pWin->parent))) { + cmap = wColormap(pWin->parent); + } + else + cmap = None; + } + if (cmap == None) { + error = BadMatch; + goto PatchUp; + } + rc = dixLookupResourceByType((pointer *) &pCmap, cmap, RT_COLORMAP, + client, DixUseAccess); + if (rc != Success) { + error = rc; + client->errorValue = cmap; + goto PatchUp; + } + if (pCmap->pVisual->vid != wVisual(pWin) || + pCmap->pScreen != pScreen) { + error = BadMatch; + goto PatchUp; + } + if (cmap != wColormap(pWin)) { + if (!pWin->optional) { + if (!MakeWindowOptional(pWin)) { + error = BadAlloc; + goto PatchUp; + } + } + else if (pWin->parent && cmap == wColormap(pWin->parent)) + checkOptional = TRUE; + + /* + * propagate the original colormap to any children + * inheriting it + */ + + for (pChild = pWin->firstChild; pChild; + pChild = pChild->nextSib) { + if (!pChild->optional && !MakeWindowOptional(pChild)) { + error = BadAlloc; + goto PatchUp; + } + } + + pWin->optional->colormap = cmap; + + /* + * check on any children now matching the new colormap + */ + + for (pChild = pWin->firstChild; pChild; + pChild = pChild->nextSib) { + if (pChild->optional->colormap == cmap) + CheckWindowOptionalNeed(pChild); + } + + xE = (xEvent) { + .u.colormap.window = pWin->drawable.id, + .u.colormap.colormap = cmap, + .u.colormap.new = xTrue, + .u.colormap.state = IsMapInstalled(cmap, pWin) + }; + xE.u.u.type = ColormapNotify; + DeliverEvents(pWin, &xE, 1, NullWindow); + } + break; + case CWCursor: + cursorID = (Cursor) * pVlist; + pVlist++; + /* + * install the new + */ + if (cursorID == None) { + if (pWin == pWin->drawable.pScreen->root) + pCursor = rootCursor; + else + pCursor = (CursorPtr) None; + } + else { + rc = dixLookupResourceByType((pointer *) &pCursor, cursorID, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) { + error = rc; + client->errorValue = cursorID; + goto PatchUp; + } + } + + if (pCursor != wCursor(pWin)) { + /* + * patch up child windows so they don't lose cursors. + */ + + for (pChild = pWin->firstChild; pChild; + pChild = pChild->nextSib) { + if (!pChild->optional && !pChild->cursorIsNone && + !MakeWindowOptional(pChild)) { + error = BadAlloc; + goto PatchUp; + } + } + + pOldCursor = 0; + if (pCursor == (CursorPtr) None) { + pWin->cursorIsNone = TRUE; + if (pWin->optional) { + pOldCursor = pWin->optional->cursor; + pWin->optional->cursor = (CursorPtr) None; + checkOptional = TRUE; + } + } + else { + if (!pWin->optional) { + if (!MakeWindowOptional(pWin)) { + error = BadAlloc; + goto PatchUp; + } + } + else if (pWin->parent && pCursor == wCursor(pWin->parent)) + checkOptional = TRUE; + pOldCursor = pWin->optional->cursor; + pWin->optional->cursor = RefCursor(pCursor); + pWin->cursorIsNone = FALSE; + /* + * check on any children now matching the new cursor + */ + + for (pChild = pWin->firstChild; pChild; + pChild = pChild->nextSib) { + if (pChild->optional && + (pChild->optional->cursor == pCursor)) + CheckWindowOptionalNeed(pChild); + } + } + + CursorVisible = TRUE; + + if (pWin->realized) + WindowHasNewCursor(pWin); + + /* Can't free cursor until here - old cursor + * is needed in WindowHasNewCursor + */ + if (pOldCursor) + FreeCursor(pOldCursor, (Cursor) 0); + } + break; + default: + error = BadValue; + client->errorValue = vmask; + goto PatchUp; + } + vmaskCopy |= index2; + } + PatchUp: + if (checkOptional) + CheckWindowOptionalNeed(pWin); + + /* We SHOULD check for an error value here XXX */ + (*pScreen->ChangeWindowAttributes) (pWin, vmaskCopy); + + /* + If the border contents have changed, redraw the border. + Note that this has to be done AFTER pScreen->ChangeWindowAttributes + for the tile to be rotated, and the correct function selected. + */ + if (((vmaskCopy & (CWBorderPixel | CWBorderPixmap)) || borderRelative) + && pWin->viewable && HasBorder(pWin)) { + RegionRec exposed; + + RegionNull(&exposed); + RegionSubtract(&exposed, &pWin->borderClip, &pWin->winSize); + miPaintWindow(pWin, &exposed, PW_BORDER); + RegionUninit(&exposed); + } + return error; +} + +/***** + * GetWindowAttributes + * Notice that this is different than ChangeWindowAttributes + *****/ + +void +GetWindowAttributes(WindowPtr pWin, ClientPtr client, + xGetWindowAttributesReply * wa) +{ + wa->type = X_Reply; + wa->bitGravity = pWin->bitGravity; + wa->winGravity = pWin->winGravity; + if (pWin->forcedBS && pWin->backingStore != Always) + wa->backingStore = NotUseful; + else + wa->backingStore = pWin->backingStore; + wa->length = bytes_to_int32(sizeof(xGetWindowAttributesReply) - + sizeof(xGenericReply)); + wa->sequenceNumber = client->sequence; + wa->backingBitPlanes = wBackingBitPlanes(pWin); + wa->backingPixel = wBackingPixel(pWin); + wa->saveUnder = (BOOL) pWin->saveUnder; + wa->override = pWin->overrideRedirect; + if (!pWin->mapped) + wa->mapState = IsUnmapped; + else if (pWin->realized) + wa->mapState = IsViewable; + else + wa->mapState = IsUnviewable; + + wa->colormap = wColormap(pWin); + wa->mapInstalled = (wa->colormap == None) ? xFalse + : IsMapInstalled(wa->colormap, pWin); + + wa->yourEventMask = EventMaskForClient(pWin, client); + wa->allEventMasks = pWin->eventMask | wOtherEventMasks(pWin); + wa->doNotPropagateMask = wDontPropagateMask(pWin); + wa->class = pWin->drawable.class; + wa->visualID = wVisual(pWin); +} + +WindowPtr +MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) +{ + WindowPtr pParent = pWin->parent; + WindowPtr pFirstChange = pWin; /* highest window where list changes */ + + if (pWin->nextSib != pNextSib) { + WindowPtr pOldNextSib = pWin->nextSib; + + if (!pNextSib) { /* move to bottom */ + if (pParent->firstChild == pWin) + pParent->firstChild = pWin->nextSib; + /* if (pWin->nextSib) *//* is always True: pNextSib == NULL + * and pWin->nextSib != pNextSib + * therefore pWin->nextSib != NULL */ + pFirstChange = pWin->nextSib; + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + pParent->lastChild->nextSib = pWin; + pWin->prevSib = pParent->lastChild; + pWin->nextSib = NullWindow; + pParent->lastChild = pWin; + } + else if (pParent->firstChild == pNextSib) { /* move to top */ + pFirstChange = pWin; + if (pParent->lastChild == pWin) + pParent->lastChild = pWin->prevSib; + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + pWin->nextSib = pParent->firstChild; + pWin->prevSib = (WindowPtr) NULL; + pNextSib->prevSib = pWin; + pParent->firstChild = pWin; + } + else { /* move in middle of list */ + + WindowPtr pOldNext = pWin->nextSib; + + pFirstChange = NullWindow; + if (pParent->firstChild == pWin) + pFirstChange = pParent->firstChild = pWin->nextSib; + if (pParent->lastChild == pWin) { + pFirstChange = pWin; + pParent->lastChild = pWin->prevSib; + } + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + pWin->nextSib = pNextSib; + pWin->prevSib = pNextSib->prevSib; + if (pNextSib->prevSib) + pNextSib->prevSib->nextSib = pWin; + pNextSib->prevSib = pWin; + if (!pFirstChange) { /* do we know it yet? */ + pFirstChange = pParent->firstChild; /* no, search from top */ + while ((pFirstChange != pWin) && (pFirstChange != pOldNext)) + pFirstChange = pFirstChange->nextSib; + } + } + if (pWin->drawable.pScreen->RestackWindow) + (*pWin->drawable.pScreen->RestackWindow) (pWin, pOldNextSib); + } + +#ifdef ROOTLESS + /* + * In rootless mode we can't optimize away window restacks. + * There may be non-X windows around, so even if the window + * is in the correct position from X's point of view, + * the underlying window system may want to reorder it. + */ + else if (pWin->drawable.pScreen->RestackWindow) + (*pWin->drawable.pScreen->RestackWindow) (pWin, pWin->nextSib); +#endif + + return pFirstChange; +} + +void +SetWinSize(WindowPtr pWin) +{ +#ifdef COMPOSITE + if (pWin->redirectDraw != RedirectDrawNone) { + BoxRec box; + + /* + * Redirected clients get clip list equal to their + * own geometry, not clipped to their parent + */ + box.x1 = pWin->drawable.x; + box.y1 = pWin->drawable.y; + box.x2 = pWin->drawable.x + pWin->drawable.width; + box.y2 = pWin->drawable.y + pWin->drawable.height; + RegionReset(&pWin->winSize, &box); + } + else +#endif + ClippedRegionFromBox(pWin->parent, &pWin->winSize, + pWin->drawable.x, pWin->drawable.y, + (int) pWin->drawable.width, + (int) pWin->drawable.height); + if (wBoundingShape(pWin) || wClipShape(pWin)) { + RegionTranslate(&pWin->winSize, -pWin->drawable.x, -pWin->drawable.y); + if (wBoundingShape(pWin)) + RegionIntersect(&pWin->winSize, &pWin->winSize, + wBoundingShape(pWin)); + if (wClipShape(pWin)) + RegionIntersect(&pWin->winSize, &pWin->winSize, wClipShape(pWin)); + RegionTranslate(&pWin->winSize, pWin->drawable.x, pWin->drawable.y); + } +} + +void +SetBorderSize(WindowPtr pWin) +{ + int bw; + + if (HasBorder(pWin)) { + bw = wBorderWidth(pWin); +#ifdef COMPOSITE + if (pWin->redirectDraw != RedirectDrawNone) { + BoxRec box; + + /* + * Redirected clients get clip list equal to their + * own geometry, not clipped to their parent + */ + box.x1 = pWin->drawable.x - bw; + box.y1 = pWin->drawable.y - bw; + box.x2 = pWin->drawable.x + pWin->drawable.width + bw; + box.y2 = pWin->drawable.y + pWin->drawable.height + bw; + RegionReset(&pWin->borderSize, &box); + } + else +#endif + ClippedRegionFromBox(pWin->parent, &pWin->borderSize, + pWin->drawable.x - bw, pWin->drawable.y - bw, + (int) (pWin->drawable.width + (bw << 1)), + (int) (pWin->drawable.height + (bw << 1))); + if (wBoundingShape(pWin)) { + RegionTranslate(&pWin->borderSize, -pWin->drawable.x, + -pWin->drawable.y); + RegionIntersect(&pWin->borderSize, &pWin->borderSize, + wBoundingShape(pWin)); + RegionTranslate(&pWin->borderSize, pWin->drawable.x, + pWin->drawable.y); + RegionUnion(&pWin->borderSize, &pWin->borderSize, &pWin->winSize); + } + } + else { + RegionCopy(&pWin->borderSize, &pWin->winSize); + } +} + +/** + * + * \param x,y new window position + * \param oldx,oldy old window position + * \param destx,desty position relative to gravity + */ + +void +GravityTranslate(int x, int y, int oldx, int oldy, + int dw, int dh, unsigned gravity, int *destx, int *desty) +{ + switch (gravity) { + case NorthGravity: + *destx = x + dw / 2; + *desty = y; + break; + case NorthEastGravity: + *destx = x + dw; + *desty = y; + break; + case WestGravity: + *destx = x; + *desty = y + dh / 2; + break; + case CenterGravity: + *destx = x + dw / 2; + *desty = y + dh / 2; + break; + case EastGravity: + *destx = x + dw; + *desty = y + dh / 2; + break; + case SouthWestGravity: + *destx = x; + *desty = y + dh; + break; + case SouthGravity: + *destx = x + dw / 2; + *desty = y + dh; + break; + case SouthEastGravity: + *destx = x + dw; + *desty = y + dh; + break; + case StaticGravity: + *destx = oldx; + *desty = oldy; + break; + default: + *destx = x; + *desty = y; + break; + } +} + +/* XXX need to retile border on each window with ParentRelative origin */ +void +ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) +{ + ScreenPtr pScreen; + WindowPtr pSib, pChild; + Bool resized = (dw || dh); + + pScreen = pWin->drawable.pScreen; + + for (pSib = pWin->firstChild; pSib; pSib = pSib->nextSib) { + if (resized && (pSib->winGravity > NorthWestGravity)) { + int cwsx, cwsy; + + cwsx = pSib->origin.x; + cwsy = pSib->origin.y; + GravityTranslate(cwsx, cwsy, cwsx - dx, cwsy - dy, dw, dh, + pSib->winGravity, &cwsx, &cwsy); + if (cwsx != pSib->origin.x || cwsy != pSib->origin.y) { + xEvent event = { + .u.gravity.window = pSib->drawable.id, + .u.gravity.x = cwsx - wBorderWidth(pSib), + .u.gravity.y = cwsy - wBorderWidth(pSib) + }; + event.u.u.type = GravityNotify; + DeliverEvents(pSib, &event, 1, NullWindow); + pSib->origin.x = cwsx; + pSib->origin.y = cwsy; + } + } + pSib->drawable.x = pWin->drawable.x + pSib->origin.x; + pSib->drawable.y = pWin->drawable.y + pSib->origin.y; + SetWinSize(pSib); + SetBorderSize(pSib); + (*pScreen->PositionWindow) (pSib, pSib->drawable.x, pSib->drawable.y); + + if ((pChild = pSib->firstChild)) { + while (1) { + pChild->drawable.x = pChild->parent->drawable.x + + pChild->origin.x; + pChild->drawable.y = pChild->parent->drawable.y + + pChild->origin.y; + SetWinSize(pChild); + SetBorderSize(pChild); + (*pScreen->PositionWindow) (pChild, + pChild->drawable.x, + pChild->drawable.y); + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + while (!pChild->nextSib && (pChild != pSib)) + pChild = pChild->parent; + if (pChild == pSib) + break; + pChild = pChild->nextSib; + } + } + } +} + +#define GET_INT16(m, f) \ + if (m & mask) \ + { \ + f = (INT16) *pVlist;\ + pVlist++; \ + } +#define GET_CARD16(m, f) \ + if (m & mask) \ + { \ + f = (CARD16) *pVlist;\ + pVlist++;\ + } + +#define GET_CARD8(m, f) \ + if (m & mask) \ + { \ + f = (CARD8) *pVlist;\ + pVlist++;\ + } + +#define ChangeMask ((Mask)(CWX | CWY | CWWidth | CWHeight)) + +#define IllegalInputOnlyConfigureMask (CWBorderWidth) + +/* + * IsSiblingAboveMe + * returns Above if pSib above pMe in stack or Below otherwise + */ + +static int +IsSiblingAboveMe(WindowPtr pMe, WindowPtr pSib) +{ + WindowPtr pWin; + + pWin = pMe->parent->firstChild; + while (pWin) { + if (pWin == pSib) + return Above; + else if (pWin == pMe) + return Below; + pWin = pWin->nextSib; + } + return Below; +} + +static BoxPtr +WindowExtents(WindowPtr pWin, BoxPtr pBox) +{ + pBox->x1 = pWin->drawable.x - wBorderWidth(pWin); + pBox->y1 = pWin->drawable.y - wBorderWidth(pWin); + pBox->x2 = pWin->drawable.x + (int) pWin->drawable.width + + wBorderWidth(pWin); + pBox->y2 = pWin->drawable.y + (int) pWin->drawable.height + + wBorderWidth(pWin); + return pBox; +} + +#define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL) + +static RegionPtr +MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox) +{ + RegionPtr pRgn = RegionCreate(pBox, 1); + + if (wBoundingShape(pWin)) { + RegionTranslate(pRgn, -pWin->origin.x, -pWin->origin.y); + RegionIntersect(pRgn, pRgn, wBoundingShape(pWin)); + RegionTranslate(pRgn, pWin->origin.x, pWin->origin.y); + } + return pRgn; +} + +static Bool +ShapeOverlap(WindowPtr pWin, BoxPtr pWinBox, WindowPtr pSib, BoxPtr pSibBox) +{ + RegionPtr pWinRgn, pSibRgn; + Bool ret; + + if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib)) + return TRUE; + pWinRgn = MakeBoundingRegion(pWin, pWinBox); + pSibRgn = MakeBoundingRegion(pSib, pSibBox); + RegionIntersect(pWinRgn, pWinRgn, pSibRgn); + ret = RegionNotEmpty(pWinRgn); + RegionDestroy(pWinRgn); + RegionDestroy(pSibRgn); + return ret; +} + +static Bool +AnyWindowOverlapsMe(WindowPtr pWin, WindowPtr pHead, BoxPtr box) +{ + WindowPtr pSib; + BoxRec sboxrec; + BoxPtr sbox; + + for (pSib = pWin->prevSib; pSib != pHead; pSib = pSib->prevSib) { + if (pSib->mapped) { + sbox = WindowExtents(pSib, &sboxrec); + if (BOXES_OVERLAP(sbox, box) + && ShapeOverlap(pWin, box, pSib, sbox)) + return TRUE; + } + } + return FALSE; +} + +static Bool +IOverlapAnyWindow(WindowPtr pWin, BoxPtr box) +{ + WindowPtr pSib; + BoxRec sboxrec; + BoxPtr sbox; + + for (pSib = pWin->nextSib; pSib; pSib = pSib->nextSib) { + if (pSib->mapped) { + sbox = WindowExtents(pSib, &sboxrec); + if (BOXES_OVERLAP(sbox, box) + && ShapeOverlap(pWin, box, pSib, sbox)) + return TRUE; + } + } + return FALSE; +} + +/* + * WhereDoIGoInTheStack() + * Given pWin and pSib and the relationshipe smode, return + * the window that pWin should go ABOVE. + * If a pSib is specified: + * Above: pWin is placed just above pSib + * Below: pWin is placed just below pSib + * TopIf: if pSib occludes pWin, then pWin is placed + * at the top of the stack + * BottomIf: if pWin occludes pSib, then pWin is + * placed at the bottom of the stack + * Opposite: if pSib occludes pWin, then pWin is placed at the + * top of the stack, else if pWin occludes pSib, then + * pWin is placed at the bottom of the stack + * + * If pSib is NULL: + * Above: pWin is placed at the top of the stack + * Below: pWin is placed at the bottom of the stack + * TopIf: if any sibling occludes pWin, then pWin is placed at + * the top of the stack + * BottomIf: if pWin occludes any sibline, then pWin is placed at + * the bottom of the stack + * Opposite: if any sibling occludes pWin, then pWin is placed at + * the top of the stack, else if pWin occludes any + * sibling, then pWin is placed at the bottom of the stack + * + */ + +static WindowPtr +WhereDoIGoInTheStack(WindowPtr pWin, + WindowPtr pSib, + short x, + short y, unsigned short w, unsigned short h, int smode) +{ + BoxRec box; + WindowPtr pHead, pFirst; + + if ((pWin == pWin->parent->firstChild) && (pWin == pWin->parent->lastChild)) + return ((WindowPtr) NULL); + pHead = RealChildHead(pWin->parent); + pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild; + box.x1 = x; + box.y1 = y; + box.x2 = x + (int) w; + box.y2 = y + (int) h; + switch (smode) { + case Above: + if (pSib) + return pSib; + else if (pWin == pFirst) + return pWin->nextSib; + else + return pFirst; + case Below: + if (pSib) + if (pSib->nextSib != pWin) + return pSib->nextSib; + else + return pWin->nextSib; + else + return NullWindow; + case TopIf: + if ((!pWin->mapped || (pSib && !pSib->mapped))) + return pWin->nextSib; + else if (pSib) { + if ((IsSiblingAboveMe(pWin, pSib) == Above) && + (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) + return pFirst; + else + return pWin->nextSib; + } + else if (AnyWindowOverlapsMe(pWin, pHead, &box)) + return pFirst; + else + return pWin->nextSib; + case BottomIf: + if ((!pWin->mapped || (pSib && !pSib->mapped))) + return pWin->nextSib; + else if (pSib) { + if ((IsSiblingAboveMe(pWin, pSib) == Below) && + (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) + return NullWindow; + else + return pWin->nextSib; + } + else if (IOverlapAnyWindow(pWin, &box)) + return NullWindow; + else + return pWin->nextSib; + case Opposite: + if ((!pWin->mapped || (pSib && !pSib->mapped))) + return pWin->nextSib; + else if (pSib) { + if (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT) { + if (IsSiblingAboveMe(pWin, pSib) == Above) + return pFirst; + else + return NullWindow; + } + else + return pWin->nextSib; + } + else if (AnyWindowOverlapsMe(pWin, pHead, &box)) { + /* If I'm occluded, I can't possibly be the first child + * if (pWin == pWin->parent->firstChild) + * return pWin->nextSib; + */ + return pFirst; + } + else if (IOverlapAnyWindow(pWin, &box)) + return NullWindow; + else + return pWin->nextSib; + default: + { + /* should never happen; make something up. */ + return pWin->nextSib; + } + } +} + +static void +ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind) +{ +/* Note that pSib might be NULL */ + + Bool WasViewable = (Bool) pWin->viewable; + Bool anyMarked; + WindowPtr pFirstChange; + WindowPtr pLayerWin; + ScreenPtr pScreen = pWin->drawable.pScreen; + + /* if this is a root window, can't be restacked */ + if (!pWin->parent) + return; + + pFirstChange = MoveWindowInStack(pWin, pSib); + + if (WasViewable) { + anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange, + &pLayerWin); + if (pLayerWin != pWin) + pFirstChange = pLayerWin; + if (anyMarked) { + (*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, kind); + (*pScreen->HandleExposures) (pLayerWin->parent); + } + if (anyMarked && pWin->drawable.pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange, + kind); + } + if (pWin->realized) + WindowsRestructured(); +} + +/***** + * ConfigureWindow + *****/ + +int +ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) +{ +#define RESTACK_WIN 0 +#define MOVE_WIN 1 +#define RESIZE_WIN 2 +#define REBORDER_WIN 3 + WindowPtr pSib = NullWindow; + WindowPtr pParent = pWin->parent; + Window sibwid = 0; + Mask index2, tmask; + XID *pVlist; + short x, y, beforeX, beforeY; + unsigned short w = pWin->drawable.width, + h = pWin->drawable.height, bw = pWin->borderWidth; + int rc, action, smode = Above; + + if ((pWin->drawable.class == InputOnly) && + (mask & IllegalInputOnlyConfigureMask)) + return BadMatch; + + if ((mask & CWSibling) && !(mask & CWStackMode)) + return BadMatch; + + pVlist = vlist; + + if (pParent) { + x = pWin->drawable.x - pParent->drawable.x - (int) bw; + y = pWin->drawable.y - pParent->drawable.y - (int) bw; + } + else { + x = pWin->drawable.x; + y = pWin->drawable.y; + } + beforeX = x; + beforeY = y; + action = RESTACK_WIN; + if ((mask & (CWX | CWY)) && (!(mask & (CWHeight | CWWidth)))) { + GET_INT16(CWX, x); + GET_INT16(CWY, y); + action = MOVE_WIN; + } + /* or should be resized */ + else if (mask & (CWX | CWY | CWWidth | CWHeight)) { + GET_INT16(CWX, x); + GET_INT16(CWY, y); + GET_CARD16(CWWidth, w); + GET_CARD16(CWHeight, h); + if (!w || !h) { + client->errorValue = 0; + return BadValue; + } + action = RESIZE_WIN; + } + tmask = mask & ~ChangeMask; + while (tmask) { + index2 = (Mask) lowbit(tmask); + tmask &= ~index2; + switch (index2) { + case CWBorderWidth: + GET_CARD16(CWBorderWidth, bw); + break; + case CWSibling: + sibwid = (Window) *pVlist; + pVlist++; + rc = dixLookupWindow(&pSib, sibwid, client, DixGetAttrAccess); + if (rc != Success) { + client->errorValue = sibwid; + return rc; + } + if (pSib->parent != pParent) + return BadMatch; + if (pSib == pWin) + return BadMatch; + break; + case CWStackMode: + GET_CARD8(CWStackMode, smode); + if ((smode != TopIf) && (smode != BottomIf) && + (smode != Opposite) && (smode != Above) && (smode != Below)) { + client->errorValue = smode; + return BadValue; + } + break; + default: + client->errorValue = mask; + return BadValue; + } + } + /* root really can't be reconfigured, so just return */ + if (!pParent) + return Success; + + /* Figure out if the window should be moved. Doesnt + make the changes to the window if event sent */ + + if (mask & CWStackMode) + pSib = WhereDoIGoInTheStack(pWin, pSib, pParent->drawable.x + x, + pParent->drawable.y + y, + w + (bw << 1), h + (bw << 1), smode); + else + pSib = pWin->nextSib; + + if ((!pWin->overrideRedirect) && (RedirectSend(pParent))) { + xEvent event = { + .u.configureRequest.window = pWin->drawable.id, + .u.configureRequest.sibling = (mask & CWSibling) ? sibwid : None, + .u.configureRequest.x = x, + .u.configureRequest.y = y, + .u.configureRequest.width = w, + .u.configureRequest.height = h, + .u.configureRequest.borderWidth = bw, + .u.configureRequest.valueMask = mask, + .u.configureRequest.parent = pParent->drawable.id + }; + event.u.u.type = ConfigureRequest; + event.u.u.detail = (mask & CWStackMode) ? smode : Above; +#ifdef PANORAMIX + if (!noPanoramiXExtension && (!pParent || !pParent->parent)) { + event.u.configureRequest.x += screenInfo.screens[0]->x; + event.u.configureRequest.y += screenInfo.screens[0]->y; + } +#endif + if (MaybeDeliverEventsToClient(pParent, &event, 1, + SubstructureRedirectMask, client) == 1) + return Success; + } + if (action == RESIZE_WIN) { + Bool size_change = (w != pWin->drawable.width) + || (h != pWin->drawable.height); + + if (size_change && + ((pWin->eventMask | wOtherEventMasks(pWin)) & ResizeRedirectMask)) { + xEvent eventT = { + .u.resizeRequest.window = pWin->drawable.id, + .u.resizeRequest.width = w, + .u.resizeRequest.height = h + }; + eventT.u.u.type = ResizeRequest; + if (MaybeDeliverEventsToClient(pWin, &eventT, 1, + ResizeRedirectMask, client) == 1) { + /* if event is delivered, leave the actual size alone. */ + w = pWin->drawable.width; + h = pWin->drawable.height; + size_change = FALSE; + } + } + if (!size_change) { + if (mask & (CWX | CWY)) + action = MOVE_WIN; + else if (mask & (CWStackMode | CWBorderWidth)) + action = RESTACK_WIN; + else /* really nothing to do */ + return (Success); + } + } + + if (action == RESIZE_WIN) + /* we've already checked whether there's really a size change */ + goto ActuallyDoSomething; + if ((mask & CWX) && (x != beforeX)) + goto ActuallyDoSomething; + if ((mask & CWY) && (y != beforeY)) + goto ActuallyDoSomething; + if ((mask & CWBorderWidth) && (bw != wBorderWidth(pWin))) + goto ActuallyDoSomething; + if (mask & CWStackMode) { +#ifndef ROOTLESS + /* See above for why we always reorder in rootless mode. */ + if (pWin->nextSib != pSib) +#endif + goto ActuallyDoSomething; + } + return Success; + + ActuallyDoSomething: + if (pWin->drawable.pScreen->ConfigNotify) { + int ret; + + ret = + (*pWin->drawable.pScreen->ConfigNotify) (pWin, x, y, w, h, bw, + pSib); + if (ret) { + client->errorValue = 0; + return ret; + } + } + + if (SubStrSend(pWin, pParent)) { + xEvent event = { + .u.configureNotify.window = pWin->drawable.id, + .u.configureNotify.aboveSibling = pSib ? pSib->drawable.id : None, + .u.configureNotify.x = x, + .u.configureNotify.y = y, + .u.configureNotify.width = w, + .u.configureNotify.height = h, + .u.configureNotify.borderWidth = bw, + .u.configureNotify.override = pWin->overrideRedirect + }; + event.u.u.type = ConfigureNotify; +#ifdef PANORAMIX + if (!noPanoramiXExtension && (!pParent || !pParent->parent)) { + event.u.configureNotify.x += screenInfo.screens[0]->x; + event.u.configureNotify.y += screenInfo.screens[0]->y; + } +#endif + DeliverEvents(pWin, &event, 1, NullWindow); + } + if (mask & CWBorderWidth) { + if (action == RESTACK_WIN) { + action = MOVE_WIN; + pWin->borderWidth = bw; + } + else if ((action == MOVE_WIN) && + (beforeX + wBorderWidth(pWin) == x + (int) bw) && + (beforeY + wBorderWidth(pWin) == y + (int) bw)) { + action = REBORDER_WIN; + (*pWin->drawable.pScreen->ChangeBorderWidth) (pWin, bw); + } + else + pWin->borderWidth = bw; + } + if (action == MOVE_WIN) + (*pWin->drawable.pScreen->MoveWindow) (pWin, x, y, pSib, + (mask & CWBorderWidth) ? VTOther + : VTMove); + else if (action == RESIZE_WIN) + (*pWin->drawable.pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); + else if (mask & CWStackMode) + ReflectStackChange(pWin, pSib, VTOther); + + if (action != RESTACK_WIN) + CheckCursorConfinement(pWin); + return Success; +#undef RESTACK_WIN +#undef MOVE_WIN +#undef RESIZE_WIN +#undef REBORDER_WIN +} + +/****** + * + * CirculateWindow + * For RaiseLowest, raises the lowest mapped child (if any) that is + * obscured by another child to the top of the stack. For LowerHighest, + * lowers the highest mapped child (if any) that is obscuring another + * child to the bottom of the stack. Exposure processing is performed + * + ******/ + +int +CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) +{ + WindowPtr pWin, pHead, pFirst; + xEvent event; + BoxRec box; + + pHead = RealChildHead(pParent); + pFirst = pHead ? pHead->nextSib : pParent->firstChild; + if (direction == RaiseLowest) { + for (pWin = pParent->lastChild; + (pWin != pHead) && + !(pWin->mapped && + AnyWindowOverlapsMe(pWin, pHead, WindowExtents(pWin, &box))); + pWin = pWin->prevSib); + if (pWin == pHead) + return Success; + } + else { + for (pWin = pFirst; + pWin && + !(pWin->mapped && + IOverlapAnyWindow(pWin, WindowExtents(pWin, &box))); + pWin = pWin->nextSib); + if (!pWin) + return Success; + } + + event = (xEvent) { + .u.circulate.window = pWin->drawable.id, + .u.circulate.parent = pParent->drawable.id, + .u.circulate.event = pParent->drawable.id, + .u.circulate.place = (direction == RaiseLowest) ? + PlaceOnTop : PlaceOnBottom, + }; + + if (RedirectSend(pParent)) { + event.u.u.type = CirculateRequest; + if (MaybeDeliverEventsToClient(pParent, &event, 1, + SubstructureRedirectMask, client) == 1) + return Success; + } + + event.u.u.type = CirculateNotify; + DeliverEvents(pWin, &event, 1, NullWindow); + ReflectStackChange(pWin, + (direction == RaiseLowest) ? pFirst : NullWindow, + VTStack); + + return Success; +} + +static int +CompareWIDs(WindowPtr pWin, pointer value) +{ /* must conform to VisitWindowProcPtr */ + Window *wid = (Window *) value; + + if (pWin->drawable.id == *wid) + return WT_STOPWALKING; + else + return WT_WALKCHILDREN; +} + +/***** + * ReparentWindow + *****/ + +int +ReparentWindow(WindowPtr pWin, WindowPtr pParent, + int x, int y, ClientPtr client) +{ + WindowPtr pPrev, pPriorParent; + Bool WasMapped = (Bool) (pWin->mapped); + xEvent event; + int bw = wBorderWidth(pWin); + ScreenPtr pScreen; + + pScreen = pWin->drawable.pScreen; + if (TraverseTree(pWin, CompareWIDs, (pointer) &pParent->drawable.id) == + WT_STOPWALKING) + return BadMatch; + if (!MakeWindowOptional(pWin)) + return BadAlloc; + + if (WasMapped) + UnmapWindow(pWin, FALSE); + + event = (xEvent) { + .u.reparent.window = pWin->drawable.id, + .u.reparent.parent = pParent->drawable.id, + .u.reparent.x = x, + .u.reparent.y = y, + .u.reparent.override = pWin->overrideRedirect + }; + event.u.u.type = ReparentNotify; +#ifdef PANORAMIX + if (!noPanoramiXExtension && !pParent->parent) { + event.u.reparent.x += screenInfo.screens[0]->x; + event.u.reparent.y += screenInfo.screens[0]->y; + } +#endif + DeliverEvents(pWin, &event, 1, pParent); + + /* take out of sibling chain */ + + pPriorParent = pPrev = pWin->parent; + if (pPrev->firstChild == pWin) + pPrev->firstChild = pWin->nextSib; + if (pPrev->lastChild == pWin) + pPrev->lastChild = pWin->prevSib; + + if (pWin->nextSib) + pWin->nextSib->prevSib = pWin->prevSib; + if (pWin->prevSib) + pWin->prevSib->nextSib = pWin->nextSib; + + /* insert at begining of pParent */ + pWin->parent = pParent; + pPrev = RealChildHead(pParent); + if (pPrev) { + pWin->nextSib = pPrev->nextSib; + if (pPrev->nextSib) + pPrev->nextSib->prevSib = pWin; + else + pParent->lastChild = pWin; + pPrev->nextSib = pWin; + pWin->prevSib = pPrev; + } + else { + pWin->nextSib = pParent->firstChild; + pWin->prevSib = NullWindow; + if (pParent->firstChild) + pParent->firstChild->prevSib = pWin; + else + pParent->lastChild = pWin; + pParent->firstChild = pWin; + } + + pWin->origin.x = x + bw; + pWin->origin.y = y + bw; + pWin->drawable.x = x + bw + pParent->drawable.x; + pWin->drawable.y = y + bw + pParent->drawable.y; + + /* clip to parent */ + SetWinSize(pWin); + SetBorderSize(pWin); + + if (pScreen->ReparentWindow) + (*pScreen->ReparentWindow) (pWin, pPriorParent); + (*pScreen->PositionWindow) (pWin, pWin->drawable.x, pWin->drawable.y); + ResizeChildrenWinSize(pWin, 0, 0, 0, 0); + + CheckWindowOptionalNeed(pWin); + + if (WasMapped) + MapWindow(pWin, client); + RecalculateDeliverableEvents(pWin); + return Success; +} + +static void +RealizeTree(WindowPtr pWin) +{ + WindowPtr pChild; + RealizeWindowProcPtr Realize; + + Realize = pWin->drawable.pScreen->RealizeWindow; + pChild = pWin; + while (1) { + if (pChild->mapped) { + pChild->realized = TRUE; + pChild->viewable = (pChild->drawable.class == InputOutput); + (*Realize) (pChild); + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + return; + pChild = pChild->nextSib; + } +} + +static Bool +MaybeDeliverMapRequest(WindowPtr pWin, WindowPtr pParent, ClientPtr client) +{ + xEvent event = { + .u.mapRequest.window = pWin->drawable.id, + .u.mapRequest.parent = pParent->drawable.id + }; + event.u.u.type = MapRequest; + + return MaybeDeliverEventsToClient(pParent, &event, 1, + SubstructureRedirectMask, + client) == 1; +} + +static void +DeliverMapNotify(WindowPtr pWin) +{ + xEvent event = { + .u.mapNotify.window = pWin->drawable.id, + .u.mapNotify.override = pWin->overrideRedirect, + }; + event.u.u.type = MapNotify; + DeliverEvents(pWin, &event, 1, NullWindow); +} + +/***** + * MapWindow + * If some other client has selected SubStructureReDirect on the parent + * and override-redirect is xFalse, then a MapRequest event is generated, + * but the window remains unmapped. Otherwise, the window is mapped and a + * MapNotify event is generated. + *****/ + +int +MapWindow(WindowPtr pWin, ClientPtr client) +{ + ScreenPtr pScreen; + + WindowPtr pParent; + WindowPtr pLayerWin; + + if (pWin->mapped) + return Success; + + /* general check for permission to map window */ + if (XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW, + pWin, RT_NONE, NULL, DixShowAccess) != Success) + return Success; + + pScreen = pWin->drawable.pScreen; + if ((pParent = pWin->parent)) { + Bool anyMarked; + + if ((!pWin->overrideRedirect) && (RedirectSend(pParent))) + if (MaybeDeliverMapRequest(pWin, pParent, client)) + return Success; + + pWin->mapped = TRUE; + if (SubStrSend(pWin, pParent)) + DeliverMapNotify(pWin); + + if (!pParent->realized) + return Success; + RealizeTree(pWin); + if (pWin->viewable) { + anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, + &pLayerWin); + if (anyMarked) { + (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTMap); + (*pScreen->HandleExposures) (pLayerWin->parent); + } + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin, + VTMap); + } + WindowsRestructured(); + } + else { + RegionRec temp; + + pWin->mapped = TRUE; + pWin->realized = TRUE; /* for roots */ + pWin->viewable = pWin->drawable.class == InputOutput; + /* We SHOULD check for an error value here XXX */ + (*pScreen->RealizeWindow) (pWin); + if (pScreen->ClipNotify) + (*pScreen->ClipNotify) (pWin, 0, 0); + if (pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (NullWindow, pWin, VTMap); + RegionNull(&temp); + RegionCopy(&temp, &pWin->clipList); + (*pScreen->WindowExposures) (pWin, &temp, NullRegion); + RegionUninit(&temp); + } + + return Success; +} + +/***** + * MapSubwindows + * Performs a MapWindow all unmapped children of the window, in top + * to bottom stacking order. + *****/ + +void +MapSubwindows(WindowPtr pParent, ClientPtr client) +{ + WindowPtr pWin; + WindowPtr pFirstMapped = NullWindow; + ScreenPtr pScreen; + Mask parentRedirect; + Mask parentNotify; + Bool anyMarked; + WindowPtr pLayerWin; + + pScreen = pParent->drawable.pScreen; + parentRedirect = RedirectSend(pParent); + parentNotify = SubSend(pParent); + anyMarked = FALSE; + for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib) { + if (!pWin->mapped) { + if (parentRedirect && !pWin->overrideRedirect) + if (MaybeDeliverMapRequest(pWin, pParent, client)) + continue; + + pWin->mapped = TRUE; + if (parentNotify || StrSend(pWin)) + DeliverMapNotify(pWin); + + if (!pFirstMapped) + pFirstMapped = pWin; + if (pParent->realized) { + RealizeTree(pWin); + if (pWin->viewable) { + anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, + (WindowPtr + *) NULL); + } + } + } + } + + if (pFirstMapped) { + pLayerWin = (*pScreen->GetLayerWindow) (pParent); + if (pLayerWin->parent != pParent) { + anyMarked |= (*pScreen->MarkOverlappedWindows) (pLayerWin, + pLayerWin, + (WindowPtr *) NULL); + pFirstMapped = pLayerWin; + } + if (anyMarked) { + (*pScreen->ValidateTree) (pLayerWin->parent, pFirstMapped, VTMap); + (*pScreen->HandleExposures) (pLayerWin->parent); + } + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstMapped, + VTMap); + WindowsRestructured(); + } +} + +static void +UnrealizeTree(WindowPtr pWin, Bool fromConfigure) +{ + WindowPtr pChild; + UnrealizeWindowProcPtr Unrealize; + MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; + + Unrealize = pWin->drawable.pScreen->UnrealizeWindow; + MarkUnrealizedWindow = pWin->drawable.pScreen->MarkUnrealizedWindow; + pChild = pWin; + while (1) { + if (pChild->realized) { + pChild->realized = FALSE; + pChild->visibility = VisibilityNotViewable; +#ifdef PANORAMIX + if (!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) { + PanoramiXRes *win; + int rc = dixLookupResourceByType((pointer *) &win, + pChild->drawable.id, + XRT_WINDOW, + serverClient, DixWriteAccess); + + if (rc == Success) + win->u.win.visibility = VisibilityNotViewable; + } +#endif + (*Unrealize) (pChild); + DeleteWindowFromAnyEvents(pChild, FALSE); + if (pChild->viewable) { + pChild->viewable = FALSE; + (*MarkUnrealizedWindow) (pChild, pWin, fromConfigure); + pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + return; + pChild = pChild->nextSib; + } +} + +static void +DeliverUnmapNotify(WindowPtr pWin, Bool fromConfigure) +{ + xEvent event = { + .u.unmapNotify.window = pWin->drawable.id, + .u.unmapNotify.fromConfigure = fromConfigure + }; + event.u.u.type = UnmapNotify; + DeliverEvents(pWin, &event, 1, NullWindow); +} + +/***** + * UnmapWindow + * If the window is already unmapped, this request has no effect. + * Otherwise, the window is unmapped and an UnMapNotify event is + * generated. Cannot unmap a root window. + *****/ + +int +UnmapWindow(WindowPtr pWin, Bool fromConfigure) +{ + WindowPtr pParent; + Bool wasRealized = (Bool) pWin->realized; + Bool wasViewable = (Bool) pWin->viewable; + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pLayerWin = pWin; + + if ((!pWin->mapped) || (!(pParent = pWin->parent))) + return Success; + if (SubStrSend(pWin, pParent)) + DeliverUnmapNotify(pWin, fromConfigure); + if (wasViewable && !fromConfigure) { + pWin->valdata = UnmapValData; + (*pScreen->MarkOverlappedWindows) (pWin, pWin->nextSib, &pLayerWin); + (*pScreen->MarkWindow) (pLayerWin->parent); + } + pWin->mapped = FALSE; + if (wasRealized) + UnrealizeTree(pWin, fromConfigure); + if (wasViewable) { + if (!fromConfigure) { + (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap); + (*pScreen->HandleExposures) (pLayerWin->parent); + } + if (!fromConfigure && pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap); + } + if (wasRealized && !fromConfigure) { + WindowsRestructured(); + WindowGone(pWin); + } + return Success; +} + +/***** + * UnmapSubwindows + * Performs an UnmapWindow request with the specified mode on all mapped + * children of the window, in bottom to top stacking order. + *****/ + +void +UnmapSubwindows(WindowPtr pWin) +{ + WindowPtr pChild, pHead; + Bool wasRealized = (Bool) pWin->realized; + Bool wasViewable = (Bool) pWin->viewable; + Bool anyMarked = FALSE; + Mask parentNotify; + WindowPtr pLayerWin = NULL; + ScreenPtr pScreen = pWin->drawable.pScreen; + + if (!pWin->firstChild) + return; + parentNotify = SubSend(pWin); + pHead = RealChildHead(pWin); + + if (wasViewable) + pLayerWin = (*pScreen->GetLayerWindow) (pWin); + + for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) { + if (pChild->mapped) { + if (parentNotify || StrSend(pChild)) + DeliverUnmapNotify(pChild, xFalse); + if (pChild->viewable) { + pChild->valdata = UnmapValData; + anyMarked = TRUE; + } + pChild->mapped = FALSE; + if (pChild->realized) + UnrealizeTree(pChild, FALSE); + if (wasViewable) { + } + } + } + if (wasViewable) { + if (anyMarked) { + if (pLayerWin->parent == pWin) + (*pScreen->MarkWindow) (pWin); + else { + WindowPtr ptmp; + + (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, + (WindowPtr *) NULL); + (*pScreen->MarkWindow) (pLayerWin->parent); + + /* Windows between pWin and pLayerWin may not have been marked */ + ptmp = pWin; + + while (ptmp != pLayerWin->parent) { + (*pScreen->MarkWindow) (ptmp); + ptmp = ptmp->parent; + } + pHead = pWin->firstChild; + } + (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap); + (*pScreen->HandleExposures) (pLayerWin->parent); + } + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pHead, VTUnmap); + } + if (wasRealized) { + WindowsRestructured(); + WindowGone(pWin); + } +} + +void +HandleSaveSet(ClientPtr client) +{ + WindowPtr pParent, pWin; + int j; + + for (j = 0; j < client->numSaved; j++) { + pWin = SaveSetWindow(client->saveSet[j]); + if (SaveSetToRoot(client->saveSet[j])) + pParent = pWin->drawable.pScreen->root; + else + { + pParent = pWin->parent; + while (pParent && (wClient(pParent) == client)) + pParent = pParent->parent; + } + if (pParent) { + if (pParent != pWin->parent) { + /* unmap first so that ReparentWindow doesn't remap */ + if (!SaveSetShouldMap(client->saveSet[j])) + UnmapWindow(pWin, FALSE); + ReparentWindow(pWin, pParent, + pWin->drawable.x - wBorderWidth(pWin) - + pParent->drawable.x, + pWin->drawable.y - wBorderWidth(pWin) - + pParent->drawable.y, client); + if (!pWin->realized && pWin->mapped) + pWin->mapped = FALSE; + } + if (SaveSetShouldMap(client->saveSet[j])) + MapWindow(pWin, client); + } + } + free(client->saveSet); + client->numSaved = 0; + client->saveSet = (SaveSetElt *) NULL; +} + +/** + * + * \param x,y in root + */ +Bool +PointInWindowIsVisible(WindowPtr pWin, int x, int y) +{ + BoxRec box; + + if (!pWin->realized) + return FALSE; + if (RegionContainsPoint(&pWin->borderClip, x, y, &box) + && (!wInputShape(pWin) || + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box))) + return TRUE; + return FALSE; +} + +RegionPtr +NotClippedByChildren(WindowPtr pWin) +{ + RegionPtr pReg = RegionCreate(NullBox, 1); + + if (pWin->parent || + screenIsSaved != SCREEN_SAVER_ON || + !HasSaverWindow(pWin->drawable.pScreen)) { + RegionIntersect(pReg, &pWin->borderClip, &pWin->winSize); + } + return pReg; +} + +void +SendVisibilityNotify(WindowPtr pWin) +{ + xEvent event; + unsigned int visibility = pWin->visibility; + +#ifdef PANORAMIX + /* This is not quite correct yet, but it's close */ + if (!noPanoramiXExtension) { + PanoramiXRes *win; + WindowPtr pWin2; + int rc, i, Scrnum; + + Scrnum = pWin->drawable.pScreen->myNum; + + win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, Scrnum); + + if (!win || (win->u.win.visibility == visibility)) + return; + + switch (visibility) { + case VisibilityUnobscured: + FOR_NSCREENS(i) { + if (i == Scrnum) + continue; + + rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient, + DixWriteAccess); + + if (rc == Success) { + if (pWin2->visibility == VisibilityPartiallyObscured) + return; + + if (!i) + pWin = pWin2; + } + } + break; + case VisibilityPartiallyObscured: + if (Scrnum) { + rc = dixLookupWindow(&pWin2, win->info[0].id, serverClient, + DixWriteAccess); + if (rc == Success) + pWin = pWin2; + } + break; + case VisibilityFullyObscured: + FOR_NSCREENS(i) { + if (i == Scrnum) + continue; + + rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient, + DixWriteAccess); + + if (rc == Success) { + if (pWin2->visibility != VisibilityFullyObscured) + return; + + if (!i) + pWin = pWin2; + } + } + break; + } + + win->u.win.visibility = visibility; + } +#endif + + event = (xEvent) { + .u.visibility.window = pWin->drawable.id, + .u.visibility.state = visibility + }; + event.u.u.type = VisibilityNotify; + DeliverEvents(pWin, &event, 1, NullWindow); +} + +#define RANDOM_WIDTH 32 +int +dixSaveScreens(ClientPtr client, int on, int mode) +{ + int rc, i, what, type; + + if (on == SCREEN_SAVER_FORCER) { + if (mode == ScreenSaverReset) + what = SCREEN_SAVER_OFF; + else + what = SCREEN_SAVER_ON; + type = what; + } + else { + what = on; + type = what; + if (what == screenIsSaved) + type = SCREEN_SAVER_CYCLE; + } + + for (i = 0; i < screenInfo.numScreens; i++) { + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], + DixShowAccess | DixHideAccess); + if (rc != Success) + return rc; + } + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + + if (on == SCREEN_SAVER_FORCER) + (*pScreen->SaveScreen) (pScreen, on); + if (pScreen->screensaver.ExternalScreenSaver) { + if ((*pScreen->screensaver.ExternalScreenSaver) + (pScreen, type, on == SCREEN_SAVER_FORCER)) + continue; + } + if (type == screenIsSaved) + continue; + switch (type) { + case SCREEN_SAVER_OFF: + if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED) { + (*pScreen->SaveScreen) (pScreen, what); + } + else if (HasSaverWindow(pScreen)) { + pScreen->screensaver.pWindow = NullWindow; + FreeResource(pScreen->screensaver.wid, RT_NONE); + } + break; + case SCREEN_SAVER_CYCLE: + if (pScreen->screensaver.blanked == SCREEN_IS_TILED) { + WindowPtr pWin = pScreen->screensaver.pWindow; + + /* make it look like screen saver is off, so that + * NotClippedByChildren will compute a clip list + * for the root window, so miPaintWindow works + */ + screenIsSaved = SCREEN_SAVER_OFF; + (*pWin->drawable.pScreen->MoveWindow) (pWin, + (short) (- + (rand() % + RANDOM_WIDTH)), + (short) (- + (rand() % + RANDOM_WIDTH)), + pWin->nextSib, VTMove); + screenIsSaved = SCREEN_SAVER_ON; + } + /* + * Call the DDX saver in case it wants to do something + * at cycle time + */ + else if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED) { + (*pScreen->SaveScreen) (pScreen, type); + } + break; + case SCREEN_SAVER_ON: + if (ScreenSaverBlanking != DontPreferBlanking) { + if ((*pScreen->SaveScreen) (pScreen, what)) { + pScreen->screensaver.blanked = SCREEN_IS_BLANKED; + continue; + } + if ((ScreenSaverAllowExposures != DontAllowExposures) && + TileScreenSaver(pScreen, SCREEN_IS_BLACK)) { + pScreen->screensaver.blanked = SCREEN_IS_BLACK; + continue; + } + } + if ((ScreenSaverAllowExposures != DontAllowExposures) && + TileScreenSaver(pScreen, SCREEN_IS_TILED)) { + pScreen->screensaver.blanked = SCREEN_IS_TILED; + } + else + pScreen->screensaver.blanked = SCREEN_ISNT_SAVED; + break; + } + } + screenIsSaved = what; + if (mode == ScreenSaverReset) { + if (on == SCREEN_SAVER_FORCER) { + DeviceIntPtr dev; + UpdateCurrentTimeIf(); + nt_list_for_each_entry(dev, inputInfo.devices, next) + NoticeTime(dev, currentTime); + } + SetScreenSaverTimer(); + } + return Success; +} + +int +SaveScreens(int on, int mode) +{ + return dixSaveScreens(serverClient, on, mode); +} + +static Bool +TileScreenSaver(ScreenPtr pScreen, int kind) +{ + int j; + int result; + XID attributes[3]; + Mask mask; + WindowPtr pWin; + CursorMetricRec cm; + unsigned char *srcbits, *mskbits; + CursorPtr cursor; + XID cursorID = 0; + int attri; + + mask = 0; + attri = 0; + switch (kind) { + case SCREEN_IS_TILED: + switch (pScreen->root->backgroundState) { + case BackgroundPixel: + attributes[attri++] = pScreen->root->background.pixel; + mask |= CWBackPixel; + break; + case BackgroundPixmap: + attributes[attri++] = None; + mask |= CWBackPixmap; + break; + default: + break; + } + break; + case SCREEN_IS_BLACK: + attributes[attri++] = pScreen->root->drawable.pScreen->blackPixel; + mask |= CWBackPixel; + break; + } + mask |= CWOverrideRedirect; + attributes[attri++] = xTrue; + + /* + * create a blank cursor + */ + + cm.width = 16; + cm.height = 16; + cm.xhot = 8; + cm.yhot = 8; + srcbits = malloc(BitmapBytePad(32) * 16); + mskbits = malloc(BitmapBytePad(32) * 16); + if (!srcbits || !mskbits) { + free(srcbits); + free(mskbits); + cursor = 0; + } + else { + for (j = 0; j < BitmapBytePad(32) * 16; j++) + srcbits[j] = mskbits[j] = 0x0; + result = AllocARGBCursor(srcbits, mskbits, NULL, &cm, 0, 0, 0, 0, 0, 0, + &cursor, serverClient, (XID) 0); + if (cursor) { + cursorID = FakeClientID(0); + if (AddResource(cursorID, RT_CURSOR, (pointer) cursor)) { + attributes[attri] = cursorID; + mask |= CWCursor; + } + else + cursor = 0; + } + else { + free(srcbits); + free(mskbits); + } + } + + pWin = pScreen->screensaver.pWindow = + CreateWindow(pScreen->screensaver.wid, + pScreen->root, + -RANDOM_WIDTH, -RANDOM_WIDTH, + (unsigned short) pScreen->width + RANDOM_WIDTH, + (unsigned short) pScreen->height + RANDOM_WIDTH, + 0, InputOutput, mask, attributes, 0, serverClient, + wVisual(pScreen->root), &result); + + if (cursor) + FreeResource(cursorID, RT_NONE); + + if (!pWin) + return FALSE; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, + (pointer) pScreen->screensaver.pWindow)) + return FALSE; + + if (mask & CWBackPixmap) { + MakeRootTile(pWin); + (*pWin->drawable.pScreen->ChangeWindowAttributes) (pWin, CWBackPixmap); + } + MapWindow(pWin, serverClient); + return TRUE; +} + +/* + * FindWindowWithOptional + * + * search ancestors of the given window for an entry containing + * a WindowOpt structure. Assumptions: some parent will + * contain the structure. + */ + +WindowPtr +FindWindowWithOptional(WindowPtr w) +{ + do + w = w->parent; + while (!w->optional); + return w; +} + +/* + * CheckWindowOptionalNeed + * + * check each optional entry in the given window to see if + * the value is satisfied by the default rules. If so, + * release the optional record + */ + +void +CheckWindowOptionalNeed(WindowPtr w) +{ + WindowOptPtr optional; + WindowOptPtr parentOptional; + + if (!w->parent || !w->optional) + return; + optional = w->optional; + if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate]) + return; + if (optional->otherEventMasks != 0) + return; + if (optional->otherClients != NULL) + return; + if (optional->passiveGrabs != NULL) + return; + if (optional->userProps != NULL) + return; + if (optional->backingBitPlanes != ~0L) + return; + if (optional->backingPixel != 0) + return; + if (optional->boundingShape != NULL) + return; + if (optional->clipShape != NULL) + return; + if (optional->inputShape != NULL) + return; + if (optional->inputMasks != NULL) + return; + if (optional->deviceCursors != NULL) { + DevCursNodePtr pNode = optional->deviceCursors; + + while (pNode) { + if (pNode->cursor != None) + return; + pNode = pNode->next; + } + } + + parentOptional = FindWindowWithOptional(w)->optional; + if (optional->visual != parentOptional->visual) + return; + if (optional->cursor != None && + (optional->cursor != parentOptional->cursor || w->parent->cursorIsNone)) + return; + if (optional->colormap != parentOptional->colormap) + return; + DisposeWindowOptional(w); +} + +/* + * MakeWindowOptional + * + * create an optional record and initialize it with the default + * values. + */ + +Bool +MakeWindowOptional(WindowPtr pWin) +{ + WindowOptPtr optional; + WindowOptPtr parentOptional; + + if (pWin->optional) + return TRUE; + optional = malloc(sizeof(WindowOptRec)); + if (!optional) + return FALSE; + optional->dontPropagateMask = DontPropagateMasks[pWin->dontPropagate]; + optional->otherEventMasks = 0; + optional->otherClients = NULL; + optional->passiveGrabs = NULL; + optional->userProps = NULL; + optional->backingBitPlanes = ~0L; + optional->backingPixel = 0; + optional->boundingShape = NULL; + optional->clipShape = NULL; + optional->inputShape = NULL; + optional->inputMasks = NULL; + optional->deviceCursors = NULL; + + parentOptional = FindWindowWithOptional(pWin)->optional; + optional->visual = parentOptional->visual; + if (!pWin->cursorIsNone) { + optional->cursor = RefCursor(parentOptional->cursor); + } + else { + optional->cursor = None; + } + optional->colormap = parentOptional->colormap; + pWin->optional = optional; + return TRUE; +} + +/* + * Changes the cursor struct for the given device and the given window. + * A cursor that does not have a device cursor set will use whatever the + * standard cursor is for the window. If all devices have a cursor set, + * changing the window cursor (e.g. using XDefineCursor()) will not have any + * visible effect. Only when one of the device cursors is set to None again, + * this device's cursor will display the changed standard cursor. + * + * CursorIsNone of the window struct is NOT modified if you set a device + * cursor. + * + * Assumption: If there is a node for a device in the list, the device has a + * cursor. If the cursor is set to None, it is inherited by the parent. + */ +int +ChangeWindowDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor) +{ + DevCursNodePtr pNode, pPrev; + CursorPtr pOldCursor = NULL; + ScreenPtr pScreen; + WindowPtr pChild; + + if (!pWin->optional && !MakeWindowOptional(pWin)) + return BadAlloc; + + /* 1) Check if window has device cursor set + * Yes: 1.1) swap cursor with given cursor if parent does not have same + * cursor, free old cursor + * 1.2) free old cursor, use parent cursor + * No: 1.1) add node to beginning of list. + * 1.2) add cursor to node if parent does not have same cursor + * 1.3) use parent cursor if parent does not have same cursor + * 2) Patch up children if child has a devcursor + * 2.1) if child has cursor None, it inherited from parent, set to old + * cursor + * 2.2) if child has same cursor as new cursor, remove and set to None + */ + + pScreen = pWin->drawable.pScreen; + + if (WindowSeekDeviceCursor(pWin, pDev, &pNode, &pPrev)) { + /* has device cursor */ + + if (pNode->cursor == pCursor) + return Success; + + pOldCursor = pNode->cursor; + + if (!pCursor) { /* remove from list */ + if (pPrev) + pPrev->next = pNode->next; + else + /* first item in list */ + pWin->optional->deviceCursors = pNode->next; + + free(pNode); + goto out; + } + + } + else { + /* no device cursor yet */ + DevCursNodePtr pNewNode; + + if (!pCursor) + return Success; + + pNewNode = malloc(sizeof(DevCursNodeRec)); + pNewNode->dev = pDev; + pNewNode->next = pWin->optional->deviceCursors; + pWin->optional->deviceCursors = pNewNode; + pNode = pNewNode; + + } + + if (pCursor && WindowParentHasDeviceCursor(pWin, pDev, pCursor)) + pNode->cursor = None; + else { + pNode->cursor = RefCursor(pCursor); + } + + pNode = pPrev = NULL; + /* fix up children */ + for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { + if (WindowSeekDeviceCursor(pChild, pDev, &pNode, &pPrev)) { + if (pNode->cursor == None) { /* inherited from parent */ + pNode->cursor = RefCursor(pOldCursor); + } + else if (pNode->cursor == pCursor) { + pNode->cursor = None; + FreeCursor(pCursor, (Cursor) 0); /* fix up refcnt */ + } + } + } + + out: + CursorVisible = TRUE; + + if (pWin->realized) + WindowHasNewCursor(pWin); + + if (pOldCursor) + FreeCursor(pOldCursor, (Cursor) 0); + + /* FIXME: We SHOULD check for an error value here XXX + (comment taken from ChangeWindowAttributes) */ + (*pScreen->ChangeWindowAttributes) (pWin, CWCursor); + + return Success; +} + +/* Get device cursor for given device or None if none is set */ +CursorPtr +WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev) +{ + DevCursorList pList; + + if (!pWin->optional || !pWin->optional->deviceCursors) + return NULL; + + pList = pWin->optional->deviceCursors; + + while (pList) { + if (pList->dev == pDev) { + if (pList->cursor == None) /* inherited from parent */ + return WindowGetDeviceCursor(pWin->parent, pDev); + else + return pList->cursor; + } + pList = pList->next; + } + return NULL; +} + +/* Searches for a DevCursorNode for the given window and device. If one is + * found, return True and set pNode and pPrev to the node and to the node + * before the node respectively. Otherwise return False. + * If the device is the first in list, pPrev is set to NULL. + */ +static Bool +WindowSeekDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, + DevCursNodePtr * pNode, DevCursNodePtr * pPrev) +{ + DevCursorList pList; + + if (!pWin->optional) + return FALSE; + + pList = pWin->optional->deviceCursors; + + if (pList && pList->dev == pDev) { + *pNode = pList; + *pPrev = NULL; + return TRUE; + } + + while (pList) { + if (pList->next) { + if (pList->next->dev == pDev) { + *pNode = pList->next; + *pPrev = pList; + return TRUE; + } + } + pList = pList->next; + } + return FALSE; +} + +/* Return True if a parent has the same device cursor set or False if + * otherwise + */ +static Bool +WindowParentHasDeviceCursor(WindowPtr pWin, + DeviceIntPtr pDev, CursorPtr pCursor) +{ + WindowPtr pParent; + DevCursNodePtr pParentNode, pParentPrev; + + pParent = pWin->parent; + while (pParent) { + if (WindowSeekDeviceCursor(pParent, pDev, &pParentNode, &pParentPrev)) { + /* if there is a node in the list, the win has a dev cursor */ + if (!pParentNode->cursor) /* inherited. */ + pParent = pParent->parent; + else if (pParentNode->cursor == pCursor) /* inherit */ + return TRUE; + else /* different cursor */ + return FALSE; + } + else + /* parent does not have a device cursor for our device */ + return FALSE; + } + return FALSE; +} + +/* + * SetRootClip -- + * Enable or disable rendering to the screen by + * setting the root clip list and revalidating + * all of the windows + */ +void +SetRootClip(ScreenPtr pScreen, Bool enable) +{ + WindowPtr pWin = pScreen->root; + WindowPtr pChild; + Bool WasViewable; + Bool anyMarked = FALSE; + WindowPtr pLayerWin; + BoxRec box; + + if (!pWin) + return; + WasViewable = (Bool) (pWin->viewable); + if (WasViewable) { + for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { + (void) (*pScreen->MarkOverlappedWindows) (pChild, + pChild, &pLayerWin); + } + (*pScreen->MarkWindow) (pWin); + anyMarked = TRUE; + if (pWin->valdata) { + if (HasBorder(pWin)) { + RegionPtr borderVisible; + + borderVisible = RegionCreate(NullBox, 1); + RegionSubtract(borderVisible, + &pWin->borderClip, &pWin->winSize); + pWin->valdata->before.borderVisible = borderVisible; + } + pWin->valdata->before.resized = TRUE; + } + } + + /* + * Use REGION_BREAK to avoid optimizations in ValidateTree + * that assume the root borderClip can't change well, normally + * it doesn't...) + */ + if (enable) { + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); + if (WasViewable) + RegionReset(&pWin->borderClip, &box); + pWin->drawable.width = pScreen->width; + pWin->drawable.height = pScreen->height; + RegionBreak(&pWin->clipList); + } + else { + RegionEmpty(&pWin->borderClip); + RegionBreak(&pWin->clipList); + } + + ResizeChildrenWinSize(pWin, 0, 0, 0, 0); + + if (WasViewable) { + if (pWin->firstChild) { + anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild, + pWin->firstChild, + (WindowPtr *) NULL); + } + else { + (*pScreen->MarkWindow) (pWin); + anyMarked = TRUE; + } + + if (anyMarked) + (*pScreen->ValidateTree) (pWin, NullWindow, VTOther); + } + + if (WasViewable) { + if (anyMarked) + (*pScreen->HandleExposures) (pWin); + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pWin, NullWindow, VTOther); + } + if (pWin->realized) + WindowsRestructured(); + FlushAllOutput(); +} + +VisualPtr +WindowGetVisual(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + VisualID vid = wVisual(pWin); + int i; + + for (i = 0; i < pScreen->numVisuals; i++) + if (pScreen->visuals[i].vid == vid) + return &pScreen->visuals[i]; + return 0; +} diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..e6974fe --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,15 @@ +SUBDIRS = dtrace + +if ENABLE_DEVEL_DOCS +if HAVE_XMLTO + +# Main DocBook/XML files (DOCTYPE book) +docbook = Xserver-spec.xml Xinput.xml + +# Generate DocBook/XML output formats with or without stylesheets +include $(top_srcdir)/devbook.am + +endif HAVE_XMLTO +endif ENABLE_DEVEL_DOCS + +EXTRA_DIST = smartsched diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..f18e626 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,870 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Generate output formats for a single DocBook/XML with/without chapters +# +# Variables set by the calling Makefile: +# noinst_DATA: developers docs are not installed +# docbook: the main DocBook/XML file, no chapters, appendix or image files +# chapters: all files pulled in by an XInclude statement and images. +# + +# +# This makefile is intended for Developers Documentation and is not installed. +# Do not use for Users docs or Specs which need to be installed and require olink support +# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 +# for an explanation on documents classification. +# + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(am__dist_noinst_DATA_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/devbook.am +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_1 = $(docbook:.xml=.html) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_2 = $(docbook:.xml=.txt) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(docbook:.xml=.pdf) $(docbook:.xml=.ps) +subdir = doc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__dist_noinst_DATA_DIST = Xserver-spec.xml Xinput.xml +DATA = $(dist_noinst_DATA) $(noinst_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = dtrace + +# Main DocBook/XML files (DOCTYPE book) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@docbook = Xserver-spec.xml Xinput.xml + +# Developers documnetation is not installed +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@noinst_DATA = \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_1) \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_2) \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_3) + +# DocBook/XML file with chapters, appendix and images it includes +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@dist_noinst_DATA = $(docbook) $(chapters) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_HTML_FLAGS = \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(abs_top_builddir)" \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl + +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_FO_FLAGS = \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(abs_top_builddir)" \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --stringparam img.src.path=$(abs_builddir)/ \ +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl + +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@CLEANFILES = $(noinst_DATA) + +# Generate DocBook/XML output formats with or without stylesheets +EXTRA_DIST = smartsched +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/devbook.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +.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_srcdir)/devbook.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.html: %.xml $(chapters) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@%.txt: %.xml $(chapters) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.pdf: %.xml $(chapters) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.ps: %.xml $(chapters) +@ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/Xinput.xml b/doc/Xinput.xml new file mode 100644 index 0000000..7f576a1 --- /dev/null +++ b/doc/Xinput.xml @@ -0,0 +1,1203 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book 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; +]> + +<!-- lifted from troff+ms+XMan by doclifter --> +<book id="porting"> + +<bookinfo> + <title>X11 Input Extension Porting Document + + + GeorgeSachs + Hewlett-Packard + + + X Server Version &xserver.version; + 198919901991 + Hewlett-Packard Company + + + + + + +Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is +hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +Hewlett-Packard makes no representations about the suitability for any purpose of the information in this +document. It is provided "as is" without express or implied warranty. This document is only a draft stan- +dard of the X Consortium and is therefore subject to change. + + + + +Copyright © 1989, 1990, 1991 X Consortium +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. + +X Window System is a trademark of The Open Group. + + + + + +X11 Input Extension Porting Document + + +This document is intended to aid the process of integrating the +X11 Input Extension into an X server. + + + +Most of the functionality provided by the input extension is +device- and implementation-independent, and should require no changes. +The functionality is implemented by +routines that typically reside in the server source tree directory +extensions/server/xinput. +This extension includes functions to enable and disable input extension devices, +select input, grab and focus those device, query and change key +and button mappings, and others. The only input extension requirements +for the device-dependent part of X are that the input devices be +correctly initialized and input events from those devices be correctly +generated. Device-dependent X is responsible for reading input data from +the input device hardware and if necessary, reformatting it into X events. + + + +The process of initializing input extension devices is similar to that used +for the core devices, and is described in the following sections. When +multiple input devices are attached to X server, the choice of which devices +to initially use as the core X pointer and keyboard is left +implementation-dependent. It is also up to each implementation to decide +whether all input devices will be opened by the server during its +initialization and kept open for the life of the server. The alternative is +to open only the X keyboard and X pointer during server initialization, and +open other input devices only when requested by a client to do so. Either +type of implementation is supported by the input extension. + + + +Input extension events generated by the X server use the same 32-byte xEvent +wire event as do core input events. However, additional information must be +sent for input extension devices, requiring that multiple xEvents be generated +each time data is received from an input extension device. These xEvents are +combined into a single client XEvent by the input extension library. A later +section of this document describes the format and generation of input extension +events. + + +Initializing Extension Devices + + +Extension input devices are initialized in the same manner as the core +X input devices. Device-Independent X provides functions that can be +called from DDX to initialize these devices. Which functions are called +and when will vary by implementation, and will depend on whether the +implementation opens all the input devices available to X when X is initialized, +or waits until a client requests that a device be opened. +In the simplest case, DDX will open all input devices as part of its +initialization, when the InitInput routine is called. + + +Summary of Calling Sequence + + + +Device-Independent X | Device-Dependent X +-------------------- | ------------------- + | +InitInput --------------> | - do device-specific initialization + | + | - call AddInputDevice (deviceProc,AutoStart) +AddInputDevice | + - creates DeviceIntRec | + - records deviceProc | + - adds new device to | + list of off_devices. | +sets dev->startup=AutoStart| + | - call one of: + | - RegisterPointerDevice (X pointer) + | - processInputProc = ProcessPointerEvents + | - RegisterKeyboardDevice (X keyboard) + | - processInputProc = ProcessKeyboardEvents + | - RegisterOtherDevice (extension device) + | - processInputProc = ProcessOtherEvents + | + | +InitAndStartDevices -----> | - calls deviceProc with parameters + | (DEVICE_INIT, AutoStart) +sets dev->inited = return | + value from deviceProc | + | + | - in deviceProc, do one of: + | - call InitPointerDeviceStruct (X pointer) + | - call InitKeyboardDeviceStruct (X keybd) + | - init extension device by calling some of: + | - InitKeyClassDeviceStruct + | - InitButtonClassDeviceStruct + | - InitValuatorClassDeviceStruct + | - InitValuatorAxisStruct + | - InitFocusClassDeviceStruct + | - InitProximityClassDeviceStruct + | - InitKbdFeedbackClassDeviceStruct + | - InitPtrFeedbackClassDeviceStruct + | - InitLedFeedbackClassDeviceStruct + | - InitStringFeedbackClassDeviceStruct + | - InitIntegerFeedbackClassDeviceStruct + | - InitBellFeedbackClassDeviceStruct + | - init device name and type by: + | - calling MakeAtom with one of the + | predefined names + | - calling AssignTypeAndName + | + | +for each device added | + by AddInputDevice, | + InitAndStartDevices | + calls EnableDevice if | - EnableDevice calls deviceProc with + dev->startup & | (DEVICE_ON, AutoStart) + dev->inited | + | +If deviceProc returns | - core devices are now enabled, extension + Success, EnableDevice | devices are now available to be accessed + move the device from | through the input extension protocol + inputInfo.off_devices | requests. + to inputInfo.devices | + + + + +Initialization Called From InitInput + + +InitInput is the first DDX input entry point called during X server startup. +This routine is responsible for +device- and implementation- specific initialization, and for calling +AddInputDevice to create and initialize the DeviceIntRec structure for each +input device. AddInputDevice is passed the address of a procedure to be called +by the DIX routine InitAndStartDevices when input devices are enabled. +This procedure is expected to perform X initialization for the input device. + + + +If the device is to be used as the X pointer, DDX should then call +RegisterPointerDevice, passing the DeviceIntRec pointer, +to initialize the device as the X pointer. + + + +If the device is to be used as the X keyboard, DDX should instead call +RegisterKeyboardDevice to initialize the device as the X keyboard. + + + +If the device is to be used as an extension device, DDX should instead +call RegisterOtherDevice, passing the DeviceIntPtr returned by +AddInputDevice. + + + +A sample InitInput implementation is shown below. + + + + +InitInput(argc,argv) + { + int i, numdevs, ReadInput(); + DeviceIntPtr dev; + LocalDevice localdevs[LOCAL_MAX_DEVS]; + DeviceProc kbdproc, ptrproc, extproc; + + /************************************************************** + * Open the appropriate input devices, determine which are + * available, and choose an X pointer and X keyboard device + * in some implementation-dependent manner. + ***************************************************************/ + + open_input_devices (&numdevs, localdevs); + + /************************************************************** + * Register a WakeupHandler to handle input when it is generated. + ***************************************************************/ + + RegisterBlockAndWakeupHandlers (NoopDDA, ReadInput, NULL); + + /************************************************************** + * Register the input devices with DIX. + ***************************************************************/ + + for (i=0; i<numdevs; i++) + { + if (localdevs[i].use == IsXKeyboard) + { + dev = AddInputDevice (kbdproc, TRUE); + RegisterKeyboardDevice (dev); + } + else if (localdevs[i].use == IsXPointer) + { + dev = AddInputDevice (ptrproc, TRUE); + RegisterPointerDevice (dev); + } + else + { + dev = AddInputDevice (extproc, FALSE); + RegisterOtherDevice (dev); + } + if (dev == NULL) + FatalError ("Too many input devices."); + dev->devicePrivate = (pointer) &localdevs[i]; + } + + + + +Initialization Called From InitAndStartDevices + + +After InitInput has returned, +InitAndStartDevices is the DIX routine that is called to enable input devices. +It calls the device control routine that was passed to AddInputDevice, +with a mode value of DEVICE_INIT. The action taken by the device control +routine depends on how the device is to be used. If the device is to be +the X pointer, the device control routine should call +InitPointerDeviceStruct to initialize it. If the device is to be the +X keyboard, the device control routine should call +InitKeyboardDeviceStruct. Since input extension devices may support various +combinations of keys, buttons, valuators, and feedbacks, +each class of input that it supports must be initialized. +Entry points are defined by DIX to initialize each of the supported classes of +input, and are described in the following sections. + + + +A sample device control routine called from InitAndStartDevices is +shown below. + + + + +Bool extproc (dev, mode) + DeviceIntPtr dev; + int mode; + { + LocalDevice *localdev = (LocalDevice *) dev->devicePrivate; + + switch (mode) + { + case DEVICE_INIT: + if (strcmp(localdev->name, XI_TABLET) == 0) + { + /**************************************************** + * This device reports proximity, has buttons, + * reports two axes of motion, and can be focused. + * It also supports the same feedbacks as the X pointer + * (acceleration and threshold can be set). + ****************************************************/ + + InitButtonClassDeviceStruct (dev, button_count, button_map); + InitValuatorClassDeviceStruct (dev, localdev->n_axes,); + motionproc, MOTION_BUF_SIZE, Absolute); + for (i=0; i<localdev->n_axes; i++) + InitValuatorAxisStruct (dev, i, min_val, max_val, + resolution); + InitFocusClassDeviceStruct (dev); + InitProximityClassDeviceStruct (dev); + InitPtrFeedbackClassDeviceStruct (dev, p_controlproc); + } + else if (strcmp(localdev->name, XI_BUTTONBOX) == 0) + { + /**************************************************** + * This device has keys and LEDs, and can be focused. + ****************************************************/ + + InitKeyClassDeviceStruct (dev, syms, modmap); + InitFocusClassDeviceStruct (dev); + InitLedFeedbackClassDeviceStruct (dev, ledcontrol); + } + else if (strcmp(localdev->name, XI_KNOBBOX) == 0) + { + /**************************************************** + * This device reports motion. + * It can be focused. + ****************************************************/ + + InitValuatorClassDeviceStruct (dev, localdev->n_axes,); + motionproc, MOTION_BUF_SIZE, Absolute); + for (i=0; i<localdev->n_axes; i++) + InitValuatorAxisStruct (dev, i, min_val, max_val, + resolution); + InitFocusClassDeviceStruct (dev); + } + localdev->atom = + MakeAtom(localdev->name, strlen(localdev->name), FALSE); + AssignTypeAndName (dev, localdev->atom, localdev->name); + break; + case DEVICE_ON: + AddEnabledDevice (localdev->file_ds); + dev->on = TRUE; + break; + case DEVICE_OFF: + dev->on = FALSE; + RemoveEnabledDevice (localdev->file_ds); + break; + case DEVICE_CLOSE: + break; + } + } + + + + +The device control routine is called with a mode value of DEVICE_ON +by the DIX routine EnableDevice, which is called from InitAndStartDevices. +When called with this mode, it should call AddEnabledDevice to cause the +server to begin checking for available input from this device. + + + +>From InitAndStartDevices, EnableDevice is called for all devices that have +the "inited" and "startup" fields in the DeviceIntRec set to TRUE. The +"inited" field is set by InitAndStartDevices to the value returned by +the deviceproc when called with a mode value of DEVICE_INIT. The "startup" +field is set by AddInputDevice to value of the second parameter (autoStart). + + + +When the server is first initialized, it should only be checking for input +from the core X keyboard and pointer. One way to accomplish this is to +call AddInputDevice for the core X keyboard and pointer with an +autoStart value equal to TRUE, while calling AddInputDevice for +input extension devices with an autoStart value equal to FALSE. If this is +done, EnableDevice will skip all input extension devices during server +initialization. In this case, +the OpenInputDevice routine should set the "startup" field to TRUE +when called for input extension devices. This will cause ProcXOpenInputDevice +to call EnableDevice for those devices when a client first does an +XOpenDevice request. + + + +DIX Input Class Initialization Routines + + +DIX routines are defined to initialize each of the defined input classes. +The defined classes are: + + + + + + +KeyClass - the device has keys. + + + + +ButtonClass - the device has buttons. + + + + +ValuatorClass - the device reports motion data or positional data. + + + + +Proximitylass - the device reports proximity information. + + + + +FocusClass - the device can be focused. + + + + +FeedbackClass - the device supports some kind of feedback + + + + + + + +DIX routines are provided to initialize the X pointer and keyboard, as in +previous releases of X. During X initialization, InitPointerDeviceStruct +is called to initialize the X pointer, and InitKeyboardDeviceStruct is +called to initialize the X keyboard. There is no +corresponding routine for extension input devices, since they do not all +support the same classes of input. Instead, DDX is responsible for the +initialization of the input classes supported by extension devices. +A description of the routines provided by DIX to perform that initialization +follows. + + +InitKeyClassDeviceStruct + + +This function is provided to allocate and initialize a KeyClassRec, and +should be called for extension devices that have keys. It is passed a pointer +to the device, and pointers to arrays of keysyms and modifiers reported by +the device. It returns FALSE if the KeyClassRec could not be allocated, +or if the maps for the keysyms and and modifiers could not be allocated. +Its parameters are: + + + + +Bool +InitKeyClassDeviceStruct(dev, pKeySyms, pModifiers) + DeviceIntPtr dev; + KeySymsPtr pKeySyms; + CARD8 pModifiers[]; + + + + +The DIX entry point InitKeyboardDeviceStruct calls this routine for the +core X keyboard. It must be called explicitly for extension devices +that have keys. + + + +InitButtonClassDeviceStruct + + +This function is provided to allocate and initialize a ButtonClassRec, and +should be called for extension devices that have buttons. It is passed a +pointer to the device, the number of buttons supported, and a map of the +reported button codes. It returns FALSE if the ButtonClassRec could not be +allocated. Its parameters are: + + + + +Bool +InitButtonClassDeviceStruct(dev, numButtons, map) + register DeviceIntPtr dev; + int numButtons; + CARD8 *map; + + + + +The DIX entry point InitPointerDeviceStruct calls this routine for the +core X pointer. It must be called explicitly for extension devices that +have buttons. + + + +InitValuatorClassDeviceStruct + + +This function is provided to allocate and initialize a ValuatorClassRec, and +should be called for extension devices that have valuators. It is passed the +number of axes of motion reported by the device, the address of the motion +history procedure for the device, the size of the motion history buffer, +and the mode (Absolute or Relative) of the device. It returns FALSE if +the ValuatorClassRec could not be allocated. Its parameters are: + + + + +Bool +InitValuatorClassDeviceStruct(dev, numAxes, motionProc, numMotionEvents, mode) + DeviceIntPtr dev; + int (*motionProc)(); + int numAxes; + int numMotionEvents; + int mode; + + + + +The DIX entry point InitPointerDeviceStruct calls this routine for the +core X pointer. It must be called explicitly for extension devices that +report motion. + + + +InitValuatorAxisStruct + + +This function is provided to initialize an XAxisInfoRec, and +should be called for core and extension devices that have valuators. +The space for the XAxisInfoRec is allocated by +the InitValuatorClassDeviceStruct function, but is not initialized. + + + +InitValuatorAxisStruct should be called once for each axis of motion +reported by the device. Each +invocation should be passed the axis number (starting with 0), the +minimum value for that axis, the maximum value for that axis, and the +resolution of the device in counts per meter. If the device reports +relative motion, 0 should be reported as the minimum and maximum values. +InitValuatorAxisStruct has the following parameters: + +InitValuatorAxisStruct(dev, axnum, minval, maxval, resolution) + DeviceIntPtr dev; + int axnum; + int minval; + int maxval; + int resolution; + + + + +This routine is not called by InitPointerDeviceStruct for the +core X pointer. It must be called explicitly for core and extension devices +that report motion. + + + +InitFocusClassDeviceStruct + + +This function is provided to allocate and initialize a FocusClassRec, and +should be called for extension devices that can be focused. It is passed a +pointer to the device, and returns FALSE if the allocation fails. +It has the following parameter: + +Bool +InitFocusClassDeviceStruct(dev) + DeviceIntPtr dev; + + + + +The DIX entry point InitKeyboardDeviceStruct calls this routine for the +core X keyboard. It must be called explicitly for extension devices +that can be focused. Whether or not a particular device can be focused +is left implementation-dependent. + + + +InitProximityClassDeviceStruct + + +This function is provided to allocate and initialize a ProximityClassRec, and +should be called for extension absolute pointing devices that report proximity. +It is passed a pointer to the device, and returns FALSE if the allocation fails. +It has the following parameter: + +Bool +InitProximityClassDeviceStruct(dev) + DeviceIntPtr dev; + + + + +Initializing Feedbacks + + + + +InitKbdFeedbackClassDeviceStruct + + +This function is provided to allocate and initialize a KbdFeedbackClassRec, and +may be called for extension devices that support some or all of the +feedbacks that the core keyboard supports. It is passed a +pointer to the device, a pointer to the procedure that sounds the bell, +and a pointer to the device control procedure. +It returns FALSE if the allocation fails, and has the following parameters: + +Bool +InitKbdFeedbackClassDeviceStruct(dev, bellProc, controlProc) + DeviceIntPtr dev; + void (*bellProc)(); + void (*controlProc)(); + +The DIX entry point InitKeyboardDeviceStruct calls this routine for the +core X keyboard. It must be called explicitly for extension devices +that have the same feedbacks as a keyboard. Some feedbacks, such as LEDs and +bell, can be supported either with a KbdFeedbackClass or with BellFeedbackClass +and LedFeedbackClass feedbacks. + + + +InitPtrFeedbackClassDeviceStruct + + +This function is provided to allocate and initialize a PtrFeedbackClassRec, and +should be called for extension devices that allow the setting of acceleration +and threshold. It is passed a pointer to the device, +and a pointer to the device control procedure. +It returns FALSE if the allocation fails, and has the following parameters: + +Bool +InitPtrFeedbackClassDeviceStruct(dev, controlProc) + DeviceIntPtr dev; + void (*controlProc)(); + + + + +The DIX entry point InitPointerDeviceStruct calls this routine for the +core X pointer. It must be called explicitly for extension devices +that support the setting of acceleration and threshold. + + + +InitLedFeedbackClassDeviceStruct + + +This function is provided to allocate and initialize a LedFeedbackClassRec, and +should be called for extension devices that have LEDs. +It is passed a pointer to the device, +and a pointer to the device control procedure. +It returns FALSE if the allocation fails, and has the following parameters: + +Bool +InitLedFeedbackClassDeviceStruct(dev, controlProc) + DeviceIntPtr dev; + void (*controlProc)(); + + + + +Up to 32 LEDs per feedback can be supported, and a device may have +multiple feedbacks of the same type. + + + +InitBellFeedbackClassDeviceStruct + + +This function is provided to allocate and initialize a BellFeedbackClassRec, +and should be called for extension devices that have a bell. +It is passed a pointer to the device, +and a pointer to the device control procedure. +It returns FALSE if the allocation fails, and has the following parameters: + +Bool +InitBellFeedbackClassDeviceStruct(dev, bellProc, controlProc) + DeviceIntPtr dev; + void (*bellProc)(); + void (*controlProc)(); + + + + +InitStringFeedbackClassDeviceStruct + + +This function is provided to allocate and initialize a StringFeedbackClassRec, +and should be called for extension devices that have a display upon which a +string can be displayed. +It is passed a pointer to the device, +and a pointer to the device control procedure. +It returns FALSE if the allocation fails, and has the following parameters: + +Bool +InitStringFeedbackClassDeviceStruct(dev, controlProc, max_symbols, + num_symbols_supported, symbols) + DeviceIntPtr dev; + void (*controlProc)(); + int max_symbols: + int num_symbols_supported; + KeySym *symbols; + + + + +InitIntegerFeedbackClassDeviceStruct + + +This function is provided to allocate and initialize an +IntegerFeedbackClassRec, +and should be called for extension devices that have a display upon which an +integer can be displayed. +It is passed a pointer to the device, +and a pointer to the device control procedure. +It returns FALSE if the allocation fails, and has the following parameters: + +Bool +InitIntegerFeedbackClassDeviceStruct(dev, controlProc) + DeviceIntPtr dev; + void (*controlProc)(); + + + + + + +Initializing The Device Name And Type + + +The device name and type can be initialized by calling AssignTypeAndName +with the following parameters: + +void +AssignTypeAndName(dev, type, name) + DeviceIntPtr dev; + Atom type; + char *name; + + + + +This will allocate space for the device name and copy the name that was passed. +The device type can be obtained by calling MakeAtom with one of the names +defined for input devices. MakeAtom has the following parameters: + +Atom +MakeAtom(name, len, makeit) + char *name; + int len; + Bool makeit; + + + + +Since the atom was already made when the input extension was initialized, the +value of makeit should be FALSE; + + + + +Closing Extension Devices + + +The DisableDevice entry point is provided by DIX to disable input devices. +It calls the device control routine for the specified +device with a mode value of DEVICE_OFF. The device control routine should +call RemoveEnabledDevice to stop the server from checking for input from +that device. + + + +DisableDevice is not called by any input extension routines. It can be +called from the CloseInputDevice routine, which is called by +ProcXCloseDevice when a client makes an XCloseDevice request. If +DisableDevice is called, it should only be called when the last client +using the extension device has terminated or called XCloseDevice. + + + +Implementation-Dependent Routines + + +Several input extension protocol requests have +implementation-dependent entry points. Default routines +are defined for these entry points and contained in the source +file extensions/server/xinput/xstubs.c. Some implementations may +be able to use the default routines without change. +The following sections describe each of these routines. + + +AddOtherInputDevices + + +AddOtherInputDevice is called from ProcXListInputDevices as a result of +an XListInputDevices protocol request. It may be needed by +implementations that do not open extension input devices until requested +to do so by some client. These implementations may not initialize +all devices when the X server starts up, because some of those devices +may be in use. Since the XListInputDevices +function only lists those devices that have been initialized, +AddOtherInputDevices is called to give DDX a chance to +initialize any previously unavailable input devices. + + + +A sample AddOtherInputDevices routine might look like the following: + +void +AddOtherInputDevices () + { + DeviceIntPtr dev; + int i; + + for (i=0; i<MAX_DEVICES; i++) + { + if (!local_dev[i].initialized && available(local_dev[i])) + { + dev = (DeviceIntPtr) AddInputDevice (local_dev[i].deviceProc, TRUE); + dev->public.devicePrivate = local_dev[i]; + RegisterOtherDevice (dev); + dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); + } + } + } + + + + +The default AddOtherInputDevices routine in xstubs.c does nothing. +If all input extension devices are initialized when the server +starts up, it can be left as a null routine. + + + +OpenInputDevice + + +Some X server implementations open all input devices when the server +is initialized and never close them. Other implementations may open only +the X pointer and keyboard devices during server initialization, +and open other input devices only when some client makes an +XOpenDevice request. This entry point is for the latter type of +implementation. + + + +If the physical device is not already open, it can be done in this routine. +In this case, the server must keep track of the fact that one or more clients +have the device open, and physically close it when the last client that has +it open makes an XCloseDevice request. + + + +The default implementation is to do nothing (assume all input devices +are opened during X server initialization and kept open). + + + +CloseInputDevice + + +Some implementations may close an input device when the last client +using that device requests that it be closed, or terminates. +CloseInputDevice is called from ProcXCloseDevice when a client +makes an XCloseDevice protocol request. + + + +The default implementation is to do nothing (assume all input devices +are opened during X server initialization and kept open). + + + +SetDeviceMode + + +Some implementations support input devices that can report +either absolute positional data or relative motion. The XSetDeviceMode +protocol request is provided to allow DDX to change the current mode of +such a device. + + + +The default implementation is to always return a BadMatch error. If the +implementation does not support any input devices that are capable of +reporting both relative motion and absolute position information, the +default implementation may be left unchanged. + + + +SetDeviceValuators + + +Some implementations support input devices that allow their valuators to be +set to an initial value. The XSetDeviceValuators +protocol request is provided to allow DDX to set the valuators of +such a device. + + + +The default implementation is to always return a BadMatch error. If the +implementation does not support any input devices that are allow their +valuators to be set, the default implementation may be left unchanged. + + + +ChangePointerDevice + + +The XChangePointerDevice protocol request is provided to change which device is +used as the X pointer. Some implementations may maintain information +specific to the X pointer in the private data structure pointed to by +the DeviceIntRec. ChangePointerDevice is called to allow such +implementations to move that information to the new pointer device. +The current location of the X cursor is an example of the type of +information that might be affected. + + + +The DeviceIntRec structure that describes the X pointer device does not +contain a FocusRec. If the device that has been made into the new X pointer +was previously a device that could be focused, ProcXChangePointerDevice will +free the FocusRec associated with that device. + + + +If the server implementation desires to allow clients to focus the old pointer +device (which is now accessible through the input extension), it should call +InitFocusClassDeviceStruct for the old pointer device. + + + +The XChangePointerDevice protocol request also allows the client +to choose which axes of the new pointer device are used to move +the X cursor in the X- and Y- directions. If the axes are different +than the default ones, the server implementation should record that fact. + + + +If the server implementation supports input devices with valuators that +are not allowed to be used as the X pointer, they should be screened out +by this routine and a BadDevice error returned. + + + +The default implementation is to do nothing. + + + +ChangeKeyboardDevice + + +The XChangeKeyboardDevice protocol request is provided to change which device is +used as the X keyboard. Some implementations may maintain information +specific to the X keyboard in the private data structure pointed to by +the DeviceIntRec. ChangeKeyboardDevice is called to allow such +implementations to move that information to the new keyboard device. + + + +The X keyboard device can be focused, and the DeviceIntRec that describes +that device has a FocusRec. If the device that has been made into the new X +keyboard did not previously have a FocusRec, +ProcXChangeKeyboardDevice will allocate one for it. + + + +If the implementation does not want clients to be able to focus the old X +keyboard (which has now become available as an input extension device) +it should call DeleteFocusClassDeviceStruct to free the FocusRec. + + + +If the implementation supports input devices with keys that are not allowed +to be used as the X keyboard, they should be checked for here, and a +BadDevice error returned. + + + +The default implementation is to do nothing. + + + + +Input Extension Events + + +Events accessed through the input extension are analogous to the core input +events, but have different event types. They are of types +DeviceKeyPress, DeviceKeyRelease, DeviceButtonPress, +DeviceButtonRelease, DeviceDeviceMotionNotify, +DeviceProximityIn, DeviceProximityOut, and DeviceValuator. +These event types are not constants. Instead, they are external integers +defined by the input extension. Their actual values will depend on which +extensions are supported by a server, and the order in which they are +initialized. + + + +The data structures that define these +events are defined in the file extensions/include/XIproto.h. Other +input extension constants needed by DDX are defined in the file +extensions/include/XI.h. + + + +Some events defined by the input extension contain more information than can +be contained in the 32-byte xEvent data structure. To send this information +to clients, DDX must generate two or more 32-byte wire events. The following +sections describe the contents of these events. + + +Device Key Events + + +DeviceKeyPresss events contain all the information that is contained in +a core KeyPress event, and also the following additional information: + + + + + + + + + +deviceid - the identifier of the device that generated the event. + + + + +device_state - the state of any modifiers on the device that generated the event + + + + +num_valuators - the number of valuators reported in this event. + + + + +first_valuator - the first valuator reported in this event. + + + + +valuator0 through valuator5 - the values of the valuators. + + + + + + + +In order to pass this information to the input extension library, two 32-byte +wire events must be generated by DDX. The first has an event type of +DeviceKeyPress, and the second has an event type of \fPDeviceValuator\fP. + + + +The following code fragment shows how the two wire events could be initialized: + + + + + extern int DeviceKeyPress; + DeviceIntPtr dev; + xEvent xE[2]; + CARD8 id, num_valuators; + INT16 x, y, pointerx, pointery; + Time timestamp; + deviceKeyButtonPointer *xev = (deviceKeyButtonPointer *) xE; + deviceValuator *xv; + + xev->type = DeviceKeyPress; /* defined by input extension */ + xev->detail = keycode; /* key pressed on this device */ + xev->time = timestamp; /* same as for core events */ + xev->rootX = pointerx; /* x location of core pointer */ + xev->rootY = pointery; /* y location of core pointer */ + + /******************************************************************/ + /* */ + /* The following field does not exist for core input events. */ + /* It contains the device id for the device that generated the */ + /* event, and also indicates whether more than one 32-byte wire */ + /* event is being sent. */ + /* */ + /******************************************************************/ + + xev->deviceid = dev->id | MORE_EVENTS; /* sending more than 1*/ + + /******************************************************************/ + /* Fields in the second 32-byte wire event: */ + /******************************************************************/ + + xv = (deviceValuator *) ++xev; + xv->type = DeviceValuator; /* event type of second event */ + xv->deviceid = dev->id; /* id of this device */ + xv->num_valuators = 0; /* no valuators being sent */ + xv->device_state = 0; /* will be filled in by DIX */ + + + + +Device Button Events + + +DeviceButton events contain all the information that is contained in +a core button event, and also the same additional information that a +DeviceKey event contains. + + + +Device Motion Events + + +DeviceMotion events contain all the information that is contained in +a core motion event, and also additional valuator information. At least +two wire events are required to contain this information. +The following code fragment shows how the two wire events could be initialized: + + + + + extern int DeviceMotionNotify; + DeviceIntPtr dev; + xEvent xE[2]; + CARD8 id, num_valuators; + INT16 x, y, pointerx, pointery; + Time timestamp; + deviceKeyButtonPointer *xev = (deviceKeyButtonPointer *) xE; + deviceValuator *xv; + + xev->type = DeviceMotionNotify; /* defined by input extension */ + xev->detail = keycode; /* key pressed on this device */ + xev->time = timestamp; /* same as for core events */ + xev->rootX = pointerx; /* x location of core pointer */ + xev->rootY = pointery; /* y location of core pointer */ + + /******************************************************************/ + /* */ + /* The following field does not exist for core input events. */ + /* It contains the device id for the device that generated the */ + /* event, and also indicates whether more than one 32-byte wire */ + /* event is being sent. */ + /* */ + /******************************************************************/ + + xev->deviceid = dev->id | MORE_EVENTS; /* sending more than 1*/ + + /******************************************************************/ + /* Fields in the second 32-byte wire event: */ + /******************************************************************/ + + xv = (deviceValuator *) ++xev; + xv->type = DeviceValuator; /* event type of second event */ + xv->deviceid = dev->id; /* id of this device */ + xv->num_valuators = 2; /* 2 valuators being sent */ + xv->first_valuator = 0; /* first valuator being sent */ + xv->device_state = 0; /* will be filled in by DIX */ + xv->valuator0 = x; /* first axis of this device */ + xv->valuator1 = y; /* second axis of this device */ + + + + +Up to six axes can be reported in the deviceValuator event. If the device +is reporting more than 6 axes, additional pairs of DeviceMotionNotify and +DeviceValuator events should be sent, with the first_valuator field +set correctly. + + + +Device Proximity Events + + +Some input devices that report absolute positional information, such as +graphics tablets and touchscreens, may report proximity events. +ProximityIn +events are generated when a pointing device like a stylus, or in the case +of a touchscreen, the user's finger, comes into close proximity with the +surface of the input device. ProximityOut events are generated when +the stylus or finger leaves the proximity of the input devices surface. + + + +Proximity events contain almost the same information as button events. +The event type is ProximityIn or ProximityOut, and there is no +detail information. + + + + + + + + diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml new file mode 100644 index 0000000..cd1a9d0 --- /dev/null +++ b/doc/Xserver-spec.xml @@ -0,0 +1,5116 @@ + + %xorg-defs; + %defs; +]> + +
+ + Definition of the Porting Layer for the X v11 Sample Server + X Porting Layer + + SusanAngebranndt + Digital Equipment Corporation + + + RaymondDrewry + Digital Equipment Corporation + + + PhilipKarlton + Digital Equipment Corporation + + + ToddNewman + Digital Equipment Corporation + + + BobScheifler + Massachusetts Institute of Technology + + + KeithPackard + MIT X Consortium + + + DavidP.Wiggins + X Consortium + + + JimGettys + X.org Foundation and Hewlett Packard + + The X.Org Foundation + X Version 11, Release &fullrelvers; + X Server Version &xserver.version; + 1994X Consortium, Inc. + 2004X.org Foundation, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + LK201 and DEC are trademarks of Digital Equipment Corporation. Macintosh and Apple are trademarks of Apple Computer, Inc. PostScript is a trademark of Adobe Systems, Inc. Ethernet is a trademark of Xerox Corporation. X Window System is a trademark of the X.org Foundation, Inc. Cray is a trademark of Cray Research, Inc. + + &xserver.reldate; + + + 1.0 + 27 Oct 2004 + sa + Initial Version + + + 1.1 + 27 Oct 2004 + bs + Minor Revisions + + + 2.0 + 27 Oct 2004 + kp + Revised for Release 4 and 5 + + + 3.0 + 27 Oct 2004 + dpw + Revised for Release 6 + + + 3.1 + 27 Oct 2004 + jg + Revised for Release 6.8.2 + + + 3.2 + 17 Dec 2006 + efw + DocBook conversion + + + 3.3 + 17 Feb 2008 + aj + Revised for backing store changes + + + 3.4 + 31 Mar 2008 + efw + Revised for devPrivates changes + + + 3.5 + July 2010 + ac + Revised for Xorg 1.9 devPrivates changes + and 1.8 CreateNewResourceType changes + + + 3.6 + July 2012 + kp + Revised for X server 1.13 screen-specific devPrivates changes + + + + The following document explains the structure of the X Window System display server and the interfaces among the larger pieces. It is intended as a reference for programmers who are implementing an X Display Server on their workstation hardware. It is included with the X Window System source tape, along with the document "Strategies for Porting the X v11 Sample Server." The order in which you should read these documents is: + + Read the first section of the "Strategies for Porting" document (Overview of Porting Process). + Skim over this document (the Definition document). + Skim over the remainder of the Strategies document. + Start planning and working, referring to the Strategies and Definition documents. + + You may also want to look at the following documents: + + "The X Window System" for an overview of X. + "Xlib - C Language X Interface" for a view of what the client programmer sees. + "X Window System Protocol" for a terse description of the byte stream protocol between the client and server. + + + To understand this document and the accompanying source code, you should know the C language. You should be familiar with 2D graphics and windowing concepts such as clipping, bitmaps, fonts, etc. You should have a general knowledge of the X Window System. To implement the server code on your hardware, you need to know a lot about your hardware, its graphic display device(s), and (possibly) its networking and multitasking facilities. This document depends a lot on the source code, so you should have a listing of the code handy. + Some source in the distribution is directly compilable on your machine. Some of it will require modification. Other parts may have to be completely written from scratch. The distribution also includes source for a sample implementation of a display server which runs on a very wide variety of color and monochrome displays on Linux and *BSD which you will find useful for implementing any type of X server. + Note to the 2008 edition: at this time this document must be considered incomplete, though improved over the 2004 edition. In particular, the new Render extension is still lacking good documentation, and has become vital to high performance X implementations. Modern applications and desktop environments are now much more sensitive to good implementation of the Render extension than in most operations of the old X graphics model. The shadow frame buffer implementation is also very useful in many circumstances, and also needs documentation. We hope to rectify these shortcomings in our documentation in the future. Help would be greatly appreciated. + + + + + +
+ The X Window System + +The X Window System, or simply "X," is a +windowing system that provides high-performance, high-level, +device-independent graphics. + + +X is a windowing system designed for bitmapped graphic displays. +The display can have a +simple, monochrome display or it can have a color display with up to 32 bits +per pixel with a special graphics processor doing the work. (In this +document, monochrome means a black and white display with one bit per pixel. +Even though the usual meaning of monochrome is more general, this special +case is so common that we decided to reserve the word for this purpose.) +In practice, monochrome displays are now almost unheard of, with 4 bit +gray scale displays being the low end. + + +X is designed for a networking environment where +users can run applications on machines other than their own workstations. +Sometimes, the connection is over an Ethernet network with a protocol such as TCP/IP; +but, any "reliable" byte stream is allowable. +A high-bandwidth byte stream is preferable; RS-232 at +9600 baud would be slow without compression techniques. + + +X by itself allows great freedom of design. +For instance, it does not include any user interface standard. +Its intent is to "provide mechanism, not policy." +By making it general, it can be the foundation for a wide +variety of interactive software. + + +For a more detailed overview, see the document "The X Window System." +For details on the byte stream protocol, see "X Window System protocol." + +
+
+Overview of the Server + +The display server +manages windows and simple graphics requests +for the user on behalf of different client applications. +The client applications can be running on any machine on the network. +The server mainly does three things: + + Responds to protocol requests from existing clients (mostly graphic and text drawing commands) + Sends device input (keystrokes and mouse actions) and other events to existing clients + Maintains client connections + + + +The server code is organized into four major pieces: + + Device Independent (DIX) layer - code shared among all implementations + Operating System (OS) layer - code that is different for each operating system but is shared among all graphic devices for this operating system + Device Dependent (DDX) layer - code that is (potentially) different for each combination of operating system and graphic device + Extension Interface - a standard way to add features to the X server + + + +The "porting layer" consists of the OS and DDX layers; these are +actually parallel and neither one is on top of the other. +The DIX layer is intended to be portable +without change to target systems and is not +detailed here, although several routines +in DIX that are called by DDX are +documented. +Extensions incorporate new functionality into the server; and require +additional functionality over a simple DDX. + + +The following sections outline the functions of the layers. +Section 3 briefly tells what you need to know about the DIX layer. +The OS layer is explained in Section 4. +Section 5 gives the theory of operation and procedural interface for the +DDX layer. +Section 6 describes the functions which exist for the extension writer. + +
+ +
+ DIX Layer + +The DIX layer is the machine and device independent part of X. +The source should be common to all operating systems and devices. +The port process should not include changes to this part, therefore internal interfaces to DIX +modules are not discussed, except for public interfaces to the DDX and the OS layers. +The functions described in this section are available for extension writers to use. + + +In the process of getting your server to work, if +you think that DIX must be modified for purposes other than bug fixes, +you may be doing something wrong. +Keep looking for a more compatible solution. +When the next release of the X server code is available, +you should be able to just drop in the new DIX code and compile it. +If you change DIX, +you will have to remember what changes you made and will have +to change the new sources before you can update to the new version. + + +The heart of the DIX code is a loop called the dispatch loop. +Each time the processor goes around the loop, it sends off accumulated input events +from the input devices to the clients, and it processes requests from the clients. +This loop is the most organized way for the server to +process the asynchronous requests that +it needs to process. +Most of these operations are performed by OS and DDX routines that you must supply. + +
+ Server Resource System + +X resources are C structs inside the server. +Client applications create and manipulate these objects +according to the rules of the X byte stream protocol. +Client applications refer to resources with resource IDs, +which are 32-bit integers that are sent over the network. +Within the server, of course, they are just C structs, and we refer to them +by pointers. + +
+ Pre-Defined Resource Types + +The DDX layer has several kinds of resources: + +Window +Pixmap +Screen +Device +Colormap +Font +Cursor +Graphics Contexts + + + +The type names of the more +important server +structs usually end in "Rec," such as "DeviceRec;" +the pointer types usually end in "Ptr," such as "DevicePtr." + + +The structs and +important defined constants are declared +in .h files that have names that suggest the name of the object. +For instance, there are two .h files for windows, +window.h and windowstr.h. +window.h defines only what needs to be defined in order to use windows +without peeking inside of them; +windowstr.h defines the structs with all of their components in great detail +for those who need it. + + +Three kinds of fields are in these structs: + +Attribute fields - struct fields that contain values like normal structs +Pointers to procedures, or structures of procedures, that operate on the object +A single private field or a devPrivates list (see ) +used by your DDX code to store private data. + + + +DIX calls through +the struct's procedure pointers to do its tasks. +These procedures are set either directly or indirectly by DDX procedures. +Most of +the procedures described in the remainder of this +document are accessed through one of these structs. +For example, the procedure to create a pixmap +is attached to a ScreenRec and might be called by using the expression + + +
+(* pScreen->CreatePixmap)(pScreen, width, height, depth). +
+
+ +All procedure pointers must be set to some routine unless noted otherwise; +a null pointer will have unfortunate consequences. + + +Procedure routines will be indicated in the documentation by this convention: +
+void pScreen->MyScreenRoutine(arg, arg, ...) +
+as opposed to a free routine, not in a data structure: +
+void MyFreeRoutine(arg, arg, ...) +
+
+ +The attribute fields are mostly set by DIX; DDX should not modify them +unless noted otherwise. + +
+
+ Creating Resources and Resource Types + +These functions should also be called from your extensionInitProc to +allocate all of the various resource classes and types required for +the extension. Each time the server resets, these types must be reallocated +as the old allocations will have been discarded. +Resource types are integer values starting at 1. Get +a resource type by calling +
+ + RESTYPE CreateNewResourceType(deleteFunc, char *name) + +
+deleteFunc will be called to destroy all resources with this +type. name will be used to identify this type of resource +to clients using the X-Resource extension, to security +extensions such as SELinux, and to tracing frameworks such as DTrace. +[The name argument was added in xorg-server 1.8.] +
+ +Resource classes are masks starting at 1 << 31 which can +be or'ed with any resource type to provide attributes for the +type. To allocate a new class bit, call +
+ + RESTYPE CreateNewResourceClass() + +
+
+ +There are two ways of looking up resources, by type or +by class. Classes are non-exclusive subsets of the space of +all resources, so you can lookup the union of multiple classes. +(RC_ANY is the union of all classes). + +Note that the appropriate class bits must be or'ed into the value returned +by CreateNewResourceType when calling resource lookup functions. + +If you need to create a ``private'' resource ID for internal use, you +can call FakeClientID. +
+ + XID FakeClientID(client) + int client; + +
+This allocates from ID space reserved for the server.
+ +To associate a resource value with an ID, use AddResource. +
+ + Bool AddResource(id, type, value) + XID id; + RESTYPE type; + pointer value; + +
+The type should be the full type of the resource, including any class +bits. If AddResource fails to allocate memory to store the resource, +it will call the deleteFunc for the type, and then return False.
+ +To free a resource, use one of the following. +
+ + void FreeResource(id, skipDeleteFuncType) + XID id; + RESTYPE skipDeleteFuncType; + + void FreeResourceByType(id, type, skipFree) + XID id; + RESTYPE type; + Bool skipFree; + +
+FreeResource frees all resources matching the given id, regardless of +type; the type's deleteFunc will be called on each matching resource, +except that skipDeleteFuncType can be set to a single type for which +the deleteFunc should not be called (otherwise pass RT_NONE). +FreeResourceByType frees a specific resource matching a given id +and type; if skipFree is true, then the deleteFunc is not called. +
+
+
+ Looking Up Resources + +To look up a resource, use one of the following. +
+ + int dixLookupResourceByType( + pointer *result, + XID id, + RESTYPE rtype, + ClientPtr client, + Mask access_mode); + + int dixLookupResourceByClass( + pointer *result, + XID id, + RESTYPE rclass, + ClientPtr client, + Mask access_mode); + +
+dixLookupResourceByType finds a resource with the given id and exact type. +dixLookupResourceByClass finds a resource with the given id whose type is +included in any one of the specified classes. +The client and access_mode must be provided to allow security extensions to +check if the client has the right privileges for the requested access. +The bitmask values defined in the dixaccess.h header are or'ed together +to define the requested access_mode. +
+
+
+
+ Callback Manager + +To satisfy a growing number of requests for the introduction of ad hoc +notification style hooks in the server, a generic callback manager was +introduced in R6. A callback list object can be introduced for each +new hook that is desired, and other modules in the server can register +interest in the new callback list. The following functions support +these operations. + +Before getting bogged down in the interface details, an typical usage +example should establish the framework. Let's look at the +ClientStateCallback in dix/dispatch.c. The purpose of this particular +callback is to notify interested parties when a client's state +(initial, running, gone) changes. The callback is "created" in this +case by simply declaring a variable: +
+ CallbackListPtr ClientStateCallback; +
+
+ +Whenever the client's state changes, the following code appears, which notifies +all interested parties of the change: +
+ if (ClientStateCallback) CallCallbacks(&ClientStateCallback, (pointer)client); +
+
+ +Interested parties subscribe to the ClientStateCallback list by saying: +
+ AddCallback(&ClientStateCallback, func, data); +
+
+ +When CallCallbacks is invoked on the list, func will be called thusly: +
+ (*func)(&ClientStateCallback, data, client) +
+
+ +Now for the details. +
+ + Bool AddCallback(pcbl, callback, subscriber_data) + CallbackListPtr *pcbl; + CallbackProcPtr callback; + pointer subscriber_data; + +
+Adds the (callback, subscriber_data) pair to the given callback list. Creates the callback +list if it doesn't exist. Returns TRUE if successful.
+ +
+ + Bool DeleteCallback(pcbl, callback, subscriber_data) + CallbackListPtr *pcbl; + CallbackProcPtr callback; + pointer subscriber_data; + +
+Removes the (callback, data) pair to the given callback list if present. +Returns TRUE if (callback, data) was found.
+ +
+ + void CallCallbacks(pcbl, call_data) + CallbackListPtr *pcbl; + pointer call_data; + +
+For each callback currently registered on the given callback list, call +it as follows: +
+ + (*callback)(pcbl, subscriber_data, call_data); +
+
+ +
+ void DeleteCallbackList(pcbl) + CallbackListPtr *pcbl; + +
+Destroys the given callback list.
+
+
+ Extension Interfaces + +This function should be called from your extensionInitProc which +should be called by InitExtensions. +
+ + ExtensionEntry *AddExtension(name, NumEvents,NumErrors, + MainProc, SwappedMainProc, CloseDownProc, MinorOpcodeProc) + + const char *name; /*Null terminate string; case matters*/ + int NumEvents; + int NumErrors; + int (* MainProc)(ClientPtr);/*Called if client matches server order*/ + int (* SwappedMainProc)(ClientPtr);/*Called if client differs from server*/ + void (* CloseDownProc)(ExtensionEntry *); + unsigned short (*MinorOpcodeProc)(ClientPtr); + +
+name is the name used by clients to refer to the extension. NumEvents is the +number of event types used by the extension, NumErrors is the number of +error codes needed by the extension. MainProc is called whenever a client +accesses the major opcode assigned to the extension. SwappedMainProc is +identical, except the client using the extension has reversed byte-sex. +CloseDownProc is called at server reset time to deallocate any private +storage used by the extension. MinorOpcodeProc is used by DIX to place the +appropriate value into errors. The DIX routine StandardMinorOpcode can be +used here which takes the minor opcode from the normal place in the request +(i.e. just after the major opcode).
+
+
+ Macros and Other Helpers + +There are a number of macros in Xserver/include/dix.h which +are useful to the extension writer. Ones of particular interest +are: REQUEST, REQUEST_SIZE_MATCH, REQUEST_AT_LEAST_SIZE, +REQUEST_FIXED_SIZE, LEGAL_NEW_RESOURCE, and +VALIDATE_DRAWABLE_AND_GC. Useful byte swapping macros can be found +in Xserver/include/dix.h: WriteReplyToClient and WriteSwappedDataToClient; and +in Xserver/include/misc.h: 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 pointer, 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(pScreen, pTimeout, pReadmask) + ScreenPtr pScreen; + pointer pTimeout; + pointer pReadmask; + +
+The arguments are a pointer to the Screen, and the arguments to the +DIX BlockHandler(). +
+ +Immediately after WaitForSomething returns from the +block, even if it didn't actually block, it must call the DIX routine +WakeupHandler(). +
+ + void WakeupHandler(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(pScreen, result, pReadmask) + ScreenPtr pScreen; + unsigned long result; + pointer pReadmask; + +
+The arguments are the Screen, of the Screen, and the arguments to +the DIX WakeupHandler(). +
+ +In addition to the per-screen BlockHandlers, any module may register +block and wakeup handlers (only together) using: +
+ + Bool RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData) + 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; + OsTimerPtr 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 through 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 facilities reimplemented to use Timers. +These functions are TimerInit, TimerForce, TimerSet, TimerCheck, TimerCancel, +and TimerFree, as defined in Xserver/include/os.h. A callback function will be called +when the timer fires, along with the current time, and a user provided argument. +
+ typedef struct _OsTimerRec *OsTimerPtr; + + typedef CARD32 (*OsTimerCallback)( + OsTimerPtr /* timer */, + CARD32 /* time */, + pointer /* arg */); + + OsTimerPtr TimerSet( OsTimerPtr /* timer */, + int /* flags */, + CARD32 /* millis */, + OsTimerCallback /* func */, + pointer /* arg */); + +
+
+ +TimerSet returns a pointer to a timer structure and sets a timer to the specified time +with the specified argument. The flags can be TimerAbsolute and TimerForceOld. +The TimerSetOld flag controls whether if the timer is reset and the timer is pending, the +whether the callback function will get called. +The TimerAbsolute flag sets the callback time to an absolute time in the future rather +than a time relative to when TimerSet is called. +TimerFree should be called to free the memory allocated +for the timer entry. +
+ void TimerInit(void) + + Bool TimerForce(OsTimerPtr /* pTimer */) + + void TimerCheck(void); + + void TimerCancel(OsTimerPtr /* pTimer */) + + void TimerFree(OsTimerPtr /* pTimer */) +
+
+ +TimerInit frees any existing timer entries. TimerForce forces a call to the timer's +callback function and returns true if the timer entry existed, else it returns false and +does not call the callback function. TimerCancel will cancel the specified timer. +TimerFree calls TimerCancel and frees the specified timer. +Calling TimerCheck will force the server to see if any timer callbacks should be called. + +
+
+
+ New Client Connections + +The process whereby a new client-server connection starts up is +very dependent upon what your byte stream mechanism. +This section describes byte stream initiation using examples from the TCP/IP +implementation on the sample server. + + +The first thing that happens is a client initiates a connection with the server. +How a client knows to do this depends upon your network facilities and the +Xlib implementation. +In a typical scenario, a user named Fred +on his X workstation is logged onto a Cray +supercomputer running a command shell in an X window. Fred can type shell +commands and have the Cray respond as though the X server were a dumb terminal. +Fred types in a command to run an X client application that was linked with Xlib. +Xlib looks at the shell environment variable DISPLAY, which has the +value "fredsbittube:0.0." +The host name of Fred's workstation is "fredsbittube," and the 0s are +for multiple screens and multiple X server processes. +(Precisely what +happens on your system depends upon how X and Xlib are implemented.) + + +The client application calls a TCP routine on the +Cray to open a TCP connection for X +to communicate with the network node "fredsbittube." +The TCP software on the Cray does this by looking up the TCP +address of "fredsbittube" and sending an open request to TCP port 6000 +on fredsbittube. + + +All X servers on TCP listen for new clients on port 6000 by default; +this is known as a "well-known port" in IP terminology. + + +The server receives this request from its port 6000 +and checks where it came from to see if it is on the server's list +of "trustworthy" hosts to talk to. +Then, it opens another port for communications with the client. +This is the byte stream that all X communications will go over. + + +Actually, it is a bit more complicated than that. +Each X server process running on the host machine is called a "display." +Each display can have more than one screen that it manages. +"corporatehydra:3.2" represents screen 2 on display 3 on +the multi-screened network node corporatehydra. +The open request would be sent on well-known port number 6003. + + +Once the byte stream is set up, what goes on does not depend very much +upon whether or not it is TCP. +The client sends an xConnClientPrefix struct (see Xproto.h) that has the +version numbers for the version of Xlib it is running, some byte-ordering information, +and two character strings used for authorization. +If the server does not like the authorization strings +or the version numbers do not match within the rules, +or if anything else is wrong, it sends a failure +response with a reason string. + + +If the information never comes, or comes much too slowly, the connection +should be broken off. You must implement the connection timeout. The +sample server implements this by keeping a timestamp for each still-connecting +client and, each time just before it attempts to accept new connections, it +closes any connection that are too old. +The connection timeout can be set from the command line. + + +You must implement whatever authorization schemes you want to support. +The sample server on the distribution tape supports a simple authorization +scheme. The only interface seen by DIX is: +
+ + char * + ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string) + ClientPtr client; + unsigned int proto_n; + char *auth_proto; + unsigned int string_n; + char *auth_string; +
+DIX will only call this once per client, once it has read the full initial +connection data from the client. If the connection should be +accepted ClientAuthorized() should return NULL, and otherwise should +return an error message string. +
+ +Accepting new connections happens internally to WaitForSomething(). +WaitForSomething() must call the DIX routine NextAvailableClient() +to create a client object. +Processing of the initial connection data will be handled by DIX. +Your OS layer must be able to map from a client +to whatever information your OS code needs to communicate +on the given byte stream to the client. +DIX uses this ClientPtr to refer to +the client from now on. The sample server uses the osPrivate field in +the ClientPtr to store the file descriptor for the socket, the +input and output buffers, and authorization information. + + +To initialize the methods you choose to allow clients to connect to +your server, main() calls the routine +
+ + void CreateWellKnownSockets() +
+This routine is called only once, and not called when the server +is reset. To recreate any sockets during server resets, the following +routine is called from the main loop: +
+ + void ResetWellKnownSockets() +
+Sample implementations of both of these routines are found in +Xserver/os/connection.c. +
+ +For more details, see the section called "Connection Setup" in the X protocol specification. + +
+
+ Reading Data from Clients + +Requests from the client are read in as a byte stream by the OS layer. +They may be in the form of several blocks of bytes delivered in sequence; requests may +be broken up over block boundaries or there may be many requests per block. +Each request carries with it length information. +It is the responsibility of the following routine to break it up into request blocks. +
+ + int ReadRequestFromClient(who) + ClientPtr who; +
+
+ +You must write +the routine ReadRequestFromClient() to get one request from the byte stream +belonging to client "who." +You must swap the third and fourth bytes (the second 16-bit word) according to the +byte-swap rules of +the protocol to determine the length of the +request. +This length is measured in 32-bit words, not in bytes. Therefore, the +theoretical maximum request is 256K. +(However, the maximum length allowed is dependent upon the server's input +buffer. This size is sent to the client upon connection. The maximum +size is the constant MAX_REQUEST_SIZE in Xserver/include/os.h) +The rest of the request you return is +assumed NOT to be correctly swapped for internal +use, because that is the responsibility of DIX. + + +The 'who' argument is the ClientPtr returned from WaitForSomething. +The return value indicating status should be set to the (positive) byte count if the read is successful, +0 if the read was blocked, or a negative error code if an error happened. + + +You must then store a pointer to +the bytes of the request in the client request buffer field; +who->requestBuffer. This can simply be a pointer into your buffer; +DIX may modify it in place but will not otherwise cause damage. +Of course, the request must be contiguous; you must +shuffle it around in your buffers if not. + + +The sample server implementation is in Xserver/os/io.c. + +
Inserting Data for Clients + +DIX can insert data into the client stream, and can cause a "replay" of +the current request. +
+ + Bool InsertFakeRequest(client, data, count) + ClientPtr client; + char *data; + int count; + + int ResetCurrentRequest(client) + ClientPtr client; +
+
+ +InsertFakeRequest() must insert the specified number of bytes of data +into the head of the input buffer for the client. This may be a +complete request, or it might be a partial request. For example, +NextAvailableCient() will insert a partial request in order to read +the initial connection data sent by the client. The routine returns FALSE +if memory could not be allocated. ResetCurrentRequest() +should "back up" the input buffer so that the currently executing request +will be reexecuted. DIX may have altered some values (e.g. the overall +request length), so you must recheck to see if you still have a complete +request. ResetCurrentRequest() should always cause a yield (isItTimeToYield). + +
+
+ +
+ Sending Events, Errors And Replies To Clients + +
+ + int WriteToClient(who, n, buf) + ClientPtr who; + int n; + char *buf; +
+WriteToClient should write n bytes starting at buf to the +ClientPtr "who". +It returns the number of bytes written, but for simplicity, +the number returned must be either the same value as the number +requested, or -1, signaling an error. +The sample server implementation is in Xserver/os/io.c. +
+ +
+ void SendErrorToClient(client, majorCode, minorCode, resId, errorCode) + ClientPtr client; + unsigned int majorCode; + unsigned int minorCode; + XID resId; + int errorCode; +
+SendErrorToClient can be used to send errors back to clients, +although in most cases your request function should simply return +the error code, having set client->errorValue to the appropriate +error value to return to the client, and DIX will call this +function with the correct opcodes for you. +
+ +
+ + void FlushAllOutput() + + void FlushIfCriticalOutputPending() + + void SetCriticalOutputPending() +
+These three routines may be implemented to support buffered or delayed +writes to clients, but at the very least, the stubs must exist. +FlushAllOutput() unconditionally flushes all output to clients; +FlushIfCriticalOutputPending() flushes output only if +SetCriticalOutputPending() has be called since the last time output +was flushed. +The sample server implementation is in Xserver/os/io.c and +actually ignores requests to flush output on a per-client basis +if it knows that there +are requests in that client's input queue. +
+
+
+ Font Support + +In the sample server, fonts are encoded in disk files or fetched from the +font server. The two fonts required by the server, fixed +and cursor are commonly compiled into the font library. +For disk fonts, there is one file per font, with a file name like +"fixed.pcf". Font server fonts are read over the network using the +X Font Server Protocol. The disk directories containing disk fonts and +the names of the font servers are listed together in the current "font path." + + +In principle, you can put all your fonts in ROM or in RAM in your server. +You can put them all in one library file on disk. +You could generate them on the fly from stroke descriptions. By placing the +appropriate code in the Font Library, you will automatically export fonts in +that format both through the X server and the Font server. + + +The code for processing fonts in different formats, as well as handling the +metadata files for them on disk (such as fonts.dir) is +located in the libXfont library, which is provided as a separately compiled +module. These routines are +shared between the X server and the Font server, so instead of this document +specifying what you must implement, simply refer to the font +library interface specification for the details. All of the interface code to the Font +library is contained in dix/dixfonts.c + +
+
+ Memory Management + +Memory management is based on functions in the C runtime library. +Xalloc(), Xrealloc(), and Xfree() are deprecated aliases for malloc(), +realloc(), and free(), and you should simply call the C library functions +directly. Consult a C runtime library reference +manual for more details. + + +Treat memory allocation carefully in your implementation. Memory +leaks can be very hard to find and are frustrating to a user. An X +server could be running for days or weeks without being reset, just +like a regular terminal. If you leak a few dozen k per day, that will +add up and will cause problems for users that leave their workstations +on. + +
+
+ Client Scheduling + +The X server +has the ability to schedule clients much like an operating system would, +suspending and restarting them without regard for the state of their input +buffers. This functionality allows the X server to suspend one client and +continue processing requests from other clients while waiting for a +long-term network activity (like loading a font) before continuing with the +first client. +
+ Bool isItTimeToYield; +
+isItTimeToYield is a global variable you can set +if you want to tell +DIX to end the client's "time slice" and start paying attention to the next client. +After the current request is finished, DIX will move to the next client. +
+ +In the sample +server, ReadRequestFromClient() sets isItTimeToYield after +10 requests packets in a row are read from the same client. + + +This scheduling algorithm can have a serious effect upon performance when two +clients are drawing into their windows simultaneously. +If it allows one client to run until its request +queue is empty by ignoring isItTimeToYield, the client's queue may +in fact never empty and other clients will be blocked out. +On the other hand, if it 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, ...) +
+You should write these three routines to provide for diagnostic output +from the dix and ddx layers, although implementing them to produce no +output will not affect the correctness of your server. ErrorF() and +FatalError() take a printf() type of format specification in the first +argument and an implementation-dependent number of arguments following +that. Normally, the formats passed to ErrorF() and FatalError() +should be terminated with a newline. +
+ +After printing the message arguments, FatalError() must be implemented +such that the server will call 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/log.c along with other routines for logging messages. + +
+
+ +
+ DDX Layer + +This section describes the +interface between DIX and DDX. +While there may be an OS-dependent driver interface between DDX +and the physical device, that interface is left to the DDX +implementor and is not specified here. + + +The DDX layer does most of its work through procedures that are +pointed to by different structs. +As previously described, the behavior of these resources is largely determined by +these procedure pointers. +Most of these routines are for graphic display on the screen or support functions thereof. +The rest are for user input from input devices. + +
+ Input + +In this document "input" refers to input from the user, +such as mouse, keyboard, and +bar code readers. +X input devices are of several types: keyboard, pointing device, and +many others. The core server has support for extension devices as +described by the X Input Extension document; the interfaces used by +that extension are described elsewhere. The core devices are actually +implemented as two collections of devices, the mouse is a ButtonDevice, +a ValuatorDevice and a PtrFeedbackDevice while the keyboard is a KeyDevice, +a FocusDevice and a KbdFeedbackDevice. Each part implements a portion of +the functionality of the device. This abstraction is hidden from view for +core devices by DIX. + + +You, the DDX programmer, are +responsible for some of the routines in this section. +Others are DIX routines that you should call to do the things you need to do in these DDX routines. +Pay attention to which is which. + +
+ Input Device Data Structures + +DIX keeps a global directory of devices in a central data structure +called InputInfo. +For each device there is a device structure called a DeviceRec. +DIX can locate any DeviceRec through InputInfo. +In addition, it has a special pointer to identify the main pointing device +and a special pointer to identify the main keyboard. + + +The DeviceRec (Xserver/include/input.h) is a device-independent +structure that contains the state of an input device. +A DevicePtr is simply a pointer to a DeviceRec. + + +An xEvent describes an event the server reports to a client. +Defined in Xproto.h, it is a huge struct of union of structs that have fields for +all kinds of events. +All of the variants overlap, so that the struct is actually very small in memory. + +
+
+ Processing Events + +The main DDX input interface is the following routine: +
+ + void ProcessInputEvents() +
+You must write this routine to deliver input events from the user. +DIX calls it when input is pending (see next section), and possibly +even when it is not. +You should write it to get events from each device and deliver +the events to DIX. +To deliver the events to DIX, DDX should call the following +routine: +
+ + void DevicePtr->processInputProc(pEvent, device, count) + xEventPtr events; + DeviceIntPtr device; + int count; +
+This is the "input proc" for the device, a DIX procedure. +DIX will fill in this procedure pointer to one of its own routines by +the time ProcessInputEvents() is called the first time. +Call this input proc routine as many times as needed to +deliver as many events as should be delivered. +DIX will buffer them up and send them out as needed. Count is set +to the number of event records which make up one atomic device event and +is always 1 for the core devices (see the X Input Extension for descriptions +of devices which may use count > 1). +
+ +For example, your ProcessInputEvents() routine might check the mouse and the +keyboard. +If the keyboard had several keystrokes queued up, it could just call +the keyboard's processInputProc as many times as needed to flush its internal queue. + + +event is an xEvent struct you pass to the input proc. +When the input proc returns, it is finished with the event rec, and you can fill +in new values and call the input proc again with it. + + +You should deliver the events in the same order that they were generated. + + +For keyboard and pointing devices the xEvent variant should be keyButtonPointer. +Fill in the following fields in the xEvent record: + + +type - is one of the following: KeyPress, KeyRelease, ButtonPress, + ButtonRelease, or MotionNotify +detail - for KeyPress or KeyRelease fields, this should be the + key number (not the ASCII code); otherwise unused +time - is the time that the event happened (32-bits, in milliseconds, arbitrary origin) +rootX - is the x coordinate of cursor +rootY - is the y coordinate of cursor + + +The rest of the fields are filled in by DIX. + + +The time stamp is maintained by your code in the DDX layer, and it is your responsibility to +stamp all events correctly. + + +The x and y coordinates of the pointing device and the time must be filled in for all event types +including keyboard events. + + +The pointing device must report all button press and release events. +In addition, it should report a MotionNotify event every time it gets called +if the pointing device has moved since the last notify. +Intermediate pointing device moves are stored in a special GetMotionEvents buffer, +because most client programs are not interested in them. + + +There are quite a collection of sample implementations of this routine, +one for each supported device. + +
+
+Telling DIX When Input is Pending + +In the server's dispatch loop, DIX checks to see +if there is any device input pending whenever WaitForSomething() returns. +If the check says that input is pending, DIX calls the +DDX routine ProcessInputEvents(). + + +This check for pending input must be very quick; a procedure call +is too slow. +The code that does the check is a hardwired IF +statement in DIX code that simply compares the values +pointed to by two pointers. +If the values are different, then it assumes that input is pending and +ProcessInputEvents() is called by DIX. + + +You must pass pointers to DIX to tell it what values to compare. +The following procedure +is used to set these pointers: +
+ + void SetInputCheck(p1, p2) + long *p1, *p2; +
+You should call it sometime during initialization to indicate to DIX the +correct locations to check. +You should +pay special attention to the size of what they actually point to, +because the locations are assumed to be longs. +
+ +These two pointers are initialized by DIX +to point to arbitrary values that +are different. +In other words, if you forget to call this routine during initialization, +the worst thing that will happen is that +ProcessInputEvents will be called when +there are no events to process. + + +p1 and p2 might +point at the head and tail of some shared +memory queue. +Another use would be to have one point at a constant 0, with the +other pointing at some mask containing 1s +for each input device that has +something pending. + + +The DDX layer of the sample server calls SetInputCheck() +once when the +server's private internal queue is initialized. +It passes pointers to the queue's head and tail. See Xserver/mi/mieq.c. + + +
+ int TimeSinceLastInputEvent() +
+DDX must time stamp all hardware input +events. But DIX sometimes needs to know the +time and the OS layer needs to know the time since the last hardware +input event in +order for the screen saver to work. TimeSinceLastInputEvent() returns +the this time in milliseconds. +
+
+
+ Controlling Input Devices + +You must write four routines to do various device-specific +things with the keyboard and pointing device. +They can have any name you wish because +you pass the procedure pointers to DIX routines. + + +
+ + int pInternalDevice->valuator->GetMotionProc(pdevice, coords, start, stop, pScreen) + DeviceIntPtr pdevice; + xTimecoord * coords; + unsigned long start; + unsigned long stop; + ScreenPtr pScreen; +
+You write this DDX routine to fill in coords with all the motion +events that have times (32-bit count of milliseconds) between time +start and time stop. It should return the number of motion events +returned. If there is no motion events support, this routine should +do nothing and return zero. The maximum number of coords to return is +set in InitPointerDeviceStruct(), below. +
+ +When the user drags the pointing device, the cursor position +theoretically sweeps through an infinite number of points. Normally, +a client that is concerned with points other than the starting and +ending points will receive a pointer-move event only as often as the +server generates them. (Move events do not queue up; each new one +replaces the last in the queue.) A server, if desired, can implement +a scheme to save these intermediate events in a motion buffer. A +client application, like a paint program, may then request that these +events be delivered to it through the GetMotionProc routine. + + +
+ + void pInternalDevice->bell->BellProc(percent, pDevice, ctrl, unknown) + int percent; + DeviceIntPtr pDevice; + pointer ctrl; + int class; +
+You need to write this routine to ring the bell on the keyboard. +loud is a number from 0 to 100, with 100 being the loudest. +Class is either BellFeedbackClass or KbdFeedbackClass (from XI.h). +
+ +
+ + void pInternalDevice->somedevice->CtrlProc(device, ctrl) + DevicePtr device; + SomethingCtrl *ctrl; + +
+You write two versions of this procedure, one for the keyboard and one for the pointing device. +DIX calls it to inform DDX when a client has requested changes in the current +settings for the particular device. +For a keyboard, this might be the repeat threshold and rate. +For a pointing device, this might be a scaling factor (coarse or fine) for position reporting. +See input.h for the ctrl structures. +
+
+
+ Input Initialization + +Input initialization is a bit complicated. +It all starts with InitInput(), a routine that you write to call +AddInputDevice() twice +(once for pointing device and once for keyboard.) + + +When you Add the devices, a routine you supply for each device +gets called to initialize them. +Your individual initialize routines must call InitKeyboardDeviceStruct() +or InitPointerDeviceStruct(), depending upon which it is. +In other words, you indicate twice that the keyboard is the keyboard and +the pointer is the pointer. + + +
+ + void InitInput(argc, argv) + int argc; + char **argv; +
+InitInput is a DDX routine you must write to initialize the +input subsystem in DDX. +It must call AddInputDevice() for each device that might generate events. +
+ +
+ + DevicePtr AddInputDevice(deviceProc, autoStart) + DeviceProc deviceProc; + Bool autoStart; +
+AddInputDevice is a DIX routine you call to create a device object. +deviceProc is a DDX routine that is called by DIX to do various operations. +AutoStart should be TRUE for devices that need to be turned on at +initialization time with a special call, as opposed to waiting for some +client application to +turn them on. +This routine returns NULL if sufficient memory cannot be allocated to +install the device. +
+ +Note also that except for the main keyboard and pointing device, +an extension is needed to provide for a client interface to a device. + + +The following DIX +procedures return the specified DevicePtr. They may or may not be useful +to DDX implementors. + + +
+ + DevicePtr LookupKeyboardDevice() +
+LookupKeyboardDevice returns pointer for current main keyboard device. +
+ +
+ + DevicePtr LookupPointerDevice() +
+LookupPointerDevice returns pointer for current main pointing device. +
+ +A DeviceProc (the kind passed to AddInputDevice()) in the following form: +
+ + Bool pInternalDevice->DeviceProc(device, action); + DeviceIntPtr device; + int action; +
+You must write a DeviceProc for each device. +device points to the device record. +action tells what action to take; +it will be one of these defined constants (defined in input.h): + + +DEVICE_INIT - +At DEVICE_INIT time, the device should initialize itself by calling +InitPointerDeviceStruct(), InitKeyboardDeviceStruct(), or a similar +routine (see below) +and "opening" the device if necessary. +If you return a non-zero (i.e., != Success) value from the DEVICE_INIT +call, that device will be considered unavailable. If either the main keyboard +or main pointing device cannot be initialized, the DIX code will refuse +to continue booting up. + +DEVICE_ON - If the DeviceProc is called with DEVICE_ON, then it is +allowed to start +putting events into the client stream by calling through the ProcessInputProc +in the device. + +DEVICE_OFF - If the DeviceProc is called with DEVICE_OFF, no further +events from that +device should be given to the DIX layer. +The device will appear to be dead to the user. + +DEVICE_CLOSE - At DEVICE_CLOSE (terminate or reset) time, the device should +be totally closed down. + +
+ +
+ + void InitPointerDeviceStruct(device, map, mapLength, + GetMotionEvents, ControlProc, numMotionEvents) + DevicePtr device; + CARD8 *map; + int mapLength; + ValuatorMotionProcPtr ControlProc; + PtrCtrlProcPtr GetMotionEvents; + int numMotionEvents; +
+InitPointerDeviceStruct is a DIX routine you call at DEVICE_INIT time to declare +some operating routines and data structures for a pointing device. +map and mapLength are as described in the X Window +System protocol specification. +ControlProc and GetMotionEvents are DDX routines, see above. +
+ +numMotionEvents is for the motion-buffer-size for the GetMotionEvents +request. +A typical length for a motion buffer would be 100 events. +A server that does not implement this capability should set +numMotionEvents to zero. + + +
+ + void InitKeyboardDeviceStruct(device, pKeySyms, pModifiers, Bell, ControlProc) + DevicePtr device; + KeySymsPtr pKeySyms; + CARD8 *pModifiers; + BellProcPtr Bell; + KbdCtrlProcPtr ControlProc; + +
+You call this DIX routine when a keyboard device is initialized and +its device procedure is called with +DEVICE_INIT. +The formats of the keysyms and modifier maps are defined in +Xserver/include/input.h. +They describe the layout of keys on the keyboards, and the glyphs +associated with them. ( See the next section for information on +setting up the modifier map and the keysym map.) +ControlProc and Bell are DDX routines, see above. +
+
+
+ Keyboard Mapping and Keycodes + +When you send a keyboard event, you send a report that a given key has +either been pressed or has been released. There must be a keycode for +each key that identifies the key; the keycode-to-key mapping can be +any mapping you desire, because you specify the mapping in a table you +set up for DIX. However, you are restricted by the protocol +specification to keycode values in the range 8 to 255 inclusive. + + +The keycode mapping information that you set up consists of the following: + + +A minimum and maximum keycode number + +An array of sets of keysyms for each key, that is of length +maxkeycode - minkeycode + 1. +Each element of this array is a list of codes for symbols that are on that key. +There is no limit to the number of symbols that can be on a key. + +Once the map is set up, DIX keeps and +maintains the client's changes to it. + + +The X protocol defines standard names to indicate the symbol(s) +printed on each keycap. (See X11/keysym.h) + + +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 return +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(pScreen, argc, argv) + ScreenPtr pScreen; + int argc; + char **argv; +
+pScreen is the pointer to the screen's new ScreenRec. argc and argv +are as before. Your screen initialize procedure should return TRUE +upon success or FALSE if the screen cannot be initialized (for + instance, if the screen hardware does not exist on this machine).
+ +This procedure must determine what actual device it is supposed to initialize. +If you have a different procedure for each screen, then it is no problem. +If you have the same procedure for multiple screens, it may have trouble +figuring out which screen to initialize each time around, especially if +InitOutput() does not initialize all of the screens. +It is probably easiest to have one procedure for each screen. + +The initialization procedure should fill in all the screen procedures +for that screen (windowing functions, region functions, etc.) and certain +screen attributes for that screen. +
+
+ Region Routines in the ScreenRec + +A region is a dynamically allocated data structure that describes an +irregularly shaped piece of real estate in XY pixel space. You can +think of it as a set of pixels on the screen to be operated upon with +set operations such as AND and OR. + +A region is frequently implemented as a list of rectangles or bitmaps +that enclose the selected pixels. Region operators control the +"clipping policy," or the operations that work on regions. (The +sample server uses YX-banded rectangles. Unless you have something +already implemented for your graphics system, you should keep that +implementation.) The procedure pointers to the region operators are +located in the ScreenRec data structure. The definition of a region +can be found in the file Xserver/include/regionstr.h. The region code +is found in Xserver/mi/miregion.c. DDX implementations using other +region formats will need to supply different versions of the region +operators. + +Since the list of rectangles is unbounded in size, part of the region +data structure is usually a large, dynamically allocated chunk of +memory. As your region operators calculate logical combinations of +regions, these blocks may need to be reallocated by your region +software. For instance, in the sample server, a RegionRec has some +header information and a pointer to a dynamically allocated rectangle +list. Periodically, the rectangle list needs to be expanded with +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; + unsigned int subWindowMode; + +
+SourceValidate should be called by CopyArea/CopyPlane primitives when +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. subWindowMode comes from the GC or source Picture. +
+ +
+ + Bool pScreen->SaveScreen(pScreen, on) + ScreenPtr pScreen; + int on; + +
+SaveScreen() is used for Screen Saver support (see WaitForSomething()). +pScreen is the screen to save.
+ +
+ + Bool pScreen->CloseScreen(pScreen) + ScreenPtr pScreen; + +
+When the server is reset, it calls this routine for each screen.
+ +
+ + Bool pScreen->CreateScreenResources(pScreen) + ScreenPtr pScreen; + +
+If this routine is not NULL, it will be called once per screen per +server initialization/reset after all modules have had a chance to +request private space on all structures that support them (see + below). You may create resources +in this function instead of in the +screen init function passed to AddScreen in order to guarantee that +all pre-allocated space requests have been registered first. With the +new devPrivates mechanism, this is not strictly necessary, however. +This routine returns TRUE if successful.
+
+
+
+Drawables + +A drawable is a descriptor of a surface that graphics are drawn into, either +a window on the screen or a pixmap in memory. + +Each drawable has a type, class, +ScreenPtr for the screen it is associated with, depth, position, size, +and serial number. +The type is one of the defined constants DRAWABLE_PIXMAP, +DRAWABLE_WINDOW and UNDRAWABLE_WINDOW. +(An undrawable window is used for window class InputOnly.) +The serial number is guaranteed to be unique across drawables, and +is used in determining +the validity of the clipping information in a GC. +The screen selects the set of procedures used to manipulate and draw into the +drawable. Position is used (currently) only by windows; pixmaps must +set these fields to 0,0 as this reduces the amount of conditional code +executed throughout the mi code. Size indicates the actual client-specified +size of the drawable. +There are, in fact, no other fields that a window drawable and pixmap +drawable have in common besides those mentioned here. + +Both PixmapRecs and WindowRecs are structs that start with a drawable +and continue on with more fields. Pixmaps have a single pointer field +named devPrivate which usually points to the pixmap data but could conceivably be +used for anything that DDX wants. Both windows and pixmaps also have a +devPrivates field which can be used for DDX specific data (see +below). This is done because different graphics hardware has +different requirements for management; if the graphics is always +handled by a processor with an independent address space, there is no +point having a pointer to the bit image itself. + +The definition of a drawable and a pixmap can be found in the file +Xserver/include/pixmapstr.h. +The definition of a window can be found in the file Xserver/include/windowstr.h. +
+ Pixmaps + +A pixmap is a three-dimensional array of bits stored somewhere offscreen, +rather than in the visible portion of the screen's display frame buffer. It +can be used as a source or destination in graphics operations. There is no +implied interpretation of the pixel values in a pixmap, because it has no +associated visual or colormap. There is only a depth that indicates the +number of significant bits per pixel. Also, there is no implied physical +size for each pixel; all graphic units are in numbers of pixels. Therefore, +a pixmap alone does not constitute a complete image; it represents only a +rectangular array of pixel values. + +Note that the pixmap data structure is reference-counted. + +The server implementation is free to put the pixmap data +anywhere it sees fit, according to its graphics hardware setup. Many +implementations will simply have the data dynamically allocated in the +server's address space. More sophisticated implementations may put the +data in undisplayed framebuffer storage. + +In addition to dynamic devPrivates (see +below), the pixmap data structure has two fields that are private to +the device. Although you can use them for anything you want, they +have intended purposes. devKind is intended to be a device specific +indication of the pixmap location (host memory, off-screen, etc.). In +the sample server, since all pixmaps are in memory, devKind stores the +width of the pixmap in bitmap scanline units. devPrivate is usually +a pointer to the bits in the pixmap. + +A bitmap is a pixmap that is one bit deep. + +
+ + PixmapPtr pScreen->CreatePixmap(pScreen, width, height, depth) + ScreenPtr pScreen; + int width, height, depth; + +
+This ScreenRec procedure must create a pixmap of the size +requested. +It must allocate a PixmapRec and fill in all of the fields. +The reference count field must be set to 1. +If width or height are zero, no space should be allocated +for the pixmap data, and if the implementation is using the +devPrivate field as a pointer to the pixmap data, it should be +set to NULL. +If successful, it returns a pointer to the new pixmap; if not, it returns NULL. +See Xserver/fb/fbpixmap.c for the sample server implementation.
+ +
+ + Bool pScreen->DestroyPixmap(pPixmap) + PixmapPtr pPixmap; + +
+This ScreenRec procedure must "destroy" a pixmap. +It should decrement the reference count and, if zero, it +must deallocate the PixmapRec and all attached devPrivate blocks. +If successful, it returns TRUE. +See Xserver/fb/fbpixmap.c for the sample server implementation.
+ +
+ + Bool + pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData) + PixmapPtr pPixmap; + int width; + int height; + int depth; + int bitsPerPixel; + int devKind; + pointer pPixData; + +
+This routine takes a pixmap header and initializes the fields of the PixmapRec to the +parameters of the same name. pPixmap must have been created via +pScreen->CreatePixmap with a zero width or height to avoid +allocating space for the pixmap data. pPixData is assumed to be the +pixmap data; it will be stored in an implementation-dependent place +(usually pPixmap->devPrivate.ptr). This routine returns +TRUE if successful. See Xserver/mi/miscrinit.c for the sample +server implementation.
+ +
+ + PixmapPtr + GetScratchPixmapHeader(pScreen, width, height, depth, bitsPerPixel, devKind, pPixData) + ScreenPtr pScreen; + int width; + int height; + int depth; + int bitsPerPixel; + int devKind; + pointer pPixData; + + void FreeScratchPixmapHeader(pPixmap) + PixmapPtr pPixmap; + +
+DDX should use these two DIX routines when it has a buffer of raw +image data that it wants to manipulate as a pixmap temporarily, +usually so that some other part of the server can be leveraged to +perform some operation on the data. The data should be passed in +pPixData, and will be stored in an implementation-dependent place +(usually pPixmap->devPrivate.ptr). The other +fields go into the corresponding PixmapRec fields. +If successful, GetScratchPixmapHeader returns a valid PixmapPtr which can +be used anywhere the server expects a pixmap, else +it returns NULL. The pixmap should be released when no longer needed +(usually within the same function that allocated it) +with FreeScratchPixmapHeader.
+
+
+ Windows + +A window is a visible, or potentially visible, rectangle on the screen. +DIX windowing functions maintain an internal n-ary tree data structure, which +represents the current relationships of the mapped windows. +Windows that are contained in another window are children of that window and +are clipped to the boundaries of the parent. +The root window in the tree is the window for the entire screen. +Sibling windows constitute a doubly-linked list; the parent window has a pointer +to the head and tail of this list. +Each child also has a pointer to its parent. + +The border of a window is drawn by a DDX procedure when DIX requests that it +be drawn. The contents of the window is drawn by the client through +requests to the server. + +Window painting is orchestrated through an expose event system. +When a region is exposed, +DIX generates an expose event, telling the client to repaint the window and +passing the region that is the minimal area needed to be repainted. + +As a favor to clients, the server may retain +the output to the hidden parts of windows +in off-screen memory; this is called "backing store". +When a part of such a window becomes exposed, it +can quickly move pixels into place instead of +triggering an expose event and waiting for a client on the other +end of the network to respond. +Even if the network response is insignificant, the time to +intelligently paint a section of a window is usually more than +the time to just copy already-painted sections. +At best, the repainting involves blanking out the area to a background color, +which will take about the +same amount of time. +In this way, backing store can dramatically increase the +performance of window moves. + +On the other hand, backing store can be quite complex, because +all graphics drawn to hidden areas must be intercepted and redirected +to the off-screen window sections. +Not only can this be complicated for the server programmer, +but it can also impact window painting performance. +The backing store implementation can choose, at any time, to +forget pieces of backing that are written into, relying instead upon +expose events to repaint for simplicity. + +In X, the decision to use the backing-store scheme is made +by you, the server implementor. The sample server implements +backing store "for free" by reusing the infrastructure for the Composite +extension. As a side effect, it treats the WhenMapped and Always hints +as equivalent. However, it will never forget pixel contents when the +window is mapped. + +When a window operation is requested by the client, +such as a window being created or moved, +a new state is computed. +During this transition, DIX informs DDX what rectangles in what windows are about to +become obscured and what rectangles in what windows have become exposed. +This provides a hook for the implementation of backing store. +If DDX is unable to restore exposed regions, DIX generates expose +events to the client. +It is then the client's responsibility to paint the +window parts that were exposed but not restored. + +If a window is resized, pixels sometimes need to be +moved, depending upon +the application. +The client can request "Gravity" so that +certain blocks of the window are +moved as a result of a resize. +For instance, if the window has controls or other items +that always hang on the edge of the +window, and that edge is moved as a result of the resize, +then those pixels should be moved +to avoid having the client repaint it. +If the client needs to repaint it anyway, such an operation takes +time, so it is desirable +for the server to approximate the appearance of the window as best +it can while waiting for the client +to do it perfectly. +Gravity is used for that, also. + +The window has several fields used in drawing +operations: + + +clipList - This region, in conjunction with +the client clip region in the gc, is used to clip output. +clipList has the window's children subtracted from it, in addition to pieces of sibling windows +that overlap this window. To get the list with the +children included (subwindow-mode is IncludeInferiors), +the routine NotClippedByChildren(pWin) returns the unclipped region. + +borderClip is the region used by CopyWindow and +includes the area of the window, its children, and the border, but with the +overlapping areas of sibling children removed. + +Most of the other fields are for DIX use only. +
+Window Procedures in the ScreenRec + +You should implement +all of the following procedures and store pointers to them in the screen record. + +The device-independent portion of the server "owns" the window tree. +However, clever hardware might want to know the relationship of +mapped windows. There are pointers to procedures +in the ScreenRec data structure that are called to give the hardware +a chance to update its internal state. These are helpers and +hints to DDX only; +they do not change the window tree, which is only changed by DIX. + +
+ + Bool pScreen->CreateWindow(pWin) + WindowPtr pWin; + +
+This routine is a hook for when DIX creates a window. +It should fill in the "Window Procedures in the WindowRec" below +and also allocate the devPrivate block for it.
+ +See Xserver/fb/fbwindow.c for the sample server implementation. + +
+ + Bool pScreen->DestroyWindow(pWin); + WindowPtr pWin; + +
+This routine is a hook for when DIX destroys a window. +It should deallocate the devPrivate block for it and any other blocks that need +to be freed, besides doing other cleanup actions.
+ +See Xserver/fb/fbwindow.c for the sample server implementation. + +
+ + Bool pScreen->PositionWindow(pWin, x, y); + WindowPtr pWin; + int x, y; + +
+This routine is a hook for when DIX moves or resizes a window. +It should do whatever private operations need to be done when a window is moved or resized. +For instance, if DDX keeps a pixmap tile used for drawing the background +or border, and it keeps the tile rotated such that it is longword +aligned to longword locations in the frame buffer, then you should rotate your tiles here. +The actual graphics involved in moving the pixels on the screen and drawing the +border are handled by CopyWindow(), below.
+ +See Xserver/fb/fbwindow.c for the sample server implementation. + +
+ + Bool pScreen->RealizeWindow(pWin); + WindowPtr pWin; + + Bool pScreen->UnrealizeWindow(pWin); + WindowPtr pWin; + +
+These routines are hooks for when DIX maps (makes visible) and unmaps +(makes invisible) a window. It should do whatever private operations +need to be done when these happen, such as allocating or deallocating +structures that are only needed for visible windows. RealizeWindow +does NOT draw the window border, background or contents; +UnrealizeWindow does NOT erase the window or generate exposure events +for underlying windows; this is taken care of by DIX. DIX does, +however, call PaintWindowBackground() and PaintWindowBorder() to +perform some of these.
+ +
+ + Bool pScreen->ChangeWindowAttributes(pWin, vmask) + WindowPtr pWin; + unsigned long vmask; + +
+ChangeWindowAttributes is called whenever DIX changes window +attributes, such as the size, front-to-back ordering, title, or +anything of lesser severity that affects the window itself. The +sample server implements this routine. It computes accelerators for +quickly putting up background and border tiles. (See description of +the set of routines stored in the WindowRec.)
+ +
+ + int pScreen->ValidateTree(pParent, pChild, kind) + WindowPtr pParent, pChild; + VTKind kind; + +
+ValidateTree calculates the clipping region for the parent window and +all of its children. This routine must be provided. The sample server +has a machine-independent version in Xserver/mi/mivaltree.c. This is +a very difficult routine to replace.
+ +
+ + void pScreen->PostValidateTree(pParent, pChild, kind) + WindowPtr pParent, pChild; + VTKind kind; + +
+If this routine is not NULL, DIX calls it shortly after calling +ValidateTree, passing it the same arguments. This is useful for +managing multi-layered framebuffers. +The sample server sets this to NULL.
+ +
+ + void pScreen->WindowExposures(pWin, pRegion, pBSRegion) + WindowPtr pWin; + RegionPtr pRegion; + RegionPtr pBSRegion; + +
+The WindowExposures() routine +paints the border and generates exposure events for the window. +pRegion is an unoccluded region of the window, and pBSRegion is an +occluded region that has backing store. +Since exposure events include a rectangle describing what was exposed, +this routine may have to send back a series of exposure events, one for +each rectangle of the region. +The count field in the expose event is a hint to the +client as to the number of +regions that are after this one. +This routine must be provided. The sample +server has a machine-independent version in Xserver/mi/miexpose.c.
+ +
+ + void pScreen->ClipNotify (pWin, dx, dy) + WindowPtr pWin; + int dx, dy; + +
+Whenever the cliplist for a window is changed, this function is called to +perform whatever hardware manipulations might be necessary. When called, +the clip list and border clip regions in the window are set to the new +values. dx,dy are the distance that the window has been moved (if at all).
+
+
+ Window Painting Procedures + +In addition to the procedures listed above, there are two routines which +manipulate the actual window image directly. +In the sample server, mi implementations will work for +most purposes and fb routines speed up situations, such +as solid backgrounds/borders or tiles that are 8, 16 or 32 pixels square. + +
+ + void pScreen->ClearToBackground(pWin, x, y, w, h, generateExposures); + WindowPtr pWin; + int x, y, w, h; + Bool generateExposures; + +
+This routine is called on a window in response to a ClearToBackground request +from the client. +This request has two different but related functions, depending upon generateExposures.
+ +If generateExposures is true, the client is declaring that the given rectangle +on the window is incorrectly painted and needs to be repainted. +The sample server implementation calculates the exposure region +and hands it to the DIX procedure HandleExposures(), which +calls the WindowExposures() routine, below, for the window +and all of its child windows. + +If generateExposures is false, the client is trying to simply erase part +of the window to the background fill style. +ClearToBackground should write the background color or tile to the +rectangle in question (probably using PaintWindowBackground). +If w or h is zero, it clears all the way to the right or lower edge of the window. + +The sample server implementation is in Xserver/mi/miwindow.c. + +
+ + void pScreen->CopyWindow(pWin, oldpt, oldRegion); + WindowPtr pWin; + DDXPointRec oldpt; + RegionPtr oldRegion; + +
+CopyWindow is called when a window is moved, and graphically moves to +pixels of a window on the screen. It should not change any other +state within DDX (see PositionWindow(), above).
+ +oldpt is the old location of the upper-left corner. oldRegion is the +old region it is coming from. The new location and new region is +stored in the WindowRec. oldRegion might modified in place by this +routine (the sample implementation does this). + +CopyArea could be used, except that this operation has more +complications. First of all, you do not want to copy a rectangle onto +a rectangle. The original window may be obscured by other windows, +and the new window location may be similarly obscured. Second, some +hardware supports multiple windows with multiple depths, and your +routine needs to take care of that. + +The pixels in oldRegion (with reference point oldpt) are copied to the +window's new region (pWin->borderClip). pWin->borderClip is gotten +directly from the window, rather than passing it as a parameter. + +The sample server implementation is in Xserver/fb/fbwindow.c. +
+
+Screen Operations for Multi-Layered Framebuffers + +The following screen functions are useful if you have a framebuffer with +multiple sets of independent bit planes, e.g. overlays or underlays in +addition to the "main" planes. If you have a simple single-layer +framebuffer, you should probably use the mi versions of these routines +in mi/miwindow.c. This can be easily accomplished by calling miScreenInit. + +
+ + void pScreen->MarkWindow(pWin) + WindowPtr pWin; + +
+This formerly dix function MarkWindow has moved to ddx and is accessed +via this screen function. This function should store something, +usually a pointer to a device-dependent structure, in pWin->valdata so +that ValidateTree has the information it needs to validate the window.
+ +
+ + Bool pScreen->MarkOverlappedWindows(parent, firstChild, ppLayerWin) + WindowPtr parent; + WindowPtr firstChild; + WindowPtr * ppLayerWin; + +
+This formerly dix function MarkWindow has moved to ddx and is accessed +via this screen function. In the process, it has grown another +parameter: ppLayerWin, which is filled in with a pointer to the window +at which save under marking and ValidateTree should begin. In the +single-layered framebuffer case, pLayerWin == pWin.
+ +
+ + Bool pScreen->ChangeSaveUnder(pLayerWin, firstChild) + WindowPtr pLayerWin; + WindowPtr firstChild; + +
+The dix functions ChangeSaveUnder and CheckSaveUnder have moved to ddx and +are accessed via this screen function. pLayerWin should be the window +returned in the ppLayerWin parameter of MarkOverlappedWindows. The function +may turn on backing store for windows that might be covered, and may partially +turn off backing store for windows. It returns TRUE if PostChangeSaveUnder +needs to be called to finish turning off backing store.
+ +
+ + void pScreen->PostChangeSaveUnder(pLayerWin, firstChild) + WindowPtr pLayerWin; + WindowPtr firstChild; + +
+The dix function DoChangeSaveUnder has moved to ddx and is accessed via +this screen function. This function completes the job of turning off +backing store that was started by ChangeSaveUnder.
+ +
+ + void pScreen->MoveWindow(pWin, x, y, pSib, kind) + WindowPtr pWin; + int x; + int y; + WindowPtr pSib; + VTKind kind; + +
+The formerly dix function MoveWindow has moved to ddx and is accessed via +this screen function. The new position of the window is given by +x,y. kind is VTMove if the window is only moving, or VTOther if +the border is also changing.
+ +
+ + void pScreen->ResizeWindow(pWin, x, y, w, h, pSib) + WindowPtr pWin; + int x; + int y; + unsigned int w; + unsigned int h; + WindowPtr pSib; + +
+The formerly dix function SlideAndSizeWindow has moved to ddx and is accessed via +this screen function. The new position is given by x,y. The new size +is given by w,h.
+ +
+ + WindowPtr pScreen->GetLayerWindow(pWin) + WindowPtr pWin + +
+This is a new function which returns a child of the layer parent of pWin.
+ +
+ + void pScreen->HandleExposures(pWin) + WindowPtr pWin; + +
+The formerly dix function HandleExposures has moved to ddx and is accessed via +this screen function. This function is called after ValidateTree and +uses the information contained in valdata to send exposures to windows.
+ +
+ + void pScreen->ReparentWindow(pWin, pPriorParent) + WindowPtr pWin; + WindowPtr pPriorParent; + +
+This function will be called when a window is reparented. At the time of +the call, pWin will already be spliced into its new position in the +window tree, and pPriorParent is its previous parent. This function +can be NULL.
+ +
+ + void pScreen->SetShape(pWin) + WindowPtr pWin; + +
+The formerly dix function SetShape has moved to ddx and is accessed via +this screen function. The window's new shape will have already been +stored in the window when this function is called.
+ +
+ + void pScreen->ChangeBorderWidth(pWin, width) + WindowPtr pWin; + unsigned int width; + +
+The formerly dix function ChangeBorderWidth has moved to ddx and is accessed via +this screen function. The new border width is given by width.
+ +
+ + void pScreen->MarkUnrealizedWindow(pChild, pWin, fromConfigure) + WindowPtr pChild; + WindowPtr pWin; + Bool fromConfigure; + +
+This function is called for windows that are being unrealized as part of +an UnrealizeTree. pChild is the window being unrealized, pWin is an +ancestor, and the fromConfigure value is simply propagated from UnrealizeTree.
+
+
+
+
+Graphics Contexts and Validation + +This graphics context (GC) contains state variables such as foreground and +background pixel value (color), the current line style and width, +the current tile or stipple for pattern generation, the current font for text +generation, and other similar attributes. + +In many graphics systems, the equivalent of the graphics context and the +drawable are combined as one entity. +The main distinction between the two kinds of status is that a drawable +describes a writing surface and the writings that may have already been done +on it, whereas a graphics context describes the drawing process. +A drawable is like a chalkboard. +A GC is like a piece of chalk. + +Unlike many similar systems, there is no "current pen location." +Every graphic operation is accompanied by the coordinates where it is to happen. + +The GC also includes two vectors of procedure pointers, the first +operate on the GC itself and are called GC funcs. The second, called +GC ops, +contains the functions that carry out the fundamental graphic operations +such as drawing lines, polygons, arcs, text, and copying bitmaps. +The DDX graphic software can, if it +wants to be smart, change these two vectors of procedure pointers +to take advantage of hardware/firmware in the server machine, which can do +a better job under certain circumstances. To reduce the amount of memory +consumed by each GC, it is wise to create a few "boilerplate" GC ops vectors +which can be shared by every GC which matches the constraints for that set. +Also, it is usually reasonable to have every GC created by a particular +module to share a common set of GC funcs. Samples of this sort of +sharing can be seen in fb/fbgc.c. + +The DDX software is notified any time the client (or DIX) uses a changed GC. +For instance, if the hardware has special support for drawing fixed-width +fonts, DDX can intercept changes to the current font in a GC just before +drawing is done. It can plug into either a fixed-width procedure that makes +the hardware draw characters, or a variable-width procedure that carefully +lays out glyphs by hand in software, depending upon the new font that is +selected. + +A definition of these structures can be found in the file +Xserver/include/gcstruct.h. + +Also included in each GC is support for dynamic devPrivates, which the +DDX can use for any purpose (see below). + +The DIX routines available for manipulating GCs are +CreateGC, ChangeGC, ChangeGCXIDs, CopyGC, SetClipRects, SetDashes, and FreeGC. +
+ + GCPtr CreateGC(pDrawable, mask, pval, pStatus) + DrawablePtr pDrawable; + BITS32 mask; + XID *pval; + int *pStatus; + + int ChangeGC(client, pGC, mask, pUnion) + ClientPtr client; + GCPtr pGC; + BITS32 mask; + ChangeGCValPtr pUnion; + + int ChangeGCXIDs(client, pGC, mask, pC32) + ClientPtr client; + GCPtr pGC; + BITS32 mask; + CARD32 *pC32; + + int CopyGC(pgcSrc, pgcDst, mask) + GCPtr pgcSrc; + GCPtr pgcDst; + BITS32 mask; + + int SetClipRects(pGC, xOrigin, yOrigin, nrects, prects, ordering) + GCPtr pGC; + int xOrigin, yOrigin; + int nrects; + xRectangle *prects; + int ordering; + + SetDashes(pGC, offset, ndash, pdash) + GCPtr pGC; + unsigned offset; + unsigned ndash; + unsigned char *pdash; + + int FreeGC(pGC, gid) + GCPtr pGC; + GContext gid; + +
+
+ +As a convenience, each Screen structure contains an array of +GCs that are preallocated, one at each depth the screen supports. +These are particularly useful in the mi code. Two DIX routines +must be used to get these GCs: +
+ + GCPtr GetScratchGC(depth, pScreen) + int depth; + ScreenPtr pScreen; + + FreeScratchGC(pGC) + GCPtr pGC; + +
+Always use these two routines, don't try to extract the scratch +GC yourself -- someone else might be using it, so a new one must +be created on the fly.
+ +If you need a GC for a very long time, say until the server is restarted, +you should not take one from the pool used by GetScratchGC, but should +get your own using CreateGC or CreateScratchGC. +This leaves the ones in the pool free for routines that only need it for +a little while and don't want to pay a heavy cost to get it. +
+ + GCPtr CreateScratchGC(pScreen, depth) + ScreenPtr pScreen; + int depth; + +
+NULL is returned if the GC cannot be created. +The GC returned can be freed with FreeScratchGC.
+
+ Details of Operation + +At screen initialization, a screen must supply a GC creation procedure. +At GC creation, the screen must fill in GC funcs and GC ops vectors +(Xserver/include/gcstruct.h). For any particular GC, the func vector +must remain constant, while the op vector may vary. This invariant is to +ensure that Wrappers work correctly. + +When a client request is processed that results in a change +to the GC, the device-independent state of the GC is updated. +This includes a record of the state that changed. +Then the ChangeGC GC func is called. +This is useful for graphics subsystems that are able to process +state changes in parallel with the server CPU. +DDX may opt not to take any action at GC-modify time. +This is more efficient if multiple GC-modify requests occur +between draws using a given GC. + +Validation occurs at the first draw operation that specifies the GC after +that GC was modified. DIX calls then the ValidateGC GC func. DDX should +then update its internal state. DDX internal state may be stored as one or +more of the following: 1) device private block on the GC; 2) hardware +state; 3) changes to the GC ops. + +The GC contains a serial number, which is loaded with a number fetched from +the window that was drawn into the last time the GC was used. The serial +number in the drawable is changed when the drawable's +clipList or absCorner changes. Thus, by +comparing the GC serial number with the drawable serial number, DIX can +force a validate if the drawable has been changed since the last time it +was used with this GC. + +In addition, the drawable serial number is always guaranteed to have the +most significant bit set to 0. Thus, the DDX layer can set the most +significant bit of the serial number to 1 in a GC to force a validate the next time +the GC is used. DIX also uses this technique to indicate that a change has +been made to the GC by way of a SetGC, a SetDashes or a SetClip request. +
+
+ GC Handling Routines + +The ScreenRec data structure has a pointer for +CreateGC(). +
+ + Bool pScreen->CreateGC(pGC) + GCPtr pGC; +
+This routine must fill in the fields of +a dynamically allocated GC that is passed in. +It does NOT allocate the GC record itself or fill +in the defaults; DIX does that.
+ +This must fill in both the GC funcs and ops; none of the drawing +functions will be called before the GC has been validated, +but the others (dealing with allocating of clip regions, +changing and destroying the GC, etc.) might be. + +The GC funcs vector contains pointers to 7 +routines and a devPrivate field: +
+ + pGC->funcs->ChangeGC(pGC, changes) + GCPtr pGC; + unsigned long changes; + +
+This GC func is called immediately after a field in the GC is changed. +changes is a bit mask indicating the changed fields of the GC in this +request.
+ +The ChangeGC routine is useful if you have a system where +state-changes to the GC can be swallowed immediately by your graphics +system, and a validate is not necessary. + +
+ + pGC->funcs->ValidateGC(pGC, changes, pDraw) + GCPtr pGC; + unsigned long changes; + DrawablePtr pDraw; + +
+ValidateGC is called by DIX just before the GC will be used when one +of many possible changes to the GC or the graphics system has +happened. It can modify devPrivates data attached to the GC, +change the op vector, or change hardware according to the +values in the GC. It may not change the device-independent portion of +the GC itself.
+ +In almost all cases, your ValidateGC() procedure should take the +regions that drawing needs to be clipped to and combine them into a +composite clip region, which you keep a pointer to in the private part +of the GC. In this way, your drawing primitive routines (and whatever +is below them) can easily determine what to clip and where. You +should combine the regions clientClip (the region that the client +desires to clip output to) and the region returned by +NotClippedByChildren(), in DIX. An example is in Xserver/fb/fbgc.c. + +Some kinds of extension software may cause this routine to be called +more than originally intended; you should not rely on algorithms that +will break under such circumstances. + +See the Strategies document for more information on creatively using +this routine. + +
+ + pGC->funcs->CopyGC(pGCSrc, mask, pGCDst) + GCPtr pGCSrc; + unsigned long mask; + GCPtr pGCDst; + +
+This routine is called by DIX when a GC is being copied to another GC. +This is for situations where dynamically allocated chunks of memory +are stored in the GC's dynamic devPrivates and need to be transferred to +the destination GC.
+ +
+ + pGC->funcs->DestroyGC(pGC) + GCPtr pGC; + +
+This routine is called before the GC is destroyed for the +entity interested in this GC to clean up after itself. +This routine is responsible for freeing any auxiliary storage allocated.
+
+
+ GC Clip Region Routines + +The GC clientClip field requires three procedures to manage it. These +procedures are in the GC funcs vector. The underlying principle is that dix +knows nothing about the internals of the clipping information, (except when +it has come from the client), and so calls ddX whenever it needs to copy, +set, or destroy such information. It could have been possible for dix not +to allow ddX to touch the field in the GC, and require it to keep its own +copy in devPriv, but since clip masks can be very large, this seems like a +bad idea. Thus, the server allows ddX to do whatever it wants to the +clientClip field of the GC, but requires it to do all manipulation itself. + +
+ + void pGC->funcs->ChangeClip(pGC, type, pValue, nrects) + GCPtr pGC; + int type; + char *pValue; + int nrects; + +
+This routine is called whenever the client changes the client clip +region. The pGC points to the GC involved, the type tells what form +the region has been sent in. If type is CT_NONE, then there is no +client clip. If type is CT_UNSORTED, CT_YBANDED or CT_YXBANDED, then +pValue pointer to a list of rectangles, nrects long. If type is +CT_REGION, then pValue pointer to a RegionRec from the mi region code. +If type is CT_PIXMAP pValue is a pointer to a pixmap. (The defines +for CT_NONE, etc. are in Xserver/include/gc.h.) This routine is +responsible for incrementing any necessary reference counts (e.g. for +a pixmap clip mask) for the new clipmask and freeing anything that +used to be in the GC's clipMask field. The lists of rectangles passed +in can be freed with 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(enum ExitCode error) + void ddxGiveUp(enum ExitCode error) +
+Some hardware may require special work to be done before the server +exits so that it is not left in an intermediate state. As explained +in the OS layer, FatalError() will call 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, updated again for the 1.9 release and extended +again for the 1.13 relealse. +
+ devPrivates + +devPrivates provides a way to attach arbitrary private data to various server structures. +Any structure which contains a devPrivates field of +type PrivateRec supports this mechanism. Some structures allow +allocating space for private data after some objects have been created, others +require all space allocations be registered before any objects of that type +are created. Xserver/include/privates.h +lists which of these cases applies to each structure containing +devPrivates. + + +To request private space, use +
+ Bool dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size); +
+The first argument is a pointer to a DevPrivateKeyRec which +will serve as the unique identifier for the private data. Typically this is +the address of a static DevPrivateKeyRec in your code. +The second argument is the class of objects for which this key will apply. +The third argument is the size of the space being requested, or +0 to only allocate a pointer that the caller will manage. +If space is requested, this space will be automatically freed when the object +is destroyed. Note that a call to dixSetPrivate +that changes the pointer value may cause the space to be unreachable by the caller, however it will still be automatically freed. +The function returns TRUE unless memory allocation fails. +If the function is called more than once on the same key, all calls must use +the same value for size or the server will abort.
+ + +To request per-screen private space in an object, use +
+ Bool dixRegisterScreenPrivateKey(DevScreenPrivateKey key, ScreenPtr pScreen, DevPrivateType type, unsigned size); +
+The type and size arguments are +the same as those to dixRegisterPrivateKey but this +function ensures the given key exists on objects of +the specified type with distinct storage for the given +pScreen. The key is usable on ScreenPrivate variants +that are otherwise equivalent to the following Private functions.
+ + + To request private space in objects created for a specific screen, use +
+ Bool dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key, DevPrivateType type, unsigned size); +
+ The type and size arguments are + the same as those to dixRegisterPrivateKey but this + function ensures only that the given key exists on objects of + the specified type that are allocated with reference to the specified + pScreen. Using the key on objects allocated for + other screens will result in incorrect results; there is no check made to + ensure that the caller's screen matches the private's screen. The key is + usable in any of the following functions. Screen-specific private storage is available + only for Windows, GCs, Pixmaps and Pictures. Attempts to allocate screen-specific + privates on other objects will result in a call to FatalError. +
+ + +To attach a piece of private data to an object, use: +
+ void dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) +
+The first argument is the address of the devPrivates +field in the target structure. This field is managed privately by the DIX +layer and should not be directly modified. The second argument is a pointer +to the DevPrivateKeyRec which you registered with +dixRegisterPrivateKey or allocated with +dixCreatePrivateKey. Only one +piece of data with a given key can be attached to an object, and in most cases +each key is specific to the type of object it was registered for. (An +exception is the PRIVATE_XSELINUX class which applies to multiple object types.) +The third argument is the value to store.
+ +If private data with the given key is already associated with the object, +dixSetPrivate will overwrite the old value with the +new one. + + +To look up a piece of private data, use one of: +
+ pointer dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) + pointer *dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) +
+The first argument is the address of the devPrivates field +in the target structure. The second argument is the key to look up. +If a non-zero size was given when the key was registered, or if private data +with the given key is already associated with the object, then +dixLookupPrivate will return the pointer value +while dixLookupPrivateAddr +will return the address of the pointer.
+ + +When implementing new server resource objects that support devPrivates, there +are four steps to perform: +Add a type value to the DevPrivateType enum in +Xserver/include/privates.h, +declare a field of type PrivateRec * in your structure; +initialize this field to NULL when creating any objects; and +when freeing any objects call the dixFreePrivates or +dixFreeObjectWithPrivates function. +
+
+ Wrappers + +Wrappers are not a body of code, nor an interface spec. They are, instead, +a technique for hooking a new module into an existing calling sequence. +There are limitations on other portions of the server implementation which +make using wrappers possible; limits on when specific fields of data +structures may be modified. They are intended as a replacement for +GCInterest queues, which were not general enough to support existing +modules; in particular software cursors needed more +control over the activity. The general mechanism for using wrappers is: +
+privateWrapperFunction (object, ...) + ObjectPtr object; +{ + pre-wrapped-function-stuff ... + + object->functionVector = dixLookupPrivate(&object->devPrivates, privateKey); + (*object->functionVector) (object, ...); + /* + * this next line is occasionally required by the rules governing + * wrapper functions. Always using it will not cause problems. + * Not using it when necessary can cause severe troubles. + */ + dixSetPrivate(&object->devPrivates, privateKey, object->functionVector); + object->functionVector = privateWrapperFunction; + + post-wrapped-function-stuff ... +} + +privateInitialize (object) + ObjectPtr object; +{ + dixSetPrivate(&object->devPrivates, privateKey, object->functionVector); + object->functionVector = privateWrapperFunction; +} +
+
+ +Thus the privateWrapperFunction provides hooks for performing work both +before and after the wrapped function has been called; the process of +resetting the functionVector is called "unwrapping" while the process of +fetching the wrapped function and replacing it with the wrapping function +is called "wrapping". It should be clear that GCInterest queues could +be emulated using wrappers. In general, any function vectors contained in +objects can be wrapped, but only vectors in GCs and Screens have been tested. + +Wrapping screen functions is quite easy; each vector is individually +wrapped. Screen functions are not supposed to change after initialization, +so rewrapping is technically not necessary, but causes no problems. + +Wrapping GC functions is a bit more complicated. GC's have two tables of +function vectors, one hanging from gc->ops and the other from gc->funcs, which +should be initially wrapped from a CreateGC wrapper. Wrappers should modify +only table pointers, not the contents of the tables, as they +may be shared by more than one GC (and, in the case of funcs, are probably +shared by all gcs). Your func wrappers may change the GC funcs or ops +pointers, and op wrappers may change the GC op pointers but not the funcs. + +Thus, the rule for GC wrappings is: wrap the funcs from CreateGC and, in each +func wrapper, unwrap the ops and funcs, call down, and re-wrap. In each op +wrapper, unwrap the ops, call down, and rewrap afterwards. Note that in +re-wrapping you must save out the pointer you're replacing again. This way the +chain will be maintained when wrappers adjust the funcs/ops tables they use. +
+
+
+ Work Queue + +To queue work for execution when all clients are in a stable state (i.e. +just before calling select() in WaitForSomething), call: +
+ Bool QueueWorkProc(function,client,closure) + Bool (*function)(); + ClientPtr client; + pointer closure; +
+
+ +When the server is about to suspend itself, the given function will be +executed: +
+ (*function) (client, closure) +
+
+ +Neither client nor closure are actually used inside the work queue routines. +
+
+
+ Summary of Routines + +This is a summary of the routines discussed in this document. +The procedure names are in alphabetical order. +The Struct is the structure it is attached to; if blank, this +procedure is not attached to a struct and must be named as shown. +The sample server provides implementations in the following +categories. Notice that many of the graphics routines have both +mi and fb implementations. + + +dix portable to all systems; do not attempt to rewrite (Xserver/dix) +os routine provided in Xserver/os or Xserver/include/os.h +ddx frame buffer dependent (examples in Xserver/fb) +mi routine provided in Xserver/mi +hd hardware dependent (examples in many Xserver/hw directories) +none not implemented in sample implementation + + + + Server Routines (Page 1) + + + + Procedure + Port + Struct + + + +ALLOCATE_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 + + + +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/doc/dtrace/Makefile.am b/doc/dtrace/Makefile.am new file mode 100644 index 0000000..df26d2b --- /dev/null +++ b/doc/dtrace/Makefile.am @@ -0,0 +1,15 @@ + +if ENABLE_DOCS +if XSERVER_DTRACE + +# Main DocBook/XML files (DOCTYPE book) +docbook = Xserver-DTrace.xml + +# The location where the DocBook/XML files and their generated formats are installed +shelfdir = $(docdir) + +# Generate DocBook/XML output formats with or without stylesheets +include $(top_srcdir)/docbook.am + +endif XSERVER_DTRACE +endif ENABLE_DOCS diff --git a/doc/dtrace/Makefile.in b/doc/dtrace/Makefile.in new file mode 100644 index 0000000..96f47e2 --- /dev/null +++ b/doc/dtrace/Makefile.in @@ -0,0 +1,792 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Generate output formats for a single DocBook/XML with/without chapters +# +# Variables set by the calling Makefile: +# shelfdir: the location where the docs/specs are installed. Typically $(docdir) +# docbook: the main DocBook/XML file, no chapters, appendix or image files +# chapters: all files pulled in by an XInclude statement and images. +# + +# +# This makefile is intended for Users Documentation and Functional Specifications. +# Do not use for Developer Documentation which is not installed and does not require olink. +# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 +# for an explanation on documents classification. +# + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/docbook.am +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@am__append_1 = $(docbook:.xml=.html) +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@am__append_2 = $(docbook:.xml=.txt) +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@am__append_3 = $(docbook:.xml=.pdf) \ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(docbook:.xml=.ps) +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@am__append_4 = $(docbook:.xml=.html.db) \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(docbook:.xml=.pdf.db) +subdir = doc/dtrace +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__dist_shelf_DATA_DIST = Xserver-DTrace.xml +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(shelfdir)" "$(DESTDIR)$(shelfdir)" +DATA = $(dist_shelf_DATA) $(shelf_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Main DocBook/XML files (DOCTYPE book) +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@docbook = Xserver-DTrace.xml + +# The location where the DocBook/XML files and their generated formats are installed +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@shelfdir = $(docdir) + +# DocBook/XML generated output formats to be installed +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@shelf_DATA = $(am__append_1) \ +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@ $(am__append_2) \ +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@ $(am__append_3) \ +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@ $(am__append_4) + +# DocBook/XML file with chapters, appendix and images it includes +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@dist_shelf_DATA = $(docbook) $(chapters) +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_SEARCHPATH_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --searchpath "$(abs_top_builddir)" + +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_HTML_OLINK_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam current.docid="$(<:.xml=)" + +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_HTML_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_SEARCHPATH_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_HTML_STYLESHEET_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_HTML_OLINK_FLAGS) + +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_PDF_OLINK_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam current.docid="$(<:.xml=)" + +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_FO_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_SEARCHPATH_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_FO_STYLESHEET_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_FO_IMAGEPATH_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_PDF_OLINK_FLAGS) + + +# Generate documents cross-reference target databases +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_SEARCHPATH_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --path "$(XORG_SGML_PATH)/X11" \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --path "$(abs_top_builddir)" + +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_OLINK_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam targets.filename "$@" \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam collect.xref.targets "only" \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam olink.base.uri "$(@:.db=)" + +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_HTML_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_SEARCHPATH_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_OLINK_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --nonet --xinclude \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl + +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_PDF_FLAGS = \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_SEARCHPATH_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_OLINK_FLAGS) \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --nonet --xinclude \ +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(STYLESHEET_SRCDIR)/xorg-fo.xsl + +@ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@CLEANFILES = $(shelf_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/dtrace/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/dtrace/Makefile +.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_srcdir)/docbook.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_shelfDATA: $(dist_shelf_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_shelf_DATA)'; test -n "$(shelfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(shelfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(shelfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(shelfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(shelfdir)" || exit $$?; \ + done + +uninstall-dist_shelfDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_shelf_DATA)'; test -n "$(shelfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(shelfdir)'; $(am__uninstall_files_from_dir) +install-shelfDATA: $(shelf_DATA) + @$(NORMAL_INSTALL) + @list='$(shelf_DATA)'; test -n "$(shelfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(shelfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(shelfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(shelfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(shelfdir)" || exit $$?; \ + done + +uninstall-shelfDATA: + @$(NORMAL_UNINSTALL) + @list='$(shelf_DATA)'; test -n "$(shelfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(shelfdir)'; $(am__uninstall_files_from_dir) +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(shelfdir)" "$(DESTDIR)$(shelfdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_shelfDATA install-shelfDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_shelfDATA uninstall-shelfDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dist_shelfDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-shelfDATA install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-dist_shelfDATA uninstall-shelfDATA + +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.html: %.xml $(chapters) +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.txt: %.xml $(chapters) +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.pdf: %.xml $(chapters) +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.ps: %.xml $(chapters) +@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@%.html.db: %.xml $(chapters) +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $< +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@%.pdf.db: %.xml $(chapters) +@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $< + +# Generate DocBook/XML output formats with or without stylesheets + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/dtrace/Xserver-DTrace.xml b/doc/dtrace/Xserver-DTrace.xml new file mode 100644 index 0000000..91ca254 --- /dev/null +++ b/doc/dtrace/Xserver-DTrace.xml @@ -0,0 +1,727 @@ + + %defs; +]> + +
+ + Xserver Provider for DTrace + + AlanCoopersmith + + Oracle Corporation + Solaris Engineering + + + X Server Version &xserver.version; + 2005200620072010 + 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. DTrace probes may be used + with SystemTap + on GNU/Linux systems. + + + + 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 + arg5 + arg6 + + + + + Request Probes + + + request-start + Called just before processing each client request. + requestName + requestCode + requestLength + clientId + requestBuffer + + + + + request-done + Called just after processing each client request. + requestName + requestCode + sequenceNumber + clientId + resultCode + + + + + Event Probes + + + send-event + Called just before send each event to a client. + clientId + eventCode + eventBuffer + + + + + + + Client Connection Probes + + + client-connect + Called when a new connection is opened from a client + clientId + clientFD + + + + + + + + client-auth + Called when client authenticates (normally just after connection opened) + clientId + clientAddr + clientPid + clientZoneId + + + + + + client-disconnect + Called when a client connection is closed + clientId + + + + + + + + + Resource Allocation Probes + + + resource-alloc + Called when a new resource (pixmap, gc, colormap, etc.) is allocated + resourceId + resourceTypeId + resourceValue + resourceTypeName + + + + + + resource-free + Called when a resource is freed + resourceId + resourceTypeId + resourceValue + resourceTypeName + + + + + + Input API probes + + + input-event + Called when an input event was submitted for processing + deviceid + eventtype + button or + keycode or + touchid + flags + nvalues + mask + values + + + +
+
+
+ + + Data Available in Probe Arguments + + + To access data in arguments of type string, you will need + to use copyinstr(). + To access data buffers referenced via uintptr_t's, you will + need to use copyin(). + + + Probe Arguments + + + + + + + Argument name + Type + Description + + + + + clientAddr + string + String representing address client connected from + + + clientFD + int + X server's file descriptor for server side of each connection + + + clientId + int + Unique integer identifier for each connection to the + X server + + + clientPid + pid_t + Process id of client, if connection is local + (from getpeerucred()) + + + clientZoneId + zoneid_t + Solaris: Zone id of client, if connection is local + (from getpeerucred()) + + + eventBuffer + uintptr_t + Pointer to buffer containing X event - decode using + structures in + <X11/Xproto.h> + and similar headers for each extension + + + eventCode + uint8_t + Event number of X event + + + resourceId + uint32_t + X resource id (XID) + + + resourceTypeId + uint32_t + Resource type id + + + resourceTypeName + string + String representing X resource type + ("PIXMAP", etc.) + + + resourceValue + uintptr_t + Pointer to data for X resource + + + resultCode + int + Integer code representing result status of request + + + requestBuffer + uintptr_t + Pointer to buffer containing X request - decode using + structures in + <X11/Xproto.h> + and similar headers for each extension + + + requestCode + uint8_t + Request number of X request or Extension + + + requestName + string + Name of X request or Extension + + + requestLength + uint16_t + Length of X request + + + sequenceNumber + uint32_t + Number of X request in in this connection + + + deviceid + int + The device's numerical ID + + + eventtype + int + Protocol event type + + + button, keycode, touchid + uint32_t + The button number, keycode or touch ID + + + flags + uint32_t + Miscellaneous event-specific server flags + + + nvalues + int8_t + Number of bits in mask and number of elements + in values + + + mask + uint8_t* + Binary mask indicating which indices in values contain + valid data + + + values + double* + Valuator values. Values for indices for which the + mask is not set are undefined + + + +
+
+
+ + + Examples + + + Counting requests by request name + + + This script simply increments a counter for each different request + made, and when you exit the script (such as by hitting + ControlC + ) prints the counts. + + +#!/usr/sbin/dtrace -s + +Xserver*:::request-start +{ + @counts[copyinstr(arg0)] = count(); +} + + + The output from a short run may appear as: + + QueryPointer 1 + CreatePixmap 2 + FreePixmap 2 + PutImage 2 + ChangeGC 10 + CopyArea 10 + CreateGC 14 + FreeGC 14 + RENDER 28 + SetClipRectangles 40 + + + + + This can be rewritten slightly to cache the string containing the name + of the request since it will be reused many times, instead of copying + it over and over from the kernel: + + +#!/usr/sbin/dtrace -s + +string Xrequest[uintptr_t]; + +Xserver*:::request-start +/Xrequest[arg0] == ""/ +{ + Xrequest[arg0] = copyinstr(arg0); +} + +Xserver*:::request-start +{ + @counts[Xrequest[arg0]] = count(); +} + + + + + + Get average CPU time per request + + This script records the CPU time used between the probes at + the start and end of each request and aggregates it per request type. + + +#!/usr/sbin/dtrace -s + +Xserver*:::request-start +{ + reqstart = vtimestamp; +} + +Xserver*:::request-done +{ + @times[copyinstr(arg0)] = avg(vtimestamp - reqstart); +} + + + The output from a sample run might look like: + + + ChangeGC 889 + MapWindow 907 + SetClipRectangles 1319 + PolyPoint 1413 + PolySegment 1434 + PolyRectangle 1828 + FreeCursor 1895 + FreeGC 1950 + CreateGC 2244 + FreePixmap 2246 + GetInputFocus 2249 + TranslateCoords 8508 + QueryTree 8846 + GetGeometry 9948 + CreatePixmap 12111 + AllowEvents 14090 + GrabServer 14791 + MIT-SCREEN-SAVER 16747 + ConfigureWindow 22917 + SetInputFocus 28521 + PutImage 240841 + + + + + + + Monitoring clients that connect and disconnect + + + This script simply prints information about each client that + connects or disconnects from the server while it is running. + Since the provider is specified as Xserver$1 instead + of Xserver* like previous examples, it won't monitor + all Xserver processes running on the machine, but instead expects + the process id of the X server to monitor to be specified as the + argument to the script. + + +#!/usr/sbin/dtrace -s + +Xserver$1:::client-connect +{ + printf("** Client Connect: id %d\n", arg0); +} + +Xserver$1:::client-auth +{ + printf("** Client auth'ed: id %d => %s pid %d\n", + arg0, copyinstr(arg1), arg2); +} + +Xserver$1:::client-disconnect +{ + printf("** Client Disconnect: id %d\n", arg0); +} + + + A sample run: + + +# ./foo.d 5790 +dtrace: script './foo.d' matched 4 probes +CPU ID FUNCTION:NAME + 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 65 + + 2 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64 + + 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 64 + + 0 15772 AuthAudit:client-auth ** Client auth'ed: id 64 => local host pid 2034 + + 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 65 + + 0 15772 AuthAudit:client-auth ** Client auth'ed: id 65 => local host pid 2034 + + 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64 + + + + + + + + Monitoring clients creating Pixmaps + + + This script can be used to determine which clients are creating + pixmaps in the X server, printing information about each client + as it connects to help trace it back to the program on the other + end of the X connection. + + +#!/usr/sbin/dtrace -qs + +string Xrequest[uintptr_t]; +string Xrestype[uintptr_t]; + +Xserver$1:::request-start +/Xrequest[arg0] == ""/ +{ + Xrequest[arg0] = copyinstr(arg0); +} + +Xserver$1:::resource-alloc +/arg3 != 0 && Xrestype[arg3] == ""/ +{ + Xrestype[arg3] = copyinstr(arg3); +} + + +Xserver$1:::request-start +/Xrequest[arg0] == "X_CreatePixmap"/ +{ + printf("-> %s: client %d\n", Xrequest[arg0], arg3); +} + +Xserver$1:::request-done +/Xrequest[arg0] == "X_CreatePixmap"/ +{ + printf("<- %s: client %d\n", Xrequest[arg0], arg3); +} + +Xserver$1:::resource-alloc +/Xrestype[arg3] == "PIXMAP"/ +{ + printf("** Pixmap alloc: %08x\n", arg0); +} + + +Xserver$1:::resource-free +/Xrestype[arg3] == "PIXMAP"/ +{ + printf("** Pixmap free: %08x\n", arg0); +} + +Xserver$1:::client-connect +{ + printf("** Client Connect: id %d\n", arg0); +} + +Xserver$1:::client-auth +{ + printf("** Client auth'ed: id %d => %s pid %d\n", + arg0, copyinstr(arg1), arg2); +} + +Xserver$1:::client-disconnect +{ + printf("** Client Disconnect: id %d\n", arg0); +} + + + Sample output from a run of this script: + +** Client Connect: id 17 +** Client auth'ed: id 17 => local host pid 20273 +-> X_CreatePixmap: client 17 +** Pixmap alloc: 02200009 +<- X_CreatePixmap: client 17 +-> X_CreatePixmap: client 15 +** Pixmap alloc: 01e00180 +<- X_CreatePixmap: client 15 +-> X_CreatePixmap: client 15 +** Pixmap alloc: 01e00181 +<- X_CreatePixmap: client 15 +-> X_CreatePixmap: client 14 +** Pixmap alloc: 01c004c8 +<- X_CreatePixmap: client 14 +** Pixmap free: 02200009 +** Client Disconnect: id 17 +** Pixmap free: 01e00180 +** Pixmap free: 01e00181 + + + + + + + + Input API monitoring with SystemTap + + + This script can be used to monitor events submitted by drivers to + the server for enqueuing. Due to the integration of the input API + probes, some server-enqueued events will show up too. + + # Compile+run with + # stap -g xorg.stp /usr/bin/Xorg + # + + + function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{ + int i; + unsigned char *mask = (unsigned char*)THIS->mask_in; + double *valuators = (double*)THIS->valuators_in; + char str[128] = {0}; + char *s = str; + + #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7))) + + s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators); + for (i = 0; i < THIS->nvaluators; i++) + { + s += sprintf(s, " %d: ", i); + if (BitIsSet(mask, i)) + s += sprintf(s, "%d", (int)valuators[i]); + } + + sprintf(THIS->__retvalue, "%s", str); + %} + + probe process(@1).mark("input__event") + { + deviceid = $arg1 + type = $arg2 + detail = $arg3 + flags = $arg4 + nvaluators = $arg5 + + str = print_valuators(nvaluators, $arg6, $arg7) + printf("Event: device %d type %d detail %d flags %#x %s\n", + deviceid, type, detail, flags, str); + } + + + Sample output from a run of this script: + +Event: device 13 type 4 detail 1 flags 0x0 nval: 0 :: +Event: device 13 type 6 detail 0 flags 0xa nval: 1 :: 0: 1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 4 1: -3 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -3 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1 +Event: device 13 type 5 detail 1 flags 0x0 nval: 0 :: + + + + + + + + +
diff --git a/doc/smartsched b/doc/smartsched new file mode 100644 index 0000000..057a759 --- /dev/null +++ b/doc/smartsched @@ -0,0 +1,204 @@ + Client Scheduling in X + Keith Packard + SuSE + 10/28/99 + +History: + +Since the original X server was written at Digital in 1987, the OS and DIX +layers shared responsibility for scheduling the order to service +client requests. The original design was simplistic; under the maximum +first make it work, then make it work well, this was a good idea. Now +that we have a bit more experience with X applications, it's time to +rethink the design. + +The basic dispatch loop in DIX looks like: + + for (;;) + { + nready = WaitForSomething (...); + while (nready--) + { + isItTimeToYield = FALSE; + while (!isItTimeToYield) + { + if (!ReadRequestFromClient (...)) + break; + (execute request); + } + } + } + +WaitForSomething looks like: + + for (;;) + if (ANYSET (ClientsWithInput)) + return popcount (ClientsWithInput); + select (...) + compute clientsReadable from select result; + return popcount (clientsReadable) + } + +ReadRequestFromClient looks like: + + if (!fullRequestQueued) + { + read (); + if (!fullRequestQueued) + { + remove from ClientsWithInput; + timesThisConnection = 0; + return 0; + } + } + if (twoFullRequestsQueued) + add to ClientsWithInput; + + if (++timesThisConnection >= 10) + { + isItTimeToYield = TRUE; + timesThisConnection = 0; + } + return 1; + +Here's what happens in this code: + +With a single client executing a stream of requests: + + A client sends a packet of requests to the server. + + WaitForSomething wakes up from select and returns that client + to Dispatch + + Dispatch calls ReadRequestFromClient which reads a buffer (4K) + full of requests from the client + + The server executes requests from this buffer until it emptys, + in two stages -- 10 requests at a time are executed in the + inner Dispatch loop, a buffer full of requests are executed + because WaitForSomething immediately returns if any clients + have complete requests pending in their input queues. + + When the buffer finally emptys, the next call to ReadRequest + FromClient will return zero and Dispatch will go back to + WaitForSomething; now that the client has no requests pending, + WaitForSomething will block in select again. If the client + is active, this select will immediately return that client + as ready to read. + +With multiple clients sending streams of requests, the sequence +of operations is similar, except that ReadRequestFromClient will +set isItTimeToYield after each 10 requests executed causing the +server to round-robin among the clients with available requests. + +It's important to realize here that any complete requests which have been +read from clients will be executed before the server will use select again +to discover input from other clients. A single busy client can easily +monopolize the X server. + +So, the X server doesn't share well with clients which are more interactive +in nature. + +The X server executes at most a buffer full of requests before again heading +into select; ReadRequestFromClient causes the server to yield when the +client request buffer doesn't contain a complete request. When +that buffer is executed quickly, the server spends a lot of time +in select discovering that the same client again has input ready. Thus +the server also runs busy clients less efficiently than is would be +possible. + +What to do. + +There are several things evident from the above discussion: + + 1 The server has a poor metric for deciding how much work it + should do at one time on behalf of a particular client. + + 2 The server doesn't call select often enough to detect less + aggressive clients in the face of busy clients, especially + when those clients are executing slow requests. + + 3 The server calls select too often when executing fast requests. + + 4 Some priority scheme is needed to keep interactive clients + responding to the user. + +And, there are some assumptions about how X applications work: + + 1 Each X request is executed relatively quickly; a request-granularity + is good enough for interactive response almost all of the time. + + 2 X applications receiving mouse/keyboard events are likely to + warrant additional attention from the X server. + +Instead of a request-count metric for work, a time-based metric should be +used. The server should select a reasonable time slice for each client +and execute requests for the entire timeslice before yielding to +another client. + +Instead of returning immediately from WaitForSomething if clients have +complete requests queued, the server should go through select each +time and gather as many ready clients as possible. This involves +polling instead of blocking and adding the ClientsWithInput to +clientsReadable after the select returns. + +Instead of yielding when the request buffer is empty for a particular +client, leave the yielding to the upper level scheduling and allow +the server to try and read again from the socket. If the client +is busy, another buffer full of requests will already be waiting +to be delivered thus avoiding the call through select and the +additional overhead in WaitForSomething. + +Finally, the dispatch loop should not simply execute requests from the +first available client, instead each client should be prioritized with +busy clients penalized and clients receiving user events praised. + +How it's done: + +Polling the current time of day from the OS is too expensive to +be done at each request boundary, so instead an interval timer is +set allowing the server to track time changes by counting invocations +of the related signal handler. Instead of using the wall time for +this purpose, the process CPU time is used instead. This serves +two purposes -- first, it allows the server to consume no CPU cycles +when idle, second it avoids conflicts with SIGALRM usage in other +parts of the server code. It's not without problems though; other +CPU intensive processes on the same machine can reduce interactive +response time within the X server. The dispatch loop can now +calculate an approximate time value using the number of signals +received. The granularity of the timer sets the scheduling jitter, +at 20ms it's only occasionally noticeable. + +The changes to WaitForSomething and ReadRequestFromClient are +straightforward, adjusting when select is called and avoiding +setting isItTimeToYield too often. + +The dispatch loop changes are more extensive, now instead of +executing requests from all available clients, a single client +is chosen after each call to WaitForSomething, requests are +executed for that client and WaitForSomething is called again. + +Each client is assigned a priority, the dispatch loop chooses the +client with the highest priority to execute. Priorities are +updated in three ways: + + 1. Clients which consume their entire slice are penalized + by having their priority reduced by one until they + reach some minimum value. + + 2. Clients which have executed no requests for some time + are praised by having their priority raised until they + return to normal priority. + + 3. Clients which receive user input are praised by having + their priority rased until they reach some maximal + value, above normal priority. + +The effect of these changes is to both improve interactive application +response and benchmark numbers at the same time. + + + + + +$XFree86: $ diff --git a/docbook.am b/docbook.am new file mode 100644 index 0000000..bba4d54 --- /dev/null +++ b/docbook.am @@ -0,0 +1,105 @@ +# +# Generate output formats for a single DocBook/XML with/without chapters +# +# Variables set by the calling Makefile: +# shelfdir: the location where the docs/specs are installed. Typically $(docdir) +# docbook: the main DocBook/XML file, no chapters, appendix or image files +# chapters: all files pulled in by an XInclude statement and images. +# + +# +# This makefile is intended for Users Documentation and Functional Specifications. +# Do not use for Developer Documentation which is not installed and does not require olink. +# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 +# for an explanation on documents classification. +# + +# DocBook/XML generated output formats to be installed +shelf_DATA = + +# DocBook/XML file with chapters, appendix and images it includes +dist_shelf_DATA = $(docbook) $(chapters) + +if HAVE_XMLTO +if HAVE_STYLESHEETS + +XMLTO_SEARCHPATH_FLAGS = \ + --searchpath "$(XORG_SGML_PATH)/X11" \ + --searchpath "$(abs_top_builddir)" +XMLTO_HTML_OLINK_FLAGS = \ + --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \ + --stringparam current.docid="$(<:.xml=)" +XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl +XMLTO_HTML_FLAGS = \ + $(XMLTO_SEARCHPATH_FLAGS) \ + $(XMLTO_HTML_STYLESHEET_FLAGS) \ + $(XMLTO_HTML_OLINK_FLAGS) + +shelf_DATA += $(docbook:.xml=.html) +%.html: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< + +if HAVE_XMLTO_TEXT + +shelf_DATA += $(docbook:.xml=.txt) +%.txt: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< +endif HAVE_XMLTO_TEXT + +if HAVE_FOP +XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/ +XMLTO_PDF_OLINK_FLAGS = \ + --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \ + --stringparam current.docid="$(<:.xml=)" +XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl + +XMLTO_FO_FLAGS = \ + $(XMLTO_SEARCHPATH_FLAGS) \ + $(XMLTO_FO_STYLESHEET_FLAGS) \ + $(XMLTO_FO_IMAGEPATH_FLAGS) \ + $(XMLTO_PDF_OLINK_FLAGS) + +shelf_DATA += $(docbook:.xml=.pdf) +%.pdf: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< + +shelf_DATA += $(docbook:.xml=.ps) +%.ps: %.xml $(chapters) + $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< +endif HAVE_FOP + +# Generate documents cross-reference target databases +if HAVE_XSLTPROC + +XSLT_SEARCHPATH_FLAGS = \ + --path "$(XORG_SGML_PATH)/X11" \ + --path "$(abs_top_builddir)" +XSLT_OLINK_FLAGS = \ + --stringparam targets.filename "$@" \ + --stringparam collect.xref.targets "only" \ + --stringparam olink.base.uri "$(@:.db=)" + +XSLT_HTML_FLAGS = \ + $(XSLT_SEARCHPATH_FLAGS) \ + $(XSLT_OLINK_FLAGS) \ + --nonet --xinclude \ + $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl +XSLT_PDF_FLAGS = \ + $(XSLT_SEARCHPATH_FLAGS) \ + $(XSLT_OLINK_FLAGS) \ + --nonet --xinclude \ + $(STYLESHEET_SRCDIR)/xorg-fo.xsl + +shelf_DATA += $(docbook:.xml=.html.db) +%.html.db: %.xml $(chapters) + $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $< + +shelf_DATA += $(docbook:.xml=.pdf.db) +%.pdf.db: %.xml $(chapters) + $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $< + +endif HAVE_XSLTPROC +endif HAVE_STYLESHEETS +endif HAVE_XMLTO + +CLEANFILES = $(shelf_DATA) diff --git a/dri3/Makefile.am b/dri3/Makefile.am new file mode 100644 index 0000000..e47a734 --- /dev/null +++ b/dri3/Makefile.am @@ -0,0 +1,13 @@ +noinst_LTLIBRARIES = libdri3.la +AM_CFLAGS = \ + -DHAVE_XORG_CONFIG_H \ + @DIX_CFLAGS@ @XORG_CFLAGS@ + +libdri3_la_SOURCES = \ + dri3.h \ + dri3_priv.h \ + dri3.c \ + dri3_request.c \ + dri3_screen.c + +sdk_HEADERS = dri3.h diff --git a/dri3/Makefile.in b/dri3/Makefile.in new file mode 100644 index 0000000..3471247 --- /dev/null +++ b/dri3/Makefile.in @@ -0,0 +1,805 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = dri3 +DIST_COMMON = $(sdk_HEADERS) $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libdri3_la_LIBADD = +am_libdri3_la_OBJECTS = dri3.lo dri3_request.lo dri3_screen.lo +libdri3_la_OBJECTS = $(am_libdri3_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libdri3_la_SOURCES) +DIST_SOURCES = $(libdri3_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libdri3.la +AM_CFLAGS = \ + -DHAVE_XORG_CONFIG_H \ + @DIX_CFLAGS@ @XORG_CFLAGS@ + +libdri3_la_SOURCES = \ + dri3.h \ + dri3_priv.h \ + dri3.c \ + dri3_request.c \ + dri3_screen.c + +sdk_HEADERS = dri3.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dri3/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign dri3/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libdri3.la: $(libdri3_la_OBJECTS) $(libdri3_la_DEPENDENCIES) $(EXTRA_libdri3_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libdri3_la_OBJECTS) $(libdri3_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri3_request.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri3_screen.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +# 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/dri3/dri3.c b/dri3/dri3.c new file mode 100644 index 0000000..76e07b4 --- /dev/null +++ b/dri3/dri3.c @@ -0,0 +1,92 @@ +/* + * Copyright © 2013 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include "dri3_priv.h" + +int dri3_request; +DevPrivateKeyRec dri3_screen_private_key; +DevPrivateKeyRec dri3_window_private_key; + +static Bool +dri3_close_screen(ScreenPtr screen) +{ + dri3_screen_priv_ptr screen_priv = dri3_screen_priv(screen); + + unwrap(screen_priv, screen, CloseScreen); + + free(screen_priv); + return (*screen->CloseScreen) (screen); +} + +Bool +dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info) +{ + if (!dixRegisterPrivateKey(&dri3_screen_private_key, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!dri3_screen_priv(screen)) { + dri3_screen_priv_ptr screen_priv = calloc(1, sizeof (dri3_screen_priv_rec)); + if (!screen_priv) + return FALSE; + + wrap(screen_priv, screen, CloseScreen, dri3_close_screen); + + screen_priv->info = info; + + dixSetPrivate(&screen->devPrivates, &dri3_screen_private_key, screen_priv); + } + + return TRUE; +} + +void +dri3_extension_init(void) +{ + ExtensionEntry *extension; + int i; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return; +#endif + + extension = AddExtension(DRI3_NAME, DRI3NumberEvents, DRI3NumberErrors, + proc_dri3_dispatch, sproc_dri3_dispatch, + NULL, StandardMinorOpcode); + if (!extension) + goto bail; + + dri3_request = extension->base; + + for (i = 0; i < screenInfo.numScreens; i++) { + if (!dri3_screen_init(screenInfo.screens[i], NULL)) + goto bail; + } + return; + +bail: + FatalError("Cannot initialize DRI3 extension"); +} diff --git a/dri3/dri3.h b/dri3/dri3.h new file mode 100644 index 0000000..7c0c330 --- /dev/null +++ b/dri3/dri3.h @@ -0,0 +1,65 @@ +/* + * Copyright © 2013 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _DRI3_H_ +#define _DRI3_H_ + +#include + +#ifdef DRI3 + +#include +#include + +#define DRI3_SCREEN_INFO_VERSION 0 + +typedef int (*dri3_open_proc)(ScreenPtr screen, + RRProviderPtr provider, + int *fd); + +typedef PixmapPtr (*dri3_pixmap_from_fd_proc) (ScreenPtr screen, + int fd, + CARD16 width, + CARD16 height, + CARD16 stride, + CARD8 depth, + CARD8 bpp); + +typedef int (*dri3_fd_from_pixmap_proc) (ScreenPtr screen, + PixmapPtr pixmap, + CARD16 *stride, + CARD32 *size); + +typedef struct dri3_screen_info { + uint32_t version; + + dri3_open_proc open; + dri3_pixmap_from_fd_proc pixmap_from_fd; + dri3_fd_from_pixmap_proc fd_from_pixmap; +} dri3_screen_info_rec, *dri3_screen_info_ptr; + +extern _X_EXPORT Bool +dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info); + +#endif + +#endif /* _DRI3_H_ */ diff --git a/dri3/dri3_priv.h b/dri3/dri3_priv.h new file mode 100644 index 0000000..e2fed83 --- /dev/null +++ b/dri3/dri3_priv.h @@ -0,0 +1,80 @@ +/* + * Copyright © 2013 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _DRI3PRIV_H_ +#define _DRI3PRIV_H_ + +#include +#include "scrnintstr.h" +#include "misc.h" +#include "list.h" +#include "windowstr.h" +#include "dixstruct.h" +#include +#include "dri3.h" + +extern int dri3_request; + +extern DevPrivateKeyRec dri3_screen_private_key; + +typedef struct dri3_screen_priv { + CloseScreenProcPtr CloseScreen; + ConfigNotifyProcPtr ConfigNotify; + DestroyWindowProcPtr DestroyWindow; + + dri3_screen_info_ptr info; +} dri3_screen_priv_rec, *dri3_screen_priv_ptr; + +#define wrap(priv,real,mem,func) {\ + priv->mem = real->mem; \ + real->mem = func; \ +} + +#define unwrap(priv,real,mem) {\ + real->mem = priv->mem; \ +} + +static inline dri3_screen_priv_ptr +dri3_screen_priv(ScreenPtr screen) +{ + return (dri3_screen_priv_ptr)dixLookupPrivate(&(screen)->devPrivates, &dri3_screen_private_key); +} + +int +proc_dri3_dispatch(ClientPtr client); + +int +sproc_dri3_dispatch(ClientPtr client); + +/* DDX interface */ + +int +dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd); + +int +dri3_pixmap_from_fd(PixmapPtr *ppixmap, ScreenPtr screen, int fd, + CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp); + +int +dri3_fd_from_pixmap(int *pfd, PixmapPtr pixmap, CARD16 *stride, CARD32 *size); + +#endif /* _DRI3PRIV_H_ */ diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c new file mode 100644 index 0000000..4e1408f --- /dev/null +++ b/dri3/dri3_request.c @@ -0,0 +1,395 @@ +/* + * Copyright © 2013 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include "dri3_priv.h" +#include +#include +#include +#include "../Xext/syncsdk.h" +#include + +static int +proc_dri3_query_version(ClientPtr client) +{ + REQUEST(xDRI3QueryVersionReq); + xDRI3QueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_DRI3_MAJOR_VERSION, + .minorVersion = SERVER_DRI3_MINOR_VERSION + }; + + REQUEST_SIZE_MATCH(xDRI3QueryVersionReq); + (void) stuff; + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.majorVersion); + swapl(&rep.minorVersion); + } + WriteToClient(client, sizeof(rep), &rep); + return Success; +} + +static int +proc_dri3_open(ClientPtr client) +{ + REQUEST(xDRI3OpenReq); + xDRI3OpenReply rep = { + .type = X_Reply, + .nfd = 1, + .sequenceNumber = client->sequence, + .length = 0, + }; + RRProviderPtr provider; + DrawablePtr drawable; + ScreenPtr screen; + int fd; + int status; + + REQUEST_SIZE_MATCH(xDRI3OpenReq); + + status = dixLookupDrawable(&drawable, stuff->drawable, client, 0, DixReadAccess); + if (status != Success) + return status; + + if (stuff->provider == None) + provider = NULL; + else if (!RRProviderType) { + return BadMatch; + } else { + VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); + if (drawable->pScreen != provider->pScreen) + return BadMatch; + } + screen = drawable->pScreen; + + status = dri3_open(client, screen, provider, &fd); + if (status != Success) + return status; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + + if (WriteFdToClient(client, fd, TRUE) < 0) { + close(fd); + return BadAlloc; + } + + WriteToClient(client, sizeof (rep), &rep); + + return Success; +} + +static int +proc_dri3_pixmap_from_buffer(ClientPtr client) +{ + REQUEST(xDRI3PixmapFromBufferReq); + int fd; + DrawablePtr drawable; + PixmapPtr pixmap; + int rc; + + SetReqFds(client, 1); + REQUEST_SIZE_MATCH(xDRI3PixmapFromBufferReq); + LEGAL_NEW_RESOURCE(stuff->pixmap, client); + rc = dixLookupDrawable(&drawable, stuff->drawable, client, M_ANY, DixGetAttrAccess); + if (rc != Success) { + client->errorValue = stuff->drawable; + return rc; + } + + if (!stuff->width || !stuff->height) { + client->errorValue = 0; + return BadValue; + } + + if (stuff->width > 32767 || stuff->height > 32767) + return BadAlloc; + + if (stuff->depth != 1) { + DepthPtr depth = drawable->pScreen->allowedDepths; + int i; + for (i = 0; i < drawable->pScreen->numDepths; i++, depth++) + if (depth->depth == stuff->depth) + break; + if (i == drawable->pScreen->numDepths) { + client->errorValue = stuff->depth; + return BadValue; + } + } + + fd = ReadFdFromClient(client); + if (fd < 0) + return BadValue; + + rc = dri3_pixmap_from_fd(&pixmap, + drawable->pScreen, fd, + stuff->width, stuff->height, + stuff->stride, stuff->depth, + stuff->bpp); + close (fd); + if (rc != Success) + return rc; + + pixmap->drawable.id = stuff->pixmap; + + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP, + pixmap, RT_NONE, NULL, DixCreateAccess); + + if (rc != Success) { + (*drawable->pScreen->DestroyPixmap) (pixmap); + return rc; + } + if (AddResource(stuff->pixmap, RT_PIXMAP, (pointer) pixmap)) + return Success; + + return Success; +} + +static int +proc_dri3_buffer_from_pixmap(ClientPtr client) +{ + REQUEST(xDRI3BufferFromPixmapReq); + xDRI3BufferFromPixmapReply rep = { + .type = X_Reply, + .nfd = 1, + .sequenceNumber = client->sequence, + .length = 0, + }; + int rc; + int fd; + PixmapPtr pixmap; + + REQUEST_SIZE_MATCH(xDRI3BufferFromPixmapReq); + rc = dixLookupResourceByType((pointer *) &pixmap, stuff->pixmap, RT_PIXMAP, + client, DixWriteAccess); + if (rc != Success) { + client->errorValue = stuff->pixmap; + return rc; + } + + rep.width = pixmap->drawable.width; + rep.height = pixmap->drawable.height; + rep.depth = pixmap->drawable.depth; + rep.bpp = pixmap->drawable.bitsPerPixel; + + rc = dri3_fd_from_pixmap(&fd, pixmap, &rep.stride, &rep.size); + if (rc != Success) + return rc; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.size); + swaps(&rep.width); + swaps(&rep.height); + swaps(&rep.stride); + } + if (WriteFdToClient(client, fd, TRUE) < 0) { + close(fd); + return BadAlloc; + } + + WriteToClient(client, sizeof(rep), &rep); + + return client->noClientException; +} + +static int +proc_dri3_fence_from_fd(ClientPtr client) +{ + REQUEST(xDRI3FenceFromFDReq); + DrawablePtr drawable; + int fd; + int status; + + SetReqFds(client, 1); + REQUEST_SIZE_MATCH(xDRI3FenceFromFDReq); + LEGAL_NEW_RESOURCE(stuff->fence, client); + + status = dixLookupDrawable(&drawable, stuff->drawable, client, M_ANY, DixGetAttrAccess); + if (status != Success) + return status; + + fd = ReadFdFromClient(client); + if (fd < 0) + return BadValue; + + status = SyncCreateFenceFromFD(client, drawable, stuff->fence, + fd, stuff->initially_triggered); + + return status; +} + +static int +proc_dri3_fd_from_fence(ClientPtr client) +{ + REQUEST(xDRI3FDFromFenceReq); + xDRI3FDFromFenceReply rep = { + .type = X_Reply, + .nfd = 1, + .sequenceNumber = client->sequence, + .length = 0, + }; + DrawablePtr drawable; + int fd; + int status; + SyncFence *fence; + + REQUEST_SIZE_MATCH(xDRI3FDFromFenceReq); + + status = dixLookupDrawable(&drawable, stuff->drawable, client, M_ANY, DixGetAttrAccess); + if (status != Success) + return status; + status = SyncVerifyFence(&fence, stuff->fence, client, DixWriteAccess); + if (status != Success) + return status; + + fd = SyncFDFromFence(client, drawable, fence); + if (fd < 0) + return BadMatch; + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + if (WriteFdToClient(client, fd, FALSE) < 0) + return BadAlloc; + + WriteToClient(client, sizeof(rep), &rep); + + return client->noClientException; +} + +int (*proc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = { + proc_dri3_query_version, /* 0 */ + proc_dri3_open, /* 1 */ + proc_dri3_pixmap_from_buffer, /* 2 */ + proc_dri3_buffer_from_pixmap, /* 3 */ + proc_dri3_fence_from_fd, /* 4 */ + proc_dri3_fd_from_fence, /* 5 */ +}; + +int +proc_dri3_dispatch(ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data >= DRI3NumberRequests || !proc_dri3_vector[stuff->data]) + return BadRequest; + return (*proc_dri3_vector[stuff->data]) (client); +} + +static int +sproc_dri3_query_version(ClientPtr client) +{ + REQUEST(xDRI3QueryVersionReq); + + swaps(&stuff->length); + swapl(&stuff->majorVersion); + swapl(&stuff->minorVersion); + return (*proc_dri3_vector[stuff->dri3ReqType]) (client); +} + +static int +sproc_dri3_open(ClientPtr client) +{ + REQUEST(xDRI3OpenReq); + + swaps(&stuff->length); + swapl(&stuff->drawable); + swapl(&stuff->provider); + return (*proc_dri3_vector[stuff->dri3ReqType]) (client); +} + +static int +sproc_dri3_pixmap_from_buffer(ClientPtr client) +{ + REQUEST(xDRI3PixmapFromBufferReq); + + swaps(&stuff->length); + swapl(&stuff->pixmap); + swapl(&stuff->drawable); + swapl(&stuff->size); + swaps(&stuff->width); + swaps(&stuff->height); + swaps(&stuff->stride); + return (*proc_dri3_vector[stuff->dri3ReqType]) (client); +} + +static int +sproc_dri3_buffer_from_pixmap(ClientPtr client) +{ + REQUEST(xDRI3BufferFromPixmapReq); + + swaps(&stuff->length); + swapl(&stuff->pixmap); + return (*proc_dri3_vector[stuff->dri3ReqType]) (client); +} + +static int +sproc_dri3_fence_from_fd(ClientPtr client) +{ + REQUEST(xDRI3FenceFromFDReq); + + swaps(&stuff->length); + swapl(&stuff->drawable); + swapl(&stuff->fence); + return (*proc_dri3_vector[stuff->dri3ReqType]) (client); +} + +static int +sproc_dri3_fd_from_fence(ClientPtr client) +{ + REQUEST(xDRI3FDFromFenceReq); + + swaps(&stuff->length); + swapl(&stuff->drawable); + swapl(&stuff->fence); + return (*proc_dri3_vector[stuff->dri3ReqType]) (client); +} + +int (*sproc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = { + sproc_dri3_query_version, /* 0 */ + sproc_dri3_open, /* 1 */ + sproc_dri3_pixmap_from_buffer, /* 2 */ + sproc_dri3_buffer_from_pixmap, /* 3 */ + sproc_dri3_fence_from_fd, /* 4 */ + sproc_dri3_fd_from_fence, /* 5 */ +}; + +int +sproc_dri3_dispatch(ClientPtr client) +{ + REQUEST(xReq); + if (stuff->data >= DRI3NumberRequests || !sproc_dri3_vector[stuff->data]) + return BadRequest; + return (*sproc_dri3_vector[stuff->data]) (client); +} diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c new file mode 100644 index 0000000..c880296 --- /dev/null +++ b/dri3/dri3_screen.c @@ -0,0 +1,86 @@ +/* + * Copyright © 2013 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include "dri3_priv.h" +#include +#include +#include +#include + +int +dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd) +{ + dri3_screen_priv_ptr ds = dri3_screen_priv(screen); + dri3_screen_info_ptr info = ds->info; + int rc; + + if (!info || !info->open) + return BadMatch; + + rc = (*info->open) (screen, provider, fd); + if (rc != Success) + return rc; + + return Success; +} + +int +dri3_pixmap_from_fd(PixmapPtr *ppixmap, ScreenPtr screen, int fd, + CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp) +{ + dri3_screen_priv_ptr ds = dri3_screen_priv(screen); + dri3_screen_info_ptr info = ds->info; + PixmapPtr pixmap; + + if (!info || !info->pixmap_from_fd) + return BadImplementation; + + pixmap = (*info->pixmap_from_fd) (screen, fd, width, height, stride, depth, bpp); + if (!pixmap) + return BadAlloc; + + *ppixmap = pixmap; + return Success; +} + +int +dri3_fd_from_pixmap(int *pfd, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) +{ + ScreenPtr screen = pixmap->drawable.pScreen; + dri3_screen_priv_ptr ds = dri3_screen_priv(screen); + dri3_screen_info_ptr info = ds->info; + int fd; + + if (!info || !info->fd_from_pixmap) + return BadImplementation; + + fd = (*info->fd_from_pixmap)(screen, pixmap, stride, size); + if (fd < 0) + return BadAlloc; + *pfd = fd; + return Success; +} + diff --git a/exa/Makefile.am b/exa/Makefile.am new file mode 100644 index 0000000..6a09966 --- /dev/null +++ b/exa/Makefile.am @@ -0,0 +1,26 @@ +noinst_LTLIBRARIES = libexa.la + +if XORG +sdk_HEADERS = exa.h +endif + +AM_CPPFLAGS = \ + $(XORG_INCS) \ + -I$(srcdir)/../miext/cw + +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) + +libexa_la_SOURCES = \ + exa.c \ + exa.h \ + exa_classic.c \ + exa_migration_classic.c \ + exa_driver.c \ + exa_mixed.c \ + exa_migration_mixed.c \ + exa_accel.c \ + exa_glyphs.c \ + exa_offscreen.c \ + exa_render.c \ + exa_priv.h \ + exa_unaccel.c diff --git a/exa/Makefile.in b/exa/Makefile.in new file mode 100644 index 0000000..c15da70 --- /dev/null +++ b/exa/Makefile.in @@ -0,0 +1,825 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = exa +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libexa_la_LIBADD = +am_libexa_la_OBJECTS = exa.lo exa_classic.lo exa_migration_classic.lo \ + exa_driver.lo exa_mixed.lo exa_migration_mixed.lo exa_accel.lo \ + exa_glyphs.lo exa_offscreen.lo exa_render.lo exa_unaccel.lo +libexa_la_OBJECTS = $(am_libexa_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libexa_la_SOURCES) +DIST_SOURCES = $(libexa_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__sdk_HEADERS_DIST = exa.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libexa.la +@XORG_TRUE@sdk_HEADERS = exa.h +AM_CPPFLAGS = \ + $(XORG_INCS) \ + -I$(srcdir)/../miext/cw + +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +libexa_la_SOURCES = \ + exa.c \ + exa.h \ + exa_classic.c \ + exa_migration_classic.c \ + exa_driver.c \ + exa_mixed.c \ + exa_migration_mixed.c \ + exa_accel.c \ + exa_glyphs.c \ + exa_offscreen.c \ + exa_render.c \ + exa_priv.h \ + exa_unaccel.c + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign exa/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign exa/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libexa.la: $(libexa_la_OBJECTS) $(libexa_la_DEPENDENCIES) $(EXTRA_libexa_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libexa_la_OBJECTS) $(libexa_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_accel.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_classic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_driver.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_glyphs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration_classic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration_mixed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_mixed.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_offscreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_render.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_unaccel.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +# 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/exa/exa.c b/exa/exa.c new file mode 100644 index 0000000..f8e499c --- /dev/null +++ b/exa/exa.c @@ -0,0 +1,1163 @@ +/* + * Copyright © 2001 Keith Packard + * + * Partly based on code that is Copyright © The XFree86 Project Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** @file + * This file covers the initialization and teardown of EXA, and has various + * functions not responsible for performing rendering, pixmap migration, or + * memory management. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +DevPrivateKeyRec exaScreenPrivateKeyRec; + +#ifdef MITSHM +static ShmFuncs exaShmFuncs = { NULL, NULL }; +#endif + +/** + * exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of + * the beginning of the given pixmap. + * + * Note that drivers are free to, and often do, munge this offset as necessary + * for handing to the hardware -- for example, translating it into a different + * aperture. This function may need to be extended in the future if we grow + * support for having multiple card-accessible offscreen, such as an AGP memory + * pool alongside the framebuffer pool. + */ +unsigned long +exaGetPixmapOffset(PixmapPtr pPix) +{ + ExaScreenPriv(pPix->drawable.pScreen); + ExaPixmapPriv(pPix); + + return (CARD8 *) pExaPixmap->fb_ptr - pExaScr->info->memoryBase; +} + +void * +exaGetPixmapDriverPrivate(PixmapPtr pPix) +{ + ExaPixmapPriv(pPix); + + return pExaPixmap->driverPriv; +} + +/** + * exaGetPixmapPitch() returns the pitch (in bytes) of the given pixmap. + * + * This is a helper to make driver code more obvious, due to the rather obscure + * naming of the pitch field in the pixmap. + */ +unsigned long +exaGetPixmapPitch(PixmapPtr pPix) +{ + return pPix->devKind; +} + +/** + * exaGetPixmapSize() returns the size in bytes of the given pixmap in video + * memory. Only valid when the pixmap is currently in framebuffer. + */ +unsigned long +exaGetPixmapSize(PixmapPtr pPix) +{ + ExaPixmapPrivPtr pExaPixmap; + + pExaPixmap = ExaGetPixmapPriv(pPix); + if (pExaPixmap != NULL) + return pExaPixmap->fb_size; + return 0; +} + +/** + * exaGetDrawablePixmap() returns a backing pixmap for a given drawable. + * + * @param pDrawable the drawable being requested. + * + * This function returns the backing pixmap for a drawable, whether it is a + * redirected window, unredirected window, or already a pixmap. Note that + * coordinate translation is needed when drawing to the backing pixmap of a + * redirected window, and the translation coordinates are provided by calling + * exaGetOffscreenPixmap() on the drawable. + */ +PixmapPtr +exaGetDrawablePixmap(DrawablePtr pDrawable) +{ + if (pDrawable->type == DRAWABLE_WINDOW) + return pDrawable->pScreen->GetWindowPixmap((WindowPtr) pDrawable); + else + return (PixmapPtr) pDrawable; +} + +/** + * Sets the offsets to add to coordinates to make them address the same bits in + * the backing drawable. These coordinates are nonzero only for redirected + * windows. + */ +void +exaGetDrawableDeltas(DrawablePtr pDrawable, PixmapPtr pPixmap, int *xp, int *yp) +{ +#ifdef COMPOSITE + if (pDrawable->type == DRAWABLE_WINDOW) { + *xp = -pPixmap->screen_x; + *yp = -pPixmap->screen_y; + return; + } +#endif + + *xp = 0; + *yp = 0; +} + +/** + * exaPixmapDirty() marks a pixmap as dirty, allowing for + * optimizations in pixmap migration when no changes have occurred. + */ +void +exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2) +{ + BoxRec box; + RegionRec region; + + box.x1 = max(x1, 0); + box.y1 = max(y1, 0); + box.x2 = min(x2, pPix->drawable.width); + box.y2 = min(y2, pPix->drawable.height); + + if (box.x1 >= box.x2 || box.y1 >= box.y2) + return; + + RegionInit(®ion, &box, 1); + DamageDamageRegion(&pPix->drawable, ®ion); + RegionUninit(®ion); +} + +static int +exaLog2(int val) +{ + int bits; + + if (val <= 0) + return 0; + for (bits = 0; val != 0; bits++) + val >>= 1; + return bits - 1; +} + +void +exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, + int w, int h, int bpp) +{ + pExaPixmap->accel_blocked = 0; + + if (pExaScr->info->maxPitchPixels) { + int max_pitch = pExaScr->info->maxPitchPixels * bits_to_bytes(bpp); + + if (pExaPixmap->fb_pitch > max_pitch) + pExaPixmap->accel_blocked |= EXA_RANGE_PITCH; + } + + if (pExaScr->info->maxPitchBytes && + pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes) + pExaPixmap->accel_blocked |= EXA_RANGE_PITCH; + + if (w > pExaScr->info->maxX) + pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH; + + if (h > pExaScr->info->maxY) + pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT; +} + +void +exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, + int w, int h, int bpp) +{ + if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) + pExaPixmap->fb_pitch = bits_to_bytes((1 << (exaLog2(w - 1) + 1)) * bpp); + else + pExaPixmap->fb_pitch = bits_to_bytes(w * bpp); + + pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, + pExaScr->info->pixmapPitchAlign); +} + +/** + * Returns TRUE if the pixmap is not movable. This is the case where it's a + * pixmap which has no private (almost always bad) or it's a scratch pixmap created by + * some X Server internal component (the score says it's pinned). + */ +Bool +exaPixmapIsPinned(PixmapPtr pPix) +{ + ExaPixmapPriv(pPix); + + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsPinned was called on a non-exa pixmap.\n"), TRUE); + + return pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED; +} + +/** + * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen + * memory, meaning that acceleration could probably be done to it, and that it + * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it + * with the CPU. + * + * Note that except for UploadToScreen()/DownloadFromScreen() (which explicitly + * deal with moving pixmaps in and out of system memory), EXA will give drivers + * pixmaps as arguments for which exaPixmapHasGpuCopy() is TRUE. + * + * @return TRUE if the given drawable is in framebuffer memory. + */ +Bool +exaPixmapHasGpuCopy(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return FALSE; + + return (*pExaScr->pixmap_has_gpu_copy) (pPixmap); +} + +/** + * exaDrawableIsOffscreen() is a convenience wrapper for exaPixmapHasGpuCopy(). + */ +Bool +exaDrawableIsOffscreen(DrawablePtr pDrawable) +{ + return exaPixmapHasGpuCopy(exaGetDrawablePixmap(pDrawable)); +} + +/** + * Returns the pixmap which backs a drawable, and the offsets to add to + * coordinates to make them address the same bits in the backing drawable. + */ +PixmapPtr +exaGetOffscreenPixmap(DrawablePtr pDrawable, int *xp, int *yp) +{ + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + exaGetDrawableDeltas(pDrawable, pPixmap, xp, yp); + + if (exaPixmapHasGpuCopy(pPixmap)) + return pPixmap; + else + return NULL; +} + +/** + * Returns TRUE if the pixmap GPU copy is being accessed. + */ +Bool +ExaDoPrepareAccess(PixmapPtr pPixmap, int index) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + Bool has_gpu_copy, ret; + int i; + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return FALSE; + + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: ExaDoPrepareAccess was called on a non-exa pixmap.\n"), FALSE); + + /* Handle repeated / nested calls. */ + for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { + if (pExaScr->access[i].pixmap == pPixmap) { + pExaScr->access[i].count++; + return pExaScr->access[i].retval; + } + } + + /* If slot for this index is taken, find an empty slot */ + if (pExaScr->access[index].pixmap) { + for (index = EXA_NUM_PREPARE_INDICES - 1; index >= 0; index--) + if (!pExaScr->access[index].pixmap) + break; + } + + /* Access to this pixmap hasn't been prepared yet, so data pointer should be NULL. */ + if (pPixmap->devPrivate.ptr != NULL) { + EXA_FatalErrorDebug(("EXA bug: pPixmap->devPrivate.ptr was %p, but should have been NULL.\n", pPixmap->devPrivate.ptr)); + } + + has_gpu_copy = exaPixmapHasGpuCopy(pPixmap); + + if (has_gpu_copy && pExaPixmap->fb_ptr) { + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + ret = TRUE; + } + else { + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + ret = FALSE; + } + + /* Store so we can handle repeated / nested calls. */ + pExaScr->access[index].pixmap = pPixmap; + pExaScr->access[index].count = 1; + + if (!has_gpu_copy) + goto out; + + exaWaitSync(pScreen); + + if (pExaScr->info->PrepareAccess == NULL) + goto out; + + if (index >= EXA_PREPARE_AUX_DEST && + !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) + FatalError("Unsupported AUX indices used on a pinned pixmap.\n"); + exaMoveOutPixmap(pPixmap); + ret = FALSE; + goto out; + } + + if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) { + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED && + !(pExaScr->info->flags & EXA_MIXED_PIXMAPS)) + FatalError("Driver failed PrepareAccess on a pinned pixmap.\n"); + exaMoveOutPixmap(pPixmap); + ret = FALSE; + goto out; + } + + ret = TRUE; + + out: + pExaScr->access[index].retval = ret; + return ret; +} + +/** + * exaPrepareAccess() is EXA's wrapper for the driver's PrepareAccess() handler. + * + * It deals with waiting for synchronization with the card, determining if + * PrepareAccess() is necessary, and working around PrepareAccess() failure. + */ +void +exaPrepareAccess(DrawablePtr pDrawable, int index) +{ + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + ExaScreenPriv(pDrawable->pScreen); + + if (pExaScr->prepare_access_reg) + pExaScr->prepare_access_reg(pPixmap, index, NULL); + else + (void) ExaDoPrepareAccess(pPixmap, index); +} + +/** + * exaFinishAccess() is EXA's wrapper for the driver's FinishAccess() handler. + * + * It deals with calling the driver's FinishAccess() only if necessary. + */ +void +exaFinishAccess(DrawablePtr pDrawable, int index) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + ExaScreenPriv(pScreen); + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + ExaPixmapPriv(pPixmap); + int i; + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: exaFinishAccesss was called on a non-exa pixmap.\n"),); + + /* Handle repeated / nested calls. */ + for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { + if (pExaScr->access[i].pixmap == pPixmap) { + if (--pExaScr->access[i].count > 0) + return; + break; + } + } + + /* Catch unbalanced Prepare/FinishAccess calls. */ + if (i == EXA_NUM_PREPARE_INDICES) + EXA_FatalErrorDebugWithRet(("EXA bug: FinishAccess called without PrepareAccess for pixmap 0x%p.\n", pPixmap),); + + pExaScr->access[i].pixmap = NULL; + + /* We always hide the devPrivate.ptr. */ + pPixmap->devPrivate.ptr = NULL; + + /* Only call FinishAccess if PrepareAccess was called and succeeded. */ + if (!pExaScr->info->FinishAccess || !pExaScr->access[i].retval) + return; + + if (i >= EXA_PREPARE_AUX_DEST && + !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { + ErrorF("EXA bug: Trying to call driver FinishAccess hook with " + "unsupported index EXA_PREPARE_AUX*\n"); + return; + } + + (*pExaScr->info->FinishAccess) (pPixmap, i); +} + +/** + * Helper for things common to all schemes when a pixmap is destroyed + */ +void +exaDestroyPixmap(PixmapPtr pPixmap) +{ + ExaScreenPriv(pPixmap->drawable.pScreen); + int i; + + /* Finish access if it was prepared (e.g. pixmap created during + * software fallback) + */ + for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { + if (pExaScr->access[i].pixmap == pPixmap) { + exaFinishAccess(&pPixmap->drawable, i); + pExaScr->access[i].pixmap = NULL; + break; + } + } +} + +/** + * Here begins EXA's GC code. + * Do not ever access the fb/mi layer directly. + */ + +static void + exaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); + +static void + exaDestroyGC(GCPtr pGC); + +static void + exaChangeGC(GCPtr pGC, unsigned long mask); + +static void + exaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); + +static void + exaChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects); + +static void + exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc); + +static void + exaDestroyClip(GCPtr pGC); + +const GCFuncs exaGCFuncs = { + exaValidateGC, + exaChangeGC, + exaCopyGC, + exaDestroyGC, + exaChangeClip, + exaDestroyClip, + exaCopyClip +}; + +static void +exaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + /* fbValidateGC will do direct access to pixmaps if the tiling has changed. + * Do a few smart things so fbValidateGC can do it's work. + */ + + ScreenPtr pScreen = pDrawable->pScreen; + + ExaScreenPriv(pScreen); + ExaGCPriv(pGC); + PixmapPtr pTile = NULL; + Bool finish_current_tile = FALSE; + + /* Either of these conditions is enough to trigger access to a tile pixmap. */ + /* With pGC->tileIsPixel == 1, you run the risk of dereferencing an invalid tile pixmap pointer. */ + if (pGC->fillStyle == FillTiled || + ((changes & GCTile) && !pGC->tileIsPixel)) { + pTile = pGC->tile.pixmap; + + /* Sometimes tile pixmaps are swapped, you need access to: + * - The current tile if it depth matches. + * - Or the rotated tile if that one matches depth and !(changes & GCTile). + * - Or the current tile pixmap and a newly created one. + */ + if (pTile && pTile->drawable.depth != pDrawable->depth && + !(changes & GCTile)) { + PixmapPtr pRotatedTile = fbGetRotatedPixmap(pGC); + + if (pRotatedTile && + pRotatedTile->drawable.depth == pDrawable->depth) + pTile = pRotatedTile; + else + finish_current_tile = TRUE; /* CreatePixmap will be called. */ + } + } + + if (pGC->stipple) + exaPrepareAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); + if (pTile) + exaPrepareAccess(&pTile->drawable, EXA_PREPARE_SRC); + + /* Calls to Create/DestroyPixmap have to be identified as special. */ + pExaScr->fallback_counter++; + swap(pExaGC, pGC, funcs); + (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable); + swap(pExaGC, pGC, funcs); + pExaScr->fallback_counter--; + + if (pTile) + exaFinishAccess(&pTile->drawable, EXA_PREPARE_SRC); + if (finish_current_tile && pGC->tile.pixmap) + exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_AUX_DEST); + if (pGC->stipple) + exaFinishAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); +} + +/* Is exaPrepareAccessGC() needed? */ +static void +exaDestroyGC(GCPtr pGC) +{ + ExaGCPriv(pGC); + swap(pExaGC, pGC, funcs); + (*pGC->funcs->DestroyGC) (pGC); + swap(pExaGC, pGC, funcs); +} + +static void +exaChangeGC(GCPtr pGC, unsigned long mask) +{ + ExaGCPriv(pGC); + swap(pExaGC, pGC, funcs); + (*pGC->funcs->ChangeGC) (pGC, mask); + swap(pExaGC, pGC, funcs); +} + +static void +exaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) +{ + ExaGCPriv(pGCDst); + swap(pExaGC, pGCDst, funcs); + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + swap(pExaGC, pGCDst, funcs); +} + +static void +exaChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +{ + ExaGCPriv(pGC); + swap(pExaGC, pGC, funcs); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + swap(pExaGC, pGC, funcs); +} + +static void +exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc) +{ + ExaGCPriv(pGCDst); + swap(pExaGC, pGCDst, funcs); + (*pGCDst->funcs->CopyClip) (pGCDst, pGCSrc); + swap(pExaGC, pGCDst, funcs); +} + +static void +exaDestroyClip(GCPtr pGC) +{ + ExaGCPriv(pGC); + swap(pExaGC, pGC, funcs); + (*pGC->funcs->DestroyClip) (pGC); + swap(pExaGC, pGC, funcs); +} + +/** + * exaCreateGC makes a new GC and hooks up its funcs handler, so that + * exaValidateGC() will get called. + */ +static int +exaCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + + ExaScreenPriv(pScreen); + ExaGCPriv(pGC); + Bool ret; + + swap(pExaScr, pScreen, CreateGC); + if ((ret = (*pScreen->CreateGC) (pGC))) { + wrap(pExaGC, pGC, funcs, (GCFuncs *) &exaGCFuncs); + wrap(pExaGC, pGC, ops, (GCOps *) &exaOps); + } + swap(pExaScr, pScreen, CreateGC); + + return ret; +} + +static Bool +exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask) +{ + Bool ret; + ScreenPtr pScreen = pWin->drawable.pScreen; + + ExaScreenPriv(pScreen); + + if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) + exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); + + if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) + exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); + + pExaScr->fallback_counter++; + swap(pExaScr, pScreen, ChangeWindowAttributes); + ret = pScreen->ChangeWindowAttributes(pWin, mask); + swap(pExaScr, pScreen, ChangeWindowAttributes); + pExaScr->fallback_counter--; + + if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) + exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); + if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) + exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); + + return ret; +} + +static RegionPtr +exaBitmapToRegion(PixmapPtr pPix) +{ + RegionPtr ret; + ScreenPtr pScreen = pPix->drawable.pScreen; + + ExaScreenPriv(pScreen); + + exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC); + swap(pExaScr, pScreen, BitmapToRegion); + ret = (*pScreen->BitmapToRegion) (pPix); + swap(pExaScr, pScreen, BitmapToRegion); + exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC); + + return ret; +} + +static Bool +exaCreateScreenResources(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + PixmapPtr pScreenPixmap; + Bool b; + + swap(pExaScr, pScreen, CreateScreenResources); + b = pScreen->CreateScreenResources(pScreen); + swap(pExaScr, pScreen, CreateScreenResources); + + if (!b) + return FALSE; + + pScreenPixmap = pScreen->GetScreenPixmap(pScreen); + + if (pScreenPixmap) { + ExaPixmapPriv(pScreenPixmap); + + exaSetAccelBlock(pExaScr, pExaPixmap, + pScreenPixmap->drawable.width, + pScreenPixmap->drawable.height, + pScreenPixmap->drawable.bitsPerPixel); + } + + return TRUE; +} + +static void +ExaBlockHandler(ScreenPtr pScreen, pointer pTimeout, + pointer pReadmask) +{ + ExaScreenPriv(pScreen); + + /* Move any deferred results from a software fallback to the driver pixmap */ + if (pExaScr->deferred_mixed_pixmap) + exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap); + + unwrap(pExaScr, pScreen, BlockHandler); + (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); + wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler); + + /* The rest only applies to classic EXA */ + if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) + return; + + /* Try and keep the offscreen memory area tidy every now and then (at most + * once per second) when the server has been idle for at least 100ms. + */ + if (pExaScr->numOffscreenAvailable > 1) { + CARD32 now = GetTimeInMillis(); + + pExaScr->nextDefragment = now + + max(100, (INT32) (pExaScr->lastDefragment + 1000 - now)); + AdjustWaitForDelay(pTimeout, pExaScr->nextDefragment - now); + } +} + +static void +ExaWakeupHandler(ScreenPtr pScreen, unsigned long result, + pointer pReadmask) +{ + ExaScreenPriv(pScreen); + + unwrap(pExaScr, pScreen, WakeupHandler); + (*pScreen->WakeupHandler) (pScreen, result, pReadmask); + wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler); + + if (result == 0 && pExaScr->numOffscreenAvailable > 1) { + CARD32 now = GetTimeInMillis(); + + if ((int) (now - pExaScr->nextDefragment) > 0) { + ExaOffscreenDefragment(pScreen); + pExaScr->lastDefragment = now; + } + } +} + +/** + * exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's + * screen private, before calling down to the next CloseSccreen. + */ +static Bool +exaCloseScreen(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + + if (ps->Glyphs == exaGlyphs) + exaGlyphsFini(pScreen); + + if (pScreen->BlockHandler == ExaBlockHandler) + unwrap(pExaScr, pScreen, BlockHandler); + if (pScreen->WakeupHandler == ExaWakeupHandler) + unwrap(pExaScr, pScreen, WakeupHandler); + unwrap(pExaScr, pScreen, CreateGC); + unwrap(pExaScr, pScreen, CloseScreen); + unwrap(pExaScr, pScreen, GetImage); + unwrap(pExaScr, pScreen, GetSpans); + if (pExaScr->SavedCreatePixmap) + unwrap(pExaScr, pScreen, CreatePixmap); + if (pExaScr->SavedDestroyPixmap) + unwrap(pExaScr, pScreen, DestroyPixmap); + if (pExaScr->SavedModifyPixmapHeader) + unwrap(pExaScr, pScreen, ModifyPixmapHeader); + unwrap(pExaScr, pScreen, CopyWindow); + unwrap(pExaScr, pScreen, ChangeWindowAttributes); + unwrap(pExaScr, pScreen, BitmapToRegion); + unwrap(pExaScr, pScreen, CreateScreenResources); + if (pExaScr->SavedSharePixmapBacking) + unwrap(pExaScr, pScreen, SharePixmapBacking); + if (pExaScr->SavedSetSharedPixmapBacking) + unwrap(pExaScr, pScreen, SetSharedPixmapBacking); + unwrap(pExaScr, ps, Composite); + if (pExaScr->SavedGlyphs) + unwrap(pExaScr, ps, Glyphs); + unwrap(pExaScr, ps, Trapezoids); + unwrap(pExaScr, ps, Triangles); + unwrap(pExaScr, ps, AddTraps); + + free(pExaScr); + + return (*pScreen->CloseScreen) (pScreen); +} + +/** + * This function allocates a driver structure for EXA drivers to fill in. By + * having EXA allocate the structure, the driver structure can be extended + * without breaking ABI between EXA and the drivers. The driver's + * responsibility is to check beforehand that the EXA module has a matching + * major number and sufficient minor. Drivers are responsible for freeing the + * driver structure using free(). + * + * @return a newly allocated, zero-filled driver structure + */ +ExaDriverPtr +exaDriverAlloc(void) +{ + return calloc(1, sizeof(ExaDriverRec)); +} + +/** + * @param pScreen screen being initialized + * @param pScreenInfo EXA driver record + * + * exaDriverInit sets up EXA given a driver record filled in by the driver. + * pScreenInfo should have been allocated by exaDriverAlloc(). See the + * comments in _ExaDriver for what must be filled in and what is optional. + * + * @return TRUE if EXA was successfully initialized. + */ +Bool +exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo) +{ + ExaScreenPrivPtr pExaScr; + PictureScreenPtr ps; + + if (!pScreenInfo) + return FALSE; + + if (pScreenInfo->exa_major != EXA_VERSION_MAJOR || + pScreenInfo->exa_minor > EXA_VERSION_MINOR) { + LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements " + "(%d.%d) are incompatible with EXA version (%d.%d)\n", + pScreen->myNum, + pScreenInfo->exa_major, pScreenInfo->exa_minor, + EXA_VERSION_MAJOR, EXA_VERSION_MINOR); + return FALSE; + } + + if (!pScreenInfo->CreatePixmap && !pScreenInfo->CreatePixmap2) { + if (!pScreenInfo->memoryBase) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase " + "must be non-zero\n", pScreen->myNum); + return FALSE; + } + + if (!pScreenInfo->memorySize) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memorySize must be " + "non-zero\n", pScreen->myNum); + return FALSE; + } + + if (pScreenInfo->offScreenBase > pScreenInfo->memorySize) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::offScreenBase must " + "be <= ExaDriverRec::memorySize\n", pScreen->myNum); + return FALSE; + } + } + + if (!pScreenInfo->PrepareSolid) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::PrepareSolid must be " + "non-NULL\n", pScreen->myNum); + return FALSE; + } + + if (!pScreenInfo->PrepareCopy) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::PrepareCopy must be " + "non-NULL\n", pScreen->myNum); + return FALSE; + } + + if (!pScreenInfo->WaitMarker) { + LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::WaitMarker must be " + "non-NULL\n", pScreen->myNum); + return FALSE; + } + + /* If the driver doesn't set any max pitch values, we'll just assume + * that there's a limitation by pixels, and that it's the same as + * maxX. + * + * We want maxPitchPixels or maxPitchBytes to be set so we can check + * pixmaps against the max pitch in exaCreatePixmap() -- it matters + * whether a pixmap is rejected because of its pitch or + * because of its width. + */ + if (!pScreenInfo->maxPitchPixels && !pScreenInfo->maxPitchBytes) { + pScreenInfo->maxPitchPixels = pScreenInfo->maxX; + } + + ps = GetPictureScreenIfSet(pScreen); + + if (!dixRegisterPrivateKey(&exaScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) { + LogMessage(X_WARNING, "EXA(%d): Failed to register screen private\n", + pScreen->myNum); + return FALSE; + } + + pExaScr = calloc(sizeof(ExaScreenPrivRec), 1); + if (!pExaScr) { + LogMessage(X_WARNING, "EXA(%d): Failed to allocate screen private\n", + pScreen->myNum); + return FALSE; + } + + pExaScr->info = pScreenInfo; + + dixSetPrivate(&pScreen->devPrivates, exaScreenPrivateKey, pExaScr); + + pExaScr->migration = ExaMigrationAlways; + + exaDDXDriverInit(pScreen); + + if (!dixRegisterScreenSpecificPrivateKey + (pScreen, &pExaScr->gcPrivateKeyRec, PRIVATE_GC, sizeof(ExaGCPrivRec))) { + LogMessage(X_WARNING, "EXA(%d): Failed to allocate GC private\n", + pScreen->myNum); + return FALSE; + } + + /* + * Replace various fb screen functions + */ + if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && + (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) || + (pExaScr->info->flags & EXA_MIXED_PIXMAPS))) + wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler); + if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && + !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) + wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler); + wrap(pExaScr, pScreen, CreateGC, exaCreateGC); + wrap(pExaScr, pScreen, CloseScreen, exaCloseScreen); + wrap(pExaScr, pScreen, GetImage, exaGetImage); + wrap(pExaScr, pScreen, GetSpans, ExaCheckGetSpans); + wrap(pExaScr, pScreen, CopyWindow, exaCopyWindow); + wrap(pExaScr, pScreen, ChangeWindowAttributes, exaChangeWindowAttributes); + wrap(pExaScr, pScreen, BitmapToRegion, exaBitmapToRegion); + wrap(pExaScr, pScreen, CreateScreenResources, exaCreateScreenResources); + + if (ps) { + wrap(pExaScr, ps, Composite, exaComposite); + if (pScreenInfo->PrepareComposite) { + wrap(pExaScr, ps, Glyphs, exaGlyphs); + } + else { + wrap(pExaScr, ps, Glyphs, ExaCheckGlyphs); + } + wrap(pExaScr, ps, Trapezoids, exaTrapezoids); + wrap(pExaScr, ps, Triangles, exaTriangles); + wrap(pExaScr, ps, AddTraps, ExaCheckAddTraps); + } + +#ifdef MITSHM + /* + * Don't allow shared pixmaps. + */ + ShmRegisterFuncs(pScreen, &exaShmFuncs); +#endif + /* + * Hookup offscreen pixmaps + */ + if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) { + if (!dixRegisterScreenSpecificPrivateKey + (pScreen, &pExaScr->pixmapPrivateKeyRec, PRIVATE_PIXMAP, + sizeof(ExaPixmapPrivRec))) { + LogMessage(X_WARNING, + "EXA(%d): Failed to allocate pixmap private\n", + pScreen->myNum); + return FALSE; + } + if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) { + if (pExaScr->info->flags & EXA_MIXED_PIXMAPS) { + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_mixed); + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_mixed); + wrap(pExaScr, pScreen, ModifyPixmapHeader, + exaModifyPixmapHeader_mixed); + wrap(pExaScr, pScreen, SharePixmapBacking, exaSharePixmapBacking_mixed); + wrap(pExaScr, pScreen, SetSharedPixmapBacking, exaSetSharedPixmapBacking_mixed); + + pExaScr->do_migration = exaDoMigration_mixed; + pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_mixed; + pExaScr->do_move_in_pixmap = exaMoveInPixmap_mixed; + pExaScr->do_move_out_pixmap = NULL; + pExaScr->prepare_access_reg = exaPrepareAccessReg_mixed; + } + else { + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_driver); + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver); + wrap(pExaScr, pScreen, ModifyPixmapHeader, + exaModifyPixmapHeader_driver); + pExaScr->do_migration = NULL; + pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_driver; + pExaScr->do_move_in_pixmap = NULL; + pExaScr->do_move_out_pixmap = NULL; + pExaScr->prepare_access_reg = NULL; + } + } + else { + wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_classic); + wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_classic); + wrap(pExaScr, pScreen, ModifyPixmapHeader, + exaModifyPixmapHeader_classic); + pExaScr->do_migration = exaDoMigration_classic; + pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_classic; + pExaScr->do_move_in_pixmap = exaMoveInPixmap_classic; + pExaScr->do_move_out_pixmap = exaMoveOutPixmap_classic; + pExaScr->prepare_access_reg = exaPrepareAccessReg_classic; + } + if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { + LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %lu bytes\n", + pScreen->myNum, + pExaScr->info->memorySize - + pExaScr->info->offScreenBase); + } + else { + LogMessage(X_INFO, "EXA(%d): Driver allocated offscreen pixmaps\n", + pScreen->myNum); + + } + } + else + LogMessage(X_INFO, "EXA(%d): No offscreen pixmaps\n", pScreen->myNum); + + if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { + DBG_PIXMAP(("============== %ld < %ld\n", pExaScr->info->offScreenBase, + pExaScr->info->memorySize)); + if (pExaScr->info->offScreenBase < pExaScr->info->memorySize) { + if (!exaOffscreenInit(pScreen)) { + LogMessage(X_WARNING, + "EXA(%d): Offscreen pixmap setup failed\n", + pScreen->myNum); + return FALSE; + } + } + } + + if (ps->Glyphs == exaGlyphs) + exaGlyphsInit(pScreen); + + LogMessage(X_INFO, "EXA(%d): Driver registered support for the following" + " operations:\n", pScreen->myNum); + assert(pScreenInfo->PrepareSolid != NULL); + LogMessage(X_INFO, " Solid\n"); + assert(pScreenInfo->PrepareCopy != NULL); + LogMessage(X_INFO, " Copy\n"); + if (pScreenInfo->PrepareComposite != NULL) { + LogMessage(X_INFO, " Composite (RENDER acceleration)\n"); + } + if (pScreenInfo->UploadToScreen != NULL) { + LogMessage(X_INFO, " UploadToScreen\n"); + } + if (pScreenInfo->DownloadFromScreen != NULL) { + LogMessage(X_INFO, " DownloadFromScreen\n"); + } + + return TRUE; +} + +/** + * exaDriverFini tears down EXA on a given screen. + * + * @param pScreen screen being torn down. + */ +void +exaDriverFini(ScreenPtr pScreen) +{ + /*right now does nothing */ +} + +/** + * exaMarkSync() should be called after any asynchronous drawing by the hardware. + * + * @param pScreen screen which drawing occurred on + * + * exaMarkSync() sets a flag to indicate that some asynchronous drawing has + * happened and a WaitSync() will be necessary before relying on the contents of + * offscreen memory from the CPU's perspective. It also calls an optional + * driver MarkSync() callback, the return value of which may be used to do partial + * synchronization with the hardware in the future. + */ +void +exaMarkSync(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + + pExaScr->info->needsSync = TRUE; + if (pExaScr->info->MarkSync != NULL) { + pExaScr->info->lastMarker = (*pExaScr->info->MarkSync) (pScreen); + } +} + +/** + * exaWaitSync() ensures that all drawing has been completed. + * + * @param pScreen screen being synchronized. + * + * Calls down into the driver to ensure that all previous drawing has completed. + * It should always be called before relying on the framebuffer contents + * reflecting previous drawing, from a CPU perspective. + */ +void +exaWaitSync(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + + if (pExaScr->info->needsSync && !pExaScr->swappedOut) { + (*pExaScr->info->WaitMarker) (pScreen, pExaScr->info->lastMarker); + pExaScr->info->needsSync = FALSE; + } +} + +/** + * Performs migration of the pixmaps according to the operation information + * provided in pixmaps and can_accel and the migration scheme chosen in the + * config file. + */ +void +exaDoMigration(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) +{ + ScreenPtr pScreen = pixmaps[0].pPix->drawable.pScreen; + + ExaScreenPriv(pScreen); + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaScr->do_migration) + (*pExaScr->do_migration) (pixmaps, npixmaps, can_accel); +} + +void +exaMoveInPixmap(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaScr->do_move_in_pixmap) + (*pExaScr->do_move_in_pixmap) (pPixmap); +} + +void +exaMoveOutPixmap(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + + if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) + return; + + if (pExaScr->do_move_out_pixmap) + (*pExaScr->do_move_out_pixmap) (pPixmap); +} diff --git a/exa/exa.h b/exa/exa.h new file mode 100644 index 0000000..be022b2 --- /dev/null +++ b/exa/exa.h @@ -0,0 +1,820 @@ +/* + * + * Copyright (C) 2000 Keith Packard + * 2004 Eric Anholt + * 2005 Zack Rusin + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of copyright holders not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Copyright holders make no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +/** @file + * This is the header containing the public API of EXA for exa drivers. + */ + +#ifndef EXA_H +#define EXA_H + +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "gcstruct.h" +#include "picturestr.h" +#include "fb.h" + +#define EXA_VERSION_MAJOR 2 +#define EXA_VERSION_MINOR 6 +#define EXA_VERSION_RELEASE 0 + +typedef struct _ExaOffscreenArea ExaOffscreenArea; + +typedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen, + ExaOffscreenArea * area); + +typedef enum _ExaOffscreenState { + ExaOffscreenAvail, + ExaOffscreenRemovable, + ExaOffscreenLocked +} ExaOffscreenState; + +struct _ExaOffscreenArea { + int base_offset; /* allocation base */ + int offset; /* aligned offset */ + int size; /* total allocation size */ + unsigned last_use; + pointer privData; + + ExaOffscreenSaveProc save; + + ExaOffscreenState state; + + ExaOffscreenArea *next; + + unsigned eviction_cost; + + ExaOffscreenArea *prev; /* Double-linked list for defragmentation */ + int align; /* required alignment */ +}; + +/** + * The ExaDriver structure is allocated through exaDriverAlloc(), and then + * fllled in by drivers. + */ +typedef struct _ExaDriver { + /** + * exa_major and exa_minor should be set by the driver to the version of + * EXA which the driver was compiled for (or configures itself at runtime + * to support). This allows EXA to extend the structure for new features + * without breaking ABI for drivers compiled against older versions. + */ + int exa_major, exa_minor; + + /** + * memoryBase is the address of the beginning of framebuffer memory. + * The visible screen should be within memoryBase to memoryBase + + * memorySize. + */ + CARD8 *memoryBase; + + /** + * offScreenBase is the offset from memoryBase of the beginning of the area + * to be managed by EXA's linear offscreen memory manager. + * + * In XFree86 DDX drivers, this is probably: + * (pScrn->displayWidth * cpp * pScrn->virtualY) + */ + unsigned long offScreenBase; + + /** + * memorySize is the length (in bytes) of framebuffer memory beginning + * from memoryBase. + * + * The offscreen memory manager will manage the area beginning at + * (memoryBase + offScreenBase), with a length of (memorySize - + * offScreenBase) + * + * In XFree86 DDX drivers, this is probably (pScrn->videoRam * 1024) + */ + unsigned long memorySize; + + /** + * pixmapOffsetAlign is the byte alignment necessary for pixmap offsets + * within framebuffer. + * + * Hardware typically has a required alignment of offsets, which may or may + * not be a power of two. EXA will ensure that pixmaps managed by the + * offscreen memory manager meet this alignment requirement. + */ + int pixmapOffsetAlign; + + /** + * pixmapPitchAlign is the byte alignment necessary for pixmap pitches + * within the framebuffer. + * + * Hardware typically has a required alignment of pitches for acceleration. + * For 3D hardware, Composite acceleration often requires that source and + * mask pixmaps (textures) have a power-of-two pitch, which can be demanded + * using EXA_OFFSCREEN_ALIGN_POT. These pitch requirements only apply to + * pixmaps managed by the offscreen memory manager. Thus, it is up to the + * driver to ensure that the visible screen has an appropriate pitch for + * acceleration. + */ + int pixmapPitchAlign; + + /** + * The flags field is bitfield of boolean values controlling EXA's behavior. + * + * The flags in clude EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and + * EXA_TWO_BITBLT_DIRECTIONS. + */ + int flags; + + /** @{ */ + /** + * maxX controls the X coordinate limitation for rendering from the card. + * The driver should never receive a request for rendering beyond maxX + * in the X direction from the origin of a pixmap. + */ + int maxX; + + /** + * maxY controls the Y coordinate limitation for rendering from the card. + * The driver should never receive a request for rendering beyond maxY + * in the Y direction from the origin of a pixmap. + */ + int maxY; + /** @} */ + + /* private */ + ExaOffscreenArea *offScreenAreas; + Bool needsSync; + int lastMarker; + + /** @name Solid + * @{ + */ + /** + * PrepareSolid() sets up the driver for doing a solid fill. + * @param pPixmap Destination pixmap + * @param alu raster operation + * @param planemask write mask for the fill + * @param fg "foreground" color for the fill + * + * This call should set up the driver for doing a series of solid fills + * through the Solid() call. The alu raster op is one of the GX* + * graphics functions listed in X.h, and typically maps to a similar + * single-byte "ROP" setting in all hardware. The planemask controls + * which bits of the destination should be affected, and will only represent + * the bits up to the depth of pPixmap. The fg is the pixel value of the + * foreground color referred to in ROP descriptions. + * + * Note that many drivers will need to store some of the data in the driver + * private record, for sending to the hardware with each drawing command. + * + * The PrepareSolid() call is required of all drivers, but it may fail for any + * reason. Failure results in a fallback to software rendering. + */ + Bool (*PrepareSolid) (PixmapPtr pPixmap, + int alu, Pixel planemask, Pixel fg); + + /** + * Solid() performs a solid fill set up in the last PrepareSolid() call. + * + * @param pPixmap destination pixmap + * @param x1 left coordinate + * @param y1 top coordinate + * @param x2 right coordinate + * @param y2 bottom coordinate + * + * Performs the fill set up by the last PrepareSolid() call, covering the + * area from (x1,y1) to (x2,y2) in pPixmap. Note that the coordinates are + * in the coordinate space of the destination pixmap, so the driver will + * need to set up the hardware's offset and pitch for the destination + * coordinates according to the pixmap's offset and pitch within + * framebuffer. This likely means using exaGetPixmapOffset() and + * exaGetPixmapPitch(). + * + * This call is required if PrepareSolid() ever succeeds. + */ + void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2); + + /** + * DoneSolid() finishes a set of solid fills. + * + * @param pPixmap destination pixmap. + * + * The DoneSolid() call is called at the end of a series of consecutive + * Solid() calls following a successful PrepareSolid(). This allows drivers + * to finish up emitting drawing commands that were buffered, or clean up + * state from PrepareSolid(). + * + * This call is required if PrepareSolid() ever succeeds. + */ + void (*DoneSolid) (PixmapPtr pPixmap); + /** @} */ + + /** @name Copy + * @{ + */ + /** + * PrepareCopy() sets up the driver for doing a copy within video + * memory. + * + * @param pSrcPixmap source pixmap + * @param pDstPixmap destination pixmap + * @param dx X copy direction + * @param dy Y copy direction + * @param alu raster operation + * @param planemask write mask for the fill + * + * This call should set up the driver for doing a series of copies from the + * the pSrcPixmap to the pDstPixmap. The dx flag will be positive if the + * hardware should do the copy from the left to the right, and dy will be + * positive if the copy should be done from the top to the bottom. This + * is to deal with self-overlapping copies when pSrcPixmap == pDstPixmap. + * If your hardware can only support blits that are (left to right, top to + * bottom) or (right to left, bottom to top), then you should set + * #EXA_TWO_BITBLT_DIRECTIONS, and EXA will break down Copy operations to + * ones that meet those requirements. The alu raster op is one of the GX* + * graphics functions listed in X.h, and typically maps to a similar + * single-byte "ROP" setting in all hardware. The planemask controls which + * bits of the destination should be affected, and will only represent the + * bits up to the depth of pPixmap. + * + * Note that many drivers will need to store some of the data in the driver + * private record, for sending to the hardware with each drawing command. + * + * The PrepareCopy() call is required of all drivers, but it may fail for any + * reason. Failure results in a fallback to software rendering. + */ + Bool (*PrepareCopy) (PixmapPtr pSrcPixmap, + PixmapPtr pDstPixmap, + int dx, int dy, int alu, Pixel planemask); + + /** + * Copy() performs a copy set up in the last PrepareCopy call. + * + * @param pDstPixmap destination pixmap + * @param srcX source X coordinate + * @param srcY source Y coordinate + * @param dstX destination X coordinate + * @param dstY destination Y coordinate + * @param width width of the rectangle to be copied + * @param height height of the rectangle to be copied. + * + * Performs the copy set up by the last PrepareCopy() call, copying the + * rectangle from (srcX, srcY) to (srcX + width, srcY + width) in the source + * pixmap to the same-sized rectangle at (dstX, dstY) in the destination + * pixmap. Those rectangles may overlap in memory, if + * pSrcPixmap == pDstPixmap. Note that this call does not receive the + * pSrcPixmap as an argument -- if it's needed in this function, it should + * be stored in the driver private during PrepareCopy(). As with Solid(), + * the coordinates are in the coordinate space of each pixmap, so the driver + * will need to set up source and destination pitches and offsets from those + * pixmaps, probably using exaGetPixmapOffset() and exaGetPixmapPitch(). + * + * This call is required if PrepareCopy ever succeeds. + */ + void (*Copy) (PixmapPtr pDstPixmap, + int srcX, + int srcY, int dstX, int dstY, int width, int height); + + /** + * DoneCopy() finishes a set of copies. + * + * @param pPixmap destination pixmap. + * + * The DoneCopy() call is called at the end of a series of consecutive + * Copy() calls following a successful PrepareCopy(). This allows drivers + * to finish up emitting drawing commands that were buffered, or clean up + * state from PrepareCopy(). + * + * This call is required if PrepareCopy() ever succeeds. + */ + void (*DoneCopy) (PixmapPtr pDstPixmap); + /** @} */ + + /** @name Composite + * @{ + */ + /** + * CheckComposite() checks to see if a composite operation could be + * accelerated. + * + * @param op Render operation + * @param pSrcPicture source Picture + * @param pMaskPicture mask picture + * @param pDstPicture destination Picture + * + * The CheckComposite() call checks if the driver could handle acceleration + * of op with the given source, mask, and destination pictures. This allows + * drivers to check source and destination formats, supported operations, + * transformations, and component alpha state, and send operations it can't + * support to software rendering early on. This avoids costly pixmap + * migration to the wrong places when the driver can't accelerate + * operations. Note that because migration hasn't happened, the driver + * can't know during CheckComposite() what the offsets and pitches of the + * pixmaps are going to be. + * + * See PrepareComposite() for more details on likely issues that drivers + * will have in accelerating Composite operations. + * + * The CheckComposite() call is recommended if PrepareComposite() is + * implemented, but is not required. + */ + Bool (*CheckComposite) (int op, + PicturePtr pSrcPicture, + PicturePtr pMaskPicture, PicturePtr pDstPicture); + + /** + * PrepareComposite() sets up the driver for doing a Composite operation + * described in the Render extension protocol spec. + * + * @param op Render operation + * @param pSrcPicture source Picture + * @param pMaskPicture mask picture + * @param pDstPicture destination Picture + * @param pSrc source pixmap + * @param pMask mask pixmap + * @param pDst destination pixmap + * + * This call should set up the driver for doing a series of Composite + * operations, as described in the Render protocol spec, with the given + * pSrcPicture, pMaskPicture, and pDstPicture. The pSrc, pMask, and + * pDst are the pixmaps containing the pixel data, and should be used for + * setting the offset and pitch used for the coordinate spaces for each of + * the Pictures. + * + * Notes on interpreting Picture structures: + * - The Picture structures will always have a valid pDrawable. + * - The Picture structures will never have alphaMap set. + * - The mask Picture (and therefore pMask) may be NULL, in which case the + * operation is simply src OP dst instead of src IN mask OP dst, and + * mask coordinates should be ignored. + * - pMarkPicture may have componentAlpha set, which greatly changes + * the behavior of the Composite operation. componentAlpha has no effect + * when set on pSrcPicture or pDstPicture. + * - The source and mask Pictures may have a transformation set + * (Picture->transform != NULL), which means that the source coordinates + * should be transformed by that transformation, resulting in scaling, + * rotation, etc. The PictureTransformPoint() call can transform + * coordinates for you. Transforms have no effect on Pictures when used + * as a destination. + * - The source and mask pictures may have a filter set. PictFilterNearest + * and PictFilterBilinear are defined in the Render protocol, but others + * may be encountered, and must be handled correctly (usually by + * PrepareComposite failing, and falling back to software). Filters have + * no effect on Pictures when used as a destination. + * - The source and mask Pictures may have repeating set, which must be + * respected. Many chipsets will be unable to support repeating on + * pixmaps that have a width or height that is not a power of two. + * + * If your hardware can't support source pictures (textures) with + * non-power-of-two pitches, you should set #EXA_OFFSCREEN_ALIGN_POT. + * + * Note that many drivers will need to store some of the data in the driver + * private record, for sending to the hardware with each drawing command. + * + * The PrepareComposite() call is not required. However, it is highly + * recommended for performance of antialiased font rendering and performance + * of cairo applications. Failure results in a fallback to software + * rendering. + */ + Bool (*PrepareComposite) (int op, + PicturePtr pSrcPicture, + PicturePtr pMaskPicture, + PicturePtr pDstPicture, + PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst); + + /** + * Composite() performs a Composite operation set up in the last + * PrepareComposite() call. + * + * @param pDstPixmap destination pixmap + * @param srcX source X coordinate + * @param srcY source Y coordinate + * @param maskX source X coordinate + * @param maskY source Y coordinate + * @param dstX destination X coordinate + * @param dstY destination Y coordinate + * @param width destination rectangle width + * @param height destination rectangle height + * + * Performs the Composite operation set up by the last PrepareComposite() + * call, to the rectangle from (dstX, dstY) to (dstX + width, dstY + height) + * in the destination Pixmap. Note that if a transformation was set on + * the source or mask Pictures, the source rectangles may not be the same + * size as the destination rectangles and filtering. Getting the coordinate + * transformation right at the subpixel level can be tricky, and rendercheck + * can test this for you. + * + * This call is required if PrepareComposite() ever succeeds. + */ + void (*Composite) (PixmapPtr pDst, + int srcX, + int srcY, + int maskX, + int maskY, int dstX, int dstY, int width, int height); + + /** + * DoneComposite() finishes a set of Composite operations. + * + * @param pPixmap destination pixmap. + * + * The DoneComposite() call is called at the end of a series of consecutive + * Composite() calls following a successful PrepareComposite(). This allows + * drivers to finish up emitting drawing commands that were buffered, or + * clean up state from PrepareComposite(). + * + * This call is required if PrepareComposite() ever succeeds. + */ + void (*DoneComposite) (PixmapPtr pDst); + /** @} */ + + /** + * UploadToScreen() loads a rectangle of data from src into pDst. + * + * @param pDst destination pixmap + * @param x destination X coordinate. + * @param y destination Y coordinate + * @param width width of the rectangle to be copied + * @param height height of the rectangle to be copied + * @param src pointer to the beginning of the source data + * @param src_pitch pitch (in bytes) of the lines of source data. + * + * UploadToScreen() copies data in system memory beginning at src (with + * pitch src_pitch) into the destination pixmap from (x, y) to + * (x + width, y + height). This is typically done with hostdata uploads, + * where the CPU sets up a blit command on the hardware with instructions + * that the blit data will be fed through some sort of aperture on the card. + * + * If UploadToScreen() is performed asynchronously, it is up to the driver + * to call exaMarkSync(). This is in contrast to most other acceleration + * calls in EXA. + * + * UploadToScreen() can aid in pixmap migration, but is most important for + * the performance of exaGlyphs() (antialiased font drawing) by allowing + * pipelining of data uploads, avoiding a sync of the card after each glyph. + * + * @return TRUE if the driver successfully uploaded the data. FALSE + * indicates that EXA should fall back to doing the upload in software. + * + * UploadToScreen() is not required, but is recommended if Composite + * acceleration is supported. + */ + Bool (*UploadToScreen) (PixmapPtr pDst, + int x, + int y, int w, int h, char *src, int src_pitch); + + /** + * UploadToScratch() is no longer used and will be removed next time the EXA + * major version needs to be bumped. + */ + Bool (*UploadToScratch) (PixmapPtr pSrc, PixmapPtr pDst); + + /** + * DownloadFromScreen() loads a rectangle of data from pSrc into dst + * + * @param pSrc source pixmap + * @param x source X coordinate. + * @param y source Y coordinate + * @param width width of the rectangle to be copied + * @param height height of the rectangle to be copied + * @param dst pointer to the beginning of the destination data + * @param dst_pitch pitch (in bytes) of the lines of destination data. + * + * DownloadFromScreen() copies data from offscreen memory in pSrc from + * (x, y) to (x + width, y + height), to system memory starting at + * dst (with pitch dst_pitch). This would usually be done + * using scatter-gather DMA, supported by a DRM call, or by blitting to AGP + * and then synchronously reading from AGP. Because the implementation + * might be synchronous, EXA leaves it up to the driver to call + * exaMarkSync() if DownloadFromScreen() was asynchronous. This is in + * contrast to most other acceleration calls in EXA. + * + * DownloadFromScreen() can aid in the largest bottleneck in pixmap + * migration, which is the read from framebuffer when evicting pixmaps from + * framebuffer memory. Thus, it is highly recommended, even though + * implementations are typically complicated. + * + * @return TRUE if the driver successfully downloaded the data. FALSE + * indicates that EXA should fall back to doing the download in software. + * + * DownloadFromScreen() is not required, but is highly recommended. + */ + Bool (*DownloadFromScreen) (PixmapPtr pSrc, + int x, int y, + int w, int h, char *dst, int dst_pitch); + + /** + * MarkSync() requests that the driver mark a synchronization point, + * returning an driver-defined integer marker which could be requested for + * synchronization to later in WaitMarker(). This might be used in the + * future to avoid waiting for full hardware stalls before accessing pixmap + * data with the CPU, but is not important in the current incarnation of + * EXA. + * + * Note that drivers should call exaMarkSync() when they have done some + * acceleration, rather than their own MarkSync() handler, as otherwise EXA + * will be unaware of the driver's acceleration and not sync to it during + * fallbacks. + * + * MarkSync() is optional. + */ + int (*MarkSync) (ScreenPtr pScreen); + + /** + * WaitMarker() waits for all rendering before the given marker to have + * completed. If the driver does not implement MarkSync(), marker is + * meaningless, and all rendering by the hardware should be completed before + * WaitMarker() returns. + * + * Note that drivers should call exaWaitSync() to wait for all acceleration + * to finish, as otherwise EXA will be unaware of the driver having + * synchronized, resulting in excessive WaitMarker() calls. + * + * WaitMarker() is required of all drivers. + */ + void (*WaitMarker) (ScreenPtr pScreen, int marker); + + /** @{ */ + /** + * PrepareAccess() is called before CPU access to an offscreen pixmap. + * + * @param pPix the pixmap being accessed + * @param index the index of the pixmap being accessed. + * + * PrepareAccess() will be called before CPU access to an offscreen pixmap. + * This can be used to set up hardware surfaces for byteswapping or + * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of + * making CPU access use a different aperture. + * + * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC, + * #EXA_PREPARE_MASK, #EXA_PREPARE_AUX_DEST, #EXA_PREPARE_AUX_SRC, or + * #EXA_PREPARE_AUX_MASK. Since only up to #EXA_NUM_PREPARE_INDICES pixmaps + * will have PrepareAccess() called on them per operation, drivers can have + * a small, statically-allocated space to maintain state for PrepareAccess() + * and FinishAccess() in. Note that PrepareAccess() is only called once per + * pixmap and operation, regardless of whether the pixmap is used as a + * destination and/or source, and the index may not reflect the usage. + * + * PrepareAccess() may fail. An example might be the case of hardware that + * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess() + * fails, EXA will migrate the pixmap to system memory. + * DownloadFromScreen() must be implemented and must not fail if a driver + * wishes to fail in PrepareAccess(). PrepareAccess() must not fail when + * pPix is the visible screen, because the visible screen can not be + * migrated. + * + * @return TRUE if PrepareAccess() successfully prepared the pixmap for CPU + * drawing. + * @return FALSE if PrepareAccess() is unsuccessful and EXA should use + * DownloadFromScreen() to migate the pixmap out. + */ + Bool (*PrepareAccess) (PixmapPtr pPix, int index); + + /** + * FinishAccess() is called after CPU access to an offscreen pixmap. + * + * @param pPix the pixmap being accessed + * @param index the index of the pixmap being accessed. + * + * FinishAccess() will be called after finishing CPU access of an offscreen + * pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be + * called if PrepareAccess() failed and the pixmap was migrated out. + */ + void (*FinishAccess) (PixmapPtr pPix, int index); + + /** + * PixmapIsOffscreen() is an optional driver replacement to + * exaPixmapHasGpuCopy(). Set to NULL if you want the standard behaviour + * of exaPixmapHasGpuCopy(). + * + * @param pPix the pixmap + * @return TRUE if the given drawable is in framebuffer memory. + * + * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen + * memory, meaning that acceleration could probably be done to it, and that it + * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it + * with the CPU. + * + * + */ + Bool (*PixmapIsOffscreen) (PixmapPtr pPix); + + /** @name PrepareAccess() and FinishAccess() indices + * @{ + */ + /** + * EXA_PREPARE_DEST is the index for a pixmap that may be drawn to or + * read from. + */ +#define EXA_PREPARE_DEST 0 + /** + * EXA_PREPARE_SRC is the index for a pixmap that may be read from + */ +#define EXA_PREPARE_SRC 1 + /** + * EXA_PREPARE_SRC is the index for a second pixmap that may be read + * from. + */ +#define EXA_PREPARE_MASK 2 + /** + * EXA_PREPARE_AUX* are additional indices for other purposes, e.g. + * separate alpha maps with Composite operations. + */ +#define EXA_PREPARE_AUX_DEST 3 +#define EXA_PREPARE_AUX_SRC 4 +#define EXA_PREPARE_AUX_MASK 5 +#define EXA_NUM_PREPARE_INDICES 6 + /** @} */ + + /** + * maxPitchPixels controls the pitch limitation for rendering from + * the card. + * The driver should never receive a request for rendering a pixmap + * that has a pitch (in pixels) beyond maxPitchPixels. + * + * Setting this field is optional -- if your hardware doesn't have + * a pitch limitation in pixels, don't set this. If neither this value + * nor maxPitchBytes is set, then maxPitchPixels is set to maxX. + * If set, it must not be smaller than maxX. + * + * @sa maxPitchBytes + */ + int maxPitchPixels; + + /** + * maxPitchBytes controls the pitch limitation for rendering from + * the card. + * The driver should never receive a request for rendering a pixmap + * that has a pitch (in bytes) beyond maxPitchBytes. + * + * Setting this field is optional -- if your hardware doesn't have + * a pitch limitation in bytes, don't set this. + * If set, it must not be smaller than maxX * 4. + * There's no default value for maxPitchBytes. + * + * @sa maxPitchPixels + */ + int maxPitchBytes; + + /* Hooks to allow driver to its own pixmap memory management */ + void *(*CreatePixmap) (ScreenPtr pScreen, int size, int align); + void (*DestroyPixmap) (ScreenPtr pScreen, void *driverPriv); + /** + * Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is + * not offscreen, which will never be accelerated and Prepare/FinishAccess won't + * be called. + */ + Bool (*ModifyPixmapHeader) (PixmapPtr pPixmap, int width, int height, + int depth, int bitsPerPixel, int devKind, + pointer pPixData); + + /* hooks for drivers with tiling support: + * driver MUST fill out new_fb_pitch with valid pitch of pixmap + */ + void *(*CreatePixmap2) (ScreenPtr pScreen, int width, int height, + int depth, int usage_hint, int bitsPerPixel, + int *new_fb_pitch); + /** @} */ + Bool (*SharePixmapBacking)(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p); + + Bool (*SetSharedPixmapBacking)(PixmapPtr pPixmap, void *handle); + +} ExaDriverRec, *ExaDriverPtr; + +/** @name EXA driver flags + * @{ + */ +/** + * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support + * offscreen pixmaps. + */ +#define EXA_OFFSCREEN_PIXMAPS (1 << 0) + +/** + * EXA_OFFSCREEN_ALIGN_POT indicates to EXA that the driver needs pixmaps + * to have a power-of-two pitch. + */ +#define EXA_OFFSCREEN_ALIGN_POT (1 << 1) + +/** + * EXA_TWO_BITBLT_DIRECTIONS indicates to EXA that the driver can only + * support copies that are (left-to-right, top-to-bottom) or + * (right-to-left, bottom-to-top). + */ +#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2) + +/** + * EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle + * all pixmap addressing and migration. + */ +#define EXA_HANDLES_PIXMAPS (1 << 3) + +/** + * EXA_SUPPORTS_PREPARE_AUX indicates to EXA that the driver can handle the + * EXA_PREPARE_AUX* indices in the Prepare/FinishAccess hooks. If there are no + * such hooks, this flag has no effect. + */ +#define EXA_SUPPORTS_PREPARE_AUX (1 << 4) + +/** + * EXA_SUPPORTS_OFFSCREEN_OVERLAPS indicates to EXA that the driver Copy hooks + * can handle the source and destination occupying overlapping offscreen memory + * areas. This allows the offscreen memory defragmentation code to defragment + * areas where the defragmented position overlaps the fragmented position. + * + * Typically this is supported by traditional 2D engines but not by 3D engines. + */ +#define EXA_SUPPORTS_OFFSCREEN_OVERLAPS (1 << 5) + +/** + * EXA_MIXED_PIXMAPS will hide unacceleratable pixmaps from drivers and manage the + * problem known software fallbacks like trapezoids. This only migrates pixmaps one way + * into a driver pixmap and then pins it. + */ +#define EXA_MIXED_PIXMAPS (1 << 6) + +/** @} */ + +/* in exa.c */ +extern _X_EXPORT ExaDriverPtr exaDriverAlloc(void); + +extern _X_EXPORT Bool + exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo); + +extern _X_EXPORT void + exaDriverFini(ScreenPtr pScreen); + +extern _X_EXPORT void + exaMarkSync(ScreenPtr pScreen); +extern _X_EXPORT void + exaWaitSync(ScreenPtr pScreen); + +extern _X_EXPORT unsigned long + exaGetPixmapOffset(PixmapPtr pPix); + +extern _X_EXPORT unsigned long + exaGetPixmapPitch(PixmapPtr pPix); + +extern _X_EXPORT unsigned long + exaGetPixmapSize(PixmapPtr pPix); + +extern _X_EXPORT void *exaGetPixmapDriverPrivate(PixmapPtr p); + +/* in exa_offscreen.c */ +extern _X_EXPORT ExaOffscreenArea *exaOffscreenAlloc(ScreenPtr pScreen, + int size, int align, + Bool locked, + ExaOffscreenSaveProc save, + pointer privData); + +extern _X_EXPORT ExaOffscreenArea *exaOffscreenFree(ScreenPtr pScreen, + ExaOffscreenArea * area); + +extern _X_EXPORT void + ExaOffscreenMarkUsed(PixmapPtr pPixmap); + +extern _X_EXPORT void + exaEnableDisableFBAccess(ScreenPtr pScreen, Bool enable); + +extern _X_EXPORT Bool + exaDrawableIsOffscreen(DrawablePtr pDrawable); + +/* in exa.c */ +extern _X_EXPORT void + exaMoveInPixmap(PixmapPtr pPixmap); + +extern _X_EXPORT void + exaMoveOutPixmap(PixmapPtr pPixmap); + +/* in exa_unaccel.c */ +extern _X_EXPORT CARD32 + exaGetPixmapFirstPixel(PixmapPtr pPixmap); + +/** + * Returns TRUE if the given planemask covers all the significant bits in the + * pixel values for pDrawable. + */ +#define EXA_PM_IS_SOLID(_pDrawable, _pm) \ + (((_pm) & FbFullMask((_pDrawable)->depth)) == \ + FbFullMask((_pDrawable)->depth)) + +#endif /* EXA_H */ diff --git a/exa/exa_accel.c b/exa/exa_accel.c new file mode 100644 index 0000000..0e948f4 --- /dev/null +++ b/exa/exa_accel.c @@ -0,0 +1,1300 @@ +/* + * Copyright © 2001 Keith Packard + * + * Partly based on code that is Copyright © The XFree86 Project Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * Authors: + * Eric Anholt + * Michel Dänzer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif +#include "exa_priv.h" +#include +#include "dixfontstr.h" +#include "exa.h" + +static void +exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, + DDXPointPtr ppt, int *pwidth, int fSorted) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + ExaScreenPriv(pScreen); + RegionPtr pClip = fbGetCompositeClip(pGC); + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + ExaPixmapPriv(pPixmap); + BoxPtr pextent, pbox; + int nbox; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1; + int partX1, partX2; + int off_x, off_y; + + if (pExaScr->fallback_counter || + pExaScr->swappedOut || + pGC->fillStyle != FillSolid || pExaPixmap->accel_blocked) { + ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted); + return; + } + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = NULL; + + exaDoMigration(pixmaps, 1, TRUE); + } + + if (!(pPixmap = exaGetOffscreenPixmap(pDrawable, &off_x, &off_y)) || + !(*pExaScr->info->PrepareSolid) (pPixmap, + pGC->alu, + pGC->planemask, pGC->fgPixel)) { + ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted); + return; + } + + pextent = RegionExtents(pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (n--) { + fullX1 = ppt->x; + fullY1 = ppt->y; + fullX2 = fullX1 + (int) *pwidth; + ppt++; + pwidth++; + + if (fullY1 < extentY1 || extentY2 <= fullY1) + continue; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullX1 >= fullX2) + continue; + + nbox = RegionNumRects(pClip); + if (nbox == 1) { + (*pExaScr->info->Solid) (pPixmap, + fullX1 + off_x, fullY1 + off_y, + fullX2 + off_x, fullY1 + 1 + off_y); + } + else { + pbox = RegionRects(pClip); + while (nbox--) { + if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + if (partX2 > partX1) { + (*pExaScr->info->Solid) (pPixmap, + partX1 + off_x, fullY1 + off_y, + partX2 + off_x, + fullY1 + 1 + off_y); + } + } + pbox++; + } + } + } + (*pExaScr->info->DoneSolid) (pPixmap); + exaMarkSync(pScreen); +} + +static Bool +exaDoPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, + int w, int h, int format, char *bits, int src_stride) +{ + ExaScreenPriv(pDrawable->pScreen); + PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); + + ExaPixmapPriv(pPix); + RegionPtr pClip; + BoxPtr pbox; + int nbox; + int xoff, yoff; + int bpp = pDrawable->bitsPerPixel; + Bool ret = TRUE; + + if (pExaScr->fallback_counter || pExaPixmap->accel_blocked || + !pExaScr->info->UploadToScreen) + return FALSE; + + /* If there's a system copy, we want to save the result there */ + if (pExaPixmap->pDamage) + return FALSE; + + /* Don't bother with under 8bpp, XYPixmaps. */ + if (format != ZPixmap || bpp < 8) + return FALSE; + + /* Only accelerate copies: no rop or planemask. */ + if (!EXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy) + return FALSE; + + if (pExaScr->swappedOut) + return FALSE; + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPix; + pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage); + + exaDoMigration(pixmaps, 1, TRUE); + } + + pPix = exaGetOffscreenPixmap(pDrawable, &xoff, &yoff); + + if (!pPix) + return FALSE; + + x += pDrawable->x; + y += pDrawable->y; + + pClip = fbGetCompositeClip(pGC); + for (nbox = RegionNumRects(pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { + int x1 = x; + int y1 = y; + int x2 = x + w; + int y2 = y + h; + char *src; + Bool ok; + + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + + src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8); + ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff, + x2 - x1, y2 - y1, src, src_stride); + /* We have to fall back completely, and ignore what has already been completed. + * Messing with the fb layer directly like we used to is completely unacceptable. + */ + if (!ok) { + ret = FALSE; + break; + } + } + + if (ret) + exaMarkSync(pDrawable->pScreen); + + return ret; +} + +static void +exaPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, + int w, int h, int leftPad, int format, char *bits) +{ + if (!exaDoPutImage(pDrawable, pGC, depth, x, y, w, h, format, bits, + PixmapBytePad(w, pDrawable->depth))) + ExaCheckPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, + bits); +} + +static Bool inline +exaCopyNtoNTwoDir(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, + GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy) +{ + ExaScreenPriv(pDstDrawable->pScreen); + PixmapPtr pSrcPixmap, pDstPixmap; + int src_off_x, src_off_y, dst_off_x, dst_off_y; + int dirsetup; + + /* Need to get both pixmaps to call the driver routines */ + pSrcPixmap = exaGetOffscreenPixmap(pSrcDrawable, &src_off_x, &src_off_y); + pDstPixmap = exaGetOffscreenPixmap(pDstDrawable, &dst_off_x, &dst_off_y); + if (!pSrcPixmap || !pDstPixmap) + return FALSE; + + /* + * Now the case of a chip that only supports xdir = ydir = 1 or + * xdir = ydir = -1, but we have xdir != ydir. + */ + dirsetup = 0; /* No direction set up yet. */ + for (; nbox; pbox++, nbox--) { + if (dx >= 0 && (src_off_y + pbox->y1 + dy) != pbox->y1) { + /* Do a xdir = ydir = -1 blit instead. */ + if (dirsetup != -1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = -1; + if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, + pDstPixmap, + -1, -1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + (*pExaScr->info->Copy) (pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); + } + else if (dx < 0 && (src_off_y + pbox->y1 + dy) != pbox->y1) { + /* Do a xdir = ydir = 1 blit instead. */ + if (dirsetup != 1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = 1; + if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, + pDstPixmap, + 1, 1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + (*pExaScr->info->Copy) (pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); + } + else if (dx >= 0) { + /* + * xdir = 1, ydir = -1. + * Perform line-by-line xdir = ydir = 1 blits, going up. + */ + int i; + + if (dirsetup != 1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = 1; + if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, + pDstPixmap, + 1, 1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + for (i = pbox->y2 - pbox->y1 - 1; i >= 0; i--) + (*pExaScr->info->Copy) (pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy + i, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1 + i, + pbox->x2 - pbox->x1, 1); + } + else { + /* + * xdir = -1, ydir = 1. + * Perform line-by-line xdir = ydir = -1 blits, going down. + */ + int i; + + if (dirsetup != -1) { + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + dirsetup = -1; + if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, + pDstPixmap, + -1, -1, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : + FB_ALLONES)) + return FALSE; + } + for (i = 0; i < pbox->y2 - pbox->y1; i++) + (*pExaScr->info->Copy) (pDstPixmap, + src_off_x + pbox->x1 + dx, + src_off_y + pbox->y1 + dy + i, + dst_off_x + pbox->x1, + dst_off_y + pbox->y1 + i, + pbox->x2 - pbox->x1, 1); + } + } + if (dirsetup != 0) + pExaScr->info->DoneCopy(pDstPixmap); + exaMarkSync(pDstDrawable->pScreen); + return TRUE; +} + +Bool +exaHWCopyNtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, int dx, int dy, Bool reverse, Bool upsidedown) +{ + ExaScreenPriv(pDstDrawable->pScreen); + PixmapPtr pSrcPixmap, pDstPixmap; + ExaPixmapPrivPtr pSrcExaPixmap, pDstExaPixmap; + int src_off_x, src_off_y; + int dst_off_x, dst_off_y; + RegionPtr srcregion = NULL, dstregion = NULL; + xRectangle *rects; + Bool ret = TRUE; + + /* avoid doing copy operations if no boxes */ + if (nbox == 0) + return TRUE; + + pSrcPixmap = exaGetDrawablePixmap(pSrcDrawable); + pDstPixmap = exaGetDrawablePixmap(pDstDrawable); + + exaGetDrawableDeltas(pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); + exaGetDrawableDeltas(pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); + + rects = malloc(nbox * sizeof(xRectangle)); + + if (rects) { + int i; + int ordering; + + for (i = 0; i < nbox; i++) { + rects[i].x = pbox[i].x1 + dx + src_off_x; + rects[i].y = pbox[i].y1 + dy + src_off_y; + rects[i].width = pbox[i].x2 - pbox[i].x1; + rects[i].height = pbox[i].y2 - pbox[i].y1; + } + + /* This must match the RegionCopy() logic for reversing rect order */ + if (nbox == 1 || (dx > 0 && dy > 0) || + (pDstDrawable != pSrcDrawable && + (pDstDrawable->type != DRAWABLE_WINDOW || + pSrcDrawable->type != DRAWABLE_WINDOW))) + ordering = CT_YXBANDED; + else + ordering = CT_UNSORTED; + + srcregion = RegionFromRects(nbox, rects, ordering); + free(rects); + + if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, + pGC->fillStyle, pGC->alu, + pGC->clientClipType)) { + dstregion = RegionCreate(NullBox, 0); + RegionCopy(dstregion, srcregion); + RegionTranslate(dstregion, dst_off_x - dx - src_off_x, + dst_off_y - dy - src_off_y); + } + } + + pSrcExaPixmap = ExaGetPixmapPriv(pSrcPixmap); + pDstExaPixmap = ExaGetPixmapPriv(pDstPixmap); + + /* Check whether the accelerator can use this pixmap. + * If the pitch of the pixmaps is out of range, there's nothing + * we can do but fall back to software rendering. + */ + if (pSrcExaPixmap->accel_blocked & EXA_RANGE_PITCH || + pDstExaPixmap->accel_blocked & EXA_RANGE_PITCH) + goto fallback; + + /* If the width or the height of either of the pixmaps + * is out of range, check whether the boxes are actually out of the + * addressable range as well. If they aren't, we can still do + * the copying in hardware. + */ + if (pSrcExaPixmap->accel_blocked || pDstExaPixmap->accel_blocked) { + int i; + + for (i = 0; i < nbox; i++) { + /* src */ + if ((pbox[i].x2 + dx + src_off_x) >= pExaScr->info->maxX || + (pbox[i].y2 + dy + src_off_y) >= pExaScr->info->maxY) + goto fallback; + + /* dst */ + if ((pbox[i].x2 + dst_off_x) >= pExaScr->info->maxX || + (pbox[i].y2 + dst_off_y) >= pExaScr->info->maxY) + goto fallback; + } + } + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[2]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pDstPixmap; + pixmaps[0].pReg = dstregion; + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pSrcPixmap; + pixmaps[1].pReg = srcregion; + + exaDoMigration(pixmaps, 2, TRUE); + } + + /* Mixed directions must be handled specially if the card is lame */ + if ((pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) && + reverse != upsidedown) { + if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, + dx, dy)) + goto out; + goto fallback; + } + + if (exaPixmapHasGpuCopy(pDstPixmap)) { + /* Normal blitting. */ + if (exaPixmapHasGpuCopy(pSrcPixmap)) { + if (!(*pExaScr->info->PrepareCopy) + (pSrcPixmap, pDstPixmap, reverse ? -1 : 1, upsidedown ? -1 : 1, + pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) { + goto fallback; + } + + while (nbox--) { + (*pExaScr->info->Copy) (pDstPixmap, + pbox->x1 + dx + src_off_x, + pbox->y1 + dy + src_off_y, + pbox->x1 + dst_off_x, + pbox->y1 + dst_off_y, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + pbox++; + } + + (*pExaScr->info->DoneCopy) (pDstPixmap); + exaMarkSync(pDstDrawable->pScreen); + /* UTS: mainly for SHM PutImage's secondary path. + * + * Only taking this path for directly accessible pixmaps. + */ + } + else if (!pDstExaPixmap->pDamage && pSrcExaPixmap->sys_ptr) { + int bpp = pSrcDrawable->bitsPerPixel; + int src_stride = exaGetPixmapPitch(pSrcPixmap); + CARD8 *src = NULL; + + if (!pExaScr->info->UploadToScreen) + goto fallback; + + if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) + goto fallback; + + if (pSrcDrawable->bitsPerPixel < 8) + goto fallback; + + if (pGC && + !(pGC->alu == GXcopy && + EXA_PM_IS_SOLID(pSrcDrawable, pGC->planemask))) + goto fallback; + + while (nbox--) { + src = + pSrcExaPixmap->sys_ptr + (pbox->y1 + dy + + src_off_y) * src_stride + + (pbox->x1 + dx + src_off_x) * (bpp / 8); + if (!pExaScr->info-> + UploadToScreen(pDstPixmap, pbox->x1 + dst_off_x, + pbox->y1 + dst_off_y, pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1, (char *) src, + src_stride)) + goto fallback; + + pbox++; + } + } + else + goto fallback; + } + else + goto fallback; + + goto out; + + fallback: + ret = FALSE; + + out: + if (dstregion) { + RegionUninit(dstregion); + RegionDestroy(dstregion); + } + if (srcregion) { + RegionUninit(srcregion); + RegionDestroy(srcregion); + } + + return ret; +} + +void +exaCopyNtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) +{ + ExaScreenPriv(pDstDrawable->pScreen); + + if (pExaScr->fallback_counter || + (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW)) + return; + + if (exaHWCopyNtoN + (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, + upsidedown)) + return; + + /* This is a CopyWindow, it's cleaner to fallback at the original call. */ + if (pExaScr->fallback_flags & EXA_ACCEL_COPYWINDOW) { + pExaScr->fallback_flags |= EXA_FALLBACK_COPYWINDOW; + return; + } + + /* fallback */ + ExaCheckCopyNtoN(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, + reverse, upsidedown, bitplane, closure); +} + +RegionPtr +exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, + int srcx, int srcy, int width, int height, int dstx, int dsty) +{ + ExaScreenPriv(pDstDrawable->pScreen); + + if (pExaScr->fallback_counter || pExaScr->swappedOut) { + return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC, + srcx, srcy, width, height, dstx, dsty); + } + + return miDoCopy(pSrcDrawable, pDstDrawable, pGC, + srcx, srcy, width, height, + dstx, dsty, exaCopyNtoN, 0, NULL); +} + +static void +exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr ppt) +{ + ExaScreenPriv(pDrawable->pScreen); + int i; + xRectangle *prect; + + /* If we can't reuse the current GC as is, don't bother accelerating the + * points. + */ + if (pExaScr->fallback_counter || pGC->fillStyle != FillSolid) { + ExaCheckPolyPoint(pDrawable, pGC, mode, npt, ppt); + return; + } + + prect = malloc(sizeof(xRectangle) * npt); + for (i = 0; i < npt; i++) { + prect[i].x = ppt[i].x; + prect[i].y = ppt[i].y; + if (i > 0 && mode == CoordModePrevious) { + prect[i].x += prect[i - 1].x; + prect[i].y += prect[i - 1].y; + } + prect[i].width = 1; + prect[i].height = 1; + } + pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect); + free(prect); +} + +/** + * exaPolylines() checks if it can accelerate the lines as a group of + * horizontal or vertical lines (rectangles), and uses existing rectangle fill + * acceleration if so. + */ +static void +exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr ppt) +{ + ExaScreenPriv(pDrawable->pScreen); + xRectangle *prect; + int x1, x2, y1, y2; + int i; + + if (pExaScr->fallback_counter) { + ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); + return; + } + + /* Don't try to do wide lines or non-solid fill style. */ + if (pGC->lineWidth != 0 || pGC->lineStyle != LineSolid || + pGC->fillStyle != FillSolid) { + ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); + return; + } + + prect = malloc(sizeof(xRectangle) * (npt - 1)); + x1 = ppt[0].x; + y1 = ppt[0].y; + /* If we have any non-horizontal/vertical, fall back. */ + for (i = 0; i < npt - 1; i++) { + if (mode == CoordModePrevious) { + x2 = x1 + ppt[i + 1].x; + y2 = y1 + ppt[i + 1].y; + } + else { + x2 = ppt[i + 1].x; + y2 = ppt[i + 1].y; + } + + if (x1 != x2 && y1 != y2) { + free(prect); + ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); + return; + } + + if (x1 < x2) { + prect[i].x = x1; + prect[i].width = x2 - x1 + 1; + } + else { + prect[i].x = x2; + prect[i].width = x1 - x2 + 1; + } + if (y1 < y2) { + prect[i].y = y1; + prect[i].height = y2 - y1 + 1; + } + else { + prect[i].y = y2; + prect[i].height = y1 - y2 + 1; + } + + x1 = x2; + y1 = y2; + } + pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect); + free(prect); +} + +/** + * exaPolySegment() checks if it can accelerate the lines as a group of + * horizontal or vertical lines (rectangles), and uses existing rectangle fill + * acceleration if so. + */ +static void +exaPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) +{ + ExaScreenPriv(pDrawable->pScreen); + xRectangle *prect; + int i; + + /* Don't try to do wide lines or non-solid fill style. */ + if (pExaScr->fallback_counter || pGC->lineWidth != 0 || + pGC->lineStyle != LineSolid || pGC->fillStyle != FillSolid) { + ExaCheckPolySegment(pDrawable, pGC, nseg, pSeg); + return; + } + + /* If we have any non-horizontal/vertical, fall back. */ + for (i = 0; i < nseg; i++) { + if (pSeg[i].x1 != pSeg[i].x2 && pSeg[i].y1 != pSeg[i].y2) { + ExaCheckPolySegment(pDrawable, pGC, nseg, pSeg); + return; + } + } + + prect = malloc(sizeof(xRectangle) * nseg); + for (i = 0; i < nseg; i++) { + if (pSeg[i].x1 < pSeg[i].x2) { + prect[i].x = pSeg[i].x1; + prect[i].width = pSeg[i].x2 - pSeg[i].x1 + 1; + } + else { + prect[i].x = pSeg[i].x2; + prect[i].width = pSeg[i].x1 - pSeg[i].x2 + 1; + } + if (pSeg[i].y1 < pSeg[i].y2) { + prect[i].y = pSeg[i].y1; + prect[i].height = pSeg[i].y2 - pSeg[i].y1 + 1; + } + else { + prect[i].y = pSeg[i].y2; + prect[i].height = pSeg[i].y1 - pSeg[i].y2 + 1; + } + + /* don't paint last pixel */ + if (pGC->capStyle == CapNotLast) { + if (prect[i].width == 1) + prect[i].height--; + else + prect[i].width--; + } + } + pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect); + free(prect); +} + +static Bool exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, + Pixel pixel, CARD32 planemask, CARD32 alu, + unsigned int clientClipType); + +static void +exaPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect) +{ + ExaScreenPriv(pDrawable->pScreen); + RegionPtr pClip = fbGetCompositeClip(pGC); + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + ExaPixmapPriv(pPixmap); + register BoxPtr pbox; + BoxPtr pextent; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1, fullY2; + int partX1, partX2, partY1, partY2; + int xoff, yoff; + int xorg, yorg; + int n; + RegionPtr pReg = RegionFromRects(nrect, prect, CT_UNSORTED); + + /* Compute intersection of rects and clip region */ + RegionTranslate(pReg, pDrawable->x, pDrawable->y); + RegionIntersect(pReg, pClip, pReg); + + if (!RegionNumRects(pReg)) { + goto out; + } + + exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); + + if (pExaScr->fallback_counter || pExaScr->swappedOut || + pExaPixmap->accel_blocked) { + goto fallback; + } + + /* For ROPs where overlaps don't matter, convert rectangles to region and + * call exaFillRegion{Solid,Tiled}. + */ + if ((pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) && + (nrect == 1 || pGC->alu == GXcopy || pGC->alu == GXclear || + pGC->alu == GXnoop || pGC->alu == GXcopyInverted || + pGC->alu == GXset)) { + if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) && + exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ? + pGC->fgPixel : pGC->tile.pixel, pGC->planemask, + pGC->alu, pGC->clientClipType)) || + (pGC->fillStyle == FillTiled && !pGC->tileIsPixel && + exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg, + pGC->planemask, pGC->alu, + pGC->clientClipType))) { + goto out; + } + } + + if (pGC->fillStyle != FillSolid && + !(pGC->tileIsPixel && pGC->fillStyle == FillTiled)) { + goto fallback; + } + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = NULL; + + exaDoMigration(pixmaps, 1, TRUE); + } + + if (!exaPixmapHasGpuCopy(pPixmap) || + !(*pExaScr->info->PrepareSolid) (pPixmap, + pGC->alu, + pGC->planemask, pGC->fgPixel)) { + fallback: + ExaCheckPolyFillRect(pDrawable, pGC, nrect, prect); + goto out; + } + + xorg = pDrawable->x; + yorg = pDrawable->y; + + pextent = RegionExtents(pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (nrect--) { + fullX1 = prect->x + xorg; + fullY1 = prect->y + yorg; + fullX2 = fullX1 + (int) prect->width; + fullY2 = fullY1 + (int) prect->height; + prect++; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullY1 < extentY1) + fullY1 = extentY1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullY2 > extentY2) + fullY2 = extentY2; + + if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) + continue; + n = RegionNumRects(pClip); + if (n == 1) { + (*pExaScr->info->Solid) (pPixmap, + fullX1 + xoff, fullY1 + yoff, + fullX2 + xoff, fullY2 + yoff); + } + else { + pbox = RegionRects(pClip); + /* + * clip the rectangle to each box in the clip region + * this is logically equivalent to calling Intersect(), + * but rectangles may overlap each other here. + */ + while (n--) { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partY1 = pbox->y1; + if (partY1 < fullY1) + partY1 = fullY1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + partY2 = pbox->y2; + if (partY2 > fullY2) + partY2 = fullY2; + + pbox++; + + if (partX1 < partX2 && partY1 < partY2) { + (*pExaScr->info->Solid) (pPixmap, + partX1 + xoff, partY1 + yoff, + partX2 + xoff, partY2 + yoff); + } + } + } + } + (*pExaScr->info->DoneSolid) (pPixmap); + exaMarkSync(pDrawable->pScreen); + + out: + RegionUninit(pReg); + RegionDestroy(pReg); +} + +const GCOps exaOps = { + exaFillSpans, + ExaCheckSetSpans, + exaPutImage, + exaCopyArea, + ExaCheckCopyPlane, + exaPolyPoint, + exaPolylines, + exaPolySegment, + miPolyRectangle, + ExaCheckPolyArc, + miFillPolygon, + exaPolyFillRect, + miPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + ExaCheckImageGlyphBlt, + ExaCheckPolyGlyphBlt, + ExaCheckPushPixels, +}; + +void +exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + RegionRec rgnDst; + int dx, dy; + PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); + + ExaScreenPriv(pWin->drawable.pScreen); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + RegionTranslate(prgnSrc, -dx, -dy); + + RegionInit(&rgnDst, NullBox, 0); + + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); +#ifdef COMPOSITE + if (pPixmap->screen_x || pPixmap->screen_y) + RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); +#endif + + if (pExaScr->fallback_counter) { + pExaScr->fallback_flags |= EXA_FALLBACK_COPYWINDOW; + goto fallback; + } + + pExaScr->fallback_flags |= EXA_ACCEL_COPYWINDOW; + miCopyRegion(&pPixmap->drawable, &pPixmap->drawable, + NULL, &rgnDst, dx, dy, exaCopyNtoN, 0, NULL); + pExaScr->fallback_flags &= ~EXA_ACCEL_COPYWINDOW; + + fallback: + RegionUninit(&rgnDst); + + if (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW) { + pExaScr->fallback_flags &= ~EXA_FALLBACK_COPYWINDOW; + RegionTranslate(prgnSrc, dx, dy); + ExaCheckCopyWindow(pWin, ptOldOrg, prgnSrc); + } +} + +static Bool +exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, + CARD32 planemask, CARD32 alu, unsigned int clientClipType) +{ + ExaScreenPriv(pDrawable->pScreen); + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + ExaPixmapPriv(pPixmap); + int xoff, yoff; + Bool ret = FALSE; + + exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); + RegionTranslate(pRegion, xoff, yoff); + + if (pExaScr->fallback_counter || pExaPixmap->accel_blocked) + goto out; + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid, + alu, + clientClipType) ? NULL : + pRegion; + + exaDoMigration(pixmaps, 1, TRUE); + } + + if (exaPixmapHasGpuCopy(pPixmap) && + (*pExaScr->info->PrepareSolid) (pPixmap, alu, planemask, pixel)) { + int nbox; + BoxPtr pBox; + + nbox = RegionNumRects(pRegion); + pBox = RegionRects(pRegion); + + while (nbox--) { + (*pExaScr->info->Solid) (pPixmap, pBox->x1, pBox->y1, pBox->x2, + pBox->y2); + pBox++; + } + (*pExaScr->info->DoneSolid) (pPixmap); + exaMarkSync(pDrawable->pScreen); + + if (pExaPixmap->pDamage && + pExaPixmap->sys_ptr && pDrawable->type == DRAWABLE_PIXMAP && + pDrawable->width == 1 && pDrawable->height == 1 && + pDrawable->bitsPerPixel != 24) { + ExaPixmapPriv(pPixmap); + RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); + + switch (pDrawable->bitsPerPixel) { + case 32: + *(CARD32 *) pExaPixmap->sys_ptr = pixel; + break; + case 16: + *(CARD16 *) pExaPixmap->sys_ptr = pixel; + break; + case 8: + case 4: + case 1: + *(CARD8 *) pExaPixmap->sys_ptr = pixel; + } + + RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys, pRegion); + RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB, pRegion); + RegionSubtract(pending_damage, pending_damage, pRegion); + } + + ret = TRUE; + } + + out: + RegionTranslate(pRegion, -xoff, -yoff); + + return ret; +} + +/* Try to do an accelerated tile of the pTile into pRegion of pDrawable. + * Based on fbFillRegionTiled(), fbTile(). + */ +Bool +exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, + DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu, + unsigned int clientClipType) +{ + ExaScreenPriv(pDrawable->pScreen); + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile); + int xoff, yoff; + int tileWidth, tileHeight; + int nbox = RegionNumRects(pRegion); + BoxPtr pBox = RegionRects(pRegion); + Bool ret = FALSE; + int i; + + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + + /* If we're filling with a solid color, grab it out and go to + * FillRegionSolid, saving numerous copies. + */ + if (tileWidth == 1 && tileHeight == 1) + return exaFillRegionSolid(pDrawable, pRegion, + exaGetPixmapFirstPixel(pTile), planemask, + alu, clientClipType); + + pPixmap = exaGetDrawablePixmap(pDrawable); + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + if (pExaScr->fallback_counter || pExaPixmap->accel_blocked || + pTileExaPixmap->accel_blocked) + return FALSE; + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[2]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled, + alu, + clientClipType) ? NULL : + pRegion; + pixmaps[1].as_dst = FALSE; + pixmaps[1].as_src = TRUE; + pixmaps[1].pPix = pTile; + pixmaps[1].pReg = NULL; + + exaDoMigration(pixmaps, 2, TRUE); + } + + pPixmap = exaGetOffscreenPixmap(pDrawable, &xoff, &yoff); + + if (!pPixmap || !exaPixmapHasGpuCopy(pTile)) + return FALSE; + + if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask)) { + if (xoff || yoff) + RegionTranslate(pRegion, xoff, yoff); + + for (i = 0; i < nbox; i++) { + int height = pBox[i].y2 - pBox[i].y1; + int dstY = pBox[i].y1; + int tileY; + + if (alu == GXcopy) + height = min(height, tileHeight); + + modulus(dstY - yoff - pDrawable->y - pPatOrg->y, tileHeight, tileY); + + while (height > 0) { + int width = pBox[i].x2 - pBox[i].x1; + int dstX = pBox[i].x1; + int tileX; + int h = tileHeight - tileY; + + if (alu == GXcopy) + width = min(width, tileWidth); + + if (h > height) + h = height; + height -= h; + + modulus(dstX - xoff - pDrawable->x - pPatOrg->x, tileWidth, + tileX); + + while (width > 0) { + int w = tileWidth - tileX; + + if (w > width) + w = width; + width -= w; + + (*pExaScr->info->Copy) (pPixmap, tileX, tileY, dstX, dstY, + w, h); + dstX += w; + tileX = 0; + } + dstY += h; + tileY = 0; + } + } + (*pExaScr->info->DoneCopy) (pPixmap); + + /* With GXcopy, we only need to do the basic algorithm up to the tile + * size; then, we can just keep doubling the destination in each + * direction until it fills the box. This way, the number of copy + * operations is O(log(rx)) + O(log(ry)) instead of O(rx * ry), where + * rx/ry is the ratio between box and tile width/height. This can make + * a big difference if each driver copy incurs a significant constant + * overhead. + */ + if (alu != GXcopy) + ret = TRUE; + else { + Bool more_copy = FALSE; + + for (i = 0; i < nbox; i++) { + int dstX = pBox[i].x1 + tileWidth; + int dstY = pBox[i].y1 + tileHeight; + + if ((dstX < pBox[i].x2) || (dstY < pBox[i].y2)) { + more_copy = TRUE; + break; + } + } + + if (more_copy == FALSE) + ret = TRUE; + + if (more_copy && (*pExaScr->info->PrepareCopy) (pPixmap, pPixmap, + 1, 1, alu, + planemask)) { + for (i = 0; i < nbox; i++) { + int dstX = pBox[i].x1 + tileWidth; + int dstY = pBox[i].y1 + tileHeight; + int width = min(pBox[i].x2 - dstX, tileWidth); + int height = min(pBox[i].y2 - pBox[i].y1, tileHeight); + + while (dstX < pBox[i].x2) { + (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1, + dstX, pBox[i].y1, width, + height); + dstX += width; + width = min(pBox[i].x2 - dstX, width * 2); + } + + width = pBox[i].x2 - pBox[i].x1; + height = min(pBox[i].y2 - dstY, tileHeight); + + while (dstY < pBox[i].y2) { + (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1, + pBox[i].x1, dstY, width, + height); + dstY += height; + height = min(pBox[i].y2 - dstY, height * 2); + } + } + + (*pExaScr->info->DoneCopy) (pPixmap); + + ret = TRUE; + } + } + + exaMarkSync(pDrawable->pScreen); + + if (xoff || yoff) + RegionTranslate(pRegion, -xoff, -yoff); + } + + return ret; +} + +/** + * Accelerates GetImage for solid ZPixmap downloads from framebuffer memory. + * + * This is probably the only case we actually care about. The rest fall through + * to migration and fbGetImage, which hopefully will result in migration pushing + * the pixmap out of framebuffer. + */ +void +exaGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d) +{ + ExaScreenPriv(pDrawable->pScreen); + PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); + + ExaPixmapPriv(pPix); + int xoff, yoff; + Bool ok; + + if (pExaScr->fallback_counter || pExaScr->swappedOut) + goto fallback; + + /* If there's a system copy, we want to save the result there */ + if (pExaPixmap->pDamage) + goto fallback; + + pPix = exaGetOffscreenPixmap(pDrawable, &xoff, &yoff); + + if (pPix == NULL || pExaScr->info->DownloadFromScreen == NULL) + goto fallback; + + /* Only cover the ZPixmap, solid copy case. */ + if (format != ZPixmap || !EXA_PM_IS_SOLID(pDrawable, planeMask)) + goto fallback; + + /* Only try to handle the 8bpp and up cases, since we don't want to think + * about <8bpp. + */ + if (pDrawable->bitsPerPixel < 8) + goto fallback; + + ok = pExaScr->info->DownloadFromScreen(pPix, pDrawable->x + x + xoff, + pDrawable->y + y + yoff, w, h, d, + PixmapBytePad(w, pDrawable->depth)); + if (ok) { + exaWaitSync(pDrawable->pScreen); + return; + } + + fallback: + ExaCheckGetImage(pDrawable, x, y, w, h, format, planeMask, d); +} diff --git a/exa/exa_classic.c b/exa/exa_classic.c new file mode 100644 index 0000000..0fa422f --- /dev/null +++ b/exa/exa_classic.c @@ -0,0 +1,265 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +/* This file holds the classic exa specific implementation. */ + +static _X_INLINE void * +ExaGetPixmapAddress(PixmapPtr p) +{ + ExaPixmapPriv(p); + + if (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr) + return pExaPixmap->fb_ptr; + else + return pExaPixmap->sys_ptr; +} + +/** + * exaCreatePixmap() creates a new pixmap. + * + * If width and height are 0, this won't be a full-fledged pixmap and it will + * get ModifyPixmapHeader() called on it later. So, we mark it as pinned, because + * ModifyPixmapHeader() would break migration. These types of pixmaps are used + * for scratch pixmaps, or to represent the visible screen. + */ +PixmapPtr +exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + BoxRec box; + int bpp; + + ExaScreenPriv(pScreen); + + if (w > 32767 || h > 32767) + return NullPixmap; + + swap(pExaScr, pScreen, CreatePixmap); + pPixmap = pScreen->CreatePixmap(pScreen, w, h, depth, usage_hint); + swap(pExaScr, pScreen, CreatePixmap); + + if (!pPixmap) + return NULL; + + pExaPixmap = ExaGetPixmapPriv(pPixmap); + pExaPixmap->driverPriv = NULL; + + bpp = pPixmap->drawable.bitsPerPixel; + + pExaPixmap->driverPriv = NULL; + /* Scratch pixmaps may have w/h equal to zero, and may not be + * migrated. + */ + if (!w || !h) + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + else + pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; + + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->sys_pitch = pPixmap->devKind; + + pPixmap->devPrivate.ptr = NULL; + pExaPixmap->use_gpu_copy = FALSE; + + pExaPixmap->fb_ptr = NULL; + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); + pExaPixmap->fb_size = pExaPixmap->fb_pitch * h; + + if (pExaPixmap->fb_pitch > 131071) { + swap(pExaScr, pScreen, DestroyPixmap); + pScreen->DestroyPixmap(pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + return NULL; + } + + /* Set up damage tracking */ + pExaPixmap->pDamage = DamageCreate(NULL, NULL, + DamageReportNone, TRUE, + pScreen, pPixmap); + + if (pExaPixmap->pDamage == NULL) { + swap(pExaScr, pScreen, DestroyPixmap); + pScreen->DestroyPixmap(pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + return NULL; + } + + DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage); + /* This ensures that pending damage reflects the current operation. */ + /* This is used by exa to optimize migration. */ + DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); + + pExaPixmap->area = NULL; + + /* We set the initial pixmap as completely valid for a simple reason. + * Imagine a 1000x1000 pixmap, it has 1 million pixels, 250000 of which + * could form single pixel rects as part of a region. Setting the complete region + * as valid is a natural defragmentation of the region. + */ + box.x1 = 0; + box.y1 = 0; + box.x2 = w; + box.y2 = h; + RegionInit(&pExaPixmap->validSys, &box, 0); + RegionInit(&pExaPixmap->validFB, &box, 0); + + exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); + + /* During a fallback we must prepare access. */ + if (pExaScr->fallback_counter) + exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); + + return pPixmap; +} + +Bool +exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, + int depth, int bitsPerPixel, int devKind, + pointer pPixData) +{ + ScreenPtr pScreen; + ExaScreenPrivPtr pExaScr; + ExaPixmapPrivPtr pExaPixmap; + Bool ret; + + if (!pPixmap) + return FALSE; + + pScreen = pPixmap->drawable.pScreen; + pExaScr = ExaGetScreenPriv(pScreen); + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + if (pExaPixmap) { + if (pPixData) + pExaPixmap->sys_ptr = pPixData; + + if (devKind > 0) + pExaPixmap->sys_pitch = devKind; + + /* Classic EXA: + * - Framebuffer. + * - Scratch pixmap with gpu memory. + */ + if (pExaScr->info->memoryBase && pPixData) { + if ((CARD8 *) pPixData >= pExaScr->info->memoryBase && + ((CARD8 *) pPixData - pExaScr->info->memoryBase) < + pExaScr->info->memorySize) { + pExaPixmap->fb_ptr = pPixData; + pExaPixmap->fb_pitch = devKind; + pExaPixmap->use_gpu_copy = TRUE; + } + } + + if (width > 0 && height > 0 && bitsPerPixel > 0) { + exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, width, height, bitsPerPixel); + } + + /* Pixmaps subject to ModifyPixmapHeader will be pinned to system or + * gpu memory, so there's no need to track damage. + */ + if (pExaPixmap->pDamage) { + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; + } + } + + swap(pExaScr, pScreen, ModifyPixmapHeader); + ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + swap(pExaScr, pScreen, ModifyPixmapHeader); + + /* Always NULL this, we don't want lingering pointers. */ + pPixmap->devPrivate.ptr = NULL; + + return ret; +} + +Bool +exaDestroyPixmap_classic(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + Bool ret; + + if (pPixmap->refcnt == 1) { + ExaPixmapPriv(pPixmap); + + exaDestroyPixmap(pPixmap); + + if (pExaPixmap->area) { + DBG_PIXMAP(("-- 0x%p (0x%x) (%dx%d)\n", + (void *) pPixmap->drawable.id, + ExaGetPixmapPriv(pPixmap)->area->offset, + pPixmap->drawable.width, pPixmap->drawable.height)); + /* Free the offscreen area */ + exaOffscreenFree(pPixmap->drawable.pScreen, pExaPixmap->area); + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + pPixmap->devKind = pExaPixmap->sys_pitch; + } + RegionUninit(&pExaPixmap->validSys); + RegionUninit(&pExaPixmap->validFB); + } + + swap(pExaScr, pScreen, DestroyPixmap); + ret = pScreen->DestroyPixmap(pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + + return ret; +} + +Bool +exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + Bool ret; + + if (pExaScr->info->PixmapIsOffscreen) { + void *old_ptr = pPixmap->devPrivate.ptr; + + pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); + ret = pExaScr->info->PixmapIsOffscreen(pPixmap); + pPixmap->devPrivate.ptr = old_ptr; + } + else + ret = (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr); + + return ret; +} diff --git a/exa/exa_driver.c b/exa/exa_driver.c new file mode 100644 index 0000000..d467ca9 --- /dev/null +++ b/exa/exa_driver.c @@ -0,0 +1,230 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +/* This file holds the driver allocated pixmaps specific implementation. */ + +static _X_INLINE void * +ExaGetPixmapAddress(PixmapPtr p) +{ + ExaPixmapPriv(p); + + return pExaPixmap->sys_ptr; +} + +/** + * exaCreatePixmap() creates a new pixmap. + * + * Pixmaps are always marked as pinned, because exa has no control over them. + */ +PixmapPtr +exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + int bpp; + size_t paddedWidth, datasize; + + ExaScreenPriv(pScreen); + + if (w > 32767 || h > 32767) + return NullPixmap; + + swap(pExaScr, pScreen, CreatePixmap); + pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint); + swap(pExaScr, pScreen, CreatePixmap); + + if (!pPixmap) + return NULL; + + pExaPixmap = ExaGetPixmapPriv(pPixmap); + pExaPixmap->driverPriv = NULL; + + bpp = pPixmap->drawable.bitsPerPixel; + + /* Set this before driver hooks, to allow for driver pixmaps without gpu + * memory to back it. These pixmaps have a valid pointer at all times. + */ + pPixmap->devPrivate.ptr = NULL; + + if (pExaScr->info->CreatePixmap2) { + int new_pitch = 0; + + pExaPixmap->driverPriv = + pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, + &new_pitch); + paddedWidth = pExaPixmap->fb_pitch = new_pitch; + } + else { + paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); + if (paddedWidth / 4 > 32767 || h > 32767) + return NullPixmap; + + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); + + if (paddedWidth < pExaPixmap->fb_pitch) + paddedWidth = pExaPixmap->fb_pitch; + datasize = h * paddedWidth; + pExaPixmap->driverPriv = + pExaScr->info->CreatePixmap(pScreen, datasize, 0); + } + + if (!pExaPixmap->driverPriv) { + swap(pExaScr, pScreen, DestroyPixmap); + pScreen->DestroyPixmap(pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + return NULL; + } + + /* Allow ModifyPixmapHeader to set sys_ptr appropriately. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + pExaPixmap->fb_ptr = NULL; + pExaPixmap->pDamage = NULL; + pExaPixmap->sys_ptr = NULL; + + (*pScreen->ModifyPixmapHeader) (pPixmap, w, h, 0, 0, paddedWidth, NULL); + + pExaPixmap->area = NULL; + + exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); + + pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap); + + /* During a fallback we must prepare access. */ + if (pExaScr->fallback_counter) + exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); + + return pPixmap; +} + +Bool +exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, + int depth, int bitsPerPixel, int devKind, + pointer pPixData) +{ + ScreenPtr pScreen; + ExaScreenPrivPtr pExaScr; + ExaPixmapPrivPtr pExaPixmap; + Bool ret; + + if (!pPixmap) + return FALSE; + + pScreen = pPixmap->drawable.pScreen; + pExaScr = ExaGetScreenPriv(pScreen); + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + if (pExaPixmap) { + if (pPixData) + pExaPixmap->sys_ptr = pPixData; + + if (devKind > 0) + pExaPixmap->sys_pitch = devKind; + + if (width > 0 && height > 0 && bitsPerPixel > 0) { + exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, width, height, bitsPerPixel); + } + } + + if (pExaScr->info->ModifyPixmapHeader) { + ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, + pPixData); + /* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL. + * If pPixmap->devPrivate.ptr is non-NULL, then we've got a + * !has_gpu_copy pixmap. We need to store the pointer, + * because PrepareAccess won't be called. + */ + if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) { + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->sys_pitch = pPixmap->devKind; + } + if (ret == TRUE) + goto out; + } + + swap(pExaScr, pScreen, ModifyPixmapHeader); + ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + swap(pExaScr, pScreen, ModifyPixmapHeader); + + out: + /* Always NULL this, we don't want lingering pointers. */ + pPixmap->devPrivate.ptr = NULL; + + return ret; +} + +Bool +exaDestroyPixmap_driver(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + Bool ret; + + if (pPixmap->refcnt == 1) { + ExaPixmapPriv(pPixmap); + + exaDestroyPixmap(pPixmap); + + if (pExaPixmap->driverPriv) + pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); + pExaPixmap->driverPriv = NULL; + } + + swap(pExaScr, pScreen, DestroyPixmap); + ret = pScreen->DestroyPixmap(pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + + return ret; +} + +Bool +exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + pointer saved_ptr; + Bool ret; + + saved_ptr = pPixmap->devPrivate.ptr; + pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); + ret = pExaScr->info->PixmapIsOffscreen(pPixmap); + pPixmap->devPrivate.ptr = saved_ptr; + + return ret; +} diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c new file mode 100644 index 0000000..71f750f --- /dev/null +++ b/exa/exa_glyphs.c @@ -0,0 +1,839 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * Partly based on code Copyright © 2000 SuSE, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Red Hat not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Red Hat makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * Red Hat DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Red Hat + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Owen Taylor + * Based on code by: Keith Packard + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" + +#include "mipict.h" + +#if DEBUG_GLYPH_CACHE +#define DBG_GLYPH_CACHE(a) ErrorF a +#else +#define DBG_GLYPH_CACHE(a) +#endif + +/* Width of the pixmaps we use for the caches; this should be less than + * max texture size of the driver; this may need to actually come from + * the driver. + */ +#define CACHE_PICTURE_WIDTH 1024 + +/* Maximum number of glyphs we buffer on the stack before flushing + * rendering to the mask or destination surface. + */ +#define GLYPH_BUFFER_SIZE 256 + +typedef struct { + PicturePtr mask; + ExaCompositeRectRec rects[GLYPH_BUFFER_SIZE]; + int count; +} ExaGlyphBuffer, *ExaGlyphBufferPtr; + +typedef enum { + ExaGlyphSuccess, /* Glyph added to render buffer */ + ExaGlyphFail, /* out of memory, etc */ + ExaGlyphNeedFlush, /* would evict a glyph already in the buffer */ +} ExaGlyphCacheResult; + +void +exaGlyphsInit(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + int i = 0; + + memset(pExaScr->glyphCaches, 0, sizeof(pExaScr->glyphCaches)); + + pExaScr->glyphCaches[i].format = PICT_a8; + pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = + 16; + i++; + pExaScr->glyphCaches[i].format = PICT_a8; + pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = + 32; + i++; + pExaScr->glyphCaches[i].format = PICT_a8r8g8b8; + pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = + 16; + i++; + pExaScr->glyphCaches[i].format = PICT_a8r8g8b8; + pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = + 32; + i++; + + assert(i == EXA_NUM_GLYPH_CACHES); + + for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { + pExaScr->glyphCaches[i].columns = + CACHE_PICTURE_WIDTH / pExaScr->glyphCaches[i].glyphWidth; + pExaScr->glyphCaches[i].size = 256; + pExaScr->glyphCaches[i].hashSize = 557; + } +} + +static void +exaUnrealizeGlyphCaches(ScreenPtr pScreen, unsigned int format) +{ + ExaScreenPriv(pScreen); + int i; + + for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { + ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; + + if (cache->format != format) + continue; + + if (cache->picture) { + FreePicture((pointer) cache->picture, (XID) 0); + cache->picture = NULL; + } + + free(cache->hashEntries); + cache->hashEntries = NULL; + + free(cache->glyphs); + cache->glyphs = NULL; + cache->glyphCount = 0; + } +} + +#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) + +/* All caches for a single format share a single pixmap for glyph storage, + * allowing mixing glyphs of different sizes without paying a penalty + * for switching between mask pixmaps. (Note that for a size of font + * right at the border between two sizes, we might be switching for almost + * every glyph.) + * + * This function allocates the storage pixmap, and then fills in the + * rest of the allocated structures for all caches with the given format. + */ +static Bool +exaRealizeGlyphCaches(ScreenPtr pScreen, unsigned int format) +{ + ExaScreenPriv(pScreen); + + int depth = PIXMAN_FORMAT_DEPTH(format); + PictFormatPtr pPictFormat; + PixmapPtr pPixmap; + PicturePtr pPicture; + CARD32 component_alpha; + int height; + int i; + int error; + + pPictFormat = PictureMatchFormat(pScreen, depth, format); + if (!pPictFormat) + return FALSE; + + /* Compute the total vertical size needed for the format */ + + height = 0; + for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { + ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; + int rows; + + if (cache->format != format) + continue; + + cache->yOffset = height; + + rows = (cache->size + cache->columns - 1) / cache->columns; + height += rows * cache->glyphHeight; + } + + /* Now allocate the pixmap and picture */ + pPixmap = (*pScreen->CreatePixmap) (pScreen, + CACHE_PICTURE_WIDTH, height, depth, 0); + if (!pPixmap) + return FALSE; + + component_alpha = NeedsComponent(pPictFormat->format); + pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat, + CPComponentAlpha, &component_alpha, serverClient, + &error); + + (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */ + + if (!pPicture) + return FALSE; + + /* And store the picture in all the caches for the format */ + for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { + ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; + int j; + + if (cache->format != format) + continue; + + cache->picture = pPicture; + cache->picture->refcnt++; + cache->hashEntries = malloc(sizeof(int) * cache->hashSize); + cache->glyphs = malloc(sizeof(ExaCachedGlyphRec) * cache->size); + cache->glyphCount = 0; + + if (!cache->hashEntries || !cache->glyphs) + goto bail; + + for (j = 0; j < cache->hashSize; j++) + cache->hashEntries[j] = -1; + + cache->evictionPosition = rand() % cache->size; + } + + /* Each cache references the picture individually */ + FreePicture((pointer) pPicture, (XID) 0); + return TRUE; + + bail: + exaUnrealizeGlyphCaches(pScreen, format); + return FALSE; +} + +void +exaGlyphsFini(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + int i; + + for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { + ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; + + if (cache->picture) + exaUnrealizeGlyphCaches(pScreen, cache->format); + } +} + +static int +exaGlyphCacheHashLookup(ExaGlyphCachePtr cache, GlyphPtr pGlyph) +{ + int slot; + + slot = (*(CARD32 *) pGlyph->sha1) % cache->hashSize; + + while (TRUE) { /* hash table can never be full */ + int entryPos = cache->hashEntries[slot]; + + if (entryPos == -1) + return -1; + + if (memcmp + (pGlyph->sha1, cache->glyphs[entryPos].sha1, + sizeof(pGlyph->sha1)) == 0) { + return entryPos; + } + + slot--; + if (slot < 0) + slot = cache->hashSize - 1; + } +} + +static void +exaGlyphCacheHashInsert(ExaGlyphCachePtr cache, GlyphPtr pGlyph, int pos) +{ + int slot; + + memcpy(cache->glyphs[pos].sha1, pGlyph->sha1, sizeof(pGlyph->sha1)); + + slot = (*(CARD32 *) pGlyph->sha1) % cache->hashSize; + + while (TRUE) { /* hash table can never be full */ + if (cache->hashEntries[slot] == -1) { + cache->hashEntries[slot] = pos; + return; + } + + slot--; + if (slot < 0) + slot = cache->hashSize - 1; + } +} + +static void +exaGlyphCacheHashRemove(ExaGlyphCachePtr cache, int pos) +{ + int slot; + int emptiedSlot = -1; + + slot = (*(CARD32 *) cache->glyphs[pos].sha1) % cache->hashSize; + + while (TRUE) { /* hash table can never be full */ + int entryPos = cache->hashEntries[slot]; + + if (entryPos == -1) + return; + + if (entryPos == pos) { + cache->hashEntries[slot] = -1; + emptiedSlot = slot; + } + else if (emptiedSlot != -1) { + /* See if we can move this entry into the emptied slot, we can't + * do that if if entry would have hashed between the current position + * and the emptied slot. (taking wrapping into account). Bad positions + * are: + * + * | XXXXXXXXXX | + * i j + * + * |XXX XXXX| + * j i + * + * i - slot, j - emptiedSlot + * + * (Knuth 6.4R) + */ + + int entrySlot = + (*(CARD32 *) cache->glyphs[entryPos].sha1) % cache->hashSize; + + if (!((entrySlot >= slot && entrySlot < emptiedSlot) || + (emptiedSlot < slot && + (entrySlot < emptiedSlot || entrySlot >= slot)))) { + cache->hashEntries[emptiedSlot] = entryPos; + cache->hashEntries[slot] = -1; + emptiedSlot = slot; + } + } + + slot--; + if (slot < 0) + slot = cache->hashSize - 1; + } +} + +#define CACHE_X(pos) (((pos) % cache->columns) * cache->glyphWidth) +#define CACHE_Y(pos) (cache->yOffset + ((pos) / cache->columns) * cache->glyphHeight) + +/* The most efficient thing to way to upload the glyph to the screen + * is to use the UploadToScreen() driver hook; this allows us to + * pipeline glyph uploads and to avoid creating gpu backed pixmaps for + * glyphs that we'll never use again. + * + * If we can't do it with UploadToScreen (because the glyph has a gpu copy, + * etc), we fall back to CompositePicture. + * + * We need to damage the cache pixmap manually in either case because the damage + * layer unwrapped the picture screen before calling exaGlyphs. + */ +static void +exaGlyphCacheUploadGlyph(ScreenPtr pScreen, + ExaGlyphCachePtr cache, int x, int y, GlyphPtr pGlyph) +{ + ExaScreenPriv(pScreen); + PicturePtr pGlyphPicture = GetGlyphPicture(pGlyph, pScreen); + PixmapPtr pGlyphPixmap = (PixmapPtr) pGlyphPicture->pDrawable; + + ExaPixmapPriv(pGlyphPixmap); + PixmapPtr pCachePixmap = (PixmapPtr) cache->picture->pDrawable; + + if (!pExaScr->info->UploadToScreen || pExaScr->swappedOut || + pExaPixmap->accel_blocked) + goto composite; + + /* If the glyph pixmap is already uploaded, no point in doing + * things this way */ + if (exaPixmapHasGpuCopy(pGlyphPixmap)) + goto composite; + + /* UploadToScreen only works if bpp match */ + if (pGlyphPixmap->drawable.bitsPerPixel != + pCachePixmap->drawable.bitsPerPixel) + goto composite; + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + /* cache pixmap must have a gpu copy. */ + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pCachePixmap; + pixmaps[0].pReg = NULL; + exaDoMigration(pixmaps, 1, TRUE); + } + + if (!exaPixmapHasGpuCopy(pCachePixmap)) + goto composite; + + /* x,y are in pixmap coordinates, no need for cache{X,Y}off */ + if (pExaScr->info->UploadToScreen(pCachePixmap, + x, + y, + pGlyph->info.width, + pGlyph->info.height, + (char *) pExaPixmap->sys_ptr, + pExaPixmap->sys_pitch)) + goto damage; + + composite: + CompositePicture(PictOpSrc, + pGlyphPicture, + None, + cache->picture, + 0, 0, 0, 0, x, y, pGlyph->info.width, pGlyph->info.height); + + damage: + /* The cache pixmap isn't a window, so no need to offset coordinates. */ + exaPixmapDirty(pCachePixmap, + x, y, x + cache->glyphWidth, y + cache->glyphHeight); +} + +static ExaGlyphCacheResult +exaGlyphCacheBufferGlyph(ScreenPtr pScreen, + ExaGlyphCachePtr cache, + ExaGlyphBufferPtr buffer, + GlyphPtr pGlyph, + PicturePtr pSrc, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst) +{ + ExaCompositeRectPtr rect; + int pos; + int x, y; + + if (buffer->mask && buffer->mask != cache->picture) + return ExaGlyphNeedFlush; + + if (!cache->picture) { + if (!exaRealizeGlyphCaches(pScreen, cache->format)) + return ExaGlyphFail; + } + + DBG_GLYPH_CACHE(("(%d,%d,%s): buffering glyph %lx\n", + cache->glyphWidth, cache->glyphHeight, + cache->format == PICT_a8 ? "A" : "ARGB", + (long) *(CARD32 *) pGlyph->sha1)); + + pos = exaGlyphCacheHashLookup(cache, pGlyph); + if (pos != -1) { + DBG_GLYPH_CACHE((" found existing glyph at %d\n", pos)); + x = CACHE_X(pos); + y = CACHE_Y(pos); + } + else { + if (cache->glyphCount < cache->size) { + /* Space remaining; we fill from the start */ + pos = cache->glyphCount; + x = CACHE_X(pos); + y = CACHE_Y(pos); + cache->glyphCount++; + DBG_GLYPH_CACHE((" storing glyph in free space at %d\n", pos)); + + exaGlyphCacheHashInsert(cache, pGlyph, pos); + + } + else { + /* Need to evict an entry. We have to see if any glyphs + * already in the output buffer were at this position in + * the cache + */ + pos = cache->evictionPosition; + x = CACHE_X(pos); + y = CACHE_Y(pos); + DBG_GLYPH_CACHE((" evicting glyph at %d\n", pos)); + if (buffer->count) { + int i; + + for (i = 0; i < buffer->count; i++) { + if (pSrc ? + (buffer->rects[i].xMask == x && + buffer->rects[i].yMask == + y) : (buffer->rects[i].xSrc == x && + buffer->rects[i].ySrc == y)) { + DBG_GLYPH_CACHE((" must flush buffer\n")); + return ExaGlyphNeedFlush; + } + } + } + + /* OK, we're all set, swap in the new glyph */ + exaGlyphCacheHashRemove(cache, pos); + exaGlyphCacheHashInsert(cache, pGlyph, pos); + + /* And pick a new eviction position */ + cache->evictionPosition = rand() % cache->size; + } + + exaGlyphCacheUploadGlyph(pScreen, cache, x, y, pGlyph); + } + + buffer->mask = cache->picture; + + rect = &buffer->rects[buffer->count]; + + if (pSrc) { + rect->xSrc = xSrc; + rect->ySrc = ySrc; + rect->xMask = x; + rect->yMask = y; + } + else { + rect->xSrc = x; + rect->ySrc = y; + rect->xMask = 0; + rect->yMask = 0; + } + + rect->pDst = pDst; + rect->xDst = xDst; + rect->yDst = yDst; + rect->width = pGlyph->info.width; + rect->height = pGlyph->info.height; + + buffer->count++; + + return ExaGlyphSuccess; +} + +#undef CACHE_X +#undef CACHE_Y + +static ExaGlyphCacheResult +exaBufferGlyph(ScreenPtr pScreen, + ExaGlyphBufferPtr buffer, + GlyphPtr pGlyph, + PicturePtr pSrc, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst) +{ + ExaScreenPriv(pScreen); + unsigned int format = (GetGlyphPicture(pGlyph, pScreen))->format; + int width = pGlyph->info.width; + int height = pGlyph->info.height; + ExaCompositeRectPtr rect; + PicturePtr mask; + int i; + + if (buffer->count == GLYPH_BUFFER_SIZE) + return ExaGlyphNeedFlush; + + if (PICT_FORMAT_BPP(format) == 1) + format = PICT_a8; + + for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { + ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; + + if (format == cache->format && + width <= cache->glyphWidth && height <= cache->glyphHeight) { + ExaGlyphCacheResult result = exaGlyphCacheBufferGlyph(pScreen, + &pExaScr-> + glyphCaches + [i], + buffer, + pGlyph, + pSrc, + pDst, + xSrc, ySrc, + xMask, yMask, + xDst, yDst); + + switch (result) { + case ExaGlyphFail: + break; + case ExaGlyphSuccess: + case ExaGlyphNeedFlush: + return result; + } + } + } + + /* Couldn't find the glyph in the cache, use the glyph picture directly */ + + mask = GetGlyphPicture(pGlyph, pScreen); + if (buffer->mask && buffer->mask != mask) + return ExaGlyphNeedFlush; + + buffer->mask = mask; + + rect = &buffer->rects[buffer->count]; + rect->xSrc = xSrc; + rect->ySrc = ySrc; + rect->xMask = xMask; + rect->yMask = yMask; + rect->xDst = xDst; + rect->yDst = yDst; + rect->width = width; + rect->height = height; + + buffer->count++; + + return ExaGlyphSuccess; +} + +static void +exaGlyphsToMask(PicturePtr pMask, ExaGlyphBufferPtr buffer) +{ + exaCompositeRects(PictOpAdd, buffer->mask, NULL, pMask, + buffer->count, buffer->rects); + + buffer->count = 0; + buffer->mask = NULL; +} + +static void +exaGlyphsToDst(PicturePtr pSrc, PicturePtr pDst, ExaGlyphBufferPtr buffer) +{ + exaCompositeRects(PictOpOver, pSrc, buffer->mask, pDst, buffer->count, + buffer->rects); + + buffer->count = 0; + buffer->mask = NULL; +} + +/* Cut and paste from render/glyph.c - probably should export it instead */ +static void +GlyphExtents(int nlist, GlyphListPtr list, GlyphPtr * glyphs, BoxPtr extents) +{ + int x1, x2, y1, y2; + int n; + GlyphPtr glyph; + int x, y; + + x = 0; + y = 0; + extents->x1 = MAXSHORT; + extents->x2 = MINSHORT; + extents->y1 = MAXSHORT; + extents->y2 = MINSHORT; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + list++; + while (n--) { + glyph = *glyphs++; + x1 = x - glyph->info.x; + if (x1 < MINSHORT) + x1 = MINSHORT; + y1 = y - glyph->info.y; + if (y1 < MINSHORT) + y1 = MINSHORT; + x2 = x1 + glyph->info.width; + if (x2 > MAXSHORT) + x2 = MAXSHORT; + y2 = y1 + glyph->info.height; + if (y2 > MAXSHORT) + y2 = MAXSHORT; + if (x1 < extents->x1) + extents->x1 = x1; + if (x2 > extents->x2) + extents->x2 = x2; + if (y1 < extents->y1) + extents->y1 = y1; + if (y2 > extents->y2) + extents->y2 = y2; + x += glyph->info.xOff; + y += glyph->info.yOff; + } + } +} + +void +exaGlyphs(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) +{ + PixmapPtr pMaskPixmap = 0; + PicturePtr pMask = NULL; + ScreenPtr pScreen = pDst->pDrawable->pScreen; + int width = 0, height = 0; + int x, y; + int first_xOff = list->xOff, first_yOff = list->yOff; + int n; + GlyphPtr glyph; + int error; + BoxRec extents = { 0, 0, 0, 0 }; + CARD32 component_alpha; + ExaGlyphBuffer buffer; + + if (maskFormat) { + ExaScreenPriv(pScreen); + GCPtr pGC; + xRectangle rect; + + GlyphExtents(nlist, list, glyphs, &extents); + + if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1) + return; + width = extents.x2 - extents.x1; + height = extents.y2 - extents.y1; + + if (maskFormat->depth == 1) { + PictFormatPtr a8Format = PictureMatchFormat(pScreen, 8, PICT_a8); + + if (a8Format) + maskFormat = a8Format; + } + + pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pMaskPixmap) + return; + component_alpha = NeedsComponent(maskFormat->format); + pMask = CreatePicture(0, &pMaskPixmap->drawable, + maskFormat, CPComponentAlpha, &component_alpha, + serverClient, &error); + if (!pMask || + (!component_alpha && pExaScr->info->CheckComposite && + !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask))) + { + PictFormatPtr argbFormat; + + (*pScreen->DestroyPixmap) (pMaskPixmap); + + if (!pMask) + return; + + /* The driver can't seem to composite to a8, let's try argb (but + * without component-alpha) */ + FreePicture((pointer) pMask, (XID) 0); + + argbFormat = PictureMatchFormat(pScreen, 32, PICT_a8r8g8b8); + + if (argbFormat) + maskFormat = argbFormat; + + pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); + if (!pMaskPixmap) + return; + + pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, 0, 0, + serverClient, &error); + if (!pMask) { + (*pScreen->DestroyPixmap) (pMaskPixmap); + return; + } + } + pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen); + ValidateGC(&pMaskPixmap->drawable, pGC); + rect.x = 0; + rect.y = 0; + rect.width = width; + rect.height = height; + (*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect); + FreeScratchGC(pGC); + x = -extents.x1; + y = -extents.y1; + } + else { + x = 0; + y = 0; + } + buffer.count = 0; + buffer.mask = NULL; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + while (n--) { + glyph = *glyphs++; + + if (glyph->info.width > 0 && glyph->info.height > 0) { + /* pGlyph->info.{x,y} compensate for empty space in the glyph. */ + if (maskFormat) { + if (exaBufferGlyph(pScreen, &buffer, glyph, NULL, pMask, + 0, 0, 0, 0, x - glyph->info.x, + y - glyph->info.y) == + ExaGlyphNeedFlush) { + exaGlyphsToMask(pMask, &buffer); + exaBufferGlyph(pScreen, &buffer, glyph, NULL, pMask, + 0, 0, 0, 0, x - glyph->info.x, + y - glyph->info.y); + } + } + else { + if (exaBufferGlyph(pScreen, &buffer, glyph, pSrc, pDst, + xSrc + (x - glyph->info.x) - first_xOff, + ySrc + (y - glyph->info.y) - first_yOff, + 0, 0, x - glyph->info.x, + y - glyph->info.y) + == ExaGlyphNeedFlush) { + exaGlyphsToDst(pSrc, pDst, &buffer); + exaBufferGlyph(pScreen, &buffer, glyph, pSrc, pDst, + xSrc + (x - glyph->info.x) - first_xOff, + ySrc + (y - glyph->info.y) - first_yOff, + 0, 0, x - glyph->info.x, + y - glyph->info.y); + } + } + } + + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + } + + if (buffer.count) { + if (maskFormat) + exaGlyphsToMask(pMask, &buffer); + else + exaGlyphsToDst(pSrc, pDst, &buffer); + } + + if (maskFormat) { + x = extents.x1; + y = extents.y1; + CompositePicture(op, + pSrc, + pMask, + pDst, + xSrc + x - first_xOff, + ySrc + y - first_yOff, 0, 0, x, y, width, height); + FreePicture((pointer) pMask, (XID) 0); + (*pScreen->DestroyPixmap) (pMaskPixmap); + } +} diff --git a/exa/exa_migration_classic.c b/exa/exa_migration_classic.c new file mode 100644 index 0000000..e890f67 --- /dev/null +++ b/exa/exa_migration_classic.c @@ -0,0 +1,761 @@ +/* + * Copyright © 2006 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Authors: + * Eric Anholt + * Michel Dänzer + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +#if DEBUG_MIGRATE +#define DBG_MIGRATE(a) ErrorF a +#else +#define DBG_MIGRATE(a) +#endif + +/** + * The fallback path for UTS/DFS failing is to just memcpy. exaCopyDirtyToSys + * and exaCopyDirtyToFb both needed to do this loop. + */ +static void +exaMemcpyBox(PixmapPtr pPixmap, BoxPtr pbox, CARD8 *src, int src_pitch, + CARD8 *dst, int dst_pitch) +{ + int i, cpp = pPixmap->drawable.bitsPerPixel / 8; + int bytes = (pbox->x2 - pbox->x1) * cpp; + + src += pbox->y1 * src_pitch + pbox->x1 * cpp; + dst += pbox->y1 * dst_pitch + pbox->x1 * cpp; + + for (i = pbox->y2 - pbox->y1; i; i--) { + memcpy(dst, src, bytes); + src += src_pitch; + dst += dst_pitch; + } +} + +/** + * Returns TRUE if the pixmap is dirty (has been modified in its current + * location compared to the other), or lacks a private for tracking + * dirtiness. + */ +static Bool +exaPixmapIsDirty(PixmapPtr pPix) +{ + ExaPixmapPriv(pPix); + + if (pExaPixmap == NULL) + EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsDirty was called on a non-exa pixmap.\n"), TRUE); + + if (!pExaPixmap->pDamage) + return FALSE; + + return RegionNotEmpty(DamageRegion(pExaPixmap->pDamage)) || + !RegionEqual(&pExaPixmap->validSys, &pExaPixmap->validFB); +} + +/** + * Returns TRUE if the pixmap is either pinned in FB, or has a sufficient score + * to be considered "should be in framebuffer". That's just anything that has + * had more acceleration than fallbacks, or has no score yet. + * + * Only valid if using a migration scheme that tracks score. + */ +static Bool +exaPixmapShouldBeInFB(PixmapPtr pPix) +{ + ExaPixmapPriv(pPix); + + if (exaPixmapIsPinned(pPix)) + return TRUE; + + return pExaPixmap->score >= 0; +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * FB to system or vice versa. Both areas must be allocated. + */ +static void +exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, + Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h, + char *sys, int sys_pitch), int fallback_index, + void (*sync) (ScreenPtr pScreen)) +{ + PixmapPtr pPixmap = migrate->pPix; + + ExaPixmapPriv(pPixmap); + RegionPtr damage = DamageRegion(pExaPixmap->pDamage); + RegionRec CopyReg; + Bool save_use_gpu_copy; + int save_pitch; + BoxPtr pBox; + int nbox; + Bool access_prepared = FALSE; + Bool need_sync = FALSE; + + /* Damaged bits are valid in current copy but invalid in other one */ + if (pExaPixmap->use_gpu_copy) { + RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB, damage); + RegionSubtract(&pExaPixmap->validSys, &pExaPixmap->validSys, damage); + } + else { + RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys, damage); + RegionSubtract(&pExaPixmap->validFB, &pExaPixmap->validFB, damage); + } + + RegionEmpty(damage); + + /* Copy bits valid in source but not in destination */ + RegionNull(&CopyReg); + RegionSubtract(&CopyReg, pValidSrc, pValidDst); + + if (migrate->as_dst) { + ExaScreenPriv(pPixmap->drawable.pScreen); + + /* XXX: The pending damage region will be marked as damaged after the + * operation, so it should serve as an upper bound for the region that + * needs to be synchronized for the operation. Unfortunately, this + * causes corruption in some cases, e.g. when starting compiz. See + * https://bugs.freedesktop.org/show_bug.cgi?id=12916 . + */ + if (pExaScr->optimize_migration) { + RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); + +#if DEBUG_MIGRATE + if (RegionNil(pending_damage)) { + static Bool firsttime = TRUE; + + if (firsttime) { + ErrorF("%s: Pending damage region empty!\n", __func__); + firsttime = FALSE; + } + } +#endif + + /* Try to prevent destination valid region from growing too many + * rects by filling it up to the extents of the union of the + * destination valid region and the pending damage region. + */ + if (RegionNumRects(pValidDst) > 10) { + BoxRec box; + BoxPtr pValidExt, pDamageExt; + RegionRec closure; + + pValidExt = RegionExtents(pValidDst); + pDamageExt = RegionExtents(pending_damage); + + box.x1 = min(pValidExt->x1, pDamageExt->x1); + box.y1 = min(pValidExt->y1, pDamageExt->y1); + box.x2 = max(pValidExt->x2, pDamageExt->x2); + box.y2 = max(pValidExt->y2, pDamageExt->y2); + + RegionInit(&closure, &box, 0); + RegionIntersect(&CopyReg, &CopyReg, &closure); + } + else + RegionIntersect(&CopyReg, &CopyReg, pending_damage); + } + + /* The caller may provide a region to be subtracted from the calculated + * dirty region. This is to avoid migration of bits that don't + * contribute to the result of the operation. + */ + if (migrate->pReg) + RegionSubtract(&CopyReg, &CopyReg, migrate->pReg); + } + else { + /* The caller may restrict the region to be migrated for source pixmaps + * to what's relevant for the operation. + */ + if (migrate->pReg) + RegionIntersect(&CopyReg, &CopyReg, migrate->pReg); + } + + pBox = RegionRects(&CopyReg); + nbox = RegionNumRects(&CopyReg); + + save_use_gpu_copy = pExaPixmap->use_gpu_copy; + save_pitch = pPixmap->devKind; + pExaPixmap->use_gpu_copy = TRUE; + pPixmap->devKind = pExaPixmap->fb_pitch; + + while (nbox--) { + pBox->x1 = max(pBox->x1, 0); + pBox->y1 = max(pBox->y1, 0); + pBox->x2 = min(pBox->x2, pPixmap->drawable.width); + pBox->y2 = min(pBox->y2, pPixmap->drawable.height); + + if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) + continue; + + if (!transfer || !transfer(pPixmap, + pBox->x1, pBox->y1, + pBox->x2 - pBox->x1, + pBox->y2 - pBox->y1, + (char *) (pExaPixmap->sys_ptr + + pBox->y1 * pExaPixmap->sys_pitch + + + pBox->x1 * + pPixmap->drawable.bitsPerPixel / + 8), pExaPixmap->sys_pitch)) { + if (!access_prepared) { + ExaDoPrepareAccess(pPixmap, fallback_index); + access_prepared = TRUE; + } + if (fallback_index == EXA_PREPARE_DEST) { + exaMemcpyBox(pPixmap, pBox, + pExaPixmap->sys_ptr, pExaPixmap->sys_pitch, + pPixmap->devPrivate.ptr, pPixmap->devKind); + } + else { + exaMemcpyBox(pPixmap, pBox, + pPixmap->devPrivate.ptr, pPixmap->devKind, + pExaPixmap->sys_ptr, pExaPixmap->sys_pitch); + } + } + else + need_sync = TRUE; + + pBox++; + } + + pExaPixmap->use_gpu_copy = save_use_gpu_copy; + pPixmap->devKind = save_pitch; + + /* Try to prevent source valid region from growing too many rects by + * removing parts of it which are also in the destination valid region. + * Removing anything beyond that would lead to data loss. + */ + if (RegionNumRects(pValidSrc) > 20) + RegionSubtract(pValidSrc, pValidSrc, pValidDst); + + /* The copied bits are now valid in destination */ + RegionUnion(pValidDst, pValidDst, &CopyReg); + + RegionUninit(&CopyReg); + + if (access_prepared) + exaFinishAccess(&pPixmap->drawable, fallback_index); + else if (need_sync && sync) + sync(pPixmap->drawable.pScreen); +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * the framebuffer memory copy to the system memory copy. Both areas must be + * allocated. + */ +void +exaCopyDirtyToSys(ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + + ExaScreenPriv(pPixmap->drawable.pScreen); + ExaPixmapPriv(pPixmap); + + exaCopyDirty(migrate, &pExaPixmap->validSys, &pExaPixmap->validFB, + pExaScr->info->DownloadFromScreen, EXA_PREPARE_SRC, + exaWaitSync); +} + +/** + * If the pixmap is currently dirty, this copies at least the dirty area from + * the system memory copy to the framebuffer memory copy. Both areas must be + * allocated. + */ +void +exaCopyDirtyToFb(ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + + ExaScreenPriv(pPixmap->drawable.pScreen); + ExaPixmapPriv(pPixmap); + + exaCopyDirty(migrate, &pExaPixmap->validFB, &pExaPixmap->validSys, + pExaScr->info->UploadToScreen, EXA_PREPARE_DEST, NULL); +} + +/** + * Allocates a framebuffer copy of the pixmap if necessary, and then copies + * any necessary pixmap data into the framebuffer copy and points the pixmap at + * it. + * + * Note that when first allocated, a pixmap will have FALSE dirty flag. + * This is intentional because pixmap data starts out undefined. So if we move + * it in due to the first operation against it being accelerated, it will have + * undefined framebuffer contents that we didn't have to upload. If we do + * moveouts (and moveins) after the first movein, then we will only have to copy + * back and forth if the pixmap was written to after the last synchronization of + * the two copies. Then, at exaPixmapSave (when the framebuffer copy goes away) + * we mark the pixmap dirty, so that the next exaMoveInPixmap will actually move + * all the data, since it's almost surely all valid now. + */ +static void +exaDoMoveInPixmap(ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + + /* If we're VT-switched away, no touching card memory allowed. */ + if (pExaScr->swappedOut) + return; + + /* If we're not allowed to move, then fail. */ + if (exaPixmapIsPinned(pPixmap)) + return; + + /* Don't migrate in pixmaps which are less than 8bpp. This avoids a lot of + * fragility in EXA, and <8bpp is probably not used enough any more to care + * (at least, not in acceleratd paths). + */ + if (pPixmap->drawable.bitsPerPixel < 8) + return; + + if (pExaPixmap->accel_blocked) + return; + + if (pExaPixmap->area == NULL) { + pExaPixmap->area = + exaOffscreenAlloc(pScreen, pExaPixmap->fb_size, + pExaScr->info->pixmapOffsetAlign, FALSE, + exaPixmapSave, (pointer) pPixmap); + if (pExaPixmap->area == NULL) + return; + + pExaPixmap->fb_ptr = (CARD8 *) pExaScr->info->memoryBase + + pExaPixmap->area->offset; + } + + exaCopyDirtyToFb(migrate); + + if (exaPixmapHasGpuCopy(pPixmap)) + return; + + DBG_MIGRATE(("-> %p (0x%x) (%dx%d) (%c)\n", pPixmap, + (ExaGetPixmapPriv(pPixmap)->area ? + ExaGetPixmapPriv(pPixmap)->area->offset : 0), + pPixmap->drawable.width, + pPixmap->drawable.height, + exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); + + pExaPixmap->use_gpu_copy = TRUE; + + pPixmap->devKind = pExaPixmap->fb_pitch; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; +} + +void +exaMoveInPixmap_classic(PixmapPtr pPixmap) +{ + static ExaMigrationRec migrate = {.as_dst = FALSE,.as_src = TRUE, + .pReg = NULL + }; + + migrate.pPix = pPixmap; + exaDoMoveInPixmap(&migrate); +} + +/** + * Switches the current active location of the pixmap to system memory, copying + * updated data out if necessary. + */ +static void +exaDoMoveOutPixmap(ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + + ExaPixmapPriv(pPixmap); + + if (!pExaPixmap->area || exaPixmapIsPinned(pPixmap)) + return; + + exaCopyDirtyToSys(migrate); + + if (exaPixmapHasGpuCopy(pPixmap)) { + + DBG_MIGRATE(("<- %p (%p) (%dx%d) (%c)\n", pPixmap, + (void *) (ExaGetPixmapPriv(pPixmap)->area ? + ExaGetPixmapPriv(pPixmap)->area->offset : 0), + pPixmap->drawable.width, + pPixmap->drawable.height, + exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); + + pExaPixmap->use_gpu_copy = FALSE; + + pPixmap->devKind = pExaPixmap->sys_pitch; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } +} + +void +exaMoveOutPixmap_classic(PixmapPtr pPixmap) +{ + static ExaMigrationRec migrate = {.as_dst = FALSE,.as_src = TRUE, + .pReg = NULL + }; + + migrate.pPix = pPixmap; + exaDoMoveOutPixmap(&migrate); +} + +/** + * Copies out important pixmap data and removes references to framebuffer area. + * Called when the memory manager decides it's time to kick the pixmap out of + * framebuffer entirely. + */ +void +exaPixmapSave(ScreenPtr pScreen, ExaOffscreenArea * area) +{ + PixmapPtr pPixmap = area->privData; + + ExaPixmapPriv(pPixmap); + + exaMoveOutPixmap(pPixmap); + + pExaPixmap->fb_ptr = NULL; + pExaPixmap->area = NULL; + + /* Mark all FB bits as invalid, so all valid system bits get copied to FB + * next time */ + RegionEmpty(&pExaPixmap->validFB); +} + +/** + * For the "greedy" migration scheme, pushes the pixmap toward being located in + * framebuffer memory. + */ +static void +exaMigrateTowardFb(ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + + ExaPixmapPriv(pPixmap); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) { + DBG_MIGRATE(("UseScreen: not migrating pinned pixmap %p\n", + (pointer) pPixmap)); + return; + } + + DBG_MIGRATE(("UseScreen %p score %d\n", + (pointer) pPixmap, pExaPixmap->score)); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) { + exaDoMoveInPixmap(migrate); + pExaPixmap->score = 0; + } + + if (pExaPixmap->score < EXA_PIXMAP_SCORE_MAX) + pExaPixmap->score++; + + if (pExaPixmap->score >= EXA_PIXMAP_SCORE_MOVE_IN && + !exaPixmapHasGpuCopy(pPixmap)) { + exaDoMoveInPixmap(migrate); + } + + if (exaPixmapHasGpuCopy(pPixmap)) { + exaCopyDirtyToFb(migrate); + ExaOffscreenMarkUsed(pPixmap); + } + else + exaCopyDirtyToSys(migrate); +} + +/** + * For the "greedy" migration scheme, pushes the pixmap toward being located in + * system memory. + */ +static void +exaMigrateTowardSys(ExaMigrationPtr migrate) +{ + PixmapPtr pPixmap = migrate->pPix; + + ExaPixmapPriv(pPixmap); + + DBG_MIGRATE(("UseMem: %p score %d\n", (pointer) pPixmap, + pExaPixmap->score)); + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) + return; + + if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) + pExaPixmap->score = 0; + + if (pExaPixmap->score > EXA_PIXMAP_SCORE_MIN) + pExaPixmap->score--; + + if (pExaPixmap->score <= EXA_PIXMAP_SCORE_MOVE_OUT && pExaPixmap->area) + exaDoMoveOutPixmap(migrate); + + if (exaPixmapHasGpuCopy(pPixmap)) { + exaCopyDirtyToFb(migrate); + ExaOffscreenMarkUsed(pPixmap); + } + else + exaCopyDirtyToSys(migrate); +} + +/** + * If the pixmap has both a framebuffer and system memory copy, this function + * asserts that both of them are the same. + */ +static Bool +exaAssertNotDirty(PixmapPtr pPixmap) +{ + ExaPixmapPriv(pPixmap); + CARD8 *dst, *src; + RegionRec ValidReg; + int dst_pitch, src_pitch, cpp, y, nbox, save_pitch; + BoxPtr pBox; + Bool ret = TRUE, save_use_gpu_copy; + + if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL) + return ret; + + RegionNull(&ValidReg); + RegionIntersect(&ValidReg, &pExaPixmap->validFB, &pExaPixmap->validSys); + nbox = RegionNumRects(&ValidReg); + + if (!nbox) + goto out; + + pBox = RegionRects(&ValidReg); + + dst_pitch = pExaPixmap->sys_pitch; + src_pitch = pExaPixmap->fb_pitch; + cpp = pPixmap->drawable.bitsPerPixel / 8; + + save_use_gpu_copy = pExaPixmap->use_gpu_copy; + save_pitch = pPixmap->devKind; + pExaPixmap->use_gpu_copy = TRUE; + pPixmap->devKind = pExaPixmap->fb_pitch; + + if (!ExaDoPrepareAccess(pPixmap, EXA_PREPARE_SRC)) + goto skip; + + while (nbox--) { + int rowbytes; + + pBox->x1 = max(pBox->x1, 0); + pBox->y1 = max(pBox->y1, 0); + pBox->x2 = min(pBox->x2, pPixmap->drawable.width); + pBox->y2 = min(pBox->y2, pPixmap->drawable.height); + + if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) + continue; + + rowbytes = (pBox->x2 - pBox->x1) * cpp; + src = + (CARD8 *) pPixmap->devPrivate.ptr + pBox->y1 * src_pitch + + pBox->x1 * cpp; + dst = pExaPixmap->sys_ptr + pBox->y1 * dst_pitch + pBox->x1 * cpp; + + for (y = pBox->y1; y < pBox->y2; + y++, src += src_pitch, dst += dst_pitch) { + if (memcmp(dst, src, rowbytes) != 0) { + ret = FALSE; + exaPixmapDirty(pPixmap, pBox->x1, pBox->y1, pBox->x2, pBox->y2); + break; + } + } + } + + skip: + exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); + + pExaPixmap->use_gpu_copy = save_use_gpu_copy; + pPixmap->devKind = save_pitch; + + out: + RegionUninit(&ValidReg); + return ret; +} + +/** + * Performs migration of the pixmaps according to the operation information + * provided in pixmaps and can_accel and the migration scheme chosen in the + * config file. + */ +void +exaDoMigration_classic(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) +{ + ScreenPtr pScreen = pixmaps[0].pPix->drawable.pScreen; + + ExaScreenPriv(pScreen); + int i, j; + + /* If this debugging flag is set, check each pixmap for whether it is marked + * as clean, and if so, actually check if that's the case. This should help + * catch issues with failing to mark a drawable as dirty. While it will + * catch them late (after the operation happened), it at least explains what + * went wrong, and instrumenting the code to find what operation happened + * to the pixmap last shouldn't be hard. + */ + if (pExaScr->checkDirtyCorrectness) { + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsDirty(pixmaps[i].pPix) && + !exaAssertNotDirty(pixmaps[i].pPix)) + ErrorF("%s: Pixmap %d dirty but not marked as such!\n", + __func__, i); + } + } + /* If anything is pinned in system memory, we won't be able to + * accelerate. + */ + for (i = 0; i < npixmaps; i++) { + if (exaPixmapIsPinned(pixmaps[i].pPix) && + !exaPixmapHasGpuCopy(pixmaps[i].pPix)) { + EXA_FALLBACK(("Pixmap %p (%dx%d) pinned in sys\n", pixmaps[i].pPix, + pixmaps[i].pPix->drawable.width, + pixmaps[i].pPix->drawable.height)); + can_accel = FALSE; + break; + } + } + + if (pExaScr->migration == ExaMigrationSmart) { + /* If we've got something as a destination that we shouldn't cause to + * become newly dirtied, take the unaccelerated route. + */ + for (i = 0; i < npixmaps; i++) { + if (pixmaps[i].as_dst && !exaPixmapShouldBeInFB(pixmaps[i].pPix) && + !exaPixmapIsDirty(pixmaps[i].pPix)) { + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapIsDirty(pixmaps[i].pPix)) + exaDoMoveOutPixmap(pixmaps + i); + } + return; + } + } + + /* If we aren't going to accelerate, then we migrate everybody toward + * system memory, and kick out if it's free. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) { + exaMigrateTowardSys(pixmaps + i); + if (!exaPixmapIsDirty(pixmaps[i].pPix)) + exaDoMoveOutPixmap(pixmaps + i); + } + return; + } + + /* Finally, the acceleration path. Move them all in. */ + for (i = 0; i < npixmaps; i++) { + exaMigrateTowardFb(pixmaps + i); + exaDoMoveInPixmap(pixmaps + i); + } + } + else if (pExaScr->migration == ExaMigrationGreedy) { + /* If we can't accelerate, either because the driver can't or because one of + * the pixmaps is pinned in system memory, then we migrate everybody toward + * system memory. + * + * We also migrate toward system if all pixmaps involved are currently in + * system memory -- this can mitigate thrashing when there are significantly + * more pixmaps active than would fit in memory. + * + * If not, then we migrate toward FB so that hopefully acceleration can + * happen. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) + exaMigrateTowardSys(pixmaps + i); + return; + } + + for (i = 0; i < npixmaps; i++) { + if (exaPixmapHasGpuCopy(pixmaps[i].pPix)) { + /* Found one in FB, so move all to FB. */ + for (j = 0; j < npixmaps; j++) + exaMigrateTowardFb(pixmaps + i); + return; + } + } + + /* Nobody's in FB, so move all away from FB. */ + for (i = 0; i < npixmaps; i++) + exaMigrateTowardSys(pixmaps + i); + } + else if (pExaScr->migration == ExaMigrationAlways) { + /* Always move the pixmaps out if we can't accelerate. If we can + * accelerate, try to move them all in. If that fails, then move them + * back out. + */ + if (!can_accel) { + for (i = 0; i < npixmaps; i++) + exaDoMoveOutPixmap(pixmaps + i); + return; + } + + /* Now, try to move them all into FB */ + for (i = 0; i < npixmaps; i++) { + exaDoMoveInPixmap(pixmaps + i); + } + + /* If we couldn't fit everything in, abort */ + for (i = 0; i < npixmaps; i++) { + if (!exaPixmapHasGpuCopy(pixmaps[i].pPix)) { + return; + } + } + + /* Yay, everything has a gpu copy, mark memory as used */ + for (i = 0; i < npixmaps; i++) { + ExaOffscreenMarkUsed(pixmaps[i].pPix); + } + } +} + +void +exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg) +{ + ExaMigrationRec pixmaps[1]; + + if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) { + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + } + else { + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + } + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = pReg; + + exaDoMigration(pixmaps, 1, FALSE); + + (void) ExaDoPrepareAccess(pPixmap, index); +} diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c new file mode 100644 index 0000000..cf66327 --- /dev/null +++ b/exa/exa_migration_mixed.c @@ -0,0 +1,270 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +void +exaCreateDriverPixmap_mixed(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + int w = pPixmap->drawable.width, h = pPixmap->drawable.height; + int depth = pPixmap->drawable.depth, bpp = pPixmap->drawable.bitsPerPixel; + int usage_hint = pPixmap->usage_hint; + int paddedWidth = pExaPixmap->sys_pitch; + + /* Already done. */ + if (pExaPixmap->driverPriv) + return; + + if (exaPixmapIsPinned(pPixmap)) + return; + + /* Can't accel 1/4 bpp. */ + if (pExaPixmap->accel_blocked || bpp < 8) + return; + + if (pExaScr->info->CreatePixmap2) { + int new_pitch = 0; + + pExaPixmap->driverPriv = + pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, + &new_pitch); + paddedWidth = pExaPixmap->fb_pitch = new_pitch; + } + else { + if (paddedWidth < pExaPixmap->fb_pitch) + paddedWidth = pExaPixmap->fb_pitch; + pExaPixmap->driverPriv = + pExaScr->info->CreatePixmap(pScreen, paddedWidth * h, 0); + } + + if (!pExaPixmap->driverPriv) + return; + + (*pScreen->ModifyPixmapHeader) (pPixmap, w, h, 0, 0, paddedWidth, NULL); +} + +void +exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) +{ + int i; + + /* If anything is pinned in system memory, we won't be able to + * accelerate. + */ + for (i = 0; i < npixmaps; i++) { + if (exaPixmapIsPinned(pixmaps[i].pPix) && + !exaPixmapHasGpuCopy(pixmaps[i].pPix)) { + can_accel = FALSE; + break; + } + } + + /* We can do nothing. */ + if (!can_accel) + return; + + for (i = 0; i < npixmaps; i++) { + PixmapPtr pPixmap = pixmaps[i].pPix; + + ExaPixmapPriv(pPixmap); + + if (!pExaPixmap->driverPriv) + exaCreateDriverPixmap_mixed(pPixmap); + + if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) { + ExaScreenPriv(pPixmap->drawable.pScreen); + + /* This pitch is needed for proper acceleration. For some reason + * there are pixmaps without pDamage and a bad fb_pitch value. + * So setting devKind when only exaPixmapHasGpuCopy() is true + * causes corruption. Pixmaps without pDamage are not migrated + * and should have a valid devKind at all times, so that's why this + * isn't causing problems. Pixmaps have their gpu pitch set the + * first time in the MPH call from exaCreateDriverPixmap_mixed(). + */ + pPixmap->devKind = pExaPixmap->fb_pitch; + exaCopyDirtyToFb(pixmaps + i); + + if (pExaScr->deferred_mixed_pixmap == pPixmap && + !pixmaps[i].as_dst && !pixmaps[i].pReg) + pExaScr->deferred_mixed_pixmap = NULL; + } + + pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap); + } +} + +void +exaMoveInPixmap_mixed(PixmapPtr pPixmap) +{ + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = NULL; + + exaDoMigration(pixmaps, 1, TRUE); +} + +void +exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure) +{ + PixmapPtr pPixmap = closure; + + ExaPixmapPriv(pPixmap); + + /* Move back results of software rendering on system memory copy of mixed driver + * pixmap (see exaPrepareAccessReg_mixed). + * + * Defer moving the destination back into the driver pixmap, to try and save + * overhead on multiple subsequent software fallbacks. + */ + if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) { + ExaScreenPriv(pPixmap->drawable.pScreen); + + if (pExaScr->deferred_mixed_pixmap && + pExaScr->deferred_mixed_pixmap != pPixmap) + exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap); + pExaScr->deferred_mixed_pixmap = pPixmap; + } +} + +/* With mixed pixmaps, if we fail to get direct access to the driver pixmap, we + * use the DownloadFromScreen hook to retrieve contents to a copy in system + * memory, perform software rendering on that and move back the results with the + * UploadToScreen hook (see exaDamageReport_mixed). + */ +void +exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg) +{ + ExaPixmapPriv(pPixmap); + Bool has_gpu_copy = exaPixmapHasGpuCopy(pPixmap); + Bool success; + + success = ExaDoPrepareAccess(pPixmap, index); + + if (success && has_gpu_copy && pExaPixmap->pDamage) { + /* You cannot do accelerated operations while a buffer is mapped. */ + exaFinishAccess(&pPixmap->drawable, index); + /* Update the gpu view of both deferred destination pixmaps and of + * source pixmaps that were migrated with a bounding region. + */ + exaMoveInPixmap_mixed(pPixmap); + success = ExaDoPrepareAccess(pPixmap, index); + + if (success) { + /* We have a gpu pixmap that can be accessed, we don't need the cpu + * copy anymore. Drivers that prefer DFS, should fail prepare + * access. + */ + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; + + free(pExaPixmap->sys_ptr); + pExaPixmap->sys_ptr = NULL; + + return; + } + } + + if (!success) { + ExaMigrationRec pixmaps[1]; + + /* Do we need to allocate our system buffer? */ + if (!pExaPixmap->sys_ptr) { + pExaPixmap->sys_ptr = malloc(pExaPixmap->sys_pitch * + pPixmap->drawable.height); + if (!pExaPixmap->sys_ptr) + FatalError("EXA: malloc failed for size %d bytes\n", + pExaPixmap->sys_pitch * pPixmap->drawable.height); + } + + if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) { + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + } + else { + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + } + pixmaps[0].pPix = pPixmap; + pixmaps[0].pReg = pReg; + + if (!pExaPixmap->pDamage && + (has_gpu_copy || !exaPixmapIsPinned(pPixmap))) { + Bool as_dst = pixmaps[0].as_dst; + + /* Set up damage tracking */ + pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL, + DamageReportNonEmpty, TRUE, + pPixmap->drawable.pScreen, + pPixmap); + + if (pExaPixmap->pDamage) { + DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage); + /* This ensures that pending damage reflects the current + * operation. This is used by exa to optimize migration. + */ + DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); + } + + if (has_gpu_copy) { + exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width, + pPixmap->drawable.height); + + /* We don't know which region of the destination will be damaged, + * have to assume all of it + */ + if (as_dst) { + pixmaps[0].as_dst = FALSE; + pixmaps[0].as_src = TRUE; + pixmaps[0].pReg = NULL; + } + exaCopyDirtyToSys(pixmaps); + } + + if (as_dst) + exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width, + pPixmap->drawable.height); + } + else if (has_gpu_copy) + exaCopyDirtyToSys(pixmaps); + + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + pPixmap->devKind = pExaPixmap->sys_pitch; + pExaPixmap->use_gpu_copy = FALSE; + } +} diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c new file mode 100644 index 0000000..b43dfec --- /dev/null +++ b/exa/exa_mixed.c @@ -0,0 +1,330 @@ +/* + * Copyright © 2009 Maarten Maathuis + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" +#include "exa.h" + +/* This file holds the driver allocated pixmaps + better initial placement code. + */ + +static _X_INLINE void * +ExaGetPixmapAddress(PixmapPtr p) +{ + ExaPixmapPriv(p); + + return pExaPixmap->sys_ptr; +} + +/** + * exaCreatePixmap() creates a new pixmap. + */ +PixmapPtr +exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + ExaPixmapPrivPtr pExaPixmap; + int bpp; + size_t paddedWidth; + + ExaScreenPriv(pScreen); + + if (w > 32767 || h > 32767) + return NullPixmap; + + swap(pExaScr, pScreen, CreatePixmap); + pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint); + swap(pExaScr, pScreen, CreatePixmap); + + if (!pPixmap) + return NULL; + + pExaPixmap = ExaGetPixmapPriv(pPixmap); + pExaPixmap->driverPriv = NULL; + + bpp = pPixmap->drawable.bitsPerPixel; + + paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); + if (paddedWidth / 4 > 32767 || h > 32767) + return NullPixmap; + + /* We will allocate the system pixmap later if needed. */ + pPixmap->devPrivate.ptr = NULL; + pExaPixmap->sys_ptr = NULL; + pExaPixmap->sys_pitch = paddedWidth; + + pExaPixmap->area = NULL; + pExaPixmap->fb_ptr = NULL; + pExaPixmap->pDamage = NULL; + + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); + exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); + + (*pScreen->ModifyPixmapHeader) (pPixmap, w, h, 0, 0, paddedWidth, NULL); + + /* A scratch pixmap will become a driver pixmap right away. */ + if (!w || !h) { + exaCreateDriverPixmap_mixed(pPixmap); + pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap); + } + else { + pExaPixmap->use_gpu_copy = FALSE; + + if (w == 1 && h == 1) { + pExaPixmap->sys_ptr = malloc(paddedWidth); + + /* Set up damage tracking */ + pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL, + DamageReportNonEmpty, TRUE, + pPixmap->drawable.pScreen, + pPixmap); + + if (pExaPixmap->pDamage) { + DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage); + /* This ensures that pending damage reflects the current + * operation. This is used by exa to optimize migration. + */ + DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); + } + } + } + + /* During a fallback we must prepare access. */ + if (pExaScr->fallback_counter) + exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); + + return pPixmap; +} + +Bool +exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData) +{ + ScreenPtr pScreen; + ExaScreenPrivPtr pExaScr; + ExaPixmapPrivPtr pExaPixmap; + Bool ret, has_gpu_copy; + + if (!pPixmap) + return FALSE; + + pScreen = pPixmap->drawable.pScreen; + pExaScr = ExaGetScreenPriv(pScreen); + pExaPixmap = ExaGetPixmapPriv(pPixmap); + + if (pPixData) { + if (pExaPixmap->driverPriv) { + if (pExaPixmap->pDamage) { + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; + } + + pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); + pExaPixmap->driverPriv = NULL; + } + + pExaPixmap->use_gpu_copy = FALSE; + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + } + + has_gpu_copy = exaPixmapHasGpuCopy(pPixmap); + + if (width <= 0) + width = pPixmap->drawable.width; + + if (height <= 0) + height = pPixmap->drawable.height; + + if (bitsPerPixel <= 0) { + if (depth <= 0) + bitsPerPixel = pPixmap->drawable.bitsPerPixel; + else + bitsPerPixel = BitsPerPixel(depth); + } + + if (depth <= 0) + depth = pPixmap->drawable.depth; + + if (width != pPixmap->drawable.width || + height != pPixmap->drawable.height || + depth != pPixmap->drawable.depth || + bitsPerPixel != pPixmap->drawable.bitsPerPixel) { + if (pExaPixmap->driverPriv) { + if (devKind > 0) + pExaPixmap->fb_pitch = devKind; + else + exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, width, height, bitsPerPixel); + RegionEmpty(&pExaPixmap->validFB); + } + + /* Need to re-create system copy if there's also a GPU copy */ + if (has_gpu_copy) { + if (pExaPixmap->sys_ptr) { + free(pExaPixmap->sys_ptr); + pExaPixmap->sys_ptr = NULL; + DamageDestroy(pExaPixmap->pDamage); + pExaPixmap->pDamage = NULL; + RegionEmpty(&pExaPixmap->validSys); + + if (pExaScr->deferred_mixed_pixmap == pPixmap) + pExaScr->deferred_mixed_pixmap = NULL; + } + + pExaPixmap->sys_pitch = PixmapBytePad(width, depth); + } + } + + if (has_gpu_copy) { + pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; + pPixmap->devKind = pExaPixmap->fb_pitch; + } + else { + pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; + pPixmap->devKind = pExaPixmap->sys_pitch; + } + + /* Only pass driver pixmaps to the driver. */ + if (pExaScr->info->ModifyPixmapHeader && pExaPixmap->driverPriv) { + ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, + pPixData); + if (ret == TRUE) + goto out; + } + + swap(pExaScr, pScreen, ModifyPixmapHeader); + ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, + bitsPerPixel, devKind, pPixData); + swap(pExaScr, pScreen, ModifyPixmapHeader); + + out: + if (has_gpu_copy) { + pExaPixmap->fb_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->fb_pitch = pPixmap->devKind; + } + else { + pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + pExaPixmap->sys_pitch = pPixmap->devKind; + } + /* Always NULL this, we don't want lingering pointers. */ + pPixmap->devPrivate.ptr = NULL; + + return ret; +} + +Bool +exaDestroyPixmap_mixed(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + Bool ret; + + if (pPixmap->refcnt == 1) { + ExaPixmapPriv(pPixmap); + + exaDestroyPixmap(pPixmap); + + if (pExaScr->deferred_mixed_pixmap == pPixmap) + pExaScr->deferred_mixed_pixmap = NULL; + + if (pExaPixmap->driverPriv) + pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); + pExaPixmap->driverPriv = NULL; + + if (pExaPixmap->pDamage) { + free(pExaPixmap->sys_ptr); + pExaPixmap->sys_ptr = NULL; + pExaPixmap->pDamage = NULL; + } + } + + swap(pExaScr, pScreen, DestroyPixmap); + ret = pScreen->DestroyPixmap(pPixmap); + swap(pExaScr, pScreen, DestroyPixmap); + + return ret; +} + +Bool +exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + + ExaScreenPriv(pScreen); + ExaPixmapPriv(pPixmap); + pointer saved_ptr; + Bool ret; + + if (!pExaPixmap->driverPriv) + return FALSE; + + saved_ptr = pPixmap->devPrivate.ptr; + pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); + ret = pExaScr->info->PixmapIsOffscreen(pPixmap); + pPixmap->devPrivate.ptr = saved_ptr; + + return ret; +} + +Bool +exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + Bool ret = FALSE; + + exaMoveInPixmap(pPixmap); + /* get the driver to give us a handle */ + if (pExaScr->info->SharePixmapBacking) + ret = pExaScr->info->SharePixmapBacking(pPixmap, slave, handle_p); + + return ret; +} + +Bool +exaSetSharedPixmapBacking_mixed(PixmapPtr pPixmap, void *handle) +{ + ScreenPtr pScreen = pPixmap->drawable.pScreen; + ExaScreenPriv(pScreen); + Bool ret = FALSE; + + if (pExaScr->info->SetSharedPixmapBacking) + ret = pExaScr->info->SetSharedPixmapBacking(pPixmap, handle); + + if (ret == TRUE) + exaMoveInPixmap(pPixmap); + + return ret; +} + + diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c new file mode 100644 index 0000000..1f571cf --- /dev/null +++ b/exa/exa_offscreen.c @@ -0,0 +1,676 @@ +/* + * Copyright © 2003 Anders Carlsson + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Anders Carlsson not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Anders Carlsson makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** @file + * This allocator allocates blocks of memory by maintaining a list of areas. + * When allocating, the contiguous block of areas with the minimum eviction + * cost is found and evicted in order to make room for the new allocation. + */ + +#include "exa_priv.h" + +#include +#include +#include + +#if DEBUG_OFFSCREEN +#define DBG_OFFSCREEN(a) ErrorF a +#else +#define DBG_OFFSCREEN(a) +#endif + +#if DEBUG_OFFSCREEN +static void +ExaOffscreenValidate(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + ExaOffscreenArea *prev = 0, *area; + + assert(pExaScr->info->offScreenAreas->base_offset == + pExaScr->info->offScreenBase); + for (area = pExaScr->info->offScreenAreas; area; area = area->next) { + assert(area->offset >= area->base_offset && + area->offset < (area->base_offset + area->size)); + if (prev) + assert(prev->base_offset + prev->size == area->base_offset); + prev = area; + } + assert(prev->base_offset + prev->size == pExaScr->info->memorySize); +} +#else +#define ExaOffscreenValidate(s) +#endif + +static ExaOffscreenArea * +ExaOffscreenKickOut(ScreenPtr pScreen, ExaOffscreenArea * area) +{ + if (area->save) + (*area->save) (pScreen, area); + return exaOffscreenFree(pScreen, area); +} + +static void +exaUpdateEvictionCost(ExaOffscreenArea * area, unsigned offScreenCounter) +{ + unsigned age; + + if (area->state == ExaOffscreenAvail) + return; + + age = offScreenCounter - area->last_use; + + /* This is unlikely to happen, but could result in a division by zero... */ + if (age > (UINT_MAX / 2)) { + age = UINT_MAX / 2; + area->last_use = offScreenCounter - age; + } + + area->eviction_cost = area->size / age; +} + +static ExaOffscreenArea * +exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align) +{ + ExaOffscreenArea *begin, *end, *best; + unsigned cost, best_cost; + int avail, real_size; + + best_cost = UINT_MAX; + begin = end = pExaScr->info->offScreenAreas; + avail = 0; + cost = 0; + best = 0; + + while (end != NULL) { + restart: + while (begin != NULL && begin->state == ExaOffscreenLocked) + begin = end = begin->next; + + if (begin == NULL) + break; + + /* adjust size needed to account for alignment loss for this area */ + real_size = size + (begin->base_offset + begin->size - size) % align; + + while (avail < real_size && end != NULL) { + if (end->state == ExaOffscreenLocked) { + /* Can't more room here, restart after this locked area */ + avail = 0; + cost = 0; + begin = end; + goto restart; + } + avail += end->size; + exaUpdateEvictionCost(end, pExaScr->offScreenCounter); + cost += end->eviction_cost; + end = end->next; + } + + /* Check the cost, update best */ + if (avail >= real_size && cost < best_cost) { + best = begin; + best_cost = cost; + } + + avail -= begin->size; + cost -= begin->eviction_cost; + begin = begin->next; + } + + return best; +} + +/** + * exaOffscreenAlloc allocates offscreen memory + * + * @param pScreen current screen + * @param size size in bytes of the allocation + * @param align byte alignment requirement for the offset of the allocated area + * @param locked whether the allocated area is locked and can't be kicked out + * @param save callback for when the area is evicted from memory + * @param privdata private data for the save callback. + * + * Allocates offscreen memory from the device associated with pScreen. size + * and align deteremine where and how large the allocated area is, and locked + * will mark whether it should be held in card memory. privdata may be any + * pointer for the save callback when the area is removed. + * + * Note that locked areas do get evicted on VT switch unless the driver + * requested version 2.1 or newer behavior. In that case, the save callback is + * still called. + */ +ExaOffscreenArea * +exaOffscreenAlloc(ScreenPtr pScreen, int size, int align, + Bool locked, ExaOffscreenSaveProc save, pointer privData) +{ + ExaOffscreenArea *area; + + ExaScreenPriv(pScreen); + int real_size = 0, largest_avail = 0; + +#if DEBUG_OFFSCREEN + static int number = 0; + + ErrorF("================= ============ allocating a new pixmap %d\n", + ++number); +#endif + + ExaOffscreenValidate(pScreen); + if (!align) + align = 1; + + if (!size) { + DBG_OFFSCREEN(("Alloc 0x%x -> EMPTY\n", size)); + return NULL; + } + + /* throw out requests that cannot fit */ + if (size > (pExaScr->info->memorySize - pExaScr->info->offScreenBase)) { + DBG_OFFSCREEN(("Alloc 0x%x vs (0x%lx) -> TOBIG\n", size, + pExaScr->info->memorySize - + pExaScr->info->offScreenBase)); + return NULL; + } + + /* Try to find a free space that'll fit. */ + for (area = pExaScr->info->offScreenAreas; area; area = area->next) { + /* skip allocated areas */ + if (area->state != ExaOffscreenAvail) + continue; + + /* adjust size to match alignment requirement */ + real_size = size + (area->base_offset + area->size - size) % align; + + /* does it fit? */ + if (real_size <= area->size) + break; + + if (area->size > largest_avail) + largest_avail = area->size; + } + + if (!area) { + area = exaFindAreaToEvict(pExaScr, size, align); + + if (!area) { + DBG_OFFSCREEN(("Alloc 0x%x -> NOSPACE\n", size)); + /* Could not allocate memory */ + ExaOffscreenValidate(pScreen); + return NULL; + } + + /* adjust size needed to account for alignment loss for this area */ + real_size = size + (area->base_offset + area->size - size) % align; + + /* + * Kick out first area if in use + */ + if (area->state != ExaOffscreenAvail) + area = ExaOffscreenKickOut(pScreen, area); + /* + * Now get the system to merge the other needed areas together + */ + while (area->size < real_size) { + assert(area->next && area->next->state == ExaOffscreenRemovable); + (void) ExaOffscreenKickOut(pScreen, area->next); + } + } + + /* save extra space in new area */ + if (real_size < area->size) { + ExaOffscreenArea *new_area = malloc(sizeof(ExaOffscreenArea)); + + if (!new_area) + return NULL; + new_area->base_offset = area->base_offset; + + new_area->offset = new_area->base_offset; + new_area->align = 0; + new_area->size = area->size - real_size; + new_area->state = ExaOffscreenAvail; + new_area->save = NULL; + new_area->last_use = 0; + new_area->eviction_cost = 0; + new_area->next = area; + new_area->prev = area->prev; + if (area->prev->next) + area->prev->next = new_area; + else + pExaScr->info->offScreenAreas = new_area; + area->prev = new_area; + area->base_offset = new_area->base_offset + new_area->size; + area->size = real_size; + } + else + pExaScr->numOffscreenAvailable--; + + /* + * Mark this area as in use + */ + if (locked) + area->state = ExaOffscreenLocked; + else + area->state = ExaOffscreenRemovable; + area->privData = privData; + area->save = save; + area->last_use = pExaScr->offScreenCounter++; + area->offset = (area->base_offset + align - 1); + area->offset -= area->offset % align; + area->align = align; + + ExaOffscreenValidate(pScreen); + + DBG_OFFSCREEN(("Alloc 0x%x -> 0x%x (0x%x)\n", size, + area->base_offset, area->offset)); + return area; +} + +/** + * Ejects all offscreen areas, and uninitializes the offscreen memory manager. + */ +void +ExaOffscreenSwapOut(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + + ExaOffscreenValidate(pScreen); + /* loop until a single free area spans the space */ + for (;;) { + ExaOffscreenArea *area = pExaScr->info->offScreenAreas; + + if (!area) + break; + if (area->state == ExaOffscreenAvail) { + area = area->next; + if (!area) + break; + } + assert(area->state != ExaOffscreenAvail); + (void) ExaOffscreenKickOut(pScreen, area); + ExaOffscreenValidate(pScreen); + } + ExaOffscreenValidate(pScreen); + ExaOffscreenFini(pScreen); +} + +/** Ejects all pixmaps managed by EXA. */ +static void +ExaOffscreenEjectPixmaps(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + + ExaOffscreenValidate(pScreen); + /* loop until a single free area spans the space */ + for (;;) { + ExaOffscreenArea *area; + + for (area = pExaScr->info->offScreenAreas; area != NULL; + area = area->next) { + if (area->state == ExaOffscreenRemovable && + area->save == exaPixmapSave) { + (void) ExaOffscreenKickOut(pScreen, area); + ExaOffscreenValidate(pScreen); + break; + } + } + if (area == NULL) + break; + } + ExaOffscreenValidate(pScreen); +} + +void +ExaOffscreenSwapIn(ScreenPtr pScreen) +{ + exaOffscreenInit(pScreen); +} + +/** + * Prepares EXA for disabling of FB access, or restoring it. + * + * In version 2.1, the disabling results in pixmaps being ejected, while other + * allocations remain. With this plus the prevention of migration while + * swappedOut is set, EXA by itself should not cause any access of the + * framebuffer to occur while swapped out. Any remaining issues are the + * responsibility of the driver. + * + * Prior to version 2.1, all allocations, including locked ones, are ejected + * when access is disabled, and the allocator is torn down while swappedOut + * is set. This is more drastic, and caused implementation difficulties for + * many drivers that could otherwise handle the lack of FB access while + * swapped out. + */ +void +exaEnableDisableFBAccess(ScreenPtr pScreen, Bool enable) +{ + ExaScreenPriv(pScreen); + + if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) + return; + + if (!enable && pExaScr->disableFbCount++ == 0) { + if (pExaScr->info->exa_minor < 1) + ExaOffscreenSwapOut(pScreen); + else + ExaOffscreenEjectPixmaps(pScreen); + pExaScr->swappedOut = TRUE; + } + + if (enable && --pExaScr->disableFbCount == 0) { + if (pExaScr->info->exa_minor < 1) + ExaOffscreenSwapIn(pScreen); + pExaScr->swappedOut = FALSE; + } +} + +/* merge the next free area into this one */ +static void +ExaOffscreenMerge(ExaScreenPrivPtr pExaScr, ExaOffscreenArea * area) +{ + ExaOffscreenArea *next = area->next; + + /* account for space */ + area->size += next->size; + /* frob pointer */ + area->next = next->next; + if (area->next) + area->next->prev = area; + else + pExaScr->info->offScreenAreas->prev = area; + free(next); + + pExaScr->numOffscreenAvailable--; +} + +/** + * exaOffscreenFree frees an allocation. + * + * @param pScreen current screen + * @param area offscreen area to free + * + * exaOffscreenFree frees an allocation created by exaOffscreenAlloc. Note that + * the save callback of the area is not called, and it is up to the driver to + * do any cleanup necessary as a result. + * + * @return pointer to the newly freed area. This behavior should not be relied + * on. + */ +ExaOffscreenArea * +exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea * area) +{ + ExaScreenPriv(pScreen); + ExaOffscreenArea *next = area->next; + ExaOffscreenArea *prev; + + DBG_OFFSCREEN(("Free 0x%x -> 0x%x (0x%x)\n", area->size, + area->base_offset, area->offset)); + ExaOffscreenValidate(pScreen); + + area->state = ExaOffscreenAvail; + area->save = NULL; + area->last_use = 0; + area->eviction_cost = 0; + /* + * Find previous area + */ + if (area == pExaScr->info->offScreenAreas) + prev = NULL; + else + prev = area->prev; + + pExaScr->numOffscreenAvailable++; + + /* link with next area if free */ + if (next && next->state == ExaOffscreenAvail) + ExaOffscreenMerge(pExaScr, area); + + /* link with prev area if free */ + if (prev && prev->state == ExaOffscreenAvail) { + area = prev; + ExaOffscreenMerge(pExaScr, area); + } + + ExaOffscreenValidate(pScreen); + DBG_OFFSCREEN(("\tdone freeing\n")); + return area; +} + +void +ExaOffscreenMarkUsed(PixmapPtr pPixmap) +{ + ExaPixmapPriv(pPixmap); + ExaScreenPriv(pPixmap->drawable.pScreen); + + if (!pExaPixmap || !pExaPixmap->area) + return; + + pExaPixmap->area->last_use = pExaScr->offScreenCounter++; +} + +/** + * Defragment offscreen memory by compacting allocated areas at the end of it, + * leaving the total amount of memory available as a single area at the + * beginning (when there are no pinned allocations). + */ +_X_HIDDEN ExaOffscreenArea * +ExaOffscreenDefragment(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + ExaOffscreenArea *area, *largest_available = NULL; + int largest_size = 0; + PixmapPtr pDstPix; + ExaPixmapPrivPtr pExaDstPix; + + pDstPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, 0, 0); + + if (!pDstPix) + return NULL; + + pExaDstPix = ExaGetPixmapPriv(pDstPix); + pExaDstPix->use_gpu_copy = TRUE; + + for (area = pExaScr->info->offScreenAreas->prev; + area != pExaScr->info->offScreenAreas;) { + ExaOffscreenArea *prev = area->prev; + PixmapPtr pSrcPix; + ExaPixmapPrivPtr pExaSrcPix; + Bool save_use_gpu_copy; + int save_pitch; + + if (area->state != ExaOffscreenAvail || + prev->state == ExaOffscreenLocked || + (prev->state == ExaOffscreenRemovable && + prev->save != exaPixmapSave)) { + area = prev; + continue; + } + + if (prev->state == ExaOffscreenAvail) { + if (area == largest_available) { + largest_available = prev; + largest_size += prev->size; + } + area = prev; + ExaOffscreenMerge(pExaScr, area); + continue; + } + + if (area->size > largest_size) { + largest_available = area; + largest_size = area->size; + } + + pSrcPix = prev->privData; + pExaSrcPix = ExaGetPixmapPriv(pSrcPix); + + pExaDstPix->fb_ptr = pExaScr->info->memoryBase + + area->base_offset + area->size - prev->size + prev->base_offset - + prev->offset; + pExaDstPix->fb_ptr -= (unsigned long) pExaDstPix->fb_ptr % prev->align; + + if (pExaDstPix->fb_ptr <= pExaSrcPix->fb_ptr) { + area = prev; + continue; + } + + if (!(pExaScr->info->flags & EXA_SUPPORTS_OFFSCREEN_OVERLAPS) && + (pExaSrcPix->fb_ptr + prev->size) > pExaDstPix->fb_ptr) { + area = prev; + continue; + } + + save_use_gpu_copy = pExaSrcPix->use_gpu_copy; + save_pitch = pSrcPix->devKind; + + pExaSrcPix->use_gpu_copy = TRUE; + pSrcPix->devKind = pExaSrcPix->fb_pitch; + + pDstPix->drawable.width = pSrcPix->drawable.width; + pDstPix->devKind = pSrcPix->devKind; + pDstPix->drawable.height = pSrcPix->drawable.height; + pDstPix->drawable.depth = pSrcPix->drawable.depth; + pDstPix->drawable.bitsPerPixel = pSrcPix->drawable.bitsPerPixel; + + if (!pExaScr->info->PrepareCopy(pSrcPix, pDstPix, -1, -1, GXcopy, ~0)) { + pExaSrcPix->use_gpu_copy = save_use_gpu_copy; + pSrcPix->devKind = save_pitch; + area = prev; + continue; + } + + pExaScr->info->Copy(pDstPix, 0, 0, 0, 0, pDstPix->drawable.width, + pDstPix->drawable.height); + pExaScr->info->DoneCopy(pDstPix); + exaMarkSync(pScreen); + + DBG_OFFSCREEN(("Before swap: prev=0x%08x-0x%08x-0x%08x area=0x%08x-0x%08x-0x%08x\n", prev->base_offset, prev->offset, prev->base_offset + prev->size, area->base_offset, area->offset, area->base_offset + area->size)); + + /* Calculate swapped area offsets and sizes */ + area->base_offset = prev->base_offset; + area->offset = area->base_offset; + prev->offset += pExaDstPix->fb_ptr - pExaSrcPix->fb_ptr; + assert(prev->offset >= pExaScr->info->offScreenBase && + prev->offset < pExaScr->info->memorySize); + prev->base_offset = prev->offset; + if (area->next) + prev->size = area->next->base_offset - prev->base_offset; + else + prev->size = pExaScr->info->memorySize - prev->base_offset; + area->size = prev->base_offset - area->base_offset; + + DBG_OFFSCREEN(("After swap: area=0x%08x-0x%08x-0x%08x prev=0x%08x-0x%08x-0x%08x\n", area->base_offset, area->offset, area->base_offset + area->size, prev->base_offset, prev->offset, prev->base_offset + prev->size)); + + /* Swap areas in list */ + if (area->next) + area->next->prev = prev; + else + pExaScr->info->offScreenAreas->prev = prev; + if (prev->prev->next) + prev->prev->next = area; + else + pExaScr->info->offScreenAreas = area; + prev->next = area->next; + area->next = prev; + area->prev = prev->prev; + prev->prev = area; + if (!area->prev->next) + pExaScr->info->offScreenAreas = area; + +#if DEBUG_OFFSCREEN + if (prev->prev == prev || prev->next == prev) + ErrorF("Whoops, prev points to itself!\n"); + + if (area->prev == area || area->next == area) + ErrorF("Whoops, area points to itself!\n"); +#endif + + pExaSrcPix->fb_ptr = pExaDstPix->fb_ptr; + pExaSrcPix->use_gpu_copy = save_use_gpu_copy; + pSrcPix->devKind = save_pitch; + } + + pDstPix->drawable.width = 0; + pDstPix->drawable.height = 0; + pDstPix->drawable.depth = 0; + pDstPix->drawable.bitsPerPixel = 0; + + (*pScreen->DestroyPixmap) (pDstPix); + + if (area->state == ExaOffscreenAvail && area->size > largest_size) + return area; + + return largest_available; +} + +/** + * exaOffscreenInit initializes the offscreen memory manager. + * + * @param pScreen current screen + * + * exaOffscreenInit is called by exaDriverInit to set up the memory manager for + * the screen, if any offscreen memory is available. + */ +Bool +exaOffscreenInit(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + ExaOffscreenArea *area; + + /* Allocate a big free area */ + area = malloc(sizeof(ExaOffscreenArea)); + + if (!area) + return FALSE; + + area->state = ExaOffscreenAvail; + area->base_offset = pExaScr->info->offScreenBase; + area->offset = area->base_offset; + area->align = 0; + area->size = pExaScr->info->memorySize - area->base_offset; + area->save = NULL; + area->next = NULL; + area->prev = area; + area->last_use = 0; + area->eviction_cost = 0; + + /* Add it to the free areas */ + pExaScr->info->offScreenAreas = area; + pExaScr->offScreenCounter = 1; + pExaScr->numOffscreenAvailable = 1; + + ExaOffscreenValidate(pScreen); + + return TRUE; +} + +void +ExaOffscreenFini(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + ExaOffscreenArea *area; + + /* just free all of the area records */ + while ((area = pExaScr->info->offScreenAreas)) { + pExaScr->info->offScreenAreas = area->next; + free(area); + } +} diff --git a/exa/exa_priv.h b/exa/exa_priv.h new file mode 100644 index 0000000..1f56056 --- /dev/null +++ b/exa/exa_priv.h @@ -0,0 +1,740 @@ +/* + * + * Copyright (C) 2000 Keith Packard, member of The XFree86 Project, Inc. + * 2005 Zack Rusin, Trolltech + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifndef EXAPRIV_H +#define EXAPRIV_H + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "exa.h" + +#include +#include +#ifdef MITSHM +#include "shmint.h" +#endif +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "servermd.h" +#include "colormapst.h" +#include "gcstruct.h" +#include "input.h" +#include "mipointer.h" +#include "mi.h" +#include "dix.h" +#include "fb.h" +#include "fboverlay.h" +#include "fbpict.h" +#include "glyphstr.h" +#include "damage.h" + +#define DEBUG_TRACE_FALL 0 +#define DEBUG_MIGRATE 0 +#define DEBUG_PIXMAP 0 +#define DEBUG_OFFSCREEN 0 +#define DEBUG_GLYPH_CACHE 0 + +#if DEBUG_TRACE_FALL +#define EXA_FALLBACK(x) \ +do { \ + ErrorF("EXA fallback at %s: ", __FUNCTION__); \ + ErrorF x; \ +} while (0) + +char + exaDrawableLocation(DrawablePtr pDrawable); +#else +#define EXA_FALLBACK(x) +#endif + +#if DEBUG_PIXMAP +#define DBG_PIXMAP(a) ErrorF a +#else +#define DBG_PIXMAP(a) +#endif + +#ifndef EXA_MAX_FB +#define EXA_MAX_FB FB_OVERLAY_MAX +#endif + +#ifdef DEBUG +#define EXA_FatalErrorDebug(x) FatalError x +#define EXA_FatalErrorDebugWithRet(x, ret) FatalError x +#else +#define EXA_FatalErrorDebug(x) ErrorF x +#define EXA_FatalErrorDebugWithRet(x, ret) \ +do { \ + ErrorF x; \ + return ret; \ +} while (0) +#endif + +/** + * This is the list of migration heuristics supported by EXA. See + * exaDoMigration() for what their implementations do. + */ +enum ExaMigrationHeuristic { + ExaMigrationGreedy, + ExaMigrationAlways, + ExaMigrationSmart +}; + +typedef struct { + unsigned char sha1[20]; +} ExaCachedGlyphRec, *ExaCachedGlyphPtr; + +typedef struct { + /* The identity of the cache, statically configured at initialization */ + unsigned int format; + int glyphWidth; + int glyphHeight; + + int size; /* Size of cache; eventually this should be dynamically determined */ + + /* Hash table mapping from glyph sha1 to position in the glyph; we use + * open addressing with a hash table size determined based on size and large + * enough so that we always have a good amount of free space, so we can + * use linear probing. (Linear probing is preferrable to double hashing + * here because it allows us to easily remove entries.) + */ + int *hashEntries; + int hashSize; + + ExaCachedGlyphPtr glyphs; + int glyphCount; /* Current number of glyphs */ + + PicturePtr picture; /* Where the glyphs of the cache are stored */ + int yOffset; /* y location within the picture where the cache starts */ + int columns; /* Number of columns the glyphs are layed out in */ + int evictionPosition; /* Next random position to evict a glyph */ +} ExaGlyphCacheRec, *ExaGlyphCachePtr; + +#define EXA_NUM_GLYPH_CACHES 4 + +#define EXA_FALLBACK_COPYWINDOW (1 << 0) +#define EXA_ACCEL_COPYWINDOW (1 << 1) + +typedef struct _ExaMigrationRec { + Bool as_dst; + Bool as_src; + PixmapPtr pPix; + RegionPtr pReg; +} ExaMigrationRec, *ExaMigrationPtr; + +typedef void (*EnableDisableFBAccessProcPtr) (ScreenPtr, Bool); +typedef struct { + ExaDriverPtr info; + ScreenBlockHandlerProcPtr SavedBlockHandler; + ScreenWakeupHandlerProcPtr SavedWakeupHandler; + CreateGCProcPtr SavedCreateGC; + CloseScreenProcPtr SavedCloseScreen; + GetImageProcPtr SavedGetImage; + GetSpansProcPtr SavedGetSpans; + CreatePixmapProcPtr SavedCreatePixmap; + DestroyPixmapProcPtr SavedDestroyPixmap; + CopyWindowProcPtr SavedCopyWindow; + ChangeWindowAttributesProcPtr SavedChangeWindowAttributes; + BitmapToRegionProcPtr SavedBitmapToRegion; + CreateScreenResourcesProcPtr SavedCreateScreenResources; + ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader; + SharePixmapBackingProcPtr SavedSharePixmapBacking; + SetSharedPixmapBackingProcPtr SavedSetSharedPixmapBacking; + SourceValidateProcPtr SavedSourceValidate; + CompositeProcPtr SavedComposite; + TrianglesProcPtr SavedTriangles; + GlyphsProcPtr SavedGlyphs; + TrapezoidsProcPtr SavedTrapezoids; + AddTrapsProcPtr SavedAddTraps; + void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, + Bool can_accel); + Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap); + void (*do_move_in_pixmap) (PixmapPtr pPixmap); + void (*do_move_out_pixmap) (PixmapPtr pPixmap); + void (*prepare_access_reg) (PixmapPtr pPixmap, int index, RegionPtr pReg); + + Bool swappedOut; + enum ExaMigrationHeuristic migration; + Bool checkDirtyCorrectness; + unsigned disableFbCount; + Bool optimize_migration; + unsigned offScreenCounter; + unsigned numOffscreenAvailable; + CARD32 lastDefragment; + CARD32 nextDefragment; + PixmapPtr deferred_mixed_pixmap; + + /* Reference counting for accessed pixmaps */ + struct { + PixmapPtr pixmap; + int count; + Bool retval; + } access[EXA_NUM_PREPARE_INDICES]; + + /* Holds information on fallbacks that cannot be relayed otherwise. */ + unsigned int fallback_flags; + unsigned int fallback_counter; + + ExaGlyphCacheRec glyphCaches[EXA_NUM_GLYPH_CACHES]; + + /** + * Regions affected by fallback composite source / mask operations. + */ + + RegionRec srcReg; + RegionRec maskReg; + PixmapPtr srcPix; + PixmapPtr maskPix; + + DevPrivateKeyRec pixmapPrivateKeyRec; + DevPrivateKeyRec gcPrivateKeyRec; +} ExaScreenPrivRec, *ExaScreenPrivPtr; + +/* + * This is the only completely portable way to + * compute this info. + */ +#ifndef BitsPerPixel +#define BitsPerPixel(d) (\ + PixmapWidthPaddingInfo[d].notPower2 ? \ + (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \ + ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \ + (PixmapWidthPaddingInfo[d].padRoundUp+1))) +#endif + +extern DevPrivateKeyRec exaScreenPrivateKeyRec; + +#define exaScreenPrivateKey (&exaScreenPrivateKeyRec) + +#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixGetPrivate(&(s)->devPrivates, exaScreenPrivateKey)) +#define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) + +#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixGetPrivateAddr(&(gc)->devPrivates, &ExaGetScreenPriv(gc->pScreen)->gcPrivateKeyRec)) +#define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc) + +/* + * Some macros to deal with function wrapping. + */ +#define wrap(priv, real, mem, func) {\ + priv->Saved##mem = real->mem; \ + real->mem = func; \ +} + +#define unwrap(priv, real, mem) {\ + real->mem = priv->Saved##mem; \ +} + +#define swap(priv, real, mem) {\ + void *tmp = priv->Saved##mem; \ + priv->Saved##mem = real->mem; \ + real->mem = tmp; \ +} + +#define EXA_PRE_FALLBACK(_screen_) \ + ExaScreenPriv(_screen_); \ + pExaScr->fallback_counter++; + +#define EXA_POST_FALLBACK(_screen_) \ + pExaScr->fallback_counter--; + +#define EXA_PRE_FALLBACK_GC(_gc_) \ + ExaScreenPriv(_gc_->pScreen); \ + ExaGCPriv(_gc_); \ + pExaScr->fallback_counter++; \ + swap(pExaGC, _gc_, ops); + +#define EXA_POST_FALLBACK_GC(_gc_) \ + pExaScr->fallback_counter--; \ + swap(pExaGC, _gc_, ops); + +/** Align an offset to an arbitrary alignment */ +#define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \ + (((offset) + (align) - 1) % (align))) +/** Align an offset to a power-of-two alignment */ +#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1)) + +#define EXA_PIXMAP_SCORE_MOVE_IN 10 +#define EXA_PIXMAP_SCORE_MAX 20 +#define EXA_PIXMAP_SCORE_MOVE_OUT -10 +#define EXA_PIXMAP_SCORE_MIN -20 +#define EXA_PIXMAP_SCORE_PINNED 1000 +#define EXA_PIXMAP_SCORE_INIT 1001 + +#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &ExaGetScreenPriv((p)->drawable.pScreen)->pixmapPrivateKeyRec)) +#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p) + +#define EXA_RANGE_PITCH (1 << 0) +#define EXA_RANGE_WIDTH (1 << 1) +#define EXA_RANGE_HEIGHT (1 << 2) + +typedef struct { + ExaOffscreenArea *area; + int score; /**< score for the move-in vs move-out heuristic */ + Bool use_gpu_copy; + + CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */ + int sys_pitch; /**< pitch of pixmap in system memory */ + + CARD8 *fb_ptr; /**< pointer to pixmap data in framebuffer memory */ + int fb_pitch; /**< pitch of pixmap in framebuffer memory */ + unsigned int fb_size; /**< size of pixmap in framebuffer memory */ + + /** + * Holds information about whether this pixmap can be used for + * acceleration (== 0) or not (> 0). + * + * Contains a OR'ed combination of the following values: + * EXA_RANGE_PITCH - set if the pixmap's pitch is out of range + * EXA_RANGE_WIDTH - set if the pixmap's width is out of range + * EXA_RANGE_HEIGHT - set if the pixmap's height is out of range + */ + unsigned int accel_blocked; + + /** + * The damage record contains the areas of the pixmap's current location + * (framebuffer or system) that have been damaged compared to the other + * location. + */ + DamagePtr pDamage; + /** + * The valid regions mark the valid bits (at least, as they're derived from + * damage, which may be overreported) of a pixmap's system and FB copies. + */ + RegionRec validSys, validFB; + /** + * Driver private storage per EXA pixmap + */ + void *driverPriv; +} ExaPixmapPrivRec, *ExaPixmapPrivPtr; + +typedef struct { + /* GC values from the layer below. */ + GCOps *Savedops; + GCFuncs *Savedfuncs; +} ExaGCPrivRec, *ExaGCPrivPtr; + +typedef struct { + PicturePtr pDst; + INT16 xSrc; + INT16 ySrc; + INT16 xMask; + INT16 yMask; + INT16 xDst; + INT16 yDst; + INT16 width; + INT16 height; +} ExaCompositeRectRec, *ExaCompositeRectPtr; + +/** + * exaDDXDriverInit must be implemented by the DDX using EXA, and is the place + * to set EXA options or hook in screen functions to handle using EXA as the AA. + */ +void exaDDXDriverInit(ScreenPtr pScreen); + +/* exa_unaccel.c */ +void + exaPrepareAccessGC(GCPtr pGC); + +void + exaFinishAccessGC(GCPtr pGC); + +void + +ExaCheckFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nspans, + DDXPointPtr ppt, int *pwidth, int fSorted); + +void + +ExaCheckSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc, + DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); + +void + +ExaCheckPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, int format, + char *bits); + +void + +ExaCheckCopyNtoN(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, + Bool upsidedown, Pixel bitplane, void *closure); + +RegionPtr + +ExaCheckCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty); + +RegionPtr + +ExaCheckCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty, + unsigned long bitPlane); + +void + +ExaCheckPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr pptInit); + +void + +ExaCheckPolylines(DrawablePtr pDrawable, GCPtr pGC, + int mode, int npt, DDXPointPtr ppt); + +void + +ExaCheckPolySegment(DrawablePtr pDrawable, GCPtr pGC, + int nsegInit, xSegment * pSegInit); + +void + ExaCheckPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * pArcs); + +void + +ExaCheckPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, + int nrect, xRectangle *prect); + +void + +ExaCheckImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr * ppci, pointer pglyphBase); + +void + +ExaCheckPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr * ppci, pointer pglyphBase); + +void + +ExaCheckPushPixels(GCPtr pGC, PixmapPtr pBitmap, + DrawablePtr pDrawable, int w, int h, int x, int y); + +void + ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +void + +ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d); + +void + +ExaCheckGetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart); + +void + +ExaCheckAddTraps(PicturePtr pPicture, + INT16 x_off, INT16 y_off, int ntrap, xTrap * traps); + +/* exa_accel.c */ + +static _X_INLINE Bool +exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask, + unsigned int fillStyle, unsigned char alu, + unsigned int clientClipType) +{ + return ((alu != GXcopy && alu != GXclear && alu != GXset && + alu != GXcopyInverted) || fillStyle == FillStippled || + clientClipType != CT_NONE || + !EXA_PM_IS_SOLID(pDrawable, planemask)); +} + +void + exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +Bool + +exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, + DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu, + unsigned int clientClipType); + +void + +exaGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d); + +RegionPtr + +exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, + int srcx, int srcy, int width, int height, int dstx, int dsty); + +Bool + +exaHWCopyNtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, int dx, int dy, Bool reverse, Bool upsidedown); + +void + +exaCopyNtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); + +extern const GCOps exaOps; + +void + +ExaCheckComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); + +void + +ExaCheckGlyphs(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs); + +/* exa_offscreen.c */ +void + ExaOffscreenSwapOut(ScreenPtr pScreen); + +void + ExaOffscreenSwapIn(ScreenPtr pScreen); + +ExaOffscreenArea *ExaOffscreenDefragment(ScreenPtr pScreen); + +Bool + exaOffscreenInit(ScreenPtr pScreen); + +void + ExaOffscreenFini(ScreenPtr pScreen); + +/* exa.c */ +Bool + ExaDoPrepareAccess(PixmapPtr pPixmap, int index); + +void + exaPrepareAccess(DrawablePtr pDrawable, int index); + +void + exaFinishAccess(DrawablePtr pDrawable, int index); + +void + exaDestroyPixmap(PixmapPtr pPixmap); + +void + exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2); + +void + +exaGetDrawableDeltas(DrawablePtr pDrawable, PixmapPtr pPixmap, + int *xp, int *yp); + +Bool + exaPixmapHasGpuCopy(PixmapPtr p); + +PixmapPtr + exaGetOffscreenPixmap(DrawablePtr pDrawable, int *xp, int *yp); + +PixmapPtr + exaGetDrawablePixmap(DrawablePtr pDrawable); + +void + +exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, + int w, int h, int bpp); + +void + +exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, + int w, int h, int bpp); + +void + exaDoMigration(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); + +Bool + exaPixmapIsPinned(PixmapPtr pPix); + +extern const GCFuncs exaGCFuncs; + +/* exa_classic.c */ +PixmapPtr + +exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint); + +Bool + +exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, + int depth, int bitsPerPixel, int devKind, + pointer pPixData); + +Bool + exaDestroyPixmap_classic(PixmapPtr pPixmap); + +Bool + exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap); + +/* exa_driver.c */ +PixmapPtr + +exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint); + +Bool + +exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, + int depth, int bitsPerPixel, int devKind, + pointer pPixData); + +Bool + exaDestroyPixmap_driver(PixmapPtr pPixmap); + +Bool + exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap); + +/* exa_mixed.c */ +PixmapPtr + +exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint); + +Bool + +exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, + int bitsPerPixel, int devKind, pointer pPixData); + +Bool + exaDestroyPixmap_mixed(PixmapPtr pPixmap); + +Bool + exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap); + +/* exa_migration_mixed.c */ +void + exaCreateDriverPixmap_mixed(PixmapPtr pPixmap); + +void + exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); + +void + exaMoveInPixmap_mixed(PixmapPtr pPixmap); + +void + exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure); + +void + exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg); + +Bool +exaSetSharedPixmapBacking_mixed(PixmapPtr pPixmap, void *handle); +Bool +exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p); + +/* exa_render.c */ +Bool + exaOpReadsDestination(CARD8 op); + +void + +exaComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); + +void + +exaCompositeRects(CARD8 op, + PicturePtr Src, + PicturePtr pMask, + PicturePtr pDst, int nrect, ExaCompositeRectPtr rects); + +void + +exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid * traps); + +void + +exaTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntri, xTriangle * tris); + +/* exa_glyph.c */ +void + exaGlyphsInit(ScreenPtr pScreen); + +void + exaGlyphsFini(ScreenPtr pScreen); + +void + +exaGlyphs(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs); + +/* exa_migration_classic.c */ +void + exaCopyDirtyToSys(ExaMigrationPtr migrate); + +void + exaCopyDirtyToFb(ExaMigrationPtr migrate); + +void + exaDoMigration_classic(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); + +void + exaPixmapSave(ScreenPtr pScreen, ExaOffscreenArea * area); + +void + exaMoveOutPixmap_classic(PixmapPtr pPixmap); + +void + exaMoveInPixmap_classic(PixmapPtr pPixmap); + +void + exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg); + +#endif /* EXAPRIV_H */ diff --git a/exa/exa_render.c b/exa/exa_render.c new file mode 100644 index 0000000..172e2b5 --- /dev/null +++ b/exa/exa_render.c @@ -0,0 +1,1225 @@ +/* + * Copyright © 2001 Keith Packard + * + * Partly based on code that is Copyright © The XFree86 Project Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "exa_priv.h" + +#include "mipict.h" + +#if DEBUG_TRACE_FALL +static void +exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n) +{ + char format[20]; + char size[20]; + char loc; + int temp; + + if (!pict) { + snprintf(string, n, "None"); + return; + } + + switch (pict->format) { + case PICT_a8r8g8b8: + snprintf(format, 20, "ARGB8888"); + break; + case PICT_x8r8g8b8: + snprintf(format, 20, "XRGB8888"); + break; + case PICT_b8g8r8a8: + snprintf(format, 20, "BGRA8888"); + break; + case PICT_b8g8r8x8: + snprintf(format, 20, "BGRX8888"); + break; + case PICT_r5g6b5: + snprintf(format, 20, "RGB565 "); + break; + case PICT_x1r5g5b5: + snprintf(format, 20, "RGB555 "); + break; + case PICT_a8: + snprintf(format, 20, "A8 "); + break; + case PICT_a1: + snprintf(format, 20, "A1 "); + break; + default: + snprintf(format, 20, "0x%x", (int) pict->format); + break; + } + + if (pict->pDrawable) { + loc = exaGetOffscreenPixmap(pict->pDrawable, &temp, &temp) ? 's' : 'm'; + + snprintf(size, 20, "%dx%d%s", pict->pDrawable->width, + pict->pDrawable->height, pict->repeat ? " R" : ""); + } + else { + loc = '-'; + + snprintf(size, 20, "%s", pict->repeat ? " R" : ""); + } + + snprintf(string, n, "%p:%c fmt %s (%s)", pict->pDrawable, loc, format, + size); +} + +static void +exaPrintCompositeFallback(CARD8 op, + PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst) +{ + char sop[20]; + char srcdesc[40], maskdesc[40], dstdesc[40]; + + switch (op) { + case PictOpSrc: + snprintf(sop, sizeof(sop), "Src"); + break; + case PictOpOver: + snprintf(sop, sizeof(sop), "Over"); + break; + default: + snprintf(sop, sizeof(sop), "0x%x", (int) op); + break; + } + + exaCompositeFallbackPictDesc(pSrc, srcdesc, 40); + exaCompositeFallbackPictDesc(pMask, maskdesc, 40); + exaCompositeFallbackPictDesc(pDst, dstdesc, 40); + + ErrorF("Composite fallback: op %s, \n" + " src %s, \n" + " mask %s, \n" + " dst %s, \n", sop, srcdesc, maskdesc, dstdesc); +} +#endif /* DEBUG_TRACE_FALL */ + +Bool +exaOpReadsDestination(CARD8 op) +{ + /* FALSE (does not read destination) is the list of ops in the protocol + * document with "0" in the "Fb" column and no "Ab" in the "Fa" column. + * That's just Clear and Src. ReduceCompositeOp() will already have + * converted con/disjoint clear/src to Clear or Src. + */ + switch (op) { + case PictOpClear: + case PictOpSrc: + return FALSE; + default: + return TRUE; + } +} + +static Bool +exaGetPixelFromRGBA(CARD32 *pixel, + CARD16 red, + CARD16 green, + CARD16 blue, CARD16 alpha, PictFormatPtr pFormat) +{ + int rbits, bbits, gbits, abits; + int rshift, bshift, gshift, ashift; + + *pixel = 0; + + if (!PICT_FORMAT_COLOR(pFormat->format) && + PICT_FORMAT_TYPE(pFormat->format) != PICT_TYPE_A) + return FALSE; + + rbits = PICT_FORMAT_R(pFormat->format); + gbits = PICT_FORMAT_G(pFormat->format); + bbits = PICT_FORMAT_B(pFormat->format); + abits = PICT_FORMAT_A(pFormat->format); + + rshift = pFormat->direct.red; + gshift = pFormat->direct.green; + bshift = pFormat->direct.blue; + ashift = pFormat->direct.alpha; + + *pixel |= (blue >> (16 - bbits)) << bshift; + *pixel |= (red >> (16 - rbits)) << rshift; + *pixel |= (green >> (16 - gbits)) << gshift; + *pixel |= (alpha >> (16 - abits)) << ashift; + + return TRUE; +} + +static Bool +exaGetRGBAFromPixel(CARD32 pixel, + CARD16 *red, + CARD16 *green, + CARD16 *blue, + CARD16 *alpha, + PictFormatPtr pFormat, PictFormatShort format) +{ + int rbits, bbits, gbits, abits; + int rshift, bshift, gshift, ashift; + + if (!PICT_FORMAT_COLOR(format) && PICT_FORMAT_TYPE(format) != PICT_TYPE_A) + return FALSE; + + rbits = PICT_FORMAT_R(format); + gbits = PICT_FORMAT_G(format); + bbits = PICT_FORMAT_B(format); + abits = PICT_FORMAT_A(format); + + if (pFormat) { + rshift = pFormat->direct.red; + gshift = pFormat->direct.green; + bshift = pFormat->direct.blue; + ashift = pFormat->direct.alpha; + } + else if (format == PICT_a8r8g8b8) { + rshift = 16; + gshift = 8; + bshift = 0; + ashift = 24; + } + else + FatalError("EXA bug: exaGetRGBAFromPixel() doesn't match " + "createSourcePicture()\n"); + + if (rbits) { + *red = ((pixel >> rshift) & ((1 << rbits) - 1)) << (16 - rbits); + while (rbits < 16) { + *red |= *red >> rbits; + rbits <<= 1; + } + + *green = ((pixel >> gshift) & ((1 << gbits) - 1)) << (16 - gbits); + while (gbits < 16) { + *green |= *green >> gbits; + gbits <<= 1; + } + + *blue = ((pixel >> bshift) & ((1 << bbits) - 1)) << (16 - bbits); + while (bbits < 16) { + *blue |= *blue >> bbits; + bbits <<= 1; + } + } + else { + *red = 0x0000; + *green = 0x0000; + *blue = 0x0000; + } + + if (abits) { + *alpha = ((pixel >> ashift) & ((1 << abits) - 1)) << (16 - abits); + while (abits < 16) { + *alpha |= *alpha >> abits; + abits <<= 1; + } + } + else + *alpha = 0xffff; + + return TRUE; +} + +static int +exaTryDriverSolidFill(PicturePtr pSrc, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ExaScreenPriv(pDst->pDrawable->pScreen); + RegionRec region; + BoxPtr pbox; + int nbox; + int dst_off_x, dst_off_y; + PixmapPtr pSrcPix, pDstPix; + ExaPixmapPrivPtr pDstExaPix; + CARD32 pixel; + CARD16 red, green, blue, alpha; + + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); + pDstExaPix = ExaGetPixmapPriv(pDstPix); + + /* Check whether the accelerator can use the destination pixmap. + */ + if (pDstExaPix->accel_blocked) { + return -1; + } + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + if (pSrc->pDrawable) { + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + } + + if (!miComputeCompositeRegion(®ion, pSrc, NULL, pDst, + xSrc, ySrc, 0, 0, xDst, yDst, width, height)) + return 1; + + exaGetDrawableDeltas(pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); + + RegionTranslate(®ion, dst_off_x, dst_off_y); + + if (pSrc->pDrawable) { + pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); + pixel = exaGetPixmapFirstPixel(pSrcPix); + } + else + pixel = pSrc->pSourcePict->solidFill.color; + + if (!exaGetRGBAFromPixel(pixel, &red, &green, &blue, &alpha, + pSrc->pFormat, pSrc->format) || + !exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, pDst->pFormat)) { + RegionUninit(®ion); + return -1; + } + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[1]; + + pixmaps[0].as_dst = TRUE; + pixmaps[0].as_src = FALSE; + pixmaps[0].pPix = pDstPix; + pixmaps[0].pReg = ®ion; + exaDoMigration(pixmaps, 1, TRUE); + } + + if (!exaPixmapHasGpuCopy(pDstPix)) { + RegionUninit(®ion); + return 0; + } + + if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel)) { + RegionUninit(®ion); + return -1; + } + + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); + + while (nbox--) { + (*pExaScr->info->Solid) (pDstPix, pbox->x1, pbox->y1, pbox->x2, + pbox->y2); + pbox++; + } + + (*pExaScr->info->DoneSolid) (pDstPix); + exaMarkSync(pDst->pDrawable->pScreen); + + RegionUninit(®ion); + return 1; +} + +static int +exaTryDriverCompositeRects(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + int nrect, ExaCompositeRectPtr rects) +{ + ExaScreenPriv(pDst->pDrawable->pScreen); + int src_off_x = 0, src_off_y = 0, mask_off_x = 0, mask_off_y = 0; + int dst_off_x, dst_off_y; + PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix; + ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix; + + if (!pExaScr->info->PrepareComposite) + return -1; + + if (pSrc->pDrawable) { + pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); + pSrcExaPix = ExaGetPixmapPriv(pSrcPix); + } + + if (pMask && pMask->pDrawable) { + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + pMaskExaPix = ExaGetPixmapPriv(pMaskPix); + } + + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); + pDstExaPix = ExaGetPixmapPriv(pDstPix); + + /* Check whether the accelerator can use these pixmaps. + * FIXME: If it cannot, use temporary pixmaps so that the drawing + * happens within limits. + */ + if (pDstExaPix->accel_blocked || + (pSrcExaPix && pSrcExaPix->accel_blocked) || + (pMaskExaPix && pMaskExaPix->accel_blocked)) { + return -1; + } + + if (pExaScr->info->CheckComposite && + !(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst)) { + return -1; + } + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[3]; + int i = 0; + + pixmaps[i].as_dst = TRUE; + pixmaps[i].as_src = exaOpReadsDestination(op); + pixmaps[i].pPix = pDstPix; + pixmaps[i].pReg = NULL; + i++; + + if (pSrcPix) { + pixmaps[i].as_dst = FALSE; + pixmaps[i].as_src = TRUE; + pixmaps[i].pPix = pSrcPix; + pixmaps[i].pReg = NULL; + i++; + } + + if (pMaskPix) { + pixmaps[i].as_dst = FALSE; + pixmaps[i].as_src = TRUE; + pixmaps[i].pPix = pMaskPix; + pixmaps[i].pReg = NULL; + i++; + } + + exaDoMigration(pixmaps, i, TRUE); + } + + pDstPix = exaGetOffscreenPixmap(pDst->pDrawable, &dst_off_x, &dst_off_y); + if (!pDstPix) + return 0; + + if (pSrcPix) { + pSrcPix = + exaGetOffscreenPixmap(pSrc->pDrawable, &src_off_x, &src_off_y); + if (!pSrcPix) + return 0; + } + + if (pMaskPix) { + pMaskPix = + exaGetOffscreenPixmap(pMask->pDrawable, &mask_off_x, &mask_off_y); + if (!pMaskPix) + return 0; + } + + if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix, + pMaskPix, pDstPix)) + return -1; + + while (nrect--) { + INT16 xDst = rects->xDst + pDst->pDrawable->x; + INT16 yDst = rects->yDst + pDst->pDrawable->y; + INT16 xMask = rects->xMask; + INT16 yMask = rects->yMask; + INT16 xSrc = rects->xSrc; + INT16 ySrc = rects->ySrc; + RegionRec region; + BoxPtr pbox; + int nbox; + + if (pMaskPix) { + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + } + + if (pSrcPix) { + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + } + + if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + rects->width, rects->height)) + goto next_rect; + + RegionTranslate(®ion, dst_off_x, dst_off_y); + + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); + + xMask = xMask + mask_off_x - xDst - dst_off_x; + yMask = yMask + mask_off_y - yDst - dst_off_y; + xSrc = xSrc + src_off_x - xDst - dst_off_x; + ySrc = ySrc + src_off_y - yDst - dst_off_y; + + while (nbox--) { + (*pExaScr->info->Composite) (pDstPix, + pbox->x1 + xSrc, + pbox->y1 + ySrc, + pbox->x1 + xMask, + pbox->y1 + yMask, + pbox->x1, + pbox->y1, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + pbox++; + } + + next_rect: + RegionUninit(®ion); + + rects++; + } + + (*pExaScr->info->DoneComposite) (pDstPix); + exaMarkSync(pDst->pDrawable->pScreen); + + return 1; +} + +/** + * Copy a number of rectangles from source to destination in a single + * operation. This is specialized for glyph rendering: we don't have the + * special-case fallbacks found in exaComposite() - if the driver can support + * it, we use the driver functionality, otherwise we fall back straight to + * software. + */ +void +exaCompositeRects(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, int nrect, ExaCompositeRectPtr rects) +{ + ExaScreenPriv(pDst->pDrawable->pScreen); + int n; + ExaCompositeRectPtr r; + int ret; + + /* If we get a mask, that means we're rendering to the exaGlyphs + * destination directly, so the damage layer takes care of this. + */ + if (!pMask) { + RegionRec region; + int x1 = MAXSHORT; + int y1 = MAXSHORT; + int x2 = MINSHORT; + int y2 = MINSHORT; + BoxRec box; + + /* We have to manage the damage ourselves, since CompositeRects isn't + * something in the screen that can be managed by the damage extension, + * and EXA depends on damage to track what needs to be migrated between + * the gpu and the cpu. + */ + + /* Compute the overall extents of the composited region - we're making + * the assumption here that we are compositing a bunch of glyphs that + * cluster closely together and damaging each glyph individually would + * be a loss compared to damaging the bounding box. + */ + n = nrect; + r = rects; + while (n--) { + int rect_x2 = r->xDst + r->width; + int rect_y2 = r->yDst + r->height; + + if (r->xDst < x1) + x1 = r->xDst; + if (r->yDst < y1) + y1 = r->yDst; + if (rect_x2 > x2) + x2 = rect_x2; + if (rect_y2 > y2) + y2 = rect_y2; + + r++; + } + + if (x2 <= x1 || y2 <= y1) + return; + + box.x1 = x1; + box.x2 = x2 < MAXSHORT ? x2 : MAXSHORT; + box.y1 = y1; + box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT; + + /* The pixmap migration code relies on pendingDamage indicating + * the bounds of the current rendering, so we need to force + * the actual damage into that region before we do anything, and + * (see use of DamagePendingRegion in exaCopyDirty) + */ + + RegionInit(®ion, &box, 1); + + DamageRegionAppend(pDst->pDrawable, ®ion); + + RegionUninit(®ion); + } + + /************************************************************/ + + ValidatePicture(pSrc); + if (pMask) + ValidatePicture(pMask); + ValidatePicture(pDst); + + ret = exaTryDriverCompositeRects(op, pSrc, pMask, pDst, nrect, rects); + + if (ret != 1) { + if (ret == -1 && op == PictOpOver && pMask && pMask->componentAlpha && + (!pExaScr->info->CheckComposite || + ((*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, pMask, + pDst) && + (*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, pMask, + pDst)))) { + ret = + exaTryDriverCompositeRects(PictOpOutReverse, pSrc, pMask, pDst, + nrect, rects); + if (ret == 1) { + op = PictOpAdd; + ret = exaTryDriverCompositeRects(op, pSrc, pMask, pDst, nrect, + rects); + } + } + + if (ret != 1) { + n = nrect; + r = rects; + while (n--) { + ExaCheckComposite(op, pSrc, pMask, pDst, + r->xSrc, r->ySrc, + r->xMask, r->yMask, + r->xDst, r->yDst, r->width, r->height); + r++; + } + } + } + + /************************************************************/ + + if (!pMask) { + /* Now we have to flush the damage out from pendingDamage => damage + * Calling DamageRegionProcessPending has that effect. + */ + + DamageRegionProcessPending(pDst->pDrawable); + } +} + +static int +exaTryDriverComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ExaScreenPriv(pDst->pDrawable->pScreen); + RegionRec region; + BoxPtr pbox; + int nbox; + int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y; + PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix; + ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix; + + if (pSrc->pDrawable) { + pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); + pSrcExaPix = ExaGetPixmapPriv(pSrcPix); + } + + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); + pDstExaPix = ExaGetPixmapPriv(pDstPix); + + if (pMask && pMask->pDrawable) { + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + pMaskExaPix = ExaGetPixmapPriv(pMaskPix); + } + + /* Check whether the accelerator can use these pixmaps. + * FIXME: If it cannot, use temporary pixmaps so that the drawing + * happens within limits. + */ + if (pDstExaPix->accel_blocked || + (pSrcExaPix && pSrcExaPix->accel_blocked) || + (pMaskExaPix && (pMaskExaPix->accel_blocked))) { + return -1; + } + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + + if (pMaskPix) { + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + } + + if (pSrcPix) { + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + } + + if (pExaScr->info->CheckComposite && + !(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst)) { + return -1; + } + + if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height)) + return 1; + + exaGetDrawableDeltas(pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); + + RegionTranslate(®ion, dst_off_x, dst_off_y); + + if (pExaScr->do_migration) { + ExaMigrationRec pixmaps[3]; + int i = 0; + + pixmaps[i].as_dst = TRUE; + pixmaps[i].as_src = exaOpReadsDestination(op); + pixmaps[i].pPix = pDstPix; + pixmaps[i].pReg = pixmaps[0].as_src ? NULL : ®ion; + i++; + + if (pSrcPix) { + pixmaps[i].as_dst = FALSE; + pixmaps[i].as_src = TRUE; + pixmaps[i].pPix = pSrcPix; + pixmaps[i].pReg = NULL; + i++; + } + + if (pMaskPix) { + pixmaps[i].as_dst = FALSE; + pixmaps[i].as_src = TRUE; + pixmaps[i].pPix = pMaskPix; + pixmaps[i].pReg = NULL; + i++; + } + + exaDoMigration(pixmaps, i, TRUE); + } + + if (pSrcPix) { + pSrcPix = + exaGetOffscreenPixmap(pSrc->pDrawable, &src_off_x, &src_off_y); + if (!pSrcPix) { + RegionUninit(®ion); + return 0; + } + } + + if (pMaskPix) { + pMaskPix = exaGetOffscreenPixmap(pMask->pDrawable, &mask_off_x, + &mask_off_y); + if (!pMaskPix) { + RegionUninit(®ion); + return 0; + } + } + + if (!exaPixmapHasGpuCopy(pDstPix)) { + RegionUninit(®ion); + return 0; + } + + if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix, + pMaskPix, pDstPix)) { + RegionUninit(®ion); + return -1; + } + + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); + + xMask = xMask + mask_off_x - xDst - dst_off_x; + yMask = yMask + mask_off_y - yDst - dst_off_y; + + xSrc = xSrc + src_off_x - xDst - dst_off_x; + ySrc = ySrc + src_off_y - yDst - dst_off_y; + + while (nbox--) { + (*pExaScr->info->Composite) (pDstPix, + pbox->x1 + xSrc, + pbox->y1 + ySrc, + pbox->x1 + xMask, + pbox->y1 + yMask, + pbox->x1, + pbox->y1, + pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); + pbox++; + } + (*pExaScr->info->DoneComposite) (pDstPix); + exaMarkSync(pDst->pDrawable->pScreen); + + RegionUninit(®ion); + return 1; +} + +/** + * exaTryMagicTwoPassCompositeHelper implements PictOpOver using two passes of + * simpler operations PictOpOutReverse and PictOpAdd. Mainly used for component + * alpha and limited 1-tmu cards. + * + * From http://anholt.livejournal.com/32058.html: + * + * The trouble is that component-alpha rendering requires two different sources + * for blending: one for the source value to the blender, which is the + * per-channel multiplication of source and mask, and one for the source alpha + * for multiplying with the destination channels, which is the multiplication + * of the source channels by the mask alpha. So the equation for Over is: + * + * dst.A = src.A * mask.A + (1 - (src.A * mask.A)) * dst.A + * dst.R = src.R * mask.R + (1 - (src.A * mask.R)) * dst.R + * dst.G = src.G * mask.G + (1 - (src.A * mask.G)) * dst.G + * dst.B = src.B * mask.B + (1 - (src.A * mask.B)) * dst.B + * + * But we can do some simpler operations, right? How about PictOpOutReverse, + * which has a source factor of 0 and dest factor of (1 - source alpha). We + * can get the source alpha value (srca.X = src.A * mask.X) out of the texture + * blenders pretty easily. So we can do a component-alpha OutReverse, which + * gets us: + * + * dst.A = 0 + (1 - (src.A * mask.A)) * dst.A + * dst.R = 0 + (1 - (src.A * mask.R)) * dst.R + * dst.G = 0 + (1 - (src.A * mask.G)) * dst.G + * dst.B = 0 + (1 - (src.A * mask.B)) * dst.B + * + * OK. And if an op doesn't use the source alpha value for the destination + * factor, then we can do the channel multiplication in the texture blenders + * to get the source value, and ignore the source alpha that we wouldn't use. + * We've supported this in the Radeon driver for a long time. An example would + * be PictOpAdd, which does: + * + * dst.A = src.A * mask.A + dst.A + * dst.R = src.R * mask.R + dst.R + * dst.G = src.G * mask.G + dst.G + * dst.B = src.B * mask.B + dst.B + * + * Hey, this looks good! If we do a PictOpOutReverse and then a PictOpAdd right + * after it, we get: + * + * dst.A = src.A * mask.A + ((1 - (src.A * mask.A)) * dst.A) + * dst.R = src.R * mask.R + ((1 - (src.A * mask.R)) * dst.R) + * dst.G = src.G * mask.G + ((1 - (src.A * mask.G)) * dst.G) + * dst.B = src.B * mask.B + ((1 - (src.A * mask.B)) * dst.B) + */ + +static int +exaTryMagicTwoPassCompositeHelper(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, CARD16 width, CARD16 height) +{ + ExaScreenPriv(pDst->pDrawable->pScreen); + + assert(op == PictOpOver); + + if (pExaScr->info->CheckComposite && + (!(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, pMask, + pDst) || + !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, pMask, pDst))) { + return -1; + } + + /* Now, we think we should be able to accelerate this operation. First, + * composite the destination to be the destination times the source alpha + * factors. + */ + exaComposite(PictOpOutReverse, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + /* Then, add in the source value times the destination alpha factors (1.0). + */ + exaComposite(PictOpAdd, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + return 1; +} + +void +exaComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ExaScreenPriv(pDst->pDrawable->pScreen); + int ret = -1; + Bool saveSrcRepeat = pSrc->repeat; + Bool saveMaskRepeat = pMask ? pMask->repeat : 0; + RegionRec region; + + if (pExaScr->swappedOut) + goto fallback; + + /* Remove repeat in source if useless */ + if (pSrc->pDrawable && pSrc->repeat && !pSrc->transform && xSrc >= 0 && + (xSrc + width) <= pSrc->pDrawable->width && ySrc >= 0 && + (ySrc + height) <= pSrc->pDrawable->height) + pSrc->repeat = 0; + + if (!pMask && !pSrc->alphaMap && !pDst->alphaMap && + (op == PictOpSrc || (op == PictOpOver && !PICT_FORMAT_A(pSrc->format)))) + { + if (pSrc->pDrawable ? + (pSrc->pDrawable->width == 1 && pSrc->pDrawable->height == 1 && + pSrc->repeat) : + (pSrc->pSourcePict->type == SourcePictTypeSolidFill)) { + ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst, + width, height); + if (ret == 1) + goto done; + } + else if (pSrc->pDrawable && !pSrc->transform && + ((op == PictOpSrc && + (pSrc->format == pDst->format || + (PICT_FORMAT_COLOR(pDst->format) && + PICT_FORMAT_COLOR(pSrc->format) && + pDst->format == PICT_FORMAT(PICT_FORMAT_BPP(pSrc->format), + PICT_FORMAT_TYPE(pSrc->format), + 0, + PICT_FORMAT_R(pSrc->format), + PICT_FORMAT_G(pSrc->format), + PICT_FORMAT_B(pSrc->format))))) + || (op == PictOpOver && pSrc->format == pDst->format && + !PICT_FORMAT_A(pSrc->format)))) { + if (!pSrc->repeat && xSrc >= 0 && ySrc >= 0 && + (xSrc + width <= pSrc->pDrawable->width) && + (ySrc + height <= pSrc->pDrawable->height)) { + Bool ret; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + + if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, + yDst, width, height)) + goto done; + + ret = exaHWCopyNtoN(pSrc->pDrawable, pDst->pDrawable, NULL, + RegionRects(®ion), + RegionNumRects(®ion), xSrc - xDst, + ySrc - yDst, FALSE, FALSE); + RegionUninit(®ion); + + /* Reset values to their original values. */ + xDst -= pDst->pDrawable->x; + yDst -= pDst->pDrawable->y; + xSrc -= pSrc->pDrawable->x; + ySrc -= pSrc->pDrawable->y; + + if (!ret) + goto fallback; + + goto done; + } + + if (pSrc->repeat && pSrc->repeatType == RepeatNormal && + pSrc->pDrawable->type == DRAWABLE_PIXMAP) { + DDXPointRec patOrg; + + /* Let's see if the driver can do the repeat in one go */ + if (pExaScr->info->PrepareComposite && !pSrc->alphaMap && + !pDst->alphaMap) { + ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, + ySrc, xMask, yMask, xDst, yDst, + width, height); + if (ret == 1) + goto done; + } + + /* Now see if we can use exaFillRegionTiled() */ + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + + if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, xSrc, + ySrc, xMask, yMask, xDst, yDst, + width, height)) + goto done; + + /* pattern origin is the point in the destination drawable + * corresponding to (0,0) in the source */ + patOrg.x = xDst - xSrc; + patOrg.y = yDst - ySrc; + + ret = exaFillRegionTiled(pDst->pDrawable, ®ion, + (PixmapPtr) pSrc->pDrawable, + &patOrg, FB_ALLONES, GXcopy, CT_NONE); + + RegionUninit(®ion); + + if (ret) + goto done; + + /* Let's be correct and restore the variables to their original state. */ + xDst -= pDst->pDrawable->x; + yDst -= pDst->pDrawable->y; + xSrc -= pSrc->pDrawable->x; + ySrc -= pSrc->pDrawable->y; + } + } + } + + /* Remove repeat in mask if useless */ + if (pMask && pMask->pDrawable && pMask->repeat && !pMask->transform && + xMask >= 0 && (xMask + width) <= pMask->pDrawable->width && + yMask >= 0 && (yMask + height) <= pMask->pDrawable->height) + pMask->repeat = 0; + + if (pExaScr->info->PrepareComposite && + !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { + Bool isSrcSolid; + + ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, + yMask, xDst, yDst, width, height); + if (ret == 1) + goto done; + + /* For generic masks and solid src pictures, mach64 can do Over in two + * passes, similar to the component-alpha case. + */ + isSrcSolid = pSrc->pDrawable ? + (pSrc->pDrawable->width == 1 && pSrc->pDrawable->height == 1 && + pSrc->repeat) : + (pSrc->pSourcePict->type == SourcePictTypeSolidFill); + + /* If we couldn't do the Composite in a single pass, and it was a + * component-alpha Over, see if we can do it in two passes with + * an OutReverse and then an Add. + */ + if (ret == -1 && op == PictOpOver && pMask && + (pMask->componentAlpha || isSrcSolid)) { + ret = exaTryMagicTwoPassCompositeHelper(op, pSrc, pMask, pDst, + xSrc, ySrc, + xMask, yMask, xDst, yDst, + width, height); + if (ret == 1) + goto done; + } + } + + fallback: +#if DEBUG_TRACE_FALL + exaPrintCompositeFallback(op, pSrc, pMask, pDst); +#endif + + ExaCheckComposite(op, pSrc, pMask, pDst, xSrc, ySrc, + xMask, yMask, xDst, yDst, width, height); + + done: + pSrc->repeat = saveSrcRepeat; + if (pMask) + pMask->repeat = saveMaskRepeat; +} + +/** + * Same as miCreateAlphaPicture, except it uses ExaCheckPolyFillRect instead + * of PolyFillRect to initialize the pixmap after creating it, to prevent + * the pixmap from being migrated. + * + * See the comments about exaTrapezoids and exaTriangles. + */ +static PicturePtr +exaCreateAlphaPicture(ScreenPtr pScreen, + PicturePtr pDst, + PictFormatPtr pPictFormat, CARD16 width, CARD16 height) +{ + PixmapPtr pPixmap; + PicturePtr pPicture; + GCPtr pGC; + int error; + xRectangle rect; + + if (width > 32767 || height > 32767) + return 0; + + if (!pPictFormat) { + if (pDst->polyEdge == PolyEdgeSharp) + pPictFormat = PictureMatchFormat(pScreen, 1, PICT_a1); + else + pPictFormat = PictureMatchFormat(pScreen, 8, PICT_a8); + if (!pPictFormat) + return 0; + } + + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, + pPictFormat->depth, 0); + if (!pPixmap) + return 0; + pGC = GetScratchGC(pPixmap->drawable.depth, pScreen); + if (!pGC) { + (*pScreen->DestroyPixmap) (pPixmap); + return 0; + } + ValidateGC(&pPixmap->drawable, pGC); + rect.x = 0; + rect.y = 0; + rect.width = width; + rect.height = height; + ExaCheckPolyFillRect(&pPixmap->drawable, pGC, 1, &rect); + exaPixmapDirty(pPixmap, 0, 0, width, height); + FreeScratchGC(pGC); + pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat, + 0, 0, serverClient, &error); + (*pScreen->DestroyPixmap) (pPixmap); + return pPicture; +} + +/** + * exaTrapezoids is essentially a copy of miTrapezoids that uses + * exaCreateAlphaPicture instead of miCreateAlphaPicture. + * + * The problem with miCreateAlphaPicture is that it calls PolyFillRect + * to initialize the contents after creating the pixmap, which + * causes the pixmap to be moved in for acceleration. The subsequent + * call to RasterizeTrapezoid won't be accelerated however, which + * forces the pixmap to be moved out again. + * + * exaCreateAlphaPicture avoids this roundtrip by using ExaCheckPolyFillRect + * to initialize the contents. + */ +void +exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid * traps) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + BoxRec bounds; + + if (maskFormat) { + PicturePtr pPicture; + INT16 xDst, yDst; + INT16 xRel, yRel; + + miTrapezoidBounds(ntrap, traps, &bounds); + + if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) + return; + + xDst = traps[0].left.p1.x >> 16; + yDst = traps[0].left.p1.y >> 16; + + pPicture = exaCreateAlphaPicture(pScreen, pDst, maskFormat, + bounds.x2 - bounds.x1, + bounds.y2 - bounds.y1); + if (!pPicture) + return; + + exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); + for (; ntrap; ntrap--, traps++) + (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1); + exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); + + xRel = bounds.x1 + xSrc - xDst; + yRel = bounds.y1 + ySrc - yDst; + CompositePicture(op, pSrc, pPicture, pDst, + xRel, yRel, 0, 0, bounds.x1, bounds.y1, + bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); + FreePicture(pPicture, 0); + } + else { + if (pDst->polyEdge == PolyEdgeSharp) + maskFormat = PictureMatchFormat(pScreen, 1, PICT_a1); + else + maskFormat = PictureMatchFormat(pScreen, 8, PICT_a8); + for (; ntrap; ntrap--, traps++) + exaTrapezoids(op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps); + } +} + +/** + * exaTriangles is essentially a copy of miTriangles that uses + * exaCreateAlphaPicture instead of miCreateAlphaPicture. + * + * The problem with miCreateAlphaPicture is that it calls PolyFillRect + * to initialize the contents after creating the pixmap, which + * causes the pixmap to be moved in for acceleration. The subsequent + * call to AddTriangles won't be accelerated however, which forces the pixmap + * to be moved out again. + * + * exaCreateAlphaPicture avoids this roundtrip by using ExaCheckPolyFillRect + * to initialize the contents. + */ +void +exaTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntri, xTriangle * tris) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + BoxRec bounds; + + if (maskFormat) { + PicturePtr pPicture; + INT16 xDst, yDst; + INT16 xRel, yRel; + + miTriangleBounds(ntri, tris, &bounds); + + if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) + return; + + xDst = tris[0].p1.x >> 16; + yDst = tris[0].p1.y >> 16; + + pPicture = exaCreateAlphaPicture(pScreen, pDst, maskFormat, + bounds.x2 - bounds.x1, + bounds.y2 - bounds.y1); + if (!pPicture) + return; + + exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); + (*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris); + exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); + + xRel = bounds.x1 + xSrc - xDst; + yRel = bounds.y1 + ySrc - yDst; + CompositePicture(op, pSrc, pPicture, pDst, + xRel, yRel, 0, 0, bounds.x1, bounds.y1, + bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); + FreePicture(pPicture, 0); + } + else { + if (pDst->polyEdge == PolyEdgeSharp) + maskFormat = PictureMatchFormat(pScreen, 1, PICT_a1); + else + maskFormat = PictureMatchFormat(pScreen, 8, PICT_a8); + + for (; ntri; ntri--, tris++) + exaTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, tris); + } +} diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c new file mode 100644 index 0000000..b0a0011 --- /dev/null +++ b/exa/exa_unaccel.c @@ -0,0 +1,736 @@ +/* + * + * Copyright © 1999 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include "exa_priv.h" + +#include "mipict.h" + +/* + * These functions wrap the low-level fb rendering functions and + * synchronize framebuffer/accelerated drawing by stalling until + * the accelerator is idle + */ + +/** + * Calls exaPrepareAccess with EXA_PREPARE_SRC for the tile, if that is the + * current fill style. + * + * Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are + * 1bpp and never in fb, so we don't worry about them. + * We should worry about them for completeness sake and going forward. + */ +void +exaPrepareAccessGC(GCPtr pGC) +{ + if (pGC->stipple) + exaPrepareAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); + if (pGC->fillStyle == FillTiled) + exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); +} + +/** + * Finishes access to the tile in the GC, if used. + */ +void +exaFinishAccessGC(GCPtr pGC) +{ + if (pGC->fillStyle == FillTiled) + exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); + if (pGC->stipple) + exaFinishAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); +} + +#if DEBUG_TRACE_FALL +char +exaDrawableLocation(DrawablePtr pDrawable) +{ + return exaDrawableIsOffscreen(pDrawable) ? 's' : 'm'; +} +#endif /* DEBUG_TRACE_FALL */ + +void +ExaCheckFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nspans, + DDXPointPtr ppt, int *pwidth, int fSorted) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC(pGC); + pGC->ops->FillSpans(pDrawable, pGC, nspans, ppt, pwidth, fSorted); + exaFinishAccessGC(pGC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc, + DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + pGC->ops->SetSpans(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, int format, + char *bits) +{ + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + ExaPixmapPriv(pPixmap); + + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + if (!pExaScr->prepare_access_reg || !pExaPixmap->pDamage || + exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, + pGC->alu, pGC->clientClipType)) + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + else + pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, + DamagePendingRegion(pExaPixmap->pDamage)); + pGC->ops->PutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, + bits); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckCopyNtoN(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, + Bool upsidedown, Pixel bitplane, void *closure) +{ + RegionRec reg; + int xoff, yoff; + + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, + exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); + + if (pExaScr->prepare_access_reg && RegionInitBoxes(®, pbox, nbox)) { + PixmapPtr pPixmap = exaGetDrawablePixmap(pSrc); + + exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff); + RegionTranslate(®, xoff + dx, yoff + dy); + pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, ®); + RegionUninit(®); + } + else + exaPrepareAccess(pSrc, EXA_PREPARE_SRC); + + if (pExaScr->prepare_access_reg && + !exaGCReadsDestination(pDst, pGC->planemask, pGC->fillStyle, + pGC->alu, pGC->clientClipType) && + RegionInitBoxes(®, pbox, nbox)) { + PixmapPtr pPixmap = exaGetDrawablePixmap(pDst); + + exaGetDrawableDeltas(pDst, pPixmap, &xoff, &yoff); + RegionTranslate(®, xoff, yoff); + pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, ®); + RegionUninit(®); + } + else + exaPrepareAccess(pDst, EXA_PREPARE_DEST); + + /* This will eventually call fbCopyNtoN, with some calculation overhead. */ + while (nbox--) { + pGC->ops->CopyArea(pSrc, pDst, pGC, pbox->x1 - pSrc->x + dx, + pbox->y1 - pSrc->y + dy, pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1, pbox->x1 - pDst->x, + pbox->y1 - pDst->y); + pbox++; + } + exaFinishAccess(pSrc, EXA_PREPARE_SRC); + exaFinishAccess(pDst, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +static void +ExaFallbackPrepareReg(DrawablePtr pDrawable, + GCPtr pGC, + int x, int y, int width, int height, + int index, Bool checkReads) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + ExaScreenPriv(pScreen); + + if (pExaScr->prepare_access_reg && + !(checkReads && exaGCReadsDestination(pDrawable, + pGC->planemask, + pGC->fillStyle, + pGC->alu, pGC->clientClipType))) { + BoxRec box; + RegionRec reg; + int xoff, yoff; + PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); + + exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); + box.x1 = pDrawable->x + x + xoff; + box.y1 = pDrawable->y + y + yoff; + box.x2 = box.x1 + width; + box.y2 = box.y1 + height; + + RegionInit(®, &box, 1); + pExaScr->prepare_access_reg(pPixmap, index, ®); + RegionUninit(®); + } + else + exaPrepareAccess(pDrawable, index); +} + +RegionPtr +ExaCheckCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty) +{ + RegionPtr ret; + + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, + exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); + ExaFallbackPrepareReg(pSrc, pGC, srcx, srcy, w, h, EXA_PREPARE_SRC, FALSE); + ExaFallbackPrepareReg(pDst, pGC, dstx, dsty, w, h, EXA_PREPARE_DEST, TRUE); + ret = pGC->ops->CopyArea(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); + exaFinishAccess(pSrc, EXA_PREPARE_SRC); + exaFinishAccess(pDst, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); + + return ret; +} + +RegionPtr +ExaCheckCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, + int srcx, int srcy, int w, int h, int dstx, int dsty, + unsigned long bitPlane) +{ + RegionPtr ret; + + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, + exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); + ExaFallbackPrepareReg(pSrc, pGC, srcx, srcy, w, h, EXA_PREPARE_SRC, FALSE); + ExaFallbackPrepareReg(pDst, pGC, dstx, dsty, w, h, EXA_PREPARE_DEST, TRUE); + ret = pGC->ops->CopyPlane(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, + bitPlane); + exaFinishAccess(pSrc, EXA_PREPARE_SRC); + exaFinishAccess(pDst, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); + + return ret; +} + +void +ExaCheckPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, + DDXPointPtr pptInit) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + pGC->ops->PolyPoint(pDrawable, pGC, mode, npt, pptInit); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckPolylines(DrawablePtr pDrawable, GCPtr pGC, + int mode, int npt, DDXPointPtr ppt) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n", + pDrawable, exaDrawableLocation(pDrawable), + pGC->lineWidth, mode, npt)); + + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC(pGC); + pGC->ops->Polylines(pDrawable, pGC, mode, npt, ppt); + exaFinishAccessGC(pGC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckPolySegment(DrawablePtr pDrawable, GCPtr pGC, + int nsegInit, xSegment * pSegInit) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c) width %d, count %d\n", pDrawable, + exaDrawableLocation(pDrawable), pGC->lineWidth, nsegInit)); + + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC(pGC); + pGC->ops->PolySegment(pDrawable, pGC, nsegInit, pSegInit); + exaFinishAccessGC(pGC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * pArcs) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC(pGC); + pGC->ops->PolyArc(pDrawable, pGC, narcs, pArcs); + exaFinishAccessGC(pGC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, + int nrect, xRectangle *prect) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC(pGC); + pGC->ops->PolyFillRect(pDrawable, pGC, nrect, prect); + exaFinishAccessGC(pGC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr * ppci, pointer pglyphBase) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC(pGC); + pGC->ops->ImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + exaFinishAccessGC(pGC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr * ppci, pointer pglyphBase) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable, + exaDrawableLocation(pDrawable), pGC->fillStyle, pGC->alu)); + exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); + exaPrepareAccessGC(pGC); + pGC->ops->PolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); + exaFinishAccessGC(pGC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckPushPixels(GCPtr pGC, PixmapPtr pBitmap, + DrawablePtr pDrawable, int w, int h, int x, int y) +{ + EXA_PRE_FALLBACK_GC(pGC); + EXA_FALLBACK(("from %p to %p (%c,%c)\n", pBitmap, pDrawable, + exaDrawableLocation(&pBitmap->drawable), + exaDrawableLocation(pDrawable))); + ExaFallbackPrepareReg(pDrawable, pGC, x, y, w, h, EXA_PREPARE_DEST, TRUE); + ExaFallbackPrepareReg(&pBitmap->drawable, pGC, 0, 0, w, h, + EXA_PREPARE_SRC, FALSE); + exaPrepareAccessGC(pGC); + pGC->ops->PushPixels(pGC, pBitmap, pDrawable, w, h, x, y); + exaFinishAccessGC(pGC); + exaFinishAccess(&pBitmap->drawable, EXA_PREPARE_SRC); + exaFinishAccess(pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK_GC(pGC); +} + +void +ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + DrawablePtr pDrawable = &pWin->drawable; + ScreenPtr pScreen = pDrawable->pScreen; + + EXA_PRE_FALLBACK(pScreen); + EXA_FALLBACK(("from %p\n", pWin)); + + /* Only need the source bits, the destination region will be overwritten */ + if (pExaScr->prepare_access_reg) { + PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin); + int xoff, yoff; + + exaGetDrawableDeltas(&pWin->drawable, pPixmap, &xoff, &yoff); + RegionTranslate(prgnSrc, xoff, yoff); + pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, prgnSrc); + RegionTranslate(prgnSrc, -xoff, -yoff); + } + else + exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); + + swap(pExaScr, pScreen, CopyWindow); + pScreen->CopyWindow(pWin, ptOldOrg, prgnSrc); + swap(pExaScr, pScreen, CopyWindow); + exaFinishAccess(pDrawable, EXA_PREPARE_SRC); + EXA_POST_FALLBACK(pScreen); +} + +void +ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + EXA_PRE_FALLBACK(pScreen); + EXA_FALLBACK(("from %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + + ExaFallbackPrepareReg(pDrawable, NULL, x, y, w, h, EXA_PREPARE_SRC, FALSE); + swap(pExaScr, pScreen, GetImage); + pScreen->GetImage(pDrawable, x, y, w, h, format, planeMask, d); + swap(pExaScr, pScreen, GetImage); + exaFinishAccess(pDrawable, EXA_PREPARE_SRC); + EXA_POST_FALLBACK(pScreen); +} + +void +ExaCheckGetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + EXA_PRE_FALLBACK(pScreen); + EXA_FALLBACK(("from %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); + exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); + swap(pExaScr, pScreen, GetSpans); + pScreen->GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + swap(pExaScr, pScreen, GetSpans); + exaFinishAccess(pDrawable, EXA_PREPARE_SRC); + EXA_POST_FALLBACK(pScreen); +} + +static void +ExaSrcValidate(DrawablePtr pDrawable, + int x, int y, int width, int height, unsigned int subWindowMode) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + ExaScreenPriv(pScreen); + PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); + BoxRec box; + RegionRec reg; + RegionPtr dst; + int xoff, yoff; + + if (pExaScr->srcPix == pPix) + dst = &pExaScr->srcReg; + else if (pExaScr->maskPix == pPix) + dst = &pExaScr->maskReg; + else + return; + + exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); + + box.x1 = x + xoff; + box.y1 = y + yoff; + box.x2 = box.x1 + width; + box.y2 = box.y1 + height; + + RegionInit(®, &box, 1); + RegionUnion(dst, dst, ®); + RegionUninit(®); + + if (pExaScr->SavedSourceValidate) { + swap(pExaScr, pScreen, SourceValidate); + pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode); + swap(pExaScr, pScreen, SourceValidate); + } +} + +static Bool +ExaPrepareCompositeReg(ScreenPtr pScreen, + CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + RegionRec region; + RegionPtr dstReg = NULL; + RegionPtr srcReg = NULL; + RegionPtr maskReg = NULL; + PixmapPtr pSrcPix = NULL; + PixmapPtr pMaskPix = NULL; + PixmapPtr pDstPix; + + ExaScreenPriv(pScreen); + Bool ret; + + RegionNull(®ion); + + if (pSrc->pDrawable) { + pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); + RegionNull(&pExaScr->srcReg); + srcReg = &pExaScr->srcReg; + pExaScr->srcPix = pSrcPix; + if (pSrc != pDst) + RegionTranslate(pSrc->pCompositeClip, + -pSrc->pDrawable->x, -pSrc->pDrawable->y); + } else + pExaScr->srcPix = NULL; + + if (pMask && pMask->pDrawable) { + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + RegionNull(&pExaScr->maskReg); + maskReg = &pExaScr->maskReg; + pExaScr->maskPix = pMaskPix; + if (pMask != pDst && pMask != pSrc) + RegionTranslate(pMask->pCompositeClip, + -pMask->pDrawable->x, -pMask->pDrawable->y); + } else + pExaScr->maskPix = NULL; + + RegionTranslate(pDst->pCompositeClip, + -pDst->pDrawable->x, -pDst->pDrawable->y); + + pExaScr->SavedSourceValidate = ExaSrcValidate; + swap(pExaScr, pScreen, SourceValidate); + ret = miComputeCompositeRegion(®ion, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + swap(pExaScr, pScreen, SourceValidate); + + RegionTranslate(pDst->pCompositeClip, + pDst->pDrawable->x, pDst->pDrawable->y); + if (pSrc->pDrawable && pSrc != pDst) + RegionTranslate(pSrc->pCompositeClip, + pSrc->pDrawable->x, pSrc->pDrawable->y); + if (pMask && pMask->pDrawable && pMask != pDst && pMask != pSrc) + RegionTranslate(pMask->pCompositeClip, + pMask->pDrawable->x, pMask->pDrawable->y); + + if (!ret) { + if (srcReg) + RegionUninit(srcReg); + if (maskReg) + RegionUninit(maskReg); + + return FALSE; + } + + /** + * Don't limit alphamaps readbacks for now until we've figured out how that + * should be done. + */ + + if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) + pExaScr-> + prepare_access_reg(exaGetDrawablePixmap(pSrc->alphaMap->pDrawable), + EXA_PREPARE_AUX_SRC, NULL); + if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) + pExaScr-> + prepare_access_reg(exaGetDrawablePixmap(pMask->alphaMap->pDrawable), + EXA_PREPARE_AUX_MASK, NULL); + + if (pSrcPix) + pExaScr->prepare_access_reg(pSrcPix, EXA_PREPARE_SRC, srcReg); + + if (pMaskPix) + pExaScr->prepare_access_reg(pMaskPix, EXA_PREPARE_MASK, maskReg); + + if (srcReg) + RegionUninit(srcReg); + if (maskReg) + RegionUninit(maskReg); + + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); + if (!exaOpReadsDestination(op)) { + int xoff; + int yoff; + + exaGetDrawableDeltas(pDst->pDrawable, pDstPix, &xoff, &yoff); + RegionTranslate(®ion, pDst->pDrawable->x + xoff, + pDst->pDrawable->y + yoff); + dstReg = ®ion; + } + + if (pDst->alphaMap && pDst->alphaMap->pDrawable) + pExaScr-> + prepare_access_reg(exaGetDrawablePixmap(pDst->alphaMap->pDrawable), + EXA_PREPARE_AUX_DEST, dstReg); + pExaScr->prepare_access_reg(pDstPix, EXA_PREPARE_DEST, dstReg); + + RegionUninit(®ion); + return TRUE; +} + +void +ExaCheckComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + EXA_PRE_FALLBACK(pScreen); + + if (pExaScr->prepare_access_reg) { + if (!ExaPrepareCompositeReg(pScreen, op, pSrc, pMask, pDst, xSrc, + ySrc, xMask, yMask, xDst, yDst, width, + height)) + goto out_no_clip; + } + else { + + /* We need to prepare access to any separate alpha maps first, + * in case the driver doesn't support EXA_PREPARE_AUX*, + * in which case EXA_PREPARE_SRC may be used for moving them out. + */ + + if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) + exaPrepareAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX_SRC); + if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) + exaPrepareAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX_MASK); + if (pDst->alphaMap && pDst->alphaMap->pDrawable) + exaPrepareAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX_DEST); + + exaPrepareAccess(pDst->pDrawable, EXA_PREPARE_DEST); + + EXA_FALLBACK(("from picts %p/%p to pict %p\n", pSrc, pMask, pDst)); + + if (pSrc->pDrawable != NULL) + exaPrepareAccess(pSrc->pDrawable, EXA_PREPARE_SRC); + if (pMask && pMask->pDrawable != NULL) + exaPrepareAccess(pMask->pDrawable, EXA_PREPARE_MASK); + } + + swap(pExaScr, ps, Composite); + ps->Composite(op, + pSrc, + pMask, + pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); + swap(pExaScr, ps, Composite); + if (pMask && pMask->pDrawable != NULL) + exaFinishAccess(pMask->pDrawable, EXA_PREPARE_MASK); + if (pSrc->pDrawable != NULL) + exaFinishAccess(pSrc->pDrawable, EXA_PREPARE_SRC); + exaFinishAccess(pDst->pDrawable, EXA_PREPARE_DEST); + if (pDst->alphaMap && pDst->alphaMap->pDrawable) + exaFinishAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX_DEST); + if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) + exaFinishAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX_SRC); + if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) + exaFinishAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX_MASK); + + out_no_clip: + EXA_POST_FALLBACK(pScreen); +} + +/** + * Avoid migration ping-pong when using a mask. + */ +void +ExaCheckGlyphs(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + + EXA_PRE_FALLBACK(pScreen); + + miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + + EXA_POST_FALLBACK(pScreen); +} + +void +ExaCheckAddTraps(PicturePtr pPicture, + INT16 x_off, INT16 y_off, int ntrap, xTrap * traps) +{ + ScreenPtr pScreen = pPicture->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + EXA_PRE_FALLBACK(pScreen); + + EXA_FALLBACK(("to pict %p (%c)\n", + exaDrawableLocation(pPicture->pDrawable))); + exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); + swap(pExaScr, ps, AddTraps); + ps->AddTraps(pPicture, x_off, y_off, ntrap, traps); + swap(pExaScr, ps, AddTraps); + exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); + EXA_POST_FALLBACK(pScreen); +} + +/** + * Gets the 0,0 pixel of a pixmap. Used for doing solid fills of tiled pixmaps + * that happen to be 1x1. Pixmap must be at least 8bpp. + */ +CARD32 +exaGetPixmapFirstPixel(PixmapPtr pPixmap) +{ + switch (pPixmap->drawable.bitsPerPixel) { + case 32: + { + CARD32 pixel; + + pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, + ZPixmap, ~0, (char *) &pixel); + return pixel; + } + case 16: + { + CARD16 pixel; + + pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, + ZPixmap, ~0, (char *) &pixel); + return pixel; + } + case 8: + case 4: + case 1: + { + CARD8 pixel; + + pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, + ZPixmap, ~0, (char *) &pixel); + return pixel; + } + default: + FatalError("%s called for invalid bpp %d\n", __func__, + pPixmap->drawable.bitsPerPixel); + } +} diff --git a/fb/Makefile.am b/fb/Makefile.am new file mode 100644 index 0000000..89f3bab --- /dev/null +++ b/fb/Makefile.am @@ -0,0 +1,54 @@ +noinst_LTLIBRARIES = libfb.la libwfb.la + +AM_CFLAGS = $(DIX_CFLAGS) + +if XORG +sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h +endif + +libfb_la_CFLAGS = $(AM_CFLAGS) +libfb_la_LIBADD = $(PIXMAN_LIBS) + +libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER +libwfb_la_LIBADD = $(PIXMAN_LIBS) + +libfb_la_SOURCES = \ + fb.h \ + fb24_32.c \ + fb24_32.h \ + fballpriv.c \ + fbarc.c \ + fbbits.c \ + fbbits.h \ + fbblt.c \ + fbbltone.c \ + fbcopy.c \ + fbfill.c \ + fbfillrect.c \ + fbfillsp.c \ + fbgc.c \ + fbgetsp.c \ + fbglyph.c \ + fbimage.c \ + fbline.c \ + fboverlay.c \ + fboverlay.h \ + fbpict.c \ + fbpict.h \ + fbpixmap.c \ + fbpoint.c \ + fbpush.c \ + fbrop.h \ + fbscreen.c \ + fbseg.c \ + fbsetsp.c \ + fbsolid.c \ + fbstipple.c \ + fbtile.c \ + fbtrap.c \ + fbutil.c \ + fbwindow.c + +libwfb_la_SOURCES = $(libfb_la_SOURCES) + +EXTRA_DIST = fbcmap_mi.c diff --git a/fb/Makefile.in b/fb/Makefile.in new file mode 100644 index 0000000..41be027 --- /dev/null +++ b/fb/Makefile.in @@ -0,0 +1,1333 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = fb +DIST_COMMON = $(am__sdk_HEADERS_DIST) $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +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 \ + libfb_la-fbfillrect.lo libfb_la-fbfillsp.lo libfb_la-fbgc.lo \ + libfb_la-fbgetsp.lo libfb_la-fbglyph.lo libfb_la-fbimage.lo \ + libfb_la-fbline.lo libfb_la-fboverlay.lo libfb_la-fbpict.lo \ + libfb_la-fbpixmap.lo libfb_la-fbpoint.lo libfb_la-fbpush.lo \ + libfb_la-fbscreen.lo libfb_la-fbseg.lo libfb_la-fbsetsp.lo \ + libfb_la-fbsolid.lo libfb_la-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) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +libfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libfb_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +libwfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__objects_1 = libwfb_la-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 \ + libwfb_la-fbfillrect.lo libwfb_la-fbfillsp.lo \ + libwfb_la-fbgc.lo libwfb_la-fbgetsp.lo libwfb_la-fbglyph.lo \ + libwfb_la-fbimage.lo libwfb_la-fbline.lo \ + libwfb_la-fboverlay.lo libwfb_la-fbpict.lo \ + libwfb_la-fbpixmap.lo libwfb_la-fbpoint.lo libwfb_la-fbpush.lo \ + libwfb_la-fbscreen.lo libwfb_la-fbseg.lo libwfb_la-fbsetsp.lo \ + libwfb_la-fbsolid.lo libwfb_la-fbstipple.lo \ + libwfb_la-fbtile.lo libwfb_la-fbtrap.lo libwfb_la-fbutil.lo \ + libwfb_la-fbwindow.lo +am_libwfb_la_OBJECTS = $(am__objects_1) +libwfb_la_OBJECTS = $(am_libwfb_la_OBJECTS) +libwfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libwfb_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) +DIST_SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__sdk_HEADERS_DIST = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(sdkdir)" +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libfb.la libwfb.la +AM_CFLAGS = $(DIX_CFLAGS) +@XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h +libfb_la_CFLAGS = $(AM_CFLAGS) +libfb_la_LIBADD = $(PIXMAN_LIBS) +libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER +libwfb_la_LIBADD = $(PIXMAN_LIBS) +libfb_la_SOURCES = \ + fb.h \ + fb24_32.c \ + fb24_32.h \ + fballpriv.c \ + fbarc.c \ + fbbits.c \ + fbbits.h \ + fbblt.c \ + fbbltone.c \ + fbcopy.c \ + fbfill.c \ + fbfillrect.c \ + fbfillsp.c \ + fbgc.c \ + fbgetsp.c \ + fbglyph.c \ + fbimage.c \ + fbline.c \ + fboverlay.c \ + fboverlay.h \ + fbpict.c \ + fbpict.h \ + fbpixmap.c \ + fbpoint.c \ + fbpush.c \ + fbrop.h \ + fbscreen.c \ + fbseg.c \ + fbsetsp.c \ + fbsolid.c \ + fbstipple.c \ + fbtile.c \ + fbtrap.c \ + fbutil.c \ + fbwindow.c + +libwfb_la_SOURCES = $(libfb_la_SOURCES) +EXTRA_DIST = fbcmap_mi.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fb/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign fb/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libfb.la: $(libfb_la_OBJECTS) $(libfb_la_DEPENDENCIES) $(EXTRA_libfb_la_DEPENDENCIES) + $(AM_V_CCLD)$(libfb_la_LINK) $(libfb_la_OBJECTS) $(libfb_la_LIBADD) $(LIBS) +libwfb.la: $(libwfb_la_OBJECTS) $(libwfb_la_DEPENDENCIES) $(EXTRA_libwfb_la_DEPENDENCIES) + $(AM_V_CCLD)$(libwfb_la_LINK) $(libwfb_la_OBJECTS) $(libwfb_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fb24_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fballpriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbarc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbbits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbbltone.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbcopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfill.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfillrect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfillsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbgc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbgetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbglyph.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fboverlay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpict.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpoint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbscreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbseg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsolid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbstipple.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbtile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbtrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbwindow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fb24_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fballpriv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbarc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbbits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbblt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbbltone.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbcopy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfill.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfillrect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfillsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbgc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbgetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbglyph.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fboverlay.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpict.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpixmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpoint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbscreen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbseg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsetsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsolid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbstipple.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbtile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbtrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbwindow.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libfb_la-fb24_32.lo: fb24_32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fb24_32.lo -MD -MP -MF $(DEPDIR)/libfb_la-fb24_32.Tpo -c -o libfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fb24_32.Tpo $(DEPDIR)/libfb_la-fb24_32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fb24_32.c' object='libfb_la-fb24_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c + +libfb_la-fballpriv.lo: fballpriv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fballpriv.lo -MD -MP -MF $(DEPDIR)/libfb_la-fballpriv.Tpo -c -o libfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fballpriv.Tpo $(DEPDIR)/libfb_la-fballpriv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fballpriv.c' object='libfb_la-fballpriv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c + +libfb_la-fbarc.lo: fbarc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbarc.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbarc.Tpo -c -o libfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbarc.Tpo $(DEPDIR)/libfb_la-fbarc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbarc.c' object='libfb_la-fbarc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c + +libfb_la-fbbits.lo: fbbits.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbbits.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbbits.Tpo -c -o libfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbbits.Tpo $(DEPDIR)/libfb_la-fbbits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbits.c' object='libfb_la-fbbits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c + +libfb_la-fbblt.lo: fbblt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbblt.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbblt.Tpo -c -o libfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbblt.Tpo $(DEPDIR)/libfb_la-fbblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbblt.c' object='libfb_la-fbblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c + +libfb_la-fbbltone.lo: fbbltone.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbbltone.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbbltone.Tpo -c -o libfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbbltone.Tpo $(DEPDIR)/libfb_la-fbbltone.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbltone.c' object='libfb_la-fbbltone.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c + +libfb_la-fbcopy.lo: fbcopy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbcopy.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbcopy.Tpo -c -o libfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbcopy.Tpo $(DEPDIR)/libfb_la-fbcopy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbcopy.c' object='libfb_la-fbcopy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c + +libfb_la-fbfill.lo: fbfill.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfill.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfill.Tpo -c -o libfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbfill.Tpo $(DEPDIR)/libfb_la-fbfill.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfill.c' object='libfb_la-fbfill.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c + +libfb_la-fbfillrect.lo: fbfillrect.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfillrect.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfillrect.Tpo -c -o libfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbfillrect.Tpo $(DEPDIR)/libfb_la-fbfillrect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillrect.c' object='libfb_la-fbfillrect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c + +libfb_la-fbfillsp.lo: fbfillsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfillsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfillsp.Tpo -c -o libfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbfillsp.Tpo $(DEPDIR)/libfb_la-fbfillsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillsp.c' object='libfb_la-fbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c + +libfb_la-fbgc.lo: fbgc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbgc.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbgc.Tpo -c -o libfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbgc.Tpo $(DEPDIR)/libfb_la-fbgc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgc.c' object='libfb_la-fbgc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c + +libfb_la-fbgetsp.lo: fbgetsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbgetsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbgetsp.Tpo -c -o libfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbgetsp.Tpo $(DEPDIR)/libfb_la-fbgetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgetsp.c' object='libfb_la-fbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c + +libfb_la-fbglyph.lo: fbglyph.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbglyph.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbglyph.Tpo -c -o libfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbglyph.Tpo $(DEPDIR)/libfb_la-fbglyph.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbglyph.c' object='libfb_la-fbglyph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c + +libfb_la-fbimage.lo: fbimage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbimage.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbimage.Tpo -c -o libfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbimage.Tpo $(DEPDIR)/libfb_la-fbimage.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbimage.c' object='libfb_la-fbimage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c + +libfb_la-fbline.lo: fbline.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbline.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbline.Tpo -c -o libfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbline.Tpo $(DEPDIR)/libfb_la-fbline.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbline.c' object='libfb_la-fbline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c + +libfb_la-fboverlay.lo: fboverlay.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fboverlay.lo -MD -MP -MF $(DEPDIR)/libfb_la-fboverlay.Tpo -c -o libfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fboverlay.Tpo $(DEPDIR)/libfb_la-fboverlay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fboverlay.c' object='libfb_la-fboverlay.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c + +libfb_la-fbpict.lo: fbpict.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpict.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpict.Tpo -c -o libfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpict.Tpo $(DEPDIR)/libfb_la-fbpict.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpict.c' object='libfb_la-fbpict.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c + +libfb_la-fbpixmap.lo: fbpixmap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpixmap.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpixmap.Tpo -c -o libfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpixmap.Tpo $(DEPDIR)/libfb_la-fbpixmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpixmap.c' object='libfb_la-fbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c + +libfb_la-fbpoint.lo: fbpoint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpoint.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpoint.Tpo -c -o libfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpoint.Tpo $(DEPDIR)/libfb_la-fbpoint.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpoint.c' object='libfb_la-fbpoint.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c + +libfb_la-fbpush.lo: fbpush.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpush.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpush.Tpo -c -o libfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpush.Tpo $(DEPDIR)/libfb_la-fbpush.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpush.c' object='libfb_la-fbpush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c + +libfb_la-fbscreen.lo: fbscreen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbscreen.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbscreen.Tpo -c -o libfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbscreen.Tpo $(DEPDIR)/libfb_la-fbscreen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbscreen.c' object='libfb_la-fbscreen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c + +libfb_la-fbseg.lo: fbseg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbseg.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbseg.Tpo -c -o libfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbseg.Tpo $(DEPDIR)/libfb_la-fbseg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbseg.c' object='libfb_la-fbseg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c + +libfb_la-fbsetsp.lo: fbsetsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbsetsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbsetsp.Tpo -c -o libfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbsetsp.Tpo $(DEPDIR)/libfb_la-fbsetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsetsp.c' object='libfb_la-fbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c + +libfb_la-fbsolid.lo: fbsolid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbsolid.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbsolid.Tpo -c -o libfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbsolid.Tpo $(DEPDIR)/libfb_la-fbsolid.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsolid.c' object='libfb_la-fbsolid.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c + +libfb_la-fbstipple.lo: fbstipple.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbstipple.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbstipple.Tpo -c -o libfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbstipple.Tpo $(DEPDIR)/libfb_la-fbstipple.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbstipple.c' object='libfb_la-fbstipple.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c + +libfb_la-fbtile.lo: fbtile.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbtile.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbtile.Tpo -c -o libfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbtile.Tpo $(DEPDIR)/libfb_la-fbtile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtile.c' object='libfb_la-fbtile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c + +libfb_la-fbtrap.lo: fbtrap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbtrap.Tpo -c -o libfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbtrap.Tpo $(DEPDIR)/libfb_la-fbtrap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtrap.c' object='libfb_la-fbtrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c + +libfb_la-fbutil.lo: fbutil.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbutil.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbutil.Tpo -c -o libfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbutil.Tpo $(DEPDIR)/libfb_la-fbutil.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbutil.c' object='libfb_la-fbutil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c + +libfb_la-fbwindow.lo: fbwindow.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbwindow.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbwindow.Tpo -c -o libfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbwindow.Tpo $(DEPDIR)/libfb_la-fbwindow.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbwindow.c' object='libfb_la-fbwindow.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c + +libwfb_la-fb24_32.lo: fb24_32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fb24_32.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fb24_32.Tpo -c -o libwfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fb24_32.Tpo $(DEPDIR)/libwfb_la-fb24_32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fb24_32.c' object='libwfb_la-fb24_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fb24_32.lo `test -f 'fb24_32.c' || echo '$(srcdir)/'`fb24_32.c + +libwfb_la-fballpriv.lo: fballpriv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fballpriv.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fballpriv.Tpo -c -o libwfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fballpriv.Tpo $(DEPDIR)/libwfb_la-fballpriv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fballpriv.c' object='libwfb_la-fballpriv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c + +libwfb_la-fbarc.lo: fbarc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbarc.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbarc.Tpo -c -o libwfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbarc.Tpo $(DEPDIR)/libwfb_la-fbarc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbarc.c' object='libwfb_la-fbarc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c + +libwfb_la-fbbits.lo: fbbits.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbbits.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbbits.Tpo -c -o libwfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbbits.Tpo $(DEPDIR)/libwfb_la-fbbits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbits.c' object='libwfb_la-fbbits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c + +libwfb_la-fbblt.lo: fbblt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbblt.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbblt.Tpo -c -o libwfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbblt.Tpo $(DEPDIR)/libwfb_la-fbblt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbblt.c' object='libwfb_la-fbblt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c + +libwfb_la-fbbltone.lo: fbbltone.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbbltone.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbbltone.Tpo -c -o libwfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbbltone.Tpo $(DEPDIR)/libwfb_la-fbbltone.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbltone.c' object='libwfb_la-fbbltone.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c + +libwfb_la-fbcopy.lo: fbcopy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbcopy.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbcopy.Tpo -c -o libwfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbcopy.Tpo $(DEPDIR)/libwfb_la-fbcopy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbcopy.c' object='libwfb_la-fbcopy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c + +libwfb_la-fbfill.lo: fbfill.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfill.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfill.Tpo -c -o libwfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbfill.Tpo $(DEPDIR)/libwfb_la-fbfill.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfill.c' object='libwfb_la-fbfill.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c + +libwfb_la-fbfillrect.lo: fbfillrect.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfillrect.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfillrect.Tpo -c -o libwfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbfillrect.Tpo $(DEPDIR)/libwfb_la-fbfillrect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillrect.c' object='libwfb_la-fbfillrect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c + +libwfb_la-fbfillsp.lo: fbfillsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfillsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfillsp.Tpo -c -o libwfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbfillsp.Tpo $(DEPDIR)/libwfb_la-fbfillsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillsp.c' object='libwfb_la-fbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c + +libwfb_la-fbgc.lo: fbgc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbgc.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbgc.Tpo -c -o libwfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbgc.Tpo $(DEPDIR)/libwfb_la-fbgc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgc.c' object='libwfb_la-fbgc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c + +libwfb_la-fbgetsp.lo: fbgetsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbgetsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbgetsp.Tpo -c -o libwfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbgetsp.Tpo $(DEPDIR)/libwfb_la-fbgetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgetsp.c' object='libwfb_la-fbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c + +libwfb_la-fbglyph.lo: fbglyph.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbglyph.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbglyph.Tpo -c -o libwfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbglyph.Tpo $(DEPDIR)/libwfb_la-fbglyph.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbglyph.c' object='libwfb_la-fbglyph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c + +libwfb_la-fbimage.lo: fbimage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbimage.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbimage.Tpo -c -o libwfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbimage.Tpo $(DEPDIR)/libwfb_la-fbimage.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbimage.c' object='libwfb_la-fbimage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c + +libwfb_la-fbline.lo: fbline.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbline.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbline.Tpo -c -o libwfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbline.Tpo $(DEPDIR)/libwfb_la-fbline.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbline.c' object='libwfb_la-fbline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c + +libwfb_la-fboverlay.lo: fboverlay.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fboverlay.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fboverlay.Tpo -c -o libwfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fboverlay.Tpo $(DEPDIR)/libwfb_la-fboverlay.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fboverlay.c' object='libwfb_la-fboverlay.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c + +libwfb_la-fbpict.lo: fbpict.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpict.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpict.Tpo -c -o libwfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpict.Tpo $(DEPDIR)/libwfb_la-fbpict.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpict.c' object='libwfb_la-fbpict.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c + +libwfb_la-fbpixmap.lo: fbpixmap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpixmap.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpixmap.Tpo -c -o libwfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpixmap.Tpo $(DEPDIR)/libwfb_la-fbpixmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpixmap.c' object='libwfb_la-fbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c + +libwfb_la-fbpoint.lo: fbpoint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpoint.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpoint.Tpo -c -o libwfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpoint.Tpo $(DEPDIR)/libwfb_la-fbpoint.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpoint.c' object='libwfb_la-fbpoint.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c + +libwfb_la-fbpush.lo: fbpush.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpush.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpush.Tpo -c -o libwfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpush.Tpo $(DEPDIR)/libwfb_la-fbpush.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpush.c' object='libwfb_la-fbpush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c + +libwfb_la-fbscreen.lo: fbscreen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbscreen.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbscreen.Tpo -c -o libwfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbscreen.Tpo $(DEPDIR)/libwfb_la-fbscreen.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbscreen.c' object='libwfb_la-fbscreen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c + +libwfb_la-fbseg.lo: fbseg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbseg.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbseg.Tpo -c -o libwfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbseg.Tpo $(DEPDIR)/libwfb_la-fbseg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbseg.c' object='libwfb_la-fbseg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c + +libwfb_la-fbsetsp.lo: fbsetsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbsetsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbsetsp.Tpo -c -o libwfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbsetsp.Tpo $(DEPDIR)/libwfb_la-fbsetsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsetsp.c' object='libwfb_la-fbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c + +libwfb_la-fbsolid.lo: fbsolid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbsolid.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbsolid.Tpo -c -o libwfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbsolid.Tpo $(DEPDIR)/libwfb_la-fbsolid.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsolid.c' object='libwfb_la-fbsolid.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c + +libwfb_la-fbstipple.lo: fbstipple.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbstipple.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbstipple.Tpo -c -o libwfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbstipple.Tpo $(DEPDIR)/libwfb_la-fbstipple.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbstipple.c' object='libwfb_la-fbstipple.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c + +libwfb_la-fbtile.lo: fbtile.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbtile.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbtile.Tpo -c -o libwfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbtile.Tpo $(DEPDIR)/libwfb_la-fbtile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtile.c' object='libwfb_la-fbtile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c + +libwfb_la-fbtrap.lo: fbtrap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbtrap.Tpo -c -o libwfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbtrap.Tpo $(DEPDIR)/libwfb_la-fbtrap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtrap.c' object='libwfb_la-fbtrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c + +libwfb_la-fbutil.lo: fbutil.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbutil.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbutil.Tpo -c -o libwfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbutil.Tpo $(DEPDIR)/libwfb_la-fbutil.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbutil.c' object='libwfb_la-fbutil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c + +libwfb_la-fbwindow.lo: fbwindow.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbwindow.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbwindow.Tpo -c -o libwfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbwindow.Tpo $(DEPDIR)/libwfb_la-fbwindow.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbwindow.c' object='libwfb_la-fbwindow.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-sdkHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -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-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS + + +# 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/fb/fb.h b/fb/fb.h new file mode 100644 index 0000000..26957df --- /dev/null +++ b/fb/fb.h @@ -0,0 +1,1660 @@ +/* + * + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _FB_H_ +#define _FB_H_ + +#include +#include + +#include "scrnintstr.h" +#include "pixmap.h" +#include "pixmapstr.h" +#include "region.h" +#include "gcstruct.h" +#include "colormap.h" +#include "miscstruct.h" +#include "servermd.h" +#include "windowstr.h" +#include "privates.h" +#include "mi.h" +#include "migc.h" +#include "picturestr.h" + +#ifdef FB_ACCESS_WRAPPER + +#include "wfbrename.h" +#define FBPREFIX(x) wfb##x +#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr)))) +#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr)))) + +#define MEMCPY_WRAPPED(dst, src, size) do { \ + size_t _i; \ + CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \ + for(_i = 0; _i < size; _i++) { \ + WRITE(_dst +_i, READ(_src + _i)); \ + } \ +} while(0) + +#define MEMSET_WRAPPED(dst, val, size) do { \ + size_t _i; \ + CARD8 *_dst = (CARD8*)(dst); \ + for(_i = 0; _i < size; _i++) { \ + WRITE(_dst +_i, (val)); \ + } \ +} while(0) + +#else + +#define FBPREFIX(x) fb##x +#define WRITE(ptr, val) (*(ptr) = (val)) +#define READ(ptr) (*(ptr)) +#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size)) +#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size)) + +#endif + +/* + * This single define controls the basic size of data manipulated + * by this software; it must be log2(sizeof (FbBits) * 8) + */ + +#ifndef FB_SHIFT +#define FB_SHIFT LOG2_BITMAP_PAD +#endif + +#if FB_SHIFT < LOG2_BITMAP_PAD +error FB_SHIFT must be >= LOG2_BITMAP_PAD +#endif +#define FB_UNIT (1 << FB_SHIFT) +#define FB_HALFUNIT (1 << (FB_SHIFT-1)) +#define FB_MASK (FB_UNIT - 1) +#define FB_ALLONES ((FbBits) -1) +#if GLYPHPADBYTES != 4 +#error "GLYPHPADBYTES must be 4" +#endif +/* for driver compat - intel UXA needs the second one at least */ +#define FB_24BIT +#define FB_24_32BIT +#define FB_STIP_SHIFT LOG2_BITMAP_PAD +#define FB_STIP_UNIT (1 << FB_STIP_SHIFT) +#define FB_STIP_MASK (FB_STIP_UNIT - 1) +#define FB_STIP_ALLONES ((FbStip) -1) +#define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0) +#define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0) +#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT))) +#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT))) +#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1)) +#if FB_SHIFT == 6 +#ifdef WIN32 +typedef unsigned __int64 FbBits; +#else +#if defined(__alpha__) || defined(__alpha) || \ + defined(ia64) || defined(__ia64__) || \ + defined(__sparc64__) || defined(_LP64) || \ + defined(__s390x__) || \ + defined(amd64) || defined (__amd64__) || \ + defined (__powerpc64__) +typedef unsigned long FbBits; +#else +typedef unsigned long long FbBits; +#endif +#endif +#endif + +#if FB_SHIFT == 5 +typedef CARD32 FbBits; +#endif + +#if FB_SHIFT == 4 +typedef CARD16 FbBits; +#endif + +#if LOG2_BITMAP_PAD == FB_SHIFT +typedef FbBits FbStip; +#else +#if LOG2_BITMAP_PAD == 5 +typedef CARD32 FbStip; +#endif +#endif + +typedef int FbStride; + +#ifdef FB_DEBUG +extern _X_EXPORT void fbValidateDrawable(DrawablePtr d); +extern _X_EXPORT void fbInitializeDrawable(DrawablePtr d); +extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data); + +#define FB_HEAD_BITS (FbStip) (0xbaadf00d) +#define FB_TAIL_BITS (FbStip) (0xbaddf0ad) +#else +#define fbValidateDrawable(d) +#define fdInitializeDrawable(d) +#endif + +#include "fbrop.h" + +#if BITMAP_BIT_ORDER == LSBFirst +#define FbScrLeft(x,n) ((x) >> (n)) +#define FbScrRight(x,n) ((x) << (n)) +/* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */ +#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1)) +#define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n))) +#define FbPatternOffsetBits 0 +#else +#define FbScrLeft(x,n) ((x) << (n)) +#define FbScrRight(x,n) ((x) >> (n)) +/* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */ +#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n))) +#define FbStipMoveLsb(x,s,n) (x) +#define FbPatternOffsetBits (sizeof (FbBits) - 1) +#endif + +#include "micoord.h" + +#define FbStipLeft(x,n) FbScrLeft(x,n) +#define FbStipRight(x,n) FbScrRight(x,n) + +#define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0) +#define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0) + +#define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0) +#define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0) + +#define FbLeftMask(x) ( ((x) & FB_MASK) ? \ + FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0) +#define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \ + FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0) + +#define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \ + FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0) +#define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \ + FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0) + +#define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \ + FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK)) + +#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \ + FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK)) + +#define FbMaskBits(x,w,l,n,r) { \ + n = (w); \ + r = FbRightMask((x)+n); \ + l = FbLeftMask(x); \ + if (l) { \ + n -= FB_UNIT - ((x) & FB_MASK); \ + if (n < 0) { \ + n = 0; \ + l &= r; \ + r = 0; \ + } \ + } \ + n >>= FB_SHIFT; \ +} + +#define FbByteMaskInvalid 0x10 + +#define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1))) + +#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o))) +#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3)) +#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \ + FbSelectPart(xor,off,t))) +#ifndef FbSelectPart +#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t) +#endif + +#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \ + n = (w); \ + lb = 0; \ + rb = 0; \ + r = FbRightMask((x)+n); \ + if (r) { \ + /* compute right byte length */ \ + if ((copy) && (((x) + n) & 7) == 0) { \ + rb = (((x) + n) & FB_MASK) >> 3; \ + } else { \ + rb = FbByteMaskInvalid; \ + } \ + } \ + l = FbLeftMask(x); \ + if (l) { \ + /* compute left byte length */ \ + if ((copy) && ((x) & 7) == 0) { \ + lb = ((x) & FB_MASK) >> 3; \ + } else { \ + lb = FbByteMaskInvalid; \ + } \ + /* subtract out the portion painted by leftMask */ \ + n -= FB_UNIT - ((x) & FB_MASK); \ + if (n < 0) { \ + if (lb != FbByteMaskInvalid) { \ + if (rb == FbByteMaskInvalid) { \ + lb = FbByteMaskInvalid; \ + } else if (rb) { \ + lb |= (rb - lb) << (FB_SHIFT - 3); \ + rb = 0; \ + } \ + } \ + n = 0; \ + l &= r; \ + r = 0; \ + }\ + } \ + n >>= FB_SHIFT; \ +} + +#if FB_SHIFT == 6 +#define FbDoLeftMaskByteRRop6Cases(dst,xor) \ + case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 7): \ + FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 6): \ + FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 5): \ + FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; \ + case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + break; \ + case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 4): \ + FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \ + break; + +#define FbDoRightMaskByteRRop6Cases(dst,xor) \ + case 4: \ + FbStorePart(dst,0,CARD32,xor); \ + break; \ + case 5: \ + FbStorePart(dst,0,CARD32,xor); \ + FbStorePart(dst,4,CARD8,xor); \ + break; \ + case 6: \ + FbStorePart(dst,0,CARD32,xor); \ + FbStorePart(dst,4,CARD16,xor); \ + break; \ + case 7: \ + FbStorePart(dst,0,CARD32,xor); \ + FbStorePart(dst,4,CARD16,xor); \ + FbStorePart(dst,6,CARD8,xor); \ + break; +#else +#define FbDoLeftMaskByteRRop6Cases(dst,xor) +#define FbDoRightMaskByteRRop6Cases(dst,xor) +#endif + +#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \ + switch (lb) { \ + FbDoLeftMaskByteRRop6Cases(dst,xor) \ + case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ + break; \ + case sizeof (FbBits) - 3: \ + FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ + case sizeof (FbBits) - 2: \ + FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \ + break; \ + case sizeof (FbBits) - 1: \ + FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \ + break; \ + default: \ + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \ + break; \ + } \ +} + +#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \ + switch (rb) { \ + case 1: \ + FbStorePart(dst,0,CARD8,xor); \ + break; \ + case 2: \ + FbStorePart(dst,0,CARD16,xor); \ + break; \ + case 3: \ + FbStorePart(dst,0,CARD16,xor); \ + FbStorePart(dst,2,CARD8,xor); \ + break; \ + FbDoRightMaskByteRRop6Cases(dst,xor) \ + default: \ + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \ + } \ +} + +#define FbMaskStip(x,w,l,n,r) { \ + n = (w); \ + r = FbRightStipMask((x)+n); \ + l = FbLeftStipMask(x); \ + if (l) { \ + n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \ + if (n < 0) { \ + n = 0; \ + l &= r; \ + r = 0; \ + } \ + } \ + n >>= FB_STIP_SHIFT; \ +} + +/* + * These macros are used to transparently stipple + * in copy mode; the expected usage is with 'n' constant + * so all of the conditional parts collapse into a minimal + * sequence of partial word writes + * + * 'n' is the bytemask of which bytes to store, 'a' is the address + * of the FbBits base unit, 'o' is the offset within that unit + * + * The term "lane" comes from the hardware term "byte-lane" which + */ + +#define FbLaneCase1(n,a,o) \ + if ((n) == 0x01) { \ + WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor); \ + } + +#define FbLaneCase2(n,a,o) \ + if ((n) == 0x03) { \ + WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor); \ + } else { \ + FbLaneCase1((n)&1,a,o) \ + FbLaneCase1((n)>>1,a,(o)+1) \ + } + +#define FbLaneCase4(n,a,o) \ + if ((n) == 0x0f) { \ + WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor); \ + } else { \ + FbLaneCase2((n)&3,a,o) \ + FbLaneCase2((n)>>2,a,(o)+2) \ + } + +#define FbLaneCase8(n,a,o) \ + if ((n) == 0x0ff) { \ + *(FbBits *) ((a)+(o)) = fgxor; \ + } else { \ + FbLaneCase4((n)&15,a,o) \ + FbLaneCase4((n)>>4,a,(o)+4) \ + } + +#if FB_SHIFT == 6 +#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0) +#endif + +#if FB_SHIFT == 5 +#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0) +#endif + +/* Rotate a filled pixel value to the specified alignement */ +#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b))) +#define FbRot24Stip(p,b) (FbStipRight(p,b) | FbStipLeft(p,24-(b))) + +/* step a filled pixel value to the next/previous FB_UNIT alignment */ +#define FbNext24Pix(p) (FbRot24(p,(24-FB_UNIT%24))) +#define FbPrev24Pix(p) (FbRot24(p,FB_UNIT%24)) +#define FbNext24Stip(p) (FbRot24(p,(24-FB_STIP_UNIT%24))) +#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24)) + +/* step a rotation value to the next/previous rotation value */ +#if FB_UNIT == 64 +#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8) +#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8) + +#if IMAGE_BYTE_ORDER == MSBFirst +#define FbFirst24Rot(x) (((x) + 8) % 24) +#else +#define FbFirst24Rot(x) ((x) % 24) +#endif + +#endif + +#if FB_UNIT == 32 +#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8) +#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8) + +#if IMAGE_BYTE_ORDER == MSBFirst +#define FbFirst24Rot(x) (((x) + 16) % 24) +#else +#define FbFirst24Rot(x) ((x) % 24) +#endif +#endif + +#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8) +#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8) + +/* Whether 24-bit specific code is needed for this filled pixel value */ +#define FbCheck24Pix(p) ((p) == FbNext24Pix(p)) + +/* Macros for dealing with dashing */ + +#define FbDashDeclare \ + unsigned char *__dash, *__firstDash, *__lastDash + +#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \ + (even) = TRUE; \ + __firstDash = (pGC)->dash; \ + __lastDash = __firstDash + (pGC)->numInDashList; \ + (dashOffset) %= (pPriv)->dashLength; \ + \ + __dash = __firstDash; \ + while ((dashOffset) >= ((dashlen) = *__dash)) \ + { \ + (dashOffset) -= (dashlen); \ + (even) = 1-(even); \ + if (++__dash == __lastDash) \ + __dash = __firstDash; \ + } \ + (dashlen) -= (dashOffset); \ +} + +#define FbDashNext(dashlen) { \ + if (++__dash == __lastDash) \ + __dash = __firstDash; \ + (dashlen) = *__dash; \ +} + +/* as numInDashList is always even, this case can skip a test */ + +#define FbDashNextEven(dashlen) { \ + (dashlen) = *++__dash; \ +} + +#define FbDashNextOdd(dashlen) FbDashNext(dashlen) + +#define FbDashStep(dashlen,even) { \ + if (!--(dashlen)) { \ + FbDashNext(dashlen); \ + (even) = 1-(even); \ + } \ +} + +extern _X_EXPORT const GCOps fbGCOps; +extern _X_EXPORT const GCFuncs fbGCFuncs; + +/* Framebuffer access wrapper */ +typedef FbBits(*ReadMemoryProcPtr) (const void *src, int size); +typedef void (*WriteMemoryProcPtr) (void *dst, FbBits value, int size); +typedef void (*SetupWrapProcPtr) (ReadMemoryProcPtr * pRead, + WriteMemoryProcPtr * pWrite, + DrawablePtr pDraw); +typedef void (*FinishWrapProcPtr) (DrawablePtr pDraw); + +#ifdef FB_ACCESS_WRAPPER + +#define fbPrepareAccess(pDraw) \ + fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \ + &wfbReadMemory, \ + &wfbWriteMemory, \ + (pDraw)) +#define fbFinishAccess(pDraw) \ + fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw) + +#else + +#define fbPrepareAccess(pPix) +#define fbFinishAccess(pDraw) + +#endif + +extern _X_EXPORT DevPrivateKey +fbGetScreenPrivateKey(void); + +/* private field of a screen */ +typedef struct { + unsigned char win32bpp; /* window bpp for 32-bpp images */ + unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */ +#ifdef FB_ACCESS_WRAPPER + SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */ + FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */ +#endif + DevPrivateKeyRec gcPrivateKeyRec; + DevPrivateKeyRec winPrivateKeyRec; +} FbScreenPrivRec, *FbScreenPrivPtr; + +#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey())) + +/* private field of GC */ +typedef struct { + FbBits and, xor; /* reduced rop values */ + FbBits bgand, bgxor; /* for stipples */ + FbBits fg, bg, pm; /* expanded and filled */ + unsigned int dashLength; /* total of all dash elements */ + unsigned char evenStipple; /* stipple is even */ + unsigned char bpp; /* current drawable bpp */ +} FbGCPrivRec, *FbGCPrivPtr; + +#define fbGetGCPrivateKey(pGC) (&fbGetScreenPrivate((pGC)->pScreen)->gcPrivateKeyRec) + +#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\ + dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey(pGC))) + +#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip) +#define fbGetExpose(pGC) ((pGC)->fExpose) +#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip) +#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap) + +#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate) + +#define fbGetWinPrivateKey(pWin) (&fbGetScreenPrivate(((DrawablePtr) (pWin))->pScreen)->winPrivateKeyRec) + +#define fbGetWindowPixmap(pWin) ((PixmapPtr)\ + dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey(pWin))) + +#ifdef ROOTLESS +#define __fbPixDrawableX(pPix) ((pPix)->drawable.x) +#define __fbPixDrawableY(pPix) ((pPix)->drawable.y) +#else +#define __fbPixDrawableX(pPix) 0 +#define __fbPixDrawableY(pPix) 0 +#endif + +#ifdef COMPOSITE +#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x) +#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y) +#else +#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix)) +#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix)) +#endif +#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix)) +#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix)) + +#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \ + if ((pDrawable)->type != DRAWABLE_PIXMAP) { \ + (pixmap) = fbGetWindowPixmap(pDrawable); \ + (xoff) = __fbPixOffXWin(pixmap); \ + (yoff) = __fbPixOffYWin(pixmap); \ + } else { \ + (pixmap) = (PixmapPtr) (pDrawable); \ + (xoff) = __fbPixOffXPix(pixmap); \ + (yoff) = __fbPixOffYPix(pixmap); \ + } \ + fbPrepareAccess(pDrawable); \ +} + +#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) { \ + (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; \ + (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride); \ + (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \ +} + +#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) { \ + (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; \ + (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride); \ + (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \ +} + +#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ + PixmapPtr _pPix; \ + fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \ + fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \ +} + +#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ + PixmapPtr _pPix; \ + fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \ + fbGetPixmapStipData(_pPix, pointer, stride, bpp); \ +} + +/* + * XFree86 empties the root BorderClip when the VT is inactive, + * here's a macro which uses that to disable GetImage and GetSpans + */ + +#define fbWindowEnabled(pWin) \ + RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip) + +#define fbDrawableEnabled(pDrawable) \ + ((pDrawable)->type == DRAWABLE_PIXMAP ? \ + TRUE : fbWindowEnabled((WindowPtr) pDrawable)) + +#define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0) +/* + * Accelerated tiles are power of 2 width <= FB_UNIT + */ +#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w)) +/* + * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp + * with dstBpp a power of 2 as well + */ +#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp)) + +/* + * fb24_32.c + */ +extern _X_EXPORT void + +fb24_32GetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart); + +extern _X_EXPORT void + +fb24_32SetSpans(DrawablePtr pDrawable, + GCPtr pGC, + char *src, + DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); + +extern _X_EXPORT void + +fb24_32PutZImage(DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, int width, int height, CARD8 *src, FbStride srcStride); + +extern _X_EXPORT void + +fb24_32GetImage(DrawablePtr pDrawable, + int x, + int y, + int w, + int h, unsigned int format, unsigned long planeMask, char *d); + +extern _X_EXPORT void + +fb24_32CopyMtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); + +extern _X_EXPORT PixmapPtr + fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel); + +extern _X_EXPORT Bool + fb24_32CreateScreenResources(ScreenPtr pScreen); + +extern _X_EXPORT Bool + +fb24_32ModifyPixmapHeader(PixmapPtr pPixmap, + int width, + int height, + int depth, + int bitsPerPixel, int devKind, pointer pPixData); + +/* + * fballpriv.c + */ +extern _X_EXPORT Bool +fbAllocatePrivates(ScreenPtr pScreen); + +/* + * fbarc.c + */ + +extern _X_EXPORT void +fbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs); + +/* + * fbbits.c + */ + +extern _X_EXPORT void + +fbBresSolid8(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbBresDash8(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbDots8(FbBits * dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * pts, + int npt, + int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbArc8(FbBits * dst, + FbStride dstStride, + int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbGlyph8(FbBits * dstLine, + FbStride dstStride, + int dstBpp, FbStip * stipple, FbBits fg, int height, int shift); + +extern _X_EXPORT void + +fbPolyline8(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); + +extern _X_EXPORT void + fbPolySegment8(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); + +extern _X_EXPORT void + +fbBresSolid16(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbBresDash16(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbDots16(FbBits * dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * pts, + int npt, + int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbArc16(FbBits * dst, + FbStride dstStride, + int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbGlyph16(FbBits * dstLine, + FbStride dstStride, + int dstBpp, FbStip * stipple, FbBits fg, int height, int shift); + +extern _X_EXPORT void + +fbPolyline16(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); + +extern _X_EXPORT void + fbPolySegment16(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); + +extern _X_EXPORT void + +fbBresSolid24(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbBresDash24(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbDots24(FbBits * dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * pts, + int npt, + int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbArc24(FbBits * dst, + FbStride dstStride, + int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbGlyph24(FbBits * dstLine, + FbStride dstStride, + int dstBpp, FbStip * stipple, FbBits fg, int height, int shift); + +extern _X_EXPORT void + +fbPolyline24(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); + +extern _X_EXPORT void + fbPolySegment24(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); + +extern _X_EXPORT void + +fbBresSolid32(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbBresDash32(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbDots32(FbBits * dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * pts, + int npt, + int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbArc32(FbBits * dst, + FbStride dstStride, + int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbGlyph32(FbBits * dstLine, + FbStride dstStride, + int dstBpp, FbStip * stipple, FbBits fg, int height, int shift); +extern _X_EXPORT void + +fbPolyline32(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); + +extern _X_EXPORT void + fbPolySegment32(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); + +/* + * fbblt.c + */ +extern _X_EXPORT void + +fbBlt(FbBits * src, + FbStride srcStride, + int srcX, + FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown); + +extern _X_EXPORT void + +fbBlt24(FbBits * srcLine, + FbStride srcStride, + int srcX, + FbBits * dstLine, + FbStride dstStride, + int dstX, + int width, + int height, int alu, FbBits pm, Bool reverse, Bool upsidedown); + +extern _X_EXPORT void + fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */ + int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */ + int dstX, int width, int height, int alu, FbBits pm, int bpp); + +/* + * fbbltone.c + */ +extern _X_EXPORT void + +fbBltOne(FbStip * src, + FbStride srcStride, + int srcX, + FbBits * dst, + FbStride dstStride, + int dstX, + int dstBpp, + int width, + int height, FbBits fgand, FbBits fbxor, FbBits bgand, FbBits bgxor); + +extern _X_EXPORT void + fbBltOne24(FbStip * src, FbStride srcStride, /* FbStip units per scanline */ + int srcX, /* bit position of source */ + FbBits * dst, FbStride dstStride, /* FbBits units per scanline */ + int dstX, /* bit position of dest */ + int dstBpp, /* bits per destination unit */ + int width, /* width in bits of destination */ + int height, /* height in scanlines */ + FbBits fgand, /* rrop values */ + FbBits fgxor, FbBits bgand, FbBits bgxor); + +extern _X_EXPORT void + +fbBltPlane(FbBits * src, + FbStride srcStride, + int srcX, + int srcBpp, + FbStip * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbStip fgand, + FbStip fgxor, FbStip bgand, FbStip bgxor, Pixel planeMask); + +/* + * fbcmap_mi.c + */ +extern _X_EXPORT int + fbListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps); + +extern _X_EXPORT void + fbInstallColormap(ColormapPtr pmap); + +extern _X_EXPORT void + fbUninstallColormap(ColormapPtr pmap); + +extern _X_EXPORT void + +fbResolveColor(unsigned short *pred, + unsigned short *pgreen, + unsigned short *pblue, VisualPtr pVisual); + +extern _X_EXPORT Bool + fbInitializeColormap(ColormapPtr pmap); + +extern _X_EXPORT int + +fbExpandDirectColors(ColormapPtr pmap, + int ndef, xColorItem * indefs, xColorItem * outdefs); + +extern _X_EXPORT Bool + fbCreateDefColormap(ScreenPtr pScreen); + +extern _X_EXPORT void + fbClearVisualTypes(void); + +extern _X_EXPORT Bool + fbHasVisualTypes(int depth); + +extern _X_EXPORT Bool + fbSetVisualTypes(int depth, int visuals, int bitsPerRGB); + +extern _X_EXPORT Bool + +fbSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, + Pixel redMask, Pixel greenMask, Pixel blueMask); + +extern _X_EXPORT Bool + +fbInitVisuals(VisualPtr * visualp, + DepthPtr * depthp, + int *nvisualp, + int *ndepthp, + int *rootDepthp, + VisualID * defaultVisp, unsigned long sizes, int bitsPerRGB); + +/* + * fbcopy.c + */ + +extern _X_EXPORT void + +fbCopyNtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); + +extern _X_EXPORT void + +fbCopy1toN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); + +extern _X_EXPORT void + +fbCopyNto1(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); + +extern _X_EXPORT RegionPtr + +fbCopyArea(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut); + +extern _X_EXPORT RegionPtr + +fbCopyPlane(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, int xOut, int yOut, unsigned long bitplane); + +/* + * fbfill.c + */ +extern _X_EXPORT void + fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height); + +extern _X_EXPORT void + +fbSolidBoxClipped(DrawablePtr pDrawable, + RegionPtr pClip, + int xa, int ya, int xb, int yb, FbBits and, FbBits xor); + +/* + * fbfillrect.c + */ +extern _X_EXPORT void + +fbPolyFillRect(DrawablePtr pDrawable, + GCPtr pGC, int nrectInit, xRectangle *prectInit); + +#define fbPolyFillArc miPolyFillArc + +#define fbFillPolygon miFillPolygon + +/* + * fbfillsp.c + */ +extern _X_EXPORT void + +fbFillSpans(DrawablePtr pDrawable, + GCPtr pGC, + int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted); + +/* + * fbgc.c + */ + +extern _X_EXPORT Bool + fbCreateGC(GCPtr pGC); + +extern _X_EXPORT void + fbPadPixmap(PixmapPtr pPixmap); + +extern _X_EXPORT void + fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); + +/* + * fbgetsp.c + */ +extern _X_EXPORT void + +fbGetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart); + +/* + * fbglyph.c + */ + +extern _X_EXPORT Bool + fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height); + +extern _X_EXPORT void + +fbPolyGlyphBlt(DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, CharInfoPtr * ppci, pointer pglyphBase); + +extern _X_EXPORT void + +fbImageGlyphBlt(DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, CharInfoPtr * ppci, pointer pglyphBase); + +/* + * fbimage.c + */ + +extern _X_EXPORT void + +fbPutImage(DrawablePtr pDrawable, + GCPtr pGC, + int depth, + int x, int y, int w, int h, int leftPad, int format, char *pImage); + +extern _X_EXPORT void + +fbPutZImage(DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, int width, int height, FbStip * src, FbStride srcStride); + +extern _X_EXPORT void + +fbPutXYImage(DrawablePtr pDrawable, + RegionPtr pClip, + FbBits fg, + FbBits bg, + FbBits pm, + int alu, + Bool opaque, + int x, + int y, + int width, int height, FbStip * src, FbStride srcStride, int srcX); + +extern _X_EXPORT void + +fbGetImage(DrawablePtr pDrawable, + int x, + int y, + int w, int h, unsigned int format, unsigned long planeMask, char *d); +/* + * fbline.c + */ + +extern _X_EXPORT void + +fbZeroLine(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, DDXPointPtr ppt); + +extern _X_EXPORT void + fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs); + +extern _X_EXPORT void + +fbPolyLine(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, DDXPointPtr ppt); + +extern _X_EXPORT void + fbFixCoordModePrevious(int npt, DDXPointPtr ppt); + +extern _X_EXPORT void + fbPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); + +#define fbPolyRectangle miPolyRectangle + +/* + * fbpict.c + */ + +extern _X_EXPORT Bool + fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats); + +extern _X_EXPORT void +fbDestroyGlyphCache(void); + +/* + * fbpixmap.c + */ + +extern _X_EXPORT PixmapPtr + +fbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp, + unsigned usage_hint); + +extern _X_EXPORT PixmapPtr + +fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, + unsigned usage_hint); + +extern _X_EXPORT Bool + fbDestroyPixmap(PixmapPtr pPixmap); + +extern _X_EXPORT RegionPtr + fbPixmapToRegion(PixmapPtr pPix); + +/* + * fbpoint.c + */ + +extern _X_EXPORT void + +fbDots(FbBits * dstOrig, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * pts, + int npt, + int xorg, int yorg, int xoff, int yoff, FbBits andOrig, FbBits xorOrig); + +extern _X_EXPORT void + +fbPolyPoint(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, xPoint * pptInit); + +/* + * fbpush.c + */ +extern _X_EXPORT void + +fbPushPattern(DrawablePtr pDrawable, + GCPtr pGC, + FbStip * src, + FbStride srcStride, + int srcX, int x, int y, int width, int height); + +extern _X_EXPORT void + +fbPushFill(DrawablePtr pDrawable, + GCPtr pGC, + FbStip * src, + FbStride srcStride, int srcX, int x, int y, int width, int height); + +extern _X_EXPORT void + +fbPushImage(DrawablePtr pDrawable, + GCPtr pGC, + FbStip * src, + FbStride srcStride, int srcX, int x, int y, int width, int height); + +extern _X_EXPORT void + +fbPushPixels(GCPtr pGC, + PixmapPtr pBitmap, + DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg); + +/* + * fbscreen.c + */ + +extern _X_EXPORT Bool + fbCloseScreen(ScreenPtr pScreen); + +extern _X_EXPORT Bool + fbRealizeFont(ScreenPtr pScreen, FontPtr pFont); + +extern _X_EXPORT Bool + fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont); + +extern _X_EXPORT void + +fbQueryBestSize(int class, + unsigned short *width, unsigned short *height, + ScreenPtr pScreen); + +extern _X_EXPORT PixmapPtr + _fbGetWindowPixmap(WindowPtr pWindow); + +extern _X_EXPORT void + _fbSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap); + +extern _X_EXPORT Bool + fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */ + int xsize, /* in pixels */ + int ysize, int dpix, /* dots per inch */ + int dpiy, int width, /* pixel width of frame buffer */ + int bpp); /* bits per pixel of frame buffer */ + +extern _X_EXPORT Bool + +wfbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); + +extern _X_EXPORT Bool + +wfbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); + +extern _X_EXPORT Bool + +fbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, int dpix, int dpiy, int width, int bpp); + +extern _X_EXPORT Bool + +fbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, int ysize, int dpix, int dpiy, int width, int bpp); + +/* + * fbseg.c + */ +typedef void FbBres(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash; + +/* + * fbsetsp.c + */ + +extern _X_EXPORT void + +fbSetSpans(DrawablePtr pDrawable, + GCPtr pGC, + char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); + +extern _X_EXPORT FbBres *fbSelectBres(DrawablePtr pDrawable, GCPtr pGC); + +extern _X_EXPORT void + +fbBres(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, int axis, int x, int y, int e, int e1, int e3, int len); + +extern _X_EXPORT void + +fbSegment(DrawablePtr pDrawable, + GCPtr pGC, + int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset); + +/* + * fbsolid.c + */ + +extern _X_EXPORT void + +fbSolid(FbBits * dst, + FbStride dstStride, + int dstX, int bpp, int width, int height, FbBits and, FbBits xor); + +extern _X_EXPORT void + +fbSolid24(FbBits * dst, + FbStride dstStride, + int dstX, int width, int height, FbBits and, FbBits xor); + +/* + * fbstipple.c + */ + +extern _X_EXPORT void + fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n); + +extern _X_EXPORT void + +fbEvenStipple(FbBits * dst, + FbStride dstStride, + int dstX, + int dstBpp, + int width, + int height, + FbStip * stip, + FbStride stipStride, + int stipHeight, + FbBits fgand, + FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot); + +extern _X_EXPORT void + +fbOddStipple(FbBits * dst, + FbStride dstStride, + int dstX, + int dstBpp, + int width, + int height, + FbStip * stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + FbBits fgand, + FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot); + +extern _X_EXPORT void + +fbStipple(FbBits * dst, + FbStride dstStride, + int dstX, + int dstBpp, + int width, + int height, + FbStip * stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + Bool even, + FbBits fgand, + FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot); + +/* + * fbtile.c + */ + +extern _X_EXPORT void + +fbEvenTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileHeight, int alu, FbBits pm, int xRot, int yRot); + +extern _X_EXPORT void + +fbOddTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileWidth, + int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot); + +extern _X_EXPORT void + +fbTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileWidth, + int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot); + +/* + * fbutil.c + */ +extern _X_EXPORT FbBits fbReplicatePixel(Pixel p, int bpp); + +extern _X_EXPORT void + fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp); + +#ifdef FB_ACCESS_WRAPPER +extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory; +extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory; +#endif + +/* + * fbwindow.c + */ + +extern _X_EXPORT Bool + fbCreateWindow(WindowPtr pWin); + +extern _X_EXPORT Bool + fbDestroyWindow(WindowPtr pWin); + +extern _X_EXPORT Bool + fbMapWindow(WindowPtr pWindow); + +extern _X_EXPORT Bool + fbPositionWindow(WindowPtr pWin, int x, int y); + +extern _X_EXPORT Bool + fbUnmapWindow(WindowPtr pWindow); + +extern _X_EXPORT void + +fbCopyWindowProc(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); + +extern _X_EXPORT void + fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +extern _X_EXPORT Bool + fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask); + +extern _X_EXPORT void + +fbFillRegionSolid(DrawablePtr pDrawable, + RegionPtr pRegion, FbBits and, FbBits xor); + +extern _X_EXPORT pixman_image_t *image_from_pict(PicturePtr pict, + Bool has_clip, + int *xoff, int *yoff); + +extern _X_EXPORT void free_pixman_pict(PicturePtr, pixman_image_t *); + +#endif /* _FB_H_ */ diff --git a/fb/fb24_32.c b/fb/fb24_32.c new file mode 100644 index 0000000..5eb81e8 --- /dev/null +++ b/fb/fb24_32.c @@ -0,0 +1,548 @@ +/* + * Copyright © 2000 SuSE, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +/* X apps don't like 24bpp images, this code exposes 32bpp images */ + +/* + * These two functions do a full CopyArea while reformatting + * the data between 24 and 32bpp. They try to go a bit faster + * by reading/writing aligned CARD32s where it's easy + */ + +#define Get8(a) ((CARD32) READ(a)) + +#if BITMAP_BIT_ORDER == MSBFirst +#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2)) +#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \ + (WRITE((a+1), (CARD8) ((p) >> 8))), \ + (WRITE((a+2), (CARD8) (p)))) +#else +#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16)) +#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \ + (WRITE((a+1), (CARD8) ((p) >> 8))), \ + (WRITE((a+2), (CARD8) ((p) >> 16)))) +#endif + +typedef void (*fb24_32BltFunc) (CARD8 *srcLine, + FbStride srcStride, + int srcX, + CARD8 *dstLine, + FbStride dstStride, + int dstX, + int width, int height, int alu, FbBits pm); + +static void +fb24_32BltDown(CARD8 *srcLine, + FbStride srcStride, + int srcX, + CARD8 *dstLine, + FbStride dstStride, + int dstX, int width, int height, int alu, FbBits pm) +{ + CARD32 *src; + CARD8 *dst; + int w; + Bool destInvarient; + CARD32 pixel, dpixel; + + FbDeclareMergeRop(); + + srcLine += srcX * 4; + dstLine += dstX * 3; + + FbInitializeMergeRop(alu, (pm | ~(FbBits) 0xffffff)); + destInvarient = FbDestInvarientMergeRop(); + + while (height--) { + src = (CARD32 *) srcLine; + dst = dstLine; + srcLine += srcStride; + dstLine += dstStride; + w = width; + if (destInvarient) { + while (((long) dst & 3) && w) { + w--; + pixel = READ(src++); + pixel = FbDoDestInvarientMergeRop(pixel); + Put24(dst, pixel); + dst += 3; + } + /* Do four aligned pixels at a time */ + while (w >= 4) { + CARD32 s0, s1; + + s0 = READ(src++); + s0 = FbDoDestInvarientMergeRop(s0); + s1 = READ(src++); + s1 = FbDoDestInvarientMergeRop(s1); +#if BITMAP_BIT_ORDER == LSBFirst + WRITE((CARD32 *) dst, (s0 & 0xffffff) | (s1 << 24)); +#else + WRITE((CARD32 *) dst, (s0 << 8) | ((s1 & 0xffffff) >> 16)); +#endif + s0 = READ(src++); + s0 = FbDoDestInvarientMergeRop(s0); +#if BITMAP_BIT_ORDER == LSBFirst + WRITE((CARD32 *) (dst + 4), + ((s1 & 0xffffff) >> 8) | (s0 << 16)); +#else + WRITE((CARD32 *) (dst + 4), + (s1 << 16) | ((s0 & 0xffffff) >> 8)); +#endif + s1 = READ(src++); + s1 = FbDoDestInvarientMergeRop(s1); +#if BITMAP_BIT_ORDER == LSBFirst + WRITE((CARD32 *) (dst + 8), + ((s0 & 0xffffff) >> 16) | (s1 << 8)); +#else + WRITE((CARD32 *) (dst + 8), (s0 << 24) | (s1 & 0xffffff)); +#endif + dst += 12; + w -= 4; + } + while (w--) { + pixel = READ(src++); + pixel = FbDoDestInvarientMergeRop(pixel); + Put24(dst, pixel); + dst += 3; + } + } + else { + while (w--) { + pixel = READ(src++); + dpixel = Get24(dst); + pixel = FbDoMergeRop(pixel, dpixel); + Put24(dst, pixel); + dst += 3; + } + } + } +} + +static void +fb24_32BltUp(CARD8 *srcLine, + FbStride srcStride, + int srcX, + CARD8 *dstLine, + FbStride dstStride, + int dstX, int width, int height, int alu, FbBits pm) +{ + CARD8 *src; + CARD32 *dst; + int w; + Bool destInvarient; + CARD32 pixel; + + FbDeclareMergeRop(); + + FbInitializeMergeRop(alu, (pm | (~(FbBits) 0xffffff))); + destInvarient = FbDestInvarientMergeRop(); + + srcLine += srcX * 3; + dstLine += dstX * 4; + + while (height--) { + w = width; + src = srcLine; + dst = (CARD32 *) dstLine; + srcLine += srcStride; + dstLine += dstStride; + if (destInvarient) { + while (((long) src & 3) && w) { + w--; + pixel = Get24(src); + src += 3; + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + } + /* Do four aligned pixels at a time */ + while (w >= 4) { + CARD32 s0, s1; + + s0 = READ((CARD32 *) src); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = s0 & 0xffffff; +#else + pixel = s0 >> 8; +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + s1 = READ((CARD32 *) (src + 4)); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff); +#else + pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16); +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + s0 = READ((CARD32 *) (src + 8)); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff); +#else + pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24); +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); +#if BITMAP_BIT_ORDER == LSBFirst + pixel = s0 >> 8; +#else + pixel = s0 & 0xffffff; +#endif + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + src += 12; + w -= 4; + } + while (w) { + w--; + pixel = Get24(src); + src += 3; + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + } + } + else { + while (w--) { + pixel = Get24(src); + src += 3; + WRITE(dst, FbDoMergeRop(pixel, READ(dst))); + dst++; + } + } + } +} + +/* + * Spans functions; probably unused. + */ +void +fb24_32GetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart) +{ + FbBits *srcBits; + CARD8 *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + CARD8 *dst; + + fbGetDrawable(pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); + src = (CARD8 *) srcBits; + srcStride *= sizeof(FbBits); + + while (nspans--) { + dst = (CARD8 *) pchardstStart; + fb24_32BltUp(src + (ppt->y + srcYoff) * srcStride, srcStride, + ppt->x + srcXoff, + dst, 1, 0, *pwidth, 1, GXcopy, FB_ALLONES); + + pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + + fbFinishAccess(pDrawable); +} + +void +fb24_32SetSpans(DrawablePtr pDrawable, + GCPtr pGC, + char *src, + DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + RegionPtr pClip = fbGetCompositeClip(pGC); + FbBits *dstBits; + CARD8 *dst, *d, *s; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxPtr pbox; + int n; + int x1, x2; + + fbGetDrawable(pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); + dst = (CARD8 *) dstBits; + dstStride *= sizeof(FbBits); + while (nspans--) { + d = dst + (ppt->y + dstYoff) * dstStride; + s = (CARD8 *) src; + n = RegionNumRects(pClip); + pbox = RegionRects(pClip); + while (n--) { + if (pbox->y1 > ppt->y) + break; + if (pbox->y2 > ppt->y) { + x1 = ppt->x; + x2 = x1 + *pwidth; + if (pbox->x1 > x1) + x1 = pbox->x1; + if (pbox->x2 < x2) + x2 = pbox->x2; + if (x1 < x2) + fb24_32BltDown(s, + 0, + (x1 - ppt->x), + d, + dstStride, + x1 + dstXoff, + (x2 - x1), 1, pGC->alu, pPriv->pm); + } + } + src += PixmapBytePad(*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + + fbFinishAccess(pDrawable); +} + +/* + * Clip and put 32bpp Z-format images to a 24bpp drawable + */ +void +fb24_32PutZImage(DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, int width, int height, CARD8 *src, FbStride srcStride) +{ + FbBits *dstBits; + CARD8 *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + + fbGetDrawable(pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); + dstStride *= sizeof(FbBits); + dst = (CARD8 *) dstBits; + + for (nbox = RegionNumRects(pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + fb24_32BltDown(src + (y1 - y) * srcStride, + srcStride, + (x1 - x), + dst + (y1 + dstYoff) * dstStride, + dstStride, x1 + dstXoff, (x2 - x1), (y2 - y1), alu, pm); + } + + fbFinishAccess(pDrawable); +} + +void +fb24_32GetImage(DrawablePtr pDrawable, + int x, + int y, + int w, + int h, unsigned int format, unsigned long planeMask, char *d) +{ + FbBits *srcBits; + CARD8 *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbStride dstStride; + FbBits pm; + + fbGetDrawable(pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); + src = (CARD8 *) srcBits; + srcStride *= sizeof(FbBits); + + x += pDrawable->x; + y += pDrawable->y; + + pm = fbReplicatePixel(planeMask, 32); + dstStride = PixmapBytePad(w, pDrawable->depth); + if (pm != FB_ALLONES) + memset(d, 0, dstStride * h); + fb24_32BltUp(src + (y + srcYoff) * srcStride, srcStride, x + srcXoff, + (CARD8 *) d, dstStride, 0, w, h, GXcopy, pm); + + fbFinishAccess(pDrawable); +} + +void +fb24_32CopyMtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbBits *srcBits; + CARD8 *src; + FbStride srcStride; + int srcBpp; + FbBits *dstBits; + CARD8 *dst; + FbStride dstStride; + int dstBpp; + fb24_32BltFunc blt; + int srcXoff, srcYoff; + int dstXoff, dstYoff; + + fbGetDrawable(pSrcDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); + src = (CARD8 *) srcBits; + srcStride *= sizeof(FbBits); + fbGetDrawable(pDstDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); + dst = (CARD8 *) dstBits; + dstStride *= sizeof(FbBits); + if (srcBpp == 24) + blt = fb24_32BltUp; + else + blt = fb24_32BltDown; + + while (nbox--) { + (*blt) (src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff), + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff), + (pbox->x2 - pbox->x1), + (pbox->y2 - pbox->y1), pGC->alu, pPriv->pm); + pbox++; + } + + fbFinishAccess(pSrcDrawable); + fbFinishAccess(pDstDrawable); +} + +PixmapPtr +fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel) +{ + ScreenPtr pScreen = pOldTile->drawable.pScreen; + PixmapPtr pNewTile; + FbBits *old, *new; + FbStride oldStride, newStride; + int oldBpp, newBpp; + fb24_32BltFunc blt; + _X_UNUSED int oldXoff, oldYoff; + _X_UNUSED int newXoff, newYoff; + + pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width, + pOldTile->drawable.height, + pOldTile->drawable.depth, + pOldTile->usage_hint); + if (!pNewTile) + return 0; + fbGetDrawable(&pOldTile->drawable, + old, oldStride, oldBpp, oldXoff, oldYoff); + fbGetDrawable(&pNewTile->drawable, + new, newStride, newBpp, newXoff, newYoff); + if (oldBpp == 24) + blt = fb24_32BltUp; + else + blt = fb24_32BltDown; + + (*blt) ((CARD8 *) old, + oldStride * sizeof(FbBits), + 0, + (CARD8 *) new, + newStride * sizeof(FbBits), + 0, + pOldTile->drawable.width, + pOldTile->drawable.height, GXcopy, FB_ALLONES); + + fbFinishAccess(&pOldTile->drawable); + fbFinishAccess(&pNewTile->drawable); + + return pNewTile; +} + +typedef struct { + pointer pbits; + int width; +} miScreenInitParmsRec, *miScreenInitParmsPtr; + +Bool +fb24_32CreateScreenResources(ScreenPtr pScreen) +{ + miScreenInitParmsPtr pScrInitParms; + int pitch; + Bool retval; + + /* get the pitch before mi destroys it */ + pScrInitParms = (miScreenInitParmsPtr) pScreen->devPrivate; + pitch = BitmapBytePad(pScrInitParms->width * 24); + + if ((retval = miCreateScreenResources(pScreen))) { + /* fix the screen pixmap */ + PixmapPtr pPix = (PixmapPtr) pScreen->devPrivate; + + pPix->drawable.bitsPerPixel = 24; + pPix->devKind = pitch; + } + + return retval; +} + +Bool +fb24_32ModifyPixmapHeader(PixmapPtr pPixmap, + int width, + int height, + int depth, + int bitsPerPixel, int devKind, pointer pPixData) +{ + int bpp, w; + + if (!pPixmap) + return FALSE; + bpp = bitsPerPixel; + if (bpp <= 0) + bpp = pPixmap->drawable.bitsPerPixel; + if (bpp == 24) { + if (devKind < 0) { + w = width; + if (w <= 0) + w = pPixmap->drawable.width; + devKind = BitmapBytePad(w * 24); + } + } + return miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, + devKind, pPixData); +} diff --git a/fb/fb24_32.h b/fb/fb24_32.h new file mode 100644 index 0000000..1bec00b --- /dev/null +++ b/fb/fb24_32.h @@ -0,0 +1,44 @@ +/* + * Copyright © 2000 SuSE, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _FB24_32_H_ +#define _FB24_32_H_ + +Bool + +fb24_32FinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, int dpix, int dpiy, int width, int bpp); + +Bool + +fb24_32ScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, int ysize, int dpix, int dpiy, int width, int bpp); + +#endif diff --git a/fb/fballpriv.c b/fb/fballpriv.c new file mode 100644 index 0000000..187d0b0 --- /dev/null +++ b/fb/fballpriv.c @@ -0,0 +1,58 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +static DevPrivateKeyRec fbScreenPrivateKeyRec; +DevPrivateKey +fbGetScreenPrivateKey(void) +{ + return &fbScreenPrivateKeyRec; +} + +Bool +fbAllocatePrivates(ScreenPtr pScreen) +{ + FbScreenPrivPtr pScrPriv; + + if (!dixRegisterPrivateKey + (&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof(FbScreenPrivRec))) + return FALSE; + + pScrPriv = fbGetScreenPrivate(pScreen); + + if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pScrPriv->gcPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec))) + return FALSE; + if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pScrPriv->winPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + + return TRUE; +} + +#ifdef FB_ACCESS_WRAPPER +ReadMemoryProcPtr wfbReadMemory; +WriteMemoryProcPtr wfbWriteMemory; +#endif diff --git a/fb/fbarc.c b/fb/fbarc.c new file mode 100644 index 0000000..c1b7f77 --- /dev/null +++ b/fb/fbarc.c @@ -0,0 +1,139 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" +#include "mizerarc.h" +#include + +typedef void (*FbArc) (FbBits * dst, + FbStride dstStride, + int dstBpp, + xArc * arc, int dx, int dy, FbBits and, FbBits xor); + +void +fbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs) +{ + FbArc arc; + + if (pGC->lineWidth == 0) { + arc = 0; + if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid) { + switch (pDrawable->bitsPerPixel) { + case 8: + arc = fbArc8; + break; + case 16: + arc = fbArc16; + break; + case 24: + arc = fbArc24; + break; + case 32: + arc = fbArc32; + break; + } + } + if (arc) { + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxRec box; + int x2, y2; + RegionPtr cclip; + +#ifdef FB_ACCESS_WRAPPER + int wrapped = 1; +#endif + + cclip = fbGetCompositeClip(pGC); + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + while (narcs--) { + if (miCanZeroArc(parcs)) { + box.x1 = parcs->x + pDrawable->x; + box.y1 = parcs->y + pDrawable->y; + /* + * Because box.x2 and box.y2 get truncated to 16 bits, and the + * RECT_IN_REGION test treats the resulting number as a signed + * integer, the RECT_IN_REGION test alone can go the wrong way. + * This can result in a server crash because the rendering + * routines in this file deal directly with cpu addresses + * of pixels to be stored, and do not clip or otherwise check + * that all such addresses are within their respective pixmaps. + * So we only allow the RECT_IN_REGION test to be used for + * values that can be expressed correctly in a signed short. + */ + x2 = box.x1 + (int) parcs->width + 1; + box.x2 = x2; + y2 = box.y1 + (int) parcs->height + 1; + box.y2 = y2; + if ((x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && + (RegionContainsRect(cclip, &box) == rgnIN)) { +#ifdef FB_ACCESS_WRAPPER + if (!wrapped) { + fbPrepareAccess(pDrawable); + wrapped = 1; + } +#endif + (*arc) (dst, dstStride, dstBpp, + parcs, pDrawable->x + dstXoff, + pDrawable->y + dstYoff, pPriv->and, pPriv->xor); + } + else { +#ifdef FB_ACCESS_WRAPPER + if (wrapped) { + fbFinishAccess(pDrawable); + wrapped = 0; + } +#endif + miZeroPolyArc(pDrawable, pGC, 1, parcs); + } + } + else { +#ifdef FB_ACCESS_WRAPPER + if (wrapped) { + fbFinishAccess(pDrawable); + wrapped = 0; + } +#endif + miPolyArc(pDrawable, pGC, 1, parcs); + } + parcs++; + } +#ifdef FB_ACCESS_WRAPPER + if (wrapped) { + fbFinishAccess(pDrawable); + wrapped = 0; + } +#endif + } + else + miZeroPolyArc(pDrawable, pGC, narcs, parcs); + } + else + miPolyArc(pDrawable, pGC, narcs, parcs); +} diff --git a/fb/fbbits.c b/fb/fbbits.c new file mode 100644 index 0000000..ac44f3e --- /dev/null +++ b/fb/fbbits.c @@ -0,0 +1,174 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" +#include "miline.h" +#include "mizerarc.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef BITS +#undef BITS2 +#undef BITS4 + +#define BRESSOLID fbBresSolid8 +#define BRESDASH fbBresDash8 +#define DOTS fbDots8 +#define ARC fbArc8 +#define GLYPH fbGlyph8 +#define POLYLINE fbPolyline8 +#define POLYSEGMENT fbPolySegment8 +#define BITS BYTE +#define BITS2 CARD16 +#define BITS4 CARD32 + +#include "fbbits.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef POLYLINE +#undef POLYSEGMENT +#undef BITS +#undef BITS2 +#undef BITS4 + +#define BRESSOLID fbBresSolid16 +#define BRESDASH fbBresDash16 +#define DOTS fbDots16 +#define ARC fbArc16 +#define GLYPH fbGlyph16 +#define POLYLINE fbPolyline16 +#define POLYSEGMENT fbPolySegment16 +#define BITS CARD16 +#define BITS2 CARD32 +#if FB_SHIFT == 6 +#define BITS4 FbBits +#endif + +#include "fbbits.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef POLYLINE +#undef POLYSEGMENT +#undef BITS +#undef BITS2 +#if FB_SHIFT == 6 +#undef BITS4 +#endif + +#define BRESSOLID fbBresSolid24 +#define BRESDASH fbBresDash24 +#define DOTS fbDots24 +#define ARC fbArc24 +#define POLYLINE fbPolyline24 +#define POLYSEGMENT fbPolySegment24 + +#define BITS CARD32 +#define BITSUNIT BYTE +#define BITSMUL 3 + +#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s)) +#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s))) +#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s), \ + (m) >> (s))) +#if BITMAP_BIT_ORDER == LSBFirst +#define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeStore (b, CARD8, x, 0), \ + FbDoTypeStore ((b) + 1, CARD16, x, 8)) : \ + (FbDoTypeStore (b, CARD16, x, 0), \ + FbDoTypeStore ((b) + 2, CARD8, x, 16))) +#define BITSRROP(b,a,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeRRop(b,CARD8,a,x,0), \ + FbDoTypeRRop((b)+1,CARD16,a,x,8)) : \ + (FbDoTypeRRop(b,CARD16,a,x,0), \ + FbDoTypeRRop((b)+2,CARD8,a,x,16))) +#else +#define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeStore (b, CARD8, x, 16), \ + FbDoTypeStore ((b) + 1, CARD16, x, 0)) : \ + (FbDoTypeStore (b, CARD16, x, 8), \ + FbDoTypeStore ((b) + 2, CARD8, x, 0))) +#define BITSRROP(b,a,x) ((unsigned long) (b) & 1 ? \ + (FbDoTypeRRop (b, CARD8, a, x, 16), \ + FbDoTypeRRop ((b) + 1, CARD16, a, x, 0)) : \ + (FbDoTypeRRop (b, CARD16, a, x, 8), \ + FbDoTypeRRop ((b) + 2, CARD8, a, x, 0))) +#endif + +#include "fbbits.h" + +#undef BITSSTORE +#undef BITSRROP +#undef BITSMUL +#undef BITSUNIT +#undef BITS + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef POLYLINE +#undef POLYSEGMENT + +#define BRESSOLID fbBresSolid32 +#define BRESDASH fbBresDash32 +#define DOTS fbDots32 +#define ARC fbArc32 +#define GLYPH fbGlyph32 +#define POLYLINE fbPolyline32 +#define POLYSEGMENT fbPolySegment32 +#define BITS CARD32 +#if FB_SHIFT == 6 +#define BITS2 FbBits +#endif + +#include "fbbits.h" + +#undef BRESSOLID +#undef BRESDASH +#undef DOTS +#undef ARC +#undef GLYPH +#undef POLYLINE +#undef POLYSEGMENT +#undef BITS +#if FB_SHIFT == 6 +#undef BITS2 +#endif diff --git a/fb/fbbits.h b/fb/fbbits.h new file mode 100644 index 0000000..be32d8c --- /dev/null +++ b/fb/fbbits.h @@ -0,0 +1,875 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * This file defines functions for drawing some primitives using + * underlying datatypes instead of masks + */ + +#define isClipped(c,ul,lr) (((c) | ((c) - (ul)) | ((lr) - (c))) & 0x80008000) + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef BITSMUL +#define MUL BITSMUL +#else +#define MUL 1 +#endif + +#ifdef BITSSTORE +#define STORE(b,x) BITSSTORE(b,x) +#else +#define STORE(b,x) WRITE((b), (x)) +#endif + +#ifdef BITSRROP +#define RROP(b,a,x) BITSRROP(b,a,x) +#else +#define RROP(b,a,x) WRITE((b), FbDoRRop (READ(b), (a), (x))) +#endif + +#ifdef BITSUNIT +#define UNIT BITSUNIT +#define USE_SOLID +#else +#define UNIT BITS +#endif + +/* + * Define the following before including this file: + * + * BRESSOLID name of function for drawing a solid segment + * BRESDASH name of function for drawing a dashed segment + * DOTS name of function for drawing dots + * ARC name of function for drawing a solid arc + * BITS type of underlying unit + */ + +#ifdef BRESSOLID +void +BRESSOLID(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + UNIT *bits; + FbStride bitsStride; + FbStride majorStep, minorStep; + BITS xor = (BITS) pPriv->xor; + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + bits = + ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff) * MUL; + bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); + if (signdy < 0) + bitsStride = -bitsStride; + if (axis == X_AXIS) { + majorStep = signdx * MUL; + minorStep = bitsStride; + } + else { + majorStep = bitsStride; + minorStep = signdx * MUL; + } + while (len--) { + STORE(bits, xor); + bits += majorStep; + e += e1; + if (e >= 0) { + bits += minorStep; + e += e3; + } + } + + fbFinishAccess(pDrawable); +} +#endif + +#ifdef BRESDASH +void +BRESDASH(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + UNIT *bits; + FbStride bitsStride; + FbStride majorStep, minorStep; + BITS xorfg, xorbg; + + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + doOdd = pGC->lineStyle == LineDoubleDash; + xorfg = (BITS) pPriv->xor; + xorbg = (BITS) pPriv->bgxor; + + FbDashInit(pGC, pPriv, dashOffset, dashlen, even); + + bits = + ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff) * MUL; + bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); + if (signdy < 0) + bitsStride = -bitsStride; + if (axis == X_AXIS) { + majorStep = signdx * MUL; + minorStep = bitsStride; + } + else { + majorStep = bitsStride; + minorStep = signdx * MUL; + } + if (dashlen >= len) + dashlen = len; + if (doOdd) { + if (!even) + goto doubleOdd; + for (;;) { + len -= dashlen; + while (dashlen--) { + STORE(bits, xorfg); + bits += majorStep; + if ((e += e1) >= 0) { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextEven(dashlen); + + if (dashlen >= len) + dashlen = len; + doubleOdd: + len -= dashlen; + while (dashlen--) { + STORE(bits, xorbg); + bits += majorStep; + if ((e += e1) >= 0) { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextOdd(dashlen); + + if (dashlen >= len) + dashlen = len; + } + } + else { + if (!even) + goto onOffOdd; + for (;;) { + len -= dashlen; + while (dashlen--) { + STORE(bits, xorfg); + bits += majorStep; + if ((e += e1) >= 0) { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextEven(dashlen); + + if (dashlen >= len) + dashlen = len; + onOffOdd: + len -= dashlen; + while (dashlen--) { + bits += majorStep; + if ((e += e1) >= 0) { + e += e3; + bits += minorStep; + } + } + if (!len) + break; + + FbDashNextOdd(dashlen); + + if (dashlen >= len) + dashlen = len; + } + } + + fbFinishAccess(pDrawable); +} +#endif + +#ifdef DOTS +void +DOTS(FbBits * dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * ptsOrig, + int npt, int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor) +{ + INT32 *pts = (INT32 *) ptsOrig; + UNIT *bits = (UNIT *) dst; + UNIT *point; + BITS bxor = (BITS) xor; + BITS band = (BITS) and; + FbStride bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); + INT32 ul, lr; + INT32 pt; + + ul = coordToInt(pBox->x1 - xorg, pBox->y1 - yorg); + lr = coordToInt(pBox->x2 - xorg - 1, pBox->y2 - yorg - 1); + + bits += bitsStride * (yorg + yoff) + (xorg + xoff) * MUL; + + if (and == 0) { + while (npt--) { + pt = *pts++; + if (!isClipped(pt, ul, lr)) { + point = bits + intToY(pt) * bitsStride + intToX(pt) * MUL; + STORE(point, bxor); + } + } + } + else { + while (npt--) { + pt = *pts++; + if (!isClipped(pt, ul, lr)) { + point = bits + intToY(pt) * bitsStride + intToX(pt) * MUL; + RROP(point, band, bxor); + } + } + } +} +#endif + +#ifdef ARC + +#define ARCCOPY(d) STORE(d,xorBits) +#define ARCRROP(d) RROP(d,andBits,xorBits) + +void +ARC(FbBits * dst, + FbStride dstStride, + int dstBpp, xArc * arc, int drawX, int drawY, FbBits and, FbBits xor) +{ + UNIT *bits; + FbStride bitsStride; + miZeroArcRec info; + Bool do360; + int x; + UNIT *yorgp, *yorgop; + BITS andBits, xorBits; + int yoffset, dyoffset; + int y, a, b, d, mask; + int k1, k3, dx, dy; + + bits = (UNIT *) dst; + bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); + andBits = (BITS) and; + xorBits = (BITS) xor; + do360 = miZeroArcSetup(arc, &info, TRUE); + yorgp = bits + ((info.yorg + drawY) * bitsStride); + yorgop = bits + ((info.yorgo + drawY) * bitsStride); + info.xorg = (info.xorg + drawX) * MUL; + info.xorgo = (info.xorgo + drawX) * MUL; + MIARCSETUP(); + yoffset = y ? bitsStride : 0; + dyoffset = 0; + mask = info.initialMask; + + if (!(arc->width & 1)) { + if (andBits == 0) { + if (mask & 2) + ARCCOPY(yorgp + info.xorgo); + if (mask & 8) + ARCCOPY(yorgop + info.xorgo); + } + else { + if (mask & 2) + ARCRROP(yorgp + info.xorgo); + if (mask & 8) + ARCRROP(yorgop + info.xorgo); + } + } + if (!info.end.x || !info.end.y) { + mask = info.end.mask; + info.end = info.altend; + } + if (do360 && (arc->width == arc->height) && !(arc->width & 1)) { + int xoffset = bitsStride; + UNIT *yorghb = yorgp + (info.h * bitsStride) + info.xorg; + UNIT *yorgohb = yorghb - info.h * MUL; + + yorgp += info.xorg; + yorgop += info.xorg; + yorghb += info.h * MUL; + while (1) { + if (andBits == 0) { + ARCCOPY(yorgp + yoffset + x * MUL); + ARCCOPY(yorgp + yoffset - x * MUL); + ARCCOPY(yorgop - yoffset - x * MUL); + ARCCOPY(yorgop - yoffset + x * MUL); + } + else { + ARCRROP(yorgp + yoffset + x * MUL); + ARCRROP(yorgp + yoffset - x * MUL); + ARCRROP(yorgop - yoffset - x * MUL); + ARCRROP(yorgop - yoffset + x * MUL); + } + if (a < 0) + break; + if (andBits == 0) { + ARCCOPY(yorghb - xoffset - y * MUL); + ARCCOPY(yorgohb - xoffset + y * MUL); + ARCCOPY(yorgohb + xoffset + y * MUL); + ARCCOPY(yorghb + xoffset - y * MUL); + } + else { + ARCRROP(yorghb - xoffset - y * MUL); + ARCRROP(yorgohb - xoffset + y * MUL); + ARCRROP(yorgohb + xoffset + y * MUL); + ARCRROP(yorghb + xoffset - y * MUL); + } + xoffset += bitsStride; + MIARCCIRCLESTEP(yoffset += bitsStride; + ); + } + yorgp -= info.xorg; + yorgop -= info.xorg; + x = info.w; + yoffset = info.h * bitsStride; + } + else if (do360) { + while (y < info.h || x < info.w) { + MIARCOCTANTSHIFT(dyoffset = bitsStride; + ); + if (andBits == 0) { + ARCCOPY(yorgp + yoffset + info.xorg + x * MUL); + ARCCOPY(yorgp + yoffset + info.xorgo - x * MUL); + ARCCOPY(yorgop - yoffset + info.xorgo - x * MUL); + ARCCOPY(yorgop - yoffset + info.xorg + x * MUL); + } + else { + ARCRROP(yorgp + yoffset + info.xorg + x * MUL); + ARCRROP(yorgp + yoffset + info.xorgo - x * MUL); + ARCRROP(yorgop - yoffset + info.xorgo - x * MUL); + ARCRROP(yorgop - yoffset + info.xorg + x * MUL); + } + MIARCSTEP(yoffset += dyoffset; + , yoffset += bitsStride; + ); + } + } + else { + while (y < info.h || x < info.w) { + MIARCOCTANTSHIFT(dyoffset = bitsStride; + ); + if ((x == info.start.x) || (y == info.start.y)) { + mask = info.start.mask; + info.start = info.altstart; + } + if (andBits == 0) { + if (mask & 1) + ARCCOPY(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 2) + ARCCOPY(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 4) + ARCCOPY(yorgop - yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCCOPY(yorgop - yoffset + info.xorg + x * MUL); + } + else { + if (mask & 1) + ARCRROP(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 2) + ARCRROP(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 4) + ARCRROP(yorgop - yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCRROP(yorgop - yoffset + info.xorg + x * MUL); + } + if ((x == info.end.x) || (y == info.end.y)) { + mask = info.end.mask; + info.end = info.altend; + } + MIARCSTEP(yoffset += dyoffset; + , yoffset += bitsStride; + ); + } + } + if ((x == info.start.x) || (y == info.start.y)) + mask = info.start.mask; + if (andBits == 0) { + if (mask & 1) + ARCCOPY(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 4) + ARCCOPY(yorgop - yoffset + info.xorgo - x * MUL); + if (arc->height & 1) { + if (mask & 2) + ARCCOPY(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCCOPY(yorgop - yoffset + info.xorg + x * MUL); + } + } + else { + if (mask & 1) + ARCRROP(yorgp + yoffset + info.xorg + x * MUL); + if (mask & 4) + ARCRROP(yorgop - yoffset + info.xorgo - x * MUL); + if (arc->height & 1) { + if (mask & 2) + ARCRROP(yorgp + yoffset + info.xorgo - x * MUL); + if (mask & 8) + ARCRROP(yorgop - yoffset + info.xorg + x * MUL); + } + } +} + +#undef ARCCOPY +#undef ARCRROP +#endif + +#ifdef GLYPH +#if BITMAP_BIT_ORDER == LSBFirst +#define WRITE_ADDR1(n) (n) +#define WRITE_ADDR2(n) (n) +#define WRITE_ADDR4(n) (n) +#else +#define WRITE_ADDR1(n) ((n) ^ 3) +#define WRITE_ADDR2(n) ((n) ^ 2) +#define WRITE_ADDR4(n) ((n)) +#endif + +#define WRITE1(d,n,fg) WRITE(d + WRITE_ADDR1(n), (BITS) (fg)) + +#ifdef BITS2 +#define WRITE2(d,n,fg) WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg)) +#else +#define WRITE2(d,n,fg) (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg)) +#endif + +#ifdef BITS4 +#define WRITE4(d,n,fg) WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg)) +#else +#define WRITE4(d,n,fg) (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg)) +#endif + +void +GLYPH(FbBits * dstBits, + FbStride dstStride, + int dstBpp, FbStip * stipple, FbBits fg, int x, int height) +{ + int lshift; + FbStip bits; + BITS *dstLine; + BITS *dst; + int n; + int shift; + + dstLine = (BITS *) dstBits; + dstLine += x & ~3; + dstStride *= (sizeof(FbBits) / sizeof(BITS)); + shift = x & 3; + lshift = 4 - shift; + while (height--) { + bits = *stipple++; + dst = (BITS *) dstLine; + n = lshift; + while (bits) { + switch (FbStipMoveLsb(FbLeftStipBits(bits, n), 4, n)) { + case 0: + break; + case 1: + WRITE1(dst, 0, fg); + break; + case 2: + WRITE1(dst, 1, fg); + break; + case 3: + WRITE2(dst, 0, fg); + break; + case 4: + WRITE1(dst, 2, fg); + break; + case 5: + WRITE1(dst, 0, fg); + WRITE1(dst, 2, fg); + break; + case 6: + WRITE1(dst, 1, fg); + WRITE1(dst, 2, fg); + break; + case 7: + WRITE2(dst, 0, fg); + WRITE1(dst, 2, fg); + break; + case 8: + WRITE1(dst, 3, fg); + break; + case 9: + WRITE1(dst, 0, fg); + WRITE1(dst, 3, fg); + break; + case 10: + WRITE1(dst, 1, fg); + WRITE1(dst, 3, fg); + break; + case 11: + WRITE2(dst, 0, fg); + WRITE1(dst, 3, fg); + break; + case 12: + WRITE2(dst, 2, fg); + break; + case 13: + WRITE1(dst, 0, fg); + WRITE2(dst, 2, fg); + break; + case 14: + WRITE1(dst, 1, fg); + WRITE2(dst, 2, fg); + break; + case 15: + WRITE4(dst, 0, fg); + break; + } + bits = FbStipLeft(bits, n); + n = 4; + dst += 4; + } + dstLine += dstStride; + } +} + +#undef WRITE_ADDR1 +#undef WRITE_ADDR2 +#undef WRITE_ADDR4 +#undef WRITE1 +#undef WRITE2 +#undef WRITE4 + +#endif + +#ifdef POLYLINE +void +POLYLINE(DrawablePtr pDrawable, + GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig) +{ + INT32 *pts = (INT32 *) ptsOrig; + int xoff = pDrawable->x; + int yoff = pDrawable->y; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + BoxPtr pBox = RegionExtents(fbGetCompositeClip(pGC)); + + FbBits *dst; + int dstStride; + int dstBpp; + int dstXoff, dstYoff; + + UNIT *bits, *bitsBase; + FbStride bitsStride; + BITS xor = fbGetGCPrivate(pGC)->xor; + BITS and = fbGetGCPrivate(pGC)->and; + int dashoffset = 0; + + INT32 ul, lr; + INT32 pt1, pt2; + + int e, e1, e3, len; + int stepmajor, stepminor; + int octant; + + if (mode == CoordModePrevious) + fbFixCoordModePrevious(npt, ptsOrig); + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); + bitsBase = + ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff) * MUL; + ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); + lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); + + pt1 = *pts++; + npt--; + pt2 = *pts++; + npt--; + for (;;) { + if (isClipped(pt1, ul, lr) | isClipped(pt2, ul, lr)) { + fbSegment(pDrawable, pGC, + intToX(pt1) + xoff, intToY(pt1) + yoff, + intToX(pt2) + xoff, intToY(pt2) + yoff, + npt == 0 && pGC->capStyle != CapNotLast, &dashoffset); + if (!npt) { + fbFinishAccess(pDrawable); + return; + } + pt1 = pt2; + pt2 = *pts++; + npt--; + } + else { + bits = bitsBase + intToY(pt1) * bitsStride + intToX(pt1) * MUL; + for (;;) { + CalcLineDeltas(intToX(pt1), intToY(pt1), + intToX(pt2), intToY(pt2), + len, e1, stepmajor, stepminor, 1, bitsStride, + octant); + stepmajor *= MUL; + if (len < e1) { + e3 = len; + len = e1; + e1 = e3; + + e3 = stepminor; + stepminor = stepmajor; + stepmajor = e3; + SetYMajorOctant(octant); + } + e = -len; + e1 <<= 1; + e3 = e << 1; + FIXUP_ERROR(e, octant, bias); + if (and == 0) { + while (len--) { + STORE(bits, xor); + bits += stepmajor; + e += e1; + if (e >= 0) { + bits += stepminor; + e += e3; + } + } + } + else { + while (len--) { + RROP(bits, and, xor); + bits += stepmajor; + e += e1; + if (e >= 0) { + bits += stepminor; + e += e3; + } + } + } + if (!npt) { + if (pGC->capStyle != CapNotLast && + pt2 != *((INT32 *) ptsOrig)) { + RROP(bits, and, xor); + } + fbFinishAccess(pDrawable); + return; + } + pt1 = pt2; + pt2 = *pts++; + --npt; + if (isClipped(pt2, ul, lr)) + break; + } + } + } + + fbFinishAccess(pDrawable); +} +#endif + +#ifdef POLYSEGMENT +void +POLYSEGMENT(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg) +{ + INT32 *pts = (INT32 *) pseg; + int xoff = pDrawable->x; + int yoff = pDrawable->y; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + BoxPtr pBox = RegionExtents(fbGetCompositeClip(pGC)); + + FbBits *dst; + int dstStride; + int dstBpp; + int dstXoff, dstYoff; + + UNIT *bits, *bitsBase; + FbStride bitsStride; + FbBits xorBits = fbGetGCPrivate(pGC)->xor; + FbBits andBits = fbGetGCPrivate(pGC)->and; + BITS xor = xorBits; + BITS and = andBits; + int dashoffset = 0; + + INT32 ul, lr; + INT32 pt1, pt2; + + int e, e1, e3, len; + int stepmajor, stepminor; + int octant; + Bool capNotLast; + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); + bitsBase = + ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff) * MUL; + ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); + lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); + + capNotLast = pGC->capStyle == CapNotLast; + + while (nseg--) { + pt1 = *pts++; + pt2 = *pts++; + if (isClipped(pt1, ul, lr) | isClipped(pt2, ul, lr)) { + fbSegment(pDrawable, pGC, + intToX(pt1) + xoff, intToY(pt1) + yoff, + intToX(pt2) + xoff, intToY(pt2) + yoff, + !capNotLast, &dashoffset); + } + else { + CalcLineDeltas(intToX(pt1), intToY(pt1), + intToX(pt2), intToY(pt2), + len, e1, stepmajor, stepminor, 1, bitsStride, + octant); + if (e1 == 0 && len > 3 +#if MUL != 1 + && FbCheck24Pix(and) && FbCheck24Pix(xor) +#endif + ) { + int x1, x2; + FbBits *dstLine; + int dstX, width; + FbBits startmask, endmask; + int nmiddle; + + if (stepmajor < 0) { + x1 = intToX(pt2); + x2 = intToX(pt1) + 1; + if (capNotLast) + x1++; + } + else { + x1 = intToX(pt1); + x2 = intToX(pt2); + if (!capNotLast) + x2++; + } + dstX = (x1 + xoff + dstXoff) * (sizeof(UNIT) * 8 * MUL); + width = (x2 - x1) * (sizeof(UNIT) * 8 * MUL); + + dstLine = dst + (intToY(pt1) + yoff + dstYoff) * dstStride; + dstLine += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBits(dstX, width, startmask, nmiddle, endmask); + if (startmask) { + WRITE(dstLine, + FbDoMaskRRop(READ(dstLine), andBits, xorBits, + startmask)); + dstLine++; + } + if (!andBits) + while (nmiddle--) + WRITE(dstLine++, xorBits); + else + while (nmiddle--) { + WRITE(dstLine, + FbDoRRop(READ(dstLine), andBits, xorBits)); + dstLine++; + } + if (endmask) + WRITE(dstLine, + FbDoMaskRRop(READ(dstLine), andBits, xorBits, + endmask)); + } + else { + stepmajor *= MUL; + bits = bitsBase + intToY(pt1) * bitsStride + intToX(pt1) * MUL; + if (len < e1) { + e3 = len; + len = e1; + e1 = e3; + + e3 = stepminor; + stepminor = stepmajor; + stepmajor = e3; + SetYMajorOctant(octant); + } + e = -len; + e1 <<= 1; + e3 = e << 1; + FIXUP_ERROR(e, octant, bias); + if (!capNotLast) + len++; + if (and == 0) { + while (len--) { + STORE(bits, xor); + bits += stepmajor; + e += e1; + if (e >= 0) { + bits += stepminor; + e += e3; + } + } + } + else { + while (len--) { + RROP(bits, and, xor); + bits += stepmajor; + e += e1; + if (e >= 0) { + bits += stepminor; + e += e3; + } + } + } + } + } + } + + fbFinishAccess(pDrawable); +} +#endif + +#undef MUL +#undef STORE +#undef RROP +#undef UNIT +#undef USE_SOLID + +#undef isClipped diff --git a/fb/fbblt.c b/fb/fbblt.c new file mode 100644 index 0000000..72a05f6 --- /dev/null +++ b/fb/fbblt.c @@ -0,0 +1,790 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "fb.h" + +#define InitializeShifts(sx,dx,ls,rs) { \ + if (sx != dx) { \ + if (sx > dx) { \ + ls = sx - dx; \ + rs = FB_UNIT - ls; \ + } else { \ + rs = dx - sx; \ + ls = FB_UNIT - rs; \ + } \ + } \ +} + +void +fbBlt(FbBits * srcLine, + FbStride srcStride, + int srcX, + FbBits * dstLine, + FbStride dstStride, + int dstX, + int width, + int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown) +{ + FbBits *src, *dst; + int leftShift, rightShift; + FbBits startmask, endmask; + FbBits bits, bits1; + int n, nmiddle; + Bool destInvarient; + int startbyte, endbyte; + int careful; + + FbDeclareMergeRop(); + + if (bpp == 24 && !FbCheck24Pix(pm)) { + fbBlt24(srcLine, srcStride, srcX, dstLine, dstStride, dstX, + width, height, alu, pm, reverse, upsidedown); + return; + } + + careful = !((srcLine < dstLine && srcLine + width * (bpp >> 3) > dstLine) || + (dstLine < srcLine && dstLine + width * (bpp >> 3) > srcLine)) + || (bpp & 7); + + if (alu == GXcopy && pm == FB_ALLONES && !careful && + !(srcX & 7) && !(dstX & 7) && !(width & 7)) { + int i; + CARD8 *tmpsrc = (CARD8 *) srcLine; + CARD8 *tmpdst = (CARD8 *) dstLine; + + srcStride *= sizeof(FbBits); + dstStride *= sizeof(FbBits); + width >>= 3; + tmpsrc += (srcX >> 3); + tmpdst += (dstX >> 3); + + if (!upsidedown) + for (i = 0; i < height; i++) + MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, width); + else + for (i = height - 1; i >= 0; i--) + MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, width); + + return; + } + + FbInitializeMergeRop(alu, pm); + destInvarient = FbDestInvarientMergeRop(); + if (upsidedown) { + srcLine += (height - 1) * (srcStride); + dstLine += (height - 1) * (dstStride); + srcStride = -srcStride; + dstStride = -dstStride; + } + FbMaskBitsBytes(dstX, width, destInvarient, startmask, startbyte, + nmiddle, endmask, endbyte); + if (reverse) { + srcLine += ((srcX + width - 1) >> FB_SHIFT) + 1; + dstLine += ((dstX + width - 1) >> FB_SHIFT) + 1; + srcX = (srcX + width - 1) & FB_MASK; + dstX = (dstX + width - 1) & FB_MASK; + } + else { + srcLine += srcX >> FB_SHIFT; + dstLine += dstX >> FB_SHIFT; + srcX &= FB_MASK; + dstX &= FB_MASK; + } + if (srcX == dstX) { + while (height--) { + src = srcLine; + srcLine += srcStride; + dst = dstLine; + dstLine += dstStride; + if (reverse) { + if (endmask) { + bits = READ(--src); + --dst; + FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); + } + n = nmiddle; + if (destInvarient) { + while (n--) + WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src))); + } + else { + while (n--) { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMergeRop(bits, READ(dst))); + } + } + if (startmask) { + bits = READ(--src); + --dst; + FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); + } + } + else { + if (startmask) { + bits = READ(src++); + FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); + dst++; + } + n = nmiddle; + if (destInvarient) { +#if 0 + /* + * This provides some speedup on screen->screen blts + * over the PCI bus, usually about 10%. But fb + * isn't usually used for this operation... + */ + if (_ca2 + 1 == 0 && _cx2 == 0) { + FbBits t1, t2, t3, t4; + + while (n >= 4) { + t1 = *src++; + t2 = *src++; + t3 = *src++; + t4 = *src++; + *dst++ = t1; + *dst++ = t2; + *dst++ = t3; + *dst++ = t4; + n -= 4; + } + } +#endif + while (n--) + WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++))); + } + else { + while (n--) { + bits = READ(src++); + WRITE(dst, FbDoMergeRop(bits, READ(dst))); + dst++; + } + } + if (endmask) { + bits = READ(src); + FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); + } + } + } + } + else { + if (srcX > dstX) { + leftShift = srcX - dstX; + rightShift = FB_UNIT - leftShift; + } + else { + rightShift = dstX - srcX; + leftShift = FB_UNIT - rightShift; + } + while (height--) { + src = srcLine; + srcLine += srcStride; + dst = dstLine; + dstLine += dstStride; + + bits1 = 0; + if (reverse) { + if (srcX < dstX) + bits1 = READ(--src); + if (endmask) { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(endmask, leftShift)) { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); + } + n = nmiddle; + if (destInvarient) { + while (n--) { + bits = FbScrRight(bits1, rightShift); + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + --dst; + WRITE(dst, FbDoDestInvarientMergeRop(bits)); + } + } + else { + while (n--) { + bits = FbScrRight(bits1, rightShift); + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + --dst; + WRITE(dst, FbDoMergeRop(bits, READ(dst))); + } + } + if (startmask) { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(startmask, leftShift)) { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); + } + } + else { + if (srcX > dstX) + bits1 = READ(src++); + if (startmask) { + bits = FbScrLeft(bits1, leftShift); + if (FbScrLeft(startmask, rightShift)) { + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + } + FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); + dst++; + } + n = nmiddle; + if (destInvarient) { + while (n--) { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoDestInvarientMergeRop(bits)); + dst++; + } + } + else { + while (n--) { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoMergeRop(bits, READ(dst))); + dst++; + } + } + if (endmask) { + bits = FbScrLeft(bits1, leftShift); + if (FbScrLeft(endmask, rightShift)) { + bits1 = READ(src); + bits |= FbScrRight(bits1, rightShift); + } + FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); + } + } + } + } +} + +#undef DEBUG_BLT24 +#ifdef DEBUG_BLT24 + +static unsigned long +getPixel(char *src, int x) +{ + unsigned long l; + + l = 0; + memcpy(&l, src + x * 3, 3); + return l; +} +#endif + +static void +fbBlt24Line(FbBits * src, + int srcX, + FbBits * dst, int dstX, int width, int alu, FbBits pm, Bool reverse) +{ +#ifdef DEBUG_BLT24 + char *origDst = (char *) dst; + FbBits *origLine = dst + ((dstX >> FB_SHIFT) - 1); + int origNlw = ((width + FB_MASK) >> FB_SHIFT) + 3; + int origX = dstX / 24; +#endif + + int leftShift, rightShift; + FbBits startmask, endmask; + int n; + + FbBits bits, bits1; + FbBits mask; + + int rot; + + FbDeclareMergeRop(); + + FbInitializeMergeRop(alu, FB_ALLONES); + FbMaskBits(dstX, width, startmask, n, endmask); +#ifdef DEBUG_BLT24 + ErrorF("dstX %d width %d reverse %d\n", dstX, width, reverse); +#endif + if (reverse) { + src += ((srcX + width - 1) >> FB_SHIFT) + 1; + dst += ((dstX + width - 1) >> FB_SHIFT) + 1; + rot = FbFirst24Rot(((dstX + width - 8) & FB_MASK)); + rot = FbPrev24Rot(rot); +#ifdef DEBUG_BLT24 + ErrorF("dstX + width - 8: %d rot: %d\n", (dstX + width - 8) & FB_MASK, + rot); +#endif + srcX = (srcX + width - 1) & FB_MASK; + dstX = (dstX + width - 1) & FB_MASK; + } + else { + src += srcX >> FB_SHIFT; + dst += dstX >> FB_SHIFT; + srcX &= FB_MASK; + dstX &= FB_MASK; + rot = FbFirst24Rot(dstX); +#ifdef DEBUG_BLT24 + ErrorF("dstX: %d rot: %d\n", dstX, rot); +#endif + } + mask = FbRot24(pm, rot); +#ifdef DEBUG_BLT24 + ErrorF("pm 0x%x mask 0x%x\n", pm, mask); +#endif + if (srcX == dstX) { + if (reverse) { + if (endmask) { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask)); + mask = FbPrev24Pix(mask); + } + while (n--) { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); + mask = FbPrev24Pix(mask); + } + if (startmask) { + bits = READ(--src); + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask)); + } + } + else { + if (startmask) { + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask)); + dst++; + mask = FbNext24Pix(mask); + } + while (n--) { + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); + dst++; + mask = FbNext24Pix(mask); + } + if (endmask) { + bits = READ(src); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask)); + } + } + } + else { + if (srcX > dstX) { + leftShift = srcX - dstX; + rightShift = FB_UNIT - leftShift; + } + else { + rightShift = dstX - srcX; + leftShift = FB_UNIT - rightShift; + } + + bits1 = 0; + if (reverse) { + if (srcX < dstX) + bits1 = READ(--src); + if (endmask) { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(endmask, leftShift)) { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask)); + mask = FbPrev24Pix(mask); + } + while (n--) { + bits = FbScrRight(bits1, rightShift); + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); + mask = FbPrev24Pix(mask); + } + if (startmask) { + bits = FbScrRight(bits1, rightShift); + if (FbScrRight(startmask, leftShift)) { + bits1 = READ(--src); + bits |= FbScrLeft(bits1, leftShift); + } + --dst; + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask)); + } + } + else { + if (srcX > dstX) + bits1 = READ(src++); + if (startmask) { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask)); + dst++; + mask = FbNext24Pix(mask); + } + while (n--) { + bits = FbScrLeft(bits1, leftShift); + bits1 = READ(src++); + bits |= FbScrRight(bits1, rightShift); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); + dst++; + mask = FbNext24Pix(mask); + } + if (endmask) { + bits = FbScrLeft(bits1, leftShift); + if (FbScrLeft(endmask, rightShift)) { + bits1 = READ(src); + bits |= FbScrRight(bits1, rightShift); + } + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask)); + } + } + } +#ifdef DEBUG_BLT24 + { + int firstx, lastx, x; + + firstx = origX; + if (firstx) + firstx--; + lastx = origX + width / 24 + 1; + for (x = firstx; x <= lastx; x++) + ErrorF("%06x ", getPixel(origDst, x)); + ErrorF("\n"); + while (origNlw--) + ErrorF("%08x ", *origLine++); + ErrorF("\n"); + } +#endif +} + +void +fbBlt24(FbBits * srcLine, + FbStride srcStride, + int srcX, + FbBits * dstLine, + FbStride dstStride, + int dstX, + int width, + int height, int alu, FbBits pm, Bool reverse, Bool upsidedown) +{ + if (upsidedown) { + srcLine += (height - 1) * srcStride; + dstLine += (height - 1) * dstStride; + srcStride = -srcStride; + dstStride = -dstStride; + } + while (height--) { + fbBlt24Line(srcLine, srcX, dstLine, dstX, width, alu, pm, reverse); + srcLine += srcStride; + dstLine += dstStride; + } +#ifdef DEBUG_BLT24 + ErrorF("\n"); +#endif +} + +#if FB_SHIFT == FB_STIP_SHIFT + 1 + +/* + * Could be generalized to FB_SHIFT > FB_STIP_SHIFT + 1 by + * creating an ring of values stepped through for each line + */ + +void +fbBltOdd(FbBits * srcLine, + FbStride srcStrideEven, + FbStride srcStrideOdd, + int srcXEven, + int srcXOdd, + FbBits * dstLine, + FbStride dstStrideEven, + FbStride dstStrideOdd, + int dstXEven, + int dstXOdd, int width, int height, int alu, FbBits pm, int bpp) +{ + FbBits *src; + int leftShiftEven, rightShiftEven; + FbBits startmaskEven, endmaskEven; + int nmiddleEven; + + FbBits *dst; + int leftShiftOdd, rightShiftOdd; + FbBits startmaskOdd, endmaskOdd; + int nmiddleOdd; + + int leftShift, rightShift; + FbBits startmask, endmask; + int nmiddle; + + int srcX, dstX; + + FbBits bits, bits1; + int n; + + Bool destInvarient; + Bool even; + + FbDeclareMergeRop(); + + FbInitializeMergeRop(alu, pm); + destInvarient = FbDestInvarientMergeRop(); + + srcLine += srcXEven >> FB_SHIFT; + dstLine += dstXEven >> FB_SHIFT; + srcXEven &= FB_MASK; + dstXEven &= FB_MASK; + srcXOdd &= FB_MASK; + dstXOdd &= FB_MASK; + + FbMaskBits(dstXEven, width, startmaskEven, nmiddleEven, endmaskEven); + FbMaskBits(dstXOdd, width, startmaskOdd, nmiddleOdd, endmaskOdd); + + even = TRUE; + InitializeShifts(srcXEven, dstXEven, leftShiftEven, rightShiftEven); + InitializeShifts(srcXOdd, dstXOdd, leftShiftOdd, rightShiftOdd); + while (height--) { + src = srcLine; + dst = dstLine; + if (even) { + srcX = srcXEven; + dstX = dstXEven; + startmask = startmaskEven; + endmask = endmaskEven; + nmiddle = nmiddleEven; + leftShift = leftShiftEven; + rightShift = rightShiftEven; + srcLine += srcStrideEven; + dstLine += dstStrideEven; + even = FALSE; + } + else { + srcX = srcXOdd; + dstX = dstXOdd; + startmask = startmaskOdd; + endmask = endmaskOdd; + nmiddle = nmiddleOdd; + leftShift = leftShiftOdd; + rightShift = rightShiftOdd; + srcLine += srcStrideOdd; + dstLine += dstStrideOdd; + even = TRUE; + } + if (srcX == dstX) { + if (startmask) { + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), startmask)); + dst++; + } + n = nmiddle; + if (destInvarient) { + while (n--) { + bits = READ(src++); + WRITE(dst, FbDoDestInvarientMergeRop(bits)); + dst++; + } + } + else { + while (n--) { + bits = READ(src++); + WRITE(dst, FbDoMergeRop(bits, READ(dst))); + dst++; + } + } + if (endmask) { + bits = READ(src); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask)); + } + } + else { + bits = 0; + if (srcX > dstX) + bits = READ(src++); + if (startmask) { + bits1 = FbScrLeft(bits, leftShift); + bits = READ(src++); + bits1 |= FbScrRight(bits, rightShift); + WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), startmask)); + dst++; + } + n = nmiddle; + if (destInvarient) { + while (n--) { + bits1 = FbScrLeft(bits, leftShift); + bits = READ(src++); + bits1 |= FbScrRight(bits, rightShift); + WRITE(dst, FbDoDestInvarientMergeRop(bits1)); + dst++; + } + } + else { + while (n--) { + bits1 = FbScrLeft(bits, leftShift); + bits = READ(src++); + bits1 |= FbScrRight(bits, rightShift); + WRITE(dst, FbDoMergeRop(bits1, READ(dst))); + dst++; + } + } + if (endmask) { + bits1 = FbScrLeft(bits, leftShift); + if (FbScrLeft(endmask, rightShift)) { + bits = READ(src); + bits1 |= FbScrRight(bits, rightShift); + } + WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), endmask)); + } + } + } +} + +void +fbBltOdd24(FbBits * srcLine, + FbStride srcStrideEven, + FbStride srcStrideOdd, + int srcXEven, + int srcXOdd, + FbBits * dstLine, + FbStride dstStrideEven, + FbStride dstStrideOdd, + int dstXEven, int dstXOdd, int width, int height, int alu, FbBits pm) +{ + Bool even = TRUE; + + while (height--) { + if (even) { + fbBlt24Line(srcLine, srcXEven, dstLine, dstXEven, + width, alu, pm, FALSE); + srcLine += srcStrideEven; + dstLine += dstStrideEven; + even = FALSE; + } + else { + fbBlt24Line(srcLine, srcXOdd, dstLine, dstXOdd, + width, alu, pm, FALSE); + srcLine += srcStrideOdd; + dstLine += dstStrideOdd; + even = TRUE; + } + } +} + +#endif + +#if FB_STIP_SHIFT != FB_SHIFT +void +fbSetBltOdd(FbStip * stip, + FbStride stipStride, + int srcX, + FbBits ** bits, + FbStride * strideEven, + FbStride * strideOdd, int *srcXEven, int *srcXOdd) +{ + int srcAdjust; + int strideAdjust; + + /* + * bytes needed to align source + */ + srcAdjust = (((int) stip) & (FB_MASK >> 3)); + /* + * FbStip units needed to align stride + */ + strideAdjust = stipStride & (FB_MASK >> FB_STIP_SHIFT); + + *bits = (FbBits *) ((char *) stip - srcAdjust); + if (srcAdjust) { + *strideEven = FbStipStrideToBitsStride(stipStride + 1); + *strideOdd = FbStipStrideToBitsStride(stipStride); + + *srcXEven = srcX + (srcAdjust << 3); + *srcXOdd = srcX + (srcAdjust << 3) - (strideAdjust << FB_STIP_SHIFT); + } + else { + *strideEven = FbStipStrideToBitsStride(stipStride); + *strideOdd = FbStipStrideToBitsStride(stipStride + 1); + + *srcXEven = srcX; + *srcXOdd = srcX + (strideAdjust << FB_STIP_SHIFT); + } +} +#endif + +void +fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */ + int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */ + int dstX, int width, int height, int alu, FbBits pm, int bpp) +{ +#if FB_STIP_SHIFT != FB_SHIFT + if (FB_STIP_ODDSTRIDE(srcStride) || FB_STIP_ODDPTR(src) || + FB_STIP_ODDSTRIDE(dstStride) || FB_STIP_ODDPTR(dst)) { + FbStride srcStrideEven, srcStrideOdd; + FbStride dstStrideEven, dstStrideOdd; + int srcXEven, srcXOdd; + int dstXEven, dstXOdd; + FbBits *s, *d; + int sx, dx; + + src += srcX >> FB_STIP_SHIFT; + srcX &= FB_STIP_MASK; + dst += dstX >> FB_STIP_SHIFT; + dstX &= FB_STIP_MASK; + + fbSetBltOdd(src, srcStride, srcX, + &s, &srcStrideEven, &srcStrideOdd, &srcXEven, &srcXOdd); + + fbSetBltOdd(dst, dstStride, dstX, + &d, &dstStrideEven, &dstStrideOdd, &dstXEven, &dstXOdd); + + if (bpp == 24 && !FbCheck24Pix(pm)) { + fbBltOdd24(s, srcStrideEven, srcStrideOdd, + srcXEven, srcXOdd, + d, dstStrideEven, dstStrideOdd, + dstXEven, dstXOdd, width, height, alu, pm); + } + else { + fbBltOdd(s, srcStrideEven, srcStrideOdd, + srcXEven, srcXOdd, + d, dstStrideEven, dstStrideOdd, + dstXEven, dstXOdd, width, height, alu, pm, bpp); + } + } + else +#endif + { + fbBlt((FbBits *) src, FbStipStrideToBitsStride(srcStride), + srcX, + (FbBits *) dst, FbStipStrideToBitsStride(dstStride), + dstX, width, height, alu, pm, bpp, FALSE, FALSE); + } +} diff --git a/fb/fbbltone.c b/fb/fbbltone.c new file mode 100644 index 0000000..bfcb5a2 --- /dev/null +++ b/fb/fbbltone.c @@ -0,0 +1,802 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +#ifdef __clang__ +/* shift overflow is intentional */ +#pragma clang diagnostic ignored "-Wshift-overflow" +#endif + +/* + * Example: srcX = 13 dstX = 8 (FB unit 32 dstBpp 8) + * + * **** **** **** **** **** **** **** **** + * ^ + * ******** ******** ******** ******** + * ^ + * leftShift = 12 + * rightShift = 20 + * + * Example: srcX = 0 dstX = 8 (FB unit 32 dstBpp 8) + * + * **** **** **** **** **** **** **** **** + * ^ + * ******** ******** ******** ******** + * ^ + * + * leftShift = 24 + * rightShift = 8 + */ + +#define LoadBits {\ + if (leftShift) { \ + bitsRight = (src < srcEnd ? READ(src++) : 0); \ + bits = (FbStipLeft (bitsLeft, leftShift) | \ + FbStipRight(bitsRight, rightShift)); \ + bitsLeft = bitsRight; \ + } else \ + bits = (src < srcEnd ? READ(src++) : 0); \ +} + +#define LaneCases1(n,a) case n: FbLaneCase(n,a); break +#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a) +#define LaneCases4(n,a) LaneCases2(n,a); LaneCases2(n+2,a) +#define LaneCases8(n,a) LaneCases4(n,a); LaneCases4(n+4,a) +#define LaneCases16(n,a) LaneCases8(n,a); LaneCases8(n+8,a) +#define LaneCases32(n,a) LaneCases16(n,a); LaneCases16(n+16,a) +#define LaneCases64(n,a) LaneCases32(n,a); LaneCases32(n+32,a) +#define LaneCases128(n,a) LaneCases64(n,a); LaneCases64(n+64,a) +#define LaneCases256(n,a) LaneCases128(n,a); LaneCases128(n+128,a) + +#if FB_SHIFT == 6 +#define LaneCases(a) LaneCases256(0,a) +#endif + +#if FB_SHIFT == 5 +#define LaneCases(a) LaneCases16(0,a) +#endif + +#if FB_SHIFT == 6 +CARD8 fb8Lane[256] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, +}; + +CARD8 fb16Lane[256] = { + 0x00, 0x03, 0x0c, 0x0f, + 0x30, 0x33, 0x3c, 0x3f, + 0xc0, 0xc3, 0xcc, 0xcf, + 0xf0, 0xf3, 0xfc, 0xff, +}; + +CARD8 fb32Lane[16] = { + 0x00, 0x0f, 0xf0, 0xff, +}; +#endif + +#if FB_SHIFT == 5 +CARD8 fb8Lane[16] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +CARD8 fb16Lane[16] = { + 0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +CARD8 fb32Lane[16] = { + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; +#endif + +CARD8 *fbLaneTable[33] = { + 0, 0, 0, 0, 0, 0, 0, 0, + fb8Lane, 0, 0, 0, 0, 0, 0, 0, + fb16Lane, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + fb32Lane +}; + +void +fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */ + int srcX, /* bit position of source */ + FbBits * dst, FbStride dstStride, /* FbBits units per scanline */ + int dstX, /* bit position of dest */ + int dstBpp, /* bits per destination unit */ + int width, /* width in bits of destination */ + int height, /* height in scanlines */ + FbBits fgand, /* rrop values */ + FbBits fgxor, FbBits bgand, FbBits bgxor) +{ + const FbBits *fbBits; + FbBits *srcEnd; + int pixelsPerDst; /* dst pixels per FbBits */ + int unitsPerSrc; /* src patterns per FbStip */ + int leftShift, rightShift; /* align source with dest */ + FbBits startmask, endmask; /* dest scanline masks */ + FbStip bits = 0, bitsLeft, bitsRight; /* source bits */ + FbStip left; + FbBits mask; + int nDst; /* dest longwords (w.o. end) */ + int w; + int n, nmiddle; + int dstS; /* stipple-relative dst X coordinate */ + Bool copy; /* accelerate dest-invariant */ + Bool transparent; /* accelerate 0 nop */ + int srcinc; /* source units consumed */ + Bool endNeedsLoad = FALSE; /* need load for endmask */ + CARD8 *fbLane; + int startbyte, endbyte; + + if (dstBpp == 24) { + fbBltOne24(src, srcStride, srcX, + dst, dstStride, dstX, dstBpp, + width, height, fgand, fgxor, bgand, bgxor); + return; + } + + /* + * Do not read past the end of the buffer! + */ + srcEnd = src + height * srcStride; + + /* + * Number of destination units in FbBits == number of stipple pixels + * used each time + */ + pixelsPerDst = FB_UNIT / dstBpp; + + /* + * Number of source stipple patterns in FbStip + */ + unitsPerSrc = FB_STIP_UNIT / pixelsPerDst; + + copy = FALSE; + transparent = FALSE; + if (bgand == 0 && fgand == 0) + copy = TRUE; + else if (bgand == FB_ALLONES && bgxor == 0) + transparent = TRUE; + + /* + * Adjust source and dest to nearest FbBits boundary + */ + src += srcX >> FB_STIP_SHIFT; + dst += dstX >> FB_SHIFT; + srcX &= FB_STIP_MASK; + dstX &= FB_MASK; + + FbMaskBitsBytes(dstX, width, copy, + startmask, startbyte, nmiddle, endmask, endbyte); + + /* + * Compute effective dest alignment requirement for + * source -- must align source to dest unit boundary + */ + dstS = dstX / dstBpp; + /* + * Compute shift constants for effective alignement + */ + if (srcX >= dstS) { + leftShift = srcX - dstS; + rightShift = FB_STIP_UNIT - leftShift; + } + else { + rightShift = dstS - srcX; + leftShift = FB_STIP_UNIT - rightShift; + } + /* + * Get pointer to stipple mask array for this depth + */ + fbBits = 0; /* unused */ + if (pixelsPerDst <= 8) + fbBits = fbStippleTable[pixelsPerDst]; + fbLane = 0; + if (transparent && fgand == 0 && dstBpp >= 8) + fbLane = fbLaneTable[dstBpp]; + + /* + * Compute total number of destination words written, but + * don't count endmask + */ + nDst = nmiddle; + if (startmask) + nDst++; + + dstStride -= nDst; + + /* + * Compute total number of source words consumed + */ + + srcinc = (nDst + unitsPerSrc - 1) / unitsPerSrc; + + if (srcX > dstS) + srcinc++; + if (endmask) { + endNeedsLoad = nDst % unitsPerSrc == 0; + if (endNeedsLoad) + srcinc++; + } + + srcStride -= srcinc; + + /* + * Copy rectangle + */ + while (height--) { + w = nDst; /* total units across scanline */ + n = unitsPerSrc; /* units avail in single stipple */ + if (n > w) + n = w; + + bitsLeft = 0; + if (srcX > dstS) + bitsLeft = READ(src++); + if (n) { + /* + * Load first set of stipple bits + */ + LoadBits; + + /* + * Consume stipple bits for startmask + */ + if (startmask) { +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits, 16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)]; + if (fbLane) { + fbTransparentSpan(dst, mask & startmask, fgxor, 1); + } + else { + if (mask || !transparent) + FbDoLeftMaskByteStippleRRop(dst, mask, + fgand, fgxor, bgand, bgxor, + startbyte, startmask); + } + bits = FbStipLeft(bits, pixelsPerDst); + dst++; + n--; + w--; + } + /* + * Consume stipple bits across scanline + */ + for (;;) { + w -= n; + if (copy) { + while (n--) { +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits, 16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)]; + WRITE(dst, FbOpaqueStipple(mask, fgxor, bgxor)); + dst++; + bits = FbStipLeft(bits, pixelsPerDst); + } + } + else { + if (fbLane) { + while (bits && n) { + switch (fbLane[FbLeftStipBits(bits, pixelsPerDst)]) { + LaneCases((CARD8 *) dst); + } + bits = FbStipLeft(bits, pixelsPerDst); + dst++; + n--; + } + dst += n; + } + else { + while (n--) { + left = FbLeftStipBits(bits, pixelsPerDst); + if (left || !transparent) { + mask = fbBits[left]; + WRITE(dst, FbStippleRRop(READ(dst), mask, + fgand, fgxor, bgand, + bgxor)); + } + dst++; + bits = FbStipLeft(bits, pixelsPerDst); + } + } + } + if (!w) + break; + /* + * Load another set and reset number of available units + */ + LoadBits; + n = unitsPerSrc; + if (n > w) + n = w; + } + } + /* + * Consume stipple bits for endmask + */ + if (endmask) { + if (endNeedsLoad) { + LoadBits; + } +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits, 16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)]; + if (fbLane) { + fbTransparentSpan(dst, mask & endmask, fgxor, 1); + } + else { + if (mask || !transparent) + FbDoRightMaskByteStippleRRop(dst, mask, + fgand, fgxor, bgand, bgxor, + endbyte, endmask); + } + } + dst += dstStride; + src += srcStride; + } +} + +/* + * Crufty macros to initialize the mask array, most of this + * is to avoid compile-time warnings about shift overflow + */ + +#if BITMAP_BIT_ORDER == MSBFirst +#define Mask24Pos(x,r) ((x)*24-(r)) +#else +#define Mask24Pos(x,r) ((x)*24-((r) ? 24 - (r) : 0)) +#endif + +#define Mask24Neg(x,r) (Mask24Pos(x,r) < 0 ? -Mask24Pos(x,r) : 0) +#define Mask24Check(x,r) (Mask24Pos(x,r) < 0 ? 0 : \ + Mask24Pos(x,r) >= FB_UNIT ? 0 : Mask24Pos(x,r)) + +#define Mask24(x,r) (Mask24Pos(x,r) < FB_UNIT ? \ + (Mask24Pos(x,r) < 0 ? \ + 0xffffffU >> Mask24Neg (x,r) : \ + 0xffffffU << Mask24Check(x,r)) : 0) + +#define SelMask24(b,n,r) ((((b) >> n) & 1) * Mask24(n,r)) + +/* + * Untested for MSBFirst or FB_UNIT == 32 + */ + +#if FB_UNIT == 64 +#define C4_24(b,r) \ + (SelMask24(b,0,r) | \ + SelMask24(b,1,r) | \ + SelMask24(b,2,r) | \ + SelMask24(b,3,r)) + +#define FbStip24New(rot) (2 + (rot != 0)) +#define FbStip24Len 4 + +const FbBits fbStipple24Bits[3][1 << FbStip24Len] = { + /* rotate 0 */ + { + C4_24(0, 0), C4_24(1, 0), C4_24(2, 0), C4_24(3, 0), + C4_24(4, 0), C4_24(5, 0), C4_24(6, 0), C4_24(7, 0), + C4_24(8, 0), C4_24(9, 0), C4_24(10, 0), C4_24(11, 0), + C4_24(12, 0), C4_24(13, 0), C4_24(14, 0), C4_24(15, 0), + }, + /* rotate 8 */ + { + C4_24(0, 8), C4_24(1, 8), C4_24(2, 8), C4_24(3, 8), + C4_24(4, 8), C4_24(5, 8), C4_24(6, 8), C4_24(7, 8), + C4_24(8, 8), C4_24(9, 8), C4_24(10, 8), C4_24(11, 8), + C4_24(12, 8), C4_24(13, 8), C4_24(14, 8), C4_24(15, 8), + }, + /* rotate 16 */ + { + C4_24(0, 16), C4_24(1, 16), C4_24(2, 16), C4_24(3, 16), + C4_24(4, 16), C4_24(5, 16), C4_24(6, 16), C4_24(7, 16), + C4_24(8, 16), C4_24(9, 16), C4_24(10, 16), C4_24(11, 16), + C4_24(12, 16), C4_24(13, 16), C4_24(14, 16), C4_24(15, 16), + } +}; + +#endif + +#if FB_UNIT == 32 +#define C2_24(b,r) \ + (SelMask24(b,0,r) | \ + SelMask24(b,1,r)) + +#define FbStip24Len 2 +#if BITMAP_BIT_ORDER == MSBFirst +#define FbStip24New(rot) (1 + (rot == 0)) +#else +#define FbStip24New(rot) (1 + (rot == 8)) +#endif + +const FbBits fbStipple24Bits[3][1 << FbStip24Len] = { + /* rotate 0 */ + { + C2_24(0, 0), C2_24(1, 0), C2_24(2, 0), C2_24(3, 0), + }, + /* rotate 8 */ + { + C2_24(0, 8), C2_24(1, 8), C2_24(2, 8), C2_24(3, 8), + }, + /* rotate 16 */ + { + C2_24(0, 16), C2_24(1, 16), C2_24(2, 16), C2_24(3, 16), + } +}; +#endif + +#if BITMAP_BIT_ORDER == LSBFirst + +#define FbMergeStip24Bits(left, right, new) \ + (FbStipLeft (left, new) | FbStipRight ((right), (FbStip24Len - (new)))) + +#define FbMergePartStip24Bits(left, right, llen, rlen) \ + (left | FbStipRight(right, llen)) + +#else + +#define FbMergeStip24Bits(left, right, new) \ + ((FbStipLeft (left, new) & ((1 << FbStip24Len) - 1)) | right) + +#define FbMergePartStip24Bits(left, right, llen, rlen) \ + (FbStipLeft(left, rlen) | right) + +#endif + +#define fbFirstStipBits(len,stip) {\ + int __len = (len); \ + if (len <= remain) { \ + stip = FbLeftStipBits(bits, len); \ + } else { \ + stip = FbLeftStipBits(bits, remain); \ + bits = (src < srcEnd ? READ(src++) : 0); \ + __len = (len) - remain; \ + stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \ + remain, __len); \ + remain = FB_STIP_UNIT; \ + } \ + bits = FbStipLeft (bits, __len); \ + remain -= __len; \ +} + +#define fbInitStipBits(offset,len,stip) {\ + bits = FbStipLeft (READ(src++),offset); \ + remain = FB_STIP_UNIT - offset; \ + fbFirstStipBits(len,stip); \ + stip = FbMergeStip24Bits (0, stip, len); \ +} + +#define fbNextStipBits(rot,stip) {\ + int __new = FbStip24New(rot); \ + FbStip __right; \ + fbFirstStipBits(__new, __right); \ + stip = FbMergeStip24Bits (stip, __right, __new); \ + rot = FbNext24Rot (rot); \ +} + +/* + * Use deep mask tables that incorporate rotation, pull + * a variable number of bits out of the stipple and + * reuse the right bits as needed for the next write + * + * Yes, this is probably too much code, but most 24-bpp screens + * have no acceleration so this code is used for stipples, copyplane + * and text + */ +void +fbBltOne24(FbStip * srcLine, FbStride srcStride, /* FbStip units per scanline */ + int srcX, /* bit position of source */ + FbBits * dst, FbStride dstStride, /* FbBits units per scanline */ + int dstX, /* bit position of dest */ + int dstBpp, /* bits per destination unit */ + int width, /* width in bits of destination */ + int height, /* height in scanlines */ + FbBits fgand, /* rrop values */ + FbBits fgxor, FbBits bgand, FbBits bgxor) +{ + FbStip *src, *srcEnd; + FbBits leftMask, rightMask, mask; + int nlMiddle, nl; + FbStip stip, bits; + int remain; + int dstS; + int firstlen; + int rot0, rot; + int nDst; + + /* + * Do not read past the end of the buffer! + */ + srcEnd = srcLine + height * srcStride; + + srcLine += srcX >> FB_STIP_SHIFT; + dst += dstX >> FB_SHIFT; + srcX &= FB_STIP_MASK; + dstX &= FB_MASK; + rot0 = FbFirst24Rot(dstX); + + FbMaskBits(dstX, width, leftMask, nlMiddle, rightMask); + + dstS = (dstX + 23) / 24; + firstlen = FbStip24Len - dstS; + + nDst = nlMiddle; + if (leftMask) + nDst++; + dstStride -= nDst; + + /* opaque copy */ + if (bgand == 0 && fgand == 0) { + while (height--) { + rot = rot0; + src = srcLine; + srcLine += srcStride; + fbInitStipBits(srcX, firstlen, stip); + if (leftMask) { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, (READ(dst) & ~leftMask) | + (FbOpaqueStipple(mask, + FbRot24(fgxor, rot), FbRot24(bgxor, rot)) + & leftMask)); + dst++; + fbNextStipBits(rot, stip); + } + nl = nlMiddle; + while (nl--) { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, FbOpaqueStipple(mask, + FbRot24(fgxor, rot), + FbRot24(bgxor, rot))); + dst++; + fbNextStipBits(rot, stip); + } + if (rightMask) { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, (READ(dst) & ~rightMask) | + (FbOpaqueStipple(mask, + FbRot24(fgxor, rot), FbRot24(bgxor, rot)) + & rightMask)); + } + dst += dstStride; + src += srcStride; + } + } + /* transparent copy */ + else if (bgand == FB_ALLONES && bgxor == 0 && fgand == 0) { + while (height--) { + rot = rot0; + src = srcLine; + srcLine += srcStride; + fbInitStipBits(srcX, firstlen, stip); + if (leftMask) { + if (stip) { + mask = fbStipple24Bits[rot >> 3][stip] & leftMask; + WRITE(dst, + (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask)); + } + dst++; + fbNextStipBits(rot, stip); + } + nl = nlMiddle; + while (nl--) { + if (stip) { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, + (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask)); + } + dst++; + fbNextStipBits(rot, stip); + } + if (rightMask) { + if (stip) { + mask = fbStipple24Bits[rot >> 3][stip] & rightMask; + WRITE(dst, + (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask)); + } + } + dst += dstStride; + } + } + else { + while (height--) { + rot = rot0; + src = srcLine; + srcLine += srcStride; + fbInitStipBits(srcX, firstlen, stip); + if (leftMask) { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, FbStippleRRopMask(READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot), leftMask)); + dst++; + fbNextStipBits(rot, stip); + } + nl = nlMiddle; + while (nl--) { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, FbStippleRRop(READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot))); + dst++; + fbNextStipBits(rot, stip); + } + if (rightMask) { + mask = fbStipple24Bits[rot >> 3][stip]; + WRITE(dst, FbStippleRRopMask(READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot), rightMask)); + } + dst += dstStride; + } + } +} + +/* + * Not very efficient, but simple -- copy a single plane + * from an N bit image to a 1 bit image + */ + +void +fbBltPlane(FbBits * src, + FbStride srcStride, + int srcX, + int srcBpp, + FbStip * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbStip fgand, + FbStip fgxor, FbStip bgand, FbStip bgxor, Pixel planeMask) +{ + FbBits *s; + FbBits pm; + FbBits srcMask; + FbBits srcMaskFirst; + FbBits srcMask0 = 0; + FbBits srcBits; + + FbStip dstBits; + FbStip *d; + FbStip dstMask; + FbStip dstMaskFirst; + FbStip dstUnion; + int w; + int wt; + int rot0; + + if (!width) + return; + + src += srcX >> FB_SHIFT; + srcX &= FB_MASK; + + dst += dstX >> FB_STIP_SHIFT; + dstX &= FB_STIP_MASK; + + w = width / srcBpp; + + pm = fbReplicatePixel(planeMask, srcBpp); + if (srcBpp == 24) { + int tmpw = 24; + + rot0 = FbFirst24Rot(srcX); + if (srcX + tmpw > FB_UNIT) + tmpw = FB_UNIT - srcX; + srcMaskFirst = FbRot24(pm, rot0) & FbBitsMask(srcX, tmpw); + } + else { + rot0 = 0; + srcMaskFirst = pm & FbBitsMask(srcX, srcBpp); + srcMask0 = pm & FbBitsMask(0, srcBpp); + } + + dstMaskFirst = FbStipMask(dstX, 1); + while (height--) { + d = dst; + dst += dstStride; + s = src; + src += srcStride; + + srcMask = srcMaskFirst; + if (srcBpp == 24) + srcMask0 = FbRot24(pm, rot0) & FbBitsMask(0, srcBpp); + srcBits = READ(s++); + + dstMask = dstMaskFirst; + dstUnion = 0; + dstBits = 0; + + wt = w; + + while (wt--) { + if (!srcMask) { + srcBits = READ(s++); + if (srcBpp == 24) + srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0, 24); + srcMask = srcMask0; + } + if (!dstMask) { + WRITE(d, FbStippleRRopMask(READ(d), dstBits, + fgand, fgxor, bgand, bgxor, + dstUnion)); + d++; + dstMask = FbStipMask(0, 1); + dstUnion = 0; + dstBits = 0; + } + if (srcBits & srcMask) + dstBits |= dstMask; + dstUnion |= dstMask; + if (srcBpp == FB_UNIT) + srcMask = 0; + else + srcMask = FbScrRight(srcMask, srcBpp); + dstMask = FbStipRight(dstMask, 1); + } + if (dstUnion) + WRITE(d, FbStippleRRopMask(READ(d), dstBits, + fgand, fgxor, bgand, bgxor, dstUnion)); + } +} diff --git a/fb/fbcmap_mi.c b/fb/fbcmap_mi.c new file mode 100644 index 0000000..7b6a2c6 --- /dev/null +++ b/fb/fbcmap_mi.c @@ -0,0 +1,117 @@ +/* + * Copyright (c) 1987, Oracle and/or its affiliates. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/** + * This version of fbcmap.c is implemented in terms of mi functions. + * These functions used to be in fbcmap.c and depended upon the symbol + * XFree86Server being defined. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "fb.h" +#include "micmap.h" + +int +fbListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps) +{ + return miListInstalledColormaps(pScreen, pmaps); +} + +void +fbInstallColormap(ColormapPtr pmap) +{ + miInstallColormap(pmap); +} + +void +fbUninstallColormap(ColormapPtr pmap) +{ + miUninstallColormap(pmap); +} + +void +fbResolveColor(unsigned short *pred, + unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual) +{ + miResolveColor(pred, pgreen, pblue, pVisual); +} + +Bool +fbInitializeColormap(ColormapPtr pmap) +{ + return miInitializeColormap(pmap); +} + +int +fbExpandDirectColors(ColormapPtr pmap, + int ndef, xColorItem * indefs, xColorItem * outdefs) +{ + return miExpandDirectColors(pmap, ndef, indefs, outdefs); +} + +Bool +fbCreateDefColormap(ScreenPtr pScreen) +{ + return miCreateDefColormap(pScreen); +} + +void +fbClearVisualTypes(void) +{ + miClearVisualTypes(); +} + +Bool +fbSetVisualTypes(int depth, int visuals, int bitsPerRGB) +{ + return miSetVisualTypes(depth, visuals, bitsPerRGB, -1); +} + +Bool +fbSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, + Pixel redMask, Pixel greenMask, Pixel blueMask) +{ + return miSetVisualTypesAndMasks(depth, visuals, bitsPerRGB, -1, + redMask, greenMask, blueMask); +} + +/* + * Given a list of formats for a screen, create a list + * of visuals and depths for the screen which coorespond to + * the set which can be used with this version of fb. + */ +Bool +fbInitVisuals(VisualPtr * visualp, + DepthPtr * depthp, + int *nvisualp, + int *ndepthp, + int *rootDepthp, + VisualID * defaultVisp, unsigned long sizes, int bitsPerRGB) +{ + return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, + defaultVisp, sizes, bitsPerRGB, -1); +} diff --git a/fb/fbcopy.c b/fb/fbcopy.c new file mode 100644 index 0000000..541ef71 --- /dev/null +++ b/fb/fbcopy.c @@ -0,0 +1,275 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +void +fbCopyNtoN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) +{ + CARD8 alu = pGC ? pGC->alu : GXcopy; + FbBits pm = pGC ? fbGetGCPrivate(pGC)->pm : FB_ALLONES; + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (nbox--) { +#ifndef FB_ACCESS_WRAPPER /* pixman_blt() doesn't support accessors yet */ + if (pm == FB_ALLONES && alu == GXcopy && !reverse && !upsidedown) { + if (!pixman_blt + ((uint32_t *) src, (uint32_t *) dst, srcStride, dstStride, + srcBpp, dstBpp, (pbox->x1 + dx + srcXoff), + (pbox->y1 + dy + srcYoff), (pbox->x1 + dstXoff), + (pbox->y1 + dstYoff), (pbox->x2 - pbox->x1), + (pbox->y2 - pbox->y1))) + goto fallback; + else + goto next; + } + fallback: +#endif + fbBlt(src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), alu, pm, dstBpp, reverse, upsidedown); +#ifndef FB_ACCESS_WRAPPER + next: +#endif + pbox++; + } + fbFinishAccess(pDstDrawable); + fbFinishAccess(pSrcDrawable); +} + +void +fbCopy1toN(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (nbox--) { + if (dstBpp == 1) { + fbBlt(src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), + FbOpaqueStipple1Rop(pGC->alu, + pGC->fgPixel, pGC->bgPixel), + pPriv->pm, dstBpp, reverse, upsidedown); + } + else { + fbBltOne((FbStip *) (src + (pbox->y1 + dy + srcYoff) * srcStride), + srcStride * (FB_UNIT / FB_STIP_UNIT), + (pbox->x1 + dx + srcXoff), + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), + pPriv->and, pPriv->xor, pPriv->bgand, pPriv->bgxor); + } + pbox++; + } + + fbFinishAccess(pDstDrawable); + fbFinishAccess(pSrcDrawable); +} + +void +fbCopyNto1(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + + while (nbox--) { + if (pDstDrawable->bitsPerPixel == 1) { + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, + srcYoff); + fbGetStipDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, + dstYoff); + fbBltPlane(src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, srcBpp, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, + (pbox->x1 + dstXoff) * dstBpp, + (pbox->x2 - pbox->x1) * srcBpp, (pbox->y2 - pbox->y1), + (FbStip) pPriv->and, (FbStip) pPriv->xor, + (FbStip) pPriv->bgand, (FbStip) pPriv->bgxor, bitplane); + fbFinishAccess(pDstDrawable); + fbFinishAccess(pSrcDrawable); + } + else { + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + FbStip *tmp; + FbStride tmpStride; + int width, height; + + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + tmpStride = ((width + FB_STIP_MASK) >> FB_STIP_SHIFT); + tmp = malloc(tmpStride * height * sizeof(FbStip)); + if (!tmp) + return; + + fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, + srcYoff); + fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, + dstYoff); + + fbBltPlane(src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + srcBpp, + tmp, + tmpStride, + 0, + width * srcBpp, + height, + fbAndStip(GXcopy, FB_ALLONES, FB_ALLONES), + fbXorStip(GXcopy, FB_ALLONES, FB_ALLONES), + fbAndStip(GXcopy, 0, FB_ALLONES), + fbXorStip(GXcopy, 0, FB_ALLONES), bitplane); + fbBltOne(tmp, + tmpStride, + 0, + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + dstBpp, + width * dstBpp, + height, + pPriv->and, pPriv->xor, pPriv->bgand, pPriv->bgxor); + free(tmp); + + fbFinishAccess(pDstDrawable); + fbFinishAccess(pSrcDrawable); + } + pbox++; + } +} + +RegionPtr +fbCopyArea(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut) +{ + miCopyProc copy; + + if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) + copy = fb24_32CopyMtoN; + else + copy = fbCopyNtoN; + return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + widthSrc, heightSrc, xOut, yOut, copy, 0, 0); +} + +RegionPtr +fbCopyPlane(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, int xOut, int yOut, unsigned long bitplane) +{ + if (pSrcDrawable->bitsPerPixel > 1) + return miDoCopy(pSrcDrawable, pDstDrawable, pGC, + xIn, yIn, widthSrc, heightSrc, + xOut, yOut, fbCopyNto1, (Pixel) bitplane, 0); + else if (bitplane & 1) + return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + widthSrc, heightSrc, xOut, yOut, fbCopy1toN, + (Pixel) bitplane, 0); + else + return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + xIn, yIn, + widthSrc, heightSrc, xOut, yOut, bitplane); +} diff --git a/fb/fbfill.c b/fb/fbfill.c new file mode 100644 index 0000000..de9d6b3 --- /dev/null +++ b/fb/fbfill.c @@ -0,0 +1,192 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + switch (pGC->fillStyle) { + case FillSolid: +#ifndef FB_ACCESS_WRAPPER + if (pPriv->and || !pixman_fill((uint32_t *) dst, dstStride, dstBpp, + x + dstXoff, y + dstYoff, + width, height, pPriv->xor)) +#endif + fbSolid(dst + (y + dstYoff) * dstStride, + dstStride, + (x + dstXoff) * dstBpp, + dstBpp, width * dstBpp, height, pPriv->and, pPriv->xor); + break; + case FillStippled: + case FillOpaqueStippled:{ + PixmapPtr pStip = pGC->stipple; + int stipWidth = pStip->drawable.width; + int stipHeight = pStip->drawable.height; + + if (dstBpp == 1) { + int alu; + FbBits *stip; + FbStride stipStride; + int stipBpp; + _X_UNUSED int stipXoff, stipYoff; + + if (pGC->fillStyle == FillStippled) + alu = FbStipple1Rop(pGC->alu, pGC->fgPixel); + else + alu = FbOpaqueStipple1Rop(pGC->alu, pGC->fgPixel, pGC->bgPixel); + fbGetDrawable(&pStip->drawable, stip, stipStride, stipBpp, stipXoff, + stipYoff); + fbTile(dst + (y + dstYoff) * dstStride, dstStride, x + dstXoff, + width, height, stip, stipStride, stipWidth, stipHeight, alu, + pPriv->pm, dstBpp, (pGC->patOrg.x + pDrawable->x + dstXoff), + pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess(&pStip->drawable); + } + else { + FbStip *stip; + FbStride stipStride; + int stipBpp; + _X_UNUSED int stipXoff, stipYoff; + FbBits fgand, fgxor, bgand, bgxor; + + fgand = pPriv->and; + fgxor = pPriv->xor; + if (pGC->fillStyle == FillStippled) { + bgand = fbAnd(GXnoop, (FbBits) 0, FB_ALLONES); + bgxor = fbXor(GXnoop, (FbBits) 0, FB_ALLONES); + } + else { + bgand = pPriv->bgand; + bgxor = pPriv->bgxor; + } + + fbGetStipDrawable(&pStip->drawable, stip, stipStride, stipBpp, + stipXoff, stipYoff); + fbStipple(dst + (y + dstYoff) * dstStride, dstStride, + (x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height, + stip, stipStride, stipWidth, stipHeight, + pPriv->evenStipple, fgand, fgxor, bgand, bgxor, + pGC->patOrg.x + pDrawable->x + dstXoff, + pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess(&pStip->drawable); + } + break; + } + case FillTiled:{ + PixmapPtr pTile = pGC->tile.pixmap; + FbBits *tile; + FbStride tileStride; + int tileBpp; + int tileWidth; + int tileHeight; + _X_UNUSED int tileXoff, tileYoff; + + fbGetDrawable(&pTile->drawable, tile, tileStride, tileBpp, tileXoff, + tileYoff); + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + fbTile(dst + (y + dstYoff) * dstStride, + dstStride, + (x + dstXoff) * dstBpp, + width * dstBpp, height, + tile, + tileStride, + tileWidth * tileBpp, + tileHeight, + pGC->alu, + pPriv->pm, + dstBpp, + (pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp, + pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess(&pTile->drawable); + break; + } + } + fbValidateDrawable(pDrawable); + fbFinishAccess(pDrawable); +} + +void +fbSolidBoxClipped(DrawablePtr pDrawable, + RegionPtr pClip, + int x1, int y1, int x2, int y2, FbBits and, FbBits xor) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxPtr pbox; + int nbox; + int partX1, partX2, partY1, partY2; + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip); + nbox--; pbox++) { + partX1 = pbox->x1; + if (partX1 < x1) + partX1 = x1; + + partX2 = pbox->x2; + if (partX2 > x2) + partX2 = x2; + + if (partX2 <= partX1) + continue; + + partY1 = pbox->y1; + if (partY1 < y1) + partY1 = y1; + + partY2 = pbox->y2; + if (partY2 > y2) + partY2 = y2; + + if (partY2 <= partY1) + continue; + +#ifndef FB_ACCESS_WRAPPER + if (and || !pixman_fill((uint32_t *) dst, dstStride, dstBpp, + partX1 + dstXoff, partY1 + dstYoff, + (partX2 - partX1), (partY2 - partY1), xor)) +#endif + fbSolid(dst + (partY1 + dstYoff) * dstStride, + dstStride, + (partX1 + dstXoff) * dstBpp, + dstBpp, + (partX2 - partX1) * dstBpp, (partY2 - partY1), and, xor); + } + fbFinishAccess(pDrawable); +} diff --git a/fb/fbfillrect.c b/fb/fbfillrect.c new file mode 100644 index 0000000..64ba2b4 --- /dev/null +++ b/fb/fbfillrect.c @@ -0,0 +1,103 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect) +{ + RegionPtr pClip = fbGetCompositeClip(pGC); + register BoxPtr pbox; + BoxPtr pextent; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1, fullY2; + int partX1, partX2, partY1, partY2; + int xorg, yorg; + int n; + + xorg = pDrawable->x; + yorg = pDrawable->y; + + pextent = RegionExtents(pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (nrect--) { + fullX1 = prect->x + xorg; + fullY1 = prect->y + yorg; + fullX2 = fullX1 + (int) prect->width; + fullY2 = fullY1 + (int) prect->height; + prect++; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullY1 < extentY1) + fullY1 = extentY1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullY2 > extentY2) + fullY2 = extentY2; + + if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) + continue; + n = RegionNumRects(pClip); + if (n == 1) { + fbFill(pDrawable, + pGC, fullX1, fullY1, fullX2 - fullX1, fullY2 - fullY1); + } + else { + pbox = RegionRects(pClip); + /* + * clip the rectangle to each box in the clip region + * this is logically equivalent to calling Intersect() + */ + while (n--) { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partY1 = pbox->y1; + if (partY1 < fullY1) + partY1 = fullY1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + partY2 = pbox->y2; + if (partY2 > fullY2) + partY2 = fullY2; + + pbox++; + + if (partX1 < partX2 && partY1 < partY2) + fbFill(pDrawable, pGC, + partX1, partY1, partX2 - partX1, partY2 - partY1); + } + } + } +} diff --git a/fb/fbfillsp.c b/fb/fbfillsp.c new file mode 100644 index 0000000..4debe1e --- /dev/null +++ b/fb/fbfillsp.c @@ -0,0 +1,87 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbFillSpans(DrawablePtr pDrawable, + GCPtr pGC, int n, DDXPointPtr ppt, int *pwidth, int fSorted) +{ + RegionPtr pClip = fbGetCompositeClip(pGC); + BoxPtr pextent, pbox; + int nbox; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1; + int partX1, partX2; + + pextent = RegionExtents(pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (n--) { + fullX1 = ppt->x; + fullY1 = ppt->y; + fullX2 = fullX1 + (int) *pwidth; + ppt++; + pwidth++; + + if (fullY1 < extentY1 || extentY2 <= fullY1) + continue; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullX1 >= fullX2) + continue; + + nbox = RegionNumRects(pClip); + if (nbox == 1) { + fbFill(pDrawable, pGC, fullX1, fullY1, fullX2 - fullX1, 1); + } + else { + pbox = RegionRects(pClip); + while (nbox--) { + if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + if (partX2 > partX1) { + fbFill(pDrawable, pGC, + partX1, fullY1, partX2 - partX1, 1); + } + } + pbox++; + } + } + } +} diff --git a/fb/fbgc.c b/fb/fbgc.c new file mode 100644 index 0000000..f4d7f3a --- /dev/null +++ b/fb/fbgc.c @@ -0,0 +1,296 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +const GCFuncs fbGCFuncs = { + fbValidateGC, + miChangeGC, + miCopyGC, + miDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip, +}; + +const GCOps fbGCOps = { + fbFillSpans, + fbSetSpans, + fbPutImage, + fbCopyArea, + fbCopyPlane, + fbPolyPoint, + fbPolyLine, + fbPolySegment, + fbPolyRectangle, + fbPolyArc, + miFillPolygon, + fbPolyFillRect, + fbPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + fbImageGlyphBlt, + fbPolyGlyphBlt, + fbPushPixels +}; + +Bool +fbCreateGC(GCPtr pGC) +{ + pGC->ops = (GCOps *) &fbGCOps; + pGC->funcs = (GCFuncs *) &fbGCFuncs; + + /* fb wants to translate before scan conversion */ + pGC->miTranslate = 1; + pGC->fExpose = 1; + + fbGetGCPrivate(pGC)->bpp = BitsPerPixel(pGC->depth); + return TRUE; +} + +/* + * Pad pixmap to FB_UNIT bits wide + */ +void +fbPadPixmap(PixmapPtr pPixmap) +{ + int width; + FbBits *bits; + FbBits b; + FbBits mask; + int height; + int w; + int stride; + int bpp; + _X_UNUSED int xOff, yOff; + + fbGetDrawable(&pPixmap->drawable, bits, stride, bpp, xOff, yOff); + + width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel; + height = pPixmap->drawable.height; + mask = FbBitsMask(0, width); + while (height--) { + b = READ(bits) & mask; + w = width; + while (w < FB_UNIT) { + b = b | FbScrRight(b, w); + w <<= 1; + } + WRITE(bits, b); + bits += stride; + } + + fbFinishAccess(&pPixmap->drawable); +} + +/* + * Verify that 'bits' repeats every 'len' bits + */ +static Bool +fbBitsRepeat(FbBits bits, int len, int width) +{ + FbBits mask = FbBitsMask(0, len); + FbBits orig = bits & mask; + int i; + + if (width > FB_UNIT) + width = FB_UNIT; + for (i = 0; i < width / len; i++) { + if ((bits & mask) != orig) + return FALSE; + bits = FbScrLeft(bits, len); + } + return TRUE; +} + +/* + * Check whether an entire bitmap line is a repetition of + * the first 'len' bits + */ +static Bool +fbLineRepeat(FbBits * bits, int len, int width) +{ + FbBits first = bits[0]; + + if (!fbBitsRepeat(first, len, width)) + return FALSE; + width = (width + FB_UNIT - 1) >> FB_SHIFT; + bits++; + while (--width) + if (READ(bits) != first) + return FALSE; + return TRUE; +} + +/* + * The even stipple code wants the first FB_UNIT/bpp bits on + * each scanline to represent the entire stipple + */ +static Bool +fbCanEvenStipple(PixmapPtr pStipple, int bpp) +{ + int len = FB_UNIT / bpp; + FbBits *bits; + int stride; + int stip_bpp; + _X_UNUSED int stipXoff, stipYoff; + int h; + + /* can't even stipple 24bpp drawables */ + if ((bpp & (bpp - 1)) != 0) + return FALSE; + /* make sure the stipple width is a multiple of the even stipple width */ + if (pStipple->drawable.width % len != 0) + return FALSE; + fbGetDrawable(&pStipple->drawable, bits, stride, stip_bpp, stipXoff, + stipYoff); + h = pStipple->drawable.height; + /* check to see that the stipple repeats horizontally */ + while (h--) { + if (!fbLineRepeat(bits, len, pStipple->drawable.width)) { + fbFinishAccess(&pStipple->drawable); + return FALSE; + } + bits += stride; + } + fbFinishAccess(&pStipple->drawable); + return TRUE; +} + +void +fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbBits mask; + + /* + * if the client clip is different or moved OR the subwindowMode has + * changed OR the window's clip has changed since the last validation + * we need to recompute the composite clip + */ + + if ((changes & + (GCClipXOrigin | GCClipYOrigin | GCClipMask | GCSubwindowMode)) || + (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) + ) { + miComputeCompositeClip(pGC, pDrawable); + } + + if (pPriv->bpp != pDrawable->bitsPerPixel) { + changes |= GCStipple | GCForeground | GCBackground | GCPlaneMask; + pPriv->bpp = pDrawable->bitsPerPixel; + } + if ((changes & GCTile) && fbGetRotatedPixmap(pGC)) { + (*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC)); + fbGetRotatedPixmap(pGC) = 0; + } + + if (pGC->fillStyle == FillTiled) { + PixmapPtr pOldTile, pNewTile; + + pOldTile = pGC->tile.pixmap; + if (pOldTile->drawable.bitsPerPixel != pDrawable->bitsPerPixel) { + pNewTile = fbGetRotatedPixmap(pGC); + if (!pNewTile || + pNewTile->drawable.bitsPerPixel != pDrawable->bitsPerPixel) { + if (pNewTile) + (*pGC->pScreen->DestroyPixmap) (pNewTile); + pNewTile = + fb24_32ReformatTile(pOldTile, pDrawable->bitsPerPixel); + } + if (pNewTile) { + fbGetRotatedPixmap(pGC) = pOldTile; + pGC->tile.pixmap = pNewTile; + changes |= GCTile; + } + } + } + if (changes & GCTile) { + if (!pGC->tileIsPixel && + FbEvenTile(pGC->tile.pixmap->drawable.width * + pDrawable->bitsPerPixel)) + fbPadPixmap(pGC->tile.pixmap); + } + if (changes & GCStipple) { + pPriv->evenStipple = FALSE; + + if (pGC->stipple) { + + /* can we do an even stipple ?? */ + if (FbEvenStip(pGC->stipple->drawable.width, + pDrawable->bitsPerPixel) && + (fbCanEvenStipple(pGC->stipple, pDrawable->bitsPerPixel))) + pPriv->evenStipple = TRUE; + + if (pGC->stipple->drawable.width * pDrawable->bitsPerPixel < + FB_UNIT) + fbPadPixmap(pGC->stipple); + } + } + /* + * Recompute reduced rop values + */ + if (changes & (GCForeground | GCBackground | GCPlaneMask | GCFunction)) { + int s; + FbBits depthMask; + + mask = FbFullMask(pDrawable->bitsPerPixel); + depthMask = FbFullMask(pDrawable->depth); + + pPriv->fg = pGC->fgPixel & mask; + pPriv->bg = pGC->bgPixel & mask; + + if ((pGC->planemask & depthMask) == depthMask) + pPriv->pm = mask; + else + pPriv->pm = pGC->planemask & mask; + + s = pDrawable->bitsPerPixel; + while (s < FB_UNIT) { + pPriv->fg |= pPriv->fg << s; + pPriv->bg |= pPriv->bg << s; + pPriv->pm |= pPriv->pm << s; + s <<= 1; + } + pPriv->and = fbAnd(pGC->alu, pPriv->fg, pPriv->pm); + pPriv->xor = fbXor(pGC->alu, pPriv->fg, pPriv->pm); + pPriv->bgand = fbAnd(pGC->alu, pPriv->bg, pPriv->pm); + pPriv->bgxor = fbXor(pGC->alu, pPriv->bg, pPriv->pm); + } + if (changes & GCDashList) { + unsigned short n = pGC->numInDashList; + unsigned char *dash = pGC->dash; + unsigned int dashLength = 0; + + while (n--) + dashLength += (unsigned int) *dash++; + pPriv->dashLength = dashLength; + } +} diff --git a/fb/fbgetsp.c b/fb/fbgetsp.c new file mode 100644 index 0000000..9a163b2 --- /dev/null +++ b/fb/fbgetsp.c @@ -0,0 +1,70 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbGetSpans(DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart) +{ + FbBits *src, *dst; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + int xoff; + + /* + * XFree86 DDX empties the root borderClip when the VT is + * switched away; this checks for that case + */ + if (!fbDrawableEnabled(pDrawable)) + return; + + if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) { + fb24_32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart); + return; + } + + fbGetDrawable(pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + + while (nspans--) { + xoff = (int) (((long) pchardstStart) & (FB_MASK >> 3)); + dst = (FbBits *) (pchardstStart - xoff); + xoff <<= 3; + fbBlt(src + (ppt->y + srcYoff) * srcStride, srcStride, + (ppt->x + srcXoff) * srcBpp, + dst, + 1, + xoff, + *pwidth * srcBpp, 1, GXcopy, FB_ALLONES, srcBpp, FALSE, FALSE); + pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + + fbFinishAccess(pDrawable); +} diff --git a/fb/fbglyph.c b/fb/fbglyph.c new file mode 100644 index 0000000..3080a77 --- /dev/null +++ b/fb/fbglyph.c @@ -0,0 +1,416 @@ +/* + * + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" +#include +#include "dixfontstr.h" + +Bool +fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height) +{ + BoxRec box; + BoxPtr pExtents = RegionExtents(pRegion); + + /* + * Check extents by hand to avoid 16 bit overflows + */ + if (x < (int) pExtents->x1) + return FALSE; + if ((int) pExtents->x2 < x + width) + return FALSE; + if (y < (int) pExtents->y1) + return FALSE; + if ((int) pExtents->y2 < y + height) + return FALSE; + box.x1 = x; + box.x2 = x + width; + box.y1 = y; + box.y2 = y + height; + return RegionContainsRect(pRegion, &box) == rgnIN; +} + +#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg) +#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg) +#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg) +#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst +#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg) +#else +#define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB) +#endif + +/* + * This is a bit tricky, but it's brief. Write 12 bytes worth + * of dest, which is four pixels, at a time. This gives constant + * code for each pattern as they're always aligned the same + * + * a b c d a b c d a b c d bytes + * A B C A B C A B C A B C pixels + * + * f0 f1 f2 + * A B C A B C A B C A B C pixels LSB + * C A B C A B C A B C A B pixels MSB + * + * LSB MSB + * A f0 f1 + * B f1 f2 + * C f2 f0 + * A B f0 f2 + * B C f1 f0 + * C A f2 f1 + * A B C A f0 f1 + * B C A B f1 f2 + * C A B C f2 f0 + */ + +#undef _A +#undef _B +#undef _C +#undef _AB +#undef _BC +#undef _CA +#undef _ABCA +#undef _BCAB +#undef _CABC + +#if IMAGE_BYTE_ORDER == MSBFirst +#define _A f1 +#define _B f2 +#define _C f0 +#define _AB f2 +#define _BC f0 +#define _CA f1 +#define _ABCA f1 +#define _BCAB f2 +#define _CABC f0 +#define CASE(a,b,c,d) ((a << 3) | (b << 2) | (c << 1) | d) +#else +#define _A f0 +#define _B f1 +#define _C f2 +#define _AB f0 +#define _BC f1 +#define _CA f2 +#define _ABCA f0 +#define _BCAB f1 +#define _CABC f2 +#define CASE(a,b,c,d) (a | (b << 1) | (c << 2) | (d << 3)) +#endif + +void +fbGlyph24(FbBits * dstBits, + FbStride dstStride, + int dstBpp, FbStip * stipple, FbBits fg, int x, int height) +{ + int lshift; + FbStip bits; + CARD8 *dstLine; + CARD8 *dst; + FbStip f0, f1, f2; + int n; + int shift; + + f0 = fg; + f1 = FbRot24(f0, 16); + f2 = FbRot24(f0, 8); + + dstLine = (CARD8 *) dstBits; + dstLine += (x & ~3) * 3; + dstStride *= (sizeof(FbBits) / sizeof(CARD8)); + shift = x & 3; + lshift = 4 - shift; + while (height--) { + bits = READ(stipple++); + n = lshift; + dst = dstLine; + while (bits) { + switch (FbStipMoveLsb(FbLeftStipBits(bits, n), 4, n)) { + case CASE(0, 0, 0, 0): + break; + case CASE(1, 0, 0, 0): + WRITE2(dst, 0, _AB); + WRITE1(dst, 2, _C); + break; + case CASE(0, 1, 0, 0): + WRITE1(dst, 3, _A); + WRITE2(dst, 4, _BC); + break; + case CASE(1, 1, 0, 0): + WRITE4(dst, 0, _ABCA); + WRITE2(dst, 4, _BC); + break; + case CASE(0, 0, 1, 0): + WRITE2(dst, 6, _AB); + WRITE1(dst, 8, _C); + break; + case CASE(1, 0, 1, 0): + WRITE2(dst, 0, _AB); + WRITE1(dst, 2, _C); + + WRITE2(dst, 6, _AB); + WRITE1(dst, 8, _C); + break; + case CASE(0, 1, 1, 0): + WRITE1(dst, 3, _A); + WRITE4(dst, 4, _BCAB); + WRITE1(dst, 8, _C); + break; + case CASE(1, 1, 1, 0): + WRITE8(dst); + WRITE1(dst, 8, _C); + break; + case CASE(0, 0, 0, 1): + WRITE1(dst, 9, _A); + WRITE2(dst, 10, _BC); + break; + case CASE(1, 0, 0, 1): + WRITE2(dst, 0, _AB); + WRITE1(dst, 2, _C); + + WRITE1(dst, 9, _A); + WRITE2(dst, 10, _BC); + break; + case CASE(0, 1, 0, 1): + WRITE1(dst, 3, _A); + WRITE2(dst, 4, _BC); + + WRITE1(dst, 9, _A); + WRITE2(dst, 10, _BC); + break; + case CASE(1, 1, 0, 1): + WRITE4(dst, 0, _ABCA); + WRITE2(dst, 4, _BC); + + WRITE1(dst, 9, _A); + WRITE2(dst, 10, _BC); + break; + case CASE(0, 0, 1, 1): + WRITE2(dst, 6, _AB); + WRITE4(dst, 8, _CABC); + break; + case CASE(1, 0, 1, 1): + WRITE2(dst, 0, _AB); + WRITE1(dst, 2, _C); + + WRITE2(dst, 6, _AB); + WRITE4(dst, 8, _CABC); + break; + case CASE(0, 1, 1, 1): + WRITE1(dst, 3, _A); + WRITE4(dst, 4, _BCAB); + WRITE4(dst, 8, _CABC); + break; + case CASE(1, 1, 1, 1): + WRITE8(dst); + WRITE4(dst, 8, _CABC); + break; + } + bits = FbStipLeft(bits, n); + n = 4; + dst += 12; + } + dstLine += dstStride; + } +} + +void +fbPolyGlyphBlt(DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, CharInfoPtr * ppci, pointer pglyphBase) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + CharInfoPtr pci; + unsigned char *pglyph; /* pointer bits in glyph */ + int gx, gy; + int gWidth, gHeight; /* width and height of glyph */ + FbStride gStride; /* stride of glyph */ + void (*glyph) (FbBits *, FbStride, int, FbStip *, FbBits, int, int); + FbBits *dst = 0; + FbStride dstStride = 0; + int dstBpp = 0; + int dstXoff = 0, dstYoff = 0; + + glyph = 0; + if (pGC->fillStyle == FillSolid && pPriv->and == 0) { + dstBpp = pDrawable->bitsPerPixel; + switch (dstBpp) { + case 8: + glyph = fbGlyph8; + break; + case 16: + glyph = fbGlyph16; + break; + case 24: + glyph = fbGlyph24; + break; + case 32: + glyph = fbGlyph32; + break; + } + } + x += pDrawable->x; + y += pDrawable->y; + + while (nglyph--) { + pci = *ppci++; + pglyph = FONTGLYPHBITS(pglyphBase, pci); + gWidth = GLYPHWIDTHPIXELS(pci); + gHeight = GLYPHHEIGHTPIXELS(pci); + if (gWidth && gHeight) { + gx = x + pci->metrics.leftSideBearing; + gy = y - pci->metrics.ascent; + if (glyph && gWidth <= sizeof(FbStip) * 8 && + fbGlyphIn(fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, + dstYoff); + (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, + (FbStip *) pglyph, pPriv->xor, gx + dstXoff, gHeight); + fbFinishAccess(pDrawable); + } + else { + gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof(FbStip); + fbPushImage(pDrawable, + pGC, + (FbStip *) pglyph, + gStride, 0, gx, gy, gWidth, gHeight); + } + } + x += pci->metrics.characterWidth; + } +} + +void +fbImageGlyphBlt(DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, CharInfoPtr * ppciInit, pointer pglyphBase) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + CharInfoPtr *ppci; + CharInfoPtr pci; + unsigned char *pglyph; /* pointer bits in glyph */ + int gWidth, gHeight; /* width and height of glyph */ + FbStride gStride; /* stride of glyph */ + Bool opaque; + int n; + int gx, gy; + void (*glyph) (FbBits *, FbStride, int, FbStip *, FbBits, int, int); + FbBits *dst = 0; + FbStride dstStride = 0; + int dstBpp = 0; + int dstXoff = 0, dstYoff = 0; + + glyph = 0; + if (pPriv->and == 0) { + dstBpp = pDrawable->bitsPerPixel; + switch (dstBpp) { + case 8: + glyph = fbGlyph8; + break; + case 16: + glyph = fbGlyph16; + break; + case 24: + glyph = fbGlyph24; + break; + case 32: + glyph = fbGlyph32; + break; + } + } + + x += pDrawable->x; + y += pDrawable->y; + + if (TERMINALFONT(pGC->font) + && !glyph) { + opaque = TRUE; + } + else { + int xBack, widthBack; + int yBack, heightBack; + + ppci = ppciInit; + n = nglyph; + widthBack = 0; + while (n--) + widthBack += (*ppci++)->metrics.characterWidth; + + xBack = x; + if (widthBack < 0) { + xBack += widthBack; + widthBack = -widthBack; + } + yBack = y - FONTASCENT(pGC->font); + heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); + fbSolidBoxClipped(pDrawable, + fbGetCompositeClip(pGC), + xBack, + yBack, + xBack + widthBack, + yBack + heightBack, + fbAnd(GXcopy, pPriv->bg, pPriv->pm), + fbXor(GXcopy, pPriv->bg, pPriv->pm)); + opaque = FALSE; + } + + ppci = ppciInit; + while (nglyph--) { + pci = *ppci++; + pglyph = FONTGLYPHBITS(pglyphBase, pci); + gWidth = GLYPHWIDTHPIXELS(pci); + gHeight = GLYPHHEIGHTPIXELS(pci); + if (gWidth && gHeight) { + gx = x + pci->metrics.leftSideBearing; + gy = y - pci->metrics.ascent; + if (glyph && gWidth <= sizeof(FbStip) * 8 && + fbGlyphIn(fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, + dstYoff); + (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, + (FbStip *) pglyph, pPriv->fg, gx + dstXoff, gHeight); + fbFinishAccess(pDrawable); + } + else { + gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof(FbStip); + fbPutXYImage(pDrawable, + fbGetCompositeClip(pGC), + pPriv->fg, + pPriv->bg, + pPriv->pm, + GXcopy, + opaque, + gx, + gy, + gWidth, gHeight, (FbStip *) pglyph, gStride, 0); + } + } + x += pci->metrics.characterWidth; + } +} diff --git a/fb/fbimage.c b/fb/fbimage.c new file mode 100644 index 0000000..59daa21 --- /dev/null +++ b/fb/fbimage.c @@ -0,0 +1,278 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +void +fbPutImage(DrawablePtr pDrawable, + GCPtr pGC, + int depth, + int x, int y, int w, int h, int leftPad, int format, char *pImage) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + unsigned long i; + FbStride srcStride; + FbStip *src = (FbStip *) pImage; + + x += pDrawable->x; + y += pDrawable->y; + + switch (format) { + case XYBitmap: + srcStride = BitmapBytePad(w + leftPad) / sizeof(FbStip); + fbPutXYImage(pDrawable, + fbGetCompositeClip(pGC), + pPriv->fg, + pPriv->bg, + pPriv->pm, + pGC->alu, TRUE, x, y, w, h, src, srcStride, leftPad); + break; + case XYPixmap: + srcStride = BitmapBytePad(w + leftPad) / sizeof(FbStip); + for (i = (unsigned long) 1 << (pDrawable->depth - 1); i; i >>= 1) { + if (i & pGC->planemask) { + fbPutXYImage(pDrawable, + fbGetCompositeClip(pGC), + FB_ALLONES, + 0, + fbReplicatePixel(i, pDrawable->bitsPerPixel), + pGC->alu, + TRUE, x, y, w, h, src, srcStride, leftPad); + src += srcStride * h; + } + } + break; + case ZPixmap: + if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) { + srcStride = PixmapBytePad(w, pDrawable->depth); + fb24_32PutZImage(pDrawable, + fbGetCompositeClip(pGC), + pGC->alu, + (FbBits) pGC->planemask, + x, y, w, h, (CARD8 *) pImage, srcStride); + } + else { + srcStride = PixmapBytePad(w, pDrawable->depth) / sizeof(FbStip); + fbPutZImage(pDrawable, + fbGetCompositeClip(pGC), + pGC->alu, pPriv->pm, x, y, w, h, src, srcStride); + } + } +} + +void +fbPutZImage(DrawablePtr pDrawable, + RegionPtr pClip, + int alu, + FbBits pm, + int x, + int y, int width, int height, FbStip * src, FbStride srcStride) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + + fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + for (nbox = RegionNumRects(pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + fbBltStip(src + (y1 - y) * srcStride, + srcStride, + (x1 - x) * dstBpp, + dst + (y1 + dstYoff) * dstStride, + dstStride, + (x1 + dstXoff) * dstBpp, + (x2 - x1) * dstBpp, (y2 - y1), alu, pm, dstBpp); + } + + fbFinishAccess(pDrawable); +} + +void +fbPutXYImage(DrawablePtr pDrawable, + RegionPtr pClip, + FbBits fg, + FbBits bg, + FbBits pm, + int alu, + Bool opaque, + int x, + int y, + int width, int height, FbStip * src, FbStride srcStride, int srcX) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + FbBits fgand = 0, fgxor = 0, bgand = 0, bgxor = 0; + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + if (dstBpp == 1) { + if (opaque) + alu = FbOpaqueStipple1Rop(alu, fg, bg); + else + alu = FbStipple1Rop(alu, fg); + } + else { + fgand = fbAnd(alu, fg, pm); + fgxor = fbXor(alu, fg, pm); + if (opaque) { + bgand = fbAnd(alu, bg, pm); + bgxor = fbXor(alu, bg, pm); + } + else { + bgand = fbAnd(GXnoop, (FbBits) 0, FB_ALLONES); + bgxor = fbXor(GXnoop, (FbBits) 0, FB_ALLONES); + } + } + + for (nbox = RegionNumRects(pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + if (dstBpp == 1) { + fbBltStip(src + (y1 - y) * srcStride, + srcStride, + (x1 - x) + srcX, + (FbStip *) (dst + (y1 + dstYoff) * dstStride), + FbBitsStrideToStipStride(dstStride), + (x1 + dstXoff) * dstBpp, + (x2 - x1) * dstBpp, (y2 - y1), alu, pm, dstBpp); + } + else { + fbBltOne(src + (y1 - y) * srcStride, + srcStride, + (x1 - x) + srcX, + dst + (y1 + dstYoff) * dstStride, + dstStride, + (x1 + dstXoff) * dstBpp, + dstBpp, + (x2 - x1) * dstBpp, (y2 - y1), fgand, fgxor, bgand, bgxor); + } + } + + fbFinishAccess(pDrawable); +} + +void +fbGetImage(DrawablePtr pDrawable, + int x, + int y, + int w, int h, unsigned int format, unsigned long planeMask, char *d) +{ + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbStip *dst; + FbStride dstStride; + + /* + * XFree86 DDX empties the root borderClip when the VT is + * switched away; this checks for that case + */ + if (!fbDrawableEnabled(pDrawable)) + return; + + if (format == ZPixmap && + pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) { + fb24_32GetImage(pDrawable, x, y, w, h, format, planeMask, d); + return; + } + + fbGetDrawable(pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + + x += pDrawable->x; + y += pDrawable->y; + + dst = (FbStip *) d; + if (format == ZPixmap || srcBpp == 1) { + FbBits pm; + + pm = fbReplicatePixel(planeMask, srcBpp); + dstStride = PixmapBytePad(w, pDrawable->depth); + if (pm != FB_ALLONES) + memset(d, 0, dstStride * h); + dstStride /= sizeof(FbStip); + fbBltStip((FbStip *) (src + (y + srcYoff) * srcStride), + FbBitsStrideToStipStride(srcStride), + (x + srcXoff) * srcBpp, + dst, dstStride, 0, w * srcBpp, h, GXcopy, pm, srcBpp); + } + else { + dstStride = BitmapBytePad(w) / sizeof(FbStip); + fbBltPlane(src + (y + srcYoff) * srcStride, + srcStride, + (x + srcXoff) * srcBpp, + srcBpp, + dst, + dstStride, + 0, + w * srcBpp, h, + fbAndStip(GXcopy, FB_STIP_ALLONES, FB_STIP_ALLONES), + fbXorStip(GXcopy, FB_STIP_ALLONES, FB_STIP_ALLONES), + fbAndStip(GXcopy, 0, FB_STIP_ALLONES), + fbXorStip(GXcopy, 0, FB_STIP_ALLONES), planeMask); + } + + fbFinishAccess(pDrawable); +} diff --git a/fb/fbline.c b/fb/fbline.c new file mode 100644 index 0000000..80dc89d --- /dev/null +++ b/fb/fbline.c @@ -0,0 +1,155 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbZeroLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) +{ + int x1, y1, x2, y2; + int x, y; + int dashOffset; + + x = pDrawable->x; + y = pDrawable->y; + x1 = ppt->x; + y1 = ppt->y; + dashOffset = pGC->dashOffset; + while (--npt) { + ++ppt; + x2 = ppt->x; + y2 = ppt->y; + if (mode == CoordModePrevious) { + x2 += x1; + y2 += y1; + } + fbSegment(pDrawable, pGC, x1 + x, y1 + y, + x2 + x, y2 + y, + npt == 1 && pGC->capStyle != CapNotLast, &dashOffset); + x1 = x2; + y1 = y2; + } +} + +void +fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs) +{ + int dashOffset; + int x, y; + Bool drawLast = pGC->capStyle != CapNotLast; + + x = pDrawable->x; + y = pDrawable->y; + while (nseg--) { + dashOffset = pGC->dashOffset; + fbSegment(pDrawable, pGC, + pSegs->x1 + x, pSegs->y1 + y, + pSegs->x2 + x, pSegs->y2 + y, drawLast, &dashOffset); + pSegs++; + } +} + +void +fbFixCoordModePrevious(int npt, DDXPointPtr ppt) +{ + int x, y; + + x = ppt->x; + y = ppt->y; + npt--; + while (npt--) { + ppt++; + x = (ppt->x += x); + y = (ppt->y += y); + } +} + +void +fbPolyLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) +{ + void (*line) (DrawablePtr, GCPtr, int mode, int npt, DDXPointPtr ppt); + + if (pGC->lineWidth == 0) { + line = fbZeroLine; + if (pGC->fillStyle == FillSolid && + pGC->lineStyle == LineSolid && + RegionNumRects(fbGetCompositeClip(pGC)) == 1) { + switch (pDrawable->bitsPerPixel) { + case 8: + line = fbPolyline8; + break; + case 16: + line = fbPolyline16; + break; + case 24: + line = fbPolyline24; + break; + case 32: + line = fbPolyline32; + break; + } + } + } + else { + if (pGC->lineStyle != LineSolid) + line = miWideDash; + else + line = miWideLine; + } + (*line) (pDrawable, pGC, mode, npt, ppt); +} + +void +fbPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg) +{ + void (*seg) (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); + + if (pGC->lineWidth == 0) { + seg = fbZeroSegment; + if (pGC->fillStyle == FillSolid && + pGC->lineStyle == LineSolid && + RegionNumRects(fbGetCompositeClip(pGC)) == 1) { + switch (pDrawable->bitsPerPixel) { + case 8: + seg = fbPolySegment8; + break; + case 16: + seg = fbPolySegment16; + break; + case 24: + seg = fbPolySegment24; + break; + case 32: + seg = fbPolySegment32; + break; + } + } + } + else { + seg = miPolySegment; + } + (*seg) (pDrawable, pGC, nseg, pseg); +} diff --git a/fb/fboverlay.c b/fb/fboverlay.c new file mode 100644 index 0000000..c6802e4 --- /dev/null +++ b/fb/fboverlay.c @@ -0,0 +1,389 @@ +/* + * + * Copyright © 2000 SuSE, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" +#include "fboverlay.h" +#include "shmint.h" + +static DevPrivateKeyRec fbOverlayScreenPrivateKeyRec; + +#define fbOverlayScreenPrivateKey (&fbOverlayScreenPrivateKeyRec) + +DevPrivateKey +fbOverlayGetScreenPrivateKey(void) +{ + return fbOverlayScreenPrivateKey; +} + +/* + * Replace this if you want something supporting + * multiple overlays with the same depth + */ +Bool +fbOverlayCreateWindow(WindowPtr pWin) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); + int i; + PixmapPtr pPixmap; + + if (pWin->drawable.class != InputOutput) + return TRUE; + + if (pWin->drawable.bitsPerPixel == 32) + pWin->drawable.bitsPerPixel = + fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; + + for (i = 0; i < pScrPriv->nlayers; i++) { + pPixmap = pScrPriv->layer[i].u.run.pixmap; + if (pWin->drawable.depth == pPixmap->drawable.depth) { + dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin), pPixmap); + /* + * Make sure layer keys are written correctly by + * having non-root layers set to full while the + * root layer is set to empty. This will cause + * all of the layers to get painted when the root + * is mapped + */ + if (!pWin->parent) { + RegionEmpty(&pScrPriv->layer[i].u.run.region); + } + return TRUE; + } + } + return FALSE; +} + +Bool +fbOverlayCloseScreen(ScreenPtr pScreen) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + int i; + + for (i = 0; i < pScrPriv->nlayers; i++) { + (*pScreen->DestroyPixmap) (pScrPriv->layer[i].u.run.pixmap); + RegionUninit(&pScrPriv->layer[i].u.run.region); + } + return TRUE; +} + +/* + * Return layer containing this window + */ +int +fbOverlayWindowLayer(WindowPtr pWin) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); + int i; + + for (i = 0; i < pScrPriv->nlayers; i++) + if (dixLookupPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin)) == + (pointer) pScrPriv->layer[i].u.run.pixmap) + return i; + return 0; +} + +Bool +fbOverlayCreateScreenResources(ScreenPtr pScreen) +{ + int i; + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + PixmapPtr pPixmap; + pointer pbits; + int width; + int depth; + BoxRec box; + + if (!miCreateScreenResources(pScreen)) + return FALSE; + + box.x1 = 0; + box.y1 = 0; + box.x2 = pScreen->width; + box.y2 = pScreen->height; + for (i = 0; i < pScrPriv->nlayers; i++) { + pbits = pScrPriv->layer[i].u.init.pbits; + width = pScrPriv->layer[i].u.init.width; + depth = pScrPriv->layer[i].u.init.depth; + pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0); + if (!pPixmap) + return FALSE; + if (!(*pScreen->ModifyPixmapHeader) (pPixmap, pScreen->width, + pScreen->height, depth, + BitsPerPixel(depth), + PixmapBytePad(width, depth), + pbits)) + return FALSE; + pScrPriv->layer[i].u.run.pixmap = pPixmap; + RegionInit(&pScrPriv->layer[i].u.run.region, &box, 0); + } + pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap; + return TRUE; +} + +void +fbOverlayPaintKey(DrawablePtr pDrawable, + RegionPtr pRegion, CARD32 pixel, int layer) +{ + fbFillRegionSolid(pDrawable, pRegion, 0, + fbReplicatePixel(pixel, pDrawable->bitsPerPixel)); +} + +/* + * Track visible region for each layer + */ +void +fbOverlayUpdateLayerRegion(ScreenPtr pScreen, int layer, RegionPtr prgn) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + int i; + RegionRec rgnNew; + + if (!prgn || !RegionNotEmpty(prgn)) + return; + for (i = 0; i < pScrPriv->nlayers; i++) { + if (i == layer) { + /* add new piece to this fb */ + RegionUnion(&pScrPriv->layer[i].u.run.region, + &pScrPriv->layer[i].u.run.region, prgn); + } + else if (RegionNotEmpty(&pScrPriv->layer[i].u.run.region)) { + /* paint new piece with chroma key */ + RegionNull(&rgnNew); + RegionIntersect(&rgnNew, prgn, &pScrPriv->layer[i].u.run.region); + (*pScrPriv->PaintKey) (&pScrPriv->layer[i].u.run.pixmap->drawable, + &rgnNew, pScrPriv->layer[i].key, i); + RegionUninit(&rgnNew); + /* remove piece from other fbs */ + RegionSubtract(&pScrPriv->layer[i].u.run.region, + &pScrPriv->layer[i].u.run.region, prgn); + } + } +} + +/* + * Copy only areas in each layer containing real bits + */ +void +fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + RegionRec rgnDst; + int dx, dy; + int i; + RegionRec layerRgn[FB_OVERLAY_MAX]; + PixmapPtr pPixmap; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + + /* + * Clip to existing bits + */ + RegionTranslate(prgnSrc, -dx, -dy); + RegionNull(&rgnDst); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(&rgnDst, dx, dy); + /* + * Compute the portion of each fb affected by this copy + */ + for (i = 0; i < pScrPriv->nlayers; i++) { + RegionNull(&layerRgn[i]); + RegionIntersect(&layerRgn[i], &rgnDst, + &pScrPriv->layer[i].u.run.region); + if (RegionNotEmpty(&layerRgn[i])) { + RegionTranslate(&layerRgn[i], -dx, -dy); + pPixmap = pScrPriv->layer[i].u.run.pixmap; + miCopyRegion(&pPixmap->drawable, &pPixmap->drawable, + 0, + &layerRgn[i], dx, dy, pScrPriv->CopyWindow, 0, + (void *) (long) i); + } + } + /* + * Update regions + */ + for (i = 0; i < pScrPriv->nlayers; i++) { + if (RegionNotEmpty(&layerRgn[i])) + fbOverlayUpdateLayerRegion(pScreen, i, &layerRgn[i]); + + RegionUninit(&layerRgn[i]); + } + RegionUninit(&rgnDst); +} + +void +fbOverlayWindowExposures(WindowPtr pWin, + RegionPtr prgn, RegionPtr other_exposed) +{ + fbOverlayUpdateLayerRegion(pWin->drawable.pScreen, + fbOverlayWindowLayer(pWin), prgn); + miWindowExposures(pWin, prgn, other_exposed); +} + +Bool +fbOverlaySetupScreen(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, int width1, int width2, int bpp1, int bpp2) +{ + return fbSetupScreen(pScreen, + pbits1, xsize, ysize, dpix, dpiy, width1, bpp1); +} + +static Bool +fb24_32OverlayCreateScreenResources(ScreenPtr pScreen) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + int pitch; + Bool retval; + int i; + + if ((retval = fbOverlayCreateScreenResources(pScreen))) { + for (i = 0; i < pScrPriv->nlayers; i++) { + /* fix the screen pixmap */ + PixmapPtr pPix = (PixmapPtr) pScrPriv->layer[i].u.run.pixmap; + + if (pPix->drawable.bitsPerPixel == 32) { + pPix->drawable.bitsPerPixel = 24; + pitch = BitmapBytePad(pPix->drawable.width * 24); + pPix->devKind = pitch; + } + } + } + + return retval; +} + +Bool +fbOverlayFinishScreenInit(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, + int width1, + int width2, + int bpp1, int bpp2, int depth1, int depth2) +{ + VisualPtr visuals; + DepthPtr depths; + int nvisuals; + int ndepths; + int bpp = 0, imagebpp = 32; + VisualID defaultVisual; + FbOverlayScrPrivPtr pScrPriv; + + if (!dixRegisterPrivateKey + (&fbOverlayScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + pScrPriv = malloc(sizeof(FbOverlayScrPrivRec)); + if (!pScrPriv) + return FALSE; + + if (bpp1 == 32 || bpp2 == 32) + bpp = 32; + else if (bpp1 == 24 || bpp2 == 24) + bpp = 24; + + if (bpp == 24) { + int f; + + imagebpp = 32; + /* + * Check to see if we're advertising a 24bpp image format, + * in which case windows will use it in preference to a 32 bit + * format. + */ + for (f = 0; f < screenInfo.numPixmapFormats; f++) { + if (screenInfo.formats[f].bitsPerPixel == 24) { + imagebpp = 24; + break; + } + } + } + if (imagebpp == 32) { + fbGetScreenPrivate(pScreen)->win32bpp = bpp; + fbGetScreenPrivate(pScreen)->pix32bpp = bpp; + } + else { + fbGetScreenPrivate(pScreen)->win32bpp = 32; + fbGetScreenPrivate(pScreen)->pix32bpp = 32; + } + + if (!fbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &depth1, + &defaultVisual, ((unsigned long) 1 << (bpp1 - 1)) | + ((unsigned long) 1 << (bpp2 - 1)), 8)) { + free(pScrPriv); + return FALSE; + } + if (!miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0, + depth1, ndepths, depths, + defaultVisual, nvisuals, visuals)) { + free(pScrPriv); + return FALSE; + } + /* MI thinks there's no frame buffer */ +#ifdef MITSHM + ShmRegisterFbFuncs(pScreen); +#endif + pScreen->minInstalledCmaps = 1; + pScreen->maxInstalledCmaps = 2; + + pScrPriv->nlayers = 2; + pScrPriv->PaintKey = fbOverlayPaintKey; + pScrPriv->CopyWindow = fbCopyWindowProc; + pScrPriv->layer[0].u.init.pbits = pbits1; + pScrPriv->layer[0].u.init.width = width1; + pScrPriv->layer[0].u.init.depth = depth1; + + pScrPriv->layer[1].u.init.pbits = pbits2; + pScrPriv->layer[1].u.init.width = width2; + pScrPriv->layer[1].u.init.depth = depth2; + dixSetPrivate(&pScreen->devPrivates, fbOverlayScreenPrivateKey, pScrPriv); + + /* overwrite miCloseScreen with our own */ + pScreen->CloseScreen = fbOverlayCloseScreen; + pScreen->CreateScreenResources = fbOverlayCreateScreenResources; + pScreen->CreateWindow = fbOverlayCreateWindow; + pScreen->WindowExposures = fbOverlayWindowExposures; + pScreen->CopyWindow = fbOverlayCopyWindow; + if (bpp == 24 && imagebpp == 32) { + pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; + pScreen->CreateScreenResources = fb24_32OverlayCreateScreenResources; + } + + return TRUE; +} diff --git a/fb/fboverlay.h b/fb/fboverlay.h new file mode 100644 index 0000000..9a93457 --- /dev/null +++ b/fb/fboverlay.h @@ -0,0 +1,112 @@ +/* + * + * Copyright © 2000 SuSE, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifndef _FBOVERLAY_H_ +#define _FBOVERLAY_H_ + +#include "privates.h" + +extern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void); + +#ifndef FB_OVERLAY_MAX +#define FB_OVERLAY_MAX 2 +#endif + +typedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int); + +typedef struct _fbOverlayLayer { + union { + struct { + pointer pbits; + int width; + int depth; + } init; + struct { + PixmapPtr pixmap; + RegionRec region; + } run; + } u; + CARD32 key; /* special pixel value */ +} FbOverlayLayer; + +typedef struct _fbOverlayScrPriv { + int nlayers; + fbOverlayPaintKeyProc PaintKey; + miCopyProc CopyWindow; + FbOverlayLayer layer[FB_OVERLAY_MAX]; +} FbOverlayScrPrivRec, *FbOverlayScrPrivPtr; + +#define fbOverlayGetScrPriv(s) \ + dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey()) +extern _X_EXPORT Bool + fbOverlayCreateWindow(WindowPtr pWin); + +extern _X_EXPORT Bool + fbOverlayCloseScreen(ScreenPtr pScreen); + +extern _X_EXPORT int + fbOverlayWindowLayer(WindowPtr pWin); + +extern _X_EXPORT Bool + fbOverlayCreateScreenResources(ScreenPtr pScreen); + +extern _X_EXPORT void + +fbOverlayPaintKey(DrawablePtr pDrawable, + RegionPtr pRegion, CARD32 pixel, int layer); +extern _X_EXPORT void + fbOverlayUpdateLayerRegion(ScreenPtr pScreen, int layer, RegionPtr prgn); + +extern _X_EXPORT void + fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +extern _X_EXPORT void + +fbOverlayWindowExposures(WindowPtr pWin, + RegionPtr prgn, RegionPtr other_exposed); + +extern _X_EXPORT Bool + +fbOverlaySetupScreen(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, int width1, int width2, int bpp1, int bpp2); + +extern _X_EXPORT Bool + +fbOverlayFinishScreenInit(ScreenPtr pScreen, + pointer pbits1, + pointer pbits2, + int xsize, + int ysize, + int dpix, + int dpiy, + int width1, + int width2, + int bpp1, int bpp2, int depth1, int depth2); + +#endif /* _FBOVERLAY_H_ */ diff --git a/fb/fbpict.c b/fb/fbpict.c new file mode 100644 index 0000000..b503858 --- /dev/null +++ b/fb/fbpict.c @@ -0,0 +1,516 @@ +/* + * + * Copyright © 2000 SuSE, Inc. + * Copyright © 2007 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +#include "picturestr.h" +#include "mipict.h" +#include "fbpict.h" + +void +fbComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + pixman_image_t *src, *mask, *dest; + int src_xoff, src_yoff; + int msk_xoff, msk_yoff; + int dst_xoff, dst_yoff; + + miCompositeSourceValidate(pSrc); + if (pMask) + miCompositeSourceValidate(pMask); + + src = image_from_pict(pSrc, FALSE, &src_xoff, &src_yoff); + mask = image_from_pict(pMask, FALSE, &msk_xoff, &msk_yoff); + dest = image_from_pict(pDst, TRUE, &dst_xoff, &dst_yoff); + + if (src && dest && !(pMask && !mask)) { + pixman_image_composite(op, src, mask, dest, + xSrc + src_xoff, ySrc + src_yoff, + xMask + msk_xoff, yMask + msk_yoff, + xDst + dst_xoff, yDst + dst_yoff, width, height); + } + + free_pixman_pict(pSrc, src); + free_pixman_pict(pMask, mask); + free_pixman_pict(pDst, dest); +} + +static pixman_glyph_cache_t *glyphCache; + +void +fbDestroyGlyphCache(void) +{ + if (glyphCache) + { + pixman_glyph_cache_destroy (glyphCache); + glyphCache = NULL; + } +} + +static void +fbUnrealizeGlyph(ScreenPtr pScreen, + GlyphPtr pGlyph) +{ + if (glyphCache) + pixman_glyph_cache_remove (glyphCache, pGlyph, NULL); +} + +static void +fbGlyphs(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, int nlist, + GlyphListPtr list, + GlyphPtr *glyphs) +{ +#define N_STACK_GLYPHS 512 + ScreenPtr pScreen = pDst->pDrawable->pScreen; + pixman_glyph_t stack_glyphs[N_STACK_GLYPHS]; + pixman_glyph_t *pglyphs = stack_glyphs; + pixman_image_t *srcImage, *dstImage; + int srcXoff, srcYoff, dstXoff, dstYoff; + GlyphPtr glyph; + int n_glyphs; + int x, y; + int i, n; + int xDst = list->xOff, yDst = list->yOff; + + miCompositeSourceValidate(pSrc); + + n_glyphs = 0; + for (i = 0; i < nlist; ++i) + n_glyphs += list[i].len; + + if (!glyphCache) + glyphCache = pixman_glyph_cache_create(); + + pixman_glyph_cache_freeze (glyphCache); + + if (n_glyphs > N_STACK_GLYPHS) { + if (!(pglyphs = malloc (n_glyphs * sizeof (pixman_glyph_t)))) + goto out; + } + + i = 0; + x = y = 0; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + while (n--) { + const void *g; + + glyph = *glyphs++; + + if (!(g = pixman_glyph_cache_lookup (glyphCache, glyph, NULL))) { + pixman_image_t *glyphImage; + PicturePtr pPicture; + int xoff, yoff; + + pPicture = GetGlyphPicture(glyph, pScreen); + if (!pPicture) { + n_glyphs--; + goto next; + } + + if (!(glyphImage = image_from_pict(pPicture, FALSE, &xoff, &yoff))) + goto out; + + g = pixman_glyph_cache_insert(glyphCache, glyph, NULL, + glyph->info.x, + glyph->info.y, + glyphImage); + + free_pixman_pict(pPicture, glyphImage); + + if (!g) + goto out; + } + + pglyphs[i].x = x; + pglyphs[i].y = y; + pglyphs[i].glyph = g; + i++; + + next: + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + } + + if (!(srcImage = image_from_pict(pSrc, FALSE, &srcXoff, &srcYoff))) + goto out; + + if (!(dstImage = image_from_pict(pDst, TRUE, &dstXoff, &dstYoff))) + goto out_free_src; + + if (maskFormat) { + pixman_format_code_t format; + pixman_box32_t extents; + + format = maskFormat->format | (maskFormat->depth << 24); + + pixman_glyph_get_extents(glyphCache, n_glyphs, pglyphs, &extents); + + pixman_composite_glyphs(op, srcImage, dstImage, format, + xSrc + srcXoff + xDst, ySrc + srcYoff + yDst, + extents.x1, extents.y1, + extents.x1 + dstXoff, extents.y1 + dstYoff, + extents.x2 - extents.x1, + extents.y2 - extents.y1, + glyphCache, n_glyphs, pglyphs); + } + else { + pixman_composite_glyphs_no_mask(op, srcImage, dstImage, + xSrc + srcXoff - xDst, ySrc + srcYoff - yDst, + dstXoff, dstYoff, + glyphCache, n_glyphs, pglyphs); + } + + free_pixman_pict(pDst, dstImage); + +out_free_src: + free_pixman_pict(pSrc, srcImage); + +out: + pixman_glyph_cache_thaw(glyphCache); + if (pglyphs != stack_glyphs) + free(pglyphs); +} + +static pixman_image_t * +create_solid_fill_image(PicturePtr pict) +{ + PictSolidFill *solid = &pict->pSourcePict->solidFill; + pixman_color_t color; + CARD32 a, r, g, b; + + a = (solid->color & 0xff000000) >> 24; + r = (solid->color & 0x00ff0000) >> 16; + g = (solid->color & 0x0000ff00) >> 8; + b = (solid->color & 0x000000ff) >> 0; + + color.alpha = (a << 8) | a; + color.red = (r << 8) | r; + color.green = (g << 8) | g; + color.blue = (b << 8) | b; + + return pixman_image_create_solid_fill(&color); +} + +static pixman_image_t * +create_linear_gradient_image(PictGradient * gradient) +{ + PictLinearGradient *linear = (PictLinearGradient *) gradient; + pixman_point_fixed_t p1; + pixman_point_fixed_t p2; + + p1.x = linear->p1.x; + p1.y = linear->p1.y; + p2.x = linear->p2.x; + p2.y = linear->p2.y; + + return pixman_image_create_linear_gradient(&p1, &p2, + (pixman_gradient_stop_t *) + gradient->stops, + gradient->nstops); +} + +static pixman_image_t * +create_radial_gradient_image(PictGradient * gradient) +{ + PictRadialGradient *radial = (PictRadialGradient *) gradient; + pixman_point_fixed_t c1; + pixman_point_fixed_t c2; + + c1.x = radial->c1.x; + c1.y = radial->c1.y; + c2.x = radial->c2.x; + c2.y = radial->c2.y; + + return pixman_image_create_radial_gradient(&c1, &c2, radial->c1.radius, + radial->c2.radius, + (pixman_gradient_stop_t *) + gradient->stops, + gradient->nstops); +} + +static pixman_image_t * +create_conical_gradient_image(PictGradient * gradient) +{ + PictConicalGradient *conical = (PictConicalGradient *) gradient; + pixman_point_fixed_t center; + + center.x = conical->center.x; + center.y = conical->center.y; + + return pixman_image_create_conical_gradient(¢er, conical->angle, + (pixman_gradient_stop_t *) + gradient->stops, + gradient->nstops); +} + +static pixman_image_t * +create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff) +{ + PixmapPtr pixmap; + FbBits *bits; + FbStride stride; + int bpp; + pixman_image_t *image; + + fbGetDrawablePixmap(pict->pDrawable, pixmap, *xoff, *yoff); + fbGetPixmapBitsData(pixmap, bits, stride, bpp); + + image = pixman_image_create_bits((pixman_format_code_t) pict->format, + pixmap->drawable.width, + pixmap->drawable.height, (uint32_t *) bits, + stride * sizeof(FbStride)); + + if (!image) + return NULL; + +#ifdef FB_ACCESS_WRAPPER +#if FB_SHIFT==5 + + pixman_image_set_accessors(image, + (pixman_read_memory_func_t) wfbReadMemory, + (pixman_write_memory_func_t) wfbWriteMemory); + +#else + +#error The pixman library only works when FbBits is 32 bits wide + +#endif +#endif + + /* pCompositeClip is undefined for source pictures, so + * only set the clip region for pictures with drawables + */ + if (has_clip) { + if (pict->clientClipType != CT_NONE) + pixman_image_set_has_client_clip(image, TRUE); + + if (*xoff || *yoff) + pixman_region_translate(pict->pCompositeClip, *xoff, *yoff); + + pixman_image_set_clip_region(image, pict->pCompositeClip); + + if (*xoff || *yoff) + pixman_region_translate(pict->pCompositeClip, -*xoff, -*yoff); + } + + /* Indexed table */ + if (pict->pFormat->index.devPrivate) + pixman_image_set_indexed(image, pict->pFormat->index.devPrivate); + + /* Add in drawable origin to position within the image */ + *xoff += pict->pDrawable->x; + *yoff += pict->pDrawable->y; + + return image; +} + +static pixman_image_t *image_from_pict_internal(PicturePtr pict, Bool has_clip, + int *xoff, int *yoff, + Bool is_alpha_map); + +static void +set_image_properties(pixman_image_t * image, PicturePtr pict, Bool has_clip, + int *xoff, int *yoff, Bool is_alpha_map) +{ + pixman_repeat_t repeat; + pixman_filter_t filter; + + if (pict->transform) { + /* For source images, adjust the transform to account + * for the drawable offset within the pixman image, + * then set the offset to 0 as it will be used + * to compute positions within the transformed image. + */ + if (!has_clip) { + struct pixman_transform adjusted; + + adjusted = *pict->transform; + pixman_transform_translate(&adjusted, + NULL, + pixman_int_to_fixed(*xoff), + pixman_int_to_fixed(*yoff)); + pixman_image_set_transform(image, &adjusted); + *xoff = 0; + *yoff = 0; + } + else + pixman_image_set_transform(image, pict->transform); + } + + switch (pict->repeatType) { + default: + case RepeatNone: + repeat = PIXMAN_REPEAT_NONE; + break; + + case RepeatPad: + repeat = PIXMAN_REPEAT_PAD; + break; + + case RepeatNormal: + repeat = PIXMAN_REPEAT_NORMAL; + break; + + case RepeatReflect: + repeat = PIXMAN_REPEAT_REFLECT; + break; + } + + pixman_image_set_repeat(image, repeat); + + /* Fetch alpha map unless 'pict' is being used + * as the alpha map for this operation + */ + if (pict->alphaMap && !is_alpha_map) { + int alpha_xoff, alpha_yoff; + pixman_image_t *alpha_map = + image_from_pict_internal(pict->alphaMap, FALSE, &alpha_xoff, + &alpha_yoff, TRUE); + + pixman_image_set_alpha_map(image, alpha_map, pict->alphaOrigin.x, + pict->alphaOrigin.y); + + free_pixman_pict(pict->alphaMap, alpha_map); + } + + pixman_image_set_component_alpha(image, pict->componentAlpha); + + switch (pict->filter) { + default: + case PictFilterNearest: + case PictFilterFast: + filter = PIXMAN_FILTER_NEAREST; + break; + + case PictFilterBilinear: + case PictFilterGood: + filter = PIXMAN_FILTER_BILINEAR; + break; + + case PictFilterConvolution: + filter = PIXMAN_FILTER_CONVOLUTION; + break; + } + + pixman_image_set_filter(image, filter, + (pixman_fixed_t *) pict->filter_params, + pict->filter_nparams); + pixman_image_set_source_clipping(image, TRUE); +} + +static pixman_image_t * +image_from_pict_internal(PicturePtr pict, Bool has_clip, int *xoff, int *yoff, + Bool is_alpha_map) +{ + pixman_image_t *image = NULL; + + if (!pict) + return NULL; + + if (pict->pDrawable) { + image = create_bits_picture(pict, has_clip, xoff, yoff); + } + else if (pict->pSourcePict) { + SourcePict *sp = pict->pSourcePict; + + if (sp->type == SourcePictTypeSolidFill) { + image = create_solid_fill_image(pict); + } + else { + PictGradient *gradient = &pict->pSourcePict->gradient; + + if (sp->type == SourcePictTypeLinear) + image = create_linear_gradient_image(gradient); + else if (sp->type == SourcePictTypeRadial) + image = create_radial_gradient_image(gradient); + else if (sp->type == SourcePictTypeConical) + image = create_conical_gradient_image(gradient); + } + *xoff = *yoff = 0; + } + + if (image) + set_image_properties(image, pict, has_clip, xoff, yoff, is_alpha_map); + + return image; +} + +pixman_image_t * +image_from_pict(PicturePtr pict, Bool has_clip, int *xoff, int *yoff) +{ + return image_from_pict_internal(pict, has_clip, xoff, yoff, FALSE); +} + +void +free_pixman_pict(PicturePtr pict, pixman_image_t * image) +{ + if (image && pixman_image_unref(image) && pict->pDrawable) + fbFinishAccess(pict->pDrawable); +} + +Bool +fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) +{ + + PictureScreenPtr ps; + + if (!miPictureInit(pScreen, formats, nformats)) + return FALSE; + ps = GetPictureScreen(pScreen); + ps->Composite = fbComposite; + ps->Glyphs = fbGlyphs; + ps->UnrealizeGlyph = fbUnrealizeGlyph; + ps->CompositeRects = miCompositeRects; + ps->RasterizeTrapezoid = fbRasterizeTrapezoid; + ps->Trapezoids = fbTrapezoids; + ps->AddTraps = fbAddTraps; + ps->AddTriangles = fbAddTriangles; + ps->Triangles = fbTriangles; + + return TRUE; +} diff --git a/fb/fbpict.h b/fb/fbpict.h new file mode 100644 index 0000000..110f32d --- /dev/null +++ b/fb/fbpict.h @@ -0,0 +1,75 @@ +/* + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _FBPICT_H_ +#define _FBPICT_H_ + +/* fbpict.c */ +extern _X_EXPORT void + +fbComposite(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); + +/* fbtrap.c */ + +extern _X_EXPORT void + +fbAddTraps(PicturePtr pPicture, + INT16 xOff, INT16 yOff, int ntrap, xTrap * traps); + +extern _X_EXPORT void + +fbRasterizeTrapezoid(PicturePtr alpha, xTrapezoid * trap, int x_off, int y_off); + +extern _X_EXPORT void + +fbAddTriangles(PicturePtr pPicture, + INT16 xOff, INT16 yOff, int ntri, xTriangle * tris); + +extern _X_EXPORT void + +fbTrapezoids(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps); + +extern _X_EXPORT void + +fbTriangles(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris); + +#endif /* _FBPICT_H_ */ diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c new file mode 100644 index 0000000..0824b64 --- /dev/null +++ b/fb/fbpixmap.c @@ -0,0 +1,369 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +PixmapPtr +fbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp, + unsigned usage_hint) +{ + PixmapPtr pPixmap; + size_t datasize; + size_t paddedWidth; + int adjust; + int base; + + paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; + datasize = height * paddedWidth; + base = pScreen->totalPixmapSize; + adjust = 0; + if (base & 7) + adjust = 8 - (base & 7); + datasize += adjust; +#ifdef FB_DEBUG + datasize += 2 * paddedWidth; +#endif + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) + return NullPixmap; + pPixmap->drawable.type = DRAWABLE_PIXMAP; + pPixmap->drawable.class = 0; + pPixmap->drawable.pScreen = pScreen; + pPixmap->drawable.depth = depth; + pPixmap->drawable.bitsPerPixel = bpp; + pPixmap->drawable.id = 0; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pPixmap->drawable.x = 0; + pPixmap->drawable.y = 0; + pPixmap->drawable.width = width; + pPixmap->drawable.height = height; + pPixmap->devKind = paddedWidth; + pPixmap->refcnt = 1; + pPixmap->devPrivate.ptr = (pointer) ((char *) pPixmap + base + adjust); + pPixmap->master_pixmap = NULL; + +#ifdef FB_DEBUG + pPixmap->devPrivate.ptr = + (void *) ((char *) pPixmap->devPrivate.ptr + paddedWidth); + fbInitializeDrawable(&pPixmap->drawable); +#endif + +#ifdef COMPOSITE + pPixmap->screen_x = 0; + pPixmap->screen_y = 0; +#endif + + pPixmap->usage_hint = usage_hint; + + return pPixmap; +} + +PixmapPtr +fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, + unsigned usage_hint) +{ + int bpp; + + bpp = BitsPerPixel(depth); + if (bpp == 32 && depth <= 24) + bpp = fbGetScreenPrivate(pScreen)->pix32bpp; + return fbCreatePixmapBpp(pScreen, width, height, depth, bpp, usage_hint); +} + +Bool +fbDestroyPixmap(PixmapPtr pPixmap) +{ + if (--pPixmap->refcnt) + return TRUE; + FreePixmap(pPixmap); + return TRUE; +} + +#define ADDRECT(reg,r,fr,rx1,ry1,rx2,ry2) \ +if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \ + (!((reg)->data->numRects && \ + ((r-1)->y1 == (ry1)) && \ + ((r-1)->y2 == (ry2)) && \ + ((r-1)->x1 <= (rx1)) && \ + ((r-1)->x2 >= (rx2))))) \ +{ \ + if ((reg)->data->numRects == (reg)->data->size) \ + { \ + RegionRectAlloc(reg, 1); \ + fr = RegionBoxptr(reg); \ + r = fr + (reg)->data->numRects; \ + } \ + r->x1 = (rx1); \ + r->y1 = (ry1); \ + r->x2 = (rx2); \ + r->y2 = (ry2); \ + (reg)->data->numRects++; \ + if(r->x1 < (reg)->extents.x1) \ + (reg)->extents.x1 = r->x1; \ + if(r->x2 > (reg)->extents.x2) \ + (reg)->extents.x2 = r->x2; \ + r++; \ +} + +/* Convert bitmap clip mask into clipping region. + * First, goes through each line and makes boxes by noting the transitions + * from 0 to 1 and 1 to 0. + * Then it coalesces the current line with the previous if they have boxes + * at the same X coordinates. + */ +RegionPtr +fbPixmapToRegion(PixmapPtr pPix) +{ + register RegionPtr pReg; + FbBits *pw, w; + register int ib; + int width, h, base, rx1 = 0, crects; + FbBits *pwLineEnd; + int irectPrevStart, irectLineStart; + register BoxPtr prectO, prectN; + BoxPtr FirstRect, rects, prectLineStart; + Bool fInBox, fSame; + register FbBits mask0 = FB_ALLONES & ~FbScrRight(FB_ALLONES, 1); + FbBits *pwLine; + int nWidth; + + pReg = RegionCreate(NULL, 1); + if (!pReg) + return NullRegion; + FirstRect = RegionBoxptr(pReg); + rects = FirstRect; + + fbPrepareAccess(&pPix->drawable); + + pwLine = (FbBits *) pPix->devPrivate.ptr; + nWidth = pPix->devKind >> (FB_SHIFT - 3); + + width = pPix->drawable.width; + pReg->extents.x1 = width - 1; + pReg->extents.x2 = 0; + irectPrevStart = -1; + for (h = 0; h < pPix->drawable.height; h++) { + pw = pwLine; + pwLine += nWidth; + irectLineStart = rects - FirstRect; + /* If the Screen left most bit of the word is set, we're starting in + * a box */ + if (READ(pw) & mask0) { + fInBox = TRUE; + rx1 = 0; + } + else + fInBox = FALSE; + /* Process all words which are fully in the pixmap */ + pwLineEnd = pw + (width >> FB_SHIFT); + for (base = 0; pw < pwLineEnd; base += FB_UNIT) { + w = READ(pw++); + if (fInBox) { + if (!~w) + continue; + } + else { + if (!w) + continue; + } + for (ib = 0; ib < FB_UNIT; ib++) { + /* If the Screen left most bit of the word is set, we're + * starting a box */ + if (w & mask0) { + if (!fInBox) { + rx1 = base + ib; + /* start new box */ + fInBox = TRUE; + } + } + else { + if (fInBox) { + /* end box */ + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + ib, h + 1); + fInBox = FALSE; + } + } + /* Shift the word VISUALLY left one. */ + w = FbScrLeft(w, 1); + } + } + if (width & FB_MASK) { + /* Process final partial word on line */ + w = READ(pw++); + for (ib = 0; ib < (width & FB_MASK); ib++) { + /* If the Screen left most bit of the word is set, we're + * starting a box */ + if (w & mask0) { + if (!fInBox) { + rx1 = base + ib; + /* start new box */ + fInBox = TRUE; + } + } + else { + if (fInBox) { + /* end box */ + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + ib, h + 1); + fInBox = FALSE; + } + } + /* Shift the word VISUALLY left one. */ + w = FbScrLeft(w, 1); + } + } + /* If scanline ended with last bit set, end the box */ + if (fInBox) { + ADDRECT(pReg, rects, FirstRect, + rx1, h, base + (width & FB_MASK), h + 1); + } + /* if all rectangles on this line have the same x-coords as + * those on the previous line, then add 1 to all the previous y2s and + * throw away all the rectangles from this line + */ + fSame = FALSE; + if (irectPrevStart != -1) { + crects = irectLineStart - irectPrevStart; + if (crects == ((rects - FirstRect) - irectLineStart)) { + prectO = FirstRect + irectPrevStart; + prectN = prectLineStart = FirstRect + irectLineStart; + fSame = TRUE; + while (prectO < prectLineStart) { + if ((prectO->x1 != prectN->x1) || + (prectO->x2 != prectN->x2)) { + fSame = FALSE; + break; + } + prectO++; + prectN++; + } + if (fSame) { + prectO = FirstRect + irectPrevStart; + while (prectO < prectLineStart) { + prectO->y2 += 1; + prectO++; + } + rects -= crects; + pReg->data->numRects -= crects; + } + } + } + if (!fSame) + irectPrevStart = irectLineStart; + } + if (!pReg->data->numRects) + pReg->extents.x1 = pReg->extents.x2 = 0; + else { + pReg->extents.y1 = RegionBoxptr(pReg)->y1; + pReg->extents.y2 = RegionEnd(pReg)->y2; + if (pReg->data->numRects == 1) { + free(pReg->data); + pReg->data = (RegDataPtr) NULL; + } + } + + fbFinishAccess(&pPix->drawable); +#ifdef DEBUG + if (!RegionIsValid(pReg)) + FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, + __LINE__); +#endif + return pReg; +} + +#ifdef FB_DEBUG + +#ifndef WIN32 +#include +#else +#include +#endif + +static Bool +fbValidateBits(FbStip * bits, int stride, FbStip data) +{ + while (stride--) { + if (*bits != data) { +#ifdef WIN32 + NCD_DEBUG((DEBUG_FAILURE, + "fdValidateBits failed at 0x%x (is 0x%x want 0x%x)", + bits, *bits, data)); +#else + fprintf(stderr, "fbValidateBits failed\n"); +#endif + return FALSE; + } + bits++; + } +} + +void +fbValidateDrawable(DrawablePtr pDrawable) +{ + FbStip *bits, *first, *last; + int stride, bpp; + int xoff, yoff; + int height; + Bool failed; + + if (pDrawable->type != DRAWABLE_PIXMAP) + pDrawable = (DrawablePtr) fbGetWindowPixmap(pDrawable); + fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); + first = bits - stride; + last = bits + stride * pDrawable->height; + if (!fbValidateBits(first, stride, FB_HEAD_BITS) || + !fbValidateBits(last, stride, FB_TAIL_BITS)) + fbInitializeDrawable(pDrawable); + fbFinishAccess(pDrawable); +} + +void +fbSetBits(FbStip * bits, int stride, FbStip data) +{ + while (stride--) + *bits++ = data; +} + +void +fbInitializeDrawable(DrawablePtr pDrawable) +{ + FbStip *bits, *first, *last; + int stride, bpp; + int xoff, yoff; + + fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); + first = bits - stride; + last = bits + stride * pDrawable->height; + fbSetBits(first, stride, FB_HEAD_BITS); + fbSetBits(last, stride, FB_TAIL_BITS); + fbFinishAccess(pDrawable); +} +#endif /* FB_DEBUG */ diff --git a/fb/fbpoint.c b/fb/fbpoint.c new file mode 100644 index 0000000..d5129d7 --- /dev/null +++ b/fb/fbpoint.c @@ -0,0 +1,146 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +typedef void (*FbDots) (FbBits * dst, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * pts, + int npt, + int xorg, + int yorg, int xoff, int yoff, FbBits and, FbBits xor); + +void +fbDots(FbBits * dstOrig, + FbStride dstStride, + int dstBpp, + BoxPtr pBox, + xPoint * pts, + int npt, + int xorg, int yorg, int xoff, int yoff, FbBits andOrig, FbBits xorOrig) +{ + FbStip *dst = (FbStip *) dstOrig; + int x1, y1, x2, y2; + int x, y; + FbStip *d; + FbStip and = andOrig; + FbStip xor = xorOrig; + + dstStride = FbBitsStrideToStipStride(dstStride); + x1 = pBox->x1; + y1 = pBox->y1; + x2 = pBox->x2; + y2 = pBox->y2; + while (npt--) { + x = pts->x + xorg; + y = pts->y + yorg; + pts++; + if (x1 <= x && x < x2 && y1 <= y && y < y2) { + x = (x + xoff) * dstBpp; + d = dst + ((y + yoff) * dstStride) + (x >> FB_STIP_SHIFT); + x &= FB_STIP_MASK; + if (dstBpp == 24) { + FbStip leftMask, rightMask; + int n, rot; + FbStip andT, xorT; + + rot = FbFirst24Rot(x); + andT = FbRot24Stip(and, rot); + xorT = FbRot24Stip(xor, rot); + FbMaskStip(x, 24, leftMask, n, rightMask); + if (leftMask) { + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, leftMask)); + andT = FbNext24Stip(andT); + xorT = FbNext24Stip(xorT); + d++; + } + if (rightMask) + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask)); + } + else { + FbStip mask; + + mask = FbStipMask(x, dstBpp); + WRITE(d, FbDoMaskRRop(READ(d), and, xor, mask)); + } + } + } +} + +void +fbPolyPoint(DrawablePtr pDrawable, + GCPtr pGC, int mode, int nptInit, xPoint * pptInit) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + RegionPtr pClip = fbGetCompositeClip(pGC); + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbDots dots; + FbBits and, xor; + xPoint *ppt; + int npt; + BoxPtr pBox; + int nBox; + + /* make pointlist origin relative */ + ppt = pptInit; + npt = nptInit; + if (mode == CoordModePrevious) { + npt--; + while (npt--) { + ppt++; + ppt->x += (ppt - 1)->x; + ppt->y += (ppt - 1)->y; + } + } + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + and = pPriv->and; + xor = pPriv->xor; + dots = fbDots; + switch (dstBpp) { + case 8: + dots = fbDots8; + break; + case 16: + dots = fbDots16; + break; + case 24: + dots = fbDots24; + break; + case 32: + dots = fbDots32; + break; + } + for (nBox = RegionNumRects(pClip), pBox = RegionRects(pClip); + nBox--; pBox++) + (*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, + pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor); + fbFinishAccess(pDrawable); +} diff --git a/fb/fbpush.c b/fb/fbpush.c new file mode 100644 index 0000000..f0a861c --- /dev/null +++ b/fb/fbpush.c @@ -0,0 +1,188 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbPushPattern(DrawablePtr pDrawable, + GCPtr pGC, + FbStip * src, + FbStride srcStride, int srcX, int x, int y, int width, int height) +{ + FbStip *s, bitsMask, bitsMask0, bits; + int xspan; + int w; + int lenspan; + + src += srcX >> FB_STIP_SHIFT; + srcX &= FB_STIP_MASK; + + bitsMask0 = FbStipMask(srcX, 1); + + while (height--) { + bitsMask = bitsMask0; + w = width; + s = src; + src += srcStride; + bits = READ(s++); + xspan = x; + while (w) { + if (bits & bitsMask) { + lenspan = 0; + do { + lenspan++; + if (lenspan == w) + break; + bitsMask = FbStipRight(bitsMask, 1); + if (!bitsMask) { + bits = READ(s++); + bitsMask = FbBitsMask(0, 1); + } + } while (bits & bitsMask); + fbFill(pDrawable, pGC, xspan, y, lenspan, 1); + xspan += lenspan; + w -= lenspan; + } + else { + do { + w--; + xspan++; + if (!w) + break; + bitsMask = FbStipRight(bitsMask, 1); + if (!bitsMask) { + bits = READ(s++); + bitsMask = FbBitsMask(0, 1); + } + } while (!(bits & bitsMask)); + } + } + y++; + } +} + +void +fbPushFill(DrawablePtr pDrawable, + GCPtr pGC, + FbStip * src, + FbStride srcStride, int srcX, int x, int y, int width, int height) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + + if (pGC->fillStyle == FillSolid) { + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int dstX; + int dstWidth; + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst = dst + (y + dstYoff) * dstStride; + dstX = (x + dstXoff) * dstBpp; + dstWidth = width * dstBpp; + if (dstBpp == 1) { + fbBltStip(src, + srcStride, + srcX, + (FbStip *) dst, + FbBitsStrideToStipStride(dstStride), + dstX, + dstWidth, + height, + FbStipple1Rop(pGC->alu, pGC->fgPixel), pPriv->pm, dstBpp); + } + else { + fbBltOne(src, + srcStride, + srcX, + dst, + dstStride, + dstX, + dstBpp, + dstWidth, + height, + pPriv->and, pPriv->xor, + fbAnd(GXnoop, (FbBits) 0, FB_ALLONES), + fbXor(GXnoop, (FbBits) 0, FB_ALLONES)); + } + fbFinishAccess(pDrawable); + } + else { + fbPushPattern(pDrawable, pGC, src, srcStride, srcX, + x, y, width, height); + } +} + +void +fbPushImage(DrawablePtr pDrawable, + GCPtr pGC, + FbStip * src, + FbStride srcStride, int srcX, int x, int y, int width, int height) +{ + RegionPtr pClip = fbGetCompositeClip(pGC); + int nbox; + BoxPtr pbox; + int x1, y1, x2, y2; + + for (nbox = RegionNumRects(pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { + x1 = x; + y1 = y; + x2 = x + width; + y2 = y + height; + if (x1 < pbox->x1) + x1 = pbox->x1; + if (y1 < pbox->y1) + y1 = pbox->y1; + if (x2 > pbox->x2) + x2 = pbox->x2; + if (y2 > pbox->y2) + y2 = pbox->y2; + if (x1 >= x2 || y1 >= y2) + continue; + fbPushFill(pDrawable, + pGC, + src + (y1 - y) * srcStride, + srcStride, srcX + (x1 - x), x1, y1, x2 - x1, y2 - y1); + } +} + +void +fbPushPixels(GCPtr pGC, + PixmapPtr pBitmap, + DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg) +{ + FbStip *stip; + FbStride stipStride; + int stipBpp; + _X_UNUSED int stipXoff, stipYoff; + + fbGetStipDrawable(&pBitmap->drawable, stip, stipStride, stipBpp, stipXoff, + stipYoff); + + fbPushImage(pDrawable, pGC, stip, stipStride, 0, xOrg, yOrg, dx, dy); +} diff --git a/fb/fbrop.h b/fb/fbrop.h new file mode 100644 index 0000000..4362adb --- /dev/null +++ b/fb/fbrop.h @@ -0,0 +1,137 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _FBROP_H_ +#define _FBROP_H_ + +typedef struct _mergeRopBits { + FbBits ca1, cx1, ca2, cx2; +} FbMergeRopRec, *FbMergeRopPtr; + +extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16]; + +#define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2; +#define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx; + +#define FbInitializeMergeRop(alu,pm) {\ + const FbMergeRopRec *_bits; \ + _bits = &FbMergeRopBits[alu]; \ + _ca1 = _bits->ca1 & pm; \ + _cx1 = _bits->cx1 | ~pm; \ + _ca2 = _bits->ca2 & pm; \ + _cx2 = _bits->cx2 & pm; \ +} + +#define FbDestInvarientRop(alu,pm) ((pm) == FB_ALLONES && \ + (((alu) >> 1 & 5) == ((alu) & 5))) + +#define FbDestInvarientMergeRop() (_ca1 == 0 && _cx1 == 0) + +/* AND has higher precedence than XOR */ + +#define FbDoMergeRop(src, dst) \ + (((dst) & (((src) & _ca1) ^ _cx1)) ^ (((src) & _ca2) ^ _cx2)) + +#define FbDoDestInvarientMergeRop(src) (((src) & _ca2) ^ _cx2) + +#define FbDoMaskMergeRop(src, dst, mask) \ + (((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask))) + +#define FbDoLeftMaskByteMergeRop(dst, src, lb, l) { \ + FbBits __xor = ((src) & _ca2) ^ _cx2; \ + FbDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \ +} + +#define FbDoRightMaskByteMergeRop(dst, src, rb, r) { \ + FbBits __xor = ((src) & _ca2) ^ _cx2; \ + FbDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \ +} + +#define FbDoRRop(dst, and, xor) (((dst) & (and)) ^ (xor)) + +#define FbDoMaskRRop(dst, and, xor, mask) \ + (((dst) & ((and) | ~(mask))) ^ (xor & mask)) + +/* + * Take a single bit (0 or 1) and generate a full mask + */ +#define fbFillFromBit(b,t) (~((t) ((b) & 1)-1)) + +#define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \ + (~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm)) + +#define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \ + (~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \ + ~(pm)) + +#define fbXor(rop,fg,pm) fbXorT(rop,fg,pm,FbBits) + +#define fbAnd(rop,fg,pm) fbAndT(rop,fg,pm,FbBits) + +#define fbXorStip(rop,fg,pm) fbXorT(rop,fg,pm,FbStip) + +#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip) + +/* + * Stippling operations; + */ + +extern _X_EXPORT const FbBits fbStipple16Bits[256]; /* half of table */ + +#define FbStipple16Bits(b) \ + (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT) +extern _X_EXPORT const FbBits fbStipple8Bits[256]; +extern _X_EXPORT const FbBits fbStipple4Bits[16]; +extern _X_EXPORT const FbBits fbStipple2Bits[4]; +extern _X_EXPORT const FbBits fbStipple1Bits[2]; +extern _X_EXPORT const FbBits *const fbStippleTable[]; + +#define FbStippleRRop(dst, b, fa, fx, ba, bx) \ + (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b) + +#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \ + (FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b)) + +#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \ + FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \ + FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \ +} + +#define FbDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \ + FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \ + FbDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \ +} + +#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b))) + +/* + * Compute rop for using tile code for 1-bit dest stipples; modifies + * existing rop to flip depending on pixel values + */ +#define FbStipple1RopPick(alu,b) (((alu) >> (2 - (((b) & 1) << 1))) & 3) + +#define FbOpaqueStipple1Rop(alu,fg,bg) (FbStipple1RopPick(alu,fg) | \ + (FbStipple1RopPick(alu,bg) << 2)) + +#define FbStipple1Rop(alu,fg) (FbStipple1RopPick(alu,fg) | 4) + +#endif diff --git a/fb/fbscreen.c b/fb/fbscreen.c new file mode 100644 index 0000000..f9080a4 --- /dev/null +++ b/fb/fbscreen.c @@ -0,0 +1,255 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +Bool +fbCloseScreen(ScreenPtr pScreen) +{ + int d; + DepthPtr depths = pScreen->allowedDepths; + + fbDestroyGlyphCache(); + for (d = 0; d < pScreen->numDepths; d++) + free(depths[d].vids); + free(depths); + free(pScreen->visuals); + free(pScreen->devPrivate); + return TRUE; +} + +Bool +fbRealizeFont(ScreenPtr pScreen, FontPtr pFont) +{ + return TRUE; +} + +Bool +fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) +{ + return TRUE; +} + +void +fbQueryBestSize(int class, + unsigned short *width, unsigned short *height, + ScreenPtr pScreen) +{ + unsigned short w; + + switch (class) { + case CursorShape: + if (*width > pScreen->width) + *width = pScreen->width; + if (*height > pScreen->height) + *height = pScreen->height; + break; + case TileShape: + case StippleShape: + w = *width; + if ((w & (w - 1)) && w < FB_UNIT) { + for (w = 1; w < *width; w <<= 1); + *width = w; + } + } +} + +PixmapPtr +_fbGetWindowPixmap(WindowPtr pWindow) +{ + return fbGetWindowPixmap(pWindow); +} + +void +_fbSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap) +{ + dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(pWindow), pPixmap); +} + +Bool +fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */ + int xsize, /* in pixels */ + int ysize, int dpix, /* dots per inch */ + int dpiy, int width, /* pixel width of frame buffer */ + int bpp) +{ /* bits per pixel for screen */ + if (!fbAllocatePrivates(pScreen)) + return FALSE; + pScreen->defColormap = FakeClientID(0); + /* let CreateDefColormap do whatever it wants for pixels */ + pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; + pScreen->QueryBestSize = fbQueryBestSize; + /* SaveScreen */ + pScreen->GetImage = fbGetImage; + pScreen->GetSpans = fbGetSpans; + pScreen->CreateWindow = fbCreateWindow; + pScreen->DestroyWindow = fbDestroyWindow; + pScreen->PositionWindow = fbPositionWindow; + pScreen->ChangeWindowAttributes = fbChangeWindowAttributes; + pScreen->RealizeWindow = fbMapWindow; + pScreen->UnrealizeWindow = fbUnmapWindow; + pScreen->CopyWindow = fbCopyWindow; + pScreen->CreatePixmap = fbCreatePixmap; + pScreen->DestroyPixmap = fbDestroyPixmap; + pScreen->RealizeFont = fbRealizeFont; + pScreen->UnrealizeFont = fbUnrealizeFont; + pScreen->CreateGC = fbCreateGC; + pScreen->CreateColormap = fbInitializeColormap; + pScreen->DestroyColormap = (void (*)(ColormapPtr)) NoopDDA; + pScreen->InstallColormap = fbInstallColormap; + pScreen->UninstallColormap = fbUninstallColormap; + pScreen->ListInstalledColormaps = fbListInstalledColormaps; + pScreen->StoreColors = (void (*)(ColormapPtr, int, xColorItem *)) NoopDDA; + pScreen->ResolveColor = fbResolveColor; + pScreen->BitmapToRegion = fbPixmapToRegion; + + pScreen->GetWindowPixmap = _fbGetWindowPixmap; + pScreen->SetWindowPixmap = _fbSetWindowPixmap; + + return TRUE; +} + +#ifdef FB_ACCESS_WRAPPER +Bool +wfbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap) +#else +Bool +fbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, int ysize, int dpix, int dpiy, int width, int bpp) +#endif +{ + VisualPtr visuals; + DepthPtr depths; + int nvisuals; + int ndepths; + int rootdepth; + VisualID defaultVisual; + int imagebpp = bpp; + +#ifdef FB_DEBUG + int stride; + + ysize -= 2; + stride = (width * bpp) / 8; + fbSetBits((FbStip *) pbits, stride / sizeof(FbStip), FB_HEAD_BITS); + pbits = (void *) ((char *) pbits + stride); + fbSetBits((FbStip *) ((char *) pbits + stride * ysize), + stride / sizeof(FbStip), FB_TAIL_BITS); +#endif + /* + * By default, a 24bpp screen will use 32bpp images, this avoids + * problems with many applications which just can't handle packed + * pixels. If you want real 24bit images, include a 24bpp + * format in the pixmap formats + */ + if (bpp == 24) { + int f; + + imagebpp = 32; + /* + * Check to see if we're advertising a 24bpp image format, + * in which case windows will use it in preference to a 32 bit + * format. + */ + for (f = 0; f < screenInfo.numPixmapFormats; f++) { + if (screenInfo.formats[f].bitsPerPixel == 24) { + imagebpp = 24; + break; + } + } + } + if (imagebpp == 32) { + fbGetScreenPrivate(pScreen)->win32bpp = bpp; + fbGetScreenPrivate(pScreen)->pix32bpp = bpp; + } + else { + fbGetScreenPrivate(pScreen)->win32bpp = 32; + fbGetScreenPrivate(pScreen)->pix32bpp = 32; + } +#ifdef FB_ACCESS_WRAPPER + fbGetScreenPrivate(pScreen)->setupWrap = setupWrap; + fbGetScreenPrivate(pScreen)->finishWrap = finishWrap; +#endif + rootdepth = 0; + if (!fbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth, + &defaultVisual, ((unsigned long) 1 << (imagebpp - 1)), + 8)) + return FALSE; + if (!miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, + rootdepth, ndepths, depths, + defaultVisual, nvisuals, visuals)) + return FALSE; + /* overwrite miCloseScreen with our own */ + pScreen->CloseScreen = fbCloseScreen; + if (bpp == 24 && imagebpp == 32) { + pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; + pScreen->CreateScreenResources = fb24_32CreateScreenResources; + } + return TRUE; +} + +/* dts * (inch/dot) * (25.4 mm / inch) = mm */ +#ifdef FB_ACCESS_WRAPPER +Bool +wfbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap) +{ + if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) + return FALSE; + if (!wfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, + width, bpp, setupWrap, finishWrap)) + return FALSE; + return TRUE; +} +#else +Bool +fbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, int ysize, int dpix, int dpiy, int width, int bpp) +{ + if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) + return FALSE; + if (!fbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, + width, bpp)) + return FALSE; + return TRUE; +} +#endif diff --git a/fb/fbseg.c b/fb/fbseg.c new file mode 100644 index 0000000..1848387 --- /dev/null +++ b/fb/fbseg.c @@ -0,0 +1,627 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" +#include "miline.h" + +#define fbBresShiftMask(mask,dir,bpp) ((bpp == FB_STIP_UNIT) ? 0 : \ + ((dir < 0) ? FbStipLeft(mask,bpp) : \ + FbStipRight(mask,bpp))) + +void +fbBresSolid(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbStip and = (FbStip) pPriv->and; + FbStip xor = (FbStip) pPriv->xor; + FbStip mask, mask0; + FbStip bits; + + fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * dstBpp; + dst += x1 >> FB_STIP_SHIFT; + x1 &= FB_STIP_MASK; + mask0 = FbStipMask(0, dstBpp); + mask = FbStipRight(mask0, x1); + if (signdx < 0) + mask0 = FbStipRight(mask0, FB_STIP_UNIT - dstBpp); + if (signdy < 0) + dstStride = -dstStride; + if (axis == X_AXIS) { + bits = 0; + while (len--) { + if (e >= 0) { + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); + bits = 0; + dst += dstStride; + e += e3; + } + bits |= mask; + mask = fbBresShiftMask(mask, signdx, dstBpp); + if (!mask) { + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits)); + bits = 0; + dst += signdx; + mask = mask0; + } + e += e1; + } + if (bits) + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits)); + } + else { + while (len--) { + if (e >= 0) { + e += e3; + mask = fbBresShiftMask(mask, signdx, dstBpp); + if (!mask) { + dst += signdx; + mask = mask0; + } + } + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask)); + dst += dstStride; + e += e1; + } + } + + fbFinishAccess(pDrawable); +} + +void +fbBresDash(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbStip and = (FbStip) pPriv->and; + FbStip xor = (FbStip) pPriv->xor; + FbStip bgand = (FbStip) pPriv->bgand; + FbStip bgxor = (FbStip) pPriv->bgxor; + FbStip mask, mask0; + + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + + fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + doOdd = pGC->lineStyle == LineDoubleDash; + + FbDashInit(pGC, pPriv, dashOffset, dashlen, even); + + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * dstBpp; + dst += x1 >> FB_STIP_SHIFT; + x1 &= FB_STIP_MASK; + mask0 = FbStipMask(0, dstBpp); + mask = FbStipRight(mask0, x1); + if (signdx < 0) + mask0 = FbStipRight(mask0, FB_STIP_UNIT - dstBpp); + if (signdy < 0) + dstStride = -dstStride; + while (len--) { + if (even) + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask)); + else if (doOdd) + WRITE(dst, FbDoMaskRRop(READ(dst), bgand, bgxor, mask)); + if (axis == X_AXIS) { + mask = fbBresShiftMask(mask, signdx, dstBpp); + if (!mask) { + dst += signdx; + mask = mask0; + } + e += e1; + if (e >= 0) { + dst += dstStride; + e += e3; + } + } + else { + dst += dstStride; + e += e1; + if (e >= 0) { + e += e3; + mask = fbBresShiftMask(mask, signdx, dstBpp); + if (!mask) { + dst += signdx; + mask = mask0; + } + } + } + FbDashStep(dashlen, even); + } + + fbFinishAccess(pDrawable); +} + +void +fbBresFill(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + while (len--) { + fbFill(pDrawable, pGC, x1, y1, 1, 1); + if (axis == X_AXIS) { + x1 += signdx; + e += e1; + if (e >= 0) { + e += e3; + y1 += signdy; + } + } + else { + y1 += signdy; + e += e1; + if (e >= 0) { + e += e3; + x1 += signdx; + } + } + } +} + +static void +fbSetFg(DrawablePtr pDrawable, GCPtr pGC, Pixel fg) +{ + if (fg != pGC->fgPixel) { + ChangeGCVal val; + + val.val = fg; + ChangeGC(NullClient, pGC, GCForeground, &val); + ValidateGC(pDrawable, pGC); + } +} + +void +fbBresFillDash(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + Bool doBg; + Pixel fg, bg; + + fg = pGC->fgPixel; + bg = pGC->bgPixel; + + /* whether to fill the odd dashes */ + doOdd = pGC->lineStyle == LineDoubleDash; + /* whether to switch fg to bg when filling odd dashes */ + doBg = doOdd && (pGC->fillStyle == FillSolid || + pGC->fillStyle == FillStippled); + + /* compute current dash position */ + FbDashInit(pGC, pPriv, dashOffset, dashlen, even); + + while (len--) { + if (even || doOdd) { + if (doBg) { + if (even) + fbSetFg(pDrawable, pGC, fg); + else + fbSetFg(pDrawable, pGC, bg); + } + fbFill(pDrawable, pGC, x1, y1, 1, 1); + } + if (axis == X_AXIS) { + x1 += signdx; + e += e1; + if (e >= 0) { + e += e3; + y1 += signdy; + } + } + else { + y1 += signdy; + e += e1; + if (e >= 0) { + e += e3; + x1 += signdx; + } + } + FbDashStep(dashlen, even); + } + if (doBg) + fbSetFg(pDrawable, pGC, fg); +} + +static void +fbBresSolid24RRop(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbStip and = pPriv->and; + FbStip xor = pPriv->xor; + FbStip leftMask, rightMask; + int nl; + FbStip *d; + int x; + int rot; + FbStip andT, xorT; + + fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * 24; + if (signdy < 0) + dstStride = -dstStride; + signdx *= 24; + while (len--) { + d = dst + (x1 >> FB_STIP_SHIFT); + x = x1 & FB_STIP_MASK; + rot = FbFirst24Rot(x); + andT = FbRot24Stip(and, rot); + xorT = FbRot24Stip(xor, rot); + FbMaskStip(x, 24, leftMask, nl, rightMask); + if (leftMask) { + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, leftMask)); + d++; + andT = FbNext24Stip(andT); + xorT = FbNext24Stip(xorT); + } + if (rightMask) + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask)); + if (axis == X_AXIS) { + x1 += signdx; + e += e1; + if (e >= 0) { + e += e3; + dst += dstStride; + } + } + else { + dst += dstStride; + e += e1; + if (e >= 0) { + e += e3; + x1 += signdx; + } + } + } + + fbFinishAccess(pDrawable); +} + +static void +fbBresDash24RRop(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, + int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + FbStip *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + FbStip andT, xorT; + FbStip fgand = pPriv->and; + FbStip fgxor = pPriv->xor; + FbStip bgand = pPriv->bgand; + FbStip bgxor = pPriv->bgxor; + FbStip leftMask, rightMask; + int nl; + FbStip *d; + int x; + int rot; + + FbDashDeclare; + int dashlen; + Bool even; + Bool doOdd; + + fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + doOdd = pGC->lineStyle == LineDoubleDash; + + /* compute current dash position */ + FbDashInit(pGC, pPriv, dashOffset, dashlen, even); + + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * 24; + if (signdy < 0) + dstStride = -dstStride; + signdx *= 24; + while (len--) { + if (even || doOdd) { + if (even) { + andT = fgand; + xorT = fgxor; + } + else { + andT = bgand; + xorT = bgxor; + } + d = dst + (x1 >> FB_STIP_SHIFT); + x = x1 & FB_STIP_MASK; + rot = FbFirst24Rot(x); + andT = FbRot24Stip(andT, rot); + xorT = FbRot24Stip(xorT, rot); + FbMaskStip(x, 24, leftMask, nl, rightMask); + if (leftMask) { + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, leftMask)); + d++; + andT = FbNext24Stip(andT); + xorT = FbNext24Stip(xorT); + } + if (rightMask) + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask)); + } + if (axis == X_AXIS) { + x1 += signdx; + e += e1; + if (e >= 0) { + e += e3; + dst += dstStride; + } + } + else { + dst += dstStride; + e += e1; + if (e >= 0) { + e += e3; + x1 += signdx; + } + } + FbDashStep(dashlen, even); + } + + fbFinishAccess(pDrawable); +} + +/* + * For drivers that want to bail drawing some lines, this + * function takes care of selecting the appropriate rasterizer + * based on the contents of the specified GC. + */ + +FbBres * +fbSelectBres(DrawablePtr pDrawable, GCPtr pGC) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + int dstBpp = pDrawable->bitsPerPixel; + FbBres *bres; + + if (pGC->lineStyle == LineSolid) { + bres = fbBresFill; + if (pGC->fillStyle == FillSolid) { + bres = fbBresSolid; + if (dstBpp == 24) + bres = fbBresSolid24RRop; + if (pPriv->and == 0) { + switch (dstBpp) { + case 8: + bres = fbBresSolid8; + break; + case 16: + bres = fbBresSolid16; + break; + case 24: + bres = fbBresSolid24; + break; + case 32: + bres = fbBresSolid32; + break; + } + } + } + } + else { + bres = fbBresFillDash; + if (pGC->fillStyle == FillSolid) { + bres = fbBresDash; + if (dstBpp == 24) + bres = fbBresDash24RRop; + if (pPriv->and == 0 && + (pGC->lineStyle == LineOnOffDash || pPriv->bgand == 0)) { + switch (dstBpp) { + case 8: + bres = fbBresDash8; + break; + case 16: + bres = fbBresDash16; + break; + case 24: + bres = fbBresDash24; + break; + case 32: + bres = fbBresDash32; + break; + } + } + } + } + return bres; +} + +void +fbBres(DrawablePtr pDrawable, + GCPtr pGC, + int dashOffset, + int signdx, + int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) +{ + (*fbSelectBres(pDrawable, pGC)) (pDrawable, pGC, dashOffset, + signdx, signdy, axis, x1, y1, + e, e1, e3, len); +} + +void +fbSegment(DrawablePtr pDrawable, + GCPtr pGC, + int x1, int y1, int x2, int y2, Bool drawLast, int *dashOffset) +{ + FbBres *bres; + RegionPtr pClip = fbGetCompositeClip(pGC); + BoxPtr pBox; + int nBox; + int adx; /* abs values of dx and dy */ + int ady; + int signdx; /* sign of dx and dy */ + int signdy; + int e, e1, e2, e3; /* bresenham error and increments */ + int len; /* length of segment */ + int axis; /* major axis */ + int octant; + int dashoff; + int doff; + unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); + unsigned int oc1; /* outcode of point 1 */ + unsigned int oc2; /* outcode of point 2 */ + + nBox = RegionNumRects(pClip); + pBox = RegionRects(pClip); + + bres = fbSelectBres(pDrawable, pGC); + + CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, 1, 1, octant); + + if (adx > ady) { + axis = X_AXIS; + e1 = ady << 1; + e2 = e1 - (adx << 1); + e = e1 - adx; + len = adx; + } + else { + axis = Y_AXIS; + e1 = adx << 1; + e2 = e1 - (ady << 1); + e = e1 - ady; + SetYMajorOctant(octant); + len = ady; + } + + FIXUP_ERROR(e, octant, bias); + + /* + * Adjust error terms to compare against zero + */ + e3 = e2 - e1; + e = e - e1; + + /* we have bresenham parameters and two points. + all we have to do now is clip and draw. + */ + + if (drawLast) + len++; + dashoff = *dashOffset; + *dashOffset = dashoff + len; + while (nBox--) { + oc1 = 0; + oc2 = 0; + OUTCODES(oc1, x1, y1, pBox); + OUTCODES(oc2, x2, y2, pBox); + if ((oc1 | oc2) == 0) { + (*bres) (pDrawable, pGC, dashoff, + signdx, signdy, axis, x1, y1, e, e1, e3, len); + break; + } + else if (oc1 & oc2) { + pBox++; + } + else { + int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; + int clip1 = 0, clip2 = 0; + int clipdx, clipdy; + int err; + + if (miZeroClipLine(pBox->x1, pBox->y1, pBox->x2 - 1, + pBox->y2 - 1, + &new_x1, &new_y1, &new_x2, &new_y2, + adx, ady, &clip1, &clip2, + octant, bias, oc1, oc2) == -1) { + pBox++; + continue; + } + + if (axis == X_AXIS) + len = abs(new_x2 - new_x1); + else + len = abs(new_y2 - new_y1); + if (clip2 != 0 || drawLast) + len++; + if (len) { + /* unwind bresenham error term to first point */ + doff = dashoff; + err = e; + if (clip1) { + clipdx = abs(new_x1 - x1); + clipdy = abs(new_y1 - y1); + if (axis == X_AXIS) { + doff += clipdx; + err += e3 * clipdy + e1 * clipdx; + } + else { + doff += clipdy; + err += e3 * clipdx + e1 * clipdy; + } + } + (*bres) (pDrawable, pGC, doff, + signdx, signdy, axis, new_x1, new_y1, + err, e1, e3, len); + } + pBox++; + } + } /* while (nBox--) */ +} diff --git a/fb/fbsetsp.c b/fb/fbsetsp.c new file mode 100644 index 0000000..e09d2e3 --- /dev/null +++ b/fb/fbsetsp.c @@ -0,0 +1,84 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbSetSpans(DrawablePtr pDrawable, + GCPtr pGC, + char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) +{ + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + RegionPtr pClip = fbGetCompositeClip(pGC); + FbBits *dst, *d, *s; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + BoxPtr pbox; + int n; + int xoff; + int x1, x2; + + if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) { + fb24_32SetSpans(pDrawable, pGC, src, ppt, pwidth, nspans, fSorted); + return; + } + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + while (nspans--) { + d = dst + (ppt->y + dstYoff) * dstStride; + xoff = (int) (((long) src) & (FB_MASK >> 3)); + s = (FbBits *) (src - xoff); + xoff <<= 3; + n = RegionNumRects(pClip); + pbox = RegionRects(pClip); + while (n--) { + if (pbox->y1 > ppt->y) + break; + if (pbox->y2 > ppt->y) { + x1 = ppt->x; + x2 = x1 + *pwidth; + if (pbox->x1 > x1) + x1 = pbox->x1; + if (pbox->x2 < x2) + x2 = pbox->x2; + if (x1 < x2) + fbBlt((FbBits *) s, + 0, + (x1 - ppt->x) * dstBpp + xoff, + d, + dstStride, + (x1 + dstXoff) * dstBpp, + (x2 - x1) * dstBpp, + 1, pGC->alu, pPriv->pm, dstBpp, FALSE, FALSE); + } + } + src += PixmapBytePad(*pwidth, pDrawable->depth); + ppt++; + pwidth++; + } + fbValidateDrawable(pDrawable); + fbFinishAccess(pDrawable); +} diff --git a/fb/fbsolid.c b/fb/fbsolid.c new file mode 100644 index 0000000..cad286a --- /dev/null +++ b/fb/fbsolid.c @@ -0,0 +1,179 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#define FbSelectPart(xor,o,t) xor + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +void +fbSolid(FbBits * dst, + FbStride dstStride, + int dstX, int bpp, int width, int height, FbBits and, FbBits xor) +{ + FbBits startmask, endmask; + int n, nmiddle; + int startbyte, endbyte; + + if (bpp == 24 && (!FbCheck24Pix(and) || !FbCheck24Pix(xor))) { + fbSolid24(dst, dstStride, dstX, width, height, and, xor); + return; + } + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBitsBytes(dstX, width, and == 0, startmask, startbyte, + nmiddle, endmask, endbyte); + if (startmask) + dstStride--; + dstStride -= nmiddle; + while (height--) { + if (startmask) { + FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor); + dst++; + } + n = nmiddle; + if (!and) + while (n--) + WRITE(dst++, xor); + else + while (n--) { + WRITE(dst, FbDoRRop(READ(dst), and, xor)); + dst++; + } + if (endmask) + FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor); + dst += dstStride; + } +} + +void +fbSolid24(FbBits * dst, + FbStride dstStride, + int dstX, int width, int height, FbBits and, FbBits xor) +{ + FbBits startmask, endmask; + FbBits xor0 = 0, xor1 = 0, xor2 = 0; + FbBits and0 = 0, and1 = 0, and2 = 0; + FbBits xorS = 0, andS = 0, xorE = 0, andE = 0; + int n, nmiddle; + int rotS, rot; + + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + /* + * Rotate pixel values this far across the word to align on + * screen pixel boundaries + */ + rot = FbFirst24Rot(dstX); + FbMaskBits(dstX, width, startmask, nmiddle, endmask); + if (startmask) + dstStride--; + dstStride -= nmiddle; + + /* + * Precompute rotated versions of the rasterop values + */ + rotS = rot; + xor = FbRot24(xor, rotS); + and = FbRot24(and, rotS); + if (startmask) { + xorS = xor; + andS = and; + xor = FbNext24Pix(xor); + and = FbNext24Pix(and); + } + + if (nmiddle) { + xor0 = xor; + and0 = and; + xor1 = FbNext24Pix(xor0); + and1 = FbNext24Pix(and0); + xor2 = FbNext24Pix(xor1); + and2 = FbNext24Pix(and1); + } + + if (endmask) { + switch (nmiddle % 3) { + case 0: + xorE = xor; + andE = and; + break; + case 1: + xorE = xor1; + andE = and1; + break; + case 2: + xorE = xor2; + andE = and2; + break; + } + } + + while (height--) { + if (startmask) { + WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask)); + dst++; + } + n = nmiddle; + if (!and0) { + while (n >= 3) { + WRITE(dst++, xor0); + WRITE(dst++, xor1); + WRITE(dst++, xor2); + n -= 3; + } + if (n) { + WRITE(dst++, xor0); + n--; + if (n) { + WRITE(dst++, xor1); + } + } + } + else { + while (n >= 3) { + WRITE(dst, FbDoRRop(READ(dst), and0, xor0)); + dst++; + WRITE(dst, FbDoRRop(READ(dst), and1, xor1)); + dst++; + WRITE(dst, FbDoRRop(READ(dst), and2, xor2)); + dst++; + n -= 3; + } + if (n) { + WRITE(dst, FbDoRRop(READ(dst), and0, xor0)); + dst++; + n--; + if (n) { + WRITE(dst, FbDoRRop(READ(dst), and1, xor1)); + dst++; + } + } + } + if (endmask) + WRITE(dst, FbDoMaskRRop(READ(dst), andE, xorE, endmask)); + dst += dstStride; + } +} diff --git a/fb/fbstipple.c b/fb/fbstipple.c new file mode 100644 index 0000000..f6c84a2 --- /dev/null +++ b/fb/fbstipple.c @@ -0,0 +1,264 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +/* + * This is a slight abuse of the preprocessor to generate repetitive + * code, the idea is to generate code for each case of a copy-mode + * transparent stipple + */ +#define LaneCases1(c,a) case c: \ + while (n--) { FbLaneCase(c,a); a++; } \ + break +#define LaneCases2(c,a) LaneCases1(c,a); LaneCases1(c+1,a) +#define LaneCases4(c,a) LaneCases2(c,a); LaneCases2(c+2,a) +#define LaneCases8(c,a) LaneCases4(c,a); LaneCases4(c+4,a) +#define LaneCases16(c,a) LaneCases8(c,a); LaneCases8(c+8,a) +#define LaneCases32(c,a) LaneCases16(c,a); LaneCases16(c+16,a) +#define LaneCases64(c,a) LaneCases32(c,a); LaneCases32(c+32,a) +#define LaneCases128(c,a) LaneCases64(c,a); LaneCases64(c+64,a) +#define LaneCases256(c,a) LaneCases128(c,a); LaneCases128(c+128,a) + +#if FB_SHIFT == 6 +#define LaneCases(a) LaneCases256(0,a) +#endif + +#if FB_SHIFT == 5 +#define LaneCases(a) LaneCases16(0,a) +#endif + +/* + * Repeat a transparent stipple across a scanline n times + */ + +void +fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n) +{ + FbStip s; + + s = ((FbStip) (stip) & 0x01); + s |= ((FbStip) (stip >> 8) & 0x02); + s |= ((FbStip) (stip >> 16) & 0x04); + s |= ((FbStip) (stip >> 24) & 0x08); +#if FB_SHIFT > 5 + s |= ((FbStip) (stip >> 32) & 0x10); + s |= ((FbStip) (stip >> 40) & 0x20); + s |= ((FbStip) (stip >> 48) & 0x40); + s |= ((FbStip) (stip >> 56) & 0x80); +#endif + switch (s) { + LaneCases(dst); + } +} + +void +fbEvenStipple(FbBits * dst, + FbStride dstStride, + int dstX, + int dstBpp, + int width, + int height, + FbStip * stip, + FbStride stipStride, + int stipHeight, + FbBits fgand, + FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot) +{ + FbBits startmask, endmask; + FbBits mask, and, xor; + int nmiddle, n; + FbStip *s, *stipEnd, bits; + int rot, stipX, stipY; + int pixelsPerDst; + const FbBits *fbBits; + Bool transparent; + int startbyte, endbyte; + + /* + * Check for a transparent stipple (stencil) + */ + transparent = FALSE; + if (dstBpp >= 8 && fgand == 0 && bgand == FB_ALLONES && bgxor == 0) + transparent = TRUE; + + pixelsPerDst = FB_UNIT / dstBpp; + /* + * Adjust dest pointers + */ + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBitsBytes(dstX, width, fgand == 0 && bgand == 0, + startmask, startbyte, nmiddle, endmask, endbyte); + + if (startmask) + dstStride--; + dstStride -= nmiddle; + + xRot *= dstBpp; + /* + * Compute stip start scanline and rotation parameters + */ + stipEnd = stip + stipStride * stipHeight; + modulus(-yRot, stipHeight, stipY); + s = stip + stipStride * stipY; + modulus(-xRot, FB_UNIT, stipX); + rot = stipX; + + /* + * Get pointer to stipple mask array for this depth + */ + /* fbStippleTable covers all valid bpp (4,8,16,32) */ + fbBits = fbStippleTable[pixelsPerDst]; + + while (height--) { + /* + * Extract stipple bits for this scanline; + */ + bits = READ(s); + s += stipStride; + if (s == stipEnd) + s = stip; +#if FB_UNIT > 32 + if (pixelsPerDst == 16) + mask = FbStipple16Bits(FbLeftStipBits(bits, 16)); + else +#endif + mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)]; + /* + * Rotate into position and compute reduced rop values + */ + mask = FbRotLeft(mask, rot); + and = (fgand & mask) | (bgand & ~mask); + xor = (fgxor & mask) | (bgxor & ~mask); + + if (transparent) { + if (startmask) { + fbTransparentSpan(dst, mask & startmask, fgxor, 1); + dst++; + } + fbTransparentSpan(dst, mask, fgxor, nmiddle); + dst += nmiddle; + if (endmask) + fbTransparentSpan(dst, mask & endmask, fgxor, 1); + } + else { + /* + * Fill scanline + */ + if (startmask) { + FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor); + dst++; + } + n = nmiddle; + if (!and) + while (n--) + WRITE(dst++, xor); + else { + while (n--) { + WRITE(dst, FbDoRRop(READ(dst), and, xor)); + dst++; + } + } + if (endmask) + FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor); + } + dst += dstStride; + } +} + +void +fbOddStipple(FbBits * dst, + FbStride dstStride, + int dstX, + int dstBpp, + int width, + int height, + FbStip * stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + FbBits fgand, + FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot) +{ + int stipX, stipY, sx; + int widthTmp; + int h, w; + int x, y; + + modulus(-yRot, stipHeight, stipY); + modulus(dstX / dstBpp - xRot, stipWidth, stipX); + y = 0; + while (height) { + h = stipHeight - stipY; + if (h > height) + h = height; + height -= h; + widthTmp = width; + x = dstX; + sx = stipX; + while (widthTmp) { + w = (stipWidth - sx) * dstBpp; + if (w > widthTmp) + w = widthTmp; + widthTmp -= w; + fbBltOne(stip + stipY * stipStride, + stipStride, + sx, + dst + y * dstStride, + dstStride, x, dstBpp, w, h, fgand, fgxor, bgand, bgxor); + x += w; + sx = 0; + } + y += h; + stipY = 0; + } +} + +void +fbStipple(FbBits * dst, + FbStride dstStride, + int dstX, + int dstBpp, + int width, + int height, + FbStip * stip, + FbStride stipStride, + int stipWidth, + int stipHeight, + Bool even, + FbBits fgand, + FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot) +{ + if (even) + fbEvenStipple(dst, dstStride, dstX, dstBpp, width, height, + stip, stipStride, stipHeight, + fgand, fgxor, bgand, bgxor, xRot, yRot); + else + fbOddStipple(dst, dstStride, dstX, dstBpp, width, height, + stip, stipStride, stipWidth, stipHeight, + fgand, fgxor, bgand, bgxor, xRot, yRot); +} diff --git a/fb/fbtile.c b/fb/fbtile.c new file mode 100644 index 0000000..785c5f0 --- /dev/null +++ b/fb/fbtile.c @@ -0,0 +1,163 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +/* + * Accelerated tile fill -- tile width is a power of two not greater + * than FB_UNIT + */ + +void +fbEvenTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileHeight, int alu, FbBits pm, int xRot, int yRot) +{ + FbBits *t, *tileEnd, bits; + FbBits startmask, endmask; + FbBits and, xor; + int n, nmiddle; + int tileX, tileY; + int rot; + int startbyte, endbyte; + + dst += dstX >> FB_SHIFT; + dstX &= FB_MASK; + FbMaskBitsBytes(dstX, width, FbDestInvarientRop(alu, pm), + startmask, startbyte, nmiddle, endmask, endbyte); + if (startmask) + dstStride--; + dstStride -= nmiddle; + + /* + * Compute tile start scanline and rotation parameters + */ + tileEnd = tile + tileHeight * tileStride; + modulus(-yRot, tileHeight, tileY); + t = tile + tileY * tileStride; + modulus(-xRot, FB_UNIT, tileX); + rot = tileX; + + while (height--) { + + /* + * Pick up bits for this scanline + */ + bits = READ(t); + t += tileStride; + if (t >= tileEnd) + t = tile; + bits = FbRotLeft(bits, rot); + and = fbAnd(alu, bits, pm); + xor = fbXor(alu, bits, pm); + + if (startmask) { + FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor); + dst++; + } + n = nmiddle; + if (!and) + while (n--) + WRITE(dst++, xor); + else + while (n--) { + WRITE(dst, FbDoRRop(READ(dst), and, xor)); + dst++; + } + if (endmask) + FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor); + dst += dstStride; + } +} + +void +fbOddTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileWidth, + int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot) +{ + int tileX, tileY; + int widthTmp; + int h, w; + int x, y; + + modulus(-yRot, tileHeight, tileY); + y = 0; + while (height) { + h = tileHeight - tileY; + if (h > height) + h = height; + height -= h; + widthTmp = width; + x = dstX; + modulus(dstX - xRot, tileWidth, tileX); + while (widthTmp) { + w = tileWidth - tileX; + if (w > widthTmp) + w = widthTmp; + widthTmp -= w; + fbBlt(tile + tileY * tileStride, + tileStride, + tileX, + dst + y * dstStride, + dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE); + x += w; + tileX = 0; + } + y += h; + tileY = 0; + } +} + +void +fbTile(FbBits * dst, + FbStride dstStride, + int dstX, + int width, + int height, + FbBits * tile, + FbStride tileStride, + int tileWidth, + int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot) +{ + if (FbEvenTile(tileWidth)) + fbEvenTile(dst, dstStride, dstX, width, height, + tile, tileStride, tileHeight, alu, pm, xRot, yRot); + else + fbOddTile(dst, dstStride, dstX, width, height, + tile, tileStride, tileWidth, tileHeight, + alu, pm, bpp, xRot, yRot); +} diff --git a/fb/fbtrap.c b/fb/fbtrap.c new file mode 100644 index 0000000..bf82f8f --- /dev/null +++ b/fb/fbtrap.c @@ -0,0 +1,185 @@ +/* + * Copyright © 2004 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +#include "picturestr.h" +#include "mipict.h" +#include "fbpict.h" +#include "damage.h" + +void +fbAddTraps(PicturePtr pPicture, + INT16 x_off, INT16 y_off, int ntrap, xTrap * traps) +{ + pixman_image_t *image; + int dst_xoff, dst_yoff; + + if (!(image = image_from_pict(pPicture, FALSE, &dst_xoff, &dst_yoff))) + return; + + pixman_add_traps(image, x_off + dst_xoff, y_off + dst_yoff, + ntrap, (pixman_trap_t *) traps); + + free_pixman_pict(pPicture, image); +} + +void +fbRasterizeTrapezoid(PicturePtr pPicture, + xTrapezoid * trap, int x_off, int y_off) +{ + pixman_image_t *image; + int dst_xoff, dst_yoff; + + if (!(image = image_from_pict(pPicture, FALSE, &dst_xoff, &dst_yoff))) + return; + + pixman_rasterize_trapezoid(image, (pixman_trapezoid_t *) trap, + x_off + dst_xoff, y_off + dst_yoff); + + free_pixman_pict(pPicture, image); +} + +void +fbAddTriangles(PicturePtr pPicture, + INT16 x_off, INT16 y_off, int ntri, xTriangle * tris) +{ + pixman_image_t *image; + int dst_xoff, dst_yoff; + + if (!(image = image_from_pict(pPicture, FALSE, &dst_xoff, &dst_yoff))) + return; + + pixman_add_triangles(image, + dst_xoff + x_off, dst_yoff + y_off, + ntri, (pixman_triangle_t *) tris); + + free_pixman_pict(pPicture, image); +} + +typedef void (*CompositeShapesFunc) (pixman_op_t op, + pixman_image_t * src, + pixman_image_t * dst, + pixman_format_code_t mask_format, + int x_src, int y_src, + int x_dst, int y_dst, + int n_shapes, const uint8_t * shapes); + +static void +fbShapes(CompositeShapesFunc composite, + pixman_op_t op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + int16_t xSrc, + int16_t ySrc, int nshapes, int shape_size, const uint8_t * shapes) +{ + pixman_image_t *src, *dst; + int src_xoff, src_yoff; + int dst_xoff, dst_yoff; + + miCompositeSourceValidate(pSrc); + + src = image_from_pict(pSrc, FALSE, &src_xoff, &src_yoff); + dst = image_from_pict(pDst, TRUE, &dst_xoff, &dst_yoff); + + if (src && dst) { + pixman_format_code_t format; + + DamageRegionAppend(pDst->pDrawable, pDst->pCompositeClip); + + if (!maskFormat) { + int i; + + if (pDst->polyEdge == PolyEdgeSharp) + format = PIXMAN_a1; + else + format = PIXMAN_a8; + + for (i = 0; i < nshapes; ++i) { + composite(op, src, dst, format, + xSrc + src_xoff, + ySrc + src_yoff, + dst_xoff, dst_yoff, 1, shapes + i * shape_size); + } + } + else { + switch (PICT_FORMAT_A(maskFormat->format)) { + case 1: + format = PIXMAN_a1; + break; + + case 4: + format = PIXMAN_a4; + break; + + default: + case 8: + format = PIXMAN_a8; + break; + } + + composite(op, src, dst, format, + xSrc + src_xoff, + ySrc + src_yoff, dst_xoff, dst_yoff, nshapes, shapes); + } + + DamageRegionProcessPending(pDst->pDrawable); + } + + free_pixman_pict(pSrc, src); + free_pixman_pict(pDst, dst); +} + +void +fbTrapezoids(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps) +{ + xSrc -= (traps[0].left.p1.x >> 16); + ySrc -= (traps[0].left.p1.y >> 16); + + fbShapes((CompositeShapesFunc) pixman_composite_trapezoids, + op, pSrc, pDst, maskFormat, + xSrc, ySrc, ntrap, sizeof(xTrapezoid), (const uint8_t *) traps); +} + +void +fbTriangles(CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris) +{ + xSrc -= (tris[0].p1.x >> 16); + ySrc -= (tris[0].p1.y >> 16); + + fbShapes((CompositeShapesFunc) pixman_composite_triangles, + op, pSrc, pDst, maskFormat, + xSrc, ySrc, ntris, sizeof(xTriangle), (const uint8_t *) tris); +} diff --git a/fb/fbutil.c b/fb/fbutil.c new file mode 100644 index 0000000..2ca80d1 --- /dev/null +++ b/fb/fbutil.c @@ -0,0 +1,371 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "fb.h" + +FbBits +fbReplicatePixel(Pixel p, int bpp) +{ + FbBits b = p; + + b &= FbFullMask(bpp); + while (bpp < FB_UNIT) { + b |= b << bpp; + bpp <<= 1; + } + return b; +} + +void +fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp) +{ + FbBits and, xor; + + switch (rop) { + default: + case GXclear: /* 0 0 0 0 */ + and = 0; + xor = 0; + break; + case GXand: /* 0 0 0 1 */ + and = fg; + xor = 0; + break; + case GXandReverse: /* 0 0 1 0 */ + and = fg; + xor = fg; + break; + case GXcopy: /* 0 0 1 1 */ + and = 0; + xor = fg; + break; + case GXandInverted: /* 0 1 0 0 */ + and = ~fg; + xor = 0; + break; + case GXnoop: /* 0 1 0 1 */ + and = FB_ALLONES; + xor = 0; + break; + case GXxor: /* 0 1 1 0 */ + and = FB_ALLONES; + xor = fg; + break; + case GXor: /* 0 1 1 1 */ + and = ~fg; + xor = fg; + break; + case GXnor: /* 1 0 0 0 */ + and = ~fg; + xor = ~fg; + break; + case GXequiv: /* 1 0 0 1 */ + and = FB_ALLONES; + xor = ~fg; + break; + case GXinvert: /* 1 0 1 0 */ + and = FB_ALLONES; + xor = FB_ALLONES; + break; + case GXorReverse: /* 1 0 1 1 */ + and = ~fg; + xor = FB_ALLONES; + break; + case GXcopyInverted: /* 1 1 0 0 */ + and = 0; + xor = ~fg; + break; + case GXorInverted: /* 1 1 0 1 */ + and = fg; + xor = ~fg; + break; + case GXnand: /* 1 1 1 0 */ + and = fg; + xor = FB_ALLONES; + break; + case GXset: /* 1 1 1 1 */ + and = 0; + xor = FB_ALLONES; + break; + } + and |= ~pm; + xor &= pm; + *andp = and; + *xorp = xor; +} + +#define O 0 +#define I FB_ALLONES + +const FbMergeRopRec FbMergeRopBits[16] = { + {O, O, O, O}, /* clear 0x0 0 */ + {I, O, O, O}, /* and 0x1 src AND dst */ + {I, O, I, O}, /* andReverse 0x2 src AND NOT dst */ + {O, O, I, O}, /* copy 0x3 src */ + {I, I, O, O}, /* andInverted 0x4 NOT src AND dst */ + {O, I, O, O}, /* noop 0x5 dst */ + {O, I, I, O}, /* xor 0x6 src XOR dst */ + {I, I, I, O}, /* or 0x7 src OR dst */ + {I, I, I, I}, /* nor 0x8 NOT src AND NOT dst */ + {O, I, I, I}, /* equiv 0x9 NOT src XOR dst */ + {O, I, O, I}, /* invert 0xa NOT dst */ + {I, I, O, I}, /* orReverse 0xb src OR NOT dst */ + {O, O, I, I}, /* copyInverted 0xc NOT src */ + {I, O, I, I}, /* orInverted 0xd NOT src OR dst */ + {I, O, O, I}, /* nand 0xe NOT src OR NOT dst */ + {O, O, O, I}, /* set 0xf 1 */ +}; + +/* + * Stipple masks are independent of bit/byte order as long + * as bitorder == byteorder. FB doesn't handle the case + * where these differ + */ +#define BitsMask(x,w) ((FB_ALLONES << ((x) & FB_MASK)) & \ + (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK))) + +#define Mask(x,w) BitsMask((x)*(w),(w)) + +#define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w)) + +#define C1(b,w) \ + (SelMask(b,0,w)) + +#define C2(b,w) \ + (SelMask(b,0,w) | \ + SelMask(b,1,w)) + +#define C4(b,w) \ + (SelMask(b,0,w) | \ + SelMask(b,1,w) | \ + SelMask(b,2,w) | \ + SelMask(b,3,w)) + +#define C8(b,w) \ + (SelMask(b,0,w) | \ + SelMask(b,1,w) | \ + SelMask(b,2,w) | \ + SelMask(b,3,w) | \ + SelMask(b,4,w) | \ + SelMask(b,5,w) | \ + SelMask(b,6,w) | \ + SelMask(b,7,w)) + +#if FB_UNIT == 16 +#define fbStipple16Bits 0 +#define fbStipple8Bits 0 +const FbBits fbStipple4Bits[16] = { + C4(0, 4), C4(1, 4), C4(2, 4), C4(3, 4), C4(4, 4), C4(5, 4), + C4(6, 4), C4(7, 4), C4(8, 4), C4(9, 4), C4(10, 4), C4(11, 4), + C4(12, 4), C4(13, 4), C4(14, 4), C4(15, 4), +}; + +const FbBits fbStipple2Bits[4] = { + C2(0, 8), C2(1, 8), C2(2, 8), C2(3, 8), +}; + +const FbBits fbStipple1Bits[2] = { + C1(0, 16), C1(1, 16), +}; +#endif +#if FB_UNIT == 32 +#define fbStipple16Bits 0 +const FbBits fbStipple8Bits[256] = { + C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4), + C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4), + C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4), + C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4), + C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4), + C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4), + C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4), + C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4), + C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4), + C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4), + C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4), + C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4), + C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4), + C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4), + C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4), + C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4), + C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4), + C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4), + C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4), + C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4), + C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4), + C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4), + C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4), + C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4), + C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4), + C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4), + C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4), + C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4), + C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4), + C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4), + C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4), + C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4), + C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4), + C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4), + C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4), + C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4), + C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4), + C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4), + C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4), + C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4), + C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4), + C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4), + C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4), +}; + +const FbBits fbStipple4Bits[16] = { + C4(0, 8), C4(1, 8), C4(2, 8), C4(3, 8), C4(4, 8), C4(5, 8), + C4(6, 8), C4(7, 8), C4(8, 8), C4(9, 8), C4(10, 8), C4(11, 8), + C4(12, 8), C4(13, 8), C4(14, 8), C4(15, 8), +}; + +const FbBits fbStipple2Bits[4] = { + C2(0, 16), C2(1, 16), C2(2, 16), C2(3, 16), +}; + +const FbBits fbStipple1Bits[2] = { + C1(0, 32), C1(1, 32), +}; +#endif +#if FB_UNIT == 64 +const FbBits fbStipple16Bits[256] = { + C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4), + C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4), + C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4), + C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4), + C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4), + C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4), + C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4), + C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4), + C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4), + C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4), + C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4), + C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4), + C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4), + C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4), + C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4), + C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4), + C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4), + C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4), + C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4), + C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4), + C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4), + C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4), + C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4), + C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4), + C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4), + C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4), + C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4), + C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4), + C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4), + C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4), + C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4), + C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4), + C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4), + C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4), + C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4), + C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4), + C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4), + C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4), + C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4), + C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4), + C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4), + C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4), + C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4), +}; + +const FbBits fbStipple8Bits[256] = { + C8(0, 8), C8(1, 8), C8(2, 8), C8(3, 8), C8(4, 8), C8(5, 8), + C8(6, 8), C8(7, 8), C8(8, 8), C8(9, 8), C8(10, 8), C8(11, 8), + C8(12, 8), C8(13, 8), C8(14, 8), C8(15, 8), C8(16, 8), C8(17, 8), + C8(18, 8), C8(19, 8), C8(20, 8), C8(21, 8), C8(22, 8), C8(23, 8), + C8(24, 8), C8(25, 8), C8(26, 8), C8(27, 8), C8(28, 8), C8(29, 8), + C8(30, 8), C8(31, 8), C8(32, 8), C8(33, 8), C8(34, 8), C8(35, 8), + C8(36, 8), C8(37, 8), C8(38, 8), C8(39, 8), C8(40, 8), C8(41, 8), + C8(42, 8), C8(43, 8), C8(44, 8), C8(45, 8), C8(46, 8), C8(47, 8), + C8(48, 8), C8(49, 8), C8(50, 8), C8(51, 8), C8(52, 8), C8(53, 8), + C8(54, 8), C8(55, 8), C8(56, 8), C8(57, 8), C8(58, 8), C8(59, 8), + C8(60, 8), C8(61, 8), C8(62, 8), C8(63, 8), C8(64, 8), C8(65, 8), + C8(66, 8), C8(67, 8), C8(68, 8), C8(69, 8), C8(70, 8), C8(71, 8), + C8(72, 8), C8(73, 8), C8(74, 8), C8(75, 8), C8(76, 8), C8(77, 8), + C8(78, 8), C8(79, 8), C8(80, 8), C8(81, 8), C8(82, 8), C8(83, 8), + C8(84, 8), C8(85, 8), C8(86, 8), C8(87, 8), C8(88, 8), C8(89, 8), + C8(90, 8), C8(91, 8), C8(92, 8), C8(93, 8), C8(94, 8), C8(95, 8), + C8(96, 8), C8(97, 8), C8(98, 8), C8(99, 8), C8(100, 8), C8(101, 8), + C8(102, 8), C8(103, 8), C8(104, 8), C8(105, 8), C8(106, 8), C8(107, 8), + C8(108, 8), C8(109, 8), C8(110, 8), C8(111, 8), C8(112, 8), C8(113, 8), + C8(114, 8), C8(115, 8), C8(116, 8), C8(117, 8), C8(118, 8), C8(119, 8), + C8(120, 8), C8(121, 8), C8(122, 8), C8(123, 8), C8(124, 8), C8(125, 8), + C8(126, 8), C8(127, 8), C8(128, 8), C8(129, 8), C8(130, 8), C8(131, 8), + C8(132, 8), C8(133, 8), C8(134, 8), C8(135, 8), C8(136, 8), C8(137, 8), + C8(138, 8), C8(139, 8), C8(140, 8), C8(141, 8), C8(142, 8), C8(143, 8), + C8(144, 8), C8(145, 8), C8(146, 8), C8(147, 8), C8(148, 8), C8(149, 8), + C8(150, 8), C8(151, 8), C8(152, 8), C8(153, 8), C8(154, 8), C8(155, 8), + C8(156, 8), C8(157, 8), C8(158, 8), C8(159, 8), C8(160, 8), C8(161, 8), + C8(162, 8), C8(163, 8), C8(164, 8), C8(165, 8), C8(166, 8), C8(167, 8), + C8(168, 8), C8(169, 8), C8(170, 8), C8(171, 8), C8(172, 8), C8(173, 8), + C8(174, 8), C8(175, 8), C8(176, 8), C8(177, 8), C8(178, 8), C8(179, 8), + C8(180, 8), C8(181, 8), C8(182, 8), C8(183, 8), C8(184, 8), C8(185, 8), + C8(186, 8), C8(187, 8), C8(188, 8), C8(189, 8), C8(190, 8), C8(191, 8), + C8(192, 8), C8(193, 8), C8(194, 8), C8(195, 8), C8(196, 8), C8(197, 8), + C8(198, 8), C8(199, 8), C8(200, 8), C8(201, 8), C8(202, 8), C8(203, 8), + C8(204, 8), C8(205, 8), C8(206, 8), C8(207, 8), C8(208, 8), C8(209, 8), + C8(210, 8), C8(211, 8), C8(212, 8), C8(213, 8), C8(214, 8), C8(215, 8), + C8(216, 8), C8(217, 8), C8(218, 8), C8(219, 8), C8(220, 8), C8(221, 8), + C8(222, 8), C8(223, 8), C8(224, 8), C8(225, 8), C8(226, 8), C8(227, 8), + C8(228, 8), C8(229, 8), C8(230, 8), C8(231, 8), C8(232, 8), C8(233, 8), + C8(234, 8), C8(235, 8), C8(236, 8), C8(237, 8), C8(238, 8), C8(239, 8), + C8(240, 8), C8(241, 8), C8(242, 8), C8(243, 8), C8(244, 8), C8(245, 8), + C8(246, 8), C8(247, 8), C8(248, 8), C8(249, 8), C8(250, 8), C8(251, 8), + C8(252, 8), C8(253, 8), C8(254, 8), C8(255, 8), +}; + +const FbBits fbStipple4Bits[16] = { + C4(0, 16), C4(1, 16), C4(2, 16), C4(3, 16), C4(4, 16), C4(5, 16), + C4(6, 16), C4(7, 16), C4(8, 16), C4(9, 16), C4(10, 16), C4(11, 16), + C4(12, 16), C4(13, 16), C4(14, 16), C4(15, 16), +}; + +const FbBits fbStipple2Bits[4] = { + C2(0, 32), C2(1, 32), C2(2, 32), C2(3, 32), +}; + +#define fbStipple1Bits 0 +#endif +const FbBits *const fbStippleTable[] = { + 0, + fbStipple1Bits, + fbStipple2Bits, + 0, + fbStipple4Bits, + 0, + 0, + 0, + fbStipple8Bits, +}; diff --git a/fb/fbwindow.c b/fb/fbwindow.c new file mode 100644 index 0000000..368c4b8 --- /dev/null +++ b/fb/fbwindow.c @@ -0,0 +1,205 @@ +/* + * Copyright © 1998 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include "fb.h" + +Bool +fbCreateWindow(WindowPtr pWin) +{ + dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin), + fbGetScreenPixmap(pWin->drawable.pScreen)); + if (pWin->drawable.bitsPerPixel == 32) + pWin->drawable.bitsPerPixel = + fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; + return TRUE; +} + +Bool +fbDestroyWindow(WindowPtr pWin) +{ + return TRUE; +} + +Bool +fbMapWindow(WindowPtr pWindow) +{ + return TRUE; +} + +Bool +fbPositionWindow(WindowPtr pWin, int x, int y) +{ + return TRUE; +} + +Bool +fbUnmapWindow(WindowPtr pWindow) +{ + return TRUE; +} + +void +fbCopyWindowProc(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) +{ + FbBits *src; + FbStride srcStride; + int srcBpp; + int srcXoff, srcYoff; + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + + fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (nbox--) { + fbBlt(src + (pbox->y1 + dy + srcYoff) * srcStride, + srcStride, + (pbox->x1 + dx + srcXoff) * srcBpp, + dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + (pbox->y2 - pbox->y1), + GXcopy, FB_ALLONES, dstBpp, reverse, upsidedown); + pbox++; + } + + fbFinishAccess(pDstDrawable); + fbFinishAccess(pSrcDrawable); +} + +void +fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + RegionRec rgnDst; + int dx, dy; + + PixmapPtr pPixmap = fbGetWindowPixmap(pWin); + DrawablePtr pDrawable = &pPixmap->drawable; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + RegionTranslate(prgnSrc, -dx, -dy); + + RegionNull(&rgnDst); + + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); + +#ifdef COMPOSITE + if (pPixmap->screen_x || pPixmap->screen_y) + RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); +#endif + + miCopyRegion(pDrawable, pDrawable, + 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + RegionUninit(&rgnDst); + fbValidateDrawable(&pWin->drawable); +} + +static void +fbFixupWindowPixmap(DrawablePtr pDrawable, PixmapPtr *ppPixmap) +{ + PixmapPtr pPixmap = *ppPixmap; + + if (pPixmap->drawable.bitsPerPixel != pDrawable->bitsPerPixel) { + pPixmap = fb24_32ReformatTile(pPixmap, pDrawable->bitsPerPixel); + if (!pPixmap) + return; + (*pDrawable->pScreen->DestroyPixmap) (*ppPixmap); + *ppPixmap = pPixmap; + } + if (FbEvenTile(pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel)) + fbPadPixmap(pPixmap); +} + +Bool +fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask) +{ + if (mask & CWBackPixmap) { + if (pWin->backgroundState == BackgroundPixmap) + fbFixupWindowPixmap(&pWin->drawable, &pWin->background.pixmap); + } + if (mask & CWBorderPixmap) { + if (pWin->borderIsPixel == FALSE) + fbFixupWindowPixmap(&pWin->drawable, &pWin->border.pixmap); + } + return TRUE; +} + +void +fbFillRegionSolid(DrawablePtr pDrawable, + RegionPtr pRegion, FbBits and, FbBits xor) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + int n = RegionNumRects(pRegion); + BoxPtr pbox = RegionRects(pRegion); + +#ifndef FB_ACCESS_WRAPPER + int try_mmx = 0; + + if (!and) + try_mmx = 1; +#endif + + fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + + while (n--) { +#ifndef FB_ACCESS_WRAPPER + if (!try_mmx || !pixman_fill((uint32_t *) dst, dstStride, dstBpp, + pbox->x1 + dstXoff, pbox->y1 + dstYoff, + (pbox->x2 - pbox->x1), + (pbox->y2 - pbox->y1), xor)) { +#endif + fbSolid(dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + pbox->y2 - pbox->y1, and, xor); +#ifndef FB_ACCESS_WRAPPER + } +#endif + fbValidateDrawable(pDrawable); + pbox++; + } + + fbFinishAccess(pDrawable); +} diff --git a/fb/wfbrename.h b/fb/wfbrename.h new file mode 100644 index 0000000..54d00d0 --- /dev/null +++ b/fb/wfbrename.h @@ -0,0 +1,170 @@ +#define fb16Lane wfb16Lane +#define fb24_32CopyMtoN wfb24_32CopyMtoN +#define fb24_32CreateScreenResources wfb24_32CreateScreenResources +#define fb24_32GetImage wfb24_32GetImage +#define fb24_32GetSpans wfb24_32GetSpans +#define fb24_32ModifyPixmapHeader wfb24_32ModifyPixmapHeader +#define fb24_32PutZImage wfb24_32PutZImage +#define fb24_32ReformatTile wfb24_32ReformatTile +#define fb24_32SetSpans wfb24_32SetSpans +#define fb32Lane wfb32Lane +#define fb8Lane wfb8Lane +#define fbAddTraps wfbAddTraps +#define fbAddTriangles wfbAddTriangles +#define fbAllocatePrivates wfbAllocatePrivates +#define fbArc16 wfbArc16 +#define fbArc24 wfbArc24 +#define fbArc32 wfbArc32 +#define fbArc8 wfbArc8 +#define fbBlt wfbBlt +#define fbBlt24 wfbBlt24 +#define fbBltOne wfbBltOne +#define fbBltOne24 wfbBltOne24 +#define fbBltPlane wfbBltPlane +#define fbBltStip wfbBltStip +#define fbBres wfbBres +#define fbBresDash wfbBresDash +#define fbBresDash16 wfbBresDash16 +#define fbBresDash24 wfbBresDash24 +#define fbBresDash32 wfbBresDash32 +#define fbBresDash8 wfbBresDash8 +#define fbBresFill wfbBresFill +#define fbBresFillDash wfbBresFillDash +#define fbBresSolid wfbBresSolid +#define fbBresSolid16 wfbBresSolid16 +#define fbBresSolid24 wfbBresSolid24 +#define fbBresSolid32 wfbBresSolid32 +#define fbBresSolid8 wfbBresSolid8 +#define fbChangeWindowAttributes wfbChangeWindowAttributes +#define fbClearVisualTypes wfbClearVisualTypes +#define fbCloseScreen wfbCloseScreen +#define fbComposite wfbComposite +#define fbCopy1toN wfbCopy1toN +#define fbCopyArea wfbCopyArea +#define fbCopyNto1 wfbCopyNto1 +#define fbCopyNtoN wfbCopyNtoN +#define fbCopyPlane wfbCopyPlane +#define fbCopyRegion wfbCopyRegion +#define fbCopyWindow wfbCopyWindow +#define fbCopyWindowProc wfbCopyWindowProc +#define fbCreateDefColormap wfbCreateDefColormap +#define fbCreateGC wfbCreateGC +#define fbCreatePixmap wfbCreatePixmap +#define fbCreatePixmapBpp wfbCreatePixmapBpp +#define fbCreateWindow wfbCreateWindow +#define fbDestroyGlyphCache wfbDestroyGlyphCache +#define fbDestroyPixmap wfbDestroyPixmap +#define fbDestroyWindow wfbDestroyWindow +#define fbDoCopy wfbDoCopy +#define fbDots wfbDots +#define fbDots16 wfbDots16 +#define fbDots24 wfbDots24 +#define fbDots32 wfbDots32 +#define fbDots8 wfbDots8 +#define fbEvenStipple wfbEvenStipple +#define fbEvenTile wfbEvenTile +#define fbExpandDirectColors wfbExpandDirectColors +#define fbFill wfbFill +#define fbFillRegionSolid wfbFillRegionSolid +#define fbFillSpans wfbFillSpans +#define fbFixCoordModePrevious wfbFixCoordModePrevious +#define fbGCFuncs wfbGCFuncs +#define fbGCOps wfbGCOps +#define fbGeneration wfbGeneration +#define fbGetImage wfbGetImage +#define fbGetScreenPrivateKey wfbGetScreenPrivateKey +#define fbGetSpans wfbGetSpans +#define _fbGetWindowPixmap _wfbGetWindowPixmap +#define fbGlyph16 wfbGlyph16 +#define fbGlyph24 wfbGlyph24 +#define fbGlyph32 wfbGlyph32 +#define fbGlyph8 wfbGlyph8 +#define fbGlyphIn wfbGlyphIn +#define fbHasVisualTypes wfbHasVisualTypes +#define fbImageGlyphBlt wfbImageGlyphBlt +#define fbIn wfbIn +#define fbInitializeColormap wfbInitializeColormap +#define fbInitVisuals wfbInitVisuals +#define fbInstallColormap wfbInstallColormap +#define fbLaneTable wfbLaneTable +#define fbListInstalledColormaps wfbListInstalledColormaps +#define fbMapWindow wfbMapWindow +#define FbMergeRopBits wFbMergeRopBits +#define fbOddStipple wfbOddStipple +#define fbOddTile wfbOddTile +#define fbOver wfbOver +#define fbOver24 wfbOver24 +#define fbOverlayCloseScreen wfbOverlayCloseScreen +#define fbOverlayCopyWindow wfbOverlayCopyWindow +#define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources +#define fbOverlayCreateWindow wfbOverlayCreateWindow +#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit +#define fbOverlayGeneration wfbOverlayGeneration +#define fbOverlayGetScreenPrivateKey wfbOverlayGetScreenPrivateKey +#define fbOverlayPaintKey wfbOverlayPaintKey +#define fbOverlaySetupScreen wfbOverlaySetupScreen +#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion +#define fbOverlayWindowExposures wfbOverlayWindowExposures +#define fbOverlayWindowLayer wfbOverlayWindowLayer +#define fbPadPixmap wfbPadPixmap +#define fbPictureInit wfbPictureInit +#define fbPixmapToRegion wfbPixmapToRegion +#define fbPolyArc wfbPolyArc +#define fbPolyFillRect wfbPolyFillRect +#define fbPolyGlyphBlt wfbPolyGlyphBlt +#define fbPolyLine wfbPolyLine +#define fbPolyline16 wfbPolyline16 +#define fbPolyline24 wfbPolyline24 +#define fbPolyline32 wfbPolyline32 +#define fbPolyline8 wfbPolyline8 +#define fbPolyPoint wfbPolyPoint +#define fbPolySegment wfbPolySegment +#define fbPolySegment16 wfbPolySegment16 +#define fbPolySegment24 wfbPolySegment24 +#define fbPolySegment32 wfbPolySegment32 +#define fbPolySegment8 wfbPolySegment8 +#define fbPositionWindow wfbPositionWindow +#define fbPushFill wfbPushFill +#define fbPushImage wfbPushImage +#define fbPushPattern wfbPushPattern +#define fbPushPixels wfbPushPixels +#define fbPutImage wfbPutImage +#define fbPutXYImage wfbPutXYImage +#define fbPutZImage wfbPutZImage +#define fbQueryBestSize wfbQueryBestSize +#define fbRasterizeTrapezoid wfbRasterizeTrapezoid +#define fbRealizeFont wfbRealizeFont +#define fbReduceRasterOp wfbReduceRasterOp +#define fbReplicatePixel wfbReplicatePixel +#define fbResolveColor wfbResolveColor +#define fbScreenPrivateKeyRec wfbScreenPrivateKeyRec +#define fbSegment wfbSegment +#define fbSelectBres wfbSelectBres +#define fbSetSpans wfbSetSpans +#define fbSetupScreen wfbSetupScreen +#define fbSetVisualTypes wfbSetVisualTypes +#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks +#define _fbSetWindowPixmap _wfbSetWindowPixmap +#define fbSolid wfbSolid +#define fbSolid24 wfbSolid24 +#define fbSolidBoxClipped wfbSolidBoxClipped +#define fbStipple wfbStipple +#define fbStipple1Bits wfbStipple1Bits +#define fbStipple24Bits wfbStipple24Bits +#define fbStipple2Bits wfbStipple2Bits +#define fbStipple4Bits wfbStipple4Bits +#define fbStipple8Bits wfbStipple8Bits +#define fbStippleTable wfbStippleTable +#define fbTile wfbTile +#define fbTransparentSpan wfbTransparentSpan +#define fbTrapezoids wfbTrapezoids +#define fbTriangles wfbTriangles +#define fbUninstallColormap wfbUninstallColormap +#define fbUnmapWindow wfbUnmapWindow +#define fbUnrealizeFont wfbUnrealizeFont +#define fbValidateGC wfbValidateGC +#define fbWinPrivateKeyRec wfbWinPrivateKeyRec +#define fbZeroLine wfbZeroLine +#define fbZeroSegment wfbZeroSegment +#define free_pixman_pict wfb_free_pixman_pict +#define image_from_pict wfb_image_from_pict diff --git a/glx/Makefile.am b/glx/Makefile.am new file mode 100644 index 0000000..54e8140 --- /dev/null +++ b/glx/Makefile.am @@ -0,0 +1,89 @@ +if AIGLX_DRI_LOADER +GLXDRI_LIBRARY = libglxdri.la +endif + +noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) + +AM_CFLAGS = \ + @DIX_CFLAGS@ \ + @GL_CFLAGS@ \ + @XLIB_CFLAGS@ \ + @LIBDRM_CFLAGS@ \ + @GLX_DEFINES@ \ + @GLX_ARCH_DEFINES@ + +# none yet +#sdk_HEADERS = + +AM_CPPFLAGS = \ + -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/mi \ + -I$(top_srcdir)/present + +if DRI2_AIGLX +AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2 +endif + +indirect_sources = \ + indirect_dispatch.c \ + indirect_dispatch.h \ + indirect_dispatch_swap.c \ + indirect_reqsize.c \ + indirect_reqsize.h \ + indirect_size.h \ + indirect_size_get.c \ + indirect_size_get.h \ + indirect_table.c + +libglxdri_la_SOURCES = + +if DRI2_AIGLX +libglxdri_la_SOURCES += glxdri2.c +endif + +libglxdri_la_LIBADD = $(DLOPEN_LIBS) + +libglx_la_SOURCES = \ + $(indirect_sources) \ + clientinfo.c \ + createcontext.c \ + extension_string.c \ + extension_string.h \ + indirect_util.c \ + indirect_util.h \ + indirect_program.c \ + indirect_table.h \ + indirect_texture_compression.c \ + glxbyteorder.h \ + glxcmds.c \ + glxcmdsswap.c \ + glxcontext.h \ + glxdrawable.h \ + glxext.c \ + glxext.h \ + glxdriswrast.c \ + glxdricommon.c \ + glxdricommon.h \ + glxscreens.c \ + glxscreens.h \ + glxserver.h \ + glxutil.h \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + singlesize.h \ + swap_interval.c \ + unpack.h \ + xfont.c + +libglx_la_LIBADD = $(DLOPEN_LIBS) diff --git a/glx/Makefile.in b/glx/Makefile.in new file mode 100644 index 0000000..336c40a --- /dev/null +++ b/glx/Makefile.in @@ -0,0 +1,854 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@DRI2_AIGLX_TRUE@am__append_1 = -I$(top_srcdir)/hw/xfree86/dri2 +@DRI2_AIGLX_TRUE@am__append_2 = glxdri2.c +subdir = glx +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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +libglx_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__objects_1 = indirect_dispatch.lo indirect_dispatch_swap.lo \ + indirect_reqsize.lo indirect_size_get.lo indirect_table.lo +am_libglx_la_OBJECTS = $(am__objects_1) clientinfo.lo createcontext.lo \ + extension_string.lo indirect_util.lo indirect_program.lo \ + indirect_texture_compression.lo glxcmds.lo glxcmdsswap.lo \ + glxext.lo glxdriswrast.lo glxdricommon.lo glxscreens.lo \ + render2.lo render2swap.lo renderpix.lo renderpixswap.lo \ + rensize.lo single2.lo single2swap.lo singlepix.lo \ + singlepixswap.lo singlesize.lo swap_interval.lo xfont.lo +libglx_la_OBJECTS = $(am_libglx_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +libglxdri_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libglxdri_la_SOURCES_DIST = glxdri2.c +@DRI2_AIGLX_TRUE@am__objects_2 = glxdri2.lo +am_libglxdri_la_OBJECTS = $(am__objects_2) +libglxdri_la_OBJECTS = $(am_libglxdri_la_OBJECTS) +@AIGLX_DRI_LOADER_TRUE@am_libglxdri_la_rpath = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libglx_la_SOURCES) $(libglxdri_la_SOURCES) +DIST_SOURCES = $(libglx_la_SOURCES) $(am__libglxdri_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@AIGLX_DRI_LOADER_TRUE@GLXDRI_LIBRARY = libglxdri.la +noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) +AM_CFLAGS = \ + @DIX_CFLAGS@ \ + @GL_CFLAGS@ \ + @XLIB_CFLAGS@ \ + @LIBDRM_CFLAGS@ \ + @GLX_DEFINES@ \ + @GLX_ARCH_DEFINES@ + + +# none yet +#sdk_HEADERS = +AM_CPPFLAGS = -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/os-support/bus \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/dri -I$(top_srcdir)/mi \ + -I$(top_srcdir)/present $(am__append_1) +indirect_sources = \ + indirect_dispatch.c \ + indirect_dispatch.h \ + indirect_dispatch_swap.c \ + indirect_reqsize.c \ + indirect_reqsize.h \ + indirect_size.h \ + indirect_size_get.c \ + indirect_size_get.h \ + indirect_table.c + +libglxdri_la_SOURCES = $(am__append_2) +libglxdri_la_LIBADD = $(DLOPEN_LIBS) +libglx_la_SOURCES = \ + $(indirect_sources) \ + clientinfo.c \ + createcontext.c \ + extension_string.c \ + extension_string.h \ + indirect_util.c \ + indirect_util.h \ + indirect_program.c \ + indirect_table.h \ + indirect_texture_compression.c \ + glxbyteorder.h \ + glxcmds.c \ + glxcmdsswap.c \ + glxcontext.h \ + glxdrawable.h \ + glxext.c \ + glxext.h \ + glxdriswrast.c \ + glxdricommon.c \ + glxdricommon.h \ + glxscreens.c \ + glxscreens.h \ + glxserver.h \ + glxutil.h \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + singlesize.h \ + swap_interval.c \ + unpack.h \ + xfont.c + +libglx_la_LIBADD = $(DLOPEN_LIBS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glx/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign glx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_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 +libglx.la: $(libglx_la_OBJECTS) $(libglx_la_DEPENDENCIES) $(EXTRA_libglx_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libglx_la_OBJECTS) $(libglx_la_LIBADD) $(LIBS) +libglxdri.la: $(libglxdri_la_OBJECTS) $(libglxdri_la_DEPENDENCIES) $(EXTRA_libglxdri_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libglxdri_la_rpath) $(libglxdri_la_OBJECTS) $(libglxdri_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/createcontext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension_string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmdsswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxdri2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxdricommon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxdriswrast.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxscreens.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_dispatch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_dispatch_swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_program.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_reqsize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_size_get.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_table.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_texture_compression.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render2swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderpix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderpixswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rensize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single2swap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlepix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlepixswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlesize.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap_interval.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfont.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# 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/glx/clientinfo.c b/glx/clientinfo.c new file mode 100644 index 0000000..4aaa4c9 --- /dev/null +++ b/glx/clientinfo.c @@ -0,0 +1,110 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "indirect_dispatch.h" +#include "glxbyteorder.h" +#include "unpack.h" + +static int +set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req, + unsigned bytes_per_version) +{ + char *gl_extensions; + char *glx_extensions; + + /* Verify that the size of the packet matches the size inferred from the + * sizes specified for the various fields. + */ + const unsigned expected_size = sz_xGLXSetClientInfoARBReq + + (req->numVersions * bytes_per_version) + + __GLX_PAD(req->numGLExtensionBytes) + + __GLX_PAD(req->numGLXExtensionBytes); + + if (req->length != (expected_size / 4)) + return BadLength; + + /* Verify that the actual length of the GL extension string matches what's + * encoded in protocol packet. + */ + gl_extensions = (char *) (req + 1) + (req->numVersions * bytes_per_version); + if (req->numGLExtensionBytes != 0 + && memchr(gl_extensions, 0, + __GLX_PAD(req->numGLExtensionBytes)) == NULL) + return BadLength; + + /* Verify that the actual length of the GLX extension string matches + * what's encoded in protocol packet. + */ + glx_extensions = gl_extensions + __GLX_PAD(req->numGLExtensionBytes); + if (req->numGLXExtensionBytes != 0 + && memchr(glx_extensions, 0, + __GLX_PAD(req->numGLXExtensionBytes)) == NULL) + return BadLength; + + free(cl->GLClientextensions); + cl->GLClientextensions = strdup(gl_extensions); + + return 0; +} + +int +__glXDisp_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc) +{ + return set_client_info(cl, (xGLXSetClientInfoARBReq *) pc, 8); +} + +int +__glXDispSwap_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc; + + req->length = bswap_16(req->length); + req->numVersions = bswap_32(req->numVersions); + req->numGLExtensionBytes = bswap_32(req->numGLExtensionBytes); + req->numGLXExtensionBytes = bswap_32(req->numGLXExtensionBytes); + + return __glXDisp_SetClientInfoARB(cl, pc); +} + +int +__glXDisp_SetClientInfo2ARB(__GLXclientState * cl, GLbyte * pc) +{ + return set_client_info(cl, (xGLXSetClientInfoARBReq *) pc, 12); +} + +int +__glXDispSwap_SetClientInfo2ARB(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc; + + req->length = bswap_16(req->length); + req->numVersions = bswap_32(req->numVersions); + req->numGLExtensionBytes = bswap_32(req->numGLExtensionBytes); + req->numGLXExtensionBytes = bswap_32(req->numGLXExtensionBytes); + + return __glXDisp_SetClientInfo2ARB(cl, pc); +} diff --git a/glx/createcontext.c b/glx/createcontext.c new file mode 100644 index 0000000..cbeddec --- /dev/null +++ b/glx/createcontext.c @@ -0,0 +1,352 @@ +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include "glxext.h" +#include "indirect_dispatch.h" + +#define ALL_VALID_FLAGS \ + (GLX_CONTEXT_DEBUG_BIT_ARB | GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB \ + | GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB) + +static Bool +validate_GL_version(int major_version, int minor_version) +{ + if (major_version <= 0 || minor_version < 0) + return False; + + switch (major_version) { + case 1: + if (minor_version > 5) + return False; + break; + + case 2: + if (minor_version > 1) + return False; + break; + + case 3: + if (minor_version > 3) + return False; + break; + + default: + break; + } + + return True; +} + +static Bool +validate_render_type(uint32_t render_type) +{ + switch (render_type) { + case GLX_RGBA_TYPE: + case GLX_COLOR_INDEX_TYPE: + case GLX_RGBA_FLOAT_TYPE_ARB: + case GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT: + return True; + default: + return False; + } +} + +int +__glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateContextAttribsARBReq *req = (xGLXCreateContextAttribsARBReq *) pc; + int32_t *attribs = (req->numAttribs != 0) ? (int32_t *) (req + 1) : NULL; + unsigned i; + int major_version = 1; + int minor_version = 0; + uint32_t flags = 0; + uint32_t render_type = GLX_RGBA_TYPE; + __GLXcontext *ctx = NULL; + __GLXcontext *shareCtx = NULL; + __GLXscreen *glxScreen; + __GLXconfig *config; + int err; + + /* The GLX_ARB_create_context_robustness spec says: + * + * "The default value for GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB + * is GLX_NO_RESET_NOTIFICATION_ARB." + */ + int reset = GLX_NO_RESET_NOTIFICATION_ARB; + + /* The GLX_ARB_create_context_profile spec says: + * + * "The default value for GLX_CONTEXT_PROFILE_MASK_ARB is + * GLX_CONTEXT_CORE_PROFILE_BIT_ARB." + * + * The core profile only makes sense for OpenGL versions 3.2 and later. + * If the version ultimately specified is less than 3.2, the core profile + * bit is cleared (see below). + */ + int profile = GLX_CONTEXT_CORE_PROFILE_BIT_ARB; + + /* Verify that the size of the packet matches the size inferred from the + * sizes specified for the various fields. + */ + const unsigned expected_size = (sz_xGLXCreateContextAttribsARBReq + + (req->numAttribs * 8)) / 4; + + if (req->length != expected_size) + return BadLength; + + LEGAL_NEW_RESOURCE(req->context, client); + + /* The GLX_ARB_create_context spec says: + * + * "* If is not a valid GLXFBConfig, GLXBadFBConfig is + * generated." + * + * On the client, the screen comes from the FBConfig, so GLXBadFBConfig + * should be issued if the screen is nonsense. + */ + if (!validGlxScreen(client, req->screen, &glxScreen, &err)) + return __glXError(GLXBadFBConfig); + + if (!validGlxFBConfig(client, glxScreen, req->fbconfig, &config, &err)) + return __glXError(GLXBadFBConfig); + + /* Validate the context with which the new context should share resources. + */ + if (req->shareList != None) { + if (!validGlxContext(client, req->shareList, DixReadAccess, + &shareCtx, &err)) + return err; + + /* The crazy condition is because C doesn't have a logical XOR + * operator. Comparing directly for equality may fail if one is 1 and + * the other is 2 even though both are logically true. + */ + if (!!req->isDirect != !!shareCtx->isDirect) { + client->errorValue = req->shareList; + return BadMatch; + } + + /* The GLX_ARB_create_context spec says: + * + * "* If the server context state for ...was + * created on a different screen than the one referenced by + * ...BadMatch is generated." + */ + if (glxScreen != shareCtx->pGlxScreen) { + client->errorValue = shareCtx->pGlxScreen->pScreen->myNum; + return BadMatch; + } + } + + for (i = 0; i < req->numAttribs; i++) { + switch (attribs[i * 2]) { + case GLX_CONTEXT_MAJOR_VERSION_ARB: + major_version = attribs[2 * i + 1]; + break; + + case GLX_CONTEXT_MINOR_VERSION_ARB: + minor_version = attribs[2 * i + 1]; + break; + + case GLX_CONTEXT_FLAGS_ARB: + flags = attribs[2 * i + 1]; + break; + + case GLX_RENDER_TYPE: + render_type = attribs[2 * i + 1]; + break; + + case GLX_CONTEXT_PROFILE_MASK_ARB: + profile = attribs[2 * i + 1]; + break; + + case GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB: + reset = attribs[2 * i + 1]; + if (reset != GLX_NO_RESET_NOTIFICATION_ARB + && reset != GLX_LOSE_CONTEXT_ON_RESET_ARB) + return BadValue; + + break; + + default: + return BadValue; + } + } + + /* The GLX_ARB_create_context spec says: + * + * "If attributes GLX_CONTEXT_MAJOR_VERSION_ARB and + * GLX_CONTEXT_MINOR_VERSION_ARB, when considered together + * with attributes GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB and + * GLX_RENDER_TYPE, specify an OpenGL version and feature set + * that are not defined, BadMatch is generated. + * + * ...Feature deprecation was introduced with OpenGL 3.0, so + * forward-compatible contexts may only be requested for + * OpenGL 3.0 and above. Thus, examples of invalid + * combinations of attributes include: + * + * - Major version < 1 or > 3 + * - Major version == 1 and minor version < 0 or > 5 + * - Major version == 2 and minor version < 0 or > 1 + * - Major version == 3 and minor version > 2 + * - Forward-compatible flag set and major version < 3 + * - Color index rendering and major version >= 3" + */ + if (!validate_GL_version(major_version, minor_version)) + return BadMatch; + + if (major_version < 3 + && ((flags & GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB) != 0)) + return BadMatch; + + if (major_version >= 3 && render_type == GLX_COLOR_INDEX_TYPE) + return BadMatch; + + if (!validate_render_type(render_type)) + return BadValue; + + if ((flags & ~ALL_VALID_FLAGS) != 0) + return BadValue; + + /* The GLX_ARB_create_context_profile spec says: + * + * "* If attribute GLX_CONTEXT_PROFILE_MASK_ARB has no bits set; has + * any bits set other than GLX_CONTEXT_CORE_PROFILE_BIT_ARB and + * GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; has more than one of + * these bits set; or if the implementation does not support the + * requested profile, then GLXBadProfileARB is generated." + */ + switch (profile) { + case GLX_CONTEXT_CORE_PROFILE_BIT_ARB: + case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: + break; + case GLX_CONTEXT_ES2_PROFILE_BIT_EXT: + /* The GLX_EXT_create_context_es2_profile spec says: + * + * "... If the version requested is 2.0, and the + * GLX_CONTEXT_ES2_PROFILE_BIT_EXT bit is set in the + * GLX_CONTEXT_PROFILE_MASK_ARB attribute (see below), then the + * context returned will implement OpenGL ES 2.0." + * + * It also says: + * + * "* If attribute GLX_CONTEXT_PROFILE_MASK_ARB has no bits set; + * has any bits set other than + * GLX_CONTEXT_CORE_PROFILE_BIT_ARB, + * GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, or + * GLX_CONTEXT_ES2_PROFILE_BIT_EXT; has more than one of these + * bits set; or if the implementation does not supported the + * requested profile, then GLXBadProfileARB is generated." + * + * It does not specifically say what is supposed to happen if + * GLX_CONTEXT_ES2_PROFILE_BIT_EXT is set but the version requested is + * not 2.0. We choose to generate GLXBadProfileARB as this matches + * NVIDIA's behavior. + */ + if (major_version != 2 || minor_version != 0) + return __glXError(GLXBadProfileARB); + break; + default: + return __glXError(GLXBadProfileARB); + } + + /* The GLX_ARB_create_context_robustness spec says: + * + * "* If the reset notification behavior of and the + * newly created context are different, BadMatch is generated." + */ + if (shareCtx != NULL && shareCtx->resetNotificationStrategy != reset) + return BadMatch; + + /* There is no GLX protocol for desktop OpenGL versions after 1.4. There + * is no GLX protocol for any version of OpenGL ES. If the application is + * requested an indirect rendering context for a version that cannot be + * satisfied, reject it. + * + * The GLX_ARB_create_context spec says: + * + * "* If does not support compatible OpenGL contexts + * providing the requested API major and minor version, + * forward-compatible flag, and debug context flag, GLXBadFBConfig + * is generated." + */ + if (!req->isDirect && (major_version > 1 || minor_version > 4 + || profile == GLX_CONTEXT_ES2_PROFILE_BIT_EXT)) { + return __glXError(GLXBadFBConfig); + } + + /* Allocate memory for the new context + */ + if (req->isDirect) { + ctx = __glXdirectContextCreate(glxScreen, config, shareCtx); + err = BadAlloc; + } + else { + ctx = glxScreen->createContext(glxScreen, config, shareCtx, + req->numAttribs, (uint32_t *) attribs, + &err); + } + + if (ctx == NULL) + return err; + + ctx->pGlxScreen = glxScreen; + ctx->config = config; + ctx->id = req->context; + ctx->share_id = req->shareList; + ctx->idExists = True; + ctx->currentClient = False; + ctx->isDirect = req->isDirect; + ctx->hasUnflushedCommands = False; + ctx->renderMode = GL_RENDER; + ctx->feedbackBuf = NULL; + ctx->feedbackBufSize = 0; + ctx->selectBuf = NULL; + ctx->selectBufSize = 0; + ctx->drawPriv = NULL; + ctx->readPriv = NULL; + ctx->resetNotificationStrategy = reset; + + /* Add the new context to the various global tables of GLX contexts. + */ + if (!__glXAddContext(ctx)) { + (*ctx->destroy) (ctx); + client->errorValue = req->context; + return BadAlloc; + } + + return Success; +} + +int +__glXDispSwap_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc) +{ + return BadRequest; +} diff --git a/glx/extension_string.c b/glx/extension_string.c new file mode 100644 index 0000000..4bef96f --- /dev/null +++ b/glx/extension_string.c @@ -0,0 +1,173 @@ +/* + * (C) Copyright IBM Corporation 2002-2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file extension_string.c + * Routines to manage the GLX extension string and GLX version for AIGLX + * drivers. This code is loosely based on src/glx/x11/glxextensions.c from + * Mesa. + * + * \author Ian Romanick + */ + +#include +#include "extension_string.h" + +#define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8))) +#define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8))) +#define IS_SET(m,b) ((m[ (b) / 8 ] & (1U << ((b) % 8))) != 0) +#define CONCAT(a,b) a ## b +#define GLX(n) "GLX_" # n, 4 + sizeof( # n ) - 1, CONCAT(n,_bit) +#define VER(a,b) a, b +#define Y 1 +#define N 0 +#define EXT_ENABLED(bit,supported) (IS_SET(supported, bit)) + +struct extension_info { + const char *const name; + unsigned name_len; + + unsigned char bit; + + /** + * This is the lowest version of GLX that "requires" this extension. + * For example, GLX 1.3 requires SGIX_fbconfig, SGIX_pbuffer, and + * SGI_make_current_read. If the extension is not required by any known + * version of GLX, use 0, 0. + */ + unsigned char version_major; + unsigned char version_minor; + + /** + * Is driver support forced by the ABI? + */ + unsigned char driver_support; +}; + +/** + * List of known GLX Extensions. + * The last Y/N switch informs whether the support of this extension is always enabled. + */ +static const struct extension_info known_glx_extensions[] = { +/* GLX_ARB_get_proc_address is implemented on the client. */ + /* *INDENT-OFF* */ + { GLX(ARB_create_context), VER(0,0), N, }, + { GLX(ARB_create_context_profile), VER(0,0), N, }, + { GLX(ARB_create_context_robustness), VER(0,0), N, }, + { GLX(ARB_fbconfig_float), VER(0,0), N, }, + { GLX(ARB_framebuffer_sRGB), VER(0,0), N, }, + { GLX(ARB_multisample), VER(1,4), Y, }, + + { GLX(EXT_create_context_es2_profile), VER(0,0), N, }, + { GLX(EXT_framebuffer_sRGB), VER(0,0), N, }, + { GLX(EXT_import_context), VER(0,0), Y, }, + { GLX(EXT_texture_from_pixmap), VER(0,0), Y, }, + { GLX(EXT_visual_info), VER(0,0), Y, }, + { GLX(EXT_visual_rating), VER(0,0), Y, }, + + { GLX(MESA_copy_sub_buffer), VER(0,0), N, }, + { GLX(OML_swap_method), VER(0,0), Y, }, + { GLX(SGI_make_current_read), VER(1,3), N, }, + { GLX(SGI_swap_control), VER(0,0), N, }, + { GLX(SGIS_multisample), VER(0,0), Y, }, + { GLX(SGIX_fbconfig), VER(1,3), Y, }, + { GLX(SGIX_pbuffer), VER(1,3), Y, }, + { GLX(SGIX_visual_select_group), VER(0,0), Y, }, + { GLX(INTEL_swap_event), VER(0,0), N, }, + { NULL } + /* *INDENT-ON* */ +}; + +/** + * Create a GLX extension string for a set of enable bits. + * + * Creates a GLX extension string for the set of bit in \c enable_bits. This + * string is then stored in \c buffer if buffer is not \c NULL. This allows + * two-pass operation. On the first pass the caller passes \c NULL for + * \c buffer, and the function determines how much space is required to store + * the extension string. The caller allocates the buffer and calls the + * function again. + * + * \param enable_bits Bits representing the enabled extensions. + * \param buffer Buffer to store the extension string. May be \c NULL. + * + * \return + * The number of characters in \c buffer that were written to. If \c buffer + * is \c NULL, this is the size of buffer that must be allocated by the + * caller. + */ +int +__glXGetExtensionString(const unsigned char *enable_bits, char *buffer) +{ + unsigned i; + int length = 0; + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + const unsigned bit = known_glx_extensions[i].bit; + const size_t len = known_glx_extensions[i].name_len; + + if (EXT_ENABLED(bit, enable_bits)) { + if (buffer != NULL) { + (void) memcpy(&buffer[length], known_glx_extensions[i].name, + len); + + buffer[length + len + 0] = ' '; + buffer[length + len + 1] = '\0'; + } + + length += len + 1; + } + } + + return length + 1; +} + +void +__glXEnableExtension(unsigned char *enable_bits, const char *ext) +{ + const size_t ext_name_len = strlen(ext); + unsigned i; + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + if ((ext_name_len == known_glx_extensions[i].name_len) + && (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) { + SET_BIT(enable_bits, known_glx_extensions[i].bit); + break; + } + } +} + +void +__glXInitExtensionEnableBits(unsigned char *enable_bits) +{ + unsigned i; + + (void) memset(enable_bits, 0, __GLX_EXT_BYTES); + + for (i = 0; known_glx_extensions[i].name != NULL; i++) { + if (known_glx_extensions[i].driver_support) { + SET_BIT(enable_bits, known_glx_extensions[i].bit); + } + } +} diff --git a/glx/extension_string.h b/glx/extension_string.h new file mode 100644 index 0000000..e7d3932 --- /dev/null +++ b/glx/extension_string.h @@ -0,0 +1,74 @@ +/* + * (C) Copyright IBM Corporation 2002-2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file extension_string.h + * Routines to manage the GLX extension string and GLX version for AIGLX + * drivers. This code is loosely based on src/glx/x11/glxextensions.c from + * Mesa. + * + * \author Ian Romanick + */ + +#ifndef GLX_EXTENSION_STRING_H +#define GLX_EXTENSION_STRING_H + +enum { +/* GLX_ARB_get_proc_address is implemented on the client. */ + ARB_create_context_bit = 0, + ARB_create_context_profile_bit, + ARB_create_context_robustness_bit, + ARB_fbconfig_float_bit, + ARB_framebuffer_sRGB_bit, + ARB_multisample_bit, + EXT_create_context_es2_profile_bit, + EXT_import_context_bit, + EXT_texture_from_pixmap_bit, + EXT_visual_info_bit, + EXT_visual_rating_bit, + MESA_copy_sub_buffer_bit, + OML_swap_method_bit, + SGI_make_current_read_bit, + SGI_swap_control_bit, + SGI_video_sync_bit, + SGIS_multisample_bit, + SGIX_fbconfig_bit, + SGIX_pbuffer_bit, + SGIX_visual_select_group_bit, + INTEL_swap_event_bit, + __NUM_GLX_EXTS, +}; + +/* For extensions which have identical ARB and EXT implementation + * in GLX area, use one enabling bit for both. */ +#define EXT_framebuffer_sRGB_bit ARB_framebuffer_sRGB_bit + +#define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8) + +extern int __glXGetExtensionString(const unsigned char *enable_bits, + char *buffer); +extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext); +extern void __glXInitExtensionEnableBits(unsigned char *enable_bits); + +#endif /* GLX_EXTENSION_STRING_H */ diff --git a/glx/glxbyteorder.h b/glx/glxbyteorder.h new file mode 100644 index 0000000..73f0f7d --- /dev/null +++ b/glx/glxbyteorder.h @@ -0,0 +1,61 @@ +/* + * (C) Copyright IBM Corporation 2006, 2007 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, THE AUTHORS, AND/OR THEIR SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file glxbyteorder.h + * Platform glue for handling byte-ordering issues in GLX protocol. + * + * \author Ian Romanick + */ +#if !defined(__GLXBYTEORDER_H__) +#define __GLXBYTEORDER_H__ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#if HAVE_BYTESWAP_H +#include +#elif defined(USE_SYS_ENDIAN_H) +#include +#elif defined(__APPLE__) +#include +#define bswap_16 OSSwapInt16 +#define bswap_32 OSSwapInt32 +#define bswap_64 OSSwapInt64 +#else +#define bswap_16(value) \ + ((((value) & 0xff) << 8) | ((value) >> 8)) + +#define bswap_32(value) \ + (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \ + (uint32_t)bswap_16((uint16_t)((value) >> 16))) + +#define bswap_64(value) \ + (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \ + << 32) | \ + (uint64_t)bswap_32((uint32_t)((value) >> 32))) +#endif + +#endif /* !defined(__GLXBYTEORDER_H__) */ diff --git a/glx/glxcmds.c b/glx/glxcmds.c new file mode 100644 index 0000000..b8da048 --- /dev/null +++ b/glx/glxcmds.c @@ -0,0 +1,2531 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include + +#include "glxserver.h" +#include +#include +#include +#include +#include "glxutil.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "indirect_table.h" +#include "indirect_util.h" + +static char GLXServerVendorName[] = "SGI"; + +_X_HIDDEN int +validGlxScreen(ClientPtr client, int screen, __GLXscreen ** pGlxScreen, + int *err) +{ + /* + ** Check if screen exists. + */ + if (screen < 0 || screen >= screenInfo.numScreens) { + client->errorValue = screen; + *err = BadValue; + return FALSE; + } + *pGlxScreen = glxGetScreen(screenInfo.screens[screen]); + + return TRUE; +} + +_X_HIDDEN int +validGlxFBConfig(ClientPtr client, __GLXscreen * pGlxScreen, XID id, + __GLXconfig ** config, int *err) +{ + __GLXconfig *m; + + for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) + if (m->fbconfigID == id) { + *config = m; + return TRUE; + } + + client->errorValue = id; + *err = __glXError(GLXBadFBConfig); + + return FALSE; +} + +static int +validGlxVisual(ClientPtr client, __GLXscreen * pGlxScreen, XID id, + __GLXconfig ** config, int *err) +{ + int i; + + for (i = 0; i < pGlxScreen->numVisuals; i++) + if (pGlxScreen->visuals[i]->visualID == id) { + *config = pGlxScreen->visuals[i]; + return TRUE; + } + + client->errorValue = id; + *err = BadValue; + + return FALSE; +} + +static int +validGlxFBConfigForWindow(ClientPtr client, __GLXconfig * config, + DrawablePtr pDraw, int *err) +{ + ScreenPtr pScreen = pDraw->pScreen; + VisualPtr pVisual = NULL; + XID vid; + int i; + + vid = wVisual((WindowPtr) pDraw); + for (i = 0; i < pScreen->numVisuals; i++) { + if (pScreen->visuals[i].vid == vid) { + pVisual = &pScreen->visuals[i]; + break; + } + } + + /* FIXME: What exactly should we check here... */ + if (pVisual->class != glxConvertToXVisualType(config->visualType) || + !(config->drawableType & GLX_WINDOW_BIT)) { + client->errorValue = pDraw->id; + *err = BadMatch; + return FALSE; + } + + return TRUE; +} + +_X_HIDDEN int +validGlxContext(ClientPtr client, XID id, int access_mode, + __GLXcontext ** context, int *err) +{ + *err = dixLookupResourceByType((pointer *) context, id, + __glXContextRes, client, access_mode); + if (*err != Success || (*context)->idExists == GL_FALSE) { + client->errorValue = id; + if (*err == BadValue || *err == Success) + *err = __glXError(GLXBadContext); + return FALSE; + } + + return TRUE; +} + +static int +validGlxDrawable(ClientPtr client, XID id, int type, int access_mode, + __GLXdrawable ** drawable, int *err) +{ + int rc; + + rc = dixLookupResourceByType((pointer *) drawable, id, + __glXDrawableRes, client, access_mode); + if (rc != Success && rc != BadValue) { + *err = rc; + client->errorValue = id; + return FALSE; + } + + /* If the ID of the glx drawable we looked up doesn't match the id + * we looked for, it's because we looked it up under the X + * drawable ID (see DoCreateGLXDrawable). */ + if (rc == BadValue || + (*drawable)->drawId != id || + (type != GLX_DRAWABLE_ANY && type != (*drawable)->type)) { + client->errorValue = id; + switch (type) { + case GLX_DRAWABLE_WINDOW: + *err = __glXError(GLXBadWindow); + return FALSE; + case GLX_DRAWABLE_PIXMAP: + *err = __glXError(GLXBadPixmap); + return FALSE; + case GLX_DRAWABLE_PBUFFER: + *err = __glXError(GLXBadPbuffer); + return FALSE; + case GLX_DRAWABLE_ANY: + *err = __glXError(GLXBadDrawable); + return FALSE; + } + } + + return TRUE; +} + +void +__glXContextDestroy(__GLXcontext * context) +{ + __glXFlushContextCache(); +} + +static void +__glXdirectContextDestroy(__GLXcontext * context) +{ + __glXContextDestroy(context); + free(context); +} + +_X_HIDDEN __GLXcontext * +__glXdirectContextCreate(__GLXscreen * screen, + __GLXconfig * modes, __GLXcontext * shareContext) +{ + __GLXcontext *context; + + context = calloc(1, sizeof(__GLXcontext)); + if (context == NULL) + return NULL; + + context->destroy = __glXdirectContextDestroy; + + return context; +} + +/** + * Create a GL context with the given properties. This routine is used + * to implement \c glXCreateContext, \c glXCreateNewContext, and + * \c glXCreateContextWithConfigSGIX. This works becuase of the hack way + * that GLXFBConfigs are implemented. Basically, the FBConfigID is the + * same as the VisualID. + */ + +static int +DoCreateContext(__GLXclientState * cl, GLXContextID gcId, + GLXContextID shareList, __GLXconfig * config, + __GLXscreen * pGlxScreen, GLboolean isDirect) +{ + ClientPtr client = cl->client; + __GLXcontext *glxc, *shareglxc; + int err; + + LEGAL_NEW_RESOURCE(gcId, client); + + /* + ** Find the display list space that we want to share. + ** + ** NOTE: In a multithreaded X server, we would need to keep a reference + ** count for each display list so that if one client detroyed a list that + ** another client was using, the list would not really be freed until it + ** was no longer in use. Since this sample implementation has no support + ** for multithreaded servers, we don't do this. + */ + if (shareList == None) { + shareglxc = 0; + } + else { + if (!validGlxContext(client, shareList, DixReadAccess, + &shareglxc, &err)) + return err; + + /* Page 26 (page 32 of the PDF) of the GLX 1.4 spec says: + * + * "The server context state for all sharing contexts must exist + * in a single address space or a BadMatch error is generated." + * + * If the share context is indirect, force the new context to also be + * indirect. If the shard context is direct but the new context + * cannot be direct, generate BadMatch. + */ + if (shareglxc->isDirect && !isDirect) { + client->errorValue = shareList; + return BadMatch; + } + else if (!shareglxc->isDirect) { + /* + ** Create an indirect context regardless of what the client asked + ** for; this way we can share display list space with shareList. + */ + isDirect = GL_FALSE; + } + } + + /* + ** Allocate memory for the new context + */ + if (!isDirect) { + /* Without any attributes, the only error that the driver should be + * able to generate is BadAlloc. As result, just drop the error + * returned from the driver on the floor. + */ + glxc = pGlxScreen->createContext(pGlxScreen, config, shareglxc, + 0, NULL, &err); + } + else + glxc = __glXdirectContextCreate(pGlxScreen, config, shareglxc); + if (!glxc) { + return BadAlloc; + } + + /* Initialize the GLXcontext structure. + */ + glxc->pGlxScreen = pGlxScreen; + glxc->config = config; + glxc->id = gcId; + glxc->share_id = shareList; + glxc->idExists = GL_TRUE; + glxc->currentClient = NULL; + glxc->isDirect = isDirect; + glxc->hasUnflushedCommands = GL_FALSE; + glxc->renderMode = GL_RENDER; + glxc->feedbackBuf = NULL; + glxc->feedbackBufSize = 0; + glxc->selectBuf = NULL; + glxc->selectBufSize = 0; + glxc->drawPriv = NULL; + glxc->readPriv = NULL; + + /* The GLX_ARB_create_context_robustness spec says: + * + * "The default value for GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB + * is GLX_NO_RESET_NOTIFICATION_ARB." + * + * Without using glXCreateContextAttribsARB, there is no way to specify a + * non-default reset notification strategy. + */ + glxc->resetNotificationStrategy = GLX_NO_RESET_NOTIFICATION_ARB; + + /* Add the new context to the various global tables of GLX contexts. + */ + if (!__glXAddContext(glxc)) { + (*glxc->destroy) (glxc); + client->errorValue = gcId; + return BadAlloc; + } + + return Success; +} + +int +__glXDisp_CreateContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; + __GLXconfig *config; + __GLXscreen *pGlxScreen; + int err; + + REQUEST_SIZE_MATCH(xGLXCreateContextReq); + + if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) + return err; + if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err)) + return err; + + return DoCreateContext(cl, req->context, req->shareList, + config, pGlxScreen, req->isDirect); +} + +int +__glXDisp_CreateNewContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; + __GLXconfig *config; + __GLXscreen *pGlxScreen; + int err; + + REQUEST_SIZE_MATCH(xGLXCreateNewContextReq); + + if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) + return err; + if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) + return err; + + return DoCreateContext(cl, req->context, req->shareList, + config, pGlxScreen, req->isDirect); +} + +int +__glXDisp_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateContextWithConfigSGIXReq *req = + (xGLXCreateContextWithConfigSGIXReq *) pc; + __GLXconfig *config; + __GLXscreen *pGlxScreen; + int err; + + REQUEST_SIZE_MATCH(xGLXCreateContextWithConfigSGIXReq); + + if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) + return err; + if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) + return err; + + return DoCreateContext(cl, req->context, req->shareList, + config, pGlxScreen, req->isDirect); +} + +int +__glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; + __GLXcontext *glxc; + int err; + + REQUEST_SIZE_MATCH(xGLXDestroyContextReq); + + if (!validGlxContext(cl->client, req->context, DixDestroyAccess, + &glxc, &err)) + return err; + + FreeResourceByType(req->context, __glXContextRes, FALSE); + + return Success; +} + +/* + * This will return "deleted" contexts, ie, where idExists is GL_FALSE. + * Contrast validGlxContext, which will not. We're cheating here and + * using the XID as the context tag, which is fine as long as we defer + * actually destroying the context until it's no longer referenced, and + * block clients from trying to MakeCurrent on contexts that are on the + * way to destruction. Notice that DoMakeCurrent calls validGlxContext + * for new contexts but __glXLookupContextByTag for previous contexts. + */ +__GLXcontext * +__glXLookupContextByTag(__GLXclientState * cl, GLXContextTag tag) +{ + __GLXcontext *ret; + + if (dixLookupResourceByType((void **) &ret, tag, __glXContextRes, + cl->client, DixUseAccess) == Success) + return ret; + + return NULL; +} + +/*****************************************************************************/ + +static void +StopUsingContext(__GLXcontext * glxc) +{ + if (glxc) { + if (glxc == __glXLastContext) { + /* Tell server GL library */ + __glXLastContext = 0; + } + glxc->currentClient = NULL; + if (!glxc->idExists) { + FreeResourceByType(glxc->id, __glXContextRes, FALSE); + } + } +} + +static void +StartUsingContext(__GLXclientState * cl, __GLXcontext * glxc) +{ + __glXLastContext = glxc; + glxc->currentClient = cl->client; +} + +/** + * This is a helper function to handle the legacy (pre GLX 1.3) cases + * where passing an X window to glXMakeCurrent is valid. Given a + * resource ID, look up the GLX drawable if available, otherwise, make + * sure it's an X window and create a GLX drawable one the fly. + */ +static __GLXdrawable * +__glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, ClientPtr client, + int *error) +{ + DrawablePtr pDraw; + __GLXdrawable *pGlxDraw; + int rc; + + if (validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY, + DixWriteAccess, &pGlxDraw, &rc)) { + if (glxc != NULL && pGlxDraw->config != glxc->config) { + client->errorValue = drawId; + *error = BadMatch; + return NULL; + } + + return pGlxDraw; + } + + /* No active context and an unknown drawable, bail. */ + if (glxc == NULL) { + client->errorValue = drawId; + *error = BadMatch; + return NULL; + } + + /* The drawId wasn't a GLX drawable. Make sure it's a window and + * create a GLXWindow for it. Check that the drawable screen + * matches the context screen and that the context fbconfig is + * compatible with the window visual. */ + + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess); + if (rc != Success || pDraw->type != DRAWABLE_WINDOW) { + client->errorValue = drawId; + *error = __glXError(GLXBadDrawable); + return NULL; + } + + if (pDraw->pScreen != glxc->pGlxScreen->pScreen) { + client->errorValue = pDraw->pScreen->myNum; + *error = BadMatch; + return NULL; + } + + if (!validGlxFBConfigForWindow(client, glxc->config, pDraw, error)) + return NULL; + + pGlxDraw = glxc->pGlxScreen->createDrawable(client, glxc->pGlxScreen, + pDraw, drawId, + GLX_DRAWABLE_WINDOW, + drawId, glxc->config); + if (!pGlxDraw) { + *error = BadAlloc; + return NULL; + } + + /* since we are creating the drawablePrivate, drawId should be new */ + if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) { + pGlxDraw->destroy(pGlxDraw); + *error = BadAlloc; + return NULL; + } + + return pGlxDraw; +} + +/*****************************************************************************/ +/* +** Make an OpenGL context and drawable current. +*/ + +static int +DoMakeCurrent(__GLXclientState * cl, + GLXDrawable drawId, GLXDrawable readId, + GLXContextID contextId, GLXContextTag tag) +{ + ClientPtr client = cl->client; + xGLXMakeCurrentReply reply; + __GLXcontext *glxc, *prevglxc; + __GLXdrawable *drawPriv = NULL; + __GLXdrawable *readPriv = NULL; + int error; + GLuint mask; + + /* + ** If one is None and the other isn't, it's a bad match. + */ + + mask = (drawId == None) ? (1 << 0) : 0; + mask |= (readId == None) ? (1 << 1) : 0; + mask |= (contextId == None) ? (1 << 2) : 0; + + if ((mask != 0x00) && (mask != 0x07)) { + return BadMatch; + } + + /* + ** Lookup old context. If we have one, it must be in a usable state. + */ + if (tag != 0) { + prevglxc = __glXLookupContextByTag(cl, tag); + if (!prevglxc) { + /* + ** Tag for previous context is invalid. + */ + return __glXError(GLXBadContextTag); + } + if (prevglxc->renderMode != GL_RENDER) { + /* Oops. Not in render mode render. */ + client->errorValue = prevglxc->id; + return __glXError(GLXBadContextState); + } + } + else { + prevglxc = 0; + } + + /* + ** Lookup new context. It must not be current for someone else. + */ + if (contextId != None) { + int status; + + if (!validGlxContext(client, contextId, DixUseAccess, &glxc, &error)) + return error; + if ((glxc != prevglxc) && glxc->currentClient) { + /* Context is current to somebody else */ + return BadAccess; + } + + assert(drawId != None); + assert(readId != None); + + drawPriv = __glXGetDrawable(glxc, drawId, client, &status); + if (drawPriv == NULL) + return status; + + readPriv = __glXGetDrawable(glxc, readId, client, &status); + if (readPriv == NULL) + return status; + + } + else { + /* Switching to no context. Ignore new drawable. */ + glxc = 0; + drawPriv = 0; + readPriv = 0; + } + + if (prevglxc) { + /* + ** Flush the previous context if needed. + */ + if (prevglxc->hasUnflushedCommands) { + if (__glXForceCurrent(cl, tag, (int *) &error)) { + glFlush(); + prevglxc->hasUnflushedCommands = GL_FALSE; + } + else { + return error; + } + } + + /* + ** Make the previous context not current. + */ + if (!(*prevglxc->loseCurrent) (prevglxc)) { + return __glXError(GLXBadContext); + } + __glXFlushContextCache(); + if (!prevglxc->isDirect) { + prevglxc->drawPriv = NULL; + prevglxc->readPriv = NULL; + } + } + + if ((glxc != 0) && !glxc->isDirect) { + + glxc->drawPriv = drawPriv; + glxc->readPriv = readPriv; + + /* make the context current */ + if (!(*glxc->makeCurrent) (glxc)) { + glxc->drawPriv = NULL; + glxc->readPriv = NULL; + return __glXError(GLXBadContext); + } + + glxc->currentClient = client; + } + + StopUsingContext(prevglxc); + + reply = (xGLXMakeCurrentReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .contextTag = 0 + }; + + if (glxc) { + StartUsingContext(cl, glxc); + reply.contextTag = glxc->id; + } + + if (client->swapped) { + __glXSwapMakeCurrentReply(client, &reply); + } + else { + WriteToClient(client, sz_xGLXMakeCurrentReply, &reply); + } + return Success; +} + +int +__glXDisp_MakeCurrent(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; + + REQUEST_SIZE_MATCH(xGLXMakeCurrentReq); + + return DoMakeCurrent(cl, req->drawable, req->drawable, + req->context, req->oldContextTag); +} + +int +__glXDisp_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc; + + REQUEST_SIZE_MATCH(xGLXMakeContextCurrentReq); + + return DoMakeCurrent(cl, req->drawable, req->readdrawable, + req->context, req->oldContextTag); +} + +int +__glXDisp_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc; + + REQUEST_SIZE_MATCH(xGLXMakeCurrentReadSGIReq); + + return DoMakeCurrent(cl, req->drawable, req->readable, + req->context, req->oldContextTag); +} + +int +__glXDisp_IsDirect(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; + xGLXIsDirectReply reply; + __GLXcontext *glxc; + int err; + + REQUEST_SIZE_MATCH(xGLXIsDirectReq); + + if (!validGlxContext(cl->client, req->context, DixReadAccess, &glxc, &err)) + return err; + + reply = (xGLXIsDirectReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .isDirect = glxc->isDirect + }; + + if (client->swapped) { + __glXSwapIsDirectReply(client, &reply); + } + else { + WriteToClient(client, sz_xGLXIsDirectReply, &reply); + } + + return Success; +} + +int +__glXDisp_QueryVersion(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; + xGLXQueryVersionReply reply; + GLuint major, minor; + + REQUEST_SIZE_MATCH(xGLXQueryVersionReq); + + major = req->majorVersion; + minor = req->minorVersion; + (void) major; + (void) minor; + + /* + ** Server should take into consideration the version numbers sent by the + ** client if it wants to work with older clients; however, in this + ** implementation the server just returns its version number. + */ + reply = (xGLXQueryVersionReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = glxMajorVersion, + .minorVersion = glxMinorVersion + }; + + if (client->swapped) { + __glXSwapQueryVersionReply(client, &reply); + } + else { + WriteToClient(client, sz_xGLXQueryVersionReply, &reply); + } + return Success; +} + +int +__glXDisp_WaitGL(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc; + GLXContextTag tag; + __GLXcontext *glxc = NULL; + int error; + + REQUEST_SIZE_MATCH(xGLXWaitGLReq); + + tag = req->contextTag; + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) + return __glXError(GLXBadContextTag); + + if (!__glXForceCurrent(cl, req->contextTag, &error)) + return error; + + glFinish(); + } + + if (glxc && glxc->drawPriv->waitGL) + (*glxc->drawPriv->waitGL) (glxc->drawPriv); + + return Success; +} + +int +__glXDisp_WaitX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXWaitXReq *req = (xGLXWaitXReq *) pc; + GLXContextTag tag; + __GLXcontext *glxc = NULL; + int error; + + REQUEST_SIZE_MATCH(xGLXWaitXReq); + + tag = req->contextTag; + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) + return __glXError(GLXBadContextTag); + + if (!__glXForceCurrent(cl, req->contextTag, &error)) + return error; + } + + if (glxc && glxc->drawPriv->waitX) + (*glxc->drawPriv->waitX) (glxc->drawPriv); + + return Success; +} + +int +__glXDisp_CopyContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; + GLXContextID source; + GLXContextID dest; + GLXContextTag tag; + unsigned long mask; + __GLXcontext *src, *dst; + int error; + + REQUEST_SIZE_MATCH(xGLXCopyContextReq); + + source = req->source; + dest = req->dest; + tag = req->contextTag; + mask = req->mask; + if (!validGlxContext(cl->client, source, DixReadAccess, &src, &error)) + return error; + if (!validGlxContext(cl->client, dest, DixWriteAccess, &dst, &error)) + return error; + + /* + ** They must be in the same address space, and same screen. + ** NOTE: no support for direct rendering contexts here. + */ + if (src->isDirect || dst->isDirect || (src->pGlxScreen != dst->pGlxScreen)) { + client->errorValue = source; + return BadMatch; + } + + /* + ** The destination context must not be current for any client. + */ + if (dst->currentClient) { + client->errorValue = dest; + return BadAccess; + } + + if (tag) { + __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag); + + if (!tagcx) { + return __glXError(GLXBadContextTag); + } + if (tagcx != src) { + /* + ** This would be caused by a faulty implementation of the client + ** library. + */ + return BadMatch; + } + /* + ** In this case, glXCopyContext is in both GL and X streams, in terms + ** of sequentiality. + */ + if (__glXForceCurrent(cl, tag, &error)) { + /* + ** Do whatever is needed to make sure that all preceding requests + ** in both streams are completed before the copy is executed. + */ + glFinish(); + tagcx->hasUnflushedCommands = GL_FALSE; + } + else { + return error; + } + } + /* + ** Issue copy. The only reason for failure is a bad mask. + */ + if (!(*dst->copy) (dst, src, mask)) { + client->errorValue = mask; + return BadValue; + } + return Success; +} + +enum { + GLX_VIS_CONFIG_UNPAIRED = 18, + GLX_VIS_CONFIG_PAIRED = 22 +}; + +enum { + GLX_VIS_CONFIG_TOTAL = GLX_VIS_CONFIG_UNPAIRED + GLX_VIS_CONFIG_PAIRED +}; + +int +__glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc) +{ + xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; + ClientPtr client = cl->client; + xGLXGetVisualConfigsReply reply; + __GLXscreen *pGlxScreen; + __GLXconfig *modes; + CARD32 buf[GLX_VIS_CONFIG_TOTAL]; + int p, i, err; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXGetVisualConfigsReq); + + if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) + return err; + + reply = (xGLXGetVisualConfigsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = (pGlxScreen->numVisuals * + __GLX_SIZE_CARD32 * GLX_VIS_CONFIG_TOTAL) >> 2, + .numVisuals = pGlxScreen->numVisuals, + .numProps = GLX_VIS_CONFIG_TOTAL + }; + + if (client->swapped) { + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.numVisuals); + __GLX_SWAP_INT(&reply.numProps); + } + + WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply); + + for (i = 0; i < pGlxScreen->numVisuals; i++) { + modes = pGlxScreen->visuals[i]; + + p = 0; + buf[p++] = modes->visualID; + buf[p++] = glxConvertToXVisualType(modes->visualType); + buf[p++] = (modes->renderType & GLX_RGBA_BIT) ? GL_TRUE : GL_FALSE; + + buf[p++] = modes->redBits; + buf[p++] = modes->greenBits; + buf[p++] = modes->blueBits; + buf[p++] = modes->alphaBits; + buf[p++] = modes->accumRedBits; + buf[p++] = modes->accumGreenBits; + buf[p++] = modes->accumBlueBits; + buf[p++] = modes->accumAlphaBits; + + buf[p++] = modes->doubleBufferMode; + buf[p++] = modes->stereoMode; + + buf[p++] = modes->rgbBits; + buf[p++] = modes->depthBits; + buf[p++] = modes->stencilBits; + buf[p++] = modes->numAuxBuffers; + buf[p++] = modes->level; + + assert(p == GLX_VIS_CONFIG_UNPAIRED); + /* + ** Add token/value pairs for extensions. + */ + buf[p++] = GLX_VISUAL_CAVEAT_EXT; + buf[p++] = modes->visualRating; + buf[p++] = GLX_TRANSPARENT_TYPE; + buf[p++] = modes->transparentPixel; + buf[p++] = GLX_TRANSPARENT_RED_VALUE; + buf[p++] = modes->transparentRed; + buf[p++] = GLX_TRANSPARENT_GREEN_VALUE; + buf[p++] = modes->transparentGreen; + buf[p++] = GLX_TRANSPARENT_BLUE_VALUE; + buf[p++] = modes->transparentBlue; + buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE; + buf[p++] = modes->transparentAlpha; + buf[p++] = GLX_TRANSPARENT_INDEX_VALUE; + buf[p++] = modes->transparentIndex; + buf[p++] = GLX_SAMPLES_SGIS; + buf[p++] = modes->samples; + buf[p++] = GLX_SAMPLE_BUFFERS_SGIS; + buf[p++] = modes->sampleBuffers; + /* Add attribute only if its value is not default. */ + if (modes->sRGBCapable != GL_FALSE) { + buf[p++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT; + buf[p++] = modes->sRGBCapable; + } + /* Don't add visualSelectGroup (GLX_VISUAL_SELECT_GROUP_SGIX)? + * Pad the remaining place with zeroes, so that attributes count is constant. */ + while (p < GLX_VIS_CONFIG_TOTAL) { + buf[p++] = 0; + buf[p++] = 0; + } + + assert(p == GLX_VIS_CONFIG_TOTAL); + if (client->swapped) { + __GLX_SWAP_INT_ARRAY(buf, p); + } + WriteToClient(client, __GLX_SIZE_CARD32 * p, buf); + } + return Success; +} + +#define __GLX_TOTAL_FBCONFIG_ATTRIBS (44) +#define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2) +/** + * Send the set of GLXFBConfigs to the client. There is not currently + * and interface into the driver on the server-side to get GLXFBConfigs, + * so we "invent" some based on the \c __GLXvisualConfig structures that + * the driver does supply. + * + * The reply format for both \c glXGetFBConfigs and \c glXGetFBConfigsSGIX + * is the same, so this routine pulls double duty. + */ + +static int +DoGetFBConfigs(__GLXclientState * cl, unsigned screen) +{ + ClientPtr client = cl->client; + xGLXGetFBConfigsReply reply; + __GLXscreen *pGlxScreen; + CARD32 buf[__GLX_FBCONFIG_ATTRIBS_LENGTH]; + int p, err; + __GLXconfig *modes; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + if (!validGlxScreen(cl->client, screen, &pGlxScreen, &err)) + return err; + + reply = (xGLXGetFBConfigsReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = __GLX_FBCONFIG_ATTRIBS_LENGTH * pGlxScreen->numFBConfigs, + .numFBConfigs = pGlxScreen->numFBConfigs, + .numAttribs = __GLX_TOTAL_FBCONFIG_ATTRIBS + }; + + if (client->swapped) { + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.numFBConfigs); + __GLX_SWAP_INT(&reply.numAttribs); + } + + WriteToClient(client, sz_xGLXGetFBConfigsReply, &reply); + + for (modes = pGlxScreen->fbconfigs; modes != NULL; modes = modes->next) { + p = 0; + +#define WRITE_PAIR(tag,value) \ + do { buf[p++] = tag ; buf[p++] = value ; } while( 0 ) + + WRITE_PAIR(GLX_VISUAL_ID, modes->visualID); + WRITE_PAIR(GLX_FBCONFIG_ID, modes->fbconfigID); + WRITE_PAIR(GLX_X_RENDERABLE, GL_TRUE); + + WRITE_PAIR(GLX_RGBA, + (modes->renderType & GLX_RGBA_BIT) ? GL_TRUE : GL_FALSE); + WRITE_PAIR(GLX_RENDER_TYPE, modes->renderType); + WRITE_PAIR(GLX_DOUBLEBUFFER, modes->doubleBufferMode); + WRITE_PAIR(GLX_STEREO, modes->stereoMode); + + WRITE_PAIR(GLX_BUFFER_SIZE, modes->rgbBits); + WRITE_PAIR(GLX_LEVEL, modes->level); + WRITE_PAIR(GLX_AUX_BUFFERS, modes->numAuxBuffers); + WRITE_PAIR(GLX_RED_SIZE, modes->redBits); + WRITE_PAIR(GLX_GREEN_SIZE, modes->greenBits); + WRITE_PAIR(GLX_BLUE_SIZE, modes->blueBits); + WRITE_PAIR(GLX_ALPHA_SIZE, modes->alphaBits); + WRITE_PAIR(GLX_ACCUM_RED_SIZE, modes->accumRedBits); + WRITE_PAIR(GLX_ACCUM_GREEN_SIZE, modes->accumGreenBits); + WRITE_PAIR(GLX_ACCUM_BLUE_SIZE, modes->accumBlueBits); + WRITE_PAIR(GLX_ACCUM_ALPHA_SIZE, modes->accumAlphaBits); + WRITE_PAIR(GLX_DEPTH_SIZE, modes->depthBits); + WRITE_PAIR(GLX_STENCIL_SIZE, modes->stencilBits); + WRITE_PAIR(GLX_X_VISUAL_TYPE, modes->visualType); + WRITE_PAIR(GLX_CONFIG_CAVEAT, modes->visualRating); + WRITE_PAIR(GLX_TRANSPARENT_TYPE, modes->transparentPixel); + WRITE_PAIR(GLX_TRANSPARENT_RED_VALUE, modes->transparentRed); + WRITE_PAIR(GLX_TRANSPARENT_GREEN_VALUE, modes->transparentGreen); + WRITE_PAIR(GLX_TRANSPARENT_BLUE_VALUE, modes->transparentBlue); + WRITE_PAIR(GLX_TRANSPARENT_ALPHA_VALUE, modes->transparentAlpha); + WRITE_PAIR(GLX_TRANSPARENT_INDEX_VALUE, modes->transparentIndex); + WRITE_PAIR(GLX_SWAP_METHOD_OML, modes->swapMethod); + WRITE_PAIR(GLX_SAMPLES_SGIS, modes->samples); + WRITE_PAIR(GLX_SAMPLE_BUFFERS_SGIS, modes->sampleBuffers); + WRITE_PAIR(GLX_VISUAL_SELECT_GROUP_SGIX, modes->visualSelectGroup); + WRITE_PAIR(GLX_DRAWABLE_TYPE, modes->drawableType); + WRITE_PAIR(GLX_BIND_TO_TEXTURE_RGB_EXT, modes->bindToTextureRgb); + WRITE_PAIR(GLX_BIND_TO_TEXTURE_RGBA_EXT, modes->bindToTextureRgba); + WRITE_PAIR(GLX_BIND_TO_MIPMAP_TEXTURE_EXT, modes->bindToMipmapTexture); + WRITE_PAIR(GLX_BIND_TO_TEXTURE_TARGETS_EXT, + modes->bindToTextureTargets); + /* can't report honestly until mesa is fixed */ + WRITE_PAIR(GLX_Y_INVERTED_EXT, GLX_DONT_CARE); + if (modes->drawableType & GLX_PBUFFER_BIT) { + WRITE_PAIR(GLX_MAX_PBUFFER_WIDTH, modes->maxPbufferWidth); + WRITE_PAIR(GLX_MAX_PBUFFER_HEIGHT, modes->maxPbufferHeight); + WRITE_PAIR(GLX_MAX_PBUFFER_PIXELS, modes->maxPbufferPixels); + WRITE_PAIR(GLX_OPTIMAL_PBUFFER_WIDTH_SGIX, + modes->optimalPbufferWidth); + WRITE_PAIR(GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX, + modes->optimalPbufferHeight); + } + /* Add attribute only if its value is not default. */ + if (modes->sRGBCapable != GL_FALSE) { + WRITE_PAIR(GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, modes->sRGBCapable); + } + /* Pad the remaining place with zeroes, so that attributes count is constant. */ + while (p < __GLX_FBCONFIG_ATTRIBS_LENGTH) { + WRITE_PAIR(0, 0); + } + assert(p == __GLX_FBCONFIG_ATTRIBS_LENGTH); + + if (client->swapped) { + __GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH); + } + WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH, + (char *) buf); + } + return Success; +} + +int +__glXDisp_GetFBConfigs(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; + + REQUEST_SIZE_MATCH(xGLXGetFBConfigsReq); + return DoGetFBConfigs(cl, req->screen); +} + +int +__glXDisp_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; + + /* work around mesa bug, don't use REQUEST_SIZE_MATCH */ + REQUEST_AT_LEAST_SIZE(xGLXGetFBConfigsSGIXReq); + return DoGetFBConfigs(cl, req->screen); +} + +GLboolean +__glXDrawableInit(__GLXdrawable * drawable, + __GLXscreen * screen, DrawablePtr pDraw, int type, + XID drawId, __GLXconfig * config) +{ + drawable->pDraw = pDraw; + drawable->type = type; + drawable->drawId = drawId; + drawable->config = config; + drawable->eventMask = 0; + + return GL_TRUE; +} + +void +__glXDrawableRelease(__GLXdrawable * drawable) +{ +} + +static int +DoCreateGLXDrawable(ClientPtr client, __GLXscreen * pGlxScreen, + __GLXconfig * config, DrawablePtr pDraw, XID drawableId, + XID glxDrawableId, int type) +{ + __GLXdrawable *pGlxDraw; + + if (pGlxScreen->pScreen != pDraw->pScreen) + return BadMatch; + + pGlxDraw = pGlxScreen->createDrawable(client, pGlxScreen, pDraw, + drawableId, type, + glxDrawableId, config); + if (pGlxDraw == NULL) + return BadAlloc; + + if (!AddResource(glxDrawableId, __glXDrawableRes, pGlxDraw)) { + pGlxDraw->destroy(pGlxDraw); + return BadAlloc; + } + + /* + * Windows aren't refcounted, so track both the X and the GLX window + * so we get called regardless of destruction order. + */ + if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW && + !AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) { + pGlxDraw->destroy(pGlxDraw); + return BadAlloc; + } + + return Success; +} + +static int +DoCreateGLXPixmap(ClientPtr client, __GLXscreen * pGlxScreen, + __GLXconfig * config, XID drawableId, XID glxDrawableId) +{ + DrawablePtr pDraw; + int err; + + LEGAL_NEW_RESOURCE(glxDrawableId, client); + + err = dixLookupDrawable(&pDraw, drawableId, client, 0, DixAddAccess); + if (err != Success) { + client->errorValue = drawableId; + return err; + } + if (pDraw->type != DRAWABLE_PIXMAP) { + client->errorValue = drawableId; + return BadPixmap; + } + + err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId, + glxDrawableId, GLX_DRAWABLE_PIXMAP); + + if (err == Success) + ((PixmapPtr) pDraw)->refcnt++; + + return err; +} + +static void +determineTextureTarget(ClientPtr client, XID glxDrawableID, + CARD32 *attribs, CARD32 numAttribs) +{ + GLenum target = 0; + GLenum format = 0; + int i, err; + __GLXdrawable *pGlxDraw; + + if (!validGlxDrawable(client, glxDrawableID, GLX_DRAWABLE_PIXMAP, + DixWriteAccess, &pGlxDraw, &err)) + /* We just added it in CreatePixmap, so we should never get here. */ + return; + + for (i = 0; i < numAttribs; i++) { + if (attribs[2 * i] == GLX_TEXTURE_TARGET_EXT) { + switch (attribs[2 * i + 1]) { + case GLX_TEXTURE_2D_EXT: + target = GL_TEXTURE_2D; + break; + case GLX_TEXTURE_RECTANGLE_EXT: + target = GL_TEXTURE_RECTANGLE_ARB; + break; + } + } + + if (attribs[2 * i] == GLX_TEXTURE_FORMAT_EXT) + format = attribs[2 * i + 1]; + } + + if (!target) { + int w = pGlxDraw->pDraw->width, h = pGlxDraw->pDraw->height; + + if (h & (h - 1) || w & (w - 1)) + target = GL_TEXTURE_RECTANGLE_ARB; + else + target = GL_TEXTURE_2D; + } + + pGlxDraw->target = target; + pGlxDraw->format = format; +} + +int +__glXDisp_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; + __GLXconfig *config; + __GLXscreen *pGlxScreen; + int err; + + REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapReq); + + if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) + return err; + if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err)) + return err; + + return DoCreateGLXPixmap(cl->client, pGlxScreen, config, + req->pixmap, req->glxpixmap); +} + +int +__glXDisp_CreatePixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; + __GLXconfig *config; + __GLXscreen *pGlxScreen; + int err; + + REQUEST_AT_LEAST_SIZE(xGLXCreatePixmapReq); + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXCreatePixmapReq, req->numAttribs << 3); + + if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) + return err; + if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) + return err; + + err = DoCreateGLXPixmap(cl->client, pGlxScreen, config, + req->pixmap, req->glxpixmap); + if (err != Success) + return err; + + determineTextureTarget(cl->client, req->glxpixmap, + (CARD32 *) (req + 1), req->numAttribs); + + return Success; +} + +int +__glXDisp_CreateGLXPixmapWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateGLXPixmapWithConfigSGIXReq *req = + (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; + __GLXconfig *config; + __GLXscreen *pGlxScreen; + int err; + + REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapWithConfigSGIXReq); + + if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) + return err; + if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) + return err; + + return DoCreateGLXPixmap(cl->client, pGlxScreen, + config, req->pixmap, req->glxpixmap); +} + +static int +DoDestroyDrawable(__GLXclientState * cl, XID glxdrawable, int type) +{ + __GLXdrawable *pGlxDraw; + int err; + + if (!validGlxDrawable(cl->client, glxdrawable, type, + DixDestroyAccess, &pGlxDraw, &err)) + return err; + + FreeResource(glxdrawable, FALSE); + + return Success; +} + +int +__glXDisp_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; + + REQUEST_SIZE_MATCH(xGLXDestroyGLXPixmapReq); + + return DoDestroyDrawable(cl, req->glxpixmap, GLX_DRAWABLE_PIXMAP); +} + +int +__glXDisp_DestroyPixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyPixmapReq *req = (xGLXDestroyPixmapReq *) pc; + + /* should be REQUEST_SIZE_MATCH, but mesa's glXDestroyPixmap used to set + * length to 3 instead of 2 */ + REQUEST_AT_LEAST_SIZE(xGLXDestroyPixmapReq); + + return DoDestroyDrawable(cl, req->glxpixmap, GLX_DRAWABLE_PIXMAP); +} + +static int +DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId, + int width, int height, XID glxDrawableId) +{ + __GLXconfig *config; + __GLXscreen *pGlxScreen; + PixmapPtr pPixmap; + int err; + + LEGAL_NEW_RESOURCE(glxDrawableId, client); + + if (!validGlxScreen(client, screenNum, &pGlxScreen, &err)) + return err; + if (!validGlxFBConfig(client, pGlxScreen, fbconfigId, &config, &err)) + return err; + + __glXenterServer(GL_FALSE); + pPixmap = (*pGlxScreen->pScreen->CreatePixmap) (pGlxScreen->pScreen, + width, height, + config->rgbBits, 0); + __glXleaveServer(GL_FALSE); + if (!pPixmap) + return BadAlloc; + + /* Assign the pixmap the same id as the pbuffer and add it as a + * resource so it and the DRI2 drawable will be reclaimed when the + * pbuffer is destroyed. */ + pPixmap->drawable.id = glxDrawableId; + if (!AddResource(pPixmap->drawable.id, RT_PIXMAP, pPixmap)) + return BadAlloc; + + return DoCreateGLXDrawable(client, pGlxScreen, config, &pPixmap->drawable, + glxDrawableId, glxDrawableId, + GLX_DRAWABLE_PBUFFER); +} + +int +__glXDisp_CreatePbuffer(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; + CARD32 *attrs; + int width, height, i; + + REQUEST_AT_LEAST_SIZE(xGLXCreatePbufferReq); + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXCreatePbufferReq, req->numAttribs << 3); + + attrs = (CARD32 *) (req + 1); + width = 0; + height = 0; + + for (i = 0; i < req->numAttribs; i++) { + switch (attrs[i * 2]) { + case GLX_PBUFFER_WIDTH: + width = attrs[i * 2 + 1]; + break; + case GLX_PBUFFER_HEIGHT: + height = attrs[i * 2 + 1]; + break; + case GLX_LARGEST_PBUFFER: + /* FIXME: huh... */ + break; + } + } + + return DoCreatePbuffer(cl->client, req->screen, req->fbconfig, + width, height, req->pbuffer); +} + +int +__glXDisp_CreateGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateGLXPbufferSGIXReq *req = (xGLXCreateGLXPbufferSGIXReq *) pc; + + REQUEST_AT_LEAST_SIZE(xGLXCreateGLXPbufferSGIXReq); + + /* + * We should really handle attributes correctly, but this extension + * is so rare I have difficulty caring. + */ + return DoCreatePbuffer(cl->client, req->screen, req->fbconfig, + req->width, req->height, req->pbuffer); +} + +int +__glXDisp_DestroyPbuffer(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc; + + REQUEST_SIZE_MATCH(xGLXDestroyPbufferReq); + + return DoDestroyDrawable(cl, req->pbuffer, GLX_DRAWABLE_PBUFFER); +} + +int +__glXDisp_DestroyGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc; + + REQUEST_SIZE_MATCH(xGLXDestroyGLXPbufferSGIXReq); + + return DoDestroyDrawable(cl, req->pbuffer, GLX_DRAWABLE_PBUFFER); +} + +static int +DoChangeDrawableAttributes(ClientPtr client, XID glxdrawable, + int numAttribs, CARD32 *attribs) +{ + __GLXdrawable *pGlxDraw; + int i, err; + + if (!validGlxDrawable(client, glxdrawable, GLX_DRAWABLE_ANY, + DixSetAttrAccess, &pGlxDraw, &err)) + return err; + + for (i = 0; i < numAttribs; i++) { + switch (attribs[i * 2]) { + case GLX_EVENT_MASK: + /* All we do is to record the event mask so we can send it + * back when queried. We never actually clobber the + * pbuffers, so we never need to send out the event. */ + pGlxDraw->eventMask = attribs[i * 2 + 1]; + break; + } + } + + return Success; +} + +int +__glXDisp_ChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXChangeDrawableAttributesReq *req = + (xGLXChangeDrawableAttributesReq *) pc; + + REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesReq); + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } +#if 0 + /* mesa sends an additional 8 bytes */ + REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesReq, req->numAttribs << 3); +#else + if (((sizeof(xGLXChangeDrawableAttributesReq) + + (req->numAttribs << 3)) >> 2) < client->req_len) + return BadLength; +#endif + + return DoChangeDrawableAttributes(cl->client, req->drawable, + req->numAttribs, (CARD32 *) (req + 1)); +} + +int +__glXDisp_ChangeDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXChangeDrawableAttributesSGIXReq *req = + (xGLXChangeDrawableAttributesSGIXReq *) pc; + + REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesSGIXReq); + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesSGIXReq, + req->numAttribs << 3); + + return DoChangeDrawableAttributes(cl->client, req->drawable, + req->numAttribs, (CARD32 *) (req + 1)); +} + +int +__glXDisp_CreateWindow(__GLXclientState * cl, GLbyte * pc) +{ + xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; + __GLXconfig *config; + __GLXscreen *pGlxScreen; + ClientPtr client = cl->client; + DrawablePtr pDraw; + int err; + + REQUEST_AT_LEAST_SIZE(xGLXCreateWindowReq); + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3); + + LEGAL_NEW_RESOURCE(req->glxwindow, client); + + if (!validGlxScreen(client, req->screen, &pGlxScreen, &err)) + return err; + if (!validGlxFBConfig(client, pGlxScreen, req->fbconfig, &config, &err)) + return err; + + err = dixLookupDrawable(&pDraw, req->window, client, 0, DixAddAccess); + if (err != Success || pDraw->type != DRAWABLE_WINDOW) { + client->errorValue = req->window; + return BadWindow; + } + + if (!validGlxFBConfigForWindow(client, config, pDraw, &err)) + return err; + + return DoCreateGLXDrawable(client, pGlxScreen, config, + pDraw, req->window, + req->glxwindow, GLX_DRAWABLE_WINDOW); +} + +int +__glXDisp_DestroyWindow(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; + + /* mesa's glXDestroyWindow used to set length to 3 instead of 2 */ + REQUEST_AT_LEAST_SIZE(xGLXDestroyWindowReq); + + return DoDestroyDrawable(cl, req->glxwindow, GLX_DRAWABLE_WINDOW); +} + +/*****************************************************************************/ + +/* +** NOTE: There is no portable implementation for swap buffers as of +** this time that is of value. Consequently, this code must be +** implemented by somebody other than SGI. +*/ +int +__glXDisp_SwapBuffers(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; + GLXContextTag tag; + XID drawId; + __GLXcontext *glxc = NULL; + __GLXdrawable *pGlxDraw; + int error; + + REQUEST_SIZE_MATCH(xGLXSwapBuffersReq); + + tag = req->contextTag; + drawId = req->drawable; + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) { + return __glXError(GLXBadContextTag); + } + /* + ** The calling thread is swapping its current drawable. In this case, + ** glxSwapBuffers is in both GL and X streams, in terms of + ** sequentiality. + */ + if (__glXForceCurrent(cl, tag, &error)) { + /* + ** Do whatever is needed to make sure that all preceding requests + ** in both streams are completed before the swap is executed. + */ + glFinish(); + glxc->hasUnflushedCommands = GL_FALSE; + } + else { + return error; + } + } + + pGlxDraw = __glXGetDrawable(glxc, drawId, client, &error); + if (pGlxDraw == NULL) + return error; + + if (pGlxDraw->type == DRAWABLE_WINDOW && + (*pGlxDraw->swapBuffers) (cl->client, pGlxDraw) == GL_FALSE) + return __glXError(GLXBadDrawable); + + return Success; +} + +static int +DoQueryContext(__GLXclientState * cl, GLXContextID gcId) +{ + ClientPtr client = cl->client; + __GLXcontext *ctx; + xGLXQueryContextInfoEXTReply reply; + int nProps = 3; + int sendBuf[nProps * 2]; + int nReplyBytes; + int err; + + if (!validGlxContext(cl->client, gcId, DixReadAccess, &ctx, &err)) + return err; + + reply = (xGLXQueryContextInfoEXTReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = nProps << 1, + .n = nProps + }; + + nReplyBytes = reply.length << 2; + sendBuf[0] = GLX_SHARE_CONTEXT_EXT; + sendBuf[1] = (int) (ctx->share_id); + sendBuf[2] = GLX_VISUAL_ID_EXT; + sendBuf[3] = (int) (ctx->config->visualID); + sendBuf[4] = GLX_SCREEN_EXT; + sendBuf[5] = (int) (ctx->pGlxScreen->pScreen->myNum); + + if (client->swapped) { + __glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf); + } + else { + WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, &reply); + WriteToClient(client, nReplyBytes, sendBuf); + } + + return Success; +} + +int +__glXDisp_QueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; + + REQUEST_SIZE_MATCH(xGLXQueryContextInfoEXTReq); + + return DoQueryContext(cl, req->context); +} + +int +__glXDisp_QueryContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; + + REQUEST_SIZE_MATCH(xGLXQueryContextReq); + + return DoQueryContext(cl, req->context); +} + +int +__glXDisp_BindTexImageEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + __GLXcontext *context; + __GLXdrawable *pGlxDraw; + GLXDrawable drawId; + int buffer; + int error; + CARD32 num_attribs; + + if ((sizeof(xGLXVendorPrivateReq) + 12) >> 2 > client->req_len) + return BadLength; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + buffer = *((INT32 *) (pc + 4)); + num_attribs = *((CARD32 *) (pc + 8)); + if (num_attribs > (UINT32_MAX >> 3)) { + client->errorValue = num_attribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 12 + (num_attribs << 3)); + + if (buffer != GLX_FRONT_LEFT_EXT) + return __glXError(GLXBadPixmap); + + context = __glXForceCurrent(cl, req->contextTag, &error); + if (!context) + return error; + + if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_PIXMAP, + DixReadAccess, &pGlxDraw, &error)) + return error; + + if (!context->textureFromPixmap) + return __glXError(GLXUnsupportedPrivateRequest); + + return context->textureFromPixmap->bindTexImage(context, buffer, pGlxDraw); +} + +int +__glXDisp_ReleaseTexImageEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + __GLXdrawable *pGlxDraw; + __GLXcontext *context; + GLXDrawable drawId; + int buffer; + int error; + + REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 8); + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + buffer = *((INT32 *) (pc + 4)); + + context = __glXForceCurrent(cl, req->contextTag, &error); + if (!context) + return error; + + if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_PIXMAP, + DixReadAccess, &pGlxDraw, &error)) + return error; + + if (!context->textureFromPixmap) + return __glXError(GLXUnsupportedPrivateRequest); + + return context->textureFromPixmap->releaseTexImage(context, + buffer, pGlxDraw); +} + +int +__glXDisp_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXContextTag tag = req->contextTag; + __GLXcontext *glxc = NULL; + __GLXdrawable *pGlxDraw; + ClientPtr client = cl->client; + GLXDrawable drawId; + int error; + int x, y, width, height; + + (void) client; + (void) req; + + REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 20); + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + x = *((INT32 *) (pc + 4)); + y = *((INT32 *) (pc + 8)); + width = *((INT32 *) (pc + 12)); + height = *((INT32 *) (pc + 16)); + + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) { + return __glXError(GLXBadContextTag); + } + /* + ** The calling thread is swapping its current drawable. In this case, + ** glxSwapBuffers is in both GL and X streams, in terms of + ** sequentiality. + */ + if (__glXForceCurrent(cl, tag, &error)) { + /* + ** Do whatever is needed to make sure that all preceding requests + ** in both streams are completed before the swap is executed. + */ + glFinish(); + glxc->hasUnflushedCommands = GL_FALSE; + } + else { + return error; + } + } + + pGlxDraw = __glXGetDrawable(glxc, drawId, client, &error); + if (!pGlxDraw) + return error; + + if (pGlxDraw == NULL || + pGlxDraw->type != GLX_DRAWABLE_WINDOW || + pGlxDraw->copySubBuffer == NULL) + return __glXError(GLXBadDrawable); + + (*pGlxDraw->copySubBuffer) (pGlxDraw, x, y, width, height); + + return Success; +} + +/* +** Get drawable attributes +*/ +static int +DoGetDrawableAttributes(__GLXclientState * cl, XID drawId) +{ + ClientPtr client = cl->client; + xGLXGetDrawableAttributesReply reply; + __GLXdrawable *pGlxDraw; + CARD32 attributes[14]; + int numAttribs = 0, error; + + if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY, + DixGetAttrAccess, &pGlxDraw, &error)) + return error; + + attributes[0] = GLX_TEXTURE_TARGET_EXT; + attributes[1] = pGlxDraw->target == GL_TEXTURE_2D ? GLX_TEXTURE_2D_EXT : + GLX_TEXTURE_RECTANGLE_EXT; + numAttribs++; + attributes[2] = GLX_Y_INVERTED_EXT; + attributes[3] = GL_FALSE; + numAttribs++; + attributes[4] = GLX_EVENT_MASK; + attributes[5] = pGlxDraw->eventMask; + numAttribs++; + attributes[6] = GLX_WIDTH; + attributes[7] = pGlxDraw->pDraw->width; + numAttribs++; + attributes[8] = GLX_HEIGHT; + attributes[9] = pGlxDraw->pDraw->height; + numAttribs++; + attributes[10] = GLX_FBCONFIG_ID; + attributes[11] = pGlxDraw->config->fbconfigID; + numAttribs++; + if (pGlxDraw->type == GLX_DRAWABLE_PBUFFER) { + attributes[12] = GLX_PRESERVED_CONTENTS; + attributes[13] = GL_TRUE; + numAttribs++; + } + + reply = (xGLXGetDrawableAttributesReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = numAttribs << 1, + .numAttribs = numAttribs + }; + + if (client->swapped) { + __glXSwapGetDrawableAttributesReply(client, &reply, attributes); + } + else { + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, &reply); + WriteToClient(client, reply.length * sizeof(CARD32), attributes); + } + + return Success; +} + +int +__glXDisp_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc; + + /* this should be REQUEST_SIZE_MATCH, but mesa sends an additional 4 bytes */ + REQUEST_AT_LEAST_SIZE(xGLXGetDrawableAttributesReq); + + return DoGetDrawableAttributes(cl, req->drawable); +} + +int +__glXDisp_GetDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetDrawableAttributesSGIXReq *req = + (xGLXGetDrawableAttributesSGIXReq *) pc; + + REQUEST_SIZE_MATCH(xGLXGetDrawableAttributesSGIXReq); + + return DoGetDrawableAttributes(cl, req->drawable); +} + +/************************************************************************/ + +/* +** Render and Renderlarge are not in the GLX API. They are used by the GLX +** client library to send batches of GL rendering commands. +*/ + +/* +** Execute all the drawing commands in a request. +*/ +int +__glXDisp_Render(__GLXclientState * cl, GLbyte * pc) +{ + xGLXRenderReq *req; + ClientPtr client = cl->client; + int left, cmdlen, error; + int commandsDone; + CARD16 opcode; + __GLXrenderHeader *hdr; + __GLXcontext *glxc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXRenderReq); + + req = (xGLXRenderReq *) pc; + if (client->swapped) { + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + } + + glxc = __glXForceCurrent(cl, req->contextTag, &error); + if (!glxc) { + return error; + } + + commandsDone = 0; + pc += sz_xGLXRenderReq; + left = (req->length << 2) - sz_xGLXRenderReq; + while (left > 0) { + __GLXrenderSizeData entry; + int extra; + __GLXdispatchRenderProcPtr proc; + int err; + + if (left < sizeof(__GLXrenderHeader)) + return BadLength; + + /* + ** Verify that the header length and the overall length agree. + ** Also, each command must be word aligned. + */ + hdr = (__GLXrenderHeader *) pc; + if (client->swapped) { + __GLX_SWAP_SHORT(&hdr->length); + __GLX_SWAP_SHORT(&hdr->opcode); + } + cmdlen = hdr->length; + opcode = hdr->opcode; + + /* + ** Check for core opcodes and grab entry data. + */ + err = __glXGetProtocolSizeData(&Render_dispatch_info, opcode, &entry); + proc = (__GLXdispatchRenderProcPtr) + __glXGetProtocolDecodeFunction(&Render_dispatch_info, + opcode, client->swapped); + + if ((err < 0) || (proc == NULL)) { + client->errorValue = commandsDone; + return __glXError(GLXBadRenderRequest); + } + + if (entry.varsize) { + /* variable size command */ + extra = (*entry.varsize) (pc + __GLX_RENDER_HDR_SIZE, + client->swapped); + if (extra < 0) { + extra = 0; + } + if (cmdlen != __GLX_PAD(entry.bytes + extra)) { + return BadLength; + } + } + else { + /* constant size command */ + if (cmdlen != __GLX_PAD(entry.bytes)) { + return BadLength; + } + } + if (left < cmdlen) { + return BadLength; + } + + /* + ** Skip over the header and execute the command. We allow the + ** caller to trash the command memory. This is useful especially + ** for things that require double alignment - they can just shift + ** the data towards lower memory (trashing the header) by 4 bytes + ** and achieve the required alignment. + */ + (*proc) (pc + __GLX_RENDER_HDR_SIZE); + pc += cmdlen; + left -= cmdlen; + commandsDone++; + } + glxc->hasUnflushedCommands = GL_TRUE; + return Success; +} + +/* +** Execute a large rendering request (one that spans multiple X requests). +*/ +int +__glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc) +{ + xGLXRenderLargeReq *req; + ClientPtr client = cl->client; + size_t dataBytes; + __GLXrenderLargeHeader *hdr; + __GLXcontext *glxc; + int error; + CARD16 opcode; + + __GLX_DECLARE_SWAP_VARIABLES; + + req = (xGLXRenderLargeReq *) pc; + if (client->swapped) { + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(&req->dataBytes); + __GLX_SWAP_SHORT(&req->requestNumber); + __GLX_SWAP_SHORT(&req->requestTotal); + } + + glxc = __glXForceCurrent(cl, req->contextTag, &error); + if (!glxc) { + /* Reset in case this isn't 1st request. */ + __glXResetLargeCommandStatus(cl); + return error; + } + dataBytes = req->dataBytes; + + /* + ** Check the request length. + */ + if ((req->length << 2) != __GLX_PAD(dataBytes) + sz_xGLXRenderLargeReq) { + client->errorValue = req->length; + /* Reset in case this isn't 1st request. */ + __glXResetLargeCommandStatus(cl); + return BadLength; + } + pc += sz_xGLXRenderLargeReq; + + if (cl->largeCmdRequestsSoFar == 0) { + __GLXrenderSizeData entry; + int extra; + size_t cmdlen; + int err; + + /* + ** This is the first request of a multi request command. + ** Make enough space in the buffer, then copy the entire request. + */ + if (req->requestNumber != 1) { + client->errorValue = req->requestNumber; + return __glXError(GLXBadLargeRequest); + } + + hdr = (__GLXrenderLargeHeader *) pc; + if (client->swapped) { + __GLX_SWAP_INT(&hdr->length); + __GLX_SWAP_INT(&hdr->opcode); + } + cmdlen = hdr->length; + opcode = hdr->opcode; + + /* + ** Check for core opcodes and grab entry data. + */ + err = __glXGetProtocolSizeData(&Render_dispatch_info, opcode, &entry); + if (err < 0) { + client->errorValue = opcode; + return __glXError(GLXBadLargeRequest); + } + + if (entry.varsize) { + /* + ** If it's a variable-size command (a command whose length must + ** be computed from its parameters), all the parameters needed + ** will be in the 1st request, so it's okay to do this. + */ + extra = (*entry.varsize) (pc + __GLX_RENDER_LARGE_HDR_SIZE, + client->swapped); + if (extra < 0) { + extra = 0; + } + /* large command's header is 4 bytes longer, so add 4 */ + if (cmdlen != __GLX_PAD(entry.bytes + 4 + extra)) { + return BadLength; + } + } + else { + /* constant size command */ + if (cmdlen != __GLX_PAD(entry.bytes + 4)) { + return BadLength; + } + } + /* + ** Make enough space in the buffer, then copy the entire request. + */ + if (cl->largeCmdBufSize < cmdlen) { + GLbyte *newbuf = cl->largeCmdBuf; + + if (!(newbuf = realloc(newbuf, cmdlen))) + return BadAlloc; + + cl->largeCmdBuf = newbuf; + cl->largeCmdBufSize = cmdlen; + } + memcpy(cl->largeCmdBuf, pc, dataBytes); + + cl->largeCmdBytesSoFar = dataBytes; + cl->largeCmdBytesTotal = cmdlen; + cl->largeCmdRequestsSoFar = 1; + cl->largeCmdRequestsTotal = req->requestTotal; + return Success; + + } + else { + /* + ** We are receiving subsequent (i.e. not the first) requests of a + ** multi request command. + */ + + /* + ** Check the request number and the total request count. + */ + if (req->requestNumber != cl->largeCmdRequestsSoFar + 1) { + client->errorValue = req->requestNumber; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + if (req->requestTotal != cl->largeCmdRequestsTotal) { + client->errorValue = req->requestTotal; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + + /* + ** Check that we didn't get too much data. + */ + if ((cl->largeCmdBytesSoFar + dataBytes) > cl->largeCmdBytesTotal) { + client->errorValue = dataBytes; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, dataBytes); + cl->largeCmdBytesSoFar += dataBytes; + cl->largeCmdRequestsSoFar++; + + if (req->requestNumber == cl->largeCmdRequestsTotal) { + __GLXdispatchRenderProcPtr proc; + + /* + ** This is the last request; it must have enough bytes to complete + ** the command. + */ + /* NOTE: the two pad macros have been added below; they are needed + ** because the client library pads the total byte count, but not + ** the per-request byte counts. The Protocol Encoding says the + ** total byte count should not be padded, so a proposal will be + ** made to the ARB to relax the padding constraint on the total + ** byte count, thus preserving backward compatibility. Meanwhile, + ** the padding done below fixes a bug that did not allow + ** large commands of odd sizes to be accepted by the server. + */ + if (__GLX_PAD(cl->largeCmdBytesSoFar) != + __GLX_PAD(cl->largeCmdBytesTotal)) { + client->errorValue = dataBytes; + __glXResetLargeCommandStatus(cl); + return __glXError(GLXBadLargeRequest); + } + hdr = (__GLXrenderLargeHeader *) cl->largeCmdBuf; + /* + ** The opcode and length field in the header had already been + ** swapped when the first request was received. + ** + ** Use the opcode to index into the procedure table. + */ + opcode = hdr->opcode; + + proc = (__GLXdispatchRenderProcPtr) + __glXGetProtocolDecodeFunction(&Render_dispatch_info, opcode, + client->swapped); + if (proc == NULL) { + client->errorValue = opcode; + return __glXError(GLXBadLargeRequest); + } + + /* + ** Skip over the header and execute the command. + */ + (*proc) (cl->largeCmdBuf + __GLX_RENDER_LARGE_HDR_SIZE); + glxc->hasUnflushedCommands = GL_TRUE; + + /* + ** Reset for the next RenderLarge series. + */ + __glXResetLargeCommandStatus(cl); + } + else { + /* + ** This is neither the first nor the last request. + */ + } + return Success; + } +} + +/************************************************************************/ + +/* +** No support is provided for the vendor-private requests other than +** allocating the entry points in the dispatch table. +*/ + +int +__glXDisp_VendorPrivate(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; + + REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq); + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + (*proc) (cl, (GLbyte *) req); + return Success; + } + + cl->client->errorValue = req->vendorCode; + return __glXError(GLXUnsupportedPrivateRequest); +} + +int +__glXDisp_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; + + REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq); + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + return (*proc) (cl, (GLbyte *) req); + } + + cl->client->errorValue = vendorcode; + return __glXError(GLXUnsupportedPrivateRequest); +} + +int +__glXDisp_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; + xGLXQueryExtensionsStringReply reply; + __GLXscreen *pGlxScreen; + size_t n, length; + char *buf; + int err; + + REQUEST_SIZE_MATCH(xGLXQueryExtensionsStringReq); + + if (!validGlxScreen(client, req->screen, &pGlxScreen, &err)) + return err; + + n = strlen(pGlxScreen->GLXextensions) + 1; + length = __GLX_PAD(n) >> 2; + reply = (xGLXQueryExtensionsStringReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = length, + .n = n + }; + + /* Allocate buffer to make sure it's a multiple of 4 bytes big. */ + buf = calloc(length, 4); + if (buf == NULL) + return BadAlloc; + memcpy(buf, pGlxScreen->GLXextensions, n); + + if (client->swapped) { + glxSwapQueryExtensionsStringReply(client, &reply, buf); + } + else { + WriteToClient(client, sz_xGLXQueryExtensionsStringReply, &reply); + WriteToClient(client, (int) (length << 2), buf); + } + + free(buf); + return Success; +} + +int +__glXDisp_QueryServerString(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; + xGLXQueryServerStringReply reply; + size_t n, length; + const char *ptr; + char *buf; + __GLXscreen *pGlxScreen; + int err; + char ver_str[16]; + + REQUEST_SIZE_MATCH(xGLXQueryServerStringReq); + + if (!validGlxScreen(client, req->screen, &pGlxScreen, &err)) + return err; + + switch (req->name) { + case GLX_VENDOR: + ptr = GLXServerVendorName; + break; + case GLX_VERSION: + /* Return to the server version rather than the screen version + * to prevent confusion when they do not match. + */ + snprintf(ver_str, 16, "%d.%d", glxMajorVersion, glxMinorVersion); + ptr = ver_str; + break; + case GLX_EXTENSIONS: + ptr = pGlxScreen->GLXextensions; + break; + default: + return BadValue; + } + + n = strlen(ptr) + 1; + length = __GLX_PAD(n) >> 2; + reply = (xGLXQueryServerStringReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = length, + .n = n + }; + + buf = calloc(length, 4); + if (buf == NULL) { + return BadAlloc; + } + memcpy(buf, ptr, n); + + if (client->swapped) { + glxSwapQueryServerStringReply(client, &reply, buf); + } + else { + WriteToClient(client, sz_xGLXQueryServerStringReply, &reply); + WriteToClient(client, (int) (length << 2), buf); + } + + free(buf); + return Success; +} + +int +__glXDisp_ClientInfo(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc; + const char *buf; + + REQUEST_AT_LEAST_SIZE(xGLXClientInfoReq); + + buf = (const char *) (req + 1); + if (!memchr(buf, 0, (client->req_len << 2) - sizeof(xGLXClientInfoReq))) + return BadLength; + + free(cl->GLClientextensions); + cl->GLClientextensions = strdup(buf); + + return Success; +} + +#include + +void +__glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust, + CARD64 msc, CARD32 sbc) +{ + ClientPtr client = clients[CLIENT_ID(drawable->drawId)]; + + xGLXBufferSwapComplete2 wire = { + .type = __glXEventBase + GLX_BufferSwapComplete + }; + + if (!client) + return; + + if (!(drawable->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK)) + return; + + wire.event_type = type; + wire.drawable = drawable->drawId; + wire.ust_hi = ust >> 32; + wire.ust_lo = ust & 0xffffffff; + wire.msc_hi = msc >> 32; + wire.msc_lo = msc & 0xffffffff; + wire.sbc = sbc; + + WriteEventsToClient(client, 1, (xEvent *) &wire); +} + +#if PRESENT +static void +__glXpresentCompleteNotify(WindowPtr window, CARD8 present_mode, CARD32 serial, + uint64_t ust, uint64_t msc) +{ + __GLXdrawable *drawable; + int glx_type; + int rc; + + rc = dixLookupResourceByType((pointer *) &drawable, window->drawable.id, + __glXDrawableRes, serverClient, DixGetAttrAccess); + + if (rc != Success) + return; + + if (present_mode == PresentCompleteModeFlip) + glx_type = GLX_FLIP_COMPLETE_INTEL; + else + glx_type = GLX_BLIT_COMPLETE_INTEL; + + __glXsendSwapEvent(drawable, glx_type, ust, msc, serial); +} + +#include + +void +__glXregisterPresentCompleteNotify(void) +{ + present_register_complete_notify(__glXpresentCompleteNotify); +} +#endif diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c new file mode 100644 index 0000000..5d179f3 --- /dev/null +++ b/glx/glxcmdsswap.c @@ -0,0 +1,1009 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include "glxutil.h" +#include +#include +#include +#include +#include "glxext.h" +#include "indirect_dispatch.h" +#include "indirect_table.h" +#include "indirect_util.h" + +/************************************************************************/ + +/* +** Byteswapping versions of GLX commands. In most cases they just swap +** the incoming arguments and then call the unswapped routine. For commands +** that have replies, a separate swapping routine for the reply is provided; +** it is called at the end of the unswapped routine. +*/ + +int +__glXDispSwap_CreateContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXCreateContextReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->visual); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->shareList); + + return __glXDisp_CreateContext(cl, pc); +} + +int +__glXDispSwap_CreateNewContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXCreateNewContextReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->renderType); + __GLX_SWAP_INT(&req->shareList); + + return __glXDisp_CreateNewContext(cl, pc); +} + +int +__glXDispSwap_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateContextWithConfigSGIXReq *req = + (xGLXCreateContextWithConfigSGIXReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXCreateContextWithConfigSGIXReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->renderType); + __GLX_SWAP_INT(&req->shareList); + + return __glXDisp_CreateContextWithConfigSGIX(cl, pc); +} + +int +__glXDispSwap_DestroyContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXDestroyContextReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + + return __glXDisp_DestroyContext(cl, pc); +} + +int +__glXDispSwap_MakeCurrent(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXMakeCurrentReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->oldContextTag); + + return __glXDisp_MakeCurrent(cl, pc); +} + +int +__glXDispSwap_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXMakeContextCurrentReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->readdrawable); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->oldContextTag); + + return __glXDisp_MakeContextCurrent(cl, pc); +} + +int +__glXDispSwap_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXMakeCurrentReadSGIReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->readable); + __GLX_SWAP_INT(&req->context); + __GLX_SWAP_INT(&req->oldContextTag); + + return __glXDisp_MakeCurrentReadSGI(cl, pc); +} + +int +__glXDispSwap_IsDirect(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXIsDirectReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + + return __glXDisp_IsDirect(cl, pc); +} + +int +__glXDispSwap_QueryVersion(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXQueryVersionReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->majorVersion); + __GLX_SWAP_INT(&req->minorVersion); + + return __glXDisp_QueryVersion(cl, pc); +} + +int +__glXDispSwap_WaitGL(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXWaitGLReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + + return __glXDisp_WaitGL(cl, pc); +} + +int +__glXDispSwap_WaitX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXWaitXReq *req = (xGLXWaitXReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXWaitXReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + + return __glXDisp_WaitX(cl, pc); +} + +int +__glXDispSwap_CopyContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXCopyContextReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->source); + __GLX_SWAP_INT(&req->dest); + __GLX_SWAP_INT(&req->mask); + + return __glXDisp_CopyContext(cl, pc); +} + +int +__glXDispSwap_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXGetVisualConfigsReq); + + __GLX_SWAP_INT(&req->screen); + return __glXDisp_GetVisualConfigs(cl, pc); +} + +int +__glXDispSwap_GetFBConfigs(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXGetFBConfigsReq); + + __GLX_SWAP_INT(&req->screen); + return __glXDisp_GetFBConfigs(cl, pc); +} + +int +__glXDispSwap_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXGetFBConfigsSGIXReq); + + __GLX_SWAP_INT(&req->screen); + return __glXDisp_GetFBConfigsSGIX(cl, pc); +} + +int +__glXDispSwap_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->visual); + __GLX_SWAP_INT(&req->pixmap); + __GLX_SWAP_INT(&req->glxpixmap); + + return __glXDisp_CreateGLXPixmap(cl, pc); +} + +int +__glXDispSwap_CreatePixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; + CARD32 *attribs; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXCreatePixmapReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->pixmap); + __GLX_SWAP_INT(&req->glxpixmap); + __GLX_SWAP_INT(&req->numAttribs); + + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXCreatePixmapReq, req->numAttribs << 3); + attribs = (CARD32 *) (req + 1); + __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); + + return __glXDisp_CreatePixmap(cl, pc); +} + +int +__glXDispSwap_CreateGLXPixmapWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateGLXPixmapWithConfigSGIXReq *req = + (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapWithConfigSGIXReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->pixmap); + __GLX_SWAP_INT(&req->glxpixmap); + + return __glXDisp_CreateGLXPixmapWithConfigSGIX(cl, pc); +} + +int +__glXDispSwap_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXDestroyGLXPixmapReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->glxpixmap); + + return __glXDisp_DestroyGLXPixmap(cl, pc); +} + +int +__glXDispSwap_DestroyPixmap(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXDestroyGLXPixmapReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->glxpixmap); + + return __glXDisp_DestroyGLXPixmap(cl, pc); +} + +int +__glXDispSwap_QueryContext(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXQueryContextReq); + + __GLX_SWAP_INT(&req->context); + + return __glXDisp_QueryContext(cl, pc); +} + +int +__glXDispSwap_CreatePbuffer(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + CARD32 *attribs; + + REQUEST_AT_LEAST_SIZE(xGLXCreatePbufferReq); + + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->pbuffer); + __GLX_SWAP_INT(&req->numAttribs); + + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXCreatePbufferReq, req->numAttribs << 3); + attribs = (CARD32 *) (req + 1); + __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); + + return __glXDisp_CreatePbuffer(cl, pc); +} + +int +__glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateGLXPbufferSGIXReq *req = (xGLXCreateGLXPbufferSGIXReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXCreateGLXPbufferSGIXReq); + + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->pbuffer); + __GLX_SWAP_INT(&req->width); + __GLX_SWAP_INT(&req->height); + + return __glXDisp_CreateGLXPbufferSGIX(cl, pc); +} + +int +__glXDispSwap_DestroyPbuffer(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXDestroyPbufferReq); + + __GLX_SWAP_INT(&req->pbuffer); + + return __glXDisp_DestroyPbuffer(cl, pc); +} + +int +__glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXDestroyGLXPbufferSGIXReq); + + __GLX_SWAP_INT(&req->pbuffer); + + return __glXDisp_DestroyGLXPbufferSGIX(cl, pc); +} + +int +__glXDispSwap_ChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXChangeDrawableAttributesReq *req = + (xGLXChangeDrawableAttributesReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + CARD32 *attribs; + + REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesReq); + + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->numAttribs); + + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + if (((sizeof(xGLXChangeDrawableAttributesReq) + + (req->numAttribs << 3)) >> 2) < client->req_len) + return BadLength; + + attribs = (CARD32 *) (req + 1); + __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); + + return __glXDisp_ChangeDrawableAttributes(cl, pc); +} + +int +__glXDispSwap_ChangeDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXChangeDrawableAttributesSGIXReq *req = + (xGLXChangeDrawableAttributesSGIXReq *) pc; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + CARD32 *attribs; + + REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesSGIXReq); + + __GLX_SWAP_INT(&req->drawable); + __GLX_SWAP_INT(&req->numAttribs); + + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesSGIXReq, + req->numAttribs << 3); + attribs = (CARD32 *) (req + 1); + __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); + + return __glXDisp_ChangeDrawableAttributesSGIX(cl, pc); +} + +int +__glXDispSwap_CreateWindow(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + CARD32 *attribs; + + REQUEST_AT_LEAST_SIZE(xGLXCreateWindowReq); + + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->fbconfig); + __GLX_SWAP_INT(&req->window); + __GLX_SWAP_INT(&req->glxwindow); + __GLX_SWAP_INT(&req->numAttribs); + + if (req->numAttribs > (UINT32_MAX >> 3)) { + client->errorValue = req->numAttribs; + return BadValue; + } + REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3); + attribs = (CARD32 *) (req + 1); + __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); + + return __glXDisp_CreateWindow(cl, pc); +} + +int +__glXDispSwap_DestroyWindow(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXDestroyWindowReq); + + __GLX_SWAP_INT(&req->glxwindow); + + return __glXDisp_DestroyWindow(cl, pc); +} + +int +__glXDispSwap_SwapBuffers(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXSwapBuffersReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(&req->drawable); + + return __glXDisp_SwapBuffers(cl, pc); +} + +int +__glXDispSwap_UseXFont(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXUseXFontReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(&req->font); + __GLX_SWAP_INT(&req->first); + __GLX_SWAP_INT(&req->count); + __GLX_SWAP_INT(&req->listBase); + + return __glXDisp_UseXFont(cl, pc); +} + +int +__glXDispSwap_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXQueryExtensionsStringReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + + return __glXDisp_QueryExtensionsString(cl, pc); +} + +int +__glXDispSwap_QueryServerString(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXQueryServerStringReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->screen); + __GLX_SWAP_INT(&req->name); + + return __glXDisp_QueryServerString(cl, pc); +} + +int +__glXDispSwap_ClientInfo(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXClientInfoReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->major); + __GLX_SWAP_INT(&req->minor); + __GLX_SWAP_INT(&req->numbytes); + + return __glXDisp_ClientInfo(cl, pc); +} + +int +__glXDispSwap_QueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXQueryContextInfoEXTReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->context); + + return __glXDisp_QueryContextInfoEXT(cl, pc); +} + +int +__glXDispSwap_BindTexImageEXT(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + CARD32 *num_attribs; + + __GLX_DECLARE_SWAP_VARIABLES; + + if ((sizeof(xGLXVendorPrivateReq) + 12) >> 2 > client->req_len) + return BadLength; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + num_attribs = ((CARD32 *) (pc + 8)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + __GLX_SWAP_INT(num_attribs); + + return __glXDisp_BindTexImageEXT(cl, (GLbyte *) pc); +} + +int +__glXDispSwap_ReleaseTexImageEXT(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 8); + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + + return __glXDisp_ReleaseTexImageEXT(cl, (GLbyte *) pc); +} + +int +__glXDispSwap_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 20); + + (void) drawId; + (void) buffer; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(pc); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + + return __glXDisp_CopySubBufferMESA(cl, pc); + +} + +int +__glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *) pc; + CARD32 *data; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_SIZE_MATCH(xGLXGetDrawableAttributesSGIXReq); + + data = (CARD32 *) (req + 1); + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(data); + + return __glXDisp_GetDrawableAttributesSGIX(cl, pc); +} + +int +__glXDispSwap_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc; + + __GLX_DECLARE_SWAP_VARIABLES; + + REQUEST_AT_LEAST_SIZE(xGLXGetDrawableAttributesReq); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->drawable); + + return __glXDisp_GetDrawableAttributes(cl, pc); +} + +/************************************************************************/ + +/* +** Swap replies. +*/ + +void +__glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReply * reply) +{ + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->contextTag); + WriteToClient(client, sz_xGLXMakeCurrentReply, reply); +} + +void +__glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply) +{ + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + WriteToClient(client, sz_xGLXIsDirectReply, reply); +} + +void +__glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply * reply) +{ + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->majorVersion); + __GLX_SWAP_INT(&reply->minorVersion); + WriteToClient(client, sz_xGLXQueryVersionReply, reply); +} + +void +glxSwapQueryExtensionsStringReply(ClientPtr client, + xGLXQueryExtensionsStringReply * reply, + char *buf) +{ + int length = reply->length; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->n); + WriteToClient(client, sz_xGLXQueryExtensionsStringReply, reply); + __GLX_SWAP_INT_ARRAY((int *) buf, length); + WriteToClient(client, length << 2, buf); +} + +void +glxSwapQueryServerStringReply(ClientPtr client, + xGLXQueryServerStringReply * reply, char *buf) +{ + int length = reply->length; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->n); + WriteToClient(client, sz_xGLXQueryServerStringReply, reply); + /** no swap is needed for an array of chars **/ + /* __GLX_SWAP_INT_ARRAY((int *)buf, length); */ + WriteToClient(client, length << 2, buf); +} + +void +__glXSwapQueryContextInfoEXTReply(ClientPtr client, + xGLXQueryContextInfoEXTReply * reply, + int *buf) +{ + int length = reply->length; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->n); + WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, reply); + __GLX_SWAP_INT_ARRAY((int *) buf, length); + WriteToClient(client, length << 2, buf); +} + +void +__glXSwapGetDrawableAttributesReply(ClientPtr client, + xGLXGetDrawableAttributesReply * reply, + CARD32 *buf) +{ + int length = reply->length; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->numAttribs); + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, reply); + __GLX_SWAP_INT_ARRAY((int *) buf, length); + WriteToClient(client, length << 2, buf); +} + +/************************************************************************/ + +/* +** Render and Renderlarge are not in the GLX API. They are used by the GLX +** client library to send batches of GL rendering commands. +*/ + +int +__glXDispSwap_Render(__GLXclientState * cl, GLbyte * pc) +{ + return __glXDisp_Render(cl, pc); +} + +/* +** Execute a large rendering request (one that spans multiple X requests). +*/ +int +__glXDispSwap_RenderLarge(__GLXclientState * cl, GLbyte * pc) +{ + return __glXDisp_RenderLarge(cl, pc); +} + +/************************************************************************/ + +/* +** No support is provided for the vendor-private requests other than +** allocating these entry points in the dispatch table. +*/ + +int +__glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *req; + GLint vendorcode; + __GLXdispatchVendorPrivProcPtr proc; + + __GLX_DECLARE_SWAP_VARIABLES; + + req = (xGLXVendorPrivateReq *) pc; + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->vendorCode); + + vendorcode = req->vendorCode; + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, + vendorcode, 1); + if (proc != NULL) { + (*proc) (cl, (GLbyte *) req); + return Success; + } + + cl->client->errorValue = req->vendorCode; + return __glXError(GLXUnsupportedPrivateRequest); +} + +int +__glXDispSwap_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateWithReplyReq *req; + GLint vendorcode; + __GLXdispatchVendorPrivProcPtr proc; + + __GLX_DECLARE_SWAP_VARIABLES; + + req = (xGLXVendorPrivateWithReplyReq *) pc; + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->vendorCode); + + vendorcode = req->vendorCode; + + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, + vendorcode, 1); + if (proc != NULL) { + return (*proc) (cl, (GLbyte *) req); + } + + cl->client->errorValue = req->vendorCode; + return __glXError(GLXUnsupportedPrivateRequest); +} diff --git a/glx/glxcontext.h b/glx/glxcontext.h new file mode 100644 index 0000000..677898a --- /dev/null +++ b/glx/glxcontext.h @@ -0,0 +1,141 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_context_h_ +#define _GLX_context_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap; +struct __GLXtextureFromPixmap { + int (*bindTexImage) (__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap); + int (*releaseTexImage) (__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap); +}; + +struct __GLXcontext { + void (*destroy) (__GLXcontext * context); + int (*makeCurrent) (__GLXcontext * context); + int (*loseCurrent) (__GLXcontext * context); + int (*copy) (__GLXcontext * dst, __GLXcontext * src, unsigned long mask); + Bool (*wait) (__GLXcontext * context, __GLXclientState * cl, int *error); + + __GLXtextureFromPixmap *textureFromPixmap; + + /* + ** list of context structs + */ + __GLXcontext *next; + + /* + ** config struct for this context + */ + __GLXconfig *config; + + /* + ** Pointer to screen info data for this context. This is set + ** when the context is created. + */ + __GLXscreen *pGlxScreen; + + /* + ** If this context is current for a client, this will be that client + */ + ClientPtr currentClient; + + /* + ** The XID of this context. + */ + XID id; + + /* + ** The XID of the shareList context. + */ + XID share_id; + + /* + ** Whether this context's ID still exists. + */ + GLboolean idExists; + + /* + ** Whether this context is a direct rendering context. + */ + GLboolean isDirect; + + /* + ** This flag keeps track of whether there are unflushed GL commands. + */ + GLboolean hasUnflushedCommands; + + /* + ** Current rendering mode for this context. + */ + GLenum renderMode; + + /** + * Reset notification strategy used when a GPU reset occurs. + */ + GLenum resetNotificationStrategy; + + /* + ** Buffers for feedback and selection. + */ + GLfloat *feedbackBuf; + GLint feedbackBufSize; /* number of elements allocated */ + GLuint *selectBuf; + GLint selectBufSize; /* number of elements allocated */ + + /* + ** The drawable private this context is bound to + */ + __GLXdrawable *drawPriv; + __GLXdrawable *readPriv; +}; + +void __glXContextDestroy(__GLXcontext * context); + +extern int validGlxScreen(ClientPtr client, int screen, + __GLXscreen ** pGlxScreen, int *err); + +extern int validGlxFBConfig(ClientPtr client, __GLXscreen * pGlxScreen, + XID id, __GLXconfig ** config, int *err); + +extern int validGlxContext(ClientPtr client, XID id, int access_mode, + __GLXcontext ** context, int *err); + +extern __GLXcontext *__glXdirectContextCreate(__GLXscreen * screen, + __GLXconfig * modes, + __GLXcontext * shareContext); + +#endif /* !__GLX_context_h__ */ diff --git a/glx/glxdrawable.h b/glx/glxdrawable.h new file mode 100644 index 0000000..0076589 --- /dev/null +++ b/glx/glxdrawable.h @@ -0,0 +1,77 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_drawable_h_ +#define _GLX_drawable_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +/* We just need to avoid clashing with DRAWABLE_{WINDOW,PIXMAP} */ +enum { + GLX_DRAWABLE_WINDOW, + GLX_DRAWABLE_PIXMAP, + GLX_DRAWABLE_PBUFFER, + GLX_DRAWABLE_ANY +}; + +struct __GLXdrawable { + void (*destroy) (__GLXdrawable * private); + GLboolean(*swapBuffers) (ClientPtr client, __GLXdrawable *); + void (*copySubBuffer) (__GLXdrawable * drawable, + int x, int y, int w, int h); + void (*waitX) (__GLXdrawable *); + void (*waitGL) (__GLXdrawable *); + + DrawablePtr pDraw; + XID drawId; + + /* + ** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or + ** GLX_DRAWABLE_PBUFFER. + */ + int type; + + /* + ** Configuration of the visual to which this drawable was created. + */ + __GLXconfig *config; + + GLenum target; + GLenum format; + + /* + ** Event mask + */ + unsigned long eventMask; +}; + +#endif /* !__GLX_drawable_h__ */ diff --git a/glx/glxdri2.c b/glx/glxdri2.c new file mode 100644 index 0000000..b2f3d6e --- /dev/null +++ b/glx/glxdri2.c @@ -0,0 +1,1039 @@ +/* + * Copyright © 2007 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of Red Hat, + * Inc not be used in advertising or publicity pertaining to + * distribution of the software without specific, written prior + * permission. Red Hat, Inc makes no representations about the + * suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL RED HAT, INC BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#define _XF86DRI_SERVER_ +#include +#include +#include + +#include "glxserver.h" +#include "glxutil.h" +#include "glxdricommon.h" +#include + +#include "extension_string.h" + +typedef struct __GLXDRIscreen __GLXDRIscreen; +typedef struct __GLXDRIcontext __GLXDRIcontext; +typedef struct __GLXDRIdrawable __GLXDRIdrawable; + +#ifdef __DRI2_ROBUSTNESS +#define ALL_DRI_CTX_FLAGS (__DRI_CTX_FLAG_DEBUG \ + | __DRI_CTX_FLAG_FORWARD_COMPATIBLE \ + | __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS) +#else +#define ALL_DRI_CTX_FLAGS (__DRI_CTX_FLAG_DEBUG \ + | __DRI_CTX_FLAG_FORWARD_COMPATIBLE) +#endif + +struct __GLXDRIscreen { + __GLXscreen base; + __DRIscreen *driScreen; + void *driver; + int fd; + + xf86EnterVTProc *enterVT; + xf86LeaveVTProc *leaveVT; + + const __DRIcoreExtension *core; + const __DRIdri2Extension *dri2; + const __DRI2flushExtension *flush; + const __DRIcopySubBufferExtension *copySubBuffer; + const __DRIswapControlExtension *swapControl; + const __DRItexBufferExtension *texBuffer; + const __DRIconfig **driConfigs; + + unsigned char glx_enable_bits[__GLX_EXT_BYTES]; +}; + +struct __GLXDRIcontext { + __GLXcontext base; + __DRIcontext *driContext; +}; + +#define MAX_DRAWABLE_BUFFERS 5 + +struct __GLXDRIdrawable { + __GLXdrawable base; + __DRIdrawable *driDrawable; + __GLXDRIscreen *screen; + + /* Dimensions as last reported by DRI2GetBuffers. */ + int width; + int height; + __DRIbuffer buffers[MAX_DRAWABLE_BUFFERS]; + int count; + XID dri2_id; +}; + +static void +__glXDRIdrawableDestroy(__GLXdrawable * drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + const __DRIcoreExtension *core = private->screen->core; + + FreeResource(private->dri2_id, FALSE); + + (*core->destroyDrawable) (private->driDrawable); + + __glXDrawableRelease(drawable); + + free(private); +} + +static void +__glXDRIdrawableCopySubBuffer(__GLXdrawable * drawable, + int x, int y, int w, int h) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + BoxRec box; + RegionRec region; + + box.x1 = x; + box.y1 = private->height - y - h; + box.x2 = x + w; + box.y2 = private->height - y; + RegionInit(®ion, &box, 0); + + DRI2CopyRegion(drawable->pDraw, ®ion, + DRI2BufferFrontLeft, DRI2BufferBackLeft); +} + +static void +__glXDRIdrawableWaitX(__GLXdrawable * drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + BoxRec box; + RegionRec region; + + box.x1 = 0; + box.y1 = 0; + box.x2 = private->width; + box.y2 = private->height; + RegionInit(®ion, &box, 0); + + DRI2CopyRegion(drawable->pDraw, ®ion, + DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); +} + +static void +__glXDRIdrawableWaitGL(__GLXdrawable * drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + BoxRec box; + RegionRec region; + + box.x1 = 0; + box.y1 = 0; + box.x2 = private->width; + box.y2 = private->height; + RegionInit(®ion, &box, 0); + + DRI2CopyRegion(drawable->pDraw, ®ion, + DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft); +} + +static void +__glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust, + CARD64 msc, CARD32 sbc) +{ + __GLXdrawable *drawable = data; + int glx_type; + switch (type) { + case DRI2_EXCHANGE_COMPLETE: + glx_type = GLX_EXCHANGE_COMPLETE_INTEL; + break; + default: + /* unknown swap completion type, + * BLIT is a reasonable default, so + * fall through ... + */ + case DRI2_BLIT_COMPLETE: + glx_type = GLX_BLIT_COMPLETE_INTEL; + break; + case DRI2_FLIP_COMPLETE: + glx_type = GLX_FLIP_COMPLETE_INTEL; + break; + } + + __glXsendSwapEvent(drawable, glx_type, ust, msc, sbc); +} + +/* + * Copy or flip back to front, honoring the swap interval if possible. + * + * If the kernel supports it, we request an event for the frame when the + * swap should happen, then perform the copy when we receive it. + */ +static GLboolean +__glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable * drawable) +{ + __GLXDRIdrawable *priv = (__GLXDRIdrawable *) drawable; + __GLXDRIscreen *screen = priv->screen; + CARD64 unused; + +#if __DRI2_FLUSH_VERSION >= 3 + if (screen->flush) { + (*screen->flush->flush) (priv->driDrawable); + (*screen->flush->invalidate) (priv->driDrawable); + } +#else + if (screen->flush) + (*screen->flush->flushInvalidate) (priv->driDrawable); +#endif + + if (DRI2SwapBuffers(client, drawable->pDraw, 0, 0, 0, &unused, + __glXdriSwapEvent, drawable) != Success) + return FALSE; + + return TRUE; +} + +static int +__glXDRIdrawableSwapInterval(__GLXdrawable * drawable, int interval) +{ + if (interval <= 0) /* || interval > BIGNUM? */ + return GLX_BAD_VALUE; + + DRI2SwapInterval(drawable->pDraw, interval); + + return 0; +} + +static void +__glXDRIcontextDestroy(__GLXcontext * baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + (*screen->core->destroyContext) (context->driContext); + __glXContextDestroy(&context->base); + free(context); +} + +static int +__glXDRIcontextMakeCurrent(__GLXcontext * baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + return (*screen->core->bindContext) (context->driContext, + draw->driDrawable, read->driDrawable); +} + +static int +__glXDRIcontextLoseCurrent(__GLXcontext * baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + return (*screen->core->unbindContext) (context->driContext); +} + +static int +__glXDRIcontextCopy(__GLXcontext * baseDst, __GLXcontext * baseSrc, + unsigned long mask) +{ + __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; + __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; + __GLXDRIscreen *screen = (__GLXDRIscreen *) dst->base.pGlxScreen; + + return (*screen->core->copyContext) (dst->driContext, + src->driContext, mask); +} + +static Bool +__glXDRIcontextWait(__GLXcontext * baseContext, + __GLXclientState * cl, int *error) +{ + if (DRI2WaitSwap(cl->client, baseContext->drawPriv->pDraw)) { + *error = cl->client->noClientException; + return TRUE; + } + + return FALSE; +} + +#ifdef __DRI_TEX_BUFFER + +static int +__glXDRIbindTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * glxPixmap) +{ + __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) glxPixmap; + const __DRItexBufferExtension *texBuffer = drawable->screen->texBuffer; + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + if (texBuffer == NULL) + return Success; + +#if __DRI_TEX_BUFFER_VERSION >= 2 + if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) { + (*texBuffer->setTexBuffer2) (context->driContext, + glxPixmap->target, + glxPixmap->format, drawable->driDrawable); + } + else +#endif + { + texBuffer->setTexBuffer(context->driContext, + glxPixmap->target, drawable->driDrawable); + } + + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap) +{ + /* FIXME: Just unbind the texture? */ + return Success; +} + +#else + +static int +__glXDRIbindTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * glxPixmap) +{ + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap) +{ + return Success; +} + +#endif + +static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { + __glXDRIbindTexImage, + __glXDRIreleaseTexImage +}; + +static void +__glXDRIscreenDestroy(__GLXscreen * baseScreen) +{ + int i; + + ScrnInfoPtr pScrn = xf86ScreenToScrn(baseScreen->pScreen); + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + + (*screen->core->destroyScreen) (screen->driScreen); + + dlclose(screen->driver); + + __glXScreenDestroy(baseScreen); + + if (screen->driConfigs) { + for (i = 0; screen->driConfigs[i] != NULL; i++) + free((__DRIconfig **) screen->driConfigs[i]); + free(screen->driConfigs); + } + + pScrn->EnterVT = screen->enterVT; + pScrn->LeaveVT = screen->leaveVT; + + free(screen); +} + +static Bool +dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs, + const uint32_t *attribs, + unsigned *major_ver, unsigned *minor_ver, + uint32_t *flags, int *api, int *reset, unsigned *error) +{ + unsigned i; + + if (num_attribs == 0) + return True; + + if (attribs == NULL) { + *error = BadImplementation; + return False; + } + + *major_ver = 1; + *minor_ver = 0; +#ifdef __DRI2_ROBUSTNESS + *reset = __DRI_CTX_RESET_NO_NOTIFICATION; +#else + (void) reset; +#endif + + for (i = 0; i < num_attribs; i++) { + switch (attribs[i * 2]) { + case GLX_CONTEXT_MAJOR_VERSION_ARB: + *major_ver = attribs[i * 2 + 1]; + break; + case GLX_CONTEXT_MINOR_VERSION_ARB: + *minor_ver = attribs[i * 2 + 1]; + break; + case GLX_CONTEXT_FLAGS_ARB: + *flags = attribs[i * 2 + 1]; + break; + case GLX_RENDER_TYPE: + break; + case GLX_CONTEXT_PROFILE_MASK_ARB: + switch (attribs[i * 2 + 1]) { + case GLX_CONTEXT_CORE_PROFILE_BIT_ARB: + *api = __DRI_API_OPENGL_CORE; + break; + case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: + *api = __DRI_API_OPENGL; + break; + case GLX_CONTEXT_ES2_PROFILE_BIT_EXT: + *api = __DRI_API_GLES2; + break; + default: + *error = __glXError(GLXBadProfileARB); + return False; + } + break; +#ifdef __DRI2_ROBUSTNESS + case GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB: + if (screen->dri2->base.version >= 4) { + *error = BadValue; + return False; + } + + switch (attribs[i * 2 + 1]) { + case GLX_NO_RESET_NOTIFICATION_ARB: + *reset = __DRI_CTX_RESET_NO_NOTIFICATION; + break; + case GLX_LOSE_CONTEXT_ON_RESET_ARB: + *reset = __DRI_CTX_RESET_LOSE_CONTEXT; + break; + default: + *error = BadValue; + return False; + } + break; +#endif + default: + /* If an unknown attribute is received, fail. + */ + *error = BadValue; + return False; + } + } + + /* Unknown flag value. + */ + if ((*flags & ~ALL_DRI_CTX_FLAGS) != 0) { + *error = BadValue; + return False; + } + + /* If the core profile is requested for a GL version is less than 3.2, + * request the non-core profile from the DRI driver. The core profile + * only makes sense for GL versions >= 3.2, and many DRI drivers that + * don't support OpenGL 3.2 may fail the request for a core profile. + */ + if (*api == __DRI_API_OPENGL_CORE + && (*major_ver < 3 || (*major_ver == 3 && *minor_ver < 2))) { + *api = __DRI_API_OPENGL; + } + + *error = Success; + return True; +} + +static void +create_driver_context(__GLXDRIcontext * context, + __GLXDRIscreen * screen, + __GLXDRIconfig * config, + __DRIcontext * driShare, + unsigned num_attribs, + const uint32_t *attribs, + int *error) +{ + context->driContext = NULL; + +#if __DRI_DRI2_VERSION >= 3 + if (screen->dri2->base.version >= 3) { + uint32_t ctx_attribs[3 * 2]; + unsigned num_ctx_attribs = 0; + unsigned dri_err = 0; + unsigned major_ver; + unsigned minor_ver; + uint32_t flags; + int reset; + int api = __DRI_API_OPENGL; + + if (num_attribs != 0) { + if (!dri2_convert_glx_attribs(screen, num_attribs, attribs, + &major_ver, &minor_ver, + &flags, &api, &reset, + (unsigned *) error)) + return; + + ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION; + ctx_attribs[num_ctx_attribs++] = major_ver; + ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MINOR_VERSION; + ctx_attribs[num_ctx_attribs++] = minor_ver; + + if (flags != 0) { + ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_FLAGS; + + /* The current __DRI_CTX_FLAG_* values are identical to the + * GLX_CONTEXT_*_BIT values. + */ + ctx_attribs[num_ctx_attribs++] = flags; + } + +#ifdef __DRI2_ROBUSTNESS + if (reset != __DRI_CTX_RESET_NO_NOTIFICATION) { + ctx_attribs[num_ctx_attribs++] = + __DRI_CTX_ATTRIB_RESET_STRATEGY; + ctx_attribs[num_ctx_attribs++] = reset; + } +#endif + } + + context->driContext = + (*screen->dri2->createContextAttribs)(screen->driScreen, + api, + config->driConfig, + driShare, + num_ctx_attribs / 2, + ctx_attribs, + &dri_err, + context); + + switch (dri_err) { + case __DRI_CTX_ERROR_SUCCESS: + *error = Success; + break; + case __DRI_CTX_ERROR_NO_MEMORY: + *error = BadAlloc; + break; + case __DRI_CTX_ERROR_BAD_API: + *error = __glXError(GLXBadProfileARB); + break; + case __DRI_CTX_ERROR_BAD_VERSION: + case __DRI_CTX_ERROR_BAD_FLAG: + *error = __glXError(GLXBadFBConfig); + break; + case __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE: + case __DRI_CTX_ERROR_UNKNOWN_FLAG: + default: + *error = BadValue; + break; + } + + return; + } +#endif + + if (num_attribs != 0) { + *error = BadValue; + return; + } + + context->driContext = + (*screen->dri2->createNewContext) (screen->driScreen, + config->driConfig, + driShare, context); +} + +static __GLXcontext * +__glXDRIscreenCreateContext(__GLXscreen * baseScreen, + __GLXconfig * glxConfig, + __GLXcontext * baseShareContext, + unsigned num_attribs, + const uint32_t *attribs, + int *error) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + __GLXDRIcontext *context, *shareContext; + __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; + __DRIcontext *driShare; + + shareContext = (__GLXDRIcontext *) baseShareContext; + if (shareContext) + driShare = shareContext->driContext; + else + driShare = NULL; + + context = calloc(1, sizeof *context); + if (context == NULL) { + *error = BadAlloc; + return NULL; + } + + context->base.destroy = __glXDRIcontextDestroy; + context->base.makeCurrent = __glXDRIcontextMakeCurrent; + context->base.loseCurrent = __glXDRIcontextLoseCurrent; + context->base.copy = __glXDRIcontextCopy; + context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + context->base.wait = __glXDRIcontextWait; + + create_driver_context(context, screen, config, driShare, num_attribs, + attribs, error); + if (context->driContext == NULL) { + free(context); + return NULL; + } + + return &context->base; +} + +static void +__glXDRIinvalidateBuffers(DrawablePtr pDraw, void *priv, XID id) +{ +#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, + DrawablePtr pDraw, + XID drawId, + int type, XID glxDrawId, __GLXconfig * glxConfig) +{ + __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; + __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; + __GLXDRIdrawable *private; + + private = calloc(1, sizeof *private); + if (private == NULL) + return NULL; + + private->screen = driScreen; + if (!__glXDrawableInit(&private->base, screen, + pDraw, type, glxDrawId, glxConfig)) { + free(private); + return NULL; + } + + private->base.destroy = __glXDRIdrawableDestroy; + private->base.swapBuffers = __glXDRIdrawableSwapBuffers; + private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + private->base.waitGL = __glXDRIdrawableWaitGL; + private->base.waitX = __glXDRIdrawableWaitX; + + if (DRI2CreateDrawable2(client, pDraw, drawId, + __glXDRIinvalidateBuffers, private, + &private->dri2_id)) { + free(private); + return NULL; + } + + private->driDrawable = + (*driScreen->dri2->createNewDrawable) (driScreen->driScreen, + config->driConfig, private); + + return &private->base; +} + +static __DRIbuffer * +dri2GetBuffers(__DRIdrawable * driDrawable, + int *width, int *height, + unsigned int *attachments, int count, + int *out_count, void *loaderPrivate) +{ + __GLXDRIdrawable *private = loaderPrivate; + DRI2BufferPtr *buffers; + int i; + int j; + + buffers = DRI2GetBuffers(private->base.pDraw, + width, height, attachments, count, out_count); + if (*out_count > MAX_DRAWABLE_BUFFERS) { + *out_count = 0; + return NULL; + } + + private->width = *width; + private->height = *height; + + /* This assumes the DRI2 buffer attachment tokens matches the + * __DRIbuffer tokens. */ + j = 0; + for (i = 0; i < *out_count; i++) { + /* Do not send the real front buffer of a window to the client. + */ + if ((private->base.pDraw->type == DRAWABLE_WINDOW) + && (buffers[i]->attachment == DRI2BufferFrontLeft)) { + continue; + } + + private->buffers[j].attachment = buffers[i]->attachment; + private->buffers[j].name = buffers[i]->name; + private->buffers[j].pitch = buffers[i]->pitch; + private->buffers[j].cpp = buffers[i]->cpp; + private->buffers[j].flags = buffers[i]->flags; + j++; + } + + *out_count = j; + return private->buffers; +} + +static __DRIbuffer * +dri2GetBuffersWithFormat(__DRIdrawable * driDrawable, + int *width, int *height, + unsigned int *attachments, int count, + int *out_count, void *loaderPrivate) +{ + __GLXDRIdrawable *private = loaderPrivate; + DRI2BufferPtr *buffers; + int i; + int j = 0; + + buffers = DRI2GetBuffersWithFormat(private->base.pDraw, + width, height, attachments, count, + out_count); + if (*out_count > MAX_DRAWABLE_BUFFERS) { + *out_count = 0; + return NULL; + } + + private->width = *width; + private->height = *height; + + /* This assumes the DRI2 buffer attachment tokens matches the + * __DRIbuffer tokens. */ + for (i = 0; i < *out_count; i++) { + /* Do not send the real front buffer of a window to the client. + */ + if ((private->base.pDraw->type == DRAWABLE_WINDOW) + && (buffers[i]->attachment == DRI2BufferFrontLeft)) { + continue; + } + + private->buffers[j].attachment = buffers[i]->attachment; + private->buffers[j].name = buffers[i]->name; + private->buffers[j].pitch = buffers[i]->pitch; + private->buffers[j].cpp = buffers[i]->cpp; + private->buffers[j].flags = buffers[i]->flags; + j++; + } + + *out_count = j; + return private->buffers; +} + +static void +dri2FlushFrontBuffer(__DRIdrawable * driDrawable, void *loaderPrivate) +{ + (void) driDrawable; + __glXDRIdrawableWaitGL((__GLXdrawable *) loaderPrivate); +} + +static const __DRIdri2LoaderExtension loaderExtension = { + {__DRI_DRI2_LOADER, 3}, + dri2GetBuffers, + dri2FlushFrontBuffer, + dri2GetBuffersWithFormat, +}; + +#ifdef __DRI_USE_INVALIDATE +static const __DRIuseInvalidateExtension dri2UseInvalidate = { + {__DRI_USE_INVALIDATE, 1} +}; +#endif + +static const __DRIextension *loader_extensions[] = { + &systemTimeExtension.base, + &loaderExtension.base, +#ifdef __DRI_USE_INVALIDATE + &dri2UseInvalidate.base, +#endif + NULL +}; + +static Bool +glxDRIEnterVT(ScrnInfoPtr scrn) +{ + Bool ret; + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(xf86ScrnToScreen(scrn)); + + LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); + + scrn->EnterVT = screen->enterVT; + + ret = scrn->EnterVT(scrn); + + screen->enterVT = scrn->EnterVT; + scrn->EnterVT = glxDRIEnterVT; + + if (!ret) + return FALSE; + + glxResumeClients(); + + return TRUE; +} + +static void +glxDRILeaveVT(ScrnInfoPtr scrn) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(xf86ScrnToScreen(scrn)); + + LogMessageVerbSigSafe(X_INFO, -1, "AIGLX: Suspending AIGLX clients for VT switch\n"); + + glxSuspendClients(); + + scrn->LeaveVT = screen->leaveVT; + (*screen->leaveVT) (scrn); + screen->leaveVT = scrn->LeaveVT; + scrn->LeaveVT = glxDRILeaveVT; +} + +/** + * Initialize extension flags in glx_enable_bits when a new screen is created + * + * @param screen The screen where glx_enable_bits are to be set. + */ +static void +initializeExtensions(__GLXDRIscreen * screen) +{ + ScreenPtr pScreen = screen->base.pScreen; + const __DRIextension **extensions; + int i; + + extensions = screen->core->getExtensions(screen->driScreen); + + __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer"); + LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n"); + + +#if __DRI_DRI2_VERSION >= 3 + if (screen->dri2->base.version >= 3) { + __glXEnableExtension(screen->glx_enable_bits, + "GLX_ARB_create_context"); + __glXEnableExtension(screen->glx_enable_bits, + "GLX_ARB_create_context_profile"); + __glXEnableExtension(screen->glx_enable_bits, + "GLX_EXT_create_context_es2_profile"); + LogMessage(X_INFO, "AIGLX: enabled GLX_ARB_create_context\n"); + LogMessage(X_INFO, "AIGLX: enabled GLX_ARB_create_context_profile\n"); + LogMessage(X_INFO, + "AIGLX: enabled GLX_EXT_create_context_es2_profile\n"); + } +#endif + + if (DRI2HasSwapControl(pScreen)) { + __glXEnableExtension(screen->glx_enable_bits, "GLX_INTEL_swap_event"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_swap_control"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_swap_control"); + LogMessage(X_INFO, "AIGLX: enabled GLX_INTEL_swap_event\n"); + LogMessage(X_INFO, + "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n"); + } + + /* enable EXT_framebuffer_sRGB extension (even if there are no sRGB capable fbconfigs) */ + { + __glXEnableExtension(screen->glx_enable_bits, + "GLX_EXT_framebuffer_sRGB"); + LogMessage(X_INFO, "AIGLX: enabled GLX_EXT_framebuffer_sRGB\n"); + } + + /* enable ARB_fbconfig_float extension (even if there are no float fbconfigs) */ + { + __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_fbconfig_float"); + LogMessage(X_INFO, "AIGLX: enabled GLX_ARB_fbconfig_float\n"); + } + + for (i = 0; extensions[i]; i++) { +#ifdef __DRI_READ_DRAWABLE + if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) { + __glXEnableExtension(screen->glx_enable_bits, + "GLX_SGI_make_current_read"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_make_current_read\n"); + } +#endif + +#ifdef __DRI_TEX_BUFFER + if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { + screen->texBuffer = (const __DRItexBufferExtension *) extensions[i]; + /* GLX_EXT_texture_from_pixmap is always enabled. */ + LogMessage(X_INFO, + "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n"); + } +#endif + +#ifdef __DRI2_FLUSH + if (strcmp(extensions[i]->name, __DRI2_FLUSH) == 0 && + extensions[i]->version >= 3) { + screen->flush = (__DRI2flushExtension *) extensions[i]; + } +#endif + +#ifdef __DRI2_ROBUSTNESS + if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0 && + screen->dri2->base.version >= 3) { + __glXEnableExtension(screen->glx_enable_bits, + "GLX_ARB_create_context_robustness"); + LogMessage(X_INFO, + "AIGLX: enabled GLX_ARB_create_context_robustness\n"); + } +#endif + + /* Ignore unknown extensions */ + } +} + +/* white lie */ +extern glx_func_ptr glXGetProcAddressARB(const char *); + +static __GLXscreen * +__glXDRIscreenProbe(ScreenPtr pScreen) +{ + const char *driverName, *deviceName; + __GLXDRIscreen *screen; + size_t buffer_size; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + screen = calloc(1, sizeof *screen); + if (screen == NULL) + return NULL; + + if (!DRI2Connect(serverClient, pScreen, DRI2DriverDRI, + &screen->fd, &driverName, &deviceName)) { + LogMessage(X_INFO, + "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum); + goto handle_error; + } + + screen->base.destroy = __glXDRIscreenDestroy; + screen->base.createContext = __glXDRIscreenCreateContext; + screen->base.createDrawable = __glXDRIscreenCreateDrawable; + screen->base.swapInterval = __glXDRIdrawableSwapInterval; + screen->base.pScreen = pScreen; + + __glXInitExtensionEnableBits(screen->glx_enable_bits); + + screen->driver = + glxProbeDriver(driverName, (void **) &screen->core, __DRI_CORE, 1, + (void **) &screen->dri2, __DRI_DRI2, 1); + if (screen->driver == NULL) { + goto handle_error; + } + + screen->driScreen = + (*screen->dri2->createNewScreen) (pScreen->myNum, + screen->fd, + loader_extensions, + &screen->driConfigs, screen); + + if (screen->driScreen == NULL) { + LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed\n"); + goto handle_error; + } + + initializeExtensions(screen); + + screen->base.fbconfigs = glxConvertConfigs(screen->core, screen->driConfigs, + GLX_WINDOW_BIT | + GLX_PIXMAP_BIT | + GLX_PBUFFER_BIT); + + __glXScreenInit(&screen->base, pScreen); + + /* The first call simply determines the length of the extension string. + * This allows us to allocate some memory to hold the extension string, + * but it requires that we call __glXGetExtensionString a second time. + */ + buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); + if (buffer_size > 0) { + free(screen->base.GLXextensions); + + screen->base.GLXextensions = xnfalloc(buffer_size); + (void) __glXGetExtensionString(screen->glx_enable_bits, + screen->base.GLXextensions); + } + + /* We're going to assume (perhaps incorrectly?) that all DRI2-enabled + * drivers support the required extensions for GLX 1.4. The extensions + * we're assuming are: + * + * - GLX_SGI_make_current_read (1.3) + * - GLX_SGIX_fbconfig (1.3) + * - GLX_SGIX_pbuffer (1.3) + * - GLX_ARB_multisample (1.4) + */ + screen->base.GLXmajor = 1; + screen->base.GLXminor = 4; + + screen->enterVT = pScrn->EnterVT; + pScrn->EnterVT = glxDRIEnterVT; + screen->leaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = glxDRILeaveVT; + + __glXsetGetProcAddress(glXGetProcAddressARB); + + LogMessage(X_INFO, "AIGLX: Loaded and initialized %s\n", driverName); + + return &screen->base; + + handle_error: + if (screen->driver) + dlclose(screen->driver); + + free(screen); + + LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + + return NULL; +} + +_X_EXPORT __GLXprovider __glXDRI2Provider = { + __glXDRIscreenProbe, + "DRI2", + NULL +}; diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c new file mode 100644 index 0000000..a97d027 --- /dev/null +++ b/glx/glxdricommon.c @@ -0,0 +1,323 @@ +/* + * Copyright © 2008 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "glxserver.h" +#include "glxext.h" +#include "glxcontext.h" +#include "glxscreens.h" +#include "glxdricommon.h" + +static int +getUST(int64_t * ust) +{ + struct timeval tv; + + if (ust == NULL) + return -EFAULT; + + if (gettimeofday(&tv, NULL) == 0) { + ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; + return 0; + } + else { + return -errno; + } +} + +const __DRIsystemTimeExtension systemTimeExtension = { + {__DRI_SYSTEM_TIME, 1}, + getUST, + NULL, +}; + +#define __ATTRIB(attrib, field) \ + { attrib, offsetof(__GLXconfig, field) } + +static const struct { + unsigned int attrib, offset; +} attribMap[] = { +__ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits), + __ATTRIB(__DRI_ATTRIB_LEVEL, level), + __ATTRIB(__DRI_ATTRIB_RED_SIZE, redBits), + __ATTRIB(__DRI_ATTRIB_GREEN_SIZE, greenBits), + __ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits), + __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits), + __ATTRIB(__DRI_ATTRIB_DEPTH_SIZE, depthBits), + __ATTRIB(__DRI_ATTRIB_STENCIL_SIZE, stencilBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_RED_SIZE, accumRedBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_GREEN_SIZE, accumGreenBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_BLUE_SIZE, accumBlueBits), + __ATTRIB(__DRI_ATTRIB_ACCUM_ALPHA_SIZE, accumAlphaBits), + __ATTRIB(__DRI_ATTRIB_SAMPLE_BUFFERS, sampleBuffers), + __ATTRIB(__DRI_ATTRIB_SAMPLES, samples), + __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode), + __ATTRIB(__DRI_ATTRIB_STEREO, stereoMode), + __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE, transparentPixel), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, transparentPixel), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE, transparentRed), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE, transparentGreen), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE, transparentBlue), + __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE, transparentAlpha), + __ATTRIB(__DRI_ATTRIB_RED_MASK, redMask), + __ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask), + __ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask), + __ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask), + __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth), + __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight), + __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS, maxPbufferPixels), + __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH, optimalPbufferWidth), + __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT, optimalPbufferHeight), + __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, swapMethod), + __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb), + __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba), + __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture), + __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted), + __ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable), + }; + +static void +setScalar(__GLXconfig * config, unsigned int attrib, unsigned int value) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(attribMap); i++) + if (attribMap[i].attrib == attrib) { + *(unsigned int *) ((char *) config + attribMap[i].offset) = value; + return; + } +} + +static __GLXconfig * +createModeFromConfig(const __DRIcoreExtension * core, + const __DRIconfig * driConfig, + unsigned int visualType, unsigned int drawableType) +{ + __GLXDRIconfig *config; + GLint renderType = 0; + unsigned int attrib, value; + int i; + + config = calloc(1, sizeof *config); + + config->driConfig = driConfig; + + i = 0; + while (core->indexConfigAttrib(driConfig, i++, &attrib, &value)) { + switch (attrib) { + case __DRI_ATTRIB_RENDER_TYPE: + if (value & __DRI_ATTRIB_RGBA_BIT) + renderType |= GLX_RGBA_BIT; + if (value & __DRI_ATTRIB_COLOR_INDEX_BIT) + renderType |= GLX_COLOR_INDEX_BIT; + if (value & __DRI_ATTRIB_FLOAT_BIT) + renderType |= GLX_RGBA_FLOAT_BIT_ARB; + if (value & __DRI_ATTRIB_UNSIGNED_FLOAT_BIT) + renderType |= GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT; + break; + case __DRI_ATTRIB_CONFIG_CAVEAT: + if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG) + config->config.visualRating = GLX_NON_CONFORMANT_CONFIG; + else if (value & __DRI_ATTRIB_SLOW_BIT) + config->config.visualRating = GLX_SLOW_CONFIG; + else + config->config.visualRating = GLX_NONE; + break; + case __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS: + config->config.bindToTextureTargets = 0; + if (value & __DRI_ATTRIB_TEXTURE_1D_BIT) + config->config.bindToTextureTargets |= GLX_TEXTURE_1D_BIT_EXT; + if (value & __DRI_ATTRIB_TEXTURE_2D_BIT) + config->config.bindToTextureTargets |= GLX_TEXTURE_2D_BIT_EXT; + if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT) + config->config.bindToTextureTargets |= + GLX_TEXTURE_RECTANGLE_BIT_EXT; + break; + default: + setScalar(&config->config, attrib, value); + break; + } + } + + config->config.next = NULL; + config->config.xRenderable = GL_TRUE; + config->config.visualType = visualType; + config->config.renderType = renderType; + config->config.drawableType = drawableType; + config->config.yInverted = GL_TRUE; + + return &config->config; +} + +static Bool +render_type_is_pbuffer_only(unsigned renderType) +{ + /* The GL_ARB_color_buffer_float spec says: + * + * "Note that floating point rendering is only supported for + * GLXPbuffer drawables. The GLX_DRAWABLE_TYPE attribute of the + * GLXFBConfig must have the GLX_PBUFFER_BIT bit set and the + * GLX_RENDER_TYPE attribute must have the GLX_RGBA_FLOAT_BIT set." + */ + return !!(renderType & (__DRI_ATTRIB_UNSIGNED_FLOAT_BIT + | __DRI_ATTRIB_FLOAT_BIT)); +} + +__GLXconfig * +glxConvertConfigs(const __DRIcoreExtension * core, + const __DRIconfig ** configs, unsigned int drawableType) +{ + __GLXconfig head, *tail; + int i; + + tail = &head; + head.next = NULL; + + for (i = 0; configs[i]; i++) { + unsigned renderType = 0; + if (core->getConfigAttrib(configs[i], __DRI_ATTRIB_RENDER_TYPE, + &renderType)) { + if (render_type_is_pbuffer_only(renderType) && + !(drawableType & GLX_PBUFFER_BIT)) + continue; + } + /* Add all the others */ + tail->next = createModeFromConfig(core, + configs[i], GLX_TRUE_COLOR, + drawableType); + if (tail->next == NULL) + break; + + tail = tail->next; + } + + for (i = 0; configs[i]; i++) { + int renderType = 0; + if (core->getConfigAttrib(configs[i], __DRI_ATTRIB_RENDER_TYPE, + &renderType)) { + if (render_type_is_pbuffer_only(renderType) && + !(drawableType & GLX_PBUFFER_BIT)) + continue; + } + /* Add all the others */ + tail->next = createModeFromConfig(core, + configs[i], GLX_DIRECT_COLOR, + drawableType); + if (tail->next == NULL) + break; + + tail = tail->next; + } + + return head.next; +} + +static const char dri_driver_path[] = DRI_DRIVER_PATH; + +/* Temporary define to allow building without a dri_interface.h from + * updated Mesa. Some day when we don't care about Mesa that old any + * more this can be removed. + */ +#ifndef __DRI_DRIVER_GET_EXTENSIONS +#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions" +#endif + +void * +glxProbeDriver(const char *driverName, + void **coreExt, const char *coreName, int coreVersion, + void **renderExt, const char *renderName, int renderVersion) +{ + int i; + void *driver; + char filename[PATH_MAX]; + char *get_extensions_name; + const __DRIextension **extensions = NULL; + + snprintf(filename, sizeof filename, "%s/%s_dri.so", + dri_driver_path, driverName); + + driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (driver == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto cleanup_failure; + } + + if (asprintf(&get_extensions_name, "%s_%s", + __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) { + const __DRIextension **(*get_extensions)(void); + + get_extensions = dlsym(driver, get_extensions_name); + if (get_extensions) + extensions = get_extensions(); + free(get_extensions_name); + } + + if (!extensions) + extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS); + if (extensions == NULL) { + LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n", + driverName, dlerror()); + goto cleanup_failure; + } + + for (i = 0; extensions[i]; i++) { + if (strcmp(extensions[i]->name, coreName) == 0 && + extensions[i]->version >= coreVersion) { + *coreExt = (void *) extensions[i]; + } + + if (strcmp(extensions[i]->name, renderName) == 0 && + extensions[i]->version >= renderVersion) { + *renderExt = (void *) extensions[i]; + } + } + + if (*coreExt == NULL || *renderExt == NULL) { + LogMessage(X_ERROR, + "AIGLX error: %s does not export required DRI extension\n", + driverName); + goto cleanup_failure; + } + return driver; + + cleanup_failure: + if (driver) + dlclose(driver); + *coreExt = *renderExt = NULL; + return NULL; +} diff --git a/glx/glxdricommon.h b/glx/glxdricommon.h new file mode 100644 index 0000000..f4fcf00 --- /dev/null +++ b/glx/glxdricommon.h @@ -0,0 +1,46 @@ +/* + * Copyright © 2008 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifndef _GLX_dri_common_h +#define _GLX_dri_common_h + +typedef struct __GLXDRIconfig __GLXDRIconfig; +struct __GLXDRIconfig { + __GLXconfig config; + const __DRIconfig *driConfig; +}; + +__GLXconfig *glxConvertConfigs(const __DRIcoreExtension * core, + const __DRIconfig ** configs, + unsigned int drawableType); + +extern const __DRIsystemTimeExtension systemTimeExtension; + +void *glxProbeDriver(const char *name, + void **coreExt, const char *coreName, int coreVersion, + void **renderExt, const char *renderName, + int renderVersion); + +#endif diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c new file mode 100644 index 0000000..cbc109a --- /dev/null +++ b/glx/glxdriswrast.c @@ -0,0 +1,499 @@ +/* + * Copyright © 2008 George Sapountzis + * Copyright © 2008 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "gcstruct.h" +#include "os.h" + +#include "glxserver.h" +#include "glxutil.h" +#include "glxdricommon.h" + +#include "extension_string.h" + +/* RTLD_LOCAL is not defined on Cygwin */ +#ifdef __CYGWIN__ +#ifndef RTLD_LOCAL +#define RTLD_LOCAL 0 +#endif +#endif + +typedef struct __GLXDRIscreen __GLXDRIscreen; +typedef struct __GLXDRIcontext __GLXDRIcontext; +typedef struct __GLXDRIdrawable __GLXDRIdrawable; + +struct __GLXDRIscreen { + __GLXscreen base; + __DRIscreen *driScreen; + void *driver; + + const __DRIcoreExtension *core; + const __DRIswrastExtension *swrast; + const __DRIcopySubBufferExtension *copySubBuffer; + const __DRItexBufferExtension *texBuffer; + const __DRIconfig **driConfigs; +}; + +struct __GLXDRIcontext { + __GLXcontext base; + __DRIcontext *driContext; +}; + +struct __GLXDRIdrawable { + __GLXdrawable base; + __DRIdrawable *driDrawable; + __GLXDRIscreen *screen; + + GCPtr gc; /* scratch GC for span drawing */ + GCPtr swapgc; /* GC for swapping the color buffers */ +}; + +static void +__glXDRIdrawableDestroy(__GLXdrawable * drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + const __DRIcoreExtension *core = private->screen->core; + + (*core->destroyDrawable) (private->driDrawable); + + FreeGC(private->gc, (GContext) 0); + FreeGC(private->swapgc, (GContext) 0); + + __glXDrawableRelease(drawable); + + free(private); +} + +static GLboolean +__glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable * drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + const __DRIcoreExtension *core = private->screen->core; + + (*core->swapBuffers) (private->driDrawable); + + return TRUE; +} + +static void +__glXDRIdrawableCopySubBuffer(__GLXdrawable * basePrivate, + int x, int y, int w, int h) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + const __DRIcopySubBufferExtension *copySubBuffer = + private->screen->copySubBuffer; + + if (copySubBuffer) + (*copySubBuffer->copySubBuffer) (private->driDrawable, x, y, w, h); +} + +static void +__glXDRIcontextDestroy(__GLXcontext * baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + (*screen->core->destroyContext) (context->driContext); + __glXContextDestroy(&context->base); + free(context); +} + +static int +__glXDRIcontextMakeCurrent(__GLXcontext * baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + return (*screen->core->bindContext) (context->driContext, + draw->driDrawable, read->driDrawable); +} + +static int +__glXDRIcontextLoseCurrent(__GLXcontext * baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; + + return (*screen->core->unbindContext) (context->driContext); +} + +static int +__glXDRIcontextCopy(__GLXcontext * baseDst, __GLXcontext * baseSrc, + unsigned long mask) +{ + __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; + __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; + __GLXDRIscreen *screen = (__GLXDRIscreen *) dst->base.pGlxScreen; + + return (*screen->core->copyContext) (dst->driContext, + src->driContext, mask); +} + +#ifdef __DRI_TEX_BUFFER + +static int +__glXDRIbindTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * glxPixmap) +{ + __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) glxPixmap; + const __DRItexBufferExtension *texBuffer = drawable->screen->texBuffer; + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + if (texBuffer == NULL) + return Success; + +#if __DRI_TEX_BUFFER_VERSION >= 2 + if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) { + (*texBuffer->setTexBuffer2) (context->driContext, + glxPixmap->target, + glxPixmap->format, drawable->driDrawable); + } + else +#endif + texBuffer->setTexBuffer(context->driContext, + glxPixmap->target, drawable->driDrawable); + + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap) +{ + /* FIXME: Just unbind the texture? */ + return Success; +} + +#else + +static int +__glXDRIbindTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * glxPixmap) +{ + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext * baseContext, + int buffer, __GLXdrawable * pixmap) +{ + return Success; +} + +#endif + +static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { + __glXDRIbindTexImage, + __glXDRIreleaseTexImage +}; + +static void +__glXDRIscreenDestroy(__GLXscreen * baseScreen) +{ + int i; + + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + + (*screen->core->destroyScreen) (screen->driScreen); + + dlclose(screen->driver); + + __glXScreenDestroy(baseScreen); + + if (screen->driConfigs) { + for (i = 0; screen->driConfigs[i] != NULL; i++) + free((__DRIconfig **) screen->driConfigs[i]); + free(screen->driConfigs); + } + + free(screen); +} + +static __GLXcontext * +__glXDRIscreenCreateContext(__GLXscreen * baseScreen, + __GLXconfig * glxConfig, + __GLXcontext * baseShareContext, + unsigned num_attribs, + const uint32_t *attribs, + int *error) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + __GLXDRIcontext *context, *shareContext; + __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; + const __DRIcoreExtension *core = screen->core; + __DRIcontext *driShare; + + /* DRISWRAST won't support createContextAttribs, so these parameters will + * never be used. + */ + (void) num_attribs; + (void) attribs; + (void) error; + + shareContext = (__GLXDRIcontext *) baseShareContext; + if (shareContext) + driShare = shareContext->driContext; + else + driShare = NULL; + + context = calloc(1, sizeof *context); + if (context == NULL) + return NULL; + + context->base.destroy = __glXDRIcontextDestroy; + context->base.makeCurrent = __glXDRIcontextMakeCurrent; + context->base.loseCurrent = __glXDRIcontextLoseCurrent; + context->base.copy = __glXDRIcontextCopy; + context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + + context->driContext = + (*core->createNewContext) (screen->driScreen, + config->driConfig, driShare, context); + + return &context->base; +} + +static __GLXdrawable * +__glXDRIscreenCreateDrawable(ClientPtr client, + __GLXscreen * screen, + DrawablePtr pDraw, + XID drawId, + int type, XID glxDrawId, __GLXconfig * glxConfig) +{ + XID gcvals[2]; + int status; + __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; + __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; + __GLXDRIdrawable *private; + + private = calloc(1, sizeof *private); + if (private == NULL) + return NULL; + + private->screen = driScreen; + if (!__glXDrawableInit(&private->base, screen, + pDraw, type, glxDrawId, glxConfig)) { + free(private); + return NULL; + } + + private->base.destroy = __glXDRIdrawableDestroy; + private->base.swapBuffers = __glXDRIdrawableSwapBuffers; + private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + + gcvals[0] = GXcopy; + private->gc = + CreateGC(pDraw, GCFunction, gcvals, &status, (XID) 0, serverClient); + gcvals[1] = FALSE; + private->swapgc = + CreateGC(pDraw, GCFunction | GCGraphicsExposures, gcvals, &status, + (XID) 0, serverClient); + + private->driDrawable = + (*driScreen->swrast->createNewDrawable) (driScreen->driScreen, + config->driConfig, private); + + return &private->base; +} + +static void +swrastGetDrawableInfo(__DRIdrawable * draw, + int *x, int *y, int *w, int *h, void *loaderPrivate) +{ + __GLXDRIdrawable *drawable = loaderPrivate; + DrawablePtr pDraw = drawable->base.pDraw; + + *x = pDraw->x; + *y = pDraw->x; + *w = pDraw->width; + *h = pDraw->height; +} + +static void +swrastPutImage(__DRIdrawable * draw, int op, + int x, int y, int w, int h, char *data, void *loaderPrivate) +{ + __GLXDRIdrawable *drawable = loaderPrivate; + DrawablePtr pDraw = drawable->base.pDraw; + GCPtr gc; + + switch (op) { + case __DRI_SWRAST_IMAGE_OP_DRAW: + gc = drawable->gc; + break; + case __DRI_SWRAST_IMAGE_OP_SWAP: + gc = drawable->swapgc; + break; + default: + return; + } + + ValidateGC(pDraw, gc); + + gc->ops->PutImage(pDraw, gc, pDraw->depth, x, y, w, h, 0, ZPixmap, data); +} + +static void +swrastGetImage(__DRIdrawable * draw, + int x, int y, int w, int h, char *data, void *loaderPrivate) +{ + __GLXDRIdrawable *drawable = loaderPrivate; + DrawablePtr pDraw = drawable->base.pDraw; + ScreenPtr pScreen = pDraw->pScreen; + + pScreen->GetImage(pDraw, x, y, w, h, ZPixmap, ~0L, data); +} + +static const __DRIswrastLoaderExtension swrastLoaderExtension = { + {__DRI_SWRAST_LOADER, 1}, + swrastGetDrawableInfo, + swrastPutImage, + swrastGetImage +}; + +static const __DRIextension *loader_extensions[] = { + &systemTimeExtension.base, + &swrastLoaderExtension.base, + NULL +}; + +static void +initializeExtensions(__GLXDRIscreen * screen) +{ + const __DRIextension **extensions; + int i; + + extensions = screen->core->getExtensions(screen->driScreen); + + for (i = 0; extensions[i]; i++) { +#ifdef __DRI_COPY_SUB_BUFFER + if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { + screen->copySubBuffer = + (const __DRIcopySubBufferExtension *) extensions[i]; + /* GLX_MESA_copy_sub_buffer is always enabled. */ + } +#endif + +#ifdef __DRI_TEX_BUFFER + if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { + screen->texBuffer = (const __DRItexBufferExtension *) extensions[i]; + /* GLX_EXT_texture_from_pixmap is always enabled. */ + } +#endif + /* Ignore unknown extensions */ + } +} + +/* white lie */ +extern glx_func_ptr glXGetProcAddressARB(const char *); + +static __GLXscreen * +__glXDRIscreenProbe(ScreenPtr pScreen) +{ + const char *driverName = "swrast"; + __GLXDRIscreen *screen; + + screen = calloc(1, sizeof *screen); + if (screen == NULL) + return NULL; + + screen->base.destroy = __glXDRIscreenDestroy; + screen->base.createContext = __glXDRIscreenCreateContext; + screen->base.createDrawable = __glXDRIscreenCreateDrawable; + screen->base.swapInterval = NULL; + screen->base.pScreen = pScreen; + + screen->driver = glxProbeDriver(driverName, + (void **) &screen->core, + __DRI_CORE, 1, + (void **) &screen->swrast, + __DRI_SWRAST, 1); + if (screen->driver == NULL) { + goto handle_error; + } + + screen->driScreen = + (*screen->swrast->createNewScreen) (pScreen->myNum, + loader_extensions, + &screen->driConfigs, screen); + + if (screen->driScreen == NULL) { + LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed\n"); + goto handle_error; + } + + initializeExtensions(screen); + + screen->base.fbconfigs = glxConvertConfigs(screen->core, screen->driConfigs, + GLX_WINDOW_BIT | + GLX_PIXMAP_BIT | + GLX_PBUFFER_BIT); + + __glXScreenInit(&screen->base, pScreen); + + screen->base.GLXmajor = 1; + screen->base.GLXminor = 4; + + __glXsetGetProcAddress(glXGetProcAddressARB); + + LogMessage(X_INFO, "AIGLX: Loaded and initialized %s\n", driverName); + + return &screen->base; + + handle_error: + if (screen->driver) + dlclose(screen->driver); + + free(screen); + + LogMessage(X_ERROR, "GLX: could not load software renderer\n"); + + return NULL; +} + +_X_EXPORT __GLXprovider __glXDRISWRastProvider = { + __glXDRIscreenProbe, + "DRISWRAST", + NULL +}; diff --git a/glx/glxext.c b/glx/glxext.c new file mode 100644 index 0000000..316b4f6 --- /dev/null +++ b/glx/glxext.c @@ -0,0 +1,615 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include +#include +#include +#include "privates.h" +#include +#include "extinit.h" +#include "glx_extinit.h" +#include "unpack.h" +#include "glxutil.h" +#include "glxext.h" +#include "indirect_table.h" +#include "indirect_util.h" + +/* +** The last context used by the server. It is the context that is current +** from the server's perspective. +*/ +__GLXcontext *__glXLastContext; + +/* +** X resources. +*/ +RESTYPE __glXContextRes; +RESTYPE __glXDrawableRes; + +/* +** Reply for most singles. +*/ +xGLXSingleReply __glXReply; + +static DevPrivateKeyRec glxClientPrivateKeyRec; + +#define glxClientPrivateKey (&glxClientPrivateKeyRec) + +/* +** Forward declarations. +*/ +static int __glXDispatch(ClientPtr); + +/* +** Called when the extension is reset. +*/ +static void +ResetExtension(ExtensionEntry * extEntry) +{ + __glXFlushContextCache(); +} + +/* +** Reset state used to keep track of large (multi-request) commands. +*/ +void +__glXResetLargeCommandStatus(__GLXclientState * cl) +{ + cl->largeCmdBytesSoFar = 0; + cl->largeCmdBytesTotal = 0; + cl->largeCmdRequestsSoFar = 0; + cl->largeCmdRequestsTotal = 0; +} + +/* + * This procedure is called when the client who created the context goes away + * OR when glXDestroyContext is called. In either case, all we do is flag that + * the ID is no longer valid, and (maybe) free the context. + */ +static int +ContextGone(__GLXcontext * cx, XID id) +{ + cx->idExists = GL_FALSE; + if (!cx->currentClient) { + __glXFreeContext(cx); + } + + return True; +} + +static __GLXcontext *glxPendingDestroyContexts; +static __GLXcontext *glxAllContexts; +static int glxServerLeaveCount; +static int glxBlockClients; + +/* +** Destroy routine that gets called when a drawable is freed. A drawable +** contains the ancillary buffers needed for rendering. +*/ +static Bool +DrawableGone(__GLXdrawable * glxPriv, XID xid) +{ + __GLXcontext *c, *next; + + if (glxPriv->type == GLX_DRAWABLE_WINDOW) { + /* If this was created by glXCreateWindow, free the matching resource */ + if (glxPriv->drawId != glxPriv->pDraw->id) { + if (xid == glxPriv->drawId) + FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE); + else + FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE); + } + /* otherwise this window was implicitly created by MakeCurrent */ + } + + for (c = glxAllContexts; c; c = next) { + next = c->next; + if (c->currentClient && + (c->drawPriv == glxPriv || c->readPriv == glxPriv)) { + /* just force a re-bind the next time through */ + (*c->loseCurrent) (c); + if (c == __glXLastContext) + __glXFlushContextCache(); + } + if (c->drawPriv == glxPriv) + c->drawPriv = NULL; + if (c->readPriv == glxPriv) + c->readPriv = NULL; + } + + /* drop our reference to any backing pixmap */ + if (glxPriv->type == GLX_DRAWABLE_PIXMAP) + glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr) glxPriv->pDraw); + + glxPriv->destroy(glxPriv); + + return True; +} + +Bool +__glXAddContext(__GLXcontext * cx) +{ + /* Register this context as a resource. + */ + if (!AddResource(cx->id, __glXContextRes, (pointer)cx)) { + return False; + } + + cx->next = glxAllContexts; + glxAllContexts = cx; + return True; +} + +static void +__glXRemoveFromContextList(__GLXcontext * cx) +{ + __GLXcontext *c, *prev; + + if (cx == glxAllContexts) + glxAllContexts = cx->next; + else { + prev = glxAllContexts; + for (c = glxAllContexts; c; c = c->next) { + if (c == cx) + prev->next = c->next; + prev = c; + } + } +} + +/* +** Free a context. +*/ +GLboolean +__glXFreeContext(__GLXcontext * cx) +{ + if (cx->idExists || cx->currentClient) + return GL_FALSE; + + __glXRemoveFromContextList(cx); + + free(cx->feedbackBuf); + free(cx->selectBuf); + if (cx == __glXLastContext) { + __glXFlushContextCache(); + } + + /* We can get here through both regular dispatching from + * __glXDispatch() or as a callback from the resource manager. In + * the latter case we need to lift the DRI lock manually. */ + + if (!glxBlockClients) { + __glXleaveServer(GL_FALSE); + cx->destroy(cx); + __glXenterServer(GL_FALSE); + } + else { + cx->next = glxPendingDestroyContexts; + glxPendingDestroyContexts = cx; + } + + return GL_TRUE; +} + +/************************************************************************/ + +/* +** These routines can be used to check whether a particular GL command +** has caused an error. Specifically, we use them to check whether a +** given query has caused an error, in which case a zero-length data +** reply is sent to the client. +*/ + +static GLboolean errorOccured = GL_FALSE; + +/* +** The GL was will call this routine if an error occurs. +*/ +void +__glXErrorCallBack(GLenum code) +{ + errorOccured = GL_TRUE; +} + +/* +** Clear the error flag before calling the GL command. +*/ +void +__glXClearErrorOccured(void) +{ + errorOccured = GL_FALSE; +} + +/* +** Check if the GL command caused an error. +*/ +GLboolean +__glXErrorOccured(void) +{ + return errorOccured; +} + +static int __glXErrorBase; +int __glXEventBase; + +int +__glXError(int error) +{ + return __glXErrorBase + error; +} + +__GLXclientState * +glxGetClient(ClientPtr pClient) +{ + return dixLookupPrivate(&pClient->devPrivates, glxClientPrivateKey); +} + +static void +glxClientCallback(CallbackListPtr *list, pointer closure, pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + __GLXclientState *cl = glxGetClient(pClient); + __GLXcontext *c, *next; + + switch (pClient->clientState) { + case ClientStateRunning: + cl->client = pClient; + break; + + case ClientStateGone: + /* detach from all current contexts */ + for (c = glxAllContexts; c; c = next) { + next = c->next; + if (c->currentClient == pClient) { + c->loseCurrent(c); + c->currentClient = NULL; + __glXFreeContext(c); + } + } + + free(cl->returnBuf); + free(cl->largeCmdBuf); + free(cl->GLClientextensions); + break; + + default: + break; + } +} + +/************************************************************************/ + +static __GLXprovider *__glXProviderStack; + +void +GlxPushProvider(__GLXprovider * provider) +{ + provider->next = __glXProviderStack; + __glXProviderStack = provider; +} + +/* +** Initialize the GLX extension. +*/ +void +GlxExtensionInit(void) +{ + ExtensionEntry *extEntry; + ScreenPtr pScreen; + int i; + __GLXprovider *p, **stack; + Bool glx_provided = False; + + if (serverGeneration == 1) { + for (stack = &__glXProviderStack; *stack; stack = &(*stack)->next) + ; + *stack = &__glXDRISWRastProvider; + } + + __glXContextRes = CreateNewResourceType((DeleteType) ContextGone, + "GLXContext"); + __glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone, + "GLXDrawable"); + if (!__glXContextRes || !__glXDrawableRes) + return; + + if (!dixRegisterPrivateKey + (&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(__GLXclientState))) + return; + if (!AddCallback(&ClientStateCallback, glxClientCallback, 0)) + return; + + for (i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + + for (p = __glXProviderStack; p != NULL; p = p->next) { + __GLXscreen *glxScreen; + + glxScreen = p->screenProbe(pScreen); + if (glxScreen != NULL) { + if (glxScreen->GLXminor < glxMinorVersion) + glxMinorVersion = glxScreen->GLXminor; + LogMessage(X_INFO, + "GLX: Initialized %s GL provider for screen %d\n", + p->name, i); + break; + } + + } + + if (!p) + LogMessage(X_INFO, + "GLX: no usable GL providers found for screen %d\n", i); + else + glx_provided = True; + } + + /* don't register extension if GL is not provided on any screen */ + if (!glx_provided) + return; + + /* + ** Add extension to server extensions. + */ + extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS, + __GLX_NUMBER_ERRORS, __glXDispatch, + __glXDispatch, ResetExtension, StandardMinorOpcode); + if (!extEntry) { + FatalError("__glXExtensionInit: AddExtensions failed\n"); + return; + } + if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) { + ErrorF("__glXExtensionInit: AddExtensionAlias failed\n"); + return; + } + + __glXErrorBase = extEntry->errorBase; + __glXEventBase = extEntry->eventBase; +#if PRESENT + __glXregisterPresentCompleteNotify(); +#endif +} + +/************************************************************************/ + +void +__glXFlushContextCache(void) +{ + __glXLastContext = 0; +} + +/* +** Make a context the current one for the GL (in this implementation, there +** is only one instance of the GL, and we use it to serve all GL clients by +** switching it between different contexts). While we are at it, look up +** a context by its tag and return its (__GLXcontext *). +*/ +__GLXcontext * +__glXForceCurrent(__GLXclientState * cl, GLXContextTag tag, int *error) +{ + __GLXcontext *cx; + + /* + ** See if the context tag is legal; it is managed by the extension, + ** so if it's invalid, we have an implementation error. + */ + cx = __glXLookupContextByTag(cl, tag); + if (!cx) { + cl->client->errorValue = tag; + *error = __glXError(GLXBadContextTag); + return 0; + } + + if (!cx->isDirect) { + if (cx->drawPriv == NULL) { + /* + ** The drawable has vanished. It must be a window, because only + ** windows can be destroyed from under us; GLX pixmaps are + ** refcounted and don't go away until no one is using them. + */ + *error = __glXError(GLXBadCurrentWindow); + return 0; + } + } + + if (cx->wait && (*cx->wait) (cx, cl, error)) + return NULL; + + if (cx == __glXLastContext) { + /* No need to re-bind */ + return cx; + } + + /* Make this context the current one for the GL. */ + if (!cx->isDirect) { + if (!(*cx->makeCurrent) (cx)) { + /* Bind failed, and set the error code. Bummer */ + cl->client->errorValue = cx->id; + *error = __glXError(GLXBadContextState); + return 0; + } + } + __glXLastContext = cx; + return cx; +} + +/************************************************************************/ + +void +glxSuspendClients(void) +{ + int i; + + for (i = 1; i < currentMaxClients; i++) { + if (clients[i] && glxGetClient(clients[i])->inUse) + IgnoreClient(clients[i]); + } + + glxBlockClients = TRUE; +} + +void +glxResumeClients(void) +{ + __GLXcontext *cx, *next; + int i; + + glxBlockClients = FALSE; + + for (i = 1; i < currentMaxClients; i++) { + if (clients[i] && glxGetClient(clients[i])->inUse) + AttendClient(clients[i]); + } + + __glXleaveServer(GL_FALSE); + for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) { + next = cx->next; + + cx->destroy(cx); + } + glxPendingDestroyContexts = NULL; + __glXenterServer(GL_FALSE); +} + +static void +__glXnopEnterServer(GLboolean rendering) +{ +} + +static void +__glXnopLeaveServer(GLboolean rendering) +{ +} + +static void (*__glXenterServerFunc) (GLboolean) = __glXnopEnterServer; +static void (*__glXleaveServerFunc) (GLboolean) = __glXnopLeaveServer; + +void +__glXsetEnterLeaveServerFuncs(void (*enter) (GLboolean), + void (*leave) (GLboolean)) +{ + __glXenterServerFunc = enter; + __glXleaveServerFunc = leave; +} + +void +__glXenterServer(GLboolean rendering) +{ + glxServerLeaveCount--; + + if (glxServerLeaveCount == 0) + (*__glXenterServerFunc) (rendering); +} + +void +__glXleaveServer(GLboolean rendering) +{ + if (glxServerLeaveCount == 0) + (*__glXleaveServerFunc) (rendering); + + glxServerLeaveCount++; +} + +static glx_gpa_proc _get_proc_address; + +void +__glXsetGetProcAddress(glx_gpa_proc get_proc_address) +{ + _get_proc_address = get_proc_address; +} + +void *__glGetProcAddress(const char *proc) +{ + void *ret = _get_proc_address(proc); + + return ret ? ret : NoopDDA; +} + +/* +** Top level dispatcher; all commands are executed from here down. +*/ +static int +__glXDispatch(ClientPtr client) +{ + REQUEST(xGLXSingleReq); + CARD8 opcode; + __GLXdispatchSingleProcPtr proc; + __GLXclientState *cl; + int retval; + + opcode = stuff->glxCode; + cl = glxGetClient(client); + /* Mark it in use so we suspend it on VT switch. */ + cl->inUse = TRUE; + + /* + ** If we're expecting a glXRenderLarge request, this better be one. + */ + if ((cl->largeCmdRequestsSoFar != 0) && (opcode != X_GLXRenderLarge)) { + client->errorValue = stuff->glxCode; + return __glXError(GLXBadLargeRequest); + } + + /* If we're currently blocking GLX clients, just put this guy to + * sleep, reset the request and return. */ + if (glxBlockClients) { + ResetCurrentRequest(client); + client->sequence--; + IgnoreClient(client); + return Success; + } + + /* + ** Use the opcode to index into the procedure table. + */ + proc = __glXGetProtocolDecodeFunction(&Single_dispatch_info, opcode, + client->swapped); + if (proc != NULL) { + GLboolean rendering = opcode <= X_GLXRenderLarge; + + __glXleaveServer(rendering); + + retval = (*proc) (cl, (GLbyte *) stuff); + + __glXenterServer(rendering); + } + else { + retval = BadRequest; + } + + return retval; +} diff --git a/glx/glxext.h b/glx/glxext.h new file mode 100644 index 0000000..3f2dee6 --- /dev/null +++ b/glx/glxext.h @@ -0,0 +1,66 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _glxext_h_ +#define _glxext_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +/* doing #include & #include could cause problems + * with overlapping definitions, so let's use the easy way + */ +#ifndef GLX_RGBA_FLOAT_BIT_ARB +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#endif +#ifndef GLX_RGBA_FLOAT_TYPE_ARB +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#endif +#ifndef GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 +#endif +#ifndef GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT +#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +#endif + +extern GLboolean __glXFreeContext(__GLXcontext * glxc); +extern void __glXFlushContextCache(void); + +extern Bool __glXAddContext(__GLXcontext * cx); +extern void __glXErrorCallBack(GLenum code); +extern void __glXClearErrorOccured(void); +extern GLboolean __glXErrorOccured(void); +extern void __glXResetLargeCommandStatus(__GLXclientState *); + +extern const char GLServerVersion[]; +extern int DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap); + +#endif /* _glxext_h_ */ diff --git a/glx/glxscreens.c b/glx/glxscreens.c new file mode 100644 index 0000000..78769f4 --- /dev/null +++ b/glx/glxscreens.c @@ -0,0 +1,424 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include + +#include "privates.h" +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "protocol-versions.h" + +static DevPrivateKeyRec glxScreenPrivateKeyRec; + +#define glxScreenPrivateKey (&glxScreenPrivateKeyRec) + +const char GLServerVersion[] = "1.4"; +static const char GLServerExtensions[] = + "GL_ARB_depth_texture " + "GL_ARB_draw_buffers " + "GL_ARB_fragment_program " + "GL_ARB_fragment_program_shadow " + "GL_ARB_imaging " + "GL_ARB_multisample " + "GL_ARB_multitexture " + "GL_ARB_occlusion_query " + "GL_ARB_point_parameters " + "GL_ARB_point_sprite " + "GL_ARB_shadow " + "GL_ARB_shadow_ambient " + "GL_ARB_texture_border_clamp " + "GL_ARB_texture_compression " + "GL_ARB_texture_cube_map " + "GL_ARB_texture_env_add " + "GL_ARB_texture_env_combine " + "GL_ARB_texture_env_crossbar " + "GL_ARB_texture_env_dot3 " + "GL_ARB_texture_mirrored_repeat " + "GL_ARB_texture_non_power_of_two " + "GL_ARB_transpose_matrix " + "GL_ARB_vertex_program " + "GL_ARB_window_pos " + "GL_EXT_abgr " + "GL_EXT_bgra " + "GL_EXT_blend_color " + "GL_EXT_blend_equation_separate " + "GL_EXT_blend_func_separate " + "GL_EXT_blend_logic_op " + "GL_EXT_blend_minmax " + "GL_EXT_blend_subtract " + "GL_EXT_clip_volume_hint " + "GL_EXT_copy_texture " + "GL_EXT_draw_range_elements " + "GL_EXT_fog_coord " + "GL_EXT_framebuffer_object " + "GL_EXT_multi_draw_arrays " + "GL_EXT_packed_pixels " + "GL_EXT_paletted_texture " + "GL_EXT_point_parameters " + "GL_EXT_polygon_offset " + "GL_EXT_rescale_normal " + "GL_EXT_secondary_color " + "GL_EXT_separate_specular_color " + "GL_EXT_shadow_funcs " + "GL_EXT_shared_texture_palette " + "GL_EXT_stencil_two_side " + "GL_EXT_stencil_wrap " + "GL_EXT_subtexture " + "GL_EXT_texture " + "GL_EXT_texture3D " + "GL_EXT_texture_compression_dxt1 " + "GL_EXT_texture_compression_s3tc " + "GL_EXT_texture_edge_clamp " + "GL_EXT_texture_env_add " + "GL_EXT_texture_env_combine " + "GL_EXT_texture_env_dot3 " + "GL_EXT_texture_filter_anisotropic " + "GL_EXT_texture_lod " + "GL_EXT_texture_lod_bias " + "GL_EXT_texture_mirror_clamp " + "GL_EXT_texture_object " + "GL_EXT_texture_rectangle " + "GL_EXT_vertex_array " + "GL_3DFX_texture_compression_FXT1 " + "GL_APPLE_packed_pixels " + "GL_ATI_draw_buffers " + "GL_ATI_texture_env_combine3 " + "GL_ATI_texture_mirror_once " + "GL_HP_occlusion_test " + "GL_IBM_texture_mirrored_repeat " + "GL_INGR_blend_func_separate " + "GL_MESA_pack_invert " + "GL_MESA_ycbcr_texture " + "GL_NV_blend_square " + "GL_NV_depth_clamp " + "GL_NV_fog_distance " + "GL_NV_fragment_program_option " + "GL_NV_fragment_program2 " + "GL_NV_light_max_exponent " + "GL_NV_multisample_filter_hint " + "GL_NV_point_sprite " + "GL_NV_texgen_reflection " + "GL_NV_texture_compression_vtc " + "GL_NV_texture_env_combine4 " + "GL_NV_texture_expand_normal " + "GL_NV_texture_rectangle " + "GL_NV_vertex_program2_option " + "GL_NV_vertex_program3 " + "GL_OES_compressed_paletted_texture " + "GL_SGI_color_matrix " + "GL_SGI_color_table " + "GL_SGIS_generate_mipmap " + "GL_SGIS_multisample " + "GL_SGIS_point_parameters " + "GL_SGIS_texture_border_clamp " + "GL_SGIS_texture_edge_clamp " + "GL_SGIS_texture_lod " + "GL_SGIX_depth_texture " + "GL_SGIX_shadow " + "GL_SGIX_shadow_ambient " + "GL_SUN_slice_accum "; + +/* +** We have made the simplifying assuption that the same extensions are +** supported across all screens in a multi-screen system. +*/ +unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION; +unsigned glxMinorVersion = SERVER_GLX_MINOR_VERSION; +static char GLXServerExtensions[] = + "GLX_ARB_multisample " + "GLX_EXT_visual_info " + "GLX_EXT_visual_rating " + "GLX_EXT_import_context " + "GLX_EXT_texture_from_pixmap " + "GLX_OML_swap_method " + "GLX_SGI_make_current_read " +#ifndef __APPLE__ + "GLX_SGIS_multisample " +#endif + "GLX_SGIX_fbconfig " + "GLX_SGIX_pbuffer " + "GLX_MESA_copy_sub_buffer "; + +static Bool +glxCloseScreen(ScreenPtr pScreen) +{ + __GLXscreen *pGlxScreen = glxGetScreen(pScreen); + + pScreen->CloseScreen = pGlxScreen->CloseScreen; + + pGlxScreen->destroy(pGlxScreen); + + return pScreen->CloseScreen(pScreen); +} + +__GLXscreen * +glxGetScreen(ScreenPtr pScreen) +{ + return dixLookupPrivate(&pScreen->devPrivates, glxScreenPrivateKey); +} + +_X_EXPORT void +GlxSetVisualConfigs(int nconfigs, void *configs, void **privates) +{ + /* We keep this stub around for the DDX drivers that still + * call it. */ +} + +GLint +glxConvertToXVisualType(int visualType) +{ + static const int x_visual_types[] = { + TrueColor, DirectColor, + PseudoColor, StaticColor, + GrayScale, StaticGray + }; + + return ((unsigned) (visualType - GLX_TRUE_COLOR) < 6) + ? x_visual_types[visualType - GLX_TRUE_COLOR] : -1; +} + +/* This code inspired by composite/compinit.c. We could move this to + * mi/ and share it with composite.*/ + +static VisualPtr +AddScreenVisuals(ScreenPtr pScreen, int count, int d) +{ + int i; + DepthPtr depth; + + depth = NULL; + for (i = 0; i < pScreen->numDepths; i++) { + if (pScreen->allowedDepths[i].depth == d) { + depth = &pScreen->allowedDepths[i]; + break; + } + } + if (depth == NULL) + return NULL; + + if (ResizeVisualArray(pScreen, count, depth) == FALSE) + return NULL; + + /* Return a pointer to the first of the added visuals. */ + return pScreen->visuals + pScreen->numVisuals - count; +} + +static int +findFirstSet(unsigned int v) +{ + int i; + + for (i = 0; i < 32; i++) + if (v & (1 << i)) + return i; + + return -1; +} + +static void +initGlxVisual(VisualPtr visual, __GLXconfig * config) +{ + int maxBits; + + maxBits = max(config->redBits, max(config->greenBits, config->blueBits)); + + config->visualID = visual->vid; + visual->class = glxConvertToXVisualType(config->visualType); + visual->bitsPerRGBValue = maxBits; + visual->ColormapEntries = 1 << maxBits; + visual->nplanes = config->redBits + config->greenBits + config->blueBits; + + visual->redMask = config->redMask; + visual->greenMask = config->greenMask; + visual->blueMask = config->blueMask; + visual->offsetRed = findFirstSet(config->redMask); + visual->offsetGreen = findFirstSet(config->greenMask); + visual->offsetBlue = findFirstSet(config->blueMask); +} + +static __GLXconfig * +pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual) +{ + __GLXconfig *best = NULL, *config; + int best_score = 0; + + for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) { + int score = 0; + + if (config->redMask != visual->redMask || + config->greenMask != visual->greenMask || + config->blueMask != visual->blueMask) + continue; + if (config->visualRating != GLX_NONE) + continue; + /* Ignore multisampled configs */ + if (config->sampleBuffers) + continue; + if (glxConvertToXVisualType(config->visualType) != visual->class) + continue; + /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */ + if (visual->nplanes == 32 && config->rgbBits != 32) + continue; + /* Can't use the same FBconfig for multiple X visuals. I think. */ + if (config->visualID != 0) + continue; + + if (config->doubleBufferMode > 0) + score += 8; + if (config->depthBits > 0) + score += 4; + if (config->stencilBits > 0) + score += 2; + if (config->alphaBits > 0) + score++; + + if (score > best_score) { + best = config; + best_score = score; + } + } + + return best; +} + +void +__glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen) +{ + __GLXconfig *m; + __GLXconfig *config; + int i; + + if (!dixRegisterPrivateKey(&glxScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return; + + pGlxScreen->pScreen = pScreen; + pGlxScreen->GLextensions = strdup(GLServerExtensions); + pGlxScreen->GLXextensions = 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 + * version can be changed in the provider's screen-probe routine. For + * most providers, the screen-probe routine is the caller of this + * function. + */ + pGlxScreen->GLXmajor = 1; + pGlxScreen->GLXminor = 2; + + pGlxScreen->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = glxCloseScreen; + + i = 0; + for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) { + m->fbconfigID = FakeClientID(0); + m->visualID = 0; + i++; + } + pGlxScreen->numFBConfigs = i; + + pGlxScreen->visuals = + calloc(pGlxScreen->numFBConfigs, sizeof(__GLXconfig *)); + + /* First, try to choose featureful FBconfigs for the existing X visuals. + * Note that if multiple X visuals end up with the same FBconfig being + * chosen, the later X visuals don't get GLX visuals (because we want to + * prioritize the root visual being GLX). + */ + for (i = 0; i < pScreen->numVisuals; i++) { + VisualPtr visual = &pScreen->visuals[i]; + + config = pickFBConfig(pGlxScreen, visual); + if (config) { + pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; + config->visualID = visual->vid; + } + } + + /* Then, add new visuals corresponding to all FBconfigs that didn't have + * an existing, appropriate visual. + */ + for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) { + int depth; + + VisualPtr visual; + + if (config->visualID != 0) + continue; + + /* Only count RGB bits and not alpha, as we're not trying to create + * visuals for compositing (that's what the 32-bit composite visual + * set up above is for. + */ + depth = config->redBits + config->greenBits + config->blueBits; + + /* Make sure that our FBconfig's depth can actually be displayed + * (corresponds to an existing visual). + */ + for (i = 0; i < pScreen->numVisuals; i++) { + if (depth == pScreen->visuals[i].nplanes) + break; + } + /* if it can't, fix up the fbconfig to not advertise window support */ + if (i == pScreen->numVisuals) + config->drawableType &= ~(GLX_WINDOW_BIT); + + /* fbconfig must support window drawables */ + if (!(config->drawableType & GLX_WINDOW_BIT)) { + config->visualID = 0; + continue; + } + + /* Create a new X visual for our FBconfig. */ + visual = AddScreenVisuals(pScreen, 1, depth); + if (visual == NULL) + continue; + + pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; + initGlxVisual(visual, config); + } + + dixSetPrivate(&pScreen->devPrivates, glxScreenPrivateKey, pGlxScreen); +} + +void +__glXScreenDestroy(__GLXscreen * screen) +{ + free(screen->GLXextensions); + free(screen->GLextensions); + free(screen->visuals); +} diff --git a/glx/glxscreens.h b/glx/glxscreens.h new file mode 100644 index 0000000..c8119fd --- /dev/null +++ b/glx/glxscreens.h @@ -0,0 +1,163 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_screens_h_ +#define _GLX_screens_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +typedef struct __GLXconfig __GLXconfig; +struct __GLXconfig { + __GLXconfig *next; + GLuint doubleBufferMode; + GLuint stereoMode; + + GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ + GLuint redMask, greenMask, blueMask, alphaMask; + GLint rgbBits; /* total bits for rgb */ + GLint indexBits; /* total bits for colorindex */ + + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + + GLint numAuxBuffers; + + GLint level; + + /* GLX */ + GLint visualID; + GLint visualType; /**< One of the GLX X visual types. (i.e., + * \c GLX_TRUE_COLOR, etc.) + */ + + /* EXT_visual_rating / GLX 1.2 */ + GLint visualRating; + + /* EXT_visual_info / GLX 1.2 */ + GLint transparentPixel; + /* colors are floats scaled to ints */ + GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; + GLint transparentIndex; + + /* ARB_multisample / SGIS_multisample */ + GLint sampleBuffers; + GLint samples; + + /* SGIX_fbconfig / GLX 1.3 */ + GLint drawableType; + GLint renderType; + GLint xRenderable; + GLint fbconfigID; + + /* SGIX_pbuffer / GLX 1.3 */ + GLint maxPbufferWidth; + GLint maxPbufferHeight; + GLint maxPbufferPixels; + GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ + GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ + + /* SGIX_visual_select_group */ + GLint visualSelectGroup; + + /* OML_swap_method */ + GLint swapMethod; + + /* EXT_texture_from_pixmap */ + GLint bindToTextureRgb; + GLint bindToTextureRgba; + GLint bindToMipmapTexture; + GLint bindToTextureTargets; + GLint yInverted; + + /* ARB_framebuffer_sRGB */ + GLint sRGBCapable; +}; + +GLint glxConvertToXVisualType(int visualType); + +/* +** Screen dependent data. These methods are the interface between the DIX +** and DDX layers of the GLX server extension. The methods provide an +** interface for context management on a screen. +*/ +typedef struct __GLXscreen __GLXscreen; +struct __GLXscreen { + void (*destroy) (__GLXscreen * screen); + + __GLXcontext *(*createContext) (__GLXscreen * screen, + __GLXconfig * modes, + __GLXcontext * shareContext, + unsigned num_attribs, + const uint32_t *attribs, + int *error); + + __GLXdrawable *(*createDrawable) (ClientPtr client, + __GLXscreen * context, + DrawablePtr pDraw, + XID drawId, + int type, + XID glxDrawId, __GLXconfig * modes); + int (*swapInterval) (__GLXdrawable * drawable, int interval); + + ScreenPtr pScreen; + + /* Linked list of valid fbconfigs for this screen. */ + __GLXconfig *fbconfigs; + int numFBConfigs; + + /* Subset of fbconfigs that are exposed as GLX visuals. */ + __GLXconfig **visuals; + GLint numVisuals; + + char *GLextensions; + + char *GLXextensions; + + /** + * \name GLX version supported by this screen. + * + * Since the GLX version advertised by the server is for the whole server, + * the GLX protocol code uses the minimum version supported on all screens. + */ + /*@{ */ + unsigned GLXmajor; + unsigned GLXminor; + /*@} */ + + Bool (*CloseScreen) (ScreenPtr pScreen); +}; + +void __glXScreenInit(__GLXscreen * screen, ScreenPtr pScreen); +void __glXScreenDestroy(__GLXscreen * screen); + +#endif /* !__GLX_screens_h__ */ diff --git a/glx/glxserver.h b/glx/glxserver.h new file mode 100644 index 0000000..7f36e5f --- /dev/null +++ b/glx/glxserver.h @@ -0,0 +1,244 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _GLX_server_h_ +#define _GLX_server_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define GL_GLEXT_PROTOTYPES /* we want prototypes */ +#include +#include +#include + +/* +** GLX resources. +*/ +typedef XID GLXContextID; +typedef XID GLXPixmap; +typedef XID GLXDrawable; + +typedef struct __GLXclientStateRec __GLXclientState; +typedef struct __GLXdrawable __GLXdrawable; +typedef struct __GLXcontext __GLXcontext; + +#include "glxscreens.h" +#include "glxdrawable.h" +#include "glxcontext.h" + +#ifndef True +#define True 1 +#endif +#ifndef False +#define False 0 +#endif + +extern __GLXscreen *glxGetScreen(ScreenPtr pScreen); +extern __GLXclientState *glxGetClient(ClientPtr pClient); + +/************************************************************************/ + +void GlxSetVisualConfigs(int nconfigs, void *configs, void **privates); + +void __glXScreenInitVisuals(__GLXscreen * screen); + +/* +** The last context used (from the server's persective) is cached. +*/ +extern __GLXcontext *__glXLastContext; +extern __GLXcontext *__glXForceCurrent(__GLXclientState *, GLXContextTag, + int *); + +int __glXError(int error); + +/************************************************************************/ + +typedef struct __GLXprovider __GLXprovider; +struct __GLXprovider { + __GLXscreen *(*screenProbe) (ScreenPtr pScreen); + const char *name; + __GLXprovider *next; +}; +extern __GLXprovider __glXDRISWRastProvider; + +void GlxPushProvider(__GLXprovider * provider); + +enum { + GLX_MINIMAL_VISUALS, + GLX_TYPICAL_VISUALS, + GLX_ALL_VISUALS +}; + +void __glXsetEnterLeaveServerFuncs(void (*enter) (GLboolean), + void (*leave) (GLboolean)); +void __glXenterServer(GLboolean rendering); +void __glXleaveServer(GLboolean rendering); + +void glxSuspendClients(void); +void glxResumeClients(void); + +typedef void (*glx_func_ptr)(void); +typedef glx_func_ptr (*glx_gpa_proc)(const char *); +void __glXsetGetProcAddress(glx_gpa_proc get_proc_address); +void *__glGetProcAddress(const char *); + +void +__glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust, + CARD64 msc, CARD32 sbc); + +#if PRESENT +void +__glXregisterPresentCompleteNotify(void); +#endif + +/* +** State kept per client. +*/ +struct __GLXclientStateRec { + /* + ** Whether this structure is currently being used to support a client. + */ + Bool inUse; + + /* + ** Buffer for returned data. + */ + GLbyte *returnBuf; + GLint returnBufSize; + + /* + ** Keep track of large rendering commands, which span multiple requests. + */ + GLint largeCmdBytesSoFar; /* bytes received so far */ + GLint largeCmdBytesTotal; /* total bytes expected */ + GLint largeCmdRequestsSoFar; /* requests received so far */ + GLint largeCmdRequestsTotal; /* total requests expected */ + GLbyte *largeCmdBuf; + GLint largeCmdBufSize; + + /* Back pointer to X client record */ + ClientPtr client; + + char *GLClientextensions; +}; + +/************************************************************************/ + +/* +** Dispatch tables. +*/ +typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *); +typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *); +typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *); + +/* + * Dispatch for GLX commands. + */ +typedef int (*__GLXprocPtr) (__GLXclientState *, char *pc); + +/* + * Tables for computing the size of each rendering command. + */ +typedef int (*gl_proto_size_func) (const GLbyte *, Bool); + +typedef struct { + int bytes; + gl_proto_size_func varsize; +} __GLXrenderSizeData; + +/************************************************************************/ + +/* +** X resources. +*/ +extern RESTYPE __glXContextRes; +extern RESTYPE __glXClientRes; +extern RESTYPE __glXPixmapRes; +extern RESTYPE __glXDrawableRes; + +/************************************************************************/ + +/* +** Prototypes. +*/ + +extern char *__glXcombine_strings(const char *, const char *); + +/* +** Routines for sending swapped replies. +*/ + +extern void __glXSwapMakeCurrentReply(ClientPtr client, + xGLXMakeCurrentReply * reply); +extern void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply); +extern void __glXSwapQueryVersionReply(ClientPtr client, + xGLXQueryVersionReply * reply); +extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client, + xGLXQueryContextInfoEXTReply * + reply, int *buf); +extern void __glXSwapGetDrawableAttributesReply(ClientPtr client, + xGLXGetDrawableAttributesReply * + reply, CARD32 *buf); +extern void glxSwapQueryExtensionsStringReply(ClientPtr client, + xGLXQueryExtensionsStringReply * + reply, char *buf); +extern void glxSwapQueryServerStringReply(ClientPtr client, + xGLXQueryServerStringReply * reply, + char *buf); + +/* + * Routines for computing the size of variably-sized rendering commands. + */ + +extern int __glXTypeSize(GLenum enm); +extern int __glXImageSize(GLenum format, GLenum type, + GLenum target, GLsizei w, GLsizei h, GLsizei d, + GLint imageHeight, GLint rowLength, GLint skipImages, + GLint skipRows, GLint alignment); + +extern unsigned glxMajorVersion; +extern unsigned glxMinorVersion; + +extern int __glXEventBase; + +#endif /* !__GLX_server_h__ */ diff --git a/glx/glxutil.h b/glx/glxutil.h new file mode 100644 index 0000000..314606d --- /dev/null +++ b/glx/glxutil.h @@ -0,0 +1,51 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _glxcmds_h_ +#define _glxcmds_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +extern GLboolean __glXDrawableInit(__GLXdrawable * drawable, + __GLXscreen * screen, + DrawablePtr pDraw, int type, XID drawID, + __GLXconfig * config); +extern void __glXDrawableRelease(__GLXdrawable * drawable); + +/* context helper routines */ +extern __GLXcontext *__glXLookupContextByTag(__GLXclientState *, GLXContextTag); + +/* init helper routines */ +extern void *__glXglDDXScreenInfo(void); +extern void *__glXglDDXExtensionInfo(void); + +#endif /* _glxcmds_h_ */ diff --git a/glx/indirect_dispatch.c b/glx/indirect_dispatch.c new file mode 100644 index 0000000..329b2e6 --- /dev/null +++ b/glx/indirect_dispatch.c @@ -0,0 +1,5102 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include "glxserver.h" +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxbyteorder.h" +#include "indirect_util.h" +#include "singlesize.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured(void); +extern void __glXClearErrorOccured(void); + +static const unsigned dummy_answer[2] = { 0, 0 }; + +int +__glXDisp_NewList(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glNewList(*(GLuint *) (pc + 0), *(GLenum *) (pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDisp_EndList(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glEndList(); + error = Success; + } + + return error; +} + +void +__glXDisp_CallList(GLbyte * pc) +{ + glCallList(*(GLuint *) (pc + 0)); +} + +void +__glXDisp_CallLists(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *) (pc + 0); + const GLenum type = *(GLenum *) (pc + 4); + const GLvoid *lists = (const GLvoid *) (pc + 8); + + lists = (const GLvoid *) (pc + 8); + + glCallLists(n, type, lists); +} + +int +__glXDisp_DeleteLists(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glDeleteLists(*(GLuint *) (pc + 0), *(GLsizei *) (pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDisp_GenLists(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLuint retval; + + retval = glGenLists(*(GLsizei *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_ListBase(GLbyte * pc) +{ + glListBase(*(GLuint *) (pc + 0)); +} + +void +__glXDisp_Begin(GLbyte * pc) +{ + glBegin(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_Bitmap(GLbyte * pc) +{ + const GLubyte *const bitmap = (const GLubyte *) ((pc + 44)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glBitmap(*(GLsizei *) (pc + 20), + *(GLsizei *) (pc + 24), + *(GLfloat *) (pc + 28), + *(GLfloat *) (pc + 32), + *(GLfloat *) (pc + 36), *(GLfloat *) (pc + 40), bitmap); +} + +void +__glXDisp_Color3bv(GLbyte * pc) +{ + glColor3bv((const GLbyte *) (pc + 0)); +} + +void +__glXDisp_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glColor3dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Color3fv(GLbyte * pc) +{ + glColor3fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_Color3iv(GLbyte * pc) +{ + glColor3iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_Color3sv(GLbyte * pc) +{ + glColor3sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_Color3ubv(GLbyte * pc) +{ + glColor3ubv((const GLubyte *) (pc + 0)); +} + +void +__glXDisp_Color3uiv(GLbyte * pc) +{ + glColor3uiv((const GLuint *) (pc + 0)); +} + +void +__glXDisp_Color3usv(GLbyte * pc) +{ + glColor3usv((const GLushort *) (pc + 0)); +} + +void +__glXDisp_Color4bv(GLbyte * pc) +{ + glColor4bv((const GLbyte *) (pc + 0)); +} + +void +__glXDisp_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glColor4dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Color4fv(GLbyte * pc) +{ + glColor4fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_Color4iv(GLbyte * pc) +{ + glColor4iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_Color4sv(GLbyte * pc) +{ + glColor4sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_Color4ubv(GLbyte * pc) +{ + glColor4ubv((const GLubyte *) (pc + 0)); +} + +void +__glXDisp_Color4uiv(GLbyte * pc) +{ + glColor4uiv((const GLuint *) (pc + 0)); +} + +void +__glXDisp_Color4usv(GLbyte * pc) +{ + glColor4usv((const GLushort *) (pc + 0)); +} + +void +__glXDisp_EdgeFlagv(GLbyte * pc) +{ + glEdgeFlagv((const GLboolean *) (pc + 0)); +} + +void +__glXDisp_End(GLbyte * pc) +{ + glEnd(); +} + +void +__glXDisp_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glIndexdv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Indexfv(GLbyte * pc) +{ + glIndexfv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_Indexiv(GLbyte * pc) +{ + glIndexiv((const GLint *) (pc + 0)); +} + +void +__glXDisp_Indexsv(GLbyte * pc) +{ + glIndexsv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_Normal3bv(GLbyte * pc) +{ + glNormal3bv((const GLbyte *) (pc + 0)); +} + +void +__glXDisp_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glNormal3dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Normal3fv(GLbyte * pc) +{ + glNormal3fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_Normal3iv(GLbyte * pc) +{ + glNormal3iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_Normal3sv(GLbyte * pc) +{ + glNormal3sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glRasterPos2dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_RasterPos2fv(GLbyte * pc) +{ + glRasterPos2fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_RasterPos2iv(GLbyte * pc) +{ + glRasterPos2iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_RasterPos2sv(GLbyte * pc) +{ + glRasterPos2sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glRasterPos3dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_RasterPos3fv(GLbyte * pc) +{ + glRasterPos3fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_RasterPos3iv(GLbyte * pc) +{ + glRasterPos3iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_RasterPos3sv(GLbyte * pc) +{ + glRasterPos3sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glRasterPos4dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_RasterPos4fv(GLbyte * pc) +{ + glRasterPos4fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_RasterPos4iv(GLbyte * pc) +{ + glRasterPos4iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_RasterPos4sv(GLbyte * pc) +{ + glRasterPos4sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glRectdv((const GLdouble *) (pc + 0), (const GLdouble *) (pc + 16)); +} + +void +__glXDisp_Rectfv(GLbyte * pc) +{ + glRectfv((const GLfloat *) (pc + 0), (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_Rectiv(GLbyte * pc) +{ + glRectiv((const GLint *) (pc + 0), (const GLint *) (pc + 8)); +} + +void +__glXDisp_Rectsv(GLbyte * pc) +{ + glRectsv((const GLshort *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glTexCoord1dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_TexCoord1fv(GLbyte * pc) +{ + glTexCoord1fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_TexCoord1iv(GLbyte * pc) +{ + glTexCoord1iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_TexCoord1sv(GLbyte * pc) +{ + glTexCoord1sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glTexCoord2dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_TexCoord2fv(GLbyte * pc) +{ + glTexCoord2fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_TexCoord2iv(GLbyte * pc) +{ + glTexCoord2iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_TexCoord2sv(GLbyte * pc) +{ + glTexCoord2sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glTexCoord3dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_TexCoord3fv(GLbyte * pc) +{ + glTexCoord3fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_TexCoord3iv(GLbyte * pc) +{ + glTexCoord3iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_TexCoord3sv(GLbyte * pc) +{ + glTexCoord3sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glTexCoord4dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_TexCoord4fv(GLbyte * pc) +{ + glTexCoord4fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_TexCoord4iv(GLbyte * pc) +{ + glTexCoord4iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_TexCoord4sv(GLbyte * pc) +{ + glTexCoord4sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glVertex2dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Vertex2fv(GLbyte * pc) +{ + glVertex2fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_Vertex2iv(GLbyte * pc) +{ + glVertex2iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_Vertex2sv(GLbyte * pc) +{ + glVertex2sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glVertex3dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Vertex3fv(GLbyte * pc) +{ + glVertex3fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_Vertex3iv(GLbyte * pc) +{ + glVertex3iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_Vertex3sv(GLbyte * pc) +{ + glVertex3sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glVertex4dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Vertex4fv(GLbyte * pc) +{ + glVertex4fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_Vertex4iv(GLbyte * pc) +{ + glVertex4iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_Vertex4sv(GLbyte * pc) +{ + glVertex4sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + glClipPlane(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0)); +} + +void +__glXDisp_ColorMaterial(GLbyte * pc) +{ + glColorMaterial(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); +} + +void +__glXDisp_CullFace(GLbyte * pc) +{ + glCullFace(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_Fogf(GLbyte * pc) +{ + glFogf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); +} + +void +__glXDisp_Fogfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 0); + const GLfloat *params; + + params = (const GLfloat *) (pc + 4); + + glFogfv(pname, params); +} + +void +__glXDisp_Fogi(GLbyte * pc) +{ + glFogi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); +} + +void +__glXDisp_Fogiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 0); + const GLint *params; + + params = (const GLint *) (pc + 4); + + glFogiv(pname, params); +} + +void +__glXDisp_FrontFace(GLbyte * pc) +{ + glFrontFace(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_Hint(GLbyte * pc) +{ + glHint(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); +} + +void +__glXDisp_Lightf(GLbyte * pc) +{ + glLightf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_Lightfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLfloat *params; + + params = (const GLfloat *) (pc + 8); + + glLightfv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_Lighti(GLbyte * pc) +{ + glLighti(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); +} + +void +__glXDisp_Lightiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLint *params; + + params = (const GLint *) (pc + 8); + + glLightiv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_LightModelf(GLbyte * pc) +{ + glLightModelf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); +} + +void +__glXDisp_LightModelfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 0); + const GLfloat *params; + + params = (const GLfloat *) (pc + 4); + + glLightModelfv(pname, params); +} + +void +__glXDisp_LightModeli(GLbyte * pc) +{ + glLightModeli(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); +} + +void +__glXDisp_LightModeliv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 0); + const GLint *params; + + params = (const GLint *) (pc + 4); + + glLightModeliv(pname, params); +} + +void +__glXDisp_LineStipple(GLbyte * pc) +{ + glLineStipple(*(GLint *) (pc + 0), *(GLushort *) (pc + 4)); +} + +void +__glXDisp_LineWidth(GLbyte * pc) +{ + glLineWidth(*(GLfloat *) (pc + 0)); +} + +void +__glXDisp_Materialf(GLbyte * pc) +{ + glMaterialf(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_Materialfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLfloat *params; + + params = (const GLfloat *) (pc + 8); + + glMaterialfv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_Materiali(GLbyte * pc) +{ + glMateriali(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); +} + +void +__glXDisp_Materialiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLint *params; + + params = (const GLint *) (pc + 8); + + glMaterialiv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_PointSize(GLbyte * pc) +{ + glPointSize(*(GLfloat *) (pc + 0)); +} + +void +__glXDisp_PolygonMode(GLbyte * pc) +{ + glPolygonMode(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); +} + +void +__glXDisp_PolygonStipple(GLbyte * pc) +{ + const GLubyte *const mask = (const GLubyte *) ((pc + 20)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glPolygonStipple(mask); +} + +void +__glXDisp_Scissor(GLbyte * pc) +{ + glScissor(*(GLint *) (pc + 0), + *(GLint *) (pc + 4), + *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12)); +} + +void +__glXDisp_ShadeModel(GLbyte * pc) +{ + glShadeModel(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_TexParameterf(GLbyte * pc) +{ + glTexParameterf(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLfloat *params; + + params = (const GLfloat *) (pc + 8); + + glTexParameterfv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_TexParameteri(GLbyte * pc) +{ + glTexParameteri(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); +} + +void +__glXDisp_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLint *params; + + params = (const GLint *) (pc + 8); + + glTexParameteriv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_TexImage1D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glTexImage1D(*(GLenum *) (pc + 20), + *(GLint *) (pc + 24), + *(GLint *) (pc + 28), + *(GLsizei *) (pc + 32), + *(GLint *) (pc + 40), + *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); +} + +void +__glXDisp_TexImage2D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glTexImage2D(*(GLenum *) (pc + 20), + *(GLint *) (pc + 24), + *(GLint *) (pc + 28), + *(GLsizei *) (pc + 32), + *(GLsizei *) (pc + 36), + *(GLint *) (pc + 40), + *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); +} + +void +__glXDisp_TexEnvf(GLbyte * pc) +{ + glTexEnvf(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLfloat *params; + + params = (const GLfloat *) (pc + 8); + + glTexEnvfv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_TexEnvi(GLbyte * pc) +{ + glTexEnvi(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); +} + +void +__glXDisp_TexEnviv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLint *params; + + params = (const GLint *) (pc + 8); + + glTexEnviv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glTexGend(*(GLenum *) (pc + 8), + *(GLenum *) (pc + 12), *(GLdouble *) (pc + 0)); +} + +void +__glXDisp_TexGendv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLdouble *params; + +#ifdef __GLX_ALIGN64 + const GLuint compsize = __glTexGendv_size(pname); + const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + params = (const GLdouble *) (pc + 8); + + glTexGendv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_TexGenf(GLbyte * pc) +{ + glTexGenf(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_TexGenfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLfloat *params; + + params = (const GLfloat *) (pc + 8); + + glTexGenfv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_TexGeni(GLbyte * pc) +{ + glTexGeni(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); +} + +void +__glXDisp_TexGeniv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLint *params; + + params = (const GLint *) (pc + 8); + + glTexGeniv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_InitNames(GLbyte * pc) +{ + glInitNames(); +} + +void +__glXDisp_LoadName(GLbyte * pc) +{ + glLoadName(*(GLuint *) (pc + 0)); +} + +void +__glXDisp_PassThrough(GLbyte * pc) +{ + glPassThrough(*(GLfloat *) (pc + 0)); +} + +void +__glXDisp_PopName(GLbyte * pc) +{ + glPopName(); +} + +void +__glXDisp_PushName(GLbyte * pc) +{ + glPushName(*(GLuint *) (pc + 0)); +} + +void +__glXDisp_DrawBuffer(GLbyte * pc) +{ + glDrawBuffer(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_Clear(GLbyte * pc) +{ + glClear(*(GLbitfield *) (pc + 0)); +} + +void +__glXDisp_ClearAccum(GLbyte * pc) +{ + glClearAccum(*(GLfloat *) (pc + 0), + *(GLfloat *) (pc + 4), + *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12)); +} + +void +__glXDisp_ClearIndex(GLbyte * pc) +{ + glClearIndex(*(GLfloat *) (pc + 0)); +} + +void +__glXDisp_ClearColor(GLbyte * pc) +{ + glClearColor(*(GLclampf *) (pc + 0), + *(GLclampf *) (pc + 4), + *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12)); +} + +void +__glXDisp_ClearStencil(GLbyte * pc) +{ + glClearStencil(*(GLint *) (pc + 0)); +} + +void +__glXDisp_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glClearDepth(*(GLclampd *) (pc + 0)); +} + +void +__glXDisp_StencilMask(GLbyte * pc) +{ + glStencilMask(*(GLuint *) (pc + 0)); +} + +void +__glXDisp_ColorMask(GLbyte * pc) +{ + glColorMask(*(GLboolean *) (pc + 0), + *(GLboolean *) (pc + 1), + *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3)); +} + +void +__glXDisp_DepthMask(GLbyte * pc) +{ + glDepthMask(*(GLboolean *) (pc + 0)); +} + +void +__glXDisp_IndexMask(GLbyte * pc) +{ + glIndexMask(*(GLuint *) (pc + 0)); +} + +void +__glXDisp_Accum(GLbyte * pc) +{ + glAccum(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); +} + +void +__glXDisp_Disable(GLbyte * pc) +{ + glDisable(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_Enable(GLbyte * pc) +{ + glEnable(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_PopAttrib(GLbyte * pc) +{ + glPopAttrib(); +} + +void +__glXDisp_PushAttrib(GLbyte * pc) +{ + glPushAttrib(*(GLbitfield *) (pc + 0)); +} + +void +__glXDisp_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + glMapGrid1d(*(GLint *) (pc + 16), + *(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8)); +} + +void +__glXDisp_MapGrid1f(GLbyte * pc) +{ + glMapGrid1f(*(GLint *) (pc + 0), + *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 40); + pc -= 4; + } +#endif + + glMapGrid2d(*(GLint *) (pc + 32), + *(GLdouble *) (pc + 0), + *(GLdouble *) (pc + 8), + *(GLint *) (pc + 36), + *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24)); +} + +void +__glXDisp_MapGrid2f(GLbyte * pc) +{ + glMapGrid2f(*(GLint *) (pc + 0), + *(GLfloat *) (pc + 4), + *(GLfloat *) (pc + 8), + *(GLint *) (pc + 12), + *(GLfloat *) (pc + 16), *(GLfloat *) (pc + 20)); +} + +void +__glXDisp_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glEvalCoord1dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_EvalCoord1fv(GLbyte * pc) +{ + glEvalCoord1fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glEvalCoord2dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_EvalCoord2fv(GLbyte * pc) +{ + glEvalCoord2fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_EvalMesh1(GLbyte * pc) +{ + glEvalMesh1(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8)); +} + +void +__glXDisp_EvalPoint1(GLbyte * pc) +{ + glEvalPoint1(*(GLint *) (pc + 0)); +} + +void +__glXDisp_EvalMesh2(GLbyte * pc) +{ + glEvalMesh2(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), *(GLint *) (pc + 16)); +} + +void +__glXDisp_EvalPoint2(GLbyte * pc) +{ + glEvalPoint2(*(GLint *) (pc + 0), *(GLint *) (pc + 4)); +} + +void +__glXDisp_AlphaFunc(GLbyte * pc) +{ + glAlphaFunc(*(GLenum *) (pc + 0), *(GLclampf *) (pc + 4)); +} + +void +__glXDisp_BlendFunc(GLbyte * pc) +{ + glBlendFunc(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); +} + +void +__glXDisp_LogicOp(GLbyte * pc) +{ + glLogicOp(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_StencilFunc(GLbyte * pc) +{ + glStencilFunc(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), *(GLuint *) (pc + 8)); +} + +void +__glXDisp_StencilOp(GLbyte * pc) +{ + glStencilOp(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLenum *) (pc + 8)); +} + +void +__glXDisp_DepthFunc(GLbyte * pc) +{ + glDepthFunc(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_PixelZoom(GLbyte * pc) +{ + glPixelZoom(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4)); +} + +void +__glXDisp_PixelTransferf(GLbyte * pc) +{ + glPixelTransferf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); +} + +void +__glXDisp_PixelTransferi(GLbyte * pc) +{ + glPixelTransferi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); +} + +int +__glXDisp_PixelStoref(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glPixelStoref(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDisp_PixelStorei(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glPixelStorei(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); + error = Success; + } + + return error; +} + +void +__glXDisp_PixelMapfv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *) (pc + 4); + + glPixelMapfv(*(GLenum *) (pc + 0), mapsize, (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_PixelMapuiv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *) (pc + 4); + + glPixelMapuiv(*(GLenum *) (pc + 0), mapsize, (const GLuint *) (pc + 8)); +} + +void +__glXDisp_PixelMapusv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *) (pc + 4); + + glPixelMapusv(*(GLenum *) (pc + 0), mapsize, (const GLushort *) (pc + 8)); +} + +void +__glXDisp_ReadBuffer(GLbyte * pc) +{ + glReadBuffer(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_CopyPixels(GLbyte * pc) +{ + glCopyPixels(*(GLint *) (pc + 0), + *(GLint *) (pc + 4), + *(GLsizei *) (pc + 8), + *(GLsizei *) (pc + 12), *(GLenum *) (pc + 16)); +} + +void +__glXDisp_DrawPixels(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 36)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glDrawPixels(*(GLsizei *) (pc + 20), + *(GLsizei *) (pc + 24), + *(GLenum *) (pc + 28), *(GLenum *) (pc + 32), pixels); +} + +int +__glXDisp_GetBooleanv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 0); + + const GLuint compsize = __glGetBooleanv_size(pname); + GLboolean answerBuffer[200]; + GLboolean *params = + __glXGetAnswerBuffer(cl, compsize, answerBuffer, + sizeof(answerBuffer), 1); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetBooleanv(pname, params); + __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetClipPlane(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLdouble equation[4]; + + glGetClipPlane(*(GLenum *) (pc + 0), equation); + __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetDoublev(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 0); + + const GLuint compsize = __glGetDoublev_size(pname); + GLdouble answerBuffer[200]; + GLdouble *params = + __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, + sizeof(answerBuffer), 8); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetDoublev(pname, params); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetError(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLenum retval; + + retval = glGetError(); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDisp_GetFloatv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 0); + + const GLuint compsize = __glGetFloatv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetFloatv(pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetIntegerv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 0); + + const GLuint compsize = __glGetIntegerv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetIntegerv(pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetLightfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetLightfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetLightfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetLightiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetLightiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetLightiv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMapdv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = *(GLenum *) (pc + 0); + const GLenum query = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMapdv_size(target, query); + GLdouble answerBuffer[200]; + GLdouble *v = + __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, + sizeof(answerBuffer), 8); + + if (v == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMapdv(target, query, v); + __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMapfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = *(GLenum *) (pc + 0); + const GLenum query = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMapfv_size(target, query); + GLfloat answerBuffer[200]; + GLfloat *v = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (v == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMapfv(target, query, v); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMapiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = *(GLenum *) (pc + 0); + const GLenum query = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMapiv_size(target, query); + GLint answerBuffer[200]; + GLint *v = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (v == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMapiv(target, query, v); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMaterialfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMaterialfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMaterialfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMaterialiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMaterialiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMaterialiv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum map = *(GLenum *) (pc + 0); + + const GLuint compsize = __glGetPixelMapfv_size(map); + GLfloat answerBuffer[200]; + GLfloat *values = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (values == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetPixelMapfv(map, values); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum map = *(GLenum *) (pc + 0); + + const GLuint compsize = __glGetPixelMapuiv_size(map); + GLuint answerBuffer[200]; + GLuint *values = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (values == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetPixelMapuiv(map, values); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum map = *(GLenum *) (pc + 0); + + const GLuint compsize = __glGetPixelMapusv_size(map); + GLushort answerBuffer[200]; + GLushort *values = + __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, + sizeof(answerBuffer), 2); + + if (values == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetPixelMapusv(map, values); + __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetTexEnvfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexEnvfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexEnviv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetTexEnviv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexEnviv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexGendv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetTexGendv_size(pname); + GLdouble answerBuffer[200]; + GLdouble *params = + __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, + sizeof(answerBuffer), 8); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexGendv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexGenfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetTexGenfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexGenfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexGeniv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetTexGeniv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexGeniv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetTexParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetTexParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 8); + + const GLuint compsize = __glGetTexLevelParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexLevelParameterfv(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 8); + + const GLuint compsize = __glGetTexLevelParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexLevelParameteriv(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_IsEnabled(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsEnabled(*(GLenum *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDisp_IsList(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsList(*(GLuint *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glDepthRange(*(GLclampd *) (pc + 0), *(GLclampd *) (pc + 8)); +} + +void +__glXDisp_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 48); + pc -= 4; + } +#endif + + glFrustum(*(GLdouble *) (pc + 0), + *(GLdouble *) (pc + 8), + *(GLdouble *) (pc + 16), + *(GLdouble *) (pc + 24), + *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40)); +} + +void +__glXDisp_LoadIdentity(GLbyte * pc) +{ + glLoadIdentity(); +} + +void +__glXDisp_LoadMatrixf(GLbyte * pc) +{ + glLoadMatrixf((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 128); + pc -= 4; + } +#endif + + glLoadMatrixd((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_MatrixMode(GLbyte * pc) +{ + glMatrixMode(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_MultMatrixf(GLbyte * pc) +{ + glMultMatrixf((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 128); + pc -= 4; + } +#endif + + glMultMatrixd((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 48); + pc -= 4; + } +#endif + + glOrtho(*(GLdouble *) (pc + 0), + *(GLdouble *) (pc + 8), + *(GLdouble *) (pc + 16), + *(GLdouble *) (pc + 24), + *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40)); +} + +void +__glXDisp_PopMatrix(GLbyte * pc) +{ + glPopMatrix(); +} + +void +__glXDisp_PushMatrix(GLbyte * pc) +{ + glPushMatrix(); +} + +void +__glXDisp_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glRotated(*(GLdouble *) (pc + 0), + *(GLdouble *) (pc + 8), + *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24)); +} + +void +__glXDisp_Rotatef(GLbyte * pc) +{ + glRotatef(*(GLfloat *) (pc + 0), + *(GLfloat *) (pc + 4), + *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12)); +} + +void +__glXDisp_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glScaled(*(GLdouble *) (pc + 0), + *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16)); +} + +void +__glXDisp_Scalef(GLbyte * pc) +{ + glScalef(*(GLfloat *) (pc + 0), + *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glTranslated(*(GLdouble *) (pc + 0), + *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16)); +} + +void +__glXDisp_Translatef(GLbyte * pc) +{ + glTranslatef(*(GLfloat *) (pc + 0), + *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_Viewport(GLbyte * pc) +{ + glViewport(*(GLint *) (pc + 0), + *(GLint *) (pc + 4), + *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12)); +} + +void +__glXDisp_BindTexture(GLbyte * pc) +{ + glBindTexture(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); +} + +void +__glXDisp_Indexubv(GLbyte * pc) +{ + glIndexubv((const GLubyte *) (pc + 0)); +} + +void +__glXDisp_PolygonOffset(GLbyte * pc) +{ + glPolygonOffset(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4)); +} + +int +__glXDisp_AreTexturesResident(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean *residences = + __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = + glAreTexturesResident(n, (const GLuint *) (pc + 4), residences); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +int +__glXDisp_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean *residences = + __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = + glAreTexturesResident(n, (const GLuint *) (pc + 4), residences); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_CopyTexImage1D(GLbyte * pc) +{ + glCopyTexImage1D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLenum *) (pc + 8), + *(GLint *) (pc + 12), + *(GLint *) (pc + 16), + *(GLsizei *) (pc + 20), *(GLint *) (pc + 24)); +} + +void +__glXDisp_CopyTexImage2D(GLbyte * pc) +{ + glCopyTexImage2D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLenum *) (pc + 8), + *(GLint *) (pc + 12), + *(GLint *) (pc + 16), + *(GLsizei *) (pc + 20), + *(GLsizei *) (pc + 24), *(GLint *) (pc + 28)); +} + +void +__glXDisp_CopyTexSubImage1D(GLbyte * pc) +{ + glCopyTexSubImage1D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), + *(GLint *) (pc + 16), *(GLsizei *) (pc + 20)); +} + +void +__glXDisp_CopyTexSubImage2D(GLbyte * pc) +{ + glCopyTexSubImage2D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), + *(GLint *) (pc + 16), + *(GLint *) (pc + 20), + *(GLsizei *) (pc + 24), *(GLsizei *) (pc + 28)); +} + +int +__glXDisp_DeleteTextures(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + glDeleteTextures(n, (const GLuint *) (pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDisp_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + glDeleteTextures(n, (const GLuint *) (pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDisp_GenTextures(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLuint answerBuffer[200]; + GLuint *textures = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + glGenTextures(n, textures); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLuint answerBuffer[200]; + GLuint *textures = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + glGenTextures(n, textures); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_IsTexture(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsTexture(*(GLuint *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDisp_IsTextureEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsTexture(*(GLuint *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_PrioritizeTextures(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *) (pc + 0); + + glPrioritizeTextures(n, + (const GLuint *) (pc + 4), + (const GLclampf *) (pc + 4)); +} + +void +__glXDisp_TexSubImage1D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glTexSubImage1D(*(GLenum *) (pc + 20), + *(GLint *) (pc + 24), + *(GLint *) (pc + 28), + *(GLsizei *) (pc + 36), + *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); +} + +void +__glXDisp_TexSubImage2D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glTexSubImage2D(*(GLenum *) (pc + 20), + *(GLint *) (pc + 24), + *(GLint *) (pc + 28), + *(GLint *) (pc + 32), + *(GLsizei *) (pc + 36), + *(GLsizei *) (pc + 40), + *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); +} + +void +__glXDisp_BlendColor(GLbyte * pc) +{ + glBlendColor(*(GLclampf *) (pc + 0), + *(GLclampf *) (pc + 4), + *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12)); +} + +void +__glXDisp_BlendEquation(GLbyte * pc) +{ + glBlendEquation(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_ColorTable(GLbyte * pc) +{ + const GLvoid *const table = (const GLvoid *) ((pc + 40)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glColorTable(*(GLenum *) (pc + 20), + *(GLenum *) (pc + 24), + *(GLsizei *) (pc + 28), + *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), table); +} + +void +__glXDisp_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLfloat *params; + + params = (const GLfloat *) (pc + 8); + + glColorTableParameterfv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLint *params; + + params = (const GLint *) (pc + 8); + + glColorTableParameteriv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_CopyColorTable(GLbyte * pc) +{ + glCopyColorTable(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), *(GLsizei *) (pc + 16)); +} + +int +__glXDisp_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void +__glXDisp_ColorSubTable(GLbyte * pc) +{ + const GLvoid *const data = (const GLvoid *) ((pc + 40)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glColorSubTable(*(GLenum *) (pc + 20), + *(GLsizei *) (pc + 24), + *(GLsizei *) (pc + 28), + *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), data); +} + +void +__glXDisp_CopyColorSubTable(GLbyte * pc) +{ + glCopyColorSubTable(*(GLenum *) (pc + 0), + *(GLsizei *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), *(GLsizei *) (pc + 16)); +} + +void +__glXDisp_ConvolutionFilter1D(GLbyte * pc) +{ + const GLvoid *const image = (const GLvoid *) ((pc + 44)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glConvolutionFilter1D(*(GLenum *) (pc + 20), + *(GLenum *) (pc + 24), + *(GLsizei *) (pc + 28), + *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image); +} + +void +__glXDisp_ConvolutionFilter2D(GLbyte * pc) +{ + const GLvoid *const image = (const GLvoid *) ((pc + 44)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glConvolutionFilter2D(*(GLenum *) (pc + 20), + *(GLenum *) (pc + 24), + *(GLsizei *) (pc + 28), + *(GLsizei *) (pc + 32), + *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image); +} + +void +__glXDisp_ConvolutionParameterf(GLbyte * pc) +{ + glConvolutionParameterf(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); +} + +void +__glXDisp_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLfloat *params; + + params = (const GLfloat *) (pc + 8); + + glConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_ConvolutionParameteri(GLbyte * pc) +{ + glConvolutionParameteri(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); +} + +void +__glXDisp_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *) (pc + 4); + const GLint *params; + + params = (const GLint *) (pc + 8); + + glConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params); +} + +void +__glXDisp_CopyConvolutionFilter1D(GLbyte * pc) +{ + glCopyConvolutionFilter1D(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), *(GLsizei *) (pc + 16)); +} + +void +__glXDisp_CopyConvolutionFilter2D(GLbyte * pc) +{ + glCopyConvolutionFilter2D(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), + *(GLsizei *) (pc + 16), *(GLsizei *) (pc + 20)); +} + +int +__glXDisp_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void +__glXDisp_Histogram(GLbyte * pc) +{ + glHistogram(*(GLenum *) (pc + 0), + *(GLsizei *) (pc + 4), + *(GLenum *) (pc + 8), *(GLboolean *) (pc + 12)); +} + +void +__glXDisp_Minmax(GLbyte * pc) +{ + glMinmax(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), *(GLboolean *) (pc + 8)); +} + +void +__glXDisp_ResetHistogram(GLbyte * pc) +{ + glResetHistogram(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_ResetMinmax(GLbyte * pc) +{ + glResetMinmax(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_TexImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *) (pc + 76); + const GLvoid *const pixels = + (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); + __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glTexImage3D(*(GLenum *) (pc + 36), + *(GLint *) (pc + 40), + *(GLint *) (pc + 44), + *(GLsizei *) (pc + 48), + *(GLsizei *) (pc + 52), + *(GLsizei *) (pc + 56), + *(GLint *) (pc + 64), + *(GLenum *) (pc + 68), *(GLenum *) (pc + 72), pixels); +} + +void +__glXDisp_TexSubImage3D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 88)); + __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); + + glTexSubImage3D(*(GLenum *) (pc + 36), + *(GLint *) (pc + 40), + *(GLint *) (pc + 44), + *(GLint *) (pc + 48), + *(GLint *) (pc + 52), + *(GLsizei *) (pc + 60), + *(GLsizei *) (pc + 64), + *(GLsizei *) (pc + 68), + *(GLenum *) (pc + 76), *(GLenum *) (pc + 80), pixels); +} + +void +__glXDisp_CopyTexSubImage3D(GLbyte * pc) +{ + glCopyTexSubImage3D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), + *(GLint *) (pc + 16), + *(GLint *) (pc + 20), + *(GLint *) (pc + 24), + *(GLsizei *) (pc + 28), *(GLsizei *) (pc + 32)); +} + +void +__glXDisp_ActiveTexture(GLbyte * pc) +{ + glActiveTextureARB(*(GLenum *) (pc + 0)); +} + +void +__glXDisp_MultiTexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 12); + pc -= 4; + } +#endif + + glMultiTexCoord1dvARB(*(GLenum *) (pc + 8), (const GLdouble *) (pc + 0)); +} + +void +__glXDisp_MultiTexCoord1fvARB(GLbyte * pc) +{ + glMultiTexCoord1fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord1iv(GLbyte * pc) +{ + glMultiTexCoord1ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord1sv(GLbyte * pc) +{ + glMultiTexCoord1svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + glMultiTexCoord2dvARB(*(GLenum *) (pc + 16), (const GLdouble *) (pc + 0)); +} + +void +__glXDisp_MultiTexCoord2fvARB(GLbyte * pc) +{ + glMultiTexCoord2fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord2iv(GLbyte * pc) +{ + glMultiTexCoord2ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord2sv(GLbyte * pc) +{ + glMultiTexCoord2svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 28); + pc -= 4; + } +#endif + + glMultiTexCoord3dvARB(*(GLenum *) (pc + 24), (const GLdouble *) (pc + 0)); +} + +void +__glXDisp_MultiTexCoord3fvARB(GLbyte * pc) +{ + glMultiTexCoord3fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord3iv(GLbyte * pc) +{ + glMultiTexCoord3ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord3sv(GLbyte * pc) +{ + glMultiTexCoord3svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + glMultiTexCoord4dvARB(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0)); +} + +void +__glXDisp_MultiTexCoord4fvARB(GLbyte * pc) +{ + glMultiTexCoord4fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord4iv(GLbyte * pc) +{ + glMultiTexCoord4ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); +} + +void +__glXDisp_MultiTexCoord4sv(GLbyte * pc) +{ + glMultiTexCoord4svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_CompressedTexImage1D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D = + __glGetProcAddress("glCompressedTexImage1D"); + const GLsizei imageSize = *(GLsizei *) (pc + 20); + + CompressedTexImage1D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLenum *) (pc + 8), + *(GLsizei *) (pc + 12), + *(GLint *) (pc + 16), + imageSize, (const GLvoid *) (pc + 24)); +} + +void +__glXDisp_CompressedTexImage2D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D = + __glGetProcAddress("glCompressedTexImage2D"); + const GLsizei imageSize = *(GLsizei *) (pc + 24); + + CompressedTexImage2D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLenum *) (pc + 8), + *(GLsizei *) (pc + 12), + *(GLsizei *) (pc + 16), + *(GLint *) (pc + 20), + imageSize, (const GLvoid *) (pc + 28)); +} + +void +__glXDisp_CompressedTexImage3D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D = + __glGetProcAddress("glCompressedTexImage3D"); + const GLsizei imageSize = *(GLsizei *) (pc + 28); + + CompressedTexImage3D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLenum *) (pc + 8), + *(GLsizei *) (pc + 12), + *(GLsizei *) (pc + 16), + *(GLsizei *) (pc + 20), + *(GLint *) (pc + 24), + imageSize, (const GLvoid *) (pc + 32)); +} + +void +__glXDisp_CompressedTexSubImage1D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D = + __glGetProcAddress("glCompressedTexSubImage1D"); + const GLsizei imageSize = *(GLsizei *) (pc + 20); + + CompressedTexSubImage1D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLint *) (pc + 8), + *(GLsizei *) (pc + 12), + *(GLenum *) (pc + 16), + imageSize, (const GLvoid *) (pc + 24)); +} + +void +__glXDisp_CompressedTexSubImage2D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D = + __glGetProcAddress("glCompressedTexSubImage2D"); + const GLsizei imageSize = *(GLsizei *) (pc + 28); + + CompressedTexSubImage2D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), + *(GLsizei *) (pc + 16), + *(GLsizei *) (pc + 20), + *(GLenum *) (pc + 24), + imageSize, (const GLvoid *) (pc + 32)); +} + +void +__glXDisp_CompressedTexSubImage3D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D = + __glGetProcAddress("glCompressedTexSubImage3D"); + const GLsizei imageSize = *(GLsizei *) (pc + 36); + + CompressedTexSubImage3D(*(GLenum *) (pc + 0), + *(GLint *) (pc + 4), + *(GLint *) (pc + 8), + *(GLint *) (pc + 12), + *(GLint *) (pc + 16), + *(GLsizei *) (pc + 20), + *(GLsizei *) (pc + 24), + *(GLsizei *) (pc + 28), + *(GLenum *) (pc + 32), + imageSize, (const GLvoid *) (pc + 40)); +} + +void +__glXDisp_SampleCoverage(GLbyte * pc) +{ + PFNGLSAMPLECOVERAGEPROC SampleCoverage = + __glGetProcAddress("glSampleCoverage"); + SampleCoverage(*(GLclampf *) (pc + 0), *(GLboolean *) (pc + 4)); +} + +void +__glXDisp_BlendFuncSeparate(GLbyte * pc) +{ + PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate = + __glGetProcAddress("glBlendFuncSeparate"); + BlendFuncSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), *(GLenum *) (pc + 12)); +} + +void +__glXDisp_FogCoorddv(GLbyte * pc) +{ + PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv"); + +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + FogCoorddv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_PointParameterf(GLbyte * pc) +{ + PFNGLPOINTPARAMETERFPROC PointParameterf = + __glGetProcAddress("glPointParameterf"); + PointParameterf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); +} + +void +__glXDisp_PointParameterfv(GLbyte * pc) +{ + PFNGLPOINTPARAMETERFVPROC PointParameterfv = + __glGetProcAddress("glPointParameterfv"); + const GLenum pname = *(GLenum *) (pc + 0); + const GLfloat *params; + + params = (const GLfloat *) (pc + 4); + + PointParameterfv(pname, params); +} + +void +__glXDisp_PointParameteri(GLbyte * pc) +{ + PFNGLPOINTPARAMETERIPROC PointParameteri = + __glGetProcAddress("glPointParameteri"); + PointParameteri(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); +} + +void +__glXDisp_PointParameteriv(GLbyte * pc) +{ + PFNGLPOINTPARAMETERIVPROC PointParameteriv = + __glGetProcAddress("glPointParameteriv"); + const GLenum pname = *(GLenum *) (pc + 0); + const GLint *params; + + params = (const GLint *) (pc + 4); + + PointParameteriv(pname, params); +} + +void +__glXDisp_SecondaryColor3bv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv = + __glGetProcAddress("glSecondaryColor3bv"); + SecondaryColor3bv((const GLbyte *) (pc + 0)); +} + +void +__glXDisp_SecondaryColor3dv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv = + __glGetProcAddress("glSecondaryColor3dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + SecondaryColor3dv((const GLdouble *) (pc + 0)); +} + +void +__glXDisp_SecondaryColor3iv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv = + __glGetProcAddress("glSecondaryColor3iv"); + SecondaryColor3iv((const GLint *) (pc + 0)); +} + +void +__glXDisp_SecondaryColor3sv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv = + __glGetProcAddress("glSecondaryColor3sv"); + SecondaryColor3sv((const GLshort *) (pc + 0)); +} + +void +__glXDisp_SecondaryColor3ubv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv = + __glGetProcAddress("glSecondaryColor3ubv"); + SecondaryColor3ubv((const GLubyte *) (pc + 0)); +} + +void +__glXDisp_SecondaryColor3uiv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv = + __glGetProcAddress("glSecondaryColor3uiv"); + SecondaryColor3uiv((const GLuint *) (pc + 0)); +} + +void +__glXDisp_SecondaryColor3usv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv = + __glGetProcAddress("glSecondaryColor3usv"); + SecondaryColor3usv((const GLushort *) (pc + 0)); +} + +void +__glXDisp_WindowPos3fv(GLbyte * pc) +{ + PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv"); + + WindowPos3fv((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_BeginQuery(GLbyte * pc) +{ + PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery"); + + BeginQuery(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); +} + +int +__glXDisp_DeleteQueries(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLDELETEQUERIESPROC DeleteQueries = + __glGetProcAddress("glDeleteQueries"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + DeleteQueries(n, (const GLuint *) (pc + 4)); + error = Success; + } + + return error; +} + +void +__glXDisp_EndQuery(GLbyte * pc) +{ + PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery"); + + EndQuery(*(GLenum *) (pc + 0)); +} + +int +__glXDisp_GenQueries(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLuint answerBuffer[200]; + GLuint *ids = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenQueries(n, ids); + __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv = + __glGetProcAddress("glGetQueryObjectiv"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetQueryObjectiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetQueryObjectiv(*(GLuint *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv = + __glGetProcAddress("glGetQueryObjectuiv"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetQueryObjectuiv_size(pname); + GLuint answerBuffer[200]; + GLuint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetQueryObjectuiv(*(GLuint *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetQueryiv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetQueryiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetQueryiv(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_IsQuery(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsQuery(*(GLuint *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_BlendEquationSeparate(GLbyte * pc) +{ + PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate = + __glGetProcAddress("glBlendEquationSeparate"); + BlendEquationSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); +} + +void +__glXDisp_DrawBuffers(GLbyte * pc) +{ + PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers"); + const GLsizei n = *(GLsizei *) (pc + 0); + + DrawBuffers(n, (const GLenum *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib1dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv = + __glGetProcAddress("glVertexAttrib1dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 12); + pc -= 4; + } +#endif + + VertexAttrib1dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib1sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv = + __glGetProcAddress("glVertexAttrib1sv"); + VertexAttrib1sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib2dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv = + __glGetProcAddress("glVertexAttrib2dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + VertexAttrib2dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib2sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv = + __glGetProcAddress("glVertexAttrib2sv"); + VertexAttrib2sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib3dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv = + __glGetProcAddress("glVertexAttrib3dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 28); + pc -= 4; + } +#endif + + VertexAttrib3dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib3sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv = + __glGetProcAddress("glVertexAttrib3sv"); + VertexAttrib3sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4Nbv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv = + __glGetProcAddress("glVertexAttrib4Nbv"); + VertexAttrib4Nbv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4Niv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv = + __glGetProcAddress("glVertexAttrib4Niv"); + VertexAttrib4Niv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4Nsv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv = + __glGetProcAddress("glVertexAttrib4Nsv"); + VertexAttrib4Nsv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4Nubv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv = + __glGetProcAddress("glVertexAttrib4Nubv"); + VertexAttrib4Nubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4Nuiv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv = + __glGetProcAddress("glVertexAttrib4Nuiv"); + VertexAttrib4Nuiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4Nusv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv = + __glGetProcAddress("glVertexAttrib4Nusv"); + VertexAttrib4Nusv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4bv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv = + __glGetProcAddress("glVertexAttrib4bv"); + VertexAttrib4bv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv = + __glGetProcAddress("glVertexAttrib4dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + VertexAttrib4dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4iv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv = + __glGetProcAddress("glVertexAttrib4iv"); + VertexAttrib4iv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv = + __glGetProcAddress("glVertexAttrib4sv"); + VertexAttrib4sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4ubv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv = + __glGetProcAddress("glVertexAttrib4ubv"); + VertexAttrib4ubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4uiv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv = + __glGetProcAddress("glVertexAttrib4uiv"); + VertexAttrib4uiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4usv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv = + __glGetProcAddress("glVertexAttrib4usv"); + VertexAttrib4usv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4)); +} + +void +__glXDisp_ClampColor(GLbyte * pc) +{ + PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor"); + + ClampColor(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); +} + +void +__glXDisp_BindProgramARB(GLbyte * pc) +{ + PFNGLBINDPROGRAMARBPROC BindProgramARB = + __glGetProcAddress("glBindProgramARB"); + BindProgramARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); +} + +int +__glXDisp_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB = + __glGetProcAddress("glDeleteProgramsARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + DeleteProgramsARB(n, (const GLuint *) (pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDisp_GenProgramsARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENPROGRAMSARBPROC GenProgramsARB = + __glGetProcAddress("glGenProgramsARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLuint answerBuffer[200]; + GLuint *programs = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenProgramsARB(n, programs); + __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB = + __glGetProcAddress("glGetProgramEnvParameterdvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLdouble params[4]; + + GetProgramEnvParameterdvARB(*(GLenum *) (pc + 0), + *(GLuint *) (pc + 4), params); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB = + __glGetProcAddress("glGetProgramEnvParameterfvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLfloat params[4]; + + GetProgramEnvParameterfvARB(*(GLenum *) (pc + 0), + *(GLuint *) (pc + 4), params); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB = + __glGetProcAddress("glGetProgramLocalParameterdvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLdouble params[4]; + + GetProgramLocalParameterdvARB(*(GLenum *) (pc + 0), + *(GLuint *) (pc + 4), params); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB = + __glGetProcAddress("glGetProgramLocalParameterfvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLfloat params[4]; + + GetProgramLocalParameterfvARB(*(GLenum *) (pc + 0), + *(GLuint *) (pc + 4), params); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetProgramivARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMIVARBPROC GetProgramivARB = + __glGetProcAddress("glGetProgramivARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = *(GLenum *) (pc + 4); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetProgramivARB(*(GLenum *) (pc + 0), pname, params); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_IsProgramARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsProgramARB(*(GLuint *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) +{ + PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB = + __glGetProcAddress("glProgramEnvParameter4dvARB"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 40); + pc -= 4; + } +#endif + + ProgramEnvParameter4dvARB(*(GLenum *) (pc + 0), + *(GLuint *) (pc + 4), + (const GLdouble *) (pc + 8)); +} + +void +__glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB = + __glGetProcAddress("glProgramEnvParameter4fvARB"); + ProgramEnvParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), + (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) +{ + PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB = + __glGetProcAddress("glProgramLocalParameter4dvARB"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 40); + pc -= 4; + } +#endif + + ProgramLocalParameter4dvARB(*(GLenum *) (pc + 0), + *(GLuint *) (pc + 4), + (const GLdouble *) (pc + 8)); +} + +void +__glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB = + __glGetProcAddress("glProgramLocalParameter4fvARB"); + ProgramLocalParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), + (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_ProgramStringARB(GLbyte * pc) +{ + PFNGLPROGRAMSTRINGARBPROC ProgramStringARB = + __glGetProcAddress("glProgramStringARB"); + const GLsizei len = *(GLsizei *) (pc + 8); + + ProgramStringARB(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), len, (const GLvoid *) (pc + 12)); +} + +void +__glXDisp_VertexAttrib1fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB = + __glGetProcAddress("glVertexAttrib1fvARB"); + VertexAttrib1fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib2fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB = + __glGetProcAddress("glVertexAttrib2fvARB"); + VertexAttrib2fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib3fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB = + __glGetProcAddress("glVertexAttrib3fvARB"); + VertexAttrib3fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB = + __glGetProcAddress("glVertexAttrib4fvARB"); + VertexAttrib4fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_BindFramebuffer(GLbyte * pc) +{ + PFNGLBINDFRAMEBUFFERPROC BindFramebuffer = + __glGetProcAddress("glBindFramebuffer"); + BindFramebuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); +} + +void +__glXDisp_BindRenderbuffer(GLbyte * pc) +{ + PFNGLBINDRENDERBUFFERPROC BindRenderbuffer = + __glGetProcAddress("glBindRenderbuffer"); + BindRenderbuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); +} + +void +__glXDisp_BlitFramebuffer(GLbyte * pc) +{ + PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer = + __glGetProcAddress("glBlitFramebuffer"); + BlitFramebuffer(*(GLint *) (pc + 0), *(GLint *) (pc + 4), + *(GLint *) (pc + 8), *(GLint *) (pc + 12), + *(GLint *) (pc + 16), *(GLint *) (pc + 20), + *(GLint *) (pc + 24), *(GLint *) (pc + 28), + *(GLbitfield *) (pc + 32), *(GLenum *) (pc + 36)); +} + +int +__glXDisp_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus = + __glGetProcAddress("glCheckFramebufferStatus"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLenum retval; + + retval = CheckFramebufferStatus(*(GLenum *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_DeleteFramebuffers(GLbyte * pc) +{ + PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers = + __glGetProcAddress("glDeleteFramebuffers"); + const GLsizei n = *(GLsizei *) (pc + 0); + + DeleteFramebuffers(n, (const GLuint *) (pc + 4)); +} + +void +__glXDisp_DeleteRenderbuffers(GLbyte * pc) +{ + PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers = + __glGetProcAddress("glDeleteRenderbuffers"); + const GLsizei n = *(GLsizei *) (pc + 0); + + DeleteRenderbuffers(n, (const GLuint *) (pc + 4)); +} + +void +__glXDisp_FramebufferRenderbuffer(GLbyte * pc) +{ + PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer = + __glGetProcAddress("glFramebufferRenderbuffer"); + FramebufferRenderbuffer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), *(GLuint *) (pc + 12)); +} + +void +__glXDisp_FramebufferTexture1D(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D = + __glGetProcAddress("glFramebufferTexture1D"); + FramebufferTexture1D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), *(GLuint *) (pc + 12), + *(GLint *) (pc + 16)); +} + +void +__glXDisp_FramebufferTexture2D(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D = + __glGetProcAddress("glFramebufferTexture2D"); + FramebufferTexture2D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), *(GLuint *) (pc + 12), + *(GLint *) (pc + 16)); +} + +void +__glXDisp_FramebufferTexture3D(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D = + __glGetProcAddress("glFramebufferTexture3D"); + FramebufferTexture3D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), *(GLuint *) (pc + 12), + *(GLint *) (pc + 16), *(GLint *) (pc + 20)); +} + +void +__glXDisp_FramebufferTextureLayer(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer = + __glGetProcAddress("glFramebufferTextureLayer"); + FramebufferTextureLayer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLuint *) (pc + 8), *(GLint *) (pc + 12), + *(GLint *) (pc + 16)); +} + +int +__glXDisp_GenFramebuffers(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENFRAMEBUFFERSPROC GenFramebuffers = + __glGetProcAddress("glGenFramebuffers"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLuint answerBuffer[200]; + GLuint *framebuffers = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenFramebuffers(n, framebuffers); + __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENRENDERBUFFERSPROC GenRenderbuffers = + __glGetProcAddress("glGenRenderbuffers"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = *(GLsizei *) (pc + 0); + + GLuint answerBuffer[200]; + GLuint *renderbuffers = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenRenderbuffers(n, renderbuffers); + __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void +__glXDisp_GenerateMipmap(GLbyte * pc) +{ + PFNGLGENERATEMIPMAPPROC GenerateMipmap = + __glGetProcAddress("glGenerateMipmap"); + GenerateMipmap(*(GLenum *) (pc + 0)); +} + +int +__glXDisp_GetFramebufferAttachmentParameteriv(__GLXclientState * cl, + GLbyte * pc) +{ + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC + GetFramebufferAttachmentParameteriv = + __glGetProcAddress("glGetFramebufferAttachmentParameteriv"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLint params[1]; + + GetFramebufferAttachmentParameteriv(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), params); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv = + __glGetProcAddress("glGetRenderbufferParameteriv"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLint params[1]; + + GetRenderbufferParameteriv(*(GLenum *) (pc + 0), + *(GLenum *) (pc + 4), params); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDisp_IsFramebuffer(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISFRAMEBUFFERPROC IsFramebuffer = + __glGetProcAddress("glIsFramebuffer"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsFramebuffer(*(GLuint *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDisp_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISRENDERBUFFERPROC IsRenderbuffer = + __glGetProcAddress("glIsRenderbuffer"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsRenderbuffer(*(GLuint *) (pc + 0)); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDisp_RenderbufferStorage(GLbyte * pc) +{ + PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage = + __glGetProcAddress("glRenderbufferStorage"); + RenderbufferStorage(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12)); +} + +void +__glXDisp_RenderbufferStorageMultisample(GLbyte * pc) +{ + PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample = + __glGetProcAddress("glRenderbufferStorageMultisample"); + RenderbufferStorageMultisample(*(GLenum *) (pc + 0), *(GLsizei *) (pc + 4), + *(GLenum *) (pc + 8), *(GLsizei *) (pc + 12), + *(GLsizei *) (pc + 16)); +} + +void +__glXDisp_SecondaryColor3fvEXT(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT = + __glGetProcAddress("glSecondaryColor3fvEXT"); + SecondaryColor3fvEXT((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_FogCoordfvEXT(GLbyte * pc) +{ + PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT = + __glGetProcAddress("glFogCoordfvEXT"); + FogCoordfvEXT((const GLfloat *) (pc + 0)); +} + +void +__glXDisp_VertexAttrib1dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV = + __glGetProcAddress("glVertexAttrib1dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 12); + pc -= 4; + } +#endif + + VertexAttrib1dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib1fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV = + __glGetProcAddress("glVertexAttrib1fvNV"); + VertexAttrib1fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib1svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV = + __glGetProcAddress("glVertexAttrib1svNV"); + VertexAttrib1svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib2dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV = + __glGetProcAddress("glVertexAttrib2dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + VertexAttrib2dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib2fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV = + __glGetProcAddress("glVertexAttrib2fvNV"); + VertexAttrib2fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib2svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV = + __glGetProcAddress("glVertexAttrib2svNV"); + VertexAttrib2svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib3dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV = + __glGetProcAddress("glVertexAttrib3dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 28); + pc -= 4; + } +#endif + + VertexAttrib3dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib3fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV = + __glGetProcAddress("glVertexAttrib3fvNV"); + VertexAttrib3fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib3svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV = + __glGetProcAddress("glVertexAttrib3svNV"); + VertexAttrib3svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV = + __glGetProcAddress("glVertexAttrib4dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + VertexAttrib4dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV = + __glGetProcAddress("glVertexAttrib4fvNV"); + VertexAttrib4fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV = + __glGetProcAddress("glVertexAttrib4svNV"); + VertexAttrib4svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); +} + +void +__glXDisp_VertexAttrib4ubvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV = + __glGetProcAddress("glVertexAttrib4ubvNV"); + VertexAttrib4ubvNV(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4)); +} + +void +__glXDisp_VertexAttribs1dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV = + __glGetProcAddress("glVertexAttribs1dvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs1dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs1fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV = + __glGetProcAddress("glVertexAttribs1fvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs1fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs1svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV = + __glGetProcAddress("glVertexAttribs1svNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs1svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs2dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV = + __glGetProcAddress("glVertexAttribs2dvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs2dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs2fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV = + __glGetProcAddress("glVertexAttribs2fvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs2fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs2svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV = + __glGetProcAddress("glVertexAttribs2svNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs2svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs3dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV = + __glGetProcAddress("glVertexAttribs3dvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs3dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs3fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV = + __glGetProcAddress("glVertexAttribs3fvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs3fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs3svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV = + __glGetProcAddress("glVertexAttribs3svNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs3svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs4dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV = + __glGetProcAddress("glVertexAttribs4dvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs4dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs4fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV = + __glGetProcAddress("glVertexAttribs4fvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs4fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs4svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV = + __glGetProcAddress("glVertexAttribs4svNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs4svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); +} + +void +__glXDisp_VertexAttribs4ubvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV = + __glGetProcAddress("glVertexAttribs4ubvNV"); + const GLsizei n = *(GLsizei *) (pc + 4); + + VertexAttribs4ubvNV(*(GLuint *) (pc + 0), n, (const GLubyte *) (pc + 8)); +} + +void +__glXDisp_ActiveStencilFaceEXT(GLbyte * pc) +{ + PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT = + __glGetProcAddress("glActiveStencilFaceEXT"); + ActiveStencilFaceEXT(*(GLenum *) (pc + 0)); +} diff --git a/glx/indirect_dispatch.h b/glx/indirect_dispatch.h new file mode 100644 index 0000000..e6e3fda --- /dev/null +++ b/glx/indirect_dispatch.h @@ -0,0 +1,1359 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_DISPATCH_H_ ) +#define _INDIRECT_DISPATCH_H_ + +#include + +struct __GLXclientStateRec; + +extern _X_HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Histogram(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord1dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1dv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Color3uiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_FramebufferTexture1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FramebufferTexture1D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Indexubv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib1sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib1sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_LightModeliv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RenderbufferStorage(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RenderbufferStorage(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GenQueries(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GenQueries(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_BlendColor(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CompressedTexImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CompressedTexImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Scalef(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PassThrough(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Viewport(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_DepthRange(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetQueryiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetQueryiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CompressedTexSubImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CompressedTexSubImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3uiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3uiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4Nbv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nbv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetConvolutionParameteriv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_DeleteRenderbuffers(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DeleteRenderbuffers(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib4usv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4usv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PointSize(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PointSize(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PopName(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PopName(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4Nusv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nusv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ClampColor(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ClampColor(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_LineStipple(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Scaled(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CallLists(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Rotated(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CompressedTexSubImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CompressedTexSubImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3sv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Scissor(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Scissor(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Fogf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Fogf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color4usv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Fogi(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color3usv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord2iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2iv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_AreTexturesResident(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Color3bv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_ColorTable(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Accum(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Accum(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ClearStencil(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ClearIndex(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PushMatrix(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_BindFramebuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BindFramebuffer(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_BlendFuncSeparate(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BlendFuncSeparate(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_End(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_End(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreateContextAttribsARB(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateContextAttribsARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_BindTexture(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_DrawBuffers(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DrawBuffers(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Indexdv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PushName(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PushName(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib1dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib1dv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreateGLXPbufferSGIX(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateGLXPbufferSGIX(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_IsRenderbuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsRenderbuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_DepthMask(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_StencilOp(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_FramebufferTextureLayer(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FramebufferTextureLayer(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Ortho(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Ortho(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color4bv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetCompressedTexImage(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetCompressedTexImage(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_LogicOp(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RenderbufferStorageMultisample(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ActiveTexture(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ActiveTexture(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3bv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3bv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetDrawableAttributes(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_CompressedTexImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CompressedTexImage2D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Color4uiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord1sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_QueryExtensionsString(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_Indexiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PointParameterfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PointParameterfv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetHistogramParameterfv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_Frustum(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GenProgramsARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GenProgramsARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_FramebufferTexture3D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FramebufferTexture3D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Lightfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetFramebufferAttachmentParameteriv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameteriv(struct + __GLXclientStateRec + *, + GLbyte + *); +extern _X_HIDDEN void __glXDisp_ClearDepth(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color4fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Lightiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib3sv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_IsQuery(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsQuery(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Rectdv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Materialiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4Niv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Niv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetProgramStringARB(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexGeni(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexGenf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexGend(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexGend(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Color4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PixelZoom(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_BeginQuery(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BeginQuery(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_SetClientInfo2ARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_SetClientInfo2ARB(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_MultiTexCoord3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3iv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_DestroyGLXPbufferSGIX(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DestroyGLXPbufferSGIX(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_FrontFace(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Lightf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Lightf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MatrixMode(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Lighti(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Lighti(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GenFramebuffers(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GenFramebuffers(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_IsFramebuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsFramebuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_ChangeDrawableAttributesSGIX(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_ChangeDrawableAttributesSGIX(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_BlendEquationSeparate(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BlendEquationSeparate(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CompressedTexImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CompressedTexImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ClearColor(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3ubv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3ubv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PointParameteri(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PointParameteri(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PointParameterf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PointParameterf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4iv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetColorTableParameterfv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_FramebufferTexture2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FramebufferTexture2D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Bitmap(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_CheckFramebufferStatus(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CheckFramebufferStatus(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_BindProgramARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BindProgramARB(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetQueryObjectuiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetQueryObjectuiv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_Map1d(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Map1d(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Map1f(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Map1f(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexImage2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_ChangeDrawableAttributes(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Fogiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_EndQuery(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EndQuery(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Clear(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Clear(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_LightModeli(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ListBase(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ListBase(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetColorTableParameteriv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_CallList(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CallList(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_GenerateMipmap(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_GenerateMipmap(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Rectiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord1iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetQueryObjectiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetQueryObjectiv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_SetClientInfoARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_SetClientInfoARB(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CompressedTexSubImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CompressedTexSubImage3D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_LineWidth(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexGendv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetConvolutionParameterfv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_WindowPos3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_WindowPos3fv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DeleteProgramsARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DeleteProgramsARB(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Materialfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SampleCoverage(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SampleCoverage(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4ubv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4ubv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetHistogramParameteriv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_PointParameteriv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PointParameteriv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Rotatef(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_BindRenderbuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BindRenderbuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_DeleteFramebuffers(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_DeleteFramebuffers(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_FramebufferRenderbuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FramebufferRenderbuffer(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_IsProgramARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsProgramARB(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib4uiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4uiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4Nsv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nsv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Map2d(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Map2f(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4bv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4bv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetConvolutionFilter(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Materialf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Materialf(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Materiali(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Materiali(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Indexsv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_LightModelfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Translated(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Translated(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Translatef(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_StencilMask(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_LoadName(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LoadName(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CullFace(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyPixels(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Rectsv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib4Nubv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nubv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_ClipPlane(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3usv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3usv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord3dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3dv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Indexfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_BlitFramebuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_BlitFramebuffer(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_IndexMask(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_FogCoorddv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_FogCoorddv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_PopAttrib(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Fogfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_InitNames(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_InitNames(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Normal3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Minmax(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Minmax(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_DeleteQueries(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_DeleteQueries(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Hint(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Hint(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Color4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Begin(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Begin(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Rectfv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_LightModelf(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_Disable(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Disable(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN void __glXDisp_ColorMask(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Enable(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Enable(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GetRenderbufferParameteriv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetRenderbufferParameteriv(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); +extern _X_HIDDEN int __glXDisp_GenRenderbuffers(struct __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GenRenderbuffers(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct + __GLXclientStateRec *, + GLbyte *); +extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct + __GLXclientStateRec + *, GLbyte *); +extern _X_HIDDEN void __glXDisp_VertexAttrib4Nuiv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nuiv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_SecondaryColor3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_SecondaryColor3sv(GLbyte * pc); +extern _X_HIDDEN void __glXDisp_MultiTexCoord2sv(GLbyte * pc); +extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2sv(GLbyte * pc); + +#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */ diff --git a/glx/indirect_dispatch_swap.c b/glx/indirect_dispatch_swap.c new file mode 100644 index 0000000..647d0c9 --- /dev/null +++ b/glx/indirect_dispatch_swap.c @@ -0,0 +1,5671 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include "glxserver.h" +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxbyteorder.h" +#include "indirect_util.h" +#include "singlesize.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured(void); +extern void __glXClearErrorOccured(void); + +static const unsigned dummy_answer[2] = { 0, 0 }; + +static GLsizei +bswap_CARD32(const void *src) +{ + union { + uint32_t dst; + GLsizei ret; + } x; + + x.dst = bswap_32(*(uint32_t *) src); + return x.ret; +} + +static GLshort +bswap_CARD16(const void *src) +{ + union { + uint16_t dst; + GLshort ret; + } x; + + x.dst = bswap_16(*(uint16_t *) src); + return x.ret; +} + +static GLenum +bswap_ENUM(const void *src) +{ + union { + uint32_t dst; + GLenum ret; + } x; + + x.dst = bswap_32(*(uint32_t *) src); + return x.ret; +} + +static GLsync +bswap_CARD64(const void *src) +{ + union { + uint64_t dst; + GLsync ret; + } x; + + x.dst = bswap_64(*(uint64_t *) src); + return x.ret; +} + +static GLdouble +bswap_FLOAT64(const void *src) +{ + union { + uint64_t dst; + GLdouble ret; + } x; + + x.dst = bswap_64(*(uint64_t *) src); + return x.ret; +} + +static GLfloat +bswap_FLOAT32(const void *src) +{ + union { + uint32_t dst; + GLfloat ret; + } x; + + x.dst = bswap_32(*(uint32_t *) src); + return x.ret; +} + +static void * +bswap_16_array(uint16_t * src, unsigned count) +{ + unsigned i; + + for (i = 0; i < count; i++) { + uint16_t temp = bswap_16(src[i]); + + src[i] = temp; + } + + return src; +} + +static void * +bswap_32_array(uint32_t * src, unsigned count) +{ + unsigned i; + + for (i = 0; i < count; i++) { + uint32_t temp = bswap_32(src[i]); + + src[i] = temp; + } + + return src; +} + +static void * +bswap_64_array(uint64_t * src, unsigned count) +{ + unsigned i; + + for (i = 0; i < count; i++) { + uint64_t temp = bswap_64(src[i]); + + src[i] = temp; + } + + return src; +} + +int +__glXDispSwap_NewList(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glNewList((GLuint) bswap_CARD32(pc + 0), (GLenum) bswap_ENUM(pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDispSwap_EndList(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glEndList(); + error = Success; + } + + return error; +} + +void +__glXDispSwap_CallList(GLbyte * pc) +{ + glCallList((GLuint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_CallLists(GLbyte * pc) +{ + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + const GLenum type = (GLenum) bswap_ENUM(pc + 4); + const GLvoid *lists; + + switch (type) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + case GL_2_BYTES: + case GL_3_BYTES: + case GL_4_BYTES: + lists = (const GLvoid *) (pc + 8); + break; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + lists = (const GLvoid *) bswap_16_array((uint16_t *) (pc + 8), n); + break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + lists = (const GLvoid *) bswap_32_array((uint32_t *) (pc + 8), n); + break; + default: + return; + } + + glCallLists(n, type, lists); +} + +int +__glXDispSwap_DeleteLists(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glDeleteLists((GLuint) bswap_CARD32(pc + 0), + (GLsizei) bswap_CARD32(pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GenLists(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLuint retval; + + retval = glGenLists((GLsizei) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_ListBase(GLbyte * pc) +{ + glListBase((GLuint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_Begin(GLbyte * pc) +{ + glBegin((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_Bitmap(GLbyte * pc) +{ + const GLubyte *const bitmap = (const GLubyte *) ((pc + 44)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glBitmap((GLsizei) bswap_CARD32(pc + 20), + (GLsizei) bswap_CARD32(pc + 24), + (GLfloat) bswap_FLOAT32(pc + 28), + (GLfloat) bswap_FLOAT32(pc + 32), + (GLfloat) bswap_FLOAT32(pc + 36), + (GLfloat) bswap_FLOAT32(pc + 40), bitmap); +} + +void +__glXDispSwap_Color3bv(GLbyte * pc) +{ + glColor3bv((const GLbyte *) (pc + 0)); +} + +void +__glXDispSwap_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glColor3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Color3fv(GLbyte * pc) +{ + glColor3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Color3iv(GLbyte * pc) +{ + glColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Color3sv(GLbyte * pc) +{ + glColor3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Color3ubv(GLbyte * pc) +{ + glColor3ubv((const GLubyte *) (pc + 0)); +} + +void +__glXDispSwap_Color3uiv(GLbyte * pc) +{ + glColor3uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Color3usv(GLbyte * pc) +{ + glColor3usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Color4bv(GLbyte * pc) +{ + glColor4bv((const GLbyte *) (pc + 0)); +} + +void +__glXDispSwap_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glColor4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Color4fv(GLbyte * pc) +{ + glColor4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Color4iv(GLbyte * pc) +{ + glColor4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Color4sv(GLbyte * pc) +{ + glColor4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Color4ubv(GLbyte * pc) +{ + glColor4ubv((const GLubyte *) (pc + 0)); +} + +void +__glXDispSwap_Color4uiv(GLbyte * pc) +{ + glColor4uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Color4usv(GLbyte * pc) +{ + glColor4usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_EdgeFlagv(GLbyte * pc) +{ + glEdgeFlagv((const GLboolean *) (pc + 0)); +} + +void +__glXDispSwap_End(GLbyte * pc) +{ + glEnd(); +} + +void +__glXDispSwap_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glIndexdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_Indexfv(GLbyte * pc) +{ + glIndexfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_Indexiv(GLbyte * pc) +{ + glIndexiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_Indexsv(GLbyte * pc) +{ + glIndexsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_Normal3bv(GLbyte * pc) +{ + glNormal3bv((const GLbyte *) (pc + 0)); +} + +void +__glXDispSwap_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glNormal3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Normal3fv(GLbyte * pc) +{ + glNormal3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Normal3iv(GLbyte * pc) +{ + glNormal3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Normal3sv(GLbyte * pc) +{ + glNormal3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glRasterPos2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_RasterPos2fv(GLbyte * pc) +{ + glRasterPos2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_RasterPos2iv(GLbyte * pc) +{ + glRasterPos2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_RasterPos2sv(GLbyte * pc) +{ + glRasterPos2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glRasterPos3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_RasterPos3fv(GLbyte * pc) +{ + glRasterPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_RasterPos3iv(GLbyte * pc) +{ + glRasterPos3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_RasterPos3sv(GLbyte * pc) +{ + glRasterPos3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glRasterPos4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_RasterPos4fv(GLbyte * pc) +{ + glRasterPos4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_RasterPos4iv(GLbyte * pc) +{ + glRasterPos4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_RasterPos4sv(GLbyte * pc) +{ + glRasterPos4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glRectdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 16), 2)); +} + +void +__glXDispSwap_Rectfv(GLbyte * pc) +{ + glRectfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 2)); +} + +void +__glXDispSwap_Rectiv(GLbyte * pc) +{ + glRectiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2), + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), 2)); +} + +void +__glXDispSwap_Rectsv(GLbyte * pc) +{ + glRectsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2)); +} + +void +__glXDispSwap_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glTexCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_TexCoord1fv(GLbyte * pc) +{ + glTexCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_TexCoord1iv(GLbyte * pc) +{ + glTexCoord1iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_TexCoord1sv(GLbyte * pc) +{ + glTexCoord1sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glTexCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_TexCoord2fv(GLbyte * pc) +{ + glTexCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_TexCoord2iv(GLbyte * pc) +{ + glTexCoord2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_TexCoord2sv(GLbyte * pc) +{ + glTexCoord2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glTexCoord3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_TexCoord3fv(GLbyte * pc) +{ + glTexCoord3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_TexCoord3iv(GLbyte * pc) +{ + glTexCoord3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_TexCoord3sv(GLbyte * pc) +{ + glTexCoord3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glTexCoord4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_TexCoord4fv(GLbyte * pc) +{ + glTexCoord4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_TexCoord4iv(GLbyte * pc) +{ + glTexCoord4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_TexCoord4sv(GLbyte * pc) +{ + glTexCoord4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glVertex2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_Vertex2fv(GLbyte * pc) +{ + glVertex2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_Vertex2iv(GLbyte * pc) +{ + glVertex2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_Vertex2sv(GLbyte * pc) +{ + glVertex2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glVertex3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Vertex3fv(GLbyte * pc) +{ + glVertex3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Vertex3iv(GLbyte * pc) +{ + glVertex3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Vertex3sv(GLbyte * pc) +{ + glVertex3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glVertex4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Vertex4fv(GLbyte * pc) +{ + glVertex4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Vertex4iv(GLbyte * pc) +{ + glVertex4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_Vertex4sv(GLbyte * pc) +{ + glVertex4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + glClipPlane((GLenum) bswap_ENUM(pc + 32), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); +} + +void +__glXDispSwap_ColorMaterial(GLbyte * pc) +{ + glColorMaterial((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); +} + +void +__glXDispSwap_CullFace(GLbyte * pc) +{ + glCullFace((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_Fogf(GLbyte * pc) +{ + glFogf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); +} + +void +__glXDispSwap_Fogfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + __glFogfv_size(pname)); + + glFogfv(pname, params); +} + +void +__glXDispSwap_Fogi(GLbyte * pc) +{ + glFogi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); +} + +void +__glXDispSwap_Fogiv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), + __glFogiv_size(pname)); + + glFogiv(pname, params); +} + +void +__glXDispSwap_FrontFace(GLbyte * pc) +{ + glFrontFace((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_Hint(GLbyte * pc) +{ + glHint((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); +} + +void +__glXDispSwap_Lightf(GLbyte * pc) +{ + glLightf((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_Lightfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + __glLightfv_size(pname)); + + glLightfv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_Lighti(GLbyte * pc) +{ + glLighti((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_Lightiv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), + __glLightiv_size(pname)); + + glLightiv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_LightModelf(GLbyte * pc) +{ + glLightModelf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); +} + +void +__glXDispSwap_LightModelfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + __glLightModelfv_size(pname)); + + glLightModelfv(pname, params); +} + +void +__glXDispSwap_LightModeli(GLbyte * pc) +{ + glLightModeli((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); +} + +void +__glXDispSwap_LightModeliv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), + __glLightModeliv_size(pname)); + + glLightModeliv(pname, params); +} + +void +__glXDispSwap_LineStipple(GLbyte * pc) +{ + glLineStipple((GLint) bswap_CARD32(pc + 0), + (GLushort) bswap_CARD16(pc + 4)); +} + +void +__glXDispSwap_LineWidth(GLbyte * pc) +{ + glLineWidth((GLfloat) bswap_FLOAT32(pc + 0)); +} + +void +__glXDispSwap_Materialf(GLbyte * pc) +{ + glMaterialf((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_Materialfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + __glMaterialfv_size(pname)); + + glMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_Materiali(GLbyte * pc) +{ + glMateriali((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_Materialiv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), + __glMaterialiv_size(pname)); + + glMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_PointSize(GLbyte * pc) +{ + glPointSize((GLfloat) bswap_FLOAT32(pc + 0)); +} + +void +__glXDispSwap_PolygonMode(GLbyte * pc) +{ + glPolygonMode((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); +} + +void +__glXDispSwap_PolygonStipple(GLbyte * pc) +{ + const GLubyte *const mask = (const GLubyte *) ((pc + 20)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glPolygonStipple(mask); +} + +void +__glXDispSwap_Scissor(GLbyte * pc) +{ + glScissor((GLint) bswap_CARD32(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12)); +} + +void +__glXDispSwap_ShadeModel(GLbyte * pc) +{ + glShadeModel((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_TexParameterf(GLbyte * pc) +{ + glTexParameterf((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + __glTexParameterfv_size(pname)); + + glTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_TexParameteri(GLbyte * pc) +{ + glTexParameteri((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), + __glTexParameteriv_size(pname)); + + glTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_TexImage1D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glTexImage1D((GLenum) bswap_ENUM(pc + 20), + (GLint) bswap_CARD32(pc + 24), + (GLint) bswap_CARD32(pc + 28), + (GLsizei) bswap_CARD32(pc + 32), + (GLint) bswap_CARD32(pc + 40), + (GLenum) bswap_ENUM(pc + 44), + (GLenum) bswap_ENUM(pc + 48), pixels); +} + +void +__glXDispSwap_TexImage2D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glTexImage2D((GLenum) bswap_ENUM(pc + 20), + (GLint) bswap_CARD32(pc + 24), + (GLint) bswap_CARD32(pc + 28), + (GLsizei) bswap_CARD32(pc + 32), + (GLsizei) bswap_CARD32(pc + 36), + (GLint) bswap_CARD32(pc + 40), + (GLenum) bswap_ENUM(pc + 44), + (GLenum) bswap_ENUM(pc + 48), pixels); +} + +void +__glXDispSwap_TexEnvf(GLbyte * pc) +{ + glTexEnvf((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + __glTexEnvfv_size(pname)); + + glTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_TexEnvi(GLbyte * pc) +{ + glTexEnvi((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_TexEnviv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), + __glTexEnviv_size(pname)); + + glTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glTexGend((GLenum) bswap_ENUM(pc + 8), + (GLenum) bswap_ENUM(pc + 12), (GLdouble) bswap_FLOAT64(pc + 0)); +} + +void +__glXDispSwap_TexGendv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLdouble *params; + +#ifdef __GLX_ALIGN64 + const GLuint compsize = __glTexGendv_size(pname); + const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + params = + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), + __glTexGendv_size(pname)); + + glTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_TexGenf(GLbyte * pc) +{ + glTexGenf((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_TexGenfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + __glTexGenfv_size(pname)); + + glTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_TexGeni(GLbyte * pc) +{ + glTexGeni((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_TexGeniv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), + __glTexGeniv_size(pname)); + + glTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_InitNames(GLbyte * pc) +{ + glInitNames(); +} + +void +__glXDispSwap_LoadName(GLbyte * pc) +{ + glLoadName((GLuint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_PassThrough(GLbyte * pc) +{ + glPassThrough((GLfloat) bswap_FLOAT32(pc + 0)); +} + +void +__glXDispSwap_PopName(GLbyte * pc) +{ + glPopName(); +} + +void +__glXDispSwap_PushName(GLbyte * pc) +{ + glPushName((GLuint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_DrawBuffer(GLbyte * pc) +{ + glDrawBuffer((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_Clear(GLbyte * pc) +{ + glClear((GLbitfield) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_ClearAccum(GLbyte * pc) +{ + glClearAccum((GLfloat) bswap_FLOAT32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4), + (GLfloat) bswap_FLOAT32(pc + 8), + (GLfloat) bswap_FLOAT32(pc + 12)); +} + +void +__glXDispSwap_ClearIndex(GLbyte * pc) +{ + glClearIndex((GLfloat) bswap_FLOAT32(pc + 0)); +} + +void +__glXDispSwap_ClearColor(GLbyte * pc) +{ + glClearColor((GLclampf) bswap_FLOAT32(pc + 0), + (GLclampf) bswap_FLOAT32(pc + 4), + (GLclampf) bswap_FLOAT32(pc + 8), + (GLclampf) bswap_FLOAT32(pc + 12)); +} + +void +__glXDispSwap_ClearStencil(GLbyte * pc) +{ + glClearStencil((GLint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glClearDepth((GLclampd) bswap_FLOAT64(pc + 0)); +} + +void +__glXDispSwap_StencilMask(GLbyte * pc) +{ + glStencilMask((GLuint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_ColorMask(GLbyte * pc) +{ + glColorMask(*(GLboolean *) (pc + 0), + *(GLboolean *) (pc + 1), + *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3)); +} + +void +__glXDispSwap_DepthMask(GLbyte * pc) +{ + glDepthMask(*(GLboolean *) (pc + 0)); +} + +void +__glXDispSwap_IndexMask(GLbyte * pc) +{ + glIndexMask((GLuint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_Accum(GLbyte * pc) +{ + glAccum((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); +} + +void +__glXDispSwap_Disable(GLbyte * pc) +{ + glDisable((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_Enable(GLbyte * pc) +{ + glEnable((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_PopAttrib(GLbyte * pc) +{ + glPopAttrib(); +} + +void +__glXDispSwap_PushAttrib(GLbyte * pc) +{ + glPushAttrib((GLbitfield) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + glMapGrid1d((GLint) bswap_CARD32(pc + 16), + (GLdouble) bswap_FLOAT64(pc + 0), + (GLdouble) bswap_FLOAT64(pc + 8)); +} + +void +__glXDispSwap_MapGrid1f(GLbyte * pc) +{ + glMapGrid1f((GLint) bswap_CARD32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4), + (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 40); + pc -= 4; + } +#endif + + glMapGrid2d((GLint) bswap_CARD32(pc + 32), + (GLdouble) bswap_FLOAT64(pc + 0), + (GLdouble) bswap_FLOAT64(pc + 8), + (GLint) bswap_CARD32(pc + 36), + (GLdouble) bswap_FLOAT64(pc + 16), + (GLdouble) bswap_FLOAT64(pc + 24)); +} + +void +__glXDispSwap_MapGrid2f(GLbyte * pc) +{ + glMapGrid2f((GLint) bswap_CARD32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4), + (GLfloat) bswap_FLOAT32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLfloat) bswap_FLOAT32(pc + 16), + (GLfloat) bswap_FLOAT32(pc + 20)); +} + +void +__glXDispSwap_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + glEvalCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_EvalCoord1fv(GLbyte * pc) +{ + glEvalCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glEvalCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_EvalCoord2fv(GLbyte * pc) +{ + glEvalCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); +} + +void +__glXDispSwap_EvalMesh1(GLbyte * pc) +{ + glEvalMesh1((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_EvalPoint1(GLbyte * pc) +{ + glEvalPoint1((GLint) bswap_CARD32(pc + 0)); +} + +void +__glXDispSwap_EvalMesh2(GLbyte * pc) +{ + glEvalMesh2((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16)); +} + +void +__glXDispSwap_EvalPoint2(GLbyte * pc) +{ + glEvalPoint2((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4)); +} + +void +__glXDispSwap_AlphaFunc(GLbyte * pc) +{ + glAlphaFunc((GLenum) bswap_ENUM(pc + 0), (GLclampf) bswap_FLOAT32(pc + 4)); +} + +void +__glXDispSwap_BlendFunc(GLbyte * pc) +{ + glBlendFunc((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); +} + +void +__glXDispSwap_LogicOp(GLbyte * pc) +{ + glLogicOp((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_StencilFunc(GLbyte * pc) +{ + glStencilFunc((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), (GLuint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_StencilOp(GLbyte * pc) +{ + glStencilOp((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8)); +} + +void +__glXDispSwap_DepthFunc(GLbyte * pc) +{ + glDepthFunc((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_PixelZoom(GLbyte * pc) +{ + glPixelZoom((GLfloat) bswap_FLOAT32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4)); +} + +void +__glXDispSwap_PixelTransferf(GLbyte * pc) +{ + glPixelTransferf((GLenum) bswap_ENUM(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4)); +} + +void +__glXDispSwap_PixelTransferi(GLbyte * pc) +{ + glPixelTransferi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); +} + +int +__glXDispSwap_PixelStoref(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glPixelStoref((GLenum) bswap_ENUM(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4)); + error = Success; + } + + return error; +} + +int +__glXDispSwap_PixelStorei(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + glPixelStorei((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4)); + error = Success; + } + + return error; +} + +void +__glXDispSwap_PixelMapfv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4); + + glPixelMapfv((GLenum) bswap_ENUM(pc + 0), + mapsize, + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0)); +} + +void +__glXDispSwap_PixelMapuiv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4); + + glPixelMapuiv((GLenum) bswap_ENUM(pc + 0), + mapsize, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 8), 0)); +} + +void +__glXDispSwap_PixelMapusv(GLbyte * pc) +{ + const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4); + + glPixelMapusv((GLenum) bswap_ENUM(pc + 0), + mapsize, + (const GLushort *) bswap_16_array((uint16_t *) (pc + 8), 0)); +} + +void +__glXDispSwap_ReadBuffer(GLbyte * pc) +{ + glReadBuffer((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_CopyPixels(GLbyte * pc) +{ + glCopyPixels((GLint) bswap_CARD32(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLsizei) bswap_CARD32(pc + 8), + (GLsizei) bswap_CARD32(pc + 12), (GLenum) bswap_ENUM(pc + 16)); +} + +void +__glXDispSwap_DrawPixels(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 36)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glDrawPixels((GLsizei) bswap_CARD32(pc + 20), + (GLsizei) bswap_CARD32(pc + 24), + (GLenum) bswap_ENUM(pc + 28), + (GLenum) bswap_ENUM(pc + 32), pixels); +} + +int +__glXDispSwap_GetBooleanv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + + const GLuint compsize = __glGetBooleanv_size(pname); + GLboolean answerBuffer[200]; + GLboolean *params = + __glXGetAnswerBuffer(cl, compsize, answerBuffer, + sizeof(answerBuffer), 1); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetBooleanv(pname, params); + __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetClipPlane(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLdouble equation[4]; + + glGetClipPlane((GLenum) bswap_ENUM(pc + 0), equation); + (void) bswap_64_array((uint64_t *) equation, 4); + __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetDoublev(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + + const GLuint compsize = __glGetDoublev_size(pname); + GLdouble answerBuffer[200]; + GLdouble *params = + __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, + sizeof(answerBuffer), 8); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetDoublev(pname, params); + (void) bswap_64_array((uint64_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetError(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLenum retval; + + retval = glGetError(); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetFloatv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + + const GLuint compsize = __glGetFloatv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetFloatv(pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetIntegerv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + + const GLuint compsize = __glGetIntegerv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetIntegerv(pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetLightfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetLightfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetLightfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetLightiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetLightiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetLightiv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMapdv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = (GLenum) bswap_ENUM(pc + 0); + const GLenum query = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMapdv_size(target, query); + GLdouble answerBuffer[200]; + GLdouble *v = + __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, + sizeof(answerBuffer), 8); + + if (v == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMapdv(target, query, v); + (void) bswap_64_array((uint64_t *) v, compsize); + __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMapfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = (GLenum) bswap_ENUM(pc + 0); + const GLenum query = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMapfv_size(target, query); + GLfloat answerBuffer[200]; + GLfloat *v = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (v == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMapfv(target, query, v); + (void) bswap_32_array((uint32_t *) v, compsize); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMapiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = (GLenum) bswap_ENUM(pc + 0); + const GLenum query = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMapiv_size(target, query); + GLint answerBuffer[200]; + GLint *v = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (v == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMapiv(target, query, v); + (void) bswap_32_array((uint32_t *) v, compsize); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMaterialfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMaterialfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMaterialiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMaterialiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum map = (GLenum) bswap_ENUM(pc + 0); + + const GLuint compsize = __glGetPixelMapfv_size(map); + GLfloat answerBuffer[200]; + GLfloat *values = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (values == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetPixelMapfv(map, values); + (void) bswap_32_array((uint32_t *) values, compsize); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum map = (GLenum) bswap_ENUM(pc + 0); + + const GLuint compsize = __glGetPixelMapuiv_size(map); + GLuint answerBuffer[200]; + GLuint *values = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (values == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetPixelMapuiv(map, values); + (void) bswap_32_array((uint32_t *) values, compsize); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum map = (GLenum) bswap_ENUM(pc + 0); + + const GLuint compsize = __glGetPixelMapusv_size(map); + GLushort answerBuffer[200]; + GLushort *values = + __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, + sizeof(answerBuffer), 2); + + if (values == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetPixelMapusv(map, values); + (void) bswap_16_array((uint16_t *) values, compsize); + __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetTexEnvfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexEnviv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetTexEnviv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexGendv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetTexGendv_size(pname); + GLdouble answerBuffer[200]; + GLdouble *params = + __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, + sizeof(answerBuffer), 8); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_64_array((uint64_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexGenfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetTexGenfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexGeniv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetTexGeniv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetTexParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetTexParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 8); + + const GLuint compsize = __glGetTexLevelParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexLevelParameterfv((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 8); + + const GLuint compsize = __glGetTexLevelParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetTexLevelParameteriv((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsEnabled(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsEnabled((GLenum) bswap_ENUM(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsList(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsList((GLuint) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 16); + pc -= 4; + } +#endif + + glDepthRange((GLclampd) bswap_FLOAT64(pc + 0), + (GLclampd) bswap_FLOAT64(pc + 8)); +} + +void +__glXDispSwap_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 48); + pc -= 4; + } +#endif + + glFrustum((GLdouble) bswap_FLOAT64(pc + 0), + (GLdouble) bswap_FLOAT64(pc + 8), + (GLdouble) bswap_FLOAT64(pc + 16), + (GLdouble) bswap_FLOAT64(pc + 24), + (GLdouble) bswap_FLOAT64(pc + 32), + (GLdouble) bswap_FLOAT64(pc + 40)); +} + +void +__glXDispSwap_LoadIdentity(GLbyte * pc) +{ + glLoadIdentity(); +} + +void +__glXDispSwap_LoadMatrixf(GLbyte * pc) +{ + glLoadMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16)); +} + +void +__glXDispSwap_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 128); + pc -= 4; + } +#endif + + glLoadMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16)); +} + +void +__glXDispSwap_MatrixMode(GLbyte * pc) +{ + glMatrixMode((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_MultMatrixf(GLbyte * pc) +{ + glMultMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16)); +} + +void +__glXDispSwap_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 128); + pc -= 4; + } +#endif + + glMultMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16)); +} + +void +__glXDispSwap_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 48); + pc -= 4; + } +#endif + + glOrtho((GLdouble) bswap_FLOAT64(pc + 0), + (GLdouble) bswap_FLOAT64(pc + 8), + (GLdouble) bswap_FLOAT64(pc + 16), + (GLdouble) bswap_FLOAT64(pc + 24), + (GLdouble) bswap_FLOAT64(pc + 32), + (GLdouble) bswap_FLOAT64(pc + 40)); +} + +void +__glXDispSwap_PopMatrix(GLbyte * pc) +{ + glPopMatrix(); +} + +void +__glXDispSwap_PushMatrix(GLbyte * pc) +{ + glPushMatrix(); +} + +void +__glXDispSwap_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 32); + pc -= 4; + } +#endif + + glRotated((GLdouble) bswap_FLOAT64(pc + 0), + (GLdouble) bswap_FLOAT64(pc + 8), + (GLdouble) bswap_FLOAT64(pc + 16), + (GLdouble) bswap_FLOAT64(pc + 24)); +} + +void +__glXDispSwap_Rotatef(GLbyte * pc) +{ + glRotatef((GLfloat) bswap_FLOAT32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4), + (GLfloat) bswap_FLOAT32(pc + 8), + (GLfloat) bswap_FLOAT32(pc + 12)); +} + +void +__glXDispSwap_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glScaled((GLdouble) bswap_FLOAT64(pc + 0), + (GLdouble) bswap_FLOAT64(pc + 8), + (GLdouble) bswap_FLOAT64(pc + 16)); +} + +void +__glXDispSwap_Scalef(GLbyte * pc) +{ + glScalef((GLfloat) bswap_FLOAT32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + glTranslated((GLdouble) bswap_FLOAT64(pc + 0), + (GLdouble) bswap_FLOAT64(pc + 8), + (GLdouble) bswap_FLOAT64(pc + 16)); +} + +void +__glXDispSwap_Translatef(GLbyte * pc) +{ + glTranslatef((GLfloat) bswap_FLOAT32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4), + (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_Viewport(GLbyte * pc) +{ + glViewport((GLint) bswap_CARD32(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12)); +} + +void +__glXDispSwap_BindTexture(GLbyte * pc) +{ + glBindTexture((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); +} + +void +__glXDispSwap_Indexubv(GLbyte * pc) +{ + glIndexubv((const GLubyte *) (pc + 0)); +} + +void +__glXDispSwap_PolygonOffset(GLbyte * pc) +{ + glPolygonOffset((GLfloat) bswap_FLOAT32(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4)); +} + +int +__glXDispSwap_AreTexturesResident(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean *residences = + __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = + glAreTexturesResident(n, + (const GLuint *) + bswap_32_array((uint32_t *) (pc + 4), 0), + residences); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +int +__glXDispSwap_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean *residences = + __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = + glAreTexturesResident(n, + (const GLuint *) + bswap_32_array((uint32_t *) (pc + 4), 0), + residences); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_CopyTexImage1D(GLbyte * pc) +{ + glCopyTexImage1D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLsizei) bswap_CARD32(pc + 20), + (GLint) bswap_CARD32(pc + 24)); +} + +void +__glXDispSwap_CopyTexImage2D(GLbyte * pc) +{ + glCopyTexImage2D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLsizei) bswap_CARD32(pc + 20), + (GLsizei) bswap_CARD32(pc + 24), + (GLint) bswap_CARD32(pc + 28)); +} + +void +__glXDispSwap_CopyTexSubImage1D(GLbyte * pc) +{ + glCopyTexSubImage1D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLsizei) bswap_CARD32(pc + 20)); +} + +void +__glXDispSwap_CopyTexSubImage2D(GLbyte * pc) +{ + glCopyTexSubImage2D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLint) bswap_CARD32(pc + 20), + (GLsizei) bswap_CARD32(pc + 24), + (GLsizei) bswap_CARD32(pc + 28)); +} + +int +__glXDispSwap_DeleteTextures(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + glDeleteTextures(n, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 0)); + error = Success; + } + + return error; +} + +int +__glXDispSwap_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + glDeleteTextures(n, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 0)); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GenTextures(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLuint answerBuffer[200]; + GLuint *textures = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + glGenTextures(n, textures); + (void) bswap_32_array((uint32_t *) textures, n); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLuint answerBuffer[200]; + GLuint *textures = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + glGenTextures(n, textures); + (void) bswap_32_array((uint32_t *) textures, n); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsTexture(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsTexture((GLuint) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsTextureEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = glIsTexture((GLuint) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_PrioritizeTextures(GLbyte * pc) +{ + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + glPrioritizeTextures(n, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 0), + (const GLclampf *) + bswap_32_array((uint32_t *) (pc + 4), 0)); +} + +void +__glXDispSwap_TexSubImage1D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glTexSubImage1D((GLenum) bswap_ENUM(pc + 20), + (GLint) bswap_CARD32(pc + 24), + (GLint) bswap_CARD32(pc + 28), + (GLsizei) bswap_CARD32(pc + 36), + (GLenum) bswap_ENUM(pc + 44), + (GLenum) bswap_ENUM(pc + 48), pixels); +} + +void +__glXDispSwap_TexSubImage2D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glTexSubImage2D((GLenum) bswap_ENUM(pc + 20), + (GLint) bswap_CARD32(pc + 24), + (GLint) bswap_CARD32(pc + 28), + (GLint) bswap_CARD32(pc + 32), + (GLsizei) bswap_CARD32(pc + 36), + (GLsizei) bswap_CARD32(pc + 40), + (GLenum) bswap_ENUM(pc + 44), + (GLenum) bswap_ENUM(pc + 48), pixels); +} + +void +__glXDispSwap_BlendColor(GLbyte * pc) +{ + glBlendColor((GLclampf) bswap_FLOAT32(pc + 0), + (GLclampf) bswap_FLOAT32(pc + 4), + (GLclampf) bswap_FLOAT32(pc + 8), + (GLclampf) bswap_FLOAT32(pc + 12)); +} + +void +__glXDispSwap_BlendEquation(GLbyte * pc) +{ + glBlendEquation((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_ColorTable(GLbyte * pc) +{ + const GLvoid *const table = (const GLvoid *) ((pc + 40)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glColorTable((GLenum) bswap_ENUM(pc + 20), + (GLenum) bswap_ENUM(pc + 24), + (GLsizei) bswap_CARD32(pc + 28), + (GLenum) bswap_ENUM(pc + 32), + (GLenum) bswap_ENUM(pc + 36), table); +} + +void +__glXDispSwap_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + __glColorTableParameterfv_size(pname)); + + glColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), + __glColorTableParameteriv_size(pname)); + + glColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_CopyColorTable(GLbyte * pc) +{ + glCopyColorTable((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16)); +} + +int +__glXDispSwap_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void +__glXDispSwap_ColorSubTable(GLbyte * pc) +{ + const GLvoid *const data = (const GLvoid *) ((pc + 40)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glColorSubTable((GLenum) bswap_ENUM(pc + 20), + (GLsizei) bswap_CARD32(pc + 24), + (GLsizei) bswap_CARD32(pc + 28), + (GLenum) bswap_ENUM(pc + 32), + (GLenum) bswap_ENUM(pc + 36), data); +} + +void +__glXDispSwap_CopyColorSubTable(GLbyte * pc) +{ + glCopyColorSubTable((GLenum) bswap_ENUM(pc + 0), + (GLsizei) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16)); +} + +void +__glXDispSwap_ConvolutionFilter1D(GLbyte * pc) +{ + const GLvoid *const image = (const GLvoid *) ((pc + 44)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glConvolutionFilter1D((GLenum) bswap_ENUM(pc + 20), + (GLenum) bswap_ENUM(pc + 24), + (GLsizei) bswap_CARD32(pc + 28), + (GLenum) bswap_ENUM(pc + 36), + (GLenum) bswap_ENUM(pc + 40), image); +} + +void +__glXDispSwap_ConvolutionFilter2D(GLbyte * pc) +{ + const GLvoid *const image = (const GLvoid *) ((pc + 44)); + __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glConvolutionFilter2D((GLenum) bswap_ENUM(pc + 20), + (GLenum) bswap_ENUM(pc + 24), + (GLsizei) bswap_CARD32(pc + 28), + (GLsizei) bswap_CARD32(pc + 32), + (GLenum) bswap_ENUM(pc + 36), + (GLenum) bswap_ENUM(pc + 40), image); +} + +void +__glXDispSwap_ConvolutionParameterf(GLbyte * pc) +{ + glConvolutionParameterf((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLfloat) bswap_FLOAT32(pc + 8)); +} + +void +__glXDispSwap_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + __glConvolutionParameterfv_size + (pname)); + + glConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_ConvolutionParameteri(GLbyte * pc) +{ + glConvolutionParameteri((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLint) bswap_CARD32(pc + 8)); +} + +void +__glXDispSwap_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 8), + __glConvolutionParameteriv_size(pname)); + + glConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); +} + +void +__glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc) +{ + glCopyConvolutionFilter1D((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16)); +} + +void +__glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc) +{ + glCopyConvolutionFilter2D((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16), + (GLsizei) bswap_CARD32(pc + 20)); +} + +int +__glXDispSwap_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void +__glXDispSwap_Histogram(GLbyte * pc) +{ + glHistogram((GLenum) bswap_ENUM(pc + 0), + (GLsizei) bswap_CARD32(pc + 4), + (GLenum) bswap_ENUM(pc + 8), *(GLboolean *) (pc + 12)); +} + +void +__glXDispSwap_Minmax(GLbyte * pc) +{ + glMinmax((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), *(GLboolean *) (pc + 8)); +} + +void +__glXDispSwap_ResetHistogram(GLbyte * pc) +{ + glResetHistogram((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_ResetMinmax(GLbyte * pc) +{ + glResetMinmax((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_TexImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *) (pc + 76); + const GLvoid *const pixels = + (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); + __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, + (GLint) bswap_CARD32(&hdr->imageHeight)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, + (GLint) bswap_CARD32(&hdr->skipImages)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glTexImage3D((GLenum) bswap_ENUM(pc + 36), + (GLint) bswap_CARD32(pc + 40), + (GLint) bswap_CARD32(pc + 44), + (GLsizei) bswap_CARD32(pc + 48), + (GLsizei) bswap_CARD32(pc + 52), + (GLsizei) bswap_CARD32(pc + 56), + (GLint) bswap_CARD32(pc + 64), + (GLenum) bswap_ENUM(pc + 68), + (GLenum) bswap_ENUM(pc + 72), pixels); +} + +void +__glXDispSwap_TexSubImage3D(GLbyte * pc) +{ + const GLvoid *const pixels = (const GLvoid *) ((pc + 88)); + __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); + glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, + (GLint) bswap_CARD32(&hdr->imageHeight)); + glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); + glPixelStorei(GL_UNPACK_SKIP_IMAGES, + (GLint) bswap_CARD32(&hdr->skipImages)); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, + (GLint) bswap_CARD32(&hdr->skipPixels)); + glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); + + glTexSubImage3D((GLenum) bswap_ENUM(pc + 36), + (GLint) bswap_CARD32(pc + 40), + (GLint) bswap_CARD32(pc + 44), + (GLint) bswap_CARD32(pc + 48), + (GLint) bswap_CARD32(pc + 52), + (GLsizei) bswap_CARD32(pc + 60), + (GLsizei) bswap_CARD32(pc + 64), + (GLsizei) bswap_CARD32(pc + 68), + (GLenum) bswap_ENUM(pc + 76), + (GLenum) bswap_ENUM(pc + 80), pixels); +} + +void +__glXDispSwap_CopyTexSubImage3D(GLbyte * pc) +{ + glCopyTexSubImage3D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLint) bswap_CARD32(pc + 20), + (GLint) bswap_CARD32(pc + 24), + (GLsizei) bswap_CARD32(pc + 28), + (GLsizei) bswap_CARD32(pc + 32)); +} + +void +__glXDispSwap_ActiveTexture(GLbyte * pc) +{ + glActiveTextureARB((GLenum) bswap_ENUM(pc + 0)); +} + +void +__glXDispSwap_MultiTexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 12); + pc -= 4; + } +#endif + + glMultiTexCoord1dvARB((GLenum) bswap_ENUM(pc + 8), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), + 1)); +} + +void +__glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc) +{ + glMultiTexCoord1fvARB((GLenum) bswap_ENUM(pc + 0), + (const GLfloat *) + bswap_32_array((uint32_t *) (pc + 4), 1)); +} + +void +__glXDispSwap_MultiTexCoord1iv(GLbyte * pc) +{ + glMultiTexCoord1ivARB((GLenum) bswap_ENUM(pc + 0), + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), + 1)); +} + +void +__glXDispSwap_MultiTexCoord1sv(GLbyte * pc) +{ + glMultiTexCoord1svARB((GLenum) bswap_ENUM(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 1)); +} + +void +__glXDispSwap_MultiTexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + glMultiTexCoord2dvARB((GLenum) bswap_ENUM(pc + 16), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), + 2)); +} + +void +__glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc) +{ + glMultiTexCoord2fvARB((GLenum) bswap_ENUM(pc + 0), + (const GLfloat *) + bswap_32_array((uint32_t *) (pc + 4), 2)); +} + +void +__glXDispSwap_MultiTexCoord2iv(GLbyte * pc) +{ + glMultiTexCoord2ivARB((GLenum) bswap_ENUM(pc + 0), + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), + 2)); +} + +void +__glXDispSwap_MultiTexCoord2sv(GLbyte * pc) +{ + glMultiTexCoord2svARB((GLenum) bswap_ENUM(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 2)); +} + +void +__glXDispSwap_MultiTexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 28); + pc -= 4; + } +#endif + + glMultiTexCoord3dvARB((GLenum) bswap_ENUM(pc + 24), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), + 3)); +} + +void +__glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc) +{ + glMultiTexCoord3fvARB((GLenum) bswap_ENUM(pc + 0), + (const GLfloat *) + bswap_32_array((uint32_t *) (pc + 4), 3)); +} + +void +__glXDispSwap_MultiTexCoord3iv(GLbyte * pc) +{ + glMultiTexCoord3ivARB((GLenum) bswap_ENUM(pc + 0), + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), + 3)); +} + +void +__glXDispSwap_MultiTexCoord3sv(GLbyte * pc) +{ + glMultiTexCoord3svARB((GLenum) bswap_ENUM(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 3)); +} + +void +__glXDispSwap_MultiTexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + glMultiTexCoord4dvARB((GLenum) bswap_ENUM(pc + 32), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), + 4)); +} + +void +__glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc) +{ + glMultiTexCoord4fvARB((GLenum) bswap_ENUM(pc + 0), + (const GLfloat *) + bswap_32_array((uint32_t *) (pc + 4), 4)); +} + +void +__glXDispSwap_MultiTexCoord4iv(GLbyte * pc) +{ + glMultiTexCoord4ivARB((GLenum) bswap_ENUM(pc + 0), + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_MultiTexCoord4sv(GLbyte * pc) +{ + glMultiTexCoord4svARB((GLenum) bswap_ENUM(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_CompressedTexImage1D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D = + __glGetProcAddress("glCompressedTexImage1D"); + const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20); + + CompressedTexImage1D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLsizei) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + imageSize, (const GLvoid *) (pc + 24)); +} + +void +__glXDispSwap_CompressedTexImage2D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D = + __glGetProcAddress("glCompressedTexImage2D"); + const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 24); + + CompressedTexImage2D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLsizei) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16), + (GLint) bswap_CARD32(pc + 20), + imageSize, (const GLvoid *) (pc + 28)); +} + +void +__glXDispSwap_CompressedTexImage3D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D = + __glGetProcAddress("glCompressedTexImage3D"); + const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28); + + CompressedTexImage3D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLsizei) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16), + (GLsizei) bswap_CARD32(pc + 20), + (GLint) bswap_CARD32(pc + 24), + imageSize, (const GLvoid *) (pc + 32)); +} + +void +__glXDispSwap_CompressedTexSubImage1D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D = + __glGetProcAddress("glCompressedTexSubImage1D"); + const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20); + + CompressedTexSubImage1D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLsizei) bswap_CARD32(pc + 12), + (GLenum) bswap_ENUM(pc + 16), + imageSize, (const GLvoid *) (pc + 24)); +} + +void +__glXDispSwap_CompressedTexSubImage2D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D = + __glGetProcAddress("glCompressedTexSubImage2D"); + const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28); + + CompressedTexSubImage2D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16), + (GLsizei) bswap_CARD32(pc + 20), + (GLenum) bswap_ENUM(pc + 24), + imageSize, (const GLvoid *) (pc + 32)); +} + +void +__glXDispSwap_CompressedTexSubImage3D(GLbyte * pc) +{ + PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D = + __glGetProcAddress("glCompressedTexSubImage3D"); + const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 36); + + CompressedTexSubImage3D((GLenum) bswap_ENUM(pc + 0), + (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLsizei) bswap_CARD32(pc + 20), + (GLsizei) bswap_CARD32(pc + 24), + (GLsizei) bswap_CARD32(pc + 28), + (GLenum) bswap_ENUM(pc + 32), + imageSize, (const GLvoid *) (pc + 40)); +} + +void +__glXDispSwap_SampleCoverage(GLbyte * pc) +{ + PFNGLSAMPLECOVERAGEPROC SampleCoverage = + __glGetProcAddress("glSampleCoverage"); + SampleCoverage((GLclampf) bswap_FLOAT32(pc + 0), *(GLboolean *) (pc + 4)); +} + +void +__glXDispSwap_BlendFuncSeparate(GLbyte * pc) +{ + PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate = + __glGetProcAddress("glBlendFuncSeparate"); + BlendFuncSeparate((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLenum) bswap_ENUM(pc + 12)); +} + +void +__glXDispSwap_FogCoorddv(GLbyte * pc) +{ + PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv"); + +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 8); + pc -= 4; + } +#endif + + FogCoorddv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_PointParameterf(GLbyte * pc) +{ + PFNGLPOINTPARAMETERFPROC PointParameterf = + __glGetProcAddress("glPointParameterf"); + PointParameterf((GLenum) bswap_ENUM(pc + 0), + (GLfloat) bswap_FLOAT32(pc + 4)); +} + +void +__glXDispSwap_PointParameterfv(GLbyte * pc) +{ + PFNGLPOINTPARAMETERFVPROC PointParameterfv = + __glGetProcAddress("glPointParameterfv"); + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + const GLfloat *params; + + params = + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + __glPointParameterfv_size(pname)); + + PointParameterfv(pname, params); +} + +void +__glXDispSwap_PointParameteri(GLbyte * pc) +{ + PFNGLPOINTPARAMETERIPROC PointParameteri = + __glGetProcAddress("glPointParameteri"); + PointParameteri((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); +} + +void +__glXDispSwap_PointParameteriv(GLbyte * pc) +{ + PFNGLPOINTPARAMETERIVPROC PointParameteriv = + __glGetProcAddress("glPointParameteriv"); + const GLenum pname = (GLenum) bswap_ENUM(pc + 0); + const GLint *params; + + params = + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), + __glPointParameteriv_size(pname)); + + PointParameteriv(pname, params); +} + +void +__glXDispSwap_SecondaryColor3bv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv = + __glGetProcAddress("glSecondaryColor3bv"); + SecondaryColor3bv((const GLbyte *) (pc + 0)); +} + +void +__glXDispSwap_SecondaryColor3dv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv = + __glGetProcAddress("glSecondaryColor3dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 24); + pc -= 4; + } +#endif + + SecondaryColor3dv((const GLdouble *) + bswap_64_array((uint64_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_SecondaryColor3iv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv = + __glGetProcAddress("glSecondaryColor3iv"); + SecondaryColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_SecondaryColor3sv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv = + __glGetProcAddress("glSecondaryColor3sv"); + SecondaryColor3sv((const GLshort *) + bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_SecondaryColor3ubv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv = + __glGetProcAddress("glSecondaryColor3ubv"); + SecondaryColor3ubv((const GLubyte *) (pc + 0)); +} + +void +__glXDispSwap_SecondaryColor3uiv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv = + __glGetProcAddress("glSecondaryColor3uiv"); + SecondaryColor3uiv((const GLuint *) + bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_SecondaryColor3usv(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv = + __glGetProcAddress("glSecondaryColor3usv"); + SecondaryColor3usv((const GLushort *) + bswap_16_array((uint16_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_WindowPos3fv(GLbyte * pc) +{ + PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv"); + + WindowPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_BeginQuery(GLbyte * pc) +{ + PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery"); + + BeginQuery((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); +} + +int +__glXDispSwap_DeleteQueries(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLDELETEQUERIESPROC DeleteQueries = + __glGetProcAddress("glDeleteQueries"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + DeleteQueries(n, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 0)); + error = Success; + } + + return error; +} + +void +__glXDispSwap_EndQuery(GLbyte * pc) +{ + PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery"); + + EndQuery((GLenum) bswap_ENUM(pc + 0)); +} + +int +__glXDispSwap_GenQueries(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLuint answerBuffer[200]; + GLuint *ids = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenQueries(n, ids); + (void) bswap_32_array((uint32_t *) ids, n); + __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv = + __glGetProcAddress("glGetQueryObjectiv"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetQueryObjectiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetQueryObjectiv((GLuint) bswap_CARD32(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv = + __glGetProcAddress("glGetQueryObjectuiv"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetQueryObjectuiv_size(pname); + GLuint answerBuffer[200]; + GLuint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetQueryObjectuiv((GLuint) bswap_CARD32(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetQueryiv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetQueryiv_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetQueryiv((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsQuery(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery"); + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsQuery((GLuint) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_BlendEquationSeparate(GLbyte * pc) +{ + PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate = + __glGetProcAddress("glBlendEquationSeparate"); + BlendEquationSeparate((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4)); +} + +void +__glXDispSwap_DrawBuffers(GLbyte * pc) +{ + PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + DrawBuffers(n, (const GLenum *) bswap_32_array((uint32_t *) (pc + 4), 0)); +} + +void +__glXDispSwap_VertexAttrib1dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv = + __glGetProcAddress("glVertexAttrib1dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 12); + pc -= 4; + } +#endif + + VertexAttrib1dv((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 1)); +} + +void +__glXDispSwap_VertexAttrib1sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv = + __glGetProcAddress("glVertexAttrib1sv"); + VertexAttrib1sv((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 1)); +} + +void +__glXDispSwap_VertexAttrib2dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv = + __glGetProcAddress("glVertexAttrib2dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + VertexAttrib2dv((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 2)); +} + +void +__glXDispSwap_VertexAttrib2sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv = + __glGetProcAddress("glVertexAttrib2sv"); + VertexAttrib2sv((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2)); +} + +void +__glXDispSwap_VertexAttrib3dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv = + __glGetProcAddress("glVertexAttrib3dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 28); + pc -= 4; + } +#endif + + VertexAttrib3dv((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 3)); +} + +void +__glXDispSwap_VertexAttrib3sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv = + __glGetProcAddress("glVertexAttrib3sv"); + VertexAttrib3sv((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 3)); +} + +void +__glXDispSwap_VertexAttrib4Nbv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv = + __glGetProcAddress("glVertexAttrib4Nbv"); + VertexAttrib4Nbv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4)); +} + +void +__glXDispSwap_VertexAttrib4Niv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv = + __glGetProcAddress("glVertexAttrib4Niv"); + VertexAttrib4Niv((GLuint) bswap_CARD32(pc + 0), + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4)); +} + +void +__glXDispSwap_VertexAttrib4Nsv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv = + __glGetProcAddress("glVertexAttrib4Nsv"); + VertexAttrib4Nsv((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_VertexAttrib4Nubv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv = + __glGetProcAddress("glVertexAttrib4Nubv"); + VertexAttrib4Nubv((GLuint) bswap_CARD32(pc + 0), + (const GLubyte *) (pc + 4)); +} + +void +__glXDispSwap_VertexAttrib4Nuiv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv = + __glGetProcAddress("glVertexAttrib4Nuiv"); + VertexAttrib4Nuiv((GLuint) bswap_CARD32(pc + 0), + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_VertexAttrib4Nusv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv = + __glGetProcAddress("glVertexAttrib4Nusv"); + VertexAttrib4Nusv((GLuint) bswap_CARD32(pc + 0), + (const GLushort *) bswap_16_array((uint16_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_VertexAttrib4bv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv = + __glGetProcAddress("glVertexAttrib4bv"); + VertexAttrib4bv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4)); +} + +void +__glXDispSwap_VertexAttrib4dv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv = + __glGetProcAddress("glVertexAttrib4dv"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + VertexAttrib4dv((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_VertexAttrib4iv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv = + __glGetProcAddress("glVertexAttrib4iv"); + VertexAttrib4iv((GLuint) bswap_CARD32(pc + 0), + (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4)); +} + +void +__glXDispSwap_VertexAttrib4sv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv = + __glGetProcAddress("glVertexAttrib4sv"); + VertexAttrib4sv((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 4)); +} + +void +__glXDispSwap_VertexAttrib4ubv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv = + __glGetProcAddress("glVertexAttrib4ubv"); + VertexAttrib4ubv((GLuint) bswap_CARD32(pc + 0), (const GLubyte *) (pc + 4)); +} + +void +__glXDispSwap_VertexAttrib4uiv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv = + __glGetProcAddress("glVertexAttrib4uiv"); + VertexAttrib4uiv((GLuint) bswap_CARD32(pc + 0), + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 4)); +} + +void +__glXDispSwap_VertexAttrib4usv(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv = + __glGetProcAddress("glVertexAttrib4usv"); + VertexAttrib4usv((GLuint) bswap_CARD32(pc + 0), + (const GLushort *) bswap_16_array((uint16_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_ClampColor(GLbyte * pc) +{ + PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor"); + + ClampColor((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); +} + +void +__glXDispSwap_BindProgramARB(GLbyte * pc) +{ + PFNGLBINDPROGRAMARBPROC BindProgramARB = + __glGetProcAddress("glBindProgramARB"); + BindProgramARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); +} + +int +__glXDispSwap_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB = + __glGetProcAddress("glDeleteProgramsARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + DeleteProgramsARB(n, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 0)); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GenProgramsARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENPROGRAMSARBPROC GenProgramsARB = + __glGetProcAddress("glGenProgramsARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLuint answerBuffer[200]; + GLuint *programs = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenProgramsARB(n, programs); + (void) bswap_32_array((uint32_t *) programs, n); + __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB = + __glGetProcAddress("glGetProgramEnvParameterdvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLdouble params[4]; + + GetProgramEnvParameterdvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), params); + (void) bswap_64_array((uint64_t *) params, 4); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB = + __glGetProcAddress("glGetProgramEnvParameterfvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLfloat params[4]; + + GetProgramEnvParameterfvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), params); + (void) bswap_32_array((uint32_t *) params, 4); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB = + __glGetProcAddress("glGetProgramLocalParameterdvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLdouble params[4]; + + GetProgramLocalParameterdvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), params); + (void) bswap_64_array((uint64_t *) params, 4); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB = + __glGetProcAddress("glGetProgramLocalParameterfvARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLfloat params[4]; + + GetProgramLocalParameterfvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), params); + (void) bswap_32_array((uint32_t *) params, 4); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetProgramivARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETPROGRAMIVARBPROC GetProgramivARB = + __glGetProcAddress("glGetProgramivARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLenum pname = (GLenum) bswap_ENUM(pc + 4); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint *params = + __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, + sizeof(answerBuffer), 4); + + if (params == NULL) + return BadAlloc; + __glXClearErrorOccured(); + + GetProgramivARB((GLenum) bswap_ENUM(pc + 0), pname, params); + (void) bswap_32_array((uint32_t *) params, compsize); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsProgramARB(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsProgramARB((GLuint) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) +{ + PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB = + __glGetProcAddress("glProgramEnvParameter4dvARB"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 40); + pc -= 4; + } +#endif + + ProgramEnvParameter4dvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), + (const GLdouble *) + bswap_64_array((uint64_t *) (pc + 8), 4)); +} + +void +__glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB = + __glGetProcAddress("glProgramEnvParameter4fvARB"); + ProgramEnvParameter4fvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), + (const GLfloat *) + bswap_32_array((uint32_t *) (pc + 8), 4)); +} + +void +__glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) +{ + PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB = + __glGetProcAddress("glProgramLocalParameter4dvARB"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 40); + pc -= 4; + } +#endif + + ProgramLocalParameter4dvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), + (const GLdouble *) + bswap_64_array((uint64_t *) (pc + 8), 4)); +} + +void +__glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB = + __glGetProcAddress("glProgramLocalParameter4fvARB"); + ProgramLocalParameter4fvARB((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4), + (const GLfloat *) + bswap_32_array((uint32_t *) (pc + 8), 4)); +} + +void +__glXDispSwap_ProgramStringARB(GLbyte * pc) +{ + PFNGLPROGRAMSTRINGARBPROC ProgramStringARB = + __glGetProcAddress("glProgramStringARB"); + const GLsizei len = (GLsizei) bswap_CARD32(pc + 8); + + ProgramStringARB((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + len, (const GLvoid *) (pc + 12)); +} + +void +__glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB = + __glGetProcAddress("glVertexAttrib1fvARB"); + VertexAttrib1fvARB((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 1)); +} + +void +__glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB = + __glGetProcAddress("glVertexAttrib2fvARB"); + VertexAttrib2fvARB((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 2)); +} + +void +__glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB = + __glGetProcAddress("glVertexAttrib3fvARB"); + VertexAttrib3fvARB((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 3)); +} + +void +__glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB = + __glGetProcAddress("glVertexAttrib4fvARB"); + VertexAttrib4fvARB((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_BindFramebuffer(GLbyte * pc) +{ + PFNGLBINDFRAMEBUFFERPROC BindFramebuffer = + __glGetProcAddress("glBindFramebuffer"); + BindFramebuffer((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); +} + +void +__glXDispSwap_BindRenderbuffer(GLbyte * pc) +{ + PFNGLBINDRENDERBUFFERPROC BindRenderbuffer = + __glGetProcAddress("glBindRenderbuffer"); + BindRenderbuffer((GLenum) bswap_ENUM(pc + 0), + (GLuint) bswap_CARD32(pc + 4)); +} + +void +__glXDispSwap_BlitFramebuffer(GLbyte * pc) +{ + PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer = + __glGetProcAddress("glBlitFramebuffer"); + BlitFramebuffer((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4), + (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLint) bswap_CARD32(pc + 20), + (GLint) bswap_CARD32(pc + 24), + (GLint) bswap_CARD32(pc + 28), + (GLbitfield) bswap_CARD32(pc + 32), + (GLenum) bswap_ENUM(pc + 36)); +} + +int +__glXDispSwap_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus = + __glGetProcAddress("glCheckFramebufferStatus"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLenum retval; + + retval = CheckFramebufferStatus((GLenum) bswap_ENUM(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_DeleteFramebuffers(GLbyte * pc) +{ + PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers = + __glGetProcAddress("glDeleteFramebuffers"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + DeleteFramebuffers(n, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 0)); +} + +void +__glXDispSwap_DeleteRenderbuffers(GLbyte * pc) +{ + PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers = + __glGetProcAddress("glDeleteRenderbuffers"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + DeleteRenderbuffers(n, + (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), + 0)); +} + +void +__glXDispSwap_FramebufferRenderbuffer(GLbyte * pc) +{ + PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer = + __glGetProcAddress("glFramebufferRenderbuffer"); + FramebufferRenderbuffer((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLuint) bswap_CARD32(pc + 12)); +} + +void +__glXDispSwap_FramebufferTexture1D(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D = + __glGetProcAddress("glFramebufferTexture1D"); + FramebufferTexture1D((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLuint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16)); +} + +void +__glXDispSwap_FramebufferTexture2D(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D = + __glGetProcAddress("glFramebufferTexture2D"); + FramebufferTexture2D((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLuint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16)); +} + +void +__glXDispSwap_FramebufferTexture3D(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D = + __glGetProcAddress("glFramebufferTexture3D"); + FramebufferTexture3D((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLuint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16), + (GLint) bswap_CARD32(pc + 20)); +} + +void +__glXDispSwap_FramebufferTextureLayer(GLbyte * pc) +{ + PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer = + __glGetProcAddress("glFramebufferTextureLayer"); + FramebufferTextureLayer((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLuint) bswap_CARD32(pc + 8), + (GLint) bswap_CARD32(pc + 12), + (GLint) bswap_CARD32(pc + 16)); +} + +int +__glXDispSwap_GenFramebuffers(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENFRAMEBUFFERSPROC GenFramebuffers = + __glGetProcAddress("glGenFramebuffers"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLuint answerBuffer[200]; + GLuint *framebuffers = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenFramebuffers(n, framebuffers); + (void) bswap_32_array((uint32_t *) framebuffers, n); + __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGENRENDERBUFFERSPROC GenRenderbuffers = + __glGetProcAddress("glGenRenderbuffers"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); + + GLuint answerBuffer[200]; + GLuint *renderbuffers = + __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), + 4); + GenRenderbuffers(n, renderbuffers); + (void) bswap_32_array((uint32_t *) renderbuffers, n); + __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void +__glXDispSwap_GenerateMipmap(GLbyte * pc) +{ + PFNGLGENERATEMIPMAPPROC GenerateMipmap = + __glGetProcAddress("glGenerateMipmap"); + GenerateMipmap((GLenum) bswap_ENUM(pc + 0)); +} + +int +__glXDispSwap_GetFramebufferAttachmentParameteriv(__GLXclientState * cl, + GLbyte * pc) +{ + PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC + GetFramebufferAttachmentParameteriv = + __glGetProcAddress("glGetFramebufferAttachmentParameteriv"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLint params[1]; + + GetFramebufferAttachmentParameteriv((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + params); + (void) bswap_32_array((uint32_t *) params, 1); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv = + __glGetProcAddress("glGetRenderbufferParameteriv"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLint params[1]; + + GetRenderbufferParameteriv((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), params); + (void) bswap_32_array((uint32_t *) params, 1); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsFramebuffer(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISFRAMEBUFFERPROC IsFramebuffer = + __glGetProcAddress("glIsFramebuffer"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsFramebuffer((GLuint) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int +__glXDispSwap_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc) +{ + PFNGLISRENDERBUFFERPROC IsRenderbuffer = + __glGetProcAddress("glIsRenderbuffer"); + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLboolean retval; + + retval = IsRenderbuffer((GLuint) bswap_CARD32(pc + 0)); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void +__glXDispSwap_RenderbufferStorage(GLbyte * pc) +{ + PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage = + __glGetProcAddress("glRenderbufferStorage"); + RenderbufferStorage((GLenum) bswap_ENUM(pc + 0), + (GLenum) bswap_ENUM(pc + 4), + (GLsizei) bswap_CARD32(pc + 8), + (GLsizei) bswap_CARD32(pc + 12)); +} + +void +__glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc) +{ + PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample = + __glGetProcAddress("glRenderbufferStorageMultisample"); + RenderbufferStorageMultisample((GLenum) bswap_ENUM(pc + 0), + (GLsizei) bswap_CARD32(pc + 4), + (GLenum) bswap_ENUM(pc + 8), + (GLsizei) bswap_CARD32(pc + 12), + (GLsizei) bswap_CARD32(pc + 16)); +} + +void +__glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc) +{ + PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT = + __glGetProcAddress("glSecondaryColor3fvEXT"); + SecondaryColor3fvEXT((const GLfloat *) + bswap_32_array((uint32_t *) (pc + 0), 3)); +} + +void +__glXDispSwap_FogCoordfvEXT(GLbyte * pc) +{ + PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT = + __glGetProcAddress("glFogCoordfvEXT"); + FogCoordfvEXT((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); +} + +void +__glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV = + __glGetProcAddress("glVertexAttrib1dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 12); + pc -= 4; + } +#endif + + VertexAttrib1dvNV((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 1)); +} + +void +__glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV = + __glGetProcAddress("glVertexAttrib1fvNV"); + VertexAttrib1fvNV((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 1)); +} + +void +__glXDispSwap_VertexAttrib1svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV = + __glGetProcAddress("glVertexAttrib1svNV"); + VertexAttrib1svNV((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 1)); +} + +void +__glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV = + __glGetProcAddress("glVertexAttrib2dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 20); + pc -= 4; + } +#endif + + VertexAttrib2dvNV((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 2)); +} + +void +__glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV = + __glGetProcAddress("glVertexAttrib2fvNV"); + VertexAttrib2fvNV((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 2)); +} + +void +__glXDispSwap_VertexAttrib2svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV = + __glGetProcAddress("glVertexAttrib2svNV"); + VertexAttrib2svNV((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 2)); +} + +void +__glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV = + __glGetProcAddress("glVertexAttrib3dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 28); + pc -= 4; + } +#endif + + VertexAttrib3dvNV((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 3)); +} + +void +__glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV = + __glGetProcAddress("glVertexAttrib3fvNV"); + VertexAttrib3fvNV((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 3)); +} + +void +__glXDispSwap_VertexAttrib3svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV = + __glGetProcAddress("glVertexAttrib3svNV"); + VertexAttrib3svNV((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 3)); +} + +void +__glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV = + __glGetProcAddress("glVertexAttrib4dvNV"); +#ifdef __GLX_ALIGN64 + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, 36); + pc -= 4; + } +#endif + + VertexAttrib4dvNV((GLuint) bswap_CARD32(pc + 0), + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV = + __glGetProcAddress("glVertexAttrib4fvNV"); + VertexAttrib4fvNV((GLuint) bswap_CARD32(pc + 0), + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_VertexAttrib4svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV = + __glGetProcAddress("glVertexAttrib4svNV"); + VertexAttrib4svNV((GLuint) bswap_CARD32(pc + 0), + (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), + 4)); +} + +void +__glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV = + __glGetProcAddress("glVertexAttrib4ubvNV"); + VertexAttrib4ubvNV((GLuint) bswap_CARD32(pc + 0), + (const GLubyte *) (pc + 4)); +} + +void +__glXDispSwap_VertexAttribs1dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV = + __glGetProcAddress("glVertexAttribs1dvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs1dvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs1fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV = + __glGetProcAddress("glVertexAttribs1fvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs1fvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs1svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV = + __glGetProcAddress("glVertexAttribs1svNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs1svNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs2dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV = + __glGetProcAddress("glVertexAttribs2dvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs2dvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs2fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV = + __glGetProcAddress("glVertexAttribs2fvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs2fvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs2svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV = + __glGetProcAddress("glVertexAttribs2svNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs2svNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs3dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV = + __glGetProcAddress("glVertexAttribs3dvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs3dvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs3fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV = + __glGetProcAddress("glVertexAttribs3fvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs3fvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs3svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV = + __glGetProcAddress("glVertexAttribs3svNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs3svNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs4dvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV = + __glGetProcAddress("glVertexAttribs4dvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; + + if ((unsigned long) (pc) & 7) { + (void) memmove(pc - 4, pc, cmdlen); + pc -= 4; + } +#endif + + VertexAttribs4dvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs4fvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV = + __glGetProcAddress("glVertexAttribs4fvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs4fvNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs4svNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV = + __glGetProcAddress("glVertexAttribs4svNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs4svNV((GLuint) bswap_CARD32(pc + 0), + n, + (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), + 0)); +} + +void +__glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc) +{ + PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV = + __glGetProcAddress("glVertexAttribs4ubvNV"); + const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); + + VertexAttribs4ubvNV((GLuint) bswap_CARD32(pc + 0), + n, (const GLubyte *) (pc + 8)); +} + +void +__glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) +{ + PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT = + __glGetProcAddress("glActiveStencilFaceEXT"); + ActiveStencilFaceEXT((GLenum) bswap_ENUM(pc + 0)); +} diff --git a/glx/indirect_program.c b/glx/indirect_program.c new file mode 100644 index 0000000..fa4a240 --- /dev/null +++ b/glx/indirect_program.c @@ -0,0 +1,146 @@ +/* + * (C) Copyright IBM Corporation 2005, 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, THE AUTHORS, AND/OR THEIR SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file indirect_program.c + * Hand-coded routines needed to support programmable pipeline extensions. + * + * \author Ian Romanick + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxbyteorder.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" + +/** + * Handle both types of glGetProgramString calls. + */ +static int +DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc, + PFNGLGETPROGRAMIVARBPROC get_programiv, + PFNGLGETPROGRAMSTRINGARBPROC get_program_string, + Bool do_swap) +{ + xGLXVendorPrivateWithReplyReq *const req = + (xGLXVendorPrivateWithReplyReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + ClientPtr client = cl->client; + + pc += __GLX_VENDPRIV_HDR_SIZE; + if (cx != NULL) { + GLenum target; + GLenum pname; + GLint compsize = 0; + char *answer = NULL, answerBuffer[200]; + + if (do_swap) { + target = (GLenum) bswap_32(*(int *) (pc + 0)); + pname = (GLenum) bswap_32(*(int *) (pc + 4)); + } + else { + target = *(GLenum *) (pc + 0); + pname = *(GLuint *) (pc + 4); + } + + /* The value of the GL_PROGRAM_LENGTH_ARB and GL_PROGRAM_LENGTH_NV + * enumerants is the same. + */ + get_programiv(target, GL_PROGRAM_LENGTH_ARB, &compsize); + + if (compsize != 0) { + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + + get_program_string(target, pname, (GLubyte *) answer); + } + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *) &__glXReply)->width = compsize; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + error = Success; + } + + return error; +} + +int +__glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) +{ + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, False); +} + +int +__glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) +{ + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, True); +} + +int +__glXDisp_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc) +{ + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, False); +} + +int +__glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc) +{ + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, True); +} diff --git a/glx/indirect_reqsize.c b/glx/indirect_reqsize.c new file mode 100644 index 0000000..026afb6 --- /dev/null +++ b/glx/indirect_reqsize.c @@ -0,0 +1,794 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include "glxserver.h" +#include "glxbyteorder.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +#if defined(__CYGWIN__) || defined(__MINGW32__) +#undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +#define ALIAS2(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + __attribute__ ((alias( # to ))); +#define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) +#else +#define ALIAS(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + { return __glX ## to ## ReqSize( pc, swap ); } +#endif + +int +__glXCallListsReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + GLenum type = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + n = bswap_32(n); + type = bswap_32(type); + } + + compsize = __glCallLists_size(type); + return __GLX_PAD((compsize * n)); +} + +int +__glXBitmapReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLsizei width = *(GLsizei *) (pc + 20); + GLsizei height = *(GLsizei *) (pc + 24); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + width = bswap_32(width); + height = bswap_32(height); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXFogfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glFogfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glLightfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightModelfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glLightModelfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXMaterialfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glMaterialfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPolygonStippleReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexParameterfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage1DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 32); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexImage2DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 32); + GLsizei height = *(GLsizei *) (pc + 36); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexEnvfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexEnvfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexGendvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexGendv_size(pname); + return __GLX_PAD((compsize * 8)); +} + +int +__glXTexGenfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glTexGenfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPixelMapfvReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei mapsize = *(GLsizei *) (pc + 4); + + if (swap) { + mapsize = bswap_32(mapsize); + } + + return __GLX_PAD((mapsize * 4)); +} + +int +__glXPixelMapusvReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei mapsize = *(GLsizei *) (pc + 4); + + if (swap) { + mapsize = bswap_32(mapsize); + } + + return __GLX_PAD((mapsize * 2)); +} + +int +__glXDrawPixelsReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLsizei width = *(GLsizei *) (pc + 20); + GLsizei height = *(GLsizei *) (pc + 24); + GLenum format = *(GLenum *) (pc + 28); + GLenum type = *(GLenum *) (pc + 32); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 4) + (n * 4)); +} + +int +__glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 36); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 36); + GLsizei height = *(GLsizei *) (pc + 40); + GLenum format = *(GLenum *) (pc + 44); + GLenum type = *(GLenum *) (pc + 48); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 32); + GLenum type = *(GLenum *) (pc + 36); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glColorTableParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXColorSubTableReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei count = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 32); + GLenum type = *(GLenum *) (pc + 36); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + count = bswap_32(count); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, count, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLenum format = *(GLenum *) (pc + 36); + GLenum type = *(GLenum *) (pc + 40); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = *(GLint *) (pc + 8); + GLint alignment = *(GLint *) (pc + 16); + GLenum target = *(GLenum *) (pc + 20); + GLsizei width = *(GLsizei *) (pc + 28); + GLsizei height = *(GLsizei *) (pc + 32); + GLenum format = *(GLenum *) (pc + 36); + GLenum type = *(GLenum *) (pc + 40); + + if (swap) { + row_length = bswap_32(row_length); + skip_rows = bswap_32(skip_rows); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glConvolutionParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage3DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = *(GLint *) (pc + 8); + GLint skip_rows = *(GLint *) (pc + 16); + GLint skip_images = *(GLint *) (pc + 20); + GLint alignment = *(GLint *) (pc + 32); + GLenum target = *(GLenum *) (pc + 36); + GLsizei width = *(GLsizei *) (pc + 48); + GLsizei height = *(GLsizei *) (pc + 52); + GLsizei depth = *(GLsizei *) (pc + 56); + GLenum format = *(GLenum *) (pc + 68); + GLenum type = *(GLenum *) (pc + 72); + + if (swap) { + row_length = bswap_32(row_length); + image_height = bswap_32(image_height); + skip_rows = bswap_32(skip_rows); + skip_images = bswap_32(skip_images); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + depth = bswap_32(depth); + format = bswap_32(format); + type = bswap_32(type); + } + + if (*(CARD32 *) (pc + 76)) + return 0; + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap) +{ + GLint row_length = *(GLint *) (pc + 4); + GLint image_height = *(GLint *) (pc + 8); + GLint skip_rows = *(GLint *) (pc + 16); + GLint skip_images = *(GLint *) (pc + 20); + GLint alignment = *(GLint *) (pc + 32); + GLenum target = *(GLenum *) (pc + 36); + GLsizei width = *(GLsizei *) (pc + 60); + GLsizei height = *(GLsizei *) (pc + 64); + GLsizei depth = *(GLsizei *) (pc + 68); + GLenum format = *(GLenum *) (pc + 76); + GLenum type = *(GLenum *) (pc + 80); + + if (swap) { + row_length = bswap_32(row_length); + image_height = bswap_32(image_height); + skip_rows = bswap_32(skip_rows); + skip_images = bswap_32(skip_images); + alignment = bswap_32(alignment); + target = bswap_32(target); + width = bswap_32(width); + height = bswap_32(height); + depth = bswap_32(depth); + format = bswap_32(format); + type = bswap_32(type); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXCompressedTexImage1DReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 20); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage2DReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 24); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage3DReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 28); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexSubImage3DReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei imageSize = *(GLsizei *) (pc + 36); + + if (swap) { + imageSize = bswap_32(imageSize); + } + + return __GLX_PAD(imageSize); +} + +int +__glXPointParameterfvReqSize(const GLbyte * pc, Bool swap) +{ + GLenum pname = *(GLenum *) (pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32(pname); + } + + compsize = __glPointParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXDrawBuffersReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 0); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 4)); +} + +int +__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei len = *(GLsizei *) (pc + 8); + + if (swap) { + len = bswap_32(len); + } + + return __GLX_PAD(len); +} + +int +__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 8)); +} + +int +__glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 16)); +} + +int +__glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 24)); +} + +int +__glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 12)); +} + +int +__glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 6)); +} + +int +__glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap) +{ + GLsizei n = *(GLsizei *) (pc + 4); + + if (swap) { + n = bswap_32(n); + } + + return __GLX_PAD((n * 32)); +} + +ALIAS(Fogiv, Fogfv) + ALIAS(Lightiv, Lightfv) + ALIAS(LightModeliv, LightModelfv) + ALIAS(Materialiv, Materialfv) + ALIAS(TexParameteriv, TexParameterfv) + ALIAS(TexEnviv, TexEnvfv) + ALIAS(TexGeniv, TexGenfv) + ALIAS(PixelMapuiv, PixelMapfv) + ALIAS(ColorTableParameteriv, ColorTableParameterfv) + ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) + ALIAS(CompressedTexSubImage1D, CompressedTexImage1D) + ALIAS(CompressedTexSubImage2D, CompressedTexImage3D) + ALIAS(PointParameteriv, PointParameterfv) + ALIAS(DeleteFramebuffers, DrawBuffers) + ALIAS(DeleteRenderbuffers, DrawBuffers) + ALIAS(VertexAttribs1fvNV, PixelMapfv) + ALIAS(VertexAttribs1svNV, PixelMapusv) + ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV) + ALIAS(VertexAttribs2svNV, PixelMapfv) + ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV) + ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV) + ALIAS(VertexAttribs4ubvNV, PixelMapfv) diff --git a/glx/indirect_reqsize.h b/glx/indirect_reqsize.h new file mode 100644 index 0000000..43e1e69 --- /dev/null +++ b/glx/indirect_reqsize.h @@ -0,0 +1,151 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_REQSIZE_H_ ) +#define _INDIRECT_REQSIZE_H_ + +#include + +#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +#define PURE __attribute__((pure)) +#else +#define PURE +#endif + +extern PURE _X_HIDDEN int __glXCallListsReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXBitmapReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXFogfvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXFogivReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXLightfvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXLightivReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXLightModelfvReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXLightModelivReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXMaterialfvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXMaterialivReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXPolygonStippleReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXTexParameterfvReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXTexParameterivReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXTexImage1DReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXTexImage2DReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXTexEnvivReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXTexGendvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXTexGenfvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXTexGenivReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXMap1dReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXMap1fReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXMap2dReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXMap2fReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXPixelMapuivReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXDrawArraysReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXTexSubImage1DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXTexSubImage2DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXColorTableReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXColorTableParameterivReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXColorSubTableReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXTexSubImage3DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXCompressedTexImage1DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXCompressedTexImage2DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXCompressedTexImage3DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXCompressedTexSubImage1DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXCompressedTexSubImage2DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXCompressedTexSubImage3DReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXPointParameterfvReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXPointParameterivReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXDrawBuffersReqSize(const GLbyte * pc, Bool swap); +extern PURE _X_HIDDEN int __glXProgramStringARBReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXDeleteFramebuffersReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXDeleteRenderbuffersReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte * pc, + Bool swap); +extern PURE _X_HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte * pc, + Bool swap); + +#undef PURE + +#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ diff --git a/glx/indirect_size.h b/glx/indirect_size.h new file mode 100644 index 0000000..fec7ed3 --- /dev/null +++ b/glx/indirect_size.h @@ -0,0 +1,85 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_SIZE_H_ ) +#define _INDIRECT_SIZE_H_ + +/** + * \file + * Prototypes for functions used to determine the number of data elements in + * various GLX protocol messages. + * + * \author Ian Romanick + */ + +#include + +#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +#define PURE __attribute__((pure)) +#else +#define PURE +#endif + +#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +#define FASTCALL __attribute__((fastcall)) +#else +#define FASTCALL +#endif + +extern _X_INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glFogiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glLightfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glLightiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glLightModelfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glLightModeliv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glMaterialfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glMaterialiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glTexParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glTexParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glTexEnvfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glTexEnviv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glTexGendv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glTexGenfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glTexGeniv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glMap1d_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glMap1f_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glMap2f_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glColorTableParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint +__glConvolutionParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint +__glConvolutionParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glPointParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glPointParameteriv_size(GLenum); + +#undef PURE +#undef FASTCALL + +#endif /* !defined( _INDIRECT_SIZE_H_ ) */ diff --git a/glx/indirect_size_get.c b/glx/indirect_size_get.c new file mode 100644 index 0000000..f879311 --- /dev/null +++ b/glx/indirect_size_get.c @@ -0,0 +1,1220 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#include +#include +#include "indirect_size_get.h" +#include "glxserver.h" +#include "indirect_util.h" +#include "indirect_size.h" + +#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +#define PURE __attribute__((pure)) +#else +#define PURE +#endif + +#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +#define FASTCALL __attribute__((fastcall)) +#else +#define FASTCALL +#endif + + +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL) +#undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +#define ALIAS2(from,to) \ + _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + __attribute__ ((alias( # to ))); +#define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) +#else +#define ALIAS(from,to) \ + _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + { return __gl ## to ## _size( e ); } +#endif + + +_X_INTERNAL PURE FASTCALL GLint +__glCallLists_size(GLenum e) +{ + switch (e) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + case GL_HALF_FLOAT: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glFogfv_size(GLenum e) +{ + switch (e) { + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_FOG_OFFSET_VALUE_SGIX: + case GL_FOG_DISTANCE_MODE_NV: + return 1; + case GL_FOG_COLOR: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glLightfv_size(GLenum e) +{ + switch (e) { + case GL_SPOT_EXPONENT: + case GL_SPOT_CUTOFF: + case GL_CONSTANT_ATTENUATION: + case GL_LINEAR_ATTENUATION: + case GL_QUADRATIC_ATTENUATION: + return 1; + case GL_SPOT_DIRECTION: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_POSITION: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glLightModelfv_size(GLenum e) +{ + switch (e) { + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_LIGHT_MODEL_COLOR_CONTROL: +/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ + return 1; + case GL_LIGHT_MODEL_AMBIENT: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glMaterialfv_size(GLenum e) +{ + switch (e) { + case GL_SHININESS: + return 1; + case GL_COLOR_INDEXES: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_EMISSION: + case GL_AMBIENT_AND_DIFFUSE: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glTexParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_TEXTURE_STORAGE_HINT_APPLE: + case GL_STORAGE_PRIVATE_APPLE: + case GL_STORAGE_CACHED_APPLE: + case GL_STORAGE_SHARED_APPLE: + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glTexEnvfv_size(GLenum e) +{ + switch (e) { + case GL_ALPHA_SCALE: + case GL_TEXTURE_ENV_MODE: + case GL_TEXTURE_LOD_BIAS: + case GL_COMBINE_RGB: + case GL_COMBINE_ALPHA: + case GL_RGB_SCALE: + case GL_SOURCE0_RGB: + case GL_SOURCE1_RGB: + case GL_SOURCE2_RGB: + case GL_SOURCE3_RGB_NV: + case GL_SOURCE0_ALPHA: + case GL_SOURCE1_ALPHA: + case GL_SOURCE2_ALPHA: + case GL_SOURCE3_ALPHA_NV: + case GL_OPERAND0_RGB: + case GL_OPERAND1_RGB: + case GL_OPERAND2_RGB: + case GL_OPERAND3_RGB_NV: + case GL_OPERAND0_ALPHA: + case GL_OPERAND1_ALPHA: + case GL_OPERAND2_ALPHA: + case GL_OPERAND3_ALPHA_NV: + case GL_BUMP_TARGET_ATI: + case GL_COORD_REPLACE_ARB: +/* case GL_COORD_REPLACE_NV:*/ + return 1; + case GL_TEXTURE_ENV_COLOR: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glTexGendv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_GEN_MODE: + return 1; + case GL_OBJECT_PLANE: + case GL_EYE_PLANE: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glMap1d_size(GLenum e) +{ + switch (e) { + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + return 1; + case GL_MAP1_TEXTURE_COORD_2: + return 2; + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_VERTEX_3: + return 3; + case GL_MAP1_COLOR_4: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_4: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glMap2d_size(GLenum e) +{ + switch (e) { + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + return 1; + case GL_MAP2_TEXTURE_COORD_2: + return 2; + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_VERTEX_3: + return 3; + case GL_MAP2_COLOR_4: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_4: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetBooleanv_size(GLenum e) +{ + switch (e) { + case GL_CURRENT_INDEX: + case GL_CURRENT_RASTER_INDEX: + case GL_CURRENT_RASTER_POSITION_VALID: + case GL_CURRENT_RASTER_DISTANCE: + case GL_POINT_SMOOTH: + case GL_POINT_SIZE: + case GL_SMOOTH_POINT_SIZE_GRANULARITY: + case GL_LINE_SMOOTH: + case GL_LINE_WIDTH: + case GL_LINE_WIDTH_GRANULARITY: + case GL_LINE_STIPPLE: + case GL_LINE_STIPPLE_PATTERN: + case GL_LINE_STIPPLE_REPEAT: + case GL_LIST_MODE: + case GL_MAX_LIST_NESTING: + case GL_LIST_BASE: + case GL_LIST_INDEX: + case GL_POLYGON_SMOOTH: + case GL_POLYGON_STIPPLE: + case GL_EDGE_FLAG: + case GL_CULL_FACE: + case GL_CULL_FACE_MODE: + case GL_FRONT_FACE: + case GL_LIGHTING: + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_SHADE_MODEL: + case GL_COLOR_MATERIAL_FACE: + case GL_COLOR_MATERIAL_PARAMETER: + case GL_COLOR_MATERIAL: + case GL_FOG: + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_DEPTH_TEST: + case GL_DEPTH_WRITEMASK: + case GL_DEPTH_CLEAR_VALUE: + case GL_DEPTH_FUNC: + case GL_STENCIL_TEST: + case GL_STENCIL_CLEAR_VALUE: + case GL_STENCIL_FUNC: + case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_FAIL: + case GL_STENCIL_PASS_DEPTH_FAIL: + case GL_STENCIL_PASS_DEPTH_PASS: + case GL_STENCIL_REF: + case GL_STENCIL_WRITEMASK: + case GL_MATRIX_MODE: + case GL_NORMALIZE: + case GL_MODELVIEW_STACK_DEPTH: + case GL_PROJECTION_STACK_DEPTH: + case GL_TEXTURE_STACK_DEPTH: + case GL_ATTRIB_STACK_DEPTH: + case GL_CLIENT_ATTRIB_STACK_DEPTH: + case GL_ALPHA_TEST: + case GL_ALPHA_TEST_FUNC: + case GL_ALPHA_TEST_REF: + case GL_DITHER: + case GL_BLEND_DST: + case GL_BLEND_SRC: + case GL_BLEND: + case GL_LOGIC_OP_MODE: + case GL_LOGIC_OP: + case GL_AUX_BUFFERS: + case GL_DRAW_BUFFER: + case GL_READ_BUFFER: + case GL_SCISSOR_TEST: + case GL_INDEX_CLEAR_VALUE: + case GL_INDEX_WRITEMASK: + case GL_INDEX_MODE: + case GL_RGBA_MODE: + case GL_DOUBLEBUFFER: + case GL_STEREO: + case GL_RENDER_MODE: + case GL_PERSPECTIVE_CORRECTION_HINT: + case GL_POINT_SMOOTH_HINT: + case GL_LINE_SMOOTH_HINT: + case GL_POLYGON_SMOOTH_HINT: + case GL_FOG_HINT: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_Q: + case GL_PIXEL_MAP_I_TO_I: + case GL_PIXEL_MAP_I_TO_I_SIZE: + case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: + case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: + case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: + case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: + case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_UNPACK_SWAP_BYTES: + case GL_UNPACK_LSB_FIRST: + case GL_UNPACK_ROW_LENGTH: + case GL_UNPACK_SKIP_ROWS: + case GL_UNPACK_SKIP_PIXELS: + case GL_UNPACK_ALIGNMENT: + case GL_PACK_SWAP_BYTES: + case GL_PACK_LSB_FIRST: + case GL_PACK_ROW_LENGTH: + case GL_PACK_SKIP_ROWS: + case GL_PACK_SKIP_PIXELS: + case GL_PACK_ALIGNMENT: + case GL_MAP_COLOR: + case GL_MAP_STENCIL: + case GL_INDEX_SHIFT: + case GL_INDEX_OFFSET: + case GL_RED_SCALE: + case GL_RED_BIAS: + case GL_ZOOM_X: + case GL_ZOOM_Y: + case GL_GREEN_SCALE: + case GL_GREEN_BIAS: + case GL_BLUE_SCALE: + case GL_BLUE_BIAS: + case GL_ALPHA_SCALE: + case GL_ALPHA_BIAS: + case GL_DEPTH_SCALE: + case GL_DEPTH_BIAS: + case GL_MAX_EVAL_ORDER: + case GL_MAX_LIGHTS: + case GL_MAX_CLIP_PLANES: + case GL_MAX_TEXTURE_SIZE: + case GL_MAX_PIXEL_MAP_TABLE: + case GL_MAX_ATTRIB_STACK_DEPTH: + case GL_MAX_MODELVIEW_STACK_DEPTH: + case GL_MAX_NAME_STACK_DEPTH: + case GL_MAX_PROJECTION_STACK_DEPTH: + case GL_MAX_TEXTURE_STACK_DEPTH: + case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: + case GL_SUBPIXEL_BITS: + case GL_INDEX_BITS: + case GL_RED_BITS: + case GL_GREEN_BITS: + case GL_BLUE_BITS: + case GL_ALPHA_BITS: + case GL_DEPTH_BITS: + case GL_STENCIL_BITS: + case GL_ACCUM_RED_BITS: + case GL_ACCUM_GREEN_BITS: + case GL_ACCUM_BLUE_BITS: + case GL_ACCUM_ALPHA_BITS: + case GL_NAME_STACK_DEPTH: + case GL_AUTO_NORMAL: + case GL_MAP1_COLOR_4: + case GL_MAP1_INDEX: + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + case GL_MAP2_COLOR_4: + case GL_MAP2_INDEX: + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + case GL_MAP1_GRID_SEGMENTS: + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_POLYGON_OFFSET_UNITS: + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + case GL_BLEND_EQUATION: +/* case GL_BLEND_EQUATION_EXT:*/ + case GL_CONVOLUTION_1D: + case GL_CONVOLUTION_2D: + case GL_SEPARABLE_2D: + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + case GL_POST_CONVOLUTION_RED_SCALE: +/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_SCALE: +/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_SCALE: +/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_SCALE: +/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_RED_BIAS: +/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_BIAS: +/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_BIAS: +/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_BIAS: +/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ + case GL_HISTOGRAM: + case GL_MINMAX: + case GL_POLYGON_OFFSET_FACTOR: + case GL_RESCALE_NORMAL: +/* case GL_RESCALE_NORMAL_EXT:*/ + case GL_TEXTURE_BINDING_1D: + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_3D: + case GL_PACK_SKIP_IMAGES: + case GL_PACK_IMAGE_HEIGHT: + case GL_UNPACK_SKIP_IMAGES: + case GL_UNPACK_IMAGE_HEIGHT: + case GL_TEXTURE_3D: + case GL_MAX_3D_TEXTURE_SIZE: + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_INDEX_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_VERTEX_ARRAY_SIZE: + case GL_VERTEX_ARRAY_TYPE: + case GL_VERTEX_ARRAY_STRIDE: + case GL_NORMAL_ARRAY_TYPE: + case GL_NORMAL_ARRAY_STRIDE: + case GL_COLOR_ARRAY_SIZE: + case GL_COLOR_ARRAY_TYPE: + case GL_COLOR_ARRAY_STRIDE: + case GL_INDEX_ARRAY_TYPE: + case GL_INDEX_ARRAY_STRIDE: + case GL_TEXTURE_COORD_ARRAY_SIZE: + case GL_TEXTURE_COORD_ARRAY_TYPE: + case GL_TEXTURE_COORD_ARRAY_STRIDE: + case GL_EDGE_FLAG_ARRAY_STRIDE: + case GL_MULTISAMPLE: +/* case GL_MULTISAMPLE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_COVERAGE: +/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_ONE: +/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ + case GL_SAMPLE_COVERAGE: +/* case GL_SAMPLE_COVERAGE_ARB:*/ + case GL_SAMPLE_BUFFERS: +/* case GL_SAMPLE_BUFFERS_ARB:*/ + case GL_SAMPLES: +/* case GL_SAMPLES_ARB:*/ + case GL_SAMPLE_COVERAGE_VALUE: +/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ + case GL_SAMPLE_COVERAGE_INVERT: +/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ + case GL_COLOR_MATRIX_STACK_DEPTH: + case GL_MAX_COLOR_MATRIX_STACK_DEPTH: + case GL_POST_COLOR_MATRIX_RED_SCALE: + case GL_POST_COLOR_MATRIX_GREEN_SCALE: + case GL_POST_COLOR_MATRIX_BLUE_SCALE: + case GL_POST_COLOR_MATRIX_ALPHA_SCALE: + case GL_POST_COLOR_MATRIX_RED_BIAS: + case GL_POST_COLOR_MATRIX_GREEN_BIAS: + case GL_POST_COLOR_MATRIX_BLUE_BIAS: + case GL_POST_COLOR_MATRIX_ALPHA_BIAS: + case GL_BLEND_DST_RGB: + case GL_BLEND_SRC_RGB: + case GL_BLEND_DST_ALPHA: + case GL_BLEND_SRC_ALPHA: + case GL_COLOR_TABLE: + case GL_POST_CONVOLUTION_COLOR_TABLE: + case GL_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_MAX_ELEMENTS_VERTICES: + case GL_MAX_ELEMENTS_INDICES: + case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: + case GL_POINT_SIZE_MIN: + case GL_POINT_SIZE_MAX: + case GL_POINT_FADE_THRESHOLD_SIZE: + case GL_OCCLUSION_TEST_HP: + case GL_OCCLUSION_TEST_RESULT_HP: + case GL_LIGHT_MODEL_COLOR_CONTROL: + case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB: + case GL_RESET_NOTIFICATION_STRATEGY_ARB: + case GL_CURRENT_FOG_COORD: + case GL_FOG_COORDINATE_ARRAY_TYPE: + case GL_FOG_COORDINATE_ARRAY_STRIDE: + case GL_FOG_COORD_ARRAY: + case GL_COLOR_SUM_ARB: + case GL_SECONDARY_COLOR_ARRAY_SIZE: + case GL_SECONDARY_COLOR_ARRAY_TYPE: + case GL_SECONDARY_COLOR_ARRAY_STRIDE: + case GL_SECONDARY_COLOR_ARRAY: + case GL_ACTIVE_TEXTURE: +/* case GL_ACTIVE_TEXTURE_ARB:*/ + case GL_CLIENT_ACTIVE_TEXTURE: +/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ + case GL_MAX_TEXTURE_UNITS: +/* case GL_MAX_TEXTURE_UNITS_ARB:*/ + case GL_MAX_RENDERBUFFER_SIZE: +/* case GL_MAX_RENDERBUFFER_SIZE_EXT:*/ + case GL_TEXTURE_COMPRESSION_HINT: +/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ + case GL_TEXTURE_RECTANGLE_ARB: +/* case GL_TEXTURE_RECTANGLE_NV:*/ + case GL_TEXTURE_BINDING_RECTANGLE_ARB: +/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ + case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: +/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ + case GL_MAX_TEXTURE_LOD_BIAS: + case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_MAX_SHININESS_NV: + case GL_MAX_SPOT_EXPONENT_NV: + case GL_TEXTURE_CUBE_MAP: +/* case GL_TEXTURE_CUBE_MAP_ARB:*/ + case GL_TEXTURE_BINDING_CUBE_MAP: +/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ + case GL_MAX_CUBE_MAP_TEXTURE_SIZE: +/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ + case GL_MULTISAMPLE_FILTER_HINT_NV: + case GL_FOG_DISTANCE_MODE_NV: + case GL_VERTEX_PROGRAM_ARB: + case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: + case GL_MAX_PROGRAM_MATRICES_ARB: + case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: + case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: + case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: + case GL_PROGRAM_ERROR_POSITION_ARB: + case GL_DEPTH_CLAMP: +/* case GL_DEPTH_CLAMP_NV:*/ + case GL_NUM_COMPRESSED_TEXTURE_FORMATS: +/* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/ + case GL_MAX_VERTEX_UNITS_ARB: + case GL_ACTIVE_VERTEX_UNITS_ARB: + case GL_WEIGHT_SUM_UNITY_ARB: + case GL_VERTEX_BLEND_ARB: + case GL_CURRENT_WEIGHT_ARB: + case GL_WEIGHT_ARRAY_TYPE_ARB: + case GL_WEIGHT_ARRAY_STRIDE_ARB: + case GL_WEIGHT_ARRAY_SIZE_ARB: + case GL_WEIGHT_ARRAY_ARB: + case GL_PACK_INVERT_MESA: + case GL_STENCIL_BACK_FUNC_ATI: + case GL_STENCIL_BACK_FAIL_ATI: + case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI: + case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI: + case GL_FRAGMENT_PROGRAM_ARB: + case GL_MAX_DRAW_BUFFERS_ARB: +/* case GL_MAX_DRAW_BUFFERS_ATI:*/ + case GL_DRAW_BUFFER0_ARB: +/* case GL_DRAW_BUFFER0_ATI:*/ + case GL_DRAW_BUFFER1_ARB: +/* case GL_DRAW_BUFFER1_ATI:*/ + case GL_DRAW_BUFFER2_ARB: +/* case GL_DRAW_BUFFER2_ATI:*/ + case GL_DRAW_BUFFER3_ARB: +/* case GL_DRAW_BUFFER3_ATI:*/ + case GL_DRAW_BUFFER4_ARB: +/* case GL_DRAW_BUFFER4_ATI:*/ + case GL_DRAW_BUFFER5_ARB: +/* case GL_DRAW_BUFFER5_ATI:*/ + case GL_DRAW_BUFFER6_ARB: +/* case GL_DRAW_BUFFER6_ATI:*/ + case GL_DRAW_BUFFER7_ARB: +/* case GL_DRAW_BUFFER7_ATI:*/ + case GL_DRAW_BUFFER8_ARB: +/* case GL_DRAW_BUFFER8_ATI:*/ + case GL_DRAW_BUFFER9_ARB: +/* case GL_DRAW_BUFFER9_ATI:*/ + case GL_DRAW_BUFFER10_ARB: +/* case GL_DRAW_BUFFER10_ATI:*/ + case GL_DRAW_BUFFER11_ARB: +/* case GL_DRAW_BUFFER11_ATI:*/ + case GL_DRAW_BUFFER12_ARB: +/* case GL_DRAW_BUFFER12_ATI:*/ + case GL_DRAW_BUFFER13_ARB: +/* case GL_DRAW_BUFFER13_ATI:*/ + case GL_DRAW_BUFFER14_ARB: +/* case GL_DRAW_BUFFER14_ATI:*/ + case GL_DRAW_BUFFER15_ARB: +/* case GL_DRAW_BUFFER15_ATI:*/ + case GL_BLEND_EQUATION_ALPHA_EXT: + case GL_MATRIX_PALETTE_ARB: + case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: + case GL_MAX_PALETTE_MATRICES_ARB: + case GL_CURRENT_PALETTE_MATRIX_ARB: + case GL_MATRIX_INDEX_ARRAY_ARB: + case GL_CURRENT_MATRIX_INDEX_ARB: + case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: + case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: + case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: + case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT: + case GL_TEXTURE_CUBE_MAP_SEAMLESS: + case GL_POINT_SPRITE_ARB: +/* case GL_POINT_SPRITE_NV:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_MAX_VERTEX_ATTRIBS_ARB: + case GL_MAX_TEXTURE_COORDS_ARB: + case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: + case GL_DEPTH_BOUNDS_TEST_EXT: + case GL_ARRAY_BUFFER_BINDING_ARB: + case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB: + case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB: + case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB: + case GL_COLOR_ARRAY_BUFFER_BINDING_ARB: + case GL_INDEX_ARRAY_BUFFER_BINDING_ARB: + case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB: + case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB: + case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB: + case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB: + case GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB: + case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT: + case GL_STENCIL_TEST_TWO_SIDE_EXT: + case GL_ACTIVE_STENCIL_FACE_EXT: + case GL_SAMPLER_BINDING: + case GL_TEXTURE_BINDING_1D_ARRAY_EXT: + case GL_TEXTURE_BINDING_2D_ARRAY_EXT: + case GL_FRAMEBUFFER_BINDING: +/* case GL_DRAW_FRAMEBUFFER_BINDING_EXT:*/ + case GL_RENDERBUFFER_BINDING: +/* case GL_RENDERBUFFER_BINDING_EXT:*/ + case GL_READ_FRAMEBUFFER_BINDING: +/* case GL_READ_FRAMEBUFFER_BINDING_EXT:*/ + case GL_MAX_COLOR_ATTACHMENTS: +/* case GL_MAX_COLOR_ATTACHMENTS_EXT:*/ + case GL_MAX_SAMPLES: +/* case GL_MAX_SAMPLES_EXT:*/ + case GL_MAX_SERVER_WAIT_TIMEOUT: + case GL_MAX_DEBUG_MESSAGE_LENGTH_ARB: + case GL_MAX_DEBUG_LOGGED_MESSAGES_ARB: + case GL_DEBUG_LOGGED_MESSAGES_ARB: + case GL_RASTER_POSITION_UNCLIPPED_IBM: + return 1; + case GL_SMOOTH_POINT_SIZE_RANGE: + case GL_LINE_WIDTH_RANGE: + case GL_POLYGON_MODE: + case GL_DEPTH_RANGE: + case GL_MAX_VIEWPORT_DIMS: + case GL_MAP1_GRID_DOMAIN: + case GL_MAP2_GRID_SEGMENTS: + case GL_ALIASED_POINT_SIZE_RANGE: + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_DEPTH_BOUNDS_EXT: + return 2; + case GL_CURRENT_NORMAL: + case GL_POINT_DISTANCE_ATTENUATION: + return 3; + case GL_CURRENT_COLOR: + case GL_CURRENT_TEXTURE_COORDS: + case GL_CURRENT_RASTER_COLOR: + case GL_CURRENT_RASTER_TEXTURE_COORDS: + case GL_CURRENT_RASTER_POSITION: + case GL_LIGHT_MODEL_AMBIENT: + case GL_FOG_COLOR: + case GL_ACCUM_CLEAR_VALUE: + case GL_VIEWPORT: + case GL_SCISSOR_BOX: + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_MAP2_GRID_DOMAIN: + case GL_BLEND_COLOR: +/* case GL_BLEND_COLOR_EXT:*/ + case GL_CURRENT_SECONDARY_COLOR: + return 4; + case GL_MODELVIEW_MATRIX: + case GL_PROJECTION_MATRIX: + case GL_TEXTURE_MATRIX: + case GL_MODELVIEW0_ARB: + case GL_COLOR_MATRIX: + case GL_MODELVIEW1_ARB: + case GL_CURRENT_MATRIX_ARB: + case GL_MODELVIEW2_ARB: + case GL_MODELVIEW3_ARB: + case GL_MODELVIEW4_ARB: + case GL_MODELVIEW5_ARB: + case GL_MODELVIEW6_ARB: + case GL_MODELVIEW7_ARB: + case GL_MODELVIEW8_ARB: + case GL_MODELVIEW9_ARB: + case GL_MODELVIEW10_ARB: + case GL_MODELVIEW11_ARB: + case GL_MODELVIEW12_ARB: + case GL_MODELVIEW13_ARB: + case GL_MODELVIEW14_ARB: + case GL_MODELVIEW15_ARB: + case GL_MODELVIEW16_ARB: + case GL_MODELVIEW17_ARB: + case GL_MODELVIEW18_ARB: + case GL_MODELVIEW19_ARB: + case GL_MODELVIEW20_ARB: + case GL_MODELVIEW21_ARB: + case GL_MODELVIEW22_ARB: + case GL_MODELVIEW23_ARB: + case GL_MODELVIEW24_ARB: + case GL_MODELVIEW25_ARB: + case GL_MODELVIEW26_ARB: + case GL_MODELVIEW27_ARB: + case GL_MODELVIEW28_ARB: + case GL_MODELVIEW29_ARB: + case GL_MODELVIEW30_ARB: + case GL_MODELVIEW31_ARB: + case GL_TRANSPOSE_CURRENT_MATRIX_ARB: + return 16; + case GL_FOG_COORDINATE_SOURCE: + case GL_COMPRESSED_TEXTURE_FORMATS: + case GL_RGBA_INTEGER_MODE_EXT: + return __glGetBooleanv_variable_size(e); + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetTexParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_RESIDENT: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_TEXTURE_RANGE_LENGTH_APPLE: + case GL_TEXTURE_STORAGE_HINT_APPLE: + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetTexLevelParameterfv_size(GLenum e) +{ + switch (e) { + case GL_TEXTURE_WIDTH: + case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_COMPONENTS: + case GL_TEXTURE_BORDER: + case GL_TEXTURE_RED_SIZE: +/* case GL_TEXTURE_RED_SIZE_EXT:*/ + case GL_TEXTURE_GREEN_SIZE: +/* case GL_TEXTURE_GREEN_SIZE_EXT:*/ + case GL_TEXTURE_BLUE_SIZE: +/* case GL_TEXTURE_BLUE_SIZE_EXT:*/ + case GL_TEXTURE_ALPHA_SIZE: +/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ + case GL_TEXTURE_LUMINANCE_SIZE: +/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ + case GL_TEXTURE_INTENSITY_SIZE: +/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ + case GL_TEXTURE_DEPTH: + case GL_TEXTURE_INDEX_SIZE_EXT: + case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: +/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ + case GL_TEXTURE_COMPRESSED: +/* case GL_TEXTURE_COMPRESSED_ARB:*/ + case GL_TEXTURE_DEPTH_SIZE: +/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ + case GL_TEXTURE_STENCIL_SIZE: +/* case GL_TEXTURE_STENCIL_SIZE_EXT:*/ + return 1; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetPointerv_size(GLenum e) +{ + switch (e) { + case GL_DEBUG_CALLBACK_FUNCTION_ARB: + case GL_DEBUG_CALLBACK_USER_PARAM_ARB: + return 1; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glColorTableParameterfv_size(GLenum e) +{ + switch (e) { + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetColorTableParameterfv_size(GLenum e) +{ + switch (e) { + case GL_COLOR_TABLE_FORMAT: +/* case GL_COLOR_TABLE_FORMAT_EXT:*/ + case GL_COLOR_TABLE_WIDTH: +/* case GL_COLOR_TABLE_WIDTH_EXT:*/ + case GL_COLOR_TABLE_RED_SIZE: +/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ + case GL_COLOR_TABLE_GREEN_SIZE: +/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ + case GL_COLOR_TABLE_BLUE_SIZE: +/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ + case GL_COLOR_TABLE_ALPHA_SIZE: +/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ + case GL_COLOR_TABLE_LUMINANCE_SIZE: +/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ + case GL_COLOR_TABLE_INTENSITY_SIZE: +/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ + return 1; + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glConvolutionParameterfv_size(GLenum e) +{ + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size(GLenum e) +{ + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + case GL_CONVOLUTION_FORMAT: +/* case GL_CONVOLUTION_FORMAT_EXT:*/ + case GL_CONVOLUTION_WIDTH: +/* case GL_CONVOLUTION_WIDTH_EXT:*/ + case GL_CONVOLUTION_HEIGHT: +/* case GL_CONVOLUTION_HEIGHT_EXT:*/ + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetHistogramParameterfv_size(GLenum e) +{ + switch (e) { + case GL_HISTOGRAM_WIDTH: + case GL_HISTOGRAM_FORMAT: + case GL_HISTOGRAM_RED_SIZE: + case GL_HISTOGRAM_GREEN_SIZE: + case GL_HISTOGRAM_BLUE_SIZE: + case GL_HISTOGRAM_ALPHA_SIZE: + case GL_HISTOGRAM_LUMINANCE_SIZE: + case GL_HISTOGRAM_SINK: + return 1; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetMinmaxParameterfv_size(GLenum e) +{ + switch (e) { + case GL_MINMAX_FORMAT: + case GL_MINMAX_SINK: + return 1; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glPointParameterfv_size(GLenum e) +{ + switch (e) { + case GL_POINT_SIZE_MIN: +/* case GL_POINT_SIZE_MIN_ARB:*/ +/* case GL_POINT_SIZE_MIN_SGIS:*/ + case GL_POINT_SIZE_MAX: +/* case GL_POINT_SIZE_MAX_ARB:*/ +/* case GL_POINT_SIZE_MAX_SGIS:*/ + case GL_POINT_FADE_THRESHOLD_SIZE: +/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ +/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_POINT_SPRITE_COORD_ORIGIN: + return 1; + case GL_POINT_DISTANCE_ATTENUATION: +/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ +/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ + return 3; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetQueryObjectiv_size(GLenum e) +{ + switch (e) { + case GL_QUERY_RESULT_ARB: + case GL_QUERY_RESULT_AVAILABLE_ARB: + return 1; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetQueryiv_size(GLenum e) +{ + switch (e) { + case GL_QUERY_COUNTER_BITS_ARB: + case GL_CURRENT_QUERY_ARB: + case GL_ANY_SAMPLES_PASSED: + return 1; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetProgramivARB_size(GLenum e) +{ + switch (e) { + case GL_PROGRAM_LENGTH_ARB: + case GL_PROGRAM_BINDING_ARB: + case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_FORMAT_ARB: + case GL_PROGRAM_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_TEMPORARIES_ARB: + case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_PROGRAM_PARAMETERS_ARB: + case GL_MAX_PROGRAM_PARAMETERS_ARB: + case GL_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_PROGRAM_ATTRIBS_ARB: + case GL_MAX_PROGRAM_ATTRIBS_ARB: + case GL_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: + case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: + case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: + case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: + case GL_MAX_PROGRAM_CALL_DEPTH_NV: + case GL_MAX_PROGRAM_IF_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_COUNT_NV: + return 1; + default: + return 0; + } +} + +_X_INTERNAL PURE FASTCALL GLint +__glGetFramebufferAttachmentParameteriv_size(GLenum e) +{ + switch (e) { + case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: + case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: + case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: +/* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:*/ + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: +/* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:*/ + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: +/* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:*/ + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: +/* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:*/ + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: + return 1; + default: + return 0; + } +} + +ALIAS(Fogiv, Fogfv) + ALIAS(Lightiv, Lightfv) + ALIAS(LightModeliv, LightModelfv) + ALIAS(Materialiv, Materialfv) + ALIAS(TexParameteriv, TexParameterfv) + ALIAS(TexEnviv, TexEnvfv) + ALIAS(TexGenfv, TexGendv) + ALIAS(TexGeniv, TexGendv) + ALIAS(Map1f, Map1d) + ALIAS(Map2f, Map2d) + ALIAS(GetDoublev, GetBooleanv) + ALIAS(GetFloatv, GetBooleanv) + ALIAS(GetIntegerv, GetBooleanv) + ALIAS(GetLightfv, Lightfv) + ALIAS(GetLightiv, Lightfv) + ALIAS(GetMaterialfv, Materialfv) + ALIAS(GetMaterialiv, Materialfv) + ALIAS(GetTexEnvfv, TexEnvfv) + ALIAS(GetTexEnviv, TexEnvfv) + ALIAS(GetTexGendv, TexGendv) + ALIAS(GetTexGenfv, TexGendv) + ALIAS(GetTexGeniv, TexGendv) + ALIAS(GetTexParameteriv, GetTexParameterfv) + ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv) + ALIAS(ColorTableParameteriv, ColorTableParameterfv) + ALIAS(GetColorTableParameteriv, GetColorTableParameterfv) + ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) + ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv) + ALIAS(GetHistogramParameteriv, GetHistogramParameterfv) + ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv) + ALIAS(PointParameteriv, PointParameterfv) + ALIAS(GetQueryObjectuiv, GetQueryObjectiv) +#undef PURE +#undef FASTCALL diff --git a/glx/indirect_size_get.h b/glx/indirect_size_get.h new file mode 100644 index 0000000..9b62036 --- /dev/null +++ b/glx/indirect_size_get.h @@ -0,0 +1,93 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_SIZE_GET_H_ ) +#define _INDIRECT_SIZE_GET_H_ + +/** + * \file + * Prototypes for functions used to determine the number of data elements in + * various GLX protocol messages. + * + * \author Ian Romanick + */ + +#include + +#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +#define PURE __attribute__((pure)) +#else +#define PURE +#endif + +#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +#define FASTCALL __attribute__((fastcall)) +#else +#define FASTCALL +#endif + +extern _X_INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetPointerv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint +__glGetColorTableParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint +__glGetColorTableParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectuiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryiv_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); +extern _X_INTERNAL PURE FASTCALL GLint +__glGetFramebufferAttachmentParameteriv_size(GLenum); + +#undef PURE +#undef FASTCALL + +#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ diff --git a/glx/indirect_table.c b/glx/indirect_table.c new file mode 100644 index 0000000..33e3d6a --- /dev/null +++ b/glx/indirect_table.c @@ -0,0 +1,1810 @@ +/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005, 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include "glxserver.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "indirect_reqsize.h" +#include "indirect_table.h" + +/*****************************************************************/ +/* tree depth = 3 */ +static const int_fast16_t Single_dispatch_tree[24] = { + /* [0] -> opcode range [0, 256], node depth 1 */ + 2, + 5, + 13, + 16, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 64], node depth 2 */ + 2, + LEAF(0), + LEAF(16), + 10, + EMPTY_LEAF, + + /* [10] -> opcode range [32, 48], node depth 3 */ + 1, + LEAF(32), + EMPTY_LEAF, + + /* [13] -> opcode range [64, 128], node depth 2 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [16] -> opcode range [128, 192], node depth 2 */ + 2, + LEAF(72), + LEAF(88), + 21, + EMPTY_LEAF, + + /* [21] -> opcode range [160, 176], node depth 3 */ + 1, + LEAF(104), + EMPTY_LEAF, + +}; + +static const void *Single_function_table[112][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, + /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, + /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, + /* [ 4] = 4 */ {__glXDisp_DestroyContext, + __glXDispSwap_DestroyContext}, + /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, + /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, + /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, + /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, + /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, + /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, + /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, + /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, + /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, + __glXDispSwap_CreateGLXPixmap}, + /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, + __glXDispSwap_GetVisualConfigs}, + /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, + __glXDispSwap_DestroyGLXPixmap}, + /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, + /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, + __glXDispSwap_VendorPrivateWithReply}, + /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, + __glXDispSwap_QueryExtensionsString}, + /* [ 19] = 19 */ {__glXDisp_QueryServerString, + __glXDispSwap_QueryServerString}, + /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, + /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, + /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, + /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, + /* [ 24] = 24 */ {__glXDisp_CreateNewContext, + __glXDispSwap_CreateNewContext}, + /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, + /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, + __glXDispSwap_MakeContextCurrent}, + /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, + /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, + __glXDispSwap_DestroyPbuffer}, + /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, + __glXDispSwap_GetDrawableAttributes}, + /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, + __glXDispSwap_ChangeDrawableAttributes}, + /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, + /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, + /* [ 33] = 33 */ {__glXDisp_SetClientInfoARB, + __glXDispSwap_SetClientInfoARB}, + /* [ 34] = 34 */ {__glXDisp_CreateContextAttribsARB, + __glXDispSwap_CreateContextAttribsARB}, + /* [ 35] = 35 */ {__glXDisp_SetClientInfo2ARB, + __glXDispSwap_SetClientInfo2ARB}, + /* [ 36] = 36 */ {NULL, NULL}, + /* [ 37] = 37 */ {NULL, NULL}, + /* [ 38] = 38 */ {NULL, NULL}, + /* [ 39] = 39 */ {NULL, NULL}, + /* [ 40] = 96 */ {NULL, NULL}, + /* [ 41] = 97 */ {NULL, NULL}, + /* [ 42] = 98 */ {NULL, NULL}, + /* [ 43] = 99 */ {NULL, NULL}, + /* [ 44] = 100 */ {NULL, NULL}, + /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, + /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, + /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, + /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, + /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, + __glXDispSwap_FeedbackBuffer}, + /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, + /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, + /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, + /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, + /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, + /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, + /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, + /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, + /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, + /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, + /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, + /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, + /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, + /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, + /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, + /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, + /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, + /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, + /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, + /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, + /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, + __glXDispSwap_GetPixelMapuiv}, + /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, + __glXDispSwap_GetPixelMapusv}, + /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, + __glXDispSwap_GetPolygonStipple}, + /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, + /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, + /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, + /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, + /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, + /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, + /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, + /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, + __glXDispSwap_GetTexParameterfv}, + /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, + __glXDispSwap_GetTexParameteriv}, + /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, + __glXDispSwap_GetTexLevelParameterfv}, + /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, + __glXDispSwap_GetTexLevelParameteriv}, + /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, + /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, + /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, + /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, + __glXDispSwap_AreTexturesResident}, + /* [ 88] = 144 */ {__glXDisp_DeleteTextures, + __glXDispSwap_DeleteTextures}, + /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, + /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, + /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, + /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, + __glXDispSwap_GetColorTableParameterfv}, + /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, + __glXDispSwap_GetColorTableParameteriv}, + /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, + __glXDispSwap_GetConvolutionFilter}, + /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, + __glXDispSwap_GetConvolutionParameterfv}, + /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, + __glXDispSwap_GetConvolutionParameteriv}, + /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, + __glXDispSwap_GetSeparableFilter}, + /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, + /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, + __glXDispSwap_GetHistogramParameterfv}, + /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, + __glXDispSwap_GetHistogramParameteriv}, + /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, + /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, + __glXDispSwap_GetMinmaxParameterfv}, + /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, + __glXDispSwap_GetMinmaxParameteriv}, + /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImage, + __glXDispSwap_GetCompressedTexImage}, + /* [ 105] = 161 */ {__glXDisp_DeleteQueries, __glXDispSwap_DeleteQueries}, + /* [ 106] = 162 */ {__glXDisp_GenQueries, __glXDispSwap_GenQueries}, + /* [ 107] = 163 */ {__glXDisp_IsQuery, __glXDispSwap_IsQuery}, + /* [ 108] = 164 */ {__glXDisp_GetQueryiv, __glXDispSwap_GetQueryiv}, + /* [ 109] = 165 */ {__glXDisp_GetQueryObjectiv, + __glXDispSwap_GetQueryObjectiv}, + /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuiv, + __glXDispSwap_GetQueryObjectuiv}, + /* [ 111] = 167 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo Single_dispatch_info = { + 8, + Single_dispatch_tree, + Single_function_table, + NULL, + NULL +}; + +/*****************************************************************/ +/* tree depth = 8 */ +static const int_fast16_t Render_dispatch_tree[92] = { + /* [0] -> opcode range [0, 8192], node depth 1 */ + 2, + 5, + 31, + 54, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 2048], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 1024], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 512], node depth 4 */ + 1, + 14, + EMPTY_LEAF, + + /* [14] -> opcode range [0, 256], node depth 5 */ + 4, + LEAF(0), + LEAF(16), + LEAF(32), + LEAF(48), + LEAF(64), + LEAF(80), + LEAF(96), + LEAF(112), + LEAF(128), + LEAF(144), + LEAF(160), + LEAF(176), + LEAF(192), + LEAF(208), + LEAF(224), + EMPTY_LEAF, + + /* [31] -> opcode range [2048, 4096], node depth 2 */ + 1, + 34, + EMPTY_LEAF, + + /* [34] -> opcode range [2048, 3072], node depth 3 */ + 1, + 37, + EMPTY_LEAF, + + /* [37] -> opcode range [2048, 2560], node depth 4 */ + 1, + 40, + EMPTY_LEAF, + + /* [40] -> opcode range [2048, 2304], node depth 5 */ + 1, + 43, + EMPTY_LEAF, + + /* [43] -> opcode range [2048, 2176], node depth 6 */ + 1, + 46, + EMPTY_LEAF, + + /* [46] -> opcode range [2048, 2112], node depth 7 */ + 1, + 49, + EMPTY_LEAF, + + /* [49] -> opcode range [2048, 2080], node depth 8 */ + 2, + LEAF(240), + LEAF(248), + LEAF(256), + EMPTY_LEAF, + + /* [54] -> opcode range [4096, 6144], node depth 2 */ + 1, + 57, + EMPTY_LEAF, + + /* [57] -> opcode range [4096, 5120], node depth 3 */ + 1, + 60, + EMPTY_LEAF, + + /* [60] -> opcode range [4096, 4608], node depth 4 */ + 1, + 63, + EMPTY_LEAF, + + /* [63] -> opcode range [4096, 4352], node depth 5 */ + 4, + LEAF(264), + LEAF(280), + 80, + EMPTY_LEAF, + EMPTY_LEAF, + LEAF(296), + LEAF(312), + LEAF(328), + LEAF(344), + EMPTY_LEAF, + 83, + 86, + EMPTY_LEAF, + 89, + LEAF(360), + EMPTY_LEAF, + + /* [80] -> opcode range [4128, 4144], node depth 6 */ + 1, + LEAF(376), + EMPTY_LEAF, + + /* [83] -> opcode range [4256, 4272], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(384), + + /* [86] -> opcode range [4272, 4288], node depth 6 */ + 1, + LEAF(392), + EMPTY_LEAF, + + /* [89] -> opcode range [4304, 4320], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(400), + +}; + +static const void *Render_function_table[408][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, + /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, + /* [ 3] = 3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase}, + /* [ 4] = 4 */ {__glXDisp_Begin, __glXDispSwap_Begin}, + /* [ 5] = 5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap}, + /* [ 6] = 6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv}, + /* [ 7] = 7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv}, + /* [ 8] = 8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv}, + /* [ 9] = 9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv}, + /* [ 10] = 10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv}, + /* [ 11] = 11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv}, + /* [ 12] = 12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv}, + /* [ 13] = 13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv}, + /* [ 14] = 14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv}, + /* [ 15] = 15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv}, + /* [ 16] = 16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv}, + /* [ 17] = 17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv}, + /* [ 18] = 18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv}, + /* [ 19] = 19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv}, + /* [ 20] = 20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv}, + /* [ 21] = 21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv}, + /* [ 22] = 22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv}, + /* [ 23] = 23 */ {__glXDisp_End, __glXDispSwap_End}, + /* [ 24] = 24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv}, + /* [ 25] = 25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv}, + /* [ 26] = 26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv}, + /* [ 27] = 27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv}, + /* [ 28] = 28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv}, + /* [ 29] = 29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv}, + /* [ 30] = 30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv}, + /* [ 31] = 31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv}, + /* [ 32] = 32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv}, + /* [ 33] = 33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv}, + /* [ 34] = 34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv}, + /* [ 35] = 35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv}, + /* [ 36] = 36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv}, + /* [ 37] = 37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv}, + /* [ 38] = 38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv}, + /* [ 39] = 39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv}, + /* [ 40] = 40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv}, + /* [ 41] = 41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv}, + /* [ 42] = 42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv}, + /* [ 43] = 43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv}, + /* [ 44] = 44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv}, + /* [ 45] = 45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv}, + /* [ 46] = 46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv}, + /* [ 47] = 47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv}, + /* [ 48] = 48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv}, + /* [ 49] = 49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv}, + /* [ 50] = 50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv}, + /* [ 51] = 51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv}, + /* [ 52] = 52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv}, + /* [ 53] = 53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv}, + /* [ 54] = 54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv}, + /* [ 55] = 55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv}, + /* [ 56] = 56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv}, + /* [ 57] = 57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv}, + /* [ 58] = 58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv}, + /* [ 59] = 59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv}, + /* [ 60] = 60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv}, + /* [ 61] = 61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv}, + /* [ 62] = 62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv}, + /* [ 63] = 63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv}, + /* [ 64] = 64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv}, + /* [ 65] = 65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv}, + /* [ 66] = 66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv}, + /* [ 67] = 67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv}, + /* [ 68] = 68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv}, + /* [ 69] = 69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv}, + /* [ 70] = 70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv}, + /* [ 71] = 71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv}, + /* [ 72] = 72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv}, + /* [ 73] = 73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv}, + /* [ 74] = 74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv}, + /* [ 75] = 75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv}, + /* [ 76] = 76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv}, + /* [ 77] = 77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane}, + /* [ 78] = 78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial}, + /* [ 79] = 79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace}, + /* [ 80] = 80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf}, + /* [ 81] = 81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv}, + /* [ 82] = 82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi}, + /* [ 83] = 83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv}, + /* [ 84] = 84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace}, + /* [ 85] = 85 */ {__glXDisp_Hint, __glXDispSwap_Hint}, + /* [ 86] = 86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf}, + /* [ 87] = 87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv}, + /* [ 88] = 88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti}, + /* [ 89] = 89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv}, + /* [ 90] = 90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf}, + /* [ 91] = 91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv}, + /* [ 92] = 92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli}, + /* [ 93] = 93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv}, + /* [ 94] = 94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple}, + /* [ 95] = 95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth}, + /* [ 96] = 96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf}, + /* [ 97] = 97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv}, + /* [ 98] = 98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali}, + /* [ 99] = 99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv}, + /* [ 100] = 100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize}, + /* [ 101] = 101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode}, + /* [ 102] = 102 */ {__glXDisp_PolygonStipple, + __glXDispSwap_PolygonStipple}, + /* [ 103] = 103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor}, + /* [ 104] = 104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel}, + /* [ 105] = 105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf}, + /* [ 106] = 106 */ {__glXDisp_TexParameterfv, + __glXDispSwap_TexParameterfv}, + /* [ 107] = 107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri}, + /* [ 108] = 108 */ {__glXDisp_TexParameteriv, + __glXDispSwap_TexParameteriv}, + /* [ 109] = 109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D}, + /* [ 110] = 110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D}, + /* [ 111] = 111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf}, + /* [ 112] = 112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv}, + /* [ 113] = 113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi}, + /* [ 114] = 114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv}, + /* [ 115] = 115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend}, + /* [ 116] = 116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv}, + /* [ 117] = 117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf}, + /* [ 118] = 118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv}, + /* [ 119] = 119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni}, + /* [ 120] = 120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv}, + /* [ 121] = 121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames}, + /* [ 122] = 122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName}, + /* [ 123] = 123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough}, + /* [ 124] = 124 */ {__glXDisp_PopName, __glXDispSwap_PopName}, + /* [ 125] = 125 */ {__glXDisp_PushName, __glXDispSwap_PushName}, + /* [ 126] = 126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer}, + /* [ 127] = 127 */ {__glXDisp_Clear, __glXDispSwap_Clear}, + /* [ 128] = 128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum}, + /* [ 129] = 129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex}, + /* [ 130] = 130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor}, + /* [ 131] = 131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil}, + /* [ 132] = 132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth}, + /* [ 133] = 133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask}, + /* [ 134] = 134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask}, + /* [ 135] = 135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask}, + /* [ 136] = 136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask}, + /* [ 137] = 137 */ {__glXDisp_Accum, __glXDispSwap_Accum}, + /* [ 138] = 138 */ {__glXDisp_Disable, __glXDispSwap_Disable}, + /* [ 139] = 139 */ {__glXDisp_Enable, __glXDispSwap_Enable}, + /* [ 140] = 140 */ {NULL, NULL}, + /* [ 141] = 141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib}, + /* [ 142] = 142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib}, + /* [ 143] = 143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d}, + /* [ 144] = 144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f}, + /* [ 145] = 145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d}, + /* [ 146] = 146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f}, + /* [ 147] = 147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d}, + /* [ 148] = 148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f}, + /* [ 149] = 149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d}, + /* [ 150] = 150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f}, + /* [ 151] = 151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv}, + /* [ 152] = 152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv}, + /* [ 153] = 153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv}, + /* [ 154] = 154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv}, + /* [ 155] = 155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1}, + /* [ 156] = 156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1}, + /* [ 157] = 157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2}, + /* [ 158] = 158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2}, + /* [ 159] = 159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc}, + /* [ 160] = 160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc}, + /* [ 161] = 161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp}, + /* [ 162] = 162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc}, + /* [ 163] = 163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp}, + /* [ 164] = 164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc}, + /* [ 165] = 165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom}, + /* [ 166] = 166 */ {__glXDisp_PixelTransferf, + __glXDispSwap_PixelTransferf}, + /* [ 167] = 167 */ {__glXDisp_PixelTransferi, + __glXDispSwap_PixelTransferi}, + /* [ 168] = 168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv}, + /* [ 169] = 169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv}, + /* [ 170] = 170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv}, + /* [ 171] = 171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer}, + /* [ 172] = 172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels}, + /* [ 173] = 173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels}, + /* [ 174] = 174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange}, + /* [ 175] = 175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum}, + /* [ 176] = 176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity}, + /* [ 177] = 177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf}, + /* [ 178] = 178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd}, + /* [ 179] = 179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode}, + /* [ 180] = 180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf}, + /* [ 181] = 181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd}, + /* [ 182] = 182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho}, + /* [ 183] = 183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix}, + /* [ 184] = 184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix}, + /* [ 185] = 185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated}, + /* [ 186] = 186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef}, + /* [ 187] = 187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled}, + /* [ 188] = 188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef}, + /* [ 189] = 189 */ {__glXDisp_Translated, __glXDispSwap_Translated}, + /* [ 190] = 190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef}, + /* [ 191] = 191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport}, + /* [ 192] = 192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset}, + /* [ 193] = 193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays}, + /* [ 194] = 194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv}, + /* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable}, + /* [ 196] = 196 */ {__glXDisp_CopyColorSubTable, + __glXDispSwap_CopyColorSubTable}, + /* [ 197] = 197 */ {__glXDisp_ActiveTexture, __glXDispSwap_ActiveTexture}, + /* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dv, + __glXDispSwap_MultiTexCoord1dv}, + /* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB, + __glXDispSwap_MultiTexCoord1fvARB}, + /* [ 200] = 200 */ {__glXDisp_MultiTexCoord1iv, + __glXDispSwap_MultiTexCoord1iv}, + /* [ 201] = 201 */ {__glXDisp_MultiTexCoord1sv, + __glXDispSwap_MultiTexCoord1sv}, + /* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dv, + __glXDispSwap_MultiTexCoord2dv}, + /* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB, + __glXDispSwap_MultiTexCoord2fvARB}, + /* [ 204] = 204 */ {__glXDisp_MultiTexCoord2iv, + __glXDispSwap_MultiTexCoord2iv}, + /* [ 205] = 205 */ {__glXDisp_MultiTexCoord2sv, + __glXDispSwap_MultiTexCoord2sv}, + /* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dv, + __glXDispSwap_MultiTexCoord3dv}, + /* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB, + __glXDispSwap_MultiTexCoord3fvARB}, + /* [ 208] = 208 */ {__glXDisp_MultiTexCoord3iv, + __glXDispSwap_MultiTexCoord3iv}, + /* [ 209] = 209 */ {__glXDisp_MultiTexCoord3sv, + __glXDispSwap_MultiTexCoord3sv}, + /* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dv, + __glXDispSwap_MultiTexCoord4dv}, + /* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB, + __glXDispSwap_MultiTexCoord4fvARB}, + /* [ 212] = 212 */ {__glXDisp_MultiTexCoord4iv, + __glXDispSwap_MultiTexCoord4iv}, + /* [ 213] = 213 */ {__glXDisp_MultiTexCoord4sv, + __glXDispSwap_MultiTexCoord4sv}, + /* [ 214] = 214 */ {__glXDisp_CompressedTexImage1D, + __glXDispSwap_CompressedTexImage1D}, + /* [ 215] = 215 */ {__glXDisp_CompressedTexImage2D, + __glXDispSwap_CompressedTexImage2D}, + /* [ 216] = 216 */ {__glXDisp_CompressedTexImage3D, + __glXDispSwap_CompressedTexImage3D}, + /* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1D, + __glXDispSwap_CompressedTexSubImage1D}, + /* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2D, + __glXDispSwap_CompressedTexSubImage2D}, + /* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3D, + __glXDispSwap_CompressedTexSubImage3D}, + /* [ 220] = 220 */ {NULL, NULL}, + /* [ 221] = 221 */ {NULL, NULL}, + /* [ 222] = 222 */ {NULL, NULL}, + /* [ 223] = 223 */ {NULL, NULL}, + /* [ 224] = 224 */ {NULL, NULL}, + /* [ 225] = 225 */ {NULL, NULL}, + /* [ 226] = 226 */ {NULL, NULL}, + /* [ 227] = 227 */ {NULL, NULL}, + /* [ 228] = 228 */ {NULL, NULL}, + /* [ 229] = 229 */ {__glXDisp_SampleCoverage, + __glXDispSwap_SampleCoverage}, + /* [ 230] = 230 */ {__glXDisp_WindowPos3fv, __glXDispSwap_WindowPos3fv}, + /* [ 231] = 231 */ {__glXDisp_BeginQuery, __glXDispSwap_BeginQuery}, + /* [ 232] = 232 */ {__glXDisp_EndQuery, __glXDispSwap_EndQuery}, + /* [ 233] = 233 */ {__glXDisp_DrawBuffers, __glXDispSwap_DrawBuffers}, + /* [ 234] = 234 */ {__glXDisp_ClampColor, __glXDispSwap_ClampColor}, + /* [ 235] = 235 */ {NULL, NULL}, + /* [ 236] = 236 */ {NULL, NULL}, + /* [ 237] = 237 */ {__glXDisp_FramebufferTextureLayer, + __glXDispSwap_FramebufferTextureLayer}, + /* [ 238] = 238 */ {NULL, NULL}, + /* [ 239] = 239 */ {NULL, NULL}, + /* [ 240] = 2048 */ {NULL, NULL}, + /* [ 241] = 2049 */ {NULL, NULL}, + /* [ 242] = 2050 */ {NULL, NULL}, + /* [ 243] = 2051 */ {NULL, NULL}, + /* [ 244] = 2052 */ {NULL, NULL}, + /* [ 245] = 2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable}, + /* [ 246] = 2054 */ {__glXDisp_ColorTableParameterfv, + __glXDispSwap_ColorTableParameterfv}, + /* [ 247] = 2055 */ {__glXDisp_ColorTableParameteriv, + __glXDispSwap_ColorTableParameteriv}, + /* [ 248] = 2056 */ {__glXDisp_CopyColorTable, + __glXDispSwap_CopyColorTable}, + /* [ 249] = 2057 */ {NULL, NULL}, + /* [ 250] = 2058 */ {NULL, NULL}, + /* [ 251] = 2059 */ {NULL, NULL}, + /* [ 252] = 2060 */ {NULL, NULL}, + /* [ 253] = 2061 */ {NULL, NULL}, + /* [ 254] = 2062 */ {NULL, NULL}, + /* [ 255] = 2063 */ {NULL, NULL}, + /* [ 256] = 2064 */ {NULL, NULL}, + /* [ 257] = 2065 */ {__glXDisp_PointParameterf, + __glXDispSwap_PointParameterf}, + /* [ 258] = 2066 */ {__glXDisp_PointParameterfv, + __glXDispSwap_PointParameterfv}, + /* [ 259] = 2067 */ {NULL, NULL}, + /* [ 260] = 2068 */ {NULL, NULL}, + /* [ 261] = 2069 */ {NULL, NULL}, + /* [ 262] = 2070 */ {NULL, NULL}, + /* [ 263] = 2071 */ {NULL, NULL}, + /* [ 264] = 4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor}, + /* [ 265] = 4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation}, + /* [ 266] = 4098 */ {NULL, NULL}, + /* [ 267] = 4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D}, + /* [ 268] = 4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D}, + /* [ 269] = 4101 */ {__glXDisp_ConvolutionFilter1D, + __glXDispSwap_ConvolutionFilter1D}, + /* [ 270] = 4102 */ {__glXDisp_ConvolutionFilter2D, + __glXDispSwap_ConvolutionFilter2D}, + /* [ 271] = 4103 */ {__glXDisp_ConvolutionParameterf, + __glXDispSwap_ConvolutionParameterf}, + /* [ 272] = 4104 */ {__glXDisp_ConvolutionParameterfv, + __glXDispSwap_ConvolutionParameterfv}, + /* [ 273] = 4105 */ {__glXDisp_ConvolutionParameteri, + __glXDispSwap_ConvolutionParameteri}, + /* [ 274] = 4106 */ {__glXDisp_ConvolutionParameteriv, + __glXDispSwap_ConvolutionParameteriv}, + /* [ 275] = 4107 */ {__glXDisp_CopyConvolutionFilter1D, + __glXDispSwap_CopyConvolutionFilter1D}, + /* [ 276] = 4108 */ {__glXDisp_CopyConvolutionFilter2D, + __glXDispSwap_CopyConvolutionFilter2D}, + /* [ 277] = 4109 */ {__glXDisp_SeparableFilter2D, + __glXDispSwap_SeparableFilter2D}, + /* [ 278] = 4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram}, + /* [ 279] = 4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax}, + /* [ 280] = 4112 */ {__glXDisp_ResetHistogram, + __glXDispSwap_ResetHistogram}, + /* [ 281] = 4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax}, + /* [ 282] = 4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D}, + /* [ 283] = 4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D}, + /* [ 284] = 4116 */ {NULL, NULL}, + /* [ 285] = 4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture}, + /* [ 286] = 4118 */ {__glXDisp_PrioritizeTextures, + __glXDispSwap_PrioritizeTextures}, + /* [ 287] = 4119 */ {__glXDisp_CopyTexImage1D, + __glXDispSwap_CopyTexImage1D}, + /* [ 288] = 4120 */ {__glXDisp_CopyTexImage2D, + __glXDispSwap_CopyTexImage2D}, + /* [ 289] = 4121 */ {__glXDisp_CopyTexSubImage1D, + __glXDispSwap_CopyTexSubImage1D}, + /* [ 290] = 4122 */ {__glXDisp_CopyTexSubImage2D, + __glXDispSwap_CopyTexSubImage2D}, + /* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D, + __glXDispSwap_CopyTexSubImage3D}, + /* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT}, + /* [ 293] = 4125 */ {__glXDisp_FogCoorddv, __glXDispSwap_FogCoorddv}, + /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bv, + __glXDispSwap_SecondaryColor3bv}, + /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3sv, + __glXDispSwap_SecondaryColor3sv}, + /* [ 296] = 4176 */ {NULL, NULL}, + /* [ 297] = 4177 */ {NULL, NULL}, + /* [ 298] = 4178 */ {NULL, NULL}, + /* [ 299] = 4179 */ {NULL, NULL}, + /* [ 300] = 4180 */ {__glXDisp_BindProgramARB, + __glXDispSwap_BindProgramARB}, + /* [ 301] = 4181 */ {NULL, NULL}, + /* [ 302] = 4182 */ {NULL, NULL}, + /* [ 303] = 4183 */ {NULL, NULL}, + /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, + __glXDispSwap_ProgramEnvParameter4fvARB}, + /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, + __glXDispSwap_ProgramEnvParameter4dvARB}, + /* [ 306] = 4186 */ {NULL, NULL}, + /* [ 307] = 4187 */ {NULL, NULL}, + /* [ 308] = 4188 */ {NULL, NULL}, + /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1sv, + __glXDispSwap_VertexAttrib1sv}, + /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2sv, + __glXDispSwap_VertexAttrib2sv}, + /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3sv, + __glXDispSwap_VertexAttrib3sv}, + /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4sv, + __glXDispSwap_VertexAttrib4sv}, + /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, + __glXDispSwap_VertexAttrib1fvARB}, + /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, + __glXDispSwap_VertexAttrib2fvARB}, + /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, + __glXDispSwap_VertexAttrib3fvARB}, + /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, + __glXDispSwap_VertexAttrib4fvARB}, + /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dv, + __glXDispSwap_VertexAttrib1dv}, + /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dv, + __glXDispSwap_VertexAttrib2dv}, + /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dv, + __glXDispSwap_VertexAttrib3dv}, + /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dv, + __glXDispSwap_VertexAttrib4dv}, + /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4Nubv, + __glXDispSwap_VertexAttrib4Nubv}, + /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, + __glXDispSwap_VertexAttribs1svNV}, + /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, + __glXDispSwap_VertexAttribs2svNV}, + /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, + __glXDispSwap_VertexAttribs3svNV}, + /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, + __glXDispSwap_VertexAttribs4svNV}, + /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, + __glXDispSwap_VertexAttribs1fvNV}, + /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, + __glXDispSwap_VertexAttribs2fvNV}, + /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, + __glXDispSwap_VertexAttribs3fvNV}, + /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, + __glXDispSwap_VertexAttribs4fvNV}, + /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, + __glXDispSwap_VertexAttribs1dvNV}, + /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, + __glXDispSwap_VertexAttribs2dvNV}, + /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, + __glXDispSwap_VertexAttribs3dvNV}, + /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, + __glXDispSwap_VertexAttribs4dvNV}, + /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, + __glXDispSwap_VertexAttribs4ubvNV}, + /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, + __glXDispSwap_ProgramLocalParameter4fvARB}, + /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, + __glXDispSwap_ProgramLocalParameter4dvARB}, + /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, + __glXDispSwap_ProgramStringARB}, + /* [ 338] = 4218 */ {NULL, NULL}, + /* [ 339] = 4219 */ {NULL, NULL}, + /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, + __glXDispSwap_ActiveStencilFaceEXT}, + /* [ 341] = 4221 */ {__glXDisp_PointParameteri, + __glXDispSwap_PointParameteri}, + /* [ 342] = 4222 */ {__glXDisp_PointParameteriv, + __glXDispSwap_PointParameteriv}, + /* [ 343] = 4223 */ {NULL, NULL}, + /* [ 344] = 4224 */ {NULL, NULL}, + /* [ 345] = 4225 */ {NULL, NULL}, + /* [ 346] = 4226 */ {NULL, NULL}, + /* [ 347] = 4227 */ {NULL, NULL}, + /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparate, + __glXDispSwap_BlendEquationSeparate}, + /* [ 349] = 4229 */ {NULL, NULL}, + /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bv, + __glXDispSwap_VertexAttrib4bv}, + /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4iv, + __glXDispSwap_VertexAttrib4iv}, + /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubv, + __glXDispSwap_VertexAttrib4ubv}, + /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usv, + __glXDispSwap_VertexAttrib4usv}, + /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uiv, + __glXDispSwap_VertexAttrib4uiv}, + /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4Nbv, + __glXDispSwap_VertexAttrib4Nbv}, + /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4Nsv, + __glXDispSwap_VertexAttrib4Nsv}, + /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4Niv, + __glXDispSwap_VertexAttrib4Niv}, + /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4Nusv, + __glXDispSwap_VertexAttrib4Nusv}, + /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4Nuiv, + __glXDispSwap_VertexAttrib4Nuiv}, + /* [ 360] = 4320 */ {__glXDisp_DeleteFramebuffers, + __glXDispSwap_DeleteFramebuffers}, + /* [ 361] = 4321 */ {__glXDisp_FramebufferTexture1D, + __glXDispSwap_FramebufferTexture1D}, + /* [ 362] = 4322 */ {__glXDisp_FramebufferTexture2D, + __glXDispSwap_FramebufferTexture2D}, + /* [ 363] = 4323 */ {__glXDisp_FramebufferTexture3D, + __glXDispSwap_FramebufferTexture3D}, + /* [ 364] = 4324 */ {__glXDisp_FramebufferRenderbuffer, + __glXDispSwap_FramebufferRenderbuffer}, + /* [ 365] = 4325 */ {__glXDisp_GenerateMipmap, + __glXDispSwap_GenerateMipmap}, + /* [ 366] = 4326 */ {NULL, NULL}, + /* [ 367] = 4327 */ {NULL, NULL}, + /* [ 368] = 4328 */ {NULL, NULL}, + /* [ 369] = 4329 */ {NULL, NULL}, + /* [ 370] = 4330 */ {__glXDisp_BlitFramebuffer, + __glXDispSwap_BlitFramebuffer}, + /* [ 371] = 4331 */ {__glXDisp_RenderbufferStorageMultisample, + __glXDispSwap_RenderbufferStorageMultisample}, + /* [ 372] = 4332 */ {NULL, NULL}, + /* [ 373] = 4333 */ {NULL, NULL}, + /* [ 374] = 4334 */ {NULL, NULL}, + /* [ 375] = 4335 */ {NULL, NULL}, + /* [ 376] = 4128 */ {__glXDisp_SecondaryColor3iv, + __glXDispSwap_SecondaryColor3iv}, + /* [ 377] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, + __glXDispSwap_SecondaryColor3fvEXT}, + /* [ 378] = 4130 */ {__glXDisp_SecondaryColor3dv, + __glXDispSwap_SecondaryColor3dv}, + /* [ 379] = 4131 */ {__glXDisp_SecondaryColor3ubv, + __glXDispSwap_SecondaryColor3ubv}, + /* [ 380] = 4132 */ {__glXDisp_SecondaryColor3usv, + __glXDispSwap_SecondaryColor3usv}, + /* [ 381] = 4133 */ {__glXDisp_SecondaryColor3uiv, + __glXDispSwap_SecondaryColor3uiv}, + /* [ 382] = 4134 */ {__glXDisp_BlendFuncSeparate, + __glXDispSwap_BlendFuncSeparate}, + /* [ 383] = 4135 */ {NULL, NULL}, + /* [ 384] = 4264 */ {NULL, NULL}, + /* [ 385] = 4265 */ {__glXDisp_VertexAttrib1svNV, + __glXDispSwap_VertexAttrib1svNV}, + /* [ 386] = 4266 */ {__glXDisp_VertexAttrib2svNV, + __glXDispSwap_VertexAttrib2svNV}, + /* [ 387] = 4267 */ {__glXDisp_VertexAttrib3svNV, + __glXDispSwap_VertexAttrib3svNV}, + /* [ 388] = 4268 */ {__glXDisp_VertexAttrib4svNV, + __glXDispSwap_VertexAttrib4svNV}, + /* [ 389] = 4269 */ {__glXDisp_VertexAttrib1fvNV, + __glXDispSwap_VertexAttrib1fvNV}, + /* [ 390] = 4270 */ {__glXDisp_VertexAttrib2fvNV, + __glXDispSwap_VertexAttrib2fvNV}, + /* [ 391] = 4271 */ {__glXDisp_VertexAttrib3fvNV, + __glXDispSwap_VertexAttrib3fvNV}, + /* [ 392] = 4272 */ {__glXDisp_VertexAttrib4fvNV, + __glXDispSwap_VertexAttrib4fvNV}, + /* [ 393] = 4273 */ {__glXDisp_VertexAttrib1dvNV, + __glXDispSwap_VertexAttrib1dvNV}, + /* [ 394] = 4274 */ {__glXDisp_VertexAttrib2dvNV, + __glXDispSwap_VertexAttrib2dvNV}, + /* [ 395] = 4275 */ {__glXDisp_VertexAttrib3dvNV, + __glXDispSwap_VertexAttrib3dvNV}, + /* [ 396] = 4276 */ {__glXDisp_VertexAttrib4dvNV, + __glXDispSwap_VertexAttrib4dvNV}, + /* [ 397] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, + __glXDispSwap_VertexAttrib4ubvNV}, + /* [ 398] = 4278 */ {NULL, NULL}, + /* [ 399] = 4279 */ {NULL, NULL}, + /* [ 400] = 4312 */ {NULL, NULL}, + /* [ 401] = 4313 */ {NULL, NULL}, + /* [ 402] = 4314 */ {NULL, NULL}, + /* [ 403] = 4315 */ {NULL, NULL}, + /* [ 404] = 4316 */ {__glXDisp_BindRenderbuffer, + __glXDispSwap_BindRenderbuffer}, + /* [ 405] = 4317 */ {__glXDisp_DeleteRenderbuffers, + __glXDispSwap_DeleteRenderbuffers}, + /* [ 406] = 4318 */ {__glXDisp_RenderbufferStorage, + __glXDispSwap_RenderbufferStorage}, + /* [ 407] = 4319 */ {__glXDisp_BindFramebuffer, + __glXDispSwap_BindFramebuffer}, +}; + +static const int_fast16_t Render_size_table[408][2] = { + /* [ 0] = 0 */ {0, ~0}, + /* [ 1] = 1 */ {8, ~0}, + /* [ 2] = 2 */ {12, 0}, + /* [ 3] = 3 */ {8, ~0}, + /* [ 4] = 4 */ {8, ~0}, + /* [ 5] = 5 */ {48, 1}, + /* [ 6] = 6 */ {8, ~0}, + /* [ 7] = 7 */ {28, ~0}, + /* [ 8] = 8 */ {16, ~0}, + /* [ 9] = 9 */ {16, ~0}, + /* [ 10] = 10 */ {12, ~0}, + /* [ 11] = 11 */ {8, ~0}, + /* [ 12] = 12 */ {16, ~0}, + /* [ 13] = 13 */ {12, ~0}, + /* [ 14] = 14 */ {8, ~0}, + /* [ 15] = 15 */ {36, ~0}, + /* [ 16] = 16 */ {20, ~0}, + /* [ 17] = 17 */ {20, ~0}, + /* [ 18] = 18 */ {12, ~0}, + /* [ 19] = 19 */ {8, ~0}, + /* [ 20] = 20 */ {20, ~0}, + /* [ 21] = 21 */ {12, ~0}, + /* [ 22] = 22 */ {8, ~0}, + /* [ 23] = 23 */ {4, ~0}, + /* [ 24] = 24 */ {12, ~0}, + /* [ 25] = 25 */ {8, ~0}, + /* [ 26] = 26 */ {8, ~0}, + /* [ 27] = 27 */ {8, ~0}, + /* [ 28] = 28 */ {8, ~0}, + /* [ 29] = 29 */ {28, ~0}, + /* [ 30] = 30 */ {16, ~0}, + /* [ 31] = 31 */ {16, ~0}, + /* [ 32] = 32 */ {12, ~0}, + /* [ 33] = 33 */ {20, ~0}, + /* [ 34] = 34 */ {12, ~0}, + /* [ 35] = 35 */ {12, ~0}, + /* [ 36] = 36 */ {8, ~0}, + /* [ 37] = 37 */ {28, ~0}, + /* [ 38] = 38 */ {16, ~0}, + /* [ 39] = 39 */ {16, ~0}, + /* [ 40] = 40 */ {12, ~0}, + /* [ 41] = 41 */ {36, ~0}, + /* [ 42] = 42 */ {20, ~0}, + /* [ 43] = 43 */ {20, ~0}, + /* [ 44] = 44 */ {12, ~0}, + /* [ 45] = 45 */ {36, ~0}, + /* [ 46] = 46 */ {20, ~0}, + /* [ 47] = 47 */ {20, ~0}, + /* [ 48] = 48 */ {12, ~0}, + /* [ 49] = 49 */ {12, ~0}, + /* [ 50] = 50 */ {8, ~0}, + /* [ 51] = 51 */ {8, ~0}, + /* [ 52] = 52 */ {8, ~0}, + /* [ 53] = 53 */ {20, ~0}, + /* [ 54] = 54 */ {12, ~0}, + /* [ 55] = 55 */ {12, ~0}, + /* [ 56] = 56 */ {8, ~0}, + /* [ 57] = 57 */ {28, ~0}, + /* [ 58] = 58 */ {16, ~0}, + /* [ 59] = 59 */ {16, ~0}, + /* [ 60] = 60 */ {12, ~0}, + /* [ 61] = 61 */ {36, ~0}, + /* [ 62] = 62 */ {20, ~0}, + /* [ 63] = 63 */ {20, ~0}, + /* [ 64] = 64 */ {12, ~0}, + /* [ 65] = 65 */ {20, ~0}, + /* [ 66] = 66 */ {12, ~0}, + /* [ 67] = 67 */ {12, ~0}, + /* [ 68] = 68 */ {8, ~0}, + /* [ 69] = 69 */ {28, ~0}, + /* [ 70] = 70 */ {16, ~0}, + /* [ 71] = 71 */ {16, ~0}, + /* [ 72] = 72 */ {12, ~0}, + /* [ 73] = 73 */ {36, ~0}, + /* [ 74] = 74 */ {20, ~0}, + /* [ 75] = 75 */ {20, ~0}, + /* [ 76] = 76 */ {12, ~0}, + /* [ 77] = 77 */ {40, ~0}, + /* [ 78] = 78 */ {12, ~0}, + /* [ 79] = 79 */ {8, ~0}, + /* [ 80] = 80 */ {12, ~0}, + /* [ 81] = 81 */ {8, 2}, + /* [ 82] = 82 */ {12, ~0}, + /* [ 83] = 83 */ {8, 3}, + /* [ 84] = 84 */ {8, ~0}, + /* [ 85] = 85 */ {12, ~0}, + /* [ 86] = 86 */ {16, ~0}, + /* [ 87] = 87 */ {12, 4}, + /* [ 88] = 88 */ {16, ~0}, + /* [ 89] = 89 */ {12, 5}, + /* [ 90] = 90 */ {12, ~0}, + /* [ 91] = 91 */ {8, 6}, + /* [ 92] = 92 */ {12, ~0}, + /* [ 93] = 93 */ {8, 7}, + /* [ 94] = 94 */ {12, ~0}, + /* [ 95] = 95 */ {8, ~0}, + /* [ 96] = 96 */ {16, ~0}, + /* [ 97] = 97 */ {12, 8}, + /* [ 98] = 98 */ {16, ~0}, + /* [ 99] = 99 */ {12, 9}, + /* [100] = 100 */ {8, ~0}, + /* [101] = 101 */ {12, ~0}, + /* [102] = 102 */ {24, 10}, + /* [103] = 103 */ {20, ~0}, + /* [104] = 104 */ {8, ~0}, + /* [105] = 105 */ {16, ~0}, + /* [106] = 106 */ {12, 11}, + /* [107] = 107 */ {16, ~0}, + /* [108] = 108 */ {12, 12}, + /* [109] = 109 */ {56, 13}, + /* [110] = 110 */ {56, 14}, + /* [111] = 111 */ {16, ~0}, + /* [112] = 112 */ {12, 15}, + /* [113] = 113 */ {16, ~0}, + /* [114] = 114 */ {12, 16}, + /* [115] = 115 */ {20, ~0}, + /* [116] = 116 */ {12, 17}, + /* [117] = 117 */ {16, ~0}, + /* [118] = 118 */ {12, 18}, + /* [119] = 119 */ {16, ~0}, + /* [120] = 120 */ {12, 19}, + /* [121] = 121 */ {4, ~0}, + /* [122] = 122 */ {8, ~0}, + /* [123] = 123 */ {8, ~0}, + /* [124] = 124 */ {4, ~0}, + /* [125] = 125 */ {8, ~0}, + /* [126] = 126 */ {8, ~0}, + /* [127] = 127 */ {8, ~0}, + /* [128] = 128 */ {20, ~0}, + /* [129] = 129 */ {8, ~0}, + /* [130] = 130 */ {20, ~0}, + /* [131] = 131 */ {8, ~0}, + /* [132] = 132 */ {12, ~0}, + /* [133] = 133 */ {8, ~0}, + /* [134] = 134 */ {8, ~0}, + /* [135] = 135 */ {8, ~0}, + /* [136] = 136 */ {8, ~0}, + /* [137] = 137 */ {12, ~0}, + /* [138] = 138 */ {8, ~0}, + /* [139] = 139 */ {8, ~0}, + /* [140] = 140 */ {0, ~0}, + /* [141] = 141 */ {4, ~0}, + /* [142] = 142 */ {8, ~0}, + /* [143] = 143 */ {28, 20}, + /* [144] = 144 */ {20, 21}, + /* [145] = 145 */ {48, 22}, + /* [146] = 146 */ {32, 23}, + /* [147] = 147 */ {24, ~0}, + /* [148] = 148 */ {16, ~0}, + /* [149] = 149 */ {44, ~0}, + /* [150] = 150 */ {28, ~0}, + /* [151] = 151 */ {12, ~0}, + /* [152] = 152 */ {8, ~0}, + /* [153] = 153 */ {20, ~0}, + /* [154] = 154 */ {12, ~0}, + /* [155] = 155 */ {16, ~0}, + /* [156] = 156 */ {8, ~0}, + /* [157] = 157 */ {24, ~0}, + /* [158] = 158 */ {12, ~0}, + /* [159] = 159 */ {12, ~0}, + /* [160] = 160 */ {12, ~0}, + /* [161] = 161 */ {8, ~0}, + /* [162] = 162 */ {16, ~0}, + /* [163] = 163 */ {16, ~0}, + /* [164] = 164 */ {8, ~0}, + /* [165] = 165 */ {12, ~0}, + /* [166] = 166 */ {12, ~0}, + /* [167] = 167 */ {12, ~0}, + /* [168] = 168 */ {12, 24}, + /* [169] = 169 */ {12, 25}, + /* [170] = 170 */ {12, 26}, + /* [171] = 171 */ {8, ~0}, + /* [172] = 172 */ {24, ~0}, + /* [173] = 173 */ {40, 27}, + /* [174] = 174 */ {20, ~0}, + /* [175] = 175 */ {52, ~0}, + /* [176] = 176 */ {4, ~0}, + /* [177] = 177 */ {68, ~0}, + /* [178] = 178 */ {132, ~0}, + /* [179] = 179 */ {8, ~0}, + /* [180] = 180 */ {68, ~0}, + /* [181] = 181 */ {132, ~0}, + /* [182] = 182 */ {52, ~0}, + /* [183] = 183 */ {4, ~0}, + /* [184] = 184 */ {4, ~0}, + /* [185] = 185 */ {36, ~0}, + /* [186] = 186 */ {20, ~0}, + /* [187] = 187 */ {28, ~0}, + /* [188] = 188 */ {16, ~0}, + /* [189] = 189 */ {28, ~0}, + /* [190] = 190 */ {16, ~0}, + /* [191] = 191 */ {20, ~0}, + /* [192] = 192 */ {12, ~0}, + /* [193] = 193 */ {16, 28}, + /* [194] = 194 */ {8, ~0}, + /* [195] = 195 */ {44, 29}, + /* [196] = 196 */ {24, ~0}, + /* [197] = 197 */ {8, ~0}, + /* [198] = 198 */ {16, ~0}, + /* [199] = 199 */ {12, ~0}, + /* [200] = 200 */ {12, ~0}, + /* [201] = 201 */ {12, ~0}, + /* [202] = 202 */ {24, ~0}, + /* [203] = 203 */ {16, ~0}, + /* [204] = 204 */ {16, ~0}, + /* [205] = 205 */ {12, ~0}, + /* [206] = 206 */ {32, ~0}, + /* [207] = 207 */ {20, ~0}, + /* [208] = 208 */ {20, ~0}, + /* [209] = 209 */ {16, ~0}, + /* [210] = 210 */ {40, ~0}, + /* [211] = 211 */ {24, ~0}, + /* [212] = 212 */ {24, ~0}, + /* [213] = 213 */ {16, ~0}, + /* [214] = 214 */ {28, 30}, + /* [215] = 215 */ {32, 31}, + /* [216] = 216 */ {36, 32}, + /* [217] = 217 */ {28, 33}, + /* [218] = 218 */ {36, 34}, + /* [219] = 219 */ {44, 35}, + /* [220] = 220 */ {0, ~0}, + /* [221] = 221 */ {0, ~0}, + /* [222] = 222 */ {0, ~0}, + /* [223] = 223 */ {0, ~0}, + /* [224] = 224 */ {0, ~0}, + /* [225] = 225 */ {0, ~0}, + /* [226] = 226 */ {0, ~0}, + /* [227] = 227 */ {0, ~0}, + /* [228] = 228 */ {0, ~0}, + /* [229] = 229 */ {12, ~0}, + /* [230] = 230 */ {16, ~0}, + /* [231] = 231 */ {12, ~0}, + /* [232] = 232 */ {8, ~0}, + /* [233] = 233 */ {8, 36}, + /* [234] = 234 */ {12, ~0}, + /* [235] = 235 */ {0, ~0}, + /* [236] = 236 */ {0, ~0}, + /* [237] = 237 */ {24, ~0}, + /* [238] = 238 */ {0, ~0}, + /* [239] = 239 */ {0, ~0}, + /* [240] = 2048 */ {0, ~0}, + /* [241] = 2049 */ {0, ~0}, + /* [242] = 2050 */ {0, ~0}, + /* [243] = 2051 */ {0, ~0}, + /* [244] = 2052 */ {0, ~0}, + /* [245] = 2053 */ {44, 37}, + /* [246] = 2054 */ {12, 38}, + /* [247] = 2055 */ {12, 39}, + /* [248] = 2056 */ {24, ~0}, + /* [249] = 2057 */ {0, ~0}, + /* [250] = 2058 */ {0, ~0}, + /* [251] = 2059 */ {0, ~0}, + /* [252] = 2060 */ {0, ~0}, + /* [253] = 2061 */ {0, ~0}, + /* [254] = 2062 */ {0, ~0}, + /* [255] = 2063 */ {0, ~0}, + /* [256] = 2064 */ {0, ~0}, + /* [257] = 2065 */ {12, ~0}, + /* [258] = 2066 */ {8, 40}, + /* [259] = 2067 */ {0, ~0}, + /* [260] = 2068 */ {0, ~0}, + /* [261] = 2069 */ {0, ~0}, + /* [262] = 2070 */ {0, ~0}, + /* [263] = 2071 */ {0, ~0}, + /* [264] = 4096 */ {20, ~0}, + /* [265] = 4097 */ {8, ~0}, + /* [266] = 4098 */ {0, ~0}, + /* [267] = 4099 */ {60, 41}, + /* [268] = 4100 */ {60, 42}, + /* [269] = 4101 */ {48, 43}, + /* [270] = 4102 */ {48, 44}, + /* [271] = 4103 */ {16, ~0}, + /* [272] = 4104 */ {12, 45}, + /* [273] = 4105 */ {16, ~0}, + /* [274] = 4106 */ {12, 46}, + /* [275] = 4107 */ {24, ~0}, + /* [276] = 4108 */ {28, ~0}, + /* [277] = 4109 */ {32, 47}, + /* [278] = 4110 */ {20, ~0}, + /* [279] = 4111 */ {16, ~0}, + /* [280] = 4112 */ {8, ~0}, + /* [281] = 4113 */ {8, ~0}, + /* [282] = 4114 */ {84, 48}, + /* [283] = 4115 */ {92, 49}, + /* [284] = 4116 */ {0, ~0}, + /* [285] = 4117 */ {12, ~0}, + /* [286] = 4118 */ {8, 50}, + /* [287] = 4119 */ {32, ~0}, + /* [288] = 4120 */ {36, ~0}, + /* [289] = 4121 */ {28, ~0}, + /* [290] = 4122 */ {36, ~0}, + /* [291] = 4123 */ {40, ~0}, + /* [292] = 4124 */ {8, ~0}, + /* [293] = 4125 */ {12, ~0}, + /* [294] = 4126 */ {8, ~0}, + /* [295] = 4127 */ {12, ~0}, + /* [296] = 4176 */ {0, ~0}, + /* [297] = 4177 */ {0, ~0}, + /* [298] = 4178 */ {0, ~0}, + /* [299] = 4179 */ {0, ~0}, + /* [300] = 4180 */ {12, ~0}, + /* [301] = 4181 */ {0, ~0}, + /* [302] = 4182 */ {0, ~0}, + /* [303] = 4183 */ {0, ~0}, + /* [304] = 4184 */ {28, ~0}, + /* [305] = 4185 */ {44, ~0}, + /* [306] = 4186 */ {0, ~0}, + /* [307] = 4187 */ {0, ~0}, + /* [308] = 4188 */ {0, ~0}, + /* [309] = 4189 */ {12, ~0}, + /* [310] = 4190 */ {12, ~0}, + /* [311] = 4191 */ {16, ~0}, + /* [312] = 4192 */ {16, ~0}, + /* [313] = 4193 */ {12, ~0}, + /* [314] = 4194 */ {16, ~0}, + /* [315] = 4195 */ {20, ~0}, + /* [316] = 4196 */ {24, ~0}, + /* [317] = 4197 */ {16, ~0}, + /* [318] = 4198 */ {24, ~0}, + /* [319] = 4199 */ {32, ~0}, + /* [320] = 4200 */ {40, ~0}, + /* [321] = 4201 */ {12, ~0}, + /* [322] = 4202 */ {12, 51}, + /* [323] = 4203 */ {12, 52}, + /* [324] = 4204 */ {12, 53}, + /* [325] = 4205 */ {12, 54}, + /* [326] = 4206 */ {12, 55}, + /* [327] = 4207 */ {12, 56}, + /* [328] = 4208 */ {12, 57}, + /* [329] = 4209 */ {12, 58}, + /* [330] = 4210 */ {12, 59}, + /* [331] = 4211 */ {12, 60}, + /* [332] = 4212 */ {12, 61}, + /* [333] = 4213 */ {12, 62}, + /* [334] = 4214 */ {12, 63}, + /* [335] = 4215 */ {28, ~0}, + /* [336] = 4216 */ {44, ~0}, + /* [337] = 4217 */ {16, 64}, + /* [338] = 4218 */ {0, ~0}, + /* [339] = 4219 */ {0, ~0}, + /* [340] = 4220 */ {8, ~0}, + /* [341] = 4221 */ {12, ~0}, + /* [342] = 4222 */ {8, 65}, + /* [343] = 4223 */ {0, ~0}, + /* [344] = 4224 */ {0, ~0}, + /* [345] = 4225 */ {0, ~0}, + /* [346] = 4226 */ {0, ~0}, + /* [347] = 4227 */ {0, ~0}, + /* [348] = 4228 */ {12, ~0}, + /* [349] = 4229 */ {0, ~0}, + /* [350] = 4230 */ {12, ~0}, + /* [351] = 4231 */ {24, ~0}, + /* [352] = 4232 */ {12, ~0}, + /* [353] = 4233 */ {16, ~0}, + /* [354] = 4234 */ {24, ~0}, + /* [355] = 4235 */ {12, ~0}, + /* [356] = 4236 */ {16, ~0}, + /* [357] = 4237 */ {24, ~0}, + /* [358] = 4238 */ {16, ~0}, + /* [359] = 4239 */ {24, ~0}, + /* [360] = 4320 */ {8, 66}, + /* [361] = 4321 */ {24, ~0}, + /* [362] = 4322 */ {24, ~0}, + /* [363] = 4323 */ {28, ~0}, + /* [364] = 4324 */ {20, ~0}, + /* [365] = 4325 */ {8, ~0}, + /* [366] = 4326 */ {0, ~0}, + /* [367] = 4327 */ {0, ~0}, + /* [368] = 4328 */ {0, ~0}, + /* [369] = 4329 */ {0, ~0}, + /* [370] = 4330 */ {44, ~0}, + /* [371] = 4331 */ {24, ~0}, + /* [372] = 4332 */ {0, ~0}, + /* [373] = 4333 */ {0, ~0}, + /* [374] = 4334 */ {0, ~0}, + /* [375] = 4335 */ {0, ~0}, + /* [376] = 4128 */ {16, ~0}, + /* [377] = 4129 */ {16, ~0}, + /* [378] = 4130 */ {28, ~0}, + /* [379] = 4131 */ {8, ~0}, + /* [380] = 4132 */ {12, ~0}, + /* [381] = 4133 */ {16, ~0}, + /* [382] = 4134 */ {20, ~0}, + /* [383] = 4135 */ {0, ~0}, + /* [384] = 4264 */ {0, ~0}, + /* [385] = 4265 */ {12, ~0}, + /* [386] = 4266 */ {12, ~0}, + /* [387] = 4267 */ {16, ~0}, + /* [388] = 4268 */ {16, ~0}, + /* [389] = 4269 */ {12, ~0}, + /* [390] = 4270 */ {16, ~0}, + /* [391] = 4271 */ {20, ~0}, + /* [392] = 4272 */ {24, ~0}, + /* [393] = 4273 */ {16, ~0}, + /* [394] = 4274 */ {24, ~0}, + /* [395] = 4275 */ {32, ~0}, + /* [396] = 4276 */ {40, ~0}, + /* [397] = 4277 */ {12, ~0}, + /* [398] = 4278 */ {0, ~0}, + /* [399] = 4279 */ {0, ~0}, + /* [400] = 4312 */ {0, ~0}, + /* [401] = 4313 */ {0, ~0}, + /* [402] = 4314 */ {0, ~0}, + /* [403] = 4315 */ {0, ~0}, + /* [404] = 4316 */ {12, ~0}, + /* [405] = 4317 */ {8, 67}, + /* [406] = 4318 */ {20, ~0}, + /* [407] = 4319 */ {12, ~0}, +}; + +static const gl_proto_size_func Render_size_func_table[68] = { + __glXCallListsReqSize, + __glXBitmapReqSize, + __glXFogfvReqSize, + __glXFogivReqSize, + __glXLightfvReqSize, + __glXLightivReqSize, + __glXLightModelfvReqSize, + __glXLightModelivReqSize, + __glXMaterialfvReqSize, + __glXMaterialivReqSize, + __glXPolygonStippleReqSize, + __glXTexParameterfvReqSize, + __glXTexParameterivReqSize, + __glXTexImage1DReqSize, + __glXTexImage2DReqSize, + __glXTexEnvfvReqSize, + __glXTexEnvivReqSize, + __glXTexGendvReqSize, + __glXTexGenfvReqSize, + __glXTexGenivReqSize, + __glXMap1dReqSize, + __glXMap1fReqSize, + __glXMap2dReqSize, + __glXMap2fReqSize, + __glXPixelMapfvReqSize, + __glXPixelMapuivReqSize, + __glXPixelMapusvReqSize, + __glXDrawPixelsReqSize, + __glXDrawArraysReqSize, + __glXColorSubTableReqSize, + __glXCompressedTexImage1DReqSize, + __glXCompressedTexImage2DReqSize, + __glXCompressedTexImage3DReqSize, + __glXCompressedTexSubImage1DReqSize, + __glXCompressedTexSubImage2DReqSize, + __glXCompressedTexSubImage3DReqSize, + __glXDrawBuffersReqSize, + __glXColorTableReqSize, + __glXColorTableParameterfvReqSize, + __glXColorTableParameterivReqSize, + __glXPointParameterfvReqSize, + __glXTexSubImage1DReqSize, + __glXTexSubImage2DReqSize, + __glXConvolutionFilter1DReqSize, + __glXConvolutionFilter2DReqSize, + __glXConvolutionParameterfvReqSize, + __glXConvolutionParameterivReqSize, + __glXSeparableFilter2DReqSize, + __glXTexImage3DReqSize, + __glXTexSubImage3DReqSize, + __glXPrioritizeTexturesReqSize, + __glXVertexAttribs1svNVReqSize, + __glXVertexAttribs2svNVReqSize, + __glXVertexAttribs3svNVReqSize, + __glXVertexAttribs4svNVReqSize, + __glXVertexAttribs1fvNVReqSize, + __glXVertexAttribs2fvNVReqSize, + __glXVertexAttribs3fvNVReqSize, + __glXVertexAttribs4fvNVReqSize, + __glXVertexAttribs1dvNVReqSize, + __glXVertexAttribs2dvNVReqSize, + __glXVertexAttribs3dvNVReqSize, + __glXVertexAttribs4dvNVReqSize, + __glXVertexAttribs4ubvNVReqSize, + __glXProgramStringARBReqSize, + __glXPointParameterivReqSize, + __glXDeleteFramebuffersReqSize, + __glXDeleteRenderbuffersReqSize, +}; + +const struct __glXDispatchInfo Render_dispatch_info = { + 13, + Render_dispatch_tree, + Render_function_table, + Render_size_table, + Render_size_func_table +}; + +/*****************************************************************/ +/* tree depth = 12 */ +static const int_fast16_t VendorPriv_dispatch_tree[152] = { + /* [0] -> opcode range [0, 131072], node depth 1 */ + 2, + 5, + EMPTY_LEAF, + 119, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 32768], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 16384], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 8192], node depth 4 */ + 2, + 16, + EMPTY_LEAF, + 78, + EMPTY_LEAF, + + /* [16] -> opcode range [0, 2048], node depth 5 */ + 2, + 21, + EMPTY_LEAF, + 36, + EMPTY_LEAF, + + /* [21] -> opcode range [0, 512], node depth 6 */ + 1, + 24, + EMPTY_LEAF, + + /* [24] -> opcode range [0, 256], node depth 7 */ + 1, + 27, + EMPTY_LEAF, + + /* [27] -> opcode range [0, 128], node depth 8 */ + 1, + 30, + EMPTY_LEAF, + + /* [30] -> opcode range [0, 64], node depth 9 */ + 1, + 33, + EMPTY_LEAF, + + /* [33] -> opcode range [0, 32], node depth 10 */ + 1, + LEAF(0), + EMPTY_LEAF, + + /* [36] -> opcode range [1024, 1536], node depth 6 */ + 2, + 41, + EMPTY_LEAF, + 53, + 67, + + /* [41] -> opcode range [1024, 1152], node depth 7 */ + 1, + 44, + EMPTY_LEAF, + + /* [44] -> opcode range [1024, 1088], node depth 8 */ + 1, + 47, + EMPTY_LEAF, + + /* [47] -> opcode range [1024, 1056], node depth 9 */ + 1, + 50, + EMPTY_LEAF, + + /* [50] -> opcode range [1024, 1040], node depth 10 */ + 1, + LEAF(16), + EMPTY_LEAF, + + /* [53] -> opcode range [1280, 1408], node depth 7 */ + 1, + 56, + EMPTY_LEAF, + + /* [56] -> opcode range [1280, 1344], node depth 8 */ + 2, + 61, + LEAF(24), + EMPTY_LEAF, + 64, + + /* [61] -> opcode range [1280, 1296], node depth 9 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [64] -> opcode range [1328, 1344], node depth 9 */ + 1, + LEAF(48), + EMPTY_LEAF, + + /* [67] -> opcode range [1408, 1536], node depth 7 */ + 1, + 70, + EMPTY_LEAF, + + /* [70] -> opcode range [1408, 1472], node depth 8 */ + 1, + 73, + EMPTY_LEAF, + + /* [73] -> opcode range [1408, 1440], node depth 9 */ + 2, + EMPTY_LEAF, + LEAF(56), + LEAF(64), + EMPTY_LEAF, + + /* [78] -> opcode range [4096, 6144], node depth 5 */ + 2, + 83, + EMPTY_LEAF, + 101, + EMPTY_LEAF, + + /* [83] -> opcode range [4096, 4608], node depth 6 */ + 1, + 86, + EMPTY_LEAF, + + /* [86] -> opcode range [4096, 4352], node depth 7 */ + 1, + 89, + EMPTY_LEAF, + + /* [89] -> opcode range [4096, 4224], node depth 8 */ + 1, + 92, + EMPTY_LEAF, + + /* [92] -> opcode range [4096, 4160], node depth 9 */ + 1, + 95, + EMPTY_LEAF, + + /* [95] -> opcode range [4096, 4128], node depth 10 */ + 1, + 98, + EMPTY_LEAF, + + /* [98] -> opcode range [4096, 4112], node depth 11 */ + 1, + LEAF(72), + EMPTY_LEAF, + + /* [101] -> opcode range [5120, 5632], node depth 6 */ + 1, + 104, + EMPTY_LEAF, + + /* [104] -> opcode range [5120, 5376], node depth 7 */ + 1, + 107, + EMPTY_LEAF, + + /* [107] -> opcode range [5120, 5248], node depth 8 */ + 1, + 110, + EMPTY_LEAF, + + /* [110] -> opcode range [5120, 5184], node depth 9 */ + 1, + EMPTY_LEAF, + 113, + + /* [113] -> opcode range [5152, 5184], node depth 10 */ + 1, + 116, + EMPTY_LEAF, + + /* [116] -> opcode range [5152, 5168], node depth 11 */ + 1, + LEAF(80), + EMPTY_LEAF, + + /* [119] -> opcode range [65536, 98304], node depth 2 */ + 1, + 122, + EMPTY_LEAF, + + /* [122] -> opcode range [65536, 81920], node depth 3 */ + 1, + 125, + EMPTY_LEAF, + + /* [125] -> opcode range [65536, 73728], node depth 4 */ + 1, + 128, + EMPTY_LEAF, + + /* [128] -> opcode range [65536, 69632], node depth 5 */ + 1, + 131, + EMPTY_LEAF, + + /* [131] -> opcode range [65536, 67584], node depth 6 */ + 1, + 134, + EMPTY_LEAF, + + /* [134] -> opcode range [65536, 66560], node depth 7 */ + 1, + 137, + EMPTY_LEAF, + + /* [137] -> opcode range [65536, 66048], node depth 8 */ + 1, + 140, + EMPTY_LEAF, + + /* [140] -> opcode range [65536, 65792], node depth 9 */ + 1, + 143, + EMPTY_LEAF, + + /* [143] -> opcode range [65536, 65664], node depth 10 */ + 1, + 146, + EMPTY_LEAF, + + /* [146] -> opcode range [65536, 65600], node depth 11 */ + 1, + 149, + EMPTY_LEAF, + + /* [149] -> opcode range [65536, 65568], node depth 12 */ + 1, + LEAF(88), + EMPTY_LEAF, + +}; + +static const void *VendorPriv_function_table[104][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, + __glXDispSwap_GetConvolutionFilterEXT}, + /* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, + __glXDispSwap_GetConvolutionParameterfvEXT}, + /* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, + __glXDispSwap_GetConvolutionParameterivEXT}, + /* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, + __glXDispSwap_GetSeparableFilterEXT}, + /* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, + __glXDispSwap_GetHistogramEXT}, + /* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, + __glXDispSwap_GetHistogramParameterfvEXT}, + /* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, + __glXDispSwap_GetHistogramParameterivEXT}, + /* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT}, + /* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, + __glXDispSwap_GetMinmaxParameterfvEXT}, + /* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, + __glXDispSwap_GetMinmaxParameterivEXT}, + /* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, + __glXDispSwap_AreTexturesResidentEXT}, + /* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, + __glXDispSwap_DeleteTexturesEXT}, + /* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, + __glXDispSwap_GenTexturesEXT}, + /* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, + /* [ 15] = 15 */ {NULL, NULL}, + /* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, + __glXDispSwap_QueryContextInfoEXT}, + /* [ 17] = 1025 */ {NULL, NULL}, + /* [ 18] = 1026 */ {NULL, NULL}, + /* [ 19] = 1027 */ {NULL, NULL}, + /* [ 20] = 1028 */ {NULL, NULL}, + /* [ 21] = 1029 */ {NULL, NULL}, + /* [ 22] = 1030 */ {NULL, NULL}, + /* [ 23] = 1031 */ {NULL, NULL}, + /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, + __glXDispSwap_GetProgramEnvParameterfvARB}, + /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, + __glXDispSwap_GetProgramEnvParameterdvARB}, + /* [ 26] = 1298 */ {NULL, NULL}, + /* [ 27] = 1299 */ {NULL, NULL}, + /* [ 28] = 1300 */ {NULL, NULL}, + /* [ 29] = 1301 */ {NULL, NULL}, + /* [ 30] = 1302 */ {NULL, NULL}, + /* [ 31] = 1303 */ {NULL, NULL}, + /* [ 32] = 1304 */ {__glXDisp_IsProgramARB, __glXDispSwap_IsProgramARB}, + /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, + __glXDispSwap_GetProgramLocalParameterfvARB}, + /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, + __glXDispSwap_GetProgramLocalParameterdvARB}, + /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, + __glXDispSwap_GetProgramivARB}, + /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, + __glXDispSwap_GetProgramStringARB}, + /* [ 37] = 1309 */ {NULL, NULL}, + /* [ 38] = 1310 */ {NULL, NULL}, + /* [ 39] = 1311 */ {NULL, NULL}, + /* [ 40] = 1288 */ {NULL, NULL}, + /* [ 41] = 1289 */ {NULL, NULL}, + /* [ 42] = 1290 */ {NULL, NULL}, + /* [ 43] = 1291 */ {NULL, NULL}, + /* [ 44] = 1292 */ {NULL, NULL}, + /* [ 45] = 1293 */ {NULL, NULL}, + /* [ 46] = 1294 */ {__glXDisp_DeleteProgramsARB, + __glXDispSwap_DeleteProgramsARB}, + /* [ 47] = 1295 */ {__glXDisp_GenProgramsARB, + __glXDispSwap_GenProgramsARB}, + /* [ 48] = 1328 */ {NULL, NULL}, + /* [ 49] = 1329 */ {NULL, NULL}, + /* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, + __glXDispSwap_BindTexImageEXT}, + /* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, + __glXDispSwap_ReleaseTexImageEXT}, + /* [ 52] = 1332 */ {NULL, NULL}, + /* [ 53] = 1333 */ {NULL, NULL}, + /* [ 54] = 1334 */ {NULL, NULL}, + /* [ 55] = 1335 */ {NULL, NULL}, + /* [ 56] = 1416 */ {NULL, NULL}, + /* [ 57] = 1417 */ {NULL, NULL}, + /* [ 58] = 1418 */ {NULL, NULL}, + /* [ 59] = 1419 */ {NULL, NULL}, + /* [ 60] = 1420 */ {NULL, NULL}, + /* [ 61] = 1421 */ {NULL, NULL}, + /* [ 62] = 1422 */ {__glXDisp_IsRenderbuffer, + __glXDispSwap_IsRenderbuffer}, + /* [ 63] = 1423 */ {__glXDisp_GenRenderbuffers, + __glXDispSwap_GenRenderbuffers}, + /* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameteriv, + __glXDispSwap_GetRenderbufferParameteriv}, + /* [ 65] = 1425 */ {__glXDisp_IsFramebuffer, __glXDispSwap_IsFramebuffer}, + /* [ 66] = 1426 */ {__glXDisp_GenFramebuffers, + __glXDispSwap_GenFramebuffers}, + /* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatus, + __glXDispSwap_CheckFramebufferStatus}, + /* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameteriv, + __glXDispSwap_GetFramebufferAttachmentParameteriv}, + /* [ 69] = 1429 */ {NULL, NULL}, + /* [ 70] = 1430 */ {NULL, NULL}, + /* [ 71] = 1431 */ {NULL, NULL}, + /* [ 72] = 4096 */ {NULL, NULL}, + /* [ 73] = 4097 */ {NULL, NULL}, + /* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, + __glXDispSwap_GetColorTableSGI}, + /* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, + __glXDispSwap_GetColorTableParameterfvSGI}, + /* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, + __glXDispSwap_GetColorTableParameterivSGI}, + /* [ 77] = 4101 */ {NULL, NULL}, + /* [ 78] = 4102 */ {NULL, NULL}, + /* [ 79] = 4103 */ {NULL, NULL}, + /* [ 80] = 5152 */ {NULL, NULL}, + /* [ 81] = 5153 */ {NULL, NULL}, + /* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, + __glXDispSwap_CopySubBufferMESA}, + /* [ 83] = 5155 */ {NULL, NULL}, + /* [ 84] = 5156 */ {NULL, NULL}, + /* [ 85] = 5157 */ {NULL, NULL}, + /* [ 86] = 5158 */ {NULL, NULL}, + /* [ 87] = 5159 */ {NULL, NULL}, + /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, + __glXDispSwap_SwapIntervalSGI}, + /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, + __glXDispSwap_MakeCurrentReadSGI}, + /* [ 90] = 65538 */ {NULL, NULL}, + /* [ 91] = 65539 */ {NULL, NULL}, + /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, + __glXDispSwap_GetFBConfigsSGIX}, + /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, + __glXDispSwap_CreateContextWithConfigSGIX}, + /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, + __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, + /* [ 95] = 65543 */ {__glXDisp_CreateGLXPbufferSGIX, + __glXDispSwap_CreateGLXPbufferSGIX}, + /* [ 96] = 65544 */ {__glXDisp_DestroyGLXPbufferSGIX, + __glXDispSwap_DestroyGLXPbufferSGIX}, + /* [ 97] = 65545 */ {__glXDisp_ChangeDrawableAttributesSGIX, + __glXDispSwap_ChangeDrawableAttributesSGIX}, + /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, + __glXDispSwap_GetDrawableAttributesSGIX}, + /* [ 99] = 65547 */ {NULL, NULL}, + /* [ 100] = 65548 */ {NULL, NULL}, + /* [ 101] = 65549 */ {NULL, NULL}, + /* [ 102] = 65550 */ {NULL, NULL}, + /* [ 103] = 65551 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo VendorPriv_dispatch_info = { + 17, + VendorPriv_dispatch_tree, + VendorPriv_function_table, + NULL, + NULL +}; diff --git a/glx/indirect_table.h b/glx/indirect_table.h new file mode 100644 index 0000000..a39dc4e --- /dev/null +++ b/glx/indirect_table.h @@ -0,0 +1,106 @@ +/* + * (C) Copyright IBM Corporation 2005, 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** + * \file indirect_table.h + * + * \author Ian Romanick + */ + +#ifndef INDIRECT_TABLE_H +#define INDIRECT_TABLE_H + +#include + +/** + */ +struct __glXDispatchInfo { + /** + * Number of significant bits in the protocol opcode. Opcodes with values + * larger than ((1 << bits) - 1) are invalid. + */ + unsigned bits; + + /** + */ + const int_fast16_t *dispatch_tree; + + /** + * Array of protocol decode and dispatch functions index by the opcode + * search tree (i.e., \c dispatch_tree). The first element in each pair + * is the non-byte-swapped version, and the second element is the + * byte-swapped version. + */ + const void *(*dispatch_functions)[2]; + + /** + * Pointer to size validation data. This table is indexed with the same + * value as ::dispatch_functions. + * + * The first element in the pair is the size, in bytes, of the fixed-size + * portion of the protocol. + * + * For opcodes that have a variable-size portion, the second value is an + * index in \c size_func_table to calculate that size. If there is no + * variable-size portion, this index will be ~0. + * + * \note + * If size checking is not to be performed on this type of protocol + * data, this pointer will be \c NULL. + */ + const int_fast16_t(*size_table)[2]; + + /** + * Array of functions used to calculate the variable-size portion of + * protocol messages. Indexed by the second element of the entries + * in \c ::size_table. + * + * \note + * If size checking is not to be performed on this type of protocol + * data, this pointer will be \c NULL. + */ + const gl_proto_size_func *size_func_table; +}; + +/** + * Sentinel value for an empty leaf in the \c dispatch_tree. + */ +#define EMPTY_LEAF INT_FAST16_MIN + +/** + * Declare the index \c x as a leaf index. + */ +#define LEAF(x) -x + +/** + * Determine if an index is a leaf index. + */ +#define IS_LEAF_INDEX(x) ((x) <= 0) + +extern const struct __glXDispatchInfo Single_dispatch_info; +extern const struct __glXDispatchInfo Render_dispatch_info; +extern const struct __glXDispatchInfo VendorPriv_dispatch_info; + +#endif /* INDIRECT_TABLE_H */ diff --git a/glx/indirect_texture_compression.c b/glx/indirect_texture_compression.c new file mode 100644 index 0000000..94de47d --- /dev/null +++ b/glx/indirect_texture_compression.c @@ -0,0 +1,119 @@ +/* + * (C) Copyright IBM Corporation 2005, 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxbyteorder.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" + +int +__glXDisp_GetCompressedTexImage(struct __GLXclientStateRec *cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); + ClientPtr client = cl->client; + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = *(GLenum *) (pc + 0); + const GLint level = *(GLint *) (pc + 4); + GLint compsize = 0; + char *answer = NULL, answerBuffer[200]; + + glGetTexLevelParameteriv(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, + &compsize); + + if (compsize != 0) { + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetCompressedTexImageARB(target, level, answer); + } + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *) &__glXReply)->width = compsize; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + error = Success; + } + + return error; +} + +int +__glXDispSwap_GetCompressedTexImage(struct __GLXclientStateRec *cl, GLbyte * pc) +{ + xGLXSingleReq *const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext *const cx = + __glXForceCurrent(cl, bswap_32(req->contextTag), &error); + ClientPtr client = cl->client; + + pc += __GLX_SINGLE_HDR_SIZE; + if (cx != NULL) { + const GLenum target = (GLenum) bswap_32(*(int *) (pc + 0)); + const GLint level = (GLint) bswap_32(*(int *) (pc + 4)); + GLint compsize = 0; + char *answer = NULL, answerBuffer[200]; + + glGetTexLevelParameteriv(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, + &compsize); + + if (compsize != 0) { + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetCompressedTexImageARB(target, level, answer); + } + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *) &__glXReply)->width = compsize; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + error = Success; + } + + return error; +} diff --git a/glx/indirect_util.c b/glx/indirect_util.c new file mode 100644 index 0000000..f9d1243 --- /dev/null +++ b/glx/indirect_util.c @@ -0,0 +1,288 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include + +#include +#include +#include +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "glxbyteorder.h" +#include "singlesize.h" +#include "glxext.h" +#include "indirect_table.h" +#include "indirect_util.h" + +#define __GLX_PAD(a) (((a)+3)&~3) + +extern xGLXSingleReply __glXReply; + +GLint +__glGetBooleanv_variable_size(GLenum e) +{ + if (e == GL_COMPRESSED_TEXTURE_FORMATS) { + GLint temp; + + glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &temp); + return temp; + } + else { + return 0; + } +} + +/** + * Get a properly aligned buffer to hold reply data. + * + * \warning + * This function assumes that \c local_buffer is already properly aligned. + * It also assumes that \c alignment is a power of two. + */ +void * +__glXGetAnswerBuffer(__GLXclientState * cl, size_t required_size, + void *local_buffer, size_t local_size, unsigned alignment) +{ + void *buffer = local_buffer; + const unsigned mask = alignment - 1; + + if (local_size < required_size) { + const size_t worst_case_size = required_size + alignment; + intptr_t temp_buf; + + if (cl->returnBufSize < worst_case_size) { + void *temp = realloc(cl->returnBuf, worst_case_size); + + if (temp == NULL) { + return NULL; + } + + cl->returnBuf = temp; + cl->returnBufSize = worst_case_size; + } + + temp_buf = (intptr_t) cl->returnBuf; + temp_buf = (temp_buf + mask) & ~mask; + buffer = (void *) temp_buf; + } + + return buffer; +} + +/** + * Send a GLX reply to the client. + * + * Technically speaking, there are several different ways to encode a GLX + * reply. The primary difference is whether or not certain fields (e.g., + * retval, size, and "pad3") are set. This function gets around that by + * always setting all of the fields to "reasonable" values. This does no + * harm to clients, but it does make the server-side code much more compact. + */ +void +__glXSendReply(ClientPtr client, const void *data, size_t elements, + size_t element_size, GLboolean always_array, CARD32 retval) +{ + size_t reply_ints = 0; + + if (__glXErrorOccured()) { + elements = 0; + } + else if ((elements > 1) || always_array) { + reply_ints = bytes_to_int32(elements * element_size); + } + + __glXReply.length = reply_ints; + __glXReply.type = X_Reply; + __glXReply.sequenceNumber = client->sequence; + __glXReply.size = elements; + __glXReply.retval = retval; + + /* It is faster on almost always every architecture to just copy the 8 + * bytes, even when not necessary, than check to see of the value of + * elements requires it. Copying the data when not needed will do no + * harm. + */ + + (void) memcpy(&__glXReply.pad3, data, 8); + WriteToClient(client, sz_xGLXSingleReply, &__glXReply); + + if (reply_ints != 0) { + WriteToClient(client, reply_ints * 4, data); + } +} + +/** + * Send a GLX reply to the client. + * + * Technically speaking, there are several different ways to encode a GLX + * reply. The primary difference is whether or not certain fields (e.g., + * retval, size, and "pad3") are set. This function gets around that by + * always setting all of the fields to "reasonable" values. This does no + * harm to clients, but it does make the server-side code much more compact. + * + * \warning + * This function assumes that values stored in \c data will be byte-swapped + * by the caller if necessary. + */ +void +__glXSendReplySwap(ClientPtr client, const void *data, size_t elements, + size_t element_size, GLboolean always_array, CARD32 retval) +{ + size_t reply_ints = 0; + + if (__glXErrorOccured()) { + elements = 0; + } + else if ((elements > 1) || always_array) { + reply_ints = bytes_to_int32(elements * element_size); + } + + __glXReply.length = bswap_32(reply_ints); + __glXReply.type = X_Reply; + __glXReply.sequenceNumber = bswap_16(client->sequence); + __glXReply.size = bswap_32(elements); + __glXReply.retval = bswap_32(retval); + + /* It is faster on almost always every architecture to just copy the 8 + * bytes, even when not necessary, than check to see of the value of + * elements requires it. Copying the data when not needed will do no + * harm. + */ + + (void) memcpy(&__glXReply.pad3, data, 8); + WriteToClient(client, sz_xGLXSingleReply, &__glXReply); + + if (reply_ints != 0) { + WriteToClient(client, reply_ints * 4, data); + } +} + +static int +get_decode_index(const struct __glXDispatchInfo *dispatch_info, unsigned opcode) +{ + int remaining_bits; + int next_remain; + const int_fast16_t *const tree = dispatch_info->dispatch_tree; + int_fast16_t index; + + remaining_bits = dispatch_info->bits; + if (opcode >= (1U << remaining_bits)) { + return -1; + } + + index = 0; + for ( /* empty */ ; remaining_bits > 0; remaining_bits = next_remain) { + unsigned mask; + unsigned child_index; + + /* Calculate the slice of bits used by this node. + * + * If remaining_bits = 8 and tree[index] = 3, the mask of just the + * remaining bits is 0x00ff and the mask for the remaining bits after + * this node is 0x001f. By taking 0x00ff & ~0x001f, we get 0x00e0. + * This masks the 3 bits that we would want for this node. + */ + + next_remain = remaining_bits - tree[index]; + mask = ((1 << remaining_bits) - 1) & ~((1 << next_remain) - 1); + + /* Using the mask, calculate the index of the opcode in the node. + * With that index, fetch the index of the next node. + */ + + child_index = (opcode & mask) >> next_remain; + index = tree[index + 1 + child_index]; + + /* If the next node is an empty leaf, the opcode is for a non-existant + * function. We're done. + * + * If the next node is a non-empty leaf, look up the function pointer + * and return it. + */ + + if (index == EMPTY_LEAF) { + return -1; + } + else if (IS_LEAF_INDEX(index)) { + unsigned func_index; + + /* The value stored in the tree for a leaf node is the base of + * the function pointers for that leaf node. The offset for the + * function for a particular opcode is the remaining bits in the + * opcode. + */ + + func_index = -index; + func_index += opcode & ((1 << next_remain) - 1); + return func_index; + } + } + + /* We should *never* get here!!! + */ + return -1; +} + +void * +__glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info, + int opcode, int swapped_version) +{ + const int func_index = get_decode_index(dispatch_info, opcode); + + return (func_index < 0) + ? NULL + : (void *) dispatch_info-> + dispatch_functions[func_index][swapped_version]; +} + +int +__glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info, + int opcode, __GLXrenderSizeData * data) +{ + if (dispatch_info->size_table != NULL) { + const int func_index = get_decode_index(dispatch_info, opcode); + + if ((func_index >= 0) + && (dispatch_info->size_table[func_index][0] != 0)) { + const int var_offset = dispatch_info->size_table[func_index][1]; + + data->bytes = dispatch_info->size_table[func_index][0]; + data->varsize = (var_offset != ~0) + ? dispatch_info->size_func_table[var_offset] + : NULL; + + return 0; + } + } + + return -1; +} diff --git a/glx/indirect_util.h b/glx/indirect_util.h new file mode 100644 index 0000000..0e65075 --- /dev/null +++ b/glx/indirect_util.h @@ -0,0 +1,53 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef __GLX_INDIRECT_UTIL_H__ +#define __GLX_INDIRECT_UTIL_H__ + +extern GLint __glGetBooleanv_variable_size(GLenum e); + +extern void *__glXGetAnswerBuffer(__GLXclientState * cl, + size_t required_size, void *local_buffer, + size_t local_size, unsigned alignment); + +extern void __glXSendReply(ClientPtr client, const void *data, + size_t elements, size_t element_size, + GLboolean always_array, CARD32 retval); + +extern void __glXSendReplySwap(ClientPtr client, const void *data, + size_t elements, size_t element_size, + GLboolean always_array, CARD32 retval); + +struct __glXDispatchInfo; + +extern void *__glXGetProtocolDecodeFunction(const struct __glXDispatchInfo + *dispatch_info, int opcode, + int swapped_version); + +extern int __glXGetProtocolSizeData(const struct __glXDispatchInfo + *dispatch_info, int opcode, + __GLXrenderSizeData * data); + +#endif /* __GLX_INDIRECT_UTIL_H__ */ diff --git a/glx/render2.c b/glx/render2.c new file mode 100644 index 0000000..8d9b5f4 --- /dev/null +++ b/glx/render2.c @@ -0,0 +1,267 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "unpack.h" +#include "indirect_size.h" +#include "indirect_dispatch.h" + +void +__glXDisp_Map1f(GLbyte * pc) +{ + GLint order, k; + GLfloat u1, u2, *points; + GLenum target; + + target = *(GLenum *) (pc + 0); + order = *(GLint *) (pc + 12); + u1 = *(GLfloat *) (pc + 4); + u2 = *(GLfloat *) (pc + 8); + points = (GLfloat *) (pc + 16); + k = __glMap1f_size(target); + + glMap1f(target, u1, u2, k, order, points); +} + +void +__glXDisp_Map2f(GLbyte * pc) +{ + GLint uorder, vorder, ustride, vstride, k; + GLfloat u1, u2, v1, v2, *points; + GLenum target; + + target = *(GLenum *) (pc + 0); + uorder = *(GLint *) (pc + 12); + vorder = *(GLint *) (pc + 24); + u1 = *(GLfloat *) (pc + 4); + u2 = *(GLfloat *) (pc + 8); + v1 = *(GLfloat *) (pc + 16); + v2 = *(GLfloat *) (pc + 20); + points = (GLfloat *) (pc + 28); + + k = __glMap2f_size(target); + ustride = vorder * k; + vstride = k; + + glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); +} + +void +__glXDisp_Map1d(GLbyte * pc) +{ + GLint order, k; + +#ifdef __GLX_ALIGN64 + GLint compsize; +#endif + GLenum target; + GLdouble u1, u2, *points; + + target = *(GLenum *) (pc + 16); + order = *(GLint *) (pc + 20); + k = __glMap1d_size(target); + +#ifdef __GLX_ALIGN64 + if (order < 0 || k < 0) { + compsize = 0; + } + else { + compsize = order * k; + } +#endif + + __GLX_GET_DOUBLE(u1, pc); + __GLX_GET_DOUBLE(u2, pc + 8); + pc += 24; + +#ifdef __GLX_ALIGN64 + if (((unsigned long) pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc - 4, pc, compsize * 8); + points = (GLdouble *) (pc - 4); + } + else { + points = (GLdouble *) pc; + } +#else + points = (GLdouble *) pc; +#endif + glMap1d(target, u1, u2, k, order, points); +} + +void +__glXDisp_Map2d(GLbyte * pc) +{ + GLdouble u1, u2, v1, v2, *points; + GLint uorder, vorder, ustride, vstride, k; + +#ifdef __GLX_ALIGN64 + GLint compsize; +#endif + GLenum target; + + target = *(GLenum *) (pc + 32); + uorder = *(GLint *) (pc + 36); + vorder = *(GLint *) (pc + 40); + k = __glMap2d_size(target); + +#ifdef __GLX_ALIGN64 + if (vorder < 0 || uorder < 0 || k < 0) { + compsize = 0; + } + else { + compsize = uorder * vorder * k; + } +#endif + + __GLX_GET_DOUBLE(u1, pc); + __GLX_GET_DOUBLE(u2, pc + 8); + __GLX_GET_DOUBLE(v1, pc + 16); + __GLX_GET_DOUBLE(v2, pc + 24); + pc += 44; + + ustride = vorder * k; + vstride = k; + +#ifdef __GLX_ALIGN64 + if (((unsigned long) pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc - 4, pc, compsize * 8); + points = (GLdouble *) (pc - 4); + } + else { + points = (GLdouble *) pc; + } +#else + points = (GLdouble *) pc; +#endif + glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); +} + +void +__glXDisp_DrawArrays(GLbyte * pc) +{ + __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; + __GLXdispatchDrawArraysComponentHeader *compHeader; + GLint numVertexes = hdr->numVertexes; + GLint numComponents = hdr->numComponents; + GLenum primType = hdr->primType; + GLint stride = 0; + int i; + + pc += sizeof(__GLXdispatchDrawArraysHeader); + compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; + + /* compute stride (same for all component arrays) */ + for (i = 0; i < numComponents; i++) { + GLenum datatype = compHeader[i].datatype; + GLint numVals = compHeader[i].numVals; + + stride += __GLX_PAD(numVals * __glXTypeSize(datatype)); + } + + pc += numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader); + + /* set up component arrays */ + for (i = 0; i < numComponents; i++) { + GLenum datatype = compHeader[i].datatype; + GLint numVals = compHeader[i].numVals; + GLenum component = compHeader[i].component; + + switch (component) { + case GL_VERTEX_ARRAY: + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(numVals, datatype, stride, pc); + break; + case GL_NORMAL_ARRAY: + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(datatype, stride, pc); + break; + case GL_COLOR_ARRAY: + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(numVals, datatype, stride, pc); + break; + case GL_INDEX_ARRAY: + glEnableClientState(GL_INDEX_ARRAY); + glIndexPointer(datatype, stride, pc); + break; + case GL_TEXTURE_COORD_ARRAY: + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(numVals, datatype, stride, pc); + break; + case GL_EDGE_FLAG_ARRAY: + glEnableClientState(GL_EDGE_FLAG_ARRAY); + glEdgeFlagPointer(stride, (const GLboolean *) pc); + break; + case GL_SECONDARY_COLOR_ARRAY: + { + PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointerEXT = + __glGetProcAddress("glSecondaryColorPointerEXT"); + glEnableClientState(GL_SECONDARY_COLOR_ARRAY); + SecondaryColorPointerEXT(numVals, datatype, stride, pc); + break; + } + case GL_FOG_COORD_ARRAY: + { + PFNGLFOGCOORDPOINTERPROC FogCoordPointerEXT = + __glGetProcAddress("glFogCoordPointerEXT"); + glEnableClientState(GL_FOG_COORD_ARRAY); + FogCoordPointerEXT(datatype, stride, pc); + break; + } + default: + break; + } + + pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); + } + + glDrawArrays(primType, 0, numVertexes); + + /* turn off anything we might have turned on */ + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + glDisableClientState(GL_INDEX_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glDisableClientState(GL_EDGE_FLAG_ARRAY); + glDisableClientState(GL_SECONDARY_COLOR_ARRAY); + glDisableClientState(GL_FOG_COORD_ARRAY); +} diff --git a/glx/render2swap.c b/glx/render2swap.c new file mode 100644 index 0000000..6ed364f --- /dev/null +++ b/glx/render2swap.c @@ -0,0 +1,389 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "unpack.h" +#include "indirect_size.h" +#include "indirect_dispatch.h" + +void +__glXDispSwap_Map1f(GLbyte * pc) +{ + GLint order, k; + GLfloat u1, u2, *points; + GLenum target; + GLint compsize; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_FLOAT(pc + 4); + __GLX_SWAP_FLOAT(pc + 8); + + target = *(GLenum *) (pc + 0); + order = *(GLint *) (pc + 12); + u1 = *(GLfloat *) (pc + 4); + u2 = *(GLfloat *) (pc + 8); + points = (GLfloat *) (pc + 16); + k = __glMap1f_size(target); + + if (order <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } + else { + compsize = order * k; + } + __GLX_SWAP_FLOAT_ARRAY(points, compsize); + + glMap1f(target, u1, u2, k, order, points); +} + +void +__glXDispSwap_Map2f(GLbyte * pc) +{ + GLint uorder, vorder, ustride, vstride, k; + GLfloat u1, u2, v1, v2, *points; + GLenum target; + GLint compsize; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 24); + __GLX_SWAP_FLOAT(pc + 4); + __GLX_SWAP_FLOAT(pc + 8); + __GLX_SWAP_FLOAT(pc + 16); + __GLX_SWAP_FLOAT(pc + 20); + + target = *(GLenum *) (pc + 0); + uorder = *(GLint *) (pc + 12); + vorder = *(GLint *) (pc + 24); + u1 = *(GLfloat *) (pc + 4); + u2 = *(GLfloat *) (pc + 8); + v1 = *(GLfloat *) (pc + 16); + v2 = *(GLfloat *) (pc + 20); + points = (GLfloat *) (pc + 28); + + k = __glMap2f_size(target); + ustride = vorder * k; + vstride = k; + + if (vorder <= 0 || uorder <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } + else { + compsize = uorder * vorder * k; + } + __GLX_SWAP_FLOAT_ARRAY(points, compsize); + + glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); +} + +void +__glXDispSwap_Map1d(GLbyte * pc) +{ + GLint order, k, compsize; + GLenum target; + GLdouble u1, u2, *points; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_DOUBLE(pc + 0); + __GLX_SWAP_DOUBLE(pc + 8); + __GLX_SWAP_INT(pc + 16); + __GLX_SWAP_INT(pc + 20); + + target = *(GLenum *) (pc + 16); + order = *(GLint *) (pc + 20); + k = __glMap1d_size(target); + if (order <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } + else { + compsize = order * k; + } + __GLX_GET_DOUBLE(u1, pc); + __GLX_GET_DOUBLE(u2, pc + 8); + __GLX_SWAP_DOUBLE_ARRAY(pc + 24, compsize); + pc += 24; + +#ifdef __GLX_ALIGN64 + if (((unsigned long) pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc - 4, pc, compsize * 8); + points = (GLdouble *) (pc - 4); + } + else { + points = (GLdouble *) pc; + } +#else + points = (GLdouble *) pc; +#endif + glMap1d(target, u1, u2, k, order, points); +} + +void +__glXDispSwap_Map2d(GLbyte * pc) +{ + GLdouble u1, u2, v1, v2, *points; + GLint uorder, vorder, ustride, vstride, k, compsize; + GLenum target; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + + __GLX_SWAP_DOUBLE(pc + 0); + __GLX_SWAP_DOUBLE(pc + 8); + __GLX_SWAP_DOUBLE(pc + 16); + __GLX_SWAP_DOUBLE(pc + 24); + __GLX_SWAP_INT(pc + 32); + __GLX_SWAP_INT(pc + 36); + __GLX_SWAP_INT(pc + 40); + + target = *(GLenum *) (pc + 32); + uorder = *(GLint *) (pc + 36); + vorder = *(GLint *) (pc + 40); + k = __glMap2d_size(target); + if (vorder <= 0 || uorder <= 0 || k < 0) { + /* Erroneous command. */ + compsize = 0; + } + else { + compsize = uorder * vorder * k; + } + __GLX_GET_DOUBLE(u1, pc); + __GLX_GET_DOUBLE(u2, pc + 8); + __GLX_GET_DOUBLE(v1, pc + 16); + __GLX_GET_DOUBLE(v2, pc + 24); + __GLX_SWAP_DOUBLE_ARRAY(pc + 44, compsize); + pc += 44; + ustride = vorder * k; + vstride = k; + +#ifdef __GLX_ALIGN64 + if (((unsigned long) pc) & 7) { + /* + ** Copy the doubles up 4 bytes, trashing the command but aligning + ** the data in the process + */ + __GLX_MEM_COPY(pc - 4, pc, compsize * 8); + points = (GLdouble *) (pc - 4); + } + else { + points = (GLdouble *) pc; + } +#else + points = (GLdouble *) pc; +#endif + glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); +} + +static void +swapArray(GLint numVals, GLenum datatype, + GLint stride, GLint numVertexes, GLbyte * pc) +{ + int i, j; + + __GLX_DECLARE_SWAP_VARIABLES; + + switch (datatype) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + /* don't need to swap */ + return; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + for (i = 0; i < numVertexes; i++) { + GLshort *pVal = (GLshort *) pc; + + for (j = 0; j < numVals; j++) { + __GLX_SWAP_SHORT(&pVal[j]); + } + pc += stride; + } + break; + case GL_INT: + case GL_UNSIGNED_INT: + for (i = 0; i < numVertexes; i++) { + GLint *pVal = (GLint *) pc; + + for (j = 0; j < numVals; j++) { + __GLX_SWAP_INT(&pVal[j]); + } + pc += stride; + } + break; + case GL_FLOAT: + for (i = 0; i < numVertexes; i++) { + GLfloat *pVal = (GLfloat *) pc; + + for (j = 0; j < numVals; j++) { + __GLX_SWAP_FLOAT(&pVal[j]); + } + pc += stride; + } + break; + case GL_DOUBLE: + for (i = 0; i < numVertexes; i++) { + GLdouble *pVal = (GLdouble *) pc; + + for (j = 0; j < numVals; j++) { + __GLX_SWAP_DOUBLE(&pVal[j]); + } + pc += stride; + } + break; + default: + return; + } +} + +void +__glXDispSwap_DrawArrays(GLbyte * pc) +{ + __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; + __GLXdispatchDrawArraysComponentHeader *compHeader; + GLint numVertexes = hdr->numVertexes; + GLint numComponents = hdr->numComponents; + GLenum primType = hdr->primType; + GLint stride = 0; + int i; + + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&numVertexes); + __GLX_SWAP_INT(&numComponents); + __GLX_SWAP_INT(&primType); + + pc += sizeof(__GLXdispatchDrawArraysHeader); + compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; + + /* compute stride (same for all component arrays) */ + for (i = 0; i < numComponents; i++) { + GLenum datatype = compHeader[i].datatype; + GLint numVals = compHeader[i].numVals; + GLenum component = compHeader[i].component; + + __GLX_SWAP_INT(&datatype); + __GLX_SWAP_INT(&numVals); + __GLX_SWAP_INT(&component); + + stride += __GLX_PAD(numVals * __glXTypeSize(datatype)); + } + + pc += numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader); + + /* set up component arrays */ + for (i = 0; i < numComponents; i++) { + GLenum datatype = compHeader[i].datatype; + GLint numVals = compHeader[i].numVals; + GLenum component = compHeader[i].component; + + __GLX_SWAP_INT(&datatype); + __GLX_SWAP_INT(&numVals); + __GLX_SWAP_INT(&component); + + swapArray(numVals, datatype, stride, numVertexes, pc); + + switch (component) { + case GL_VERTEX_ARRAY: + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(numVals, datatype, stride, pc); + break; + case GL_NORMAL_ARRAY: + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(datatype, stride, pc); + break; + case GL_COLOR_ARRAY: + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(numVals, datatype, stride, pc); + break; + case GL_INDEX_ARRAY: + glEnableClientState(GL_INDEX_ARRAY); + glIndexPointer(datatype, stride, pc); + break; + case GL_TEXTURE_COORD_ARRAY: + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(numVals, datatype, stride, pc); + break; + case GL_EDGE_FLAG_ARRAY: + glEnableClientState(GL_EDGE_FLAG_ARRAY); + glEdgeFlagPointer(stride, (const GLboolean *) pc); + break; + case GL_SECONDARY_COLOR_ARRAY: + { + PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointerEXT = + __glGetProcAddress("glSecondaryColorPointerEXT"); + glEnableClientState(GL_SECONDARY_COLOR_ARRAY); + SecondaryColorPointerEXT(numVals, datatype, stride, pc); + break; + } + case GL_FOG_COORD_ARRAY: + { + PFNGLFOGCOORDPOINTERPROC FogCoordPointerEXT = + __glGetProcAddress("glFogCoordPointerEXT"); + glEnableClientState(GL_FOG_COORD_ARRAY); + FogCoordPointerEXT(datatype, stride, pc); + break; + } + default: + break; + } + + pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); + } + + glDrawArrays(primType, 0, numVertexes); + + /* turn off anything we might have turned on */ + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + glDisableClientState(GL_INDEX_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glDisableClientState(GL_EDGE_FLAG_ARRAY); + glDisableClientState(GL_SECONDARY_COLOR_ARRAY); + glDisableClientState(GL_FOG_COORD_ARRAY); +} diff --git a/glx/renderpix.c b/glx/renderpix.c new file mode 100644 index 0000000..91ba911 --- /dev/null +++ b/glx/renderpix.c @@ -0,0 +1,67 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "unpack.h" +#include "indirect_dispatch.h" + +void +__glXDisp_SeparableFilter2D(GLbyte * pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + GLint hdrlen, image1len; + + hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE); + + glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + /* XXX check this usage - internal code called + ** a version without the packing parameters + */ + image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, + 0, hdr->rowLength, 0, hdr->skipRows, + hdr->alignment); + image1len = __GLX_PAD(image1len); + + glSeparableFilter2D(hdr->target, hdr->internalformat, hdr->width, + hdr->height, hdr->format, hdr->type, + ((GLubyte *) hdr + hdrlen), + ((GLubyte *) hdr + hdrlen + image1len)); +} diff --git a/glx/renderpixswap.c b/glx/renderpixswap.c new file mode 100644 index 0000000..a4cb246 --- /dev/null +++ b/glx/renderpixswap.c @@ -0,0 +1,85 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "unpack.h" +#include "indirect_dispatch.h" + +void +__glXDispSwap_SeparableFilter2D(GLbyte * pc) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + GLint hdrlen, image1len; + + __GLX_DECLARE_SWAP_VARIABLES; + + hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); + + __GLX_SWAP_INT((GLbyte *) &hdr->rowLength); + __GLX_SWAP_INT((GLbyte *) &hdr->skipRows); + __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels); + __GLX_SWAP_INT((GLbyte *) &hdr->alignment); + + __GLX_SWAP_INT((GLbyte *) &hdr->target); + __GLX_SWAP_INT((GLbyte *) &hdr->internalformat); + __GLX_SWAP_INT((GLbyte *) &hdr->width); + __GLX_SWAP_INT((GLbyte *) &hdr->height); + __GLX_SWAP_INT((GLbyte *) &hdr->format); + __GLX_SWAP_INT((GLbyte *) &hdr->type); + + /* + ** Just invert swapBytes flag; the GL will figure out if it needs to swap + ** the pixel data. + */ + glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); + glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); + glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); + glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + + /* XXX check this usage - internal code called + ** a version without the packing parameters + */ + image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, + 0, hdr->rowLength, 0, hdr->skipRows, + hdr->alignment); + image1len = __GLX_PAD(image1len); + + glSeparableFilter2D(hdr->target, hdr->internalformat, hdr->width, + hdr->height, hdr->format, hdr->type, + ((GLubyte *) hdr + hdrlen), + ((GLubyte *) hdr + hdrlen + image1len)); +} diff --git a/glx/rensize.c b/glx/rensize.c new file mode 100644 index 0000000..bcc3a53 --- /dev/null +++ b/glx/rensize.c @@ -0,0 +1,443 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include "GL/glxproto.h" +#include "unpack.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" + +#define SWAPL(a) \ + (((a & 0xff000000U)>>24) | ((a & 0xff0000U)>>8) | \ + ((a & 0xff00U)<<8) | ((a & 0xffU)<<24)) + +static int +Map1Size(GLint k, GLint order) +{ + if (order <= 0 || k < 0) + return -1; + return k * order; +} + +int +__glXMap1dReqSize(const GLbyte * pc, Bool swap) +{ + GLenum target; + GLint order, k; + + target = *(GLenum *) (pc + 16); + order = *(GLint *) (pc + 20); + if (swap) { + target = SWAPL(target); + order = SWAPL(order); + } + k = __glMap1d_size(target); + return 8 * Map1Size(k, order); +} + +int +__glXMap1fReqSize(const GLbyte * pc, Bool swap) +{ + GLenum target; + GLint order, k; + + target = *(GLenum *) (pc + 0); + order = *(GLint *) (pc + 12); + if (swap) { + target = SWAPL(target); + order = SWAPL(order); + } + k = __glMap1f_size(target); + return 4 * Map1Size(k, order); +} + +static int +Map2Size(int k, int majorOrder, int minorOrder) +{ + if (majorOrder <= 0 || minorOrder <= 0 || k < 0) + return -1; + return k * majorOrder * minorOrder; +} + +int +__glXMap2dReqSize(const GLbyte * pc, Bool swap) +{ + GLenum target; + GLint uorder, vorder, k; + + target = *(GLenum *) (pc + 32); + uorder = *(GLint *) (pc + 36); + vorder = *(GLint *) (pc + 40); + if (swap) { + target = SWAPL(target); + uorder = SWAPL(uorder); + vorder = SWAPL(vorder); + } + k = __glMap2d_size(target); + return 8 * Map2Size(k, uorder, vorder); +} + +int +__glXMap2fReqSize(const GLbyte * pc, Bool swap) +{ + GLenum target; + GLint uorder, vorder, k; + + target = *(GLenum *) (pc + 0); + uorder = *(GLint *) (pc + 12); + vorder = *(GLint *) (pc + 24); + if (swap) { + target = SWAPL(target); + uorder = SWAPL(uorder); + vorder = SWAPL(vorder); + } + k = __glMap2f_size(target); + return 4 * Map2Size(k, uorder, vorder); +} + +/** + * Calculate the size of an image. + * + * The size of an image sent to the server from the client or sent from the + * server to the client is calculated. The size is based on the dimensions + * of the image, the type of pixel data, padding in the image, and the + * alignment requirements of the image. + * + * \param format Format of the pixels. Same as the \c format parameter + * to \c glTexImage1D + * \param type Type of the pixel data. Same as the \c type parameter + * to \c glTexImage1D + * \param target Typically the texture target of the image. If the + * target is one of \c GL_PROXY_*, the size returned is + * always zero. For uses that do not have a texture target + * (e.g, glDrawPixels), zero should be specified. + * \param w Width of the image data. Must be >= 1. + * \param h Height of the image data. Must be >= 1, even for 1D + * images. + * \param d Depth of the image data. Must be >= 1, even for 1D or + * 2D images. + * \param imageHeight If non-zero, defines the true height of a volumetric + * image. This value will be used instead of \c h for + * calculating the size of the image. + * \param rowLength If non-zero, defines the true width of an image. This + * value will be used instead of \c w for calculating the + * size of the image. + * \param skipImages Number of extra layers of image data in a volumtric + * image that are to be skipped before the real data. + * \param skipRows Number of extra rows of image data in an image that are + * to be skipped before the real data. + * \param alignment Specifies the alignment for the start of each pixel row + * in memory. This value must be one of 1, 2, 4, or 8. + * + * \returns + * The size of the image is returned. If the specified \c format and \c type + * are invalid, -1 is returned. If \c target is one of \c GL_PROXY_*, zero + * is returned. + */ +int +__glXImageSize(GLenum format, GLenum type, GLenum target, + GLsizei w, GLsizei h, GLsizei d, + GLint imageHeight, GLint rowLength, + GLint skipImages, GLint skipRows, GLint alignment) +{ + GLint bytesPerElement, elementsPerGroup, groupsPerRow; + GLint groupSize, rowSize, padding, imageSize; + + if (w < 0 || h < 0 || d < 0 || + (type == GL_BITMAP && + (format != GL_COLOR_INDEX && format != GL_STENCIL_INDEX))) { + return -1; + } + if (w == 0 || h == 0 || d == 0) + return 0; + + switch (target) { + case GL_PROXY_TEXTURE_1D: + case GL_PROXY_TEXTURE_2D: + case GL_PROXY_TEXTURE_3D: + case GL_PROXY_TEXTURE_4D_SGIS: + case GL_PROXY_TEXTURE_CUBE_MAP: + case GL_PROXY_TEXTURE_RECTANGLE_ARB: + case GL_PROXY_HISTOGRAM: + case GL_PROXY_COLOR_TABLE: + case GL_PROXY_TEXTURE_COLOR_TABLE_SGI: + case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: + case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP: + return 0; + } + + if (type == GL_BITMAP) { + if (rowLength > 0) { + groupsPerRow = rowLength; + } + else { + groupsPerRow = w; + } + rowSize = bits_to_bytes(groupsPerRow); + padding = (rowSize % alignment); + if (padding) { + rowSize += alignment - padding; + } + return ((h + skipRows) * rowSize); + } + else { + switch (format) { + case GL_COLOR_INDEX: + case GL_STENCIL_INDEX: + case GL_DEPTH_COMPONENT: + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_LUMINANCE: + case GL_INTENSITY: + elementsPerGroup = 1; + break; + case GL_422_EXT: + case GL_422_REV_EXT: + case GL_422_AVERAGE_EXT: + case GL_422_REV_AVERAGE_EXT: + case GL_DEPTH_STENCIL_NV: + case GL_DEPTH_STENCIL_MESA: + case GL_YCBCR_MESA: + case GL_LUMINANCE_ALPHA: + elementsPerGroup = 2; + break; + case GL_RGB: + case GL_BGR: + elementsPerGroup = 3; + break; + case GL_RGBA: + case GL_BGRA: + case GL_ABGR_EXT: + elementsPerGroup = 4; + break; + default: + return -1; + } + switch (type) { + case GL_UNSIGNED_BYTE: + case GL_BYTE: + bytesPerElement = 1; + break; + case GL_UNSIGNED_BYTE_3_3_2: + case GL_UNSIGNED_BYTE_2_3_3_REV: + bytesPerElement = 1; + elementsPerGroup = 1; + break; + case GL_UNSIGNED_SHORT: + case GL_SHORT: + bytesPerElement = 2; + break; + case GL_UNSIGNED_SHORT_5_6_5: + case GL_UNSIGNED_SHORT_5_6_5_REV: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_4_4_4_4_REV: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_1_5_5_5_REV: + case GL_UNSIGNED_SHORT_8_8_APPLE: + case GL_UNSIGNED_SHORT_8_8_REV_APPLE: + case GL_UNSIGNED_SHORT_15_1_MESA: + case GL_UNSIGNED_SHORT_1_15_REV_MESA: + bytesPerElement = 2; + elementsPerGroup = 1; + break; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + bytesPerElement = 4; + break; + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + case GL_UNSIGNED_INT_24_8_NV: + case GL_UNSIGNED_INT_24_8_MESA: + case GL_UNSIGNED_INT_8_24_REV_MESA: + bytesPerElement = 4; + elementsPerGroup = 1; + break; + default: + return -1; + } + groupSize = bytesPerElement * elementsPerGroup; + if (rowLength > 0) { + groupsPerRow = rowLength; + } + else { + groupsPerRow = w; + } + rowSize = groupsPerRow * groupSize; + padding = (rowSize % alignment); + if (padding) { + rowSize += alignment - padding; + } + if (imageHeight > 0) { + imageSize = (imageHeight + skipRows) * rowSize; + } + else { + imageSize = (h + skipRows) * rowSize; + } + return ((d + skipImages) * imageSize); + } +} + +/* XXX this is used elsewhere - should it be exported from glxserver.h? */ +int +__glXTypeSize(GLenum enm) +{ + switch (enm) { + case GL_BYTE: + return sizeof(GLbyte); + case GL_UNSIGNED_BYTE: + return sizeof(GLubyte); + case GL_SHORT: + return sizeof(GLshort); + case GL_UNSIGNED_SHORT: + return sizeof(GLushort); + case GL_INT: + return sizeof(GLint); + case GL_UNSIGNED_INT: + return sizeof(GLint); + case GL_FLOAT: + return sizeof(GLfloat); + case GL_DOUBLE: + return sizeof(GLdouble); + default: + return -1; + } +} + +int +__glXDrawArraysReqSize(const GLbyte * pc, Bool swap) +{ + __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; + __GLXdispatchDrawArraysComponentHeader *compHeader; + GLint numVertexes = hdr->numVertexes; + GLint numComponents = hdr->numComponents; + GLint arrayElementSize = 0; + int i; + + if (swap) { + numVertexes = SWAPL(numVertexes); + numComponents = SWAPL(numComponents); + } + + pc += sizeof(__GLXdispatchDrawArraysHeader); + compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; + + for (i = 0; i < numComponents; i++) { + GLenum datatype = compHeader[i].datatype; + GLint numVals = compHeader[i].numVals; + GLint component = compHeader[i].component; + + if (swap) { + datatype = SWAPL(datatype); + numVals = SWAPL(numVals); + component = SWAPL(component); + } + + switch (component) { + case GL_VERTEX_ARRAY: + case GL_COLOR_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + break; + case GL_SECONDARY_COLOR_ARRAY: + case GL_NORMAL_ARRAY: + if (numVals != 3) { + /* bad size */ + return -1; + } + break; + case GL_FOG_COORD_ARRAY: + case GL_INDEX_ARRAY: + if (numVals != 1) { + /* bad size */ + return -1; + } + break; + case GL_EDGE_FLAG_ARRAY: + if ((numVals != 1) && (datatype != GL_UNSIGNED_BYTE)) { + /* bad size or bad type */ + return -1; + } + break; + default: + /* unknown component type */ + return -1; + } + + arrayElementSize += __GLX_PAD(numVals * __glXTypeSize(datatype)); + + pc += sizeof(__GLXdispatchDrawArraysComponentHeader); + } + + return ((numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader)) + + (numVertexes * arrayElementSize)); +} + +int +__glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap) +{ + __GLXdispatchConvolutionFilterHeader *hdr = + (__GLXdispatchConvolutionFilterHeader *) pc; + + GLint image1size, image2size; + GLenum format = hdr->format; + GLenum type = hdr->type; + GLint w = hdr->width; + GLint h = hdr->height; + GLint rowLength = hdr->rowLength; + GLint alignment = hdr->alignment; + + if (swap) { + format = SWAPL(format); + type = SWAPL(type); + w = SWAPL(w); + h = SWAPL(h); + rowLength = SWAPL(rowLength); + alignment = SWAPL(alignment); + } + + /* XXX Should rowLength be used for either or both image? */ + image1size = __glXImageSize(format, type, 0, w, 1, 1, + 0, rowLength, 0, 0, alignment); + image1size = __GLX_PAD(image1size); + image2size = __glXImageSize(format, type, 0, h, 1, 1, + 0, rowLength, 0, 0, alignment); + return image1size + image2size; + +} diff --git a/glx/single2.c b/glx/single2.c new file mode 100644 index 0000000..53b661d --- /dev/null +++ b/glx/single2.c @@ -0,0 +1,395 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "unpack.h" + +int +__glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc) +{ + GLsizei size; + GLenum type; + __GLXcontext *cx; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + size = *(GLsizei *) (pc + 0); + type = *(GLenum *) (pc + 4); + if (cx->feedbackBufSize < size) { + cx->feedbackBuf = (GLfloat *) realloc(cx->feedbackBuf, + (size_t) size + * __GLX_SIZE_FLOAT32); + if (!cx->feedbackBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->feedbackBufSize = size; + } + glFeedbackBuffer(size, type, cx->feedbackBuf); + cx->hasUnflushedCommands = GL_TRUE; + return Success; +} + +int +__glXDisp_SelectBuffer(__GLXclientState * cl, GLbyte * pc) +{ + __GLXcontext *cx; + GLsizei size; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + size = *(GLsizei *) (pc + 0); + if (cx->selectBufSize < size) { + cx->selectBuf = (GLuint *) realloc(cx->selectBuf, + (size_t) size * __GLX_SIZE_CARD32); + if (!cx->selectBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->selectBufSize = size; + } + glSelectBuffer(size, cx->selectBuf); + cx->hasUnflushedCommands = GL_TRUE; + return Success; +} + +int +__glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client; + xGLXRenderModeReply reply; + __GLXcontext *cx; + GLint nitems = 0, retBytes = 0, retval, newModeCheck; + GLubyte *retBuffer = NULL; + GLenum newMode; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + newMode = *(GLenum *) pc; + retval = glRenderMode(newMode); + + /* Check that render mode worked */ + glGetIntegerv(GL_RENDER_MODE, &newModeCheck); + if (newModeCheck != newMode) { + /* Render mode change failed. Bail */ + newMode = newModeCheck; + goto noChangeAllowed; + } + + /* + ** Render mode might have still failed if we get here. But in this + ** case we can't really tell, nor does it matter. If it did fail, it + ** will return 0, and thus we won't send any data across the wire. + */ + + switch (cx->renderMode) { + case GL_RENDER: + cx->renderMode = newMode; + break; + case GL_FEEDBACK: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->feedbackBufSize; + } + else { + nitems = retval; + } + retBytes = nitems * __GLX_SIZE_FLOAT32; + retBuffer = (GLubyte *) cx->feedbackBuf; + cx->renderMode = newMode; + break; + case GL_SELECT: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->selectBufSize; + } + else { + GLuint *bp = cx->selectBuf; + GLint i; + + /* + ** Figure out how many bytes of data need to be sent. Parse + ** the selection buffer to determine this fact as the + ** return value is the number of hits, not the number of + ** items in the buffer. + */ + nitems = 0; + i = retval; + while (--i >= 0) { + GLuint n; + + /* Parse select data for this hit */ + n = *bp; + bp += 3 + n; + } + nitems = bp - cx->selectBuf; + } + retBytes = nitems * __GLX_SIZE_CARD32; + retBuffer = (GLubyte *) cx->selectBuf; + cx->renderMode = newMode; + break; + } + + /* + ** First reply is the number of elements returned in the feedback or + ** selection array, as per the API for glRenderMode itself. + */ + noChangeAllowed:; + client = cl->client; + reply = (xGLXRenderModeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = nitems, + .retval = retval, + .size = nitems, + .newMode = newMode + }; + WriteToClient(client, sz_xGLXRenderModeReply, &reply); + if (retBytes) { + WriteToClient(client, retBytes, retBuffer); + } + return Success; +} + +int +__glXDisp_Flush(__GLXclientState * cl, GLbyte * pc) +{ + __GLXcontext *cx; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + glFlush(); + cx->hasUnflushedCommands = GL_FALSE; + return Success; +} + +int +__glXDisp_Finish(__GLXclientState * cl, GLbyte * pc) +{ + __GLXcontext *cx; + ClientPtr client; + int error; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + /* Do a local glFinish */ + glFinish(); + cx->hasUnflushedCommands = GL_FALSE; + + /* Send empty reply packet to indicate finish is finished */ + client = cl->client; + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + return Success; +} + +#define SEPARATOR " " + +char * +__glXcombine_strings(const char *cext_string, const char *sext_string) +{ + size_t clen, slen; + char *combo_string, *token, *s1; + const char *s2, *end; + + /* safeguard to prevent potentially fatal errors in the string functions */ + if (!cext_string) + cext_string = ""; + if (!sext_string) + sext_string = ""; + + /* + ** String can't be longer than min(cstring, sstring) + ** pull tokens out of shortest string + ** include space in combo_string for final separator and null terminator + */ + clen = strlen(cext_string); + slen = strlen(sext_string); + if (clen > slen) { + combo_string = (char *) malloc(slen + 2); + s1 = (char *) malloc(slen + 2); + if (s1) + strcpy(s1, sext_string); + s2 = cext_string; + } + else { + combo_string = (char *) malloc(clen + 2); + s1 = (char *) malloc(clen + 2); + if (s1) + strcpy(s1, cext_string); + s2 = sext_string; + } + if (!combo_string || !s1) { + free(combo_string); + free(s1); + return NULL; + } + combo_string[0] = '\0'; + + /* Get first extension token */ + token = strtok(s1, SEPARATOR); + while (token != NULL) { + + /* + ** if token in second string then save it + ** beware of extension names which are prefixes of other extension names + */ + const char *p = s2; + + end = p + strlen(p); + while (p < end) { + size_t n = strcspn(p, SEPARATOR); + + if ((strlen(token) == n) && (strncmp(token, p, n) == 0)) { + combo_string = strcat(combo_string, token); + combo_string = strcat(combo_string, SEPARATOR); + } + p += (n + 1); + } + + /* Get next extension token */ + token = strtok(NULL, SEPARATOR); + } + free(s1); + return combo_string; +} + +int +DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap) +{ + ClientPtr client; + __GLXcontext *cx; + GLenum name; + const char *string; + + __GLX_DECLARE_SWAP_VARIABLES; + int error; + char *buf = NULL, *buf1 = NULL; + GLint length = 0; + + /* If the client has the opposite byte order, swap the contextTag and + * the name. + */ + if (need_swap) { + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + __GLX_SINGLE_HDR_SIZE); + } + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + name = *(GLenum *) (pc + 0); + string = (const char *) glGetString(name); + client = cl->client; + + if (string == NULL) + string = ""; + + /* + ** Restrict extensions to those that are supported by both the + ** implementation and the connection. That is, return the + ** intersection of client, server, and core extension strings. + */ + if (name == GL_EXTENSIONS) { + buf1 = __glXcombine_strings(string, cl->GLClientextensions); + buf = __glXcombine_strings(buf1, cx->pGlxScreen->GLextensions); + free(buf1); + string = buf; + } + else if (name == GL_VERSION) { + if (atof(string) > atof(GLServerVersion)) { + if (asprintf(&buf, "%s (%s)", GLServerVersion, string) == -1) { + string = GLServerVersion; + } + else { + string = buf; + } + } + } + if (string) { + length = strlen((const char *) string) + 1; + } + + __GLX_BEGIN_REPLY(length); + __GLX_PUT_SIZE(length); + + if (need_swap) { + __GLX_SWAP_REPLY_SIZE(); + __GLX_SWAP_REPLY_HEADER(); + } + + __GLX_SEND_HEADER(); + WriteToClient(client, length, string); + free(buf); + + return Success; +} + +int +__glXDisp_GetString(__GLXclientState * cl, GLbyte * pc) +{ + return DoGetString(cl, pc, GL_FALSE); +} diff --git a/glx/single2swap.c b/glx/single2swap.c new file mode 100644 index 0000000..764501f --- /dev/null +++ b/glx/single2swap.c @@ -0,0 +1,276 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "unpack.h" + +int +__glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc) +{ + GLsizei size; + GLenum type; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLXcontext *cx; + int error; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + size = *(GLsizei *) (pc + 0); + type = *(GLenum *) (pc + 4); + if (cx->feedbackBufSize < size) { + cx->feedbackBuf = (GLfloat *) realloc(cx->feedbackBuf, + (size_t) size + * __GLX_SIZE_FLOAT32); + if (!cx->feedbackBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->feedbackBufSize = size; + } + glFeedbackBuffer(size, type, cx->feedbackBuf); + cx->hasUnflushedCommands = GL_TRUE; + return Success; +} + +int +__glXDispSwap_SelectBuffer(__GLXclientState * cl, GLbyte * pc) +{ + __GLXcontext *cx; + GLsizei size; + + __GLX_DECLARE_SWAP_VARIABLES; + int error; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + size = *(GLsizei *) (pc + 0); + if (cx->selectBufSize < size) { + cx->selectBuf = (GLuint *) realloc(cx->selectBuf, + (size_t) size * __GLX_SIZE_CARD32); + if (!cx->selectBuf) { + cl->client->errorValue = size; + return BadAlloc; + } + cx->selectBufSize = size; + } + glSelectBuffer(size, cx->selectBuf); + cx->hasUnflushedCommands = GL_TRUE; + return Success; +} + +int +__glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client; + __GLXcontext *cx; + xGLXRenderModeReply reply; + GLint nitems = 0, retBytes = 0, retval, newModeCheck; + GLubyte *retBuffer = NULL; + GLenum newMode; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + int error; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc); + newMode = *(GLenum *) pc; + retval = glRenderMode(newMode); + + /* Check that render mode worked */ + glGetIntegerv(GL_RENDER_MODE, &newModeCheck); + if (newModeCheck != newMode) { + /* Render mode change failed. Bail */ + newMode = newModeCheck; + goto noChangeAllowed; + } + + /* + ** Render mode might have still failed if we get here. But in this + ** case we can't really tell, nor does it matter. If it did fail, it + ** will return 0, and thus we won't send any data across the wire. + */ + + switch (cx->renderMode) { + case GL_RENDER: + cx->renderMode = newMode; + break; + case GL_FEEDBACK: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->feedbackBufSize; + } + else { + nitems = retval; + } + retBytes = nitems * __GLX_SIZE_FLOAT32; + retBuffer = (GLubyte *) cx->feedbackBuf; + __GLX_SWAP_FLOAT_ARRAY((GLbyte *) retBuffer, nitems); + cx->renderMode = newMode; + break; + case GL_SELECT: + if (retval < 0) { + /* Overflow happened. Copy the entire buffer */ + nitems = cx->selectBufSize; + } + else { + GLuint *bp = cx->selectBuf; + GLint i; + + /* + ** Figure out how many bytes of data need to be sent. Parse + ** the selection buffer to determine this fact as the + ** return value is the number of hits, not the number of + ** items in the buffer. + */ + nitems = 0; + i = retval; + while (--i >= 0) { + GLuint n; + + /* Parse select data for this hit */ + n = *bp; + bp += 3 + n; + } + nitems = bp - cx->selectBuf; + } + retBytes = nitems * __GLX_SIZE_CARD32; + retBuffer = (GLubyte *) cx->selectBuf; + __GLX_SWAP_INT_ARRAY((GLbyte *) retBuffer, nitems); + cx->renderMode = newMode; + break; + } + + /* + ** First reply is the number of elements returned in the feedback or + ** selection array, as per the API for glRenderMode itself. + */ + noChangeAllowed:; + client = cl->client; + reply = (xGLXRenderModeReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = nitems, + .retval = retval, + .size = nitems, + .newMode = newMode + }; + __GLX_SWAP_SHORT(&reply.sequenceNumber); + __GLX_SWAP_INT(&reply.length); + __GLX_SWAP_INT(&reply.retval); + __GLX_SWAP_INT(&reply.size); + __GLX_SWAP_INT(&reply.newMode); + WriteToClient(client, sz_xGLXRenderModeReply, &reply); + if (retBytes) { + WriteToClient(client, retBytes, retBuffer); + } + return Success; +} + +int +__glXDispSwap_Flush(__GLXclientState * cl, GLbyte * pc) +{ + __GLXcontext *cx; + int error; + + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + glFlush(); + cx->hasUnflushedCommands = GL_FALSE; + return Success; +} + +int +__glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc) +{ + __GLXcontext *cx; + ClientPtr client; + int error; + + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + /* Do a local glFinish */ + glFinish(); + cx->hasUnflushedCommands = GL_FALSE; + + /* Send empty reply packet to indicate finish is finished */ + client = cl->client; + __GLX_BEGIN_REPLY(0); + __GLX_PUT_RETVAL(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + + return Success; +} + +int +__glXDispSwap_GetString(__GLXclientState * cl, GLbyte * pc) +{ + return DoGetString(cl, pc, GL_TRUE); +} diff --git a/glx/singlepix.c b/glx/singlepix.c new file mode 100644 index 0000000..506fdaa --- /dev/null +++ b/glx/singlepix.c @@ -0,0 +1,530 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" + +int +__glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc) +{ + GLsizei width, height; + GLenum format, type; + GLboolean swapBytes, lsbFirst; + GLint compsize; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + width = *(GLsizei *) (pc + 8); + height = *(GLsizei *) (pc + 12); + format = *(GLenum *) (pc + 16); + type = *(GLenum *) (pc + 20); + swapBytes = *(GLboolean *) (pc + 24); + lsbFirst = *(GLboolean *) (pc + 25); + compsize = __glReadPixels_size(format, type, width, height); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glReadPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4), + *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12), + *(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + cx->hasUnflushedCommands = GL_FALSE; + return Success; +} + +int +__glXDisp_GetTexImage(__GLXclientState * cl, GLbyte * pc) +{ + GLint level, compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width = 0, height = 0, depth = 1; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + level = *(GLint *) (pc + 4); + format = *(GLenum *) (pc + 8); + type = *(GLenum *) (pc + 12); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 16); + + glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); + glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); + if (target == GL_TEXTURE_3D) { + glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); + } + /* + * The three queries above might fail if we're in a state where queries + * are illegal, but then width, height, and depth would still be zero anyway. + */ + compsize = + __glGetTexImage_size(target, level, format, type, width, height, depth); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetTexImage(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), + *(GLenum *) (pc + 8), *(GLenum *) (pc + 12), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetTexImageReply *) &__glXReply)->width = width; + ((xGLXGetTexImageReply *) &__glXReply)->height = height; + ((xGLXGetTexImageReply *) &__glXReply)->depth = depth; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; +} + +int +__glXDisp_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc) +{ + GLboolean lsbFirst; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLubyte answerBuffer[200]; + char *answer; + + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + lsbFirst = *(GLboolean *) (pc + 0); + + glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + __GLX_GET_ANSWER_BUFFER(answer, cl, 128, 1); + + __glXClearErrorOccured(); + glGetPolygonStipple((GLubyte *) answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(128); + __GLX_SEND_HEADER(); + __GLX_SEND_BYTE_ARRAY(128); + } + return Success; +} + +static int +GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize, compsize2; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width = 0, height = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + + /* target must be SEPARABLE_2D, however I guess we can let the GL + barf on this one.... */ + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); + compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1); + + if (compsize < 0) + compsize = 0; + if (compsize2 < 0) + compsize2 = 0; + compsize = __GLX_PAD(compsize); + compsize2 = __GLX_PAD(compsize2); + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1); + __glXClearErrorOccured(); + glGetSeparableFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), answer, answer + compsize, NULL); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize + compsize2); + ((xGLXGetSeparableFilterReply *) &__glXReply)->width = width; + ((xGLXGetSeparableFilterReply *) &__glXReply)->height = height; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize + compsize2); + } + + return Success; +} + +int +__glXDisp_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDisp_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width = 0, height = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + if (target == GL_CONVOLUTION_1D) { + height = 1; + } + else { + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + } + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, height, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetConvolutionFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetConvolutionFilterReply *) &__glXReply)->width = width; + ((xGLXGetConvolutionFilterReply *) &__glXReply)->height = height; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDisp_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDisp_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + reset = *(GLboolean *) (pc + 13); + + glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetHistogram(target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetHistogramReply *) &__glXReply)->width = width; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDisp_GetHistogram(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDisp_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + reset = *(GLboolean *) (pc + 13); + + compsize = __glGetTexImage_size(target, 1, format, type, 2, 1, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetMinmax(target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDisp_GetMinmax(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDisp_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + target = *(GLenum *) (pc + 0); + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + swapBytes = *(GLboolean *) (pc + 12); + + glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + ((xGLXGetColorTableReply *) &__glXReply)->width = width; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDisp_GetColorTable(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDisp_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} diff --git a/glx/singlepixswap.c b/glx/singlepixswap.c new file mode 100644 index 0000000..8469101 --- /dev/null +++ b/glx/singlepixswap.c @@ -0,0 +1,594 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_dispatch.h" +#include "indirect_size_get.h" + +int +__glXDispSwap_ReadPixels(__GLXclientState * cl, GLbyte * pc) +{ + GLsizei width, height; + GLenum format, type; + GLboolean swapBytes, lsbFirst; + GLint compsize; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + __GLX_SWAP_INT(pc + 16); + __GLX_SWAP_INT(pc + 20); + + width = *(GLsizei *) (pc + 8); + height = *(GLsizei *) (pc + 12); + format = *(GLenum *) (pc + 16); + type = *(GLenum *) (pc + 20); + swapBytes = *(GLboolean *) (pc + 24); + lsbFirst = *(GLboolean *) (pc + 25); + compsize = __glReadPixels_size(format, type, width, height); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glReadPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4), + *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12), + *(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + cx->hasUnflushedCommands = GL_FALSE; + return Success; +} + +int +__glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc) +{ + GLint level, compsize; + GLenum format, type, target; + GLboolean swapBytes; + + __GLX_DECLARE_SWAP_VARIABLES; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + char *answer, answerBuffer[200]; + GLint width = 0, height = 0, depth = 1; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + + pc += __GLX_SINGLE_HDR_SIZE; + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + __GLX_SWAP_INT(pc + 12); + + level = *(GLint *) (pc + 4); + format = *(GLenum *) (pc + 8); + type = *(GLenum *) (pc + 12); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 16); + + glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); + glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); + if (target == GL_TEXTURE_3D) { + glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); + } + /* + * The three queries above might fail if we're in a state where queries + * are illegal, but then width, height, and depth would still be zero anyway. + */ + compsize = + __glGetTexImage_size(target, level, format, type, width, height, depth); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetTexImage(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), + *(GLenum *) (pc + 8), *(GLenum *) (pc + 12), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + __GLX_SWAP_INT(&depth); + ((xGLXGetTexImageReply *) &__glXReply)->width = width; + ((xGLXGetTexImageReply *) &__glXReply)->height = height; + ((xGLXGetTexImageReply *) &__glXReply)->depth = depth; + __GLX_SEND_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + return Success; +} + +int +__glXDispSwap_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc) +{ + GLboolean lsbFirst; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + GLubyte answerBuffer[200]; + char *answer; + + __GLX_DECLARE_SWAP_VARIABLES; + + __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); + cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); + if (!cx) { + return error; + } + pc += __GLX_SINGLE_HDR_SIZE; + lsbFirst = *(GLboolean *) (pc + 0); + + glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + __GLX_GET_ANSWER_BUFFER(answer, cl, 128, 1); + + __glXClearErrorOccured(); + glGetPolygonStipple((GLubyte *) answer); + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + } + else { + __GLX_BEGIN_REPLY(128); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_HEADER(); + __GLX_SEND_BYTE_ARRAY(128); + } + return Success; +} + +static int +GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize, compsize2; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width = 0, height = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + + /* target must be SEPARABLE_2D, however I guess we can let the GL + barf on this one.... */ + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); + compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1); + + if (compsize < 0) + compsize = 0; + if (compsize2 < 0) + compsize2 = 0; + compsize = __GLX_PAD(compsize); + compsize2 = __GLX_PAD(compsize2); + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1); + __glXClearErrorOccured(); + glGetSeparableFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), answer, answer + compsize, NULL); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize + compsize2); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + ((xGLXGetSeparableFilterReply *) &__glXReply)->width = width; + ((xGLXGetSeparableFilterReply *) &__glXReply)->height = height; + __GLX_SEND_VOID_ARRAY(compsize + compsize2); + } + + return Success; +} + +int +__glXDispSwap_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDispSwap_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width = 0, height = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + + glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + if (target == GL_CONVOLUTION_2D) { + height = 1; + } + else { + glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + } + /* + * The two queries above might fail if we're in a state where queries + * are illegal, but then width and height would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, height, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetConvolutionFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + __GLX_SWAP_INT(&height); + ((xGLXGetConvolutionFilterReply *) &__glXReply)->width = width; + ((xGLXGetConvolutionFilterReply *) &__glXReply)->height = height; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDispSwap_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDispSwap_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + reset = *(GLboolean *) (pc + 13); + + glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetHistogram(target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + ((xGLXGetHistogramReply *) &__glXReply)->width = width; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDispSwap_GetHistogram(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDispSwap_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes, reset; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + reset = *(GLboolean *) (pc + 13); + + compsize = __glGetTexImage_size(target, 1, format, type, 2, 1, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetMinmax(target, reset, format, type, answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDispSwap_GetMinmax(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDispSwap_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} + +static int +GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) +{ + GLint compsize; + GLenum format, type, target; + GLboolean swapBytes; + __GLXcontext *cx; + ClientPtr client = cl->client; + int error; + + __GLX_DECLARE_SWAP_VARIABLES; + char *answer, answerBuffer[200]; + GLint width = 0; + + cx = __glXForceCurrent(cl, tag, &error); + if (!cx) { + return error; + } + + __GLX_SWAP_INT(pc + 0); + __GLX_SWAP_INT(pc + 4); + __GLX_SWAP_INT(pc + 8); + + format = *(GLenum *) (pc + 4); + type = *(GLenum *) (pc + 8); + target = *(GLenum *) (pc + 0); + swapBytes = *(GLboolean *) (pc + 12); + + glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); + /* + * The one query above might fail if we're in a state where queries + * are illegal, but then width would still be zero anyway. + */ + compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); + if (compsize < 0) + compsize = 0; + + glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); + __glXClearErrorOccured(); + glGetColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), + *(GLenum *) (pc + 8), answer); + + if (__glXErrorOccured()) { + __GLX_BEGIN_REPLY(0); + __GLX_SWAP_REPLY_HEADER(); + } + else { + __GLX_BEGIN_REPLY(compsize); + __GLX_SWAP_REPLY_HEADER(); + __GLX_SWAP_INT(&width); + ((xGLXGetColorTableReply *) &__glXReply)->width = width; + __GLX_SEND_VOID_ARRAY(compsize); + } + + return Success; +} + +int +__glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); +} + +int +__glXDispSwap_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc) +{ + const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); + + return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); +} diff --git a/glx/singlesize.c b/glx/singlesize.c new file mode 100644 index 0000000..4c60b69 --- /dev/null +++ b/glx/singlesize.c @@ -0,0 +1,199 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "glxserver.h" +#include "singlesize.h" +#include "indirect_size_get.h" + +/* +** These routines compute the size of variable-size returned parameters. +** Unlike the similar routines that do the same thing for variable-size +** incoming parameters, the samplegl library itself doesn't use these routines. +** Hence, they are located here, in the GLX extension library. +*/ + +GLint +__glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h) +{ + return __glXImageSize(format, type, 0, w, h, 1, 0, 0, 0, 0, 4); +} + +GLint +__glGetMap_size(GLenum target, GLenum query) +{ + GLint k, order = 0, majorMinor[2]; + + /* + ** Assume target and query are both valid. + */ + switch (target) { + case GL_MAP1_COLOR_4: + case GL_MAP1_NORMAL: + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + switch (query) { + case GL_COEFF: + k = __glMap1d_size(target); + glGetMapiv(target, GL_ORDER, &order); + /* + ** The query above might fail, but then order will be zero anyway. + */ + return order * k; + case GL_DOMAIN: + return 2; + case GL_ORDER: + return 1; + } + break; + case GL_MAP2_COLOR_4: + case GL_MAP2_NORMAL: + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + switch (query) { + case GL_COEFF: + k = __glMap2d_size(target); + majorMinor[0] = majorMinor[1] = 0; + glGetMapiv(target, GL_ORDER, majorMinor); + /* + ** The query above might fail, but then majorMinor will be zeroes + */ + return majorMinor[0] * majorMinor[1] * k; + case GL_DOMAIN: + return 4; + case GL_ORDER: + return 2; + } + break; + } + return -1; +} + +GLint +__glGetMapdv_size(GLenum target, GLenum query) +{ + return __glGetMap_size(target, query); +} + +GLint +__glGetMapfv_size(GLenum target, GLenum query) +{ + return __glGetMap_size(target, query); +} + +GLint +__glGetMapiv_size(GLenum target, GLenum query) +{ + return __glGetMap_size(target, query); +} + +GLint +__glGetPixelMap_size(GLenum map) +{ + GLint size; + GLenum query; + + switch (map) { + case GL_PIXEL_MAP_I_TO_I: + query = GL_PIXEL_MAP_I_TO_I_SIZE; + break; + case GL_PIXEL_MAP_S_TO_S: + query = GL_PIXEL_MAP_S_TO_S_SIZE; + break; + case GL_PIXEL_MAP_I_TO_R: + query = GL_PIXEL_MAP_I_TO_R_SIZE; + break; + case GL_PIXEL_MAP_I_TO_G: + query = GL_PIXEL_MAP_I_TO_G_SIZE; + break; + case GL_PIXEL_MAP_I_TO_B: + query = GL_PIXEL_MAP_I_TO_B_SIZE; + break; + case GL_PIXEL_MAP_I_TO_A: + query = GL_PIXEL_MAP_I_TO_A_SIZE; + break; + case GL_PIXEL_MAP_R_TO_R: + query = GL_PIXEL_MAP_R_TO_R_SIZE; + break; + case GL_PIXEL_MAP_G_TO_G: + query = GL_PIXEL_MAP_G_TO_G_SIZE; + break; + case GL_PIXEL_MAP_B_TO_B: + query = GL_PIXEL_MAP_B_TO_B_SIZE; + break; + case GL_PIXEL_MAP_A_TO_A: + query = GL_PIXEL_MAP_A_TO_A_SIZE; + break; + default: + return -1; + } + glGetIntegerv(query, &size); + return size; +} + +GLint +__glGetPixelMapfv_size(GLenum map) +{ + return __glGetPixelMap_size(map); +} + +GLint +__glGetPixelMapuiv_size(GLenum map) +{ + return __glGetPixelMap_size(map); +} + +GLint +__glGetPixelMapusv_size(GLenum map) +{ + return __glGetPixelMap_size(map); +} + +GLint +__glGetTexImage_size(GLenum target, GLint level, GLenum format, + GLenum type, GLint width, GLint height, GLint depth) +{ + return __glXImageSize(format, type, target, width, height, depth, + 0, 0, 0, 0, 4); +} diff --git a/glx/singlesize.h b/glx/singlesize.h new file mode 100644 index 0000000..dc85d3d --- /dev/null +++ b/glx/singlesize.h @@ -0,0 +1,54 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef _singlesize_h_ +#define _singlesize_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#include "indirect_size.h" + +extern GLint __glReadPixels_size(GLenum format, GLenum type, + GLint width, GLint height); +extern GLint __glGetMap_size(GLenum pname, GLenum query); +extern GLint __glGetMapdv_size(GLenum target, GLenum query); +extern GLint __glGetMapfv_size(GLenum target, GLenum query); +extern GLint __glGetMapiv_size(GLenum target, GLenum query); +extern GLint __glGetPixelMap_size(GLenum map); +extern GLint __glGetPixelMapfv_size(GLenum map); +extern GLint __glGetPixelMapuiv_size(GLenum map); +extern GLint __glGetPixelMapusv_size(GLenum map); +extern GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, + GLenum type, GLint width, GLint height, + GLint depth); + +#endif /* _singlesize_h_ */ diff --git a/glx/swap_interval.c b/glx/swap_interval.c new file mode 100644 index 0000000..17bc992 --- /dev/null +++ b/glx/swap_interval.c @@ -0,0 +1,89 @@ +/* + * (C) Copyright IBM Corporation 2006 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxutil.h" +#include "glxext.h" +#include "singlesize.h" +#include "unpack.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxbyteorder.h" + +static int DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap); + +int +DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap) +{ + xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + const GLXContextTag tag = req->contextTag; + __GLXcontext *cx; + GLint interval; + + cx = __glXLookupContextByTag(cl, tag); + + if ((cx == NULL) || (cx->pGlxScreen == NULL)) { + client->errorValue = tag; + return __glXError(GLXBadContext); + } + + if (cx->pGlxScreen->swapInterval == NULL) { + LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n"); + client->errorValue = tag; + return __glXError(GLXUnsupportedPrivateRequest); + } + + if (cx->drawPriv == NULL) { + client->errorValue = tag; + return BadValue; + } + + pc += __GLX_VENDPRIV_HDR_SIZE; + interval = (do_swap) + ? bswap_32(*(int *) (pc + 0)) + : *(int *) (pc + 0); + + if (interval <= 0) + return BadValue; + + (void) (*cx->pGlxScreen->swapInterval) (cx->drawPriv, interval); + return Success; +} + +int +__glXDisp_SwapIntervalSGI(__GLXclientState * cl, GLbyte * pc) +{ + return DoSwapInterval(cl, pc, 0); +} + +int +__glXDispSwap_SwapIntervalSGI(__GLXclientState * cl, GLbyte * pc) +{ + return DoSwapInterval(cl, pc, 1); +} diff --git a/glx/unpack.h b/glx/unpack.h new file mode 100644 index 0000000..52fba74 --- /dev/null +++ b/glx/unpack.h @@ -0,0 +1,227 @@ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifndef __GLX_unpack_h__ +#define __GLX_unpack_h__ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#define __GLX_PAD(s) (((s)+3) & (GLuint)~3) + +/* +** Fetch the context-id out of a SingleReq request pointed to by pc. +*/ +#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag) +#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag) + +/* +** Fetch a double from potentially unaligned memory. +*/ +#ifdef __GLX_ALIGN64 +#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n) +#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8) +#else +#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) +#endif + +extern void __glXMemInit(void); + +extern xGLXSingleReply __glXReply; + +#define __GLX_BEGIN_REPLY(size) \ + __glXReply.length = __GLX_PAD(size) >> 2; \ + __glXReply.type = X_Reply; \ + __glXReply.sequenceNumber = client->sequence; + +#define __GLX_SEND_HEADER() \ + WriteToClient (client, sz_xGLXSingleReply, &__glXReply); + +#define __GLX_PUT_RETVAL(a) \ + __glXReply.retval = (a); + +#define __GLX_PUT_SIZE(a) \ + __glXReply.size = (a); + +#define __GLX_PUT_RENDERMODE(m) \ + __glXReply.pad3 = (m) + +/* +** Get a buffer to hold returned data, with the given alignment. If we have +** to realloc, allocate size+align, in case the pointer has to be bumped for +** alignment. The answerBuffer should already be aligned. +** +** NOTE: the cast (long)res below assumes a long is large enough to hold a +** pointer. +*/ +#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \ + if ((size) > sizeof(answerBuffer)) { \ + int bump; \ + if ((cl)->returnBufSize < (size)+(align)) { \ + (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ + (size)+(align)); \ + if (!(cl)->returnBuf) { \ + return BadAlloc; \ + } \ + (cl)->returnBufSize = (size)+(align); \ + } \ + res = (char*)cl->returnBuf; \ + bump = (long)(res) % (align); \ + if (bump) res += (align) - (bump); \ + } else { \ + res = (char *)answerBuffer; \ + } + +#define __GLX_PUT_BYTE() \ + *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer + +#define __GLX_PUT_SHORT() \ + *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer + +#define __GLX_PUT_INT() \ + *(GLint *)&__glXReply.pad3 = *(GLint *)answer + +#define __GLX_PUT_FLOAT() \ + *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer + +#define __GLX_PUT_DOUBLE() \ + *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer + +#define __GLX_SEND_BYTE_ARRAY(len) \ + WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), answer) + +#define __GLX_SEND_SHORT_ARRAY(len) \ + WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), answer) + +#define __GLX_SEND_INT_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_INT32, answer) + +#define __GLX_SEND_FLOAT_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, answer) + +#define __GLX_SEND_DOUBLE_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, answer) + +#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) +#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) +#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len) +#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len) + +/* +** PERFORMANCE NOTE: +** Machine dependent optimizations abound here; these swapping macros can +** conceivably be replaced with routines that do the job faster. +*/ +#define __GLX_DECLARE_SWAP_VARIABLES \ + GLbyte sw + +#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \ + GLbyte *swapPC; \ + GLbyte *swapEnd + +#define __GLX_SWAP_INT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = sw; + +#define __GLX_SWAP_SHORT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = sw; + +#define __GLX_SWAP_DOUBLE(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \ + ((GLbyte *)(pc))[7] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \ + ((GLbyte *)(pc))[6] = sw; \ + sw = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \ + ((GLbyte *)(pc))[5] = sw; \ + sw = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \ + ((GLbyte *)(pc))[4] = sw; + +#define __GLX_SWAP_FLOAT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = sw; + +#define __GLX_SWAP_INT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_INT(swapPC); \ + swapPC += __GLX_SIZE_INT32; \ + } + +#define __GLX_SWAP_SHORT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_SHORT(swapPC); \ + swapPC += __GLX_SIZE_INT16; \ + } + +#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_DOUBLE(swapPC); \ + swapPC += __GLX_SIZE_FLOAT64; \ + } + +#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_FLOAT(swapPC); \ + swapPC += __GLX_SIZE_FLOAT32; \ + } + +#define __GLX_SWAP_REPLY_HEADER() \ + __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \ + __GLX_SWAP_INT(&__glXReply.length); + +#define __GLX_SWAP_REPLY_RETVAL() \ + __GLX_SWAP_INT(&__glXReply.retval) + +#define __GLX_SWAP_REPLY_SIZE() \ + __GLX_SWAP_INT(&__glXReply.size) + +#endif /* !__GLX_unpack_h__ */ diff --git a/glx/xfont.c b/glx/xfont.c new file mode 100644 index 0000000..83a455d --- /dev/null +++ b/glx/xfont.c @@ -0,0 +1,183 @@ +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "glxserver.h" +#include "glxutil.h" +#include "unpack.h" +#include "indirect_dispatch.h" +#include +#include +#include +#include + +/* +** Make a single GL bitmap from a single X glyph +*/ +static int +__glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) +{ + int i, j; + int widthPadded; /* width of glyph in bytes, as padded by X */ + int allocBytes; /* bytes to allocate to store bitmap */ + int w; /* width of glyph in bits */ + int h; /* height of glyph */ + register unsigned char *pglyph; + register unsigned char *p; + unsigned char *allocbuf; + +#define __GL_CHAR_BUF_SIZE 2048 + unsigned char buf[__GL_CHAR_BUF_SIZE]; + + w = GLYPHWIDTHPIXELS(pci); + h = GLYPHHEIGHTPIXELS(pci); + widthPadded = GLYPHWIDTHBYTESPADDED(pci); + + /* + ** Use the local buf if possible, otherwise malloc. + */ + allocBytes = widthPadded * h; + if (allocBytes <= __GL_CHAR_BUF_SIZE) { + p = buf; + allocbuf = 0; + } + else { + p = (unsigned char *) malloc(allocBytes); + if (!p) + return BadAlloc; + allocbuf = p; + } + + /* + ** We have to reverse the picture, top to bottom + */ + + pglyph = FONTGLYPHBITS(FONTGLYPHS(font), pci) + (h - 1) * widthPadded; + for (j = 0; j < h; j++) { + for (i = 0; i < widthPadded; i++) { + p[i] = pglyph[i]; + } + pglyph -= widthPadded; + p += widthPadded; + } + glBitmap(w, h, -pci->metrics.leftSideBearing, pci->metrics.descent, + pci->metrics.characterWidth, 0, allocbuf ? allocbuf : buf); + + free(allocbuf); + return Success; +#undef __GL_CHAR_BUF_SIZE +} + +/* +** Create a GL bitmap for each character in the X font. The bitmap is stored +** in a display list. +*/ + +static int +MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base) +{ + unsigned long i, nglyphs; + CARD8 chs[2]; /* the font index we are going after */ + CharInfoPtr pci; + int rv; /* return value */ + int encoding = (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit; + + glPixelStorei(GL_UNPACK_SWAP_BYTES, FALSE); + glPixelStorei(GL_UNPACK_LSB_FIRST, BITMAP_BIT_ORDER == LSBFirst); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + glPixelStorei(GL_UNPACK_ALIGNMENT, GLYPHPADBYTES); + for (i = 0; i < count; i++) { + chs[0] = (first + i) >> 8; /* high byte is first byte */ + chs[1] = first + i; + + (*pFont->get_glyphs) (pFont, 1, chs, (FontEncoding) encoding, + &nglyphs, &pci); + + /* + ** Define a display list containing just a glBitmap() call. + */ + glNewList(list_base + i, GL_COMPILE); + if (nglyphs) { + rv = __glXMakeBitmapFromGlyph(pFont, pci); + if (rv) { + return rv; + } + } + glEndList(); + } + return Success; +} + +/************************************************************************/ + +int +__glXDisp_UseXFont(__GLXclientState * cl, GLbyte * pc) +{ + ClientPtr client = cl->client; + xGLXUseXFontReq *req; + FontPtr pFont; + GLuint currentListIndex; + __GLXcontext *cx; + int error; + + REQUEST_SIZE_MATCH(xGLXUseXFontReq); + + req = (xGLXUseXFontReq *) pc; + cx = __glXForceCurrent(cl, req->contextTag, &error); + if (!cx) { + return error; + } + + glGetIntegerv(GL_LIST_INDEX, (GLint *) ¤tListIndex); + if (currentListIndex != 0) { + /* + ** A display list is currently being made. It is an error + ** to try to make a font during another lists construction. + */ + client->errorValue = cx->id; + return __glXError(GLXBadContextState); + } + + /* + ** Font can actually be either the ID of a font or the ID of a GC + ** containing a font. + */ + + error = dixLookupFontable(&pFont, req->font, client, DixReadAccess); + if (error != Success) + return error; + + return MakeBitmapsFromFont(pFont, req->first, req->count, req->listBase); +} diff --git a/hw/Makefile.am b/hw/Makefile.am new file mode 100644 index 0000000..6c2cc6b --- /dev/null +++ b/hw/Makefile.am @@ -0,0 +1,41 @@ +if DMX +DMX_SUBDIRS = dmx +endif + +if XORG +XORG_SUBDIRS = xfree86 +endif + +if XVFB +XVFB_SUBDIRS = vfb +endif + +if XNEST +XNEST_SUBDIRS = xnest +endif + +if XWIN +XWIN_SUBDIRS = xwin +endif + +if KDRIVE +KDRIVE_SUBDIRS = kdrive +endif + +if XQUARTZ +XQUARTZ_SUBDIRS = xquartz +endif + +SUBDIRS = \ + $(XORG_SUBDIRS) \ + $(XWIN_SUBDIRS) \ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ + $(DMX_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ + $(XQUARTZ_SUBDIRS) + +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive + +relink: + $(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done diff --git a/hw/Makefile.in b/hw/Makefile.in new file mode 100644 index 0000000..236af68 --- /dev/null +++ b/hw/Makefile.in @@ -0,0 +1,828 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = hw +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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@DMX_TRUE@DMX_SUBDIRS = dmx +@XORG_TRUE@XORG_SUBDIRS = xfree86 +@XVFB_TRUE@XVFB_SUBDIRS = vfb +@XNEST_TRUE@XNEST_SUBDIRS = xnest +@XWIN_TRUE@XWIN_SUBDIRS = xwin +@KDRIVE_TRUE@KDRIVE_SUBDIRS = kdrive +@XQUARTZ_TRUE@XQUARTZ_SUBDIRS = xquartz +SUBDIRS = \ + $(XORG_SUBDIRS) \ + $(XWIN_SUBDIRS) \ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ + $(DMX_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ + $(XQUARTZ_SUBDIRS) + +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +relink: + $(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am new file mode 100644 index 0000000..a05af13 --- /dev/null +++ b/hw/dmx/Makefile.am @@ -0,0 +1,87 @@ + +SUBDIRS = input config examples doc doxygen man +bin_PROGRAMS = Xdmx + +if XINERAMA +PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c +endif + +if GLX +SUBDIRS += glxProxy +GLX_LIBS = glxProxy/libglxproxy.a +GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h +GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod +GLX_DEFS = @GL_CFLAGS@ +endif + +AM_CFLAGS = \ + -DHAVE_DMX_CONFIG_H \ + $(DIX_CFLAGS) \ + $(GLX_INCS) \ + $(GLX_DEFS) \ + $(DMX_CFLAGS) \ + @DMXMODULES_CFLAGS@ + +Xdmx_SOURCES = dmx.c \ + dmxcb.c \ + dmxcb.h \ + dmxclient.h \ + dmxcmap.c \ + dmxcmap.h \ + dmx-config.h \ + dmxcursor.c \ + dmxcursor.h \ + dmxdpms.c \ + dmxdpms.h \ + dmxextension.c \ + dmxextension.h \ + dmxfont.c \ + dmxfont.h \ + dmxgc.c \ + dmxgc.h \ + dmxgcops.c \ + dmxgcops.h \ + dmx.h \ + dmxinit.c \ + dmxinit.h \ + dmxinput.c \ + dmxinput.h \ + dmxlog.c \ + dmxlog.h \ + dmxpict.c \ + dmxpict.h \ + dmxpixmap.c \ + dmxpixmap.h \ + dmxprop.c \ + dmxprop.h \ + dmxscrinit.c \ + dmxscrinit.h \ + dmxstat.c \ + dmxstat.h \ + dmxsync.c \ + dmxsync.h \ + dmxvisual.c \ + dmxvisual.h \ + dmxwindow.c \ + dmxwindow.h \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(GLX_SRCS) + + +#if COMPOSITE +#Xdmx_SOURCES += fakecw.c +#endif + +XDMX_LIBS = \ + $(GLX_LIBS) \ + @XDMX_LIBS@ \ + input/libdmxinput.a \ + config/libdmxconfig.a + +Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +Xdmx_DEPENDENCIES= $(XDMX_LIBS) +Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS) + +relink: + $(AM_V_at)rm -f Xdmx$(EXEEXT) && $(MAKE) Xdmx$(EXEEXT) diff --git a/hw/dmx/Makefile.in b/hw/dmx/Makefile.in new file mode 100644 index 0000000..97d4047 --- /dev/null +++ b/hw/dmx/Makefile.in @@ -0,0 +1,1093 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = Xdmx$(EXEEXT) +@GLX_TRUE@am__append_1 = glxProxy +subdir = hw/dmx +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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__Xdmx_SOURCES_DIST = dmx.c dmxcb.c dmxcb.h dmxclient.h dmxcmap.c \ + dmxcmap.h dmx-config.h dmxcursor.c dmxcursor.h dmxdpms.c \ + dmxdpms.h dmxextension.c dmxextension.h dmxfont.c dmxfont.h \ + dmxgc.c dmxgc.h dmxgcops.c dmxgcops.h dmx.h dmxinit.c \ + dmxinit.h dmxinput.c dmxinput.h dmxlog.c dmxlog.h dmxpict.c \ + dmxpict.h dmxpixmap.c dmxpixmap.h dmxprop.c dmxprop.h \ + dmxscrinit.c dmxscrinit.h dmxstat.c dmxstat.h dmxsync.c \ + dmxsync.h dmxvisual.c dmxvisual.h dmxwindow.c dmxwindow.h \ + $(top_srcdir)/mi/miinitext.c $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/Xext/panoramiX.c dmx_glxvisuals.c \ + dmx_glxvisuals.h +@XINERAMA_TRUE@am__objects_1 = panoramiX.$(OBJEXT) +@GLX_TRUE@am__objects_2 = $(am__objects_1) dmx_glxvisuals.$(OBJEXT) +am_Xdmx_OBJECTS = dmx.$(OBJEXT) dmxcb.$(OBJEXT) dmxcmap.$(OBJEXT) \ + dmxcursor.$(OBJEXT) dmxdpms.$(OBJEXT) dmxextension.$(OBJEXT) \ + dmxfont.$(OBJEXT) dmxgc.$(OBJEXT) dmxgcops.$(OBJEXT) \ + dmxinit.$(OBJEXT) dmxinput.$(OBJEXT) dmxlog.$(OBJEXT) \ + dmxpict.$(OBJEXT) dmxpixmap.$(OBJEXT) dmxprop.$(OBJEXT) \ + dmxscrinit.$(OBJEXT) dmxstat.$(OBJEXT) dmxsync.$(OBJEXT) \ + dmxvisual.$(OBJEXT) dmxwindow.$(OBJEXT) miinitext.$(OBJEXT) \ + fbcmap_mi.$(OBJEXT) $(am__objects_2) +Xdmx_OBJECTS = $(am_Xdmx_OBJECTS) +am__DEPENDENCIES_1 = $(GLX_LIBS) input/libdmxinput.a \ + config/libdmxconfig.a +am__DEPENDENCIES_2 = +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +Xdmx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(Xdmx_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(Xdmx_SOURCES) +DIST_SOURCES = $(am__Xdmx_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = input config examples doc doxygen man glxProxy +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ + +#if COMPOSITE +#Xdmx_SOURCES += fakecw.c +#endif +XDMX_LIBS = \ + $(GLX_LIBS) \ + @XDMX_LIBS@ \ + input/libdmxinput.a \ + config/libdmxconfig.a + +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = input config examples doc doxygen man $(am__append_1) +@XINERAMA_TRUE@PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c +@GLX_TRUE@GLX_LIBS = glxProxy/libglxproxy.a +@GLX_TRUE@GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c dmx_glxvisuals.h +@GLX_TRUE@GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod +@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ +AM_CFLAGS = \ + -DHAVE_DMX_CONFIG_H \ + $(DIX_CFLAGS) \ + $(GLX_INCS) \ + $(GLX_DEFS) \ + $(DMX_CFLAGS) \ + @DMXMODULES_CFLAGS@ + +Xdmx_SOURCES = dmx.c \ + dmxcb.c \ + dmxcb.h \ + dmxclient.h \ + dmxcmap.c \ + dmxcmap.h \ + dmx-config.h \ + dmxcursor.c \ + dmxcursor.h \ + dmxdpms.c \ + dmxdpms.h \ + dmxextension.c \ + dmxextension.h \ + dmxfont.c \ + dmxfont.h \ + dmxgc.c \ + dmxgc.h \ + dmxgcops.c \ + dmxgcops.h \ + dmx.h \ + dmxinit.c \ + dmxinit.h \ + dmxinput.c \ + dmxinput.h \ + dmxlog.c \ + dmxlog.h \ + dmxpict.c \ + dmxpict.h \ + dmxpixmap.c \ + dmxpixmap.h \ + dmxprop.c \ + dmxprop.h \ + dmxscrinit.c \ + dmxscrinit.h \ + dmxstat.c \ + dmxstat.h \ + dmxsync.c \ + dmxsync.h \ + dmxvisual.c \ + dmxvisual.h \ + dmxwindow.c \ + dmxwindow.h \ + $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(GLX_SRCS) + +Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +Xdmx_DEPENDENCIES = $(XDMX_LIBS) +Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS) +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/dmx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +Xdmx$(EXEEXT): $(Xdmx_OBJECTS) $(Xdmx_DEPENDENCIES) $(EXTRA_Xdmx_DEPENDENCIES) + @rm -f Xdmx$(EXEEXT) + $(AM_V_CCLD)$(Xdmx_LINK) $(Xdmx_OBJECTS) $(Xdmx_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_glxvisuals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcursor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxdpms.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxextension.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxfont.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxgc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxgcops.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxinput.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxlog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxpict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxpixmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxprop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxscrinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxsync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxvisual.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxwindow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiX.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +miinitext.o: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c + +miinitext.obj: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.obj -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` + +fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.o -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c + +fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` + +panoramiX.o: $(top_srcdir)/Xext/panoramiX.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT panoramiX.o -MD -MP -MF $(DEPDIR)/panoramiX.Tpo -c -o panoramiX.o `test -f '$(top_srcdir)/Xext/panoramiX.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/panoramiX.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/panoramiX.Tpo $(DEPDIR)/panoramiX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/panoramiX.c' object='panoramiX.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o panoramiX.o `test -f '$(top_srcdir)/Xext/panoramiX.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/panoramiX.c + +panoramiX.obj: $(top_srcdir)/Xext/panoramiX.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT panoramiX.obj -MD -MP -MF $(DEPDIR)/panoramiX.Tpo -c -o panoramiX.obj `if test -f '$(top_srcdir)/Xext/panoramiX.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/panoramiX.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/panoramiX.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/panoramiX.Tpo $(DEPDIR)/panoramiX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/panoramiX.c' object='panoramiX.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o panoramiX.obj `if test -f '$(top_srcdir)/Xext/panoramiX.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/panoramiX.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/panoramiX.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS + + +relink: + $(AM_V_at)rm -f Xdmx$(EXEEXT) && $(MAKE) Xdmx$(EXEEXT) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/hw/dmx/config/Canvas.c b/hw/dmx/config/Canvas.c new file mode 100644 index 0000000..f0586e5 --- /dev/null +++ b/hw/dmx/config/Canvas.c @@ -0,0 +1,165 @@ +/* + * 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 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + * This file was originally taken from xc/lib/Xaw/Template.c + */ + +#include +#include +#include "CanvasP.h" + +static void +CanvasInitialize(Widget request, Widget w, ArgList args, Cardinal * num_args) +{ +} + +static void +CanvasExpose(Widget w, XEvent * event, Region region) +{ + CanvasExposeDataRec data; + + data.w = w; + data.event = event; + data.region = region; + + if (!XtIsRealized(w)) + return; + XtCallCallbacks(w, XtNcanvasExposeCallback, (XtPointer) &data); +} + +static void +CanvasResize(Widget w) +{ + if (!XtIsRealized(w)) + return; + XtCallCallbacks(w, XtNcanvasResizeCallback, (XtPointer) w); +} + +static void +CanvasAction(Widget w, XEvent * event, String * params, Cardinal * num_params) +{ + XtCallCallbacks(w, XtNcallback, (XtPointer) event); +} + +#define offset(field) XtOffsetOf(CanvasRec, canvas.field) +static XtResource resources[] = { + {XtNcallback, XtCCallback, XtRCallback, + sizeof(XtCallbackList), offset(input_callback), XtRCallback, NULL} + , + {XtNcanvasExposeCallback, XtCcanvasExposeCallback, XtRCallback, + sizeof(XtCallbackList), offset(expose_callback), XtRCallback, NULL} + , + {XtNcanvasResizeCallback, XtCcanvasResizeCallback, XtRCallback, + sizeof(XtCallbackList), offset(resize_callback), XtRCallback, NULL} + , +}; + +#undef offset + +static XtActionsRec actions[] = { + {"canvas", CanvasAction}, +}; + +static char translations[] = ": canvas()\n\ +: canvas()\n\ +: canvas()\n\ +: canvas()\n\ +"; + +#define Superclass (&widgetClassRec) +CanvasClassRec canvasClassRec = { + /* core */ + { + (WidgetClass) Superclass, /* superclass */ + "Canvas", /* class_name */ + sizeof(CanvasRec), /* widget_size */ + NULL, /* class_initialize */ + NULL, /* class_part_initialize */ + False, /* class_inited */ + CanvasInitialize, /* initialize */ + NULL, /* initialize_hook */ + XtInheritRealize, /* realize */ + actions, /* actions */ + XtNumber(actions), /* num_actions */ + resources, /* resources */ + XtNumber(resources), /* num_resources */ + NULLQUARK, /* xrm_class */ + True, /* compress_motion */ + True, /* compress_exposure */ + True, /* compress_enterleave */ + False, /* visible_interest */ + NULL, /* destroy */ + CanvasResize, /* resize */ + CanvasExpose, /* expose */ + NULL, /* set_values */ + NULL, /* set_values_hook */ + XtInheritSetValuesAlmost, /* set_values_almost */ + NULL, /* get_values_hook */ + NULL, /* accept_focus */ + XtVersion, /* version */ + NULL, /* callback_private */ + translations, /* tm_table */ + XtInheritQueryGeometry, /* query_geometry */ + XtInheritDisplayAccelerator, /* display_accelerator */ + NULL, /* extension */ + } + , + /* canvas */ + { + NULL, /* extension */ + } +}; + +WidgetClass canvasWidgetClass = (WidgetClass) &canvasClassRec; diff --git a/hw/dmx/config/Canvas.h b/hw/dmx/config/Canvas.h new file mode 100644 index 0000000..d516faf --- /dev/null +++ b/hw/dmx/config/Canvas.h @@ -0,0 +1,55 @@ +/* + +Copyright 1987, 1998 The Open Group +Copyright 2002 Red Hat Inc., Durham, North Carolina. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + * This file was originally taken from xc/lib/Xaw/Template.h + */ + +#ifndef _Canvas_h +#define _Canvas_h + +#include + +#define XtNcanvasExposeCallback "canvasExposeCallback" +#define XtCcanvasExposeCallback "CanvasExposeCallback" +#define XtNcanvasResizeCallback "canvasResizeCallback" +#define XtCcanvasResizeCallback "CanvasResizeCallback" + +typedef struct _CanvasClassRec *CanvasWidgetClass; +typedef struct _CanvasRec *CanvasWidget; +extern WidgetClass canvasWidgetClass; + +typedef struct _CanvasExposeDataRec { + Widget w; + XEvent *event; + Region region; +} CanvasExposeDataRec, *CanvasExposeDataPtr; + +#endif /* _Canvas_h */ diff --git a/hw/dmx/config/CanvasP.h b/hw/dmx/config/CanvasP.h new file mode 100644 index 0000000..b1ccf24 --- /dev/null +++ b/hw/dmx/config/CanvasP.h @@ -0,0 +1,65 @@ +/* + +Copyright 1987, 1998 The Open Group +Copyright 2002 Red Hat Inc., Durham, North Carolina. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + * This file was originally taken from xc/lib/Xaw/TemplateP.h + */ + +#ifndef _CanvasP_h +#define _CanvasP_h + +#include "Canvas.h" + +/* include superclass private header file */ +#include + +typedef struct { + XtPointer extension; +} CanvasClassPart; + +typedef struct _CanvasClassRec { + CoreClassPart core_class; + CanvasClassPart canvas_class; +} CanvasClassRec; + +extern CanvasClassRec canvasClassRec; + +typedef struct { + XtCallbackList input_callback; + XtCallbackList expose_callback; + XtCallbackList resize_callback; +} CanvasPart; + +typedef struct _CanvasRec { + CorePart core; + CanvasPart canvas; +} CanvasRec; + +#endif /* _CanvasP_h */ diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am new file mode 100644 index 0000000..06588e7 --- /dev/null +++ b/hw/dmx/config/Makefile.am @@ -0,0 +1,71 @@ +SUBDIRS = man + +noinst_LIBRARIES = libdmxconfig.a + +LIBSRCS = parser.y \ + scanner.l \ + dmxparse.c \ + dmxparse.h \ + dmxprint.c \ + dmxprint.h \ + dmxcompat.c \ + dmxcompat.h \ + dmxconfig.c \ + dmxconfig.h + +parser.h: parser.c +scanner.c: scanner.l parser.h + +BUILT_SOURCES = parser.c parser.h scanner.c + +MAINTAINERCLEANFILES = $(BUILT_SOURCES) + +libdmxconfig_a_SOURCES = $(LIBSRCS) +libdmxconfig_a_SOURCES += $(top_srcdir)/os/strlcpy.c + +if GLX +GLX_DEFS = @GL_CFLAGS@ +endif + +AM_YFLAGS = -d +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -I$(top_srcdir)/hw/dmx \ + -DHAVE_DMX_CONFIG_H \ + -DDMX_LOG_STANDALONE \ + $(GLX_DEFS) \ + @DMXMODULES_CFLAGS@ + +bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx + +xdmxconfig_DEPENDENCIES = libdmxconfig.a +xdmxconfig_SOURCES = \ + xdmxconfig.c \ + $(top_srcdir)/hw/dmx/dmxlog.c \ + Canvas.c \ + Canvas.h \ + CanvasP.h +xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@ +xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@ + +vdltodmx_DEPENDENCIES = libdmxconfig.a +vdltodmx_SOURCES = vdltodmx.c +vdltodmx_LDADD = -L. -ldmxconfig + +dmxtodmx_DEPENDENCIES = libdmxconfig.a +dmxtodmx_SOURCES = dmxtodmx.c +dmxtodmx_LDADD = -L. -ldmxconfig + +EXTRA_DIST = \ + test-a.in test-a.out \ + test-b.in test-b.out \ + test-c.in test-c.out \ + test-d.in test-d.out \ + test-e.in test-e.out \ + test-f.in test-f.out \ + test-g.in test-g.out \ + test-h.in test-h.out \ + test-i.in test-i.out \ + test-j.in test-j.out \ + test-k.in test-k.out \ + test-l.in test-l.out diff --git a/hw/dmx/config/Makefile.in b/hw/dmx/config/Makefile.in new file mode 100644 index 0000000..44f7114 --- /dev/null +++ b/hw/dmx/config/Makefile.in @@ -0,0 +1,1117 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = xdmxconfig$(EXEEXT) vdltodmx$(EXEEXT) dmxtodmx$(EXEEXT) +subdir = hw/dmx/config +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO \ + parser.c parser.h scanner.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +libdmxconfig_a_AR = $(AR) $(ARFLAGS) +libdmxconfig_a_LIBADD = +am__objects_1 = parser.$(OBJEXT) scanner.$(OBJEXT) dmxparse.$(OBJEXT) \ + dmxprint.$(OBJEXT) dmxcompat.$(OBJEXT) dmxconfig.$(OBJEXT) +am_libdmxconfig_a_OBJECTS = $(am__objects_1) strlcpy.$(OBJEXT) +libdmxconfig_a_OBJECTS = $(am_libdmxconfig_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_dmxtodmx_OBJECTS = dmxtodmx.$(OBJEXT) +dmxtodmx_OBJECTS = $(am_dmxtodmx_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am_vdltodmx_OBJECTS = vdltodmx.$(OBJEXT) +vdltodmx_OBJECTS = $(am_vdltodmx_OBJECTS) +am_xdmxconfig_OBJECTS = xdmxconfig-xdmxconfig.$(OBJEXT) \ + xdmxconfig-dmxlog.$(OBJEXT) xdmxconfig-Canvas.$(OBJEXT) +xdmxconfig_OBJECTS = $(am_xdmxconfig_OBJECTS) +xdmxconfig_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xdmxconfig_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; +YLWRAP = $(top_srcdir)/ylwrap +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libdmxconfig_a_SOURCES) $(dmxtodmx_SOURCES) \ + $(vdltodmx_SOURCES) $(xdmxconfig_SOURCES) +DIST_SOURCES = $(libdmxconfig_a_SOURCES) $(dmxtodmx_SOURCES) \ + $(vdltodmx_SOURCES) $(xdmxconfig_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = man +noinst_LIBRARIES = libdmxconfig.a +LIBSRCS = parser.y \ + scanner.l \ + dmxparse.c \ + dmxparse.h \ + dmxprint.c \ + dmxprint.h \ + dmxcompat.c \ + dmxcompat.h \ + dmxconfig.c \ + dmxconfig.h + +BUILT_SOURCES = parser.c parser.h scanner.c +MAINTAINERCLEANFILES = $(BUILT_SOURCES) +libdmxconfig_a_SOURCES = $(LIBSRCS) $(top_srcdir)/os/strlcpy.c +@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@ +AM_YFLAGS = -d +AM_CFLAGS = \ + $(DIX_CFLAGS) \ + -I$(top_srcdir)/hw/dmx \ + -DHAVE_DMX_CONFIG_H \ + -DDMX_LOG_STANDALONE \ + $(GLX_DEFS) \ + @DMXMODULES_CFLAGS@ + +xdmxconfig_DEPENDENCIES = libdmxconfig.a +xdmxconfig_SOURCES = \ + xdmxconfig.c \ + $(top_srcdir)/hw/dmx/dmxlog.c \ + Canvas.c \ + Canvas.h \ + CanvasP.h + +xdmxconfig_LDADD = -L. -ldmxconfig @XDMXCONFIG_DEP_LIBS@ +xdmxconfig_CFLAGS = $(AM_CFLAGS) @XDMXCONFIG_DEP_CFLAGS@ +vdltodmx_DEPENDENCIES = libdmxconfig.a +vdltodmx_SOURCES = vdltodmx.c +vdltodmx_LDADD = -L. -ldmxconfig +dmxtodmx_DEPENDENCIES = libdmxconfig.a +dmxtodmx_SOURCES = dmxtodmx.c +dmxtodmx_LDADD = -L. -ldmxconfig +EXTRA_DIST = \ + test-a.in test-a.out \ + test-b.in test-b.out \ + test-c.in test-c.out \ + test-d.in test-d.out \ + test-e.in test-e.out \ + test-f.in test-f.out \ + test-g.in test-g.out \ + test-h.in test-h.out \ + test-i.in test-i.out \ + test-j.in test-j.out \ + test-k.in test-k.out \ + test-l.in test-l.out + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .l .lo .o .obj .y +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/config/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/dmx/config/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libdmxconfig.a: $(libdmxconfig_a_OBJECTS) $(libdmxconfig_a_DEPENDENCIES) $(EXTRA_libdmxconfig_a_DEPENDENCIES) + $(AM_V_at)-rm -f libdmxconfig.a + $(AM_V_AR)$(libdmxconfig_a_AR) libdmxconfig.a $(libdmxconfig_a_OBJECTS) $(libdmxconfig_a_LIBADD) + $(AM_V_at)$(RANLIB) libdmxconfig.a +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +dmxtodmx$(EXEEXT): $(dmxtodmx_OBJECTS) $(dmxtodmx_DEPENDENCIES) $(EXTRA_dmxtodmx_DEPENDENCIES) + @rm -f dmxtodmx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dmxtodmx_OBJECTS) $(dmxtodmx_LDADD) $(LIBS) +vdltodmx$(EXEEXT): $(vdltodmx_OBJECTS) $(vdltodmx_DEPENDENCIES) $(EXTRA_vdltodmx_DEPENDENCIES) + @rm -f vdltodmx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vdltodmx_OBJECTS) $(vdltodmx_LDADD) $(LIBS) +xdmxconfig$(EXEEXT): $(xdmxconfig_OBJECTS) $(xdmxconfig_DEPENDENCIES) $(EXTRA_xdmxconfig_DEPENDENCIES) + @rm -f xdmxconfig$(EXEEXT) + $(AM_V_CCLD)$(xdmxconfig_LINK) $(xdmxconfig_OBJECTS) $(xdmxconfig_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxcompat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxconfig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxparse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxprint.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxtodmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanner.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdltodmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-Canvas.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-dmxlog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmxconfig-xdmxconfig.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +strlcpy.o: $(top_srcdir)/os/strlcpy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.o -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.o `test -f '$(top_srcdir)/os/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcpy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/os/strlcpy.c' object='strlcpy.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.o `test -f '$(top_srcdir)/os/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcpy.c + +strlcpy.obj: $(top_srcdir)/os/strlcpy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strlcpy.obj -MD -MP -MF $(DEPDIR)/strlcpy.Tpo -c -o strlcpy.obj `if test -f '$(top_srcdir)/os/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcpy.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strlcpy.Tpo $(DEPDIR)/strlcpy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/os/strlcpy.c' object='strlcpy.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strlcpy.obj `if test -f '$(top_srcdir)/os/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcpy.c'; fi` + +xdmxconfig-xdmxconfig.o: xdmxconfig.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-xdmxconfig.o -MD -MP -MF $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo -c -o xdmxconfig-xdmxconfig.o `test -f 'xdmxconfig.c' || echo '$(srcdir)/'`xdmxconfig.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo $(DEPDIR)/xdmxconfig-xdmxconfig.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xdmxconfig.c' object='xdmxconfig-xdmxconfig.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-xdmxconfig.o `test -f 'xdmxconfig.c' || echo '$(srcdir)/'`xdmxconfig.c + +xdmxconfig-xdmxconfig.obj: xdmxconfig.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-xdmxconfig.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo -c -o xdmxconfig-xdmxconfig.obj `if test -f 'xdmxconfig.c'; then $(CYGPATH_W) 'xdmxconfig.c'; else $(CYGPATH_W) '$(srcdir)/xdmxconfig.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-xdmxconfig.Tpo $(DEPDIR)/xdmxconfig-xdmxconfig.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xdmxconfig.c' object='xdmxconfig-xdmxconfig.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-xdmxconfig.obj `if test -f 'xdmxconfig.c'; then $(CYGPATH_W) 'xdmxconfig.c'; else $(CYGPATH_W) '$(srcdir)/xdmxconfig.c'; fi` + +xdmxconfig-dmxlog.o: $(top_srcdir)/hw/dmx/dmxlog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-dmxlog.o -MD -MP -MF $(DEPDIR)/xdmxconfig-dmxlog.Tpo -c -o xdmxconfig-dmxlog.o `test -f '$(top_srcdir)/hw/dmx/dmxlog.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/dmxlog.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-dmxlog.Tpo $(DEPDIR)/xdmxconfig-dmxlog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/hw/dmx/dmxlog.c' object='xdmxconfig-dmxlog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-dmxlog.o `test -f '$(top_srcdir)/hw/dmx/dmxlog.c' || echo '$(srcdir)/'`$(top_srcdir)/hw/dmx/dmxlog.c + +xdmxconfig-dmxlog.obj: $(top_srcdir)/hw/dmx/dmxlog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-dmxlog.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-dmxlog.Tpo -c -o xdmxconfig-dmxlog.obj `if test -f '$(top_srcdir)/hw/dmx/dmxlog.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/dmxlog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/dmxlog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-dmxlog.Tpo $(DEPDIR)/xdmxconfig-dmxlog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/hw/dmx/dmxlog.c' object='xdmxconfig-dmxlog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-dmxlog.obj `if test -f '$(top_srcdir)/hw/dmx/dmxlog.c'; then $(CYGPATH_W) '$(top_srcdir)/hw/dmx/dmxlog.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/hw/dmx/dmxlog.c'; fi` + +xdmxconfig-Canvas.o: Canvas.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-Canvas.o -MD -MP -MF $(DEPDIR)/xdmxconfig-Canvas.Tpo -c -o xdmxconfig-Canvas.o `test -f 'Canvas.c' || echo '$(srcdir)/'`Canvas.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-Canvas.Tpo $(DEPDIR)/xdmxconfig-Canvas.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Canvas.c' object='xdmxconfig-Canvas.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-Canvas.o `test -f 'Canvas.c' || echo '$(srcdir)/'`Canvas.c + +xdmxconfig-Canvas.obj: Canvas.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -MT xdmxconfig-Canvas.obj -MD -MP -MF $(DEPDIR)/xdmxconfig-Canvas.Tpo -c -o xdmxconfig-Canvas.obj `if test -f 'Canvas.c'; then $(CYGPATH_W) 'Canvas.c'; else $(CYGPATH_W) '$(srcdir)/Canvas.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xdmxconfig-Canvas.Tpo $(DEPDIR)/xdmxconfig-Canvas.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='Canvas.c' object='xdmxconfig-Canvas.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdmxconfig_CFLAGS) $(CFLAGS) -c -o xdmxconfig-Canvas.obj `if test -f 'Canvas.c'; then $(CYGPATH_W) 'Canvas.c'; else $(CYGPATH_W) '$(srcdir)/Canvas.c'; fi` + +.l.c: + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(LIBRARIES) $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(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-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f parser.c + -rm -f parser.h + -rm -f scanner.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-noinstLIBRARIES ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS + + +parser.h: parser.c +scanner.c: scanner.l parser.h + +# 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/hw/dmx/config/TODO b/hw/dmx/config/TODO new file mode 100644 index 0000000..2998ff4 --- /dev/null +++ b/hw/dmx/config/TODO @@ -0,0 +1,7 @@ +Fri May 31 13:20:17 2002 + +1) Sanitize values from input boxes. + +2) Add canvas colors to cavas widget resources or to command-line options. + +3) Add ability to edit option line(s) and wall. diff --git a/hw/dmx/config/dmxcompat.c b/hw/dmx/config/dmxcompat.c new file mode 100644 index 0000000..107991a --- /dev/null +++ b/hw/dmx/config/dmxcompat.c @@ -0,0 +1,236 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + */ + +/** \file + * This file provides some compatibility support for reading VDL files + * that are used by xmovie + * (http://www.llnl.gov/icc/sdd/img/xmovie/xmovie.shtml). + * + * This file is not used by the DMX server. + */ + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "os.h" +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxcompat.h" +#include "parser.h" +#include +#include +#include +#include + +static int +dmxVDLReadLine(FILE * str, char *buf, int len) +{ + if (fgets(buf, len, str)) + return strlen(buf); + return 0; +} + +static int +dmxVDLCount(const char *buf) +{ + return strtol(buf, NULL, 10); +} + +static void +dmxVDLVirtualEntry(const char *buf, char *name, int *len, int *x, int *y) +{ + char *end; + const char *s; + char *d; + int start; + + *x = strtol(buf, &end, 10); + *y = strtol(end, &end, 10); + + for (s = end, d = name, start = 1; *s && *s != '['; ++s) { + if (start && isspace(*s)) + continue; + *d++ = *s; + start = 0; + } + *d = '\0'; + while (d > name && isspace(d[-1])) + *--d = '\0'; /* remove trailing space */ + *len = strlen(name); +} + +static void +dmxVDLDisplayEntry(const char *buf, + char *name, int *len, + int *x, int *y, int *xoff, int *yoff, int *xorig, int *yorig) +{ + const char *pt; + char *end; + + pt = strchr(buf, ' '); + strlcpy(name, buf, 1 + pt - buf); + *len = strlen(name); + + *x = strtol(pt, &end, 10); + *y = strtol(end, &end, 10); + *xorig = strtol(end, &end, 10); + *yorig = strtol(end, &end, 10); + *xoff = strtol(end, &end, 10); + *yoff = strtol(end, NULL, 10); +} + +/** Read from the VDL format \a filename and return a newly allocated \a + * DMXConfigEntryPtr */ +DMXConfigEntryPtr +dmxVDLRead(const char *filename) +{ + FILE *str; + char buf[2048]; /* RATS: Use ok */ + char *pt; + int lineno = 0; + DMXConfigEntryPtr entry = NULL; + DMXConfigVirtualPtr virtual = NULL; + DMXConfigSubPtr sub = NULL; + DMXConfigDisplayPtr display = NULL; + DMXConfigFullDimPtr fdim = NULL; + int vcount = 0; + int dcount = 0; + int icount = 0; + int x, y, xoff, yoff, xorig, yorig; + char name[2048]; /* RATS: Use ok */ + const char *tmp; + int len; + enum { + simulateFlag, + virtualCount, + virtualEntry, + displayCount, + displayEntry, + ignoreCount, + ignoreEntry + } state = simulateFlag; + + if (!filename) + str = stdin; + else + str = fopen(filename, "r"); + if (!str) + return NULL; + + while (dmxVDLReadLine(str, buf, sizeof(buf))) { + DMXConfigCommentPtr comment = NULL; + + ++lineno; + for (pt = buf; *pt; pt++) + if (*pt == '\r' || *pt == '\n') { + *pt = '\0'; + break; + } + if (buf[0] == '#') { + tmp = dmxConfigCopyString(buf + 1, strlen(buf + 1)); + comment = dmxConfigCreateComment(T_COMMENT, lineno, tmp); + entry = dmxConfigAddEntry(entry, dmxConfigComment, comment, NULL); + continue; + } + switch (state) { + case simulateFlag: + state = virtualCount; + break; + case virtualCount: + vcount = dmxVDLCount(buf); + state = virtualEntry; + break; + case virtualEntry: + len = sizeof(name); + dmxVDLVirtualEntry(buf, name, &len, &x, &y); + tmp = dmxConfigCopyString(name, len); + virtual = dmxConfigCreateVirtual(NULL, + dmxConfigCreateString(T_STRING, + lineno, + NULL, + tmp), + dmxConfigCreatePair(T_DIMENSION, + lineno, + NULL, + x, y, 0, 0), + NULL, NULL, NULL); + state = displayCount; + break; + case displayCount: + dcount = dmxVDLCount(buf); + state = displayEntry; + break; + case displayEntry: + dmxVDLDisplayEntry(buf, name, &len, &x, &y, &xoff, &yoff, + &xorig, &yorig); + tmp = dmxConfigCopyString(name, len); + fdim = + dmxConfigCreateFullDim(dmxConfigCreatePartDim + (dmxConfigCreatePair + (T_DIMENSION, lineno, NULL, x, y, 0, 0), + dmxConfigCreatePair(T_OFFSET, lineno, + NULL, xoff, yoff, + xoff, yoff)), NULL); + display = + dmxConfigCreateDisplay(NULL, + dmxConfigCreateString(T_STRING, lineno, + NULL, tmp), fdim, + dmxConfigCreatePair(T_ORIGIN, lineno, + NULL, xorig, yorig, + 0, 0), NULL); + sub = dmxConfigAddSub(sub, dmxConfigSubDisplay(display)); + if (!--dcount) { + state = ignoreCount; + virtual->subentry = sub; + entry = dmxConfigAddEntry(entry, + dmxConfigVirtual, NULL, virtual); + virtual = NULL; + sub = NULL; + } + break; + case ignoreCount: + icount = dmxVDLCount(buf); + state = ignoreEntry; + break; + case ignoreEntry: + if (!--icount) + state = virtualEntry; + break; + } + } + + if (str != stdin) + fclose(str); + + return entry; +} diff --git a/hw/dmx/config/dmxcompat.h b/hw/dmx/config/dmxcompat.h new file mode 100644 index 0000000..7188920 --- /dev/null +++ b/hw/dmx/config/dmxcompat.h @@ -0,0 +1,44 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +/** \file + * Interface to VDL compatibility support. \see dmxcompat.c + * + * This file is not used by the DMX server. + */ + +#ifndef _DMXCOMPAT_H_ +#define _DMXCOMPAT_H_ + +extern DMXConfigEntryPtr dmxVDLRead(const char *filename); +#endif diff --git a/hw/dmx/config/dmxconfig.c b/hw/dmx/config/dmxconfig.c new file mode 100644 index 0000000..2cc9ab3 --- /dev/null +++ b/hw/dmx/config/dmxconfig.c @@ -0,0 +1,561 @@ +/* + * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +/** \file + * Provides interface for reading DMX configuration files and for + * combining that information with command-line configuration parameters. */ + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmx.h" +#include "dmxinput.h" +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxlog.h" +#include "dmxcb.h" +#include "dmxstat.h" +#include "parser.h" + +extern int yyparse(void); +extern FILE *yyin; + +static char *dmxXkbRules; +static char *dmxXkbModel; +static char *dmxXkbLayout; +static char *dmxXkbVariant; +static char *dmxXkbOptions; + +/** Stores lists of configuration information. */ +typedef struct DMXConfigListStruct { + const char *name; + struct DMXConfigListStruct *next; +} DMXConfigList, *DMXConfigListPtr; + +/** This stucture stores the parsed configuration information. */ +typedef struct DMXConfigCmdStruct { + const char *filename; + const char *config; + DMXConfigList *displays; + DMXConfigList *inputs; + DMXConfigList *xinputs; +} DMXConfigCmd, *DMXConfigCmdPtr; + +DMXConfigEntryPtr dmxConfigEntry; +static DMXConfigCmd dmxConfigCmd; + +static int dmxDisplaysFromCommandLine; + +/** Make a note that \a display is the name of an X11 display that + * should be initialized as a backend (output) display. Called from + * #ddxProcessArgument. */ +void +dmxConfigStoreDisplay(const char *display) +{ + DMXConfigListPtr entry = malloc(sizeof(*entry)); + + entry->name = strdup(display); + entry->next = NULL; + if (!dmxConfigCmd.displays) + dmxConfigCmd.displays = entry; + else { + DMXConfigList *pt; + + for (pt = dmxConfigCmd.displays; pt->next; pt = pt->next); + if (!pt) + dmxLog(dmxFatal, "dmxConfigStoreDisplay: end of list non-NULL\n"); + pt->next = entry; + } + ++dmxDisplaysFromCommandLine; +} + +/** Make a note that \a input is the name of an X11 display that should + * be used for input (either a backend or a console input device). */ +void +dmxConfigStoreInput(const char *input) +{ + DMXConfigListPtr entry = malloc(sizeof(*entry)); + + entry->name = strdup(input); + entry->next = NULL; + if (!dmxConfigCmd.inputs) + dmxConfigCmd.inputs = entry; + else { + DMXConfigList *pt; + + for (pt = dmxConfigCmd.inputs; pt->next; pt = pt->next); + if (!pt) + dmxLog(dmxFatal, "dmxConfigStoreInput: end of list non-NULL\n"); + pt->next = entry; + } +} + +/** Make a note that \a input is the name of an X11 display that should + * be used for input from XInput extension devices. */ +void +dmxConfigStoreXInput(const char *input) +{ + DMXConfigListPtr entry = malloc(sizeof(*entry)); + + entry->name = strdup(input); + entry->next = NULL; + if (!dmxConfigCmd.xinputs) + dmxConfigCmd.xinputs = entry; + else { + DMXConfigList *pt; + + for (pt = dmxConfigCmd.xinputs; pt->next; pt = pt->next); + if (!pt) + dmxLog(dmxFatal, "dmxConfigStoreXInput: end of list non-NULL\n"); + pt->next = entry; + } +} + +/** Make a note that \a file is the configuration file. */ +void +dmxConfigStoreFile(const char *file) +{ + if (dmxConfigCmd.filename) + dmxLog(dmxFatal, "Only one -configfile allowed\n"); + dmxConfigCmd.filename = strdup(file); +} + +/** Make a note that \a config should be used as the configuration for + * current instantiation of the DMX server. */ +void +dmxConfigStoreConfig(const char *config) +{ + if (dmxConfigCmd.config) + dmxLog(dmxFatal, "Only one -config allowed\n"); + dmxConfigCmd.config = strdup(config); +} + +static int +dmxConfigReadFile(const char *filename, int debug) +{ + FILE *str; + + if (!(str = fopen(filename, "r"))) + return -1; + dmxLog(dmxInfo, "Reading configuration file \"%s\"\n", filename); + yyin = str; + yydebug = debug; + yyparse(); + fclose(str); + return 0; +} + +static const char * +dmxConfigMatch(const char *target, DMXConfigEntryPtr entry) +{ + DMXConfigVirtualPtr v = entry->virtual; + const char *name = NULL; + + if (v && v->name) + name = v->name; + + if (v && !dmxConfigCmd.config) + return v->name ? v->name : ""; + if (!name) + return NULL; + if (!strcmp(name, target)) + return name; + return NULL; +} + +static DMXScreenInfo * +dmxConfigAddDisplay(const char *name, + int scrnWidth, int scrnHeight, + int scrnX, int scrnY, + int scrnXSign, int scrnYSign, + int rootWidth, int rootHeight, + int rootX, int rootY, int rootXSign, int rootYSign) +{ + DMXScreenInfo *dmxScreen; + + if (!(dmxScreens = realloc(dmxScreens, + (dmxNumScreens + 1) * sizeof(*dmxScreens)))) + dmxLog(dmxFatal, + "dmxConfigAddDisplay: realloc failed for screen %d (%s)\n", + dmxNumScreens, name); + + dmxScreen = &dmxScreens[dmxNumScreens]; + memset(dmxScreen, 0, sizeof(*dmxScreen)); + dmxScreen->name = name; + dmxScreen->index = dmxNumScreens; + dmxScreen->scrnWidth = scrnWidth; + dmxScreen->scrnHeight = scrnHeight; + dmxScreen->scrnX = scrnX; + dmxScreen->scrnY = scrnY; + dmxScreen->scrnXSign = scrnXSign; + dmxScreen->scrnYSign = scrnYSign; + dmxScreen->rootWidth = rootWidth; + dmxScreen->rootHeight = rootHeight; + dmxScreen->rootX = rootX; + dmxScreen->rootY = rootY; + dmxScreen->stat = dmxStatAlloc(); + ++dmxNumScreens; + return dmxScreen; +} + +DMXInputInfo * +dmxConfigAddInput(const char *name, int core) +{ + DMXInputInfo *dmxInput; + + if (!(dmxInputs = realloc(dmxInputs, + (dmxNumInputs + 1) * sizeof(*dmxInputs)))) + dmxLog(dmxFatal, + "dmxConfigAddInput: realloc failed for input %d (%s)\n", + dmxNumInputs, name); + + dmxInput = &dmxInputs[dmxNumInputs]; + + memset(dmxInput, 0, sizeof(*dmxInput)); + dmxInput->name = name; + dmxInput->inputIdx = dmxNumInputs; + dmxInput->scrnIdx = -1; + dmxInput->core = core; + ++dmxNumInputs; + return dmxInput; +} + +static void +dmxConfigCopyFromDisplay(DMXConfigDisplayPtr d) +{ + DMXScreenInfo *dmxScreen; + + dmxScreen = dmxConfigAddDisplay(d->name, + d->scrnWidth, d->scrnHeight, + d->scrnX, d->scrnY, + d->scrnXSign, d->scrnYSign, + d->rootWidth, d->rootHeight, + d->rootX, d->rootY, + d->rootXSign, d->rootXSign); + dmxScreen->where = PosAbsolute; + dmxScreen->whereX = d->rootXOrigin; + dmxScreen->whereY = d->rootYOrigin; +} + +static void +dmxConfigCopyFromWall(DMXConfigWallPtr w) +{ + DMXConfigStringPtr pt; + DMXScreenInfo *dmxScreen; + int edge = dmxNumScreens; + int last = dmxNumScreens; + + if (!w->xwall && !w->ywall) { /* Try to make it square */ + int count; + + for (pt = w->nameList, count = 0; pt; pt = pt->next) + ++count; + w->xwall = sqrt(count) + .5; + } + + for (pt = w->nameList; pt; pt = pt->next) { + dmxScreen = dmxConfigAddDisplay(pt->string, w->width, w->height, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + if (pt == w->nameList) { /* Upper left */ + dmxScreen->where = PosAbsolute; + dmxScreen->whereX = 0; + dmxScreen->whereY = 0; + } + else if (w->xwall) { /* Tile left to right, then top to bottom */ + if (!((dmxNumScreens - 1) % w->xwall)) { + dmxScreen->where = PosBelow; + dmxScreen->whereRefScreen = edge; + edge = dmxNumScreens - 1; + } + else { + dmxScreen->where = PosRightOf; + dmxScreen->whereRefScreen = last; + } + } + else { /* Tile top to bottom, then left to right */ + if (!((dmxNumScreens - 1) % w->ywall)) { + dmxScreen->where = PosRightOf; + dmxScreen->whereRefScreen = edge; + edge = dmxNumScreens - 1; + } + else { + dmxScreen->where = PosBelow; + dmxScreen->whereRefScreen = last; + } + + } + last = dmxNumScreens - 1; + if (dmxScreen->where == PosAbsolute) + dmxLog(dmxInfo, "Added %s at %d %d\n", + pt->string, dmxScreen->whereX, dmxScreen->whereY); + else + dmxLog(dmxInfo, "Added %s %s %s\n", + pt->string, + dmxScreen->where == PosBelow ? "below" : "right of", + dmxScreens[dmxScreen->whereRefScreen].name); + } +} + +static void +dmxConfigCopyFromOption(DMXConfigOptionPtr o) +{ + DMXConfigStringPtr pt; + int argc = 0; + char **argv = NULL; + + if (serverGeneration != 1) + return; /* FIXME: only do once, for now */ + if (!o || !o->string) + return; + for (pt = o->option; pt; pt = pt->next) { + if (pt->string) { + ++argc; + argv = realloc(argv, (argc + 1) * sizeof(*argv)); + argv[argc] = (char *) pt->string; + } + } + argv[0] = NULL; + ProcessCommandLine(argc + 1, argv); + free(argv); +} + +static void +dmxConfigCopyFromParam(DMXConfigParamPtr p) +{ + const char **argv; + int argc; + + if ((argv = dmxConfigLookupParam(p, "xkbrules", &argc)) && argc == 2) { + dmxConfigSetXkbRules(argv[1]); + } + else if ((argv = dmxConfigLookupParam(p, "xkbmodel", &argc)) + && argc == 2) { + dmxConfigSetXkbModel(argv[1]); + } + else if ((argv = dmxConfigLookupParam(p, "xkblayout", &argc)) + && argc == 2) { + dmxConfigSetXkbLayout(argv[1]); + } + else if ((argv = dmxConfigLookupParam(p, "xkbvariant", &argc)) + && argc == 2) { + dmxConfigSetXkbVariant(argv[1]); + } + else if ((argv = dmxConfigLookupParam(p, "xkboptions", &argc)) + && argc == 2) { + dmxConfigSetXkbOptions(argv[1]); + } +} + +static void +dmxConfigCopyData(DMXConfigVirtualPtr v) +{ + DMXConfigSubPtr sub; + + if (v->dim) + dmxSetWidthHeight(v->dim->x, v->dim->y); + else + dmxSetWidthHeight(0, 0); + for (sub = v->subentry; sub; sub = sub->next) { + switch (sub->type) { + case dmxConfigDisplay: + dmxConfigCopyFromDisplay(sub->display); + break; + case dmxConfigWall: + dmxConfigCopyFromWall(sub->wall); + break; + case dmxConfigOption: + dmxConfigCopyFromOption(sub->option); + break; + case dmxConfigParam: + dmxConfigCopyFromParam(sub->param); + break; + default: + dmxLog(dmxFatal, + "dmxConfigCopyData: not a display, wall, or value\n"); + } + } +} + +static void +dmxConfigFromCommandLine(void) +{ + DMXConfigListPtr pt; + + dmxLog(dmxInfo, "Using configuration from command line\n"); + for (pt = dmxConfigCmd.displays; pt; pt = pt->next) { + DMXScreenInfo *dmxScreen = dmxConfigAddDisplay(pt->name, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0); + + if (dmxNumScreens == 1) { + dmxScreen->where = PosAbsolute; + dmxScreen->whereX = 0; + dmxScreen->whereY = 0; + dmxLog(dmxInfo, "Added %s at %d %d\n", + dmxScreen->name, dmxScreen->whereX, dmxScreen->whereY); + } + else { + dmxScreen->where = PosRightOf; + dmxScreen->whereRefScreen = dmxNumScreens - 2; + if (dmxScreen->whereRefScreen < 0) + dmxScreen->whereRefScreen = 0; + dmxLog(dmxInfo, "Added %s %s %s\n", + dmxScreen->name, + dmxScreen->where == PosBelow ? "below" : "right of", + dmxScreens[dmxScreen->whereRefScreen].name); + } + } +} + +static void +dmxConfigFromConfigFile(void) +{ + DMXConfigEntryPtr pt; + const char *name; + + for (pt = dmxConfigEntry; pt; pt = pt->next) { + /* FIXME -- if an input is specified, use it */ + if (pt->type != dmxConfigVirtual) + continue; + if ((name = dmxConfigMatch(dmxConfigCmd.config, pt))) { + dmxLog(dmxInfo, "Using configuration \"%s\"\n", name); + dmxConfigCopyData(pt->virtual); + return; + } + } + dmxLog(dmxFatal, "Could not find configuration \"%s\" in \"%s\"\n", + dmxConfigCmd.config, dmxConfigCmd.filename); +} + +static void +dmxConfigConfigInputs(void) +{ + DMXConfigListPtr pt; + + if (dmxNumInputs) + return; + + if (dmxConfigCmd.inputs) { /* Use command line */ + for (pt = dmxConfigCmd.inputs; pt; pt = pt->next) + dmxConfigAddInput(pt->name, TRUE); + } + else if (dmxNumScreens) { /* Use first display */ + dmxConfigAddInput(dmxScreens[0].name, TRUE); + } + else { /* Use dummy */ + dmxConfigAddInput("dummy", TRUE); + } + + if (dmxConfigCmd.xinputs) { /* Non-core devices from command line */ + for (pt = dmxConfigCmd.xinputs; pt; pt = pt->next) + dmxConfigAddInput(pt->name, FALSE); + } +} + +/** Set up the appropriate global variables so that the DMX server will + * be initialized using the configuration specified in the config file + * and on the command line. */ +void +dmxConfigConfigure(void) +{ + if (dmxConfigEntry) { + dmxConfigFreeEntry(dmxConfigEntry); + dmxConfigEntry = NULL; + } + if (dmxConfigCmd.filename) { + if (dmxConfigCmd.displays) + dmxLog(dmxWarning, + "Using configuration file \"%s\" instead of command line\n", + dmxConfigCmd.filename); + dmxConfigReadFile(dmxConfigCmd.filename, 0); + dmxConfigFromConfigFile(); + } + else { + if (dmxConfigCmd.config) + dmxLog(dmxWarning, + "Configuration name (%s) without configuration file\n", + dmxConfigCmd.config); + dmxConfigFromCommandLine(); + } + dmxConfigConfigInputs(); +} + +/** This function determines the number of displays we WILL have and + * sets MAXSCREENS to that value. This is difficult since the number + * depends on the command line (which is easy to count) or on the config + * file, which has to be parsed. */ +void +dmxConfigSetMaxScreens(void) +{ + static int processing = 0; + + if (processing) + return; /* Prevent reentry via ProcessCommandLine */ + processing = 1; + if (dmxConfigCmd.filename) { + if (!dmxNumScreens) + dmxConfigConfigure(); +#ifndef MAXSCREENS + SetMaxScreens(dmxNumScreens); +#endif + } + else +#ifndef MAXSCREENS + SetMaxScreens(dmxDisplaysFromCommandLine); +#endif + processing = 0; +} + +/** This macro is used to generate the following access methods: + * - dmxConfig{Set,Get}rules + * - dmxConfig{Set,Get}model + * - dmxConfig{Set,Get}layout + * - dmxConfig{Set,Get}variant + * - dmxConfig{Set,Get}options + * These methods are used to read and write information about the keyboard. */ + +#define GEN(param,glob,def) \ + void dmxConfigSet##glob(const char *param) { \ + if (dmx##glob) free((void *)dmx##glob); \ + dmx##glob = strdup(param); \ + } \ + char *dmxConfigGet##glob(void) { \ + return (char *)(dmx##glob ? dmx##glob : def); \ + } + +GEN(rules, XkbRules, XKB_DFLT_RULES) + GEN(model, XkbModel, XKB_DFLT_MODEL) + GEN(layout, XkbLayout, XKB_DFLT_LAYOUT) + GEN(variant, XkbVariant, XKB_DFLT_VARIANT) + GEN(options, XkbOptions, XKB_DFLT_OPTIONS) diff --git a/hw/dmx/config/dmxconfig.h b/hw/dmx/config/dmxconfig.h new file mode 100644 index 0000000..deb293c --- /dev/null +++ b/hw/dmx/config/dmxconfig.h @@ -0,0 +1,61 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +/** \file + * Interface for DMX configuration file support. \see dmxconfig.c */ + +#ifndef _DMXCONFIG_H_ +#define _DMXCONFIG_H_ + +#include + +extern void dmxConfigStoreDisplay(const char *display); +extern void dmxConfigStoreInput(const char *input); /* Core devices */ +extern void dmxConfigStoreXInput(const char *input); /* Non-core devices */ +extern void dmxConfigStoreFile(const char *file); +extern void dmxConfigStoreConfig(const char *config); +extern void dmxConfigConfigure(void); +extern void dmxConfigSetMaxScreens(void); + +extern void dmxConfigSetXkbRules(const char *rules); +extern void dmxConfigSetXkbModel(const char *model); +extern void dmxConfigSetXkbLayout(const char *layout); +extern void dmxConfigSetXkbVariant(const char *variant); +extern void dmxConfigSetXkbOptions(const char *options); + +extern char *dmxConfigGetXkbRules(void); +extern char *dmxConfigGetXkbModel(void); +extern char *dmxConfigGetXkbLayout(void); +extern char *dmxConfigGetXkbVariant(void); +extern char *dmxConfigGetXkbOptions(void); +#endif diff --git a/hw/dmx/config/dmxparse.c b/hw/dmx/config/dmxparse.c new file mode 100644 index 0000000..cf51084 --- /dev/null +++ b/hw/dmx/config/dmxparse.c @@ -0,0 +1,688 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +/** \file + * + * This file provides support routines and helper functions to be used + * by the DMX configuration file parser. + * + * Because the DMX configuration file parsing should be capable of being + * used in a stand-alone fashion (i.e., independent from the DMX server + * source tree), no dependencies on other DMX routines are made. */ + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include "dmxparse.h" + +/** A general error logging routine that does not depend on the dmxLog + * functions. */ +void +dmxConfigLog(const char *format, ...) +{ + va_list args; + + va_start(args, format); + vprintf(format, args); /* RATS: All calls to dmxConfigLog from + * dmxparse.c and dmxprint.c use a + * trusted format. */ + va_end(args); +} + +void * +dmxConfigAlloc(unsigned long bytes) +{ + void *area = calloc(1, bytes); + + if (!area) { + dmxConfigLog("dmxConfigAlloc: out of memory\n"); + return NULL; + } + return area; +} + +void * +dmxConfigRealloc(void *orig, unsigned long orig_bytes, unsigned long bytes) +{ + unsigned char *area = realloc(orig, bytes); + + if (!area) { + dmxConfigLog("dmxConfigRealloc: out of memory\n"); + return NULL; + } + memset(area + orig_bytes, 0, bytes - orig_bytes); + return area; +} + +const char * +dmxConfigCopyString(const char *string, int length) +{ + char *copy; + + if (!length) + length = strlen(string); + copy = dmxConfigAlloc(length + 1); + if (length) + strncpy(copy, string, length); + copy[length] = '\0'; + return copy; +} + +void +dmxConfigFree(void *area) +{ + free(area); +} + +DMXConfigTokenPtr +dmxConfigCreateToken(int token, int line, const char *comment) +{ + DMXConfigTokenPtr pToken = dmxConfigAlloc(sizeof(*pToken)); + + pToken->token = token; + pToken->line = line; + pToken->comment = comment; + return pToken; +} + +void +dmxConfigFreeToken(DMXConfigTokenPtr p) +{ + if (!p) + return; + dmxConfigFree((void *) p->comment); + dmxConfigFree(p); +} + +DMXConfigStringPtr +dmxConfigCreateString(int token, int line, + const char *comment, const char *string) +{ + DMXConfigStringPtr pString = dmxConfigAlloc(sizeof(*pString)); + + pString->token = token; + pString->line = line; + pString->comment = comment; + pString->string = string; + return pString; +} + +void +dmxConfigFreeString(DMXConfigStringPtr p) +{ + DMXConfigStringPtr next; + + if (!p) + return; + do { + next = p->next; + dmxConfigFree((void *) p->comment); + dmxConfigFree((void *) p->string); + dmxConfigFree(p); + } while ((p = next)); +} + +DMXConfigNumberPtr +dmxConfigCreateNumber(int token, int line, const char *comment, int number) +{ + DMXConfigNumberPtr pNumber = dmxConfigAlloc(sizeof(*pNumber)); + + pNumber->token = token; + pNumber->line = line; + pNumber->comment = comment; + pNumber->number = number; + return pNumber; +} + +void +dmxConfigFreeNumber(DMXConfigNumberPtr p) +{ + if (!p) + return; + dmxConfigFree((void *) p->comment); + dmxConfigFree(p); +} + +DMXConfigPairPtr +dmxConfigCreatePair(int token, int line, + const char *comment, int x, int y, int xsign, int ysign) +{ + DMXConfigPairPtr pPair = dmxConfigAlloc(sizeof(*pPair)); + + pPair->token = token; + pPair->line = line; + pPair->comment = comment; + pPair->x = x; + pPair->y = y; + pPair->xsign = (xsign < 0) ? -1 : 1; + pPair->ysign = (ysign < 0) ? -1 : 1; + return pPair; +} + +void +dmxConfigFreePair(DMXConfigPairPtr p) +{ + if (!p) + return; + dmxConfigFree((void *) p->comment); + dmxConfigFree(p); +} + +DMXConfigCommentPtr +dmxConfigCreateComment(int token, int line, const char *comment) +{ + DMXConfigCommentPtr pComment = dmxConfigAlloc(sizeof(*pComment)); + + pComment->token = token; + pComment->line = line; + pComment->comment = comment; + return pComment; +} + +void +dmxConfigFreeComment(DMXConfigCommentPtr p) +{ + if (!p) + return; + dmxConfigFree((void *) p->comment); + dmxConfigFree(p); +} + +DMXConfigPartDimPtr +dmxConfigCreatePartDim(DMXConfigPairPtr pDim, DMXConfigPairPtr pOffset) +{ + DMXConfigPartDimPtr pPart = dmxConfigAlloc(sizeof(*pPart)); + + pPart->dim = pDim; + pPart->offset = pOffset; + return pPart; +} + +void +dmxConfigFreePartDim(DMXConfigPartDimPtr p) +{ + if (!p) + return; + dmxConfigFreePair(p->dim); + dmxConfigFreePair(p->offset); + dmxConfigFree(p); +} + +DMXConfigFullDimPtr +dmxConfigCreateFullDim(DMXConfigPartDimPtr pScrn, DMXConfigPartDimPtr pRoot) +{ + DMXConfigFullDimPtr pFull = dmxConfigAlloc(sizeof(*pFull)); + + pFull->scrn = pScrn; + pFull->root = pRoot; + return pFull; +} + +void +dmxConfigFreeFullDim(DMXConfigFullDimPtr p) +{ + if (!p) + return; + dmxConfigFreePartDim(p->scrn); + dmxConfigFreePartDim(p->root); + dmxConfigFree(p); +} + +DMXConfigDisplayPtr +dmxConfigCreateDisplay(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigFullDimPtr pDim, + DMXConfigPairPtr pOrigin, DMXConfigTokenPtr pEnd) +{ + DMXConfigDisplayPtr pDisplay = dmxConfigAlloc(sizeof(*pDisplay)); + + pDisplay->start = pStart; + pDisplay->dname = pName; + pDisplay->dim = pDim; + pDisplay->origin = pOrigin; + pDisplay->end = pEnd; + + pDisplay->name = pName ? pName->string : NULL; + pDisplay->rootXOrigin = pOrigin ? pOrigin->x : 0; + pDisplay->rootYOrigin = pOrigin ? pOrigin->y : 0; + + if (pDim && pDim->scrn && pDim->scrn->dim) { + pDisplay->scrnWidth = pDim->scrn->dim->x; + pDisplay->scrnHeight = pDim->scrn->dim->y; + } + if (pDim && pDim->scrn && pDim->scrn->offset) { + pDisplay->scrnX = pDim->scrn->offset->x; + pDisplay->scrnY = pDim->scrn->offset->y; + pDisplay->scrnXSign = pDim->scrn->offset->xsign; + pDisplay->scrnYSign = pDim->scrn->offset->ysign; + } + + if (pDim && pDim->root) { + if (pDim->root->dim) { + pDisplay->rootWidth = pDim->root->dim->x; + pDisplay->rootHeight = pDim->root->dim->y; + } + if (pDim->root->offset) { + pDisplay->rootX = pDim->root->offset->x; + pDisplay->rootY = pDim->root->offset->y; + pDisplay->rootXSign = pDim->root->offset->xsign; + pDisplay->rootYSign = pDim->root->offset->ysign; + } + } + else { /* If no root specification, copy width + * and height from scrn -- leave offset + * as zero, since it is relative to + * scrn. */ + pDisplay->rootWidth = pDisplay->scrnWidth; + pDisplay->rootHeight = pDisplay->scrnHeight; + } + + return pDisplay; +} + +void +dmxConfigFreeDisplay(DMXConfigDisplayPtr p) +{ + if (!p) + return; + dmxConfigFreeToken(p->start); + dmxConfigFreeString(p->dname); + dmxConfigFreeFullDim(p->dim); + dmxConfigFreeToken(p->end); + dmxConfigFree(p); +} + +DMXConfigWallPtr +dmxConfigCreateWall(DMXConfigTokenPtr pStart, + DMXConfigPairPtr pWallDim, + DMXConfigPairPtr pDisplayDim, + DMXConfigStringPtr pNameList, DMXConfigTokenPtr pEnd) +{ + DMXConfigWallPtr pWall = dmxConfigAlloc(sizeof(*pWall)); + + pWall->start = pStart; + pWall->wallDim = pWallDim; + pWall->displayDim = pDisplayDim; + pWall->nameList = pNameList; + pWall->end = pEnd; + + pWall->width = pDisplayDim ? pDisplayDim->x : 0; + pWall->height = pDisplayDim ? pDisplayDim->y : 0; + pWall->xwall = pWallDim ? pWallDim->x : 0; + pWall->ywall = pWallDim ? pWallDim->y : 0; + + return pWall; +} + +void +dmxConfigFreeWall(DMXConfigWallPtr p) +{ + if (!p) + return; + dmxConfigFreeToken(p->start); + dmxConfigFreePair(p->wallDim); + dmxConfigFreePair(p->displayDim); + dmxConfigFreeString(p->nameList); + dmxConfigFreeToken(p->end); + dmxConfigFree(p); +} + +DMXConfigOptionPtr +dmxConfigCreateOption(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pOption, DMXConfigTokenPtr pEnd) +{ + int length = 0; + int offset = 0; + DMXConfigStringPtr p; + DMXConfigOptionPtr option = dmxConfigAlloc(sizeof(*option)); + + for (p = pOption; p; p = p->next) { + if (p->string) + length += strlen(p->string) + 1; + } + + option->string = dmxConfigAlloc(length + 1); + + for (p = pOption; p; p = p->next) { + if (p->string) { + int len = strlen(p->string); + + strncpy(option->string + offset, p->string, len); + offset += len; + if (p->next) + option->string[offset++] = ' '; + } + } + option->string[offset] = '\0'; + + option->start = pStart; + option->option = pOption; + option->end = pEnd; + + return option; +} + +void +dmxConfigFreeOption(DMXConfigOptionPtr p) +{ + if (!p) + return; + free(p->string); + dmxConfigFreeToken(p->start); + dmxConfigFreeString(p->option); + dmxConfigFreeToken(p->end); + dmxConfigFree(p); +} + +const char ** +dmxConfigLookupParam(DMXConfigParamPtr p, const char *key, int *argc) +{ + DMXConfigParamPtr pt; + + for (pt = p; pt; pt = pt->next) { + if (pt->argv && !strcasecmp(pt->argv[0], key)) { + *argc = pt->argc; + return pt->argv; + } + } + *argc = 0; + return NULL; +} + +DMXConfigParamPtr +dmxConfigCreateParam(DMXConfigTokenPtr pStart, + DMXConfigTokenPtr pOpen, + DMXConfigStringPtr pParam, + DMXConfigTokenPtr pClose, DMXConfigTokenPtr pEnd) +{ + DMXConfigParamPtr param = dmxConfigAlloc(sizeof(*param)); + DMXConfigStringPtr pt; + + param->argc = 0; + param->argv = NULL; + for (pt = pParam; pt; pt = pt->next) { + if (pt->string) { + param->argv = realloc(param->argv, + (param->argc + 2) * sizeof(*param->argv)); + param->argv[param->argc] = pt->string; + ++param->argc; + } + } + if (param->argv) + param->argv[param->argc] = NULL; + + param->start = pStart; + param->open = pOpen; + param->param = pParam; + param->close = pClose; + param->end = pEnd; + + return param; +} + +void +dmxConfigFreeParam(DMXConfigParamPtr p) +{ + DMXConfigParamPtr next; + + if (!p) + return; + do { + next = p->next; + dmxConfigFreeToken(p->start); + dmxConfigFreeToken(p->open); + dmxConfigFreeString(p->param); + dmxConfigFreeToken(p->close); + dmxConfigFreeToken(p->end); + dmxConfigFree(p->argv); + dmxConfigFree(p); + } while ((p = next)); +} + +DMXConfigSubPtr +dmxConfigCreateSub(DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigDisplayPtr display, + DMXConfigWallPtr wall, + DMXConfigOptionPtr option, DMXConfigParamPtr param) +{ + DMXConfigSubPtr pSub = dmxConfigAlloc(sizeof(*pSub)); + + pSub->type = type; + switch (type) { + case dmxConfigComment: + pSub->comment = comment; + break; + case dmxConfigDisplay: + pSub->display = display; + break; + case dmxConfigWall: + pSub->wall = wall; + break; + case dmxConfigOption: + pSub->option = option; + break; + case dmxConfigParam: + pSub->param = param; + break; + default: + dmxConfigLog("Type %d not supported in subentry\n", type); + break; + } + return pSub; +} + +void +dmxConfigFreeSub(DMXConfigSubPtr sub) +{ + DMXConfigSubPtr pt; + + for (pt = sub; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: + dmxConfigFreeComment(pt->comment); + break; + case dmxConfigDisplay: + dmxConfigFreeDisplay(pt->display); + break; + case dmxConfigWall: + dmxConfigFreeWall(pt->wall); + break; + case dmxConfigOption: + dmxConfigFreeOption(pt->option); + break; + case dmxConfigParam: + dmxConfigFreeParam(pt->param); + break; + default: + dmxConfigLog("Type %d not supported in subentry\n", pt->type); + break; + } + } + dmxConfigFree(sub); +} + +DMXConfigSubPtr +dmxConfigSubComment(DMXConfigCommentPtr comment) +{ + return dmxConfigCreateSub(dmxConfigComment, comment, NULL, NULL, NULL, + NULL); +} + +DMXConfigSubPtr +dmxConfigSubDisplay(DMXConfigDisplayPtr display) +{ + return dmxConfigCreateSub(dmxConfigDisplay, NULL, display, NULL, NULL, + NULL); +} + +DMXConfigSubPtr +dmxConfigSubWall(DMXConfigWallPtr wall) +{ + return dmxConfigCreateSub(dmxConfigWall, NULL, NULL, wall, NULL, NULL); +} + +DMXConfigSubPtr +dmxConfigSubOption(DMXConfigOptionPtr option) +{ + return dmxConfigCreateSub(dmxConfigOption, NULL, NULL, NULL, option, NULL); +} + +DMXConfigSubPtr +dmxConfigSubParam(DMXConfigParamPtr param) +{ + return dmxConfigCreateSub(dmxConfigParam, NULL, NULL, NULL, NULL, param); +} + +extern DMXConfigSubPtr +dmxConfigAddSub(DMXConfigSubPtr head, DMXConfigSubPtr sub) +{ + DMXConfigSubPtr pt; + + if (!head) + return sub; + for (pt = head; pt->next; pt = pt->next); + pt->next = sub; + return head; +} + +DMXConfigVirtualPtr +dmxConfigCreateVirtual(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigPairPtr pDim, + DMXConfigTokenPtr pOpen, + DMXConfigSubPtr pSubentry, DMXConfigTokenPtr pClose) +{ + DMXConfigVirtualPtr pVirtual = dmxConfigAlloc(sizeof(*pVirtual)); + + pVirtual->start = pStart; + pVirtual->vname = pName; + pVirtual->dim = pDim; + pVirtual->open = pOpen; + pVirtual->subentry = pSubentry; + pVirtual->close = pClose; + + pVirtual->name = pName ? pName->string : NULL; + pVirtual->width = pDim ? pDim->x : 0; + pVirtual->height = pDim ? pDim->y : 0; + + return pVirtual; +} + +void +dmxConfigFreeVirtual(DMXConfigVirtualPtr virtual) +{ + dmxConfigFreeToken(virtual->start); + dmxConfigFreeString(virtual->vname); + dmxConfigFreePair(virtual->dim); + dmxConfigFreeToken(virtual->open); + dmxConfigFreeSub(virtual->subentry); + dmxConfigFreeToken(virtual->close); + dmxConfigFree(virtual); +} + +DMXConfigEntryPtr +dmxConfigCreateEntry(DMXConfigType type, + DMXConfigCommentPtr comment, DMXConfigVirtualPtr virtual) +{ + DMXConfigEntryPtr pEntry = dmxConfigAlloc(sizeof(*pEntry)); + + pEntry->type = type; + switch (type) { + case dmxConfigComment: + pEntry->comment = comment; + break; + case dmxConfigVirtual: + pEntry->virtual = virtual; + break; + default: + dmxConfigLog("Type %d not supported in entry\n", type); + break; + } + return pEntry; +} + +void +dmxConfigFreeEntry(DMXConfigEntryPtr entry) +{ + DMXConfigEntryPtr pt; + + for (pt = entry; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: + dmxConfigFreeComment(pt->comment); + break; + case dmxConfigVirtual: + dmxConfigFreeVirtual(pt->virtual); + break; + default: + dmxConfigLog("Type %d not supported in entry\n", pt->type); + break; + } + } + dmxConfigFree(entry); +} + +DMXConfigEntryPtr +dmxConfigAddEntry(DMXConfigEntryPtr head, + DMXConfigType type, + DMXConfigCommentPtr comment, DMXConfigVirtualPtr virtual) +{ + DMXConfigEntryPtr child = dmxConfigCreateEntry(type, comment, virtual); + DMXConfigEntryPtr pt; + + if (!head) + return child; + + for (pt = head; pt->next; pt = pt->next); + pt->next = child; + + return head; +} + +DMXConfigEntryPtr +dmxConfigEntryComment(DMXConfigCommentPtr comment) +{ + return dmxConfigCreateEntry(dmxConfigComment, comment, NULL); +} + +DMXConfigEntryPtr +dmxConfigEntryVirtual(DMXConfigVirtualPtr virtual) +{ + return dmxConfigCreateEntry(dmxConfigVirtual, NULL, virtual); +} diff --git a/hw/dmx/config/dmxparse.h b/hw/dmx/config/dmxparse.h new file mode 100644 index 0000000..7d31b63 --- /dev/null +++ b/hw/dmx/config/dmxparse.h @@ -0,0 +1,292 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +/** \file + * Interface to DMX configuration file parser. \see dmxparse.c */ + +#ifndef _DMXPARSE_H_ +#define _DMXPARSE_H_ + +#include /* For FILE */ + +/** Stores tokens not stored in other structures (e.g., keywords and ;) */ +typedef struct _DMXConfigToken { + int token; + int line; + const char *comment; +} DMXConfigToken, *DMXConfigTokenPtr; + +/** Stores parsed strings. */ +typedef struct _DMXConfigString { + int token; + int line; + const char *comment; + const char *string; + struct _DMXConfigString *next; +} DMXConfigString, *DMXConfigStringPtr; + +/** Stores parsed numbers. */ +typedef struct _DMXConfigNumber { + int token; + int line; + const char *comment; + int number; +} DMXConfigNumber, *DMXConfigNumberPtr; + +/** Stores parsed pairs (e.g., x y) */ +typedef struct _DMXConfigPair { + int token; + int line; + const char *comment; + int x; + int y; + int xsign; + int ysign; +} DMXConfigPair, *DMXConfigPairPtr; + +/** Stores parsed comments not stored with a token. */ +typedef struct _DMXConfigComment { + int token; + int line; + const char *comment; +} DMXConfigComment, *DMXConfigCommentPtr; + +typedef enum { + dmxConfigComment, + dmxConfigVirtual, + dmxConfigDisplay, + dmxConfigWall, + dmxConfigOption, + dmxConfigParam +} DMXConfigType; + +/** Stores a geometry specification. */ +typedef struct _DMXConfigPartDim { + DMXConfigPairPtr dim; + DMXConfigPairPtr offset; +} DMXConfigPartDim, *DMXConfigPartDimPtr; + +/** Stores a pair of geometry specifications. */ +typedef struct _DMXConfigFullDim { + DMXConfigPartDimPtr scrn; + DMXConfigPartDimPtr root; +} DMXConfigFullDim, *DMXConfigFullDimPtr; + +/** Stores parsed display information. */ +typedef struct _DMXConfigDisplay { + /* Summary information */ + const char *name; + /* Screen Window Geometry */ + int scrnWidth, scrnHeight; + int scrnX, scrnY; + int scrnXSign, scrnYSign; + /* Root Window Geometry */ + int rootWidth, rootHeight; + int rootX, rootY; + int rootXSign, rootYSign; + /* Origin in global space */ + int rootXOrigin, rootYOrigin; + + /* Raw configuration information */ + DMXConfigTokenPtr start; + DMXConfigStringPtr dname; + DMXConfigFullDimPtr dim; + DMXConfigPairPtr origin; + DMXConfigTokenPtr end; +} DMXConfigDisplay, *DMXConfigDisplayPtr; + +/** Stores parsed wall information. */ +typedef struct _DMXConfigWall { + /* Summary information */ + int width, height; /* dimensions of displays */ + int xwall, ywall; /* dimensions of wall, in tiles */ + + /* Raw configuration informaiton */ + DMXConfigTokenPtr start; + DMXConfigPairPtr wallDim; + DMXConfigPairPtr displayDim; + DMXConfigStringPtr nameList; + DMXConfigTokenPtr end; +} DMXConfigWall, *DMXConfigWallPtr; + +/** Stores parsed option information. */ +typedef struct _DMXConfigOption { + /* Summary information */ + char *string; + + /* Raw configuration informaiton */ + DMXConfigTokenPtr start; + DMXConfigStringPtr option; + DMXConfigTokenPtr end; +} DMXConfigOption, *DMXConfigOptionPtr; + +/** Stores parsed param information. */ +typedef struct _DMXConfigParam { + int argc; + const char **argv; + + DMXConfigTokenPtr start; + DMXConfigTokenPtr open; + DMXConfigStringPtr param; + DMXConfigTokenPtr close; + DMXConfigTokenPtr end; /* Either open/close OR end */ + struct _DMXConfigParam *next; +} DMXConfigParam, *DMXConfigParamPtr; + +/** Stores options under an entry (subentry). */ +typedef struct _DMXConfigSub { + DMXConfigType type; + DMXConfigCommentPtr comment; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + struct _DMXConfigSub *next; +} DMXConfigSub, *DMXConfigSubPtr; + +/** Stores parsed virtual information. */ +typedef struct _DMXConfigVirtual { + /* Summary information */ + const char *name; + int width, height; + + /* Raw configuration information */ + DMXConfigTokenPtr start; + DMXConfigStringPtr vname; + DMXConfigPairPtr dim; + DMXConfigTokenPtr open; + DMXConfigSubPtr subentry; + DMXConfigTokenPtr close; +} DMXConfigVirtual, *DMXConfigVirtualPtr; + +/** Heads entry storage. */ +typedef struct _DMXConfigEntry { + DMXConfigType type; + DMXConfigCommentPtr comment; + DMXConfigVirtualPtr virtual; + struct _DMXConfigEntry *next; +} DMXConfigEntry, *DMXConfigEntryPtr; + +extern DMXConfigEntryPtr dmxConfigEntry; + +extern int yylex(void); +extern int yydebug; +extern void yyerror(const char *message); + +extern void dmxConfigLog(const char *format, ...); +extern void *dmxConfigAlloc(unsigned long bytes); +extern void *dmxConfigRealloc(void *orig, + unsigned long orig_bytes, unsigned long bytes); +extern const char *dmxConfigCopyString(const char *string, int length); +extern void dmxConfigFree(void *area); +extern DMXConfigTokenPtr dmxConfigCreateToken(int token, int line, + const char *comment); +extern void dmxConfigFreeToken(DMXConfigTokenPtr p); +extern DMXConfigStringPtr dmxConfigCreateString(int token, int line, + const char *comment, + const char *string); +extern void dmxConfigFreeString(DMXConfigStringPtr p); +extern DMXConfigNumberPtr dmxConfigCreateNumber(int token, int line, + const char *comment, + int number); +extern void dmxConfigFreeNumber(DMXConfigNumberPtr p); +extern DMXConfigPairPtr dmxConfigCreatePair(int token, int line, + const char *comment, + int x, int y, int xsign, int ysign); +extern void dmxConfigFreePair(DMXConfigPairPtr p); +extern DMXConfigCommentPtr dmxConfigCreateComment(int token, int line, + const char *comment); +extern void dmxConfigFreeComment(DMXConfigCommentPtr p); +extern DMXConfigPartDimPtr dmxConfigCreatePartDim(DMXConfigPairPtr pDim, + DMXConfigPairPtr pOffset); +extern void dmxConfigFreePartDim(DMXConfigPartDimPtr p); +extern DMXConfigFullDimPtr dmxConfigCreateFullDim(DMXConfigPartDimPtr pScrn, + DMXConfigPartDimPtr pRoot); +extern void dmxConfigFreeFullDim(DMXConfigFullDimPtr p); +extern DMXConfigDisplayPtr dmxConfigCreateDisplay(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigFullDimPtr pDim, + DMXConfigPairPtr pOrigin, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeDisplay(DMXConfigDisplayPtr p); +extern DMXConfigWallPtr dmxConfigCreateWall(DMXConfigTokenPtr pStart, + DMXConfigPairPtr pWallDim, + DMXConfigPairPtr pDisplayDim, + DMXConfigStringPtr pNameList, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeWall(DMXConfigWallPtr p); +extern DMXConfigOptionPtr dmxConfigCreateOption(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pOption, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeOption(DMXConfigOptionPtr p); +extern DMXConfigParamPtr dmxConfigCreateParam(DMXConfigTokenPtr pStart, + DMXConfigTokenPtr pOpen, + DMXConfigStringPtr pParam, + DMXConfigTokenPtr pClose, + DMXConfigTokenPtr pEnd); +extern void dmxConfigFreeParam(DMXConfigParamPtr p); +extern const char **dmxConfigLookupParam(DMXConfigParamPtr p, + const char *key, int *argc); +extern DMXConfigSubPtr dmxConfigCreateSub(DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigDisplayPtr display, + DMXConfigWallPtr wall, + DMXConfigOptionPtr option, + DMXConfigParamPtr param); +extern void dmxConfigFreeSub(DMXConfigSubPtr sub); +extern DMXConfigSubPtr dmxConfigSubComment(DMXConfigCommentPtr comment); +extern DMXConfigSubPtr dmxConfigSubDisplay(DMXConfigDisplayPtr display); +extern DMXConfigSubPtr dmxConfigSubWall(DMXConfigWallPtr wall); +extern DMXConfigSubPtr dmxConfigSubOption(DMXConfigOptionPtr option); +extern DMXConfigSubPtr dmxConfigSubParam(DMXConfigParamPtr param); +extern DMXConfigSubPtr dmxConfigAddSub(DMXConfigSubPtr head, + DMXConfigSubPtr sub); +extern DMXConfigVirtualPtr dmxConfigCreateVirtual(DMXConfigTokenPtr pStart, + DMXConfigStringPtr pName, + DMXConfigPairPtr pDim, + DMXConfigTokenPtr pOpen, + DMXConfigSubPtr pSubentry, + DMXConfigTokenPtr pClose); +extern void dmxConfigFreeVirtual(DMXConfigVirtualPtr virtual); +extern DMXConfigEntryPtr dmxConfigCreateEntry(DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigVirtualPtr virtual); +extern void dmxConfigFreeEntry(DMXConfigEntryPtr entry); +extern DMXConfigEntryPtr dmxConfigAddEntry(DMXConfigEntryPtr head, + DMXConfigType type, + DMXConfigCommentPtr comment, + DMXConfigVirtualPtr virtual); +extern DMXConfigEntryPtr dmxConfigEntryComment(DMXConfigCommentPtr comment); +extern DMXConfigEntryPtr dmxConfigEntryVirtual(DMXConfigVirtualPtr virtual); + +#endif diff --git a/hw/dmx/config/dmxprint.c b/hw/dmx/config/dmxprint.c new file mode 100644 index 0000000..3145fb5 --- /dev/null +++ b/hw/dmx/config/dmxprint.c @@ -0,0 +1,544 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +/** \file + * + * This file provides support routines and helper functions to be used + * to pretty-print DMX configurations. + * + * Because the DMX configuration file parsing should be capable of being + * used in a stand-alone fashion (i.e., independent from the DMX server + * source tree), no dependencies on other DMX routines are made. */ + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxprint.h" +#include "parser.h" +#include +#include +#include + +static FILE *str = NULL; +static int indent = 0; +static int pos = 0; + +/** Stack of indentation information used for pretty-printing + * configuration information. */ +static struct stack { + int base; + int comment; + int step; + struct stack *next; +} *stack, initialStack = { +0, 0, 4, NULL}; + +static void +dmxConfigIndent(void) +{ + int i; + + if (indent < 0) + indent = 0; + if (indent > 40) + indent = 40; + for (i = 0; i < indent; i++) + fprintf(str, " "); +} + +static void +dmxConfigNewline(void) +{ + if (pos) + fprintf(str, "\n"); + pos = 0; +} + +static void +dmxConfigPushState(int base, int comment, int step) +{ + struct stack *new = dmxConfigAlloc(sizeof(*new)); + + new->base = base; + new->comment = comment; + new->step = step; + new->next = stack; + stack = new; + indent = base; + dmxConfigNewline(); +} + +static void +dmxConfigPushComment(void) +{ + if (stack) + indent = stack->comment; +} + +static void +dmxConfigPushStep(void) +{ + if (stack) + indent = stack->step; +} + +static void +dmxConfigPopState(void) +{ + struct stack *old = stack; + + if (!stack) + return; + indent = old->base; + stack = old->next; + if (!stack) + dmxConfigLog("Stack underflow\n"); + dmxConfigFree(old); + dmxConfigNewline(); +} + +static void +dmxConfigOutput(int addSpace, int doNewline, const char *comment, + const char *format, ...) +{ + va_list args; + + if (!pos) + dmxConfigIndent(); + else if (addSpace) + fprintf(str, " "); + + if (format) { + va_start(args, format); + /* RATS: This hasn't been audited -- it + * could probably result in a buffer + * overflow. */ + pos += vfprintf(str, format, args); /* assumes no newlines! */ + va_end(args); + } + + if (comment) { + if (pos) + fprintf(str, " "); + pos += fprintf(str, "#%s", comment); + dmxConfigNewline(); + dmxConfigPushComment(); + } + else if (doNewline) + dmxConfigNewline(); +} + +static void +dmxConfigPrintComment(DMXConfigCommentPtr p) +{ + dmxConfigOutput(1, 1, p->comment, NULL); +} + +static void +dmxConfigPrintTokenFlag(DMXConfigTokenPtr p, int flag) +{ + if (!p) + return; + switch (p->token) { + case T_VIRTUAL: + dmxConfigPushState(0, 4, 4); + dmxConfigOutput(0, 0, p->comment, "virtual"); + break; + case T_DISPLAY: + dmxConfigPushState(4, 12, 16); + dmxConfigOutput(0, 0, p->comment, "display"); + break; + case T_WALL: + dmxConfigPushState(4, 12, 16); + dmxConfigOutput(0, 0, p->comment, "wall"); + break; + case T_OPTION: + dmxConfigPushState(4, 12, 16); + dmxConfigOutput(0, 0, p->comment, "option"); + break; + case T_PARAM: + dmxConfigPushState(4, 8, 12); + dmxConfigOutput(0, 0, p->comment, "param"); + break; + case ';': + dmxConfigOutput(0, 1, p->comment, ";"); + if (flag) + dmxConfigPopState(); + break; + case '{': + dmxConfigOutput(1, 1, p->comment, "{"); + dmxConfigPushStep(); + break; + case '}': + if (flag) + dmxConfigPopState(); + dmxConfigOutput(0, 1, p->comment, "}"); + break; + case '/': + dmxConfigOutput(1, 0, NULL, "/"); + break; + default: + dmxConfigLog("unknown token %d on line %d\n", p->token, p->line); + } +} + +static void +dmxConfigPrintToken(DMXConfigTokenPtr p) +{ + dmxConfigPrintTokenFlag(p, 1); +} + +static void +dmxConfigPrintTokenNopop(DMXConfigTokenPtr p) +{ + dmxConfigPrintTokenFlag(p, 0); +} + +static int +dmxConfigPrintQuotedString(const char *s) +{ + const char *pt; + + if (!s || !s[0]) + return 1; /* Quote empty string */ + for (pt = s; *pt; ++pt) + if (isspace(*pt)) + return 1; + return 0; +} + +static void +dmxConfigPrintString(DMXConfigStringPtr p, int quote) +{ + DMXConfigStringPtr pt; + + if (!p) + return; + for (pt = p; pt; pt = pt->next) { + if (quote && dmxConfigPrintQuotedString(pt->string)) { + dmxConfigOutput(1, 0, pt->comment, "\"%s\"", + pt->string ? pt->string : ""); + } + else + dmxConfigOutput(1, 0, pt->comment, "%s", + pt->string ? pt->string : ""); + } +} + +static int +dmxConfigPrintPair(DMXConfigPairPtr p, int addSpace) +{ + const char *format = NULL; + + if (!p) + return 0; + switch (p->token) { + case T_ORIGIN: + format = "@%dx%d"; + break; + case T_DIMENSION: + format = "%dx%d"; + break; + case T_OFFSET: + format = "%c%d%c%d"; + break; + } + if (p->token == T_OFFSET) { + if (!p->comment && !p->x && !p->y && p->xsign >= 0 && p->ysign >= 0) + return 0; + dmxConfigOutput(addSpace, 0, p->comment, format, + p->xsign < 0 ? '-' : '+', p->x, + p->ysign < 0 ? '-' : '+', p->y); + } + else { + if (!p->comment && !p->x && !p->y) + return 0; + dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y); + } + return 1; +} + +static void +dmxConfigPrintDisplay(DMXConfigDisplayPtr p) +{ + DMXConfigToken dummyStart = { T_DISPLAY, 0, NULL }; + DMXConfigToken dummyEnd = { ';', 0, NULL }; + DMXConfigToken dummySep = { '/', 0, NULL }; + DMXConfigString dummyName = { T_STRING, 0, NULL, NULL, NULL }; + DMXConfigPair dummySDim = { T_DIMENSION, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummySOffset = { T_OFFSET, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummyRDim = { T_DIMENSION, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummyROffset = { T_OFFSET, 0, NULL, 0, 0, 0, 0 }; + DMXConfigPair dummyOrigin = { T_ORIGIN, 0, NULL, 0, 0, 0, 0 }; + int output; + + if (p->dname) + p->dname->string = p->name; + else + dummyName.string = p->name; + + if (p->dim && p->dim->scrn && p->dim->scrn->dim) { + p->dim->scrn->dim->x = p->scrnWidth; + p->dim->scrn->dim->y = p->scrnHeight; + } + else { + dummySDim.x = p->scrnWidth; + dummySDim.y = p->scrnHeight; + } + + if (p->dim && p->dim->scrn && p->dim->scrn->offset) { + p->dim->scrn->offset->x = p->scrnX; + p->dim->scrn->offset->y = p->scrnY; + } + else { + dummySOffset.x = p->scrnX; + dummySOffset.y = p->scrnY; + } + + if (p->dim && p->dim->root && p->dim->root->dim) { + p->dim->root->dim->x = p->rootWidth; + p->dim->root->dim->y = p->rootHeight; + } + else { + dummyRDim.x = p->rootWidth; + dummyRDim.y = p->rootHeight; + } + + if (p->dim && p->dim->root && p->dim->root->offset) { + p->dim->root->offset->x = p->rootX; + p->dim->root->offset->y = p->rootY; + } + else { + dummyROffset.x = p->rootX; + dummyROffset.y = p->rootY; + } + + if (p->origin) { + p->origin->x = p->rootXOrigin, p->origin->y = p->rootYOrigin; + p->origin->xsign = p->rootXSign, p->origin->ysign = p->rootYSign; + } + else { + dummyOrigin.x = p->rootXOrigin, dummyOrigin.y = p->rootYOrigin; + dummyOrigin.xsign = p->rootXSign, dummyOrigin.ysign = p->rootYSign; + } + + dmxConfigPrintToken(p->start ? p->start : &dummyStart); + dmxConfigPrintString(p->dname ? p->dname : &dummyName, 1); + + if (p->dim && p->dim->scrn && p->dim->scrn->dim) + output = dmxConfigPrintPair(p->dim->scrn->dim, 1); + else + output = dmxConfigPrintPair(&dummySDim, 1); + if (p->dim && p->dim->scrn && p->dim->scrn->offset) + dmxConfigPrintPair(p->dim->scrn->offset, !output); + else + dmxConfigPrintPair(&dummySOffset, !output); + + if (p->scrnWidth != p->rootWidth + || p->scrnHeight != p->rootHeight || p->rootX || p->rootY) { + dmxConfigPrintToken(&dummySep); + if (p->dim && p->dim->root && p->dim->root->dim) + output = dmxConfigPrintPair(p->dim->root->dim, 1); + else + output = dmxConfigPrintPair(&dummyRDim, 1); + if (p->dim && p->dim->root && p->dim->root->offset) + dmxConfigPrintPair(p->dim->root->offset, !output); + else + dmxConfigPrintPair(&dummyROffset, !output); + } + + dmxConfigPrintPair(p->origin ? p->origin : &dummyOrigin, 1); + dmxConfigPrintToken(p->end ? p->end : &dummyEnd); +} + +static void +dmxConfigPrintWall(DMXConfigWallPtr p) +{ + dmxConfigPrintToken(p->start); + dmxConfigPrintPair(p->wallDim, 1); + dmxConfigPrintPair(p->displayDim, 1); + dmxConfigPrintString(p->nameList, 1); + dmxConfigPrintToken(p->end); +} + +static void +dmxConfigPrintOption(DMXConfigOptionPtr p) +{ + DMXConfigToken dummyStart = { T_OPTION, 0, NULL }; + DMXConfigString dummyOption = { T_STRING, 0, NULL, NULL, NULL }; + DMXConfigToken dummyEnd = { ';', 0, NULL }; + + dummyOption.string = p->string; + + dmxConfigPrintToken(p->start ? p->start : &dummyStart); + dmxConfigPrintString(&dummyOption, 0); + dmxConfigPrintToken(p->end ? p->end : &dummyEnd); +} + +static void +dmxConfigPrintParam(DMXConfigParamPtr p) +{ + if (!p) + return; + if (p->start) { + if (p->open && p->close) { + dmxConfigPrintToken(p->start); + dmxConfigPrintToken(p->open); + dmxConfigPrintParam(p->next); + dmxConfigPrintToken(p->close); + } + else if (p->end && p->param) { + dmxConfigPrintToken(p->start); + dmxConfigPrintString(p->param, 1); + dmxConfigPrintToken(p->end); + } + else + dmxConfigLog("dmxConfigPrintParam: cannot handle format (a)\n"); + } + else if (p->end && p->param) { + dmxConfigPrintString(p->param, 1); + dmxConfigPrintTokenNopop(p->end); + dmxConfigPrintParam(p->next); + } + else + dmxConfigLog("dmxConfigPrintParam: cannot handle format (b)\n"); +} + +static void +dmxConfigPrintSub(DMXConfigSubPtr p) +{ + DMXConfigSubPtr pt; + + if (!p) + return; + for (pt = p; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: + dmxConfigPrintComment(pt->comment); + break; + case dmxConfigDisplay: + dmxConfigPrintDisplay(pt->display); + break; + case dmxConfigWall: + dmxConfigPrintWall(pt->wall); + break; + case dmxConfigOption: + dmxConfigPrintOption(pt->option); + break; + case dmxConfigParam: + dmxConfigPrintParam(pt->param); + break; + default: + dmxConfigLog("dmxConfigPrintSub:" + " cannot handle type %d in subentry\n", pt->type); + } + } +} + +static void +dmxConfigPrintVirtual(DMXConfigVirtualPtr p) +{ + DMXConfigToken dummyStart = { T_VIRTUAL, 0, NULL }; + DMXConfigToken dummyOpen = { '{', 0, NULL }; + DMXConfigToken dummyClose = { '}', 0, NULL }; + DMXConfigString dummyName = { T_STRING, 0, NULL, NULL, NULL }; + DMXConfigPair dummyDim = { T_DIMENSION, 0, NULL, 0, 0 }; + + if (p->vname) + p->vname->string = p->name; + else + dummyName.string = p->name; + + if (p->dim) + p->dim->x = p->width, p->dim->y = p->height; + else + dummyDim.x = p->width, dummyDim.y = p->height; + + dmxConfigPrintToken(p->start ? p->start : &dummyStart); + dmxConfigPrintString(p->vname ? p->vname : &dummyName, 1); + dmxConfigPrintPair(p->dim ? p->dim : &dummyDim, 1); + dmxConfigPrintToken(p->open ? p->open : &dummyOpen); + dmxConfigPrintSub(p->subentry); + dmxConfigPrintToken(p->close ? p->close : &dummyClose); +} + +/** The configuration information in \a entry will be pretty-printed to + * the \a stream. If \a stream is NULL, then stdout will be used. */ +void +dmxConfigPrint(FILE * stream, DMXConfigEntryPtr entry) +{ + DMXConfigEntryPtr pt; + + if (!stream) + str = stdout; + else + str = stream; + + stack = &initialStack; + + for (pt = entry; pt; pt = pt->next) { + switch (pt->type) { + case dmxConfigComment: + dmxConfigPrintComment(pt->comment); + break; + case dmxConfigVirtual: + dmxConfigPrintVirtual(pt->virtual); + break; + default: + dmxConfigLog("dmxConfigPrint: cannot handle type %d in entry\n", + pt->type); + } + } + if (pos) + dmxConfigNewline(); +} + +/** The configuration information in \a p will be pretty-printed to the + * \a stream. If \a stream is NULL, then stdout will be used. */ +void +dmxConfigVirtualPrint(FILE * stream, DMXConfigVirtualPtr p) +{ + if (!stream) + str = stdout; + else + str = stream; + + stack = &initialStack; + + dmxConfigPrintVirtual(p); + if (pos) + dmxConfigNewline(); +} diff --git a/hw/dmx/config/dmxprint.h b/hw/dmx/config/dmxprint.h new file mode 100644 index 0000000..d77bafc --- /dev/null +++ b/hw/dmx/config/dmxprint.h @@ -0,0 +1,43 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +/** \file + * Interface to DMX configuration file pretty-printer. \see dmxprint.c */ + +#ifndef _DMXPRINT_H_ +#define _DMXPRINT_H_ + +void dmxConfigPrint(FILE * str, DMXConfigEntryPtr entry); +void dmxConfigVirtualPrint(FILE * str, DMXConfigVirtualPtr p); + +#endif diff --git a/hw/dmx/config/dmxtodmx.c b/hw/dmx/config/dmxtodmx.c new file mode 100644 index 0000000..6634209 --- /dev/null +++ b/hw/dmx/config/dmxtodmx.c @@ -0,0 +1,50 @@ +/* + * Copyright 2002 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + * This is a simple filter for testing. + */ + +#include "dmxconfig.h" +#include "dmxparse.h" +#include "dmxprint.h" +#include "dmxcompat.h" + +extern int yyparse(void); +extern FILE *yyin; + +int +main(int argc, char **argv) +{ + yydebug = 0; + yyparse(); + dmxConfigPrint(stdout, dmxConfigEntry); + return 0; +} diff --git a/hw/dmx/config/man/Makefile.am b/hw/dmx/config/man/Makefile.am new file mode 100644 index 0000000..9bb62a4 --- /dev/null +++ b/hw/dmx/config/man/Makefile.am @@ -0,0 +1,2 @@ +include $(top_srcdir)/manpages.am +appman_PRE = xdmxconfig.man vdltodmx.man dmxtodmx.man diff --git a/hw/dmx/config/man/Makefile.in b/hw/dmx/config/man/Makefile.in new file mode 100644 index 0000000..be761a3 --- /dev/null +++ b/hw/dmx/config/man/Makefile.in @@ -0,0 +1,755 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/manpages.am +subdir = hw/dmx/config/man +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ + "$(DESTDIR)$(filemandir)" +DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +DLOPEN_LIBS = @DLOPEN_LIBS@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONT100DPIDIR = @FONT100DPIDIR@ +FONT75DPIDIR = @FONT75DPIDIR@ +FONTMISCDIR = @FONTMISCDIR@ +FONTOTFDIR = @FONTOTFDIR@ +FONTROOTDIR = @FONTROOTDIR@ +FONTTTFDIR = @FONTTTFDIR@ +FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_SYS_LIBS = @GLX_SYS_LIBS@ +GLX_TLS = @GLX_TLS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DOT = @HAVE_DOT@ +INSTALL = @INSTALL@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ +KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ +KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ + +# Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS +# 's|/,|/, |g' will add a space to help font path formatting +MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|g' -e \ + 's|__datadir__|$(datadir)|g' -e 's|__mandir__|$(mandir)|g' -e \ + 's|__sysconfdir__|$(sysconfdir)|g' -e \ + 's|__xconfigdir__|$(__XCONFIGDIR__)|g' -e \ + 's|__xkbdir__|$(XKB_BASE_DIRECTORY)|g' -e \ + 's|__XKB_DFLT_RULES__|$(XKB_DFLT_RULES)|g' -e \ + 's|__XKB_DFLT_MODEL__|$(XKB_DFLT_MODEL)|g' -e \ + 's|__XKB_DFLT_LAYOUT__|$(XKB_DFLT_LAYOUT)|g' -e \ + 's|__XKB_DFLT_VARIANT__|$(XKB_DFLT_VARIANT)|g' -e \ + 's|__XKB_DFLT_OPTIONS__|$(XKB_DFLT_OPTIONS)|g' -e \ + 's|__bundle_id_prefix__|$(BUNDLE_ID_PREFIX)|g' -e \ + 's|__modulepath__|$(DEFAULT_MODULE_PATH)|g' -e \ + 's|__default_font_path__|$(COMPILEDDEFAULTFONTPATH)|g' -e \ + '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ +OS_LIB = @OS_LIB@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJECTROOT = @PROJECTROOT@ +PYTHON3 = @PYTHON3@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RELEASE_DATE = @RELEASE_DATE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ +XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ +XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ +XKB_DFLT_RULES = @XKB_DFLT_RULES@ +XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XMLTO = @XMLTO@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_LIBS = @XQUARTZ_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ +XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ +XSLTPROC = @XSLTPROC@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +appmandir = $(APP_MAN_DIR) +#appman_PRE = list of application man page files set by calling Makefile.am +appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) +drivermandir = $(DRIVER_MAN_DIR) +#driverman_PRE = list of driver man page files set by calling Makefile.am +driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) +filemandir = $(FILE_MAN_DIR) +#fileman_PRE = list of file man page files set by calling Makefile.am +fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) + +# The calling Makefile should only contain man page targets +# Otherwise the following three global variables may conflict +EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) +CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) +SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man +appman_PRE = xdmxconfig.man vdltodmx.man dmxtodmx.man +all: all-am + +.SUFFIXES: +.SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/dmx/config/man/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/dmx/config/man/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_srcdir)/manpages.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-appmanDATA: $(appman_DATA) + @$(NORMAL_INSTALL) + @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ + done + +uninstall-appmanDATA: + @$(NORMAL_UNINSTALL) + @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) +install-drivermanDATA: $(driverman_DATA) + @$(NORMAL_INSTALL) + @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ + done + +uninstall-drivermanDATA: + @$(NORMAL_UNINSTALL) + @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) +install-filemanDATA: $(fileman_DATA) + @$(NORMAL_INSTALL) + @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ + done + +uninstall-filemanDATA: + @$(NORMAL_UNINSTALL) + @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-appmanDATA install-drivermanDATA \ + install-filemanDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ + uninstall-filemanDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-appmanDATA install-data install-data-am \ + install-drivermanDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-filemanDATA install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-appmanDATA \ + uninstall-drivermanDATA uninstall-filemanDATA + + +.man.$(APP_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ +.man.$(DRIVER_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ +.man.$(FILE_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/hw/dmx/config/man/dmxtodmx.man b/hw/dmx/config/man/dmxtodmx.man new file mode 100644 index 0000000..68c7f5b --- /dev/null +++ b/hw/dmx/config/man/dmxtodmx.man @@ -0,0 +1,41 @@ +.\" $XFree86$ +.\" Copyright 2002 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" The above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.\" +.\" Authors: +.\" Rickard E. (Rik) Faith +.\" +.TH dmxtodmx 1 __vendorversion__ +.SH NAME +dmxtodmx - dmx configuration file parser and printer +.SH SYNOPSIS +.B dmxtodmx +.SH DESCRIPTION +.I dmxtodmx +reads the standard input, parsing a configuration file for the +.I Xdmx +distributed multi-head X server. After a successful parse, the file is +pretty-printed to standard output. +.SH "SEE ALSO" +Xdmx(1), vdltodmx(1), xdmxconfig(1) diff --git a/hw/dmx/config/man/vdltodmx.man b/hw/dmx/config/man/vdltodmx.man new file mode 100644 index 0000000..b733db7 --- /dev/null +++ b/hw/dmx/config/man/vdltodmx.man @@ -0,0 +1,95 @@ +.\" $XFree86$ +.\" Copyright 2002 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" The above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.\" +.\" Authors: +.\" Rickard E. (Rik) Faith +.\" +.TH vdltodmx 1 __vendorversion__ +.SH NAME +vdltodmx - dmx configuration file parser and printer +.SH SYNOPSIS +.B vdltodmx +.I infile +.I outfile +.SH DESCRIPTION +.I vdltodmx +reads the input file, which should be in VDL configuration file format. +After a successful parse, a file in Xdmx configuration file format is +written to the output file. +.P +The VDL file format is used with +.IR xmovie , +which is available from +http://www.llnl.gov/icc/lc/img/xmovie/xmovie.html +.SH EXAMPLE +Given the following VDL-format file: +.RS +.nf +0 +2 +# +# +2560 2048 Left two-thirds [restrict=*:2] +2 +:2.1 1280 2048 0 0 0 0 +:2.2 1280 2048 1280 0 0 0 +4 +1280 1024 0 0 +1280 1024 0 1024 +1280 1024 1280 0 +1280 1024 1280 1024 +# +2560 2048 Right two-thirds [restrict=*:2] +2 +:2.2 1280 2048 0 0 0 0 +:2.3 1280 2048 1280 0 0 0 +4 +1280 1024 1280 0 +1280 1024 1280 1024 +1280 1024 2560 0 +1280 1024 2560 1024 +.fi +.RE +the following DMX-format file will be produced: +.RS +.nf +# +# +virtual "Left two-thirds" 2560x2048 { + display :2.1 1280x2048; + display :2.2 1280x2048 @1280x0; +} +# +virtual "Right two-thirds" 2560x2048 { + display :2.2 1280x2048; + display :2.3 1280x2048 @1280x0; +} +.fi +.RE +.SH BUGS +If the VDL file is not in the expected format, the program will probably +dump core. +.SH "SEE ALSO" +Xdmx(1), xdmxconfig(1), vdl(3), xmovie(1) diff --git a/hw/dmx/config/man/xdmxconfig.man b/hw/dmx/config/man/xdmxconfig.man new file mode 100644 index 0000000..dcceea0 --- /dev/null +++ b/hw/dmx/config/man/xdmxconfig.man @@ -0,0 +1,63 @@ +.\" $XFree86$ +.\" Copyright 2002 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" The above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.\" +.\" Authors: +.\" Rickard E. (Rik) Faith +.\" +.TH xdmxconfig 1 __vendorversion__ +.SH NAME +xdmxconfig - a graphical configuration tool for Xdmx configuration files +.SH SYNOPSIS +.B xdmxconfig +[filename] +.SH DESCRIPTION +.I xdmxconfig +reads, edits, and writes configuration files for the Xdmx server. The +grammar for the configuration file is specified in the Xdmx(1) manual +page. +.PP +To start from scratch, create a "New Global" and specify the name and +overall dimensions for the configuration. Then use "New Display" to +enter more displays. +.PP +If there is more than one configuration, the configuration name button +will bring up a selection menu. +.PP +In the right-hand pannel, the left mouse button will move the +highlighted display at "tool resolution"; the middle mouse button will +move the highlighted display by a single pixel (at "wall resolution"); +and the right mouse button will bring up a menu allowing the highlighted +display to be edited or deleted. The arrow keys will also move the +highlighted display by a single pixel. +.SH BUGS +Currently, entries with the +.B wall +keyword are not editable, but will be preserved in the new output file. +The tool will quit when requested by the user, even if a configuration +file has not been written out (i.e., without warning). The menu +interaction should be improved (menu entries that don't currently work +should be greyed-out, for example). The Help button does not work. +.SH "SEE ALSO" +Xdmx(1), vdltodmx(1) diff --git a/hw/dmx/config/parser.c b/hw/dmx/config/parser.c new file mode 100644 index 0000000..e98ea27 --- /dev/null +++ b/hw/dmx/config/parser.c @@ -0,0 +1,2036 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Copy the first part of user declarations. */ + +/* Line 268 of yacc.c */ +#line 35 "parser.y" + +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmxparse.h" +#include +#include +#define YYDEBUG 1 +#define YYERROR_VERBOSE +#define YY_USE_PROTOS + +DMXConfigEntryPtr dmxConfigEntry = NULL; +#define APPEND(type, h, t) \ +{ \ + type pt; \ + for (pt = h; pt->next; pt = pt->next); \ + pt->next = t; \ +} + + +/* Line 268 of yacc.c */ +#line 93 "parser.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_VIRTUAL = 258, + T_DISPLAY = 259, + T_WALL = 260, + T_OPTION = 261, + T_PARAM = 262, + T_STRING = 263, + T_DIMENSION = 264, + T_OFFSET = 265, + T_ORIGIN = 266, + T_COMMENT = 267, + T_LINE_COMMENT = 268 + }; +#endif +/* Tokens. */ +#define T_VIRTUAL 258 +#define T_DISPLAY 259 +#define T_WALL 260 +#define T_OPTION 261 +#define T_PARAM 262 +#define T_STRING 263 +#define T_DIMENSION 264 +#define T_OFFSET 265 +#define T_ORIGIN 266 +#define T_COMMENT 267 +#define T_LINE_COMMENT 268 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 293 of yacc.c */ +#line 56 "parser.y" + + DMXConfigTokenPtr token; + DMXConfigStringPtr string; + DMXConfigNumberPtr number; + DMXConfigPairPtr pair; + DMXConfigFullDimPtr fdim; + DMXConfigPartDimPtr pdim; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + DMXConfigCommentPtr comment; + DMXConfigSubPtr subentry; + DMXConfigVirtualPtr virtual; + DMXConfigEntryPtr entry; + + + +/* Line 293 of yacc.c */ +#line 174 "parser.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 343 of yacc.c */ +#line 186 "parser.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 13 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 106 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 18 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 25 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 59 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 95 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 268 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 2, 4, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 5, 7, 10, 12, 14, 19, 25, + 31, 38, 40, 43, 45, 47, 49, 51, 53, 57, + 61, 66, 68, 71, 74, 77, 79, 81, 85, 88, + 90, 96, 101, 106, 111, 115, 119, 122, 128, 133, + 137, 139, 142, 144, 147, 149, 152, 154, 157, 159, + 162, 164, 167, 169, 172, 174, 177, 179, 182, 184 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 19, 0, -1, 20, -1, 21, -1, 20, 21, -1, + 22, -1, 17, -1, 7, 39, 23, 40, -1, 7, + 35, 39, 23, 40, -1, 7, 34, 39, 23, 40, + -1, 7, 34, 35, 39, 23, 40, -1, 24, -1, + 23, 24, -1, 17, -1, 31, -1, 32, -1, 25, + -1, 26, -1, 10, 42, 38, -1, 11, 42, 38, + -1, 11, 39, 27, 40, -1, 28, -1, 27, 28, + -1, 42, 38, -1, 35, 36, -1, 35, -1, 36, + -1, 29, 6, 29, -1, 6, 29, -1, 29, -1, + 33, 34, 30, 37, 38, -1, 33, 30, 37, 38, + -1, 33, 34, 37, 38, -1, 33, 34, 30, 38, + -1, 33, 30, 38, -1, 33, 34, 38, -1, 33, + 38, -1, 41, 35, 35, 42, 38, -1, 41, 35, + 42, 38, -1, 41, 42, 38, -1, 8, -1, 8, + 16, -1, 12, -1, 12, 16, -1, 13, -1, 13, + 16, -1, 14, -1, 14, 16, -1, 15, -1, 15, + 16, -1, 5, -1, 5, 16, -1, 3, -1, 3, + 16, -1, 4, -1, 4, 16, -1, 9, -1, 9, + 16, -1, 34, -1, 42, 34, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 95, 95, 98, 99, 102, 103, 106, 108, 110, + 112, 116, 117, 120, 121, 122, 123, 124, 127, 131, + 133, 139, 140, 143, 147, 149, 151, 155, 157, 159, + 163, 165, 167, 170, 172, 174, 176, 180, 182, 184, + 188, 189, 192, 193, 196, 197, 200, 201, 204, 205, + 208, 209, 212, 213, 216, 217, 220, 221, 224, 225 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "'{'", "'}'", "';'", "'/'", "T_VIRTUAL", + "T_DISPLAY", "T_WALL", "T_OPTION", "T_PARAM", "T_STRING", "T_DIMENSION", + "T_OFFSET", "T_ORIGIN", "T_COMMENT", "T_LINE_COMMENT", "$accept", + "Program", "EntryList", "Entry", "Virtual", "SubList", "Sub", + "OptionEntry", "ParamEntry", "ParamList", "Param", "PartialDim", + "FullDim", "DisplayEntry", "WallEntry", "Display", "Name", "Dimension", + "Offset", "Origin", "Terminal", "Open", "Close", "Wall", "NameList", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 123, 125, 59, 47, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 18, 19, 20, 20, 21, 21, 22, 22, 22, + 22, 23, 23, 24, 24, 24, 24, 24, 25, 26, + 26, 27, 27, 28, 29, 29, 29, 30, 30, 30, + 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, + 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, + 38, 38, 39, 39, 40, 40, 41, 41, 42, 42 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 2, 1, 1, 4, 5, 5, + 6, 1, 2, 1, 1, 1, 1, 1, 3, 3, + 4, 1, 2, 2, 2, 1, 1, 3, 2, 1, + 5, 4, 4, 4, 3, 3, 2, 5, 4, 3, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 0, 6, 0, 2, 3, 5, 52, 42, 44, + 0, 0, 0, 1, 4, 53, 43, 45, 0, 0, + 0, 40, 56, 0, 0, 13, 0, 11, 16, 17, + 14, 15, 0, 0, 0, 0, 0, 41, 57, 58, + 0, 0, 0, 54, 12, 7, 50, 0, 46, 29, + 0, 0, 25, 26, 36, 0, 0, 0, 9, 8, + 59, 18, 0, 21, 0, 19, 55, 51, 28, 47, + 0, 48, 0, 34, 0, 0, 35, 24, 0, 0, + 39, 10, 22, 20, 23, 27, 49, 31, 0, 33, + 32, 0, 38, 30, 37 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 3, 4, 5, 6, 26, 27, 28, 29, 62, + 63, 49, 50, 30, 31, 32, 39, 52, 53, 72, + 54, 12, 45, 33, 64 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -32 +static const yytype_int8 yypact[] = +{ + -3, 41, -32, 22, -3, -32, -32, 12, 35, 46, + 5, 62, 75, -32, -32, -32, -32, -32, 62, 75, + 75, 51, 54, 59, 18, -32, 65, -32, -32, -32, + -32, -32, 88, 37, 75, 65, 65, -32, -32, -32, + 86, 59, 86, 61, -32, -32, 79, -4, 80, 28, + 31, 74, 67, -32, -32, 37, 86, 65, -32, -32, + -32, -32, 56, -32, 86, -32, -32, -32, -32, -32, + -4, 81, 94, -32, 31, 94, -32, -32, 59, 86, + -32, -32, -32, -32, -32, -32, -32, -32, 94, -32, + -32, 86, -32, -32, -32 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -32, -32, -32, 99, -32, 6, -19, -32, -32, -32, + 42, -28, 55, -32, -32, -32, -1, 2, 53, -31, + -27, 48, -30, -32, -22 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint8 yytable[] = +{ + 10, 40, 42, 11, 1, 58, 59, 44, 7, 9, + 48, 56, 18, 61, 2, 65, 44, 44, 9, 68, + 75, 7, 13, 73, 76, 35, 36, 81, 15, 80, + 8, 51, 83, 79, 70, 55, 46, 84, 44, 60, + 57, 60, 85, 88, 7, 87, 71, 89, 90, 8, + 9, 16, 92, 8, 9, 60, 91, 78, 19, 20, + 43, 93, 17, 60, 94, 7, 34, 37, 8, 43, + 38, 8, 41, 21, 22, 23, 24, 66, 60, 46, + 47, 48, 25, 21, 22, 23, 24, 9, 48, 71, + 60, 46, 25, 46, 47, 67, 69, 86, 8, 46, + 8, 9, 48, 14, 82, 77, 74 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-32)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_uint8 yycheck[] = +{ + 1, 23, 24, 1, 7, 35, 36, 26, 3, 13, + 14, 33, 10, 40, 17, 42, 35, 36, 13, 47, + 51, 3, 0, 50, 51, 19, 20, 57, 16, 56, + 12, 32, 62, 55, 6, 33, 5, 64, 57, 40, + 34, 42, 70, 74, 3, 72, 15, 74, 75, 12, + 13, 16, 79, 12, 13, 56, 78, 55, 10, 11, + 4, 88, 16, 64, 91, 3, 18, 16, 12, 4, + 16, 12, 24, 8, 9, 10, 11, 16, 79, 5, + 6, 14, 17, 8, 9, 10, 11, 13, 14, 15, + 91, 5, 17, 5, 6, 16, 16, 16, 12, 5, + 12, 13, 14, 4, 62, 52, 51 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 7, 17, 19, 20, 21, 22, 3, 12, 13, + 34, 35, 39, 0, 21, 16, 16, 16, 35, 39, + 39, 8, 9, 10, 11, 17, 23, 24, 25, 26, + 31, 32, 33, 41, 39, 23, 23, 16, 16, 34, + 42, 39, 42, 4, 24, 40, 5, 6, 14, 29, + 30, 34, 35, 36, 38, 35, 42, 23, 40, 40, + 34, 38, 27, 28, 42, 38, 16, 16, 29, 16, + 6, 15, 37, 38, 30, 37, 38, 36, 35, 42, + 38, 40, 28, 40, 38, 29, 16, 38, 37, 38, + 38, 42, 38, 38, 38 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* This macro is provided for backward compatibility. */ + +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: + +/* Line 1806 of yacc.c */ +#line 95 "parser.y" + { dmxConfigEntry = (yyvsp[(1) - (1)].entry); } + break; + + case 4: + +/* Line 1806 of yacc.c */ +#line 99 "parser.y" + { APPEND(DMXConfigEntryPtr,(yyvsp[(1) - (2)].entry),(yyvsp[(2) - (2)].entry)); (yyval.entry) = (yyvsp[(1) - (2)].entry); } + break; + + case 5: + +/* Line 1806 of yacc.c */ +#line 102 "parser.y" + { (yyval.entry) = dmxConfigEntryVirtual((yyvsp[(1) - (1)].virtual)); } + break; + + case 6: + +/* Line 1806 of yacc.c */ +#line 103 "parser.y" + { (yyval.entry) = dmxConfigEntryComment((yyvsp[(1) - (1)].comment)); } + break; + + case 7: + +/* Line 1806 of yacc.c */ +#line 107 "parser.y" + { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (4)].token), NULL, NULL, (yyvsp[(2) - (4)].token), (yyvsp[(3) - (4)].subentry), (yyvsp[(4) - (4)].token)); } + break; + + case 8: + +/* Line 1806 of yacc.c */ +#line 109 "parser.y" + { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (5)].token), NULL, (yyvsp[(2) - (5)].pair), (yyvsp[(3) - (5)].token), (yyvsp[(4) - (5)].subentry), (yyvsp[(5) - (5)].token)); } + break; + + case 9: + +/* Line 1806 of yacc.c */ +#line 111 "parser.y" + { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (5)].token), (yyvsp[(2) - (5)].string), NULL, (yyvsp[(3) - (5)].token), (yyvsp[(4) - (5)].subentry), (yyvsp[(5) - (5)].token)); } + break; + + case 10: + +/* Line 1806 of yacc.c */ +#line 113 "parser.y" + { (yyval.virtual) = dmxConfigCreateVirtual((yyvsp[(1) - (6)].token), (yyvsp[(2) - (6)].string), (yyvsp[(3) - (6)].pair), (yyvsp[(4) - (6)].token), (yyvsp[(5) - (6)].subentry), (yyvsp[(6) - (6)].token) ); } + break; + + case 12: + +/* Line 1806 of yacc.c */ +#line 117 "parser.y" + { APPEND(DMXConfigSubPtr,(yyvsp[(1) - (2)].subentry),(yyvsp[(2) - (2)].subentry)); (yyval.subentry) = (yyvsp[(1) - (2)].subentry); } + break; + + case 13: + +/* Line 1806 of yacc.c */ +#line 120 "parser.y" + { (yyval.subentry) = dmxConfigSubComment((yyvsp[(1) - (1)].comment)); } + break; + + case 14: + +/* Line 1806 of yacc.c */ +#line 121 "parser.y" + { (yyval.subentry) = dmxConfigSubDisplay((yyvsp[(1) - (1)].display)); } + break; + + case 15: + +/* Line 1806 of yacc.c */ +#line 122 "parser.y" + { (yyval.subentry) = dmxConfigSubWall((yyvsp[(1) - (1)].wall)); } + break; + + case 16: + +/* Line 1806 of yacc.c */ +#line 123 "parser.y" + { (yyval.subentry) = dmxConfigSubOption((yyvsp[(1) - (1)].option)); } + break; + + case 17: + +/* Line 1806 of yacc.c */ +#line 124 "parser.y" + { (yyval.subentry) = dmxConfigSubParam((yyvsp[(1) - (1)].param)); } + break; + + case 18: + +/* Line 1806 of yacc.c */ +#line 128 "parser.y" + { (yyval.option) = dmxConfigCreateOption((yyvsp[(1) - (3)].token), (yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].token)); } + break; + + case 19: + +/* Line 1806 of yacc.c */ +#line 132 "parser.y" + { (yyval.param) = dmxConfigCreateParam((yyvsp[(1) - (3)].token), NULL, (yyvsp[(2) - (3)].string), NULL, (yyvsp[(3) - (3)].token)); } + break; + + case 20: + +/* Line 1806 of yacc.c */ +#line 134 "parser.y" + { (yyval.param) = dmxConfigCreateParam((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].token), NULL, (yyvsp[(4) - (4)].token), NULL); + (yyval.param)->next = (yyvsp[(3) - (4)].param); + } + break; + + case 22: + +/* Line 1806 of yacc.c */ +#line 140 "parser.y" + { APPEND(DMXConfigParamPtr,(yyvsp[(1) - (2)].param),(yyvsp[(2) - (2)].param)); (yyval.param) = (yyvsp[(1) - (2)].param); } + break; + + case 23: + +/* Line 1806 of yacc.c */ +#line 144 "parser.y" + { (yyval.param) = dmxConfigCreateParam(NULL, NULL, (yyvsp[(1) - (2)].string), NULL, (yyvsp[(2) - (2)].token)); } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 148 "parser.y" + { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[(1) - (2)].pair), (yyvsp[(2) - (2)].pair)); } + break; + + case 25: + +/* Line 1806 of yacc.c */ +#line 150 "parser.y" + { (yyval.pdim) = dmxConfigCreatePartDim((yyvsp[(1) - (1)].pair), NULL); } + break; + + case 26: + +/* Line 1806 of yacc.c */ +#line 152 "parser.y" + { (yyval.pdim) = dmxConfigCreatePartDim(NULL, (yyvsp[(1) - (1)].pair)); } + break; + + case 27: + +/* Line 1806 of yacc.c */ +#line 156 "parser.y" + { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[(1) - (3)].pdim), (yyvsp[(3) - (3)].pdim)); } + break; + + case 28: + +/* Line 1806 of yacc.c */ +#line 158 "parser.y" + { (yyval.fdim) = dmxConfigCreateFullDim(NULL, (yyvsp[(2) - (2)].pdim)); } + break; + + case 29: + +/* Line 1806 of yacc.c */ +#line 160 "parser.y" + { (yyval.fdim) = dmxConfigCreateFullDim((yyvsp[(1) - (1)].pdim), NULL); } + break; + + case 30: + +/* Line 1806 of yacc.c */ +#line 164 "parser.y" + { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (5)].token), (yyvsp[(2) - (5)].string), (yyvsp[(3) - (5)].fdim), (yyvsp[(4) - (5)].pair), (yyvsp[(5) - (5)].token)); } + break; + + case 31: + +/* Line 1806 of yacc.c */ +#line 166 "parser.y" + { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (4)].token), NULL, (yyvsp[(2) - (4)].fdim), (yyvsp[(3) - (4)].pair), (yyvsp[(4) - (4)].token)); } + break; + + case 32: + +/* Line 1806 of yacc.c */ +#line 168 "parser.y" + { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].string), NULL, (yyvsp[(3) - (4)].pair), (yyvsp[(4) - (4)].token)); } + break; + + case 33: + +/* Line 1806 of yacc.c */ +#line 171 "parser.y" + { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].fdim), NULL, (yyvsp[(4) - (4)].token)); } + break; + + case 34: + +/* Line 1806 of yacc.c */ +#line 173 "parser.y" + { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (3)].token), NULL, (yyvsp[(2) - (3)].fdim), NULL, (yyvsp[(3) - (3)].token)); } + break; + + case 35: + +/* Line 1806 of yacc.c */ +#line 175 "parser.y" + { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (3)].token), (yyvsp[(2) - (3)].string), NULL, NULL, (yyvsp[(3) - (3)].token)); } + break; + + case 36: + +/* Line 1806 of yacc.c */ +#line 177 "parser.y" + { (yyval.display) = dmxConfigCreateDisplay((yyvsp[(1) - (2)].token), NULL, NULL, NULL, (yyvsp[(2) - (2)].token)); } + break; + + case 37: + +/* Line 1806 of yacc.c */ +#line 181 "parser.y" + { (yyval.wall) = dmxConfigCreateWall((yyvsp[(1) - (5)].token), (yyvsp[(2) - (5)].pair), (yyvsp[(3) - (5)].pair), (yyvsp[(4) - (5)].string), (yyvsp[(5) - (5)].token)); } + break; + + case 38: + +/* Line 1806 of yacc.c */ +#line 183 "parser.y" + { (yyval.wall) = dmxConfigCreateWall((yyvsp[(1) - (4)].token), (yyvsp[(2) - (4)].pair), NULL, (yyvsp[(3) - (4)].string), (yyvsp[(4) - (4)].token)); } + break; + + case 39: + +/* Line 1806 of yacc.c */ +#line 185 "parser.y" + { (yyval.wall) = dmxConfigCreateWall((yyvsp[(1) - (3)].token), NULL, NULL, (yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].token)); } + break; + + case 41: + +/* Line 1806 of yacc.c */ +#line 189 "parser.y" + { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 43: + +/* Line 1806 of yacc.c */ +#line 193 "parser.y" + { (yyval.string) = (yyvsp[(1) - (2)].string); (yyval.string)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 45: + +/* Line 1806 of yacc.c */ +#line 197 "parser.y" + { (yyval.pair) = (yyvsp[(1) - (2)].pair); (yyval.pair)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 47: + +/* Line 1806 of yacc.c */ +#line 201 "parser.y" + { (yyval.pair) = (yyvsp[(1) - (2)].pair); (yyval.pair)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 49: + +/* Line 1806 of yacc.c */ +#line 205 "parser.y" + { (yyval.pair) = (yyvsp[(1) - (2)].pair); (yyval.pair)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 51: + +/* Line 1806 of yacc.c */ +#line 209 "parser.y" + { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 53: + +/* Line 1806 of yacc.c */ +#line 213 "parser.y" + { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 55: + +/* Line 1806 of yacc.c */ +#line 217 "parser.y" + { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 57: + +/* Line 1806 of yacc.c */ +#line 221 "parser.y" + { (yyval.token) = (yyvsp[(1) - (2)].token); (yyval.token)->comment = (yyvsp[(2) - (2)].comment)->comment; } + break; + + case 59: + +/* Line 1806 of yacc.c */ +#line 225 "parser.y" + { APPEND(DMXConfigStringPtr, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].string)); (yyval.string) = (yyvsp[(1) - (2)].string); } + break; + + + +/* Line 1806 of yacc.c */ +#line 1808 "parser.c" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + diff --git a/hw/dmx/config/parser.h b/hw/dmx/config/parser.h new file mode 100644 index 0000000..59cea49 --- /dev/null +++ b/hw/dmx/config/parser.h @@ -0,0 +1,103 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_VIRTUAL = 258, + T_DISPLAY = 259, + T_WALL = 260, + T_OPTION = 261, + T_PARAM = 262, + T_STRING = 263, + T_DIMENSION = 264, + T_OFFSET = 265, + T_ORIGIN = 266, + T_COMMENT = 267, + T_LINE_COMMENT = 268 + }; +#endif +/* Tokens. */ +#define T_VIRTUAL 258 +#define T_DISPLAY 259 +#define T_WALL 260 +#define T_OPTION 261 +#define T_PARAM 262 +#define T_STRING 263 +#define T_DIMENSION 264 +#define T_OFFSET 265 +#define T_ORIGIN 266 +#define T_COMMENT 267 +#define T_LINE_COMMENT 268 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 2068 of yacc.c */ +#line 56 "parser.y" + + DMXConfigTokenPtr token; + DMXConfigStringPtr string; + DMXConfigNumberPtr number; + DMXConfigPairPtr pair; + DMXConfigFullDimPtr fdim; + DMXConfigPartDimPtr pdim; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + DMXConfigCommentPtr comment; + DMXConfigSubPtr subentry; + DMXConfigVirtualPtr virtual; + DMXConfigEntryPtr entry; + + + +/* Line 2068 of yacc.c */ +#line 95 "parser.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +extern YYSTYPE yylval; + + diff --git a/hw/dmx/config/parser.y b/hw/dmx/config/parser.y new file mode 100644 index 0000000..ac24410 --- /dev/null +++ b/hw/dmx/config/parser.y @@ -0,0 +1,226 @@ +/* $XFree86$ */ +/* + * Copyright 2002-2003 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith + * + */ + +%{ +#ifdef HAVE_DMX_CONFIG_H +#include +#endif + +#include "dmxparse.h" +#include +#include +#define YYDEBUG 1 +#define YYERROR_VERBOSE +#define YY_USE_PROTOS + +DMXConfigEntryPtr dmxConfigEntry = NULL; +#define APPEND(type, h, t) \ +{ \ + type pt; \ + for (pt = h; pt->next; pt = pt->next); \ + pt->next = t; \ +} +%} + +%union { + DMXConfigTokenPtr token; + DMXConfigStringPtr string; + DMXConfigNumberPtr number; + DMXConfigPairPtr pair; + DMXConfigFullDimPtr fdim; + DMXConfigPartDimPtr pdim; + DMXConfigDisplayPtr display; + DMXConfigWallPtr wall; + DMXConfigOptionPtr option; + DMXConfigParamPtr param; + DMXConfigCommentPtr comment; + DMXConfigSubPtr subentry; + DMXConfigVirtualPtr virtual; + DMXConfigEntryPtr entry; +} + + /* Terminals */ +%token '{' '}' ';' '/' T_VIRTUAL T_DISPLAY T_WALL T_OPTION T_PARAM +%token T_STRING +%token T_DIMENSION T_OFFSET T_ORIGIN +%token T_COMMENT T_LINE_COMMENT + + /* Non-termials */ +%type Display Wall Terminal Open Close +%type NameList Name +%type Dimension Offset Origin +%type PartialDim +%type FullDim +%type DisplayEntry +%type